diff --git a/README.md b/README.md
index da67362..6342f40 100644
--- a/README.md
+++ b/README.md
@@ -27,7 +27,7 @@ _(how rollback-and-chase in this project roughly works)_
## 1.1 Tools to install
### Backend
- [Command Line Tools for Xcode](https://developer.apple.com/download/all/?q=command%20line%20tools) (on OSX) or [TDM-GCC](https://jmeubank.github.io/tdm-gcc/download/) (on Windows) (a `make` executable mandatory)
-- [Golang1.19.1](https://golang.org/dl/) (mandatory, in China please try a mirror site like [that of ustc](https://mirrors.ustc.edu.cn/golang/))
+- [Golang1.18.6](https://golang.org/dl/) (brought down to 1.18 for GopherJs support, mandatory, in China please try a mirror site like [that of ustc](https://mirrors.ustc.edu.cn/golang/))
- [MySQL 5.7](https://dev.mysql.com/downloads/windows/installer/5.7.html) (mandatory, for OSX not all versions of 5.7 can be found thus 5.7.24 is recommended)
- [Redis 3.0.503 or above](https://redis.io/download/) (mandatory)
- [skeema](https://www.skeema.io/) (optional, only for convenient MySQL schema provisioning)
diff --git a/battle_srv/api/v1/player.go b/battle_srv/api/v1/player.go
index 997727c..9e51754 100644
--- a/battle_srv/api/v1/player.go
+++ b/battle_srv/api/v1/player.go
@@ -5,7 +5,7 @@ import (
. "battle_srv/common"
"battle_srv/common/utils"
"battle_srv/models"
- . "battle_srv/protos"
+ . "jsexport/protos"
"battle_srv/storage"
"bytes"
"crypto/sha256"
diff --git a/battle_srv/env_tools/load_pre_conf.go b/battle_srv/env_tools/load_pre_conf.go
index 09be2b0..52599a3 100644
--- a/battle_srv/env_tools/load_pre_conf.go
+++ b/battle_srv/env_tools/load_pre_conf.go
@@ -4,7 +4,7 @@ import (
. "battle_srv/common"
"battle_srv/common/utils"
"battle_srv/models"
- . "battle_srv/protos"
+ . "jsexport/protos"
"battle_srv/storage"
. "dnmshared"
sq "github.com/Masterminds/squirrel"
diff --git a/battle_srv/env_tools/test_env_db.go b/battle_srv/env_tools/test_env_db.go
index aa3c74b..ecb7d42 100644
--- a/battle_srv/env_tools/test_env_db.go
+++ b/battle_srv/env_tools/test_env_db.go
@@ -4,7 +4,7 @@ import (
. "battle_srv/common"
"battle_srv/common/utils"
"battle_srv/models"
- . "battle_srv/protos"
+ . "jsexport/protos"
"battle_srv/storage"
. "dnmshared"
diff --git a/battle_srv/go.mod b/battle_srv/go.mod
index 71dab42..454070c 100644
--- a/battle_srv/go.mod
+++ b/battle_srv/go.mod
@@ -1,6 +1,6 @@
module battle_srv
-go 1.19
+go 1.18
require (
github.com/Masterminds/squirrel v0.0.0-20180815162352-8a7e65843414
@@ -22,6 +22,7 @@ require (
google.golang.org/protobuf v1.28.1
dnmshared v0.0.0
+ jsexport v0.0.0
)
require (
@@ -48,4 +49,5 @@ require (
replace (
dnmshared => ../dnmshared
+ jsexport => ../jsexport
)
diff --git a/battle_srv/models/pb_type_convert.go b/battle_srv/models/pb_type_convert.go
index ae42687..6418772 100644
--- a/battle_srv/models/pb_type_convert.go
+++ b/battle_srv/models/pb_type_convert.go
@@ -1,7 +1,7 @@
package models
import (
- . "battle_srv/protos"
+ . "jsexport/protos"
)
func toPbPlayers(modelInstances map[int32]*Player, withMetaInfo bool) map[int32]*PlayerDownsync {
diff --git a/battle_srv/models/player.go b/battle_srv/models/player.go
index 11fe20e..e0aea76 100644
--- a/battle_srv/models/player.go
+++ b/battle_srv/models/player.go
@@ -1,7 +1,7 @@
package models
import (
- . "battle_srv/protos"
+ . "jsexport/protos"
"battle_srv/storage"
. "dnmshared"
"fmt"
diff --git a/battle_srv/models/room.go b/battle_srv/models/room.go
index 34b3cfb..1705b48 100644
--- a/battle_srv/models/room.go
+++ b/battle_srv/models/room.go
@@ -3,7 +3,8 @@ package models
import (
. "battle_srv/common"
"battle_srv/common/utils"
- . "battle_srv/protos"
+ . "jsexport/protos"
+ . "jsexport/models"
. "dnmshared"
. "dnmshared/sharedprotos"
"encoding/xml"
diff --git a/battle_srv/ws/serve.go b/battle_srv/ws/serve.go
index 8299428..627d014 100644
--- a/battle_srv/ws/serve.go
+++ b/battle_srv/ws/serve.go
@@ -3,7 +3,7 @@ package ws
import (
. "battle_srv/common"
"battle_srv/models"
- pb "battle_srv/protos"
+ pb "jsexport/protos"
"container/heap"
"fmt"
"github.com/gin-gonic/gin"
diff --git a/collider_visualizer/go.mod b/collider_visualizer/go.mod
index d9deb8b..991dc20 100644
--- a/collider_visualizer/go.mod
+++ b/collider_visualizer/go.mod
@@ -1,10 +1,10 @@
module viscol
-go 1.19
+go 1.18
require (
- dnmshared v0.0.0
battle_srv v0.0.0
+ dnmshared v0.0.0
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
github.com/hajimehoshi/ebiten/v2 v2.4.7
github.com/solarlune/resolv v0.5.1
@@ -13,18 +13,31 @@ require (
require (
github.com/ebitengine/purego v0.0.0-20220905075623-aeed57cda744 // indirect
+ github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20220806181222-55e207c401ad // indirect
github.com/hajimehoshi/file2byteslice v0.0.0-20210813153925-5340248a8f41 // indirect
+ github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jezek/xgb v1.0.1 // indirect
github.com/kvartborg/vector v0.0.0-20200419093813-2cba0cabb4f0 // indirect
+ github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86 // indirect
+ github.com/neelance/sourcemap v0.0.0-20200213170602-2833bce08e4c // indirect
+ github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 // indirect
+ github.com/sirupsen/logrus v1.8.1 // indirect
+ github.com/spf13/cobra v1.2.1 // indirect
+ github.com/spf13/pflag v1.0.5 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.23.0 // indirect
- golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56 // indirect
+ golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect
+ golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6 // indirect
golang.org/x/mobile v0.0.0-20220722155234-aaac322e2105 // indirect
+ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
golang.org/x/sys v0.0.0-20220818161305-2296e01440c6 // indirect
+ golang.org/x/term v0.0.0-20220411215600-e5f449aeb171 // indirect
+ golang.org/x/tools v0.1.12 // indirect
google.golang.org/protobuf v1.28.1 // indirect
)
replace dnmshared => ../dnmshared
+
replace battle_srv => ../battle_srv
diff --git a/collider_visualizer/go.sum b/collider_visualizer/go.sum
index 376124f..a94bc6d 100644
--- a/collider_visualizer/go.sum
+++ b/collider_visualizer/go.sum
@@ -1,14 +1,153 @@
+cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
+cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
+cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
+cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=
+cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
+cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=
+cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=
+cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=
+cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4=
+cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M=
+cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc=
+cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk=
+cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=
+cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=
+cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=
+cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI=
+cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk=
+cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg=
+cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8=
+cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0=
+cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
+cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
+cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
+cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
+cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
+cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
+cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
+cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
+cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk=
+cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
+cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
+cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
+cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=
+cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
+cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
+cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
+cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
+cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
+dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
+github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
+github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
+github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
+github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
+github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
+github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
+github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM=
+github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
+github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
+github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
+github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
+github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
+github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
+github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
+github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
+github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
+github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
+github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/ebitengine/purego v0.0.0-20220905075623-aeed57cda744 h1:A8UnJ/5OKzki4HBDwoRQz7I6sxKsokpMXcGh+fUxpfc=
github.com/ebitengine/purego v0.0.0-20220905075623-aeed57cda744/go.mod h1:Eh8I3yvknDYZeCuXH9kRNaPuHEwvXDCk378o9xszmHg=
+github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
+github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
+github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
+github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=
+github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
+github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
+github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
+github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
+github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
+github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI=
+github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU=
+github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
+github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
+github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
+github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20220806181222-55e207c401ad h1:kX51IjbsJPCvzV9jUoVQG9GEUqIq5hjfYzXTqQ52Rh8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20220806181222-55e207c401ad/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
+github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
+github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g=
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
+github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
+github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
+github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
+github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
+github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
+github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
+github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
+github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
+github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
+github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
+github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
+github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=
+github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
+github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
+github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
+github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
+github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
+github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
+github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
+github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
+github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
+github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
+github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
+github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=
+github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
+github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
+github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
+github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
+github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
+github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
+github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
+github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
+github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
+github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
+github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
+github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
+github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
+github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
+github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
+github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
+github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
+github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
+github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
+github.com/gopherjs/gopherjs v1.17.2 h1:fQnZVsXk8uxXIStYb0N4bGk7jeyTalG/wsZjQ25dO0g=
+github.com/gopherjs/gopherjs v1.17.2/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k=
+github.com/gopherjs/gopherjs v1.18.0-beta1 h1:IbykhVEq4SAjwyBRuNHl0aOO6w6IqgL3RUdMhoBo4mY=
+github.com/gopherjs/gopherjs v1.18.0-beta1/go.mod h1:6UY8PXRnu51MqjYCCY4toG0S5GeH5uVJ3qDxIsa+kqo=
+github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
github.com/hajimehoshi/bitmapfont/v2 v2.2.1 h1:y7zcy02/UgO24IL3COqYtrRZzhRucNBtmCo/SNU648k=
github.com/hajimehoshi/bitmapfont/v2 v2.2.1/go.mod h1:wjrYAy8vKgj9JsFgnYAOK346/uvE22TlmqouzdnYIs0=
github.com/hajimehoshi/ebiten/v2 v2.4.7 h1:XuvB7R0Rbw/O7g6vNU8gqr5b9e7MNhhAONMSsyreLDI=
@@ -18,63 +157,292 @@ github.com/hajimehoshi/file2byteslice v0.0.0-20210813153925-5340248a8f41/go.mod
github.com/hajimehoshi/go-mp3 v0.3.3/go.mod h1:qMJj/CSDxx6CGHiZeCgbiq2DSUkbK0UbtXShQcnfyMM=
github.com/hajimehoshi/oto v0.6.1/go.mod h1:0QXGEkbuJRohbJaxr7ZQSxnju7hEhseiPx2hrh6raOI=
github.com/hajimehoshi/oto/v2 v2.3.1/go.mod h1:seWLbgHH7AyUMYKfKYT9pg7PhUu9/SisyJvNTT+ASQo=
+github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q=
+github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
+github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
+github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
+github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
+github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
+github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
+github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=
+github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
+github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
+github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
+github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
+github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
+github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
+github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
+github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
+github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
+github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
+github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
+github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
+github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
+github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
+github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
+github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/jakecoffman/cp v1.2.1/go.mod h1:JjY/Fp6d8E1CHnu74gWNnU0+b9VzEdUVPoJxg2PsTQg=
github.com/jezek/xgb v1.0.1 h1:YUGhxps0aR7J2Xplbs23OHnV1mWaxFVcOl9b+1RQkt8=
github.com/jezek/xgb v1.0.1/go.mod h1:nrhwO0FX/enq75I7Y7G8iN1ubpSGZEiA3v9e9GyRFlk=
github.com/jfreymuth/oggvorbis v1.0.4/go.mod h1:1U4pqWmghcoVsCJJ4fRBKv9peUJMBHixthRlBeD6uII=
github.com/jfreymuth/vorbis v1.0.2/go.mod h1:DoftRo4AznKnShRl1GxiTFCseHr4zR9BN3TWXyuzrqQ=
+github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
+github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
+github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
+github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
+github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
+github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
+github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
+github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
+github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
+github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kvartborg/vector v0.0.0-20200419093813-2cba0cabb4f0 h1:v8lWpj5957KtDMKu+xQtlu6G3ZoZR6Tn9bsfZCRG5Xw=
github.com/kvartborg/vector v0.0.0-20200419093813-2cba0cabb4f0/go.mod h1:GAX7tMJqXx9fB1BrsTWPOXy6IBRX+J461BffVPAdpwo=
+github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
+github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
+github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
+github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
+github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
+github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
+github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
+github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
+github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
+github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
+github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
+github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
+github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
+github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
+github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86 h1:D6paGObi5Wud7xg83MaEFyjxQB1W5bz5d0IFppr+ymk=
+github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo=
+github.com/neelance/sourcemap v0.0.0-20200213170602-2833bce08e4c h1:bY6ktFuJkt+ZXkX0RChQch2FtHpWQLVS8Qo1YasiIVk=
+github.com/neelance/sourcemap v0.0.0-20200213170602-2833bce08e4c/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM=
+github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
+github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI=
+github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
+github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
+github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
+github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
+github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
+github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
+github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 h1:bUGsEnyNbVPw06Bs80sCeARAlK8lhwqGyi6UT8ymuGk=
+github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg=
+github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
+github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
+github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
+github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
+github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/solarlune/resolv v0.5.1 h1:Ul6PAs/zaxiMUOEYz1Z6VeUj5k3CDcWMvSh+kivybDY=
github.com/solarlune/resolv v0.5.1/go.mod h1:HjM2f/0NoVjVdZsi26GtugX5aFbA62COEFEXkOhveRw=
+github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
+github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
+github.com/spf13/cobra v1.2.1 h1:+KmjbUw1hriSNMF55oPrkZcb27aECyrj8V2ytv7kWDw=
+github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk=
+github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
+github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
+github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
+github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
+github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
+github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
+github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
+github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
+go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs=
+go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
+go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ=
+go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
+go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
+go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
+go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
+go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
+go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
+go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
+go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY=
go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY=
+golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
+golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 h1:kUhD7nTDoI3fVd9G4ORWrbV5NY0liEs/Jg2pv5f+bBA=
+golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
+golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
+golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56 h1:estk1glOnSVeJ9tdEZZc5mAMDZk5lNJNyJ6DvrBkTEU=
golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4=
+golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=
+golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=
+golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
+golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
+golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
+golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
+golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.0.0-20220722155232-062f8c9fd539/go.mod h1:doUCurBvlfPMKfmIpRIywoHmhN3VyhnoFDbvIEWF4hY=
golang.org/x/image v0.0.0-20220902085622-e7cb96979f69 h1:Lj6HJGCSn5AjxRAH2+r35Mir4icalbqku+CLUtjnvXY=
golang.org/x/image v0.0.0-20220902085622-e7cb96979f69/go.mod h1:doUCurBvlfPMKfmIpRIywoHmhN3VyhnoFDbvIEWF4hY=
+golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
+golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
+golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
+golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
+golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
+golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
+golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
+golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20190415191353-3e0bab5405d6/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
+golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
golang.org/x/mobile v0.0.0-20220722155234-aaac322e2105 h1:3vUV5x5+3LfQbgk7paCM6INOaJG9xXQbn79xoNkwfIk=
golang.org/x/mobile v0.0.0-20220722155234-aaac322e2105/go.mod h1:pe2sM7Uk+2Su1y7u/6Z8KJ24D7lepUjFZbhFOrmDfuQ=
+golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
+golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
+golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
+golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
+golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
+golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
+golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
+golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
+golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
+golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
+golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
+golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
+golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
+golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
+golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
+golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
+golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
+golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
+golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190429190828-d89cdac9e872/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220712014510-0a85c31ab51e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@@ -83,20 +451,200 @@ golang.org/x/sys v0.0.0-20220818161305-2296e01440c6 h1:Sx/u41w+OwrInGdEckYmEuU5g
golang.org/x/sys v0.0.0-20220818161305-2296e01440c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
+golang.org/x/term v0.0.0-20220411215600-e5f449aeb171 h1:EH1Deb8WZJ0xc0WK//leUHXcX9aLE5SymusoTmMZye8=
+golang.org/x/term v0.0.0-20220411215600-e5f449aeb171/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
+golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
+golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
+golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
+golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
+golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
+golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
+golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
+golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
+golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
+golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
+golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
+golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
+golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
+golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
+golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE=
+golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.8-0.20211022200916-316ba0b74098/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
+golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
+google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
+google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
+google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
+google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
+google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
+google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
+google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
+google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
+google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
+google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
+google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
+google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
+google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
+google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=
+google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=
+google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg=
+google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE=
+google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8=
+google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU=
+google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94=
+google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8=
+google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
+google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
+google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
+google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
+google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
+google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
+google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
+google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
+google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
+google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
+google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
+google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
+google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
+google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
+google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
+google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
+google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
+google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
+google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
+google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
+google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
+google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA=
+google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=
+google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
+google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
+google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=
+google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
+google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
+google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
+google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
+google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
+google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
+google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
+google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
+google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
+google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
+google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
+google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
+google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
+google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
+google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
+google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
+google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=
+google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
+google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
+google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
+google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
+google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
+google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
+google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
+google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
+google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
+google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
+google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
+google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
+gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
+gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
+honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
+honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
+rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
+rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
+rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
diff --git a/dnmshared/go.mod b/dnmshared/go.mod
index 919ac63..bd7bc58 100644
--- a/dnmshared/go.mod
+++ b/dnmshared/go.mod
@@ -1,3 +1,3 @@
module dnmshared
-go 1.19
+go 1.18
diff --git a/battle_srv/models/ringbuf.go b/dnmshared/ringbuf.go
similarity index 98%
rename from battle_srv/models/ringbuf.go
rename to dnmshared/ringbuf.go
index 70ab871..dfddab9 100644
--- a/battle_srv/models/ringbuf.go
+++ b/dnmshared/ringbuf.go
@@ -1,4 +1,4 @@
-package models
+package dnmshared
type RingBuffer struct {
Ed int32 // write index, open index
diff --git a/frontend/assets/resources/pbfiles/room_downsync_frame.proto b/frontend/assets/resources/pbfiles/room_downsync_frame.proto
index f80b5c3..410a122 100644
--- a/frontend/assets/resources/pbfiles/room_downsync_frame.proto
+++ b/frontend/assets/resources/pbfiles/room_downsync_frame.proto
@@ -1,5 +1,5 @@
syntax = "proto3";
-option go_package = "battle_srv/protos"; // here "./" corresponds to the "--go_out" value in "protoc" command
+option go_package = "jsexport/protos"; // here "./" corresponds to the "--go_out" value in "protoc" command
package protos;
import "geometry.proto"; // The import path here is only w.r.t. the proto file, not the Go package.
diff --git a/jsexport/Makefile b/jsexport/Makefile
new file mode 100644
index 0000000..29860ff
--- /dev/null
+++ b/jsexport/Makefile
@@ -0,0 +1,25 @@
+PROJECTNAME=jsexport
+ROOT_DIR=.
+all: help
+## Available proxies for downloading go modules are listed in "https://github.com/golang/go/wiki/Modules#how-do-i-use-vendoring-with-modules-is-vendoring-going-away".
+#GOPROXY=https://mirrors.aliyun.com/goproxy
+GOPROXY=https://goproxy.io
+
+serve:
+ gopherjs serve $(PROJECTNAME)
+
+build:
+ gopherjs build $(PROJECTNAME)
+
+build-min:
+ gopherjs build -m $(PROJECTNAME)
+
+.PHONY: help
+
+help: Makefile
+ @echo
+ @echo " Choose a command run:"
+ @echo
+ @sed -n 's/^##//p' $< | column -t -s ':' | sed -e 's/^/ /'
+ @echo
+
diff --git a/jsexport/README.md b/jsexport/README.md
new file mode 100644
index 0000000..2cfb12d
--- /dev/null
+++ b/jsexport/README.md
@@ -0,0 +1,5 @@
+GopherJs is supposed to be run by `go run`.
+
+If on-the-fly compilation is needed, run `gopherjs serve jsexport` and then visit `http://localhost:8080/jsexport.js` -- if 404 not found is responded, run `gopherjs build` to check syntax errors.
+
+See the `Makefile` for more options.
diff --git a/jsexport/go.mod b/jsexport/go.mod
new file mode 100644
index 0000000..6a242cf
--- /dev/null
+++ b/jsexport/go.mod
@@ -0,0 +1,19 @@
+module jsexport
+
+go 1.18
+
+require (
+ dnmshared v0.0.0
+ github.com/gopherjs/gopherjs v1.18.0-beta1
+)
+
+require (
+ github.com/kvartborg/vector v0.0.0-20200419093813-2cba0cabb4f0 // indirect
+ github.com/solarlune/resolv v0.5.1 // indirect
+ go.uber.org/atomic v1.3.2 // indirect
+ go.uber.org/multierr v1.1.0 // indirect
+ go.uber.org/zap v1.9.1 // indirect
+ google.golang.org/protobuf v1.28.1 // indirect
+)
+
+replace dnmshared => ../dnmshared
diff --git a/jsexport/go.sum b/jsexport/go.sum
new file mode 100644
index 0000000..868f9ca
--- /dev/null
+++ b/jsexport/go.sum
@@ -0,0 +1,20 @@
+github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
+github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/gopherjs/gopherjs v1.17.2 h1:fQnZVsXk8uxXIStYb0N4bGk7jeyTalG/wsZjQ25dO0g=
+github.com/gopherjs/gopherjs v1.17.2/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k=
+github.com/gopherjs/gopherjs v1.18.0-beta1 h1:IbykhVEq4SAjwyBRuNHl0aOO6w6IqgL3RUdMhoBo4mY=
+github.com/gopherjs/gopherjs v1.18.0-beta1/go.mod h1:6UY8PXRnu51MqjYCCY4toG0S5GeH5uVJ3qDxIsa+kqo=
+github.com/kvartborg/vector v0.0.0-20200419093813-2cba0cabb4f0 h1:v8lWpj5957KtDMKu+xQtlu6G3ZoZR6Tn9bsfZCRG5Xw=
+github.com/kvartborg/vector v0.0.0-20200419093813-2cba0cabb4f0/go.mod h1:GAX7tMJqXx9fB1BrsTWPOXy6IBRX+J461BffVPAdpwo=
+github.com/solarlune/resolv v0.5.1 h1:Ul6PAs/zaxiMUOEYz1Z6VeUj5k3CDcWMvSh+kivybDY=
+github.com/solarlune/resolv v0.5.1/go.mod h1:HjM2f/0NoVjVdZsi26GtugX5aFbA62COEFEXkOhveRw=
+go.uber.org/atomic v1.3.2 h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4=
+go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
+go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI=
+go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
+go.uber.org/zap v1.9.1 h1:XCJQEf3W6eZaVwhRBof6ImoYGJSITeKWsyeh3HFu/5o=
+go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
+google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
+google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
diff --git a/jsexport/index.html b/jsexport/index.html
new file mode 100644
index 0000000..70ec049
--- /dev/null
+++ b/jsexport/index.html
@@ -0,0 +1,18 @@
+
+
+
+
+
+
diff --git a/jsexport/jsexport.js b/jsexport/jsexport.js
new file mode 100644
index 0000000..a6e288d
--- /dev/null
+++ b/jsexport/jsexport.js
@@ -0,0 +1,210240 @@
+"use strict";
+(function() {
+
+var $goVersion = "go1.18.6";
+Error.stackTraceLimit = Infinity;
+
+var $NaN = NaN;
+var $global, $module;
+if (typeof window !== "undefined") { /* web page */
+ $global = window;
+} else if (typeof self !== "undefined") { /* web worker */
+ $global = self;
+} else if (typeof global !== "undefined") { /* Node.js */
+ $global = global;
+ $global.require = require;
+} else { /* others (e.g. Nashorn) */
+ $global = this;
+}
+
+if ($global === undefined || $global.Array === undefined) {
+ throw new Error("no global object found");
+}
+if (typeof module !== "undefined") {
+ $module = module;
+}
+
+if (!$global.fs && $global.require) {
+ try {
+ var fs = $global.require('fs');
+ if (typeof fs === "object" && fs !== null && Object.keys(fs).length !== 0) {
+ $global.fs = fs;
+ }
+ } catch(e) { /* Ignore if the module couldn't be loaded. */ }
+}
+
+if (!$global.fs) {
+ var outputBuf = "";
+ var 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 }, // unused
+ writeSync: function writeSync(fd, buf) {
+ outputBuf += decoder.decode(buf);
+ var nl = outputBuf.lastIndexOf("\n");
+ if (nl != -1) {
+ console.log(outputBuf.substr(0, nl));
+ outputBuf = outputBuf.substr(nl + 1);
+ }
+ return buf.length;
+ },
+ write: function write(fd, buf, offset, length, position, callback) {
+ if (offset !== 0 || length !== buf.length || position !== null) {
+ callback(enosys());
+ return;
+ }
+ var n = this.writeSync(fd, buf);
+ callback(null, n);
+ }
+ };
+}
+
+var $linknames = {} // Collection of functions referenced by a go:linkname directive.
+var $packages = {}, $idCounter = 0;
+var $keys = function(m) { return m ? Object.keys(m) : []; };
+var $flushConsole = function() {};
+var $throwRuntimeError; /* set by package "runtime" */
+var $throwNilPointerError = function() { $throwRuntimeError("invalid memory address or nil pointer dereference"); };
+var $call = function(fn, rcvr, args) { return fn.apply(rcvr, args); };
+var $makeFunc = function(fn) { return function() { return $externalize(fn(this, new ($sliceType($jsObjectPtr))($global.Array.prototype.slice.call(arguments, []))), $emptyInterface); }; };
+var $unused = function(v) {};
+var $print = console.log;
+// Under Node we can emulate print() more closely by avoiding a newline.
+if (($global.process !== undefined) && $global.require) {
+ try {
+ var util = $global.require('util');
+ $print = function() { $global.process.stderr.write(util.format.apply(this, arguments)); };
+ } catch (e) {
+ // Failed to require util module, keep using console.log().
+ }
+}
+var $println = console.log
+
+var $initAllLinknames = function() {
+ var names = $keys($packages);
+ for (var i = 0; i < names.length; i++) {
+ var f = $packages[names[i]]["$initLinknames"];
+ if (typeof f == 'function') {
+ f();
+ }
+ }
+}
+
+var $mapArray = function(array, f) {
+ var newArray = new array.constructor(array.length);
+ for (var i = 0; i < array.length; i++) {
+ newArray[i] = f(array[i]);
+ }
+ return newArray;
+};
+
+// Returns a method bound to the receiver instance, safe to invoke as a
+// standalone function. Bound function is cached for later reuse.
+var $methodVal = function(recv, name) {
+ var vals = recv.$methodVals || {};
+ recv.$methodVals = vals; /* noop for primitives */
+ var f = vals[name];
+ if (f !== undefined) {
+ return f;
+ }
+ var method = recv[name];
+ f = method.bind(recv);
+ vals[name] = f;
+ return f;
+};
+
+var $methodExpr = function(typ, name) {
+ var method = typ.prototype[name];
+ if (method.$expr === undefined) {
+ method.$expr = function() {
+ $stackDepthOffset--;
+ try {
+ if (typ.wrapped) {
+ arguments[0] = new typ(arguments[0]);
+ }
+ return Function.call.apply(method, arguments);
+ } finally {
+ $stackDepthOffset++;
+ }
+ };
+ }
+ return method.$expr;
+};
+
+var $ifaceMethodExprs = {};
+var $ifaceMethodExpr = function(name) {
+ var expr = $ifaceMethodExprs["$" + name];
+ if (expr === undefined) {
+ expr = $ifaceMethodExprs["$" + name] = function() {
+ $stackDepthOffset--;
+ try {
+ return Function.call.apply(arguments[0][name], arguments);
+ } finally {
+ $stackDepthOffset++;
+ }
+ };
+ }
+ return expr;
+};
+
+var $subslice = function(slice, low, high, max) {
+ if (high === undefined) {
+ high = slice.$length;
+ }
+ if (max === undefined) {
+ max = slice.$capacity;
+ }
+ if (low < 0 || high < low || max < high || high > slice.$capacity || max > slice.$capacity) {
+ $throwRuntimeError("slice bounds out of range");
+ }
+ if (slice === slice.constructor.nil) {
+ return slice;
+ }
+ var s = new slice.constructor(slice.$array);
+ s.$offset = slice.$offset + low;
+ s.$length = high - low;
+ s.$capacity = max - low;
+ return s;
+};
+
+var $substring = function(str, low, high) {
+ if (low < 0 || high < low || high > str.length) {
+ $throwRuntimeError("slice bounds out of range");
+ }
+ return str.substring(low, high);
+};
+
+// Convert Go slice to an equivalent JS array type.
+var $sliceToNativeArray = function(slice) {
+ if (slice.$array.constructor !== Array) {
+ return slice.$array.subarray(slice.$offset, slice.$offset + slice.$length);
+ }
+ return slice.$array.slice(slice.$offset, slice.$offset + slice.$length);
+};
+
+// Convert Go slice to a pointer to an underlying Go array.
+//
+// Note that an array pointer can be represented by an "unwrapped" native array
+// type, and it will be wrapped back into its Go type when necessary.
+var $sliceToGoArray = function(slice, arrayPtrType) {
+ var arrayType = arrayPtrType.elem;
+ if (arrayType !== undefined && slice.$length < arrayType.len) {
+ $throwRuntimeError("cannot convert slice with length " + slice.$length + " to pointer to array with length " + arrayType.len);
+ }
+ if (slice == slice.constructor.nil) {
+ return arrayPtrType.nil; // Nil slice converts to nil array pointer.
+ }
+ if (slice.$array.constructor !== Array) {
+ return slice.$array.subarray(slice.$offset, slice.$offset + arrayType.len);
+ }
+ if (slice.$offset == 0 && slice.$length == slice.$capacity && slice.$length == arrayType.len) {
+ return slice.$array;
+ }
+ if (arrayType.len == 0) {
+ return new arrayType([]);
+ }
+
+ // Array.slice (unlike TypedArray.subarray) returns a copy of an array range,
+ // which is not sharing memory with the original one, which violates the spec
+ // for slice to array conversion. This is incompatible with the Go spec, in
+ // particular that the assignments to the array elements would be visible in
+ // the slice. Prefer to fail explicitly instead of creating subtle bugs.
+ $throwRuntimeError("gopherjs: non-numeric slice to underlying array conversion is not supported for subslices");
+};
+
+// Convert between compatible slice types (e.g. native and names).
+var $convertSliceType = function(slice, desiredType) {
+ if (slice == slice.constructor.nil) {
+ return desiredType.nil; // Preserve nil value.
+ }
+
+ return $subslice(new desiredType(slice.$array), slice.$offset, slice.$offset + slice.$length);
+}
+
+var $decodeRune = function(str, pos) {
+ var c0 = str.charCodeAt(pos);
+
+ if (c0 < 0x80) {
+ return [c0, 1];
+ }
+
+ if (c0 !== c0 || c0 < 0xC0) {
+ return [0xFFFD, 1];
+ }
+
+ var c1 = str.charCodeAt(pos + 1);
+ if (c1 !== c1 || c1 < 0x80 || 0xC0 <= c1) {
+ return [0xFFFD, 1];
+ }
+
+ if (c0 < 0xE0) {
+ var r = (c0 & 0x1F) << 6 | (c1 & 0x3F);
+ if (r <= 0x7F) {
+ return [0xFFFD, 1];
+ }
+ return [r, 2];
+ }
+
+ var c2 = str.charCodeAt(pos + 2);
+ if (c2 !== c2 || c2 < 0x80 || 0xC0 <= c2) {
+ return [0xFFFD, 1];
+ }
+
+ if (c0 < 0xF0) {
+ var r = (c0 & 0x0F) << 12 | (c1 & 0x3F) << 6 | (c2 & 0x3F);
+ if (r <= 0x7FF) {
+ return [0xFFFD, 1];
+ }
+ if (0xD800 <= r && r <= 0xDFFF) {
+ return [0xFFFD, 1];
+ }
+ return [r, 3];
+ }
+
+ var c3 = str.charCodeAt(pos + 3);
+ if (c3 !== c3 || c3 < 0x80 || 0xC0 <= c3) {
+ return [0xFFFD, 1];
+ }
+
+ if (c0 < 0xF8) {
+ var r = (c0 & 0x07) << 18 | (c1 & 0x3F) << 12 | (c2 & 0x3F) << 6 | (c3 & 0x3F);
+ if (r <= 0xFFFF || 0x10FFFF < r) {
+ return [0xFFFD, 1];
+ }
+ return [r, 4];
+ }
+
+ return [0xFFFD, 1];
+};
+
+var $encodeRune = function(r) {
+ if (r < 0 || r > 0x10FFFF || (0xD800 <= r && r <= 0xDFFF)) {
+ r = 0xFFFD;
+ }
+ if (r <= 0x7F) {
+ return String.fromCharCode(r);
+ }
+ if (r <= 0x7FF) {
+ return String.fromCharCode(0xC0 | r >> 6, 0x80 | (r & 0x3F));
+ }
+ if (r <= 0xFFFF) {
+ return String.fromCharCode(0xE0 | r >> 12, 0x80 | (r >> 6 & 0x3F), 0x80 | (r & 0x3F));
+ }
+ return String.fromCharCode(0xF0 | r >> 18, 0x80 | (r >> 12 & 0x3F), 0x80 | (r >> 6 & 0x3F), 0x80 | (r & 0x3F));
+};
+
+var $stringToBytes = function(str) {
+ var array = new Uint8Array(str.length);
+ for (var i = 0; i < str.length; i++) {
+ array[i] = str.charCodeAt(i);
+ }
+ return array;
+};
+
+var $bytesToString = function(slice) {
+ if (slice.$length === 0) {
+ return "";
+ }
+ var str = "";
+ for (var i = 0; i < slice.$length; i += 10000) {
+ str += String.fromCharCode.apply(undefined, slice.$array.subarray(slice.$offset + i, slice.$offset + Math.min(slice.$length, i + 10000)));
+ }
+ return str;
+};
+
+var $stringToRunes = function(str) {
+ var array = new Int32Array(str.length);
+ var rune, j = 0;
+ for (var i = 0; i < str.length; i += rune[1], j++) {
+ rune = $decodeRune(str, i);
+ array[j] = rune[0];
+ }
+ return array.subarray(0, j);
+};
+
+var $runesToString = function(slice) {
+ if (slice.$length === 0) {
+ return "";
+ }
+ var str = "";
+ for (var i = 0; i < slice.$length; i++) {
+ str += $encodeRune(slice.$array[slice.$offset + i]);
+ }
+ return str;
+};
+
+var $copyString = function(dst, src) {
+ var n = Math.min(src.length, dst.$length);
+ for (var i = 0; i < n; i++) {
+ dst.$array[dst.$offset + i] = src.charCodeAt(i);
+ }
+ return n;
+};
+
+var $copySlice = function(dst, src) {
+ var n = Math.min(src.$length, dst.$length);
+ $copyArray(dst.$array, src.$array, dst.$offset, src.$offset, n, dst.constructor.elem);
+ return n;
+};
+
+var $copyArray = function(dst, src, dstOffset, srcOffset, n, elem) {
+ if (n === 0 || (dst === src && dstOffset === srcOffset)) {
+ return;
+ }
+
+ if (src.subarray) {
+ dst.set(src.subarray(srcOffset, srcOffset + n), dstOffset);
+ return;
+ }
+
+ switch (elem.kind) {
+ case $kindArray:
+ case $kindStruct:
+ if (dst === src && dstOffset > srcOffset) {
+ for (var i = n - 1; i >= 0; i--) {
+ elem.copy(dst[dstOffset + i], src[srcOffset + i]);
+ }
+ return;
+ }
+ for (var i = 0; i < n; i++) {
+ elem.copy(dst[dstOffset + i], src[srcOffset + i]);
+ }
+ return;
+ }
+
+ if (dst === src && dstOffset > srcOffset) {
+ for (var i = n - 1; i >= 0; i--) {
+ dst[dstOffset + i] = src[srcOffset + i];
+ }
+ return;
+ }
+ for (var i = 0; i < n; i++) {
+ dst[dstOffset + i] = src[srcOffset + i];
+ }
+};
+
+var $clone = function(src, type) {
+ var clone = type.zero();
+ type.copy(clone, src);
+ return clone;
+};
+
+var $pointerOfStructConversion = function(obj, type) {
+ if(obj.$proxies === undefined) {
+ obj.$proxies = {};
+ obj.$proxies[obj.constructor.string] = obj;
+ }
+ var proxy = obj.$proxies[type.string];
+ if (proxy === undefined) {
+ var properties = {};
+ for (var i = 0; i < type.elem.fields.length; i++) {
+ (function(fieldProp) {
+ properties[fieldProp] = {
+ get: function() { return obj[fieldProp]; },
+ set: function(value) { obj[fieldProp] = value; }
+ };
+ })(type.elem.fields[i].prop);
+ }
+ proxy = Object.create(type.prototype, properties);
+ proxy.$val = proxy;
+ obj.$proxies[type.string] = proxy;
+ proxy.$proxies = obj.$proxies;
+ }
+ return proxy;
+};
+
+var $append = function(slice) {
+ return $internalAppend(slice, arguments, 1, arguments.length - 1);
+};
+
+var $appendSlice = function(slice, toAppend) {
+ if (toAppend.constructor === String) {
+ var bytes = $stringToBytes(toAppend);
+ return $internalAppend(slice, bytes, 0, bytes.length);
+ }
+ return $internalAppend(slice, toAppend.$array, toAppend.$offset, toAppend.$length);
+};
+
+var $internalAppend = function(slice, array, offset, length) {
+ if (length === 0) {
+ return slice;
+ }
+
+ var newArray = slice.$array;
+ var newOffset = slice.$offset;
+ var newLength = slice.$length + length;
+ var newCapacity = slice.$capacity;
+
+ if (newLength > newCapacity) {
+ newOffset = 0;
+ newCapacity = Math.max(newLength, slice.$capacity < 1024 ? slice.$capacity * 2 : Math.floor(slice.$capacity * 5 / 4));
+
+ if (slice.$array.constructor === Array) {
+ newArray = slice.$array.slice(slice.$offset, slice.$offset + slice.$length);
+ newArray.length = newCapacity;
+ var zero = slice.constructor.elem.zero;
+ for (var i = slice.$length; i < newCapacity; i++) {
+ newArray[i] = zero();
+ }
+ } else {
+ newArray = new slice.$array.constructor(newCapacity);
+ newArray.set(slice.$array.subarray(slice.$offset, slice.$offset + slice.$length));
+ }
+ }
+
+ $copyArray(newArray, array, newOffset + slice.$length, offset, length, slice.constructor.elem);
+
+ var newSlice = new slice.constructor(newArray);
+ newSlice.$offset = newOffset;
+ newSlice.$length = newLength;
+ newSlice.$capacity = newCapacity;
+ return newSlice;
+};
+
+var $equal = function(a, b, type) {
+ if (type === $jsObjectPtr) {
+ return a === b;
+ }
+ switch (type.kind) {
+ case $kindComplex64:
+ case $kindComplex128:
+ return a.$real === b.$real && a.$imag === b.$imag;
+ case $kindInt64:
+ case $kindUint64:
+ return a.$high === b.$high && a.$low === b.$low;
+ case $kindArray:
+ if (a.length !== b.length) {
+ return false;
+ }
+ for (var i = 0; i < a.length; i++) {
+ if (!$equal(a[i], b[i], type.elem)) {
+ return false;
+ }
+ }
+ return true;
+ case $kindStruct:
+ for (var i = 0; i < type.fields.length; i++) {
+ var f = type.fields[i];
+ if (!$equal(a[f.prop], b[f.prop], f.typ)) {
+ return false;
+ }
+ }
+ return true;
+ case $kindInterface:
+ return $interfaceIsEqual(a, b);
+ default:
+ return a === b;
+ }
+};
+
+var $interfaceIsEqual = function(a, b) {
+ if (a === $ifaceNil || b === $ifaceNil) {
+ return a === b;
+ }
+ if (a.constructor !== b.constructor) {
+ return false;
+ }
+ if (a.constructor === $jsObjectPtr) {
+ return a.object === b.object;
+ }
+ if (!a.constructor.comparable) {
+ $throwRuntimeError("comparing uncomparable type " + a.constructor.string);
+ }
+ return $equal(a.$val, b.$val, a.constructor);
+};
+
+var $min = Math.min;
+var $mod = function(x, y) { return x % y; };
+var $parseInt = parseInt;
+var $parseFloat = function(f) {
+ if (f !== undefined && f !== null && f.constructor === Number) {
+ return f;
+ }
+ return parseFloat(f);
+};
+
+var $froundBuf = new Float32Array(1);
+var $fround = Math.fround || function(f) {
+ $froundBuf[0] = f;
+ return $froundBuf[0];
+};
+
+var $imul = Math.imul || function(a, b) {
+ var ah = (a >>> 16) & 0xffff;
+ var al = a & 0xffff;
+ var bh = (b >>> 16) & 0xffff;
+ var bl = b & 0xffff;
+ return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0) >> 0);
+};
+
+var $floatKey = function(f) {
+ if (f !== f) {
+ $idCounter++;
+ return "NaN$" + $idCounter;
+ }
+ return String(f);
+};
+
+var $flatten64 = function(x) {
+ return x.$high * 4294967296 + x.$low;
+};
+
+var $shiftLeft64 = function(x, y) {
+ if (y === 0) {
+ return x;
+ }
+ if (y < 32) {
+ return new x.constructor(x.$high << y | x.$low >>> (32 - y), (x.$low << y) >>> 0);
+ }
+ if (y < 64) {
+ return new x.constructor(x.$low << (y - 32), 0);
+ }
+ return new x.constructor(0, 0);
+};
+
+var $shiftRightInt64 = function(x, y) {
+ if (y === 0) {
+ return x;
+ }
+ if (y < 32) {
+ return new x.constructor(x.$high >> y, (x.$low >>> y | x.$high << (32 - y)) >>> 0);
+ }
+ if (y < 64) {
+ return new x.constructor(x.$high >> 31, (x.$high >> (y - 32)) >>> 0);
+ }
+ if (x.$high < 0) {
+ return new x.constructor(-1, 4294967295);
+ }
+ return new x.constructor(0, 0);
+};
+
+var $shiftRightUint64 = function(x, y) {
+ if (y === 0) {
+ return x;
+ }
+ if (y < 32) {
+ return new x.constructor(x.$high >>> y, (x.$low >>> y | x.$high << (32 - y)) >>> 0);
+ }
+ if (y < 64) {
+ return new x.constructor(0, x.$high >>> (y - 32));
+ }
+ return new x.constructor(0, 0);
+};
+
+var $mul64 = function(x, y) {
+ var x48 = x.$high >>> 16;
+ var x32 = x.$high & 0xFFFF;
+ var x16 = x.$low >>> 16;
+ var x00 = x.$low & 0xFFFF;
+
+ var y48 = y.$high >>> 16;
+ var y32 = y.$high & 0xFFFF;
+ var y16 = y.$low >>> 16;
+ var y00 = y.$low & 0xFFFF;
+
+ var z48 = 0, z32 = 0, z16 = 0, z00 = 0;
+ z00 += x00 * y00;
+ z16 += z00 >>> 16;
+ z00 &= 0xFFFF;
+ z16 += x16 * y00;
+ z32 += z16 >>> 16;
+ z16 &= 0xFFFF;
+ z16 += x00 * y16;
+ z32 += z16 >>> 16;
+ z16 &= 0xFFFF;
+ z32 += x32 * y00;
+ z48 += z32 >>> 16;
+ z32 &= 0xFFFF;
+ z32 += x16 * y16;
+ z48 += z32 >>> 16;
+ z32 &= 0xFFFF;
+ z32 += x00 * y32;
+ z48 += z32 >>> 16;
+ z32 &= 0xFFFF;
+ z48 += x48 * y00 + x32 * y16 + x16 * y32 + x00 * y48;
+ z48 &= 0xFFFF;
+
+ var hi = ((z48 << 16) | z32) >>> 0;
+ var lo = ((z16 << 16) | z00) >>> 0;
+
+ var r = new x.constructor(hi, lo);
+ return r;
+};
+
+var $div64 = function(x, y, returnRemainder) {
+ if (y.$high === 0 && y.$low === 0) {
+ $throwRuntimeError("integer divide by zero");
+ }
+
+ var s = 1;
+ var rs = 1;
+
+ var xHigh = x.$high;
+ var xLow = x.$low;
+ if (xHigh < 0) {
+ s = -1;
+ rs = -1;
+ xHigh = -xHigh;
+ if (xLow !== 0) {
+ xHigh--;
+ xLow = 4294967296 - xLow;
+ }
+ }
+
+ var yHigh = y.$high;
+ var yLow = y.$low;
+ if (y.$high < 0) {
+ s *= -1;
+ yHigh = -yHigh;
+ if (yLow !== 0) {
+ yHigh--;
+ yLow = 4294967296 - yLow;
+ }
+ }
+
+ var high = 0, low = 0, n = 0;
+ while (yHigh < 2147483648 && ((xHigh > yHigh) || (xHigh === yHigh && xLow > yLow))) {
+ yHigh = (yHigh << 1 | yLow >>> 31) >>> 0;
+ yLow = (yLow << 1) >>> 0;
+ n++;
+ }
+ for (var i = 0; i <= n; i++) {
+ high = high << 1 | low >>> 31;
+ low = (low << 1) >>> 0;
+ if ((xHigh > yHigh) || (xHigh === yHigh && xLow >= yLow)) {
+ xHigh = xHigh - yHigh;
+ xLow = xLow - yLow;
+ if (xLow < 0) {
+ xHigh--;
+ xLow += 4294967296;
+ }
+ low++;
+ if (low === 4294967296) {
+ high++;
+ low = 0;
+ }
+ }
+ yLow = (yLow >>> 1 | yHigh << (32 - 1)) >>> 0;
+ yHigh = yHigh >>> 1;
+ }
+
+ if (returnRemainder) {
+ return new x.constructor(xHigh * rs, xLow * rs);
+ }
+ return new x.constructor(high * s, low * s);
+};
+
+var $divComplex = function(n, d) {
+ var ninf = n.$real === Infinity || n.$real === -Infinity || n.$imag === Infinity || n.$imag === -Infinity;
+ var dinf = d.$real === Infinity || d.$real === -Infinity || d.$imag === Infinity || d.$imag === -Infinity;
+ var nnan = !ninf && (n.$real !== n.$real || n.$imag !== n.$imag);
+ var dnan = !dinf && (d.$real !== d.$real || d.$imag !== d.$imag);
+ if(nnan || dnan) {
+ return new n.constructor(NaN, NaN);
+ }
+ if (ninf && !dinf) {
+ return new n.constructor(Infinity, Infinity);
+ }
+ if (!ninf && dinf) {
+ return new n.constructor(0, 0);
+ }
+ if (d.$real === 0 && d.$imag === 0) {
+ if (n.$real === 0 && n.$imag === 0) {
+ return new n.constructor(NaN, NaN);
+ }
+ return new n.constructor(Infinity, Infinity);
+ }
+ var a = Math.abs(d.$real);
+ var b = Math.abs(d.$imag);
+ if (a <= b) {
+ var ratio = d.$real / d.$imag;
+ var denom = d.$real * ratio + d.$imag;
+ return new n.constructor((n.$real * ratio + n.$imag) / denom, (n.$imag * ratio - n.$real) / denom);
+ }
+ var ratio = d.$imag / d.$real;
+ var denom = d.$imag * ratio + d.$real;
+ return new n.constructor((n.$imag * ratio + n.$real) / denom, (n.$imag - n.$real * ratio) / denom);
+};
+
+var $kindBool = 1;
+var $kindInt = 2;
+var $kindInt8 = 3;
+var $kindInt16 = 4;
+var $kindInt32 = 5;
+var $kindInt64 = 6;
+var $kindUint = 7;
+var $kindUint8 = 8;
+var $kindUint16 = 9;
+var $kindUint32 = 10;
+var $kindUint64 = 11;
+var $kindUintptr = 12;
+var $kindFloat32 = 13;
+var $kindFloat64 = 14;
+var $kindComplex64 = 15;
+var $kindComplex128 = 16;
+var $kindArray = 17;
+var $kindChan = 18;
+var $kindFunc = 19;
+var $kindInterface = 20;
+var $kindMap = 21;
+var $kindPtr = 22;
+var $kindSlice = 23;
+var $kindString = 24;
+var $kindStruct = 25;
+var $kindUnsafePointer = 26;
+
+var $methodSynthesizers = [];
+var $addMethodSynthesizer = function(f) {
+ if ($methodSynthesizers === null) {
+ f();
+ return;
+ }
+ $methodSynthesizers.push(f);
+};
+var $synthesizeMethods = function() {
+ $methodSynthesizers.forEach(function(f) { f(); });
+ $methodSynthesizers = null;
+};
+
+var $ifaceKeyFor = function(x) {
+ if (x === $ifaceNil) {
+ return 'nil';
+ }
+ var c = x.constructor;
+ return c.string + '$' + c.keyFor(x.$val);
+};
+
+var $identity = function(x) { return x; };
+
+var $typeIDCounter = 0;
+
+var $idKey = function(x) {
+ if (x.$id === undefined) {
+ $idCounter++;
+ x.$id = $idCounter;
+ }
+ return String(x.$id);
+};
+
+// Creates constructor functions for array pointer types. Returns a new function
+// instace each time to make sure each type is independent of the other.
+var $arrayPtrCtor = function() {
+ return function(array) {
+ this.$get = function() { return array; };
+ this.$set = function(v) { typ.copy(this, v); };
+ this.$val = array;
+ }
+}
+
+var $newType = function(size, kind, string, named, pkg, exported, constructor) {
+ var typ;
+ switch(kind) {
+ case $kindBool:
+ case $kindInt:
+ case $kindInt8:
+ case $kindInt16:
+ case $kindInt32:
+ case $kindUint:
+ case $kindUint8:
+ case $kindUint16:
+ case $kindUint32:
+ case $kindUintptr:
+ case $kindUnsafePointer:
+ typ = function(v) { this.$val = v; };
+ typ.wrapped = true;
+ typ.keyFor = $identity;
+ break;
+
+ case $kindString:
+ typ = function(v) { this.$val = v; };
+ typ.wrapped = true;
+ typ.keyFor = function(x) { return "$" + x; };
+ break;
+
+ case $kindFloat32:
+ case $kindFloat64:
+ typ = function(v) { this.$val = v; };
+ typ.wrapped = true;
+ typ.keyFor = function(x) { return $floatKey(x); };
+ break;
+
+ case $kindInt64:
+ typ = function(high, low) {
+ this.$high = (high + Math.floor(Math.ceil(low) / 4294967296)) >> 0;
+ this.$low = low >>> 0;
+ this.$val = this;
+ };
+ typ.keyFor = function(x) { return x.$high + "$" + x.$low; };
+ break;
+
+ case $kindUint64:
+ typ = function(high, low) {
+ this.$high = (high + Math.floor(Math.ceil(low) / 4294967296)) >>> 0;
+ this.$low = low >>> 0;
+ this.$val = this;
+ };
+ typ.keyFor = function(x) { return x.$high + "$" + x.$low; };
+ break;
+
+ case $kindComplex64:
+ typ = function(real, imag) {
+ this.$real = $fround(real);
+ this.$imag = $fround(imag);
+ this.$val = this;
+ };
+ typ.keyFor = function(x) { return x.$real + "$" + x.$imag; };
+ break;
+
+ case $kindComplex128:
+ typ = function(real, imag) {
+ this.$real = real;
+ this.$imag = imag;
+ this.$val = this;
+ };
+ typ.keyFor = function(x) { return x.$real + "$" + x.$imag; };
+ break;
+
+ case $kindArray:
+ typ = function(v) { this.$val = v; };
+ typ.wrapped = true;
+ typ.ptr = $newType(4, $kindPtr, "*" + string, false, "", false, $arrayPtrCtor());
+ typ.init = function(elem, len) {
+ typ.elem = elem;
+ typ.len = len;
+ typ.comparable = elem.comparable;
+ typ.keyFor = function(x) {
+ return Array.prototype.join.call($mapArray(x, function(e) {
+ return String(elem.keyFor(e)).replace(/\\/g, "\\\\").replace(/\$/g, "\\$");
+ }), "$");
+ };
+ typ.copy = function(dst, src) {
+ $copyArray(dst, src, 0, 0, src.length, elem);
+ };
+ typ.ptr.init(typ);
+ Object.defineProperty(typ.ptr.nil, "nilCheck", { get: $throwNilPointerError });
+ };
+ break;
+
+ case $kindChan:
+ typ = function(v) { this.$val = v; };
+ typ.wrapped = true;
+ typ.keyFor = $idKey;
+ typ.init = function(elem, sendOnly, recvOnly) {
+ typ.elem = elem;
+ typ.sendOnly = sendOnly;
+ typ.recvOnly = recvOnly;
+ };
+ break;
+
+ case $kindFunc:
+ typ = function(v) { this.$val = v; };
+ typ.wrapped = true;
+ typ.init = function(params, results, variadic) {
+ typ.params = params;
+ typ.results = results;
+ typ.variadic = variadic;
+ typ.comparable = false;
+ };
+ break;
+
+ case $kindInterface:
+ typ = { implementedBy: {}, missingMethodFor: {} };
+ typ.keyFor = $ifaceKeyFor;
+ typ.init = function(methods) {
+ typ.methods = methods;
+ methods.forEach(function(m) {
+ $ifaceNil[m.prop] = $throwNilPointerError;
+ });
+ };
+ break;
+
+ case $kindMap:
+ typ = function(v) { this.$val = v; };
+ typ.wrapped = true;
+ typ.init = function(key, elem) {
+ typ.key = key;
+ typ.elem = elem;
+ typ.comparable = false;
+ };
+ break;
+
+ case $kindPtr:
+ typ = constructor || function(getter, setter, target) {
+ this.$get = getter;
+ this.$set = setter;
+ this.$target = target;
+ this.$val = this;
+ };
+ typ.keyFor = $idKey;
+ typ.init = function(elem) {
+ typ.elem = elem;
+ typ.wrapped = (elem.kind === $kindArray);
+ typ.nil = new typ($throwNilPointerError, $throwNilPointerError);
+ };
+ break;
+
+ case $kindSlice:
+ typ = function(array) {
+ if (array.constructor !== typ.nativeArray) {
+ array = new typ.nativeArray(array);
+ }
+ this.$array = array;
+ this.$offset = 0;
+ this.$length = array.length;
+ this.$capacity = array.length;
+ this.$val = this;
+ };
+ typ.init = function(elem) {
+ typ.elem = elem;
+ typ.comparable = false;
+ typ.nativeArray = $nativeArray(elem.kind);
+ typ.nil = new typ([]);
+ };
+ break;
+
+ case $kindStruct:
+ typ = function(v) { this.$val = v; };
+ typ.wrapped = true;
+ typ.ptr = $newType(4, $kindPtr, "*" + string, false, pkg, exported, constructor);
+ typ.ptr.elem = typ;
+ typ.ptr.prototype.$get = function() { return this; };
+ typ.ptr.prototype.$set = function(v) { typ.copy(this, v); };
+ typ.init = function(pkgPath, fields) {
+ typ.pkgPath = pkgPath;
+ typ.fields = fields;
+ fields.forEach(function(f) {
+ if (!f.typ.comparable) {
+ typ.comparable = false;
+ }
+ });
+ typ.keyFor = function(x) {
+ var val = x.$val;
+ return $mapArray(fields, function(f) {
+ return String(f.typ.keyFor(val[f.prop])).replace(/\\/g, "\\\\").replace(/\$/g, "\\$");
+ }).join("$");
+ };
+ typ.copy = function(dst, src) {
+ for (var i = 0; i < fields.length; i++) {
+ var f = fields[i];
+ switch (f.typ.kind) {
+ case $kindArray:
+ case $kindStruct:
+ f.typ.copy(dst[f.prop], src[f.prop]);
+ continue;
+ default:
+ dst[f.prop] = src[f.prop];
+ continue;
+ }
+ }
+ };
+ /* nil value */
+ var properties = {};
+ fields.forEach(function(f) {
+ properties[f.prop] = { get: $throwNilPointerError, set: $throwNilPointerError };
+ });
+ typ.ptr.nil = Object.create(constructor.prototype, properties);
+ typ.ptr.nil.$val = typ.ptr.nil;
+ /* methods for embedded fields */
+ $addMethodSynthesizer(function() {
+ var synthesizeMethod = function(target, m, f) {
+ if (target.prototype[m.prop] !== undefined) { return; }
+ target.prototype[m.prop] = function() {
+ var v = this.$val[f.prop];
+ if (f.typ === $jsObjectPtr) {
+ v = new $jsObjectPtr(v);
+ }
+ if (v.$val === undefined) {
+ v = new f.typ(v);
+ }
+ return v[m.prop].apply(v, arguments);
+ };
+ };
+ fields.forEach(function(f) {
+ if (f.embedded) {
+ $methodSet(f.typ).forEach(function(m) {
+ synthesizeMethod(typ, m, f);
+ synthesizeMethod(typ.ptr, m, f);
+ });
+ $methodSet($ptrType(f.typ)).forEach(function(m) {
+ synthesizeMethod(typ.ptr, m, f);
+ });
+ }
+ });
+ });
+ };
+ break;
+
+ default:
+ $panic(new $String("invalid kind: " + kind));
+ }
+
+ switch (kind) {
+ case $kindBool:
+ case $kindMap:
+ typ.zero = function() { return false; };
+ 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:
+ typ.zero = function() { return 0; };
+ break;
+
+ case $kindString:
+ typ.zero = function() { return ""; };
+ break;
+
+ case $kindInt64:
+ case $kindUint64:
+ case $kindComplex64:
+ case $kindComplex128:
+ var zero = new typ(0, 0);
+ typ.zero = function() { return zero; };
+ break;
+
+ case $kindPtr:
+ case $kindSlice:
+ typ.zero = function() { return typ.nil; };
+ break;
+
+ case $kindChan:
+ typ.zero = function() { return $chanNil; };
+ break;
+
+ case $kindFunc:
+ typ.zero = function() { return $throwNilPointerError; };
+ break;
+
+ case $kindInterface:
+ typ.zero = function() { return $ifaceNil; };
+ break;
+
+ case $kindArray:
+ typ.zero = function() {
+ var arrayClass = $nativeArray(typ.elem.kind);
+ if (arrayClass !== Array) {
+ return new arrayClass(typ.len);
+ }
+ var array = new Array(typ.len);
+ for (var i = 0; i < typ.len; i++) {
+ array[i] = typ.elem.zero();
+ }
+ return array;
+ };
+ break;
+
+ case $kindStruct:
+ typ.zero = function() { return new typ.ptr(); };
+ break;
+
+ default:
+ $panic(new $String("invalid kind: " + kind));
+ }
+
+ typ.id = $typeIDCounter;
+ $typeIDCounter++;
+ typ.size = size;
+ typ.kind = kind;
+ typ.string = string;
+ typ.named = named;
+ typ.pkg = pkg;
+ typ.exported = exported;
+ typ.methods = [];
+ typ.methodSetCache = null;
+ typ.comparable = true;
+ return typ;
+};
+
+var $methodSet = function(typ) {
+ if (typ.methodSetCache !== null) {
+ return typ.methodSetCache;
+ }
+ var base = {};
+
+ var isPtr = (typ.kind === $kindPtr);
+ if (isPtr && typ.elem.kind === $kindInterface) {
+ typ.methodSetCache = [];
+ return [];
+ }
+
+ var current = [{typ: isPtr ? typ.elem : typ, indirect: isPtr}];
+
+ var seen = {};
+
+ while (current.length > 0) {
+ var next = [];
+ var mset = [];
+
+ current.forEach(function(e) {
+ if (seen[e.typ.string]) {
+ return;
+ }
+ seen[e.typ.string] = true;
+
+ if (e.typ.named) {
+ mset = mset.concat(e.typ.methods);
+ if (e.indirect) {
+ mset = mset.concat($ptrType(e.typ).methods);
+ }
+ }
+
+ switch (e.typ.kind) {
+ case $kindStruct:
+ e.typ.fields.forEach(function(f) {
+ if (f.embedded) {
+ var fTyp = f.typ;
+ var fIsPtr = (fTyp.kind === $kindPtr);
+ next.push({typ: fIsPtr ? fTyp.elem : fTyp, indirect: e.indirect || fIsPtr});
+ }
+ });
+ break;
+
+ case $kindInterface:
+ mset = mset.concat(e.typ.methods);
+ break;
+ }
+ });
+
+ mset.forEach(function(m) {
+ if (base[m.name] === undefined) {
+ base[m.name] = m;
+ }
+ });
+
+ current = next;
+ }
+
+ typ.methodSetCache = [];
+ Object.keys(base).sort().forEach(function(name) {
+ typ.methodSetCache.push(base[name]);
+ });
+ return typ.methodSetCache;
+};
+
+var $Bool = $newType( 1, $kindBool, "bool", true, "", false, null);
+var $Int = $newType( 4, $kindInt, "int", true, "", false, null);
+var $Int8 = $newType( 1, $kindInt8, "int8", true, "", false, null);
+var $Int16 = $newType( 2, $kindInt16, "int16", true, "", false, null);
+var $Int32 = $newType( 4, $kindInt32, "int32", true, "", false, null);
+var $Int64 = $newType( 8, $kindInt64, "int64", true, "", false, null);
+var $Uint = $newType( 4, $kindUint, "uint", true, "", false, null);
+var $Uint8 = $newType( 1, $kindUint8, "uint8", true, "", false, null);
+var $Uint16 = $newType( 2, $kindUint16, "uint16", true, "", false, null);
+var $Uint32 = $newType( 4, $kindUint32, "uint32", true, "", false, null);
+var $Uint64 = $newType( 8, $kindUint64, "uint64", true, "", false, null);
+var $Uintptr = $newType( 4, $kindUintptr, "uintptr", true, "", false, null);
+var $Float32 = $newType( 4, $kindFloat32, "float32", true, "", false, null);
+var $Float64 = $newType( 8, $kindFloat64, "float64", true, "", false, null);
+var $Complex64 = $newType( 8, $kindComplex64, "complex64", true, "", false, null);
+var $Complex128 = $newType(16, $kindComplex128, "complex128", true, "", false, null);
+var $String = $newType( 8, $kindString, "string", true, "", false, null);
+var $UnsafePointer = $newType( 4, $kindUnsafePointer, "unsafe.Pointer", true, "unsafe", false, null);
+
+var $nativeArray = function(elemKind) {
+ switch (elemKind) {
+ 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:
+ return Uint32Array;
+ case $kindUintptr:
+ return Uint32Array;
+ case $kindFloat32:
+ return Float32Array;
+ case $kindFloat64:
+ return Float64Array;
+ default:
+ return Array;
+ }
+};
+var $toNativeArray = function(elemKind, array) {
+ var nativeArray = $nativeArray(elemKind);
+ if (nativeArray === Array) {
+ return array;
+ }
+ return new nativeArray(array);
+};
+var $arrayTypes = {};
+var $arrayType = function(elem, len) {
+ var typeKey = elem.id + "$" + len;
+ var typ = $arrayTypes[typeKey];
+ if (typ === undefined) {
+ typ = $newType(12, $kindArray, "[" + len + "]" + elem.string, false, "", false, null);
+ $arrayTypes[typeKey] = typ;
+ typ.init(elem, len);
+ }
+ return typ;
+};
+
+var $chanType = function(elem, sendOnly, recvOnly) {
+ var string = (recvOnly ? "<-" : "") + "chan" + (sendOnly ? "<- " : " ");
+ if (!sendOnly && !recvOnly && (elem.string[0] == "<")) {
+ string += "(" + elem.string + ")";
+ } else {
+ string += elem.string;
+ }
+ var field = sendOnly ? "SendChan" : (recvOnly ? "RecvChan" : "Chan");
+ var typ = elem[field];
+ if (typ === undefined) {
+ typ = $newType(4, $kindChan, string, false, "", false, null);
+ elem[field] = typ;
+ typ.init(elem, sendOnly, recvOnly);
+ }
+ return typ;
+};
+var $Chan = function(elem, capacity) {
+ if (capacity < 0 || capacity > 2147483647) {
+ $throwRuntimeError("makechan: size out of range");
+ }
+ this.$elem = elem;
+ this.$capacity = capacity;
+ this.$buffer = [];
+ this.$sendQueue = [];
+ this.$recvQueue = [];
+ this.$closed = false;
+};
+var $chanNil = new $Chan(null, 0);
+$chanNil.$sendQueue = $chanNil.$recvQueue = { length: 0, push: function() {}, shift: function() { return undefined; }, indexOf: function() { return -1; } };
+
+var $funcTypes = {};
+var $funcType = function(params, results, variadic) {
+ var typeKey = $mapArray(params, function(p) { return p.id; }).join(",") + "$" + $mapArray(results, function(r) { return r.id; }).join(",") + "$" + variadic;
+ var typ = $funcTypes[typeKey];
+ if (typ === undefined) {
+ var paramTypes = $mapArray(params, function(p) { return p.string; });
+ if (variadic) {
+ paramTypes[paramTypes.length - 1] = "..." + paramTypes[paramTypes.length - 1].substr(2);
+ }
+ var string = "func(" + paramTypes.join(", ") + ")";
+ if (results.length === 1) {
+ string += " " + results[0].string;
+ } else if (results.length > 1) {
+ string += " (" + $mapArray(results, function(r) { return r.string; }).join(", ") + ")";
+ }
+ typ = $newType(4, $kindFunc, string, false, "", false, null);
+ $funcTypes[typeKey] = typ;
+ typ.init(params, results, variadic);
+ }
+ return typ;
+};
+
+var $interfaceTypes = {};
+var $interfaceType = function(methods) {
+ var typeKey = $mapArray(methods, function(m) { return m.pkg + "," + m.name + "," + m.typ.id; }).join("$");
+ var typ = $interfaceTypes[typeKey];
+ if (typ === undefined) {
+ var string = "interface {}";
+ if (methods.length !== 0) {
+ string = "interface { " + $mapArray(methods, function(m) {
+ return (m.pkg !== "" ? m.pkg + "." : "") + m.name + m.typ.string.substr(4);
+ }).join("; ") + " }";
+ }
+ typ = $newType(8, $kindInterface, string, false, "", false, null);
+ $interfaceTypes[typeKey] = typ;
+ typ.init(methods);
+ }
+ return typ;
+};
+var $emptyInterface = $interfaceType([]);
+var $ifaceNil = {};
+var $error = $newType(8, $kindInterface, "error", true, "", false, null);
+$error.init([{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]);
+
+var $mapTypes = {};
+var $mapType = function(key, elem) {
+ var typeKey = key.id + "$" + elem.id;
+ var typ = $mapTypes[typeKey];
+ if (typ === undefined) {
+ typ = $newType(4, $kindMap, "map[" + key.string + "]" + elem.string, false, "", false, null);
+ $mapTypes[typeKey] = typ;
+ typ.init(key, elem);
+ }
+ return typ;
+};
+var $makeMap = function(keyForFunc, entries) {
+ var m = {};
+ for (var i = 0; i < entries.length; i++) {
+ var e = entries[i];
+ m[keyForFunc(e.k)] = e;
+ }
+ return m;
+};
+
+var $ptrType = function(elem) {
+ var typ = elem.ptr;
+ if (typ === undefined) {
+ typ = $newType(4, $kindPtr, "*" + elem.string, false, "", elem.exported, null);
+ elem.ptr = typ;
+ typ.init(elem);
+ }
+ return typ;
+};
+
+var $newDataPointer = function(data, constructor) {
+ if (constructor.elem.kind === $kindStruct) {
+ return data;
+ }
+ return new constructor(function() { return data; }, function(v) { data = v; });
+};
+
+var $indexPtr = function(array, index, constructor) {
+ if (array.buffer) {
+ // Pointers to the same underlying ArrayBuffer share cache.
+ var cache = array.buffer.$ptr = array.buffer.$ptr || {};
+ // Pointers of different primitive types are non-comparable and stored in different caches.
+ var typeCache = cache[array.name] = cache[array.name] || {};
+ var cacheIdx = array.BYTES_PER_ELEMENT * index + array.byteOffset;
+ return typeCache[cacheIdx] || (typeCache[cacheIdx] = new constructor(function() { return array[index]; }, function(v) { array[index] = v; }));
+ } else {
+ array.$ptr = array.$ptr || {};
+ return array.$ptr[index] || (array.$ptr[index] = new constructor(function() { return array[index]; }, function(v) { array[index] = v; }));
+ }
+};
+
+var $sliceType = function(elem) {
+ var typ = elem.slice;
+ if (typ === undefined) {
+ typ = $newType(12, $kindSlice, "[]" + elem.string, false, "", false, null);
+ elem.slice = typ;
+ typ.init(elem);
+ }
+ return typ;
+};
+var $makeSlice = function(typ, length, capacity) {
+ capacity = capacity || length;
+ if (length < 0 || length > 2147483647) {
+ $throwRuntimeError("makeslice: len out of range");
+ }
+ if (capacity < 0 || capacity < length || capacity > 2147483647) {
+ $throwRuntimeError("makeslice: cap out of range");
+ }
+ var array = new typ.nativeArray(capacity);
+ if (typ.nativeArray === Array) {
+ for (var i = 0; i < capacity; i++) {
+ array[i] = typ.elem.zero();
+ }
+ }
+ var slice = new typ(array);
+ slice.$length = length;
+ return slice;
+};
+
+var $structTypes = {};
+var $structType = function(pkgPath, fields) {
+ var typeKey = $mapArray(fields, function(f) { return f.name + "," + f.typ.id + "," + f.tag; }).join("$");
+ var typ = $structTypes[typeKey];
+ if (typ === undefined) {
+ var string = "struct { " + $mapArray(fields, function(f) {
+ var str = f.typ.string + (f.tag !== "" ? (" \"" + f.tag.replace(/\\/g, "\\\\").replace(/"/g, "\\\"") + "\"") : "");
+ if (f.embedded) {
+ return str;
+ }
+ return f.name + " " + str;
+ }).join("; ") + " }";
+ if (fields.length === 0) {
+ string = "struct {}";
+ }
+ typ = $newType(0, $kindStruct, string, false, "", false, function() {
+ this.$val = this;
+ for (var i = 0; i < fields.length; i++) {
+ var f = fields[i];
+ if (f.name == '_') {
+ continue;
+ }
+ var arg = arguments[i];
+ this[f.prop] = arg !== undefined ? arg : f.typ.zero();
+ }
+ });
+ $structTypes[typeKey] = typ;
+ typ.init(pkgPath, fields);
+ }
+ return typ;
+};
+
+var $assertType = function(value, type, returnTuple) {
+ var isInterface = (type.kind === $kindInterface), ok, missingMethod = "";
+ if (value === $ifaceNil) {
+ ok = false;
+ } else if (!isInterface) {
+ ok = value.constructor === type;
+ } else {
+ var valueTypeString = value.constructor.string;
+ ok = type.implementedBy[valueTypeString];
+ if (ok === undefined) {
+ ok = true;
+ var valueMethodSet = $methodSet(value.constructor);
+ var interfaceMethods = type.methods;
+ for (var i = 0; i < interfaceMethods.length; i++) {
+ var tm = interfaceMethods[i];
+ var found = false;
+ for (var j = 0; j < valueMethodSet.length; j++) {
+ var vm = valueMethodSet[j];
+ if (vm.name === tm.name && vm.pkg === tm.pkg && vm.typ === tm.typ) {
+ found = true;
+ break;
+ }
+ }
+ if (!found) {
+ ok = false;
+ type.missingMethodFor[valueTypeString] = tm.name;
+ break;
+ }
+ }
+ type.implementedBy[valueTypeString] = ok;
+ }
+ if (!ok) {
+ missingMethod = type.missingMethodFor[valueTypeString];
+ }
+ }
+
+ if (!ok) {
+ if (returnTuple) {
+ return [type.zero(), false];
+ }
+ $panic(new $packages["runtime"].TypeAssertionError.ptr(
+ $packages["runtime"]._type.ptr.nil,
+ (value === $ifaceNil ? $packages["runtime"]._type.ptr.nil : new $packages["runtime"]._type.ptr(value.constructor.string)),
+ new $packages["runtime"]._type.ptr(type.string),
+ missingMethod));
+ }
+
+ if (!isInterface) {
+ value = value.$val;
+ }
+ if (type === $jsObjectPtr) {
+ value = value.object;
+ }
+ return returnTuple ? [value, true] : value;
+};
+
+var $stackDepthOffset = 0;
+var $getStackDepth = function() {
+ var err = new Error();
+ if (err.stack === undefined) {
+ return undefined;
+ }
+ return $stackDepthOffset + err.stack.split("\n").length;
+};
+
+var $panicStackDepth = null, $panicValue;
+var $callDeferred = function(deferred, jsErr, fromPanic) {
+ if (!fromPanic && deferred !== null && $curGoroutine.deferStack.indexOf(deferred) == -1) {
+ throw jsErr;
+ }
+ if (jsErr !== null) {
+ var newErr = null;
+ try {
+ $panic(new $jsErrorPtr(jsErr));
+ } catch (err) {
+ newErr = err;
+ }
+ $callDeferred(deferred, newErr);
+ return;
+ }
+ if ($curGoroutine.asleep) {
+ return;
+ }
+
+ $stackDepthOffset--;
+ var outerPanicStackDepth = $panicStackDepth;
+ var outerPanicValue = $panicValue;
+
+ var localPanicValue = $curGoroutine.panicStack.pop();
+ if (localPanicValue !== undefined) {
+ $panicStackDepth = $getStackDepth();
+ $panicValue = localPanicValue;
+ }
+
+ try {
+ while (true) {
+ if (deferred === null) {
+ deferred = $curGoroutine.deferStack[$curGoroutine.deferStack.length - 1];
+ if (deferred === undefined) {
+ /* The panic reached the top of the stack. Clear it and throw it as a JavaScript error. */
+ $panicStackDepth = null;
+ if (localPanicValue.Object instanceof Error) {
+ throw localPanicValue.Object;
+ }
+ var msg;
+ if (localPanicValue.constructor === $String) {
+ msg = localPanicValue.$val;
+ } else if (localPanicValue.Error !== undefined) {
+ msg = localPanicValue.Error();
+ } else if (localPanicValue.String !== undefined) {
+ msg = localPanicValue.String();
+ } else {
+ msg = localPanicValue;
+ }
+ throw new Error(msg);
+ }
+ }
+ var call = deferred.pop();
+ if (call === undefined) {
+ $curGoroutine.deferStack.pop();
+ if (localPanicValue !== undefined) {
+ deferred = null;
+ continue;
+ }
+ return;
+ }
+ var r = call[0].apply(call[2], call[1]);
+ if (r && r.$blk !== undefined) {
+ deferred.push([r.$blk, [], r]);
+ if (fromPanic) {
+ throw null;
+ }
+ return;
+ }
+
+ if (localPanicValue !== undefined && $panicStackDepth === null) {
+ /* error was recovered */
+ if (fromPanic) {
+ throw null;
+ }
+ return;
+ }
+ }
+ } catch(e) {
+ // Deferred function threw a JavaScript exception or tries to unwind stack
+ // to the point where a panic was handled.
+ if (fromPanic) {
+ // Re-throw the exception to reach deferral execution call at the end
+ // of the function.
+ throw e;
+ }
+ // We are at the end of the function, handle the error or re-throw to
+ // continue unwinding if necessary, or simply stop unwinding if we got far
+ // enough.
+ $callDeferred(deferred, e, fromPanic);
+ } finally {
+ if (localPanicValue !== undefined) {
+ if ($panicStackDepth !== null) {
+ $curGoroutine.panicStack.push(localPanicValue);
+ }
+ $panicStackDepth = outerPanicStackDepth;
+ $panicValue = outerPanicValue;
+ }
+ $stackDepthOffset++;
+ }
+};
+
+var $panic = function(value) {
+ $curGoroutine.panicStack.push(value);
+ $callDeferred(null, null, true);
+};
+var $recover = function() {
+ if ($panicStackDepth === null || ($panicStackDepth !== undefined && $panicStackDepth !== $getStackDepth() - 2)) {
+ return $ifaceNil;
+ }
+ $panicStackDepth = null;
+ return $panicValue;
+};
+var $throw = function(err) { throw err; };
+
+var $noGoroutine = { asleep: false, exit: false, deferStack: [], panicStack: [] };
+var $curGoroutine = $noGoroutine, $totalGoroutines = 0, $awakeGoroutines = 0, $checkForDeadlock = true, $exportedFunctions = 0;
+var $mainFinished = false;
+var $go = function(fun, args) {
+ $totalGoroutines++;
+ $awakeGoroutines++;
+ var $goroutine = function() {
+ try {
+ $curGoroutine = $goroutine;
+ var r = fun.apply(undefined, args);
+ if (r && r.$blk !== undefined) {
+ fun = function() { return r.$blk(); };
+ args = [];
+ return;
+ }
+ $goroutine.exit = true;
+ } catch (err) {
+ if (!$goroutine.exit) {
+ throw err;
+ }
+ } finally {
+ $curGoroutine = $noGoroutine;
+ if ($goroutine.exit) { /* also set by runtime.Goexit() */
+ $totalGoroutines--;
+ $goroutine.asleep = true;
+ }
+ if ($goroutine.asleep) {
+ $awakeGoroutines--;
+ if (!$mainFinished && $awakeGoroutines === 0 && $checkForDeadlock && $exportedFunctions === 0) {
+ console.error("fatal error: all goroutines are asleep - deadlock!");
+ if ($global.process !== undefined) {
+ $global.process.exit(2);
+ }
+ }
+ }
+ }
+ };
+ $goroutine.asleep = false;
+ $goroutine.exit = false;
+ $goroutine.deferStack = [];
+ $goroutine.panicStack = [];
+ $schedule($goroutine);
+};
+
+var $scheduled = [];
+var $runScheduled = function() {
+ // For nested setTimeout calls browsers enforce 4ms minimum delay. We minimize
+ // the effect of this penalty by queueing the timer preemptively before we run
+ // the goroutines, and later cancelling it if it turns out unneeded. See:
+ // https://developer.mozilla.org/en-US/docs/Web/API/setTimeout#nested_timeouts
+ var nextRun = setTimeout($runScheduled);
+ try {
+ var start = Date.now();
+ var r;
+ while ((r = $scheduled.shift()) !== undefined) {
+ r();
+ // We need to interrupt this loop in order to allow the event loop to
+ // process timers, IO, etc. However, invoking scheduling through
+ // setTimeout is ~1000 times more expensive, so we amortize this cost by
+ // looping until the 4ms minimal delay has elapsed (assuming there are
+ // scheduled goroutines to run), and then yield to the event loop.
+ var elapsed = Date.now() - start;
+ if (elapsed > 4 || elapsed < 0) { break; }
+ }
+ } finally {
+ if ($scheduled.length == 0) {
+ // Cancel scheduling pass if there's nothing to run.
+ clearTimeout(nextRun);
+ }
+ }
+};
+
+var $schedule = function(goroutine) {
+ if (goroutine.asleep) {
+ goroutine.asleep = false;
+ $awakeGoroutines++;
+ }
+ $scheduled.push(goroutine);
+ if ($curGoroutine === $noGoroutine) {
+ $runScheduled();
+ }
+};
+
+var $setTimeout = function(f, t) {
+ $awakeGoroutines++;
+ return setTimeout(function() {
+ $awakeGoroutines--;
+ f();
+ }, t);
+};
+
+var $block = function() {
+ if ($curGoroutine === $noGoroutine) {
+ $throwRuntimeError("cannot block in JavaScript callback, fix by wrapping code in goroutine");
+ }
+ $curGoroutine.asleep = true;
+};
+
+var $restore = function(context, params) {
+ if (context !== undefined && context.$blk !== undefined) {
+ return context;
+ }
+ return params;
+}
+
+var $send = function(chan, value) {
+ if (chan.$closed) {
+ $throwRuntimeError("send on closed channel");
+ }
+ var queuedRecv = chan.$recvQueue.shift();
+ if (queuedRecv !== undefined) {
+ queuedRecv([value, true]);
+ return;
+ }
+ if (chan.$buffer.length < chan.$capacity) {
+ chan.$buffer.push(value);
+ return;
+ }
+
+ var thisGoroutine = $curGoroutine;
+ var closedDuringSend;
+ chan.$sendQueue.push(function(closed) {
+ closedDuringSend = closed;
+ $schedule(thisGoroutine);
+ return value;
+ });
+ $block();
+ return {
+ $blk: function() {
+ if (closedDuringSend) {
+ $throwRuntimeError("send on closed channel");
+ }
+ }
+ };
+};
+var $recv = function(chan) {
+ var queuedSend = chan.$sendQueue.shift();
+ if (queuedSend !== undefined) {
+ chan.$buffer.push(queuedSend(false));
+ }
+ var bufferedValue = chan.$buffer.shift();
+ if (bufferedValue !== undefined) {
+ return [bufferedValue, true];
+ }
+ if (chan.$closed) {
+ return [chan.$elem.zero(), false];
+ }
+
+ var thisGoroutine = $curGoroutine;
+ var f = { $blk: function() { return this.value; } };
+ var queueEntry = function(v) {
+ f.value = v;
+ $schedule(thisGoroutine);
+ };
+ chan.$recvQueue.push(queueEntry);
+ $block();
+ return f;
+};
+var $close = function(chan) {
+ if (chan.$closed) {
+ $throwRuntimeError("close of closed channel");
+ }
+ chan.$closed = true;
+ while (true) {
+ var queuedSend = chan.$sendQueue.shift();
+ if (queuedSend === undefined) {
+ break;
+ }
+ queuedSend(true); /* will panic */
+ }
+ while (true) {
+ var queuedRecv = chan.$recvQueue.shift();
+ if (queuedRecv === undefined) {
+ break;
+ }
+ queuedRecv([chan.$elem.zero(), false]);
+ }
+};
+var $select = function(comms) {
+ var ready = [];
+ var selection = -1;
+ for (var i = 0; i < comms.length; i++) {
+ var comm = comms[i];
+ var chan = comm[0];
+ switch (comm.length) {
+ case 0: /* default */
+ selection = i;
+ break;
+ case 1: /* recv */
+ if (chan.$sendQueue.length !== 0 || chan.$buffer.length !== 0 || chan.$closed) {
+ ready.push(i);
+ }
+ break;
+ case 2: /* send */
+ if (chan.$closed) {
+ $throwRuntimeError("send on closed channel");
+ }
+ if (chan.$recvQueue.length !== 0 || chan.$buffer.length < chan.$capacity) {
+ ready.push(i);
+ }
+ break;
+ }
+ }
+
+ if (ready.length !== 0) {
+ selection = ready[Math.floor(Math.random() * ready.length)];
+ }
+ if (selection !== -1) {
+ var comm = comms[selection];
+ switch (comm.length) {
+ case 0: /* default */
+ return [selection];
+ case 1: /* recv */
+ return [selection, $recv(comm[0])];
+ case 2: /* send */
+ $send(comm[0], comm[1]);
+ return [selection];
+ }
+ }
+
+ var entries = [];
+ var thisGoroutine = $curGoroutine;
+ var f = { $blk: function() { return this.selection; } };
+ var removeFromQueues = function() {
+ for (var i = 0; i < entries.length; i++) {
+ var entry = entries[i];
+ var queue = entry[0];
+ var index = queue.indexOf(entry[1]);
+ if (index !== -1) {
+ queue.splice(index, 1);
+ }
+ }
+ };
+ for (var i = 0; i < comms.length; i++) {
+ (function(i) {
+ var comm = comms[i];
+ switch (comm.length) {
+ case 1: /* recv */
+ var queueEntry = function(value) {
+ f.selection = [i, value];
+ removeFromQueues();
+ $schedule(thisGoroutine);
+ };
+ entries.push([comm[0].$recvQueue, queueEntry]);
+ comm[0].$recvQueue.push(queueEntry);
+ break;
+ case 2: /* send */
+ var queueEntry = function() {
+ if (comm[0].$closed) {
+ $throwRuntimeError("send on closed channel");
+ }
+ f.selection = [i];
+ removeFromQueues();
+ $schedule(thisGoroutine);
+ return comm[1];
+ };
+ entries.push([comm[0].$sendQueue, queueEntry]);
+ comm[0].$sendQueue.push(queueEntry);
+ break;
+ }
+ })(i);
+ }
+ $block();
+ return f;
+};
+
+var $jsObjectPtr, $jsErrorPtr;
+
+var $needsExternalization = function(t) {
+ switch (t.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 false;
+ default:
+ return t !== $jsObjectPtr;
+ }
+};
+
+var $externalize = function(v, t, makeWrapper) {
+ if (t === $jsObjectPtr) {
+ return v;
+ }
+ switch (t.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 v;
+ case $kindInt64:
+ case $kindUint64:
+ return $flatten64(v);
+ case $kindArray:
+ if ($needsExternalization(t.elem)) {
+ return $mapArray(v, function(e) { return $externalize(e, t.elem, makeWrapper); });
+ }
+ return v;
+ case $kindFunc:
+ return $externalizeFunction(v, t, false, makeWrapper);
+ case $kindInterface:
+ if (v === $ifaceNil) {
+ return null;
+ }
+ if (v.constructor === $jsObjectPtr) {
+ return v.$val.object;
+ }
+ return $externalize(v.$val, v.constructor, makeWrapper);
+ case $kindMap:
+ var m = {};
+ var keys = $keys(v);
+ for (var i = 0; i < keys.length; i++) {
+ var entry = v[keys[i]];
+ m[$externalize(entry.k, t.key, makeWrapper)] = $externalize(entry.v, t.elem, makeWrapper);
+ }
+ return m;
+ case $kindPtr:
+ if (v === t.nil) {
+ return null;
+ }
+ return $externalize(v.$get(), t.elem, makeWrapper);
+ case $kindSlice:
+ if ($needsExternalization(t.elem)) {
+ return $mapArray($sliceToNativeArray(v), function(e) { return $externalize(e, t.elem, makeWrapper); });
+ }
+ return $sliceToNativeArray(v);
+ case $kindString:
+ if ($isASCII(v)) {
+ return v;
+ }
+ var s = "", r;
+ for (var i = 0; i < v.length; i += r[1]) {
+ r = $decodeRune(v, i);
+ var c = r[0];
+ if (c > 0xFFFF) {
+ var h = Math.floor((c - 0x10000) / 0x400) + 0xD800;
+ var l = (c - 0x10000) % 0x400 + 0xDC00;
+ s += String.fromCharCode(h, l);
+ continue;
+ }
+ s += String.fromCharCode(c);
+ }
+ return s;
+ case $kindStruct:
+ var timePkg = $packages["time"];
+ if (timePkg !== undefined && v.constructor === timePkg.Time.ptr) {
+ var milli = $div64(v.UnixNano(), new $Int64(0, 1000000));
+ return new Date($flatten64(milli));
+ }
+
+ var noJsObject = {};
+ var searchJsObject = function(v, t) {
+ if (t === $jsObjectPtr) {
+ return v;
+ }
+ switch (t.kind) {
+ case $kindPtr:
+ if (v === t.nil) {
+ return noJsObject;
+ }
+ return searchJsObject(v.$get(), t.elem);
+ case $kindStruct:
+ var f = t.fields[0];
+ return searchJsObject(v[f.prop], f.typ);
+ case $kindInterface:
+ return searchJsObject(v.$val, v.constructor);
+ default:
+ return noJsObject;
+ }
+ };
+ var o = searchJsObject(v, t);
+ if (o !== noJsObject) {
+ return o;
+ }
+
+ if (makeWrapper !== undefined) {
+ return makeWrapper(v);
+ }
+
+ o = {};
+ for (var i = 0; i < t.fields.length; i++) {
+ var f = t.fields[i];
+ if (!f.exported) {
+ continue;
+ }
+ o[f.name] = $externalize(v[f.prop], f.typ, makeWrapper);
+ }
+ return o;
+ }
+ $throwRuntimeError("cannot externalize " + t.string);
+};
+
+var $externalizeFunction = function(v, t, passThis, makeWrapper) {
+ if (v === $throwNilPointerError) {
+ return null;
+ }
+ if (v.$externalizeWrapper === undefined) {
+ $checkForDeadlock = false;
+ v.$externalizeWrapper = function() {
+ var args = [];
+ for (var i = 0; i < t.params.length; i++) {
+ if (t.variadic && i === t.params.length - 1) {
+ var vt = t.params[i].elem, varargs = [];
+ for (var j = i; j < arguments.length; j++) {
+ varargs.push($internalize(arguments[j], vt, makeWrapper));
+ }
+ args.push(new (t.params[i])(varargs));
+ break;
+ }
+ args.push($internalize(arguments[i], t.params[i], makeWrapper));
+ }
+ var result = v.apply(passThis ? this : undefined, args);
+ switch (t.results.length) {
+ case 0:
+ return;
+ case 1:
+ return $externalize($copyIfRequired(result, t.results[0]), t.results[0], makeWrapper);
+ default:
+ for (var i = 0; i < t.results.length; i++) {
+ result[i] = $externalize($copyIfRequired(result[i], t.results[i]), t.results[i], makeWrapper);
+ }
+ return result;
+ }
+ };
+ }
+ return v.$externalizeWrapper;
+};
+
+var $internalize = function(v, t, recv, seen, makeWrapper) {
+ if (t === $jsObjectPtr) {
+ return v;
+ }
+ if (t === $jsObjectPtr.elem) {
+ $throwRuntimeError("cannot internalize js.Object, use *js.Object instead");
+ }
+ if (v && v.__internal_object__ !== undefined) {
+ return $assertType(v.__internal_object__, t, false);
+ }
+ var timePkg = $packages["time"];
+ if (timePkg !== undefined && t === timePkg.Time) {
+ if (!(v !== null && v !== undefined && v.constructor === Date)) {
+ $throwRuntimeError("cannot internalize time.Time from " + typeof v + ", must be Date");
+ }
+ return timePkg.Unix(new $Int64(0, 0), new $Int64(0, v.getTime() * 1000000));
+ }
+
+ // Cache for values we've already internalized in order to deal with circular
+ // references.
+ if (seen === undefined) { seen = new Map(); }
+ if (!seen.has(t)) { seen.set(t, new Map()); }
+ if (seen.get(t).has(v)) { return seen.get(t).get(v); }
+
+ switch (t.kind) {
+ case $kindBool:
+ return !!v;
+ case $kindInt:
+ return parseInt(v);
+ case $kindInt8:
+ return parseInt(v) << 24 >> 24;
+ case $kindInt16:
+ return parseInt(v) << 16 >> 16;
+ case $kindInt32:
+ return parseInt(v) >> 0;
+ case $kindUint:
+ return parseInt(v);
+ case $kindUint8:
+ return parseInt(v) << 24 >>> 24;
+ case $kindUint16:
+ return parseInt(v) << 16 >>> 16;
+ case $kindUint32:
+ case $kindUintptr:
+ return parseInt(v) >>> 0;
+ case $kindInt64:
+ case $kindUint64:
+ return new t(0, v);
+ case $kindFloat32:
+ case $kindFloat64:
+ return parseFloat(v);
+ case $kindArray:
+ if (v.length !== t.len) {
+ $throwRuntimeError("got array with wrong size from JavaScript native");
+ }
+ return $mapArray(v, function(e) { return $internalize(e, t.elem, makeWrapper); });
+ case $kindFunc:
+ return function() {
+ var args = [];
+ for (var i = 0; i < t.params.length; i++) {
+ if (t.variadic && i === t.params.length - 1) {
+ var vt = t.params[i].elem, varargs = arguments[i];
+ for (var j = 0; j < varargs.$length; j++) {
+ args.push($externalize(varargs.$array[varargs.$offset + j], vt, makeWrapper));
+ }
+ break;
+ }
+ args.push($externalize(arguments[i], t.params[i], makeWrapper));
+ }
+ var result = v.apply(recv, args);
+ switch (t.results.length) {
+ case 0:
+ return;
+ case 1:
+ return $internalize(result, t.results[0], makeWrapper);
+ default:
+ for (var i = 0; i < t.results.length; i++) {
+ result[i] = $internalize(result[i], t.results[i], makeWrapper);
+ }
+ return result;
+ }
+ };
+ case $kindInterface:
+ if (t.methods.length !== 0) {
+ $throwRuntimeError("cannot internalize " + t.string);
+ }
+ if (v === null) {
+ return $ifaceNil;
+ }
+ if (v === undefined) {
+ return new $jsObjectPtr(undefined);
+ }
+ switch (v.constructor) {
+ case Int8Array:
+ return new ($sliceType($Int8))(v);
+ case Int16Array:
+ return new ($sliceType($Int16))(v);
+ case Int32Array:
+ return new ($sliceType($Int))(v);
+ case Uint8Array:
+ return new ($sliceType($Uint8))(v);
+ case Uint16Array:
+ return new ($sliceType($Uint16))(v);
+ case Uint32Array:
+ return new ($sliceType($Uint))(v);
+ case Float32Array:
+ return new ($sliceType($Float32))(v);
+ case Float64Array:
+ return new ($sliceType($Float64))(v);
+ case Array:
+ return $internalize(v, $sliceType($emptyInterface), makeWrapper);
+ case Boolean:
+ return new $Bool(!!v);
+ case Date:
+ if (timePkg === undefined) {
+ /* time package is not present, internalize as &js.Object{Date} so it can be externalized into original Date. */
+ return new $jsObjectPtr(v);
+ }
+ return new timePkg.Time($internalize(v, timePkg.Time, makeWrapper));
+ case (function () { }).constructor: // is usually Function, but in Chrome extensions it is something else
+ var funcType = $funcType([$sliceType($emptyInterface)], [$jsObjectPtr], true);
+ return new funcType($internalize(v, funcType, makeWrapper));
+ case Number:
+ return new $Float64(parseFloat(v));
+ case String:
+ return new $String($internalize(v, $String, makeWrapper));
+ default:
+ if ($global.Node && v instanceof $global.Node) {
+ return new $jsObjectPtr(v);
+ }
+ var mapType = $mapType($String, $emptyInterface);
+ return new mapType($internalize(v, mapType, recv, seen, makeWrapper));
+ }
+ case $kindMap:
+ var m = {};
+ seen.get(t).set(v, m);
+ var keys = $keys(v);
+ for (var i = 0; i < keys.length; i++) {
+ var k = $internalize(keys[i], t.key, recv, seen, makeWrapper);
+ m[t.key.keyFor(k)] = { k: k, v: $internalize(v[keys[i]], t.elem, recv, seen, makeWrapper) };
+ }
+ return m;
+ case $kindPtr:
+ if (t.elem.kind === $kindStruct) {
+ return $internalize(v, t.elem, makeWrapper);
+ }
+ case $kindSlice:
+ return new t($mapArray(v, function(e) { return $internalize(e, t.elem, makeWrapper); }));
+ case $kindString:
+ v = String(v);
+ if ($isASCII(v)) {
+ return v;
+ }
+ var s = "";
+ var i = 0;
+ while (i < v.length) {
+ var h = v.charCodeAt(i);
+ if (0xD800 <= h && h <= 0xDBFF) {
+ var l = v.charCodeAt(i + 1);
+ var c = (h - 0xD800) * 0x400 + l - 0xDC00 + 0x10000;
+ s += $encodeRune(c);
+ i += 2;
+ continue;
+ }
+ s += $encodeRune(h);
+ i++;
+ }
+ return s;
+ case $kindStruct:
+ var noJsObject = {};
+ var searchJsObject = function(t) {
+ if (t === $jsObjectPtr) {
+ return v;
+ }
+ if (t === $jsObjectPtr.elem) {
+ $throwRuntimeError("cannot internalize js.Object, use *js.Object instead");
+ }
+ switch (t.kind) {
+ case $kindPtr:
+ return searchJsObject(t.elem);
+ case $kindStruct:
+ var f = t.fields[0];
+ var o = searchJsObject(f.typ);
+ if (o !== noJsObject) {
+ var n = new t.ptr();
+ n[f.prop] = o;
+ return n;
+ }
+ return noJsObject;
+ default:
+ return noJsObject;
+ }
+ };
+ var o = searchJsObject(t);
+ if (o !== noJsObject) {
+ return o;
+ }
+ }
+ $throwRuntimeError("cannot internalize " + t.string);
+};
+
+var $copyIfRequired = function(v, typ) {
+ // interface values
+ if (v && v.constructor && v.constructor.copy) {
+ return new v.constructor($clone(v.$val, v.constructor))
+ }
+ // array and struct values
+ if (typ.copy) {
+ var clone = typ.zero();
+ typ.copy(clone, v);
+ return clone;
+ }
+ return v;
+}
+
+/* $isASCII reports whether string s contains only ASCII characters. */
+var $isASCII = function(s) {
+ for (var i = 0; i < s.length; i++) {
+ if (s.charCodeAt(i) >= 128) {
+ return false;
+ }
+ }
+ return true;
+};
+
+$packages["github.com/gopherjs/gopherjs/js"] = (function() {
+ var $pkg = {}, $init, Object, Error, M, sliceType, ptrType, sliceType$2, funcType, funcType$1, funcType$2, ptrType$1, MakeFunc, MakeWrapper, MakeFullWrapper, init;
+ Object = $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_;
+ });
+ Error = $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_;
+ });
+ M = $pkg.M = $newType(4, $kindMap, "js.M", true, "github.com/gopherjs/gopherjs/js", true, null);
+ sliceType = $sliceType($emptyInterface);
+ ptrType = $ptrType(Object);
+ sliceType$2 = $sliceType(ptrType);
+ funcType = $funcType([sliceType$2], [ptrType], true);
+ funcType$1 = $funcType([], [ptrType], false);
+ funcType$2 = $funcType([ptrType], [], false);
+ ptrType$1 = $ptrType(Error);
+ Object.ptr.prototype.Get = function(key) {
+ var key, o;
+ o = this;
+ return o.object[$externalize(key, $String)];
+ };
+ Object.prototype.Get = function(key) { return this.$val.Get(key); };
+ Object.ptr.prototype.Set = function(key, value) {
+ var key, o, value;
+ o = this;
+ o.object[$externalize(key, $String)] = $externalize(value, $emptyInterface);
+ };
+ Object.prototype.Set = function(key, value) { return this.$val.Set(key, value); };
+ Object.ptr.prototype.Delete = function(key) {
+ var key, o;
+ o = this;
+ delete o.object[$externalize(key, $String)];
+ };
+ Object.prototype.Delete = function(key) { return this.$val.Delete(key); };
+ Object.ptr.prototype.Length = function() {
+ var o;
+ o = this;
+ return $parseInt(o.object.length);
+ };
+ Object.prototype.Length = function() { return this.$val.Length(); };
+ Object.ptr.prototype.Index = function(i) {
+ var i, o;
+ o = this;
+ return o.object[i];
+ };
+ Object.prototype.Index = function(i) { return this.$val.Index(i); };
+ Object.ptr.prototype.SetIndex = function(i, value) {
+ var i, o, value;
+ o = this;
+ o.object[i] = $externalize(value, $emptyInterface);
+ };
+ Object.prototype.SetIndex = function(i, value) { return this.$val.SetIndex(i, value); };
+ Object.ptr.prototype.Call = function(name, args) {
+ var args, name, o, obj;
+ o = this;
+ return (obj = o.object, obj[$externalize(name, $String)].apply(obj, $externalize(args, sliceType)));
+ };
+ Object.prototype.Call = function(name, args) { return this.$val.Call(name, args); };
+ Object.ptr.prototype.Invoke = function(args) {
+ var args, o;
+ o = this;
+ return o.object.apply(undefined, $externalize(args, sliceType));
+ };
+ Object.prototype.Invoke = function(args) { return this.$val.Invoke(args); };
+ Object.ptr.prototype.New = function(args) {
+ var args, o;
+ o = this;
+ return new ($global.Function.prototype.bind.apply(o.object, [undefined].concat($externalize(args, sliceType))));
+ };
+ Object.prototype.New = function(args) { return this.$val.New(args); };
+ Object.ptr.prototype.Bool = function() {
+ var o;
+ o = this;
+ return !!(o.object);
+ };
+ Object.prototype.Bool = function() { return this.$val.Bool(); };
+ Object.ptr.prototype.String = function() {
+ var o;
+ o = this;
+ return $internalize(o.object, $String);
+ };
+ Object.prototype.String = function() { return this.$val.String(); };
+ Object.ptr.prototype.Int = function() {
+ var o;
+ o = this;
+ return $parseInt(o.object) >> 0;
+ };
+ Object.prototype.Int = function() { return this.$val.Int(); };
+ Object.ptr.prototype.Int64 = function() {
+ var o;
+ o = this;
+ return $internalize(o.object, $Int64);
+ };
+ Object.prototype.Int64 = function() { return this.$val.Int64(); };
+ Object.ptr.prototype.Uint64 = function() {
+ var o;
+ o = this;
+ return $internalize(o.object, $Uint64);
+ };
+ Object.prototype.Uint64 = function() { return this.$val.Uint64(); };
+ Object.ptr.prototype.Float = function() {
+ var o;
+ o = this;
+ return $parseFloat(o.object);
+ };
+ Object.prototype.Float = function() { return this.$val.Float(); };
+ Object.ptr.prototype.Interface = function() {
+ var o;
+ o = this;
+ return $internalize(o.object, $emptyInterface);
+ };
+ Object.prototype.Interface = function() { return this.$val.Interface(); };
+ Object.ptr.prototype.Unsafe = function() {
+ var o;
+ o = this;
+ return o.object;
+ };
+ Object.prototype.Unsafe = function() { return this.$val.Unsafe(); };
+ Error.ptr.prototype.Error = function() {
+ var err;
+ err = this;
+ return "JavaScript error: " + $internalize(err.Object.message, $String);
+ };
+ Error.prototype.Error = function() { return this.$val.Error(); };
+ Error.ptr.prototype.Stack = function() {
+ var err;
+ err = this;
+ return $internalize(err.Object.stack, $String);
+ };
+ Error.prototype.Stack = function() { return this.$val.Stack(); };
+ MakeFunc = function(fn) {
+ var fn;
+ return $makeFunc(fn);
+ };
+ $pkg.MakeFunc = MakeFunc;
+ MakeWrapper = function(i) {
+ var i, i$1, m, methods, o, v;
+ v = i;
+ o = new ($global.Object)();
+ o.__internal_object__ = v;
+ methods = v.constructor.methods;
+ i$1 = 0;
+ while (true) {
+ if (!(i$1 < $parseInt(methods.length))) { break; }
+ m = [m];
+ m[0] = methods[i$1];
+ if (!($internalize(m[0].pkg, $String) === "")) {
+ i$1 = i$1 + (1) >> 0;
+ continue;
+ }
+ o[$externalize($internalize(m[0].name, $String), $String)] = $externalize((function(m) { return function(args) {
+ var args;
+ return $externalizeFunction(v[$externalize($internalize(m[0].prop, $String), $String)], m[0].typ, $externalize(true, $Bool)).apply(v, $externalize(args, sliceType$2));
+ }; })(m), funcType);
+ i$1 = i$1 + (1) >> 0;
+ }
+ return o;
+ };
+ $pkg.MakeWrapper = MakeWrapper;
+ MakeFullWrapper = function(i) {
+ var {constructor, defineProperty, e, f, fields, i, i$1, i$2, i$3, internalObj, m, methods, ms, pkg, pkgTyp, ptr, typ, wrapperObj, $s, $r, $c} = $restore(this, {i});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ internalObj = [internalObj];
+ wrapperObj = [wrapperObj];
+ internalObj[0] = i;
+ constructor = internalObj[0].constructor;
+ wrapperObj[0] = new ($global.Object)();
+ defineProperty = (function(internalObj, wrapperObj) { return function(key, descriptor) {
+ var descriptor, key;
+ $global.Object.defineProperty(wrapperObj[0], $externalize(key, $String), $externalize(descriptor, M));
+ }; })(internalObj, wrapperObj);
+ $r = defineProperty("__internal_object__", $makeMap($String.keyFor, [{ k: "value", v: new $jsObjectPtr(internalObj[0]) }])); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ typ = $internalize(constructor.string, $String);
+ pkg = $internalize(constructor.pkg, $String);
+ ptr = "";
+ if (typ.charCodeAt(0) === 42) {
+ ptr = "*";
+ }
+ i$1 = 0;
+ while (true) {
+ if (!(i$1 < typ.length)) { break; }
+ if (typ.charCodeAt(i$1) === 46) {
+ typ = $substring(typ, (i$1 + 1 >> 0));
+ break;
+ }
+ i$1 = i$1 + (1) >> 0;
+ }
+ pkgTyp = pkg + "." + ptr + typ;
+ $r = defineProperty("$type", $makeMap($String.keyFor, [{ k: "value", v: new $String(pkgTyp) }])); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ fields = null;
+ methods = new ($global.Array)();
+ ms = constructor.methods;
+ if (!(ms === undefined)) {
+ methods = methods.concat(ms);
+ }
+ e = constructor.elem;
+ if (!(e === undefined)) {
+ fields = e.fields;
+ methods = methods.concat(e.methods);
+ } else {
+ fields = constructor.fields;
+ }
+ i$2 = 0;
+ /* while (true) { */ case 3:
+ /* if (!(i$2 < $parseInt(methods.length))) { break; } */ if(!(i$2 < $parseInt(methods.length))) { $s = 4; continue; }
+ m = [m];
+ m[0] = methods[i$2];
+ if (!($internalize(m[0].pkg, $String) === "")) {
+ i$2 = i$2 + (1) >> 0;
+ /* continue; */ $s = 3; continue;
+ }
+ $r = defineProperty($internalize(m[0].prop, $String), $makeMap($String.keyFor, [{ k: "value", v: new funcType((function(internalObj, m, wrapperObj) { return function(args) {
+ var args;
+ return $externalizeFunction(internalObj[0][$externalize($internalize(m[0].prop, $String), $String)], m[0].typ, $externalize(true, $Bool), MakeFullWrapper).apply(internalObj[0], $externalize(args, sliceType$2));
+ }; })(internalObj, m, wrapperObj)) }])); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ i$2 = i$2 + (1) >> 0;
+ $s = 3; continue;
+ case 4:
+ /* */ if (!(fields === undefined)) { $s = 6; continue; }
+ /* */ $s = 7; continue;
+ /* if (!(fields === undefined)) { */ case 6:
+ i$3 = 0;
+ /* while (true) { */ case 8:
+ /* if (!(i$3 < $parseInt(fields.length))) { break; } */ if(!(i$3 < $parseInt(fields.length))) { $s = 9; continue; }
+ f = [f];
+ f[0] = fields[i$3];
+ if (!!!(f[0].exported)) {
+ i$3 = i$3 + (1) >> 0;
+ /* continue; */ $s = 8; continue;
+ }
+ $r = defineProperty($internalize(f[0].prop, $String), $makeMap($String.keyFor, [{ k: "get", v: new funcType$1((function(f, internalObj, wrapperObj) { return function() {
+ var vc;
+ vc = $copyIfRequired(internalObj[0].$val[$externalize($internalize(f[0].prop, $String), $String)], f[0].typ);
+ return $externalize(vc, f[0].typ, MakeFullWrapper);
+ }; })(f, internalObj, wrapperObj)) }, { k: "set", v: new funcType$2((function(f, internalObj, wrapperObj) { return function(jv) {
+ var gv, jv;
+ gv = $internalize(jv, f[0].typ, MakeFullWrapper);
+ internalObj[0].$val[$externalize($internalize(f[0].prop, $String), $String)] = gv;
+ }; })(f, internalObj, wrapperObj)) }])); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ i$3 = i$3 + (1) >> 0;
+ $s = 8; continue;
+ case 9:
+ /* } */ case 7:
+ $s = -1; return wrapperObj[0];
+ /* */ } return; } var $f = {$blk: MakeFullWrapper, $c: true, $r, constructor, defineProperty, e, f, fields, i, i$1, i$2, i$3, internalObj, m, methods, ms, pkg, pkgTyp, ptr, typ, wrapperObj, $s};return $f;
+ };
+ $pkg.MakeFullWrapper = MakeFullWrapper;
+ init = function() {
+ var e;
+ e = new Error.ptr(null);
+ $unused(e);
+ };
+ ptrType.methods = [{prop: "Get", name: "Get", pkg: "", typ: $funcType([$String], [ptrType], 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], [ptrType], false)}, {prop: "SetIndex", name: "SetIndex", pkg: "", typ: $funcType([$Int, $emptyInterface], [], false)}, {prop: "Call", name: "Call", pkg: "", typ: $funcType([$String, sliceType], [ptrType], true)}, {prop: "Invoke", name: "Invoke", pkg: "", typ: $funcType([sliceType], [ptrType], true)}, {prop: "New", name: "New", pkg: "", typ: $funcType([sliceType], [ptrType], 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)}];
+ ptrType$1.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Stack", name: "Stack", pkg: "", typ: $funcType([], [$String], false)}];
+ Object.init("github.com/gopherjs/gopherjs/js", [{prop: "object", name: "object", embedded: false, exported: false, typ: ptrType, tag: ""}]);
+ Error.init("", [{prop: "Object", name: "Object", embedded: true, exported: true, typ: ptrType, tag: ""}]);
+ M.init($String, $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:
+ init();
+ /* */ } 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, js, _type, TypeAssertionError, basicFrame, Frames, Frame, Func, errorString, ptrType, sliceType, ptrType$1, structType, sliceType$1, sliceType$2, ptrType$2, ptrType$3, knownPositions, positionCounters, hiddenFrames, knownFrames, buildVersion, init, GOROOT, registerPosition, itoa, callstack, parseCallstack, ParseCallFrame, Caller, Callers, CallersFrames, SetFinalizer, FuncForPC, Stack, KeepAlive, throw$1, nanotime, fastrand;
+ js = $packages["github.com/gopherjs/gopherjs/js"];
+ _type = $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_;
+ });
+ TypeAssertionError = $pkg.TypeAssertionError = $newType(0, $kindStruct, "runtime.TypeAssertionError", true, "runtime", true, function(_interface_, concrete_, asserted_, missingMethod_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this._interface = ptrType$1.nil;
+ this.concrete = ptrType$1.nil;
+ this.asserted = ptrType$1.nil;
+ this.missingMethod = "";
+ return;
+ }
+ this._interface = _interface_;
+ this.concrete = concrete_;
+ this.asserted = asserted_;
+ this.missingMethod = missingMethod_;
+ });
+ basicFrame = $pkg.basicFrame = $newType(0, $kindStruct, "runtime.basicFrame", true, "runtime", false, function(FuncName_, File_, Line_, Col_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.FuncName = "";
+ this.File = "";
+ this.Line = 0;
+ this.Col = 0;
+ return;
+ }
+ this.FuncName = FuncName_;
+ this.File = File_;
+ this.Line = Line_;
+ this.Col = Col_;
+ });
+ Frames = $pkg.Frames = $newType(0, $kindStruct, "runtime.Frames", true, "runtime", true, function(frames_, current_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.frames = sliceType$2.nil;
+ this.current = 0;
+ return;
+ }
+ this.frames = frames_;
+ this.current = current_;
+ });
+ Frame = $pkg.Frame = $newType(0, $kindStruct, "runtime.Frame", true, "runtime", true, function(PC_, Func_, Function_, File_, Line_, Entry_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.PC = 0;
+ this.Func = ptrType.nil;
+ this.Function = "";
+ this.File = "";
+ this.Line = 0;
+ this.Entry = 0;
+ return;
+ }
+ this.PC = PC_;
+ this.Func = Func_;
+ this.Function = Function_;
+ this.File = File_;
+ this.Line = Line_;
+ this.Entry = Entry_;
+ });
+ Func = $pkg.Func = $newType(0, $kindStruct, "runtime.Func", true, "runtime", true, function(name_, file_, line_, opaque_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.name = "";
+ this.file = "";
+ this.line = 0;
+ this.opaque = new structType.ptr();
+ return;
+ }
+ this.name = name_;
+ this.file = file_;
+ this.line = line_;
+ this.opaque = opaque_;
+ });
+ errorString = $pkg.errorString = $newType(8, $kindString, "runtime.errorString", true, "runtime", false, null);
+ ptrType = $ptrType(Func);
+ sliceType = $sliceType(ptrType);
+ ptrType$1 = $ptrType(_type);
+ structType = $structType("", []);
+ sliceType$1 = $sliceType(basicFrame);
+ sliceType$2 = $sliceType(Frame);
+ ptrType$2 = $ptrType(TypeAssertionError);
+ ptrType$3 = $ptrType(Frames);
+ _type.ptr.prototype.string = function() {
+ var t;
+ t = this;
+ return t.str;
+ };
+ _type.prototype.string = function() { return this.$val.string(); };
+ _type.ptr.prototype.pkgpath = function() {
+ var t;
+ t = this;
+ return "";
+ };
+ _type.prototype.pkgpath = function() { return this.$val.pkgpath(); };
+ TypeAssertionError.ptr.prototype.RuntimeError = function() {
+ };
+ TypeAssertionError.prototype.RuntimeError = function() { return this.$val.RuntimeError(); };
+ TypeAssertionError.ptr.prototype.Error = function() {
+ var as, cs, e, inter, msg;
+ e = this;
+ inter = "interface";
+ if (!(e._interface === ptrType$1.nil)) {
+ inter = e._interface.string();
+ }
+ as = e.asserted.string();
+ if (e.concrete === ptrType$1.nil) {
+ return "interface conversion: " + inter + " is nil, not " + as;
+ }
+ cs = e.concrete.string();
+ if (e.missingMethod === "") {
+ msg = "interface conversion: " + inter + " is " + cs + ", not " + as;
+ if (cs === as) {
+ if (!(e.concrete.pkgpath() === e.asserted.pkgpath())) {
+ msg = msg + (" (types from different packages)");
+ } else {
+ msg = msg + (" (types from different scopes)");
+ }
+ }
+ return msg;
+ }
+ return "interface conversion: " + cs + " is not " + as + ": missing method " + e.missingMethod;
+ };
+ TypeAssertionError.prototype.Error = function() { return this.$val.Error(); };
+ init = function() {
+ var e, jsPkg;
+ jsPkg = $packages[$externalize("github.com/gopherjs/gopherjs/js", $String)];
+ $jsObjectPtr = jsPkg.Object.ptr;
+ $jsErrorPtr = jsPkg.Error.ptr;
+ $throwRuntimeError = throw$1;
+ buildVersion = $internalize($goVersion, $String);
+ e = $ifaceNil;
+ e = new TypeAssertionError.ptr(ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, "");
+ $unused(e);
+ };
+ GOROOT = function() {
+ var process, v, v$1;
+ process = $global.process;
+ if (process === undefined) {
+ return "/";
+ }
+ v = process.env.GOPHERJS_GOROOT;
+ if (!(v === undefined) && !($internalize(v, $String) === "")) {
+ return $internalize(v, $String);
+ } else {
+ v$1 = process.env.GOROOT;
+ if (!(v$1 === undefined) && !($internalize(v$1, $String) === "")) {
+ return $internalize(v$1, $String);
+ }
+ }
+ return "/usr/local/go";
+ };
+ $pkg.GOROOT = GOROOT;
+ registerPosition = function(funcName, file, line, col) {
+ var _entry, _key, _tuple, col, f, file, found, funcName, key, line, pc, pc$1;
+ key = file + ":" + itoa(line) + ":" + itoa(col);
+ _tuple = (_entry = knownPositions[$String.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [0, false]);
+ pc = _tuple[0];
+ found = _tuple[1];
+ if (found) {
+ return pc;
+ }
+ f = new Func.ptr(funcName, file, line, new structType.ptr());
+ pc$1 = ((positionCounters.$length >>> 0));
+ positionCounters = $append(positionCounters, f);
+ _key = key; (knownPositions || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: pc$1 };
+ return pc$1;
+ };
+ itoa = function(i) {
+ var i;
+ return $internalize(new ($global.String)(i), $String);
+ };
+ callstack = function(skip, limit) {
+ var limit, lines, skip;
+ skip = (skip + 1 >> 0) + 1 >> 0;
+ lines = new ($global.Error)().stack.split($externalize("\n", $String)).slice(skip, skip + limit >> 0);
+ return parseCallstack(lines);
+ };
+ parseCallstack = function(lines) {
+ var _entry, _entry$1, _tuple, alias, frame, frames, i, l, lines, ok;
+ frames = new sliceType$1([]);
+ l = $parseInt(lines.length);
+ i = 0;
+ while (true) {
+ if (!(i < l)) { break; }
+ frame = $clone(ParseCallFrame(lines[i]), basicFrame);
+ if ((_entry = hiddenFrames[$String.keyFor(frame.FuncName)], _entry !== undefined ? _entry.v : false)) {
+ i = i + (1) >> 0;
+ continue;
+ }
+ _tuple = (_entry$1 = knownFrames[$String.keyFor(frame.FuncName)], _entry$1 !== undefined ? [_entry$1.v, true] : ["", false]);
+ alias = _tuple[0];
+ ok = _tuple[1];
+ if (ok) {
+ frame.FuncName = alias;
+ }
+ frames = $append(frames, frame);
+ if (frame.FuncName === "runtime.goexit") {
+ break;
+ }
+ i = i + (1) >> 0;
+ }
+ return frames;
+ };
+ ParseCallFrame = function(info) {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, col, file, fn, funcName, idx, info, line, openIdx, parts, parts$1, parts$2, pos, split;
+ if (($parseInt(info.indexOf($externalize("@", $String))) >> 0) >= 0) {
+ split = new ($global.RegExp)($externalize("[@:]", $String));
+ parts = info.split(split);
+ return new basicFrame.ptr($internalize(parts[0], $String), $internalize(parts.slice(1, $parseInt(parts.length) - 2 >> 0).join($externalize(":", $String)), $String), $parseInt(parts[($parseInt(parts.length) - 2 >> 0)]) >> 0, $parseInt(parts[($parseInt(parts.length) - 1 >> 0)]) >> 0);
+ }
+ openIdx = $parseInt(info.lastIndexOf($externalize("(", $String))) >> 0;
+ if (openIdx === -1) {
+ parts$1 = info.split($externalize(":", $String));
+ return new basicFrame.ptr("", $internalize(parts$1.slice(0, $parseInt(parts$1.length) - 2 >> 0).join($externalize(":", $String)).replace(new ($global.RegExp)($externalize("^\\s*at ", $String)), $externalize("", $String)), $String), $parseInt(parts$1[($parseInt(parts$1.length) - 2 >> 0)]) >> 0, $parseInt(parts$1[($parseInt(parts$1.length) - 1 >> 0)]) >> 0);
+ }
+ _tmp = "";
+ _tmp$1 = "";
+ file = _tmp;
+ funcName = _tmp$1;
+ _tmp$2 = 0;
+ _tmp$3 = 0;
+ line = _tmp$2;
+ col = _tmp$3;
+ pos = info.substring(openIdx + 1 >> 0, $parseInt(info.indexOf($externalize(")", $String))) >> 0);
+ parts$2 = pos.split($externalize(":", $String));
+ if ($internalize(pos, $String) === "") {
+ file = "";
+ } else {
+ file = $internalize(parts$2.slice(0, $parseInt(parts$2.length) - 2 >> 0).join($externalize(":", $String)), $String);
+ line = $parseInt(parts$2[($parseInt(parts$2.length) - 2 >> 0)]) >> 0;
+ col = $parseInt(parts$2[($parseInt(parts$2.length) - 1 >> 0)]) >> 0;
+ }
+ fn = info.substring(($parseInt(info.indexOf($externalize("at ", $String))) >> 0) + 3 >> 0, $parseInt(info.indexOf($externalize(" (", $String))) >> 0);
+ idx = $parseInt(fn.indexOf($externalize("[as ", $String))) >> 0;
+ if (idx > 0) {
+ fn = fn.substring(idx + 4 >> 0, fn.indexOf($externalize("]", $String)));
+ }
+ funcName = $internalize(fn, $String);
+ return new basicFrame.ptr(funcName, file, line, col);
+ };
+ $pkg.ParseCallFrame = ParseCallFrame;
+ Caller = function(skip) {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, file, frames, line, ok, pc, skip;
+ pc = 0;
+ file = "";
+ line = 0;
+ ok = false;
+ skip = skip + 1 >> 0;
+ frames = callstack(skip, 1);
+ if (!((frames.$length === 1))) {
+ _tmp = 0;
+ _tmp$1 = "";
+ _tmp$2 = 0;
+ _tmp$3 = false;
+ pc = _tmp;
+ file = _tmp$1;
+ line = _tmp$2;
+ ok = _tmp$3;
+ return [pc, file, line, ok];
+ }
+ pc = registerPosition((0 >= frames.$length ? ($throwRuntimeError("index out of range"), undefined) : frames.$array[frames.$offset + 0]).FuncName, (0 >= frames.$length ? ($throwRuntimeError("index out of range"), undefined) : frames.$array[frames.$offset + 0]).File, (0 >= frames.$length ? ($throwRuntimeError("index out of range"), undefined) : frames.$array[frames.$offset + 0]).Line, (0 >= frames.$length ? ($throwRuntimeError("index out of range"), undefined) : frames.$array[frames.$offset + 0]).Col);
+ _tmp$4 = pc;
+ _tmp$5 = (0 >= frames.$length ? ($throwRuntimeError("index out of range"), undefined) : frames.$array[frames.$offset + 0]).File;
+ _tmp$6 = (0 >= frames.$length ? ($throwRuntimeError("index out of range"), undefined) : frames.$array[frames.$offset + 0]).Line;
+ _tmp$7 = true;
+ pc = _tmp$4;
+ file = _tmp$5;
+ line = _tmp$6;
+ ok = _tmp$7;
+ return [pc, file, line, ok];
+ };
+ $pkg.Caller = Caller;
+ Callers = function(skip, pc) {
+ var _i, _ref, frame, frames, i, pc, skip;
+ frames = callstack(skip, pc.$length);
+ _ref = frames;
+ _i = 0;
+ while (true) {
+ if (!(_i < _ref.$length)) { break; }
+ i = _i;
+ frame = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), basicFrame);
+ ((i < 0 || i >= pc.$length) ? ($throwRuntimeError("index out of range"), undefined) : pc.$array[pc.$offset + i] = registerPosition(frame.FuncName, frame.File, frame.Line, frame.Col));
+ _i++;
+ }
+ return frames.$length;
+ };
+ $pkg.Callers = Callers;
+ CallersFrames = function(callers) {
+ var _i, _ref, callers, fun, pc, result;
+ result = new Frames.ptr(sliceType$2.nil, 0);
+ _ref = callers;
+ _i = 0;
+ while (true) {
+ if (!(_i < _ref.$length)) { break; }
+ pc = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]);
+ fun = FuncForPC(pc);
+ result.frames = $append(result.frames, new Frame.ptr(pc, fun, fun.name, fun.file, fun.line, fun.Entry()));
+ _i++;
+ }
+ return result;
+ };
+ $pkg.CallersFrames = CallersFrames;
+ Frames.ptr.prototype.Next = function() {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, ci, f, frame, more, x, x$1;
+ frame = new Frame.ptr(0, ptrType.nil, "", "", 0, 0);
+ more = false;
+ ci = this;
+ if (ci.current >= ci.frames.$length) {
+ _tmp = new Frame.ptr(0, ptrType.nil, "", "", 0, 0);
+ _tmp$1 = false;
+ Frame.copy(frame, _tmp);
+ more = _tmp$1;
+ return [frame, more];
+ }
+ f = $clone((x = ci.frames, x$1 = ci.current, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1])), Frame);
+ ci.current = ci.current + (1) >> 0;
+ _tmp$2 = $clone(f, Frame);
+ _tmp$3 = ci.current < ci.frames.$length;
+ Frame.copy(frame, _tmp$2);
+ more = _tmp$3;
+ return [frame, more];
+ };
+ Frames.prototype.Next = function() { return this.$val.Next(); };
+ SetFinalizer = function(x, f) {
+ var f, x;
+ };
+ $pkg.SetFinalizer = SetFinalizer;
+ Func.ptr.prototype.Entry = function() {
+ return 0;
+ };
+ Func.prototype.Entry = function() { return this.$val.Entry(); };
+ Func.ptr.prototype.FileLine = function(pc) {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, f, file, line, pc;
+ file = "";
+ line = 0;
+ f = this;
+ if (f === ptrType.nil) {
+ _tmp = "";
+ _tmp$1 = 0;
+ file = _tmp;
+ line = _tmp$1;
+ return [file, line];
+ }
+ _tmp$2 = f.file;
+ _tmp$3 = f.line;
+ file = _tmp$2;
+ line = _tmp$3;
+ return [file, line];
+ };
+ Func.prototype.FileLine = function(pc) { return this.$val.FileLine(pc); };
+ Func.ptr.prototype.Name = function() {
+ var f;
+ f = this;
+ if (f === ptrType.nil || f.name === "") {
+ return "";
+ }
+ return f.name;
+ };
+ Func.prototype.Name = function() { return this.$val.Name(); };
+ FuncForPC = function(pc) {
+ var ipc, pc;
+ ipc = ((pc >> 0));
+ if (ipc >= positionCounters.$length) {
+ $panic(new $String("GopherJS: pc=" + itoa(ipc) + " is out of range of known position counters"));
+ }
+ return ((ipc < 0 || ipc >= positionCounters.$length) ? ($throwRuntimeError("index out of range"), undefined) : positionCounters.$array[positionCounters.$offset + ipc]);
+ };
+ $pkg.FuncForPC = FuncForPC;
+ Stack = function(buf, all) {
+ var all, buf, s;
+ s = new ($global.Error)().stack;
+ if (s === undefined) {
+ return 0;
+ }
+ return $copyString(buf, $internalize(s.substr(($parseInt(s.indexOf($externalize("\n", $String))) >> 0) + 1 >> 0), $String));
+ };
+ $pkg.Stack = Stack;
+ KeepAlive = function(param) {
+ var param;
+ };
+ $pkg.KeepAlive = KeepAlive;
+ errorString.prototype.RuntimeError = function() {
+ var e;
+ e = this.$val;
+ };
+ $ptrType(errorString).prototype.RuntimeError = function() { return new errorString(this.$get()).RuntimeError(); };
+ errorString.prototype.Error = function() {
+ var e;
+ e = this.$val;
+ return "runtime error: " + (e);
+ };
+ $ptrType(errorString).prototype.Error = function() { return new errorString(this.$get()).Error(); };
+ throw$1 = function(s) {
+ var s;
+ $panic(new errorString((s)));
+ };
+ nanotime = function() {
+ return $mul64($internalize(new ($global.Date)().getTime(), $Int64), new $Int64(0, 1000000));
+ };
+ $linknames["runtime.nanotime"] = nanotime;
+ fastrand = function() {
+ return (($parseFloat($global.Math.random()) * 4.294967295e+09 >> 0));
+ };
+ $linknames["runtime.fastrand"] = fastrand;
+ ptrType$1.methods = [{prop: "string", name: "string", pkg: "runtime", typ: $funcType([], [$String], false)}, {prop: "pkgpath", name: "pkgpath", pkg: "runtime", typ: $funcType([], [$String], false)}];
+ ptrType$2.methods = [{prop: "RuntimeError", name: "RuntimeError", pkg: "", typ: $funcType([], [], false)}, {prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}];
+ ptrType$3.methods = [{prop: "Next", name: "Next", pkg: "", typ: $funcType([], [Frame, $Bool], false)}];
+ ptrType.methods = [{prop: "Entry", name: "Entry", pkg: "", typ: $funcType([], [$Uintptr], false)}, {prop: "FileLine", name: "FileLine", pkg: "", typ: $funcType([$Uintptr], [$String, $Int], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}];
+ errorString.methods = [{prop: "RuntimeError", name: "RuntimeError", pkg: "", typ: $funcType([], [], false)}, {prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}];
+ _type.init("runtime", [{prop: "str", name: "str", embedded: false, exported: false, typ: $String, tag: ""}]);
+ TypeAssertionError.init("runtime", [{prop: "_interface", name: "_interface", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "concrete", name: "concrete", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "asserted", name: "asserted", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "missingMethod", name: "missingMethod", embedded: false, exported: false, typ: $String, tag: ""}]);
+ basicFrame.init("", [{prop: "FuncName", name: "FuncName", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "File", name: "File", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Line", name: "Line", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Col", name: "Col", embedded: false, exported: true, typ: $Int, tag: ""}]);
+ Frames.init("runtime", [{prop: "frames", name: "frames", embedded: false, exported: false, typ: sliceType$2, tag: ""}, {prop: "current", name: "current", embedded: false, exported: false, typ: $Int, tag: ""}]);
+ Frame.init("", [{prop: "PC", name: "PC", embedded: false, exported: true, typ: $Uintptr, tag: ""}, {prop: "Func", name: "Func", embedded: false, exported: true, typ: ptrType, tag: ""}, {prop: "Function", name: "Function", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "File", name: "File", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Line", name: "Line", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Entry", name: "Entry", embedded: false, exported: true, typ: $Uintptr, tag: ""}]);
+ Func.init("runtime", [{prop: "name", name: "name", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "file", name: "file", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "line", name: "line", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "opaque", name: "opaque", embedded: false, exported: false, typ: structType, 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 = js.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ buildVersion = "";
+ knownPositions = $makeMap($String.keyFor, []);
+ positionCounters = new sliceType([]);
+ hiddenFrames = $makeMap($String.keyFor, [{ k: "$callDeferred", v: true }]);
+ knownFrames = $makeMap($String.keyFor, [{ k: "$panic", v: "runtime.gopanic" }, { k: "$goroutine", v: "runtime.goexit" }]);
+ init();
+ /* */ } 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, Slice;
+ Slice = $pkg.Slice = $newType(0, $kindStruct, "unsafeheader.Slice", true, "internal/unsafeheader", true, function(Data_, Len_, Cap_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.Data = 0;
+ this.Len = 0;
+ this.Cap = 0;
+ return;
+ }
+ this.Data = Data_;
+ this.Len = Len_;
+ this.Cap = Cap_;
+ });
+ Slice.init("", [{prop: "Data", name: "Data", embedded: false, exported: true, typ: $UnsafePointer, tag: ""}, {prop: "Len", name: "Len", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Cap", name: "Cap", embedded: false, exported: true, typ: $Int, 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:
+ /* */ } 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, js, goarch, unsafeheader, runtime, Value, flag, ValueError, Type, Kind, tflag, rtype, method, chanDir, arrayType, chanType, imethod, interfaceType, mapType, ptrType, sliceType, structField, structType, nameOff, typeOff, textOff, errorString, Method, uncommonType, funcType, name, nameData, mapIter, TypeEx, ptrType$1, sliceType$1, sliceType$2, sliceType$3, sliceType$4, ptrType$2, funcType$1, ptrType$4, sliceType$5, ptrType$5, sliceType$6, ptrType$6, ptrType$7, sliceType$7, sliceType$8, sliceType$9, sliceType$10, ptrType$8, structType$2, ptrType$9, arrayType$2, sliceType$13, ptrType$10, funcType$2, ptrType$11, funcType$3, ptrType$12, ptrType$13, kindNames, callHelper, initialized, uint8Type, idJsType, idReflectType, idKindType, idRtype, uncommonTypeMap, nameMap, nameOffList, typeOffList, jsObjectPtr, selectHelper, implements$1, directlyAssignable, haveIdenticalType, haveIdenticalUnderlyingType, toType, ifaceIndir, unquote, Swapper, init, jsType, reflectType, setKindType, newName, newNameOff, newTypeOff, internalStr, isWrapped, copyStruct, makeValue, TypeOf, ValueOf, FuncOf, SliceOf, unsafe_New, typedmemmove, keyFor, mapaccess, mapiterinit, mapiterkey, mapiternext, maplen, methodReceiver, valueInterface, ifaceE2I, methodName, makeMethodValue, wrapJsObject, unwrapJsObject, getJsTag, PtrTo, copyVal;
+ js = $packages["github.com/gopherjs/gopherjs/js"];
+ goarch = $packages["internal/goarch"];
+ unsafeheader = $packages["internal/unsafeheader"];
+ runtime = $packages["runtime"];
+ Value = $pkg.Value = $newType(0, $kindStruct, "reflectlite.Value", true, "internal/reflectlite", true, function(typ_, ptr_, flag_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.typ = ptrType$1.nil;
+ this.ptr = 0;
+ this.flag = 0;
+ return;
+ }
+ this.typ = typ_;
+ this.ptr = ptr_;
+ this.flag = flag_;
+ });
+ flag = $pkg.flag = $newType(4, $kindUintptr, "reflectlite.flag", true, "internal/reflectlite", false, null);
+ ValueError = $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_;
+ });
+ Type = $pkg.Type = $newType(8, $kindInterface, "reflectlite.Type", true, "internal/reflectlite", true, null);
+ Kind = $pkg.Kind = $newType(4, $kindUint, "reflectlite.Kind", true, "internal/reflectlite", true, null);
+ tflag = $pkg.tflag = $newType(1, $kindUint8, "reflectlite.tflag", true, "internal/reflectlite", false, null);
+ rtype = $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 = ptrType$6.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_;
+ });
+ method = $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_;
+ });
+ chanDir = $pkg.chanDir = $newType(4, $kindInt, "reflectlite.chanDir", true, "internal/reflectlite", false, null);
+ arrayType = $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 rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0);
+ this.elem = ptrType$1.nil;
+ this.slice = ptrType$1.nil;
+ this.len = 0;
+ return;
+ }
+ this.rtype = rtype_;
+ this.elem = elem_;
+ this.slice = slice_;
+ this.len = len_;
+ });
+ chanType = $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 rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0);
+ this.elem = ptrType$1.nil;
+ this.dir = 0;
+ return;
+ }
+ this.rtype = rtype_;
+ this.elem = elem_;
+ this.dir = dir_;
+ });
+ imethod = $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_;
+ });
+ interfaceType = $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 rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0);
+ this.pkgPath = new name.ptr(ptrType$6.nil);
+ this.methods = sliceType$9.nil;
+ return;
+ }
+ this.rtype = rtype_;
+ this.pkgPath = pkgPath_;
+ this.methods = methods_;
+ });
+ mapType = $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 rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0);
+ this.key = ptrType$1.nil;
+ this.elem = ptrType$1.nil;
+ this.bucket = ptrType$1.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_;
+ });
+ ptrType = $pkg.ptrType = $newType(0, $kindStruct, "reflectlite.ptrType", true, "internal/reflectlite", false, function(rtype_, elem_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.rtype = new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0);
+ this.elem = ptrType$1.nil;
+ return;
+ }
+ this.rtype = rtype_;
+ this.elem = elem_;
+ });
+ sliceType = $pkg.sliceType = $newType(0, $kindStruct, "reflectlite.sliceType", true, "internal/reflectlite", false, function(rtype_, elem_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.rtype = new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0);
+ this.elem = ptrType$1.nil;
+ return;
+ }
+ this.rtype = rtype_;
+ this.elem = elem_;
+ });
+ structField = $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 name.ptr(ptrType$6.nil);
+ this.typ = ptrType$1.nil;
+ this.offsetEmbed = 0;
+ return;
+ }
+ this.name = name_;
+ this.typ = typ_;
+ this.offsetEmbed = offsetEmbed_;
+ });
+ structType = $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 rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0);
+ this.pkgPath = new name.ptr(ptrType$6.nil);
+ this.fields = sliceType$10.nil;
+ return;
+ }
+ this.rtype = rtype_;
+ this.pkgPath = pkgPath_;
+ this.fields = fields_;
+ });
+ nameOff = $pkg.nameOff = $newType(4, $kindInt32, "reflectlite.nameOff", true, "internal/reflectlite", false, null);
+ typeOff = $pkg.typeOff = $newType(4, $kindInt32, "reflectlite.typeOff", true, "internal/reflectlite", false, null);
+ textOff = $pkg.textOff = $newType(4, $kindInt32, "reflectlite.textOff", true, "internal/reflectlite", false, null);
+ errorString = $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_;
+ });
+ Method = $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 Value.ptr(ptrType$1.nil, 0, 0);
+ this.Index = 0;
+ return;
+ }
+ this.Name = Name_;
+ this.PkgPath = PkgPath_;
+ this.Type = Type_;
+ this.Func = Func_;
+ this.Index = Index_;
+ });
+ uncommonType = $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 = sliceType$5.nil;
+ return;
+ }
+ this.pkgPath = pkgPath_;
+ this.mcount = mcount_;
+ this.xcount = xcount_;
+ this.moff = moff_;
+ this._methods = _methods_;
+ });
+ funcType = $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 rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0);
+ this.inCount = 0;
+ this.outCount = 0;
+ this._in = sliceType$2.nil;
+ this._out = sliceType$2.nil;
+ return;
+ }
+ this.rtype = rtype_;
+ this.inCount = inCount_;
+ this.outCount = outCount_;
+ this._in = _in_;
+ this._out = _out_;
+ });
+ name = $pkg.name = $newType(0, $kindStruct, "reflectlite.name", true, "internal/reflectlite", false, function(bytes_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.bytes = ptrType$6.nil;
+ return;
+ }
+ this.bytes = bytes_;
+ });
+ nameData = $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_;
+ });
+ mapIter = $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_;
+ });
+ TypeEx = $pkg.TypeEx = $newType(8, $kindInterface, "reflectlite.TypeEx", true, "internal/reflectlite", true, null);
+ ptrType$1 = $ptrType(rtype);
+ sliceType$1 = $sliceType(name);
+ sliceType$2 = $sliceType(ptrType$1);
+ sliceType$3 = $sliceType($String);
+ sliceType$4 = $sliceType($emptyInterface);
+ ptrType$2 = $ptrType(js.Object);
+ funcType$1 = $funcType([sliceType$4], [ptrType$2], true);
+ ptrType$4 = $ptrType(uncommonType);
+ sliceType$5 = $sliceType(method);
+ ptrType$5 = $ptrType(funcType);
+ sliceType$6 = $sliceType(Value);
+ ptrType$6 = $ptrType($Uint8);
+ ptrType$7 = $ptrType($UnsafePointer);
+ sliceType$7 = $sliceType(Type);
+ sliceType$8 = $sliceType(ptrType$2);
+ sliceType$9 = $sliceType(imethod);
+ sliceType$10 = $sliceType(structField);
+ ptrType$8 = $ptrType(nameData);
+ structType$2 = $structType("internal/reflectlite", [{prop: "str", name: "str", embedded: false, exported: false, typ: $String, tag: ""}]);
+ ptrType$9 = $ptrType(mapIter);
+ arrayType$2 = $arrayType($Uintptr, 2);
+ sliceType$13 = $sliceType($Uint8);
+ ptrType$10 = $ptrType(ValueError);
+ funcType$2 = $funcType([$UnsafePointer, $UnsafePointer], [$Bool], false);
+ ptrType$11 = $ptrType(interfaceType);
+ funcType$3 = $funcType([$UnsafePointer, $Uintptr], [$Uintptr], false);
+ ptrType$12 = $ptrType(structField);
+ ptrType$13 = $ptrType(errorString);
+ flag.prototype.kind = function() {
+ var f;
+ f = this.$val;
+ return ((((f & 31) >>> 0) >>> 0));
+ };
+ $ptrType(flag).prototype.kind = function() { return new flag(this.$get()).kind(); };
+ flag.prototype.ro = function() {
+ var f;
+ f = this.$val;
+ if (!((((f & 96) >>> 0) === 0))) {
+ return 32;
+ }
+ return 0;
+ };
+ $ptrType(flag).prototype.ro = function() { return new flag(this.$get()).ro(); };
+ Value.ptr.prototype.pointer = function() {
+ var v;
+ v = this;
+ if (!((v.typ.size === 4)) || !v.typ.pointers()) {
+ $panic(new $String("can't call pointer on a non-pointer Value"));
+ }
+ if (!((((v.flag & 128) >>> 0) === 0))) {
+ return (v.ptr).$get();
+ }
+ return v.ptr;
+ };
+ Value.prototype.pointer = function() { return this.$val.pointer(); };
+ ValueError.ptr.prototype.Error = function() {
+ var e;
+ e = this;
+ if (e.Kind === 0) {
+ return "reflect: call of " + e.Method + " on zero Value";
+ }
+ return "reflect: call of " + e.Method + " on " + new Kind(e.Kind).String() + " Value";
+ };
+ ValueError.prototype.Error = function() { return this.$val.Error(); };
+ flag.prototype.mustBeExported = function() {
+ var f;
+ f = this.$val;
+ if (f === 0) {
+ $panic(new ValueError.ptr(methodName(), 0));
+ }
+ if (!((((f & 96) >>> 0) === 0))) {
+ $panic(new $String("reflect: " + methodName() + " using value obtained using unexported field"));
+ }
+ };
+ $ptrType(flag).prototype.mustBeExported = function() { return new flag(this.$get()).mustBeExported(); };
+ flag.prototype.mustBeAssignable = function() {
+ var f;
+ f = this.$val;
+ if (f === 0) {
+ $panic(new ValueError.ptr(methodName(), 0));
+ }
+ if (!((((f & 96) >>> 0) === 0))) {
+ $panic(new $String("reflect: " + methodName() + " using value obtained using unexported field"));
+ }
+ if (((f & 256) >>> 0) === 0) {
+ $panic(new $String("reflect: " + methodName() + " using unaddressable value"));
+ }
+ };
+ $ptrType(flag).prototype.mustBeAssignable = function() { return new flag(this.$get()).mustBeAssignable(); };
+ Value.ptr.prototype.CanSet = function() {
+ var v;
+ v = this;
+ return ((v.flag & 352) >>> 0) === 256;
+ };
+ Value.prototype.CanSet = function() { return this.$val.CanSet(); };
+ Value.ptr.prototype.IsValid = function() {
+ var v;
+ v = this;
+ return !((v.flag === 0));
+ };
+ Value.prototype.IsValid = function() { return this.$val.IsValid(); };
+ Value.ptr.prototype.Kind = function() {
+ var v;
+ v = this;
+ return new flag(v.flag).kind();
+ };
+ Value.prototype.Kind = function() { return this.$val.Kind(); };
+ Value.ptr.prototype.Type = function() {
+ var f, v;
+ v = this;
+ f = v.flag;
+ if (f === 0) {
+ $panic(new ValueError.ptr("reflectlite.Value.Type", 0));
+ }
+ return v.typ;
+ };
+ Value.prototype.Type = function() { return this.$val.Type(); };
+ structField.ptr.prototype.embedded = function() {
+ var f;
+ f = this;
+ return !((((f.offsetEmbed & 1) >>> 0) === 0));
+ };
+ structField.prototype.embedded = function() { return this.$val.embedded(); };
+ Kind.prototype.String = function() {
+ var k;
+ k = this.$val;
+ if (((k >> 0)) < kindNames.$length) {
+ return ((k < 0 || k >= kindNames.$length) ? ($throwRuntimeError("index out of range"), undefined) : kindNames.$array[kindNames.$offset + k]);
+ }
+ return (0 >= kindNames.$length ? ($throwRuntimeError("index out of range"), undefined) : kindNames.$array[kindNames.$offset + 0]);
+ };
+ $ptrType(Kind).prototype.String = function() { return new Kind(this.$get()).String(); };
+ rtype.ptr.prototype.String = function() {
+ var s, t;
+ t = this;
+ s = $clone(t.nameOff(t.str), name).name();
+ if (!((((t.tflag & 2) >>> 0) === 0))) {
+ return $substring(s, 1);
+ }
+ return s;
+ };
+ rtype.prototype.String = function() { return this.$val.String(); };
+ rtype.ptr.prototype.Size = function() {
+ var t;
+ t = this;
+ return t.size;
+ };
+ rtype.prototype.Size = function() { return this.$val.Size(); };
+ rtype.ptr.prototype.Kind = function() {
+ var t;
+ t = this;
+ return ((((t.kind & 31) >>> 0) >>> 0));
+ };
+ rtype.prototype.Kind = function() { return this.$val.Kind(); };
+ rtype.ptr.prototype.pointers = function() {
+ var t;
+ t = this;
+ return !((t.ptrdata === 0));
+ };
+ rtype.prototype.pointers = function() { return this.$val.pointers(); };
+ rtype.ptr.prototype.common = function() {
+ var t;
+ t = this;
+ return t;
+ };
+ rtype.prototype.common = function() { return this.$val.common(); };
+ rtype.ptr.prototype.exportedMethods = function() {
+ var t, ut;
+ t = this;
+ ut = t.uncommon();
+ if (ut === ptrType$4.nil) {
+ return sliceType$5.nil;
+ }
+ return ut.exportedMethods();
+ };
+ rtype.prototype.exportedMethods = function() { return this.$val.exportedMethods(); };
+ rtype.ptr.prototype.NumMethod = function() {
+ var t, tt;
+ t = this;
+ if (t.Kind() === 20) {
+ tt = (t.kindType);
+ return tt.NumMethod();
+ }
+ return t.exportedMethods().$length;
+ };
+ rtype.prototype.NumMethod = function() { return this.$val.NumMethod(); };
+ rtype.ptr.prototype.PkgPath = function() {
+ var t, ut;
+ t = this;
+ if (((t.tflag & 4) >>> 0) === 0) {
+ return "";
+ }
+ ut = t.uncommon();
+ if (ut === ptrType$4.nil) {
+ return "";
+ }
+ return $clone(t.nameOff(ut.pkgPath), name).name();
+ };
+ rtype.prototype.PkgPath = function() { return this.$val.PkgPath(); };
+ rtype.ptr.prototype.hasName = function() {
+ var t;
+ t = this;
+ return !((((t.tflag & 4) >>> 0) === 0));
+ };
+ rtype.prototype.hasName = function() { return this.$val.hasName(); };
+ rtype.ptr.prototype.Name = function() {
+ var i, s, t;
+ t = this;
+ if (!t.hasName()) {
+ return "";
+ }
+ s = t.String();
+ i = s.length - 1 >> 0;
+ while (true) {
+ if (!(i >= 0 && !((s.charCodeAt(i) === 46)))) { break; }
+ i = i - (1) >> 0;
+ }
+ return $substring(s, (i + 1 >> 0));
+ };
+ rtype.prototype.Name = function() { return this.$val.Name(); };
+ rtype.ptr.prototype.chanDir = function() {
+ var t, tt;
+ t = this;
+ if (!((t.Kind() === 18))) {
+ $panic(new $String("reflect: chanDir of non-chan type"));
+ }
+ tt = (t.kindType);
+ return ((tt.dir >> 0));
+ };
+ rtype.prototype.chanDir = function() { return this.$val.chanDir(); };
+ rtype.ptr.prototype.Elem = function() {
+ var _1, t, tt, tt$1, tt$2, tt$3, tt$4;
+ t = this;
+ _1 = t.Kind();
+ if (_1 === (17)) {
+ tt = (t.kindType);
+ return toType(tt.elem);
+ } else if (_1 === (18)) {
+ tt$1 = (t.kindType);
+ return toType(tt$1.elem);
+ } else if (_1 === (21)) {
+ tt$2 = (t.kindType);
+ return toType(tt$2.elem);
+ } else if (_1 === (22)) {
+ tt$3 = (t.kindType);
+ return toType(tt$3.elem);
+ } else if (_1 === (23)) {
+ tt$4 = (t.kindType);
+ return toType(tt$4.elem);
+ }
+ $panic(new $String("reflect: Elem of invalid type"));
+ };
+ rtype.prototype.Elem = function() { return this.$val.Elem(); };
+ rtype.ptr.prototype.In = function(i) {
+ var i, t, tt, x;
+ t = this;
+ if (!((t.Kind() === 19))) {
+ $panic(new $String("reflect: In of non-func type"));
+ }
+ tt = (t.kindType);
+ return toType((x = tt.in$(), ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])));
+ };
+ rtype.prototype.In = function(i) { return this.$val.In(i); };
+ rtype.ptr.prototype.Len = function() {
+ var t, tt;
+ t = this;
+ if (!((t.Kind() === 17))) {
+ $panic(new $String("reflect: Len of non-array type"));
+ }
+ tt = (t.kindType);
+ return ((tt.len >> 0));
+ };
+ rtype.prototype.Len = function() { return this.$val.Len(); };
+ rtype.ptr.prototype.NumIn = function() {
+ var t, tt;
+ t = this;
+ if (!((t.Kind() === 19))) {
+ $panic(new $String("reflect: NumIn of non-func type"));
+ }
+ tt = (t.kindType);
+ return ((tt.inCount >> 0));
+ };
+ rtype.prototype.NumIn = function() { return this.$val.NumIn(); };
+ rtype.ptr.prototype.NumOut = function() {
+ var t, tt;
+ t = this;
+ if (!((t.Kind() === 19))) {
+ $panic(new $String("reflect: NumOut of non-func type"));
+ }
+ tt = (t.kindType);
+ return tt.out().$length;
+ };
+ rtype.prototype.NumOut = function() { return this.$val.NumOut(); };
+ rtype.ptr.prototype.Out = function(i) {
+ var i, t, tt, x;
+ t = this;
+ if (!((t.Kind() === 19))) {
+ $panic(new $String("reflect: Out of non-func type"));
+ }
+ tt = (t.kindType);
+ return toType((x = tt.out(), ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])));
+ };
+ rtype.prototype.Out = function(i) { return this.$val.Out(i); };
+ interfaceType.ptr.prototype.NumMethod = function() {
+ var t;
+ t = this;
+ return t.methods.$length;
+ };
+ interfaceType.prototype.NumMethod = function() { return this.$val.NumMethod(); };
+ rtype.ptr.prototype.Implements = function(u) {
+ var {_r, t, u, $s, $r, $c} = $restore(this, {u});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ t = this;
+ if ($interfaceIsEqual(u, $ifaceNil)) {
+ $panic(new $String("reflect: nil type passed to Type.Implements"));
+ }
+ _r = u.Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ /* */ if (!((_r === 20))) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (!((_r === 20))) { */ case 1:
+ $panic(new $String("reflect: non-interface type passed to Type.Implements"));
+ /* } */ case 2:
+ $s = -1; return implements$1($assertType(u, ptrType$1), t);
+ /* */ } return; } var $f = {$blk: rtype.ptr.prototype.Implements, $c: true, $r, _r, t, u, $s};return $f;
+ };
+ rtype.prototype.Implements = function(u) { return this.$val.Implements(u); };
+ rtype.ptr.prototype.AssignableTo = function(u) {
+ var {$24r, _r, t, u, uu, $s, $r, $c} = $restore(this, {u});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ t = this;
+ if ($interfaceIsEqual(u, $ifaceNil)) {
+ $panic(new $String("reflect: nil type passed to Type.AssignableTo"));
+ }
+ uu = $assertType(u, ptrType$1);
+ _r = directlyAssignable(uu, t); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r || implements$1(uu, t);
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: rtype.ptr.prototype.AssignableTo, $c: true, $r, $24r, _r, t, u, uu, $s};return $f;
+ };
+ rtype.prototype.AssignableTo = function(u) { return this.$val.AssignableTo(u); };
+ implements$1 = function(T, V) {
+ var T, V, i, i$1, j, j$1, t, tm, tm$1, tmName, tmName$1, tmPkgPath, tmPkgPath$1, v, v$1, vm, vm$1, vmName, vmName$1, vmPkgPath, vmPkgPath$1, vmethods, x, x$1, x$2;
+ if (!((T.Kind() === 20))) {
+ return false;
+ }
+ t = (T.kindType);
+ if (t.methods.$length === 0) {
+ return true;
+ }
+ if (V.Kind() === 20) {
+ v = (V.kindType);
+ i = 0;
+ j = 0;
+ while (true) {
+ if (!(j < v.methods.$length)) { break; }
+ tm = (x = t.methods, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]));
+ tmName = $clone(t.rtype.nameOff(tm.name), name);
+ vm = (x$1 = v.methods, ((j < 0 || j >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + j]));
+ vmName = $clone(V.nameOff(vm.name), name);
+ if ($clone(vmName, name).name() === $clone(tmName, name).name() && V.typeOff(vm.typ) === t.rtype.typeOff(tm.typ)) {
+ if (!$clone(tmName, name).isExported()) {
+ tmPkgPath = $clone(tmName, name).pkgPath();
+ if (tmPkgPath === "") {
+ tmPkgPath = $clone(t.pkgPath, name).name();
+ }
+ vmPkgPath = $clone(vmName, name).pkgPath();
+ if (vmPkgPath === "") {
+ vmPkgPath = $clone(v.pkgPath, name).name();
+ }
+ if (!(tmPkgPath === vmPkgPath)) {
+ j = j + (1) >> 0;
+ continue;
+ }
+ }
+ i = i + (1) >> 0;
+ if (i >= t.methods.$length) {
+ return true;
+ }
+ }
+ j = j + (1) >> 0;
+ }
+ return false;
+ }
+ v$1 = V.uncommon();
+ if (v$1 === ptrType$4.nil) {
+ return false;
+ }
+ i$1 = 0;
+ vmethods = v$1.methods();
+ j$1 = 0;
+ while (true) {
+ if (!(j$1 < ((v$1.mcount >> 0)))) { break; }
+ tm$1 = (x$2 = t.methods, ((i$1 < 0 || i$1 >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i$1]));
+ tmName$1 = $clone(t.rtype.nameOff(tm$1.name), name);
+ vm$1 = $clone(((j$1 < 0 || j$1 >= vmethods.$length) ? ($throwRuntimeError("index out of range"), undefined) : vmethods.$array[vmethods.$offset + j$1]), method);
+ vmName$1 = $clone(V.nameOff(vm$1.name), name);
+ if ($clone(vmName$1, name).name() === $clone(tmName$1, name).name() && V.typeOff(vm$1.mtyp) === t.rtype.typeOff(tm$1.typ)) {
+ if (!$clone(tmName$1, name).isExported()) {
+ tmPkgPath$1 = $clone(tmName$1, name).pkgPath();
+ if (tmPkgPath$1 === "") {
+ tmPkgPath$1 = $clone(t.pkgPath, name).name();
+ }
+ vmPkgPath$1 = $clone(vmName$1, name).pkgPath();
+ if (vmPkgPath$1 === "") {
+ vmPkgPath$1 = $clone(V.nameOff(v$1.pkgPath), name).name();
+ }
+ if (!(tmPkgPath$1 === vmPkgPath$1)) {
+ j$1 = j$1 + (1) >> 0;
+ continue;
+ }
+ }
+ i$1 = i$1 + (1) >> 0;
+ if (i$1 >= t.methods.$length) {
+ return true;
+ }
+ }
+ j$1 = j$1 + (1) >> 0;
+ }
+ return false;
+ };
+ directlyAssignable = function(T, V) {
+ var {$24r, T, V, _r, $s, $r, $c} = $restore(this, {T, V});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ if (T === V) {
+ $s = -1; return true;
+ }
+ if (T.hasName() && V.hasName() || !((T.Kind() === V.Kind()))) {
+ $s = -1; return false;
+ }
+ _r = haveIdenticalUnderlyingType(T, V, true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: directlyAssignable, $c: true, $r, $24r, T, V, _r, $s};return $f;
+ };
+ haveIdenticalType = function(T, V, cmpTags) {
+ var {$24r, T, V, _arg, _arg$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _v, cmpTags, $s, $r, $c} = $restore(this, {T, V, cmpTags});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ if (cmpTags) {
+ $s = -1; return $interfaceIsEqual(T, V);
+ }
+ _r = T.Name(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _r$1 = V.Name(); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ if (!(_r === _r$1)) { _v = true; $s = 3; continue s; }
+ _r$2 = T.Kind(); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ _r$3 = V.Kind(); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
+ _v = !((_r$2 === _r$3)); case 3:
+ /* */ if (_v) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (_v) { */ case 1:
+ $s = -1; return false;
+ /* } */ case 2:
+ _r$4 = T.common(); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
+ _arg = _r$4;
+ _r$5 = V.common(); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
+ _arg$1 = _r$5;
+ _r$6 = haveIdenticalUnderlyingType(_arg, _arg$1, false); /* */ $s = 10; case 10: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; }
+ $24r = _r$6;
+ $s = 11; case 11: return $24r;
+ /* */ } return; } var $f = {$blk: haveIdenticalType, $c: true, $r, $24r, T, V, _arg, _arg$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _v, cmpTags, $s};return $f;
+ };
+ haveIdenticalUnderlyingType = function(T, V, cmpTags) {
+ var {$24r, $24r$1, $24r$2, $24r$3, T, V, _1, _i, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _ref, _v, _v$1, _v$2, _v$3, cmpTags, i, i$1, i$2, kind, t, t$1, t$2, tf, v, v$1, v$2, vf, x, x$1, $s, $r, $c} = $restore(this, {T, V, cmpTags});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ if (T === V) {
+ $s = -1; return true;
+ }
+ kind = T.Kind();
+ if (!((kind === V.Kind()))) {
+ $s = -1; return false;
+ }
+ if (1 <= kind && kind <= 16 || (kind === 24) || (kind === 26)) {
+ $s = -1; return true;
+ }
+ _1 = kind;
+ /* */ if (_1 === (17)) { $s = 2; continue; }
+ /* */ if (_1 === (18)) { $s = 3; continue; }
+ /* */ if (_1 === (19)) { $s = 4; continue; }
+ /* */ if (_1 === (20)) { $s = 5; continue; }
+ /* */ if (_1 === (21)) { $s = 6; continue; }
+ /* */ if ((_1 === (22)) || (_1 === (23))) { $s = 7; continue; }
+ /* */ if (_1 === (25)) { $s = 8; continue; }
+ /* */ $s = 9; continue;
+ /* if (_1 === (17)) { */ case 2:
+ if (!(T.Len() === V.Len())) { _v = false; $s = 10; continue s; }
+ _r = haveIdenticalType(T.Elem(), V.Elem(), cmpTags); /* */ $s = 11; case 11: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _v = _r; case 10:
+ $24r = _v;
+ $s = 12; case 12: return $24r;
+ /* } else if (_1 === (18)) { */ case 3:
+ if (!(V.chanDir() === 3)) { _v$1 = false; $s = 15; continue s; }
+ _r$1 = haveIdenticalType(T.Elem(), V.Elem(), cmpTags); /* */ $s = 16; case 16: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _v$1 = _r$1; case 15:
+ /* */ if (_v$1) { $s = 13; continue; }
+ /* */ $s = 14; continue;
+ /* if (_v$1) { */ case 13:
+ $s = -1; return true;
+ /* } */ case 14:
+ if (!(V.chanDir() === T.chanDir())) { _v$2 = false; $s = 17; continue s; }
+ _r$2 = haveIdenticalType(T.Elem(), V.Elem(), cmpTags); /* */ $s = 18; case 18: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ _v$2 = _r$2; case 17:
+ $24r$1 = _v$2;
+ $s = 19; case 19: return $24r$1;
+ /* } else if (_1 === (19)) { */ case 4:
+ t = (T.kindType);
+ v = (V.kindType);
+ if (!((t.outCount === v.outCount)) || !((t.inCount === v.inCount))) {
+ $s = -1; return false;
+ }
+ i = 0;
+ /* while (true) { */ case 20:
+ /* if (!(i < t.rtype.NumIn())) { break; } */ if(!(i < t.rtype.NumIn())) { $s = 21; continue; }
+ _r$3 = haveIdenticalType(t.rtype.In(i), v.rtype.In(i), cmpTags); /* */ $s = 24; case 24: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
+ /* */ if (!_r$3) { $s = 22; continue; }
+ /* */ $s = 23; continue;
+ /* if (!_r$3) { */ case 22:
+ $s = -1; return false;
+ /* } */ case 23:
+ i = i + (1) >> 0;
+ $s = 20; continue;
+ case 21:
+ i$1 = 0;
+ /* while (true) { */ case 25:
+ /* if (!(i$1 < t.rtype.NumOut())) { break; } */ if(!(i$1 < t.rtype.NumOut())) { $s = 26; continue; }
+ _r$4 = haveIdenticalType(t.rtype.Out(i$1), v.rtype.Out(i$1), cmpTags); /* */ $s = 29; case 29: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
+ /* */ if (!_r$4) { $s = 27; continue; }
+ /* */ $s = 28; continue;
+ /* if (!_r$4) { */ case 27:
+ $s = -1; return false;
+ /* } */ case 28:
+ i$1 = i$1 + (1) >> 0;
+ $s = 25; continue;
+ case 26:
+ $s = -1; return true;
+ /* } else if (_1 === (20)) { */ case 5:
+ t$1 = (T.kindType);
+ v$1 = (V.kindType);
+ if ((t$1.methods.$length === 0) && (v$1.methods.$length === 0)) {
+ $s = -1; return true;
+ }
+ $s = -1; return false;
+ /* } else if (_1 === (21)) { */ case 6:
+ _r$5 = haveIdenticalType(T.Key(), V.Key(), cmpTags); /* */ $s = 31; case 31: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
+ if (!(_r$5)) { _v$3 = false; $s = 30; continue s; }
+ _r$6 = haveIdenticalType(T.Elem(), V.Elem(), cmpTags); /* */ $s = 32; case 32: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; }
+ _v$3 = _r$6; case 30:
+ $24r$2 = _v$3;
+ $s = 33; case 33: return $24r$2;
+ /* } else if ((_1 === (22)) || (_1 === (23))) { */ case 7:
+ _r$7 = haveIdenticalType(T.Elem(), V.Elem(), cmpTags); /* */ $s = 34; case 34: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; }
+ $24r$3 = _r$7;
+ $s = 35; case 35: return $24r$3;
+ /* } else if (_1 === (25)) { */ case 8:
+ t$2 = (T.kindType);
+ v$2 = (V.kindType);
+ if (!((t$2.fields.$length === v$2.fields.$length))) {
+ $s = -1; return false;
+ }
+ if (!($clone(t$2.pkgPath, name).name() === $clone(v$2.pkgPath, name).name())) {
+ $s = -1; return false;
+ }
+ _ref = t$2.fields;
+ _i = 0;
+ /* while (true) { */ case 36:
+ /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 37; continue; }
+ i$2 = _i;
+ tf = (x = t$2.fields, ((i$2 < 0 || i$2 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i$2]));
+ vf = (x$1 = v$2.fields, ((i$2 < 0 || i$2 >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i$2]));
+ if (!($clone(tf.name, name).name() === $clone(vf.name, name).name())) {
+ $s = -1; return false;
+ }
+ _r$8 = haveIdenticalType(tf.typ, vf.typ, cmpTags); /* */ $s = 40; case 40: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; }
+ /* */ if (!_r$8) { $s = 38; continue; }
+ /* */ $s = 39; continue;
+ /* if (!_r$8) { */ case 38:
+ $s = -1; return false;
+ /* } */ case 39:
+ if (cmpTags && !($clone(tf.name, name).tag() === $clone(vf.name, name).tag())) {
+ $s = -1; return false;
+ }
+ if (!((tf.offsetEmbed === vf.offsetEmbed))) {
+ $s = -1; return false;
+ }
+ _i++;
+ $s = 36; continue;
+ case 37:
+ $s = -1; return true;
+ /* } */ case 9:
+ case 1:
+ $s = -1; return false;
+ /* */ } return; } var $f = {$blk: haveIdenticalUnderlyingType, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, T, V, _1, _i, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _ref, _v, _v$1, _v$2, _v$3, cmpTags, i, i$1, i$2, kind, t, t$1, t$2, tf, v, v$1, v$2, vf, x, x$1, $s};return $f;
+ };
+ toType = function(t) {
+ var t;
+ if (t === ptrType$1.nil) {
+ return $ifaceNil;
+ }
+ return t;
+ };
+ ifaceIndir = function(t) {
+ var t;
+ return ((t.kind & 32) >>> 0) === 0;
+ };
+ Value.ptr.prototype.object = function() {
+ var _1, newVal, v, val;
+ v = this;
+ if ((v.typ.Kind() === 17) || (v.typ.Kind() === 25)) {
+ return v.ptr;
+ }
+ if (!((((v.flag & 128) >>> 0) === 0))) {
+ val = v.ptr.$get();
+ if (!(val === $ifaceNil) && !(val.constructor === jsType(v.typ))) {
+ switch (0) { default:
+ _1 = v.typ.Kind();
+ if ((_1 === (11)) || (_1 === (6))) {
+ val = new (jsType(v.typ))(val.$high, val.$low);
+ } else if ((_1 === (15)) || (_1 === (16))) {
+ val = new (jsType(v.typ))(val.$real, val.$imag);
+ } else if (_1 === (23)) {
+ if (val === val.constructor.nil) {
+ val = jsType(v.typ).nil;
+ break;
+ }
+ newVal = new (jsType(v.typ))(val.$array);
+ newVal.$offset = val.$offset;
+ newVal.$length = val.$length;
+ newVal.$capacity = val.$capacity;
+ val = newVal;
+ }
+ }
+ }
+ return val;
+ }
+ return v.ptr;
+ };
+ Value.prototype.object = function() { return this.$val.object(); };
+ Value.ptr.prototype.assignTo = function(context, dst, target) {
+ var {_r, _r$1, _r$2, context, dst, fl, target, v, x, $s, $r, $c} = $restore(this, {context, dst, target});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ /* */ if (!((((v.flag & 512) >>> 0) === 0))) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (!((((v.flag & 512) >>> 0) === 0))) { */ case 1:
+ _r = makeMethodValue(context, $clone(v, Value)); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ Value.copy(v, _r);
+ /* } */ case 2:
+ _r$1 = directlyAssignable(dst, v.typ); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ /* */ if (_r$1) { $s = 5; continue; }
+ /* */ if (implements$1(dst, v.typ)) { $s = 6; continue; }
+ /* */ $s = 7; continue;
+ /* if (_r$1) { */ case 5:
+ fl = (((v.flag & 384) >>> 0) | new flag(v.flag).ro()) >>> 0;
+ fl = (fl | (((dst.Kind() >>> 0)))) >>> 0;
+ $s = -1; return new Value.ptr(dst, v.ptr, fl);
+ /* } else if (implements$1(dst, v.typ)) { */ case 6:
+ if (target === 0) {
+ target = unsafe_New(dst);
+ }
+ _r$2 = valueInterface($clone(v, Value)); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ x = _r$2;
+ if (dst.NumMethod() === 0) {
+ (target).$set(x);
+ } else {
+ ifaceE2I(dst, x, target);
+ }
+ $s = -1; return new Value.ptr(dst, target, 148);
+ /* } */ case 7:
+ case 4:
+ $panic(new $String(context + ": value of type " + v.typ.String() + " is not assignable to type " + dst.String()));
+ $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0);
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.assignTo, $c: true, $r, _r, _r$1, _r$2, context, dst, fl, target, v, x, $s};return $f;
+ };
+ Value.prototype.assignTo = function(context, dst, target) { return this.$val.assignTo(context, dst, target); };
+ Value.ptr.prototype.Cap = function() {
+ var _1, k, v;
+ v = this;
+ k = new flag(v.flag).kind();
+ _1 = k;
+ if (_1 === (17)) {
+ return v.typ.Len();
+ } else if ((_1 === (18)) || (_1 === (23))) {
+ return $parseInt($clone(v, Value).object().$capacity) >> 0;
+ }
+ $panic(new ValueError.ptr("reflect.Value.Cap", k));
+ };
+ Value.prototype.Cap = function() { return this.$val.Cap(); };
+ Value.ptr.prototype.Index = function(i) {
+ var {$24r, $24r$1, _1, _r, _r$1, a, a$1, c, fl, fl$1, fl$2, i, k, s, str, tt, tt$1, typ, typ$1, v, $s, $r, $c} = $restore(this, {i});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ a = [a];
+ a$1 = [a$1];
+ c = [c];
+ i = [i];
+ typ = [typ];
+ typ$1 = [typ$1];
+ v = this;
+ k = new flag(v.flag).kind();
+ _1 = k;
+ /* */ if (_1 === (17)) { $s = 2; continue; }
+ /* */ if (_1 === (23)) { $s = 3; continue; }
+ /* */ if (_1 === (24)) { $s = 4; continue; }
+ /* */ $s = 5; continue;
+ /* if (_1 === (17)) { */ case 2:
+ tt = (v.typ.kindType);
+ if (i[0] < 0 || i[0] > ((tt.len >> 0))) {
+ $panic(new $String("reflect: array index out of range"));
+ }
+ typ[0] = tt.elem;
+ fl = (((((v.flag & 384) >>> 0) | new flag(v.flag).ro()) >>> 0) | ((typ[0].Kind() >>> 0))) >>> 0;
+ a[0] = v.ptr;
+ /* */ if (!((((fl & 128) >>> 0) === 0)) && !((typ[0].Kind() === 17)) && !((typ[0].Kind() === 25))) { $s = 7; continue; }
+ /* */ $s = 8; continue;
+ /* if (!((((fl & 128) >>> 0) === 0)) && !((typ[0].Kind() === 17)) && !((typ[0].Kind() === 25))) { */ case 7:
+ $s = -1; return new Value.ptr(typ[0], (new (jsType(PtrTo(typ[0])))((function(a, a$1, c, i, typ, typ$1) { return function() {
+ return wrapJsObject(typ[0], a[0][i[0]]);
+ }; })(a, a$1, c, i, typ, typ$1), (function(a, a$1, c, i, typ, typ$1) { return function(x) {
+ var x;
+ a[0][i[0]] = unwrapJsObject(typ[0], x);
+ }; })(a, a$1, c, i, typ, typ$1))), fl);
+ /* } */ case 8:
+ _r = makeValue(typ[0], wrapJsObject(typ[0], a[0][i[0]]), fl); /* */ $s = 9; case 9: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 10; case 10: return $24r;
+ /* } else if (_1 === (23)) { */ case 3:
+ s = $clone(v, Value).object();
+ if (i[0] < 0 || i[0] >= ($parseInt(s.$length) >> 0)) {
+ $panic(new $String("reflect: slice index out of range"));
+ }
+ tt$1 = (v.typ.kindType);
+ typ$1[0] = tt$1.elem;
+ fl$1 = (((384 | new flag(v.flag).ro()) >>> 0) | ((typ$1[0].Kind() >>> 0))) >>> 0;
+ i[0] = i[0] + (($parseInt(s.$offset) >> 0)) >> 0;
+ a$1[0] = s.$array;
+ /* */ if (!((((fl$1 & 128) >>> 0) === 0)) && !((typ$1[0].Kind() === 17)) && !((typ$1[0].Kind() === 25))) { $s = 11; continue; }
+ /* */ $s = 12; continue;
+ /* if (!((((fl$1 & 128) >>> 0) === 0)) && !((typ$1[0].Kind() === 17)) && !((typ$1[0].Kind() === 25))) { */ case 11:
+ $s = -1; return new Value.ptr(typ$1[0], (new (jsType(PtrTo(typ$1[0])))((function(a, a$1, c, i, typ, typ$1) { return function() {
+ return wrapJsObject(typ$1[0], a$1[0][i[0]]);
+ }; })(a, a$1, c, i, typ, typ$1), (function(a, a$1, c, i, typ, typ$1) { return function(x) {
+ var x;
+ a$1[0][i[0]] = unwrapJsObject(typ$1[0], x);
+ }; })(a, a$1, c, i, typ, typ$1))), fl$1);
+ /* } */ case 12:
+ _r$1 = makeValue(typ$1[0], wrapJsObject(typ$1[0], a$1[0][i[0]]), fl$1); /* */ $s = 13; case 13: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ $24r$1 = _r$1;
+ $s = 14; case 14: return $24r$1;
+ /* } else if (_1 === (24)) { */ case 4:
+ str = (v.ptr).$get();
+ if (i[0] < 0 || i[0] >= str.length) {
+ $panic(new $String("reflect: string index out of range"));
+ }
+ fl$2 = (((new flag(v.flag).ro() | 8) >>> 0) | 128) >>> 0;
+ c[0] = str.charCodeAt(i[0]);
+ $s = -1; return new Value.ptr(uint8Type, ((c.$ptr || (c.$ptr = new ptrType$6(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, c)))), fl$2);
+ /* } else { */ case 5:
+ $panic(new ValueError.ptr("reflect.Value.Index", k));
+ /* } */ case 6:
+ case 1:
+ $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0);
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.Index, $c: true, $r, $24r, $24r$1, _1, _r, _r$1, a, a$1, c, fl, fl$1, fl$2, i, k, s, str, tt, tt$1, typ, typ$1, v, $s};return $f;
+ };
+ Value.prototype.Index = function(i) { return this.$val.Index(i); };
+ Value.ptr.prototype.InterfaceData = function() {
+ var v;
+ v = this;
+ $panic(new $String("InterfaceData is not supported by GopherJS"));
+ };
+ Value.prototype.InterfaceData = function() { return this.$val.InterfaceData(); };
+ Value.ptr.prototype.IsNil = function() {
+ var _1, k, v;
+ v = this;
+ k = new flag(v.flag).kind();
+ _1 = k;
+ if ((_1 === (22)) || (_1 === (23))) {
+ return $clone(v, Value).object() === jsType(v.typ).nil;
+ } else if (_1 === (18)) {
+ return $clone(v, Value).object() === $chanNil;
+ } else if (_1 === (19)) {
+ return $clone(v, Value).object() === $throwNilPointerError;
+ } else if (_1 === (21)) {
+ return $clone(v, Value).object() === false;
+ } else if (_1 === (20)) {
+ return $clone(v, Value).object() === $ifaceNil;
+ } else if (_1 === (26)) {
+ return $clone(v, Value).object() === 0;
+ } else {
+ $panic(new ValueError.ptr("reflect.Value.IsNil", k));
+ }
+ };
+ Value.prototype.IsNil = function() { return this.$val.IsNil(); };
+ Value.ptr.prototype.Len = function() {
+ var _1, k, v;
+ v = this;
+ k = new flag(v.flag).kind();
+ _1 = k;
+ if ((_1 === (17)) || (_1 === (24))) {
+ return $parseInt($clone(v, Value).object().length);
+ } else if (_1 === (23)) {
+ return $parseInt($clone(v, Value).object().$length) >> 0;
+ } else if (_1 === (18)) {
+ return $parseInt($clone(v, Value).object().$buffer.length) >> 0;
+ } else if (_1 === (21)) {
+ return $parseInt($keys($clone(v, Value).object()).length);
+ } else {
+ $panic(new ValueError.ptr("reflect.Value.Len", k));
+ }
+ };
+ Value.prototype.Len = function() { return this.$val.Len(); };
+ Value.ptr.prototype.Pointer = function() {
+ var _1, k, v;
+ v = this;
+ k = new flag(v.flag).kind();
+ _1 = k;
+ if ((_1 === (18)) || (_1 === (21)) || (_1 === (22)) || (_1 === (26))) {
+ if ($clone(v, Value).IsNil()) {
+ return 0;
+ }
+ return $clone(v, Value).object();
+ } else if (_1 === (19)) {
+ if ($clone(v, Value).IsNil()) {
+ return 0;
+ }
+ return 1;
+ } else if (_1 === (23)) {
+ if ($clone(v, Value).IsNil()) {
+ return 0;
+ }
+ return $clone(v, Value).object().$array;
+ } else {
+ $panic(new ValueError.ptr("reflect.Value.Pointer", k));
+ }
+ };
+ Value.prototype.Pointer = function() { return this.$val.Pointer(); };
+ Value.ptr.prototype.Set = function(x) {
+ var {_1, _r, _r$1, v, x, $s, $r, $c} = $restore(this, {x});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ new flag(v.flag).mustBeAssignable();
+ new flag(x.flag).mustBeExported();
+ _r = $clone(x, Value).assignTo("reflect.Set", v.typ, 0); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ Value.copy(x, _r);
+ /* */ if (!((((v.flag & 128) >>> 0) === 0))) { $s = 2; continue; }
+ /* */ $s = 3; continue;
+ /* if (!((((v.flag & 128) >>> 0) === 0))) { */ case 2:
+ _1 = v.typ.Kind();
+ /* */ if (_1 === (17)) { $s = 5; continue; }
+ /* */ if (_1 === (20)) { $s = 6; continue; }
+ /* */ if (_1 === (25)) { $s = 7; continue; }
+ /* */ $s = 8; continue;
+ /* if (_1 === (17)) { */ case 5:
+ jsType(v.typ).copy(v.ptr, x.ptr);
+ $s = 9; continue;
+ /* } else if (_1 === (20)) { */ case 6:
+ _r$1 = valueInterface($clone(x, Value)); /* */ $s = 10; case 10: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ v.ptr.$set(_r$1);
+ $s = 9; continue;
+ /* } else if (_1 === (25)) { */ case 7:
+ copyStruct(v.ptr, x.ptr, v.typ);
+ $s = 9; continue;
+ /* } else { */ case 8:
+ v.ptr.$set($clone(x, Value).object());
+ /* } */ case 9:
+ case 4:
+ $s = -1; return;
+ /* } */ case 3:
+ v.ptr = x.ptr;
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.Set, $c: true, $r, _1, _r, _r$1, v, x, $s};return $f;
+ };
+ Value.prototype.Set = function(x) { return this.$val.Set(x); };
+ Value.ptr.prototype.SetBytes = function(x) {
+ var {_r, _r$1, _v, slice, typedSlice, v, x, $s, $r, $c} = $restore(this, {x});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ new flag(v.flag).mustBeAssignable();
+ new flag(v.flag).mustBe(23);
+ _r = v.typ.Elem().Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ /* */ if (!((_r === 8))) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (!((_r === 8))) { */ case 1:
+ $panic(new $String("reflect.Value.SetBytes of non-byte slice"));
+ /* } */ case 2:
+ slice = x;
+ if (!(v.typ.Name() === "")) { _v = true; $s = 6; continue s; }
+ _r$1 = v.typ.Elem().Name(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _v = !(_r$1 === ""); case 6:
+ /* */ if (_v) { $s = 4; continue; }
+ /* */ $s = 5; continue;
+ /* if (_v) { */ case 4:
+ typedSlice = new (jsType(v.typ))(slice.$array);
+ typedSlice.$offset = slice.$offset;
+ typedSlice.$length = slice.$length;
+ typedSlice.$capacity = slice.$capacity;
+ slice = typedSlice;
+ /* } */ case 5:
+ v.ptr.$set(slice);
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.SetBytes, $c: true, $r, _r, _r$1, _v, slice, typedSlice, v, x, $s};return $f;
+ };
+ Value.prototype.SetBytes = function(x) { return this.$val.SetBytes(x); };
+ Value.ptr.prototype.SetCap = function(n) {
+ var n, newSlice, s, v;
+ v = this;
+ new flag(v.flag).mustBeAssignable();
+ new flag(v.flag).mustBe(23);
+ s = v.ptr.$get();
+ if (n < ($parseInt(s.$length) >> 0) || n > ($parseInt(s.$capacity) >> 0)) {
+ $panic(new $String("reflect: slice capacity out of range in SetCap"));
+ }
+ newSlice = new (jsType(v.typ))(s.$array);
+ newSlice.$offset = s.$offset;
+ newSlice.$length = s.$length;
+ newSlice.$capacity = n;
+ v.ptr.$set(newSlice);
+ };
+ Value.prototype.SetCap = function(n) { return this.$val.SetCap(n); };
+ Value.ptr.prototype.SetLen = function(n) {
+ var n, newSlice, s, v;
+ v = this;
+ new flag(v.flag).mustBeAssignable();
+ new flag(v.flag).mustBe(23);
+ s = v.ptr.$get();
+ if (n < 0 || n > ($parseInt(s.$capacity) >> 0)) {
+ $panic(new $String("reflect: slice length out of range in SetLen"));
+ }
+ newSlice = new (jsType(v.typ))(s.$array);
+ newSlice.$offset = s.$offset;
+ newSlice.$length = n;
+ newSlice.$capacity = s.$capacity;
+ v.ptr.$set(newSlice);
+ };
+ Value.prototype.SetLen = function(n) { return this.$val.SetLen(n); };
+ Value.ptr.prototype.Slice = function(i, j) {
+ var {$24r, $24r$1, _1, _r, _r$1, cap, i, j, kind, s, str, tt, typ, v, $s, $r, $c} = $restore(this, {i, j});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ cap = 0;
+ typ = $ifaceNil;
+ s = null;
+ kind = new flag(v.flag).kind();
+ _1 = kind;
+ /* */ if (_1 === (17)) { $s = 2; continue; }
+ /* */ if (_1 === (23)) { $s = 3; continue; }
+ /* */ if (_1 === (24)) { $s = 4; continue; }
+ /* */ $s = 5; continue;
+ /* if (_1 === (17)) { */ case 2:
+ if (((v.flag & 256) >>> 0) === 0) {
+ $panic(new $String("reflect.Value.Slice: slice of unaddressable array"));
+ }
+ tt = (v.typ.kindType);
+ cap = ((tt.len >> 0));
+ typ = SliceOf(tt.elem);
+ s = new (jsType(typ))($clone(v, Value).object());
+ $s = 6; continue;
+ /* } else if (_1 === (23)) { */ case 3:
+ typ = v.typ;
+ s = $clone(v, Value).object();
+ cap = $parseInt(s.$capacity) >> 0;
+ $s = 6; continue;
+ /* } else if (_1 === (24)) { */ case 4:
+ str = (v.ptr).$get();
+ if (i < 0 || j < i || j > str.length) {
+ $panic(new $String("reflect.Value.Slice: string slice index out of bounds"));
+ }
+ _r = ValueOf(new $String($substring(str, i, j))); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 8; case 8: return $24r;
+ /* } else { */ case 5:
+ $panic(new ValueError.ptr("reflect.Value.Slice", kind));
+ /* } */ case 6:
+ case 1:
+ if (i < 0 || j < i || j > cap) {
+ $panic(new $String("reflect.Value.Slice: slice index out of bounds"));
+ }
+ _r$1 = makeValue(typ, $subslice(s, i, j), new flag(v.flag).ro()); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ $24r$1 = _r$1;
+ $s = 10; case 10: return $24r$1;
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.Slice, $c: true, $r, $24r, $24r$1, _1, _r, _r$1, cap, i, j, kind, s, str, tt, typ, v, $s};return $f;
+ };
+ Value.prototype.Slice = function(i, j) { return this.$val.Slice(i, j); };
+ Value.ptr.prototype.Slice3 = function(i, j, k) {
+ var {$24r, _1, _r, cap, i, j, k, kind, s, tt, typ, v, $s, $r, $c} = $restore(this, {i, j, k});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ cap = 0;
+ typ = $ifaceNil;
+ s = null;
+ kind = new flag(v.flag).kind();
+ _1 = kind;
+ if (_1 === (17)) {
+ if (((v.flag & 256) >>> 0) === 0) {
+ $panic(new $String("reflect.Value.Slice: slice of unaddressable array"));
+ }
+ tt = (v.typ.kindType);
+ cap = ((tt.len >> 0));
+ typ = SliceOf(tt.elem);
+ s = new (jsType(typ))($clone(v, Value).object());
+ } else if (_1 === (23)) {
+ typ = v.typ;
+ s = $clone(v, Value).object();
+ cap = $parseInt(s.$capacity) >> 0;
+ } else {
+ $panic(new ValueError.ptr("reflect.Value.Slice3", kind));
+ }
+ if (i < 0 || j < i || k < j || k > cap) {
+ $panic(new $String("reflect.Value.Slice3: slice index out of bounds"));
+ }
+ _r = makeValue(typ, $subslice(s, i, j, k), new flag(v.flag).ro()); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.Slice3, $c: true, $r, $24r, _1, _r, cap, i, j, k, kind, s, tt, typ, v, $s};return $f;
+ };
+ Value.prototype.Slice3 = function(i, j, k) { return this.$val.Slice3(i, j, k); };
+ Value.ptr.prototype.Close = function() {
+ var v;
+ v = this;
+ new flag(v.flag).mustBe(18);
+ new flag(v.flag).mustBeExported();
+ $close($clone(v, Value).object());
+ };
+ Value.prototype.Close = function() { return this.$val.Close(); };
+ Value.ptr.prototype.Elem = function() {
+ var {$24r, _1, _r, fl, k, tt, typ, v, val, val$1, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ k = new flag(v.flag).kind();
+ _1 = k;
+ /* */ if (_1 === (20)) { $s = 2; continue; }
+ /* */ if (_1 === (22)) { $s = 3; continue; }
+ /* */ $s = 4; continue;
+ /* if (_1 === (20)) { */ case 2:
+ val = $clone(v, Value).object();
+ if (val === $ifaceNil) {
+ $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0);
+ }
+ typ = reflectType(val.constructor);
+ _r = makeValue(typ, val.$val, new flag(v.flag).ro()); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 7; case 7: return $24r;
+ /* } else if (_1 === (22)) { */ case 3:
+ if ($clone(v, Value).IsNil()) {
+ $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0);
+ }
+ val$1 = $clone(v, Value).object();
+ tt = (v.typ.kindType);
+ fl = (((((v.flag & 96) >>> 0) | 128) >>> 0) | 256) >>> 0;
+ fl = (fl | (((tt.elem.Kind() >>> 0)))) >>> 0;
+ $s = -1; return new Value.ptr(tt.elem, (wrapJsObject(tt.elem, val$1)), fl);
+ /* } else { */ case 4:
+ $panic(new ValueError.ptr("reflect.Value.Elem", k));
+ /* } */ case 5:
+ case 1:
+ $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0);
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.Elem, $c: true, $r, $24r, _1, _r, fl, k, tt, typ, v, val, val$1, $s};return $f;
+ };
+ Value.prototype.Elem = function() { return this.$val.Elem(); };
+ Value.ptr.prototype.NumField = function() {
+ var tt, v;
+ v = this;
+ new flag(v.flag).mustBe(25);
+ tt = (v.typ.kindType);
+ return tt.fields.$length;
+ };
+ Value.prototype.NumField = function() { return this.$val.NumField(); };
+ Value.ptr.prototype.MapKeys = function() {
+ var {_r, a, fl, i, it, key, keyType, m, mlen, tt, v, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ new flag(v.flag).mustBe(21);
+ tt = (v.typ.kindType);
+ keyType = tt.key;
+ fl = (new flag(v.flag).ro() | ((keyType.Kind() >>> 0))) >>> 0;
+ m = $clone(v, Value).pointer();
+ mlen = 0;
+ if (!(m === 0)) {
+ mlen = maplen(m);
+ }
+ it = mapiterinit(v.typ, m);
+ a = $makeSlice(sliceType$6, mlen);
+ i = 0;
+ i = 0;
+ /* while (true) { */ case 1:
+ /* if (!(i < a.$length)) { break; } */ if(!(i < a.$length)) { $s = 2; continue; }
+ _r = mapiterkey(it); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ key = _r;
+ if (key === 0) {
+ /* break; */ $s = 2; continue;
+ }
+ Value.copy(((i < 0 || i >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + i]), copyVal(keyType, fl, key));
+ mapiternext(it);
+ i = i + (1) >> 0;
+ $s = 1; continue;
+ case 2:
+ $s = -1; return $subslice(a, 0, i);
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.MapKeys, $c: true, $r, _r, a, fl, i, it, key, keyType, m, mlen, tt, v, $s};return $f;
+ };
+ Value.prototype.MapKeys = function() { return this.$val.MapKeys(); };
+ Value.ptr.prototype.MapIndex = function(key) {
+ var {_r, e, fl, k, key, tt, typ, v, $s, $r, $c} = $restore(this, {key});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ new flag(v.flag).mustBe(21);
+ tt = (v.typ.kindType);
+ _r = $clone(key, Value).assignTo("reflect.Value.MapIndex", tt.key, 0); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ Value.copy(key, _r);
+ k = 0;
+ if (!((((key.flag & 128) >>> 0) === 0))) {
+ k = key.ptr;
+ } else {
+ k = ((key.$ptr_ptr || (key.$ptr_ptr = new ptrType$7(function() { return this.$target.ptr; }, function($v) { this.$target.ptr = $v; }, key))));
+ }
+ e = mapaccess(v.typ, $clone(v, Value).pointer(), k);
+ if (e === 0) {
+ $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0);
+ }
+ typ = tt.elem;
+ fl = new flag((((v.flag | key.flag) >>> 0))).ro();
+ fl = (fl | (((typ.Kind() >>> 0)))) >>> 0;
+ $s = -1; return copyVal(typ, fl, e);
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.MapIndex, $c: true, $r, _r, e, fl, k, key, tt, typ, v, $s};return $f;
+ };
+ Value.prototype.MapIndex = function(key) { return this.$val.MapIndex(key); };
+ Value.ptr.prototype.Field = function(i) {
+ var {$24r, _r, _r$1, _r$2, field, fl, i, jsTag, o, prop, s, tag, tt, typ, v, x, x$1, $s, $r, $c} = $restore(this, {i});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ jsTag = [jsTag];
+ prop = [prop];
+ s = [s];
+ typ = [typ];
+ v = this;
+ if (!((new flag(v.flag).kind() === 25))) {
+ $panic(new ValueError.ptr("reflect.Value.Field", new flag(v.flag).kind()));
+ }
+ tt = (v.typ.kindType);
+ if (((i >>> 0)) >= ((tt.fields.$length >>> 0))) {
+ $panic(new $String("reflect: Field index out of range"));
+ }
+ prop[0] = $internalize(jsType(v.typ).fields[i].prop, $String);
+ field = (x = tt.fields, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]));
+ typ[0] = field.typ;
+ fl = (((v.flag & 416) >>> 0) | ((typ[0].Kind() >>> 0))) >>> 0;
+ if (!$clone(field.name, name).isExported()) {
+ if (field.embedded()) {
+ fl = (fl | (64)) >>> 0;
+ } else {
+ fl = (fl | (32)) >>> 0;
+ }
+ }
+ tag = $clone((x$1 = tt.fields, ((i < 0 || i >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i])).name, name).tag();
+ /* */ if (!(tag === "") && !((i === 0))) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (!(tag === "") && !((i === 0))) { */ case 1:
+ jsTag[0] = getJsTag(tag);
+ /* */ if (!(jsTag[0] === "")) { $s = 3; continue; }
+ /* */ $s = 4; continue;
+ /* if (!(jsTag[0] === "")) { */ case 3:
+ /* while (true) { */ case 5:
+ o = [o];
+ _r = $clone(v, Value).Field(0); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ Value.copy(v, _r);
+ /* */ if (v.typ === jsObjectPtr) { $s = 8; continue; }
+ /* */ $s = 9; continue;
+ /* if (v.typ === jsObjectPtr) { */ case 8:
+ o[0] = $clone(v, Value).object().object;
+ $s = -1; return new Value.ptr(typ[0], (new (jsType(PtrTo(typ[0])))((function(jsTag, o, prop, s, typ) { return function() {
+ return $internalize(o[0][$externalize(jsTag[0], $String)], jsType(typ[0]));
+ }; })(jsTag, o, prop, s, typ), (function(jsTag, o, prop, s, typ) { return function(x$2) {
+ var x$2;
+ o[0][$externalize(jsTag[0], $String)] = $externalize(x$2, jsType(typ[0]));
+ }; })(jsTag, o, prop, s, typ))), fl);
+ /* } */ case 9:
+ /* */ if (v.typ.Kind() === 22) { $s = 10; continue; }
+ /* */ $s = 11; continue;
+ /* if (v.typ.Kind() === 22) { */ case 10:
+ _r$1 = $clone(v, Value).Elem(); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ Value.copy(v, _r$1);
+ /* } */ case 11:
+ $s = 5; continue;
+ case 6:
+ /* } */ case 4:
+ /* } */ case 2:
+ s[0] = v.ptr;
+ /* */ if (!((((fl & 128) >>> 0) === 0)) && !((typ[0].Kind() === 17)) && !((typ[0].Kind() === 25))) { $s = 13; continue; }
+ /* */ $s = 14; continue;
+ /* if (!((((fl & 128) >>> 0) === 0)) && !((typ[0].Kind() === 17)) && !((typ[0].Kind() === 25))) { */ case 13:
+ $s = -1; return new Value.ptr(typ[0], (new (jsType(PtrTo(typ[0])))((function(jsTag, prop, s, typ) { return function() {
+ return wrapJsObject(typ[0], s[0][$externalize(prop[0], $String)]);
+ }; })(jsTag, prop, s, typ), (function(jsTag, prop, s, typ) { return function(x$2) {
+ var x$2;
+ s[0][$externalize(prop[0], $String)] = unwrapJsObject(typ[0], x$2);
+ }; })(jsTag, prop, s, typ))), fl);
+ /* } */ case 14:
+ _r$2 = makeValue(typ[0], wrapJsObject(typ[0], s[0][$externalize(prop[0], $String)]), fl); /* */ $s = 15; case 15: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ $24r = _r$2;
+ $s = 16; case 16: return $24r;
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.Field, $c: true, $r, $24r, _r, _r$1, _r$2, field, fl, i, jsTag, o, prop, s, tag, tt, typ, v, x, x$1, $s};return $f;
+ };
+ Value.prototype.Field = function(i) { return this.$val.Field(i); };
+ errorString.ptr.prototype.Error = function() {
+ var e;
+ e = this;
+ return e.s;
+ };
+ errorString.prototype.Error = function() { return this.$val.Error(); };
+ unquote = function(s) {
+ var s;
+ if (s.length < 2) {
+ return [s, $ifaceNil];
+ }
+ if ((s.charCodeAt(0) === 39) || (s.charCodeAt(0) === 34)) {
+ if (s.charCodeAt((s.length - 1 >> 0)) === s.charCodeAt(0)) {
+ return [$substring(s, 1, (s.length - 1 >> 0)), $ifaceNil];
+ }
+ return ["", $pkg.ErrSyntax];
+ }
+ return [s, $ifaceNil];
+ };
+ flag.prototype.mustBe = function(expected) {
+ var expected, f;
+ f = this.$val;
+ if (!((((((f & 31) >>> 0) >>> 0)) === expected))) {
+ $panic(new ValueError.ptr(methodName(), new flag(f).kind()));
+ }
+ };
+ $ptrType(flag).prototype.mustBe = function(expected) { return new flag(this.$get()).mustBe(expected); };
+ rtype.ptr.prototype.Comparable = function() {
+ var {$24r, _1, _r, _r$1, ft, i, t, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ t = this;
+ _1 = t.Kind();
+ /* */ if ((_1 === (19)) || (_1 === (23)) || (_1 === (21))) { $s = 2; continue; }
+ /* */ if (_1 === (17)) { $s = 3; continue; }
+ /* */ if (_1 === (25)) { $s = 4; continue; }
+ /* */ $s = 5; continue;
+ /* if ((_1 === (19)) || (_1 === (23)) || (_1 === (21))) { */ case 2:
+ $s = -1; return false;
+ /* } else if (_1 === (17)) { */ case 3:
+ _r = t.Elem().Comparable(); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 7; case 7: return $24r;
+ /* } else if (_1 === (25)) { */ case 4:
+ i = 0;
+ /* while (true) { */ case 8:
+ /* if (!(i < t.NumField())) { break; } */ if(!(i < t.NumField())) { $s = 9; continue; }
+ ft = $clone(t.Field(i), structField);
+ _r$1 = ft.typ.Comparable(); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ /* */ if (!_r$1) { $s = 10; continue; }
+ /* */ $s = 11; continue;
+ /* if (!_r$1) { */ case 10:
+ $s = -1; return false;
+ /* } */ case 11:
+ i = i + (1) >> 0;
+ $s = 8; continue;
+ case 9:
+ /* } */ case 5:
+ case 1:
+ $s = -1; return true;
+ /* */ } return; } var $f = {$blk: rtype.ptr.prototype.Comparable, $c: true, $r, $24r, _1, _r, _r$1, ft, i, t, $s};return $f;
+ };
+ rtype.prototype.Comparable = function() { return this.$val.Comparable(); };
+ rtype.ptr.prototype.IsVariadic = function() {
+ var t, tt;
+ t = this;
+ if (!((t.Kind() === 19))) {
+ $panic(new $String("reflect: IsVariadic of non-func type"));
+ }
+ tt = (t.kindType);
+ return !((((tt.outCount & 32768) >>> 0) === 0));
+ };
+ rtype.prototype.IsVariadic = function() { return this.$val.IsVariadic(); };
+ rtype.ptr.prototype.Field = function(i) {
+ var i, t, tt, x;
+ t = this;
+ if (!((t.Kind() === 25))) {
+ $panic(new $String("reflect: Field of non-struct type"));
+ }
+ tt = (t.kindType);
+ if (i < 0 || i >= tt.fields.$length) {
+ $panic(new $String("reflect: Field index out of bounds"));
+ }
+ return (x = tt.fields, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]));
+ };
+ rtype.prototype.Field = function(i) { return this.$val.Field(i); };
+ rtype.ptr.prototype.Key = function() {
+ var t, tt;
+ t = this;
+ if (!((t.Kind() === 21))) {
+ $panic(new $String("reflect: Key of non-map type"));
+ }
+ tt = (t.kindType);
+ return toType(tt.key);
+ };
+ rtype.prototype.Key = function() { return this.$val.Key(); };
+ rtype.ptr.prototype.NumField = function() {
+ var t, tt;
+ t = this;
+ if (!((t.Kind() === 25))) {
+ $panic(new $String("reflect: NumField of non-struct type"));
+ }
+ tt = (t.kindType);
+ return tt.fields.$length;
+ };
+ rtype.prototype.NumField = function() { return this.$val.NumField(); };
+ rtype.ptr.prototype.Method = function(i) {
+ var {$24r, _i, _i$1, _r, _r$1, _ref, _ref$1, arg, fl, fn, ft, i, in$1, m, methods, mt, mtyp, out, p, pname, prop, ret, t, tt, $s, $r, $c} = $restore(this, {i});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ prop = [prop];
+ m = new Method.ptr("", "", $ifaceNil, new Value.ptr(ptrType$1.nil, 0, 0), 0);
+ t = this;
+ /* */ if (t.Kind() === 20) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (t.Kind() === 20) { */ case 1:
+ tt = (t.kindType);
+ _r = tt.rtype.Method(i); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ Method.copy(m, _r);
+ $24r = m;
+ $s = 4; case 4: return $24r;
+ /* } */ case 2:
+ methods = t.exportedMethods();
+ if (i < 0 || i >= methods.$length) {
+ $panic(new $String("reflect: Method index out of range"));
+ }
+ p = $clone(((i < 0 || i >= methods.$length) ? ($throwRuntimeError("index out of range"), undefined) : methods.$array[methods.$offset + i]), method);
+ pname = $clone(t.nameOff(p.name), name);
+ m.Name = $clone(pname, name).name();
+ fl = 19;
+ mtyp = t.typeOff(p.mtyp);
+ ft = (mtyp.kindType);
+ in$1 = $makeSlice(sliceType$7, 0, (1 + ft.in$().$length >> 0));
+ in$1 = $append(in$1, t);
+ _ref = ft.in$();
+ _i = 0;
+ while (true) {
+ if (!(_i < _ref.$length)) { break; }
+ arg = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]);
+ in$1 = $append(in$1, arg);
+ _i++;
+ }
+ out = $makeSlice(sliceType$7, 0, ft.out().$length);
+ _ref$1 = ft.out();
+ _i$1 = 0;
+ while (true) {
+ if (!(_i$1 < _ref$1.$length)) { break; }
+ ret = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]);
+ out = $append(out, ret);
+ _i$1++;
+ }
+ _r$1 = FuncOf(in$1, out, ft.rtype.IsVariadic()); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ mt = _r$1;
+ m.Type = mt;
+ prop[0] = $internalize($methodSet(t[$externalize(idJsType, $String)])[i].prop, $String);
+ fn = js.MakeFunc((function(prop) { return function(this$1, arguments$1) {
+ var arguments$1, rcvr, this$1;
+ rcvr = (0 >= arguments$1.$length ? ($throwRuntimeError("index out of range"), undefined) : arguments$1.$array[arguments$1.$offset + 0]);
+ return new $jsObjectPtr(rcvr[$externalize(prop[0], $String)].apply(rcvr, $externalize($subslice(arguments$1, 1), sliceType$8)));
+ }; })(prop));
+ Value.copy(m.Func, new Value.ptr($assertType(mt, ptrType$1), (fn), fl));
+ m.Index = i;
+ Method.copy(m, m);
+ $s = -1; return m;
+ /* */ } return; } var $f = {$blk: rtype.ptr.prototype.Method, $c: true, $r, $24r, _i, _i$1, _r, _r$1, _ref, _ref$1, arg, fl, fn, ft, i, in$1, m, methods, mt, mtyp, out, p, pname, prop, ret, t, tt, $s};return $f;
+ };
+ rtype.prototype.Method = function(i) { return this.$val.Method(i); };
+ Swapper = function(slice) {
+ var {_1, _r, a, off, slice, v, vLen, $s, $r, $c} = $restore(this, {slice});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ a = [a];
+ off = [off];
+ vLen = [vLen];
+ _r = ValueOf(slice); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ v = $clone(_r, Value);
+ if (!(($clone(v, Value).Kind() === 23))) {
+ $panic(new ValueError.ptr("Swapper", $clone(v, Value).Kind()));
+ }
+ vLen[0] = (($clone(v, Value).Len() >>> 0));
+ _1 = vLen[0];
+ if (_1 === (0)) {
+ $s = -1; return (function(a, off, vLen) { return function(i, j) {
+ var i, j;
+ $panic(new $String("reflect: slice index out of range"));
+ }; })(a, off, vLen);
+ } else if (_1 === (1)) {
+ $s = -1; return (function(a, off, vLen) { return function(i, j) {
+ var i, j;
+ if (!((i === 0)) || !((j === 0))) {
+ $panic(new $String("reflect: slice index out of range"));
+ }
+ }; })(a, off, vLen);
+ }
+ a[0] = slice.$array;
+ off[0] = $parseInt(slice.$offset) >> 0;
+ $s = -1; return (function(a, off, vLen) { return function(i, j) {
+ var i, j, tmp;
+ if (((i >>> 0)) >= vLen[0] || ((j >>> 0)) >= vLen[0]) {
+ $panic(new $String("reflect: slice index out of range"));
+ }
+ i = i + (off[0]) >> 0;
+ j = j + (off[0]) >> 0;
+ tmp = a[0][i];
+ a[0][i] = a[0][j];
+ a[0][j] = tmp;
+ }; })(a, off, vLen);
+ /* */ } return; } var $f = {$blk: Swapper, $c: true, $r, _1, _r, a, off, slice, v, vLen, $s};return $f;
+ };
+ $pkg.Swapper = Swapper;
+ init = function() {
+ var {used, x, x$1, x$10, x$11, x$12, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ used = (function(i) {
+ var i;
+ });
+ $r = used((x = new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0), new x.constructor.elem(x))); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = used((x$1 = new uncommonType.ptr(0, 0, 0, 0, sliceType$5.nil), new x$1.constructor.elem(x$1))); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = used((x$2 = new method.ptr(0, 0, 0, 0), new x$2.constructor.elem(x$2))); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = used((x$3 = new arrayType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0), ptrType$1.nil, ptrType$1.nil, 0), new x$3.constructor.elem(x$3))); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = used((x$4 = new chanType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0), ptrType$1.nil, 0), new x$4.constructor.elem(x$4))); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = used((x$5 = new funcType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0), 0, 0, sliceType$2.nil, sliceType$2.nil), new x$5.constructor.elem(x$5))); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = used((x$6 = new interfaceType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0), new name.ptr(ptrType$6.nil), sliceType$9.nil), new x$6.constructor.elem(x$6))); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = used((x$7 = new mapType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0), ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, $throwNilPointerError, 0, 0, 0, 0), new x$7.constructor.elem(x$7))); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = used((x$8 = new ptrType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0), ptrType$1.nil), new x$8.constructor.elem(x$8))); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = used((x$9 = new sliceType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0), ptrType$1.nil), new x$9.constructor.elem(x$9))); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = used((x$10 = new structType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0), new name.ptr(ptrType$6.nil), sliceType$10.nil), new x$10.constructor.elem(x$10))); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = used((x$11 = new imethod.ptr(0, 0), new x$11.constructor.elem(x$11))); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = used((x$12 = new structField.ptr(new name.ptr(ptrType$6.nil), ptrType$1.nil, 0), new x$12.constructor.elem(x$12))); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ initialized = true;
+ uint8Type = $assertType(TypeOf(new $Uint8(0)), ptrType$1);
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: init, $c: true, $r, used, x, x$1, x$10, x$11, x$12, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, $s};return $f;
+ };
+ jsType = function(typ) {
+ var typ;
+ return typ[$externalize(idJsType, $String)];
+ };
+ reflectType = function(typ) {
+ var _1, _i, _i$1, _i$2, _i$3, _key, _ref, _ref$1, _ref$2, _ref$3, dir, exported, exported$1, f, fields, i, i$1, i$2, i$3, i$4, i$5, imethods, in$1, m, m$1, m$2, methodSet, methods, offsetEmbed, out, outCount, params, reflectFields, reflectMethods, results, rt, typ, ut, xcount;
+ if (typ[$externalize(idReflectType, $String)] === undefined) {
+ rt = new rtype.ptr(((($parseInt(typ.size) >> 0) >>> 0)), 0, 0, 0, 0, 0, ((($parseInt(typ.kind) >> 0) << 24 >>> 24)), $throwNilPointerError, ptrType$6.nil, newNameOff($clone(newName(internalStr(typ.string), "", !!(typ.exported)), name)), 0);
+ rt[$externalize(idJsType, $String)] = typ;
+ typ[$externalize(idReflectType, $String)] = rt;
+ methodSet = $methodSet(typ);
+ if (!(($parseInt(methodSet.length) === 0)) || !!(typ.named)) {
+ rt.tflag = (rt.tflag | (1)) >>> 0;
+ if (!!(typ.named)) {
+ rt.tflag = (rt.tflag | (4)) >>> 0;
+ }
+ reflectMethods = sliceType$5.nil;
+ i = 0;
+ while (true) {
+ if (!(i < $parseInt(methodSet.length))) { break; }
+ m = methodSet[i];
+ exported = internalStr(m.pkg) === "";
+ if (!exported) {
+ i = i + (1) >> 0;
+ continue;
+ }
+ reflectMethods = $append(reflectMethods, new method.ptr(newNameOff($clone(newName(internalStr(m.name), "", exported), name)), newTypeOff(reflectType(m.typ)), 0, 0));
+ i = i + (1) >> 0;
+ }
+ xcount = ((reflectMethods.$length << 16 >>> 16));
+ i$1 = 0;
+ while (true) {
+ if (!(i$1 < $parseInt(methodSet.length))) { break; }
+ m$1 = methodSet[i$1];
+ exported$1 = internalStr(m$1.pkg) === "";
+ if (exported$1) {
+ i$1 = i$1 + (1) >> 0;
+ continue;
+ }
+ reflectMethods = $append(reflectMethods, new method.ptr(newNameOff($clone(newName(internalStr(m$1.name), "", exported$1), name)), newTypeOff(reflectType(m$1.typ)), 0, 0));
+ i$1 = i$1 + (1) >> 0;
+ }
+ ut = new uncommonType.ptr(newNameOff($clone(newName(internalStr(typ.pkg), "", false), name)), (($parseInt(methodSet.length) << 16 >>> 16)), xcount, 0, reflectMethods);
+ _key = rt; (uncommonTypeMap || $throwRuntimeError("assignment to entry in nil map"))[ptrType$1.keyFor(_key)] = { k: _key, v: ut };
+ ut[$externalize(idJsType, $String)] = typ;
+ }
+ _1 = rt.Kind();
+ if (_1 === (17)) {
+ setKindType(rt, new arrayType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0), reflectType(typ.elem), ptrType$1.nil, ((($parseInt(typ.len) >> 0) >>> 0))));
+ } else if (_1 === (18)) {
+ dir = 3;
+ if (!!(typ.sendOnly)) {
+ dir = 2;
+ }
+ if (!!(typ.recvOnly)) {
+ dir = 1;
+ }
+ setKindType(rt, new chanType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0), reflectType(typ.elem), ((dir >>> 0))));
+ } else if (_1 === (19)) {
+ params = typ.params;
+ in$1 = $makeSlice(sliceType$2, $parseInt(params.length));
+ _ref = in$1;
+ _i = 0;
+ while (true) {
+ if (!(_i < _ref.$length)) { break; }
+ i$2 = _i;
+ ((i$2 < 0 || i$2 >= in$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : in$1.$array[in$1.$offset + i$2] = reflectType(params[i$2]));
+ _i++;
+ }
+ results = typ.results;
+ out = $makeSlice(sliceType$2, $parseInt(results.length));
+ _ref$1 = out;
+ _i$1 = 0;
+ while (true) {
+ if (!(_i$1 < _ref$1.$length)) { break; }
+ i$3 = _i$1;
+ ((i$3 < 0 || i$3 >= out.$length) ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + i$3] = reflectType(results[i$3]));
+ _i$1++;
+ }
+ outCount = (($parseInt(results.length) << 16 >>> 16));
+ if (!!(typ.variadic)) {
+ outCount = (outCount | (32768)) >>> 0;
+ }
+ setKindType(rt, new funcType.ptr($clone(rt, rtype), (($parseInt(params.length) << 16 >>> 16)), outCount, in$1, out));
+ } else if (_1 === (20)) {
+ methods = typ.methods;
+ imethods = $makeSlice(sliceType$9, $parseInt(methods.length));
+ _ref$2 = imethods;
+ _i$2 = 0;
+ while (true) {
+ if (!(_i$2 < _ref$2.$length)) { break; }
+ i$4 = _i$2;
+ m$2 = methods[i$4];
+ imethod.copy(((i$4 < 0 || i$4 >= imethods.$length) ? ($throwRuntimeError("index out of range"), undefined) : imethods.$array[imethods.$offset + i$4]), new imethod.ptr(newNameOff($clone(newName(internalStr(m$2.name), "", internalStr(m$2.pkg) === ""), name)), newTypeOff(reflectType(m$2.typ))));
+ _i$2++;
+ }
+ setKindType(rt, new interfaceType.ptr($clone(rt, rtype), $clone(newName(internalStr(typ.pkg), "", false), name), imethods));
+ } else if (_1 === (21)) {
+ setKindType(rt, new mapType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0), reflectType(typ.key), reflectType(typ.elem), ptrType$1.nil, $throwNilPointerError, 0, 0, 0, 0));
+ } else if (_1 === (22)) {
+ setKindType(rt, new ptrType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0), reflectType(typ.elem)));
+ } else if (_1 === (23)) {
+ setKindType(rt, new sliceType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0), reflectType(typ.elem)));
+ } else if (_1 === (25)) {
+ fields = typ.fields;
+ reflectFields = $makeSlice(sliceType$10, $parseInt(fields.length));
+ _ref$3 = reflectFields;
+ _i$3 = 0;
+ while (true) {
+ if (!(_i$3 < _ref$3.$length)) { break; }
+ i$5 = _i$3;
+ f = fields[i$5];
+ offsetEmbed = ((i$5 >>> 0)) << 1 >>> 0;
+ if (!!(f.embedded)) {
+ offsetEmbed = (offsetEmbed | (1)) >>> 0;
+ }
+ structField.copy(((i$5 < 0 || i$5 >= reflectFields.$length) ? ($throwRuntimeError("index out of range"), undefined) : reflectFields.$array[reflectFields.$offset + i$5]), new structField.ptr($clone(newName(internalStr(f.name), internalStr(f.tag), !!(f.exported)), name), reflectType(f.typ), offsetEmbed));
+ _i$3++;
+ }
+ setKindType(rt, new structType.ptr($clone(rt, rtype), $clone(newName(internalStr(typ.pkgPath), "", false), name), reflectFields));
+ }
+ }
+ return ((typ[$externalize(idReflectType, $String)]));
+ };
+ setKindType = function(rt, kindType) {
+ var kindType, rt;
+ rt[$externalize(idKindType, $String)] = kindType;
+ kindType[$externalize(idRtype, $String)] = rt;
+ };
+ uncommonType.ptr.prototype.methods = function() {
+ var t;
+ t = this;
+ return t._methods;
+ };
+ uncommonType.prototype.methods = function() { return this.$val.methods(); };
+ uncommonType.ptr.prototype.exportedMethods = function() {
+ var t;
+ t = this;
+ return $subslice(t._methods, 0, t.xcount, t.xcount);
+ };
+ uncommonType.prototype.exportedMethods = function() { return this.$val.exportedMethods(); };
+ rtype.ptr.prototype.uncommon = function() {
+ var _entry, t;
+ t = this;
+ return (_entry = uncommonTypeMap[ptrType$1.keyFor(t)], _entry !== undefined ? _entry.v : ptrType$4.nil);
+ };
+ rtype.prototype.uncommon = function() { return this.$val.uncommon(); };
+ funcType.ptr.prototype.in$ = function() {
+ var t;
+ t = this;
+ return t._in;
+ };
+ funcType.prototype.in$ = function() { return this.$val.in$(); };
+ funcType.ptr.prototype.out = function() {
+ var t;
+ t = this;
+ return t._out;
+ };
+ funcType.prototype.out = function() { return this.$val.out(); };
+ name.ptr.prototype.name = function() {
+ var _entry, n, s;
+ s = "";
+ n = this;
+ s = (_entry = nameMap[ptrType$6.keyFor(n.bytes)], _entry !== undefined ? _entry.v : ptrType$8.nil).name;
+ return s;
+ };
+ name.prototype.name = function() { return this.$val.name(); };
+ name.ptr.prototype.tag = function() {
+ var _entry, n, s;
+ s = "";
+ n = this;
+ s = (_entry = nameMap[ptrType$6.keyFor(n.bytes)], _entry !== undefined ? _entry.v : ptrType$8.nil).tag;
+ return s;
+ };
+ name.prototype.tag = function() { return this.$val.tag(); };
+ name.ptr.prototype.pkgPath = function() {
+ var n;
+ n = this;
+ return "";
+ };
+ name.prototype.pkgPath = function() { return this.$val.pkgPath(); };
+ name.ptr.prototype.isExported = function() {
+ var _entry, n;
+ n = this;
+ return (_entry = nameMap[ptrType$6.keyFor(n.bytes)], _entry !== undefined ? _entry.v : ptrType$8.nil).exported;
+ };
+ name.prototype.isExported = function() { return this.$val.isExported(); };
+ newName = function(n, tag, exported) {
+ var _key, b, exported, n, tag;
+ b = $newDataPointer(0, ptrType$6);
+ _key = b; (nameMap || $throwRuntimeError("assignment to entry in nil map"))[ptrType$6.keyFor(_key)] = { k: _key, v: new nameData.ptr(n, tag, exported) };
+ return new name.ptr(b);
+ };
+ rtype.ptr.prototype.nameOff = function(off) {
+ var off, t, x;
+ t = this;
+ return (x = ((off >> 0)), ((x < 0 || x >= nameOffList.$length) ? ($throwRuntimeError("index out of range"), undefined) : nameOffList.$array[nameOffList.$offset + x]));
+ };
+ rtype.prototype.nameOff = function(off) { return this.$val.nameOff(off); };
+ newNameOff = function(n) {
+ var i, n;
+ i = nameOffList.$length;
+ nameOffList = $append(nameOffList, n);
+ return ((i >> 0));
+ };
+ rtype.ptr.prototype.typeOff = function(off) {
+ var off, t, x;
+ t = this;
+ return (x = ((off >> 0)), ((x < 0 || x >= typeOffList.$length) ? ($throwRuntimeError("index out of range"), undefined) : typeOffList.$array[typeOffList.$offset + x]));
+ };
+ rtype.prototype.typeOff = function(off) { return this.$val.typeOff(off); };
+ newTypeOff = function(t) {
+ var i, t;
+ i = typeOffList.$length;
+ typeOffList = $append(typeOffList, t);
+ return ((i >> 0));
+ };
+ internalStr = function(strObj) {
+ var c, strObj;
+ c = new structType$2.ptr("");
+ c.str = strObj;
+ return c.str;
+ };
+ isWrapped = function(typ) {
+ var typ;
+ return !!(jsType(typ).wrapped);
+ };
+ copyStruct = function(dst, src, typ) {
+ var dst, fields, i, prop, src, typ;
+ fields = jsType(typ).fields;
+ i = 0;
+ while (true) {
+ if (!(i < $parseInt(fields.length))) { break; }
+ prop = $internalize(fields[i].prop, $String);
+ dst[$externalize(prop, $String)] = src[$externalize(prop, $String)];
+ i = i + (1) >> 0;
+ }
+ };
+ makeValue = function(t, v, fl) {
+ var {$24r, $24r$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _v, _v$1, fl, rt, t, v, $s, $r, $c} = $restore(this, {t, v, fl});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = t.common(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ rt = _r;
+ _r$1 = t.Kind(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ if (_r$1 === 17) { _v$1 = true; $s = 5; continue s; }
+ _r$2 = t.Kind(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ _v$1 = _r$2 === 25; case 5:
+ if (_v$1) { _v = true; $s = 4; continue s; }
+ _r$3 = t.Kind(); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
+ _v = _r$3 === 22; case 4:
+ /* */ if (_v) { $s = 2; continue; }
+ /* */ $s = 3; continue;
+ /* if (_v) { */ case 2:
+ _r$4 = t.Kind(); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
+ $24r = new Value.ptr(rt, (v), (fl | ((_r$4 >>> 0))) >>> 0);
+ $s = 10; case 10: return $24r;
+ /* } */ case 3:
+ _r$5 = t.Kind(); /* */ $s = 11; case 11: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
+ $24r$1 = new Value.ptr(rt, ($newDataPointer(v, jsType(rt.ptrTo()))), (((fl | ((_r$5 >>> 0))) >>> 0) | 128) >>> 0);
+ $s = 12; case 12: return $24r$1;
+ /* */ } return; } var $f = {$blk: makeValue, $c: true, $r, $24r, $24r$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _v, _v$1, fl, rt, t, v, $s};return $f;
+ };
+ TypeOf = function(i) {
+ var i;
+ if (!initialized) {
+ return new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0);
+ }
+ if ($interfaceIsEqual(i, $ifaceNil)) {
+ return $ifaceNil;
+ }
+ return reflectType(i.constructor);
+ };
+ $pkg.TypeOf = TypeOf;
+ ValueOf = function(i) {
+ var {$24r, _r, i, $s, $r, $c} = $restore(this, {i});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ if ($interfaceIsEqual(i, $ifaceNil)) {
+ $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0);
+ }
+ _r = makeValue(reflectType(i.constructor), i.$val, 0); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: ValueOf, $c: true, $r, $24r, _r, i, $s};return $f;
+ };
+ $pkg.ValueOf = ValueOf;
+ FuncOf = function(in$1, out, variadic) {
+ var {_i, _i$1, _r, _ref, _ref$1, _v, _v$1, i, i$1, in$1, jsIn, jsOut, out, v, v$1, variadic, x, $s, $r, $c} = $restore(this, {in$1, out, variadic});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ if (!(variadic)) { _v = false; $s = 3; continue s; }
+ if (in$1.$length === 0) { _v$1 = true; $s = 4; continue s; }
+ _r = (x = in$1.$length - 1 >> 0, ((x < 0 || x >= in$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : in$1.$array[in$1.$offset + x])).Kind(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _v$1 = !((_r === 23)); case 4:
+ _v = _v$1; case 3:
+ /* */ if (_v) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (_v) { */ case 1:
+ $panic(new $String("reflect.FuncOf: last arg of variadic func must be slice"));
+ /* } */ case 2:
+ jsIn = $makeSlice(sliceType$8, in$1.$length);
+ _ref = in$1;
+ _i = 0;
+ while (true) {
+ if (!(_i < _ref.$length)) { break; }
+ i = _i;
+ v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]);
+ ((i < 0 || i >= jsIn.$length) ? ($throwRuntimeError("index out of range"), undefined) : jsIn.$array[jsIn.$offset + i] = jsType(v));
+ _i++;
+ }
+ jsOut = $makeSlice(sliceType$8, out.$length);
+ _ref$1 = out;
+ _i$1 = 0;
+ while (true) {
+ if (!(_i$1 < _ref$1.$length)) { break; }
+ i$1 = _i$1;
+ v$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]);
+ ((i$1 < 0 || i$1 >= jsOut.$length) ? ($throwRuntimeError("index out of range"), undefined) : jsOut.$array[jsOut.$offset + i$1] = jsType(v$1));
+ _i$1++;
+ }
+ $s = -1; return reflectType($funcType($externalize(jsIn, sliceType$8), $externalize(jsOut, sliceType$8), $externalize(variadic, $Bool)));
+ /* */ } return; } var $f = {$blk: FuncOf, $c: true, $r, _i, _i$1, _r, _ref, _ref$1, _v, _v$1, i, i$1, in$1, jsIn, jsOut, out, v, v$1, variadic, x, $s};return $f;
+ };
+ $pkg.FuncOf = FuncOf;
+ rtype.ptr.prototype.ptrTo = function() {
+ var t;
+ t = this;
+ return reflectType($ptrType(jsType(t)));
+ };
+ rtype.prototype.ptrTo = function() { return this.$val.ptrTo(); };
+ SliceOf = function(t) {
+ var t;
+ return reflectType($sliceType(jsType(t)));
+ };
+ $pkg.SliceOf = SliceOf;
+ unsafe_New = function(typ) {
+ var _1, typ;
+ _1 = typ.Kind();
+ if (_1 === (25)) {
+ return (new (jsType(typ).ptr)());
+ } else if (_1 === (17)) {
+ return (jsType(typ).zero());
+ } else {
+ return ($newDataPointer(jsType(typ).zero(), jsType(typ.ptrTo())));
+ }
+ };
+ typedmemmove = function(t, dst, src) {
+ var dst, src, t;
+ dst.$set(src.$get());
+ };
+ keyFor = function(t, key) {
+ var k, key, kv, t;
+ kv = key;
+ if (!(kv.$get === undefined)) {
+ kv = kv.$get();
+ }
+ k = $internalize(jsType(t.Key()).keyFor(kv), $String);
+ return [kv, k];
+ };
+ mapaccess = function(t, m, key) {
+ var _tuple, entry, k, key, m, t;
+ _tuple = keyFor(t, key);
+ k = _tuple[1];
+ entry = m[$externalize(k, $String)];
+ if (entry === undefined) {
+ return 0;
+ }
+ return ($newDataPointer(entry.v, jsType(PtrTo(t.Elem()))));
+ };
+ mapIter.ptr.prototype.skipUntilValidKey = function() {
+ var iter, k;
+ iter = this;
+ while (true) {
+ if (!(iter.i < $parseInt(iter.keys.length))) { break; }
+ k = iter.keys[iter.i];
+ if (!(iter.m[$externalize($internalize(k, $String), $String)] === undefined)) {
+ break;
+ }
+ iter.i = iter.i + (1) >> 0;
+ }
+ };
+ mapIter.prototype.skipUntilValidKey = function() { return this.$val.skipUntilValidKey(); };
+ mapiterinit = function(t, m) {
+ var m, t;
+ return (new mapIter.ptr(t, m, $keys(m), 0, null));
+ };
+ mapiterkey = function(it) {
+ var {$24r, _r, _r$1, _r$2, it, iter, k, kv, $s, $r, $c} = $restore(this, {it});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ iter = ($pointerOfStructConversion(it, ptrType$9));
+ kv = null;
+ if (!(iter.last === null)) {
+ kv = iter.last;
+ } else {
+ iter.skipUntilValidKey();
+ if (iter.i === $parseInt(iter.keys.length)) {
+ $s = -1; return 0;
+ }
+ k = iter.keys[iter.i];
+ kv = iter.m[$externalize($internalize(k, $String), $String)];
+ iter.last = kv;
+ }
+ _r = $assertType(iter.t, TypeEx).Key(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _r$1 = PtrTo(_r); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _r$2 = jsType(_r$1); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ $24r = ($newDataPointer(kv.k, _r$2));
+ $s = 4; case 4: return $24r;
+ /* */ } return; } var $f = {$blk: mapiterkey, $c: true, $r, $24r, _r, _r$1, _r$2, it, iter, k, kv, $s};return $f;
+ };
+ mapiternext = function(it) {
+ var it, iter;
+ iter = ($pointerOfStructConversion(it, ptrType$9));
+ iter.last = null;
+ iter.i = iter.i + (1) >> 0;
+ };
+ maplen = function(m) {
+ var m;
+ return $parseInt($keys(m).length);
+ };
+ methodReceiver = function(op, v, i) {
+ var _$12, fn, i, m, m$1, ms, op, prop, rcvr, t, tt, v, x;
+ _$12 = ptrType$1.nil;
+ t = ptrType$5.nil;
+ fn = 0;
+ prop = "";
+ if (v.typ.Kind() === 20) {
+ tt = (v.typ.kindType);
+ if (i < 0 || i >= tt.methods.$length) {
+ $panic(new $String("reflect: internal error: invalid method index"));
+ }
+ m = (x = tt.methods, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]));
+ if (!$clone(tt.rtype.nameOff(m.name), name).isExported()) {
+ $panic(new $String("reflect: " + op + " of unexported method"));
+ }
+ t = (tt.rtype.typeOff(m.typ).kindType);
+ prop = $clone(tt.rtype.nameOff(m.name), name).name();
+ } else {
+ ms = v.typ.exportedMethods();
+ if (((i >>> 0)) >= ((ms.$length >>> 0))) {
+ $panic(new $String("reflect: internal error: invalid method index"));
+ }
+ m$1 = $clone(((i < 0 || i >= ms.$length) ? ($throwRuntimeError("index out of range"), undefined) : ms.$array[ms.$offset + i]), method);
+ if (!$clone(v.typ.nameOff(m$1.name), name).isExported()) {
+ $panic(new $String("reflect: " + op + " of unexported method"));
+ }
+ t = (v.typ.typeOff(m$1.mtyp).kindType);
+ prop = $internalize($methodSet(jsType(v.typ))[i].prop, $String);
+ }
+ rcvr = $clone(v, Value).object();
+ if (isWrapped(v.typ)) {
+ rcvr = new (jsType(v.typ))(rcvr);
+ }
+ fn = (rcvr[$externalize(prop, $String)]);
+ return [_$12, t, fn];
+ };
+ valueInterface = function(v) {
+ var {_r, v, $s, $r, $c} = $restore(this, {v});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ if (v.flag === 0) {
+ $panic(new ValueError.ptr("reflect.Value.Interface", 0));
+ }
+ /* */ if (!((((v.flag & 512) >>> 0) === 0))) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (!((((v.flag & 512) >>> 0) === 0))) { */ case 1:
+ _r = makeMethodValue("Interface", $clone(v, Value)); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ Value.copy(v, _r);
+ /* } */ case 2:
+ if (isWrapped(v.typ)) {
+ $s = -1; return ((new (jsType(v.typ))($clone(v, Value).object())));
+ }
+ $s = -1; return (($clone(v, Value).object()));
+ /* */ } return; } var $f = {$blk: valueInterface, $c: true, $r, _r, v, $s};return $f;
+ };
+ ifaceE2I = function(t, src, dst) {
+ var dst, src, t;
+ dst.$set(src);
+ };
+ methodName = function() {
+ return "?FIXME?";
+ };
+ makeMethodValue = function(op, v) {
+ var {$24r, _r, _tuple, fn, fv, op, rcvr, v, $s, $r, $c} = $restore(this, {op, v});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ fn = [fn];
+ rcvr = [rcvr];
+ if (((v.flag & 512) >>> 0) === 0) {
+ $panic(new $String("reflect: internal error: invalid use of makePartialFunc"));
+ }
+ _tuple = methodReceiver(op, $clone(v, Value), ((v.flag >> 0)) >> 10 >> 0);
+ fn[0] = _tuple[2];
+ rcvr[0] = $clone(v, Value).object();
+ if (isWrapped(v.typ)) {
+ rcvr[0] = new (jsType(v.typ))(rcvr[0]);
+ }
+ fv = js.MakeFunc((function(fn, rcvr) { return function(this$1, arguments$1) {
+ var arguments$1, this$1;
+ return new $jsObjectPtr(fn[0].apply(rcvr[0], $externalize(arguments$1, sliceType$8)));
+ }; })(fn, rcvr));
+ _r = $clone(v, Value).Type().common(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = new Value.ptr(_r, (fv), (new flag(v.flag).ro() | 19) >>> 0);
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: makeMethodValue, $c: true, $r, $24r, _r, _tuple, fn, fv, op, rcvr, v, $s};return $f;
+ };
+ wrapJsObject = function(typ, val) {
+ var typ, val;
+ if ($interfaceIsEqual(typ, jsObjectPtr)) {
+ return new (jsType(jsObjectPtr))(val);
+ }
+ return val;
+ };
+ unwrapJsObject = function(typ, val) {
+ var typ, val;
+ if ($interfaceIsEqual(typ, jsObjectPtr)) {
+ return val.object;
+ }
+ return val;
+ };
+ getJsTag = function(tag) {
+ var _tuple, i, name$1, qvalue, tag, value;
+ while (true) {
+ if (!(!(tag === ""))) { break; }
+ i = 0;
+ while (true) {
+ if (!(i < tag.length && (tag.charCodeAt(i) === 32))) { break; }
+ i = i + (1) >> 0;
+ }
+ tag = $substring(tag, i);
+ if (tag === "") {
+ break;
+ }
+ i = 0;
+ while (true) {
+ if (!(i < tag.length && !((tag.charCodeAt(i) === 32)) && !((tag.charCodeAt(i) === 58)) && !((tag.charCodeAt(i) === 34)))) { break; }
+ i = i + (1) >> 0;
+ }
+ if ((i + 1 >> 0) >= tag.length || !((tag.charCodeAt(i) === 58)) || !((tag.charCodeAt((i + 1 >> 0)) === 34))) {
+ break;
+ }
+ name$1 = ($substring(tag, 0, i));
+ tag = $substring(tag, (i + 1 >> 0));
+ i = 1;
+ while (true) {
+ if (!(i < tag.length && !((tag.charCodeAt(i) === 34)))) { break; }
+ if (tag.charCodeAt(i) === 92) {
+ i = i + (1) >> 0;
+ }
+ i = i + (1) >> 0;
+ }
+ if (i >= tag.length) {
+ break;
+ }
+ qvalue = ($substring(tag, 0, (i + 1 >> 0)));
+ tag = $substring(tag, (i + 1 >> 0));
+ if (name$1 === "js") {
+ _tuple = unquote(qvalue);
+ value = _tuple[0];
+ return value;
+ }
+ }
+ return "";
+ };
+ PtrTo = function(t) {
+ var t;
+ return $assertType(t, ptrType$1).ptrTo();
+ };
+ $pkg.PtrTo = PtrTo;
+ copyVal = function(typ, fl, ptr) {
+ var c, fl, ptr, typ;
+ if (ifaceIndir(typ)) {
+ c = unsafe_New(typ);
+ typedmemmove(typ, c, ptr);
+ return new Value.ptr(typ, c, (fl | 128) >>> 0);
+ }
+ return new Value.ptr(typ, (ptr).$get(), fl);
+ };
+ Value.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([], [Kind], false)}, {prop: "numMethod", name: "numMethod", pkg: "internal/reflectlite", typ: $funcType([], [$Int], false)}, {prop: "Type", name: "Type", pkg: "", typ: $funcType([], [Type], false)}, {prop: "object", name: "object", pkg: "internal/reflectlite", typ: $funcType([], [ptrType$2], false)}, {prop: "assignTo", name: "assignTo", pkg: "internal/reflectlite", typ: $funcType([$String, ptrType$1, $UnsafePointer], [Value], false)}, {prop: "call", name: "call", pkg: "internal/reflectlite", typ: $funcType([$String, sliceType$6], [sliceType$6], false)}, {prop: "Cap", name: "Cap", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([$Int], [Value], false)}, {prop: "InterfaceData", name: "InterfaceData", pkg: "", typ: $funcType([], [arrayType$2], 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([Value], [], false)}, {prop: "SetBytes", name: "SetBytes", pkg: "", typ: $funcType([sliceType$13], [], 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], [Value], false)}, {prop: "Slice3", name: "Slice3", pkg: "", typ: $funcType([$Int, $Int, $Int], [Value], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [], false)}, {prop: "Elem", name: "Elem", pkg: "", typ: $funcType([], [Value], false)}, {prop: "NumField", name: "NumField", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "MapKeys", name: "MapKeys", pkg: "", typ: $funcType([], [sliceType$6], false)}, {prop: "MapIndex", name: "MapIndex", pkg: "", typ: $funcType([Value], [Value], false)}, {prop: "Field", name: "Field", pkg: "", typ: $funcType([$Int], [Value], false)}];
+ flag.methods = [{prop: "kind", name: "kind", pkg: "internal/reflectlite", typ: $funcType([], [Kind], false)}, {prop: "ro", name: "ro", pkg: "internal/reflectlite", typ: $funcType([], [flag], 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([Kind], [], false)}];
+ ptrType$10.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}];
+ Kind.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}];
+ ptrType$1.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([], [Kind], false)}, {prop: "pointers", name: "pointers", pkg: "internal/reflectlite", typ: $funcType([], [$Bool], false)}, {prop: "common", name: "common", pkg: "internal/reflectlite", typ: $funcType([], [ptrType$1], false)}, {prop: "exportedMethods", name: "exportedMethods", pkg: "internal/reflectlite", typ: $funcType([], [sliceType$5], 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([], [chanDir], false)}, {prop: "Elem", name: "Elem", pkg: "", typ: $funcType([], [Type], false)}, {prop: "In", name: "In", pkg: "", typ: $funcType([$Int], [Type], 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], [Type], false)}, {prop: "Implements", name: "Implements", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "AssignableTo", name: "AssignableTo", pkg: "", typ: $funcType([Type], [$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([], [ptrType$1], false)}, {prop: "Field", name: "Field", pkg: "", typ: $funcType([$Int], [structField], false)}, {prop: "Key", name: "Key", pkg: "", typ: $funcType([], [Type], false)}, {prop: "NumField", name: "NumField", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Method", name: "Method", pkg: "", typ: $funcType([$Int], [Method], false)}, {prop: "uncommon", name: "uncommon", pkg: "internal/reflectlite", typ: $funcType([], [ptrType$4], false)}, {prop: "nameOff", name: "nameOff", pkg: "internal/reflectlite", typ: $funcType([nameOff], [name], false)}, {prop: "typeOff", name: "typeOff", pkg: "internal/reflectlite", typ: $funcType([typeOff], [ptrType$1], false)}, {prop: "ptrTo", name: "ptrTo", pkg: "internal/reflectlite", typ: $funcType([], [ptrType$1], false)}];
+ ptrType$11.methods = [{prop: "NumMethod", name: "NumMethod", pkg: "", typ: $funcType([], [$Int], false)}];
+ ptrType$12.methods = [{prop: "offset", name: "offset", pkg: "internal/reflectlite", typ: $funcType([], [$Uintptr], false)}, {prop: "embedded", name: "embedded", pkg: "internal/reflectlite", typ: $funcType([], [$Bool], false)}];
+ ptrType$13.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}];
+ ptrType$4.methods = [{prop: "methods", name: "methods", pkg: "internal/reflectlite", typ: $funcType([], [sliceType$5], false)}, {prop: "exportedMethods", name: "exportedMethods", pkg: "internal/reflectlite", typ: $funcType([], [sliceType$5], false)}];
+ ptrType$5.methods = [{prop: "in$", name: "in", pkg: "internal/reflectlite", typ: $funcType([], [sliceType$2], false)}, {prop: "out", name: "out", pkg: "internal/reflectlite", typ: $funcType([], [sliceType$2], false)}];
+ name.methods = [{prop: "data", name: "data", pkg: "internal/reflectlite", typ: $funcType([$Int, $String], [ptrType$6], 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)}];
+ ptrType$9.methods = [{prop: "skipUntilValidKey", name: "skipUntilValidKey", pkg: "internal/reflectlite", typ: $funcType([], [], false)}];
+ Value.init("internal/reflectlite", [{prop: "typ", name: "typ", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "ptr", name: "ptr", embedded: false, exported: false, typ: $UnsafePointer, tag: ""}, {prop: "flag", name: "flag", embedded: true, exported: false, typ: flag, tag: ""}]);
+ ValueError.init("", [{prop: "Method", name: "Method", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Kind", name: "Kind", embedded: false, exported: true, typ: Kind, tag: ""}]);
+ Type.init([{prop: "AssignableTo", name: "AssignableTo", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "Comparable", name: "Comparable", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Elem", name: "Elem", pkg: "", typ: $funcType([], [Type], false)}, {prop: "Implements", name: "Implements", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "Kind", name: "Kind", pkg: "", typ: $funcType([], [Kind], 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([], [ptrType$1], false)}, {prop: "uncommon", name: "uncommon", pkg: "internal/reflectlite", typ: $funcType([], [ptrType$4], false)}]);
+ rtype.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: tflag, 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: funcType$2, tag: ""}, {prop: "gcdata", name: "gcdata", embedded: false, exported: false, typ: ptrType$6, tag: ""}, {prop: "str", name: "str", embedded: false, exported: false, typ: nameOff, tag: ""}, {prop: "ptrToThis", name: "ptrToThis", embedded: false, exported: false, typ: typeOff, tag: ""}]);
+ method.init("internal/reflectlite", [{prop: "name", name: "name", embedded: false, exported: false, typ: nameOff, tag: ""}, {prop: "mtyp", name: "mtyp", embedded: false, exported: false, typ: typeOff, tag: ""}, {prop: "ifn", name: "ifn", embedded: false, exported: false, typ: textOff, tag: ""}, {prop: "tfn", name: "tfn", embedded: false, exported: false, typ: textOff, tag: ""}]);
+ arrayType.init("internal/reflectlite", [{prop: "rtype", name: "rtype", embedded: true, exported: false, typ: rtype, tag: ""}, {prop: "elem", name: "elem", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "slice", name: "slice", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "len", name: "len", embedded: false, exported: false, typ: $Uintptr, tag: ""}]);
+ chanType.init("internal/reflectlite", [{prop: "rtype", name: "rtype", embedded: true, exported: false, typ: rtype, tag: ""}, {prop: "elem", name: "elem", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "dir", name: "dir", embedded: false, exported: false, typ: $Uintptr, tag: ""}]);
+ imethod.init("internal/reflectlite", [{prop: "name", name: "name", embedded: false, exported: false, typ: nameOff, tag: ""}, {prop: "typ", name: "typ", embedded: false, exported: false, typ: typeOff, tag: ""}]);
+ interfaceType.init("internal/reflectlite", [{prop: "rtype", name: "rtype", embedded: true, exported: false, typ: rtype, tag: ""}, {prop: "pkgPath", name: "pkgPath", embedded: false, exported: false, typ: name, tag: ""}, {prop: "methods", name: "methods", embedded: false, exported: false, typ: sliceType$9, tag: ""}]);
+ mapType.init("internal/reflectlite", [{prop: "rtype", name: "rtype", embedded: true, exported: false, typ: rtype, tag: ""}, {prop: "key", name: "key", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "elem", name: "elem", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "bucket", name: "bucket", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "hasher", name: "hasher", embedded: false, exported: false, typ: funcType$3, 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: ""}]);
+ ptrType.init("internal/reflectlite", [{prop: "rtype", name: "rtype", embedded: true, exported: false, typ: rtype, tag: ""}, {prop: "elem", name: "elem", embedded: false, exported: false, typ: ptrType$1, tag: ""}]);
+ sliceType.init("internal/reflectlite", [{prop: "rtype", name: "rtype", embedded: true, exported: false, typ: rtype, tag: ""}, {prop: "elem", name: "elem", embedded: false, exported: false, typ: ptrType$1, tag: ""}]);
+ structField.init("internal/reflectlite", [{prop: "name", name: "name", embedded: false, exported: false, typ: name, tag: ""}, {prop: "typ", name: "typ", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "offsetEmbed", name: "offsetEmbed", embedded: false, exported: false, typ: $Uintptr, tag: ""}]);
+ structType.init("internal/reflectlite", [{prop: "rtype", name: "rtype", embedded: true, exported: false, typ: rtype, tag: ""}, {prop: "pkgPath", name: "pkgPath", embedded: false, exported: false, typ: name, tag: ""}, {prop: "fields", name: "fields", embedded: false, exported: false, typ: sliceType$10, tag: ""}]);
+ errorString.init("internal/reflectlite", [{prop: "s", name: "s", embedded: false, exported: false, typ: $String, tag: ""}]);
+ Method.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: Type, tag: ""}, {prop: "Func", name: "Func", embedded: false, exported: true, typ: Value, tag: ""}, {prop: "Index", name: "Index", embedded: false, exported: true, typ: $Int, tag: ""}]);
+ uncommonType.init("internal/reflectlite", [{prop: "pkgPath", name: "pkgPath", embedded: false, exported: false, typ: nameOff, 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: sliceType$5, tag: ""}]);
+ funcType.init("internal/reflectlite", [{prop: "rtype", name: "rtype", embedded: true, exported: false, typ: rtype, 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: sliceType$2, tag: ""}, {prop: "_out", name: "_out", embedded: false, exported: false, typ: sliceType$2, tag: ""}]);
+ name.init("internal/reflectlite", [{prop: "bytes", name: "bytes", embedded: false, exported: false, typ: ptrType$6, tag: ""}]);
+ nameData.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: ""}]);
+ mapIter.init("internal/reflectlite", [{prop: "t", name: "t", embedded: false, exported: false, typ: Type, tag: ""}, {prop: "m", name: "m", embedded: false, exported: false, typ: ptrType$2, tag: ""}, {prop: "keys", name: "keys", embedded: false, exported: false, typ: ptrType$2, tag: ""}, {prop: "i", name: "i", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "last", name: "last", embedded: false, exported: false, typ: ptrType$2, tag: ""}]);
+ TypeEx.init([{prop: "AssignableTo", name: "AssignableTo", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "Comparable", name: "Comparable", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Elem", name: "Elem", pkg: "", typ: $funcType([], [Type], false)}, {prop: "Implements", name: "Implements", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "Key", name: "Key", pkg: "", typ: $funcType([], [Type], false)}, {prop: "Kind", name: "Kind", pkg: "", typ: $funcType([], [Kind], 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([], [ptrType$1], false)}, {prop: "uncommon", name: "uncommon", pkg: "internal/reflectlite", typ: $funcType([], [ptrType$4], 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 = js.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = goarch.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = unsafeheader.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = runtime.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ uint8Type = ptrType$1.nil;
+ nameOffList = sliceType$1.nil;
+ typeOffList = sliceType$2.nil;
+ kindNames = new sliceType$3(["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"]);
+ callHelper = $assertType($internalize($call, $emptyInterface), funcType$1);
+ $pkg.ErrSyntax = new errorString.ptr("invalid syntax");
+ initialized = false;
+ idJsType = "_jsType";
+ idReflectType = "_reflectType";
+ idKindType = "kindType";
+ idRtype = "_rtype";
+ uncommonTypeMap = {};
+ nameMap = {};
+ jsObjectPtr = reflectType($jsObjectPtr);
+ selectHelper = $assertType($internalize($select, $emptyInterface), funcType$1);
+ $r = init(); /* */ $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["errors"] = (function() {
+ var $pkg = {}, $init, reflectlite, errorString, ptrType, interfaceType, interfaceType$1, ptrType$1, errorType, _r, Unwrap, Is, New;
+ reflectlite = $packages["internal/reflectlite"];
+ errorString = $pkg.errorString = $newType(0, $kindStruct, "errors.errorString", true, "errors", false, function(s_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.s = "";
+ return;
+ }
+ this.s = s_;
+ });
+ ptrType = $ptrType($error);
+ interfaceType = $interfaceType([{prop: "Unwrap", name: "Unwrap", pkg: "", typ: $funcType([], [$error], false)}]);
+ interfaceType$1 = $interfaceType([{prop: "Is", name: "Is", pkg: "", typ: $funcType([$error], [$Bool], false)}]);
+ ptrType$1 = $ptrType(errorString);
+ Unwrap = function(err) {
+ var {$24r, _r$1, _tuple, err, ok, u, $s, $r, $c} = $restore(this, {err});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _tuple = $assertType(err, interfaceType, true);
+ u = _tuple[0];
+ ok = _tuple[1];
+ if (!ok) {
+ $s = -1; return $ifaceNil;
+ }
+ _r$1 = u.Unwrap(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ $24r = _r$1;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: Unwrap, $c: true, $r, $24r, _r$1, _tuple, err, ok, u, $s};return $f;
+ };
+ $pkg.Unwrap = Unwrap;
+ Is = function(err, target) {
+ var {_r$1, _r$2, _r$3, _tuple, _v, err, isComparable, ok, target, x, $s, $r, $c} = $restore(this, {err, target});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ if ($interfaceIsEqual(target, $ifaceNil)) {
+ $s = -1; return $interfaceIsEqual(err, target);
+ }
+ _r$1 = reflectlite.TypeOf(target).Comparable(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ isComparable = _r$1;
+ /* while (true) { */ case 2:
+ if (isComparable && $interfaceIsEqual(err, target)) {
+ $s = -1; return true;
+ }
+ _tuple = $assertType(err, interfaceType$1, true);
+ x = _tuple[0];
+ ok = _tuple[1];
+ if (!(ok)) { _v = false; $s = 6; continue s; }
+ _r$2 = x.Is(target); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ _v = _r$2; case 6:
+ /* */ if (_v) { $s = 4; continue; }
+ /* */ $s = 5; continue;
+ /* if (_v) { */ case 4:
+ $s = -1; return true;
+ /* } */ case 5:
+ _r$3 = Unwrap(err); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
+ err = _r$3;
+ if ($interfaceIsEqual(err, $ifaceNil)) {
+ $s = -1; return false;
+ }
+ $s = 2; continue;
+ case 3:
+ $s = -1; return false;
+ /* */ } return; } var $f = {$blk: Is, $c: true, $r, _r$1, _r$2, _r$3, _tuple, _v, err, isComparable, ok, target, x, $s};return $f;
+ };
+ $pkg.Is = Is;
+ New = function(text) {
+ var text;
+ return new errorString.ptr(text);
+ };
+ $pkg.New = New;
+ errorString.ptr.prototype.Error = function() {
+ var e;
+ e = this;
+ return e.s;
+ };
+ errorString.prototype.Error = function() { return this.$val.Error(); };
+ ptrType$1.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}];
+ errorString.init("errors", [{prop: "s", name: "s", 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 = reflectlite.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ _r = reflectlite.TypeOf((ptrType.nil)).Elem(); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ errorType = _r;
+ /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
+ };
+ $pkg.$init = $init;
+ return $pkg;
+})();
+$packages["internal/cpu"] = (function() {
+ var $pkg = {}, $init, CacheLinePad, arrayType, structType, structType$2, structType$5;
+ CacheLinePad = $pkg.CacheLinePad = $newType(0, $kindStruct, "cpu.CacheLinePad", true, "internal/cpu", true, function(_$0_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this._$0 = arrayType.zero();
+ return;
+ }
+ this._$0 = _$0_;
+ });
+ arrayType = $arrayType($Uint8, 0);
+ structType = $structType("internal/cpu", [{prop: "_$0", name: "_", embedded: false, exported: false, typ: CacheLinePad, tag: ""}, {prop: "HasAES", name: "HasAES", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasADX", name: "HasADX", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasAVX", name: "HasAVX", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasAVX2", name: "HasAVX2", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasBMI1", name: "HasBMI1", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasBMI2", name: "HasBMI2", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasERMS", name: "HasERMS", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasFMA", name: "HasFMA", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasOSXSAVE", name: "HasOSXSAVE", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasPCLMULQDQ", name: "HasPCLMULQDQ", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasPOPCNT", name: "HasPOPCNT", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasRDTSCP", name: "HasRDTSCP", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSSE3", name: "HasSSE3", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSSSE3", name: "HasSSSE3", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSSE41", name: "HasSSE41", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSSE42", name: "HasSSE42", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "_$17", name: "_", embedded: false, exported: false, typ: CacheLinePad, tag: ""}]);
+ structType$2 = $structType("internal/cpu", [{prop: "_$0", name: "_", embedded: false, exported: false, typ: CacheLinePad, tag: ""}, {prop: "HasAES", name: "HasAES", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasPMULL", name: "HasPMULL", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSHA1", name: "HasSHA1", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSHA2", name: "HasSHA2", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasCRC32", name: "HasCRC32", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasATOMICS", name: "HasATOMICS", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasCPUID", name: "HasCPUID", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "IsNeoverseN1", name: "IsNeoverseN1", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "IsZeus", name: "IsZeus", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "_$10", name: "_", embedded: false, exported: false, typ: CacheLinePad, tag: ""}]);
+ structType$5 = $structType("internal/cpu", [{prop: "_$0", name: "_", embedded: false, exported: false, typ: CacheLinePad, tag: ""}, {prop: "HasZARCH", name: "HasZARCH", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSTFLE", name: "HasSTFLE", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasLDISP", name: "HasLDISP", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasEIMM", name: "HasEIMM", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasDFP", name: "HasDFP", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasETF3EH", name: "HasETF3EH", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasMSA", name: "HasMSA", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasAES", name: "HasAES", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasAESCBC", name: "HasAESCBC", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasAESCTR", name: "HasAESCTR", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasAESGCM", name: "HasAESGCM", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasGHASH", name: "HasGHASH", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSHA1", name: "HasSHA1", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSHA256", name: "HasSHA256", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSHA512", name: "HasSHA512", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSHA3", name: "HasSHA3", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasVX", name: "HasVX", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasVXE", name: "HasVXE", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasKDSA", name: "HasKDSA", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasECDSA", name: "HasECDSA", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasEDDSA", name: "HasEDDSA", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "_$22", name: "_", embedded: false, exported: false, typ: CacheLinePad, tag: ""}]);
+ CacheLinePad.init("internal/cpu", [{prop: "_$0", name: "_", embedded: false, exported: false, typ: arrayType, 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:
+ $pkg.X86 = new structType.ptr(new CacheLinePad.ptr(arrayType.zero()), false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, new CacheLinePad.ptr(arrayType.zero()));
+ $pkg.ARM64 = new structType$2.ptr(new CacheLinePad.ptr(arrayType.zero()), false, false, false, false, false, false, false, false, false, new CacheLinePad.ptr(arrayType.zero()));
+ $pkg.S390X = new structType$5.ptr(new CacheLinePad.ptr(arrayType.zero()), false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, new CacheLinePad.ptr(arrayType.zero()));
+ /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
+ };
+ $pkg.$init = $init;
+ return $pkg;
+})();
+$packages["internal/bytealg"] = (function() {
+ var $pkg = {}, $init, cpu, Index, IndexString, Cutover, Count, HashStrBytes, IndexRabinKarpBytes, Equal, IndexByteString;
+ cpu = $packages["internal/cpu"];
+ Index = function(a, b) {
+ var a, b;
+ $panic(new $String("unimplemented"));
+ };
+ $pkg.Index = Index;
+ IndexString = function(a, b) {
+ var a, b;
+ $panic(new $String("unimplemented"));
+ };
+ $pkg.IndexString = IndexString;
+ Cutover = function(n) {
+ var n;
+ $panic(new $String("unimplemented"));
+ };
+ $pkg.Cutover = Cutover;
+ Count = function(b, c) {
+ var _i, _ref, b, c, n, x;
+ n = 0;
+ _ref = b;
+ _i = 0;
+ while (true) {
+ if (!(_i < _ref.$length)) { break; }
+ x = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]);
+ if (x === c) {
+ n = n + (1) >> 0;
+ }
+ _i++;
+ }
+ return n;
+ };
+ $pkg.Count = Count;
+ HashStrBytes = function(sep) {
+ var _tmp, _tmp$1, hash, i, i$1, pow, sep, sq;
+ hash = 0;
+ i = 0;
+ while (true) {
+ if (!(i < sep.$length)) { break; }
+ hash = ($imul(hash, 16777619) >>> 0) + ((((i < 0 || i >= sep.$length) ? ($throwRuntimeError("index out of range"), undefined) : sep.$array[sep.$offset + i]) >>> 0)) >>> 0;
+ i = i + (1) >> 0;
+ }
+ _tmp = 1;
+ _tmp$1 = 16777619;
+ pow = _tmp;
+ sq = _tmp$1;
+ i$1 = sep.$length;
+ while (true) {
+ if (!(i$1 > 0)) { break; }
+ if (!(((i$1 & 1) === 0))) {
+ pow = $imul(pow, (sq)) >>> 0;
+ }
+ sq = $imul(sq, (sq)) >>> 0;
+ i$1 = (i$1 >> $min((1), 31)) >> 0;
+ }
+ return [hash, pow];
+ };
+ $pkg.HashStrBytes = HashStrBytes;
+ IndexRabinKarpBytes = function(s, sep) {
+ var _tuple, h, hashsep, i, i$1, n, pow, s, sep, x;
+ _tuple = HashStrBytes(sep);
+ hashsep = _tuple[0];
+ pow = _tuple[1];
+ n = sep.$length;
+ h = 0;
+ i = 0;
+ while (true) {
+ if (!(i < n)) { break; }
+ h = ($imul(h, 16777619) >>> 0) + ((((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]) >>> 0)) >>> 0;
+ i = i + (1) >> 0;
+ }
+ if ((h === hashsep) && Equal($subslice(s, 0, n), sep)) {
+ return 0;
+ }
+ i$1 = n;
+ while (true) {
+ if (!(i$1 < s.$length)) { break; }
+ h = $imul(h, (16777619)) >>> 0;
+ h = h + (((((i$1 < 0 || i$1 >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i$1]) >>> 0))) >>> 0;
+ h = h - (($imul(pow, (((x = i$1 - n >> 0, ((x < 0 || x >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + x])) >>> 0))) >>> 0)) >>> 0;
+ i$1 = i$1 + (1) >> 0;
+ if ((h === hashsep) && Equal($subslice(s, (i$1 - n >> 0), i$1), sep)) {
+ return i$1 - n >> 0;
+ }
+ }
+ return -1;
+ };
+ $pkg.IndexRabinKarpBytes = IndexRabinKarpBytes;
+ Equal = function(a, b) {
+ var _i, _ref, a, b, c, i;
+ if (!((a.$length === b.$length))) {
+ return false;
+ }
+ _ref = a;
+ _i = 0;
+ while (true) {
+ if (!(_i < _ref.$length)) { break; }
+ i = _i;
+ c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]);
+ if (!((c === ((i < 0 || i >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + i])))) {
+ return false;
+ }
+ _i++;
+ }
+ return true;
+ };
+ $pkg.Equal = Equal;
+ IndexByteString = function(s, c) {
+ var c, i, s;
+ i = 0;
+ while (true) {
+ if (!(i < s.length)) { break; }
+ if (s.charCodeAt(i) === c) {
+ return i;
+ }
+ i = i + (1) >> 0;
+ }
+ return -1;
+ };
+ $pkg.IndexByteString = IndexByteString;
+ $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 = cpu.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $pkg.MaxLen = 0;
+ /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
+ };
+ $pkg.$init = $init;
+ return $pkg;
+})();
+$packages["internal/race"] = (function() {
+ var $pkg = {}, $init, Acquire, Release, ReleaseMerge, Disable, Enable;
+ Acquire = function(addr) {
+ var addr;
+ };
+ $pkg.Acquire = Acquire;
+ Release = function(addr) {
+ var addr;
+ };
+ $pkg.Release = Release;
+ ReleaseMerge = function(addr) {
+ var addr;
+ };
+ $pkg.ReleaseMerge = ReleaseMerge;
+ Disable = function() {
+ };
+ $pkg.Disable = Disable;
+ Enable = function() {
+ };
+ $pkg.Enable = Enable;
+ $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["sync/atomic"] = (function() {
+ var $pkg = {}, $init, js, Value, ptrType, SwapInt32, SwapInt64, SwapUint32, SwapUint64, CompareAndSwapInt32, CompareAndSwapInt64, CompareAndSwapUint32, CompareAndSwapUint64, CompareAndSwapPointer, AddInt32, AddUint32, AddInt64, AddUint64, LoadInt32, LoadInt64, LoadUint32, LoadUint64, LoadPointer, StoreInt32, StoreInt64, StoreUint32, StoreUint64, StorePointer, sameType;
+ js = $packages["github.com/gopherjs/gopherjs/js"];
+ Value = $pkg.Value = $newType(0, $kindStruct, "atomic.Value", true, "sync/atomic", true, function(v_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.v = $ifaceNil;
+ return;
+ }
+ this.v = v_;
+ });
+ ptrType = $ptrType(Value);
+ SwapInt32 = function(addr, new$1) {
+ var addr, new$1, old;
+ old = addr.$get();
+ addr.$set(new$1);
+ return old;
+ };
+ $pkg.SwapInt32 = SwapInt32;
+ SwapInt64 = function(addr, new$1) {
+ var addr, new$1, old;
+ old = addr.$get();
+ addr.$set(new$1);
+ return old;
+ };
+ $pkg.SwapInt64 = SwapInt64;
+ SwapUint32 = function(addr, new$1) {
+ var addr, new$1, old;
+ old = addr.$get();
+ addr.$set(new$1);
+ return old;
+ };
+ $pkg.SwapUint32 = SwapUint32;
+ SwapUint64 = function(addr, new$1) {
+ var addr, new$1, old;
+ old = addr.$get();
+ addr.$set(new$1);
+ return old;
+ };
+ $pkg.SwapUint64 = SwapUint64;
+ CompareAndSwapInt32 = function(addr, old, new$1) {
+ var addr, new$1, old;
+ if (addr.$get() === old) {
+ addr.$set(new$1);
+ return true;
+ }
+ return false;
+ };
+ $pkg.CompareAndSwapInt32 = CompareAndSwapInt32;
+ CompareAndSwapInt64 = function(addr, old, new$1) {
+ var addr, new$1, old, x;
+ if ((x = addr.$get(), (x.$high === old.$high && x.$low === old.$low))) {
+ addr.$set(new$1);
+ return true;
+ }
+ return false;
+ };
+ $pkg.CompareAndSwapInt64 = CompareAndSwapInt64;
+ CompareAndSwapUint32 = function(addr, old, new$1) {
+ var addr, new$1, old;
+ if (addr.$get() === old) {
+ addr.$set(new$1);
+ return true;
+ }
+ return false;
+ };
+ $pkg.CompareAndSwapUint32 = CompareAndSwapUint32;
+ CompareAndSwapUint64 = function(addr, old, new$1) {
+ var addr, new$1, old, x;
+ if ((x = addr.$get(), (x.$high === old.$high && x.$low === old.$low))) {
+ addr.$set(new$1);
+ return true;
+ }
+ return false;
+ };
+ $pkg.CompareAndSwapUint64 = CompareAndSwapUint64;
+ CompareAndSwapPointer = function(addr, old, new$1) {
+ var addr, new$1, old;
+ if (addr.$get() === old) {
+ addr.$set(new$1);
+ return true;
+ }
+ return false;
+ };
+ $pkg.CompareAndSwapPointer = CompareAndSwapPointer;
+ AddInt32 = function(addr, delta) {
+ var addr, delta, new$1;
+ new$1 = addr.$get() + delta >> 0;
+ addr.$set(new$1);
+ return new$1;
+ };
+ $pkg.AddInt32 = AddInt32;
+ AddUint32 = function(addr, delta) {
+ var addr, delta, new$1;
+ new$1 = addr.$get() + delta >>> 0;
+ addr.$set(new$1);
+ return new$1;
+ };
+ $pkg.AddUint32 = AddUint32;
+ AddInt64 = function(addr, delta) {
+ var addr, delta, new$1, x;
+ new$1 = (x = addr.$get(), new $Int64(x.$high + delta.$high, x.$low + delta.$low));
+ addr.$set(new$1);
+ return new$1;
+ };
+ $pkg.AddInt64 = AddInt64;
+ AddUint64 = function(addr, delta) {
+ var addr, delta, new$1, x;
+ new$1 = (x = addr.$get(), new $Uint64(x.$high + delta.$high, x.$low + delta.$low));
+ addr.$set(new$1);
+ return new$1;
+ };
+ $pkg.AddUint64 = AddUint64;
+ LoadInt32 = function(addr) {
+ var addr;
+ return addr.$get();
+ };
+ $pkg.LoadInt32 = LoadInt32;
+ LoadInt64 = function(addr) {
+ var addr;
+ return addr.$get();
+ };
+ $pkg.LoadInt64 = LoadInt64;
+ LoadUint32 = function(addr) {
+ var addr;
+ return addr.$get();
+ };
+ $pkg.LoadUint32 = LoadUint32;
+ LoadUint64 = function(addr) {
+ var addr;
+ return addr.$get();
+ };
+ $pkg.LoadUint64 = LoadUint64;
+ LoadPointer = function(addr) {
+ var addr;
+ return addr.$get();
+ };
+ $pkg.LoadPointer = LoadPointer;
+ StoreInt32 = function(addr, val) {
+ var addr, val;
+ addr.$set(val);
+ };
+ $pkg.StoreInt32 = StoreInt32;
+ StoreInt64 = function(addr, val) {
+ var addr, val;
+ addr.$set(val);
+ };
+ $pkg.StoreInt64 = StoreInt64;
+ StoreUint32 = function(addr, val) {
+ var addr, val;
+ addr.$set(val);
+ };
+ $pkg.StoreUint32 = StoreUint32;
+ StoreUint64 = function(addr, val) {
+ var addr, val;
+ addr.$set(val);
+ };
+ $pkg.StoreUint64 = StoreUint64;
+ StorePointer = function(addr, val) {
+ var addr, val;
+ addr.$set(val);
+ };
+ $pkg.StorePointer = StorePointer;
+ Value.ptr.prototype.Load = function() {
+ var v, x;
+ x = $ifaceNil;
+ v = this;
+ x = v.v;
+ return x;
+ };
+ Value.prototype.Load = function() { return this.$val.Load(); };
+ Value.ptr.prototype.Store = function(new$1) {
+ var new$1, v;
+ v = this;
+ v.checkNew("store", new$1);
+ v.v = new$1;
+ };
+ Value.prototype.Store = function(new$1) { return this.$val.Store(new$1); };
+ Value.ptr.prototype.Swap = function(new$1) {
+ var _tmp, _tmp$1, new$1, old, v;
+ old = $ifaceNil;
+ v = this;
+ v.checkNew("swap", new$1);
+ _tmp = v.v;
+ _tmp$1 = new$1;
+ old = _tmp;
+ v.v = _tmp$1;
+ old = old;
+ return old;
+ };
+ Value.prototype.Swap = function(new$1) { return this.$val.Swap(new$1); };
+ Value.ptr.prototype.CompareAndSwap = function(old, new$1) {
+ var new$1, old, swapped, v;
+ swapped = false;
+ v = this;
+ v.checkNew("compare and swap", new$1);
+ if (!($interfaceIsEqual(v.v, $ifaceNil) && $interfaceIsEqual(old, $ifaceNil)) && !sameType(old, new$1)) {
+ $panic(new $String("sync/atomic: compare and swap of inconsistently typed values into Value"));
+ }
+ if (!($interfaceIsEqual(v.v, old))) {
+ swapped = false;
+ return swapped;
+ }
+ v.v = new$1;
+ swapped = true;
+ return swapped;
+ };
+ Value.prototype.CompareAndSwap = function(old, new$1) { return this.$val.CompareAndSwap(old, new$1); };
+ Value.ptr.prototype.checkNew = function(op, new$1) {
+ var new$1, op, v;
+ v = this;
+ if ($interfaceIsEqual(new$1, $ifaceNil)) {
+ $panic(new $String("sync/atomic: " + op + " of nil value into Value"));
+ }
+ if (!($interfaceIsEqual(v.v, $ifaceNil)) && !sameType(new$1, v.v)) {
+ $panic(new $String("sync/atomic: " + op + " of inconsistently typed value into Value"));
+ }
+ };
+ Value.prototype.checkNew = function(op, new$1) { return this.$val.checkNew(op, new$1); };
+ sameType = function(x, y) {
+ var x, y;
+ return x.constructor === y.constructor;
+ };
+ ptrType.methods = [{prop: "Load", name: "Load", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "Store", name: "Store", pkg: "", typ: $funcType([$emptyInterface], [], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$emptyInterface], [$emptyInterface], false)}, {prop: "CompareAndSwap", name: "CompareAndSwap", pkg: "", typ: $funcType([$emptyInterface, $emptyInterface], [$Bool], false)}, {prop: "checkNew", name: "checkNew", pkg: "sync/atomic", typ: $funcType([$String, $emptyInterface], [], false)}];
+ Value.init("sync/atomic", [{prop: "v", name: "v", embedded: false, exported: false, typ: $emptyInterface, 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 = js.$init(); /* */ $s = 1; case 1: 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["sync"] = (function() {
+ var $pkg = {}, $init, js, race, atomic, RWMutex, rlocker, notifyList, Once, Mutex, Locker, Map, readOnly, entry, copyChecker, noCopy, WaitGroup, Pool, Cond, ptrType, ptrType$1, ptrType$2, ptrType$3, ptrType$4, ptrType$5, ptrType$9, ptrType$10, structType, chanType, sliceType$2, funcType, ptrType$14, ptrType$15, funcType$1, ptrType$16, mapType, ptrType$17, ptrType$18, ptrType$19, chanType$1, sliceType$3, ptrType$20, funcType$2, ptrType$21, expunged, semWaiters, semAwoken, init, runtime_doSpin, newEntry, NewCond, runtime_Semacquire, runtime_SemacquireMutex, runtime_Semrelease, runtime_notifyListCheck, runtime_canSpin, runtime_nanotime, throw$1;
+ js = $packages["github.com/gopherjs/gopherjs/js"];
+ race = $packages["internal/race"];
+ atomic = $packages["sync/atomic"];
+ RWMutex = $pkg.RWMutex = $newType(0, $kindStruct, "sync.RWMutex", true, "sync", true, function(w_, writerSem_, readerSem_, readerCount_, readerWait_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.w = new Mutex.ptr(0, 0);
+ this.writerSem = 0;
+ this.readerSem = 0;
+ this.readerCount = 0;
+ this.readerWait = 0;
+ return;
+ }
+ this.w = w_;
+ this.writerSem = writerSem_;
+ this.readerSem = readerSem_;
+ this.readerCount = readerCount_;
+ this.readerWait = readerWait_;
+ });
+ rlocker = $pkg.rlocker = $newType(0, $kindStruct, "sync.rlocker", true, "sync", false, function(w_, writerSem_, readerSem_, readerCount_, readerWait_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.w = new Mutex.ptr(0, 0);
+ this.writerSem = 0;
+ this.readerSem = 0;
+ this.readerCount = 0;
+ this.readerWait = 0;
+ return;
+ }
+ this.w = w_;
+ this.writerSem = writerSem_;
+ this.readerSem = readerSem_;
+ this.readerCount = readerCount_;
+ this.readerWait = readerWait_;
+ });
+ notifyList = $pkg.notifyList = $newType(0, $kindStruct, "sync.notifyList", true, "sync", false, function(wait_, notify_, lock_, head_, tail_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.wait = 0;
+ this.notify = 0;
+ this.lock = 0;
+ this.head = 0;
+ this.tail = 0;
+ return;
+ }
+ this.wait = wait_;
+ this.notify = notify_;
+ this.lock = lock_;
+ this.head = head_;
+ this.tail = tail_;
+ });
+ Once = $pkg.Once = $newType(0, $kindStruct, "sync.Once", true, "sync", true, function(done_, m_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.done = 0;
+ this.m = new Mutex.ptr(0, 0);
+ return;
+ }
+ this.done = done_;
+ this.m = m_;
+ });
+ Mutex = $pkg.Mutex = $newType(0, $kindStruct, "sync.Mutex", true, "sync", true, function(state_, sema_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.state = 0;
+ this.sema = 0;
+ return;
+ }
+ this.state = state_;
+ this.sema = sema_;
+ });
+ Locker = $pkg.Locker = $newType(8, $kindInterface, "sync.Locker", true, "sync", true, null);
+ Map = $pkg.Map = $newType(0, $kindStruct, "sync.Map", true, "sync", true, function(mu_, read_, dirty_, misses_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.mu = new Mutex.ptr(0, 0);
+ this.read = new atomic.Value.ptr($ifaceNil);
+ this.dirty = false;
+ this.misses = 0;
+ return;
+ }
+ this.mu = mu_;
+ this.read = read_;
+ this.dirty = dirty_;
+ this.misses = misses_;
+ });
+ readOnly = $pkg.readOnly = $newType(0, $kindStruct, "sync.readOnly", true, "sync", false, function(m_, amended_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.m = false;
+ this.amended = false;
+ return;
+ }
+ this.m = m_;
+ this.amended = amended_;
+ });
+ entry = $pkg.entry = $newType(0, $kindStruct, "sync.entry", true, "sync", false, function(p_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.p = 0;
+ return;
+ }
+ this.p = p_;
+ });
+ copyChecker = $pkg.copyChecker = $newType(4, $kindUintptr, "sync.copyChecker", true, "sync", false, null);
+ noCopy = $pkg.noCopy = $newType(0, $kindStruct, "sync.noCopy", true, "sync", false, function() {
+ this.$val = this;
+ if (arguments.length === 0) {
+ return;
+ }
+ });
+ WaitGroup = $pkg.WaitGroup = $newType(0, $kindStruct, "sync.WaitGroup", true, "sync", true, function(counter_, ch_, state1_, state2_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.counter = 0;
+ this.ch = $chanNil;
+ this.state1 = new $Uint64(0, 0);
+ this.state2 = 0;
+ return;
+ }
+ this.counter = counter_;
+ this.ch = ch_;
+ this.state1 = state1_;
+ this.state2 = state2_;
+ });
+ Pool = $pkg.Pool = $newType(0, $kindStruct, "sync.Pool", true, "sync", true, function(store_, New_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.store = sliceType$3.nil;
+ this.New = $throwNilPointerError;
+ return;
+ }
+ this.store = store_;
+ this.New = New_;
+ });
+ Cond = $pkg.Cond = $newType(0, $kindStruct, "sync.Cond", true, "sync", true, function(noCopy_, L_, notify_, checker_, n_, ch_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.noCopy = new noCopy.ptr();
+ this.L = $ifaceNil;
+ this.notify = new notifyList.ptr(0, 0, 0, 0, 0);
+ this.checker = 0;
+ this.n = 0;
+ this.ch = $chanNil;
+ return;
+ }
+ this.noCopy = noCopy_;
+ this.L = L_;
+ this.notify = notify_;
+ this.checker = checker_;
+ this.n = n_;
+ this.ch = ch_;
+ });
+ ptrType = $ptrType($Uint64);
+ ptrType$1 = $ptrType($Uint32);
+ ptrType$2 = $ptrType($Int32);
+ ptrType$3 = $ptrType(rlocker);
+ ptrType$4 = $ptrType(RWMutex);
+ ptrType$5 = $ptrType($UnsafePointer);
+ ptrType$9 = $ptrType($emptyInterface);
+ ptrType$10 = $ptrType(entry);
+ structType = $structType("", []);
+ chanType = $chanType($Bool, false, false);
+ sliceType$2 = $sliceType(chanType);
+ funcType = $funcType([], [], false);
+ ptrType$14 = $ptrType(Once);
+ ptrType$15 = $ptrType(Mutex);
+ funcType$1 = $funcType([$emptyInterface, $emptyInterface], [$Bool], false);
+ ptrType$16 = $ptrType(Map);
+ mapType = $mapType($emptyInterface, ptrType$10);
+ ptrType$17 = $ptrType(copyChecker);
+ ptrType$18 = $ptrType(noCopy);
+ ptrType$19 = $ptrType(WaitGroup);
+ chanType$1 = $chanType(structType, false, false);
+ sliceType$3 = $sliceType($emptyInterface);
+ ptrType$20 = $ptrType(Pool);
+ funcType$2 = $funcType([], [$emptyInterface], false);
+ ptrType$21 = $ptrType(Cond);
+ WaitGroup.ptr.prototype.Done = function() {
+ var wg;
+ wg = this;
+ wg.Add(-1);
+ };
+ WaitGroup.prototype.Done = function() { return this.$val.Done(); };
+ RWMutex.ptr.prototype.RLock = function() {
+ var {rw, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ rw = this;
+ if (false) {
+ $unused(rw.w.state);
+ race.Disable();
+ }
+ /* */ if (atomic.AddInt32((rw.$ptr_readerCount || (rw.$ptr_readerCount = new ptrType$2(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw))), 1) < 0) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (atomic.AddInt32((rw.$ptr_readerCount || (rw.$ptr_readerCount = new ptrType$2(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw))), 1) < 0) { */ case 1:
+ $r = runtime_SemacquireMutex((rw.$ptr_readerSem || (rw.$ptr_readerSem = new ptrType$1(function() { return this.$target.readerSem; }, function($v) { this.$target.readerSem = $v; }, rw))), false, 0); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ /* } */ case 2:
+ if (false) {
+ race.Enable();
+ race.Acquire(((rw.$ptr_readerSem || (rw.$ptr_readerSem = new ptrType$1(function() { return this.$target.readerSem; }, function($v) { this.$target.readerSem = $v; }, rw)))));
+ }
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: RWMutex.ptr.prototype.RLock, $c: true, $r, rw, $s};return $f;
+ };
+ RWMutex.prototype.RLock = function() { return this.$val.RLock(); };
+ RWMutex.ptr.prototype.TryRLock = function() {
+ var c, rw;
+ rw = this;
+ if (false) {
+ $unused(rw.w.state);
+ race.Disable();
+ }
+ while (true) {
+ c = atomic.LoadInt32((rw.$ptr_readerCount || (rw.$ptr_readerCount = new ptrType$2(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw))));
+ if (c < 0) {
+ if (false) {
+ race.Enable();
+ }
+ return false;
+ }
+ if (atomic.CompareAndSwapInt32((rw.$ptr_readerCount || (rw.$ptr_readerCount = new ptrType$2(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw))), c, c + 1 >> 0)) {
+ if (false) {
+ race.Enable();
+ race.Acquire(((rw.$ptr_readerSem || (rw.$ptr_readerSem = new ptrType$1(function() { return this.$target.readerSem; }, function($v) { this.$target.readerSem = $v; }, rw)))));
+ }
+ return true;
+ }
+ }
+ };
+ RWMutex.prototype.TryRLock = function() { return this.$val.TryRLock(); };
+ RWMutex.ptr.prototype.RUnlock = function() {
+ var {r, rw, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ rw = this;
+ if (false) {
+ $unused(rw.w.state);
+ race.ReleaseMerge(((rw.$ptr_writerSem || (rw.$ptr_writerSem = new ptrType$1(function() { return this.$target.writerSem; }, function($v) { this.$target.writerSem = $v; }, rw)))));
+ race.Disable();
+ }
+ r = atomic.AddInt32((rw.$ptr_readerCount || (rw.$ptr_readerCount = new ptrType$2(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw))), -1);
+ /* */ if (r < 0) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (r < 0) { */ case 1:
+ $r = rw.rUnlockSlow(r); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ /* } */ case 2:
+ if (false) {
+ race.Enable();
+ }
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: RWMutex.ptr.prototype.RUnlock, $c: true, $r, r, rw, $s};return $f;
+ };
+ RWMutex.prototype.RUnlock = function() { return this.$val.RUnlock(); };
+ RWMutex.ptr.prototype.rUnlockSlow = function(r) {
+ var {r, rw, $s, $r, $c} = $restore(this, {r});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ rw = this;
+ if (((r + 1 >> 0) === 0) || ((r + 1 >> 0) === -1073741824)) {
+ race.Enable();
+ throw$1("sync: RUnlock of unlocked RWMutex");
+ }
+ /* */ if (atomic.AddInt32((rw.$ptr_readerWait || (rw.$ptr_readerWait = new ptrType$2(function() { return this.$target.readerWait; }, function($v) { this.$target.readerWait = $v; }, rw))), -1) === 0) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (atomic.AddInt32((rw.$ptr_readerWait || (rw.$ptr_readerWait = new ptrType$2(function() { return this.$target.readerWait; }, function($v) { this.$target.readerWait = $v; }, rw))), -1) === 0) { */ case 1:
+ $r = runtime_Semrelease((rw.$ptr_writerSem || (rw.$ptr_writerSem = new ptrType$1(function() { return this.$target.writerSem; }, function($v) { this.$target.writerSem = $v; }, rw))), false, 1); /* */ $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: RWMutex.ptr.prototype.rUnlockSlow, $c: true, $r, r, rw, $s};return $f;
+ };
+ RWMutex.prototype.rUnlockSlow = function(r) { return this.$val.rUnlockSlow(r); };
+ RWMutex.ptr.prototype.Lock = function() {
+ var {r, rw, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ rw = this;
+ if (false) {
+ $unused(rw.w.state);
+ race.Disable();
+ }
+ $r = rw.w.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ r = atomic.AddInt32((rw.$ptr_readerCount || (rw.$ptr_readerCount = new ptrType$2(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw))), -1073741824) + 1073741824 >> 0;
+ /* */ if (!((r === 0)) && !((atomic.AddInt32((rw.$ptr_readerWait || (rw.$ptr_readerWait = new ptrType$2(function() { return this.$target.readerWait; }, function($v) { this.$target.readerWait = $v; }, rw))), r) === 0))) { $s = 2; continue; }
+ /* */ $s = 3; continue;
+ /* if (!((r === 0)) && !((atomic.AddInt32((rw.$ptr_readerWait || (rw.$ptr_readerWait = new ptrType$2(function() { return this.$target.readerWait; }, function($v) { this.$target.readerWait = $v; }, rw))), r) === 0))) { */ case 2:
+ $r = runtime_SemacquireMutex((rw.$ptr_writerSem || (rw.$ptr_writerSem = new ptrType$1(function() { return this.$target.writerSem; }, function($v) { this.$target.writerSem = $v; }, rw))), false, 0); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ /* } */ case 3:
+ if (false) {
+ race.Enable();
+ race.Acquire(((rw.$ptr_readerSem || (rw.$ptr_readerSem = new ptrType$1(function() { return this.$target.readerSem; }, function($v) { this.$target.readerSem = $v; }, rw)))));
+ race.Acquire(((rw.$ptr_writerSem || (rw.$ptr_writerSem = new ptrType$1(function() { return this.$target.writerSem; }, function($v) { this.$target.writerSem = $v; }, rw)))));
+ }
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: RWMutex.ptr.prototype.Lock, $c: true, $r, r, rw, $s};return $f;
+ };
+ RWMutex.prototype.Lock = function() { return this.$val.Lock(); };
+ RWMutex.ptr.prototype.TryLock = function() {
+ var {rw, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ rw = this;
+ if (false) {
+ $unused(rw.w.state);
+ race.Disable();
+ }
+ if (!rw.w.TryLock()) {
+ if (false) {
+ race.Enable();
+ }
+ $s = -1; return false;
+ }
+ /* */ if (!atomic.CompareAndSwapInt32((rw.$ptr_readerCount || (rw.$ptr_readerCount = new ptrType$2(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw))), 0, -1073741824)) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (!atomic.CompareAndSwapInt32((rw.$ptr_readerCount || (rw.$ptr_readerCount = new ptrType$2(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw))), 0, -1073741824)) { */ case 1:
+ $r = rw.w.Unlock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ if (false) {
+ race.Enable();
+ }
+ $s = -1; return false;
+ /* } */ case 2:
+ if (false) {
+ race.Enable();
+ race.Acquire(((rw.$ptr_readerSem || (rw.$ptr_readerSem = new ptrType$1(function() { return this.$target.readerSem; }, function($v) { this.$target.readerSem = $v; }, rw)))));
+ race.Acquire(((rw.$ptr_writerSem || (rw.$ptr_writerSem = new ptrType$1(function() { return this.$target.writerSem; }, function($v) { this.$target.writerSem = $v; }, rw)))));
+ }
+ $s = -1; return true;
+ /* */ } return; } var $f = {$blk: RWMutex.ptr.prototype.TryLock, $c: true, $r, rw, $s};return $f;
+ };
+ RWMutex.prototype.TryLock = function() { return this.$val.TryLock(); };
+ RWMutex.ptr.prototype.Unlock = function() {
+ var {i, r, rw, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ rw = this;
+ if (false) {
+ $unused(rw.w.state);
+ race.Release(((rw.$ptr_readerSem || (rw.$ptr_readerSem = new ptrType$1(function() { return this.$target.readerSem; }, function($v) { this.$target.readerSem = $v; }, rw)))));
+ race.Disable();
+ }
+ r = atomic.AddInt32((rw.$ptr_readerCount || (rw.$ptr_readerCount = new ptrType$2(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw))), 1073741824);
+ if (r >= 1073741824) {
+ race.Enable();
+ throw$1("sync: Unlock of unlocked RWMutex");
+ }
+ i = 0;
+ /* while (true) { */ case 1:
+ /* if (!(i < ((r >> 0)))) { break; } */ if(!(i < ((r >> 0)))) { $s = 2; continue; }
+ $r = runtime_Semrelease((rw.$ptr_readerSem || (rw.$ptr_readerSem = new ptrType$1(function() { return this.$target.readerSem; }, function($v) { this.$target.readerSem = $v; }, rw))), false, 0); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ i = i + (1) >> 0;
+ $s = 1; continue;
+ case 2:
+ $r = rw.w.Unlock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ if (false) {
+ race.Enable();
+ }
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: RWMutex.ptr.prototype.Unlock, $c: true, $r, i, r, rw, $s};return $f;
+ };
+ RWMutex.prototype.Unlock = function() { return this.$val.Unlock(); };
+ RWMutex.ptr.prototype.RLocker = function() {
+ var rw;
+ rw = this;
+ return ($pointerOfStructConversion(rw, ptrType$3));
+ };
+ RWMutex.prototype.RLocker = function() { return this.$val.RLocker(); };
+ rlocker.ptr.prototype.Lock = function() {
+ var {r, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ r = this;
+ $r = ($pointerOfStructConversion(r, ptrType$4)).RLock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: rlocker.ptr.prototype.Lock, $c: true, $r, r, $s};return $f;
+ };
+ rlocker.prototype.Lock = function() { return this.$val.Lock(); };
+ rlocker.ptr.prototype.Unlock = function() {
+ var {r, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ r = this;
+ $r = ($pointerOfStructConversion(r, ptrType$4)).RUnlock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: rlocker.ptr.prototype.Unlock, $c: true, $r, r, $s};return $f;
+ };
+ rlocker.prototype.Unlock = function() { return this.$val.Unlock(); };
+ init = function() {
+ var n;
+ n = new notifyList.ptr(0, 0, 0, 0, 0);
+ runtime_notifyListCheck(20);
+ };
+ runtime_doSpin = function() {
+ $throwRuntimeError("native function not implemented: sync.runtime_doSpin");
+ };
+ Once.ptr.prototype.Do = function(f) {
+ var {f, o, $s, $r, $c} = $restore(this, {f});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ o = this;
+ /* */ if (atomic.LoadUint32((o.$ptr_done || (o.$ptr_done = new ptrType$1(function() { return this.$target.done; }, function($v) { this.$target.done = $v; }, o)))) === 0) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (atomic.LoadUint32((o.$ptr_done || (o.$ptr_done = new ptrType$1(function() { return this.$target.done; }, function($v) { this.$target.done = $v; }, o)))) === 0) { */ case 1:
+ $r = o.doSlow(f); /* */ $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: Once.ptr.prototype.Do, $c: true, $r, f, o, $s};return $f;
+ };
+ Once.prototype.Do = function(f) { return this.$val.Do(f); };
+ Once.ptr.prototype.doSlow = function(f) {
+ var {f, o, $s, $deferred, $r, $c} = $restore(this, {f});
+ /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred);
+ o = this;
+ $r = o.m.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $deferred.push([$methodVal(o.m, "Unlock"), []]);
+ /* */ if (o.done === 0) { $s = 2; continue; }
+ /* */ $s = 3; continue;
+ /* if (o.done === 0) { */ case 2:
+ $deferred.push([atomic.StoreUint32, [(o.$ptr_done || (o.$ptr_done = new ptrType$1(function() { return this.$target.done; }, function($v) { this.$target.done = $v; }, o))), 1]]);
+ $r = f(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ /* } */ case 3:
+ $s = -1; return;
+ /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Once.ptr.prototype.doSlow, $c: true, $r, f, o, $s, $deferred};return $f; } }
+ };
+ Once.prototype.doSlow = function(f) { return this.$val.doSlow(f); };
+ Mutex.ptr.prototype.Lock = function() {
+ var {m, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ m = this;
+ if (atomic.CompareAndSwapInt32((m.$ptr_state || (m.$ptr_state = new ptrType$2(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m))), 0, 1)) {
+ if (false) {
+ race.Acquire((m));
+ }
+ $s = -1; return;
+ }
+ $r = m.lockSlow(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: Mutex.ptr.prototype.Lock, $c: true, $r, m, $s};return $f;
+ };
+ Mutex.prototype.Lock = function() { return this.$val.Lock(); };
+ Mutex.ptr.prototype.TryLock = function() {
+ var m, old;
+ m = this;
+ old = m.state;
+ if (!(((old & 5) === 0))) {
+ return false;
+ }
+ if (!atomic.CompareAndSwapInt32((m.$ptr_state || (m.$ptr_state = new ptrType$2(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m))), old, old | 1)) {
+ return false;
+ }
+ if (false) {
+ race.Acquire((m));
+ }
+ return true;
+ };
+ Mutex.prototype.TryLock = function() { return this.$val.TryLock(); };
+ Mutex.ptr.prototype.lockSlow = function() {
+ var {awoke, delta, iter, m, new$1, old, queueLifo, starving, waitStartTime, x, x$1, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ m = this;
+ waitStartTime = new $Int64(0, 0);
+ starving = false;
+ awoke = false;
+ iter = 0;
+ old = m.state;
+ /* while (true) { */ case 1:
+ /* */ if (((old & 5) === 1) && runtime_canSpin(iter)) { $s = 3; continue; }
+ /* */ $s = 4; continue;
+ /* if (((old & 5) === 1) && runtime_canSpin(iter)) { */ case 3:
+ if (!awoke && ((old & 2) === 0) && !(((old >> 3 >> 0) === 0)) && atomic.CompareAndSwapInt32((m.$ptr_state || (m.$ptr_state = new ptrType$2(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m))), old, old | 2)) {
+ awoke = true;
+ }
+ $r = runtime_doSpin(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ iter = iter + (1) >> 0;
+ old = m.state;
+ /* continue; */ $s = 1; continue;
+ /* } */ case 4:
+ new$1 = old;
+ if ((old & 4) === 0) {
+ new$1 = new$1 | (1);
+ }
+ if (!(((old & 5) === 0))) {
+ new$1 = new$1 + (8) >> 0;
+ }
+ if (starving && !(((old & 1) === 0))) {
+ new$1 = new$1 | (4);
+ }
+ if (awoke) {
+ if ((new$1 & 2) === 0) {
+ throw$1("sync: inconsistent mutex state");
+ }
+ new$1 = (new$1 & ~(2)) >> 0;
+ }
+ /* */ if (atomic.CompareAndSwapInt32((m.$ptr_state || (m.$ptr_state = new ptrType$2(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m))), old, new$1)) { $s = 6; continue; }
+ /* */ $s = 7; continue;
+ /* if (atomic.CompareAndSwapInt32((m.$ptr_state || (m.$ptr_state = new ptrType$2(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m))), old, new$1)) { */ case 6:
+ if ((old & 5) === 0) {
+ /* break; */ $s = 2; continue;
+ }
+ queueLifo = !((waitStartTime.$high === 0 && waitStartTime.$low === 0));
+ if ((waitStartTime.$high === 0 && waitStartTime.$low === 0)) {
+ waitStartTime = runtime_nanotime();
+ }
+ $r = runtime_SemacquireMutex((m.$ptr_sema || (m.$ptr_sema = new ptrType$1(function() { return this.$target.sema; }, function($v) { this.$target.sema = $v; }, m))), queueLifo, 1); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ starving = starving || (x = (x$1 = runtime_nanotime(), new $Int64(x$1.$high - waitStartTime.$high, x$1.$low - waitStartTime.$low)), (x.$high > 0 || (x.$high === 0 && x.$low > 1000000)));
+ old = m.state;
+ if (!(((old & 4) === 0))) {
+ if (!(((old & 3) === 0)) || ((old >> 3 >> 0) === 0)) {
+ throw$1("sync: inconsistent mutex state");
+ }
+ delta = -7;
+ if (!starving || ((old >> 3 >> 0) === 1)) {
+ delta = delta - (4) >> 0;
+ }
+ atomic.AddInt32((m.$ptr_state || (m.$ptr_state = new ptrType$2(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m))), delta);
+ /* break; */ $s = 2; continue;
+ }
+ awoke = true;
+ iter = 0;
+ $s = 8; continue;
+ /* } else { */ case 7:
+ old = m.state;
+ /* } */ case 8:
+ $s = 1; continue;
+ case 2:
+ if (false) {
+ race.Acquire((m));
+ }
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: Mutex.ptr.prototype.lockSlow, $c: true, $r, awoke, delta, iter, m, new$1, old, queueLifo, starving, waitStartTime, x, x$1, $s};return $f;
+ };
+ Mutex.prototype.lockSlow = function() { return this.$val.lockSlow(); };
+ Mutex.ptr.prototype.Unlock = function() {
+ var {m, new$1, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ m = this;
+ if (false) {
+ $unused(m.state);
+ race.Release((m));
+ }
+ new$1 = atomic.AddInt32((m.$ptr_state || (m.$ptr_state = new ptrType$2(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m))), -1);
+ /* */ if (!((new$1 === 0))) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (!((new$1 === 0))) { */ case 1:
+ $r = m.unlockSlow(new$1); /* */ $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: Mutex.ptr.prototype.Unlock, $c: true, $r, m, new$1, $s};return $f;
+ };
+ Mutex.prototype.Unlock = function() { return this.$val.Unlock(); };
+ Mutex.ptr.prototype.unlockSlow = function(new$1) {
+ var {m, new$1, old, $s, $r, $c} = $restore(this, {new$1});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ m = this;
+ if ((((new$1 + 1 >> 0)) & 1) === 0) {
+ throw$1("sync: unlock of unlocked mutex");
+ }
+ /* */ if ((new$1 & 4) === 0) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if ((new$1 & 4) === 0) { */ case 1:
+ old = new$1;
+ /* while (true) { */ case 4:
+ if (((old >> 3 >> 0) === 0) || !(((old & 7) === 0))) {
+ $s = -1; return;
+ }
+ new$1 = ((old - 8 >> 0)) | 2;
+ /* */ if (atomic.CompareAndSwapInt32((m.$ptr_state || (m.$ptr_state = new ptrType$2(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m))), old, new$1)) { $s = 6; continue; }
+ /* */ $s = 7; continue;
+ /* if (atomic.CompareAndSwapInt32((m.$ptr_state || (m.$ptr_state = new ptrType$2(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m))), old, new$1)) { */ case 6:
+ $r = runtime_Semrelease((m.$ptr_sema || (m.$ptr_sema = new ptrType$1(function() { return this.$target.sema; }, function($v) { this.$target.sema = $v; }, m))), false, 1); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $s = -1; return;
+ /* } */ case 7:
+ old = m.state;
+ $s = 4; continue;
+ case 5:
+ $s = 3; continue;
+ /* } else { */ case 2:
+ $r = runtime_Semrelease((m.$ptr_sema || (m.$ptr_sema = new ptrType$1(function() { return this.$target.sema; }, function($v) { this.$target.sema = $v; }, m))), true, 1); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ /* } */ case 3:
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: Mutex.ptr.prototype.unlockSlow, $c: true, $r, m, new$1, old, $s};return $f;
+ };
+ Mutex.prototype.unlockSlow = function(new$1) { return this.$val.unlockSlow(new$1); };
+ newEntry = function(i) {
+ var i, i$24ptr;
+ return new entry.ptr(((i$24ptr || (i$24ptr = new ptrType$9(function() { return i; }, function($v) { i = $v; })))));
+ };
+ Map.ptr.prototype.Load = function(key) {
+ var {_entry, _entry$1, _entry$2, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, e, key, m, ok, read, value, $s, $r, $c} = $restore(this, {key});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ value = $ifaceNil;
+ ok = false;
+ m = this;
+ _tuple = $assertType(m.read.Load(), readOnly, true);
+ read = $clone(_tuple[0], readOnly);
+ _tuple$1 = (_entry = read.m[$emptyInterface.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [ptrType$10.nil, false]);
+ e = _tuple$1[0];
+ ok = _tuple$1[1];
+ /* */ if (!ok && read.amended) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (!ok && read.amended) { */ case 1:
+ $r = m.mu.Lock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ _tuple$2 = $assertType(m.read.Load(), readOnly, true);
+ readOnly.copy(read, _tuple$2[0]);
+ _tuple$3 = (_entry$1 = read.m[$emptyInterface.keyFor(key)], _entry$1 !== undefined ? [_entry$1.v, true] : [ptrType$10.nil, false]);
+ e = _tuple$3[0];
+ ok = _tuple$3[1];
+ if (!ok && read.amended) {
+ _tuple$4 = (_entry$2 = m.dirty[$emptyInterface.keyFor(key)], _entry$2 !== undefined ? [_entry$2.v, true] : [ptrType$10.nil, false]);
+ e = _tuple$4[0];
+ ok = _tuple$4[1];
+ m.missLocked();
+ }
+ $r = m.mu.Unlock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ /* } */ case 2:
+ if (!ok) {
+ _tmp = $ifaceNil;
+ _tmp$1 = false;
+ value = _tmp;
+ ok = _tmp$1;
+ $s = -1; return [value, ok];
+ }
+ _tuple$5 = e.load();
+ value = _tuple$5[0];
+ ok = _tuple$5[1];
+ $s = -1; return [value, ok];
+ /* */ } return; } var $f = {$blk: Map.ptr.prototype.Load, $c: true, $r, _entry, _entry$1, _entry$2, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, e, key, m, ok, read, value, $s};return $f;
+ };
+ Map.prototype.Load = function(key) { return this.$val.Load(key); };
+ entry.ptr.prototype.load = function() {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, e, ok, p, value;
+ value = $ifaceNil;
+ ok = false;
+ e = this;
+ p = atomic.LoadPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e))));
+ if (p === 0 || p === expunged) {
+ _tmp = $ifaceNil;
+ _tmp$1 = false;
+ value = _tmp;
+ ok = _tmp$1;
+ return [value, ok];
+ }
+ _tmp$2 = (p).$get();
+ _tmp$3 = true;
+ value = _tmp$2;
+ ok = _tmp$3;
+ return [value, ok];
+ };
+ entry.prototype.load = function() { return this.$val.load(); };
+ Map.ptr.prototype.Store = function(key, value) {
+ var {_entry, _entry$1, _entry$2, _key, _key$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, e, e$1, e$2, key, m, ok, ok$1, ok$2, read, value, x, $s, $r, $c} = $restore(this, {key, value});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ value = [value];
+ m = this;
+ _tuple = $assertType(m.read.Load(), readOnly, true);
+ read = $clone(_tuple[0], readOnly);
+ _tuple$1 = (_entry = read.m[$emptyInterface.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [ptrType$10.nil, false]);
+ e = _tuple$1[0];
+ ok = _tuple$1[1];
+ if (ok && e.tryStore((value.$ptr || (value.$ptr = new ptrType$9(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, value))))) {
+ $s = -1; return;
+ }
+ $r = m.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ _tuple$2 = $assertType(m.read.Load(), readOnly, true);
+ readOnly.copy(read, _tuple$2[0]);
+ _tuple$3 = (_entry$1 = read.m[$emptyInterface.keyFor(key)], _entry$1 !== undefined ? [_entry$1.v, true] : [ptrType$10.nil, false]);
+ e$1 = _tuple$3[0];
+ ok$1 = _tuple$3[1];
+ if (ok$1) {
+ if (e$1.unexpungeLocked()) {
+ _key = key; (m.dirty || $throwRuntimeError("assignment to entry in nil map"))[$emptyInterface.keyFor(_key)] = { k: _key, v: e$1 };
+ }
+ e$1.storeLocked((value.$ptr || (value.$ptr = new ptrType$9(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, value))));
+ } else {
+ _tuple$4 = (_entry$2 = m.dirty[$emptyInterface.keyFor(key)], _entry$2 !== undefined ? [_entry$2.v, true] : [ptrType$10.nil, false]);
+ e$2 = _tuple$4[0];
+ ok$2 = _tuple$4[1];
+ if (ok$2) {
+ e$2.storeLocked((value.$ptr || (value.$ptr = new ptrType$9(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, value))));
+ } else {
+ if (!read.amended) {
+ m.dirtyLocked();
+ m.read.Store((x = new readOnly.ptr(read.m, true), new x.constructor.elem(x)));
+ }
+ _key$1 = key; (m.dirty || $throwRuntimeError("assignment to entry in nil map"))[$emptyInterface.keyFor(_key$1)] = { k: _key$1, v: newEntry(value[0]) };
+ }
+ }
+ $r = m.mu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: Map.ptr.prototype.Store, $c: true, $r, _entry, _entry$1, _entry$2, _key, _key$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, e, e$1, e$2, key, m, ok, ok$1, ok$2, read, value, x, $s};return $f;
+ };
+ Map.prototype.Store = function(key, value) { return this.$val.Store(key, value); };
+ entry.ptr.prototype.tryStore = function(i) {
+ var e, i, p;
+ e = this;
+ while (true) {
+ p = atomic.LoadPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e))));
+ if (p === expunged) {
+ return false;
+ }
+ if (atomic.CompareAndSwapPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e))), p, (i))) {
+ return true;
+ }
+ }
+ };
+ entry.prototype.tryStore = function(i) { return this.$val.tryStore(i); };
+ entry.ptr.prototype.unexpungeLocked = function() {
+ var e, wasExpunged;
+ wasExpunged = false;
+ e = this;
+ wasExpunged = atomic.CompareAndSwapPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e))), expunged, 0);
+ return wasExpunged;
+ };
+ entry.prototype.unexpungeLocked = function() { return this.$val.unexpungeLocked(); };
+ entry.ptr.prototype.storeLocked = function(i) {
+ var e, i;
+ e = this;
+ atomic.StorePointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e))), (i));
+ };
+ entry.prototype.storeLocked = function(i) { return this.$val.storeLocked(i); };
+ Map.ptr.prototype.LoadOrStore = function(key, value) {
+ var {_entry, _entry$1, _entry$2, _key, _key$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, actual, actual$1, e, e$1, e$2, key, loaded, loaded$1, m, ok, ok$1, ok$2, ok$3, read, value, x, $s, $r, $c} = $restore(this, {key, value});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ actual = $ifaceNil;
+ loaded = false;
+ m = this;
+ _tuple = $assertType(m.read.Load(), readOnly, true);
+ read = $clone(_tuple[0], readOnly);
+ _tuple$1 = (_entry = read.m[$emptyInterface.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [ptrType$10.nil, false]);
+ e = _tuple$1[0];
+ ok = _tuple$1[1];
+ if (ok) {
+ _tuple$2 = e.tryLoadOrStore(value);
+ actual$1 = _tuple$2[0];
+ loaded$1 = _tuple$2[1];
+ ok$1 = _tuple$2[2];
+ if (ok$1) {
+ _tmp = actual$1;
+ _tmp$1 = loaded$1;
+ actual = _tmp;
+ loaded = _tmp$1;
+ $s = -1; return [actual, loaded];
+ }
+ }
+ $r = m.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ _tuple$3 = $assertType(m.read.Load(), readOnly, true);
+ readOnly.copy(read, _tuple$3[0]);
+ _tuple$4 = (_entry$1 = read.m[$emptyInterface.keyFor(key)], _entry$1 !== undefined ? [_entry$1.v, true] : [ptrType$10.nil, false]);
+ e$1 = _tuple$4[0];
+ ok$2 = _tuple$4[1];
+ if (ok$2) {
+ if (e$1.unexpungeLocked()) {
+ _key = key; (m.dirty || $throwRuntimeError("assignment to entry in nil map"))[$emptyInterface.keyFor(_key)] = { k: _key, v: e$1 };
+ }
+ _tuple$5 = e$1.tryLoadOrStore(value);
+ actual = _tuple$5[0];
+ loaded = _tuple$5[1];
+ } else {
+ _tuple$6 = (_entry$2 = m.dirty[$emptyInterface.keyFor(key)], _entry$2 !== undefined ? [_entry$2.v, true] : [ptrType$10.nil, false]);
+ e$2 = _tuple$6[0];
+ ok$3 = _tuple$6[1];
+ if (ok$3) {
+ _tuple$7 = e$2.tryLoadOrStore(value);
+ actual = _tuple$7[0];
+ loaded = _tuple$7[1];
+ m.missLocked();
+ } else {
+ if (!read.amended) {
+ m.dirtyLocked();
+ m.read.Store((x = new readOnly.ptr(read.m, true), new x.constructor.elem(x)));
+ }
+ _key$1 = key; (m.dirty || $throwRuntimeError("assignment to entry in nil map"))[$emptyInterface.keyFor(_key$1)] = { k: _key$1, v: newEntry(value) };
+ _tmp$2 = value;
+ _tmp$3 = false;
+ actual = _tmp$2;
+ loaded = _tmp$3;
+ }
+ }
+ $r = m.mu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ _tmp$4 = actual;
+ _tmp$5 = loaded;
+ actual = _tmp$4;
+ loaded = _tmp$5;
+ $s = -1; return [actual, loaded];
+ /* */ } return; } var $f = {$blk: Map.ptr.prototype.LoadOrStore, $c: true, $r, _entry, _entry$1, _entry$2, _key, _key$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, actual, actual$1, e, e$1, e$2, key, loaded, loaded$1, m, ok, ok$1, ok$2, ok$3, read, value, x, $s};return $f;
+ };
+ Map.prototype.LoadOrStore = function(key, value) { return this.$val.LoadOrStore(key, value); };
+ entry.ptr.prototype.tryLoadOrStore = function(i) {
+ var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, actual, e, i, ic, ic$24ptr, loaded, ok, p;
+ actual = $ifaceNil;
+ loaded = false;
+ ok = false;
+ e = this;
+ p = atomic.LoadPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e))));
+ if (p === expunged) {
+ _tmp = $ifaceNil;
+ _tmp$1 = false;
+ _tmp$2 = false;
+ actual = _tmp;
+ loaded = _tmp$1;
+ ok = _tmp$2;
+ return [actual, loaded, ok];
+ }
+ if (!(p === 0)) {
+ _tmp$3 = (p).$get();
+ _tmp$4 = true;
+ _tmp$5 = true;
+ actual = _tmp$3;
+ loaded = _tmp$4;
+ ok = _tmp$5;
+ return [actual, loaded, ok];
+ }
+ ic = i;
+ while (true) {
+ if (atomic.CompareAndSwapPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e))), 0, ((ic$24ptr || (ic$24ptr = new ptrType$9(function() { return ic; }, function($v) { ic = $v; })))))) {
+ _tmp$6 = i;
+ _tmp$7 = false;
+ _tmp$8 = true;
+ actual = _tmp$6;
+ loaded = _tmp$7;
+ ok = _tmp$8;
+ return [actual, loaded, ok];
+ }
+ p = atomic.LoadPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e))));
+ if (p === expunged) {
+ _tmp$9 = $ifaceNil;
+ _tmp$10 = false;
+ _tmp$11 = false;
+ actual = _tmp$9;
+ loaded = _tmp$10;
+ ok = _tmp$11;
+ return [actual, loaded, ok];
+ }
+ if (!(p === 0)) {
+ _tmp$12 = (p).$get();
+ _tmp$13 = true;
+ _tmp$14 = true;
+ actual = _tmp$12;
+ loaded = _tmp$13;
+ ok = _tmp$14;
+ return [actual, loaded, ok];
+ }
+ }
+ };
+ entry.prototype.tryLoadOrStore = function(i) { return this.$val.tryLoadOrStore(i); };
+ Map.ptr.prototype.LoadAndDelete = function(key) {
+ var {_entry, _entry$1, _entry$2, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, e, key, loaded, m, ok, read, value, $s, $r, $c} = $restore(this, {key});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ value = $ifaceNil;
+ loaded = false;
+ m = this;
+ _tuple = $assertType(m.read.Load(), readOnly, true);
+ read = $clone(_tuple[0], readOnly);
+ _tuple$1 = (_entry = read.m[$emptyInterface.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [ptrType$10.nil, false]);
+ e = _tuple$1[0];
+ ok = _tuple$1[1];
+ /* */ if (!ok && read.amended) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (!ok && read.amended) { */ case 1:
+ $r = m.mu.Lock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ _tuple$2 = $assertType(m.read.Load(), readOnly, true);
+ readOnly.copy(read, _tuple$2[0]);
+ _tuple$3 = (_entry$1 = read.m[$emptyInterface.keyFor(key)], _entry$1 !== undefined ? [_entry$1.v, true] : [ptrType$10.nil, false]);
+ e = _tuple$3[0];
+ ok = _tuple$3[1];
+ if (!ok && read.amended) {
+ _tuple$4 = (_entry$2 = m.dirty[$emptyInterface.keyFor(key)], _entry$2 !== undefined ? [_entry$2.v, true] : [ptrType$10.nil, false]);
+ e = _tuple$4[0];
+ ok = _tuple$4[1];
+ delete m.dirty[$emptyInterface.keyFor(key)];
+ m.missLocked();
+ }
+ $r = m.mu.Unlock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ /* } */ case 2:
+ if (ok) {
+ _tuple$5 = e.delete$();
+ value = _tuple$5[0];
+ loaded = _tuple$5[1];
+ $s = -1; return [value, loaded];
+ }
+ _tmp = $ifaceNil;
+ _tmp$1 = false;
+ value = _tmp;
+ loaded = _tmp$1;
+ $s = -1; return [value, loaded];
+ /* */ } return; } var $f = {$blk: Map.ptr.prototype.LoadAndDelete, $c: true, $r, _entry, _entry$1, _entry$2, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, e, key, loaded, m, ok, read, value, $s};return $f;
+ };
+ Map.prototype.LoadAndDelete = function(key) { return this.$val.LoadAndDelete(key); };
+ Map.ptr.prototype.Delete = function(key) {
+ var {_r, key, m, $s, $r, $c} = $restore(this, {key});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ m = this;
+ _r = m.LoadAndDelete(key); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _r;
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: Map.ptr.prototype.Delete, $c: true, $r, _r, key, m, $s};return $f;
+ };
+ Map.prototype.Delete = function(key) { return this.$val.Delete(key); };
+ entry.ptr.prototype.delete$ = function() {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, e, ok, p, value;
+ value = $ifaceNil;
+ ok = false;
+ e = this;
+ while (true) {
+ p = atomic.LoadPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e))));
+ if (p === 0 || p === expunged) {
+ _tmp = $ifaceNil;
+ _tmp$1 = false;
+ value = _tmp;
+ ok = _tmp$1;
+ return [value, ok];
+ }
+ if (atomic.CompareAndSwapPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e))), p, 0)) {
+ _tmp$2 = (p).$get();
+ _tmp$3 = true;
+ value = _tmp$2;
+ ok = _tmp$3;
+ return [value, ok];
+ }
+ }
+ };
+ entry.prototype.delete$ = function() { return this.$val.delete$(); };
+ Map.ptr.prototype.Range = function(f) {
+ var {_entry, _i, _keys, _r, _ref, _tuple, _tuple$1, _tuple$2, e, f, k, m, ok, read, v, $s, $r, $c} = $restore(this, {f});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ m = this;
+ _tuple = $assertType(m.read.Load(), readOnly, true);
+ read = $clone(_tuple[0], readOnly);
+ /* */ if (read.amended) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (read.amended) { */ case 1:
+ $r = m.mu.Lock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ _tuple$1 = $assertType(m.read.Load(), readOnly, true);
+ readOnly.copy(read, _tuple$1[0]);
+ if (read.amended) {
+ readOnly.copy(read, new readOnly.ptr(m.dirty, false));
+ m.read.Store(new read.constructor.elem(read));
+ m.dirty = false;
+ m.misses = 0;
+ }
+ $r = m.mu.Unlock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ /* } */ case 2:
+ _ref = read.m;
+ _i = 0;
+ _keys = $keys(_ref);
+ /* while (true) { */ case 5:
+ /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 6; continue; }
+ _entry = _ref[_keys[_i]];
+ if (_entry === undefined) {
+ _i++;
+ /* continue; */ $s = 5; continue;
+ }
+ k = _entry.k;
+ e = _entry.v;
+ _tuple$2 = e.load();
+ v = _tuple$2[0];
+ ok = _tuple$2[1];
+ if (!ok) {
+ _i++;
+ /* continue; */ $s = 5; continue;
+ }
+ _r = f(k, v); /* */ $s = 9; case 9: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ /* */ if (!_r) { $s = 7; continue; }
+ /* */ $s = 8; continue;
+ /* if (!_r) { */ case 7:
+ /* break; */ $s = 6; continue;
+ /* } */ case 8:
+ _i++;
+ $s = 5; continue;
+ case 6:
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: Map.ptr.prototype.Range, $c: true, $r, _entry, _i, _keys, _r, _ref, _tuple, _tuple$1, _tuple$2, e, f, k, m, ok, read, v, $s};return $f;
+ };
+ Map.prototype.Range = function(f) { return this.$val.Range(f); };
+ Map.ptr.prototype.missLocked = function() {
+ var m, x;
+ m = this;
+ m.misses = m.misses + (1) >> 0;
+ if (m.misses < $keys(m.dirty).length) {
+ return;
+ }
+ m.read.Store((x = new readOnly.ptr(m.dirty, false), new x.constructor.elem(x)));
+ m.dirty = false;
+ m.misses = 0;
+ };
+ Map.prototype.missLocked = function() { return this.$val.missLocked(); };
+ Map.ptr.prototype.dirtyLocked = function() {
+ var _entry, _i, _key, _keys, _ref, _tuple, e, k, m, read, x;
+ m = this;
+ if (!(m.dirty === false)) {
+ return;
+ }
+ _tuple = $assertType(m.read.Load(), readOnly, true);
+ read = $clone(_tuple[0], readOnly);
+ m.dirty = (x = $keys(read.m).length, ((x < 0 || x > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {}));
+ _ref = read.m;
+ _i = 0;
+ _keys = $keys(_ref);
+ while (true) {
+ if (!(_i < _keys.length)) { break; }
+ _entry = _ref[_keys[_i]];
+ if (_entry === undefined) {
+ _i++;
+ continue;
+ }
+ k = _entry.k;
+ e = _entry.v;
+ if (!e.tryExpungeLocked()) {
+ _key = k; (m.dirty || $throwRuntimeError("assignment to entry in nil map"))[$emptyInterface.keyFor(_key)] = { k: _key, v: e };
+ }
+ _i++;
+ }
+ };
+ Map.prototype.dirtyLocked = function() { return this.$val.dirtyLocked(); };
+ entry.ptr.prototype.tryExpungeLocked = function() {
+ var e, isExpunged, p;
+ isExpunged = false;
+ e = this;
+ p = atomic.LoadPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e))));
+ while (true) {
+ if (!(p === 0)) { break; }
+ if (atomic.CompareAndSwapPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e))), 0, expunged)) {
+ isExpunged = true;
+ return isExpunged;
+ }
+ p = atomic.LoadPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e))));
+ }
+ isExpunged = p === expunged;
+ return isExpunged;
+ };
+ entry.prototype.tryExpungeLocked = function() { return this.$val.tryExpungeLocked(); };
+ NewCond = function(l) {
+ var l;
+ return new Cond.ptr(new noCopy.ptr(), l, new notifyList.ptr(0, 0, 0, 0, 0), 0, 0, $chanNil);
+ };
+ $pkg.NewCond = NewCond;
+ noCopy.ptr.prototype.Lock = function() {
+ };
+ noCopy.prototype.Lock = function() { return this.$val.Lock(); };
+ noCopy.ptr.prototype.Unlock = function() {
+ };
+ noCopy.prototype.Unlock = function() { return this.$val.Unlock(); };
+ WaitGroup.ptr.prototype.Add = function(delta) {
+ var delta, wg;
+ wg = this;
+ wg.counter = wg.counter + (delta) >> 0;
+ if (wg.counter < 0) {
+ $panic(new $String("sync: negative WaitGroup counter"));
+ }
+ if (wg.counter > 0 && wg.ch === $chanNil) {
+ wg.ch = new $Chan(structType, 0);
+ }
+ if ((wg.counter === 0) && !(wg.ch === $chanNil)) {
+ $close(wg.ch);
+ wg.ch = $chanNil;
+ }
+ };
+ WaitGroup.prototype.Add = function(delta) { return this.$val.Add(delta); };
+ WaitGroup.ptr.prototype.Wait = function() {
+ var {_r, wg, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ wg = this;
+ /* */ if (wg.counter > 0) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (wg.counter > 0) { */ case 1:
+ _r = $recv(wg.ch); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _r[0];
+ /* } */ case 2:
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: WaitGroup.ptr.prototype.Wait, $c: true, $r, _r, wg, $s};return $f;
+ };
+ WaitGroup.prototype.Wait = function() { return this.$val.Wait(); };
+ runtime_Semacquire = function(s) {
+ var {s, $s, $r, $c} = $restore(this, {s});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ $r = runtime_SemacquireMutex(s, false, 1); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: runtime_Semacquire, $c: true, $r, s, $s};return $f;
+ };
+ $linknames["sync.runtime_Semacquire"] = runtime_Semacquire;
+ runtime_SemacquireMutex = function(s, lifo, skipframes) {
+ var {_entry, _entry$1, _entry$2, _entry$3, _entry$4, _key, _key$1, _key$2, _r, ch, lifo, s, skipframes, $s, $r, $c} = $restore(this, {s, lifo, skipframes});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ /* */ if (((s.$get() - (_entry = semAwoken[ptrType$1.keyFor(s)], _entry !== undefined ? _entry.v : 0) >>> 0)) === 0) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (((s.$get() - (_entry = semAwoken[ptrType$1.keyFor(s)], _entry !== undefined ? _entry.v : 0) >>> 0)) === 0) { */ case 1:
+ ch = new $Chan($Bool, 0);
+ if (lifo) {
+ _key = s; (semWaiters || $throwRuntimeError("assignment to entry in nil map"))[ptrType$1.keyFor(_key)] = { k: _key, v: $appendSlice(new sliceType$2([ch]), (_entry$1 = semWaiters[ptrType$1.keyFor(s)], _entry$1 !== undefined ? _entry$1.v : sliceType$2.nil)) };
+ } else {
+ _key$1 = s; (semWaiters || $throwRuntimeError("assignment to entry in nil map"))[ptrType$1.keyFor(_key$1)] = { k: _key$1, v: $append((_entry$2 = semWaiters[ptrType$1.keyFor(s)], _entry$2 !== undefined ? _entry$2.v : sliceType$2.nil), ch) };
+ }
+ _r = $recv(ch); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _r[0];
+ _key$2 = s; (semAwoken || $throwRuntimeError("assignment to entry in nil map"))[ptrType$1.keyFor(_key$2)] = { k: _key$2, v: (_entry$3 = semAwoken[ptrType$1.keyFor(s)], _entry$3 !== undefined ? _entry$3.v : 0) - (1) >>> 0 };
+ if ((_entry$4 = semAwoken[ptrType$1.keyFor(s)], _entry$4 !== undefined ? _entry$4.v : 0) === 0) {
+ delete semAwoken[ptrType$1.keyFor(s)];
+ }
+ /* } */ case 2:
+ s.$set(s.$get() - (1) >>> 0);
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: runtime_SemacquireMutex, $c: true, $r, _entry, _entry$1, _entry$2, _entry$3, _entry$4, _key, _key$1, _key$2, _r, ch, lifo, s, skipframes, $s};return $f;
+ };
+ runtime_Semrelease = function(s, handoff, skipframes) {
+ var {_entry, _entry$1, _key, _key$1, ch, handoff, s, skipframes, w, $s, $r, $c} = $restore(this, {s, handoff, skipframes});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ s.$set(s.$get() + (1) >>> 0);
+ w = (_entry = semWaiters[ptrType$1.keyFor(s)], _entry !== undefined ? _entry.v : sliceType$2.nil);
+ if (w.$length === 0) {
+ $s = -1; return;
+ }
+ ch = (0 >= w.$length ? ($throwRuntimeError("index out of range"), undefined) : w.$array[w.$offset + 0]);
+ w = $subslice(w, 1);
+ _key = s; (semWaiters || $throwRuntimeError("assignment to entry in nil map"))[ptrType$1.keyFor(_key)] = { k: _key, v: w };
+ if (w.$length === 0) {
+ delete semWaiters[ptrType$1.keyFor(s)];
+ }
+ _key$1 = s; (semAwoken || $throwRuntimeError("assignment to entry in nil map"))[ptrType$1.keyFor(_key$1)] = { k: _key$1, v: (_entry$1 = semAwoken[ptrType$1.keyFor(s)], _entry$1 !== undefined ? _entry$1.v : 0) + (1) >>> 0 };
+ $r = $send(ch, true); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: runtime_Semrelease, $c: true, $r, _entry, _entry$1, _key, _key$1, ch, handoff, s, skipframes, w, $s};return $f;
+ };
+ $linknames["sync.runtime_Semrelease"] = runtime_Semrelease;
+ runtime_notifyListCheck = function(size) {
+ var size;
+ };
+ runtime_canSpin = function(i) {
+ var i;
+ return false;
+ };
+ runtime_nanotime = function() {
+ return $mul64($internalize(new ($global.Date)().getTime(), $Int64), new $Int64(0, 1000000));
+ };
+ throw$1 = function(s) {
+ var s;
+ $throwRuntimeError($externalize(s, $String));
+ };
+ Pool.ptr.prototype.Get = function() {
+ var {$24r, _r, p, x, x$1, x$2, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ p = this;
+ /* */ if (p.store.$length === 0) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (p.store.$length === 0) { */ case 1:
+ /* */ if (!(p.New === $throwNilPointerError)) { $s = 3; continue; }
+ /* */ $s = 4; continue;
+ /* if (!(p.New === $throwNilPointerError)) { */ case 3:
+ _r = p.New(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 6; case 6: return $24r;
+ /* } */ case 4:
+ $s = -1; return $ifaceNil;
+ /* } */ case 2:
+ x$2 = (x = p.store, x$1 = p.store.$length - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1]));
+ p.store = $subslice(p.store, 0, (p.store.$length - 1 >> 0));
+ $s = -1; return x$2;
+ /* */ } return; } var $f = {$blk: Pool.ptr.prototype.Get, $c: true, $r, $24r, _r, p, x, x$1, x$2, $s};return $f;
+ };
+ Pool.prototype.Get = function() { return this.$val.Get(); };
+ Pool.ptr.prototype.Put = function(x) {
+ var p, x;
+ p = this;
+ if ($interfaceIsEqual(x, $ifaceNil)) {
+ return;
+ }
+ p.store = $append(p.store, x);
+ };
+ Pool.prototype.Put = function(x) { return this.$val.Put(x); };
+ Cond.ptr.prototype.Wait = function() {
+ var {_r, c, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ c = this;
+ c.n = c.n + (1) >> 0;
+ if (c.ch === $chanNil) {
+ c.ch = new $Chan($Bool, 0);
+ }
+ $r = c.L.Unlock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ _r = $recv(c.ch); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _r[0];
+ $r = c.L.Lock(); /* */ $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: Cond.ptr.prototype.Wait, $c: true, $r, _r, c, $s};return $f;
+ };
+ Cond.prototype.Wait = function() { return this.$val.Wait(); };
+ Cond.ptr.prototype.Signal = function() {
+ var {c, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ c = this;
+ if (c.n === 0) {
+ $s = -1; return;
+ }
+ c.n = c.n - (1) >> 0;
+ $r = $send(c.ch, true); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: Cond.ptr.prototype.Signal, $c: true, $r, c, $s};return $f;
+ };
+ Cond.prototype.Signal = function() { return this.$val.Signal(); };
+ Cond.ptr.prototype.Broadcast = function() {
+ var {c, i, n, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ c = this;
+ n = c.n;
+ c.n = 0;
+ i = 0;
+ /* while (true) { */ case 1:
+ /* if (!(i < n)) { break; } */ if(!(i < n)) { $s = 2; continue; }
+ $r = $send(c.ch, true); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ i = i + (1) >> 0;
+ $s = 1; continue;
+ case 2:
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: Cond.ptr.prototype.Broadcast, $c: true, $r, c, i, n, $s};return $f;
+ };
+ Cond.prototype.Broadcast = function() { return this.$val.Broadcast(); };
+ ptrType$4.methods = [{prop: "RLock", name: "RLock", pkg: "", typ: $funcType([], [], false)}, {prop: "TryRLock", name: "TryRLock", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "RUnlock", name: "RUnlock", pkg: "", typ: $funcType([], [], false)}, {prop: "rUnlockSlow", name: "rUnlockSlow", pkg: "sync", typ: $funcType([$Int32], [], false)}, {prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "TryLock", name: "TryLock", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}, {prop: "RLocker", name: "RLocker", pkg: "", typ: $funcType([], [Locker], false)}];
+ ptrType$3.methods = [{prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}];
+ ptrType$14.methods = [{prop: "Do", name: "Do", pkg: "", typ: $funcType([funcType], [], false)}, {prop: "doSlow", name: "doSlow", pkg: "sync", typ: $funcType([funcType], [], false)}];
+ ptrType$15.methods = [{prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "TryLock", name: "TryLock", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "lockSlow", name: "lockSlow", pkg: "sync", typ: $funcType([], [], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}, {prop: "unlockSlow", name: "unlockSlow", pkg: "sync", typ: $funcType([$Int32], [], false)}];
+ ptrType$16.methods = [{prop: "Load", name: "Load", pkg: "", typ: $funcType([$emptyInterface], [$emptyInterface, $Bool], false)}, {prop: "Store", name: "Store", pkg: "", typ: $funcType([$emptyInterface, $emptyInterface], [], false)}, {prop: "LoadOrStore", name: "LoadOrStore", pkg: "", typ: $funcType([$emptyInterface, $emptyInterface], [$emptyInterface, $Bool], false)}, {prop: "LoadAndDelete", name: "LoadAndDelete", pkg: "", typ: $funcType([$emptyInterface], [$emptyInterface, $Bool], false)}, {prop: "Delete", name: "Delete", pkg: "", typ: $funcType([$emptyInterface], [], false)}, {prop: "Range", name: "Range", pkg: "", typ: $funcType([funcType$1], [], false)}, {prop: "missLocked", name: "missLocked", pkg: "sync", typ: $funcType([], [], false)}, {prop: "dirtyLocked", name: "dirtyLocked", pkg: "sync", typ: $funcType([], [], false)}];
+ ptrType$10.methods = [{prop: "load", name: "load", pkg: "sync", typ: $funcType([], [$emptyInterface, $Bool], false)}, {prop: "tryStore", name: "tryStore", pkg: "sync", typ: $funcType([ptrType$9], [$Bool], false)}, {prop: "unexpungeLocked", name: "unexpungeLocked", pkg: "sync", typ: $funcType([], [$Bool], false)}, {prop: "storeLocked", name: "storeLocked", pkg: "sync", typ: $funcType([ptrType$9], [], false)}, {prop: "tryLoadOrStore", name: "tryLoadOrStore", pkg: "sync", typ: $funcType([$emptyInterface], [$emptyInterface, $Bool, $Bool], false)}, {prop: "delete$", name: "delete", pkg: "sync", typ: $funcType([], [$emptyInterface, $Bool], false)}, {prop: "tryExpungeLocked", name: "tryExpungeLocked", pkg: "sync", typ: $funcType([], [$Bool], false)}];
+ ptrType$17.methods = [{prop: "check", name: "check", pkg: "sync", typ: $funcType([], [], false)}];
+ ptrType$18.methods = [{prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}];
+ ptrType$19.methods = [{prop: "state", name: "state", pkg: "sync", typ: $funcType([], [ptrType, ptrType$1], false)}, {prop: "Done", name: "Done", pkg: "", typ: $funcType([], [], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Wait", name: "Wait", pkg: "", typ: $funcType([], [], false)}];
+ ptrType$20.methods = [{prop: "Get", name: "Get", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "Put", name: "Put", pkg: "", typ: $funcType([$emptyInterface], [], false)}];
+ ptrType$21.methods = [{prop: "Wait", name: "Wait", pkg: "", typ: $funcType([], [], false)}, {prop: "Signal", name: "Signal", pkg: "", typ: $funcType([], [], false)}, {prop: "Broadcast", name: "Broadcast", pkg: "", typ: $funcType([], [], false)}];
+ RWMutex.init("sync", [{prop: "w", name: "w", embedded: false, exported: false, typ: Mutex, tag: ""}, {prop: "writerSem", name: "writerSem", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "readerSem", name: "readerSem", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "readerCount", name: "readerCount", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "readerWait", name: "readerWait", embedded: false, exported: false, typ: $Int32, tag: ""}]);
+ rlocker.init("sync", [{prop: "w", name: "w", embedded: false, exported: false, typ: Mutex, tag: ""}, {prop: "writerSem", name: "writerSem", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "readerSem", name: "readerSem", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "readerCount", name: "readerCount", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "readerWait", name: "readerWait", embedded: false, exported: false, typ: $Int32, tag: ""}]);
+ notifyList.init("sync", [{prop: "wait", name: "wait", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "notify", name: "notify", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "lock", name: "lock", embedded: false, exported: false, typ: $Uintptr, tag: ""}, {prop: "head", name: "head", embedded: false, exported: false, typ: $UnsafePointer, tag: ""}, {prop: "tail", name: "tail", embedded: false, exported: false, typ: $UnsafePointer, tag: ""}]);
+ Once.init("sync", [{prop: "done", name: "done", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "m", name: "m", embedded: false, exported: false, typ: Mutex, tag: ""}]);
+ Mutex.init("sync", [{prop: "state", name: "state", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "sema", name: "sema", embedded: false, exported: false, typ: $Uint32, tag: ""}]);
+ Locker.init([{prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}]);
+ Map.init("sync", [{prop: "mu", name: "mu", embedded: false, exported: false, typ: Mutex, tag: ""}, {prop: "read", name: "read", embedded: false, exported: false, typ: atomic.Value, tag: ""}, {prop: "dirty", name: "dirty", embedded: false, exported: false, typ: mapType, tag: ""}, {prop: "misses", name: "misses", embedded: false, exported: false, typ: $Int, tag: ""}]);
+ readOnly.init("sync", [{prop: "m", name: "m", embedded: false, exported: false, typ: mapType, tag: ""}, {prop: "amended", name: "amended", embedded: false, exported: false, typ: $Bool, tag: ""}]);
+ entry.init("sync", [{prop: "p", name: "p", embedded: false, exported: false, typ: $UnsafePointer, tag: ""}]);
+ noCopy.init("", []);
+ WaitGroup.init("sync", [{prop: "counter", name: "counter", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "ch", name: "ch", embedded: false, exported: false, typ: chanType$1, tag: ""}, {prop: "state1", name: "state1", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "state2", name: "state2", embedded: false, exported: false, typ: $Uint32, tag: ""}]);
+ Pool.init("sync", [{prop: "store", name: "store", embedded: false, exported: false, typ: sliceType$3, tag: ""}, {prop: "New", name: "New", embedded: false, exported: true, typ: funcType$2, tag: ""}]);
+ Cond.init("sync", [{prop: "noCopy", name: "noCopy", embedded: false, exported: false, typ: noCopy, tag: ""}, {prop: "L", name: "L", embedded: false, exported: true, typ: Locker, tag: ""}, {prop: "notify", name: "notify", embedded: false, exported: false, typ: notifyList, tag: ""}, {prop: "checker", name: "checker", embedded: false, exported: false, typ: copyChecker, tag: ""}, {prop: "n", name: "n", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "ch", name: "ch", embedded: false, exported: false, typ: chanType, 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 = js.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = race.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = atomic.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ expunged = (new Uint8Array(8));
+ semWaiters = {};
+ semAwoken = {};
+ init();
+ /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
+ };
+ $pkg.$init = $init;
+ return $pkg;
+})();
+$packages["io"] = (function() {
+ var $pkg = {}, $init, errors, sync, eofReader, multiReader, Reader, Writer, Closer, ReadWriter, ReadCloser, WriteCloser, ReadWriteCloser, ReaderFrom, WriterTo, ReaderAt, ByteReader, ByteScanner, ByteWriter, RuneScanner, StringWriter, LimitedReader, SectionReader, discard, nopCloser, sliceType, sliceType$1, ptrType$1, ptrType$2, sliceType$2, ptrType$3, ptrType$8, errInvalidWrite, errWhence, errOffset, blackHolePool, x, MultiReader, WriteString, ReadAtLeast, ReadFull, CopyN, Copy, CopyBuffer, copyBuffer, LimitReader, NewSectionReader, NopCloser, ReadAll;
+ errors = $packages["errors"];
+ sync = $packages["sync"];
+ eofReader = $pkg.eofReader = $newType(0, $kindStruct, "io.eofReader", true, "io", false, function() {
+ this.$val = this;
+ if (arguments.length === 0) {
+ return;
+ }
+ });
+ multiReader = $pkg.multiReader = $newType(0, $kindStruct, "io.multiReader", true, "io", false, function(readers_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.readers = sliceType$2.nil;
+ return;
+ }
+ this.readers = readers_;
+ });
+ Reader = $pkg.Reader = $newType(8, $kindInterface, "io.Reader", true, "io", true, null);
+ Writer = $pkg.Writer = $newType(8, $kindInterface, "io.Writer", true, "io", true, null);
+ Closer = $pkg.Closer = $newType(8, $kindInterface, "io.Closer", true, "io", true, null);
+ ReadWriter = $pkg.ReadWriter = $newType(8, $kindInterface, "io.ReadWriter", true, "io", true, null);
+ ReadCloser = $pkg.ReadCloser = $newType(8, $kindInterface, "io.ReadCloser", true, "io", true, null);
+ WriteCloser = $pkg.WriteCloser = $newType(8, $kindInterface, "io.WriteCloser", true, "io", true, null);
+ ReadWriteCloser = $pkg.ReadWriteCloser = $newType(8, $kindInterface, "io.ReadWriteCloser", true, "io", true, null);
+ ReaderFrom = $pkg.ReaderFrom = $newType(8, $kindInterface, "io.ReaderFrom", true, "io", true, null);
+ WriterTo = $pkg.WriterTo = $newType(8, $kindInterface, "io.WriterTo", true, "io", true, null);
+ ReaderAt = $pkg.ReaderAt = $newType(8, $kindInterface, "io.ReaderAt", true, "io", true, null);
+ ByteReader = $pkg.ByteReader = $newType(8, $kindInterface, "io.ByteReader", true, "io", true, null);
+ ByteScanner = $pkg.ByteScanner = $newType(8, $kindInterface, "io.ByteScanner", true, "io", true, null);
+ ByteWriter = $pkg.ByteWriter = $newType(8, $kindInterface, "io.ByteWriter", true, "io", true, null);
+ RuneScanner = $pkg.RuneScanner = $newType(8, $kindInterface, "io.RuneScanner", true, "io", true, null);
+ StringWriter = $pkg.StringWriter = $newType(8, $kindInterface, "io.StringWriter", true, "io", true, null);
+ LimitedReader = $pkg.LimitedReader = $newType(0, $kindStruct, "io.LimitedReader", true, "io", true, function(R_, N_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.R = $ifaceNil;
+ this.N = new $Int64(0, 0);
+ return;
+ }
+ this.R = R_;
+ this.N = N_;
+ });
+ SectionReader = $pkg.SectionReader = $newType(0, $kindStruct, "io.SectionReader", true, "io", true, function(r_, base_, off_, limit_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.r = $ifaceNil;
+ this.base = new $Int64(0, 0);
+ this.off = new $Int64(0, 0);
+ this.limit = new $Int64(0, 0);
+ return;
+ }
+ this.r = r_;
+ this.base = base_;
+ this.off = off_;
+ this.limit = limit_;
+ });
+ discard = $pkg.discard = $newType(0, $kindStruct, "io.discard", true, "io", false, function() {
+ this.$val = this;
+ if (arguments.length === 0) {
+ return;
+ }
+ });
+ nopCloser = $pkg.nopCloser = $newType(0, $kindStruct, "io.nopCloser", true, "io", false, function(Reader_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.Reader = $ifaceNil;
+ return;
+ }
+ this.Reader = Reader_;
+ });
+ sliceType = $sliceType($emptyInterface);
+ sliceType$1 = $sliceType($Uint8);
+ ptrType$1 = $ptrType(sliceType$1);
+ ptrType$2 = $ptrType(multiReader);
+ sliceType$2 = $sliceType(Reader);
+ ptrType$3 = $ptrType(LimitedReader);
+ ptrType$8 = $ptrType(SectionReader);
+ eofReader.ptr.prototype.Read = function(param) {
+ var param;
+ return [0, $pkg.EOF];
+ };
+ eofReader.prototype.Read = function(param) { return this.$val.Read(param); };
+ multiReader.ptr.prototype.Read = function(p) {
+ var {_r, _tmp, _tmp$1, _tuple, _tuple$1, err, mr, n, ok, p, r, x$2, x$3, x$4, x$5, $s, $r, $c} = $restore(this, {p});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ n = 0;
+ err = $ifaceNil;
+ mr = this;
+ /* while (true) { */ case 1:
+ /* if (!(mr.readers.$length > 0)) { break; } */ if(!(mr.readers.$length > 0)) { $s = 2; continue; }
+ if (mr.readers.$length === 1) {
+ _tuple = $assertType((x$2 = mr.readers, (0 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 0])), ptrType$2, true);
+ r = _tuple[0];
+ ok = _tuple[1];
+ if (ok) {
+ mr.readers = r.readers;
+ /* continue; */ $s = 1; continue;
+ }
+ }
+ _r = (x$3 = mr.readers, (0 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 0])).Read(p); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple$1 = _r;
+ n = _tuple$1[0];
+ err = _tuple$1[1];
+ if ($interfaceIsEqual(err, $pkg.EOF)) {
+ (x$5 = mr.readers, (0 >= x$5.$length ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + 0] = (x$4 = new eofReader.ptr(), new x$4.constructor.elem(x$4))));
+ mr.readers = $subslice(mr.readers, 1);
+ }
+ if (n > 0 || !($interfaceIsEqual(err, $pkg.EOF))) {
+ if ($interfaceIsEqual(err, $pkg.EOF) && mr.readers.$length > 0) {
+ err = $ifaceNil;
+ }
+ $s = -1; return [n, err];
+ }
+ $s = 1; continue;
+ case 2:
+ _tmp = 0;
+ _tmp$1 = $pkg.EOF;
+ n = _tmp;
+ err = _tmp$1;
+ $s = -1; return [n, err];
+ /* */ } return; } var $f = {$blk: multiReader.ptr.prototype.Read, $c: true, $r, _r, _tmp, _tmp$1, _tuple, _tuple$1, err, mr, n, ok, p, r, x$2, x$3, x$4, x$5, $s};return $f;
+ };
+ multiReader.prototype.Read = function(p) { return this.$val.Read(p); };
+ MultiReader = function(readers) {
+ var r, readers;
+ r = $makeSlice(sliceType$2, readers.$length);
+ $copySlice(r, readers);
+ return new multiReader.ptr(r);
+ };
+ $pkg.MultiReader = MultiReader;
+ WriteString = function(w, s) {
+ var {$24r, $24r$1, _r, _r$1, _tuple, _tuple$1, _tuple$2, err, n, ok, s, sw, w, $s, $r, $c} = $restore(this, {w, s});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ n = 0;
+ err = $ifaceNil;
+ _tuple = $assertType(w, StringWriter, true);
+ sw = _tuple[0];
+ ok = _tuple[1];
+ /* */ if (ok) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (ok) { */ case 1:
+ _r = sw.WriteString(s); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple$1 = _r;
+ n = _tuple$1[0];
+ err = _tuple$1[1];
+ $24r = [n, err];
+ $s = 4; case 4: return $24r;
+ /* } */ case 2:
+ _r$1 = w.Write((new sliceType$1($stringToBytes(s)))); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _tuple$2 = _r$1;
+ n = _tuple$2[0];
+ err = _tuple$2[1];
+ $24r$1 = [n, err];
+ $s = 6; case 6: return $24r$1;
+ /* */ } return; } var $f = {$blk: WriteString, $c: true, $r, $24r, $24r$1, _r, _r$1, _tuple, _tuple$1, _tuple$2, err, n, ok, s, sw, w, $s};return $f;
+ };
+ $pkg.WriteString = WriteString;
+ ReadAtLeast = function(r, buf, min) {
+ var {_r, _tmp, _tmp$1, _tuple, buf, err, min, n, nn, r, $s, $r, $c} = $restore(this, {r, buf, min});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ n = 0;
+ err = $ifaceNil;
+ if (buf.$length < min) {
+ _tmp = 0;
+ _tmp$1 = $pkg.ErrShortBuffer;
+ n = _tmp;
+ err = _tmp$1;
+ $s = -1; return [n, err];
+ }
+ /* while (true) { */ case 1:
+ /* if (!(n < min && $interfaceIsEqual(err, $ifaceNil))) { break; } */ if(!(n < min && $interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; }
+ nn = 0;
+ _r = r.Read($subslice(buf, n)); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ nn = _tuple[0];
+ err = _tuple[1];
+ n = n + (nn) >> 0;
+ $s = 1; continue;
+ case 2:
+ if (n >= min) {
+ err = $ifaceNil;
+ } else if (n > 0 && $interfaceIsEqual(err, $pkg.EOF)) {
+ err = $pkg.ErrUnexpectedEOF;
+ }
+ $s = -1; return [n, err];
+ /* */ } return; } var $f = {$blk: ReadAtLeast, $c: true, $r, _r, _tmp, _tmp$1, _tuple, buf, err, min, n, nn, r, $s};return $f;
+ };
+ $pkg.ReadAtLeast = ReadAtLeast;
+ ReadFull = function(r, buf) {
+ var {$24r, _r, _tuple, buf, err, n, r, $s, $r, $c} = $restore(this, {r, buf});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ n = 0;
+ err = $ifaceNil;
+ _r = ReadAtLeast(r, buf, buf.$length); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ n = _tuple[0];
+ err = _tuple[1];
+ $24r = [n, err];
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: ReadFull, $c: true, $r, $24r, _r, _tuple, buf, err, n, r, $s};return $f;
+ };
+ $pkg.ReadFull = ReadFull;
+ CopyN = function(dst, src, n) {
+ var {_r, _tmp, _tmp$1, _tuple, dst, err, n, src, written, $s, $r, $c} = $restore(this, {dst, src, n});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ written = new $Int64(0, 0);
+ err = $ifaceNil;
+ _r = Copy(dst, LimitReader(src, n)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ written = _tuple[0];
+ err = _tuple[1];
+ if ((written.$high === n.$high && written.$low === n.$low)) {
+ _tmp = n;
+ _tmp$1 = $ifaceNil;
+ written = _tmp;
+ err = _tmp$1;
+ $s = -1; return [written, err];
+ }
+ if ((written.$high < n.$high || (written.$high === n.$high && written.$low < n.$low)) && $interfaceIsEqual(err, $ifaceNil)) {
+ err = $pkg.EOF;
+ }
+ $s = -1; return [written, err];
+ /* */ } return; } var $f = {$blk: CopyN, $c: true, $r, _r, _tmp, _tmp$1, _tuple, dst, err, n, src, written, $s};return $f;
+ };
+ $pkg.CopyN = CopyN;
+ Copy = function(dst, src) {
+ var {$24r, _r, _tuple, dst, err, src, written, $s, $r, $c} = $restore(this, {dst, src});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ written = new $Int64(0, 0);
+ err = $ifaceNil;
+ _r = copyBuffer(dst, src, sliceType$1.nil); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ written = _tuple[0];
+ err = _tuple[1];
+ $24r = [written, err];
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: Copy, $c: true, $r, $24r, _r, _tuple, dst, err, src, written, $s};return $f;
+ };
+ $pkg.Copy = Copy;
+ CopyBuffer = function(dst, src, buf) {
+ var {$24r, _r, _tuple, buf, dst, err, src, written, $s, $r, $c} = $restore(this, {dst, src, buf});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ written = new $Int64(0, 0);
+ err = $ifaceNil;
+ if (!(buf === sliceType$1.nil) && (buf.$length === 0)) {
+ $panic(new $String("empty buffer in CopyBuffer"));
+ }
+ _r = copyBuffer(dst, src, buf); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ written = _tuple[0];
+ err = _tuple[1];
+ $24r = [written, err];
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: CopyBuffer, $c: true, $r, $24r, _r, _tuple, buf, dst, err, src, written, $s};return $f;
+ };
+ $pkg.CopyBuffer = CopyBuffer;
+ copyBuffer = function(dst, src, buf) {
+ var {$24r, $24r$1, _r, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, buf, dst, er, err, ew, l, nr, nw, ok, ok$1, ok$2, rt, size, src, written, wt, x$2, x$3, x$4, x$5, x$6, $s, $r, $c} = $restore(this, {dst, src, buf});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ written = new $Int64(0, 0);
+ err = $ifaceNil;
+ _tuple = $assertType(src, WriterTo, true);
+ wt = _tuple[0];
+ ok = _tuple[1];
+ /* */ if (ok) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (ok) { */ case 1:
+ _r = wt.WriteTo(dst); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple$1 = _r;
+ written = _tuple$1[0];
+ err = _tuple$1[1];
+ $24r = [written, err];
+ $s = 4; case 4: return $24r;
+ /* } */ case 2:
+ _tuple$2 = $assertType(dst, ReaderFrom, true);
+ rt = _tuple$2[0];
+ ok$1 = _tuple$2[1];
+ /* */ if (ok$1) { $s = 5; continue; }
+ /* */ $s = 6; continue;
+ /* if (ok$1) { */ case 5:
+ _r$1 = rt.ReadFrom(src); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _tuple$3 = _r$1;
+ written = _tuple$3[0];
+ err = _tuple$3[1];
+ $24r$1 = [written, err];
+ $s = 8; case 8: return $24r$1;
+ /* } */ case 6:
+ if (buf === sliceType$1.nil) {
+ size = 32768;
+ _tuple$4 = $assertType(src, ptrType$3, true);
+ l = _tuple$4[0];
+ ok$2 = _tuple$4[1];
+ if (ok$2 && (x$2 = (new $Int64(0, size)), x$3 = l.N, (x$2.$high > x$3.$high || (x$2.$high === x$3.$high && x$2.$low > x$3.$low)))) {
+ if ((x$4 = l.N, (x$4.$high < 0 || (x$4.$high === 0 && x$4.$low < 1)))) {
+ size = 1;
+ } else {
+ size = (((x$5 = l.N, x$5.$low + ((x$5.$high >> 31) * 4294967296)) >> 0));
+ }
+ }
+ buf = $makeSlice(sliceType$1, size);
+ }
+ /* while (true) { */ case 9:
+ _r$2 = src.Read(buf); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ _tuple$5 = _r$2;
+ nr = _tuple$5[0];
+ er = _tuple$5[1];
+ /* */ if (nr > 0) { $s = 12; continue; }
+ /* */ $s = 13; continue;
+ /* if (nr > 0) { */ case 12:
+ _r$3 = dst.Write($subslice(buf, 0, nr)); /* */ $s = 14; case 14: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
+ _tuple$6 = _r$3;
+ nw = _tuple$6[0];
+ ew = _tuple$6[1];
+ if (nw < 0 || nr < nw) {
+ nw = 0;
+ if ($interfaceIsEqual(ew, $ifaceNil)) {
+ ew = errInvalidWrite;
+ }
+ }
+ written = (x$6 = (new $Int64(0, nw)), new $Int64(written.$high + x$6.$high, written.$low + x$6.$low));
+ if (!($interfaceIsEqual(ew, $ifaceNil))) {
+ err = ew;
+ /* break; */ $s = 10; continue;
+ }
+ if (!((nr === nw))) {
+ err = $pkg.ErrShortWrite;
+ /* break; */ $s = 10; continue;
+ }
+ /* } */ case 13:
+ if (!($interfaceIsEqual(er, $ifaceNil))) {
+ if (!($interfaceIsEqual(er, $pkg.EOF))) {
+ err = er;
+ }
+ /* break; */ $s = 10; continue;
+ }
+ $s = 9; continue;
+ case 10:
+ _tmp = written;
+ _tmp$1 = err;
+ written = _tmp;
+ err = _tmp$1;
+ $s = -1; return [written, err];
+ /* */ } return; } var $f = {$blk: copyBuffer, $c: true, $r, $24r, $24r$1, _r, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, buf, dst, er, err, ew, l, nr, nw, ok, ok$1, ok$2, rt, size, src, written, wt, x$2, x$3, x$4, x$5, x$6, $s};return $f;
+ };
+ LimitReader = function(r, n) {
+ var n, r;
+ return new LimitedReader.ptr(r, n);
+ };
+ $pkg.LimitReader = LimitReader;
+ LimitedReader.ptr.prototype.Read = function(p) {
+ var {_r, _tmp, _tmp$1, _tuple, err, l, n, p, x$2, x$3, x$4, x$5, x$6, $s, $r, $c} = $restore(this, {p});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ n = 0;
+ err = $ifaceNil;
+ l = this;
+ if ((x$2 = l.N, (x$2.$high < 0 || (x$2.$high === 0 && x$2.$low <= 0)))) {
+ _tmp = 0;
+ _tmp$1 = $pkg.EOF;
+ n = _tmp;
+ err = _tmp$1;
+ $s = -1; return [n, err];
+ }
+ if ((x$3 = (new $Int64(0, p.$length)), x$4 = l.N, (x$3.$high > x$4.$high || (x$3.$high === x$4.$high && x$3.$low > x$4.$low)))) {
+ p = $subslice(p, 0, $flatten64(l.N));
+ }
+ _r = l.R.Read(p); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ n = _tuple[0];
+ err = _tuple[1];
+ l.N = (x$5 = l.N, x$6 = (new $Int64(0, n)), new $Int64(x$5.$high - x$6.$high, x$5.$low - x$6.$low));
+ $s = -1; return [n, err];
+ /* */ } return; } var $f = {$blk: LimitedReader.ptr.prototype.Read, $c: true, $r, _r, _tmp, _tmp$1, _tuple, err, l, n, p, x$2, x$3, x$4, x$5, x$6, $s};return $f;
+ };
+ LimitedReader.prototype.Read = function(p) { return this.$val.Read(p); };
+ NewSectionReader = function(r, off, n) {
+ var n, off, r, remaining, x$2;
+ remaining = new $Int64(0, 0);
+ if ((x$2 = new $Int64(2147483647 - n.$high, 4294967295 - n.$low), (off.$high < x$2.$high || (off.$high === x$2.$high && off.$low <= x$2.$low)))) {
+ remaining = new $Int64(n.$high + off.$high, n.$low + off.$low);
+ } else {
+ remaining = new $Int64(2147483647, 4294967295);
+ }
+ return new SectionReader.ptr(r, off, off, remaining);
+ };
+ $pkg.NewSectionReader = NewSectionReader;
+ SectionReader.ptr.prototype.Read = function(p) {
+ var {_r, _tmp, _tmp$1, _tuple, err, max, n, p, s, x$2, x$3, x$4, x$5, x$6, x$7, x$8, $s, $r, $c} = $restore(this, {p});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ n = 0;
+ err = $ifaceNil;
+ s = this;
+ if ((x$2 = s.off, x$3 = s.limit, (x$2.$high > x$3.$high || (x$2.$high === x$3.$high && x$2.$low >= x$3.$low)))) {
+ _tmp = 0;
+ _tmp$1 = $pkg.EOF;
+ n = _tmp;
+ err = _tmp$1;
+ $s = -1; return [n, err];
+ }
+ max = (x$4 = s.limit, x$5 = s.off, new $Int64(x$4.$high - x$5.$high, x$4.$low - x$5.$low));
+ if ((x$6 = (new $Int64(0, p.$length)), (x$6.$high > max.$high || (x$6.$high === max.$high && x$6.$low > max.$low)))) {
+ p = $subslice(p, 0, $flatten64(max));
+ }
+ _r = s.r.ReadAt(p, s.off); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ n = _tuple[0];
+ err = _tuple[1];
+ s.off = (x$7 = s.off, x$8 = (new $Int64(0, n)), new $Int64(x$7.$high + x$8.$high, x$7.$low + x$8.$low));
+ $s = -1; return [n, err];
+ /* */ } return; } var $f = {$blk: SectionReader.ptr.prototype.Read, $c: true, $r, _r, _tmp, _tmp$1, _tuple, err, max, n, p, s, x$2, x$3, x$4, x$5, x$6, x$7, x$8, $s};return $f;
+ };
+ SectionReader.prototype.Read = function(p) { return this.$val.Read(p); };
+ SectionReader.ptr.prototype.Seek = function(offset, whence) {
+ var _1, offset, s, whence, x$2, x$3, x$4, x$5, x$6;
+ s = this;
+ _1 = whence;
+ if (_1 === (0)) {
+ offset = (x$2 = s.base, new $Int64(offset.$high + x$2.$high, offset.$low + x$2.$low));
+ } else if (_1 === (1)) {
+ offset = (x$3 = s.off, new $Int64(offset.$high + x$3.$high, offset.$low + x$3.$low));
+ } else if (_1 === (2)) {
+ offset = (x$4 = s.limit, new $Int64(offset.$high + x$4.$high, offset.$low + x$4.$low));
+ } else {
+ return [new $Int64(0, 0), errWhence];
+ }
+ if ((x$5 = s.base, (offset.$high < x$5.$high || (offset.$high === x$5.$high && offset.$low < x$5.$low)))) {
+ return [new $Int64(0, 0), errOffset];
+ }
+ s.off = offset;
+ return [(x$6 = s.base, new $Int64(offset.$high - x$6.$high, offset.$low - x$6.$low)), $ifaceNil];
+ };
+ SectionReader.prototype.Seek = function(offset, whence) { return this.$val.Seek(offset, whence); };
+ SectionReader.ptr.prototype.ReadAt = function(p, off) {
+ var {$24r, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, err, max, n, off, p, s, x$2, x$3, x$4, x$5, x$6, x$7, $s, $r, $c} = $restore(this, {p, off});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ n = 0;
+ err = $ifaceNil;
+ s = this;
+ if ((off.$high < 0 || (off.$high === 0 && off.$low < 0)) || (x$2 = (x$3 = s.limit, x$4 = s.base, new $Int64(x$3.$high - x$4.$high, x$3.$low - x$4.$low)), (off.$high > x$2.$high || (off.$high === x$2.$high && off.$low >= x$2.$low)))) {
+ _tmp = 0;
+ _tmp$1 = $pkg.EOF;
+ n = _tmp;
+ err = _tmp$1;
+ $s = -1; return [n, err];
+ }
+ off = (x$5 = s.base, new $Int64(off.$high + x$5.$high, off.$low + x$5.$low));
+ max = (x$6 = s.limit, new $Int64(x$6.$high - off.$high, x$6.$low - off.$low));
+ /* */ if ((x$7 = (new $Int64(0, p.$length)), (x$7.$high > max.$high || (x$7.$high === max.$high && x$7.$low > max.$low)))) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if ((x$7 = (new $Int64(0, p.$length)), (x$7.$high > max.$high || (x$7.$high === max.$high && x$7.$low > max.$low)))) { */ case 1:
+ p = $subslice(p, 0, $flatten64(max));
+ _r = s.r.ReadAt(p, off); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ n = _tuple[0];
+ err = _tuple[1];
+ if ($interfaceIsEqual(err, $ifaceNil)) {
+ err = $pkg.EOF;
+ }
+ _tmp$2 = n;
+ _tmp$3 = err;
+ n = _tmp$2;
+ err = _tmp$3;
+ $s = -1; return [n, err];
+ /* } */ case 2:
+ _r$1 = s.r.ReadAt(p, off); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _tuple$1 = _r$1;
+ n = _tuple$1[0];
+ err = _tuple$1[1];
+ $24r = [n, err];
+ $s = 5; case 5: return $24r;
+ /* */ } return; } var $f = {$blk: SectionReader.ptr.prototype.ReadAt, $c: true, $r, $24r, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, err, max, n, off, p, s, x$2, x$3, x$4, x$5, x$6, x$7, $s};return $f;
+ };
+ SectionReader.prototype.ReadAt = function(p, off) { return this.$val.ReadAt(p, off); };
+ SectionReader.ptr.prototype.Size = function() {
+ var s, x$2, x$3;
+ s = this;
+ return (x$2 = s.limit, x$3 = s.base, new $Int64(x$2.$high - x$3.$high, x$2.$low - x$3.$low));
+ };
+ SectionReader.prototype.Size = function() { return this.$val.Size(); };
+ discard.ptr.prototype.Write = function(p) {
+ var p;
+ return [p.$length, $ifaceNil];
+ };
+ discard.prototype.Write = function(p) { return this.$val.Write(p); };
+ discard.ptr.prototype.WriteString = function(s) {
+ var s;
+ return [s.length, $ifaceNil];
+ };
+ discard.prototype.WriteString = function(s) { return this.$val.WriteString(s); };
+ discard.ptr.prototype.ReadFrom = function(r) {
+ var {_r, _r$1, _tmp, _tmp$1, _tuple, bufp, err, n, r, readSize, x$2, $s, $r, $c} = $restore(this, {r});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ n = new $Int64(0, 0);
+ err = $ifaceNil;
+ _r = blackHolePool.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ bufp = $assertType(_r, ptrType$1);
+ readSize = 0;
+ /* while (true) { */ case 2:
+ _r$1 = r.Read(bufp.$get()); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _tuple = _r$1;
+ readSize = _tuple[0];
+ err = _tuple[1];
+ n = (x$2 = (new $Int64(0, readSize)), new $Int64(n.$high + x$2.$high, n.$low + x$2.$low));
+ if (!($interfaceIsEqual(err, $ifaceNil))) {
+ blackHolePool.Put(bufp);
+ if ($interfaceIsEqual(err, $pkg.EOF)) {
+ _tmp = n;
+ _tmp$1 = $ifaceNil;
+ n = _tmp;
+ err = _tmp$1;
+ $s = -1; return [n, err];
+ }
+ $s = -1; return [n, err];
+ }
+ $s = 2; continue;
+ case 3:
+ $s = -1; return [n, err];
+ /* */ } return; } var $f = {$blk: discard.ptr.prototype.ReadFrom, $c: true, $r, _r, _r$1, _tmp, _tmp$1, _tuple, bufp, err, n, r, readSize, x$2, $s};return $f;
+ };
+ discard.prototype.ReadFrom = function(r) { return this.$val.ReadFrom(r); };
+ NopCloser = function(r) {
+ var r, x$2;
+ return (x$2 = new nopCloser.ptr(r), new x$2.constructor.elem(x$2));
+ };
+ $pkg.NopCloser = NopCloser;
+ nopCloser.ptr.prototype.Close = function() {
+ return $ifaceNil;
+ };
+ nopCloser.prototype.Close = function() { return this.$val.Close(); };
+ ReadAll = function(r) {
+ var {_r, _tuple, b, err, n, r, $s, $r, $c} = $restore(this, {r});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ b = $makeSlice(sliceType$1, 0, 512);
+ /* while (true) { */ case 1:
+ if (b.$length === b.$capacity) {
+ b = $subslice($append(b, 0), 0, b.$length);
+ }
+ _r = r.Read($subslice(b, b.$length, b.$capacity)); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ n = _tuple[0];
+ err = _tuple[1];
+ b = $subslice(b, 0, (b.$length + n >> 0));
+ if (!($interfaceIsEqual(err, $ifaceNil))) {
+ if ($interfaceIsEqual(err, $pkg.EOF)) {
+ err = $ifaceNil;
+ }
+ $s = -1; return [b, err];
+ }
+ $s = 1; continue;
+ case 2:
+ $s = -1; return [sliceType$1.nil, $ifaceNil];
+ /* */ } return; } var $f = {$blk: ReadAll, $c: true, $r, _r, _tuple, b, err, n, r, $s};return $f;
+ };
+ $pkg.ReadAll = ReadAll;
+ eofReader.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}];
+ ptrType$2.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}];
+ ptrType$3.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}];
+ ptrType$8.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "Seek", name: "Seek", pkg: "", typ: $funcType([$Int64, $Int], [$Int64, $error], false)}, {prop: "ReadAt", name: "ReadAt", pkg: "", typ: $funcType([sliceType$1, $Int64], [$Int, $error], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int64], false)}];
+ discard.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}, {prop: "ReadFrom", name: "ReadFrom", pkg: "", typ: $funcType([Reader], [$Int64, $error], false)}];
+ nopCloser.methods = [{prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}];
+ eofReader.init("", []);
+ multiReader.init("io", [{prop: "readers", name: "readers", embedded: false, exported: false, typ: sliceType$2, tag: ""}]);
+ Reader.init([{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}]);
+ Writer.init([{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}]);
+ Closer.init([{prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]);
+ ReadWriter.init([{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}]);
+ ReadCloser.init([{prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}]);
+ WriteCloser.init([{prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}]);
+ ReadWriteCloser.init([{prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}]);
+ ReaderFrom.init([{prop: "ReadFrom", name: "ReadFrom", pkg: "", typ: $funcType([Reader], [$Int64, $error], false)}]);
+ WriterTo.init([{prop: "WriteTo", name: "WriteTo", pkg: "", typ: $funcType([Writer], [$Int64, $error], false)}]);
+ ReaderAt.init([{prop: "ReadAt", name: "ReadAt", pkg: "", typ: $funcType([sliceType$1, $Int64], [$Int, $error], false)}]);
+ ByteReader.init([{prop: "ReadByte", name: "ReadByte", pkg: "", typ: $funcType([], [$Uint8, $error], false)}]);
+ ByteScanner.init([{prop: "ReadByte", name: "ReadByte", pkg: "", typ: $funcType([], [$Uint8, $error], false)}, {prop: "UnreadByte", name: "UnreadByte", pkg: "", typ: $funcType([], [$error], false)}]);
+ ByteWriter.init([{prop: "WriteByte", name: "WriteByte", pkg: "", typ: $funcType([$Uint8], [$error], false)}]);
+ RuneScanner.init([{prop: "ReadRune", name: "ReadRune", pkg: "", typ: $funcType([], [$Int32, $Int, $error], false)}, {prop: "UnreadRune", name: "UnreadRune", pkg: "", typ: $funcType([], [$error], false)}]);
+ StringWriter.init([{prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}]);
+ LimitedReader.init("", [{prop: "R", name: "R", embedded: false, exported: true, typ: Reader, tag: ""}, {prop: "N", name: "N", embedded: false, exported: true, typ: $Int64, tag: ""}]);
+ SectionReader.init("io", [{prop: "r", name: "r", embedded: false, exported: false, typ: ReaderAt, tag: ""}, {prop: "base", name: "base", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "off", name: "off", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "limit", name: "limit", embedded: false, exported: false, typ: $Int64, tag: ""}]);
+ discard.init("", []);
+ nopCloser.init("", [{prop: "Reader", name: "Reader", embedded: true, exported: true, typ: Reader, 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 = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = sync.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $pkg.ErrClosedPipe = errors.New("io: read/write on closed pipe");
+ $pkg.ErrShortWrite = errors.New("short write");
+ errInvalidWrite = errors.New("invalid write result");
+ $pkg.ErrShortBuffer = errors.New("short buffer");
+ $pkg.EOF = errors.New("EOF");
+ $pkg.ErrUnexpectedEOF = errors.New("unexpected EOF");
+ $pkg.ErrNoProgress = errors.New("multiple Read calls return no data or error");
+ errWhence = errors.New("Seek: invalid whence");
+ errOffset = errors.New("Seek: invalid offset");
+ $pkg.Discard = (x = new discard.ptr(), new x.constructor.elem(x));
+ blackHolePool = new sync.Pool.ptr(sliceType.nil, (function() {
+ var b, b$24ptr;
+ b = $makeSlice(sliceType$1, 8192);
+ return (b$24ptr || (b$24ptr = new ptrType$1(function() { return b; }, function($v) { b = $convertSliceType($v, sliceType$1); })));
+ }));
+ /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
+ };
+ $pkg.$init = $init;
+ return $pkg;
+})();
+$packages["unicode"] = (function() {
+ var $pkg = {}, $init, RangeTable, Range16, Range32, CaseRange, d, foldPair, sliceType, sliceType$1, sliceType$2, sliceType$3, arrayType, _L, _Nd, _White_Space, _CaseRanges, properties, asciiFold, caseOrbit, is16, is32, Is, isExcludingLatin, To, ToUpper, ToLower, SimpleFold, IsLetter, IsSpace, IsDigit, to;
+ RangeTable = $pkg.RangeTable = $newType(0, $kindStruct, "unicode.RangeTable", true, "unicode", true, function(R16_, R32_, LatinOffset_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.R16 = sliceType.nil;
+ this.R32 = sliceType$1.nil;
+ this.LatinOffset = 0;
+ return;
+ }
+ this.R16 = R16_;
+ this.R32 = R32_;
+ this.LatinOffset = LatinOffset_;
+ });
+ Range16 = $pkg.Range16 = $newType(0, $kindStruct, "unicode.Range16", true, "unicode", true, function(Lo_, Hi_, Stride_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.Lo = 0;
+ this.Hi = 0;
+ this.Stride = 0;
+ return;
+ }
+ this.Lo = Lo_;
+ this.Hi = Hi_;
+ this.Stride = Stride_;
+ });
+ Range32 = $pkg.Range32 = $newType(0, $kindStruct, "unicode.Range32", true, "unicode", true, function(Lo_, Hi_, Stride_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.Lo = 0;
+ this.Hi = 0;
+ this.Stride = 0;
+ return;
+ }
+ this.Lo = Lo_;
+ this.Hi = Hi_;
+ this.Stride = Stride_;
+ });
+ CaseRange = $pkg.CaseRange = $newType(0, $kindStruct, "unicode.CaseRange", true, "unicode", true, function(Lo_, Hi_, Delta_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.Lo = 0;
+ this.Hi = 0;
+ this.Delta = arrayType.zero();
+ return;
+ }
+ this.Lo = Lo_;
+ this.Hi = Hi_;
+ this.Delta = Delta_;
+ });
+ d = $pkg.d = $newType(12, $kindArray, "unicode.d", true, "unicode", false, null);
+ foldPair = $pkg.foldPair = $newType(0, $kindStruct, "unicode.foldPair", true, "unicode", false, function(From_, To_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.From = 0;
+ this.To = 0;
+ return;
+ }
+ this.From = From_;
+ this.To = To_;
+ });
+ sliceType = $sliceType(Range16);
+ sliceType$1 = $sliceType(Range32);
+ sliceType$2 = $sliceType(foldPair);
+ sliceType$3 = $sliceType(CaseRange);
+ arrayType = $arrayType($Int32, 3);
+ is16 = function(ranges, r) {
+ var _i, _q, _r, _r$1, _ref, hi, i, lo, m, r, range_, range_$1, ranges;
+ if (ranges.$length <= 18 || r <= 255) {
+ _ref = ranges;
+ _i = 0;
+ while (true) {
+ if (!(_i < _ref.$length)) { break; }
+ i = _i;
+ range_ = ((i < 0 || i >= ranges.$length) ? ($throwRuntimeError("index out of range"), undefined) : ranges.$array[ranges.$offset + i]);
+ if (r < range_.Lo) {
+ return false;
+ }
+ if (r <= range_.Hi) {
+ return (range_.Stride === 1) || ((_r = ((r - range_.Lo << 16 >>> 16)) % range_.Stride, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) === 0);
+ }
+ _i++;
+ }
+ return false;
+ }
+ lo = 0;
+ hi = ranges.$length;
+ while (true) {
+ if (!(lo < hi)) { break; }
+ m = lo + (_q = ((hi - lo >> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0;
+ range_$1 = ((m < 0 || m >= ranges.$length) ? ($throwRuntimeError("index out of range"), undefined) : ranges.$array[ranges.$offset + m]);
+ if (range_$1.Lo <= r && r <= range_$1.Hi) {
+ return (range_$1.Stride === 1) || ((_r$1 = ((r - range_$1.Lo << 16 >>> 16)) % range_$1.Stride, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) === 0);
+ }
+ if (r < range_$1.Lo) {
+ hi = m;
+ } else {
+ lo = m + 1 >> 0;
+ }
+ }
+ return false;
+ };
+ is32 = function(ranges, r) {
+ var _i, _q, _r, _r$1, _ref, hi, i, lo, m, r, range_, range_$1, ranges;
+ if (ranges.$length <= 18) {
+ _ref = ranges;
+ _i = 0;
+ while (true) {
+ if (!(_i < _ref.$length)) { break; }
+ i = _i;
+ range_ = ((i < 0 || i >= ranges.$length) ? ($throwRuntimeError("index out of range"), undefined) : ranges.$array[ranges.$offset + i]);
+ if (r < range_.Lo) {
+ return false;
+ }
+ if (r <= range_.Hi) {
+ return (range_.Stride === 1) || ((_r = ((r - range_.Lo >>> 0)) % range_.Stride, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) === 0);
+ }
+ _i++;
+ }
+ return false;
+ }
+ lo = 0;
+ hi = ranges.$length;
+ while (true) {
+ if (!(lo < hi)) { break; }
+ m = lo + (_q = ((hi - lo >> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0;
+ range_$1 = $clone(((m < 0 || m >= ranges.$length) ? ($throwRuntimeError("index out of range"), undefined) : ranges.$array[ranges.$offset + m]), Range32);
+ if (range_$1.Lo <= r && r <= range_$1.Hi) {
+ return (range_$1.Stride === 1) || ((_r$1 = ((r - range_$1.Lo >>> 0)) % range_$1.Stride, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) === 0);
+ }
+ if (r < range_$1.Lo) {
+ hi = m;
+ } else {
+ lo = m + 1 >> 0;
+ }
+ }
+ return false;
+ };
+ Is = function(rangeTab, r) {
+ var r, r16, r32, rangeTab, x;
+ r16 = rangeTab.R16;
+ if (r16.$length > 0 && ((r >>> 0)) <= (((x = r16.$length - 1 >> 0, ((x < 0 || x >= r16.$length) ? ($throwRuntimeError("index out of range"), undefined) : r16.$array[r16.$offset + x])).Hi >>> 0))) {
+ return is16(r16, ((r << 16 >>> 16)));
+ }
+ r32 = rangeTab.R32;
+ if (r32.$length > 0 && r >= (((0 >= r32.$length ? ($throwRuntimeError("index out of range"), undefined) : r32.$array[r32.$offset + 0]).Lo >> 0))) {
+ return is32(r32, ((r >>> 0)));
+ }
+ return false;
+ };
+ $pkg.Is = Is;
+ isExcludingLatin = function(rangeTab, r) {
+ var off, r, r16, r32, rangeTab, x;
+ r16 = rangeTab.R16;
+ off = rangeTab.LatinOffset;
+ if (r16.$length > off && ((r >>> 0)) <= (((x = r16.$length - 1 >> 0, ((x < 0 || x >= r16.$length) ? ($throwRuntimeError("index out of range"), undefined) : r16.$array[r16.$offset + x])).Hi >>> 0))) {
+ return is16($subslice(r16, off), ((r << 16 >>> 16)));
+ }
+ r32 = rangeTab.R32;
+ if (r32.$length > 0 && r >= (((0 >= r32.$length ? ($throwRuntimeError("index out of range"), undefined) : r32.$array[r32.$offset + 0]).Lo >> 0))) {
+ return is32(r32, ((r >>> 0)));
+ }
+ return false;
+ };
+ To = function(_case, r) {
+ var _case, _tuple, r;
+ _tuple = to(_case, r, $pkg.CaseRanges);
+ r = _tuple[0];
+ return r;
+ };
+ $pkg.To = To;
+ ToUpper = function(r) {
+ var r;
+ if (r <= 127) {
+ if (97 <= r && r <= 122) {
+ r = r - (32) >> 0;
+ }
+ return r;
+ }
+ return To(0, r);
+ };
+ $pkg.ToUpper = ToUpper;
+ ToLower = function(r) {
+ var r;
+ if (r <= 127) {
+ if (65 <= r && r <= 90) {
+ r = r + (32) >> 0;
+ }
+ return r;
+ }
+ return To(1, r);
+ };
+ $pkg.ToLower = ToLower;
+ SimpleFold = function(r) {
+ var _q, hi, l, lo, m, r;
+ if (r < 0 || r > 1114111) {
+ return r;
+ }
+ if (((r >> 0)) < 128) {
+ return ((((r < 0 || r >= asciiFold.length) ? ($throwRuntimeError("index out of range"), undefined) : asciiFold[r]) >> 0));
+ }
+ lo = 0;
+ hi = caseOrbit.$length;
+ while (true) {
+ if (!(lo < hi)) { break; }
+ m = lo + (_q = ((hi - lo >> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0;
+ if (((((m < 0 || m >= caseOrbit.$length) ? ($throwRuntimeError("index out of range"), undefined) : caseOrbit.$array[caseOrbit.$offset + m]).From >> 0)) < r) {
+ lo = m + 1 >> 0;
+ } else {
+ hi = m;
+ }
+ }
+ if (lo < caseOrbit.$length && (((((lo < 0 || lo >= caseOrbit.$length) ? ($throwRuntimeError("index out of range"), undefined) : caseOrbit.$array[caseOrbit.$offset + lo]).From >> 0)) === r)) {
+ return ((((lo < 0 || lo >= caseOrbit.$length) ? ($throwRuntimeError("index out of range"), undefined) : caseOrbit.$array[caseOrbit.$offset + lo]).To >> 0));
+ }
+ l = ToLower(r);
+ if (!((l === r))) {
+ return l;
+ }
+ return ToUpper(r);
+ };
+ $pkg.SimpleFold = SimpleFold;
+ IsLetter = function(r) {
+ var r, x;
+ if (((r >>> 0)) <= 255) {
+ return !(((((x = ((r << 24 >>> 24)), ((x < 0 || x >= properties.length) ? ($throwRuntimeError("index out of range"), undefined) : properties[x])) & 96) >>> 0) === 0));
+ }
+ return isExcludingLatin($pkg.Letter, r);
+ };
+ $pkg.IsLetter = IsLetter;
+ IsSpace = function(r) {
+ var _1, r;
+ if (((r >>> 0)) <= 255) {
+ _1 = r;
+ if ((_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12)) || (_1 === (13)) || (_1 === (32)) || (_1 === (133)) || (_1 === (160))) {
+ return true;
+ }
+ return false;
+ }
+ return isExcludingLatin($pkg.White_Space, r);
+ };
+ $pkg.IsSpace = IsSpace;
+ IsDigit = function(r) {
+ var r;
+ if (r <= 255) {
+ return 48 <= r && r <= 57;
+ }
+ return isExcludingLatin($pkg.Digit, r);
+ };
+ $pkg.IsDigit = IsDigit;
+ to = function(_case, r, caseRange) {
+ var _case, _q, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, caseRange, cr, delta, foundMapping, hi, lo, m, mappedRune, r, x;
+ mappedRune = 0;
+ foundMapping = false;
+ if (_case < 0 || 3 <= _case) {
+ _tmp = 65533;
+ _tmp$1 = false;
+ mappedRune = _tmp;
+ foundMapping = _tmp$1;
+ return [mappedRune, foundMapping];
+ }
+ lo = 0;
+ hi = caseRange.$length;
+ while (true) {
+ if (!(lo < hi)) { break; }
+ m = lo + (_q = ((hi - lo >> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0;
+ cr = ((m < 0 || m >= caseRange.$length) ? ($throwRuntimeError("index out of range"), undefined) : caseRange.$array[caseRange.$offset + m]);
+ if (((cr.Lo >> 0)) <= r && r <= ((cr.Hi >> 0))) {
+ delta = ((x = cr.Delta, ((_case < 0 || _case >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[_case])));
+ if (delta > 1114111) {
+ _tmp$2 = ((cr.Lo >> 0)) + ((((((r - ((cr.Lo >> 0)) >> 0)) & ~1) >> 0) | (((_case & 1) >> 0)))) >> 0;
+ _tmp$3 = true;
+ mappedRune = _tmp$2;
+ foundMapping = _tmp$3;
+ return [mappedRune, foundMapping];
+ }
+ _tmp$4 = r + delta >> 0;
+ _tmp$5 = true;
+ mappedRune = _tmp$4;
+ foundMapping = _tmp$5;
+ return [mappedRune, foundMapping];
+ }
+ if (r < ((cr.Lo >> 0))) {
+ hi = m;
+ } else {
+ lo = m + 1 >> 0;
+ }
+ }
+ _tmp$6 = r;
+ _tmp$7 = false;
+ mappedRune = _tmp$6;
+ foundMapping = _tmp$7;
+ return [mappedRune, foundMapping];
+ };
+ RangeTable.init("", [{prop: "R16", name: "R16", embedded: false, exported: true, typ: sliceType, tag: ""}, {prop: "R32", name: "R32", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "LatinOffset", name: "LatinOffset", embedded: false, exported: true, typ: $Int, tag: ""}]);
+ Range16.init("", [{prop: "Lo", name: "Lo", embedded: false, exported: true, typ: $Uint16, tag: ""}, {prop: "Hi", name: "Hi", embedded: false, exported: true, typ: $Uint16, tag: ""}, {prop: "Stride", name: "Stride", embedded: false, exported: true, typ: $Uint16, tag: ""}]);
+ Range32.init("", [{prop: "Lo", name: "Lo", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "Hi", name: "Hi", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "Stride", name: "Stride", embedded: false, exported: true, typ: $Uint32, tag: ""}]);
+ CaseRange.init("", [{prop: "Lo", name: "Lo", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "Hi", name: "Hi", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "Delta", name: "Delta", embedded: false, exported: true, typ: d, tag: ""}]);
+ d.init($Int32, 3);
+ foldPair.init("", [{prop: "From", name: "From", embedded: false, exported: true, typ: $Uint16, tag: ""}, {prop: "To", name: "To", embedded: false, exported: true, typ: $Uint16, 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:
+ _L = new RangeTable.ptr(new sliceType([new Range16.ptr(65, 90, 1), new Range16.ptr(97, 122, 1), new Range16.ptr(170, 181, 11), new Range16.ptr(186, 192, 6), new Range16.ptr(193, 214, 1), new Range16.ptr(216, 246, 1), new Range16.ptr(248, 705, 1), new Range16.ptr(710, 721, 1), new Range16.ptr(736, 740, 1), new Range16.ptr(748, 750, 2), new Range16.ptr(880, 884, 1), new Range16.ptr(886, 887, 1), new Range16.ptr(890, 893, 1), new Range16.ptr(895, 902, 7), new Range16.ptr(904, 906, 1), new Range16.ptr(908, 910, 2), new Range16.ptr(911, 929, 1), new Range16.ptr(931, 1013, 1), new Range16.ptr(1015, 1153, 1), new Range16.ptr(1162, 1327, 1), new Range16.ptr(1329, 1366, 1), new Range16.ptr(1369, 1376, 7), new Range16.ptr(1377, 1416, 1), new Range16.ptr(1488, 1514, 1), new Range16.ptr(1519, 1522, 1), new Range16.ptr(1568, 1610, 1), new Range16.ptr(1646, 1647, 1), new Range16.ptr(1649, 1747, 1), new Range16.ptr(1749, 1765, 16), new Range16.ptr(1766, 1774, 8), new Range16.ptr(1775, 1786, 11), new Range16.ptr(1787, 1788, 1), new Range16.ptr(1791, 1808, 17), new Range16.ptr(1810, 1839, 1), new Range16.ptr(1869, 1957, 1), new Range16.ptr(1969, 1994, 25), new Range16.ptr(1995, 2026, 1), new Range16.ptr(2036, 2037, 1), new Range16.ptr(2042, 2048, 6), new Range16.ptr(2049, 2069, 1), new Range16.ptr(2074, 2084, 10), new Range16.ptr(2088, 2112, 24), new Range16.ptr(2113, 2136, 1), new Range16.ptr(2144, 2154, 1), new Range16.ptr(2208, 2228, 1), new Range16.ptr(2230, 2247, 1), new Range16.ptr(2308, 2361, 1), new Range16.ptr(2365, 2384, 19), new Range16.ptr(2392, 2401, 1), new Range16.ptr(2417, 2432, 1), new Range16.ptr(2437, 2444, 1), new Range16.ptr(2447, 2448, 1), new Range16.ptr(2451, 2472, 1), new Range16.ptr(2474, 2480, 1), new Range16.ptr(2482, 2486, 4), new Range16.ptr(2487, 2489, 1), new Range16.ptr(2493, 2510, 17), new Range16.ptr(2524, 2525, 1), new Range16.ptr(2527, 2529, 1), new Range16.ptr(2544, 2545, 1), new Range16.ptr(2556, 2565, 9), new Range16.ptr(2566, 2570, 1), new Range16.ptr(2575, 2576, 1), new Range16.ptr(2579, 2600, 1), new Range16.ptr(2602, 2608, 1), new Range16.ptr(2610, 2611, 1), new Range16.ptr(2613, 2614, 1), new Range16.ptr(2616, 2617, 1), new Range16.ptr(2649, 2652, 1), new Range16.ptr(2654, 2674, 20), new Range16.ptr(2675, 2676, 1), new Range16.ptr(2693, 2701, 1), new Range16.ptr(2703, 2705, 1), new Range16.ptr(2707, 2728, 1), new Range16.ptr(2730, 2736, 1), new Range16.ptr(2738, 2739, 1), new Range16.ptr(2741, 2745, 1), new Range16.ptr(2749, 2768, 19), new Range16.ptr(2784, 2785, 1), new Range16.ptr(2809, 2821, 12), new Range16.ptr(2822, 2828, 1), new Range16.ptr(2831, 2832, 1), new Range16.ptr(2835, 2856, 1), new Range16.ptr(2858, 2864, 1), new Range16.ptr(2866, 2867, 1), new Range16.ptr(2869, 2873, 1), new Range16.ptr(2877, 2908, 31), new Range16.ptr(2909, 2911, 2), new Range16.ptr(2912, 2913, 1), new Range16.ptr(2929, 2947, 18), new Range16.ptr(2949, 2954, 1), new Range16.ptr(2958, 2960, 1), new Range16.ptr(2962, 2965, 1), new Range16.ptr(2969, 2970, 1), new Range16.ptr(2972, 2974, 2), new Range16.ptr(2975, 2979, 4), new Range16.ptr(2980, 2984, 4), new Range16.ptr(2985, 2986, 1), new Range16.ptr(2990, 3001, 1), new Range16.ptr(3024, 3077, 53), new Range16.ptr(3078, 3084, 1), new Range16.ptr(3086, 3088, 1), new Range16.ptr(3090, 3112, 1), new Range16.ptr(3114, 3129, 1), new Range16.ptr(3133, 3160, 27), new Range16.ptr(3161, 3162, 1), new Range16.ptr(3168, 3169, 1), new Range16.ptr(3200, 3205, 5), new Range16.ptr(3206, 3212, 1), new Range16.ptr(3214, 3216, 1), new Range16.ptr(3218, 3240, 1), new Range16.ptr(3242, 3251, 1), new Range16.ptr(3253, 3257, 1), new Range16.ptr(3261, 3294, 33), new Range16.ptr(3296, 3297, 1), new Range16.ptr(3313, 3314, 1), new Range16.ptr(3332, 3340, 1), new Range16.ptr(3342, 3344, 1), new Range16.ptr(3346, 3386, 1), new Range16.ptr(3389, 3406, 17), new Range16.ptr(3412, 3414, 1), new Range16.ptr(3423, 3425, 1), new Range16.ptr(3450, 3455, 1), new Range16.ptr(3461, 3478, 1), new Range16.ptr(3482, 3505, 1), new Range16.ptr(3507, 3515, 1), new Range16.ptr(3517, 3520, 3), new Range16.ptr(3521, 3526, 1), new Range16.ptr(3585, 3632, 1), new Range16.ptr(3634, 3635, 1), new Range16.ptr(3648, 3654, 1), new Range16.ptr(3713, 3714, 1), new Range16.ptr(3716, 3718, 2), new Range16.ptr(3719, 3722, 1), new Range16.ptr(3724, 3747, 1), new Range16.ptr(3749, 3751, 2), new Range16.ptr(3752, 3760, 1), new Range16.ptr(3762, 3763, 1), new Range16.ptr(3773, 3776, 3), new Range16.ptr(3777, 3780, 1), new Range16.ptr(3782, 3804, 22), new Range16.ptr(3805, 3807, 1), new Range16.ptr(3840, 3904, 64), new Range16.ptr(3905, 3911, 1), new Range16.ptr(3913, 3948, 1), new Range16.ptr(3976, 3980, 1), new Range16.ptr(4096, 4138, 1), new Range16.ptr(4159, 4176, 17), new Range16.ptr(4177, 4181, 1), new Range16.ptr(4186, 4189, 1), new Range16.ptr(4193, 4197, 4), new Range16.ptr(4198, 4206, 8), new Range16.ptr(4207, 4208, 1), new Range16.ptr(4213, 4225, 1), new Range16.ptr(4238, 4256, 18), new Range16.ptr(4257, 4293, 1), new Range16.ptr(4295, 4301, 6), new Range16.ptr(4304, 4346, 1), new Range16.ptr(4348, 4680, 1), new Range16.ptr(4682, 4685, 1), new Range16.ptr(4688, 4694, 1), new Range16.ptr(4696, 4698, 2), new Range16.ptr(4699, 4701, 1), new Range16.ptr(4704, 4744, 1), new Range16.ptr(4746, 4749, 1), new Range16.ptr(4752, 4784, 1), new Range16.ptr(4786, 4789, 1), new Range16.ptr(4792, 4798, 1), new Range16.ptr(4800, 4802, 2), new Range16.ptr(4803, 4805, 1), new Range16.ptr(4808, 4822, 1), new Range16.ptr(4824, 4880, 1), new Range16.ptr(4882, 4885, 1), new Range16.ptr(4888, 4954, 1), new Range16.ptr(4992, 5007, 1), new Range16.ptr(5024, 5109, 1), new Range16.ptr(5112, 5117, 1), new Range16.ptr(5121, 5740, 1), new Range16.ptr(5743, 5759, 1), new Range16.ptr(5761, 5786, 1), new Range16.ptr(5792, 5866, 1), new Range16.ptr(5873, 5880, 1), new Range16.ptr(5888, 5900, 1), new Range16.ptr(5902, 5905, 1), new Range16.ptr(5920, 5937, 1), new Range16.ptr(5952, 5969, 1), new Range16.ptr(5984, 5996, 1), new Range16.ptr(5998, 6000, 1), new Range16.ptr(6016, 6067, 1), new Range16.ptr(6103, 6108, 5), new Range16.ptr(6176, 6264, 1), new Range16.ptr(6272, 6276, 1), new Range16.ptr(6279, 6312, 1), new Range16.ptr(6314, 6320, 6), new Range16.ptr(6321, 6389, 1), new Range16.ptr(6400, 6430, 1), new Range16.ptr(6480, 6509, 1), new Range16.ptr(6512, 6516, 1), new Range16.ptr(6528, 6571, 1), new Range16.ptr(6576, 6601, 1), new Range16.ptr(6656, 6678, 1), new Range16.ptr(6688, 6740, 1), new Range16.ptr(6823, 6917, 94), new Range16.ptr(6918, 6963, 1), new Range16.ptr(6981, 6987, 1), new Range16.ptr(7043, 7072, 1), new Range16.ptr(7086, 7087, 1), new Range16.ptr(7098, 7141, 1), new Range16.ptr(7168, 7203, 1), new Range16.ptr(7245, 7247, 1), new Range16.ptr(7258, 7293, 1), new Range16.ptr(7296, 7304, 1), new Range16.ptr(7312, 7354, 1), new Range16.ptr(7357, 7359, 1), new Range16.ptr(7401, 7404, 1), new Range16.ptr(7406, 7411, 1), new Range16.ptr(7413, 7414, 1), new Range16.ptr(7418, 7424, 6), new Range16.ptr(7425, 7615, 1), new Range16.ptr(7680, 7957, 1), new Range16.ptr(7960, 7965, 1), new Range16.ptr(7968, 8005, 1), new Range16.ptr(8008, 8013, 1), new Range16.ptr(8016, 8023, 1), new Range16.ptr(8025, 8031, 2), new Range16.ptr(8032, 8061, 1), new Range16.ptr(8064, 8116, 1), new Range16.ptr(8118, 8124, 1), new Range16.ptr(8126, 8130, 4), new Range16.ptr(8131, 8132, 1), new Range16.ptr(8134, 8140, 1), new Range16.ptr(8144, 8147, 1), new Range16.ptr(8150, 8155, 1), new Range16.ptr(8160, 8172, 1), new Range16.ptr(8178, 8180, 1), new Range16.ptr(8182, 8188, 1), new Range16.ptr(8305, 8319, 14), new Range16.ptr(8336, 8348, 1), new Range16.ptr(8450, 8455, 5), new Range16.ptr(8458, 8467, 1), new Range16.ptr(8469, 8473, 4), new Range16.ptr(8474, 8477, 1), new Range16.ptr(8484, 8490, 2), new Range16.ptr(8491, 8493, 1), new Range16.ptr(8495, 8505, 1), new Range16.ptr(8508, 8511, 1), new Range16.ptr(8517, 8521, 1), new Range16.ptr(8526, 8579, 53), new Range16.ptr(8580, 11264, 2684), new Range16.ptr(11265, 11310, 1), new Range16.ptr(11312, 11358, 1), new Range16.ptr(11360, 11492, 1), new Range16.ptr(11499, 11502, 1), new Range16.ptr(11506, 11507, 1), new Range16.ptr(11520, 11557, 1), new Range16.ptr(11559, 11565, 6), new Range16.ptr(11568, 11623, 1), new Range16.ptr(11631, 11648, 17), new Range16.ptr(11649, 11670, 1), new Range16.ptr(11680, 11686, 1), new Range16.ptr(11688, 11694, 1), new Range16.ptr(11696, 11702, 1), new Range16.ptr(11704, 11710, 1), new Range16.ptr(11712, 11718, 1), new Range16.ptr(11720, 11726, 1), new Range16.ptr(11728, 11734, 1), new Range16.ptr(11736, 11742, 1), new Range16.ptr(11823, 12293, 470), new Range16.ptr(12294, 12337, 43), new Range16.ptr(12338, 12341, 1), new Range16.ptr(12347, 12348, 1), new Range16.ptr(12353, 12438, 1), new Range16.ptr(12445, 12447, 1), new Range16.ptr(12449, 12538, 1), new Range16.ptr(12540, 12543, 1), new Range16.ptr(12549, 12591, 1), new Range16.ptr(12593, 12686, 1), new Range16.ptr(12704, 12735, 1), new Range16.ptr(12784, 12799, 1), new Range16.ptr(13312, 19903, 1), new Range16.ptr(19968, 40956, 1), new Range16.ptr(40960, 42124, 1), new Range16.ptr(42192, 42237, 1), new Range16.ptr(42240, 42508, 1), new Range16.ptr(42512, 42527, 1), new Range16.ptr(42538, 42539, 1), new Range16.ptr(42560, 42606, 1), new Range16.ptr(42623, 42653, 1), new Range16.ptr(42656, 42725, 1), new Range16.ptr(42775, 42783, 1), new Range16.ptr(42786, 42888, 1), new Range16.ptr(42891, 42943, 1), new Range16.ptr(42946, 42954, 1), new Range16.ptr(42997, 43009, 1), new Range16.ptr(43011, 43013, 1), new Range16.ptr(43015, 43018, 1), new Range16.ptr(43020, 43042, 1), new Range16.ptr(43072, 43123, 1), new Range16.ptr(43138, 43187, 1), new Range16.ptr(43250, 43255, 1), new Range16.ptr(43259, 43261, 2), new Range16.ptr(43262, 43274, 12), new Range16.ptr(43275, 43301, 1), new Range16.ptr(43312, 43334, 1), new Range16.ptr(43360, 43388, 1), new Range16.ptr(43396, 43442, 1), new Range16.ptr(43471, 43488, 17), new Range16.ptr(43489, 43492, 1), new Range16.ptr(43494, 43503, 1), new Range16.ptr(43514, 43518, 1), new Range16.ptr(43520, 43560, 1), new Range16.ptr(43584, 43586, 1), new Range16.ptr(43588, 43595, 1), new Range16.ptr(43616, 43638, 1), new Range16.ptr(43642, 43646, 4), new Range16.ptr(43647, 43695, 1), new Range16.ptr(43697, 43701, 4), new Range16.ptr(43702, 43705, 3), new Range16.ptr(43706, 43709, 1), new Range16.ptr(43712, 43714, 2), new Range16.ptr(43739, 43741, 1), new Range16.ptr(43744, 43754, 1), new Range16.ptr(43762, 43764, 1), new Range16.ptr(43777, 43782, 1), new Range16.ptr(43785, 43790, 1), new Range16.ptr(43793, 43798, 1), new Range16.ptr(43808, 43814, 1), new Range16.ptr(43816, 43822, 1), new Range16.ptr(43824, 43866, 1), new Range16.ptr(43868, 43881, 1), new Range16.ptr(43888, 44002, 1), new Range16.ptr(44032, 55203, 1), new Range16.ptr(55216, 55238, 1), new Range16.ptr(55243, 55291, 1), new Range16.ptr(63744, 64109, 1), new Range16.ptr(64112, 64217, 1), new Range16.ptr(64256, 64262, 1), new Range16.ptr(64275, 64279, 1), new Range16.ptr(64285, 64287, 2), new Range16.ptr(64288, 64296, 1), new Range16.ptr(64298, 64310, 1), new Range16.ptr(64312, 64316, 1), new Range16.ptr(64318, 64320, 2), new Range16.ptr(64321, 64323, 2), new Range16.ptr(64324, 64326, 2), new Range16.ptr(64327, 64433, 1), new Range16.ptr(64467, 64829, 1), new Range16.ptr(64848, 64911, 1), new Range16.ptr(64914, 64967, 1), new Range16.ptr(65008, 65019, 1), new Range16.ptr(65136, 65140, 1), new Range16.ptr(65142, 65276, 1), new Range16.ptr(65313, 65338, 1), new Range16.ptr(65345, 65370, 1), new Range16.ptr(65382, 65470, 1), new Range16.ptr(65474, 65479, 1), new Range16.ptr(65482, 65487, 1), new Range16.ptr(65490, 65495, 1), new Range16.ptr(65498, 65500, 1)]), new sliceType$1([new Range32.ptr(65536, 65547, 1), new Range32.ptr(65549, 65574, 1), new Range32.ptr(65576, 65594, 1), new Range32.ptr(65596, 65597, 1), new Range32.ptr(65599, 65613, 1), new Range32.ptr(65616, 65629, 1), new Range32.ptr(65664, 65786, 1), new Range32.ptr(66176, 66204, 1), new Range32.ptr(66208, 66256, 1), new Range32.ptr(66304, 66335, 1), new Range32.ptr(66349, 66368, 1), new Range32.ptr(66370, 66377, 1), new Range32.ptr(66384, 66421, 1), new Range32.ptr(66432, 66461, 1), new Range32.ptr(66464, 66499, 1), new Range32.ptr(66504, 66511, 1), new Range32.ptr(66560, 66717, 1), new Range32.ptr(66736, 66771, 1), new Range32.ptr(66776, 66811, 1), new Range32.ptr(66816, 66855, 1), new Range32.ptr(66864, 66915, 1), new Range32.ptr(67072, 67382, 1), new Range32.ptr(67392, 67413, 1), new Range32.ptr(67424, 67431, 1), new Range32.ptr(67584, 67589, 1), new Range32.ptr(67592, 67594, 2), new Range32.ptr(67595, 67637, 1), new Range32.ptr(67639, 67640, 1), new Range32.ptr(67644, 67647, 3), new Range32.ptr(67648, 67669, 1), new Range32.ptr(67680, 67702, 1), new Range32.ptr(67712, 67742, 1), new Range32.ptr(67808, 67826, 1), new Range32.ptr(67828, 67829, 1), new Range32.ptr(67840, 67861, 1), new Range32.ptr(67872, 67897, 1), new Range32.ptr(67968, 68023, 1), new Range32.ptr(68030, 68031, 1), new Range32.ptr(68096, 68112, 16), new Range32.ptr(68113, 68115, 1), new Range32.ptr(68117, 68119, 1), new Range32.ptr(68121, 68149, 1), new Range32.ptr(68192, 68220, 1), new Range32.ptr(68224, 68252, 1), new Range32.ptr(68288, 68295, 1), new Range32.ptr(68297, 68324, 1), new Range32.ptr(68352, 68405, 1), new Range32.ptr(68416, 68437, 1), new Range32.ptr(68448, 68466, 1), new Range32.ptr(68480, 68497, 1), new Range32.ptr(68608, 68680, 1), new Range32.ptr(68736, 68786, 1), new Range32.ptr(68800, 68850, 1), new Range32.ptr(68864, 68899, 1), new Range32.ptr(69248, 69289, 1), new Range32.ptr(69296, 69297, 1), new Range32.ptr(69376, 69404, 1), new Range32.ptr(69415, 69424, 9), new Range32.ptr(69425, 69445, 1), new Range32.ptr(69552, 69572, 1), new Range32.ptr(69600, 69622, 1), new Range32.ptr(69635, 69687, 1), new Range32.ptr(69763, 69807, 1), new Range32.ptr(69840, 69864, 1), new Range32.ptr(69891, 69926, 1), new Range32.ptr(69956, 69959, 3), new Range32.ptr(69968, 70002, 1), new Range32.ptr(70006, 70019, 13), new Range32.ptr(70020, 70066, 1), new Range32.ptr(70081, 70084, 1), new Range32.ptr(70106, 70108, 2), new Range32.ptr(70144, 70161, 1), new Range32.ptr(70163, 70187, 1), new Range32.ptr(70272, 70278, 1), new Range32.ptr(70280, 70282, 2), new Range32.ptr(70283, 70285, 1), new Range32.ptr(70287, 70301, 1), new Range32.ptr(70303, 70312, 1), new Range32.ptr(70320, 70366, 1), new Range32.ptr(70405, 70412, 1), new Range32.ptr(70415, 70416, 1), new Range32.ptr(70419, 70440, 1), new Range32.ptr(70442, 70448, 1), new Range32.ptr(70450, 70451, 1), new Range32.ptr(70453, 70457, 1), new Range32.ptr(70461, 70480, 19), new Range32.ptr(70493, 70497, 1), new Range32.ptr(70656, 70708, 1), new Range32.ptr(70727, 70730, 1), new Range32.ptr(70751, 70753, 1), new Range32.ptr(70784, 70831, 1), new Range32.ptr(70852, 70853, 1), new Range32.ptr(70855, 71040, 185), new Range32.ptr(71041, 71086, 1), new Range32.ptr(71128, 71131, 1), new Range32.ptr(71168, 71215, 1), new Range32.ptr(71236, 71296, 60), new Range32.ptr(71297, 71338, 1), new Range32.ptr(71352, 71424, 72), new Range32.ptr(71425, 71450, 1), new Range32.ptr(71680, 71723, 1), new Range32.ptr(71840, 71903, 1), new Range32.ptr(71935, 71942, 1), new Range32.ptr(71945, 71948, 3), new Range32.ptr(71949, 71955, 1), new Range32.ptr(71957, 71958, 1), new Range32.ptr(71960, 71983, 1), new Range32.ptr(71999, 72001, 2), new Range32.ptr(72096, 72103, 1), new Range32.ptr(72106, 72144, 1), new Range32.ptr(72161, 72163, 2), new Range32.ptr(72192, 72203, 11), new Range32.ptr(72204, 72242, 1), new Range32.ptr(72250, 72272, 22), new Range32.ptr(72284, 72329, 1), new Range32.ptr(72349, 72384, 35), new Range32.ptr(72385, 72440, 1), new Range32.ptr(72704, 72712, 1), new Range32.ptr(72714, 72750, 1), new Range32.ptr(72768, 72818, 50), new Range32.ptr(72819, 72847, 1), new Range32.ptr(72960, 72966, 1), new Range32.ptr(72968, 72969, 1), new Range32.ptr(72971, 73008, 1), new Range32.ptr(73030, 73056, 26), new Range32.ptr(73057, 73061, 1), new Range32.ptr(73063, 73064, 1), new Range32.ptr(73066, 73097, 1), new Range32.ptr(73112, 73440, 328), new Range32.ptr(73441, 73458, 1), new Range32.ptr(73648, 73728, 80), new Range32.ptr(73729, 74649, 1), new Range32.ptr(74880, 75075, 1), new Range32.ptr(77824, 78894, 1), new Range32.ptr(82944, 83526, 1), new Range32.ptr(92160, 92728, 1), new Range32.ptr(92736, 92766, 1), new Range32.ptr(92880, 92909, 1), new Range32.ptr(92928, 92975, 1), new Range32.ptr(92992, 92995, 1), new Range32.ptr(93027, 93047, 1), new Range32.ptr(93053, 93071, 1), new Range32.ptr(93760, 93823, 1), new Range32.ptr(93952, 94026, 1), new Range32.ptr(94032, 94099, 67), new Range32.ptr(94100, 94111, 1), new Range32.ptr(94176, 94177, 1), new Range32.ptr(94179, 94208, 29), new Range32.ptr(94209, 100343, 1), new Range32.ptr(100352, 101589, 1), new Range32.ptr(101632, 101640, 1), new Range32.ptr(110592, 110878, 1), new Range32.ptr(110928, 110930, 1), new Range32.ptr(110948, 110951, 1), new Range32.ptr(110960, 111355, 1), new Range32.ptr(113664, 113770, 1), new Range32.ptr(113776, 113788, 1), new Range32.ptr(113792, 113800, 1), new Range32.ptr(113808, 113817, 1), new Range32.ptr(119808, 119892, 1), new Range32.ptr(119894, 119964, 1), new Range32.ptr(119966, 119967, 1), new Range32.ptr(119970, 119973, 3), new Range32.ptr(119974, 119977, 3), new Range32.ptr(119978, 119980, 1), new Range32.ptr(119982, 119993, 1), new Range32.ptr(119995, 119997, 2), new Range32.ptr(119998, 120003, 1), new Range32.ptr(120005, 120069, 1), new Range32.ptr(120071, 120074, 1), new Range32.ptr(120077, 120084, 1), new Range32.ptr(120086, 120092, 1), new Range32.ptr(120094, 120121, 1), new Range32.ptr(120123, 120126, 1), new Range32.ptr(120128, 120132, 1), new Range32.ptr(120134, 120138, 4), new Range32.ptr(120139, 120144, 1), new Range32.ptr(120146, 120485, 1), new Range32.ptr(120488, 120512, 1), new Range32.ptr(120514, 120538, 1), new Range32.ptr(120540, 120570, 1), new Range32.ptr(120572, 120596, 1), new Range32.ptr(120598, 120628, 1), new Range32.ptr(120630, 120654, 1), new Range32.ptr(120656, 120686, 1), new Range32.ptr(120688, 120712, 1), new Range32.ptr(120714, 120744, 1), new Range32.ptr(120746, 120770, 1), new Range32.ptr(120772, 120779, 1), new Range32.ptr(123136, 123180, 1), new Range32.ptr(123191, 123197, 1), new Range32.ptr(123214, 123584, 370), new Range32.ptr(123585, 123627, 1), new Range32.ptr(124928, 125124, 1), new Range32.ptr(125184, 125251, 1), new Range32.ptr(125259, 126464, 1205), new Range32.ptr(126465, 126467, 1), new Range32.ptr(126469, 126495, 1), new Range32.ptr(126497, 126498, 1), new Range32.ptr(126500, 126503, 3), new Range32.ptr(126505, 126514, 1), new Range32.ptr(126516, 126519, 1), new Range32.ptr(126521, 126523, 2), new Range32.ptr(126530, 126535, 5), new Range32.ptr(126537, 126541, 2), new Range32.ptr(126542, 126543, 1), new Range32.ptr(126545, 126546, 1), new Range32.ptr(126548, 126551, 3), new Range32.ptr(126553, 126561, 2), new Range32.ptr(126562, 126564, 2), new Range32.ptr(126567, 126570, 1), new Range32.ptr(126572, 126578, 1), new Range32.ptr(126580, 126583, 1), new Range32.ptr(126585, 126588, 1), new Range32.ptr(126590, 126592, 2), new Range32.ptr(126593, 126601, 1), new Range32.ptr(126603, 126619, 1), new Range32.ptr(126625, 126627, 1), new Range32.ptr(126629, 126633, 1), new Range32.ptr(126635, 126651, 1), new Range32.ptr(131072, 173789, 1), new Range32.ptr(173824, 177972, 1), new Range32.ptr(177984, 178205, 1), new Range32.ptr(178208, 183969, 1), new Range32.ptr(183984, 191456, 1), new Range32.ptr(194560, 195101, 1), new Range32.ptr(196608, 201546, 1)]), 6);
+ _Nd = new RangeTable.ptr(new sliceType([new Range16.ptr(48, 57, 1), new Range16.ptr(1632, 1641, 1), new Range16.ptr(1776, 1785, 1), new Range16.ptr(1984, 1993, 1), new Range16.ptr(2406, 2415, 1), new Range16.ptr(2534, 2543, 1), new Range16.ptr(2662, 2671, 1), new Range16.ptr(2790, 2799, 1), new Range16.ptr(2918, 2927, 1), new Range16.ptr(3046, 3055, 1), new Range16.ptr(3174, 3183, 1), new Range16.ptr(3302, 3311, 1), new Range16.ptr(3430, 3439, 1), new Range16.ptr(3558, 3567, 1), new Range16.ptr(3664, 3673, 1), new Range16.ptr(3792, 3801, 1), new Range16.ptr(3872, 3881, 1), new Range16.ptr(4160, 4169, 1), new Range16.ptr(4240, 4249, 1), new Range16.ptr(6112, 6121, 1), new Range16.ptr(6160, 6169, 1), new Range16.ptr(6470, 6479, 1), new Range16.ptr(6608, 6617, 1), new Range16.ptr(6784, 6793, 1), new Range16.ptr(6800, 6809, 1), new Range16.ptr(6992, 7001, 1), new Range16.ptr(7088, 7097, 1), new Range16.ptr(7232, 7241, 1), new Range16.ptr(7248, 7257, 1), new Range16.ptr(42528, 42537, 1), new Range16.ptr(43216, 43225, 1), new Range16.ptr(43264, 43273, 1), new Range16.ptr(43472, 43481, 1), new Range16.ptr(43504, 43513, 1), new Range16.ptr(43600, 43609, 1), new Range16.ptr(44016, 44025, 1), new Range16.ptr(65296, 65305, 1)]), new sliceType$1([new Range32.ptr(66720, 66729, 1), new Range32.ptr(68912, 68921, 1), new Range32.ptr(69734, 69743, 1), new Range32.ptr(69872, 69881, 1), new Range32.ptr(69942, 69951, 1), new Range32.ptr(70096, 70105, 1), new Range32.ptr(70384, 70393, 1), new Range32.ptr(70736, 70745, 1), new Range32.ptr(70864, 70873, 1), new Range32.ptr(71248, 71257, 1), new Range32.ptr(71360, 71369, 1), new Range32.ptr(71472, 71481, 1), new Range32.ptr(71904, 71913, 1), new Range32.ptr(72016, 72025, 1), new Range32.ptr(72784, 72793, 1), new Range32.ptr(73040, 73049, 1), new Range32.ptr(73120, 73129, 1), new Range32.ptr(92768, 92777, 1), new Range32.ptr(93008, 93017, 1), new Range32.ptr(120782, 120831, 1), new Range32.ptr(123200, 123209, 1), new Range32.ptr(123632, 123641, 1), new Range32.ptr(125264, 125273, 1), new Range32.ptr(130032, 130041, 1)]), 1);
+ $pkg.Digit = _Nd;
+ $pkg.Letter = _L;
+ _White_Space = new RangeTable.ptr(new sliceType([new Range16.ptr(9, 13, 1), new Range16.ptr(32, 133, 101), new Range16.ptr(160, 5760, 5600), new Range16.ptr(8192, 8202, 1), new Range16.ptr(8232, 8233, 1), new Range16.ptr(8239, 8287, 48), new Range16.ptr(12288, 12288, 1)]), sliceType$1.nil, 2);
+ $pkg.White_Space = _White_Space;
+ caseOrbit = new sliceType$2([new foldPair.ptr(75, 107), new foldPair.ptr(83, 115), new foldPair.ptr(107, 8490), new foldPair.ptr(115, 383), new foldPair.ptr(181, 924), new foldPair.ptr(197, 229), new foldPair.ptr(223, 7838), new foldPair.ptr(229, 8491), new foldPair.ptr(304, 304), new foldPair.ptr(305, 305), new foldPair.ptr(383, 83), new foldPair.ptr(452, 453), new foldPair.ptr(453, 454), new foldPair.ptr(454, 452), new foldPair.ptr(455, 456), new foldPair.ptr(456, 457), new foldPair.ptr(457, 455), new foldPair.ptr(458, 459), new foldPair.ptr(459, 460), new foldPair.ptr(460, 458), new foldPair.ptr(497, 498), new foldPair.ptr(498, 499), new foldPair.ptr(499, 497), new foldPair.ptr(837, 921), new foldPair.ptr(914, 946), new foldPair.ptr(917, 949), new foldPair.ptr(920, 952), new foldPair.ptr(921, 953), new foldPair.ptr(922, 954), new foldPair.ptr(924, 956), new foldPair.ptr(928, 960), new foldPair.ptr(929, 961), new foldPair.ptr(931, 962), new foldPair.ptr(934, 966), new foldPair.ptr(937, 969), new foldPair.ptr(946, 976), new foldPair.ptr(949, 1013), new foldPair.ptr(952, 977), new foldPair.ptr(953, 8126), new foldPair.ptr(954, 1008), new foldPair.ptr(956, 181), new foldPair.ptr(960, 982), new foldPair.ptr(961, 1009), new foldPair.ptr(962, 963), new foldPair.ptr(963, 931), new foldPair.ptr(966, 981), new foldPair.ptr(969, 8486), new foldPair.ptr(976, 914), new foldPair.ptr(977, 1012), new foldPair.ptr(981, 934), new foldPair.ptr(982, 928), new foldPair.ptr(1008, 922), new foldPair.ptr(1009, 929), new foldPair.ptr(1012, 920), new foldPair.ptr(1013, 917), new foldPair.ptr(1042, 1074), new foldPair.ptr(1044, 1076), new foldPair.ptr(1054, 1086), new foldPair.ptr(1057, 1089), new foldPair.ptr(1058, 1090), new foldPair.ptr(1066, 1098), new foldPair.ptr(1074, 7296), new foldPair.ptr(1076, 7297), new foldPair.ptr(1086, 7298), new foldPair.ptr(1089, 7299), new foldPair.ptr(1090, 7300), new foldPair.ptr(1098, 7302), new foldPair.ptr(1122, 1123), new foldPair.ptr(1123, 7303), new foldPair.ptr(7296, 1042), new foldPair.ptr(7297, 1044), new foldPair.ptr(7298, 1054), new foldPair.ptr(7299, 1057), new foldPair.ptr(7300, 7301), new foldPair.ptr(7301, 1058), new foldPair.ptr(7302, 1066), new foldPair.ptr(7303, 1122), new foldPair.ptr(7304, 42570), new foldPair.ptr(7776, 7777), new foldPair.ptr(7777, 7835), new foldPair.ptr(7835, 7776), new foldPair.ptr(7838, 223), new foldPair.ptr(8126, 837), new foldPair.ptr(8486, 937), new foldPair.ptr(8490, 75), new foldPair.ptr(8491, 197), new foldPair.ptr(42570, 42571), new foldPair.ptr(42571, 7304)]);
+ asciiFold = $toNativeArray($kindUint16, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 91, 92, 93, 94, 95, 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 8490, 76, 77, 78, 79, 80, 81, 82, 383, 84, 85, 86, 87, 88, 89, 90, 123, 124, 125, 126, 127]);
+ _CaseRanges = new sliceType$3([new CaseRange.ptr(65, 90, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(97, 122, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(181, 181, $toNativeArray($kindInt32, [743, 0, 743])), new CaseRange.ptr(192, 214, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(216, 222, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(224, 246, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(248, 254, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(255, 255, $toNativeArray($kindInt32, [121, 0, 121])), new CaseRange.ptr(256, 303, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(304, 304, $toNativeArray($kindInt32, [0, -199, 0])), new CaseRange.ptr(305, 305, $toNativeArray($kindInt32, [-232, 0, -232])), new CaseRange.ptr(306, 311, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(313, 328, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(330, 375, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(376, 376, $toNativeArray($kindInt32, [0, -121, 0])), new CaseRange.ptr(377, 382, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(383, 383, $toNativeArray($kindInt32, [-300, 0, -300])), new CaseRange.ptr(384, 384, $toNativeArray($kindInt32, [195, 0, 195])), new CaseRange.ptr(385, 385, $toNativeArray($kindInt32, [0, 210, 0])), new CaseRange.ptr(386, 389, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(390, 390, $toNativeArray($kindInt32, [0, 206, 0])), new CaseRange.ptr(391, 392, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(393, 394, $toNativeArray($kindInt32, [0, 205, 0])), new CaseRange.ptr(395, 396, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(398, 398, $toNativeArray($kindInt32, [0, 79, 0])), new CaseRange.ptr(399, 399, $toNativeArray($kindInt32, [0, 202, 0])), new CaseRange.ptr(400, 400, $toNativeArray($kindInt32, [0, 203, 0])), new CaseRange.ptr(401, 402, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(403, 403, $toNativeArray($kindInt32, [0, 205, 0])), new CaseRange.ptr(404, 404, $toNativeArray($kindInt32, [0, 207, 0])), new CaseRange.ptr(405, 405, $toNativeArray($kindInt32, [97, 0, 97])), new CaseRange.ptr(406, 406, $toNativeArray($kindInt32, [0, 211, 0])), new CaseRange.ptr(407, 407, $toNativeArray($kindInt32, [0, 209, 0])), new CaseRange.ptr(408, 409, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(410, 410, $toNativeArray($kindInt32, [163, 0, 163])), new CaseRange.ptr(412, 412, $toNativeArray($kindInt32, [0, 211, 0])), new CaseRange.ptr(413, 413, $toNativeArray($kindInt32, [0, 213, 0])), new CaseRange.ptr(414, 414, $toNativeArray($kindInt32, [130, 0, 130])), new CaseRange.ptr(415, 415, $toNativeArray($kindInt32, [0, 214, 0])), new CaseRange.ptr(416, 421, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(422, 422, $toNativeArray($kindInt32, [0, 218, 0])), new CaseRange.ptr(423, 424, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(425, 425, $toNativeArray($kindInt32, [0, 218, 0])), new CaseRange.ptr(428, 429, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(430, 430, $toNativeArray($kindInt32, [0, 218, 0])), new CaseRange.ptr(431, 432, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(433, 434, $toNativeArray($kindInt32, [0, 217, 0])), new CaseRange.ptr(435, 438, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(439, 439, $toNativeArray($kindInt32, [0, 219, 0])), new CaseRange.ptr(440, 441, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(444, 445, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(447, 447, $toNativeArray($kindInt32, [56, 0, 56])), new CaseRange.ptr(452, 452, $toNativeArray($kindInt32, [0, 2, 1])), new CaseRange.ptr(453, 453, $toNativeArray($kindInt32, [-1, 1, 0])), new CaseRange.ptr(454, 454, $toNativeArray($kindInt32, [-2, 0, -1])), new CaseRange.ptr(455, 455, $toNativeArray($kindInt32, [0, 2, 1])), new CaseRange.ptr(456, 456, $toNativeArray($kindInt32, [-1, 1, 0])), new CaseRange.ptr(457, 457, $toNativeArray($kindInt32, [-2, 0, -1])), new CaseRange.ptr(458, 458, $toNativeArray($kindInt32, [0, 2, 1])), new CaseRange.ptr(459, 459, $toNativeArray($kindInt32, [-1, 1, 0])), new CaseRange.ptr(460, 460, $toNativeArray($kindInt32, [-2, 0, -1])), new CaseRange.ptr(461, 476, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(477, 477, $toNativeArray($kindInt32, [-79, 0, -79])), new CaseRange.ptr(478, 495, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(497, 497, $toNativeArray($kindInt32, [0, 2, 1])), new CaseRange.ptr(498, 498, $toNativeArray($kindInt32, [-1, 1, 0])), new CaseRange.ptr(499, 499, $toNativeArray($kindInt32, [-2, 0, -1])), new CaseRange.ptr(500, 501, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(502, 502, $toNativeArray($kindInt32, [0, -97, 0])), new CaseRange.ptr(503, 503, $toNativeArray($kindInt32, [0, -56, 0])), new CaseRange.ptr(504, 543, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(544, 544, $toNativeArray($kindInt32, [0, -130, 0])), new CaseRange.ptr(546, 563, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(570, 570, $toNativeArray($kindInt32, [0, 10795, 0])), new CaseRange.ptr(571, 572, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(573, 573, $toNativeArray($kindInt32, [0, -163, 0])), new CaseRange.ptr(574, 574, $toNativeArray($kindInt32, [0, 10792, 0])), new CaseRange.ptr(575, 576, $toNativeArray($kindInt32, [10815, 0, 10815])), new CaseRange.ptr(577, 578, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(579, 579, $toNativeArray($kindInt32, [0, -195, 0])), new CaseRange.ptr(580, 580, $toNativeArray($kindInt32, [0, 69, 0])), new CaseRange.ptr(581, 581, $toNativeArray($kindInt32, [0, 71, 0])), new CaseRange.ptr(582, 591, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(592, 592, $toNativeArray($kindInt32, [10783, 0, 10783])), new CaseRange.ptr(593, 593, $toNativeArray($kindInt32, [10780, 0, 10780])), new CaseRange.ptr(594, 594, $toNativeArray($kindInt32, [10782, 0, 10782])), new CaseRange.ptr(595, 595, $toNativeArray($kindInt32, [-210, 0, -210])), new CaseRange.ptr(596, 596, $toNativeArray($kindInt32, [-206, 0, -206])), new CaseRange.ptr(598, 599, $toNativeArray($kindInt32, [-205, 0, -205])), new CaseRange.ptr(601, 601, $toNativeArray($kindInt32, [-202, 0, -202])), new CaseRange.ptr(603, 603, $toNativeArray($kindInt32, [-203, 0, -203])), new CaseRange.ptr(604, 604, $toNativeArray($kindInt32, [42319, 0, 42319])), new CaseRange.ptr(608, 608, $toNativeArray($kindInt32, [-205, 0, -205])), new CaseRange.ptr(609, 609, $toNativeArray($kindInt32, [42315, 0, 42315])), new CaseRange.ptr(611, 611, $toNativeArray($kindInt32, [-207, 0, -207])), new CaseRange.ptr(613, 613, $toNativeArray($kindInt32, [42280, 0, 42280])), new CaseRange.ptr(614, 614, $toNativeArray($kindInt32, [42308, 0, 42308])), new CaseRange.ptr(616, 616, $toNativeArray($kindInt32, [-209, 0, -209])), new CaseRange.ptr(617, 617, $toNativeArray($kindInt32, [-211, 0, -211])), new CaseRange.ptr(618, 618, $toNativeArray($kindInt32, [42308, 0, 42308])), new CaseRange.ptr(619, 619, $toNativeArray($kindInt32, [10743, 0, 10743])), new CaseRange.ptr(620, 620, $toNativeArray($kindInt32, [42305, 0, 42305])), new CaseRange.ptr(623, 623, $toNativeArray($kindInt32, [-211, 0, -211])), new CaseRange.ptr(625, 625, $toNativeArray($kindInt32, [10749, 0, 10749])), new CaseRange.ptr(626, 626, $toNativeArray($kindInt32, [-213, 0, -213])), new CaseRange.ptr(629, 629, $toNativeArray($kindInt32, [-214, 0, -214])), new CaseRange.ptr(637, 637, $toNativeArray($kindInt32, [10727, 0, 10727])), new CaseRange.ptr(640, 640, $toNativeArray($kindInt32, [-218, 0, -218])), new CaseRange.ptr(642, 642, $toNativeArray($kindInt32, [42307, 0, 42307])), new CaseRange.ptr(643, 643, $toNativeArray($kindInt32, [-218, 0, -218])), new CaseRange.ptr(647, 647, $toNativeArray($kindInt32, [42282, 0, 42282])), new CaseRange.ptr(648, 648, $toNativeArray($kindInt32, [-218, 0, -218])), new CaseRange.ptr(649, 649, $toNativeArray($kindInt32, [-69, 0, -69])), new CaseRange.ptr(650, 651, $toNativeArray($kindInt32, [-217, 0, -217])), new CaseRange.ptr(652, 652, $toNativeArray($kindInt32, [-71, 0, -71])), new CaseRange.ptr(658, 658, $toNativeArray($kindInt32, [-219, 0, -219])), new CaseRange.ptr(669, 669, $toNativeArray($kindInt32, [42261, 0, 42261])), new CaseRange.ptr(670, 670, $toNativeArray($kindInt32, [42258, 0, 42258])), new CaseRange.ptr(837, 837, $toNativeArray($kindInt32, [84, 0, 84])), new CaseRange.ptr(880, 883, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(886, 887, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(891, 893, $toNativeArray($kindInt32, [130, 0, 130])), new CaseRange.ptr(895, 895, $toNativeArray($kindInt32, [0, 116, 0])), new CaseRange.ptr(902, 902, $toNativeArray($kindInt32, [0, 38, 0])), new CaseRange.ptr(904, 906, $toNativeArray($kindInt32, [0, 37, 0])), new CaseRange.ptr(908, 908, $toNativeArray($kindInt32, [0, 64, 0])), new CaseRange.ptr(910, 911, $toNativeArray($kindInt32, [0, 63, 0])), new CaseRange.ptr(913, 929, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(931, 939, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(940, 940, $toNativeArray($kindInt32, [-38, 0, -38])), new CaseRange.ptr(941, 943, $toNativeArray($kindInt32, [-37, 0, -37])), new CaseRange.ptr(945, 961, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(962, 962, $toNativeArray($kindInt32, [-31, 0, -31])), new CaseRange.ptr(963, 971, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(972, 972, $toNativeArray($kindInt32, [-64, 0, -64])), new CaseRange.ptr(973, 974, $toNativeArray($kindInt32, [-63, 0, -63])), new CaseRange.ptr(975, 975, $toNativeArray($kindInt32, [0, 8, 0])), new CaseRange.ptr(976, 976, $toNativeArray($kindInt32, [-62, 0, -62])), new CaseRange.ptr(977, 977, $toNativeArray($kindInt32, [-57, 0, -57])), new CaseRange.ptr(981, 981, $toNativeArray($kindInt32, [-47, 0, -47])), new CaseRange.ptr(982, 982, $toNativeArray($kindInt32, [-54, 0, -54])), new CaseRange.ptr(983, 983, $toNativeArray($kindInt32, [-8, 0, -8])), new CaseRange.ptr(984, 1007, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(1008, 1008, $toNativeArray($kindInt32, [-86, 0, -86])), new CaseRange.ptr(1009, 1009, $toNativeArray($kindInt32, [-80, 0, -80])), new CaseRange.ptr(1010, 1010, $toNativeArray($kindInt32, [7, 0, 7])), new CaseRange.ptr(1011, 1011, $toNativeArray($kindInt32, [-116, 0, -116])), new CaseRange.ptr(1012, 1012, $toNativeArray($kindInt32, [0, -60, 0])), new CaseRange.ptr(1013, 1013, $toNativeArray($kindInt32, [-96, 0, -96])), new CaseRange.ptr(1015, 1016, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(1017, 1017, $toNativeArray($kindInt32, [0, -7, 0])), new CaseRange.ptr(1018, 1019, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(1021, 1023, $toNativeArray($kindInt32, [0, -130, 0])), new CaseRange.ptr(1024, 1039, $toNativeArray($kindInt32, [0, 80, 0])), new CaseRange.ptr(1040, 1071, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(1072, 1103, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(1104, 1119, $toNativeArray($kindInt32, [-80, 0, -80])), new CaseRange.ptr(1120, 1153, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(1162, 1215, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(1216, 1216, $toNativeArray($kindInt32, [0, 15, 0])), new CaseRange.ptr(1217, 1230, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(1231, 1231, $toNativeArray($kindInt32, [-15, 0, -15])), new CaseRange.ptr(1232, 1327, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(1329, 1366, $toNativeArray($kindInt32, [0, 48, 0])), new CaseRange.ptr(1377, 1414, $toNativeArray($kindInt32, [-48, 0, -48])), new CaseRange.ptr(4256, 4293, $toNativeArray($kindInt32, [0, 7264, 0])), new CaseRange.ptr(4295, 4295, $toNativeArray($kindInt32, [0, 7264, 0])), new CaseRange.ptr(4301, 4301, $toNativeArray($kindInt32, [0, 7264, 0])), new CaseRange.ptr(4304, 4346, $toNativeArray($kindInt32, [3008, 0, 0])), new CaseRange.ptr(4349, 4351, $toNativeArray($kindInt32, [3008, 0, 0])), new CaseRange.ptr(5024, 5103, $toNativeArray($kindInt32, [0, 38864, 0])), new CaseRange.ptr(5104, 5109, $toNativeArray($kindInt32, [0, 8, 0])), new CaseRange.ptr(5112, 5117, $toNativeArray($kindInt32, [-8, 0, -8])), new CaseRange.ptr(7296, 7296, $toNativeArray($kindInt32, [-6254, 0, -6254])), new CaseRange.ptr(7297, 7297, $toNativeArray($kindInt32, [-6253, 0, -6253])), new CaseRange.ptr(7298, 7298, $toNativeArray($kindInt32, [-6244, 0, -6244])), new CaseRange.ptr(7299, 7300, $toNativeArray($kindInt32, [-6242, 0, -6242])), new CaseRange.ptr(7301, 7301, $toNativeArray($kindInt32, [-6243, 0, -6243])), new CaseRange.ptr(7302, 7302, $toNativeArray($kindInt32, [-6236, 0, -6236])), new CaseRange.ptr(7303, 7303, $toNativeArray($kindInt32, [-6181, 0, -6181])), new CaseRange.ptr(7304, 7304, $toNativeArray($kindInt32, [35266, 0, 35266])), new CaseRange.ptr(7312, 7354, $toNativeArray($kindInt32, [0, -3008, 0])), new CaseRange.ptr(7357, 7359, $toNativeArray($kindInt32, [0, -3008, 0])), new CaseRange.ptr(7545, 7545, $toNativeArray($kindInt32, [35332, 0, 35332])), new CaseRange.ptr(7549, 7549, $toNativeArray($kindInt32, [3814, 0, 3814])), new CaseRange.ptr(7566, 7566, $toNativeArray($kindInt32, [35384, 0, 35384])), new CaseRange.ptr(7680, 7829, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(7835, 7835, $toNativeArray($kindInt32, [-59, 0, -59])), new CaseRange.ptr(7838, 7838, $toNativeArray($kindInt32, [0, -7615, 0])), new CaseRange.ptr(7840, 7935, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(7936, 7943, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(7944, 7951, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(7952, 7957, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(7960, 7965, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(7968, 7975, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(7976, 7983, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(7984, 7991, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(7992, 7999, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8000, 8005, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8008, 8013, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8017, 8017, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8019, 8019, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8021, 8021, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8023, 8023, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8025, 8025, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8027, 8027, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8029, 8029, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8031, 8031, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8032, 8039, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8040, 8047, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8048, 8049, $toNativeArray($kindInt32, [74, 0, 74])), new CaseRange.ptr(8050, 8053, $toNativeArray($kindInt32, [86, 0, 86])), new CaseRange.ptr(8054, 8055, $toNativeArray($kindInt32, [100, 0, 100])), new CaseRange.ptr(8056, 8057, $toNativeArray($kindInt32, [128, 0, 128])), new CaseRange.ptr(8058, 8059, $toNativeArray($kindInt32, [112, 0, 112])), new CaseRange.ptr(8060, 8061, $toNativeArray($kindInt32, [126, 0, 126])), new CaseRange.ptr(8064, 8071, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8072, 8079, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8080, 8087, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8088, 8095, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8096, 8103, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8104, 8111, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8112, 8113, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8115, 8115, $toNativeArray($kindInt32, [9, 0, 9])), new CaseRange.ptr(8120, 8121, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8122, 8123, $toNativeArray($kindInt32, [0, -74, 0])), new CaseRange.ptr(8124, 8124, $toNativeArray($kindInt32, [0, -9, 0])), new CaseRange.ptr(8126, 8126, $toNativeArray($kindInt32, [-7205, 0, -7205])), new CaseRange.ptr(8131, 8131, $toNativeArray($kindInt32, [9, 0, 9])), new CaseRange.ptr(8136, 8139, $toNativeArray($kindInt32, [0, -86, 0])), new CaseRange.ptr(8140, 8140, $toNativeArray($kindInt32, [0, -9, 0])), new CaseRange.ptr(8144, 8145, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8152, 8153, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8154, 8155, $toNativeArray($kindInt32, [0, -100, 0])), new CaseRange.ptr(8160, 8161, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8165, 8165, $toNativeArray($kindInt32, [7, 0, 7])), new CaseRange.ptr(8168, 8169, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8170, 8171, $toNativeArray($kindInt32, [0, -112, 0])), new CaseRange.ptr(8172, 8172, $toNativeArray($kindInt32, [0, -7, 0])), new CaseRange.ptr(8179, 8179, $toNativeArray($kindInt32, [9, 0, 9])), new CaseRange.ptr(8184, 8185, $toNativeArray($kindInt32, [0, -128, 0])), new CaseRange.ptr(8186, 8187, $toNativeArray($kindInt32, [0, -126, 0])), new CaseRange.ptr(8188, 8188, $toNativeArray($kindInt32, [0, -9, 0])), new CaseRange.ptr(8486, 8486, $toNativeArray($kindInt32, [0, -7517, 0])), new CaseRange.ptr(8490, 8490, $toNativeArray($kindInt32, [0, -8383, 0])), new CaseRange.ptr(8491, 8491, $toNativeArray($kindInt32, [0, -8262, 0])), new CaseRange.ptr(8498, 8498, $toNativeArray($kindInt32, [0, 28, 0])), new CaseRange.ptr(8526, 8526, $toNativeArray($kindInt32, [-28, 0, -28])), new CaseRange.ptr(8544, 8559, $toNativeArray($kindInt32, [0, 16, 0])), new CaseRange.ptr(8560, 8575, $toNativeArray($kindInt32, [-16, 0, -16])), new CaseRange.ptr(8579, 8580, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(9398, 9423, $toNativeArray($kindInt32, [0, 26, 0])), new CaseRange.ptr(9424, 9449, $toNativeArray($kindInt32, [-26, 0, -26])), new CaseRange.ptr(11264, 11310, $toNativeArray($kindInt32, [0, 48, 0])), new CaseRange.ptr(11312, 11358, $toNativeArray($kindInt32, [-48, 0, -48])), new CaseRange.ptr(11360, 11361, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(11362, 11362, $toNativeArray($kindInt32, [0, -10743, 0])), new CaseRange.ptr(11363, 11363, $toNativeArray($kindInt32, [0, -3814, 0])), new CaseRange.ptr(11364, 11364, $toNativeArray($kindInt32, [0, -10727, 0])), new CaseRange.ptr(11365, 11365, $toNativeArray($kindInt32, [-10795, 0, -10795])), new CaseRange.ptr(11366, 11366, $toNativeArray($kindInt32, [-10792, 0, -10792])), new CaseRange.ptr(11367, 11372, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(11373, 11373, $toNativeArray($kindInt32, [0, -10780, 0])), new CaseRange.ptr(11374, 11374, $toNativeArray($kindInt32, [0, -10749, 0])), new CaseRange.ptr(11375, 11375, $toNativeArray($kindInt32, [0, -10783, 0])), new CaseRange.ptr(11376, 11376, $toNativeArray($kindInt32, [0, -10782, 0])), new CaseRange.ptr(11378, 11379, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(11381, 11382, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(11390, 11391, $toNativeArray($kindInt32, [0, -10815, 0])), new CaseRange.ptr(11392, 11491, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(11499, 11502, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(11506, 11507, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(11520, 11557, $toNativeArray($kindInt32, [-7264, 0, -7264])), new CaseRange.ptr(11559, 11559, $toNativeArray($kindInt32, [-7264, 0, -7264])), new CaseRange.ptr(11565, 11565, $toNativeArray($kindInt32, [-7264, 0, -7264])), new CaseRange.ptr(42560, 42605, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42624, 42651, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42786, 42799, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42802, 42863, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42873, 42876, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42877, 42877, $toNativeArray($kindInt32, [0, -35332, 0])), new CaseRange.ptr(42878, 42887, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42891, 42892, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42893, 42893, $toNativeArray($kindInt32, [0, -42280, 0])), new CaseRange.ptr(42896, 42899, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42900, 42900, $toNativeArray($kindInt32, [48, 0, 48])), new CaseRange.ptr(42902, 42921, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42922, 42922, $toNativeArray($kindInt32, [0, -42308, 0])), new CaseRange.ptr(42923, 42923, $toNativeArray($kindInt32, [0, -42319, 0])), new CaseRange.ptr(42924, 42924, $toNativeArray($kindInt32, [0, -42315, 0])), new CaseRange.ptr(42925, 42925, $toNativeArray($kindInt32, [0, -42305, 0])), new CaseRange.ptr(42926, 42926, $toNativeArray($kindInt32, [0, -42308, 0])), new CaseRange.ptr(42928, 42928, $toNativeArray($kindInt32, [0, -42258, 0])), new CaseRange.ptr(42929, 42929, $toNativeArray($kindInt32, [0, -42282, 0])), new CaseRange.ptr(42930, 42930, $toNativeArray($kindInt32, [0, -42261, 0])), new CaseRange.ptr(42931, 42931, $toNativeArray($kindInt32, [0, 928, 0])), new CaseRange.ptr(42932, 42943, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42946, 42947, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42948, 42948, $toNativeArray($kindInt32, [0, -48, 0])), new CaseRange.ptr(42949, 42949, $toNativeArray($kindInt32, [0, -42307, 0])), new CaseRange.ptr(42950, 42950, $toNativeArray($kindInt32, [0, -35384, 0])), new CaseRange.ptr(42951, 42954, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42997, 42998, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(43859, 43859, $toNativeArray($kindInt32, [-928, 0, -928])), new CaseRange.ptr(43888, 43967, $toNativeArray($kindInt32, [-38864, 0, -38864])), new CaseRange.ptr(65313, 65338, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(65345, 65370, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(66560, 66599, $toNativeArray($kindInt32, [0, 40, 0])), new CaseRange.ptr(66600, 66639, $toNativeArray($kindInt32, [-40, 0, -40])), new CaseRange.ptr(66736, 66771, $toNativeArray($kindInt32, [0, 40, 0])), new CaseRange.ptr(66776, 66811, $toNativeArray($kindInt32, [-40, 0, -40])), new CaseRange.ptr(68736, 68786, $toNativeArray($kindInt32, [0, 64, 0])), new CaseRange.ptr(68800, 68850, $toNativeArray($kindInt32, [-64, 0, -64])), new CaseRange.ptr(71840, 71871, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(71872, 71903, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(93760, 93791, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(93792, 93823, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(125184, 125217, $toNativeArray($kindInt32, [0, 34, 0])), new CaseRange.ptr(125218, 125251, $toNativeArray($kindInt32, [-34, 0, -34]))]);
+ $pkg.CaseRanges = _CaseRanges;
+ properties = $toNativeArray($kindUint8, [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 144, 130, 130, 130, 136, 130, 130, 130, 130, 130, 130, 136, 130, 130, 130, 130, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 130, 130, 136, 136, 136, 130, 130, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 130, 130, 130, 136, 130, 136, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 130, 136, 130, 136, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 130, 136, 136, 136, 136, 136, 130, 136, 136, 224, 130, 136, 0, 136, 136, 136, 136, 132, 132, 136, 192, 130, 130, 136, 132, 224, 130, 132, 132, 132, 130, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 136, 160, 160, 160, 160, 160, 160, 160, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 136, 192, 192, 192, 192, 192, 192, 192, 192]);
+ /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
+ };
+ $pkg.$init = $init;
+ return $pkg;
+})();
+$packages["unicode/utf8"] = (function() {
+ var $pkg = {}, $init, acceptRange, first, acceptRanges, FullRune, DecodeRune, DecodeRuneInString, DecodeLastRune, DecodeLastRuneInString, RuneLen, EncodeRune, RuneCount, RuneCountInString, RuneStart, Valid, ValidString, ValidRune;
+ acceptRange = $pkg.acceptRange = $newType(0, $kindStruct, "utf8.acceptRange", true, "unicode/utf8", false, function(lo_, hi_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.lo = 0;
+ this.hi = 0;
+ return;
+ }
+ this.lo = lo_;
+ this.hi = hi_;
+ });
+ FullRune = function(p) {
+ var accept, n, p, x, x$1, x$2;
+ n = p.$length;
+ if (n === 0) {
+ return false;
+ }
+ x$1 = (x = (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0]), ((x < 0 || x >= first.length) ? ($throwRuntimeError("index out of range"), undefined) : first[x]));
+ if (n >= ((((x$1 & 7) >>> 0) >> 0))) {
+ return true;
+ }
+ accept = $clone((x$2 = x$1 >>> 4 << 24 >>> 24, ((x$2 < 0 || x$2 >= acceptRanges.length) ? ($throwRuntimeError("index out of range"), undefined) : acceptRanges[x$2])), acceptRange);
+ if (n > 1 && ((1 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 1]) < accept.lo || accept.hi < (1 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 1]))) {
+ return true;
+ } else if (n > 2 && ((2 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 2]) < 128 || 191 < (2 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 2]))) {
+ return true;
+ }
+ return false;
+ };
+ $pkg.FullRune = FullRune;
+ DecodeRune = function(p) {
+ var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, accept, b1, b2, b3, mask, n, p, p0, r, size, sz, x, x$1;
+ r = 0;
+ size = 0;
+ n = p.$length;
+ if (n < 1) {
+ _tmp = 65533;
+ _tmp$1 = 0;
+ r = _tmp;
+ size = _tmp$1;
+ return [r, size];
+ }
+ p0 = (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0]);
+ x = ((p0 < 0 || p0 >= first.length) ? ($throwRuntimeError("index out of range"), undefined) : first[p0]);
+ if (x >= 240) {
+ mask = (((x >> 0)) << 31 >> 0) >> 31 >> 0;
+ _tmp$2 = (((((0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0]) >> 0)) & ~mask) >> 0) | (65533 & mask);
+ _tmp$3 = 1;
+ r = _tmp$2;
+ size = _tmp$3;
+ return [r, size];
+ }
+ sz = ((((x & 7) >>> 0) >> 0));
+ accept = $clone((x$1 = x >>> 4 << 24 >>> 24, ((x$1 < 0 || x$1 >= acceptRanges.length) ? ($throwRuntimeError("index out of range"), undefined) : acceptRanges[x$1])), acceptRange);
+ if (n < sz) {
+ _tmp$4 = 65533;
+ _tmp$5 = 1;
+ r = _tmp$4;
+ size = _tmp$5;
+ return [r, size];
+ }
+ b1 = (1 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 1]);
+ if (b1 < accept.lo || accept.hi < b1) {
+ _tmp$6 = 65533;
+ _tmp$7 = 1;
+ r = _tmp$6;
+ size = _tmp$7;
+ return [r, size];
+ }
+ if (sz <= 2) {
+ _tmp$8 = (((((p0 & 31) >>> 0) >> 0)) << 6 >> 0) | ((((b1 & 63) >>> 0) >> 0));
+ _tmp$9 = 2;
+ r = _tmp$8;
+ size = _tmp$9;
+ return [r, size];
+ }
+ b2 = (2 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 2]);
+ if (b2 < 128 || 191 < b2) {
+ _tmp$10 = 65533;
+ _tmp$11 = 1;
+ r = _tmp$10;
+ size = _tmp$11;
+ return [r, size];
+ }
+ if (sz <= 3) {
+ _tmp$12 = ((((((p0 & 15) >>> 0) >> 0)) << 12 >> 0) | (((((b1 & 63) >>> 0) >> 0)) << 6 >> 0)) | ((((b2 & 63) >>> 0) >> 0));
+ _tmp$13 = 3;
+ r = _tmp$12;
+ size = _tmp$13;
+ return [r, size];
+ }
+ b3 = (3 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 3]);
+ if (b3 < 128 || 191 < b3) {
+ _tmp$14 = 65533;
+ _tmp$15 = 1;
+ r = _tmp$14;
+ size = _tmp$15;
+ return [r, size];
+ }
+ _tmp$16 = (((((((p0 & 7) >>> 0) >> 0)) << 18 >> 0) | (((((b1 & 63) >>> 0) >> 0)) << 12 >> 0)) | (((((b2 & 63) >>> 0) >> 0)) << 6 >> 0)) | ((((b3 & 63) >>> 0) >> 0));
+ _tmp$17 = 4;
+ r = _tmp$16;
+ size = _tmp$17;
+ return [r, size];
+ };
+ $pkg.DecodeRune = DecodeRune;
+ DecodeRuneInString = function(s) {
+ var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, accept, mask, n, r, s, s0, s1, s2, s3, size, sz, x, x$1;
+ r = 0;
+ size = 0;
+ n = s.length;
+ if (n < 1) {
+ _tmp = 65533;
+ _tmp$1 = 0;
+ r = _tmp;
+ size = _tmp$1;
+ return [r, size];
+ }
+ s0 = s.charCodeAt(0);
+ x = ((s0 < 0 || s0 >= first.length) ? ($throwRuntimeError("index out of range"), undefined) : first[s0]);
+ if (x >= 240) {
+ mask = (((x >> 0)) << 31 >> 0) >> 31 >> 0;
+ _tmp$2 = ((((s.charCodeAt(0) >> 0)) & ~mask) >> 0) | (65533 & mask);
+ _tmp$3 = 1;
+ r = _tmp$2;
+ size = _tmp$3;
+ return [r, size];
+ }
+ sz = ((((x & 7) >>> 0) >> 0));
+ accept = $clone((x$1 = x >>> 4 << 24 >>> 24, ((x$1 < 0 || x$1 >= acceptRanges.length) ? ($throwRuntimeError("index out of range"), undefined) : acceptRanges[x$1])), acceptRange);
+ if (n < sz) {
+ _tmp$4 = 65533;
+ _tmp$5 = 1;
+ r = _tmp$4;
+ size = _tmp$5;
+ return [r, size];
+ }
+ s1 = s.charCodeAt(1);
+ if (s1 < accept.lo || accept.hi < s1) {
+ _tmp$6 = 65533;
+ _tmp$7 = 1;
+ r = _tmp$6;
+ size = _tmp$7;
+ return [r, size];
+ }
+ if (sz <= 2) {
+ _tmp$8 = (((((s0 & 31) >>> 0) >> 0)) << 6 >> 0) | ((((s1 & 63) >>> 0) >> 0));
+ _tmp$9 = 2;
+ r = _tmp$8;
+ size = _tmp$9;
+ return [r, size];
+ }
+ s2 = s.charCodeAt(2);
+ if (s2 < 128 || 191 < s2) {
+ _tmp$10 = 65533;
+ _tmp$11 = 1;
+ r = _tmp$10;
+ size = _tmp$11;
+ return [r, size];
+ }
+ if (sz <= 3) {
+ _tmp$12 = ((((((s0 & 15) >>> 0) >> 0)) << 12 >> 0) | (((((s1 & 63) >>> 0) >> 0)) << 6 >> 0)) | ((((s2 & 63) >>> 0) >> 0));
+ _tmp$13 = 3;
+ r = _tmp$12;
+ size = _tmp$13;
+ return [r, size];
+ }
+ s3 = s.charCodeAt(3);
+ if (s3 < 128 || 191 < s3) {
+ _tmp$14 = 65533;
+ _tmp$15 = 1;
+ r = _tmp$14;
+ size = _tmp$15;
+ return [r, size];
+ }
+ _tmp$16 = (((((((s0 & 7) >>> 0) >> 0)) << 18 >> 0) | (((((s1 & 63) >>> 0) >> 0)) << 12 >> 0)) | (((((s2 & 63) >>> 0) >> 0)) << 6 >> 0)) | ((((s3 & 63) >>> 0) >> 0));
+ _tmp$17 = 4;
+ r = _tmp$16;
+ size = _tmp$17;
+ return [r, size];
+ };
+ $pkg.DecodeRuneInString = DecodeRuneInString;
+ DecodeLastRune = function(p) {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, end, lim, p, r, size, start;
+ r = 0;
+ size = 0;
+ end = p.$length;
+ if (end === 0) {
+ _tmp = 65533;
+ _tmp$1 = 0;
+ r = _tmp;
+ size = _tmp$1;
+ return [r, size];
+ }
+ start = end - 1 >> 0;
+ r = ((((start < 0 || start >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + start]) >> 0));
+ if (r < 128) {
+ _tmp$2 = r;
+ _tmp$3 = 1;
+ r = _tmp$2;
+ size = _tmp$3;
+ return [r, size];
+ }
+ lim = end - 4 >> 0;
+ if (lim < 0) {
+ lim = 0;
+ }
+ start = start - (1) >> 0;
+ while (true) {
+ if (!(start >= lim)) { break; }
+ if (RuneStart(((start < 0 || start >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + start]))) {
+ break;
+ }
+ start = start - (1) >> 0;
+ }
+ if (start < 0) {
+ start = 0;
+ }
+ _tuple = DecodeRune($subslice(p, start, end));
+ r = _tuple[0];
+ size = _tuple[1];
+ if (!(((start + size >> 0) === end))) {
+ _tmp$4 = 65533;
+ _tmp$5 = 1;
+ r = _tmp$4;
+ size = _tmp$5;
+ return [r, size];
+ }
+ _tmp$6 = r;
+ _tmp$7 = size;
+ r = _tmp$6;
+ size = _tmp$7;
+ return [r, size];
+ };
+ $pkg.DecodeLastRune = DecodeLastRune;
+ DecodeLastRuneInString = function(s) {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, end, lim, r, s, size, start;
+ r = 0;
+ size = 0;
+ end = s.length;
+ if (end === 0) {
+ _tmp = 65533;
+ _tmp$1 = 0;
+ r = _tmp;
+ size = _tmp$1;
+ return [r, size];
+ }
+ start = end - 1 >> 0;
+ r = ((s.charCodeAt(start) >> 0));
+ if (r < 128) {
+ _tmp$2 = r;
+ _tmp$3 = 1;
+ r = _tmp$2;
+ size = _tmp$3;
+ return [r, size];
+ }
+ lim = end - 4 >> 0;
+ if (lim < 0) {
+ lim = 0;
+ }
+ start = start - (1) >> 0;
+ while (true) {
+ if (!(start >= lim)) { break; }
+ if (RuneStart(s.charCodeAt(start))) {
+ break;
+ }
+ start = start - (1) >> 0;
+ }
+ if (start < 0) {
+ start = 0;
+ }
+ _tuple = DecodeRuneInString($substring(s, start, end));
+ r = _tuple[0];
+ size = _tuple[1];
+ if (!(((start + size >> 0) === end))) {
+ _tmp$4 = 65533;
+ _tmp$5 = 1;
+ r = _tmp$4;
+ size = _tmp$5;
+ return [r, size];
+ }
+ _tmp$6 = r;
+ _tmp$7 = size;
+ r = _tmp$6;
+ size = _tmp$7;
+ return [r, size];
+ };
+ $pkg.DecodeLastRuneInString = DecodeLastRuneInString;
+ RuneLen = function(r) {
+ var r;
+ if (r < 0) {
+ return -1;
+ } else if (r <= 127) {
+ return 1;
+ } else if (r <= 2047) {
+ return 2;
+ } else if (55296 <= r && r <= 57343) {
+ return -1;
+ } else if (r <= 65535) {
+ return 3;
+ } else if (r <= 1114111) {
+ return 4;
+ }
+ return -1;
+ };
+ $pkg.RuneLen = RuneLen;
+ EncodeRune = function(p, r) {
+ var i, p, r;
+ i = ((r >>> 0));
+ if (i <= 127) {
+ (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0] = ((r << 24 >>> 24)));
+ return 1;
+ } else if (i <= 2047) {
+ $unused((1 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 1]));
+ (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0] = ((192 | (((r >> 6 >> 0) << 24 >>> 24))) >>> 0));
+ (1 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 1] = ((128 | ((((r << 24 >>> 24)) & 63) >>> 0)) >>> 0));
+ return 2;
+ } else if ((i > 1114111) || (55296 <= i && i <= 57343)) {
+ r = 65533;
+ $unused((2 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 2]));
+ (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0] = ((224 | (((r >> 12 >> 0) << 24 >>> 24))) >>> 0));
+ (1 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 1] = ((128 | (((((r >> 6 >> 0) << 24 >>> 24)) & 63) >>> 0)) >>> 0));
+ (2 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 2] = ((128 | ((((r << 24 >>> 24)) & 63) >>> 0)) >>> 0));
+ return 3;
+ } else if (i <= 65535) {
+ $unused((2 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 2]));
+ (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0] = ((224 | (((r >> 12 >> 0) << 24 >>> 24))) >>> 0));
+ (1 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 1] = ((128 | (((((r >> 6 >> 0) << 24 >>> 24)) & 63) >>> 0)) >>> 0));
+ (2 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 2] = ((128 | ((((r << 24 >>> 24)) & 63) >>> 0)) >>> 0));
+ return 3;
+ } else {
+ $unused((3 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 3]));
+ (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0] = ((240 | (((r >> 18 >> 0) << 24 >>> 24))) >>> 0));
+ (1 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 1] = ((128 | (((((r >> 12 >> 0) << 24 >>> 24)) & 63) >>> 0)) >>> 0));
+ (2 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 2] = ((128 | (((((r >> 6 >> 0) << 24 >>> 24)) & 63) >>> 0)) >>> 0));
+ (3 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 3] = ((128 | ((((r << 24 >>> 24)) & 63) >>> 0)) >>> 0));
+ return 4;
+ }
+ };
+ $pkg.EncodeRune = EncodeRune;
+ RuneCount = function(p) {
+ var accept, c, c$1, c$2, c$3, i, n, np, p, size, x, x$1, x$2, x$3, x$4;
+ np = p.$length;
+ n = 0;
+ i = 0;
+ while (true) {
+ if (!(i < np)) { break; }
+ n = n + (1) >> 0;
+ c = ((i < 0 || i >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + i]);
+ if (c < 128) {
+ i = i + (1) >> 0;
+ continue;
+ }
+ x = ((c < 0 || c >= first.length) ? ($throwRuntimeError("index out of range"), undefined) : first[c]);
+ if (x === 241) {
+ i = i + (1) >> 0;
+ continue;
+ }
+ size = ((((x & 7) >>> 0) >> 0));
+ if ((i + size >> 0) > np) {
+ i = i + (1) >> 0;
+ continue;
+ }
+ accept = $clone((x$1 = x >>> 4 << 24 >>> 24, ((x$1 < 0 || x$1 >= acceptRanges.length) ? ($throwRuntimeError("index out of range"), undefined) : acceptRanges[x$1])), acceptRange);
+ c$1 = (x$2 = i + 1 >> 0, ((x$2 < 0 || x$2 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$2]));
+ if (c$1 < accept.lo || accept.hi < c$1) {
+ size = 1;
+ } else if (size === 2) {
+ } else {
+ c$2 = (x$3 = i + 2 >> 0, ((x$3 < 0 || x$3 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$3]));
+ if (c$2 < 128 || 191 < c$2) {
+ size = 1;
+ } else if (size === 3) {
+ } else {
+ c$3 = (x$4 = i + 3 >> 0, ((x$4 < 0 || x$4 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$4]));
+ if (c$3 < 128 || 191 < c$3) {
+ size = 1;
+ }
+ }
+ }
+ i = i + (size) >> 0;
+ }
+ return n;
+ };
+ $pkg.RuneCount = RuneCount;
+ RuneCountInString = function(s) {
+ var accept, c, c$1, c$2, c$3, i, n, ns, s, size, x, x$1;
+ n = 0;
+ ns = s.length;
+ i = 0;
+ while (true) {
+ if (!(i < ns)) { break; }
+ c = s.charCodeAt(i);
+ if (c < 128) {
+ i = i + (1) >> 0;
+ n = n + (1) >> 0;
+ continue;
+ }
+ x = ((c < 0 || c >= first.length) ? ($throwRuntimeError("index out of range"), undefined) : first[c]);
+ if (x === 241) {
+ i = i + (1) >> 0;
+ n = n + (1) >> 0;
+ continue;
+ }
+ size = ((((x & 7) >>> 0) >> 0));
+ if ((i + size >> 0) > ns) {
+ i = i + (1) >> 0;
+ n = n + (1) >> 0;
+ continue;
+ }
+ accept = $clone((x$1 = x >>> 4 << 24 >>> 24, ((x$1 < 0 || x$1 >= acceptRanges.length) ? ($throwRuntimeError("index out of range"), undefined) : acceptRanges[x$1])), acceptRange);
+ c$1 = s.charCodeAt((i + 1 >> 0));
+ if (c$1 < accept.lo || accept.hi < c$1) {
+ size = 1;
+ } else if (size === 2) {
+ } else {
+ c$2 = s.charCodeAt((i + 2 >> 0));
+ if (c$2 < 128 || 191 < c$2) {
+ size = 1;
+ } else if (size === 3) {
+ } else {
+ c$3 = s.charCodeAt((i + 3 >> 0));
+ if (c$3 < 128 || 191 < c$3) {
+ size = 1;
+ }
+ }
+ }
+ i = i + (size) >> 0;
+ n = n + (1) >> 0;
+ }
+ n = n;
+ return n;
+ };
+ $pkg.RuneCountInString = RuneCountInString;
+ RuneStart = function(b) {
+ var b;
+ return !((((b & 192) >>> 0) === 128));
+ };
+ $pkg.RuneStart = RuneStart;
+ Valid = function(p) {
+ var accept, c, c$1, c$2, first32, i, n, p, pi, second32, size, x, x$1, x$2, x$3, x$4;
+ while (true) {
+ if (!(p.$length >= 8)) { break; }
+ first32 = ((((((((0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0]) >>> 0)) | ((((1 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 1]) >>> 0)) << 8 >>> 0)) >>> 0) | ((((2 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 2]) >>> 0)) << 16 >>> 0)) >>> 0) | ((((3 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 3]) >>> 0)) << 24 >>> 0)) >>> 0;
+ second32 = ((((((((4 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 4]) >>> 0)) | ((((5 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 5]) >>> 0)) << 8 >>> 0)) >>> 0) | ((((6 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 6]) >>> 0)) << 16 >>> 0)) >>> 0) | ((((7 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 7]) >>> 0)) << 24 >>> 0)) >>> 0;
+ if (!(((((((first32 | second32) >>> 0)) & 2155905152) >>> 0) === 0))) {
+ break;
+ }
+ p = $subslice(p, 8);
+ }
+ n = p.$length;
+ i = 0;
+ while (true) {
+ if (!(i < n)) { break; }
+ pi = ((i < 0 || i >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + i]);
+ if (pi < 128) {
+ i = i + (1) >> 0;
+ continue;
+ }
+ x = ((pi < 0 || pi >= first.length) ? ($throwRuntimeError("index out of range"), undefined) : first[pi]);
+ if (x === 241) {
+ return false;
+ }
+ size = ((((x & 7) >>> 0) >> 0));
+ if ((i + size >> 0) > n) {
+ return false;
+ }
+ accept = $clone((x$1 = x >>> 4 << 24 >>> 24, ((x$1 < 0 || x$1 >= acceptRanges.length) ? ($throwRuntimeError("index out of range"), undefined) : acceptRanges[x$1])), acceptRange);
+ c = (x$2 = i + 1 >> 0, ((x$2 < 0 || x$2 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$2]));
+ if (c < accept.lo || accept.hi < c) {
+ return false;
+ } else if (size === 2) {
+ } else {
+ c$1 = (x$3 = i + 2 >> 0, ((x$3 < 0 || x$3 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$3]));
+ if (c$1 < 128 || 191 < c$1) {
+ return false;
+ } else if (size === 3) {
+ } else {
+ c$2 = (x$4 = i + 3 >> 0, ((x$4 < 0 || x$4 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$4]));
+ if (c$2 < 128 || 191 < c$2) {
+ return false;
+ }
+ }
+ }
+ i = i + (size) >> 0;
+ }
+ return true;
+ };
+ $pkg.Valid = Valid;
+ ValidString = function(s) {
+ var accept, c, c$1, c$2, first32, i, n, s, second32, si, size, x, x$1;
+ while (true) {
+ if (!(s.length >= 8)) { break; }
+ first32 = (((((((s.charCodeAt(0) >>> 0)) | (((s.charCodeAt(1) >>> 0)) << 8 >>> 0)) >>> 0) | (((s.charCodeAt(2) >>> 0)) << 16 >>> 0)) >>> 0) | (((s.charCodeAt(3) >>> 0)) << 24 >>> 0)) >>> 0;
+ second32 = (((((((s.charCodeAt(4) >>> 0)) | (((s.charCodeAt(5) >>> 0)) << 8 >>> 0)) >>> 0) | (((s.charCodeAt(6) >>> 0)) << 16 >>> 0)) >>> 0) | (((s.charCodeAt(7) >>> 0)) << 24 >>> 0)) >>> 0;
+ if (!(((((((first32 | second32) >>> 0)) & 2155905152) >>> 0) === 0))) {
+ break;
+ }
+ s = $substring(s, 8);
+ }
+ n = s.length;
+ i = 0;
+ while (true) {
+ if (!(i < n)) { break; }
+ si = s.charCodeAt(i);
+ if (si < 128) {
+ i = i + (1) >> 0;
+ continue;
+ }
+ x = ((si < 0 || si >= first.length) ? ($throwRuntimeError("index out of range"), undefined) : first[si]);
+ if (x === 241) {
+ return false;
+ }
+ size = ((((x & 7) >>> 0) >> 0));
+ if ((i + size >> 0) > n) {
+ return false;
+ }
+ accept = $clone((x$1 = x >>> 4 << 24 >>> 24, ((x$1 < 0 || x$1 >= acceptRanges.length) ? ($throwRuntimeError("index out of range"), undefined) : acceptRanges[x$1])), acceptRange);
+ c = s.charCodeAt((i + 1 >> 0));
+ if (c < accept.lo || accept.hi < c) {
+ return false;
+ } else if (size === 2) {
+ } else {
+ c$1 = s.charCodeAt((i + 2 >> 0));
+ if (c$1 < 128 || 191 < c$1) {
+ return false;
+ } else if (size === 3) {
+ } else {
+ c$2 = s.charCodeAt((i + 3 >> 0));
+ if (c$2 < 128 || 191 < c$2) {
+ return false;
+ }
+ }
+ }
+ i = i + (size) >> 0;
+ }
+ return true;
+ };
+ $pkg.ValidString = ValidString;
+ ValidRune = function(r) {
+ var r;
+ if (0 <= r && r < 55296) {
+ return true;
+ } else if (57343 < r && r <= 1114111) {
+ return true;
+ }
+ return false;
+ };
+ $pkg.ValidRune = ValidRune;
+ acceptRange.init("unicode/utf8", [{prop: "lo", name: "lo", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "hi", name: "hi", embedded: false, exported: false, typ: $Uint8, 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:
+ first = $toNativeArray($kindUint8, [240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 19, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 35, 3, 3, 52, 4, 4, 4, 68, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241]);
+ acceptRanges = $toNativeArray($kindStruct, [new acceptRange.ptr(128, 191), new acceptRange.ptr(160, 191), new acceptRange.ptr(128, 159), new acceptRange.ptr(144, 191), new acceptRange.ptr(128, 143), new acceptRange.ptr(0, 0), new acceptRange.ptr(0, 0), new acceptRange.ptr(0, 0), new acceptRange.ptr(0, 0), new acceptRange.ptr(0, 0), new acceptRange.ptr(0, 0), new acceptRange.ptr(0, 0), new acceptRange.ptr(0, 0), new acceptRange.ptr(0, 0), new acceptRange.ptr(0, 0), new acceptRange.ptr(0, 0)]);
+ /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
+ };
+ $pkg.$init = $init;
+ return $pkg;
+})();
+$packages["bytes"] = (function() {
+ var $pkg = {}, $init, errors, bytealg, io, unicode, utf8, Reader, asciiSet, Buffer, readOp, sliceType, arrayType, ptrType, arrayType$1, ptrType$1, ptrType$2, asciiSpace, errNegativeRead, errUnreadByte, NewReader, Count, Contains, ContainsAny, LastIndexByte, IndexRune, IndexAny, HasPrefix, HasSuffix, Map, ToLower, TrimLeftFunc, TrimRightFunc, TrimFunc, TrimPrefix, indexFunc, lastIndexFunc, makeASCIISet, containsRune, TrimLeft, trimLeftByte, trimLeftASCII, trimLeftUnicode, TrimRight, trimRightByte, trimRightASCII, trimRightUnicode, TrimSpace, EqualFold, Index, Cut, makeSlice, IndexByte, Equal, Compare;
+ errors = $packages["errors"];
+ bytealg = $packages["internal/bytealg"];
+ io = $packages["io"];
+ unicode = $packages["unicode"];
+ utf8 = $packages["unicode/utf8"];
+ Reader = $pkg.Reader = $newType(0, $kindStruct, "bytes.Reader", true, "bytes", true, function(s_, i_, prevRune_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.s = sliceType.nil;
+ this.i = new $Int64(0, 0);
+ this.prevRune = 0;
+ return;
+ }
+ this.s = s_;
+ this.i = i_;
+ this.prevRune = prevRune_;
+ });
+ asciiSet = $pkg.asciiSet = $newType(32, $kindArray, "bytes.asciiSet", true, "bytes", false, null);
+ Buffer = $pkg.Buffer = $newType(0, $kindStruct, "bytes.Buffer", true, "bytes", true, function(buf_, off_, lastRead_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.buf = sliceType.nil;
+ this.off = 0;
+ this.lastRead = 0;
+ return;
+ }
+ this.buf = buf_;
+ this.off = off_;
+ this.lastRead = lastRead_;
+ });
+ readOp = $pkg.readOp = $newType(1, $kindInt8, "bytes.readOp", true, "bytes", false, null);
+ sliceType = $sliceType($Uint8);
+ arrayType = $arrayType($Uint8, 4);
+ ptrType = $ptrType(asciiSet);
+ arrayType$1 = $arrayType($Uint32, 8);
+ ptrType$1 = $ptrType(Buffer);
+ ptrType$2 = $ptrType(Reader);
+ Reader.ptr.prototype.Len = function() {
+ var r, x, x$1, x$2, x$3, x$4;
+ r = this;
+ if ((x = r.i, x$1 = (new $Int64(0, r.s.$length)), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low >= x$1.$low)))) {
+ return 0;
+ }
+ return (((x$2 = (x$3 = (new $Int64(0, r.s.$length)), x$4 = r.i, new $Int64(x$3.$high - x$4.$high, x$3.$low - x$4.$low)), x$2.$low + ((x$2.$high >> 31) * 4294967296)) >> 0));
+ };
+ Reader.prototype.Len = function() { return this.$val.Len(); };
+ Reader.ptr.prototype.Size = function() {
+ var r;
+ r = this;
+ return (new $Int64(0, r.s.$length));
+ };
+ Reader.prototype.Size = function() { return this.$val.Size(); };
+ Reader.ptr.prototype.Read = function(b) {
+ var _tmp, _tmp$1, b, err, n, r, x, x$1, x$2, x$3;
+ n = 0;
+ err = $ifaceNil;
+ r = this;
+ if ((x = r.i, x$1 = (new $Int64(0, r.s.$length)), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low >= x$1.$low)))) {
+ _tmp = 0;
+ _tmp$1 = io.EOF;
+ n = _tmp;
+ err = _tmp$1;
+ return [n, err];
+ }
+ r.prevRune = -1;
+ n = $copySlice(b, $subslice(r.s, $flatten64(r.i)));
+ r.i = (x$2 = r.i, x$3 = (new $Int64(0, n)), new $Int64(x$2.$high + x$3.$high, x$2.$low + x$3.$low));
+ return [n, err];
+ };
+ Reader.prototype.Read = function(b) { return this.$val.Read(b); };
+ Reader.ptr.prototype.ReadAt = function(b, off) {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, b, err, n, off, r, x;
+ n = 0;
+ err = $ifaceNil;
+ r = this;
+ if ((off.$high < 0 || (off.$high === 0 && off.$low < 0))) {
+ _tmp = 0;
+ _tmp$1 = errors.New("bytes.Reader.ReadAt: negative offset");
+ n = _tmp;
+ err = _tmp$1;
+ return [n, err];
+ }
+ if ((x = (new $Int64(0, r.s.$length)), (off.$high > x.$high || (off.$high === x.$high && off.$low >= x.$low)))) {
+ _tmp$2 = 0;
+ _tmp$3 = io.EOF;
+ n = _tmp$2;
+ err = _tmp$3;
+ return [n, err];
+ }
+ n = $copySlice(b, $subslice(r.s, $flatten64(off)));
+ if (n < b.$length) {
+ err = io.EOF;
+ }
+ return [n, err];
+ };
+ Reader.prototype.ReadAt = function(b, off) { return this.$val.ReadAt(b, off); };
+ Reader.ptr.prototype.ReadByte = function() {
+ var b, r, x, x$1, x$2, x$3, x$4, x$5;
+ r = this;
+ r.prevRune = -1;
+ if ((x = r.i, x$1 = (new $Int64(0, r.s.$length)), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low >= x$1.$low)))) {
+ return [0, io.EOF];
+ }
+ b = (x$2 = r.s, x$3 = r.i, (($flatten64(x$3) < 0 || $flatten64(x$3) >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + $flatten64(x$3)]));
+ r.i = (x$4 = r.i, x$5 = new $Int64(0, 1), new $Int64(x$4.$high + x$5.$high, x$4.$low + x$5.$low));
+ return [b, $ifaceNil];
+ };
+ Reader.prototype.ReadByte = function() { return this.$val.ReadByte(); };
+ Reader.ptr.prototype.UnreadByte = function() {
+ var r, x, x$1, x$2;
+ r = this;
+ if ((x = r.i, (x.$high < 0 || (x.$high === 0 && x.$low <= 0)))) {
+ return errors.New("bytes.Reader.UnreadByte: at beginning of slice");
+ }
+ r.prevRune = -1;
+ r.i = (x$1 = r.i, x$2 = new $Int64(0, 1), new $Int64(x$1.$high - x$2.$high, x$1.$low - x$2.$low));
+ return $ifaceNil;
+ };
+ Reader.prototype.UnreadByte = function() { return this.$val.UnreadByte(); };
+ Reader.ptr.prototype.ReadRune = function() {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, c, ch, err, r, size, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8;
+ ch = 0;
+ size = 0;
+ err = $ifaceNil;
+ r = this;
+ if ((x = r.i, x$1 = (new $Int64(0, r.s.$length)), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low >= x$1.$low)))) {
+ r.prevRune = -1;
+ _tmp = 0;
+ _tmp$1 = 0;
+ _tmp$2 = io.EOF;
+ ch = _tmp;
+ size = _tmp$1;
+ err = _tmp$2;
+ return [ch, size, err];
+ }
+ r.prevRune = (((x$2 = r.i, x$2.$low + ((x$2.$high >> 31) * 4294967296)) >> 0));
+ c = (x$3 = r.s, x$4 = r.i, (($flatten64(x$4) < 0 || $flatten64(x$4) >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + $flatten64(x$4)]));
+ if (c < 128) {
+ r.i = (x$5 = r.i, x$6 = new $Int64(0, 1), new $Int64(x$5.$high + x$6.$high, x$5.$low + x$6.$low));
+ _tmp$3 = ((c >> 0));
+ _tmp$4 = 1;
+ _tmp$5 = $ifaceNil;
+ ch = _tmp$3;
+ size = _tmp$4;
+ err = _tmp$5;
+ return [ch, size, err];
+ }
+ _tuple = utf8.DecodeRune($subslice(r.s, $flatten64(r.i)));
+ ch = _tuple[0];
+ size = _tuple[1];
+ r.i = (x$7 = r.i, x$8 = (new $Int64(0, size)), new $Int64(x$7.$high + x$8.$high, x$7.$low + x$8.$low));
+ return [ch, size, err];
+ };
+ Reader.prototype.ReadRune = function() { return this.$val.ReadRune(); };
+ Reader.ptr.prototype.UnreadRune = function() {
+ var r, x;
+ r = this;
+ if ((x = r.i, (x.$high < 0 || (x.$high === 0 && x.$low <= 0)))) {
+ return errors.New("bytes.Reader.UnreadRune: at beginning of slice");
+ }
+ if (r.prevRune < 0) {
+ return errors.New("bytes.Reader.UnreadRune: previous operation was not ReadRune");
+ }
+ r.i = (new $Int64(0, r.prevRune));
+ r.prevRune = -1;
+ return $ifaceNil;
+ };
+ Reader.prototype.UnreadRune = function() { return this.$val.UnreadRune(); };
+ Reader.ptr.prototype.Seek = function(offset, whence) {
+ var _1, abs, offset, r, whence, x, x$1;
+ r = this;
+ r.prevRune = -1;
+ abs = new $Int64(0, 0);
+ _1 = whence;
+ if (_1 === (0)) {
+ abs = offset;
+ } else if (_1 === (1)) {
+ abs = (x = r.i, new $Int64(x.$high + offset.$high, x.$low + offset.$low));
+ } else if (_1 === (2)) {
+ abs = (x$1 = (new $Int64(0, r.s.$length)), new $Int64(x$1.$high + offset.$high, x$1.$low + offset.$low));
+ } else {
+ return [new $Int64(0, 0), errors.New("bytes.Reader.Seek: invalid whence")];
+ }
+ if ((abs.$high < 0 || (abs.$high === 0 && abs.$low < 0))) {
+ return [new $Int64(0, 0), errors.New("bytes.Reader.Seek: negative position")];
+ }
+ r.i = abs;
+ return [abs, $ifaceNil];
+ };
+ Reader.prototype.Seek = function(offset, whence) { return this.$val.Seek(offset, whence); };
+ Reader.ptr.prototype.WriteTo = function(w) {
+ var {_r, _tmp, _tmp$1, _tuple, b, err, m, n, r, w, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {w});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ n = new $Int64(0, 0);
+ err = $ifaceNil;
+ r = this;
+ r.prevRune = -1;
+ if ((x = r.i, x$1 = (new $Int64(0, r.s.$length)), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low >= x$1.$low)))) {
+ _tmp = new $Int64(0, 0);
+ _tmp$1 = $ifaceNil;
+ n = _tmp;
+ err = _tmp$1;
+ $s = -1; return [n, err];
+ }
+ b = $subslice(r.s, $flatten64(r.i));
+ _r = w.Write(b); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ m = _tuple[0];
+ err = _tuple[1];
+ if (m > b.$length) {
+ $panic(new $String("bytes.Reader.WriteTo: invalid Write count"));
+ }
+ r.i = (x$2 = r.i, x$3 = (new $Int64(0, m)), new $Int64(x$2.$high + x$3.$high, x$2.$low + x$3.$low));
+ n = (new $Int64(0, m));
+ if (!((m === b.$length)) && $interfaceIsEqual(err, $ifaceNil)) {
+ err = io.ErrShortWrite;
+ }
+ $s = -1; return [n, err];
+ /* */ } return; } var $f = {$blk: Reader.ptr.prototype.WriteTo, $c: true, $r, _r, _tmp, _tmp$1, _tuple, b, err, m, n, r, w, x, x$1, x$2, x$3, $s};return $f;
+ };
+ Reader.prototype.WriteTo = function(w) { return this.$val.WriteTo(w); };
+ Reader.ptr.prototype.Reset = function(b) {
+ var b, r;
+ r = this;
+ Reader.copy(r, new Reader.ptr(b, new $Int64(0, 0), -1));
+ };
+ Reader.prototype.Reset = function(b) { return this.$val.Reset(b); };
+ NewReader = function(b) {
+ var b;
+ return new Reader.ptr(b, new $Int64(0, 0), -1);
+ };
+ $pkg.NewReader = NewReader;
+ Count = function(s, sep) {
+ var i, n, s, sep;
+ if (sep.$length === 0) {
+ return utf8.RuneCount(s) + 1 >> 0;
+ }
+ if (sep.$length === 1) {
+ return bytealg.Count(s, (0 >= sep.$length ? ($throwRuntimeError("index out of range"), undefined) : sep.$array[sep.$offset + 0]));
+ }
+ n = 0;
+ while (true) {
+ i = Index(s, sep);
+ if (i === -1) {
+ return n;
+ }
+ n = n + (1) >> 0;
+ s = $subslice(s, (i + sep.$length >> 0));
+ }
+ };
+ $pkg.Count = Count;
+ Contains = function(b, subslice) {
+ var b, subslice;
+ return !((Index(b, subslice) === -1));
+ };
+ $pkg.Contains = Contains;
+ ContainsAny = function(b, chars) {
+ var b, chars;
+ return IndexAny(b, chars) >= 0;
+ };
+ $pkg.ContainsAny = ContainsAny;
+ LastIndexByte = function(s, c) {
+ var c, i, s;
+ i = s.$length - 1 >> 0;
+ while (true) {
+ if (!(i >= 0)) { break; }
+ if (((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]) === c) {
+ return i;
+ }
+ i = i - (1) >> 0;
+ }
+ return -1;
+ };
+ $pkg.LastIndexByte = LastIndexByte;
+ IndexRune = function(s, r) {
+ var _tuple, b, i, n, n$1, r, r1, s;
+ if (0 <= r && r < 128) {
+ return IndexByte(s, ((r << 24 >>> 24)));
+ } else if ((r === 65533)) {
+ i = 0;
+ while (true) {
+ if (!(i < s.$length)) { break; }
+ _tuple = utf8.DecodeRune($subslice(s, i));
+ r1 = _tuple[0];
+ n = _tuple[1];
+ if (r1 === 65533) {
+ return i;
+ }
+ i = i + (n) >> 0;
+ }
+ return -1;
+ } else if (!utf8.ValidRune(r)) {
+ return -1;
+ } else {
+ b = arrayType.zero();
+ n$1 = utf8.EncodeRune(new sliceType(b), r);
+ return Index(s, $subslice(new sliceType(b), 0, n$1));
+ }
+ };
+ $pkg.IndexRune = IndexRune;
+ IndexAny = function(s, chars) {
+ var _i, _i$1, _i$2, _ref, _ref$1, _ref$2, _rune, _rune$1, _tuple, _tuple$1, as, c, ch, chars, i, i$1, isASCII, r, r$1, r$2, s, width;
+ if (chars === "") {
+ return -1;
+ }
+ if (s.$length === 1) {
+ r = (((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) >> 0));
+ if (r >= 128) {
+ _ref = chars;
+ _i = 0;
+ while (true) {
+ if (!(_i < _ref.length)) { break; }
+ _rune = $decodeRune(_ref, _i);
+ r = _rune[0];
+ if (r === 65533) {
+ return 0;
+ }
+ _i += _rune[1];
+ }
+ return -1;
+ }
+ if (bytealg.IndexByteString(chars, (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0])) >= 0) {
+ return 0;
+ }
+ return -1;
+ }
+ if (chars.length === 1) {
+ r$1 = ((chars.charCodeAt(0) >> 0));
+ if (r$1 >= 128) {
+ r$1 = 65533;
+ }
+ return IndexRune(s, r$1);
+ }
+ if (s.$length > 8) {
+ _tuple = makeASCIISet(chars);
+ as = $clone(_tuple[0], asciiSet);
+ isASCII = _tuple[1];
+ if (isASCII) {
+ _ref$1 = s;
+ _i$1 = 0;
+ while (true) {
+ if (!(_i$1 < _ref$1.$length)) { break; }
+ i = _i$1;
+ c = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]);
+ if (new ptrType(as).contains(c)) {
+ return i;
+ }
+ _i$1++;
+ }
+ return -1;
+ }
+ }
+ width = 0;
+ i$1 = 0;
+ while (true) {
+ if (!(i$1 < s.$length)) { break; }
+ r$2 = ((((i$1 < 0 || i$1 >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i$1]) >> 0));
+ if (r$2 < 128) {
+ if (bytealg.IndexByteString(chars, ((i$1 < 0 || i$1 >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i$1])) >= 0) {
+ return i$1;
+ }
+ width = 1;
+ i$1 = i$1 + (width) >> 0;
+ continue;
+ }
+ _tuple$1 = utf8.DecodeRune($subslice(s, i$1));
+ r$2 = _tuple$1[0];
+ width = _tuple$1[1];
+ if (!((r$2 === 65533))) {
+ if (chars.length === width) {
+ if (chars === ($encodeRune(r$2))) {
+ return i$1;
+ }
+ i$1 = i$1 + (width) >> 0;
+ continue;
+ }
+ if (bytealg.MaxLen >= width) {
+ if (bytealg.IndexString(chars, ($encodeRune(r$2))) >= 0) {
+ return i$1;
+ }
+ i$1 = i$1 + (width) >> 0;
+ continue;
+ }
+ }
+ _ref$2 = chars;
+ _i$2 = 0;
+ while (true) {
+ if (!(_i$2 < _ref$2.length)) { break; }
+ _rune$1 = $decodeRune(_ref$2, _i$2);
+ ch = _rune$1[0];
+ if (r$2 === ch) {
+ return i$1;
+ }
+ _i$2 += _rune$1[1];
+ }
+ i$1 = i$1 + (width) >> 0;
+ }
+ return -1;
+ };
+ $pkg.IndexAny = IndexAny;
+ HasPrefix = function(s, prefix) {
+ var prefix, s;
+ return s.$length >= prefix.$length && Equal($subslice(s, 0, prefix.$length), prefix);
+ };
+ $pkg.HasPrefix = HasPrefix;
+ HasSuffix = function(s, suffix) {
+ var s, suffix;
+ return s.$length >= suffix.$length && Equal($subslice(s, (s.$length - suffix.$length >> 0)), suffix);
+ };
+ $pkg.HasSuffix = HasSuffix;
+ Map = function(mapping, s) {
+ var {_r, _tuple, b, i, mapping, maxbytes, nb, nbytes, r, rl, s, wid, $s, $r, $c} = $restore(this, {mapping, s});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ maxbytes = s.$length;
+ nbytes = 0;
+ b = $makeSlice(sliceType, maxbytes);
+ i = 0;
+ /* while (true) { */ case 1:
+ /* if (!(i < s.$length)) { break; } */ if(!(i < s.$length)) { $s = 2; continue; }
+ wid = 1;
+ r = ((((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]) >> 0));
+ if (r >= 128) {
+ _tuple = utf8.DecodeRune($subslice(s, i));
+ r = _tuple[0];
+ wid = _tuple[1];
+ }
+ _r = mapping(r); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ r = _r;
+ if (r >= 0) {
+ rl = utf8.RuneLen(r);
+ if (rl < 0) {
+ rl = 3;
+ }
+ if ((nbytes + rl >> 0) > maxbytes) {
+ maxbytes = ($imul(maxbytes, 2)) + 4 >> 0;
+ nb = $makeSlice(sliceType, maxbytes);
+ $copySlice(nb, $subslice(b, 0, nbytes));
+ b = nb;
+ }
+ nbytes = nbytes + (utf8.EncodeRune($subslice(b, nbytes, maxbytes), r)) >> 0;
+ }
+ i = i + (wid) >> 0;
+ $s = 1; continue;
+ case 2:
+ $s = -1; return $subslice(b, 0, nbytes);
+ /* */ } return; } var $f = {$blk: Map, $c: true, $r, _r, _tuple, b, i, mapping, maxbytes, nb, nbytes, r, rl, s, wid, $s};return $f;
+ };
+ $pkg.Map = Map;
+ ToLower = function(s) {
+ var {$24r, _r, _tmp, _tmp$1, b, c, c$1, hasUpper, i, i$1, isASCII, s, $s, $r, $c} = $restore(this, {s});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _tmp = true;
+ _tmp$1 = false;
+ isASCII = _tmp;
+ hasUpper = _tmp$1;
+ i = 0;
+ while (true) {
+ if (!(i < s.$length)) { break; }
+ c = ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]);
+ if (c >= 128) {
+ isASCII = false;
+ break;
+ }
+ hasUpper = hasUpper || (65 <= c && c <= 90);
+ i = i + (1) >> 0;
+ }
+ if (isASCII) {
+ if (!hasUpper) {
+ $s = -1; return $appendSlice((new sliceType($stringToBytes(""))), s);
+ }
+ b = $makeSlice(sliceType, s.$length);
+ i$1 = 0;
+ while (true) {
+ if (!(i$1 < s.$length)) { break; }
+ c$1 = ((i$1 < 0 || i$1 >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i$1]);
+ if (65 <= c$1 && c$1 <= 90) {
+ c$1 = c$1 + (32) << 24 >>> 24;
+ }
+ ((i$1 < 0 || i$1 >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + i$1] = c$1);
+ i$1 = i$1 + (1) >> 0;
+ }
+ $s = -1; return b;
+ }
+ _r = Map(unicode.ToLower, s); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: ToLower, $c: true, $r, $24r, _r, _tmp, _tmp$1, b, c, c$1, hasUpper, i, i$1, isASCII, s, $s};return $f;
+ };
+ $pkg.ToLower = ToLower;
+ TrimLeftFunc = function(s, f) {
+ var {_r, f, i, s, $s, $r, $c} = $restore(this, {s, f});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = indexFunc(s, f, false); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ i = _r;
+ if (i === -1) {
+ $s = -1; return sliceType.nil;
+ }
+ $s = -1; return $subslice(s, i);
+ /* */ } return; } var $f = {$blk: TrimLeftFunc, $c: true, $r, _r, f, i, s, $s};return $f;
+ };
+ $pkg.TrimLeftFunc = TrimLeftFunc;
+ TrimRightFunc = function(s, f) {
+ var {_r, _tuple, f, i, s, wid, $s, $r, $c} = $restore(this, {s, f});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = lastIndexFunc(s, f, false); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ i = _r;
+ if (i >= 0 && ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]) >= 128) {
+ _tuple = utf8.DecodeRune($subslice(s, i));
+ wid = _tuple[1];
+ i = i + (wid) >> 0;
+ } else {
+ i = i + (1) >> 0;
+ }
+ $s = -1; return $subslice(s, 0, i);
+ /* */ } return; } var $f = {$blk: TrimRightFunc, $c: true, $r, _r, _tuple, f, i, s, wid, $s};return $f;
+ };
+ $pkg.TrimRightFunc = TrimRightFunc;
+ TrimFunc = function(s, f) {
+ var {$24r, _r, _r$1, f, s, $s, $r, $c} = $restore(this, {s, f});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = TrimLeftFunc(s, f); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _r$1 = TrimRightFunc(_r, f); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ $24r = _r$1;
+ $s = 3; case 3: return $24r;
+ /* */ } return; } var $f = {$blk: TrimFunc, $c: true, $r, $24r, _r, _r$1, f, s, $s};return $f;
+ };
+ $pkg.TrimFunc = TrimFunc;
+ TrimPrefix = function(s, prefix) {
+ var prefix, s;
+ if (HasPrefix(s, prefix)) {
+ return $subslice(s, prefix.$length);
+ }
+ return s;
+ };
+ $pkg.TrimPrefix = TrimPrefix;
+ indexFunc = function(s, f, truth) {
+ var {_r, _tuple, f, r, s, start, truth, wid, $s, $r, $c} = $restore(this, {s, f, truth});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ start = 0;
+ /* while (true) { */ case 1:
+ /* if (!(start < s.$length)) { break; } */ if(!(start < s.$length)) { $s = 2; continue; }
+ wid = 1;
+ r = ((((start < 0 || start >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + start]) >> 0));
+ if (r >= 128) {
+ _tuple = utf8.DecodeRune($subslice(s, start));
+ r = _tuple[0];
+ wid = _tuple[1];
+ }
+ _r = f(r); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ /* */ if (_r === truth) { $s = 3; continue; }
+ /* */ $s = 4; continue;
+ /* if (_r === truth) { */ case 3:
+ $s = -1; return start;
+ /* } */ case 4:
+ start = start + (wid) >> 0;
+ $s = 1; continue;
+ case 2:
+ $s = -1; return -1;
+ /* */ } return; } var $f = {$blk: indexFunc, $c: true, $r, _r, _tuple, f, r, s, start, truth, wid, $s};return $f;
+ };
+ lastIndexFunc = function(s, f, truth) {
+ var {_r, _tmp, _tmp$1, _tuple, f, i, r, s, size, truth, x, $s, $r, $c} = $restore(this, {s, f, truth});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ i = s.$length;
+ /* while (true) { */ case 1:
+ /* if (!(i > 0)) { break; } */ if(!(i > 0)) { $s = 2; continue; }
+ _tmp = (((x = i - 1 >> 0, ((x < 0 || x >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + x])) >> 0));
+ _tmp$1 = 1;
+ r = _tmp;
+ size = _tmp$1;
+ if (r >= 128) {
+ _tuple = utf8.DecodeLastRune($subslice(s, 0, i));
+ r = _tuple[0];
+ size = _tuple[1];
+ }
+ i = i - (size) >> 0;
+ _r = f(r); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ /* */ if (_r === truth) { $s = 3; continue; }
+ /* */ $s = 4; continue;
+ /* if (_r === truth) { */ case 3:
+ $s = -1; return i;
+ /* } */ case 4:
+ $s = 1; continue;
+ case 2:
+ $s = -1; return -1;
+ /* */ } return; } var $f = {$blk: lastIndexFunc, $c: true, $r, _r, _tmp, _tmp$1, _tuple, f, i, r, s, size, truth, x, $s};return $f;
+ };
+ makeASCIISet = function(chars) {
+ var _index, _q, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, as, c, chars, i, ok, y;
+ as = arrayType$1.zero();
+ ok = false;
+ i = 0;
+ while (true) {
+ if (!(i < chars.length)) { break; }
+ c = chars.charCodeAt(i);
+ if (c >= 128) {
+ _tmp = $clone(as, asciiSet);
+ _tmp$1 = false;
+ asciiSet.copy(as, _tmp);
+ ok = _tmp$1;
+ return [as, ok];
+ }
+ _index = (_q = c / 32, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero"));
+ ((_index < 0 || _index >= as.length) ? ($throwRuntimeError("index out of range"), undefined) : as[_index] = ((((_index < 0 || _index >= as.length) ? ($throwRuntimeError("index out of range"), undefined) : as[_index]) | (((y = ((_r = c % 32, _r === _r ? _r : $throwRuntimeError("integer divide by zero"))), y < 32 ? (1 << y) : 0) >>> 0))) >>> 0));
+ i = i + (1) >> 0;
+ }
+ _tmp$2 = $clone(as, asciiSet);
+ _tmp$3 = true;
+ asciiSet.copy(as, _tmp$2);
+ ok = _tmp$3;
+ return [as, ok];
+ };
+ asciiSet.prototype.contains = function(c) {
+ var _q, _r, as, c, x, x$1, y;
+ as = this.$val;
+ return !((((((x = as, x$1 = (_q = c / 32, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")), ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1])) & (((y = ((_r = c % 32, _r === _r ? _r : $throwRuntimeError("integer divide by zero"))), y < 32 ? (1 << y) : 0) >>> 0))) >>> 0)) === 0));
+ };
+ $ptrType(asciiSet).prototype.contains = function(c) { return (new asciiSet(this.$get())).contains(c); };
+ containsRune = function(s, r) {
+ var _i, _ref, _rune, c, r, s;
+ _ref = s;
+ _i = 0;
+ while (true) {
+ if (!(_i < _ref.length)) { break; }
+ _rune = $decodeRune(_ref, _i);
+ c = _rune[0];
+ if (c === r) {
+ return true;
+ }
+ _i += _rune[1];
+ }
+ return false;
+ };
+ TrimLeft = function(s, cutset) {
+ var _tuple, as, cutset, ok, s;
+ if (s.$length === 0) {
+ return sliceType.nil;
+ }
+ if (cutset === "") {
+ return s;
+ }
+ if ((cutset.length === 1) && cutset.charCodeAt(0) < 128) {
+ return trimLeftByte(s, cutset.charCodeAt(0));
+ }
+ _tuple = makeASCIISet(cutset);
+ as = $clone(_tuple[0], asciiSet);
+ ok = _tuple[1];
+ if (ok) {
+ return trimLeftASCII(s, as);
+ }
+ return trimLeftUnicode(s, cutset);
+ };
+ $pkg.TrimLeft = TrimLeft;
+ trimLeftByte = function(s, c) {
+ var c, s;
+ while (true) {
+ if (!(s.$length > 0 && ((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) === c))) { break; }
+ s = $subslice(s, 1);
+ }
+ if (s.$length === 0) {
+ return sliceType.nil;
+ }
+ return s;
+ };
+ trimLeftASCII = function(s, as) {
+ var as, s;
+ while (true) {
+ if (!(s.$length > 0)) { break; }
+ if (!new ptrType(as).contains((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]))) {
+ break;
+ }
+ s = $subslice(s, 1);
+ }
+ if (s.$length === 0) {
+ return sliceType.nil;
+ }
+ return s;
+ };
+ trimLeftUnicode = function(s, cutset) {
+ var _tmp, _tmp$1, _tuple, cutset, n, r, s;
+ while (true) {
+ if (!(s.$length > 0)) { break; }
+ _tmp = (((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) >> 0));
+ _tmp$1 = 1;
+ r = _tmp;
+ n = _tmp$1;
+ if (r >= 128) {
+ _tuple = utf8.DecodeRune(s);
+ r = _tuple[0];
+ n = _tuple[1];
+ }
+ if (!containsRune(cutset, r)) {
+ break;
+ }
+ s = $subslice(s, n);
+ }
+ if (s.$length === 0) {
+ return sliceType.nil;
+ }
+ return s;
+ };
+ TrimRight = function(s, cutset) {
+ var _tuple, as, cutset, ok, s;
+ if ((s.$length === 0) || cutset === "") {
+ return s;
+ }
+ if ((cutset.length === 1) && cutset.charCodeAt(0) < 128) {
+ return trimRightByte(s, cutset.charCodeAt(0));
+ }
+ _tuple = makeASCIISet(cutset);
+ as = $clone(_tuple[0], asciiSet);
+ ok = _tuple[1];
+ if (ok) {
+ return trimRightASCII(s, as);
+ }
+ return trimRightUnicode(s, cutset);
+ };
+ $pkg.TrimRight = TrimRight;
+ trimRightByte = function(s, c) {
+ var c, s, x;
+ while (true) {
+ if (!(s.$length > 0 && ((x = s.$length - 1 >> 0, ((x < 0 || x >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + x])) === c))) { break; }
+ s = $subslice(s, 0, (s.$length - 1 >> 0));
+ }
+ return s;
+ };
+ trimRightASCII = function(s, as) {
+ var as, s, x;
+ while (true) {
+ if (!(s.$length > 0)) { break; }
+ if (!new ptrType(as).contains((x = s.$length - 1 >> 0, ((x < 0 || x >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + x])))) {
+ break;
+ }
+ s = $subslice(s, 0, (s.$length - 1 >> 0));
+ }
+ return s;
+ };
+ trimRightUnicode = function(s, cutset) {
+ var _tmp, _tmp$1, _tuple, cutset, n, r, s, x;
+ while (true) {
+ if (!(s.$length > 0)) { break; }
+ _tmp = (((x = s.$length - 1 >> 0, ((x < 0 || x >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + x])) >> 0));
+ _tmp$1 = 1;
+ r = _tmp;
+ n = _tmp$1;
+ if (r >= 128) {
+ _tuple = utf8.DecodeLastRune(s);
+ r = _tuple[0];
+ n = _tuple[1];
+ }
+ if (!containsRune(cutset, r)) {
+ break;
+ }
+ s = $subslice(s, 0, (s.$length - n >> 0));
+ }
+ return s;
+ };
+ TrimSpace = function(s) {
+ var {$24r, $24r$1, _r, _r$1, c, c$1, s, start, stop, x, $s, $r, $c} = $restore(this, {s});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ start = 0;
+ /* while (true) { */ case 1:
+ /* if (!(start < s.$length)) { break; } */ if(!(start < s.$length)) { $s = 2; continue; }
+ c = ((start < 0 || start >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + start]);
+ /* */ if (c >= 128) { $s = 3; continue; }
+ /* */ $s = 4; continue;
+ /* if (c >= 128) { */ case 3:
+ _r = TrimFunc($subslice(s, start), unicode.IsSpace); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 6; case 6: return $24r;
+ /* } */ case 4:
+ if (((c < 0 || c >= asciiSpace.length) ? ($throwRuntimeError("index out of range"), undefined) : asciiSpace[c]) === 0) {
+ /* break; */ $s = 2; continue;
+ }
+ start = start + (1) >> 0;
+ $s = 1; continue;
+ case 2:
+ stop = s.$length;
+ /* while (true) { */ case 7:
+ /* if (!(stop > start)) { break; } */ if(!(stop > start)) { $s = 8; continue; }
+ c$1 = (x = stop - 1 >> 0, ((x < 0 || x >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + x]));
+ /* */ if (c$1 >= 128) { $s = 9; continue; }
+ /* */ $s = 10; continue;
+ /* if (c$1 >= 128) { */ case 9:
+ _r$1 = TrimFunc($subslice(s, start, stop), unicode.IsSpace); /* */ $s = 11; case 11: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ $24r$1 = _r$1;
+ $s = 12; case 12: return $24r$1;
+ /* } */ case 10:
+ if (((c$1 < 0 || c$1 >= asciiSpace.length) ? ($throwRuntimeError("index out of range"), undefined) : asciiSpace[c$1]) === 0) {
+ /* break; */ $s = 8; continue;
+ }
+ stop = stop - (1) >> 0;
+ $s = 7; continue;
+ case 8:
+ if (start === stop) {
+ $s = -1; return sliceType.nil;
+ }
+ $s = -1; return $subslice(s, start, stop);
+ /* */ } return; } var $f = {$blk: TrimSpace, $c: true, $r, $24r, $24r$1, _r, _r$1, c, c$1, s, start, stop, x, $s};return $f;
+ };
+ $pkg.TrimSpace = TrimSpace;
+ EqualFold = function(s, t) {
+ var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, r, r$1, r$2, s, size, size$1, sr, t, tr;
+ while (true) {
+ if (!(!((s.$length === 0)) && !((t.$length === 0)))) { break; }
+ _tmp = 0;
+ _tmp$1 = 0;
+ sr = _tmp;
+ tr = _tmp$1;
+ if ((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) < 128) {
+ _tmp$2 = (((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) >> 0));
+ _tmp$3 = $subslice(s, 1);
+ sr = _tmp$2;
+ s = _tmp$3;
+ } else {
+ _tuple = utf8.DecodeRune(s);
+ r = _tuple[0];
+ size = _tuple[1];
+ _tmp$4 = r;
+ _tmp$5 = $subslice(s, size);
+ sr = _tmp$4;
+ s = _tmp$5;
+ }
+ if ((0 >= t.$length ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + 0]) < 128) {
+ _tmp$6 = (((0 >= t.$length ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + 0]) >> 0));
+ _tmp$7 = $subslice(t, 1);
+ tr = _tmp$6;
+ t = _tmp$7;
+ } else {
+ _tuple$1 = utf8.DecodeRune(t);
+ r$1 = _tuple$1[0];
+ size$1 = _tuple$1[1];
+ _tmp$8 = r$1;
+ _tmp$9 = $subslice(t, size$1);
+ tr = _tmp$8;
+ t = _tmp$9;
+ }
+ if (tr === sr) {
+ continue;
+ }
+ if (tr < sr) {
+ _tmp$10 = sr;
+ _tmp$11 = tr;
+ tr = _tmp$10;
+ sr = _tmp$11;
+ }
+ if (tr < 128) {
+ if (65 <= sr && sr <= 90 && (tr === ((sr + 97 >> 0) - 65 >> 0))) {
+ continue;
+ }
+ return false;
+ }
+ r$2 = unicode.SimpleFold(sr);
+ while (true) {
+ if (!(!((r$2 === sr)) && r$2 < tr)) { break; }
+ r$2 = unicode.SimpleFold(r$2);
+ }
+ if (r$2 === tr) {
+ continue;
+ }
+ return false;
+ }
+ return s.$length === t.$length;
+ };
+ $pkg.EqualFold = EqualFold;
+ Index = function(s, sep) {
+ var c0, c0$1, c1, c1$1, fails, fails$1, i, i$1, j, n, o, o$1, r, s, sep, t, t$1, x, x$1;
+ n = sep.$length;
+ if ((n === 0)) {
+ return 0;
+ } else if ((n === 1)) {
+ return IndexByte(s, (0 >= sep.$length ? ($throwRuntimeError("index out of range"), undefined) : sep.$array[sep.$offset + 0]));
+ } else if ((n === s.$length)) {
+ if (Equal(sep, s)) {
+ return 0;
+ }
+ return -1;
+ } else if (n > s.$length) {
+ return -1;
+ } else if (n <= bytealg.MaxLen) {
+ if (s.$length <= 0) {
+ return bytealg.Index(s, sep);
+ }
+ c0 = (0 >= sep.$length ? ($throwRuntimeError("index out of range"), undefined) : sep.$array[sep.$offset + 0]);
+ c1 = (1 >= sep.$length ? ($throwRuntimeError("index out of range"), undefined) : sep.$array[sep.$offset + 1]);
+ i = 0;
+ t = (s.$length - n >> 0) + 1 >> 0;
+ fails = 0;
+ while (true) {
+ if (!(i < t)) { break; }
+ if (!((((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]) === c0))) {
+ o = IndexByte($subslice(s, (i + 1 >> 0), t), c0);
+ if (o < 0) {
+ return -1;
+ }
+ i = i + ((o + 1 >> 0)) >> 0;
+ }
+ if (((x = i + 1 >> 0, ((x < 0 || x >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + x])) === c1) && Equal($subslice(s, i, (i + n >> 0)), sep)) {
+ return i;
+ }
+ fails = fails + (1) >> 0;
+ i = i + (1) >> 0;
+ if (fails > bytealg.Cutover(i)) {
+ r = bytealg.Index($subslice(s, i), sep);
+ if (r >= 0) {
+ return r + i >> 0;
+ }
+ return -1;
+ }
+ }
+ return -1;
+ }
+ c0$1 = (0 >= sep.$length ? ($throwRuntimeError("index out of range"), undefined) : sep.$array[sep.$offset + 0]);
+ c1$1 = (1 >= sep.$length ? ($throwRuntimeError("index out of range"), undefined) : sep.$array[sep.$offset + 1]);
+ i$1 = 0;
+ fails$1 = 0;
+ t$1 = (s.$length - n >> 0) + 1 >> 0;
+ while (true) {
+ if (!(i$1 < t$1)) { break; }
+ if (!((((i$1 < 0 || i$1 >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i$1]) === c0$1))) {
+ o$1 = IndexByte($subslice(s, (i$1 + 1 >> 0), t$1), c0$1);
+ if (o$1 < 0) {
+ break;
+ }
+ i$1 = i$1 + ((o$1 + 1 >> 0)) >> 0;
+ }
+ if (((x$1 = i$1 + 1 >> 0, ((x$1 < 0 || x$1 >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + x$1])) === c1$1) && Equal($subslice(s, i$1, (i$1 + n >> 0)), sep)) {
+ return i$1;
+ }
+ i$1 = i$1 + (1) >> 0;
+ fails$1 = fails$1 + (1) >> 0;
+ if (fails$1 >= (4 + (i$1 >> 4 >> 0) >> 0) && i$1 < t$1) {
+ j = bytealg.IndexRabinKarpBytes($subslice(s, i$1), sep);
+ if (j < 0) {
+ return -1;
+ }
+ return i$1 + j >> 0;
+ }
+ }
+ return -1;
+ };
+ $pkg.Index = Index;
+ Cut = function(s, sep) {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, after, before, found, i, s, sep;
+ before = sliceType.nil;
+ after = sliceType.nil;
+ found = false;
+ i = Index(s, sep);
+ if (i >= 0) {
+ _tmp = $subslice(s, 0, i);
+ _tmp$1 = $subslice(s, (i + sep.$length >> 0));
+ _tmp$2 = true;
+ before = _tmp;
+ after = _tmp$1;
+ found = _tmp$2;
+ return [before, after, found];
+ }
+ _tmp$3 = s;
+ _tmp$4 = sliceType.nil;
+ _tmp$5 = false;
+ before = _tmp$3;
+ after = _tmp$4;
+ found = _tmp$5;
+ return [before, after, found];
+ };
+ $pkg.Cut = Cut;
+ Buffer.ptr.prototype.Bytes = function() {
+ var b;
+ b = this;
+ return $subslice(b.buf, b.off);
+ };
+ Buffer.prototype.Bytes = function() { return this.$val.Bytes(); };
+ Buffer.ptr.prototype.String = function() {
+ var b;
+ b = this;
+ if (b === ptrType$1.nil) {
+ return "";
+ }
+ return ($bytesToString($subslice(b.buf, b.off)));
+ };
+ Buffer.prototype.String = function() { return this.$val.String(); };
+ Buffer.ptr.prototype.empty = function() {
+ var b;
+ b = this;
+ return b.buf.$length <= b.off;
+ };
+ Buffer.prototype.empty = function() { return this.$val.empty(); };
+ Buffer.ptr.prototype.Len = function() {
+ var b;
+ b = this;
+ return b.buf.$length - b.off >> 0;
+ };
+ Buffer.prototype.Len = function() { return this.$val.Len(); };
+ Buffer.ptr.prototype.Cap = function() {
+ var b;
+ b = this;
+ return b.buf.$capacity;
+ };
+ Buffer.prototype.Cap = function() { return this.$val.Cap(); };
+ Buffer.ptr.prototype.Truncate = function(n) {
+ var b, n;
+ b = this;
+ if (n === 0) {
+ b.Reset();
+ return;
+ }
+ b.lastRead = 0;
+ if (n < 0 || n > b.Len()) {
+ $panic(new $String("bytes.Buffer: truncation out of range"));
+ }
+ b.buf = $subslice(b.buf, 0, (b.off + n >> 0));
+ };
+ Buffer.prototype.Truncate = function(n) { return this.$val.Truncate(n); };
+ Buffer.ptr.prototype.Reset = function() {
+ var b;
+ b = this;
+ b.buf = $subslice(b.buf, 0, 0);
+ b.off = 0;
+ b.lastRead = 0;
+ };
+ Buffer.prototype.Reset = function() { return this.$val.Reset(); };
+ Buffer.ptr.prototype.tryGrowByReslice = function(n) {
+ var b, l, n;
+ b = this;
+ l = b.buf.$length;
+ if (n <= (b.buf.$capacity - l >> 0)) {
+ b.buf = $subslice(b.buf, 0, (l + n >> 0));
+ return [l, true];
+ }
+ return [0, false];
+ };
+ Buffer.prototype.tryGrowByReslice = function(n) { return this.$val.tryGrowByReslice(n); };
+ Buffer.ptr.prototype.grow = function(n) {
+ var {_q, _r, _tuple, b, buf, c, i, m, n, ok, $s, $r, $c} = $restore(this, {n});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ b = this;
+ m = b.Len();
+ if ((m === 0) && !((b.off === 0))) {
+ b.Reset();
+ }
+ _tuple = b.tryGrowByReslice(n);
+ i = _tuple[0];
+ ok = _tuple[1];
+ if (ok) {
+ $s = -1; return i;
+ }
+ if (b.buf === sliceType.nil && n <= 64) {
+ b.buf = $makeSlice(sliceType, n, 64);
+ $s = -1; return 0;
+ }
+ c = b.buf.$capacity;
+ /* */ if (n <= ((_q = c / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) - m >> 0)) { $s = 1; continue; }
+ /* */ if (c > ((2147483647 - c >> 0) - n >> 0)) { $s = 2; continue; }
+ /* */ $s = 3; continue;
+ /* if (n <= ((_q = c / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) - m >> 0)) { */ case 1:
+ $copySlice(b.buf, $subslice(b.buf, b.off));
+ $s = 4; continue;
+ /* } else if (c > ((2147483647 - c >> 0) - n >> 0)) { */ case 2:
+ $panic($pkg.ErrTooLarge);
+ $s = 4; continue;
+ /* } else { */ case 3:
+ _r = makeSlice(($imul(2, c)) + n >> 0); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ buf = _r;
+ $copySlice(buf, $subslice(b.buf, b.off));
+ b.buf = buf;
+ /* } */ case 4:
+ b.off = 0;
+ b.buf = $subslice(b.buf, 0, (m + n >> 0));
+ $s = -1; return m;
+ /* */ } return; } var $f = {$blk: Buffer.ptr.prototype.grow, $c: true, $r, _q, _r, _tuple, b, buf, c, i, m, n, ok, $s};return $f;
+ };
+ Buffer.prototype.grow = function(n) { return this.$val.grow(n); };
+ Buffer.ptr.prototype.Grow = function(n) {
+ var {_r, b, m, n, $s, $r, $c} = $restore(this, {n});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ b = this;
+ if (n < 0) {
+ $panic(new $String("bytes.Buffer.Grow: negative count"));
+ }
+ _r = b.grow(n); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ m = _r;
+ b.buf = $subslice(b.buf, 0, m);
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: Buffer.ptr.prototype.Grow, $c: true, $r, _r, b, m, n, $s};return $f;
+ };
+ Buffer.prototype.Grow = function(n) { return this.$val.Grow(n); };
+ Buffer.ptr.prototype.Write = function(p) {
+ var {_r, _tmp, _tmp$1, _tuple, b, err, m, n, ok, p, $s, $r, $c} = $restore(this, {p});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ n = 0;
+ err = $ifaceNil;
+ b = this;
+ b.lastRead = 0;
+ _tuple = b.tryGrowByReslice(p.$length);
+ m = _tuple[0];
+ ok = _tuple[1];
+ /* */ if (!ok) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (!ok) { */ case 1:
+ _r = b.grow(p.$length); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ m = _r;
+ /* } */ case 2:
+ _tmp = $copySlice($subslice(b.buf, m), p);
+ _tmp$1 = $ifaceNil;
+ n = _tmp;
+ err = _tmp$1;
+ $s = -1; return [n, err];
+ /* */ } return; } var $f = {$blk: Buffer.ptr.prototype.Write, $c: true, $r, _r, _tmp, _tmp$1, _tuple, b, err, m, n, ok, p, $s};return $f;
+ };
+ Buffer.prototype.Write = function(p) { return this.$val.Write(p); };
+ Buffer.ptr.prototype.WriteString = function(s) {
+ var {_r, _tmp, _tmp$1, _tuple, b, err, m, n, ok, s, $s, $r, $c} = $restore(this, {s});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ n = 0;
+ err = $ifaceNil;
+ b = this;
+ b.lastRead = 0;
+ _tuple = b.tryGrowByReslice(s.length);
+ m = _tuple[0];
+ ok = _tuple[1];
+ /* */ if (!ok) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (!ok) { */ case 1:
+ _r = b.grow(s.length); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ m = _r;
+ /* } */ case 2:
+ _tmp = $copyString($subslice(b.buf, m), s);
+ _tmp$1 = $ifaceNil;
+ n = _tmp;
+ err = _tmp$1;
+ $s = -1; return [n, err];
+ /* */ } return; } var $f = {$blk: Buffer.ptr.prototype.WriteString, $c: true, $r, _r, _tmp, _tmp$1, _tuple, b, err, m, n, ok, s, $s};return $f;
+ };
+ Buffer.prototype.WriteString = function(s) { return this.$val.WriteString(s); };
+ Buffer.ptr.prototype.ReadFrom = function(r) {
+ var {_r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, e, err, i, m, n, r, x, $s, $r, $c} = $restore(this, {r});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ n = new $Int64(0, 0);
+ err = $ifaceNil;
+ b = this;
+ b.lastRead = 0;
+ /* while (true) { */ case 1:
+ _r = b.grow(512); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ i = _r;
+ b.buf = $subslice(b.buf, 0, i);
+ _r$1 = r.Read($subslice(b.buf, i, b.buf.$capacity)); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _tuple = _r$1;
+ m = _tuple[0];
+ e = _tuple[1];
+ if (m < 0) {
+ $panic(errNegativeRead);
+ }
+ b.buf = $subslice(b.buf, 0, (i + m >> 0));
+ n = (x = (new $Int64(0, m)), new $Int64(n.$high + x.$high, n.$low + x.$low));
+ if ($interfaceIsEqual(e, io.EOF)) {
+ _tmp = n;
+ _tmp$1 = $ifaceNil;
+ n = _tmp;
+ err = _tmp$1;
+ $s = -1; return [n, err];
+ }
+ if (!($interfaceIsEqual(e, $ifaceNil))) {
+ _tmp$2 = n;
+ _tmp$3 = e;
+ n = _tmp$2;
+ err = _tmp$3;
+ $s = -1; return [n, err];
+ }
+ $s = 1; continue;
+ case 2:
+ $s = -1; return [n, err];
+ /* */ } return; } var $f = {$blk: Buffer.ptr.prototype.ReadFrom, $c: true, $r, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, e, err, i, m, n, r, x, $s};return $f;
+ };
+ Buffer.prototype.ReadFrom = function(r) { return this.$val.ReadFrom(r); };
+ makeSlice = function(n) {
+ var {$24r, n, $s, $deferred, $r, $c} = $restore(this, {n});
+ /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred);
+ $deferred.push([(function() {
+ if (!($interfaceIsEqual($recover(), $ifaceNil))) {
+ $panic($pkg.ErrTooLarge);
+ }
+ }), []]);
+ $24r = $makeSlice(sliceType, n);
+ $s = 1; case 1: return $24r;
+ /* */ } return; } } catch(err) { $err = err; $s = -1; return sliceType.nil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: makeSlice, $c: true, $r, $24r, n, $s, $deferred};return $f; } }
+ };
+ Buffer.ptr.prototype.WriteTo = function(w) {
+ var {_r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, e, err, m, n, nBytes, w, $s, $r, $c} = $restore(this, {w});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ n = new $Int64(0, 0);
+ err = $ifaceNil;
+ b = this;
+ b.lastRead = 0;
+ nBytes = b.Len();
+ /* */ if (nBytes > 0) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (nBytes > 0) { */ case 1:
+ _r = w.Write($subslice(b.buf, b.off)); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ m = _tuple[0];
+ e = _tuple[1];
+ if (m > nBytes) {
+ $panic(new $String("bytes.Buffer.WriteTo: invalid Write count"));
+ }
+ b.off = b.off + (m) >> 0;
+ n = (new $Int64(0, m));
+ if (!($interfaceIsEqual(e, $ifaceNil))) {
+ _tmp = n;
+ _tmp$1 = e;
+ n = _tmp;
+ err = _tmp$1;
+ $s = -1; return [n, err];
+ }
+ if (!((m === nBytes))) {
+ _tmp$2 = n;
+ _tmp$3 = io.ErrShortWrite;
+ n = _tmp$2;
+ err = _tmp$3;
+ $s = -1; return [n, err];
+ }
+ /* } */ case 2:
+ b.Reset();
+ _tmp$4 = n;
+ _tmp$5 = $ifaceNil;
+ n = _tmp$4;
+ err = _tmp$5;
+ $s = -1; return [n, err];
+ /* */ } return; } var $f = {$blk: Buffer.ptr.prototype.WriteTo, $c: true, $r, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, e, err, m, n, nBytes, w, $s};return $f;
+ };
+ Buffer.prototype.WriteTo = function(w) { return this.$val.WriteTo(w); };
+ Buffer.ptr.prototype.WriteByte = function(c) {
+ var {_r, _tuple, b, c, m, ok, x, $s, $r, $c} = $restore(this, {c});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ b = this;
+ b.lastRead = 0;
+ _tuple = b.tryGrowByReslice(1);
+ m = _tuple[0];
+ ok = _tuple[1];
+ /* */ if (!ok) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (!ok) { */ case 1:
+ _r = b.grow(1); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ m = _r;
+ /* } */ case 2:
+ (x = b.buf, ((m < 0 || m >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + m] = c));
+ $s = -1; return $ifaceNil;
+ /* */ } return; } var $f = {$blk: Buffer.ptr.prototype.WriteByte, $c: true, $r, _r, _tuple, b, c, m, ok, x, $s};return $f;
+ };
+ Buffer.prototype.WriteByte = function(c) { return this.$val.WriteByte(c); };
+ Buffer.ptr.prototype.WriteRune = function(r) {
+ var {_r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, err, m, n, ok, r, $s, $r, $c} = $restore(this, {r});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ n = 0;
+ err = $ifaceNil;
+ b = this;
+ /* */ if (((r >>> 0)) < 128) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (((r >>> 0)) < 128) { */ case 1:
+ _r = b.WriteByte(((r << 24 >>> 24))); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _r;
+ _tmp = 1;
+ _tmp$1 = $ifaceNil;
+ n = _tmp;
+ err = _tmp$1;
+ $s = -1; return [n, err];
+ /* } */ case 2:
+ b.lastRead = 0;
+ _tuple = b.tryGrowByReslice(4);
+ m = _tuple[0];
+ ok = _tuple[1];
+ /* */ if (!ok) { $s = 4; continue; }
+ /* */ $s = 5; continue;
+ /* if (!ok) { */ case 4:
+ _r$1 = b.grow(4); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ m = _r$1;
+ /* } */ case 5:
+ n = utf8.EncodeRune($subslice(b.buf, m, (m + 4 >> 0)), r);
+ b.buf = $subslice(b.buf, 0, (m + n >> 0));
+ _tmp$2 = n;
+ _tmp$3 = $ifaceNil;
+ n = _tmp$2;
+ err = _tmp$3;
+ $s = -1; return [n, err];
+ /* */ } return; } var $f = {$blk: Buffer.ptr.prototype.WriteRune, $c: true, $r, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, err, m, n, ok, r, $s};return $f;
+ };
+ Buffer.prototype.WriteRune = function(r) { return this.$val.WriteRune(r); };
+ Buffer.ptr.prototype.Read = function(p) {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, b, err, n, p;
+ n = 0;
+ err = $ifaceNil;
+ b = this;
+ b.lastRead = 0;
+ if (b.empty()) {
+ b.Reset();
+ if (p.$length === 0) {
+ _tmp = 0;
+ _tmp$1 = $ifaceNil;
+ n = _tmp;
+ err = _tmp$1;
+ return [n, err];
+ }
+ _tmp$2 = 0;
+ _tmp$3 = io.EOF;
+ n = _tmp$2;
+ err = _tmp$3;
+ return [n, err];
+ }
+ n = $copySlice(p, $subslice(b.buf, b.off));
+ b.off = b.off + (n) >> 0;
+ if (n > 0) {
+ b.lastRead = -1;
+ }
+ _tmp$4 = n;
+ _tmp$5 = $ifaceNil;
+ n = _tmp$4;
+ err = _tmp$5;
+ return [n, err];
+ };
+ Buffer.prototype.Read = function(p) { return this.$val.Read(p); };
+ Buffer.ptr.prototype.Next = function(n) {
+ var b, data, m, n;
+ b = this;
+ b.lastRead = 0;
+ m = b.Len();
+ if (n > m) {
+ n = m;
+ }
+ data = $subslice(b.buf, b.off, (b.off + n >> 0));
+ b.off = b.off + (n) >> 0;
+ if (n > 0) {
+ b.lastRead = -1;
+ }
+ return data;
+ };
+ Buffer.prototype.Next = function(n) { return this.$val.Next(n); };
+ Buffer.ptr.prototype.ReadByte = function() {
+ var b, c, x, x$1;
+ b = this;
+ if (b.empty()) {
+ b.Reset();
+ return [0, io.EOF];
+ }
+ c = (x = b.buf, x$1 = b.off, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1]));
+ b.off = b.off + (1) >> 0;
+ b.lastRead = -1;
+ return [c, $ifaceNil];
+ };
+ Buffer.prototype.ReadByte = function() { return this.$val.ReadByte(); };
+ Buffer.ptr.prototype.ReadRune = function() {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, b, c, err, n, r, size, x, x$1;
+ r = 0;
+ size = 0;
+ err = $ifaceNil;
+ b = this;
+ if (b.empty()) {
+ b.Reset();
+ _tmp = 0;
+ _tmp$1 = 0;
+ _tmp$2 = io.EOF;
+ r = _tmp;
+ size = _tmp$1;
+ err = _tmp$2;
+ return [r, size, err];
+ }
+ c = (x = b.buf, x$1 = b.off, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1]));
+ if (c < 128) {
+ b.off = b.off + (1) >> 0;
+ b.lastRead = 1;
+ _tmp$3 = ((c >> 0));
+ _tmp$4 = 1;
+ _tmp$5 = $ifaceNil;
+ r = _tmp$3;
+ size = _tmp$4;
+ err = _tmp$5;
+ return [r, size, err];
+ }
+ _tuple = utf8.DecodeRune($subslice(b.buf, b.off));
+ r = _tuple[0];
+ n = _tuple[1];
+ b.off = b.off + (n) >> 0;
+ b.lastRead = ((n << 24 >> 24));
+ _tmp$6 = r;
+ _tmp$7 = n;
+ _tmp$8 = $ifaceNil;
+ r = _tmp$6;
+ size = _tmp$7;
+ err = _tmp$8;
+ return [r, size, err];
+ };
+ Buffer.prototype.ReadRune = function() { return this.$val.ReadRune(); };
+ Buffer.ptr.prototype.UnreadRune = function() {
+ var b;
+ b = this;
+ if (b.lastRead <= 0) {
+ return errors.New("bytes.Buffer: UnreadRune: previous operation was not a successful ReadRune");
+ }
+ if (b.off >= ((b.lastRead >> 0))) {
+ b.off = b.off - (((b.lastRead >> 0))) >> 0;
+ }
+ b.lastRead = 0;
+ return $ifaceNil;
+ };
+ Buffer.prototype.UnreadRune = function() { return this.$val.UnreadRune(); };
+ Buffer.ptr.prototype.UnreadByte = function() {
+ var b;
+ b = this;
+ if (b.lastRead === 0) {
+ return errUnreadByte;
+ }
+ b.lastRead = 0;
+ if (b.off > 0) {
+ b.off = b.off - (1) >> 0;
+ }
+ return $ifaceNil;
+ };
+ Buffer.prototype.UnreadByte = function() { return this.$val.UnreadByte(); };
+ Buffer.ptr.prototype.ReadBytes = function(delim) {
+ var _tmp, _tmp$1, _tuple, b, delim, err, line, slice;
+ line = sliceType.nil;
+ err = $ifaceNil;
+ b = this;
+ _tuple = b.readSlice(delim);
+ slice = _tuple[0];
+ err = _tuple[1];
+ line = $appendSlice(line, slice);
+ _tmp = line;
+ _tmp$1 = err;
+ line = _tmp;
+ err = _tmp$1;
+ return [line, err];
+ };
+ Buffer.prototype.ReadBytes = function(delim) { return this.$val.ReadBytes(delim); };
+ Buffer.ptr.prototype.readSlice = function(delim) {
+ var _tmp, _tmp$1, b, delim, end, err, i, line;
+ line = sliceType.nil;
+ err = $ifaceNil;
+ b = this;
+ i = IndexByte($subslice(b.buf, b.off), delim);
+ end = (b.off + i >> 0) + 1 >> 0;
+ if (i < 0) {
+ end = b.buf.$length;
+ err = io.EOF;
+ }
+ line = $subslice(b.buf, b.off, end);
+ b.off = end;
+ b.lastRead = -1;
+ _tmp = line;
+ _tmp$1 = err;
+ line = _tmp;
+ err = _tmp$1;
+ return [line, err];
+ };
+ Buffer.prototype.readSlice = function(delim) { return this.$val.readSlice(delim); };
+ Buffer.ptr.prototype.ReadString = function(delim) {
+ var _tmp, _tmp$1, _tuple, b, delim, err, line, slice;
+ line = "";
+ err = $ifaceNil;
+ b = this;
+ _tuple = b.readSlice(delim);
+ slice = _tuple[0];
+ err = _tuple[1];
+ _tmp = ($bytesToString(slice));
+ _tmp$1 = err;
+ line = _tmp;
+ err = _tmp$1;
+ return [line, err];
+ };
+ Buffer.prototype.ReadString = function(delim) { return this.$val.ReadString(delim); };
+ IndexByte = function(s, c) {
+ var _i, _ref, b, c, i, s;
+ _ref = s;
+ _i = 0;
+ while (true) {
+ if (!(_i < _ref.$length)) { break; }
+ i = _i;
+ b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]);
+ if (b === c) {
+ return i;
+ }
+ _i++;
+ }
+ return -1;
+ };
+ $pkg.IndexByte = IndexByte;
+ Equal = function(a, b) {
+ var _i, _ref, a, b, c, i;
+ if (!((a.$length === b.$length))) {
+ return false;
+ }
+ _ref = a;
+ _i = 0;
+ while (true) {
+ if (!(_i < _ref.$length)) { break; }
+ i = _i;
+ c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]);
+ if (!((c === ((i < 0 || i >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + i])))) {
+ return false;
+ }
+ _i++;
+ }
+ return true;
+ };
+ $pkg.Equal = Equal;
+ Compare = function(a, b) {
+ var _i, _ref, a, b, ca, cb, i;
+ _ref = a;
+ _i = 0;
+ while (true) {
+ if (!(_i < _ref.$length)) { break; }
+ i = _i;
+ ca = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]);
+ if (i >= b.$length) {
+ return 1;
+ }
+ cb = ((i < 0 || i >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + i]);
+ if (ca < cb) {
+ return -1;
+ }
+ if (ca > cb) {
+ return 1;
+ }
+ _i++;
+ }
+ if (a.$length < b.$length) {
+ return -1;
+ }
+ return 0;
+ };
+ $pkg.Compare = Compare;
+ ptrType$2.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "ReadAt", name: "ReadAt", pkg: "", typ: $funcType([sliceType, $Int64], [$Int, $error], false)}, {prop: "ReadByte", name: "ReadByte", pkg: "", typ: $funcType([], [$Uint8, $error], false)}, {prop: "UnreadByte", name: "UnreadByte", pkg: "", typ: $funcType([], [$error], false)}, {prop: "ReadRune", name: "ReadRune", pkg: "", typ: $funcType([], [$Int32, $Int, $error], false)}, {prop: "UnreadRune", name: "UnreadRune", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Seek", name: "Seek", pkg: "", typ: $funcType([$Int64, $Int], [$Int64, $error], false)}, {prop: "WriteTo", name: "WriteTo", pkg: "", typ: $funcType([io.Writer], [$Int64, $error], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([sliceType], [], false)}];
+ ptrType.methods = [{prop: "contains", name: "contains", pkg: "bytes", typ: $funcType([$Uint8], [$Bool], false)}];
+ ptrType$1.methods = [{prop: "Bytes", name: "Bytes", pkg: "", typ: $funcType([], [sliceType], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "empty", name: "empty", pkg: "bytes", typ: $funcType([], [$Bool], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Cap", name: "Cap", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Truncate", name: "Truncate", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "tryGrowByReslice", name: "tryGrowByReslice", pkg: "bytes", typ: $funcType([$Int], [$Int, $Bool], false)}, {prop: "grow", name: "grow", pkg: "bytes", typ: $funcType([$Int], [$Int], false)}, {prop: "Grow", name: "Grow", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}, {prop: "ReadFrom", name: "ReadFrom", pkg: "", typ: $funcType([io.Reader], [$Int64, $error], false)}, {prop: "WriteTo", name: "WriteTo", pkg: "", typ: $funcType([io.Writer], [$Int64, $error], false)}, {prop: "WriteByte", name: "WriteByte", pkg: "", typ: $funcType([$Uint8], [$error], false)}, {prop: "WriteRune", name: "WriteRune", pkg: "", typ: $funcType([$Int32], [$Int, $error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "Next", name: "Next", pkg: "", typ: $funcType([$Int], [sliceType], false)}, {prop: "ReadByte", name: "ReadByte", pkg: "", typ: $funcType([], [$Uint8, $error], false)}, {prop: "ReadRune", name: "ReadRune", pkg: "", typ: $funcType([], [$Int32, $Int, $error], false)}, {prop: "UnreadRune", name: "UnreadRune", pkg: "", typ: $funcType([], [$error], false)}, {prop: "UnreadByte", name: "UnreadByte", pkg: "", typ: $funcType([], [$error], false)}, {prop: "ReadBytes", name: "ReadBytes", pkg: "", typ: $funcType([$Uint8], [sliceType, $error], false)}, {prop: "readSlice", name: "readSlice", pkg: "bytes", typ: $funcType([$Uint8], [sliceType, $error], false)}, {prop: "ReadString", name: "ReadString", pkg: "", typ: $funcType([$Uint8], [$String, $error], false)}];
+ Reader.init("bytes", [{prop: "s", name: "s", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "i", name: "i", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "prevRune", name: "prevRune", embedded: false, exported: false, typ: $Int, tag: ""}]);
+ asciiSet.init($Uint32, 8);
+ Buffer.init("bytes", [{prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "off", name: "off", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "lastRead", name: "lastRead", embedded: false, exported: false, typ: readOp, 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 = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = bytealg.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = io.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = unicode.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = utf8.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ asciiSpace = $toNativeArray($kindUint8, [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
+ $pkg.ErrTooLarge = errors.New("bytes.Buffer: too large");
+ errNegativeRead = errors.New("bytes.Buffer: reader returned negative count from Read");
+ errUnreadByte = errors.New("bytes.Buffer: UnreadByte: previous operation was not a successful read");
+ /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
+ };
+ $pkg.$init = $init;
+ return $pkg;
+})();
+$packages["strings"] = (function() {
+ var $pkg = {}, $init, errors, js, bytealg, io, sync, unicode, utf8, asciiSet, stringFinder, Replacer, replacer, trieNode, genericReplacer, appendSliceWriter, stringWriter, singleStringReplacer, byteReplacer, byteStringReplacer, Reader, Builder, span, sliceType, ptrType, sliceType$1, ptrType$1, sliceType$2, arrayType, arrayType$1, sliceType$3, arrayType$2, ptrType$2, arrayType$3, ptrType$3, sliceType$4, ptrType$4, ptrType$5, ptrType$6, ptrType$7, ptrType$8, ptrType$9, ptrType$10, asciiSpace, explode, Contains, ContainsAny, ContainsRune, IndexRune, IndexAny, LastIndexByte, genSplit, SplitN, Split, Fields, FieldsFunc, Join, HasPrefix, HasSuffix, Map, Repeat, ToLower, TrimLeftFunc, TrimRightFunc, TrimFunc, IndexFunc, indexFunc, lastIndexFunc, makeASCIISet, Trim, TrimLeft, trimLeftByte, trimLeftASCII, trimLeftUnicode, TrimRight, trimRightByte, trimRightASCII, trimRightUnicode, TrimSpace, TrimPrefix, TrimSuffix, Replace, ReplaceAll, EqualFold, Cut, makeStringFinder, longestCommonSuffix, max, NewReplacer, makeGenericReplacer, getStringWriter, makeSingleStringReplacer, NewReader, IndexByte, Index, LastIndex, Count;
+ errors = $packages["errors"];
+ js = $packages["github.com/gopherjs/gopherjs/js"];
+ bytealg = $packages["internal/bytealg"];
+ io = $packages["io"];
+ sync = $packages["sync"];
+ unicode = $packages["unicode"];
+ utf8 = $packages["unicode/utf8"];
+ asciiSet = $pkg.asciiSet = $newType(32, $kindArray, "strings.asciiSet", true, "strings", false, null);
+ stringFinder = $pkg.stringFinder = $newType(0, $kindStruct, "strings.stringFinder", true, "strings", false, function(pattern_, badCharSkip_, goodSuffixSkip_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.pattern = "";
+ this.badCharSkip = arrayType$1.zero();
+ this.goodSuffixSkip = sliceType$3.nil;
+ return;
+ }
+ this.pattern = pattern_;
+ this.badCharSkip = badCharSkip_;
+ this.goodSuffixSkip = goodSuffixSkip_;
+ });
+ Replacer = $pkg.Replacer = $newType(0, $kindStruct, "strings.Replacer", true, "strings", true, function(once_, r_, oldnew_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.once = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0));
+ this.r = $ifaceNil;
+ this.oldnew = sliceType.nil;
+ return;
+ }
+ this.once = once_;
+ this.r = r_;
+ this.oldnew = oldnew_;
+ });
+ replacer = $pkg.replacer = $newType(8, $kindInterface, "strings.replacer", true, "strings", false, null);
+ trieNode = $pkg.trieNode = $newType(0, $kindStruct, "strings.trieNode", true, "strings", false, function(value_, priority_, prefix_, next_, table_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.value = "";
+ this.priority = 0;
+ this.prefix = "";
+ this.next = ptrType$3.nil;
+ this.table = sliceType$4.nil;
+ return;
+ }
+ this.value = value_;
+ this.priority = priority_;
+ this.prefix = prefix_;
+ this.next = next_;
+ this.table = table_;
+ });
+ genericReplacer = $pkg.genericReplacer = $newType(0, $kindStruct, "strings.genericReplacer", true, "strings", false, function(root_, tableSize_, mapping_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.root = new trieNode.ptr("", 0, "", ptrType$3.nil, sliceType$4.nil);
+ this.tableSize = 0;
+ this.mapping = arrayType$2.zero();
+ return;
+ }
+ this.root = root_;
+ this.tableSize = tableSize_;
+ this.mapping = mapping_;
+ });
+ appendSliceWriter = $pkg.appendSliceWriter = $newType(12, $kindSlice, "strings.appendSliceWriter", true, "strings", false, null);
+ stringWriter = $pkg.stringWriter = $newType(0, $kindStruct, "strings.stringWriter", true, "strings", false, function(w_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.w = $ifaceNil;
+ return;
+ }
+ this.w = w_;
+ });
+ singleStringReplacer = $pkg.singleStringReplacer = $newType(0, $kindStruct, "strings.singleStringReplacer", true, "strings", false, function(finder_, value_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.finder = ptrType$5.nil;
+ this.value = "";
+ return;
+ }
+ this.finder = finder_;
+ this.value = value_;
+ });
+ byteReplacer = $pkg.byteReplacer = $newType(256, $kindArray, "strings.byteReplacer", true, "strings", false, null);
+ byteStringReplacer = $pkg.byteStringReplacer = $newType(0, $kindStruct, "strings.byteStringReplacer", true, "strings", false, function(replacements_, toReplace_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.replacements = arrayType$3.zero();
+ this.toReplace = sliceType.nil;
+ return;
+ }
+ this.replacements = replacements_;
+ this.toReplace = toReplace_;
+ });
+ Reader = $pkg.Reader = $newType(0, $kindStruct, "strings.Reader", true, "strings", true, function(s_, i_, prevRune_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.s = "";
+ this.i = new $Int64(0, 0);
+ this.prevRune = 0;
+ return;
+ }
+ this.s = s_;
+ this.i = i_;
+ this.prevRune = prevRune_;
+ });
+ Builder = $pkg.Builder = $newType(0, $kindStruct, "strings.Builder", true, "strings", true, function(addr_, buf_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.addr = ptrType$1.nil;
+ this.buf = sliceType$2.nil;
+ return;
+ }
+ this.addr = addr_;
+ this.buf = buf_;
+ });
+ span = $newType(0, $kindStruct, "strings.span", true, "strings", false, function(start_, end_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.start = 0;
+ this.end = 0;
+ return;
+ }
+ this.start = start_;
+ this.end = end_;
+ });
+ sliceType = $sliceType($String);
+ ptrType = $ptrType(asciiSet);
+ sliceType$1 = $sliceType(span);
+ ptrType$1 = $ptrType(Builder);
+ sliceType$2 = $sliceType($Uint8);
+ arrayType = $arrayType($Uint32, 8);
+ arrayType$1 = $arrayType($Int, 256);
+ sliceType$3 = $sliceType($Int);
+ arrayType$2 = $arrayType($Uint8, 256);
+ ptrType$2 = $ptrType(byteReplacer);
+ arrayType$3 = $arrayType(sliceType$2, 256);
+ ptrType$3 = $ptrType(trieNode);
+ sliceType$4 = $sliceType(ptrType$3);
+ ptrType$4 = $ptrType(appendSliceWriter);
+ ptrType$5 = $ptrType(stringFinder);
+ ptrType$6 = $ptrType(Replacer);
+ ptrType$7 = $ptrType(genericReplacer);
+ ptrType$8 = $ptrType(singleStringReplacer);
+ ptrType$9 = $ptrType(byteStringReplacer);
+ ptrType$10 = $ptrType(Reader);
+ explode = function(s, n) {
+ var _tuple, a, ch, i, l, n, s, size, x;
+ l = utf8.RuneCountInString(s);
+ if (n < 0 || n > l) {
+ n = l;
+ }
+ a = $makeSlice(sliceType, n);
+ i = 0;
+ while (true) {
+ if (!(i < (n - 1 >> 0))) { break; }
+ _tuple = utf8.DecodeRuneInString(s);
+ ch = _tuple[0];
+ size = _tuple[1];
+ ((i < 0 || i >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + i] = $substring(s, 0, size));
+ s = $substring(s, size);
+ if (ch === 65533) {
+ ((i < 0 || i >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + i] = "\xEF\xBF\xBD");
+ }
+ i = i + (1) >> 0;
+ }
+ if (n > 0) {
+ (x = n - 1 >> 0, ((x < 0 || x >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + x] = s));
+ }
+ return a;
+ };
+ Contains = function(s, substr) {
+ var s, substr;
+ return Index(s, substr) >= 0;
+ };
+ $pkg.Contains = Contains;
+ ContainsAny = function(s, chars) {
+ var chars, s;
+ return IndexAny(s, chars) >= 0;
+ };
+ $pkg.ContainsAny = ContainsAny;
+ ContainsRune = function(s, r) {
+ var r, s;
+ return IndexRune(s, r) >= 0;
+ };
+ $pkg.ContainsRune = ContainsRune;
+ IndexRune = function(s, r) {
+ var _i, _ref, _rune, i, r, r$1, s;
+ if (0 <= r && r < 128) {
+ return IndexByte(s, ((r << 24 >>> 24)));
+ } else if ((r === 65533)) {
+ _ref = s;
+ _i = 0;
+ while (true) {
+ if (!(_i < _ref.length)) { break; }
+ _rune = $decodeRune(_ref, _i);
+ i = _i;
+ r$1 = _rune[0];
+ if (r$1 === 65533) {
+ return i;
+ }
+ _i += _rune[1];
+ }
+ return -1;
+ } else if (!utf8.ValidRune(r)) {
+ return -1;
+ } else {
+ return Index(s, ($encodeRune(r)));
+ }
+ };
+ $pkg.IndexRune = IndexRune;
+ IndexAny = function(s, chars) {
+ var _i, _ref, _rune, _tuple, as, c, chars, i, i$1, isASCII, r, s;
+ if (chars === "") {
+ return -1;
+ }
+ if (chars.length === 1) {
+ r = ((chars.charCodeAt(0) >> 0));
+ if (r >= 128) {
+ r = 65533;
+ }
+ return IndexRune(s, r);
+ }
+ if (s.length > 8) {
+ _tuple = makeASCIISet(chars);
+ as = $clone(_tuple[0], asciiSet);
+ isASCII = _tuple[1];
+ if (isASCII) {
+ i = 0;
+ while (true) {
+ if (!(i < s.length)) { break; }
+ if (new ptrType(as).contains(s.charCodeAt(i))) {
+ return i;
+ }
+ i = i + (1) >> 0;
+ }
+ return -1;
+ }
+ }
+ _ref = s;
+ _i = 0;
+ while (true) {
+ if (!(_i < _ref.length)) { break; }
+ _rune = $decodeRune(_ref, _i);
+ i$1 = _i;
+ c = _rune[0];
+ if (IndexRune(chars, c) >= 0) {
+ return i$1;
+ }
+ _i += _rune[1];
+ }
+ return -1;
+ };
+ $pkg.IndexAny = IndexAny;
+ LastIndexByte = function(s, c) {
+ var c, i, s;
+ i = s.length - 1 >> 0;
+ while (true) {
+ if (!(i >= 0)) { break; }
+ if (s.charCodeAt(i) === c) {
+ return i;
+ }
+ i = i - (1) >> 0;
+ }
+ return -1;
+ };
+ $pkg.LastIndexByte = LastIndexByte;
+ genSplit = function(s, sep, sepSave, n) {
+ var a, i, m, n, s, sep, sepSave;
+ if (n === 0) {
+ return sliceType.nil;
+ }
+ if (sep === "") {
+ return explode(s, n);
+ }
+ if (n < 0) {
+ n = Count(s, sep) + 1 >> 0;
+ }
+ a = $makeSlice(sliceType, n);
+ n = n - (1) >> 0;
+ i = 0;
+ while (true) {
+ if (!(i < n)) { break; }
+ m = Index(s, sep);
+ if (m < 0) {
+ break;
+ }
+ ((i < 0 || i >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + i] = $substring(s, 0, (m + sepSave >> 0)));
+ s = $substring(s, (m + sep.length >> 0));
+ i = i + (1) >> 0;
+ }
+ ((i < 0 || i >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + i] = s);
+ return $subslice(a, 0, (i + 1 >> 0));
+ };
+ SplitN = function(s, sep, n) {
+ var n, s, sep;
+ return genSplit(s, sep, 0, n);
+ };
+ $pkg.SplitN = SplitN;
+ Split = function(s, sep) {
+ var s, sep;
+ return genSplit(s, sep, 0, -1);
+ };
+ $pkg.Split = Split;
+ Fields = function(s) {
+ var {$24r, _r, a, fieldStart, i, i$1, isSpace, n, na, r, s, setBits, wasSpace, x, x$1, x$2, $s, $r, $c} = $restore(this, {s});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ n = 0;
+ wasSpace = 1;
+ setBits = 0;
+ i = 0;
+ while (true) {
+ if (!(i < s.length)) { break; }
+ r = s.charCodeAt(i);
+ setBits = (setBits | (r)) >>> 0;
+ isSpace = ((((r < 0 || r >= asciiSpace.length) ? ($throwRuntimeError("index out of range"), undefined) : asciiSpace[r]) >> 0));
+ n = n + ((wasSpace & (~isSpace >> 0))) >> 0;
+ wasSpace = isSpace;
+ i = i + (1) >> 0;
+ }
+ /* */ if (setBits >= 128) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (setBits >= 128) { */ case 1:
+ _r = FieldsFunc(s, unicode.IsSpace); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 4; case 4: return $24r;
+ /* } */ case 2:
+ a = $makeSlice(sliceType, n);
+ na = 0;
+ fieldStart = 0;
+ i$1 = 0;
+ while (true) {
+ if (!(i$1 < s.length && !(((x = s.charCodeAt(i$1), ((x < 0 || x >= asciiSpace.length) ? ($throwRuntimeError("index out of range"), undefined) : asciiSpace[x])) === 0)))) { break; }
+ i$1 = i$1 + (1) >> 0;
+ }
+ fieldStart = i$1;
+ while (true) {
+ if (!(i$1 < s.length)) { break; }
+ if ((x$1 = s.charCodeAt(i$1), ((x$1 < 0 || x$1 >= asciiSpace.length) ? ($throwRuntimeError("index out of range"), undefined) : asciiSpace[x$1])) === 0) {
+ i$1 = i$1 + (1) >> 0;
+ continue;
+ }
+ ((na < 0 || na >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + na] = $substring(s, fieldStart, i$1));
+ na = na + (1) >> 0;
+ i$1 = i$1 + (1) >> 0;
+ while (true) {
+ if (!(i$1 < s.length && !(((x$2 = s.charCodeAt(i$1), ((x$2 < 0 || x$2 >= asciiSpace.length) ? ($throwRuntimeError("index out of range"), undefined) : asciiSpace[x$2])) === 0)))) { break; }
+ i$1 = i$1 + (1) >> 0;
+ }
+ fieldStart = i$1;
+ }
+ if (fieldStart < s.length) {
+ ((na < 0 || na >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + na] = $substring(s, fieldStart));
+ }
+ $s = -1; return a;
+ /* */ } return; } var $f = {$blk: Fields, $c: true, $r, $24r, _r, a, fieldStart, i, i$1, isSpace, n, na, r, s, setBits, wasSpace, x, x$1, x$2, $s};return $f;
+ };
+ $pkg.Fields = Fields;
+ FieldsFunc = function(s, f) {
+ var {_i, _i$1, _r, _ref, _ref$1, _rune, a, end, f, i, rune, s, span$1, spans, start, $s, $r, $c} = $restore(this, {s, f});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ spans = $makeSlice(sliceType$1, 0, 32);
+ start = -1;
+ _ref = s;
+ _i = 0;
+ /* while (true) { */ case 1:
+ /* if (!(_i < _ref.length)) { break; } */ if(!(_i < _ref.length)) { $s = 2; continue; }
+ _rune = $decodeRune(_ref, _i);
+ end = _i;
+ rune = _rune[0];
+ _r = f(rune); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ /* */ if (_r) { $s = 3; continue; }
+ /* */ $s = 4; continue;
+ /* if (_r) { */ case 3:
+ if (start >= 0) {
+ spans = $append(spans, new span.ptr(start, end));
+ start = ~start >> 0;
+ }
+ $s = 5; continue;
+ /* } else { */ case 4:
+ if (start < 0) {
+ start = end;
+ }
+ /* } */ case 5:
+ _i += _rune[1];
+ $s = 1; continue;
+ case 2:
+ if (start >= 0) {
+ spans = $append(spans, new span.ptr(start, s.length));
+ }
+ a = $makeSlice(sliceType, spans.$length);
+ _ref$1 = spans;
+ _i$1 = 0;
+ while (true) {
+ if (!(_i$1 < _ref$1.$length)) { break; }
+ i = _i$1;
+ span$1 = $clone(((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]), span);
+ ((i < 0 || i >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + i] = $substring(s, span$1.start, span$1.end));
+ _i$1++;
+ }
+ $s = -1; return a;
+ /* */ } return; } var $f = {$blk: FieldsFunc, $c: true, $r, _i, _i$1, _r, _ref, _ref$1, _rune, a, end, f, i, rune, s, span$1, spans, start, $s};return $f;
+ };
+ $pkg.FieldsFunc = FieldsFunc;
+ Join = function(elems, sep) {
+ var _1, _i, _ref, b, elems, i, n, s, sep;
+ _1 = elems.$length;
+ if (_1 === (0)) {
+ return "";
+ } else if (_1 === (1)) {
+ return (0 >= elems.$length ? ($throwRuntimeError("index out of range"), undefined) : elems.$array[elems.$offset + 0]);
+ }
+ n = $imul(sep.length, ((elems.$length - 1 >> 0)));
+ i = 0;
+ while (true) {
+ if (!(i < elems.$length)) { break; }
+ n = n + (((i < 0 || i >= elems.$length) ? ($throwRuntimeError("index out of range"), undefined) : elems.$array[elems.$offset + i]).length) >> 0;
+ i = i + (1) >> 0;
+ }
+ b = new Builder.ptr(ptrType$1.nil, sliceType$2.nil);
+ b.Grow(n);
+ b.WriteString((0 >= elems.$length ? ($throwRuntimeError("index out of range"), undefined) : elems.$array[elems.$offset + 0]));
+ _ref = $subslice(elems, 1);
+ _i = 0;
+ while (true) {
+ if (!(_i < _ref.$length)) { break; }
+ s = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]);
+ b.WriteString(sep);
+ b.WriteString(s);
+ _i++;
+ }
+ return b.String();
+ };
+ $pkg.Join = Join;
+ HasPrefix = function(s, prefix) {
+ var prefix, s;
+ return s.length >= prefix.length && $substring(s, 0, prefix.length) === prefix;
+ };
+ $pkg.HasPrefix = HasPrefix;
+ HasSuffix = function(s, suffix) {
+ var s, suffix;
+ return s.length >= suffix.length && $substring(s, (s.length - suffix.length >> 0)) === suffix;
+ };
+ $pkg.HasSuffix = HasSuffix;
+ Map = function(mapping, s) {
+ var {_i, _i$1, _r, _r$1, _ref, _ref$1, _rune, _rune$1, _tuple, b, c, c$1, i, mapping, r, r$1, s, width, $s, $r, $c} = $restore(this, {mapping, s});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ b = new Builder.ptr(ptrType$1.nil, sliceType$2.nil);
+ _ref = s;
+ _i = 0;
+ /* while (true) { */ case 1:
+ /* if (!(_i < _ref.length)) { break; } */ if(!(_i < _ref.length)) { $s = 2; continue; }
+ _rune = $decodeRune(_ref, _i);
+ i = _i;
+ c = _rune[0];
+ _r = mapping(c); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ r = _r;
+ if ((r === c) && !((c === 65533))) {
+ _i += _rune[1];
+ /* continue; */ $s = 1; continue;
+ }
+ width = 0;
+ if (c === 65533) {
+ _tuple = utf8.DecodeRuneInString($substring(s, i));
+ c = _tuple[0];
+ width = _tuple[1];
+ if (!((width === 1)) && (r === c)) {
+ _i += _rune[1];
+ /* continue; */ $s = 1; continue;
+ }
+ } else {
+ width = utf8.RuneLen(c);
+ }
+ b.Grow(s.length + 4 >> 0);
+ b.WriteString($substring(s, 0, i));
+ if (r >= 0) {
+ b.WriteRune(r);
+ }
+ s = $substring(s, (i + width >> 0));
+ /* break; */ $s = 2; continue;
+ case 2:
+ if (b.Cap() === 0) {
+ $s = -1; return s;
+ }
+ _ref$1 = s;
+ _i$1 = 0;
+ /* while (true) { */ case 4:
+ /* if (!(_i$1 < _ref$1.length)) { break; } */ if(!(_i$1 < _ref$1.length)) { $s = 5; continue; }
+ _rune$1 = $decodeRune(_ref$1, _i$1);
+ c$1 = _rune$1[0];
+ _r$1 = mapping(c$1); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ r$1 = _r$1;
+ if (r$1 >= 0) {
+ if (r$1 < 128) {
+ b.WriteByte(((r$1 << 24 >>> 24)));
+ } else {
+ b.WriteRune(r$1);
+ }
+ }
+ _i$1 += _rune$1[1];
+ $s = 4; continue;
+ case 5:
+ $s = -1; return b.String();
+ /* */ } return; } var $f = {$blk: Map, $c: true, $r, _i, _i$1, _r, _r$1, _ref, _ref$1, _rune, _rune$1, _tuple, b, c, c$1, i, mapping, r, r$1, s, width, $s};return $f;
+ };
+ $pkg.Map = Map;
+ Repeat = function(s, count) {
+ var _q, _q$1, b, count, n, s;
+ if (count === 0) {
+ return "";
+ }
+ if (count < 0) {
+ $panic(new $String("strings: negative Repeat count"));
+ } else if (!(((_q = ($imul(s.length, count)) / count, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) === s.length))) {
+ $panic(new $String("strings: Repeat count causes overflow"));
+ }
+ n = $imul(s.length, count);
+ b = new Builder.ptr(ptrType$1.nil, sliceType$2.nil);
+ b.Grow(n);
+ b.WriteString(s);
+ while (true) {
+ if (!(b.Len() < n)) { break; }
+ if (b.Len() <= (_q$1 = n / 2, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"))) {
+ b.WriteString(b.String());
+ } else {
+ b.WriteString($substring(b.String(), 0, (n - b.Len() >> 0)));
+ break;
+ }
+ }
+ return b.String();
+ };
+ $pkg.Repeat = Repeat;
+ ToLower = function(s) {
+ var {$24r, _r, _tmp, _tmp$1, b, c, c$1, hasUpper, i, i$1, isASCII, s, $s, $r, $c} = $restore(this, {s});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _tmp = true;
+ _tmp$1 = false;
+ isASCII = _tmp;
+ hasUpper = _tmp$1;
+ i = 0;
+ while (true) {
+ if (!(i < s.length)) { break; }
+ c = s.charCodeAt(i);
+ if (c >= 128) {
+ isASCII = false;
+ break;
+ }
+ hasUpper = hasUpper || (65 <= c && c <= 90);
+ i = i + (1) >> 0;
+ }
+ if (isASCII) {
+ if (!hasUpper) {
+ $s = -1; return s;
+ }
+ b = new Builder.ptr(ptrType$1.nil, sliceType$2.nil);
+ b.Grow(s.length);
+ i$1 = 0;
+ while (true) {
+ if (!(i$1 < s.length)) { break; }
+ c$1 = s.charCodeAt(i$1);
+ if (65 <= c$1 && c$1 <= 90) {
+ c$1 = c$1 + (32) << 24 >>> 24;
+ }
+ b.WriteByte(c$1);
+ i$1 = i$1 + (1) >> 0;
+ }
+ $s = -1; return b.String();
+ }
+ _r = Map(unicode.ToLower, s); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: ToLower, $c: true, $r, $24r, _r, _tmp, _tmp$1, b, c, c$1, hasUpper, i, i$1, isASCII, s, $s};return $f;
+ };
+ $pkg.ToLower = ToLower;
+ TrimLeftFunc = function(s, f) {
+ var {_r, f, i, s, $s, $r, $c} = $restore(this, {s, f});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = indexFunc(s, f, false); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ i = _r;
+ if (i === -1) {
+ $s = -1; return "";
+ }
+ $s = -1; return $substring(s, i);
+ /* */ } return; } var $f = {$blk: TrimLeftFunc, $c: true, $r, _r, f, i, s, $s};return $f;
+ };
+ $pkg.TrimLeftFunc = TrimLeftFunc;
+ TrimRightFunc = function(s, f) {
+ var {_r, _tuple, f, i, s, wid, $s, $r, $c} = $restore(this, {s, f});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = lastIndexFunc(s, f, false); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ i = _r;
+ if (i >= 0 && s.charCodeAt(i) >= 128) {
+ _tuple = utf8.DecodeRuneInString($substring(s, i));
+ wid = _tuple[1];
+ i = i + (wid) >> 0;
+ } else {
+ i = i + (1) >> 0;
+ }
+ $s = -1; return $substring(s, 0, i);
+ /* */ } return; } var $f = {$blk: TrimRightFunc, $c: true, $r, _r, _tuple, f, i, s, wid, $s};return $f;
+ };
+ $pkg.TrimRightFunc = TrimRightFunc;
+ TrimFunc = function(s, f) {
+ var {$24r, _r, _r$1, f, s, $s, $r, $c} = $restore(this, {s, f});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = TrimLeftFunc(s, f); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _r$1 = TrimRightFunc(_r, f); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ $24r = _r$1;
+ $s = 3; case 3: return $24r;
+ /* */ } return; } var $f = {$blk: TrimFunc, $c: true, $r, $24r, _r, _r$1, f, s, $s};return $f;
+ };
+ $pkg.TrimFunc = TrimFunc;
+ IndexFunc = function(s, f) {
+ var {$24r, _r, f, s, $s, $r, $c} = $restore(this, {s, f});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = indexFunc(s, f, true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: IndexFunc, $c: true, $r, $24r, _r, f, s, $s};return $f;
+ };
+ $pkg.IndexFunc = IndexFunc;
+ indexFunc = function(s, f, truth) {
+ var {_i, _r, _ref, _rune, f, i, r, s, truth, $s, $r, $c} = $restore(this, {s, f, truth});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _ref = s;
+ _i = 0;
+ /* while (true) { */ case 1:
+ /* if (!(_i < _ref.length)) { break; } */ if(!(_i < _ref.length)) { $s = 2; continue; }
+ _rune = $decodeRune(_ref, _i);
+ i = _i;
+ r = _rune[0];
+ _r = f(r); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ /* */ if (_r === truth) { $s = 3; continue; }
+ /* */ $s = 4; continue;
+ /* if (_r === truth) { */ case 3:
+ $s = -1; return i;
+ /* } */ case 4:
+ _i += _rune[1];
+ $s = 1; continue;
+ case 2:
+ $s = -1; return -1;
+ /* */ } return; } var $f = {$blk: indexFunc, $c: true, $r, _i, _r, _ref, _rune, f, i, r, s, truth, $s};return $f;
+ };
+ lastIndexFunc = function(s, f, truth) {
+ var {_r, _tuple, f, i, r, s, size, truth, $s, $r, $c} = $restore(this, {s, f, truth});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ i = s.length;
+ /* while (true) { */ case 1:
+ /* if (!(i > 0)) { break; } */ if(!(i > 0)) { $s = 2; continue; }
+ _tuple = utf8.DecodeLastRuneInString($substring(s, 0, i));
+ r = _tuple[0];
+ size = _tuple[1];
+ i = i - (size) >> 0;
+ _r = f(r); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ /* */ if (_r === truth) { $s = 3; continue; }
+ /* */ $s = 4; continue;
+ /* if (_r === truth) { */ case 3:
+ $s = -1; return i;
+ /* } */ case 4:
+ $s = 1; continue;
+ case 2:
+ $s = -1; return -1;
+ /* */ } return; } var $f = {$blk: lastIndexFunc, $c: true, $r, _r, _tuple, f, i, r, s, size, truth, $s};return $f;
+ };
+ makeASCIISet = function(chars) {
+ var _index, _q, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, as, c, chars, i, ok, y;
+ as = arrayType.zero();
+ ok = false;
+ i = 0;
+ while (true) {
+ if (!(i < chars.length)) { break; }
+ c = chars.charCodeAt(i);
+ if (c >= 128) {
+ _tmp = $clone(as, asciiSet);
+ _tmp$1 = false;
+ asciiSet.copy(as, _tmp);
+ ok = _tmp$1;
+ return [as, ok];
+ }
+ _index = (_q = c / 32, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero"));
+ ((_index < 0 || _index >= as.length) ? ($throwRuntimeError("index out of range"), undefined) : as[_index] = ((((_index < 0 || _index >= as.length) ? ($throwRuntimeError("index out of range"), undefined) : as[_index]) | (((y = ((_r = c % 32, _r === _r ? _r : $throwRuntimeError("integer divide by zero"))), y < 32 ? (1 << y) : 0) >>> 0))) >>> 0));
+ i = i + (1) >> 0;
+ }
+ _tmp$2 = $clone(as, asciiSet);
+ _tmp$3 = true;
+ asciiSet.copy(as, _tmp$2);
+ ok = _tmp$3;
+ return [as, ok];
+ };
+ asciiSet.prototype.contains = function(c) {
+ var _q, _r, as, c, x, x$1, y;
+ as = this.$val;
+ return !((((((x = as, x$1 = (_q = c / 32, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")), ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1])) & (((y = ((_r = c % 32, _r === _r ? _r : $throwRuntimeError("integer divide by zero"))), y < 32 ? (1 << y) : 0) >>> 0))) >>> 0)) === 0));
+ };
+ $ptrType(asciiSet).prototype.contains = function(c) { return (new asciiSet(this.$get())).contains(c); };
+ Trim = function(s, cutset) {
+ var _tuple, as, cutset, ok, s;
+ if (s === "" || cutset === "") {
+ return s;
+ }
+ if ((cutset.length === 1) && cutset.charCodeAt(0) < 128) {
+ return trimLeftByte(trimRightByte(s, cutset.charCodeAt(0)), cutset.charCodeAt(0));
+ }
+ _tuple = makeASCIISet(cutset);
+ as = $clone(_tuple[0], asciiSet);
+ ok = _tuple[1];
+ if (ok) {
+ return trimLeftASCII(trimRightASCII(s, as), as);
+ }
+ return trimLeftUnicode(trimRightUnicode(s, cutset), cutset);
+ };
+ $pkg.Trim = Trim;
+ TrimLeft = function(s, cutset) {
+ var _tuple, as, cutset, ok, s;
+ if (s === "" || cutset === "") {
+ return s;
+ }
+ if ((cutset.length === 1) && cutset.charCodeAt(0) < 128) {
+ return trimLeftByte(s, cutset.charCodeAt(0));
+ }
+ _tuple = makeASCIISet(cutset);
+ as = $clone(_tuple[0], asciiSet);
+ ok = _tuple[1];
+ if (ok) {
+ return trimLeftASCII(s, as);
+ }
+ return trimLeftUnicode(s, cutset);
+ };
+ $pkg.TrimLeft = TrimLeft;
+ trimLeftByte = function(s, c) {
+ var c, s;
+ while (true) {
+ if (!(s.length > 0 && (s.charCodeAt(0) === c))) { break; }
+ s = $substring(s, 1);
+ }
+ return s;
+ };
+ trimLeftASCII = function(s, as) {
+ var as, s;
+ while (true) {
+ if (!(s.length > 0)) { break; }
+ if (!new ptrType(as).contains(s.charCodeAt(0))) {
+ break;
+ }
+ s = $substring(s, 1);
+ }
+ return s;
+ };
+ trimLeftUnicode = function(s, cutset) {
+ var _tmp, _tmp$1, _tuple, cutset, n, r, s;
+ while (true) {
+ if (!(s.length > 0)) { break; }
+ _tmp = ((s.charCodeAt(0) >> 0));
+ _tmp$1 = 1;
+ r = _tmp;
+ n = _tmp$1;
+ if (r >= 128) {
+ _tuple = utf8.DecodeRuneInString(s);
+ r = _tuple[0];
+ n = _tuple[1];
+ }
+ if (!ContainsRune(cutset, r)) {
+ break;
+ }
+ s = $substring(s, n);
+ }
+ return s;
+ };
+ TrimRight = function(s, cutset) {
+ var _tuple, as, cutset, ok, s;
+ if (s === "" || cutset === "") {
+ return s;
+ }
+ if ((cutset.length === 1) && cutset.charCodeAt(0) < 128) {
+ return trimRightByte(s, cutset.charCodeAt(0));
+ }
+ _tuple = makeASCIISet(cutset);
+ as = $clone(_tuple[0], asciiSet);
+ ok = _tuple[1];
+ if (ok) {
+ return trimRightASCII(s, as);
+ }
+ return trimRightUnicode(s, cutset);
+ };
+ $pkg.TrimRight = TrimRight;
+ trimRightByte = function(s, c) {
+ var c, s;
+ while (true) {
+ if (!(s.length > 0 && (s.charCodeAt((s.length - 1 >> 0)) === c))) { break; }
+ s = $substring(s, 0, (s.length - 1 >> 0));
+ }
+ return s;
+ };
+ trimRightASCII = function(s, as) {
+ var as, s;
+ while (true) {
+ if (!(s.length > 0)) { break; }
+ if (!new ptrType(as).contains(s.charCodeAt((s.length - 1 >> 0)))) {
+ break;
+ }
+ s = $substring(s, 0, (s.length - 1 >> 0));
+ }
+ return s;
+ };
+ trimRightUnicode = function(s, cutset) {
+ var _tmp, _tmp$1, _tuple, cutset, n, r, s;
+ while (true) {
+ if (!(s.length > 0)) { break; }
+ _tmp = ((s.charCodeAt((s.length - 1 >> 0)) >> 0));
+ _tmp$1 = 1;
+ r = _tmp;
+ n = _tmp$1;
+ if (r >= 128) {
+ _tuple = utf8.DecodeLastRuneInString(s);
+ r = _tuple[0];
+ n = _tuple[1];
+ }
+ if (!ContainsRune(cutset, r)) {
+ break;
+ }
+ s = $substring(s, 0, (s.length - n >> 0));
+ }
+ return s;
+ };
+ TrimSpace = function(s) {
+ var {$24r, $24r$1, _r, _r$1, c, c$1, s, start, stop, $s, $r, $c} = $restore(this, {s});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ start = 0;
+ /* while (true) { */ case 1:
+ /* if (!(start < s.length)) { break; } */ if(!(start < s.length)) { $s = 2; continue; }
+ c = s.charCodeAt(start);
+ /* */ if (c >= 128) { $s = 3; continue; }
+ /* */ $s = 4; continue;
+ /* if (c >= 128) { */ case 3:
+ _r = TrimFunc($substring(s, start), unicode.IsSpace); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 6; case 6: return $24r;
+ /* } */ case 4:
+ if (((c < 0 || c >= asciiSpace.length) ? ($throwRuntimeError("index out of range"), undefined) : asciiSpace[c]) === 0) {
+ /* break; */ $s = 2; continue;
+ }
+ start = start + (1) >> 0;
+ $s = 1; continue;
+ case 2:
+ stop = s.length;
+ /* while (true) { */ case 7:
+ /* if (!(stop > start)) { break; } */ if(!(stop > start)) { $s = 8; continue; }
+ c$1 = s.charCodeAt((stop - 1 >> 0));
+ /* */ if (c$1 >= 128) { $s = 9; continue; }
+ /* */ $s = 10; continue;
+ /* if (c$1 >= 128) { */ case 9:
+ _r$1 = TrimFunc($substring(s, start, stop), unicode.IsSpace); /* */ $s = 11; case 11: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ $24r$1 = _r$1;
+ $s = 12; case 12: return $24r$1;
+ /* } */ case 10:
+ if (((c$1 < 0 || c$1 >= asciiSpace.length) ? ($throwRuntimeError("index out of range"), undefined) : asciiSpace[c$1]) === 0) {
+ /* break; */ $s = 8; continue;
+ }
+ stop = stop - (1) >> 0;
+ $s = 7; continue;
+ case 8:
+ $s = -1; return $substring(s, start, stop);
+ /* */ } return; } var $f = {$blk: TrimSpace, $c: true, $r, $24r, $24r$1, _r, _r$1, c, c$1, s, start, stop, $s};return $f;
+ };
+ $pkg.TrimSpace = TrimSpace;
+ TrimPrefix = function(s, prefix) {
+ var prefix, s;
+ if (HasPrefix(s, prefix)) {
+ return $substring(s, prefix.length);
+ }
+ return s;
+ };
+ $pkg.TrimPrefix = TrimPrefix;
+ TrimSuffix = function(s, suffix) {
+ var s, suffix;
+ if (HasSuffix(s, suffix)) {
+ return $substring(s, 0, (s.length - suffix.length >> 0));
+ }
+ return s;
+ };
+ $pkg.TrimSuffix = TrimSuffix;
+ Replace = function(s, old, new$1, n) {
+ var _tuple, b, i, j, m, n, new$1, old, s, start, wid;
+ if (old === new$1 || (n === 0)) {
+ return s;
+ }
+ m = Count(s, old);
+ if (m === 0) {
+ return s;
+ } else if (n < 0 || m < n) {
+ n = m;
+ }
+ b = new Builder.ptr(ptrType$1.nil, sliceType$2.nil);
+ b.Grow(s.length + ($imul(n, ((new$1.length - old.length >> 0)))) >> 0);
+ start = 0;
+ i = 0;
+ while (true) {
+ if (!(i < n)) { break; }
+ j = start;
+ if (old.length === 0) {
+ if (i > 0) {
+ _tuple = utf8.DecodeRuneInString($substring(s, start));
+ wid = _tuple[1];
+ j = j + (wid) >> 0;
+ }
+ } else {
+ j = j + (Index($substring(s, start), old)) >> 0;
+ }
+ b.WriteString($substring(s, start, j));
+ b.WriteString(new$1);
+ start = j + old.length >> 0;
+ i = i + (1) >> 0;
+ }
+ b.WriteString($substring(s, start));
+ return b.String();
+ };
+ $pkg.Replace = Replace;
+ ReplaceAll = function(s, old, new$1) {
+ var new$1, old, s;
+ return Replace(s, old, new$1, -1);
+ };
+ $pkg.ReplaceAll = ReplaceAll;
+ EqualFold = function(s, t) {
+ var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, r, r$1, r$2, s, size, size$1, sr, t, tr;
+ while (true) {
+ if (!(!(s === "") && !(t === ""))) { break; }
+ _tmp = 0;
+ _tmp$1 = 0;
+ sr = _tmp;
+ tr = _tmp$1;
+ if (s.charCodeAt(0) < 128) {
+ _tmp$2 = ((s.charCodeAt(0) >> 0));
+ _tmp$3 = $substring(s, 1);
+ sr = _tmp$2;
+ s = _tmp$3;
+ } else {
+ _tuple = utf8.DecodeRuneInString(s);
+ r = _tuple[0];
+ size = _tuple[1];
+ _tmp$4 = r;
+ _tmp$5 = $substring(s, size);
+ sr = _tmp$4;
+ s = _tmp$5;
+ }
+ if (t.charCodeAt(0) < 128) {
+ _tmp$6 = ((t.charCodeAt(0) >> 0));
+ _tmp$7 = $substring(t, 1);
+ tr = _tmp$6;
+ t = _tmp$7;
+ } else {
+ _tuple$1 = utf8.DecodeRuneInString(t);
+ r$1 = _tuple$1[0];
+ size$1 = _tuple$1[1];
+ _tmp$8 = r$1;
+ _tmp$9 = $substring(t, size$1);
+ tr = _tmp$8;
+ t = _tmp$9;
+ }
+ if (tr === sr) {
+ continue;
+ }
+ if (tr < sr) {
+ _tmp$10 = sr;
+ _tmp$11 = tr;
+ tr = _tmp$10;
+ sr = _tmp$11;
+ }
+ if (tr < 128) {
+ if (65 <= sr && sr <= 90 && (tr === ((sr + 97 >> 0) - 65 >> 0))) {
+ continue;
+ }
+ return false;
+ }
+ r$2 = unicode.SimpleFold(sr);
+ while (true) {
+ if (!(!((r$2 === sr)) && r$2 < tr)) { break; }
+ r$2 = unicode.SimpleFold(r$2);
+ }
+ if (r$2 === tr) {
+ continue;
+ }
+ return false;
+ }
+ return s === t;
+ };
+ $pkg.EqualFold = EqualFold;
+ Cut = function(s, sep) {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, after, before, found, i, s, sep;
+ before = "";
+ after = "";
+ found = false;
+ i = Index(s, sep);
+ if (i >= 0) {
+ _tmp = $substring(s, 0, i);
+ _tmp$1 = $substring(s, (i + sep.length >> 0));
+ _tmp$2 = true;
+ before = _tmp;
+ after = _tmp$1;
+ found = _tmp$2;
+ return [before, after, found];
+ }
+ _tmp$3 = s;
+ _tmp$4 = "";
+ _tmp$5 = false;
+ before = _tmp$3;
+ after = _tmp$4;
+ found = _tmp$5;
+ return [before, after, found];
+ };
+ $pkg.Cut = Cut;
+ makeStringFinder = function(pattern) {
+ var _i, _ref, f, i, i$1, i$2, i$3, last, lastPrefix, lenSuffix, pattern, x, x$1, x$2, x$3, x$4, x$5;
+ f = new stringFinder.ptr(pattern, arrayType$1.zero(), $makeSlice(sliceType$3, pattern.length));
+ last = pattern.length - 1 >> 0;
+ _ref = f.badCharSkip;
+ _i = 0;
+ while (true) {
+ if (!(_i < 256)) { break; }
+ i = _i;
+ (x = f.badCharSkip, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i] = pattern.length));
+ _i++;
+ }
+ i$1 = 0;
+ while (true) {
+ if (!(i$1 < last)) { break; }
+ (x$1 = f.badCharSkip, x$2 = pattern.charCodeAt(i$1), ((x$2 < 0 || x$2 >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[x$2] = (last - i$1 >> 0)));
+ i$1 = i$1 + (1) >> 0;
+ }
+ lastPrefix = last;
+ i$2 = last;
+ while (true) {
+ if (!(i$2 >= 0)) { break; }
+ if (HasPrefix(pattern, $substring(pattern, (i$2 + 1 >> 0)))) {
+ lastPrefix = i$2 + 1 >> 0;
+ }
+ (x$3 = f.goodSuffixSkip, ((i$2 < 0 || i$2 >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + i$2] = ((lastPrefix + last >> 0) - i$2 >> 0)));
+ i$2 = i$2 - (1) >> 0;
+ }
+ i$3 = 0;
+ while (true) {
+ if (!(i$3 < last)) { break; }
+ lenSuffix = longestCommonSuffix(pattern, $substring(pattern, 1, (i$3 + 1 >> 0)));
+ if (!((pattern.charCodeAt((i$3 - lenSuffix >> 0)) === pattern.charCodeAt((last - lenSuffix >> 0))))) {
+ (x$4 = f.goodSuffixSkip, x$5 = last - lenSuffix >> 0, ((x$5 < 0 || x$5 >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + x$5] = ((lenSuffix + last >> 0) - i$3 >> 0)));
+ }
+ i$3 = i$3 + (1) >> 0;
+ }
+ return f;
+ };
+ longestCommonSuffix = function(a, b) {
+ var a, b, i;
+ i = 0;
+ while (true) {
+ if (!(i < a.length && i < b.length)) { break; }
+ if (!((a.charCodeAt(((a.length - 1 >> 0) - i >> 0)) === b.charCodeAt(((b.length - 1 >> 0) - i >> 0))))) {
+ break;
+ }
+ i = i + (1) >> 0;
+ }
+ return i;
+ };
+ stringFinder.ptr.prototype.next = function(text) {
+ var f, i, j, text, x, x$1, x$2;
+ f = this;
+ i = f.pattern.length - 1 >> 0;
+ while (true) {
+ if (!(i < text.length)) { break; }
+ j = f.pattern.length - 1 >> 0;
+ while (true) {
+ if (!(j >= 0 && (text.charCodeAt(i) === f.pattern.charCodeAt(j)))) { break; }
+ i = i - (1) >> 0;
+ j = j - (1) >> 0;
+ }
+ if (j < 0) {
+ return i + 1 >> 0;
+ }
+ i = i + (max((x = f.badCharSkip, x$1 = text.charCodeAt(i), ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1])), (x$2 = f.goodSuffixSkip, ((j < 0 || j >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + j])))) >> 0;
+ }
+ return -1;
+ };
+ stringFinder.prototype.next = function(text) { return this.$val.next(text); };
+ max = function(a, b) {
+ var a, b;
+ if (a > b) {
+ return a;
+ }
+ return b;
+ };
+ NewReplacer = function(oldnew) {
+ var _r, oldnew;
+ if ((_r = oldnew.$length % 2, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) === 1) {
+ $panic(new $String("strings.NewReplacer: odd argument count"));
+ }
+ return new Replacer.ptr(new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), $ifaceNil, $appendSlice((sliceType.nil), oldnew));
+ };
+ $pkg.NewReplacer = NewReplacer;
+ Replacer.ptr.prototype.buildOnce = function() {
+ var r;
+ r = this;
+ r.r = r.build();
+ r.oldnew = sliceType.nil;
+ };
+ Replacer.prototype.buildOnce = function() { return this.$val.buildOnce(); };
+ Replacer.ptr.prototype.build = function() {
+ var _i, _q, _ref, allNewBytes, b, i, i$1, i$2, i$3, n, n$1, o, o$1, oldnew, r, r$1, x, x$1, x$2, x$3, x$4;
+ b = this;
+ oldnew = b.oldnew;
+ if ((oldnew.$length === 2) && (0 >= oldnew.$length ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + 0]).length > 1) {
+ return makeSingleStringReplacer((0 >= oldnew.$length ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + 0]), (1 >= oldnew.$length ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + 1]));
+ }
+ allNewBytes = true;
+ i = 0;
+ while (true) {
+ if (!(i < oldnew.$length)) { break; }
+ if (!((((i < 0 || i >= oldnew.$length) ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + i]).length === 1))) {
+ return makeGenericReplacer(oldnew);
+ }
+ if (!(((x = i + 1 >> 0, ((x < 0 || x >= oldnew.$length) ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + x])).length === 1))) {
+ allNewBytes = false;
+ }
+ i = i + (2) >> 0;
+ }
+ if (allNewBytes) {
+ r = arrayType$2.zero();
+ _ref = r;
+ _i = 0;
+ while (true) {
+ if (!(_i < 256)) { break; }
+ i$1 = _i;
+ ((i$1 < 0 || i$1 >= r.length) ? ($throwRuntimeError("index out of range"), undefined) : r[i$1] = ((i$1 << 24 >>> 24)));
+ _i++;
+ }
+ i$2 = oldnew.$length - 2 >> 0;
+ while (true) {
+ if (!(i$2 >= 0)) { break; }
+ o = ((i$2 < 0 || i$2 >= oldnew.$length) ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + i$2]).charCodeAt(0);
+ n = (x$1 = i$2 + 1 >> 0, ((x$1 < 0 || x$1 >= oldnew.$length) ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + x$1])).charCodeAt(0);
+ ((o < 0 || o >= r.length) ? ($throwRuntimeError("index out of range"), undefined) : r[o] = n);
+ i$2 = i$2 - (2) >> 0;
+ }
+ return new ptrType$2(r);
+ }
+ r$1 = new byteStringReplacer.ptr(arrayType$3.zero(), $makeSlice(sliceType, 0, (_q = oldnew.$length / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))));
+ i$3 = oldnew.$length - 2 >> 0;
+ while (true) {
+ if (!(i$3 >= 0)) { break; }
+ o$1 = ((i$3 < 0 || i$3 >= oldnew.$length) ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + i$3]).charCodeAt(0);
+ n$1 = (x$2 = i$3 + 1 >> 0, ((x$2 < 0 || x$2 >= oldnew.$length) ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + x$2]));
+ if ((x$3 = r$1.replacements, ((o$1 < 0 || o$1 >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[o$1])) === sliceType$2.nil) {
+ r$1.toReplace = $append(r$1.toReplace, ($bytesToString(new sliceType$2([o$1]))));
+ }
+ (x$4 = r$1.replacements, ((o$1 < 0 || o$1 >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[o$1] = (new sliceType$2($stringToBytes(n$1)))));
+ i$3 = i$3 - (2) >> 0;
+ }
+ return r$1;
+ };
+ Replacer.prototype.build = function() { return this.$val.build(); };
+ Replacer.ptr.prototype.Replace = function(s) {
+ var {$24r, _r, r, s, $s, $r, $c} = $restore(this, {s});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ r = this;
+ $r = r.once.Do($methodVal(r, "buildOnce")); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ _r = r.r.Replace(s); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 3; case 3: return $24r;
+ /* */ } return; } var $f = {$blk: Replacer.ptr.prototype.Replace, $c: true, $r, $24r, _r, r, s, $s};return $f;
+ };
+ Replacer.prototype.Replace = function(s) { return this.$val.Replace(s); };
+ Replacer.ptr.prototype.WriteString = function(w, s) {
+ var {$24r, _r, _tuple, err, n, r, s, w, $s, $r, $c} = $restore(this, {w, s});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ n = 0;
+ err = $ifaceNil;
+ r = this;
+ $r = r.once.Do($methodVal(r, "buildOnce")); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ _r = r.r.WriteString(w, s); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ n = _tuple[0];
+ err = _tuple[1];
+ $24r = [n, err];
+ $s = 3; case 3: return $24r;
+ /* */ } return; } var $f = {$blk: Replacer.ptr.prototype.WriteString, $c: true, $r, $24r, _r, _tuple, err, n, r, s, w, $s};return $f;
+ };
+ Replacer.prototype.WriteString = function(w, s) { return this.$val.WriteString(w, s); };
+ trieNode.ptr.prototype.add = function(key, val, priority, r) {
+ var key, keyNode, m, n, next, prefixNode, priority, r, t, val, x, x$1, x$10, x$11, x$12, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9;
+ t = this;
+ if (key === "") {
+ if (t.priority === 0) {
+ t.value = val;
+ t.priority = priority;
+ }
+ return;
+ }
+ if (!(t.prefix === "")) {
+ n = 0;
+ while (true) {
+ if (!(n < t.prefix.length && n < key.length)) { break; }
+ if (!((t.prefix.charCodeAt(n) === key.charCodeAt(n)))) {
+ break;
+ }
+ n = n + (1) >> 0;
+ }
+ if (n === t.prefix.length) {
+ t.next.add($substring(key, n), val, priority, r);
+ } else if (n === 0) {
+ prefixNode = ptrType$3.nil;
+ if (t.prefix.length === 1) {
+ prefixNode = t.next;
+ } else {
+ prefixNode = new trieNode.ptr("", 0, $substring(t.prefix, 1), t.next, sliceType$4.nil);
+ }
+ keyNode = new trieNode.ptr("", 0, "", ptrType$3.nil, sliceType$4.nil);
+ t.table = $makeSlice(sliceType$4, r.tableSize);
+ (x = t.table, x$1 = (x$2 = r.mapping, x$3 = t.prefix.charCodeAt(0), ((x$3 < 0 || x$3 >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[x$3])), ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1] = prefixNode));
+ (x$4 = t.table, x$5 = (x$6 = r.mapping, x$7 = key.charCodeAt(0), ((x$7 < 0 || x$7 >= x$6.length) ? ($throwRuntimeError("index out of range"), undefined) : x$6[x$7])), ((x$5 < 0 || x$5 >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + x$5] = keyNode));
+ t.prefix = "";
+ t.next = ptrType$3.nil;
+ keyNode.add($substring(key, 1), val, priority, r);
+ } else {
+ next = new trieNode.ptr("", 0, $substring(t.prefix, n), t.next, sliceType$4.nil);
+ t.prefix = $substring(t.prefix, 0, n);
+ t.next = next;
+ next.add($substring(key, n), val, priority, r);
+ }
+ } else if (!(t.table === sliceType$4.nil)) {
+ m = (x$8 = r.mapping, x$9 = key.charCodeAt(0), ((x$9 < 0 || x$9 >= x$8.length) ? ($throwRuntimeError("index out of range"), undefined) : x$8[x$9]));
+ if ((x$10 = t.table, ((m < 0 || m >= x$10.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$10.$array[x$10.$offset + m])) === ptrType$3.nil) {
+ (x$11 = t.table, ((m < 0 || m >= x$11.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$11.$array[x$11.$offset + m] = new trieNode.ptr("", 0, "", ptrType$3.nil, sliceType$4.nil)));
+ }
+ (x$12 = t.table, ((m < 0 || m >= x$12.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$12.$array[x$12.$offset + m])).add($substring(key, 1), val, priority, r);
+ } else {
+ t.prefix = key;
+ t.next = new trieNode.ptr("", 0, "", ptrType$3.nil, sliceType$4.nil);
+ t.next.add("", val, priority, r);
+ }
+ };
+ trieNode.prototype.add = function(key, val, priority, r) { return this.$val.add(key, val, priority, r); };
+ genericReplacer.ptr.prototype.lookup = function(s, ignoreRoot) {
+ var bestPriority, found, ignoreRoot, index, keylen, n, node, r, s, val, x, x$1, x$2;
+ val = "";
+ keylen = 0;
+ found = false;
+ r = this;
+ bestPriority = 0;
+ node = r.root;
+ n = 0;
+ while (true) {
+ if (!(!(node === ptrType$3.nil))) { break; }
+ if (node.priority > bestPriority && !(ignoreRoot && node === r.root)) {
+ bestPriority = node.priority;
+ val = node.value;
+ keylen = n;
+ found = true;
+ }
+ if (s === "") {
+ break;
+ }
+ if (!(node.table === sliceType$4.nil)) {
+ index = (x = r.mapping, x$1 = s.charCodeAt(0), ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1]));
+ if (((index >> 0)) === r.tableSize) {
+ break;
+ }
+ node = (x$2 = node.table, ((index < 0 || index >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + index]));
+ s = $substring(s, 1);
+ n = n + (1) >> 0;
+ } else if (!(node.prefix === "") && HasPrefix(s, node.prefix)) {
+ n = n + (node.prefix.length) >> 0;
+ s = $substring(s, node.prefix.length);
+ node = node.next;
+ } else {
+ break;
+ }
+ }
+ return [val, keylen, found];
+ };
+ genericReplacer.prototype.lookup = function(s, ignoreRoot) { return this.$val.lookup(s, ignoreRoot); };
+ makeGenericReplacer = function(oldnew) {
+ var _i, _i$1, _ref, _ref$1, b, b$1, i, i$1, i$2, index, j, key, oldnew, r, x, x$1, x$2, x$3, x$4;
+ r = new genericReplacer.ptr(new trieNode.ptr("", 0, "", ptrType$3.nil, sliceType$4.nil), 0, arrayType$2.zero());
+ i = 0;
+ while (true) {
+ if (!(i < oldnew.$length)) { break; }
+ key = ((i < 0 || i >= oldnew.$length) ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + i]);
+ j = 0;
+ while (true) {
+ if (!(j < key.length)) { break; }
+ (x = r.mapping, x$1 = key.charCodeAt(j), ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1] = 1));
+ j = j + (1) >> 0;
+ }
+ i = i + (2) >> 0;
+ }
+ _ref = r.mapping;
+ _i = 0;
+ while (true) {
+ if (!(_i < 256)) { break; }
+ b = ((_i < 0 || _i >= _ref.length) ? ($throwRuntimeError("index out of range"), undefined) : _ref[_i]);
+ r.tableSize = r.tableSize + (((b >> 0))) >> 0;
+ _i++;
+ }
+ index = 0;
+ _ref$1 = r.mapping;
+ _i$1 = 0;
+ while (true) {
+ if (!(_i$1 < 256)) { break; }
+ i$1 = _i$1;
+ b$1 = ((_i$1 < 0 || _i$1 >= _ref$1.length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1[_i$1]);
+ if (b$1 === 0) {
+ (x$2 = r.mapping, ((i$1 < 0 || i$1 >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i$1] = ((r.tableSize << 24 >>> 24))));
+ } else {
+ (x$3 = r.mapping, ((i$1 < 0 || i$1 >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[i$1] = index));
+ index = index + (1) << 24 >>> 24;
+ }
+ _i$1++;
+ }
+ r.root.table = $makeSlice(sliceType$4, r.tableSize);
+ i$2 = 0;
+ while (true) {
+ if (!(i$2 < oldnew.$length)) { break; }
+ r.root.add(((i$2 < 0 || i$2 >= oldnew.$length) ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + i$2]), (x$4 = i$2 + 1 >> 0, ((x$4 < 0 || x$4 >= oldnew.$length) ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + x$4])), oldnew.$length - i$2 >> 0, r);
+ i$2 = i$2 + (2) >> 0;
+ }
+ return r;
+ };
+ $ptrType(appendSliceWriter).prototype.Write = function(p) {
+ var p, w;
+ w = this;
+ w.$set($appendSlice(w.$get(), p));
+ return [p.$length, $ifaceNil];
+ };
+ $ptrType(appendSliceWriter).prototype.WriteString = function(s) {
+ var s, w;
+ w = this;
+ w.$set($appendSlice(w.$get(), s));
+ return [s.length, $ifaceNil];
+ };
+ stringWriter.ptr.prototype.WriteString = function(s) {
+ var {$24r, _r, s, w, $s, $r, $c} = $restore(this, {s});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ w = this;
+ _r = w.w.Write((new sliceType$2($stringToBytes(s)))); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: stringWriter.ptr.prototype.WriteString, $c: true, $r, $24r, _r, s, w, $s};return $f;
+ };
+ stringWriter.prototype.WriteString = function(s) { return this.$val.WriteString(s); };
+ getStringWriter = function(w) {
+ var _tuple, ok, sw, w, x;
+ _tuple = $assertType(w, io.StringWriter, true);
+ sw = _tuple[0];
+ ok = _tuple[1];
+ if (!ok) {
+ sw = (x = new stringWriter.ptr(w), new x.constructor.elem(x));
+ }
+ return sw;
+ };
+ genericReplacer.ptr.prototype.Replace = function(s) {
+ var {_r, buf, r, s, $s, $r, $c} = $restore(this, {s});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ buf = [buf];
+ r = this;
+ buf[0] = $makeSlice(appendSliceWriter, 0, s.length);
+ _r = r.WriteString((buf.$ptr || (buf.$ptr = new ptrType$4(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, buf))), s); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _r;
+ $s = -1; return ($bytesToString(buf[0]));
+ /* */ } return; } var $f = {$blk: genericReplacer.ptr.prototype.Replace, $c: true, $r, _r, buf, r, s, $s};return $f;
+ };
+ genericReplacer.prototype.Replace = function(s) { return this.$val.Replace(s); };
+ genericReplacer.ptr.prototype.WriteString = function(w, s) {
+ var {_r, _r$1, _r$2, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, err, i, index, keylen, last, match, n, prevMatchEmpty, r, s, sw, val, w, wn, x, x$1, x$2, $s, $r, $c} = $restore(this, {w, s});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ n = 0;
+ err = $ifaceNil;
+ r = this;
+ sw = getStringWriter(w);
+ _tmp = 0;
+ _tmp$1 = 0;
+ last = _tmp;
+ wn = _tmp$1;
+ prevMatchEmpty = false;
+ i = 0;
+ /* while (true) { */ case 1:
+ /* if (!(i <= s.length)) { break; } */ if(!(i <= s.length)) { $s = 2; continue; }
+ if (!((i === s.length)) && (r.root.priority === 0)) {
+ index = (((x = r.mapping, x$1 = s.charCodeAt(i), ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1])) >> 0));
+ if ((index === r.tableSize) || (x$2 = r.root.table, ((index < 0 || index >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + index])) === ptrType$3.nil) {
+ i = i + (1) >> 0;
+ /* continue; */ $s = 1; continue;
+ }
+ }
+ _tuple = r.lookup($substring(s, i), prevMatchEmpty);
+ val = _tuple[0];
+ keylen = _tuple[1];
+ match = _tuple[2];
+ prevMatchEmpty = match && (keylen === 0);
+ /* */ if (match) { $s = 3; continue; }
+ /* */ $s = 4; continue;
+ /* if (match) { */ case 3:
+ _r = sw.WriteString($substring(s, last, i)); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple$1 = _r;
+ wn = _tuple$1[0];
+ err = _tuple$1[1];
+ n = n + (wn) >> 0;
+ if (!($interfaceIsEqual(err, $ifaceNil))) {
+ $s = -1; return [n, err];
+ }
+ _r$1 = sw.WriteString(val); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _tuple$2 = _r$1;
+ wn = _tuple$2[0];
+ err = _tuple$2[1];
+ n = n + (wn) >> 0;
+ if (!($interfaceIsEqual(err, $ifaceNil))) {
+ $s = -1; return [n, err];
+ }
+ i = i + (keylen) >> 0;
+ last = i;
+ /* continue; */ $s = 1; continue;
+ /* } */ case 4:
+ i = i + (1) >> 0;
+ $s = 1; continue;
+ case 2:
+ /* */ if (!((last === s.length))) { $s = 7; continue; }
+ /* */ $s = 8; continue;
+ /* if (!((last === s.length))) { */ case 7:
+ _r$2 = sw.WriteString($substring(s, last)); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ _tuple$3 = _r$2;
+ wn = _tuple$3[0];
+ err = _tuple$3[1];
+ n = n + (wn) >> 0;
+ /* } */ case 8:
+ $s = -1; return [n, err];
+ /* */ } return; } var $f = {$blk: genericReplacer.ptr.prototype.WriteString, $c: true, $r, _r, _r$1, _r$2, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, err, i, index, keylen, last, match, n, prevMatchEmpty, r, s, sw, val, w, wn, x, x$1, x$2, $s};return $f;
+ };
+ genericReplacer.prototype.WriteString = function(w, s) { return this.$val.WriteString(w, s); };
+ makeSingleStringReplacer = function(pattern, value) {
+ var pattern, value;
+ return new singleStringReplacer.ptr(makeStringFinder(pattern), value);
+ };
+ singleStringReplacer.ptr.prototype.Replace = function(s) {
+ var _tmp, _tmp$1, buf, i, match, matched, r, s;
+ r = this;
+ buf = new Builder.ptr(ptrType$1.nil, sliceType$2.nil);
+ _tmp = 0;
+ _tmp$1 = false;
+ i = _tmp;
+ matched = _tmp$1;
+ while (true) {
+ match = r.finder.next($substring(s, i));
+ if (match === -1) {
+ break;
+ }
+ matched = true;
+ buf.Grow(match + r.value.length >> 0);
+ buf.WriteString($substring(s, i, (i + match >> 0)));
+ buf.WriteString(r.value);
+ i = i + ((match + r.finder.pattern.length >> 0)) >> 0;
+ }
+ if (!matched) {
+ return s;
+ }
+ buf.WriteString($substring(s, i));
+ return buf.String();
+ };
+ singleStringReplacer.prototype.Replace = function(s) { return this.$val.Replace(s); };
+ singleStringReplacer.ptr.prototype.WriteString = function(w, s) {
+ var {_r, _r$1, _r$2, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, err, i, match, n, r, s, sw, w, wn, $s, $r, $c} = $restore(this, {w, s});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ n = 0;
+ err = $ifaceNil;
+ r = this;
+ sw = getStringWriter(w);
+ _tmp = 0;
+ _tmp$1 = 0;
+ i = _tmp;
+ wn = _tmp$1;
+ /* while (true) { */ case 1:
+ match = r.finder.next($substring(s, i));
+ if (match === -1) {
+ /* break; */ $s = 2; continue;
+ }
+ _r = sw.WriteString($substring(s, i, (i + match >> 0))); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ wn = _tuple[0];
+ err = _tuple[1];
+ n = n + (wn) >> 0;
+ if (!($interfaceIsEqual(err, $ifaceNil))) {
+ $s = -1; return [n, err];
+ }
+ _r$1 = sw.WriteString(r.value); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _tuple$1 = _r$1;
+ wn = _tuple$1[0];
+ err = _tuple$1[1];
+ n = n + (wn) >> 0;
+ if (!($interfaceIsEqual(err, $ifaceNil))) {
+ $s = -1; return [n, err];
+ }
+ i = i + ((match + r.finder.pattern.length >> 0)) >> 0;
+ $s = 1; continue;
+ case 2:
+ _r$2 = sw.WriteString($substring(s, i)); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ _tuple$2 = _r$2;
+ wn = _tuple$2[0];
+ err = _tuple$2[1];
+ n = n + (wn) >> 0;
+ $s = -1; return [n, err];
+ /* */ } return; } var $f = {$blk: singleStringReplacer.ptr.prototype.WriteString, $c: true, $r, _r, _r$1, _r$2, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, err, i, match, n, r, s, sw, w, wn, $s};return $f;
+ };
+ singleStringReplacer.prototype.WriteString = function(w, s) { return this.$val.WriteString(w, s); };
+ byteReplacer.prototype.Replace = function(s) {
+ var b, buf, i, r, s, x, x$1;
+ r = this.$val;
+ buf = sliceType$2.nil;
+ i = 0;
+ while (true) {
+ if (!(i < s.length)) { break; }
+ b = s.charCodeAt(i);
+ if (!(((x = r, ((b < 0 || b >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[b])) === b))) {
+ if (buf === sliceType$2.nil) {
+ buf = (new sliceType$2($stringToBytes(s)));
+ }
+ ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = (x$1 = r, ((b < 0 || b >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[b])));
+ }
+ i = i + (1) >> 0;
+ }
+ if (buf === sliceType$2.nil) {
+ return s;
+ }
+ return ($bytesToString(buf));
+ };
+ $ptrType(byteReplacer).prototype.Replace = function(s) { return (new byteReplacer(this.$get())).Replace(s); };
+ byteReplacer.prototype.WriteString = function(w, s) {
+ var {_i, _r, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, buf, bufsize, err, err$1, i, n, ncopy, r, s, w, wn, x, $s, $r, $c} = $restore(this, {w, s});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ n = 0;
+ err = $ifaceNil;
+ r = this.$val;
+ bufsize = 32768;
+ if (s.length < bufsize) {
+ bufsize = s.length;
+ }
+ buf = $makeSlice(sliceType$2, bufsize);
+ /* while (true) { */ case 1:
+ /* if (!(s.length > 0)) { break; } */ if(!(s.length > 0)) { $s = 2; continue; }
+ ncopy = $copyString(buf, s);
+ s = $substring(s, ncopy);
+ _ref = $subslice(buf, 0, ncopy);
+ _i = 0;
+ while (true) {
+ if (!(_i < _ref.$length)) { break; }
+ i = _i;
+ b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]);
+ ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = (x = r, ((b < 0 || b >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[b])));
+ _i++;
+ }
+ _r = w.Write($subslice(buf, 0, ncopy)); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ wn = _tuple[0];
+ err$1 = _tuple[1];
+ n = n + (wn) >> 0;
+ if (!($interfaceIsEqual(err$1, $ifaceNil))) {
+ _tmp = n;
+ _tmp$1 = err$1;
+ n = _tmp;
+ err = _tmp$1;
+ $s = -1; return [n, err];
+ }
+ $s = 1; continue;
+ case 2:
+ _tmp$2 = n;
+ _tmp$3 = $ifaceNil;
+ n = _tmp$2;
+ err = _tmp$3;
+ $s = -1; return [n, err];
+ /* */ } return; } var $f = {$blk: byteReplacer.prototype.WriteString, $c: true, $r, _i, _r, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, buf, bufsize, err, err$1, i, n, ncopy, r, s, w, wn, x, $s};return $f;
+ };
+ $ptrType(byteReplacer).prototype.WriteString = function(w, s) { return (new byteReplacer(this.$get())).WriteString(w, s); };
+ byteStringReplacer.ptr.prototype.Replace = function(s) {
+ var _i, _ref, anyChanges, b, b$1, buf, c, i, i$1, j, newSize, r, s, x, x$1, x$2, x$3, x$4, x$5, x$6;
+ r = this;
+ newSize = s.length;
+ anyChanges = false;
+ if (($imul(r.toReplace.$length, 8)) <= s.length) {
+ _ref = r.toReplace;
+ _i = 0;
+ while (true) {
+ if (!(_i < _ref.$length)) { break; }
+ x = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]);
+ c = Count(s, x);
+ if (!((c === 0))) {
+ newSize = newSize + (($imul(c, (((x$1 = r.replacements, x$2 = x.charCodeAt(0), ((x$2 < 0 || x$2 >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[x$2])).$length - 1 >> 0))))) >> 0;
+ anyChanges = true;
+ }
+ _i++;
+ }
+ } else {
+ i = 0;
+ while (true) {
+ if (!(i < s.length)) { break; }
+ b = s.charCodeAt(i);
+ if (!((x$3 = r.replacements, ((b < 0 || b >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[b])) === sliceType$2.nil)) {
+ newSize = newSize + (((x$4 = r.replacements, ((b < 0 || b >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[b])).$length - 1 >> 0)) >> 0;
+ anyChanges = true;
+ }
+ i = i + (1) >> 0;
+ }
+ }
+ if (!anyChanges) {
+ return s;
+ }
+ buf = $makeSlice(sliceType$2, newSize);
+ j = 0;
+ i$1 = 0;
+ while (true) {
+ if (!(i$1 < s.length)) { break; }
+ b$1 = s.charCodeAt(i$1);
+ if (!((x$5 = r.replacements, ((b$1 < 0 || b$1 >= x$5.length) ? ($throwRuntimeError("index out of range"), undefined) : x$5[b$1])) === sliceType$2.nil)) {
+ j = j + ($copySlice($subslice(buf, j), (x$6 = r.replacements, ((b$1 < 0 || b$1 >= x$6.length) ? ($throwRuntimeError("index out of range"), undefined) : x$6[b$1])))) >> 0;
+ } else {
+ ((j < 0 || j >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + j] = b$1);
+ j = j + (1) >> 0;
+ }
+ i$1 = i$1 + (1) >> 0;
+ }
+ return ($bytesToString(buf));
+ };
+ byteStringReplacer.prototype.Replace = function(s) { return this.$val.Replace(s); };
+ byteStringReplacer.ptr.prototype.WriteString = function(w, s) {
+ var {_r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, _tuple$2, b, err, err$1, err$2, i, last, n, nw, nw$1, nw$2, r, s, sw, w, x, x$1, $s, $r, $c} = $restore(this, {w, s});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ n = 0;
+ err = $ifaceNil;
+ r = this;
+ sw = getStringWriter(w);
+ last = 0;
+ i = 0;
+ /* while (true) { */ case 1:
+ /* if (!(i < s.length)) { break; } */ if(!(i < s.length)) { $s = 2; continue; }
+ b = s.charCodeAt(i);
+ if ((x = r.replacements, ((b < 0 || b >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[b])) === sliceType$2.nil) {
+ i = i + (1) >> 0;
+ /* continue; */ $s = 1; continue;
+ }
+ /* */ if (!((last === i))) { $s = 3; continue; }
+ /* */ $s = 4; continue;
+ /* if (!((last === i))) { */ case 3:
+ _r = sw.WriteString($substring(s, last, i)); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ nw = _tuple[0];
+ err$1 = _tuple[1];
+ n = n + (nw) >> 0;
+ if (!($interfaceIsEqual(err$1, $ifaceNil))) {
+ _tmp = n;
+ _tmp$1 = err$1;
+ n = _tmp;
+ err = _tmp$1;
+ $s = -1; return [n, err];
+ }
+ /* } */ case 4:
+ last = i + 1 >> 0;
+ _r$1 = w.Write((x$1 = r.replacements, ((b < 0 || b >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[b]))); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _tuple$1 = _r$1;
+ nw$1 = _tuple$1[0];
+ err$2 = _tuple$1[1];
+ n = n + (nw$1) >> 0;
+ if (!($interfaceIsEqual(err$2, $ifaceNil))) {
+ _tmp$2 = n;
+ _tmp$3 = err$2;
+ n = _tmp$2;
+ err = _tmp$3;
+ $s = -1; return [n, err];
+ }
+ i = i + (1) >> 0;
+ $s = 1; continue;
+ case 2:
+ /* */ if (!((last === s.length))) { $s = 7; continue; }
+ /* */ $s = 8; continue;
+ /* if (!((last === s.length))) { */ case 7:
+ nw$2 = 0;
+ _r$2 = sw.WriteString($substring(s, last)); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ _tuple$2 = _r$2;
+ nw$2 = _tuple$2[0];
+ err = _tuple$2[1];
+ n = n + (nw$2) >> 0;
+ /* } */ case 8:
+ $s = -1; return [n, err];
+ /* */ } return; } var $f = {$blk: byteStringReplacer.ptr.prototype.WriteString, $c: true, $r, _r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, _tuple$2, b, err, err$1, err$2, i, last, n, nw, nw$1, nw$2, r, s, sw, w, x, x$1, $s};return $f;
+ };
+ byteStringReplacer.prototype.WriteString = function(w, s) { return this.$val.WriteString(w, s); };
+ Reader.ptr.prototype.Len = function() {
+ var r, x, x$1, x$2, x$3, x$4;
+ r = this;
+ if ((x = r.i, x$1 = (new $Int64(0, r.s.length)), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low >= x$1.$low)))) {
+ return 0;
+ }
+ return (((x$2 = (x$3 = (new $Int64(0, r.s.length)), x$4 = r.i, new $Int64(x$3.$high - x$4.$high, x$3.$low - x$4.$low)), x$2.$low + ((x$2.$high >> 31) * 4294967296)) >> 0));
+ };
+ Reader.prototype.Len = function() { return this.$val.Len(); };
+ Reader.ptr.prototype.Size = function() {
+ var r;
+ r = this;
+ return (new $Int64(0, r.s.length));
+ };
+ Reader.prototype.Size = function() { return this.$val.Size(); };
+ Reader.ptr.prototype.Read = function(b) {
+ var _tmp, _tmp$1, b, err, n, r, x, x$1, x$2, x$3;
+ n = 0;
+ err = $ifaceNil;
+ r = this;
+ if ((x = r.i, x$1 = (new $Int64(0, r.s.length)), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low >= x$1.$low)))) {
+ _tmp = 0;
+ _tmp$1 = io.EOF;
+ n = _tmp;
+ err = _tmp$1;
+ return [n, err];
+ }
+ r.prevRune = -1;
+ n = $copyString(b, $substring(r.s, $flatten64(r.i)));
+ r.i = (x$2 = r.i, x$3 = (new $Int64(0, n)), new $Int64(x$2.$high + x$3.$high, x$2.$low + x$3.$low));
+ return [n, err];
+ };
+ Reader.prototype.Read = function(b) { return this.$val.Read(b); };
+ Reader.ptr.prototype.ReadAt = function(b, off) {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, b, err, n, off, r, x;
+ n = 0;
+ err = $ifaceNil;
+ r = this;
+ if ((off.$high < 0 || (off.$high === 0 && off.$low < 0))) {
+ _tmp = 0;
+ _tmp$1 = errors.New("strings.Reader.ReadAt: negative offset");
+ n = _tmp;
+ err = _tmp$1;
+ return [n, err];
+ }
+ if ((x = (new $Int64(0, r.s.length)), (off.$high > x.$high || (off.$high === x.$high && off.$low >= x.$low)))) {
+ _tmp$2 = 0;
+ _tmp$3 = io.EOF;
+ n = _tmp$2;
+ err = _tmp$3;
+ return [n, err];
+ }
+ n = $copyString(b, $substring(r.s, $flatten64(off)));
+ if (n < b.$length) {
+ err = io.EOF;
+ }
+ return [n, err];
+ };
+ Reader.prototype.ReadAt = function(b, off) { return this.$val.ReadAt(b, off); };
+ Reader.ptr.prototype.ReadByte = function() {
+ var b, r, x, x$1, x$2, x$3;
+ r = this;
+ r.prevRune = -1;
+ if ((x = r.i, x$1 = (new $Int64(0, r.s.length)), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low >= x$1.$low)))) {
+ return [0, io.EOF];
+ }
+ b = r.s.charCodeAt($flatten64(r.i));
+ r.i = (x$2 = r.i, x$3 = new $Int64(0, 1), new $Int64(x$2.$high + x$3.$high, x$2.$low + x$3.$low));
+ return [b, $ifaceNil];
+ };
+ Reader.prototype.ReadByte = function() { return this.$val.ReadByte(); };
+ Reader.ptr.prototype.UnreadByte = function() {
+ var r, x, x$1, x$2;
+ r = this;
+ if ((x = r.i, (x.$high < 0 || (x.$high === 0 && x.$low <= 0)))) {
+ return errors.New("strings.Reader.UnreadByte: at beginning of string");
+ }
+ r.prevRune = -1;
+ r.i = (x$1 = r.i, x$2 = new $Int64(0, 1), new $Int64(x$1.$high - x$2.$high, x$1.$low - x$2.$low));
+ return $ifaceNil;
+ };
+ Reader.prototype.UnreadByte = function() { return this.$val.UnreadByte(); };
+ Reader.ptr.prototype.ReadRune = function() {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, c, ch, err, r, size, x, x$1, x$2, x$3, x$4, x$5, x$6;
+ ch = 0;
+ size = 0;
+ err = $ifaceNil;
+ r = this;
+ if ((x = r.i, x$1 = (new $Int64(0, r.s.length)), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low >= x$1.$low)))) {
+ r.prevRune = -1;
+ _tmp = 0;
+ _tmp$1 = 0;
+ _tmp$2 = io.EOF;
+ ch = _tmp;
+ size = _tmp$1;
+ err = _tmp$2;
+ return [ch, size, err];
+ }
+ r.prevRune = (((x$2 = r.i, x$2.$low + ((x$2.$high >> 31) * 4294967296)) >> 0));
+ c = r.s.charCodeAt($flatten64(r.i));
+ if (c < 128) {
+ r.i = (x$3 = r.i, x$4 = new $Int64(0, 1), new $Int64(x$3.$high + x$4.$high, x$3.$low + x$4.$low));
+ _tmp$3 = ((c >> 0));
+ _tmp$4 = 1;
+ _tmp$5 = $ifaceNil;
+ ch = _tmp$3;
+ size = _tmp$4;
+ err = _tmp$5;
+ return [ch, size, err];
+ }
+ _tuple = utf8.DecodeRuneInString($substring(r.s, $flatten64(r.i)));
+ ch = _tuple[0];
+ size = _tuple[1];
+ r.i = (x$5 = r.i, x$6 = (new $Int64(0, size)), new $Int64(x$5.$high + x$6.$high, x$5.$low + x$6.$low));
+ return [ch, size, err];
+ };
+ Reader.prototype.ReadRune = function() { return this.$val.ReadRune(); };
+ Reader.ptr.prototype.UnreadRune = function() {
+ var r, x;
+ r = this;
+ if ((x = r.i, (x.$high < 0 || (x.$high === 0 && x.$low <= 0)))) {
+ return errors.New("strings.Reader.UnreadRune: at beginning of string");
+ }
+ if (r.prevRune < 0) {
+ return errors.New("strings.Reader.UnreadRune: previous operation was not ReadRune");
+ }
+ r.i = (new $Int64(0, r.prevRune));
+ r.prevRune = -1;
+ return $ifaceNil;
+ };
+ Reader.prototype.UnreadRune = function() { return this.$val.UnreadRune(); };
+ Reader.ptr.prototype.Seek = function(offset, whence) {
+ var _1, abs, offset, r, whence, x, x$1;
+ r = this;
+ r.prevRune = -1;
+ abs = new $Int64(0, 0);
+ _1 = whence;
+ if (_1 === (0)) {
+ abs = offset;
+ } else if (_1 === (1)) {
+ abs = (x = r.i, new $Int64(x.$high + offset.$high, x.$low + offset.$low));
+ } else if (_1 === (2)) {
+ abs = (x$1 = (new $Int64(0, r.s.length)), new $Int64(x$1.$high + offset.$high, x$1.$low + offset.$low));
+ } else {
+ return [new $Int64(0, 0), errors.New("strings.Reader.Seek: invalid whence")];
+ }
+ if ((abs.$high < 0 || (abs.$high === 0 && abs.$low < 0))) {
+ return [new $Int64(0, 0), errors.New("strings.Reader.Seek: negative position")];
+ }
+ r.i = abs;
+ return [abs, $ifaceNil];
+ };
+ Reader.prototype.Seek = function(offset, whence) { return this.$val.Seek(offset, whence); };
+ Reader.ptr.prototype.WriteTo = function(w) {
+ var {_r, _tmp, _tmp$1, _tuple, err, m, n, r, s, w, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {w});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ n = new $Int64(0, 0);
+ err = $ifaceNil;
+ r = this;
+ r.prevRune = -1;
+ if ((x = r.i, x$1 = (new $Int64(0, r.s.length)), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low >= x$1.$low)))) {
+ _tmp = new $Int64(0, 0);
+ _tmp$1 = $ifaceNil;
+ n = _tmp;
+ err = _tmp$1;
+ $s = -1; return [n, err];
+ }
+ s = $substring(r.s, $flatten64(r.i));
+ _r = io.WriteString(w, s); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ m = _tuple[0];
+ err = _tuple[1];
+ if (m > s.length) {
+ $panic(new $String("strings.Reader.WriteTo: invalid WriteString count"));
+ }
+ r.i = (x$2 = r.i, x$3 = (new $Int64(0, m)), new $Int64(x$2.$high + x$3.$high, x$2.$low + x$3.$low));
+ n = (new $Int64(0, m));
+ if (!((m === s.length)) && $interfaceIsEqual(err, $ifaceNil)) {
+ err = io.ErrShortWrite;
+ }
+ $s = -1; return [n, err];
+ /* */ } return; } var $f = {$blk: Reader.ptr.prototype.WriteTo, $c: true, $r, _r, _tmp, _tmp$1, _tuple, err, m, n, r, s, w, x, x$1, x$2, x$3, $s};return $f;
+ };
+ Reader.prototype.WriteTo = function(w) { return this.$val.WriteTo(w); };
+ Reader.ptr.prototype.Reset = function(s) {
+ var r, s;
+ r = this;
+ Reader.copy(r, new Reader.ptr(s, new $Int64(0, 0), -1));
+ };
+ Reader.prototype.Reset = function(s) { return this.$val.Reset(s); };
+ NewReader = function(s) {
+ var s;
+ return new Reader.ptr(s, new $Int64(0, 0), -1);
+ };
+ $pkg.NewReader = NewReader;
+ Builder.ptr.prototype.Len = function() {
+ var b;
+ b = this;
+ return b.buf.$length;
+ };
+ Builder.prototype.Len = function() { return this.$val.Len(); };
+ Builder.ptr.prototype.Cap = function() {
+ var b;
+ b = this;
+ return b.buf.$capacity;
+ };
+ Builder.prototype.Cap = function() { return this.$val.Cap(); };
+ Builder.ptr.prototype.Reset = function() {
+ var b;
+ b = this;
+ b.addr = ptrType$1.nil;
+ b.buf = sliceType$2.nil;
+ };
+ Builder.prototype.Reset = function() { return this.$val.Reset(); };
+ Builder.ptr.prototype.grow = function(n) {
+ var b, buf, n;
+ b = this;
+ buf = $makeSlice(sliceType$2, b.buf.$length, (($imul(2, b.buf.$capacity)) + n >> 0));
+ $copySlice(buf, b.buf);
+ b.buf = buf;
+ };
+ Builder.prototype.grow = function(n) { return this.$val.grow(n); };
+ Builder.ptr.prototype.Grow = function(n) {
+ var b, n;
+ b = this;
+ b.copyCheck();
+ if (n < 0) {
+ $panic(new $String("strings.Builder.Grow: negative count"));
+ }
+ if ((b.buf.$capacity - b.buf.$length >> 0) < n) {
+ b.grow(n);
+ }
+ };
+ Builder.prototype.Grow = function(n) { return this.$val.Grow(n); };
+ Builder.ptr.prototype.Write = function(p) {
+ var b, p;
+ b = this;
+ b.copyCheck();
+ b.buf = $appendSlice(b.buf, p);
+ return [p.$length, $ifaceNil];
+ };
+ Builder.prototype.Write = function(p) { return this.$val.Write(p); };
+ Builder.ptr.prototype.WriteByte = function(c) {
+ var b, c;
+ b = this;
+ b.copyCheck();
+ b.buf = $append(b.buf, c);
+ return $ifaceNil;
+ };
+ Builder.prototype.WriteByte = function(c) { return this.$val.WriteByte(c); };
+ Builder.ptr.prototype.WriteRune = function(r) {
+ var b, l, n, r;
+ b = this;
+ b.copyCheck();
+ if (((r >>> 0)) < 128) {
+ b.buf = $append(b.buf, ((r << 24 >>> 24)));
+ return [1, $ifaceNil];
+ }
+ l = b.buf.$length;
+ if ((b.buf.$capacity - l >> 0) < 4) {
+ b.grow(4);
+ }
+ n = utf8.EncodeRune($subslice(b.buf, l, (l + 4 >> 0)), r);
+ b.buf = $subslice(b.buf, 0, (l + n >> 0));
+ return [n, $ifaceNil];
+ };
+ Builder.prototype.WriteRune = function(r) { return this.$val.WriteRune(r); };
+ Builder.ptr.prototype.WriteString = function(s) {
+ var b, s;
+ b = this;
+ b.copyCheck();
+ b.buf = $appendSlice(b.buf, s);
+ return [s.length, $ifaceNil];
+ };
+ Builder.prototype.WriteString = function(s) { return this.$val.WriteString(s); };
+ IndexByte = function(s, c) {
+ var c, s;
+ return $parseInt(s.indexOf($global.String.fromCharCode(c))) >> 0;
+ };
+ $pkg.IndexByte = IndexByte;
+ Index = function(s, sep) {
+ var s, sep;
+ return $parseInt(s.indexOf(sep)) >> 0;
+ };
+ $pkg.Index = Index;
+ LastIndex = function(s, sep) {
+ var s, sep;
+ return $parseInt(s.lastIndexOf(sep)) >> 0;
+ };
+ $pkg.LastIndex = LastIndex;
+ Count = function(s, sep) {
+ var n, pos, s, sep;
+ n = 0;
+ if ((sep.length === 0)) {
+ return utf8.RuneCountInString(s) + 1 >> 0;
+ } else if (sep.length > s.length) {
+ return 0;
+ } else if ((sep.length === s.length)) {
+ if (sep === s) {
+ return 1;
+ }
+ return 0;
+ }
+ while (true) {
+ pos = Index(s, sep);
+ if (pos === -1) {
+ break;
+ }
+ n = n + (1) >> 0;
+ s = $substring(s, (pos + sep.length >> 0));
+ }
+ return n;
+ };
+ $pkg.Count = Count;
+ Builder.ptr.prototype.String = function() {
+ var b;
+ b = this;
+ return ($bytesToString(b.buf));
+ };
+ Builder.prototype.String = function() { return this.$val.String(); };
+ Builder.ptr.prototype.copyCheck = function() {
+ var b;
+ b = this;
+ if (b.addr === ptrType$1.nil) {
+ b.addr = b;
+ } else if (!(b.addr === b)) {
+ $panic(new $String("strings: illegal use of non-zero Builder copied by value"));
+ }
+ };
+ Builder.prototype.copyCheck = function() { return this.$val.copyCheck(); };
+ ptrType.methods = [{prop: "contains", name: "contains", pkg: "strings", typ: $funcType([$Uint8], [$Bool], false)}];
+ ptrType$5.methods = [{prop: "next", name: "next", pkg: "strings", typ: $funcType([$String], [$Int], false)}];
+ ptrType$6.methods = [{prop: "buildOnce", name: "buildOnce", pkg: "strings", typ: $funcType([], [], false)}, {prop: "build", name: "build", pkg: "strings", typ: $funcType([], [replacer], false)}, {prop: "Replace", name: "Replace", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([io.Writer, $String], [$Int, $error], false)}];
+ ptrType$3.methods = [{prop: "add", name: "add", pkg: "strings", typ: $funcType([$String, $String, $Int, ptrType$7], [], false)}];
+ ptrType$7.methods = [{prop: "lookup", name: "lookup", pkg: "strings", typ: $funcType([$String, $Bool], [$String, $Int, $Bool], false)}, {prop: "Replace", name: "Replace", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([io.Writer, $String], [$Int, $error], false)}];
+ ptrType$4.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$2], [$Int, $error], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}];
+ stringWriter.methods = [{prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}];
+ ptrType$8.methods = [{prop: "Replace", name: "Replace", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([io.Writer, $String], [$Int, $error], false)}];
+ ptrType$2.methods = [{prop: "Replace", name: "Replace", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([io.Writer, $String], [$Int, $error], false)}];
+ ptrType$9.methods = [{prop: "Replace", name: "Replace", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([io.Writer, $String], [$Int, $error], false)}];
+ ptrType$10.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$2], [$Int, $error], false)}, {prop: "ReadAt", name: "ReadAt", pkg: "", typ: $funcType([sliceType$2, $Int64], [$Int, $error], false)}, {prop: "ReadByte", name: "ReadByte", pkg: "", typ: $funcType([], [$Uint8, $error], false)}, {prop: "UnreadByte", name: "UnreadByte", pkg: "", typ: $funcType([], [$error], false)}, {prop: "ReadRune", name: "ReadRune", pkg: "", typ: $funcType([], [$Int32, $Int, $error], false)}, {prop: "UnreadRune", name: "UnreadRune", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Seek", name: "Seek", pkg: "", typ: $funcType([$Int64, $Int], [$Int64, $error], false)}, {prop: "WriteTo", name: "WriteTo", pkg: "", typ: $funcType([io.Writer], [$Int64, $error], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([$String], [], false)}];
+ ptrType$1.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Cap", name: "Cap", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "grow", name: "grow", pkg: "strings", typ: $funcType([$Int], [], false)}, {prop: "Grow", name: "Grow", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$2], [$Int, $error], false)}, {prop: "WriteByte", name: "WriteByte", pkg: "", typ: $funcType([$Uint8], [$error], false)}, {prop: "WriteRune", name: "WriteRune", pkg: "", typ: $funcType([$Int32], [$Int, $error], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "copyCheck", name: "copyCheck", pkg: "strings", typ: $funcType([], [], false)}];
+ asciiSet.init($Uint32, 8);
+ stringFinder.init("strings", [{prop: "pattern", name: "pattern", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "badCharSkip", name: "badCharSkip", embedded: false, exported: false, typ: arrayType$1, tag: ""}, {prop: "goodSuffixSkip", name: "goodSuffixSkip", embedded: false, exported: false, typ: sliceType$3, tag: ""}]);
+ Replacer.init("strings", [{prop: "once", name: "once", embedded: false, exported: false, typ: sync.Once, tag: ""}, {prop: "r", name: "r", embedded: false, exported: false, typ: replacer, tag: ""}, {prop: "oldnew", name: "oldnew", embedded: false, exported: false, typ: sliceType, tag: ""}]);
+ replacer.init([{prop: "Replace", name: "Replace", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([io.Writer, $String], [$Int, $error], false)}]);
+ trieNode.init("strings", [{prop: "value", name: "value", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "priority", name: "priority", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "prefix", name: "prefix", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "next", name: "next", embedded: false, exported: false, typ: ptrType$3, tag: ""}, {prop: "table", name: "table", embedded: false, exported: false, typ: sliceType$4, tag: ""}]);
+ genericReplacer.init("strings", [{prop: "root", name: "root", embedded: false, exported: false, typ: trieNode, tag: ""}, {prop: "tableSize", name: "tableSize", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "mapping", name: "mapping", embedded: false, exported: false, typ: arrayType$2, tag: ""}]);
+ appendSliceWriter.init($Uint8);
+ stringWriter.init("strings", [{prop: "w", name: "w", embedded: false, exported: false, typ: io.Writer, tag: ""}]);
+ singleStringReplacer.init("strings", [{prop: "finder", name: "finder", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "value", name: "value", embedded: false, exported: false, typ: $String, tag: ""}]);
+ byteReplacer.init($Uint8, 256);
+ byteStringReplacer.init("strings", [{prop: "replacements", name: "replacements", embedded: false, exported: false, typ: arrayType$3, tag: ""}, {prop: "toReplace", name: "toReplace", embedded: false, exported: false, typ: sliceType, tag: ""}]);
+ Reader.init("strings", [{prop: "s", name: "s", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "i", name: "i", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "prevRune", name: "prevRune", embedded: false, exported: false, typ: $Int, tag: ""}]);
+ Builder.init("strings", [{prop: "addr", name: "addr", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType$2, tag: ""}]);
+ span.init("strings", [{prop: "start", name: "start", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "end", name: "end", embedded: false, exported: false, typ: $Int, 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 = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = js.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = bytealg.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = io.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = sync.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = unicode.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = utf8.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ asciiSpace = $toNativeArray($kindUint8, [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
+ /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
+ };
+ $pkg.$init = $init;
+ return $pkg;
+})();
+$packages["bufio"] = (function() {
+ var $pkg = {}, $init, bytes, errors, io, strings, utf8, Scanner, SplitFunc, Reader, Writer, ReadWriter, sliceType, ptrType, sliceType$1, ptrType$1, ptrType$2, ptrType$3, errNegativeRead, errNegativeWrite, NewScanner, dropCR, ScanLines, NewReaderSize, NewReader, NewWriterSize, NewWriter, NewReadWriter;
+ bytes = $packages["bytes"];
+ errors = $packages["errors"];
+ io = $packages["io"];
+ strings = $packages["strings"];
+ utf8 = $packages["unicode/utf8"];
+ Scanner = $pkg.Scanner = $newType(0, $kindStruct, "bufio.Scanner", true, "bufio", true, function(r_, split_, maxTokenSize_, token_, buf_, start_, end_, err_, empties_, scanCalled_, done_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.r = $ifaceNil;
+ this.split = $throwNilPointerError;
+ this.maxTokenSize = 0;
+ this.token = sliceType.nil;
+ this.buf = sliceType.nil;
+ this.start = 0;
+ this.end = 0;
+ this.err = $ifaceNil;
+ this.empties = 0;
+ this.scanCalled = false;
+ this.done = false;
+ return;
+ }
+ this.r = r_;
+ this.split = split_;
+ this.maxTokenSize = maxTokenSize_;
+ this.token = token_;
+ this.buf = buf_;
+ this.start = start_;
+ this.end = end_;
+ this.err = err_;
+ this.empties = empties_;
+ this.scanCalled = scanCalled_;
+ this.done = done_;
+ });
+ SplitFunc = $pkg.SplitFunc = $newType(4, $kindFunc, "bufio.SplitFunc", true, "bufio", true, null);
+ Reader = $pkg.Reader = $newType(0, $kindStruct, "bufio.Reader", true, "bufio", true, function(buf_, rd_, r_, w_, err_, lastByte_, lastRuneSize_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.buf = sliceType.nil;
+ this.rd = $ifaceNil;
+ this.r = 0;
+ this.w = 0;
+ this.err = $ifaceNil;
+ this.lastByte = 0;
+ this.lastRuneSize = 0;
+ return;
+ }
+ this.buf = buf_;
+ this.rd = rd_;
+ this.r = r_;
+ this.w = w_;
+ this.err = err_;
+ this.lastByte = lastByte_;
+ this.lastRuneSize = lastRuneSize_;
+ });
+ Writer = $pkg.Writer = $newType(0, $kindStruct, "bufio.Writer", true, "bufio", true, function(err_, buf_, n_, wr_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.err = $ifaceNil;
+ this.buf = sliceType.nil;
+ this.n = 0;
+ this.wr = $ifaceNil;
+ return;
+ }
+ this.err = err_;
+ this.buf = buf_;
+ this.n = n_;
+ this.wr = wr_;
+ });
+ ReadWriter = $pkg.ReadWriter = $newType(0, $kindStruct, "bufio.ReadWriter", true, "bufio", true, function(Reader_, Writer_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.Reader = ptrType.nil;
+ this.Writer = ptrType$2.nil;
+ return;
+ }
+ this.Reader = Reader_;
+ this.Writer = Writer_;
+ });
+ sliceType = $sliceType($Uint8);
+ ptrType = $ptrType(Reader);
+ sliceType$1 = $sliceType(sliceType);
+ ptrType$1 = $ptrType(strings.Builder);
+ ptrType$2 = $ptrType(Writer);
+ ptrType$3 = $ptrType(Scanner);
+ NewScanner = function(r) {
+ var r;
+ return new Scanner.ptr(r, ScanLines, 65536, sliceType.nil, sliceType.nil, 0, 0, $ifaceNil, 0, false, false);
+ };
+ $pkg.NewScanner = NewScanner;
+ Scanner.ptr.prototype.Err = function() {
+ var s;
+ s = this;
+ if ($interfaceIsEqual(s.err, io.EOF)) {
+ return $ifaceNil;
+ }
+ return s.err;
+ };
+ Scanner.prototype.Err = function() { return this.$val.Err(); };
+ Scanner.ptr.prototype.Bytes = function() {
+ var s;
+ s = this;
+ return s.token;
+ };
+ Scanner.prototype.Bytes = function() { return this.$val.Bytes(); };
+ Scanner.ptr.prototype.Text = function() {
+ var s;
+ s = this;
+ return ($bytesToString(s.token));
+ };
+ Scanner.prototype.Text = function() { return this.$val.Text(); };
+ Scanner.ptr.prototype.Scan = function() {
+ var {_q, _r, _r$1, _tuple, _tuple$1, advance, err, err$1, loop, n, newBuf, newSize, s, token, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ s = this;
+ if (s.done) {
+ $s = -1; return false;
+ }
+ s.scanCalled = true;
+ /* while (true) { */ case 1:
+ /* */ if (s.end > s.start || !($interfaceIsEqual(s.err, $ifaceNil))) { $s = 3; continue; }
+ /* */ $s = 4; continue;
+ /* if (s.end > s.start || !($interfaceIsEqual(s.err, $ifaceNil))) { */ case 3:
+ _r = s.split($subslice(s.buf, s.start, s.end), !($interfaceIsEqual(s.err, $ifaceNil))); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ advance = _tuple[0];
+ token = _tuple[1];
+ err = _tuple[2];
+ if (!($interfaceIsEqual(err, $ifaceNil))) {
+ if ($interfaceIsEqual(err, $pkg.ErrFinalToken)) {
+ s.token = token;
+ s.done = true;
+ $s = -1; return true;
+ }
+ s.setErr(err);
+ $s = -1; return false;
+ }
+ if (!s.advance(advance)) {
+ $s = -1; return false;
+ }
+ s.token = token;
+ if (!(token === sliceType.nil)) {
+ if ($interfaceIsEqual(s.err, $ifaceNil) || advance > 0) {
+ s.empties = 0;
+ } else {
+ s.empties = s.empties + (1) >> 0;
+ if (s.empties > 100) {
+ $panic(new $String("bufio.Scan: too many empty tokens without progressing"));
+ }
+ }
+ $s = -1; return true;
+ }
+ /* } */ case 4:
+ if (!($interfaceIsEqual(s.err, $ifaceNil))) {
+ s.start = 0;
+ s.end = 0;
+ $s = -1; return false;
+ }
+ if (s.start > 0 && ((s.end === s.buf.$length) || s.start > (_q = s.buf.$length / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")))) {
+ $copySlice(s.buf, $subslice(s.buf, s.start, s.end));
+ s.end = s.end - (s.start) >> 0;
+ s.start = 0;
+ }
+ if (s.end === s.buf.$length) {
+ if (s.buf.$length >= s.maxTokenSize || s.buf.$length > 1073741823) {
+ s.setErr($pkg.ErrTooLong);
+ $s = -1; return false;
+ }
+ newSize = $imul(s.buf.$length, 2);
+ if (newSize === 0) {
+ newSize = 4096;
+ }
+ if (newSize > s.maxTokenSize) {
+ newSize = s.maxTokenSize;
+ }
+ newBuf = $makeSlice(sliceType, newSize);
+ $copySlice(newBuf, $subslice(s.buf, s.start, s.end));
+ s.buf = newBuf;
+ s.end = s.end - (s.start) >> 0;
+ s.start = 0;
+ }
+ loop = 0;
+ /* while (true) { */ case 6:
+ _r$1 = s.r.Read($subslice(s.buf, s.end, s.buf.$length)); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _tuple$1 = _r$1;
+ n = _tuple$1[0];
+ err$1 = _tuple$1[1];
+ if (n < 0 || (s.buf.$length - s.end >> 0) < n) {
+ s.setErr($pkg.ErrBadReadCount);
+ /* break; */ $s = 7; continue;
+ }
+ s.end = s.end + (n) >> 0;
+ if (!($interfaceIsEqual(err$1, $ifaceNil))) {
+ s.setErr(err$1);
+ /* break; */ $s = 7; continue;
+ }
+ if (n > 0) {
+ s.empties = 0;
+ /* break; */ $s = 7; continue;
+ }
+ loop = loop + (1) >> 0;
+ if (loop > 100) {
+ s.setErr(io.ErrNoProgress);
+ /* break; */ $s = 7; continue;
+ }
+ $s = 6; continue;
+ case 7:
+ $s = 1; continue;
+ case 2:
+ $s = -1; return false;
+ /* */ } return; } var $f = {$blk: Scanner.ptr.prototype.Scan, $c: true, $r, _q, _r, _r$1, _tuple, _tuple$1, advance, err, err$1, loop, n, newBuf, newSize, s, token, $s};return $f;
+ };
+ Scanner.prototype.Scan = function() { return this.$val.Scan(); };
+ Scanner.ptr.prototype.advance = function(n) {
+ var n, s;
+ s = this;
+ if (n < 0) {
+ s.setErr($pkg.ErrNegativeAdvance);
+ return false;
+ }
+ if (n > (s.end - s.start >> 0)) {
+ s.setErr($pkg.ErrAdvanceTooFar);
+ return false;
+ }
+ s.start = s.start + (n) >> 0;
+ return true;
+ };
+ Scanner.prototype.advance = function(n) { return this.$val.advance(n); };
+ Scanner.ptr.prototype.setErr = function(err) {
+ var err, s;
+ s = this;
+ if ($interfaceIsEqual(s.err, $ifaceNil) || $interfaceIsEqual(s.err, io.EOF)) {
+ s.err = err;
+ }
+ };
+ Scanner.prototype.setErr = function(err) { return this.$val.setErr(err); };
+ Scanner.ptr.prototype.Buffer = function(buf, max) {
+ var buf, max, s;
+ s = this;
+ if (s.scanCalled) {
+ $panic(new $String("Buffer called after Scan"));
+ }
+ s.buf = $subslice(buf, 0, buf.$capacity);
+ s.maxTokenSize = max;
+ };
+ Scanner.prototype.Buffer = function(buf, max) { return this.$val.Buffer(buf, max); };
+ Scanner.ptr.prototype.Split = function(split) {
+ var s, split;
+ s = this;
+ if (s.scanCalled) {
+ $panic(new $String("Split called after Scan"));
+ }
+ s.split = split;
+ };
+ Scanner.prototype.Split = function(split) { return this.$val.Split(split); };
+ dropCR = function(data) {
+ var data, x;
+ if (data.$length > 0 && ((x = data.$length - 1 >> 0, ((x < 0 || x >= data.$length) ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + x])) === 13)) {
+ return $subslice(data, 0, (data.$length - 1 >> 0));
+ }
+ return data;
+ };
+ ScanLines = function(data, atEOF) {
+ var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, advance, atEOF, data, err, i, token;
+ advance = 0;
+ token = sliceType.nil;
+ err = $ifaceNil;
+ if (atEOF && (data.$length === 0)) {
+ _tmp = 0;
+ _tmp$1 = sliceType.nil;
+ _tmp$2 = $ifaceNil;
+ advance = _tmp;
+ token = _tmp$1;
+ err = _tmp$2;
+ return [advance, token, err];
+ }
+ i = bytes.IndexByte(data, 10);
+ if (i >= 0) {
+ _tmp$3 = i + 1 >> 0;
+ _tmp$4 = dropCR($subslice(data, 0, i));
+ _tmp$5 = $ifaceNil;
+ advance = _tmp$3;
+ token = _tmp$4;
+ err = _tmp$5;
+ return [advance, token, err];
+ }
+ if (atEOF) {
+ _tmp$6 = data.$length;
+ _tmp$7 = dropCR(data);
+ _tmp$8 = $ifaceNil;
+ advance = _tmp$6;
+ token = _tmp$7;
+ err = _tmp$8;
+ return [advance, token, err];
+ }
+ _tmp$9 = 0;
+ _tmp$10 = sliceType.nil;
+ _tmp$11 = $ifaceNil;
+ advance = _tmp$9;
+ token = _tmp$10;
+ err = _tmp$11;
+ return [advance, token, err];
+ };
+ $pkg.ScanLines = ScanLines;
+ NewReaderSize = function(rd, size) {
+ var _tuple, b, ok, r, rd, size;
+ _tuple = $assertType(rd, ptrType, true);
+ b = _tuple[0];
+ ok = _tuple[1];
+ if (ok && b.buf.$length >= size) {
+ return b;
+ }
+ if (size < 16) {
+ size = 16;
+ }
+ r = new Reader.ptr(sliceType.nil, $ifaceNil, 0, 0, $ifaceNil, 0, 0);
+ r.reset($makeSlice(sliceType, size), rd);
+ return r;
+ };
+ $pkg.NewReaderSize = NewReaderSize;
+ NewReader = function(rd) {
+ var rd;
+ return NewReaderSize(rd, 4096);
+ };
+ $pkg.NewReader = NewReader;
+ Reader.ptr.prototype.Size = function() {
+ var b;
+ b = this;
+ return b.buf.$length;
+ };
+ Reader.prototype.Size = function() { return this.$val.Size(); };
+ Reader.ptr.prototype.Reset = function(r) {
+ var b, r;
+ b = this;
+ if (b.buf === sliceType.nil) {
+ b.buf = $makeSlice(sliceType, 4096);
+ }
+ b.reset(b.buf, r);
+ };
+ Reader.prototype.Reset = function(r) { return this.$val.Reset(r); };
+ Reader.ptr.prototype.reset = function(buf, r) {
+ var b, buf, r;
+ b = this;
+ Reader.copy(b, new Reader.ptr(buf, r, 0, 0, $ifaceNil, -1, -1));
+ };
+ Reader.prototype.reset = function(buf, r) { return this.$val.reset(buf, r); };
+ Reader.ptr.prototype.fill = function() {
+ var {_r, _tuple, b, err, i, n, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ b = this;
+ if (b.r > 0) {
+ $copySlice(b.buf, $subslice(b.buf, b.r, b.w));
+ b.w = b.w - (b.r) >> 0;
+ b.r = 0;
+ }
+ if (b.w >= b.buf.$length) {
+ $panic(new $String("bufio: tried to fill full buffer"));
+ }
+ i = 100;
+ /* while (true) { */ case 1:
+ /* if (!(i > 0)) { break; } */ if(!(i > 0)) { $s = 2; continue; }
+ _r = b.rd.Read($subslice(b.buf, b.w)); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ n = _tuple[0];
+ err = _tuple[1];
+ if (n < 0) {
+ $panic(errNegativeRead);
+ }
+ b.w = b.w + (n) >> 0;
+ if (!($interfaceIsEqual(err, $ifaceNil))) {
+ b.err = err;
+ $s = -1; return;
+ }
+ if (n > 0) {
+ $s = -1; return;
+ }
+ i = i - (1) >> 0;
+ $s = 1; continue;
+ case 2:
+ b.err = io.ErrNoProgress;
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: Reader.ptr.prototype.fill, $c: true, $r, _r, _tuple, b, err, i, n, $s};return $f;
+ };
+ Reader.prototype.fill = function() { return this.$val.fill(); };
+ Reader.ptr.prototype.readErr = function() {
+ var b, err;
+ b = this;
+ err = b.err;
+ b.err = $ifaceNil;
+ return err;
+ };
+ Reader.prototype.readErr = function() { return this.$val.readErr(); };
+ Reader.ptr.prototype.Peek = function(n) {
+ var {avail, b, err, n, $s, $r, $c} = $restore(this, {n});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ b = this;
+ if (n < 0) {
+ $s = -1; return [sliceType.nil, $pkg.ErrNegativeCount];
+ }
+ b.lastByte = -1;
+ b.lastRuneSize = -1;
+ /* while (true) { */ case 1:
+ /* if (!((b.w - b.r >> 0) < n && (b.w - b.r >> 0) < b.buf.$length && $interfaceIsEqual(b.err, $ifaceNil))) { break; } */ if(!((b.w - b.r >> 0) < n && (b.w - b.r >> 0) < b.buf.$length && $interfaceIsEqual(b.err, $ifaceNil))) { $s = 2; continue; }
+ $r = b.fill(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $s = 1; continue;
+ case 2:
+ if (n > b.buf.$length) {
+ $s = -1; return [$subslice(b.buf, b.r, b.w), $pkg.ErrBufferFull];
+ }
+ err = $ifaceNil;
+ avail = b.w - b.r >> 0;
+ if (avail < n) {
+ n = avail;
+ err = b.readErr();
+ if ($interfaceIsEqual(err, $ifaceNil)) {
+ err = $pkg.ErrBufferFull;
+ }
+ }
+ $s = -1; return [$subslice(b.buf, b.r, (b.r + n >> 0)), err];
+ /* */ } return; } var $f = {$blk: Reader.ptr.prototype.Peek, $c: true, $r, avail, b, err, n, $s};return $f;
+ };
+ Reader.prototype.Peek = function(n) { return this.$val.Peek(n); };
+ Reader.ptr.prototype.Discard = function(n) {
+ var {_tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, b, discarded, err, n, remain, skip, $s, $r, $c} = $restore(this, {n});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ discarded = 0;
+ err = $ifaceNil;
+ b = this;
+ if (n < 0) {
+ _tmp = 0;
+ _tmp$1 = $pkg.ErrNegativeCount;
+ discarded = _tmp;
+ err = _tmp$1;
+ $s = -1; return [discarded, err];
+ }
+ if (n === 0) {
+ $s = -1; return [discarded, err];
+ }
+ b.lastByte = -1;
+ b.lastRuneSize = -1;
+ remain = n;
+ /* while (true) { */ case 1:
+ skip = b.Buffered();
+ /* */ if (skip === 0) { $s = 3; continue; }
+ /* */ $s = 4; continue;
+ /* if (skip === 0) { */ case 3:
+ $r = b.fill(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ skip = b.Buffered();
+ /* } */ case 4:
+ if (skip > remain) {
+ skip = remain;
+ }
+ b.r = b.r + (skip) >> 0;
+ remain = remain - (skip) >> 0;
+ if (remain === 0) {
+ _tmp$2 = n;
+ _tmp$3 = $ifaceNil;
+ discarded = _tmp$2;
+ err = _tmp$3;
+ $s = -1; return [discarded, err];
+ }
+ if (!($interfaceIsEqual(b.err, $ifaceNil))) {
+ _tmp$4 = n - remain >> 0;
+ _tmp$5 = b.readErr();
+ discarded = _tmp$4;
+ err = _tmp$5;
+ $s = -1; return [discarded, err];
+ }
+ $s = 1; continue;
+ case 2:
+ $s = -1; return [discarded, err];
+ /* */ } return; } var $f = {$blk: Reader.ptr.prototype.Discard, $c: true, $r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, b, discarded, err, n, remain, skip, $s};return $f;
+ };
+ Reader.prototype.Discard = function(n) { return this.$val.Discard(n); };
+ Reader.ptr.prototype.Read = function(p) {
+ var {_r, _r$1, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, b, err, n, p, x, x$1, x$2, $s, $r, $c} = $restore(this, {p});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ n = 0;
+ err = $ifaceNil;
+ b = this;
+ n = p.$length;
+ if (n === 0) {
+ if (b.Buffered() > 0) {
+ _tmp = 0;
+ _tmp$1 = $ifaceNil;
+ n = _tmp;
+ err = _tmp$1;
+ $s = -1; return [n, err];
+ }
+ _tmp$2 = 0;
+ _tmp$3 = b.readErr();
+ n = _tmp$2;
+ err = _tmp$3;
+ $s = -1; return [n, err];
+ }
+ /* */ if (b.r === b.w) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (b.r === b.w) { */ case 1:
+ if (!($interfaceIsEqual(b.err, $ifaceNil))) {
+ _tmp$4 = 0;
+ _tmp$5 = b.readErr();
+ n = _tmp$4;
+ err = _tmp$5;
+ $s = -1; return [n, err];
+ }
+ /* */ if (p.$length >= b.buf.$length) { $s = 3; continue; }
+ /* */ $s = 4; continue;
+ /* if (p.$length >= b.buf.$length) { */ case 3:
+ _r = b.rd.Read(p); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ n = _tuple[0];
+ b.err = _tuple[1];
+ if (n < 0) {
+ $panic(errNegativeRead);
+ }
+ if (n > 0) {
+ b.lastByte = (((x = n - 1 >> 0, ((x < 0 || x >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x])) >> 0));
+ b.lastRuneSize = -1;
+ }
+ _tmp$6 = n;
+ _tmp$7 = b.readErr();
+ n = _tmp$6;
+ err = _tmp$7;
+ $s = -1; return [n, err];
+ /* } */ case 4:
+ b.r = 0;
+ b.w = 0;
+ _r$1 = b.rd.Read(b.buf); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _tuple$1 = _r$1;
+ n = _tuple$1[0];
+ b.err = _tuple$1[1];
+ if (n < 0) {
+ $panic(errNegativeRead);
+ }
+ if (n === 0) {
+ _tmp$8 = 0;
+ _tmp$9 = b.readErr();
+ n = _tmp$8;
+ err = _tmp$9;
+ $s = -1; return [n, err];
+ }
+ b.w = b.w + (n) >> 0;
+ /* } */ case 2:
+ n = $copySlice(p, $subslice(b.buf, b.r, b.w));
+ b.r = b.r + (n) >> 0;
+ b.lastByte = (((x$1 = b.buf, x$2 = b.r - 1 >> 0, ((x$2 < 0 || x$2 >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + x$2])) >> 0));
+ b.lastRuneSize = -1;
+ _tmp$10 = n;
+ _tmp$11 = $ifaceNil;
+ n = _tmp$10;
+ err = _tmp$11;
+ $s = -1; return [n, err];
+ /* */ } return; } var $f = {$blk: Reader.ptr.prototype.Read, $c: true, $r, _r, _r$1, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, b, err, n, p, x, x$1, x$2, $s};return $f;
+ };
+ Reader.prototype.Read = function(p) { return this.$val.Read(p); };
+ Reader.ptr.prototype.ReadByte = function() {
+ var {b, c, x, x$1, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ b = this;
+ b.lastRuneSize = -1;
+ /* while (true) { */ case 1:
+ /* if (!(b.r === b.w)) { break; } */ if(!(b.r === b.w)) { $s = 2; continue; }
+ if (!($interfaceIsEqual(b.err, $ifaceNil))) {
+ $s = -1; return [0, b.readErr()];
+ }
+ $r = b.fill(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $s = 1; continue;
+ case 2:
+ c = (x = b.buf, x$1 = b.r, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1]));
+ b.r = b.r + (1) >> 0;
+ b.lastByte = ((c >> 0));
+ $s = -1; return [c, $ifaceNil];
+ /* */ } return; } var $f = {$blk: Reader.ptr.prototype.ReadByte, $c: true, $r, b, c, x, x$1, $s};return $f;
+ };
+ Reader.prototype.ReadByte = function() { return this.$val.ReadByte(); };
+ Reader.ptr.prototype.UnreadByte = function() {
+ var b, x, x$1;
+ b = this;
+ if (b.lastByte < 0 || (b.r === 0) && b.w > 0) {
+ return $pkg.ErrInvalidUnreadByte;
+ }
+ if (b.r > 0) {
+ b.r = b.r - (1) >> 0;
+ } else {
+ b.w = 1;
+ }
+ (x = b.buf, x$1 = b.r, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1] = ((b.lastByte << 24 >>> 24))));
+ b.lastByte = -1;
+ b.lastRuneSize = -1;
+ return $ifaceNil;
+ };
+ Reader.prototype.UnreadByte = function() { return this.$val.UnreadByte(); };
+ Reader.ptr.prototype.ReadRune = function() {
+ var {_tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, b, err, r, size, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ r = 0;
+ size = 0;
+ err = $ifaceNil;
+ b = this;
+ /* while (true) { */ case 1:
+ /* if (!((b.r + 4 >> 0) > b.w && !utf8.FullRune($subslice(b.buf, b.r, b.w)) && $interfaceIsEqual(b.err, $ifaceNil) && (b.w - b.r >> 0) < b.buf.$length)) { break; } */ if(!((b.r + 4 >> 0) > b.w && !utf8.FullRune($subslice(b.buf, b.r, b.w)) && $interfaceIsEqual(b.err, $ifaceNil) && (b.w - b.r >> 0) < b.buf.$length)) { $s = 2; continue; }
+ $r = b.fill(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $s = 1; continue;
+ case 2:
+ b.lastRuneSize = -1;
+ if (b.r === b.w) {
+ _tmp = 0;
+ _tmp$1 = 0;
+ _tmp$2 = b.readErr();
+ r = _tmp;
+ size = _tmp$1;
+ err = _tmp$2;
+ $s = -1; return [r, size, err];
+ }
+ _tmp$3 = (((x = b.buf, x$1 = b.r, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1])) >> 0));
+ _tmp$4 = 1;
+ r = _tmp$3;
+ size = _tmp$4;
+ if (r >= 128) {
+ _tuple = utf8.DecodeRune($subslice(b.buf, b.r, b.w));
+ r = _tuple[0];
+ size = _tuple[1];
+ }
+ b.r = b.r + (size) >> 0;
+ b.lastByte = (((x$2 = b.buf, x$3 = b.r - 1 >> 0, ((x$3 < 0 || x$3 >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + x$3])) >> 0));
+ b.lastRuneSize = size;
+ _tmp$5 = r;
+ _tmp$6 = size;
+ _tmp$7 = $ifaceNil;
+ r = _tmp$5;
+ size = _tmp$6;
+ err = _tmp$7;
+ $s = -1; return [r, size, err];
+ /* */ } return; } var $f = {$blk: Reader.ptr.prototype.ReadRune, $c: true, $r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, b, err, r, size, x, x$1, x$2, x$3, $s};return $f;
+ };
+ Reader.prototype.ReadRune = function() { return this.$val.ReadRune(); };
+ Reader.ptr.prototype.UnreadRune = function() {
+ var b;
+ b = this;
+ if (b.lastRuneSize < 0 || b.r < b.lastRuneSize) {
+ return $pkg.ErrInvalidUnreadRune;
+ }
+ b.r = b.r - (b.lastRuneSize) >> 0;
+ b.lastByte = -1;
+ b.lastRuneSize = -1;
+ return $ifaceNil;
+ };
+ Reader.prototype.UnreadRune = function() { return this.$val.UnreadRune(); };
+ Reader.ptr.prototype.Buffered = function() {
+ var b;
+ b = this;
+ return b.w - b.r >> 0;
+ };
+ Reader.prototype.Buffered = function() { return this.$val.Buffered(); };
+ Reader.ptr.prototype.ReadSlice = function(delim) {
+ var {b, delim, err, i, i$1, line, s, $s, $r, $c} = $restore(this, {delim});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ line = sliceType.nil;
+ err = $ifaceNil;
+ b = this;
+ s = 0;
+ /* while (true) { */ case 1:
+ i = bytes.IndexByte($subslice(b.buf, (b.r + s >> 0), b.w), delim);
+ if (i >= 0) {
+ i = i + (s) >> 0;
+ line = $subslice(b.buf, b.r, ((b.r + i >> 0) + 1 >> 0));
+ b.r = b.r + ((i + 1 >> 0)) >> 0;
+ /* break; */ $s = 2; continue;
+ }
+ if (!($interfaceIsEqual(b.err, $ifaceNil))) {
+ line = $subslice(b.buf, b.r, b.w);
+ b.r = b.w;
+ err = b.readErr();
+ /* break; */ $s = 2; continue;
+ }
+ if (b.Buffered() >= b.buf.$length) {
+ b.r = b.w;
+ line = b.buf;
+ err = $pkg.ErrBufferFull;
+ /* break; */ $s = 2; continue;
+ }
+ s = b.w - b.r >> 0;
+ $r = b.fill(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $s = 1; continue;
+ case 2:
+ i$1 = line.$length - 1 >> 0;
+ if (i$1 >= 0) {
+ b.lastByte = ((((i$1 < 0 || i$1 >= line.$length) ? ($throwRuntimeError("index out of range"), undefined) : line.$array[line.$offset + i$1]) >> 0));
+ b.lastRuneSize = -1;
+ }
+ $s = -1; return [line, err];
+ /* */ } return; } var $f = {$blk: Reader.ptr.prototype.ReadSlice, $c: true, $r, b, delim, err, i, i$1, line, s, $s};return $f;
+ };
+ Reader.prototype.ReadSlice = function(delim) { return this.$val.ReadSlice(delim); };
+ Reader.ptr.prototype.ReadLine = function() {
+ var {_r, _tmp, _tmp$1, _tmp$2, _tuple, b, drop, err, isPrefix, line, x, x$1, x$2, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ line = sliceType.nil;
+ isPrefix = false;
+ err = $ifaceNil;
+ b = this;
+ _r = b.ReadSlice(10); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ line = _tuple[0];
+ err = _tuple[1];
+ if ($interfaceIsEqual(err, $pkg.ErrBufferFull)) {
+ if (line.$length > 0 && ((x = line.$length - 1 >> 0, ((x < 0 || x >= line.$length) ? ($throwRuntimeError("index out of range"), undefined) : line.$array[line.$offset + x])) === 13)) {
+ if (b.r === 0) {
+ $panic(new $String("bufio: tried to rewind past start of buffer"));
+ }
+ b.r = b.r - (1) >> 0;
+ line = $subslice(line, 0, (line.$length - 1 >> 0));
+ }
+ _tmp = line;
+ _tmp$1 = true;
+ _tmp$2 = $ifaceNil;
+ line = _tmp;
+ isPrefix = _tmp$1;
+ err = _tmp$2;
+ $s = -1; return [line, isPrefix, err];
+ }
+ if (line.$length === 0) {
+ if (!($interfaceIsEqual(err, $ifaceNil))) {
+ line = sliceType.nil;
+ }
+ $s = -1; return [line, isPrefix, err];
+ }
+ err = $ifaceNil;
+ if ((x$1 = line.$length - 1 >> 0, ((x$1 < 0 || x$1 >= line.$length) ? ($throwRuntimeError("index out of range"), undefined) : line.$array[line.$offset + x$1])) === 10) {
+ drop = 1;
+ if (line.$length > 1 && ((x$2 = line.$length - 2 >> 0, ((x$2 < 0 || x$2 >= line.$length) ? ($throwRuntimeError("index out of range"), undefined) : line.$array[line.$offset + x$2])) === 13)) {
+ drop = 2;
+ }
+ line = $subslice(line, 0, (line.$length - drop >> 0));
+ }
+ $s = -1; return [line, isPrefix, err];
+ /* */ } return; } var $f = {$blk: Reader.ptr.prototype.ReadLine, $c: true, $r, _r, _tmp, _tmp$1, _tmp$2, _tuple, b, drop, err, isPrefix, line, x, x$1, x$2, $s};return $f;
+ };
+ Reader.prototype.ReadLine = function() { return this.$val.ReadLine(); };
+ Reader.ptr.prototype.collectFragments = function(delim) {
+ var {_r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, buf, delim, e, err, finalFragment, frag, fullBuffers, totalLen, $s, $r, $c} = $restore(this, {delim});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ fullBuffers = sliceType$1.nil;
+ finalFragment = sliceType.nil;
+ totalLen = 0;
+ err = $ifaceNil;
+ b = this;
+ frag = sliceType.nil;
+ /* while (true) { */ case 1:
+ e = $ifaceNil;
+ _r = b.ReadSlice(delim); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ frag = _tuple[0];
+ e = _tuple[1];
+ if ($interfaceIsEqual(e, $ifaceNil)) {
+ /* break; */ $s = 2; continue;
+ }
+ if (!($interfaceIsEqual(e, $pkg.ErrBufferFull))) {
+ err = e;
+ /* break; */ $s = 2; continue;
+ }
+ buf = $makeSlice(sliceType, frag.$length);
+ $copySlice(buf, frag);
+ fullBuffers = $append(fullBuffers, buf);
+ totalLen = totalLen + (buf.$length) >> 0;
+ $s = 1; continue;
+ case 2:
+ totalLen = totalLen + (frag.$length) >> 0;
+ _tmp = fullBuffers;
+ _tmp$1 = frag;
+ _tmp$2 = totalLen;
+ _tmp$3 = err;
+ fullBuffers = _tmp;
+ finalFragment = _tmp$1;
+ totalLen = _tmp$2;
+ err = _tmp$3;
+ $s = -1; return [fullBuffers, finalFragment, totalLen, err];
+ /* */ } return; } var $f = {$blk: Reader.ptr.prototype.collectFragments, $c: true, $r, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, buf, delim, e, err, finalFragment, frag, fullBuffers, totalLen, $s};return $f;
+ };
+ Reader.prototype.collectFragments = function(delim) { return this.$val.collectFragments(delim); };
+ Reader.ptr.prototype.ReadBytes = function(delim) {
+ var {_i, _r, _ref, _tuple, b, buf, delim, err, frag, full, i, n, $s, $r, $c} = $restore(this, {delim});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ b = this;
+ _r = b.collectFragments(delim); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ full = _tuple[0];
+ frag = _tuple[1];
+ n = _tuple[2];
+ err = _tuple[3];
+ buf = $makeSlice(sliceType, n);
+ n = 0;
+ _ref = full;
+ _i = 0;
+ while (true) {
+ if (!(_i < _ref.$length)) { break; }
+ i = _i;
+ n = n + ($copySlice($subslice(buf, n), ((i < 0 || i >= full.$length) ? ($throwRuntimeError("index out of range"), undefined) : full.$array[full.$offset + i]))) >> 0;
+ _i++;
+ }
+ $copySlice($subslice(buf, n), frag);
+ $s = -1; return [buf, err];
+ /* */ } return; } var $f = {$blk: Reader.ptr.prototype.ReadBytes, $c: true, $r, _i, _r, _ref, _tuple, b, buf, delim, err, frag, full, i, n, $s};return $f;
+ };
+ Reader.prototype.ReadBytes = function(delim) { return this.$val.ReadBytes(delim); };
+ Reader.ptr.prototype.ReadString = function(delim) {
+ var {_i, _r, _ref, _tuple, b, buf, delim, err, fb, frag, full, n, $s, $r, $c} = $restore(this, {delim});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ b = this;
+ _r = b.collectFragments(delim); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ full = _tuple[0];
+ frag = _tuple[1];
+ n = _tuple[2];
+ err = _tuple[3];
+ buf = new strings.Builder.ptr(ptrType$1.nil, sliceType.nil);
+ buf.Grow(n);
+ _ref = full;
+ _i = 0;
+ while (true) {
+ if (!(_i < _ref.$length)) { break; }
+ fb = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]);
+ buf.Write(fb);
+ _i++;
+ }
+ buf.Write(frag);
+ $s = -1; return [buf.String(), err];
+ /* */ } return; } var $f = {$blk: Reader.ptr.prototype.ReadString, $c: true, $r, _i, _r, _ref, _tuple, b, buf, delim, err, fb, frag, full, n, $s};return $f;
+ };
+ Reader.prototype.ReadString = function(delim) { return this.$val.ReadString(delim); };
+ Reader.ptr.prototype.WriteTo = function(w) {
+ var {_r, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, b, err, err$1, err$2, err$3, m, m$1, m$2, n, ok, ok$1, r, w, w$1, x, x$1, x$2, $s, $r, $c} = $restore(this, {w});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ n = new $Int64(0, 0);
+ err = $ifaceNil;
+ b = this;
+ b.lastByte = -1;
+ b.lastRuneSize = -1;
+ _r = b.writeBuf(w); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ n = _tuple[0];
+ err = _tuple[1];
+ if (!($interfaceIsEqual(err, $ifaceNil))) {
+ $s = -1; return [n, err];
+ }
+ _tuple$1 = $assertType(b.rd, io.WriterTo, true);
+ r = _tuple$1[0];
+ ok = _tuple$1[1];
+ /* */ if (ok) { $s = 2; continue; }
+ /* */ $s = 3; continue;
+ /* if (ok) { */ case 2:
+ _r$1 = r.WriteTo(w); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _tuple$2 = _r$1;
+ m = _tuple$2[0];
+ err$1 = _tuple$2[1];
+ n = (x = m, new $Int64(n.$high + x.$high, n.$low + x.$low));
+ _tmp = n;
+ _tmp$1 = err$1;
+ n = _tmp;
+ err = _tmp$1;
+ $s = -1; return [n, err];
+ /* } */ case 3:
+ _tuple$3 = $assertType(w, io.ReaderFrom, true);
+ w$1 = _tuple$3[0];
+ ok$1 = _tuple$3[1];
+ /* */ if (ok$1) { $s = 5; continue; }
+ /* */ $s = 6; continue;
+ /* if (ok$1) { */ case 5:
+ _r$2 = w$1.ReadFrom(b.rd); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ _tuple$4 = _r$2;
+ m$1 = _tuple$4[0];
+ err$2 = _tuple$4[1];
+ n = (x$1 = m$1, new $Int64(n.$high + x$1.$high, n.$low + x$1.$low));
+ _tmp$2 = n;
+ _tmp$3 = err$2;
+ n = _tmp$2;
+ err = _tmp$3;
+ $s = -1; return [n, err];
+ /* } */ case 6:
+ /* */ if ((b.w - b.r >> 0) < b.buf.$length) { $s = 8; continue; }
+ /* */ $s = 9; continue;
+ /* if ((b.w - b.r >> 0) < b.buf.$length) { */ case 8:
+ $r = b.fill(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ /* } */ case 9:
+ /* while (true) { */ case 11:
+ /* if (!(b.r < b.w)) { break; } */ if(!(b.r < b.w)) { $s = 12; continue; }
+ _r$3 = b.writeBuf(w); /* */ $s = 13; case 13: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
+ _tuple$5 = _r$3;
+ m$2 = _tuple$5[0];
+ err$3 = _tuple$5[1];
+ n = (x$2 = m$2, new $Int64(n.$high + x$2.$high, n.$low + x$2.$low));
+ if (!($interfaceIsEqual(err$3, $ifaceNil))) {
+ _tmp$4 = n;
+ _tmp$5 = err$3;
+ n = _tmp$4;
+ err = _tmp$5;
+ $s = -1; return [n, err];
+ }
+ $r = b.fill(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $s = 11; continue;
+ case 12:
+ if ($interfaceIsEqual(b.err, io.EOF)) {
+ b.err = $ifaceNil;
+ }
+ _tmp$6 = n;
+ _tmp$7 = b.readErr();
+ n = _tmp$6;
+ err = _tmp$7;
+ $s = -1; return [n, err];
+ /* */ } return; } var $f = {$blk: Reader.ptr.prototype.WriteTo, $c: true, $r, _r, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, b, err, err$1, err$2, err$3, m, m$1, m$2, n, ok, ok$1, r, w, w$1, x, x$1, x$2, $s};return $f;
+ };
+ Reader.prototype.WriteTo = function(w) { return this.$val.WriteTo(w); };
+ Reader.ptr.prototype.writeBuf = function(w) {
+ var {_r, _tuple, b, err, n, w, $s, $r, $c} = $restore(this, {w});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ b = this;
+ _r = w.Write($subslice(b.buf, b.r, b.w)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ n = _tuple[0];
+ err = _tuple[1];
+ if (n < 0) {
+ $panic(errNegativeWrite);
+ }
+ b.r = b.r + (n) >> 0;
+ $s = -1; return [(new $Int64(0, n)), err];
+ /* */ } return; } var $f = {$blk: Reader.ptr.prototype.writeBuf, $c: true, $r, _r, _tuple, b, err, n, w, $s};return $f;
+ };
+ Reader.prototype.writeBuf = function(w) { return this.$val.writeBuf(w); };
+ NewWriterSize = function(w, size) {
+ var _tuple, b, ok, size, w;
+ _tuple = $assertType(w, ptrType$2, true);
+ b = _tuple[0];
+ ok = _tuple[1];
+ if (ok && b.buf.$length >= size) {
+ return b;
+ }
+ if (size <= 0) {
+ size = 4096;
+ }
+ return new Writer.ptr($ifaceNil, $makeSlice(sliceType, size), 0, w);
+ };
+ $pkg.NewWriterSize = NewWriterSize;
+ NewWriter = function(w) {
+ var w;
+ return NewWriterSize(w, 4096);
+ };
+ $pkg.NewWriter = NewWriter;
+ Writer.ptr.prototype.Size = function() {
+ var b;
+ b = this;
+ return b.buf.$length;
+ };
+ Writer.prototype.Size = function() { return this.$val.Size(); };
+ Writer.ptr.prototype.Reset = function(w) {
+ var b, w;
+ b = this;
+ if (b.buf === sliceType.nil) {
+ b.buf = $makeSlice(sliceType, 4096);
+ }
+ b.err = $ifaceNil;
+ b.n = 0;
+ b.wr = w;
+ };
+ Writer.prototype.Reset = function(w) { return this.$val.Reset(w); };
+ Writer.ptr.prototype.Flush = function() {
+ var {_r, _tuple, b, err, n, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ b = this;
+ if (!($interfaceIsEqual(b.err, $ifaceNil))) {
+ $s = -1; return b.err;
+ }
+ if (b.n === 0) {
+ $s = -1; return $ifaceNil;
+ }
+ _r = b.wr.Write($subslice(b.buf, 0, b.n)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ n = _tuple[0];
+ err = _tuple[1];
+ if (n < b.n && $interfaceIsEqual(err, $ifaceNil)) {
+ err = io.ErrShortWrite;
+ }
+ if (!($interfaceIsEqual(err, $ifaceNil))) {
+ if (n > 0 && n < b.n) {
+ $copySlice($subslice(b.buf, 0, (b.n - n >> 0)), $subslice(b.buf, n, b.n));
+ }
+ b.n = b.n - (n) >> 0;
+ b.err = err;
+ $s = -1; return err;
+ }
+ b.n = 0;
+ $s = -1; return $ifaceNil;
+ /* */ } return; } var $f = {$blk: Writer.ptr.prototype.Flush, $c: true, $r, _r, _tuple, b, err, n, $s};return $f;
+ };
+ Writer.prototype.Flush = function() { return this.$val.Flush(); };
+ Writer.ptr.prototype.Available = function() {
+ var b;
+ b = this;
+ return b.buf.$length - b.n >> 0;
+ };
+ Writer.prototype.Available = function() { return this.$val.Available(); };
+ Writer.ptr.prototype.AvailableBuffer = function() {
+ var b;
+ b = this;
+ return $subslice($subslice(b.buf, b.n), 0, 0);
+ };
+ Writer.prototype.AvailableBuffer = function() { return this.$val.AvailableBuffer(); };
+ Writer.ptr.prototype.Buffered = function() {
+ var b;
+ b = this;
+ return b.n;
+ };
+ Writer.prototype.Buffered = function() { return this.$val.Buffered(); };
+ Writer.ptr.prototype.Write = function(p) {
+ var {_r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, err, n, n$1, nn, p, $s, $r, $c} = $restore(this, {p});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ nn = 0;
+ err = $ifaceNil;
+ b = this;
+ /* while (true) { */ case 1:
+ /* if (!(p.$length > b.Available() && $interfaceIsEqual(b.err, $ifaceNil))) { break; } */ if(!(p.$length > b.Available() && $interfaceIsEqual(b.err, $ifaceNil))) { $s = 2; continue; }
+ n = 0;
+ /* */ if (b.Buffered() === 0) { $s = 3; continue; }
+ /* */ $s = 4; continue;
+ /* if (b.Buffered() === 0) { */ case 3:
+ _r = b.wr.Write(p); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ n = _tuple[0];
+ b.err = _tuple[1];
+ $s = 5; continue;
+ /* } else { */ case 4:
+ n = $copySlice($subslice(b.buf, b.n), p);
+ b.n = b.n + (n) >> 0;
+ _r$1 = b.Flush(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _r$1;
+ /* } */ case 5:
+ nn = nn + (n) >> 0;
+ p = $subslice(p, n);
+ $s = 1; continue;
+ case 2:
+ if (!($interfaceIsEqual(b.err, $ifaceNil))) {
+ _tmp = nn;
+ _tmp$1 = b.err;
+ nn = _tmp;
+ err = _tmp$1;
+ $s = -1; return [nn, err];
+ }
+ n$1 = $copySlice($subslice(b.buf, b.n), p);
+ b.n = b.n + (n$1) >> 0;
+ nn = nn + (n$1) >> 0;
+ _tmp$2 = nn;
+ _tmp$3 = $ifaceNil;
+ nn = _tmp$2;
+ err = _tmp$3;
+ $s = -1; return [nn, err];
+ /* */ } return; } var $f = {$blk: Writer.ptr.prototype.Write, $c: true, $r, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, err, n, n$1, nn, p, $s};return $f;
+ };
+ Writer.prototype.Write = function(p) { return this.$val.Write(p); };
+ Writer.ptr.prototype.WriteByte = function(c) {
+ var {_r, _v, b, c, x, x$1, $s, $r, $c} = $restore(this, {c});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ b = this;
+ if (!($interfaceIsEqual(b.err, $ifaceNil))) {
+ $s = -1; return b.err;
+ }
+ if (!(b.Available() <= 0)) { _v = false; $s = 3; continue s; }
+ _r = b.Flush(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _v = !($interfaceIsEqual(_r, $ifaceNil)); case 3:
+ /* */ if (_v) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (_v) { */ case 1:
+ $s = -1; return b.err;
+ /* } */ case 2:
+ (x = b.buf, x$1 = b.n, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1] = c));
+ b.n = b.n + (1) >> 0;
+ $s = -1; return $ifaceNil;
+ /* */ } return; } var $f = {$blk: Writer.ptr.prototype.WriteByte, $c: true, $r, _r, _v, b, c, x, x$1, $s};return $f;
+ };
+ Writer.prototype.WriteByte = function(c) { return this.$val.WriteByte(c); };
+ Writer.ptr.prototype.WriteRune = function(r) {
+ var {$24r, _r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, b, err, n, r, size, $s, $r, $c} = $restore(this, {r});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ size = 0;
+ err = $ifaceNil;
+ b = this;
+ /* */ if (((r >>> 0)) < 128) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (((r >>> 0)) < 128) { */ case 1:
+ _r = b.WriteByte(((r << 24 >>> 24))); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ err = _r;
+ if (!($interfaceIsEqual(err, $ifaceNil))) {
+ _tmp = 0;
+ _tmp$1 = err;
+ size = _tmp;
+ err = _tmp$1;
+ $s = -1; return [size, err];
+ }
+ _tmp$2 = 1;
+ _tmp$3 = $ifaceNil;
+ size = _tmp$2;
+ err = _tmp$3;
+ $s = -1; return [size, err];
+ /* } */ case 2:
+ if (!($interfaceIsEqual(b.err, $ifaceNil))) {
+ _tmp$4 = 0;
+ _tmp$5 = b.err;
+ size = _tmp$4;
+ err = _tmp$5;
+ $s = -1; return [size, err];
+ }
+ n = b.Available();
+ /* */ if (n < 4) { $s = 4; continue; }
+ /* */ $s = 5; continue;
+ /* if (n < 4) { */ case 4:
+ _r$1 = b.Flush(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _r$1;
+ if (!($interfaceIsEqual(b.err, $ifaceNil))) {
+ _tmp$6 = 0;
+ _tmp$7 = b.err;
+ size = _tmp$6;
+ err = _tmp$7;
+ $s = -1; return [size, err];
+ }
+ n = b.Available();
+ /* */ if (n < 4) { $s = 7; continue; }
+ /* */ $s = 8; continue;
+ /* if (n < 4) { */ case 7:
+ _r$2 = b.WriteString(($encodeRune(r))); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ _tuple = _r$2;
+ size = _tuple[0];
+ err = _tuple[1];
+ $24r = [size, err];
+ $s = 10; case 10: return $24r;
+ /* } */ case 8:
+ /* } */ case 5:
+ size = utf8.EncodeRune($subslice(b.buf, b.n), r);
+ b.n = b.n + (size) >> 0;
+ _tmp$8 = size;
+ _tmp$9 = $ifaceNil;
+ size = _tmp$8;
+ err = _tmp$9;
+ $s = -1; return [size, err];
+ /* */ } return; } var $f = {$blk: Writer.ptr.prototype.WriteRune, $c: true, $r, $24r, _r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, b, err, n, r, size, $s};return $f;
+ };
+ Writer.prototype.WriteRune = function(r) { return this.$val.WriteRune(r); };
+ Writer.ptr.prototype.WriteString = function(s) {
+ var {_r, b, n, n$1, nn, s, $s, $r, $c} = $restore(this, {s});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ b = this;
+ nn = 0;
+ /* while (true) { */ case 1:
+ /* if (!(s.length > b.Available() && $interfaceIsEqual(b.err, $ifaceNil))) { break; } */ if(!(s.length > b.Available() && $interfaceIsEqual(b.err, $ifaceNil))) { $s = 2; continue; }
+ n = $copyString($subslice(b.buf, b.n), s);
+ b.n = b.n + (n) >> 0;
+ nn = nn + (n) >> 0;
+ s = $substring(s, n);
+ _r = b.Flush(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _r;
+ $s = 1; continue;
+ case 2:
+ if (!($interfaceIsEqual(b.err, $ifaceNil))) {
+ $s = -1; return [nn, b.err];
+ }
+ n$1 = $copyString($subslice(b.buf, b.n), s);
+ b.n = b.n + (n$1) >> 0;
+ nn = nn + (n$1) >> 0;
+ $s = -1; return [nn, $ifaceNil];
+ /* */ } return; } var $f = {$blk: Writer.ptr.prototype.WriteString, $c: true, $r, _r, b, n, n$1, nn, s, $s};return $f;
+ };
+ Writer.prototype.WriteString = function(s) { return this.$val.WriteString(s); };
+ Writer.ptr.prototype.ReadFrom = function(r) {
+ var {_r, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, err, err$1, err1, m, n, nn, nr, r, readerFrom, readerFromOK, x, x$1, $s, $r, $c} = $restore(this, {r});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ n = new $Int64(0, 0);
+ err = $ifaceNil;
+ b = this;
+ if (!($interfaceIsEqual(b.err, $ifaceNil))) {
+ _tmp = new $Int64(0, 0);
+ _tmp$1 = b.err;
+ n = _tmp;
+ err = _tmp$1;
+ $s = -1; return [n, err];
+ }
+ _tuple = $assertType(b.wr, io.ReaderFrom, true);
+ readerFrom = _tuple[0];
+ readerFromOK = _tuple[1];
+ m = 0;
+ /* while (true) { */ case 1:
+ /* */ if (b.Available() === 0) { $s = 3; continue; }
+ /* */ $s = 4; continue;
+ /* if (b.Available() === 0) { */ case 3:
+ _r = b.Flush(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ err1 = _r;
+ if (!($interfaceIsEqual(err1, $ifaceNil))) {
+ _tmp$2 = n;
+ _tmp$3 = err1;
+ n = _tmp$2;
+ err = _tmp$3;
+ $s = -1; return [n, err];
+ }
+ /* } */ case 4:
+ /* */ if (readerFromOK && (b.Buffered() === 0)) { $s = 6; continue; }
+ /* */ $s = 7; continue;
+ /* if (readerFromOK && (b.Buffered() === 0)) { */ case 6:
+ _r$1 = readerFrom.ReadFrom(r); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _tuple$1 = _r$1;
+ nn = _tuple$1[0];
+ err$1 = _tuple$1[1];
+ b.err = err$1;
+ n = (x = nn, new $Int64(n.$high + x.$high, n.$low + x.$low));
+ _tmp$4 = n;
+ _tmp$5 = err$1;
+ n = _tmp$4;
+ err = _tmp$5;
+ $s = -1; return [n, err];
+ /* } */ case 7:
+ nr = 0;
+ /* while (true) { */ case 9:
+ /* if (!(nr < 100)) { break; } */ if(!(nr < 100)) { $s = 10; continue; }
+ _r$2 = r.Read($subslice(b.buf, b.n)); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ _tuple$2 = _r$2;
+ m = _tuple$2[0];
+ err = _tuple$2[1];
+ if (!((m === 0)) || !($interfaceIsEqual(err, $ifaceNil))) {
+ /* break; */ $s = 10; continue;
+ }
+ nr = nr + (1) >> 0;
+ $s = 9; continue;
+ case 10:
+ if (nr === 100) {
+ _tmp$6 = n;
+ _tmp$7 = io.ErrNoProgress;
+ n = _tmp$6;
+ err = _tmp$7;
+ $s = -1; return [n, err];
+ }
+ b.n = b.n + (m) >> 0;
+ n = (x$1 = (new $Int64(0, m)), new $Int64(n.$high + x$1.$high, n.$low + x$1.$low));
+ if (!($interfaceIsEqual(err, $ifaceNil))) {
+ /* break; */ $s = 2; continue;
+ }
+ $s = 1; continue;
+ case 2:
+ /* */ if ($interfaceIsEqual(err, io.EOF)) { $s = 12; continue; }
+ /* */ $s = 13; continue;
+ /* if ($interfaceIsEqual(err, io.EOF)) { */ case 12:
+ /* */ if (b.Available() === 0) { $s = 14; continue; }
+ /* */ $s = 15; continue;
+ /* if (b.Available() === 0) { */ case 14:
+ _r$3 = b.Flush(); /* */ $s = 17; case 17: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
+ err = _r$3;
+ $s = 16; continue;
+ /* } else { */ case 15:
+ err = $ifaceNil;
+ /* } */ case 16:
+ /* } */ case 13:
+ _tmp$8 = n;
+ _tmp$9 = err;
+ n = _tmp$8;
+ err = _tmp$9;
+ $s = -1; return [n, err];
+ /* */ } return; } var $f = {$blk: Writer.ptr.prototype.ReadFrom, $c: true, $r, _r, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, err, err$1, err1, m, n, nn, nr, r, readerFrom, readerFromOK, x, x$1, $s};return $f;
+ };
+ Writer.prototype.ReadFrom = function(r) { return this.$val.ReadFrom(r); };
+ NewReadWriter = function(r, w) {
+ var r, w;
+ return new ReadWriter.ptr(r, w);
+ };
+ $pkg.NewReadWriter = NewReadWriter;
+ ptrType$3.methods = [{prop: "Err", name: "Err", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Bytes", name: "Bytes", pkg: "", typ: $funcType([], [sliceType], false)}, {prop: "Text", name: "Text", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Scan", name: "Scan", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "advance", name: "advance", pkg: "bufio", typ: $funcType([$Int], [$Bool], false)}, {prop: "setErr", name: "setErr", pkg: "bufio", typ: $funcType([$error], [], false)}, {prop: "Buffer", name: "Buffer", pkg: "", typ: $funcType([sliceType, $Int], [], false)}, {prop: "Split", name: "Split", pkg: "", typ: $funcType([SplitFunc], [], false)}];
+ ptrType.methods = [{prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([io.Reader], [], false)}, {prop: "reset", name: "reset", pkg: "bufio", typ: $funcType([sliceType, io.Reader], [], false)}, {prop: "fill", name: "fill", pkg: "bufio", typ: $funcType([], [], false)}, {prop: "readErr", name: "readErr", pkg: "bufio", typ: $funcType([], [$error], false)}, {prop: "Peek", name: "Peek", pkg: "", typ: $funcType([$Int], [sliceType, $error], false)}, {prop: "Discard", name: "Discard", pkg: "", typ: $funcType([$Int], [$Int, $error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "ReadByte", name: "ReadByte", pkg: "", typ: $funcType([], [$Uint8, $error], false)}, {prop: "UnreadByte", name: "UnreadByte", pkg: "", typ: $funcType([], [$error], false)}, {prop: "ReadRune", name: "ReadRune", pkg: "", typ: $funcType([], [$Int32, $Int, $error], false)}, {prop: "UnreadRune", name: "UnreadRune", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Buffered", name: "Buffered", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "ReadSlice", name: "ReadSlice", pkg: "", typ: $funcType([$Uint8], [sliceType, $error], false)}, {prop: "ReadLine", name: "ReadLine", pkg: "", typ: $funcType([], [sliceType, $Bool, $error], false)}, {prop: "collectFragments", name: "collectFragments", pkg: "bufio", typ: $funcType([$Uint8], [sliceType$1, sliceType, $Int, $error], false)}, {prop: "ReadBytes", name: "ReadBytes", pkg: "", typ: $funcType([$Uint8], [sliceType, $error], false)}, {prop: "ReadString", name: "ReadString", pkg: "", typ: $funcType([$Uint8], [$String, $error], false)}, {prop: "WriteTo", name: "WriteTo", pkg: "", typ: $funcType([io.Writer], [$Int64, $error], false)}, {prop: "writeBuf", name: "writeBuf", pkg: "bufio", typ: $funcType([io.Writer], [$Int64, $error], false)}];
+ ptrType$2.methods = [{prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([io.Writer], [], false)}, {prop: "Flush", name: "Flush", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Available", name: "Available", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "AvailableBuffer", name: "AvailableBuffer", pkg: "", typ: $funcType([], [sliceType], false)}, {prop: "Buffered", name: "Buffered", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "WriteByte", name: "WriteByte", pkg: "", typ: $funcType([$Uint8], [$error], false)}, {prop: "WriteRune", name: "WriteRune", pkg: "", typ: $funcType([$Int32], [$Int, $error], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}, {prop: "ReadFrom", name: "ReadFrom", pkg: "", typ: $funcType([io.Reader], [$Int64, $error], false)}];
+ Scanner.init("bufio", [{prop: "r", name: "r", embedded: false, exported: false, typ: io.Reader, tag: ""}, {prop: "split", name: "split", embedded: false, exported: false, typ: SplitFunc, tag: ""}, {prop: "maxTokenSize", name: "maxTokenSize", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "token", name: "token", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "start", name: "start", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "end", name: "end", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "empties", name: "empties", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "scanCalled", name: "scanCalled", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "done", name: "done", embedded: false, exported: false, typ: $Bool, tag: ""}]);
+ SplitFunc.init([sliceType, $Bool], [$Int, sliceType, $error], false);
+ Reader.init("bufio", [{prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "rd", name: "rd", embedded: false, exported: false, typ: io.Reader, tag: ""}, {prop: "r", name: "r", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "w", name: "w", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "lastByte", name: "lastByte", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "lastRuneSize", name: "lastRuneSize", embedded: false, exported: false, typ: $Int, tag: ""}]);
+ Writer.init("bufio", [{prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "n", name: "n", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "wr", name: "wr", embedded: false, exported: false, typ: io.Writer, tag: ""}]);
+ ReadWriter.init("", [{prop: "Reader", name: "Reader", embedded: true, exported: true, typ: ptrType, tag: ""}, {prop: "Writer", name: "Writer", embedded: true, exported: true, typ: ptrType$2, 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 = bytes.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = errors.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = io.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = strings.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = utf8.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $pkg.ErrTooLong = errors.New("bufio.Scanner: token too long");
+ $pkg.ErrNegativeAdvance = errors.New("bufio.Scanner: SplitFunc returns negative advance count");
+ $pkg.ErrAdvanceTooFar = errors.New("bufio.Scanner: SplitFunc returns advance count beyond input");
+ $pkg.ErrBadReadCount = errors.New("bufio.Scanner: Read returned impossible count");
+ $pkg.ErrFinalToken = errors.New("final token");
+ $pkg.ErrInvalidUnreadByte = errors.New("bufio: invalid use of UnreadByte");
+ $pkg.ErrInvalidUnreadRune = errors.New("bufio: invalid use of UnreadRune");
+ $pkg.ErrBufferFull = errors.New("bufio: buffer full");
+ $pkg.ErrNegativeCount = errors.New("bufio: negative count");
+ errNegativeRead = errors.New("bufio: reader returned negative count from Read");
+ errNegativeWrite = errors.New("bufio: writer returned negative count from Write");
+ /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
+ };
+ $pkg.$init = $init;
+ return $pkg;
+})();
+$packages["internal/abi"] = (function() {
+ var $pkg = {}, $init, goarch, FuncPCABI0;
+ goarch = $packages["internal/goarch"];
+ FuncPCABI0 = function() {
+ $throwRuntimeError("native function not implemented: internal/abi.FuncPCABI0");
+ };
+ $pkg.FuncPCABI0 = FuncPCABI0;
+ $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 = goarch.$init(); /* */ $s = 1; case 1: 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["internal/goexperiment"] = (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/itoa"] = (function() {
+ var $pkg = {}, $init, arrayType, sliceType, Itoa, Uitoa;
+ arrayType = $arrayType($Uint8, 20);
+ sliceType = $sliceType($Uint8);
+ Itoa = function(val) {
+ var val;
+ if (val < 0) {
+ return "-" + Uitoa(((-val >>> 0)));
+ }
+ return Uitoa(((val >>> 0)));
+ };
+ $pkg.Itoa = Itoa;
+ Uitoa = function(val) {
+ var _q, buf, i, q, val;
+ if (val === 0) {
+ return "0";
+ }
+ buf = arrayType.zero();
+ i = 19;
+ while (true) {
+ if (!(val >= 10)) { break; }
+ q = (_q = val / 10, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero"));
+ ((i < 0 || i >= buf.length) ? ($throwRuntimeError("index out of range"), undefined) : buf[i] = ((((48 + val >>> 0) - (q * 10 >>> 0) >>> 0) << 24 >>> 24)));
+ i = i - (1) >> 0;
+ val = q;
+ }
+ ((i < 0 || i >= buf.length) ? ($throwRuntimeError("index out of range"), undefined) : buf[i] = (((48 + val >>> 0) << 24 >>> 24)));
+ return ($bytesToString($subslice(new sliceType(buf), i)));
+ };
+ $pkg.Uitoa = Uitoa;
+ $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/bits"] = (function() {
+ var $pkg = {}, $init, _err, deBruijn32tab, deBruijn64tab, overflowError, divideError, LeadingZeros, LeadingZeros32, LeadingZeros64, TrailingZeros, TrailingZeros32, TrailingZeros64, OnesCount64, RotateLeft32, RotateLeft64, Reverse8, Reverse16, Len, Len32, Len64, Add, Add64, Sub, Sub32, Sub64, Mul, Mul64, Div, Div64, Mul32, Add32, Div32;
+ _err = $pkg._err = $newType(8, $kindString, "bits._err", true, "math/bits", false, null);
+ LeadingZeros = function(x) {
+ var x;
+ return 32 - Len(x) >> 0;
+ };
+ $pkg.LeadingZeros = LeadingZeros;
+ LeadingZeros32 = function(x) {
+ var x;
+ return 32 - Len32(x) >> 0;
+ };
+ $pkg.LeadingZeros32 = LeadingZeros32;
+ LeadingZeros64 = function(x) {
+ var x;
+ return 64 - Len64(x) >> 0;
+ };
+ $pkg.LeadingZeros64 = LeadingZeros64;
+ TrailingZeros = function(x) {
+ var x;
+ if (true) {
+ return TrailingZeros32(((x >>> 0)));
+ }
+ return TrailingZeros64((new $Uint64(0, x)));
+ };
+ $pkg.TrailingZeros = TrailingZeros;
+ TrailingZeros32 = function(x) {
+ var x, x$1;
+ if (x === 0) {
+ return 32;
+ }
+ return (((x$1 = ($imul((((x & (-x >>> 0)) >>> 0)), 125613361) >>> 0) >>> 27 >>> 0, ((x$1 < 0 || x$1 >= deBruijn32tab.length) ? ($throwRuntimeError("index out of range"), undefined) : deBruijn32tab[x$1])) >> 0));
+ };
+ $pkg.TrailingZeros32 = TrailingZeros32;
+ TrailingZeros64 = function(x) {
+ var x, x$1, x$2;
+ if ((x.$high === 0 && x.$low === 0)) {
+ return 64;
+ }
+ return (((x$1 = $shiftRightUint64($mul64(((x$2 = new $Uint64(-x.$high, -x.$low), new $Uint64(x.$high & x$2.$high, (x.$low & x$2.$low) >>> 0))), new $Uint64(66559345, 3033172745)), 58), (($flatten64(x$1) < 0 || $flatten64(x$1) >= deBruijn64tab.length) ? ($throwRuntimeError("index out of range"), undefined) : deBruijn64tab[$flatten64(x$1)])) >> 0));
+ };
+ $pkg.TrailingZeros64 = TrailingZeros64;
+ OnesCount64 = function(x) {
+ var x, x$1, x$10, x$11, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9;
+ x = (x$1 = (x$2 = $shiftRightUint64(x, 1), new $Uint64(x$2.$high & 1431655765, (x$2.$low & 1431655765) >>> 0)), x$3 = new $Uint64(x.$high & 1431655765, (x.$low & 1431655765) >>> 0), new $Uint64(x$1.$high + x$3.$high, x$1.$low + x$3.$low));
+ x = (x$4 = (x$5 = $shiftRightUint64(x, 2), new $Uint64(x$5.$high & 858993459, (x$5.$low & 858993459) >>> 0)), x$6 = new $Uint64(x.$high & 858993459, (x.$low & 858993459) >>> 0), new $Uint64(x$4.$high + x$6.$high, x$4.$low + x$6.$low));
+ x = (x$7 = (x$8 = $shiftRightUint64(x, 4), new $Uint64(x$8.$high + x.$high, x$8.$low + x.$low)), new $Uint64(x$7.$high & 252645135, (x$7.$low & 252645135) >>> 0));
+ x = (x$9 = $shiftRightUint64(x, 8), new $Uint64(x.$high + x$9.$high, x.$low + x$9.$low));
+ x = (x$10 = $shiftRightUint64(x, 16), new $Uint64(x.$high + x$10.$high, x.$low + x$10.$low));
+ x = (x$11 = $shiftRightUint64(x, 32), new $Uint64(x.$high + x$11.$high, x.$low + x$11.$low));
+ return ((x.$low >> 0)) & 127;
+ };
+ $pkg.OnesCount64 = OnesCount64;
+ RotateLeft32 = function(x, k) {
+ var k, s, x, y, y$1;
+ s = (((k >>> 0)) & 31) >>> 0;
+ return (((y = s, y < 32 ? (x << y) : 0) >>> 0) | ((y$1 = ((32 - s >>> 0)), y$1 < 32 ? (x >>> y$1) : 0) >>> 0)) >>> 0;
+ };
+ $pkg.RotateLeft32 = RotateLeft32;
+ RotateLeft64 = function(x, k) {
+ var k, s, x, x$1, x$2;
+ s = (((k >>> 0)) & 63) >>> 0;
+ return (x$1 = $shiftLeft64(x, s), x$2 = $shiftRightUint64(x, ((64 - s >>> 0))), new $Uint64(x$1.$high | x$2.$high, (x$1.$low | x$2.$low) >>> 0));
+ };
+ $pkg.RotateLeft64 = RotateLeft64;
+ Reverse8 = function(x) {
+ var x;
+ return "\x00\x80@\xC0 \xA0`\xE0\x10\x90P\xD00\xB0p\xF0\b\x88H\xC8(\xA8h\xE8\x18\x98X\xD88\xB8x\xF8\x04\x84D\xC4$\xA4d\xE4\x14\x94T\xD44\xB4t\xF4\f\x8CL\xCC,\xACl\xEC\x1C\x9C\\\xDC<\xBC|\xFC\x02\x82B\xC2\"\xA2b\xE2\x12\x92R\xD22\xB2r\xF2\n\x8AJ\xCA*\xAAj\xEA\x1A\x9AZ\xDA:\xBAz\xFA\x06\x86F\xC6&\xA6f\xE6\x16\x96V\xD66\xB6v\xF6\x0E\x8EN\xCE.\xAEn\xEE\x1E\x9E^\xDE>\xBE~\xFE\x01\x81A\xC1!\xA1a\xE1\x11\x91Q\xD11\xB1q\xF1\t\x89I\xC9)\xA9i\xE9\x19\x99Y\xD99\xB9y\xF9\x05\x85E\xC5%\xA5e\xE5\x15\x95U\xD55\xB5u\xF5\r\x8DM\xCD-\xADm\xED\x1D\x9D]\xDD=\xBD}\xFD\x03\x83C\xC3#\xA3c\xE3\x13\x93S\xD33\xB3s\xF3\v\x8BK\xCB+\xABk\xEB\x1B\x9B[\xDB;\xBB{\xFB\x07\x87G\xC7'\xA7g\xE7\x17\x97W\xD77\xB7w\xF7\x0F\x8FO\xCF/\xAFo\xEF\x1F\x9F_\xDF?\xBF\x7F\xFF".charCodeAt(x);
+ };
+ $pkg.Reverse8 = Reverse8;
+ Reverse16 = function(x) {
+ var x;
+ return ((("\x00\x80@\xC0 \xA0`\xE0\x10\x90P\xD00\xB0p\xF0\b\x88H\xC8(\xA8h\xE8\x18\x98X\xD88\xB8x\xF8\x04\x84D\xC4$\xA4d\xE4\x14\x94T\xD44\xB4t\xF4\f\x8CL\xCC,\xACl\xEC\x1C\x9C\\\xDC<\xBC|\xFC\x02\x82B\xC2\"\xA2b\xE2\x12\x92R\xD22\xB2r\xF2\n\x8AJ\xCA*\xAAj\xEA\x1A\x9AZ\xDA:\xBAz\xFA\x06\x86F\xC6&\xA6f\xE6\x16\x96V\xD66\xB6v\xF6\x0E\x8EN\xCE.\xAEn\xEE\x1E\x9E^\xDE>\xBE~\xFE\x01\x81A\xC1!\xA1a\xE1\x11\x91Q\xD11\xB1q\xF1\t\x89I\xC9)\xA9i\xE9\x19\x99Y\xD99\xB9y\xF9\x05\x85E\xC5%\xA5e\xE5\x15\x95U\xD55\xB5u\xF5\r\x8DM\xCD-\xADm\xED\x1D\x9D]\xDD=\xBD}\xFD\x03\x83C\xC3#\xA3c\xE3\x13\x93S\xD33\xB3s\xF3\v\x8BK\xCB+\xABk\xEB\x1B\x9B[\xDB;\xBB{\xFB\x07\x87G\xC7'\xA7g\xE7\x17\x97W\xD77\xB7w\xF7\x0F\x8FO\xCF/\xAFo\xEF\x1F\x9F_\xDF?\xBF\x7F\xFF".charCodeAt((x >>> 8 << 16 >>> 16)) << 16 >>> 16)) | ((("\x00\x80@\xC0 \xA0`\xE0\x10\x90P\xD00\xB0p\xF0\b\x88H\xC8(\xA8h\xE8\x18\x98X\xD88\xB8x\xF8\x04\x84D\xC4$\xA4d\xE4\x14\x94T\xD44\xB4t\xF4\f\x8CL\xCC,\xACl\xEC\x1C\x9C\\\xDC<\xBC|\xFC\x02\x82B\xC2\"\xA2b\xE2\x12\x92R\xD22\xB2r\xF2\n\x8AJ\xCA*\xAAj\xEA\x1A\x9AZ\xDA:\xBAz\xFA\x06\x86F\xC6&\xA6f\xE6\x16\x96V\xD66\xB6v\xF6\x0E\x8EN\xCE.\xAEn\xEE\x1E\x9E^\xDE>\xBE~\xFE\x01\x81A\xC1!\xA1a\xE1\x11\x91Q\xD11\xB1q\xF1\t\x89I\xC9)\xA9i\xE9\x19\x99Y\xD99\xB9y\xF9\x05\x85E\xC5%\xA5e\xE5\x15\x95U\xD55\xB5u\xF5\r\x8DM\xCD-\xADm\xED\x1D\x9D]\xDD=\xBD}\xFD\x03\x83C\xC3#\xA3c\xE3\x13\x93S\xD33\xB3s\xF3\v\x8BK\xCB+\xABk\xEB\x1B\x9B[\xDB;\xBB{\xFB\x07\x87G\xC7'\xA7g\xE7\x17\x97W\xD77\xB7w\xF7\x0F\x8FO\xCF/\xAFo\xEF\x1F\x9F_\xDF?\xBF\x7F\xFF".charCodeAt(((x & 255) >>> 0)) << 16 >>> 16)) << 8 << 16 >>> 16)) >>> 0;
+ };
+ $pkg.Reverse16 = Reverse16;
+ Len = function(x) {
+ var x;
+ if (true) {
+ return Len32(((x >>> 0)));
+ }
+ return Len64((new $Uint64(0, x)));
+ };
+ $pkg.Len = Len;
+ Len32 = function(x) {
+ var n, x, y, y$1;
+ n = 0;
+ if (x >= 65536) {
+ x = (y = (16), y < 32 ? (x >>> y) : 0) >>> 0;
+ n = 16;
+ }
+ if (x >= 256) {
+ x = (y$1 = (8), y$1 < 32 ? (x >>> y$1) : 0) >>> 0;
+ n = n + (8) >> 0;
+ }
+ n = n + (("\x00\x01\x02\x02\x03\x03\x03\x03\x04\x04\x04\x04\x04\x04\x04\x04\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b".charCodeAt(x) >> 0)) >> 0;
+ return n;
+ };
+ $pkg.Len32 = Len32;
+ Len64 = function(x) {
+ var n, x;
+ n = 0;
+ if ((x.$high > 1 || (x.$high === 1 && x.$low >= 0))) {
+ x = $shiftRightUint64(x, (32));
+ n = 32;
+ }
+ if ((x.$high > 0 || (x.$high === 0 && x.$low >= 65536))) {
+ x = $shiftRightUint64(x, (16));
+ n = n + (16) >> 0;
+ }
+ if ((x.$high > 0 || (x.$high === 0 && x.$low >= 256))) {
+ x = $shiftRightUint64(x, (8));
+ n = n + (8) >> 0;
+ }
+ n = n + (("\x00\x01\x02\x02\x03\x03\x03\x03\x04\x04\x04\x04\x04\x04\x04\x04\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b".charCodeAt($flatten64(x)) >> 0)) >> 0;
+ return n;
+ };
+ $pkg.Len64 = Len64;
+ Add = function(x, y, carry) {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, c32, c64, carry, carryOut, s32, s64, sum, x, y;
+ sum = 0;
+ carryOut = 0;
+ if (true) {
+ _tuple = Add32(((x >>> 0)), ((y >>> 0)), ((carry >>> 0)));
+ s32 = _tuple[0];
+ c32 = _tuple[1];
+ _tmp = ((s32 >>> 0));
+ _tmp$1 = ((c32 >>> 0));
+ sum = _tmp;
+ carryOut = _tmp$1;
+ return [sum, carryOut];
+ }
+ _tuple$1 = Add64((new $Uint64(0, x)), (new $Uint64(0, y)), (new $Uint64(0, carry)));
+ s64 = _tuple$1[0];
+ c64 = _tuple$1[1];
+ _tmp$2 = ((s64.$low >>> 0));
+ _tmp$3 = ((c64.$low >>> 0));
+ sum = _tmp$2;
+ carryOut = _tmp$3;
+ return [sum, carryOut];
+ };
+ $pkg.Add = Add;
+ Add64 = function(x, y, carry) {
+ var carry, carryOut, sum, x, x$1, x$2, x$3, x$4, y;
+ sum = new $Uint64(0, 0);
+ carryOut = new $Uint64(0, 0);
+ sum = (x$1 = new $Uint64(x.$high + y.$high, x.$low + y.$low), new $Uint64(x$1.$high + carry.$high, x$1.$low + carry.$low));
+ carryOut = $shiftRightUint64(((x$2 = new $Uint64(x.$high & y.$high, (x.$low & y.$low) >>> 0), x$3 = (x$4 = new $Uint64(x.$high | y.$high, (x.$low | y.$low) >>> 0), new $Uint64(x$4.$high & ~sum.$high, (x$4.$low & ~sum.$low) >>> 0)), new $Uint64(x$2.$high | x$3.$high, (x$2.$low | x$3.$low) >>> 0))), 63);
+ return [sum, carryOut];
+ };
+ $pkg.Add64 = Add64;
+ Sub = function(x, y, borrow) {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, b32, b64, borrow, borrowOut, d32, d64, diff, x, y;
+ diff = 0;
+ borrowOut = 0;
+ if (true) {
+ _tuple = Sub32(((x >>> 0)), ((y >>> 0)), ((borrow >>> 0)));
+ d32 = _tuple[0];
+ b32 = _tuple[1];
+ _tmp = ((d32 >>> 0));
+ _tmp$1 = ((b32 >>> 0));
+ diff = _tmp;
+ borrowOut = _tmp$1;
+ return [diff, borrowOut];
+ }
+ _tuple$1 = Sub64((new $Uint64(0, x)), (new $Uint64(0, y)), (new $Uint64(0, borrow)));
+ d64 = _tuple$1[0];
+ b64 = _tuple$1[1];
+ _tmp$2 = ((d64.$low >>> 0));
+ _tmp$3 = ((b64.$low >>> 0));
+ diff = _tmp$2;
+ borrowOut = _tmp$3;
+ return [diff, borrowOut];
+ };
+ $pkg.Sub = Sub;
+ Sub32 = function(x, y, borrow) {
+ var borrow, borrowOut, diff, x, y;
+ diff = 0;
+ borrowOut = 0;
+ diff = (x - y >>> 0) - borrow >>> 0;
+ borrowOut = (((((((~x >>> 0) & y) >>> 0)) | ((((~(((x ^ y) >>> 0)) >>> 0) & diff) >>> 0))) >>> 0)) >>> 31 >>> 0;
+ return [diff, borrowOut];
+ };
+ $pkg.Sub32 = Sub32;
+ Sub64 = function(x, y, borrow) {
+ var borrow, borrowOut, diff, x, x$1, x$2, x$3, x$4, x$5, x$6, y;
+ diff = new $Uint64(0, 0);
+ borrowOut = new $Uint64(0, 0);
+ diff = (x$1 = new $Uint64(x.$high - y.$high, x.$low - y.$low), new $Uint64(x$1.$high - borrow.$high, x$1.$low - borrow.$low));
+ borrowOut = $shiftRightUint64(((x$2 = (x$3 = new $Uint64(~x.$high, ~x.$low >>> 0), new $Uint64(x$3.$high & y.$high, (x$3.$low & y.$low) >>> 0)), x$4 = (x$5 = (x$6 = new $Uint64(x.$high ^ y.$high, (x.$low ^ y.$low) >>> 0), new $Uint64(~x$6.$high, ~x$6.$low >>> 0)), new $Uint64(x$5.$high & diff.$high, (x$5.$low & diff.$low) >>> 0)), new $Uint64(x$2.$high | x$4.$high, (x$2.$low | x$4.$low) >>> 0))), 63);
+ return [diff, borrowOut];
+ };
+ $pkg.Sub64 = Sub64;
+ Mul = function(x, y) {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, h, h$1, hi, l, l$1, lo, x, y;
+ hi = 0;
+ lo = 0;
+ if (true) {
+ _tuple = Mul32(((x >>> 0)), ((y >>> 0)));
+ h = _tuple[0];
+ l = _tuple[1];
+ _tmp = ((h >>> 0));
+ _tmp$1 = ((l >>> 0));
+ hi = _tmp;
+ lo = _tmp$1;
+ return [hi, lo];
+ }
+ _tuple$1 = Mul64((new $Uint64(0, x)), (new $Uint64(0, y)));
+ h$1 = _tuple$1[0];
+ l$1 = _tuple$1[1];
+ _tmp$2 = ((h$1.$low >>> 0));
+ _tmp$3 = ((l$1.$low >>> 0));
+ hi = _tmp$2;
+ lo = _tmp$3;
+ return [hi, lo];
+ };
+ $pkg.Mul = Mul;
+ Mul64 = function(x, y) {
+ var hi, lo, t, w0, w1, w2, x, x$1, x$2, x$3, x$4, x$5, x$6, x0, x1, y, y0, y1;
+ hi = new $Uint64(0, 0);
+ lo = new $Uint64(0, 0);
+ x0 = new $Uint64(x.$high & 0, (x.$low & 4294967295) >>> 0);
+ x1 = $shiftRightUint64(x, 32);
+ y0 = new $Uint64(y.$high & 0, (y.$low & 4294967295) >>> 0);
+ y1 = $shiftRightUint64(y, 32);
+ w0 = $mul64(x0, y0);
+ t = (x$1 = $mul64(x1, y0), x$2 = $shiftRightUint64(w0, 32), new $Uint64(x$1.$high + x$2.$high, x$1.$low + x$2.$low));
+ w1 = new $Uint64(t.$high & 0, (t.$low & 4294967295) >>> 0);
+ w2 = $shiftRightUint64(t, 32);
+ w1 = (x$3 = $mul64(x0, y1), new $Uint64(w1.$high + x$3.$high, w1.$low + x$3.$low));
+ hi = (x$4 = (x$5 = $mul64(x1, y1), new $Uint64(x$5.$high + w2.$high, x$5.$low + w2.$low)), x$6 = $shiftRightUint64(w1, 32), new $Uint64(x$4.$high + x$6.$high, x$4.$low + x$6.$low));
+ lo = $mul64(x, y);
+ return [hi, lo];
+ };
+ $pkg.Mul64 = Mul64;
+ Div = function(hi, lo, y) {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, hi, lo, q, q$1, quo, r, r$1, rem, y;
+ quo = 0;
+ rem = 0;
+ if (true) {
+ _tuple = Div32(((hi >>> 0)), ((lo >>> 0)), ((y >>> 0)));
+ q = _tuple[0];
+ r = _tuple[1];
+ _tmp = ((q >>> 0));
+ _tmp$1 = ((r >>> 0));
+ quo = _tmp;
+ rem = _tmp$1;
+ return [quo, rem];
+ }
+ _tuple$1 = Div64((new $Uint64(0, hi)), (new $Uint64(0, lo)), (new $Uint64(0, y)));
+ q$1 = _tuple$1[0];
+ r$1 = _tuple$1[1];
+ _tmp$2 = ((q$1.$low >>> 0));
+ _tmp$3 = ((r$1.$low >>> 0));
+ quo = _tmp$2;
+ rem = _tmp$3;
+ return [quo, rem];
+ };
+ $pkg.Div = Div;
+ Div64 = function(hi, lo, y) {
+ var _tmp, _tmp$1, hi, lo, q0, q1, quo, rem, rhat, s, un0, un1, un10, un21, un32, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$3, x$4, x$5, x$6, x$7, x$8, x$9, y, yn0, yn1;
+ quo = new $Uint64(0, 0);
+ rem = new $Uint64(0, 0);
+ if ((y.$high === 0 && y.$low === 0)) {
+ $panic(divideError);
+ }
+ if ((y.$high < hi.$high || (y.$high === hi.$high && y.$low <= hi.$low))) {
+ $panic(overflowError);
+ }
+ s = ((LeadingZeros64(y) >>> 0));
+ y = $shiftLeft64(y, (s));
+ yn1 = $shiftRightUint64(y, 32);
+ yn0 = new $Uint64(y.$high & 0, (y.$low & 4294967295) >>> 0);
+ un32 = (x = $shiftLeft64(hi, s), x$1 = $shiftRightUint64(lo, ((64 - s >>> 0))), new $Uint64(x.$high | x$1.$high, (x.$low | x$1.$low) >>> 0));
+ un10 = $shiftLeft64(lo, s);
+ un1 = $shiftRightUint64(un10, 32);
+ un0 = new $Uint64(un10.$high & 0, (un10.$low & 4294967295) >>> 0);
+ q1 = $div64(un32, yn1, false);
+ rhat = (x$2 = $mul64(q1, yn1), new $Uint64(un32.$high - x$2.$high, un32.$low - x$2.$low));
+ while (true) {
+ if (!((q1.$high > 1 || (q1.$high === 1 && q1.$low >= 0)) || (x$3 = $mul64(q1, yn0), x$4 = (x$5 = $mul64(new $Uint64(1, 0), rhat), new $Uint64(x$5.$high + un1.$high, x$5.$low + un1.$low)), (x$3.$high > x$4.$high || (x$3.$high === x$4.$high && x$3.$low > x$4.$low))))) { break; }
+ q1 = (x$6 = new $Uint64(0, 1), new $Uint64(q1.$high - x$6.$high, q1.$low - x$6.$low));
+ rhat = (x$7 = yn1, new $Uint64(rhat.$high + x$7.$high, rhat.$low + x$7.$low));
+ if ((rhat.$high > 1 || (rhat.$high === 1 && rhat.$low >= 0))) {
+ break;
+ }
+ }
+ un21 = (x$8 = (x$9 = $mul64(un32, new $Uint64(1, 0)), new $Uint64(x$9.$high + un1.$high, x$9.$low + un1.$low)), x$10 = $mul64(q1, y), new $Uint64(x$8.$high - x$10.$high, x$8.$low - x$10.$low));
+ q0 = $div64(un21, yn1, false);
+ rhat = (x$11 = $mul64(q0, yn1), new $Uint64(un21.$high - x$11.$high, un21.$low - x$11.$low));
+ while (true) {
+ if (!((q0.$high > 1 || (q0.$high === 1 && q0.$low >= 0)) || (x$12 = $mul64(q0, yn0), x$13 = (x$14 = $mul64(new $Uint64(1, 0), rhat), new $Uint64(x$14.$high + un0.$high, x$14.$low + un0.$low)), (x$12.$high > x$13.$high || (x$12.$high === x$13.$high && x$12.$low > x$13.$low))))) { break; }
+ q0 = (x$15 = new $Uint64(0, 1), new $Uint64(q0.$high - x$15.$high, q0.$low - x$15.$low));
+ rhat = (x$16 = yn1, new $Uint64(rhat.$high + x$16.$high, rhat.$low + x$16.$low));
+ if ((rhat.$high > 1 || (rhat.$high === 1 && rhat.$low >= 0))) {
+ break;
+ }
+ }
+ _tmp = (x$17 = $mul64(q1, new $Uint64(1, 0)), new $Uint64(x$17.$high + q0.$high, x$17.$low + q0.$low));
+ _tmp$1 = $shiftRightUint64(((x$18 = (x$19 = $mul64(un21, new $Uint64(1, 0)), new $Uint64(x$19.$high + un0.$high, x$19.$low + un0.$low)), x$20 = $mul64(q0, y), new $Uint64(x$18.$high - x$20.$high, x$18.$low - x$20.$low))), s);
+ quo = _tmp;
+ rem = _tmp$1;
+ return [quo, rem];
+ };
+ $pkg.Div64 = Div64;
+ _err.prototype.Error = function() {
+ var e;
+ e = this.$val;
+ return (e);
+ };
+ $ptrType(_err).prototype.Error = function() { return new _err(this.$get()).Error(); };
+ _err.prototype.RuntimeError = function() {
+ var e;
+ e = this.$val;
+ };
+ $ptrType(_err).prototype.RuntimeError = function() { return new _err(this.$get()).RuntimeError(); };
+ Mul32 = function(x, y) {
+ var hi, lo, t, w0, w1, w2, x, x0, x1, y, y0, y1;
+ hi = 0;
+ lo = 0;
+ x0 = (x & 65535) >>> 0;
+ x1 = x >>> 16 >>> 0;
+ y0 = (y & 65535) >>> 0;
+ y1 = y >>> 16 >>> 0;
+ w0 = $imul(x0, y0) >>> 0;
+ t = ($imul(x1, y0) >>> 0) + (w0 >>> 16 >>> 0) >>> 0;
+ w1 = (t & 65535) >>> 0;
+ w2 = t >>> 16 >>> 0;
+ w1 = w1 + (($imul(x0, y1) >>> 0)) >>> 0;
+ hi = (($imul(x1, y1) >>> 0) + w2 >>> 0) + (w1 >>> 16 >>> 0) >>> 0;
+ lo = $imul(x, y) >>> 0;
+ return [hi, lo];
+ };
+ $pkg.Mul32 = Mul32;
+ Add32 = function(x, y, carry) {
+ var carry, carryOut, sum, x, y;
+ sum = 0;
+ carryOut = 0;
+ sum = (x + y >>> 0) + carry >>> 0;
+ carryOut = ((((((x & y) >>> 0)) | ((((((x | y) >>> 0)) & ~sum) >>> 0))) >>> 0)) >>> 31 >>> 0;
+ return [sum, carryOut];
+ };
+ $pkg.Add32 = Add32;
+ Div32 = function(hi, lo, y) {
+ var _q, _q$1, _tmp, _tmp$1, hi, lo, q0, q1, quo, rem, rhat, s, un0, un1, un10, un16, un21, y, y$1, y$2, y$3, y$4, y$5, yn0, yn1;
+ quo = 0;
+ rem = 0;
+ if (y === 0) {
+ $panic(divideError);
+ }
+ if (y <= hi) {
+ $panic(overflowError);
+ }
+ s = ((LeadingZeros32(y) >>> 0));
+ y = (y$1 = (s), y$1 < 32 ? (y << y$1) : 0) >>> 0;
+ yn1 = y >>> 16 >>> 0;
+ yn0 = (y & 65535) >>> 0;
+ un16 = (((y$2 = s, y$2 < 32 ? (hi << y$2) : 0) >>> 0) | ((y$3 = ((32 - s >>> 0)), y$3 < 32 ? (lo >>> y$3) : 0) >>> 0)) >>> 0;
+ un10 = (y$4 = s, y$4 < 32 ? (lo << y$4) : 0) >>> 0;
+ un1 = un10 >>> 16 >>> 0;
+ un0 = (un10 & 65535) >>> 0;
+ q1 = (_q = un16 / yn1, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero"));
+ rhat = un16 - ($imul(q1, yn1) >>> 0) >>> 0;
+ while (true) {
+ if (!(q1 >= 65536 || ($imul(q1, yn0) >>> 0) > (($imul(65536, rhat) >>> 0) + un1 >>> 0))) { break; }
+ q1 = q1 - (1) >>> 0;
+ rhat = rhat + (yn1) >>> 0;
+ if (rhat >= 65536) {
+ break;
+ }
+ }
+ un21 = (($imul(un16, 65536) >>> 0) + un1 >>> 0) - ($imul(q1, y) >>> 0) >>> 0;
+ q0 = (_q$1 = un21 / yn1, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >>> 0 : $throwRuntimeError("integer divide by zero"));
+ rhat = un21 - ($imul(q0, yn1) >>> 0) >>> 0;
+ while (true) {
+ if (!(q0 >= 65536 || ($imul(q0, yn0) >>> 0) > (($imul(65536, rhat) >>> 0) + un0 >>> 0))) { break; }
+ q0 = q0 - (1) >>> 0;
+ rhat = rhat + (yn1) >>> 0;
+ if (rhat >= 65536) {
+ break;
+ }
+ }
+ _tmp = ($imul(q1, 65536) >>> 0) + q0 >>> 0;
+ _tmp$1 = (y$5 = s, y$5 < 32 ? ((((($imul(un21, 65536) >>> 0) + un0 >>> 0) - ($imul(q0, y) >>> 0) >>> 0)) >>> y$5) : 0) >>> 0;
+ quo = _tmp;
+ rem = _tmp$1;
+ return [quo, rem];
+ };
+ $pkg.Div32 = Div32;
+ _err.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "RuntimeError", name: "RuntimeError", pkg: "", typ: $funcType([], [], 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:
+ deBruijn32tab = $toNativeArray($kindUint8, [0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8, 31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9]);
+ deBruijn64tab = $toNativeArray($kindUint8, [0, 1, 56, 2, 57, 49, 28, 3, 61, 58, 42, 50, 38, 29, 17, 4, 62, 47, 59, 36, 45, 43, 51, 22, 53, 39, 33, 30, 24, 18, 12, 5, 63, 55, 48, 27, 60, 41, 37, 16, 46, 35, 44, 21, 52, 32, 23, 11, 54, 26, 40, 15, 34, 20, 31, 10, 25, 14, 19, 9, 13, 8, 7, 6]);
+ overflowError = new _err("runtime error: integer overflow");
+ divideError = new _err("runtime error: integer divide by zero");
+ /* */ } 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, js, bits, arrayType, arrayType$1, arrayType$2, structType, math, _zero, posInf, negInf, nan, buf, log2, frexp, max, min, normalize, Abs, Cos, Exp, Floor, Frexp, Inf, IsInf, IsNaN, Log, Log2, Max, Min, NaN, Pow, Signbit, Sin, Sqrt, init, Float32bits, Float32frombits, Float64bits, Float64frombits;
+ js = $packages["github.com/gopherjs/gopherjs/js"];
+ bits = $packages["math/bits"];
+ arrayType = $arrayType($Uint32, 2);
+ arrayType$1 = $arrayType($Float32, 2);
+ arrayType$2 = $arrayType($Float64, 1);
+ structType = $structType("math", [{prop: "uint32array", name: "uint32array", embedded: false, exported: false, typ: arrayType, tag: ""}, {prop: "float32array", name: "float32array", embedded: false, exported: false, typ: arrayType$1, tag: ""}, {prop: "float64array", name: "float64array", embedded: false, exported: false, typ: arrayType$2, tag: ""}]);
+ log2 = function(x) {
+ var _tuple, exp$1, frac, x;
+ _tuple = Frexp(x);
+ frac = _tuple[0];
+ exp$1 = _tuple[1];
+ if (frac === 0.5) {
+ return ((exp$1 - 1 >> 0));
+ }
+ return Log(frac) * 1.4426950408889634 + (exp$1);
+ };
+ frexp = function(f) {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, exp$1, f, frac, x, x$1, x$2, x$3;
+ frac = 0;
+ exp$1 = 0;
+ if ((f === 0)) {
+ _tmp = f;
+ _tmp$1 = 0;
+ frac = _tmp;
+ exp$1 = _tmp$1;
+ return [frac, exp$1];
+ } else if (IsInf(f, 0) || IsNaN(f)) {
+ _tmp$2 = f;
+ _tmp$3 = 0;
+ frac = _tmp$2;
+ exp$1 = _tmp$3;
+ return [frac, exp$1];
+ }
+ _tuple = normalize(f);
+ f = _tuple[0];
+ exp$1 = _tuple[1];
+ x = Float64bits(f);
+ exp$1 = exp$1 + ((((((x$1 = $shiftRightUint64(x, 52), new $Uint64(x$1.$high & 0, (x$1.$low & 2047) >>> 0)).$low >> 0)) - 1023 >> 0) + 1 >> 0)) >> 0;
+ x = (x$2 = new $Uint64(2146435072, 0), new $Uint64(x.$high & ~x$2.$high, (x.$low & ~x$2.$low) >>> 0));
+ x = (x$3 = new $Uint64(1071644672, 0), new $Uint64(x.$high | x$3.$high, (x.$low | x$3.$low) >>> 0));
+ frac = Float64frombits(x);
+ return [frac, exp$1];
+ };
+ max = function(x, y) {
+ var x, y;
+ if (IsInf(x, 1) || IsInf(y, 1)) {
+ return Inf(1);
+ } else if (IsNaN(x) || IsNaN(y)) {
+ return NaN();
+ } else if ((x === 0) && (x === y)) {
+ if (Signbit(x)) {
+ return y;
+ }
+ return x;
+ }
+ if (x > y) {
+ return x;
+ }
+ return y;
+ };
+ min = function(x, y) {
+ var x, y;
+ if (IsInf(x, -1) || IsInf(y, -1)) {
+ return Inf(-1);
+ } else if (IsNaN(x) || IsNaN(y)) {
+ return NaN();
+ } else if ((x === 0) && (x === y)) {
+ if (Signbit(x)) {
+ return x;
+ }
+ return y;
+ }
+ if (x < y) {
+ return x;
+ }
+ return y;
+ };
+ normalize = function(x) {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, exp$1, x, y;
+ y = 0;
+ exp$1 = 0;
+ if (Abs(x) < 2.2250738585072014e-308) {
+ _tmp = x * 4.503599627370496e+15;
+ _tmp$1 = -52;
+ y = _tmp;
+ exp$1 = _tmp$1;
+ return [y, exp$1];
+ }
+ _tmp$2 = x;
+ _tmp$3 = 0;
+ y = _tmp$2;
+ exp$1 = _tmp$3;
+ return [y, exp$1];
+ };
+ Abs = function(x) {
+ var x, x$1;
+ return Float64frombits((x$1 = Float64bits(x), new $Uint64(x$1.$high & ~2147483648, (x$1.$low & ~0) >>> 0)));
+ };
+ $pkg.Abs = Abs;
+ Cos = function(x) {
+ var x;
+ return $parseFloat(math.cos(x));
+ };
+ $pkg.Cos = Cos;
+ Exp = function(x) {
+ var x;
+ return $parseFloat(math.exp(x));
+ };
+ $pkg.Exp = Exp;
+ Floor = function(x) {
+ var x;
+ return $parseFloat(math.floor(x));
+ };
+ $pkg.Floor = Floor;
+ Frexp = function(f) {
+ var _tuple, exp$1, f, frac;
+ frac = 0;
+ exp$1 = 0;
+ _tuple = frexp(f);
+ frac = _tuple[0];
+ exp$1 = _tuple[1];
+ return [frac, exp$1];
+ };
+ $pkg.Frexp = Frexp;
+ Inf = function(sign) {
+ var sign;
+ if (sign >= 0) {
+ return posInf;
+ } else {
+ return negInf;
+ }
+ };
+ $pkg.Inf = Inf;
+ IsInf = function(f, sign) {
+ var f, sign;
+ if (f === posInf) {
+ return sign >= 0;
+ }
+ if (f === negInf) {
+ return sign <= 0;
+ }
+ return false;
+ };
+ $pkg.IsInf = IsInf;
+ IsNaN = function(f) {
+ var f, is;
+ is = false;
+ is = !((f === f));
+ return is;
+ };
+ $pkg.IsNaN = IsNaN;
+ Log = function(x) {
+ var x;
+ if (!((x === x))) {
+ return nan;
+ }
+ return $parseFloat(math.log(x));
+ };
+ $pkg.Log = Log;
+ Log2 = function(x) {
+ var x;
+ return log2(x);
+ };
+ $pkg.Log2 = Log2;
+ Max = function(x, y) {
+ var x, y;
+ return max(x, y);
+ };
+ $pkg.Max = Max;
+ Min = function(x, y) {
+ var x, y;
+ return min(x, y);
+ };
+ $pkg.Min = Min;
+ NaN = function() {
+ return nan;
+ };
+ $pkg.NaN = NaN;
+ Pow = function(x, y) {
+ var x, y;
+ if ((x === 1) || ((x === -1) && ((y === posInf) || (y === negInf)))) {
+ return 1;
+ }
+ return $parseFloat(math.pow(x, y));
+ };
+ $pkg.Pow = Pow;
+ Signbit = function(x) {
+ var x;
+ return x < 0 || (1 / x === negInf);
+ };
+ $pkg.Signbit = Signbit;
+ Sin = function(x) {
+ var x;
+ return $parseFloat(math.sin(x));
+ };
+ $pkg.Sin = Sin;
+ Sqrt = function(x) {
+ var x;
+ return $parseFloat(math.sqrt(x));
+ };
+ $pkg.Sqrt = Sqrt;
+ init = function() {
+ var ab;
+ ab = new ($global.ArrayBuffer)(8);
+ buf.uint32array = new ($global.Uint32Array)(ab);
+ buf.float32array = new ($global.Float32Array)(ab);
+ buf.float64array = new ($global.Float64Array)(ab);
+ };
+ Float32bits = function(f) {
+ var f;
+ buf.float32array[0] = f;
+ return buf.uint32array[0];
+ };
+ $pkg.Float32bits = Float32bits;
+ Float32frombits = function(b) {
+ var b;
+ buf.uint32array[0] = b;
+ return buf.float32array[0];
+ };
+ $pkg.Float32frombits = Float32frombits;
+ Float64bits = function(f) {
+ var f, x, x$1;
+ buf.float64array[0] = f;
+ return (x = $shiftLeft64((new $Uint64(0, buf.uint32array[1])), 32), x$1 = (new $Uint64(0, buf.uint32array[0])), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low));
+ };
+ $pkg.Float64bits = Float64bits;
+ Float64frombits = function(b) {
+ var b;
+ buf.uint32array[0] = ((b.$low >>> 0));
+ buf.uint32array[1] = (($shiftRightUint64(b, 32).$low >>> 0));
+ return buf.float64array[0];
+ };
+ $pkg.Float64frombits = Float64frombits;
+ $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 = js.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = bits.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ buf = new structType.ptr(arrayType.zero(), arrayType$1.zero(), arrayType$2.zero());
+ math = $global.Math;
+ _zero = 0;
+ posInf = 1 / _zero;
+ negInf = -1 / _zero;
+ nan = $parseFloat($NaN);
+ init();
+ /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
+ };
+ $pkg.$init = $init;
+ return $pkg;
+})();
+$packages["strconv"] = (function() {
+ var $pkg = {}, $init, errors, js, bytealg, math, bits, utf8, floatInfo, decimalSlice, decimal, leftCheat, NumError, sliceType, sliceType$1, arrayType, sliceType$2, sliceType$3, sliceType$4, sliceType$5, sliceType$6, arrayType$1, arrayType$2, ptrType, arrayType$3, arrayType$4, arrayType$5, ptrType$1, ptrType$2, isPrint16, isNotPrint16, isPrint32, isNotPrint32, isGraphic, uint64pow10, float32info, float32info$24ptr, float64info, float64info$24ptr, detailedPowersOfTen, leftcheats, optimize, powtab, float64pow10, float32pow10, contains, quoteWith, appendQuotedWith, appendQuotedRuneWith, appendEscapedRune, Quote, AppendQuote, AppendQuoteToASCII, AppendQuoteRune, AppendQuoteRuneToASCII, CanBackquote, unhex, UnquoteChar, Unquote, unquote, bsearch16, bsearch32, IsPrint, isInGraphicList, FormatUint, FormatInt, AppendInt, AppendUint, small, formatBits, isPowerOfTwo, ryuFtoaFixed32, ryuFtoaFixed64, formatDecimal, ryuFtoaShortest, mulByLog2Log10, mulByLog10Log2, computeBounds, ryuDigits, ryuDigits32, mult64bitPow10, mult128bitPow10, divisibleByPower5, divmod1e9, FormatFloat, AppendFloat, genericFtoa, bigFtoa, formatDigits, roundShortest, fmtE, fmtF, fmtB, fmtX, min, max, eiselLemire64, eiselLemire32, digitZero, trim, rightShift, prefixIsLessThan, leftShift, shouldRoundUp, index, lower, syntaxError, rangeError, baseError, bitSizeError, ParseUint, ParseInt, underscoreOK, commonPrefixLenIgnoreCase, special, readFloat, atof64exact, atof32exact, atofHex, atof32, atof64, ParseFloat, parseFloatPrefix, ParseBool, FormatBool, AppendBool, Itoa, Atoi;
+ errors = $packages["errors"];
+ js = $packages["github.com/gopherjs/gopherjs/js"];
+ bytealg = $packages["internal/bytealg"];
+ math = $packages["math"];
+ bits = $packages["math/bits"];
+ utf8 = $packages["unicode/utf8"];
+ floatInfo = $pkg.floatInfo = $newType(0, $kindStruct, "strconv.floatInfo", true, "strconv", false, function(mantbits_, expbits_, bias_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.mantbits = 0;
+ this.expbits = 0;
+ this.bias = 0;
+ return;
+ }
+ this.mantbits = mantbits_;
+ this.expbits = expbits_;
+ this.bias = bias_;
+ });
+ decimalSlice = $pkg.decimalSlice = $newType(0, $kindStruct, "strconv.decimalSlice", true, "strconv", false, function(d_, nd_, dp_, neg_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.d = sliceType$6.nil;
+ this.nd = 0;
+ this.dp = 0;
+ this.neg = false;
+ return;
+ }
+ this.d = d_;
+ this.nd = nd_;
+ this.dp = dp_;
+ this.neg = neg_;
+ });
+ decimal = $pkg.decimal = $newType(0, $kindStruct, "strconv.decimal", true, "strconv", false, function(d_, nd_, dp_, neg_, trunc_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.d = arrayType$5.zero();
+ this.nd = 0;
+ this.dp = 0;
+ this.neg = false;
+ this.trunc = false;
+ return;
+ }
+ this.d = d_;
+ this.nd = nd_;
+ this.dp = dp_;
+ this.neg = neg_;
+ this.trunc = trunc_;
+ });
+ leftCheat = $pkg.leftCheat = $newType(0, $kindStruct, "strconv.leftCheat", true, "strconv", false, function(delta_, cutoff_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.delta = 0;
+ this.cutoff = "";
+ return;
+ }
+ this.delta = delta_;
+ this.cutoff = cutoff_;
+ });
+ NumError = $pkg.NumError = $newType(0, $kindStruct, "strconv.NumError", true, "strconv", true, function(Func_, Num_, Err_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.Func = "";
+ this.Num = "";
+ this.Err = $ifaceNil;
+ return;
+ }
+ this.Func = Func_;
+ this.Num = Num_;
+ this.Err = Err_;
+ });
+ sliceType = $sliceType($Uint16);
+ sliceType$1 = $sliceType($Uint32);
+ arrayType = $arrayType($Uint64, 2);
+ sliceType$2 = $sliceType(leftCheat);
+ sliceType$3 = $sliceType($Int);
+ sliceType$4 = $sliceType($Float64);
+ sliceType$5 = $sliceType($Float32);
+ sliceType$6 = $sliceType($Uint8);
+ arrayType$1 = $arrayType($Uint8, 4);
+ arrayType$2 = $arrayType($Uint8, 65);
+ ptrType = $ptrType(floatInfo);
+ arrayType$3 = $arrayType($Uint8, 32);
+ arrayType$4 = $arrayType($Uint8, 24);
+ arrayType$5 = $arrayType($Uint8, 800);
+ ptrType$1 = $ptrType(NumError);
+ ptrType$2 = $ptrType(decimal);
+ contains = function(s, c) {
+ var c, s;
+ return !((index(s, c) === -1));
+ };
+ quoteWith = function(s, quote, ASCIIonly, graphicOnly) {
+ var ASCIIonly, _q, graphicOnly, quote, s;
+ return ($bytesToString(appendQuotedWith($makeSlice(sliceType$6, 0, (_q = ($imul(3, s.length)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))), s, quote, ASCIIonly, graphicOnly)));
+ };
+ appendQuotedWith = function(buf, s, quote, ASCIIonly, graphicOnly) {
+ var ASCIIonly, _tuple, buf, graphicOnly, nBuf, quote, r, s, width;
+ if ((buf.$capacity - buf.$length >> 0) < s.length) {
+ nBuf = $makeSlice(sliceType$6, buf.$length, (((buf.$length + 1 >> 0) + s.length >> 0) + 1 >> 0));
+ $copySlice(nBuf, buf);
+ buf = nBuf;
+ }
+ buf = $append(buf, quote);
+ width = 0;
+ while (true) {
+ if (!(s.length > 0)) { break; }
+ r = ((s.charCodeAt(0) >> 0));
+ width = 1;
+ if (r >= 128) {
+ _tuple = utf8.DecodeRuneInString(s);
+ r = _tuple[0];
+ width = _tuple[1];
+ }
+ if ((width === 1) && (r === 65533)) {
+ buf = $appendSlice(buf, "\\x");
+ buf = $append(buf, "0123456789abcdef".charCodeAt((s.charCodeAt(0) >>> 4 << 24 >>> 24)));
+ buf = $append(buf, "0123456789abcdef".charCodeAt(((s.charCodeAt(0) & 15) >>> 0)));
+ s = $substring(s, width);
+ continue;
+ }
+ buf = appendEscapedRune(buf, r, quote, ASCIIonly, graphicOnly);
+ s = $substring(s, width);
+ }
+ buf = $append(buf, quote);
+ return buf;
+ };
+ appendQuotedRuneWith = function(buf, r, quote, ASCIIonly, graphicOnly) {
+ var ASCIIonly, buf, graphicOnly, quote, r;
+ buf = $append(buf, quote);
+ if (!utf8.ValidRune(r)) {
+ r = 65533;
+ }
+ buf = appendEscapedRune(buf, r, quote, ASCIIonly, graphicOnly);
+ buf = $append(buf, quote);
+ return buf;
+ };
+ appendEscapedRune = function(buf, r, quote, ASCIIonly, graphicOnly) {
+ var ASCIIonly, _1, buf, graphicOnly, n, quote, r, runeTmp, s, s$1;
+ runeTmp = arrayType$1.zero();
+ if ((r === ((quote >> 0))) || (r === 92)) {
+ buf = $append(buf, 92);
+ buf = $append(buf, ((r << 24 >>> 24)));
+ return buf;
+ }
+ if (ASCIIonly) {
+ if (r < 128 && IsPrint(r)) {
+ buf = $append(buf, ((r << 24 >>> 24)));
+ return buf;
+ }
+ } else if (IsPrint(r) || graphicOnly && isInGraphicList(r)) {
+ n = utf8.EncodeRune(new sliceType$6(runeTmp), r);
+ buf = $appendSlice(buf, $subslice(new sliceType$6(runeTmp), 0, n));
+ return buf;
+ }
+ _1 = r;
+ if (_1 === (7)) {
+ buf = $appendSlice(buf, "\\a");
+ } else if (_1 === (8)) {
+ buf = $appendSlice(buf, "\\b");
+ } else if (_1 === (12)) {
+ buf = $appendSlice(buf, "\\f");
+ } else if (_1 === (10)) {
+ buf = $appendSlice(buf, "\\n");
+ } else if (_1 === (13)) {
+ buf = $appendSlice(buf, "\\r");
+ } else if (_1 === (9)) {
+ buf = $appendSlice(buf, "\\t");
+ } else if (_1 === (11)) {
+ buf = $appendSlice(buf, "\\v");
+ } else {
+ if (r < 32) {
+ buf = $appendSlice(buf, "\\x");
+ buf = $append(buf, "0123456789abcdef".charCodeAt((((r << 24 >>> 24)) >>> 4 << 24 >>> 24)));
+ buf = $append(buf, "0123456789abcdef".charCodeAt(((((r << 24 >>> 24)) & 15) >>> 0)));
+ } else if (!utf8.ValidRune(r)) {
+ r = 65533;
+ buf = $appendSlice(buf, "\\u");
+ s = 12;
+ while (true) {
+ if (!(s >= 0)) { break; }
+ buf = $append(buf, "0123456789abcdef".charCodeAt((((r >> $min(((s >>> 0)), 31)) >> 0) & 15)));
+ s = s - (4) >> 0;
+ }
+ } else if (r < 65536) {
+ buf = $appendSlice(buf, "\\u");
+ s = 12;
+ while (true) {
+ if (!(s >= 0)) { break; }
+ buf = $append(buf, "0123456789abcdef".charCodeAt((((r >> $min(((s >>> 0)), 31)) >> 0) & 15)));
+ s = s - (4) >> 0;
+ }
+ } else {
+ buf = $appendSlice(buf, "\\U");
+ s$1 = 28;
+ while (true) {
+ if (!(s$1 >= 0)) { break; }
+ buf = $append(buf, "0123456789abcdef".charCodeAt((((r >> $min(((s$1 >>> 0)), 31)) >> 0) & 15)));
+ s$1 = s$1 - (4) >> 0;
+ }
+ }
+ }
+ return buf;
+ };
+ Quote = function(s) {
+ var s;
+ return quoteWith(s, 34, false, false);
+ };
+ $pkg.Quote = Quote;
+ AppendQuote = function(dst, s) {
+ var dst, s;
+ return appendQuotedWith(dst, s, 34, false, false);
+ };
+ $pkg.AppendQuote = AppendQuote;
+ AppendQuoteToASCII = function(dst, s) {
+ var dst, s;
+ return appendQuotedWith(dst, s, 34, true, false);
+ };
+ $pkg.AppendQuoteToASCII = AppendQuoteToASCII;
+ AppendQuoteRune = function(dst, r) {
+ var dst, r;
+ return appendQuotedRuneWith(dst, r, 39, false, false);
+ };
+ $pkg.AppendQuoteRune = AppendQuoteRune;
+ AppendQuoteRuneToASCII = function(dst, r) {
+ var dst, r;
+ return appendQuotedRuneWith(dst, r, 39, true, false);
+ };
+ $pkg.AppendQuoteRuneToASCII = AppendQuoteRuneToASCII;
+ CanBackquote = function(s) {
+ var _tuple, r, s, wid;
+ while (true) {
+ if (!(s.length > 0)) { break; }
+ _tuple = utf8.DecodeRuneInString(s);
+ r = _tuple[0];
+ wid = _tuple[1];
+ s = $substring(s, wid);
+ if (wid > 1) {
+ if (r === 65279) {
+ return false;
+ }
+ continue;
+ }
+ if (r === 65533) {
+ return false;
+ }
+ if ((r < 32 && !((r === 9))) || (r === 96) || (r === 127)) {
+ return false;
+ }
+ }
+ return true;
+ };
+ $pkg.CanBackquote = CanBackquote;
+ unhex = function(b) {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, b, c, ok, v;
+ v = 0;
+ ok = false;
+ c = ((b >> 0));
+ if (48 <= c && c <= 57) {
+ _tmp = c - 48 >> 0;
+ _tmp$1 = true;
+ v = _tmp;
+ ok = _tmp$1;
+ return [v, ok];
+ } else if (97 <= c && c <= 102) {
+ _tmp$2 = (c - 97 >> 0) + 10 >> 0;
+ _tmp$3 = true;
+ v = _tmp$2;
+ ok = _tmp$3;
+ return [v, ok];
+ } else if (65 <= c && c <= 70) {
+ _tmp$4 = (c - 65 >> 0) + 10 >> 0;
+ _tmp$5 = true;
+ v = _tmp$4;
+ ok = _tmp$5;
+ return [v, ok];
+ }
+ return [v, ok];
+ };
+ UnquoteChar = function(s, quote) {
+ var _1, _2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, c, c$1, err, j, j$1, multibyte, n, ok, quote, r, s, size, tail, v, v$1, value, x, x$1;
+ value = 0;
+ multibyte = false;
+ tail = "";
+ err = $ifaceNil;
+ if (s.length === 0) {
+ err = $pkg.ErrSyntax;
+ return [value, multibyte, tail, err];
+ }
+ c = s.charCodeAt(0);
+ if ((c === quote) && ((quote === 39) || (quote === 34))) {
+ err = $pkg.ErrSyntax;
+ return [value, multibyte, tail, err];
+ } else if (c >= 128) {
+ _tuple = utf8.DecodeRuneInString(s);
+ r = _tuple[0];
+ size = _tuple[1];
+ _tmp = r;
+ _tmp$1 = true;
+ _tmp$2 = $substring(s, size);
+ _tmp$3 = $ifaceNil;
+ value = _tmp;
+ multibyte = _tmp$1;
+ tail = _tmp$2;
+ err = _tmp$3;
+ return [value, multibyte, tail, err];
+ } else if (!((c === 92))) {
+ _tmp$4 = ((s.charCodeAt(0) >> 0));
+ _tmp$5 = false;
+ _tmp$6 = $substring(s, 1);
+ _tmp$7 = $ifaceNil;
+ value = _tmp$4;
+ multibyte = _tmp$5;
+ tail = _tmp$6;
+ err = _tmp$7;
+ return [value, multibyte, tail, err];
+ }
+ if (s.length <= 1) {
+ err = $pkg.ErrSyntax;
+ return [value, multibyte, tail, err];
+ }
+ c$1 = s.charCodeAt(1);
+ s = $substring(s, 2);
+ switch (0) { default:
+ _1 = c$1;
+ if (_1 === (97)) {
+ value = 7;
+ } else if (_1 === (98)) {
+ value = 8;
+ } else if (_1 === (102)) {
+ value = 12;
+ } else if (_1 === (110)) {
+ value = 10;
+ } else if (_1 === (114)) {
+ value = 13;
+ } else if (_1 === (116)) {
+ value = 9;
+ } else if (_1 === (118)) {
+ value = 11;
+ } else if ((_1 === (120)) || (_1 === (117)) || (_1 === (85))) {
+ n = 0;
+ _2 = c$1;
+ if (_2 === (120)) {
+ n = 2;
+ } else if (_2 === (117)) {
+ n = 4;
+ } else if (_2 === (85)) {
+ n = 8;
+ }
+ v = 0;
+ if (s.length < n) {
+ err = $pkg.ErrSyntax;
+ return [value, multibyte, tail, err];
+ }
+ j = 0;
+ while (true) {
+ if (!(j < n)) { break; }
+ _tuple$1 = unhex(s.charCodeAt(j));
+ x = _tuple$1[0];
+ ok = _tuple$1[1];
+ if (!ok) {
+ err = $pkg.ErrSyntax;
+ return [value, multibyte, tail, err];
+ }
+ v = (v << 4 >> 0) | x;
+ j = j + (1) >> 0;
+ }
+ s = $substring(s, n);
+ if (c$1 === 120) {
+ value = v;
+ break;
+ }
+ if (!utf8.ValidRune(v)) {
+ err = $pkg.ErrSyntax;
+ return [value, multibyte, tail, err];
+ }
+ value = v;
+ multibyte = true;
+ } else if ((_1 === (48)) || (_1 === (49)) || (_1 === (50)) || (_1 === (51)) || (_1 === (52)) || (_1 === (53)) || (_1 === (54)) || (_1 === (55))) {
+ v$1 = ((c$1 >> 0)) - 48 >> 0;
+ if (s.length < 2) {
+ err = $pkg.ErrSyntax;
+ return [value, multibyte, tail, err];
+ }
+ j$1 = 0;
+ while (true) {
+ if (!(j$1 < 2)) { break; }
+ x$1 = ((s.charCodeAt(j$1) >> 0)) - 48 >> 0;
+ if (x$1 < 0 || x$1 > 7) {
+ err = $pkg.ErrSyntax;
+ return [value, multibyte, tail, err];
+ }
+ v$1 = ((v$1 << 3 >> 0)) | x$1;
+ j$1 = j$1 + (1) >> 0;
+ }
+ s = $substring(s, 2);
+ if (v$1 > 255) {
+ err = $pkg.ErrSyntax;
+ return [value, multibyte, tail, err];
+ }
+ value = v$1;
+ } else if (_1 === (92)) {
+ value = 92;
+ } else if ((_1 === (39)) || (_1 === (34))) {
+ if (!((c$1 === quote))) {
+ err = $pkg.ErrSyntax;
+ return [value, multibyte, tail, err];
+ }
+ value = ((c$1 >> 0));
+ } else {
+ err = $pkg.ErrSyntax;
+ return [value, multibyte, tail, err];
+ }
+ }
+ tail = s;
+ return [value, multibyte, tail, err];
+ };
+ $pkg.UnquoteChar = UnquoteChar;
+ Unquote = function(s) {
+ var _tuple, err, out, rem, s;
+ _tuple = unquote(s, true);
+ out = _tuple[0];
+ rem = _tuple[1];
+ err = _tuple[2];
+ if (rem.length > 0) {
+ return ["", $pkg.ErrSyntax];
+ }
+ return [out, err];
+ };
+ $pkg.Unquote = Unquote;
+ unquote = function(in$1, unescape) {
+ var _1, _2, _q, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, arr, buf, buf$1, end, err, err$1, i, in$1, in0, multibyte, n, n$1, out, quote, r, r$1, rem, rem$1, unescape, valid;
+ out = "";
+ rem = "";
+ err = $ifaceNil;
+ if (in$1.length < 2) {
+ _tmp = "";
+ _tmp$1 = in$1;
+ _tmp$2 = $pkg.ErrSyntax;
+ out = _tmp;
+ rem = _tmp$1;
+ err = _tmp$2;
+ return [out, rem, err];
+ }
+ quote = in$1.charCodeAt(0);
+ end = index($substring(in$1, 1), quote);
+ if (end < 0) {
+ _tmp$3 = "";
+ _tmp$4 = in$1;
+ _tmp$5 = $pkg.ErrSyntax;
+ out = _tmp$3;
+ rem = _tmp$4;
+ err = _tmp$5;
+ return [out, rem, err];
+ }
+ end = end + (2) >> 0;
+ _1 = quote;
+ if (_1 === (96)) {
+ if (!unescape) {
+ out = $substring(in$1, 0, end);
+ } else if (!contains($substring(in$1, 0, end), 13)) {
+ out = $substring(in$1, 1, (end - 1 >> 0));
+ } else {
+ buf = $makeSlice(sliceType$6, 0, (((end - 1 >> 0) - 1 >> 0) - 1 >> 0));
+ i = 1;
+ while (true) {
+ if (!(i < (end - 1 >> 0))) { break; }
+ if (!((in$1.charCodeAt(i) === 13))) {
+ buf = $append(buf, in$1.charCodeAt(i));
+ }
+ i = i + (1) >> 0;
+ }
+ out = ($bytesToString(buf));
+ }
+ _tmp$6 = out;
+ _tmp$7 = $substring(in$1, end);
+ _tmp$8 = $ifaceNil;
+ out = _tmp$6;
+ rem = _tmp$7;
+ err = _tmp$8;
+ return [out, rem, err];
+ } else if ((_1 === (34)) || (_1 === (39))) {
+ if (!contains($substring(in$1, 0, end), 92) && !contains($substring(in$1, 0, end), 10)) {
+ valid = false;
+ _2 = quote;
+ if (_2 === (34)) {
+ valid = utf8.ValidString($substring(in$1, 1, (end - 1 >> 0)));
+ } else if (_2 === (39)) {
+ _tuple = utf8.DecodeRuneInString($substring(in$1, 1, (end - 1 >> 0)));
+ r = _tuple[0];
+ n = _tuple[1];
+ valid = (((1 + n >> 0) + 1 >> 0) === end) && (!((r === 65533)) || !((n === 1)));
+ }
+ if (valid) {
+ out = $substring(in$1, 0, end);
+ if (unescape) {
+ out = $substring(out, 1, (end - 1 >> 0));
+ }
+ _tmp$9 = out;
+ _tmp$10 = $substring(in$1, end);
+ _tmp$11 = $ifaceNil;
+ out = _tmp$9;
+ rem = _tmp$10;
+ err = _tmp$11;
+ return [out, rem, err];
+ }
+ }
+ buf$1 = sliceType$6.nil;
+ in0 = in$1;
+ in$1 = $substring(in$1, 1);
+ if (unescape) {
+ buf$1 = $makeSlice(sliceType$6, 0, (_q = ($imul(3, end)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")));
+ }
+ while (true) {
+ if (!(in$1.length > 0 && !((in$1.charCodeAt(0) === quote)))) { break; }
+ _tuple$1 = UnquoteChar(in$1, quote);
+ r$1 = _tuple$1[0];
+ multibyte = _tuple$1[1];
+ rem$1 = _tuple$1[2];
+ err$1 = _tuple$1[3];
+ if ((in$1.charCodeAt(0) === 10) || !($interfaceIsEqual(err$1, $ifaceNil))) {
+ _tmp$12 = "";
+ _tmp$13 = in0;
+ _tmp$14 = $pkg.ErrSyntax;
+ out = _tmp$12;
+ rem = _tmp$13;
+ err = _tmp$14;
+ return [out, rem, err];
+ }
+ in$1 = rem$1;
+ if (unescape) {
+ if (r$1 < 128 || !multibyte) {
+ buf$1 = $append(buf$1, ((r$1 << 24 >>> 24)));
+ } else {
+ arr = arrayType$1.zero();
+ n$1 = utf8.EncodeRune(new sliceType$6(arr), r$1);
+ buf$1 = $appendSlice(buf$1, $subslice(new sliceType$6(arr), 0, n$1));
+ }
+ }
+ if (quote === 39) {
+ break;
+ }
+ }
+ if (!(in$1.length > 0 && (in$1.charCodeAt(0) === quote))) {
+ _tmp$15 = "";
+ _tmp$16 = in0;
+ _tmp$17 = $pkg.ErrSyntax;
+ out = _tmp$15;
+ rem = _tmp$16;
+ err = _tmp$17;
+ return [out, rem, err];
+ }
+ in$1 = $substring(in$1, 1);
+ if (unescape) {
+ _tmp$18 = ($bytesToString(buf$1));
+ _tmp$19 = in$1;
+ _tmp$20 = $ifaceNil;
+ out = _tmp$18;
+ rem = _tmp$19;
+ err = _tmp$20;
+ return [out, rem, err];
+ }
+ _tmp$21 = $substring(in0, 0, (in0.length - in$1.length >> 0));
+ _tmp$22 = in$1;
+ _tmp$23 = $ifaceNil;
+ out = _tmp$21;
+ rem = _tmp$22;
+ err = _tmp$23;
+ return [out, rem, err];
+ } else {
+ _tmp$24 = "";
+ _tmp$25 = in$1;
+ _tmp$26 = $pkg.ErrSyntax;
+ out = _tmp$24;
+ rem = _tmp$25;
+ err = _tmp$26;
+ return [out, rem, err];
+ }
+ };
+ bsearch16 = function(a, x) {
+ var _tmp, _tmp$1, a, h, i, j, x;
+ _tmp = 0;
+ _tmp$1 = a.$length;
+ i = _tmp;
+ j = _tmp$1;
+ while (true) {
+ if (!(i < j)) { break; }
+ h = i + (((j - i >> 0)) >> 1 >> 0) >> 0;
+ if (((h < 0 || h >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + h]) < x) {
+ i = h + 1 >> 0;
+ } else {
+ j = h;
+ }
+ }
+ return i;
+ };
+ bsearch32 = function(a, x) {
+ var _tmp, _tmp$1, a, h, i, j, x;
+ _tmp = 0;
+ _tmp$1 = a.$length;
+ i = _tmp;
+ j = _tmp$1;
+ while (true) {
+ if (!(i < j)) { break; }
+ h = i + (((j - i >> 0)) >> 1 >> 0) >> 0;
+ if (((h < 0 || h >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + h]) < x) {
+ i = h + 1 >> 0;
+ } else {
+ j = h;
+ }
+ }
+ return i;
+ };
+ IsPrint = function(r) {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, i, i$1, isNotPrint, isNotPrint$1, isPrint, isPrint$1, j, j$1, r, rr, rr$1, x, x$1, x$2, x$3;
+ if (r <= 255) {
+ if (32 <= r && r <= 126) {
+ return true;
+ }
+ if (161 <= r && r <= 255) {
+ return !((r === 173));
+ }
+ return false;
+ }
+ if (0 <= r && r < 65536) {
+ _tmp = ((r << 16 >>> 16));
+ _tmp$1 = isPrint16;
+ _tmp$2 = isNotPrint16;
+ rr = _tmp;
+ isPrint = _tmp$1;
+ isNotPrint = _tmp$2;
+ i = bsearch16(isPrint, rr);
+ if (i >= isPrint.$length || rr < (x = (i & ~1) >> 0, ((x < 0 || x >= isPrint.$length) ? ($throwRuntimeError("index out of range"), undefined) : isPrint.$array[isPrint.$offset + x])) || (x$1 = i | 1, ((x$1 < 0 || x$1 >= isPrint.$length) ? ($throwRuntimeError("index out of range"), undefined) : isPrint.$array[isPrint.$offset + x$1])) < rr) {
+ return false;
+ }
+ j = bsearch16(isNotPrint, rr);
+ return j >= isNotPrint.$length || !((((j < 0 || j >= isNotPrint.$length) ? ($throwRuntimeError("index out of range"), undefined) : isNotPrint.$array[isNotPrint.$offset + j]) === rr));
+ }
+ _tmp$3 = ((r >>> 0));
+ _tmp$4 = isPrint32;
+ _tmp$5 = isNotPrint32;
+ rr$1 = _tmp$3;
+ isPrint$1 = _tmp$4;
+ isNotPrint$1 = _tmp$5;
+ i$1 = bsearch32(isPrint$1, rr$1);
+ if (i$1 >= isPrint$1.$length || rr$1 < (x$2 = (i$1 & ~1) >> 0, ((x$2 < 0 || x$2 >= isPrint$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : isPrint$1.$array[isPrint$1.$offset + x$2])) || (x$3 = i$1 | 1, ((x$3 < 0 || x$3 >= isPrint$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : isPrint$1.$array[isPrint$1.$offset + x$3])) < rr$1) {
+ return false;
+ }
+ if (r >= 131072) {
+ return true;
+ }
+ r = r - (65536) >> 0;
+ j$1 = bsearch16(isNotPrint$1, ((r << 16 >>> 16)));
+ return j$1 >= isNotPrint$1.$length || !((((j$1 < 0 || j$1 >= isNotPrint$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : isNotPrint$1.$array[isNotPrint$1.$offset + j$1]) === ((r << 16 >>> 16))));
+ };
+ $pkg.IsPrint = IsPrint;
+ isInGraphicList = function(r) {
+ var i, r, rr;
+ if (r > 65535) {
+ return false;
+ }
+ rr = ((r << 16 >>> 16));
+ i = bsearch16(isGraphic, rr);
+ return i < isGraphic.$length && (rr === ((i < 0 || i >= isGraphic.$length) ? ($throwRuntimeError("index out of range"), undefined) : isGraphic.$array[isGraphic.$offset + i]));
+ };
+ FormatUint = function(i, base) {
+ var _tuple, base, i, s;
+ if (true && (i.$high < 0 || (i.$high === 0 && i.$low < 100)) && (base === 10)) {
+ return small(((i.$low >> 0)));
+ }
+ _tuple = formatBits(sliceType$6.nil, i, base, false, false);
+ s = _tuple[1];
+ return s;
+ };
+ $pkg.FormatUint = FormatUint;
+ FormatInt = function(i, base) {
+ var _tuple, base, i, s;
+ if (true && (0 < i.$high || (0 === i.$high && 0 <= i.$low)) && (i.$high < 0 || (i.$high === 0 && i.$low < 100)) && (base === 10)) {
+ return small((((i.$low + ((i.$high >> 31) * 4294967296)) >> 0)));
+ }
+ _tuple = formatBits(sliceType$6.nil, (new $Uint64(i.$high, i.$low)), base, (i.$high < 0 || (i.$high === 0 && i.$low < 0)), false);
+ s = _tuple[1];
+ return s;
+ };
+ $pkg.FormatInt = FormatInt;
+ AppendInt = function(dst, i, base) {
+ var _tuple, base, dst, i;
+ if (true && (0 < i.$high || (0 === i.$high && 0 <= i.$low)) && (i.$high < 0 || (i.$high === 0 && i.$low < 100)) && (base === 10)) {
+ return $appendSlice(dst, small((((i.$low + ((i.$high >> 31) * 4294967296)) >> 0))));
+ }
+ _tuple = formatBits(dst, (new $Uint64(i.$high, i.$low)), base, (i.$high < 0 || (i.$high === 0 && i.$low < 0)), true);
+ dst = _tuple[0];
+ return dst;
+ };
+ $pkg.AppendInt = AppendInt;
+ AppendUint = function(dst, i, base) {
+ var _tuple, base, dst, i;
+ if (true && (i.$high < 0 || (i.$high === 0 && i.$low < 100)) && (base === 10)) {
+ return $appendSlice(dst, small(((i.$low >> 0))));
+ }
+ _tuple = formatBits(dst, i, base, false, true);
+ dst = _tuple[0];
+ return dst;
+ };
+ $pkg.AppendUint = AppendUint;
+ small = function(i) {
+ var i;
+ if (i < 10) {
+ return $substring("0123456789abcdefghijklmnopqrstuvwxyz", i, (i + 1 >> 0));
+ }
+ return $substring("00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899", ($imul(i, 2)), (($imul(i, 2)) + 2 >> 0));
+ };
+ formatBits = function(dst, u, base, neg, append_) {
+ var _q, _q$1, _r, _r$1, a, append_, b, b$1, base, d, dst, i, is, is$1, is$2, j, m, neg, q, q$1, s, shift, u, us, us$1, x, x$1, x$2, x$3, x$4, x$5;
+ d = sliceType$6.nil;
+ s = "";
+ if (base < 2 || base > 36) {
+ $panic(new $String("strconv: illegal AppendInt/FormatInt base"));
+ }
+ a = arrayType$2.zero();
+ i = 65;
+ if (neg) {
+ u = new $Uint64(-u.$high, -u.$low);
+ }
+ if (base === 10) {
+ if (true) {
+ while (true) {
+ if (!((u.$high > 0 || (u.$high === 0 && u.$low >= 1000000000)))) { break; }
+ q = $div64(u, new $Uint64(0, 1000000000), false);
+ us = (((x = $mul64(q, new $Uint64(0, 1000000000)), new $Uint64(u.$high - x.$high, u.$low - x.$low)).$low >>> 0));
+ j = 4;
+ while (true) {
+ if (!(j > 0)) { break; }
+ is = (_r = us % 100, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) * 2 >>> 0;
+ us = (_q = us / (100), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero"));
+ i = i - (2) >> 0;
+ (x$1 = i + 1 >> 0, ((x$1 < 0 || x$1 >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[x$1] = "00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt((is + 1 >>> 0))));
+ (x$2 = i + 0 >> 0, ((x$2 < 0 || x$2 >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[x$2] = "00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt((is + 0 >>> 0))));
+ j = j - (1) >> 0;
+ }
+ i = i - (1) >> 0;
+ ((i < 0 || i >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[i] = "00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt(((us * 2 >>> 0) + 1 >>> 0)));
+ u = q;
+ }
+ }
+ us$1 = ((u.$low >>> 0));
+ while (true) {
+ if (!(us$1 >= 100)) { break; }
+ is$1 = (_r$1 = us$1 % 100, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) * 2 >>> 0;
+ us$1 = (_q$1 = us$1 / (100), (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >>> 0 : $throwRuntimeError("integer divide by zero"));
+ i = i - (2) >> 0;
+ (x$3 = i + 1 >> 0, ((x$3 < 0 || x$3 >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[x$3] = "00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt((is$1 + 1 >>> 0))));
+ (x$4 = i + 0 >> 0, ((x$4 < 0 || x$4 >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[x$4] = "00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt((is$1 + 0 >>> 0))));
+ }
+ is$2 = us$1 * 2 >>> 0;
+ i = i - (1) >> 0;
+ ((i < 0 || i >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[i] = "00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt((is$2 + 1 >>> 0)));
+ if (us$1 >= 10) {
+ i = i - (1) >> 0;
+ ((i < 0 || i >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[i] = "00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt(is$2));
+ }
+ } else if (isPowerOfTwo(base)) {
+ shift = (((bits.TrailingZeros(((base >>> 0))) >>> 0)) & 7) >>> 0;
+ b = (new $Uint64(0, base));
+ m = ((base >>> 0)) - 1 >>> 0;
+ while (true) {
+ if (!((u.$high > b.$high || (u.$high === b.$high && u.$low >= b.$low)))) { break; }
+ i = i - (1) >> 0;
+ ((i < 0 || i >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[i] = "0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt(((((u.$low >>> 0)) & m) >>> 0)));
+ u = $shiftRightUint64(u, (shift));
+ }
+ i = i - (1) >> 0;
+ ((i < 0 || i >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[i] = "0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt(((u.$low >>> 0))));
+ } else {
+ b$1 = (new $Uint64(0, base));
+ while (true) {
+ if (!((u.$high > b$1.$high || (u.$high === b$1.$high && u.$low >= b$1.$low)))) { break; }
+ i = i - (1) >> 0;
+ q$1 = $div64(u, b$1, false);
+ ((i < 0 || i >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[i] = "0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt((((x$5 = $mul64(q$1, b$1), new $Uint64(u.$high - x$5.$high, u.$low - x$5.$low)).$low >>> 0))));
+ u = q$1;
+ }
+ i = i - (1) >> 0;
+ ((i < 0 || i >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[i] = "0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt(((u.$low >>> 0))));
+ }
+ if (neg) {
+ i = i - (1) >> 0;
+ ((i < 0 || i >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[i] = 45);
+ }
+ if (append_) {
+ d = $appendSlice(dst, $subslice(new sliceType$6(a), i));
+ return [d, s];
+ }
+ s = ($bytesToString($subslice(new sliceType$6(a), i)));
+ return [d, s];
+ };
+ isPowerOfTwo = function(x) {
+ var x;
+ return (x & ((x - 1 >> 0))) === 0;
+ };
+ ryuFtoaFixed32 = function(d, mant, exp, prec) {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, d, d0, dexp2, dfrac, di, e2, exact, exp, extra, extraMask, mant, prec, q, roundUp, y, y$1, y$2, y$3, y$4, y$5, y$6;
+ if (prec < 0) {
+ $panic(new $String("ryuFtoaFixed32 called with negative prec"));
+ }
+ if (prec > 9) {
+ $panic(new $String("ryuFtoaFixed32 called with prec > 9"));
+ }
+ if (mant === 0) {
+ _tmp = 0;
+ _tmp$1 = 0;
+ d.nd = _tmp;
+ d.dp = _tmp$1;
+ return;
+ }
+ e2 = exp;
+ b = bits.Len32(mant);
+ if (b < 25) {
+ mant = (y = ((((25 - b >> 0) >>> 0))), y < 32 ? (mant << y) : 0) >>> 0;
+ e2 = e2 + (((b) - 25 >> 0)) >> 0;
+ }
+ q = (-mulByLog2Log10(e2 + 24 >> 0) + prec >> 0) - 1 >> 0;
+ exact = q <= 27 && q >= 0;
+ _tuple = mult64bitPow10(mant, e2, q);
+ di = _tuple[0];
+ dexp2 = _tuple[1];
+ d0 = _tuple[2];
+ if (dexp2 >= 0) {
+ $panic(new $String("not enough significant bits after mult64bitPow10"));
+ }
+ if (q < 0 && q >= -10 && divisibleByPower5((new $Uint64(0, mant)), -q)) {
+ exact = true;
+ d0 = true;
+ }
+ extra = ((-dexp2 >>> 0));
+ extraMask = ((((y$1 = extra, y$1 < 32 ? (1 << y$1) : 0) >>> 0) - 1 >>> 0));
+ _tmp$2 = (y$2 = extra, y$2 < 32 ? (di >>> y$2) : 0) >>> 0;
+ _tmp$3 = (di & extraMask) >>> 0;
+ di = _tmp$2;
+ dfrac = _tmp$3;
+ roundUp = false;
+ if (exact) {
+ roundUp = dfrac > ((y$3 = ((extra - 1 >>> 0)), y$3 < 32 ? (1 << y$3) : 0) >>> 0) || ((dfrac === ((y$4 = ((extra - 1 >>> 0)), y$4 < 32 ? (1 << y$4) : 0) >>> 0)) && !d0) || ((dfrac === ((y$5 = ((extra - 1 >>> 0)), y$5 < 32 ? (1 << y$5) : 0) >>> 0)) && d0 && (((di & 1) >>> 0) === 1));
+ } else {
+ roundUp = ((y$6 = ((extra - 1 >>> 0)), y$6 < 32 ? (dfrac >>> y$6) : 0) >>> 0) === 1;
+ }
+ if (!((dfrac === 0))) {
+ d0 = false;
+ }
+ formatDecimal(d, (new $Uint64(0, di)), !d0, roundUp, prec);
+ d.dp = d.dp - (q) >> 0;
+ };
+ ryuFtoaFixed64 = function(d, mant, exp, prec) {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, d, d0, dexp2, dfrac, di, e2, exact, exp, extra, extraMask, mant, prec, q, roundUp, x, x$1, x$2, x$3, x$4, x$5;
+ if (prec > 18) {
+ $panic(new $String("ryuFtoaFixed64 called with prec > 18"));
+ }
+ if ((mant.$high === 0 && mant.$low === 0)) {
+ _tmp = 0;
+ _tmp$1 = 0;
+ d.nd = _tmp;
+ d.dp = _tmp$1;
+ return;
+ }
+ e2 = exp;
+ b = bits.Len64(mant);
+ if (b < 55) {
+ mant = $shiftLeft64(mant, (((55 - b >> 0) >>> 0)));
+ e2 = e2 + (((b) - 55 >> 0)) >> 0;
+ }
+ q = (-mulByLog2Log10(e2 + 54 >> 0) + prec >> 0) - 1 >> 0;
+ exact = q <= 55 && q >= 0;
+ _tuple = mult128bitPow10(mant, e2, q);
+ di = _tuple[0];
+ dexp2 = _tuple[1];
+ d0 = _tuple[2];
+ if (dexp2 >= 0) {
+ $panic(new $String("not enough significant bits after mult128bitPow10"));
+ }
+ if (q < 0 && q >= -22 && divisibleByPower5(mant, -q)) {
+ exact = true;
+ d0 = true;
+ }
+ extra = ((-dexp2 >>> 0));
+ extraMask = ((x = $shiftLeft64(new $Uint64(0, 1), extra), new $Uint64(x.$high - 0, x.$low - 1)));
+ _tmp$2 = $shiftRightUint64(di, extra);
+ _tmp$3 = new $Uint64(di.$high & extraMask.$high, (di.$low & extraMask.$low) >>> 0);
+ di = _tmp$2;
+ dfrac = _tmp$3;
+ roundUp = false;
+ if (exact) {
+ roundUp = (x$1 = $shiftLeft64(new $Uint64(0, 1), ((extra - 1 >>> 0))), (dfrac.$high > x$1.$high || (dfrac.$high === x$1.$high && dfrac.$low > x$1.$low))) || ((x$2 = $shiftLeft64(new $Uint64(0, 1), ((extra - 1 >>> 0))), (dfrac.$high === x$2.$high && dfrac.$low === x$2.$low)) && !d0) || ((x$3 = $shiftLeft64(new $Uint64(0, 1), ((extra - 1 >>> 0))), (dfrac.$high === x$3.$high && dfrac.$low === x$3.$low)) && d0 && (x$4 = new $Uint64(di.$high & 0, (di.$low & 1) >>> 0), (x$4.$high === 0 && x$4.$low === 1)));
+ } else {
+ roundUp = (x$5 = $shiftRightUint64(dfrac, ((extra - 1 >>> 0))), (x$5.$high === 0 && x$5.$low === 1));
+ }
+ if (!((dfrac.$high === 0 && dfrac.$low === 0))) {
+ d0 = false;
+ }
+ formatDecimal(d, di, !d0, roundUp, prec);
+ d.dp = d.dp - (q) >> 0;
+ };
+ formatDecimal = function(d, m, trunc, roundUp, prec) {
+ var _q, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, a, b, d, m, max$1, n, prec, roundUp, trimmed, trunc, v, v1, v2, x, x$1, x$10, x$11, x$12, x$13, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9;
+ max$1 = ((prec < 0 || prec >= uint64pow10.length) ? ($throwRuntimeError("index out of range"), undefined) : uint64pow10[prec]);
+ trimmed = 0;
+ while (true) {
+ if (!((m.$high > max$1.$high || (m.$high === max$1.$high && m.$low >= max$1.$low)))) { break; }
+ _tmp = $div64(m, new $Uint64(0, 10), false);
+ _tmp$1 = $div64(m, new $Uint64(0, 10), true);
+ a = _tmp;
+ b = _tmp$1;
+ m = a;
+ trimmed = trimmed + (1) >> 0;
+ if ((b.$high > 0 || (b.$high === 0 && b.$low > 5))) {
+ roundUp = true;
+ } else if ((b.$high < 0 || (b.$high === 0 && b.$low < 5))) {
+ roundUp = false;
+ } else {
+ roundUp = trunc || (x = new $Uint64(m.$high & 0, (m.$low & 1) >>> 0), (x.$high === 0 && x.$low === 1));
+ }
+ if (!((b.$high === 0 && b.$low === 0))) {
+ trunc = true;
+ }
+ }
+ if (roundUp) {
+ m = (x$1 = new $Uint64(0, 1), new $Uint64(m.$high + x$1.$high, m.$low + x$1.$low));
+ }
+ if ((m.$high > max$1.$high || (m.$high === max$1.$high && m.$low >= max$1.$low))) {
+ m = $div64(m, (new $Uint64(0, 10)), false);
+ trimmed = trimmed + (1) >> 0;
+ }
+ n = ((prec >>> 0));
+ d.nd = (prec);
+ v = m;
+ while (true) {
+ if (!((v.$high > 0 || (v.$high === 0 && v.$low >= 100)))) { break; }
+ _tmp$2 = new $Uint64(0, 0);
+ _tmp$3 = new $Uint64(0, 0);
+ v1 = _tmp$2;
+ v2 = _tmp$3;
+ if ((x$2 = $shiftRightUint64(v, 32), (x$2.$high === 0 && x$2.$low === 0))) {
+ _tmp$4 = (new $Uint64(0, (_q = ((v.$low >>> 0)) / 100, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero"))));
+ _tmp$5 = (new $Uint64(0, (_r = ((v.$low >>> 0)) % 100, _r === _r ? _r : $throwRuntimeError("integer divide by zero"))));
+ v1 = _tmp$4;
+ v2 = _tmp$5;
+ } else {
+ _tmp$6 = $div64(v, new $Uint64(0, 100), false);
+ _tmp$7 = $div64(v, new $Uint64(0, 100), true);
+ v1 = _tmp$6;
+ v2 = _tmp$7;
+ }
+ n = n - (2) >>> 0;
+ (x$4 = d.d, x$5 = n + 1 >>> 0, ((x$5 < 0 || x$5 >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + x$5] = "00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt($flatten64((x$3 = $mul64(new $Uint64(0, 2), v2), new $Uint64(x$3.$high + 0, x$3.$low + 1))))));
+ (x$7 = d.d, x$8 = n + 0 >>> 0, ((x$8 < 0 || x$8 >= x$7.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$7.$array[x$7.$offset + x$8] = "00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt($flatten64((x$6 = $mul64(new $Uint64(0, 2), v2), new $Uint64(x$6.$high + 0, x$6.$low + 0))))));
+ v = v1;
+ }
+ if ((v.$high > 0 || (v.$high === 0 && v.$low > 0))) {
+ n = n - (1) >>> 0;
+ (x$10 = d.d, ((n < 0 || n >= x$10.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$10.$array[x$10.$offset + n] = "00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt($flatten64((x$9 = $mul64(new $Uint64(0, 2), v), new $Uint64(x$9.$high + 0, x$9.$low + 1))))));
+ }
+ if ((v.$high > 0 || (v.$high === 0 && v.$low >= 10))) {
+ n = n - (1) >>> 0;
+ (x$11 = d.d, ((n < 0 || n >= x$11.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$11.$array[x$11.$offset + n] = "00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt($flatten64($mul64(new $Uint64(0, 2), v)))));
+ }
+ while (true) {
+ if (!((x$12 = d.d, x$13 = d.nd - 1 >> 0, ((x$13 < 0 || x$13 >= x$12.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$12.$array[x$12.$offset + x$13])) === 48)) { break; }
+ d.nd = d.nd - (1) >> 0;
+ trimmed = trimmed + (1) >> 0;
+ }
+ d.dp = d.nd + trimmed >> 0;
+ };
+ ryuFtoaShortest = function(d, mant, exp, flt) {
+ var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, c0, cup, d, dc, dc0, dc32, dl, dl0, dl32, du, du0, du32, e2, exp, extra, extraMask, flt, fracc, fracl, fracu, lok, mant, mc, ml, mu, q, uok, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8;
+ if ((mant.$high === 0 && mant.$low === 0)) {
+ _tmp = 0;
+ _tmp$1 = 0;
+ d.nd = _tmp;
+ d.dp = _tmp$1;
+ return;
+ }
+ if (exp <= 0 && bits.TrailingZeros64(mant) >= -exp) {
+ mant = $shiftRightUint64(mant, (((-exp >>> 0))));
+ ryuDigits(d, mant, mant, mant, true, false);
+ return;
+ }
+ _tuple = computeBounds(mant, exp, flt);
+ ml = _tuple[0];
+ mc = _tuple[1];
+ mu = _tuple[2];
+ e2 = _tuple[3];
+ if (e2 === 0) {
+ ryuDigits(d, ml, mc, mu, true, false);
+ return;
+ }
+ q = mulByLog2Log10(-e2) + 1 >> 0;
+ _tmp$2 = new $Uint64(0, 0);
+ _tmp$3 = new $Uint64(0, 0);
+ _tmp$4 = new $Uint64(0, 0);
+ dl = _tmp$2;
+ dc = _tmp$3;
+ du = _tmp$4;
+ _tmp$5 = false;
+ _tmp$6 = false;
+ _tmp$7 = false;
+ dl0 = _tmp$5;
+ dc0 = _tmp$6;
+ du0 = _tmp$7;
+ if (flt === float32info) {
+ _tmp$8 = 0;
+ _tmp$9 = 0;
+ _tmp$10 = 0;
+ dl32 = _tmp$8;
+ dc32 = _tmp$9;
+ du32 = _tmp$10;
+ _tuple$1 = mult64bitPow10(((ml.$low >>> 0)), e2, q);
+ dl32 = _tuple$1[0];
+ dl0 = _tuple$1[2];
+ _tuple$2 = mult64bitPow10(((mc.$low >>> 0)), e2, q);
+ dc32 = _tuple$2[0];
+ dc0 = _tuple$2[2];
+ _tuple$3 = mult64bitPow10(((mu.$low >>> 0)), e2, q);
+ du32 = _tuple$3[0];
+ e2 = _tuple$3[1];
+ du0 = _tuple$3[2];
+ _tmp$11 = (new $Uint64(0, dl32));
+ _tmp$12 = (new $Uint64(0, dc32));
+ _tmp$13 = (new $Uint64(0, du32));
+ dl = _tmp$11;
+ dc = _tmp$12;
+ du = _tmp$13;
+ } else {
+ _tuple$4 = mult128bitPow10(ml, e2, q);
+ dl = _tuple$4[0];
+ dl0 = _tuple$4[2];
+ _tuple$5 = mult128bitPow10(mc, e2, q);
+ dc = _tuple$5[0];
+ dc0 = _tuple$5[2];
+ _tuple$6 = mult128bitPow10(mu, e2, q);
+ du = _tuple$6[0];
+ e2 = _tuple$6[1];
+ du0 = _tuple$6[2];
+ }
+ if (e2 >= 0) {
+ $panic(new $String("not enough significant bits after mult128bitPow10"));
+ }
+ if (q > 55) {
+ _tmp$14 = false;
+ _tmp$15 = false;
+ _tmp$16 = false;
+ dl0 = _tmp$14;
+ dc0 = _tmp$15;
+ du0 = _tmp$16;
+ }
+ if (q < 0 && q >= -24) {
+ if (divisibleByPower5(ml, -q)) {
+ dl0 = true;
+ }
+ if (divisibleByPower5(mc, -q)) {
+ dc0 = true;
+ }
+ if (divisibleByPower5(mu, -q)) {
+ du0 = true;
+ }
+ }
+ extra = ((-e2 >>> 0));
+ extraMask = ((x = $shiftLeft64(new $Uint64(0, 1), extra), new $Uint64(x.$high - 0, x.$low - 1)));
+ _tmp$17 = $shiftRightUint64(dl, extra);
+ _tmp$18 = new $Uint64(dl.$high & extraMask.$high, (dl.$low & extraMask.$low) >>> 0);
+ dl = _tmp$17;
+ fracl = _tmp$18;
+ _tmp$19 = $shiftRightUint64(dc, extra);
+ _tmp$20 = new $Uint64(dc.$high & extraMask.$high, (dc.$low & extraMask.$low) >>> 0);
+ dc = _tmp$19;
+ fracc = _tmp$20;
+ _tmp$21 = $shiftRightUint64(du, extra);
+ _tmp$22 = new $Uint64(du.$high & extraMask.$high, (du.$low & extraMask.$low) >>> 0);
+ du = _tmp$21;
+ fracu = _tmp$22;
+ uok = !du0 || (fracu.$high > 0 || (fracu.$high === 0 && fracu.$low > 0));
+ if (du0 && (fracu.$high === 0 && fracu.$low === 0)) {
+ uok = (x$1 = new $Uint64(mant.$high & 0, (mant.$low & 1) >>> 0), (x$1.$high === 0 && x$1.$low === 0));
+ }
+ if (!uok) {
+ du = (x$2 = new $Uint64(0, 1), new $Uint64(du.$high - x$2.$high, du.$low - x$2.$low));
+ }
+ cup = false;
+ if (dc0) {
+ cup = (x$3 = $shiftLeft64(new $Uint64(0, 1), ((extra - 1 >>> 0))), (fracc.$high > x$3.$high || (fracc.$high === x$3.$high && fracc.$low > x$3.$low))) || ((x$4 = $shiftLeft64(new $Uint64(0, 1), ((extra - 1 >>> 0))), (fracc.$high === x$4.$high && fracc.$low === x$4.$low)) && (x$5 = new $Uint64(dc.$high & 0, (dc.$low & 1) >>> 0), (x$5.$high === 0 && x$5.$low === 1)));
+ } else {
+ cup = (x$6 = $shiftRightUint64(fracc, ((extra - 1 >>> 0))), (x$6.$high === 0 && x$6.$low === 1));
+ }
+ lok = dl0 && (fracl.$high === 0 && fracl.$low === 0) && ((x$7 = new $Uint64(mant.$high & 0, (mant.$low & 1) >>> 0), (x$7.$high === 0 && x$7.$low === 0)));
+ if (!lok) {
+ dl = (x$8 = new $Uint64(0, 1), new $Uint64(dl.$high + x$8.$high, dl.$low + x$8.$low));
+ }
+ c0 = dc0 && (fracc.$high === 0 && fracc.$low === 0);
+ ryuDigits(d, dl, dc, du, c0, cup);
+ d.dp = d.dp - (q) >> 0;
+ };
+ mulByLog2Log10 = function(x) {
+ var x;
+ return (($imul(x, 78913))) >> 18 >> 0;
+ };
+ mulByLog10Log2 = function(x) {
+ var x;
+ return (($imul(x, 108853))) >> 15 >> 0;
+ };
+ computeBounds = function(mant, exp, flt) {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, central, e2, exp, flt, lower$1, mant, upper, x, x$1, x$2, x$3, x$4;
+ lower$1 = new $Uint64(0, 0);
+ central = new $Uint64(0, 0);
+ upper = new $Uint64(0, 0);
+ e2 = 0;
+ if (!((x = $shiftLeft64(new $Uint64(0, 1), flt.mantbits), (mant.$high === x.$high && mant.$low === x.$low))) || (exp === ((flt.bias + 1 >> 0) - ((flt.mantbits >> 0)) >> 0))) {
+ _tmp = (x$1 = $mul64(new $Uint64(0, 2), mant), new $Uint64(x$1.$high - 0, x$1.$low - 1));
+ _tmp$1 = $mul64(new $Uint64(0, 2), mant);
+ _tmp$2 = (x$2 = $mul64(new $Uint64(0, 2), mant), new $Uint64(x$2.$high + 0, x$2.$low + 1));
+ lower$1 = _tmp;
+ central = _tmp$1;
+ upper = _tmp$2;
+ e2 = exp - 1 >> 0;
+ return [lower$1, central, upper, e2];
+ } else {
+ _tmp$3 = (x$3 = $mul64(new $Uint64(0, 4), mant), new $Uint64(x$3.$high - 0, x$3.$low - 1));
+ _tmp$4 = $mul64(new $Uint64(0, 4), mant);
+ _tmp$5 = (x$4 = $mul64(new $Uint64(0, 4), mant), new $Uint64(x$4.$high + 0, x$4.$low + 2));
+ lower$1 = _tmp$3;
+ central = _tmp$4;
+ upper = _tmp$5;
+ e2 = exp - 2 >> 0;
+ return [lower$1, central, upper, e2];
+ }
+ };
+ ryuDigits = function(d, lower$1, central, upper, c0, cup) {
+ var _q, _r, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, c0, central, chi, clo, cup, d, lhi, llo, lower$1, n, uhi, ulo, upper, v, v1, v2, x, x$1, x$2, x$3;
+ _tuple = divmod1e9(lower$1);
+ lhi = _tuple[0];
+ llo = _tuple[1];
+ _tuple$1 = divmod1e9(central);
+ chi = _tuple$1[0];
+ clo = _tuple$1[1];
+ _tuple$2 = divmod1e9(upper);
+ uhi = _tuple$2[0];
+ ulo = _tuple$2[1];
+ if (uhi === 0) {
+ ryuDigits32(d, llo, clo, ulo, c0, cup, 8);
+ } else if (lhi < uhi) {
+ if (!((llo === 0))) {
+ lhi = lhi + (1) >>> 0;
+ }
+ c0 = c0 && (clo === 0);
+ cup = (clo > 500000000) || ((clo === 500000000) && cup);
+ ryuDigits32(d, lhi, chi, uhi, c0, cup, 8);
+ d.dp = d.dp + (9) >> 0;
+ } else {
+ d.nd = 0;
+ n = 9;
+ v = chi;
+ while (true) {
+ if (!(v > 0)) { break; }
+ _tmp = (_q = v / 10, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero"));
+ _tmp$1 = (_r = v % 10, _r === _r ? _r : $throwRuntimeError("integer divide by zero"));
+ v1 = _tmp;
+ v2 = _tmp$1;
+ v = v1;
+ n = n - (1) >>> 0;
+ (x = d.d, ((n < 0 || n >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + n] = (((v2 + 48 >>> 0) << 24 >>> 24))));
+ }
+ d.d = $subslice(d.d, n);
+ d.nd = (((9 - n >>> 0) >> 0));
+ ryuDigits32(d, llo, clo, ulo, c0, cup, d.nd + 8 >> 0);
+ }
+ while (true) {
+ if (!(d.nd > 0 && ((x$1 = d.d, x$2 = d.nd - 1 >> 0, ((x$2 < 0 || x$2 >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + x$2])) === 48))) { break; }
+ d.nd = d.nd - (1) >> 0;
+ }
+ while (true) {
+ if (!(d.nd > 0 && ((x$3 = d.d, (0 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 0])) === 48))) { break; }
+ d.nd = d.nd - (1) >> 0;
+ d.dp = d.dp - (1) >> 0;
+ d.d = $subslice(d.d, 1);
+ }
+ };
+ ryuDigits32 = function(d, lower$1, central, upper, c0, cup, endindex) {
+ var _q, _q$1, _q$2, _q$3, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, c, c0, cNextDigit, cdigit, central, cup, d, endindex, l, lower$1, n, trimmed, u, upper, v, v1, v2, x, x$1, x$2, x$3;
+ if (upper === 0) {
+ d.dp = endindex + 1 >> 0;
+ return;
+ }
+ trimmed = 0;
+ cNextDigit = 0;
+ while (true) {
+ if (!(upper > 0)) { break; }
+ l = (_q = ((lower$1 + 9 >>> 0)) / 10, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero"));
+ _tmp = (_q$1 = central / 10, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >>> 0 : $throwRuntimeError("integer divide by zero"));
+ _tmp$1 = (_r = central % 10, _r === _r ? _r : $throwRuntimeError("integer divide by zero"));
+ c = _tmp;
+ cdigit = _tmp$1;
+ u = (_q$2 = upper / 10, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >>> 0 : $throwRuntimeError("integer divide by zero"));
+ if (l > u) {
+ break;
+ }
+ if ((l === (c + 1 >>> 0)) && c < u) {
+ c = c + (1) >>> 0;
+ cdigit = 0;
+ cup = false;
+ }
+ trimmed = trimmed + (1) >> 0;
+ c0 = c0 && (cNextDigit === 0);
+ cNextDigit = ((cdigit >> 0));
+ _tmp$2 = l;
+ _tmp$3 = c;
+ _tmp$4 = u;
+ lower$1 = _tmp$2;
+ central = _tmp$3;
+ upper = _tmp$4;
+ }
+ if (trimmed > 0) {
+ cup = cNextDigit > 5 || ((cNextDigit === 5) && !c0) || ((cNextDigit === 5) && c0 && (((central & 1) >>> 0) === 1));
+ }
+ if (central < upper && cup) {
+ central = central + (1) >>> 0;
+ }
+ endindex = endindex - (trimmed) >> 0;
+ v = central;
+ n = endindex;
+ while (true) {
+ if (!(n > d.nd)) { break; }
+ _tmp$5 = (_q$3 = v / 100, (_q$3 === _q$3 && _q$3 !== 1/0 && _q$3 !== -1/0) ? _q$3 >>> 0 : $throwRuntimeError("integer divide by zero"));
+ _tmp$6 = (_r$1 = v % 100, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero"));
+ v1 = _tmp$5;
+ v2 = _tmp$6;
+ (x = d.d, ((n < 0 || n >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + n] = "00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt((($imul(2, v2) >>> 0) + 1 >>> 0))));
+ (x$1 = d.d, x$2 = n - 1 >> 0, ((x$2 < 0 || x$2 >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + x$2] = "00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt((($imul(2, v2) >>> 0) + 0 >>> 0))));
+ n = n - (2) >> 0;
+ v = v1;
+ }
+ if (n === d.nd) {
+ (x$3 = d.d, ((n < 0 || n >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + n] = (((v + 48 >>> 0) << 24 >>> 24))));
+ }
+ d.nd = endindex + 1 >> 0;
+ d.dp = d.nd + trimmed >> 0;
+ };
+ mult64bitPow10 = function(m, e2, q) {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, e2, exact, hi, lo, m, pow, q, resE, resM, x, x$1, x$2, x$3, x$4;
+ resM = 0;
+ resE = 0;
+ exact = false;
+ if (q === 0) {
+ _tmp = m << 6 >>> 0;
+ _tmp$1 = e2 - 6 >> 0;
+ _tmp$2 = true;
+ resM = _tmp;
+ resE = _tmp$1;
+ exact = _tmp$2;
+ return [resM, resE, exact];
+ }
+ if (q < -348 || 347 < q) {
+ $panic(new $String("mult64bitPow10: power of 10 is out of range"));
+ }
+ pow = (x = q - -348 >> 0, ((x < 0 || x >= detailedPowersOfTen.length) ? ($throwRuntimeError("index out of range"), undefined) : detailedPowersOfTen[x]))[1];
+ if (q < 0) {
+ pow = (x$1 = new $Uint64(0, 1), new $Uint64(pow.$high + x$1.$high, pow.$low + x$1.$low));
+ }
+ _tuple = bits.Mul64((new $Uint64(0, m)), pow);
+ hi = _tuple[0];
+ lo = _tuple[1];
+ e2 = e2 + (((mulByLog10Log2(q) - 63 >> 0) + 57 >> 0)) >> 0;
+ _tmp$3 = (((x$2 = $shiftLeft64(hi, 7), x$3 = $shiftRightUint64(lo, 57), new $Uint64(x$2.$high | x$3.$high, (x$2.$low | x$3.$low) >>> 0)).$low >>> 0));
+ _tmp$4 = e2;
+ _tmp$5 = (x$4 = $shiftLeft64(lo, 7), (x$4.$high === 0 && x$4.$low === 0));
+ resM = _tmp$3;
+ resE = _tmp$4;
+ exact = _tmp$5;
+ return [resM, resE, exact];
+ };
+ mult128bitPow10 = function(m, e2, q) {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, _tuple$2, carry, e2, exact, h0, h1, l0, l1, m, mid, pow, q, resE, resM, x, x$1, x$2, x$3, x$4, x$5, x$6;
+ resM = new $Uint64(0, 0);
+ resE = 0;
+ exact = false;
+ if (q === 0) {
+ _tmp = $shiftLeft64(m, 8);
+ _tmp$1 = e2 - 8 >> 0;
+ _tmp$2 = true;
+ resM = _tmp;
+ resE = _tmp$1;
+ exact = _tmp$2;
+ return [resM, resE, exact];
+ }
+ if (q < -348 || 347 < q) {
+ $panic(new $String("mult128bitPow10: power of 10 is out of range"));
+ }
+ pow = $clone((x = q - -348 >> 0, ((x < 0 || x >= detailedPowersOfTen.length) ? ($throwRuntimeError("index out of range"), undefined) : detailedPowersOfTen[x])), arrayType);
+ if (q < 0) {
+ pow[0] = (x$1 = pow[0], x$2 = new $Uint64(0, 1), new $Uint64(x$1.$high + x$2.$high, x$1.$low + x$2.$low));
+ }
+ e2 = e2 + (((mulByLog10Log2(q) - 127 >> 0) + 119 >> 0)) >> 0;
+ _tuple = bits.Mul64(m, pow[0]);
+ l1 = _tuple[0];
+ l0 = _tuple[1];
+ _tuple$1 = bits.Mul64(m, pow[1]);
+ h1 = _tuple$1[0];
+ h0 = _tuple$1[1];
+ _tuple$2 = bits.Add64(l1, h0, new $Uint64(0, 0));
+ mid = _tuple$2[0];
+ carry = _tuple$2[1];
+ h1 = (x$3 = carry, new $Uint64(h1.$high + x$3.$high, h1.$low + x$3.$low));
+ _tmp$3 = (x$4 = $shiftLeft64(h1, 9), x$5 = $shiftRightUint64(mid, 55), new $Uint64(x$4.$high | x$5.$high, (x$4.$low | x$5.$low) >>> 0));
+ _tmp$4 = e2;
+ _tmp$5 = (x$6 = $shiftLeft64(mid, 9), (x$6.$high === 0 && x$6.$low === 0)) && (l0.$high === 0 && l0.$low === 0);
+ resM = _tmp$3;
+ resE = _tmp$4;
+ exact = _tmp$5;
+ return [resM, resE, exact];
+ };
+ divisibleByPower5 = function(m, k) {
+ var i, k, m, x;
+ if ((m.$high === 0 && m.$low === 0)) {
+ return true;
+ }
+ i = 0;
+ while (true) {
+ if (!(i < k)) { break; }
+ if (!((x = $div64(m, new $Uint64(0, 5), true), (x.$high === 0 && x.$low === 0)))) {
+ return false;
+ }
+ m = $div64(m, (new $Uint64(0, 5)), false);
+ i = i + (1) >> 0;
+ }
+ return true;
+ };
+ divmod1e9 = function(x) {
+ var _tuple, hi, q, x, x$1;
+ if (false) {
+ return [(($div64(x, new $Uint64(0, 1000000000), false).$low >>> 0)), (($div64(x, new $Uint64(0, 1000000000), true).$low >>> 0))];
+ }
+ _tuple = bits.Mul64($shiftRightUint64(x, 1), new $Uint64(2305843009, 917808536));
+ hi = _tuple[0];
+ q = $shiftRightUint64(hi, 28);
+ return [((q.$low >>> 0)), (((x$1 = $mul64(q, new $Uint64(0, 1000000000)), new $Uint64(x.$high - x$1.$high, x.$low - x$1.$low)).$low >>> 0))];
+ };
+ FormatFloat = function(f, fmt, prec, bitSize) {
+ var bitSize, f, fmt, prec;
+ return ($bytesToString(genericFtoa($makeSlice(sliceType$6, 0, max(prec + 4 >> 0, 24)), f, fmt, prec, bitSize)));
+ };
+ $pkg.FormatFloat = FormatFloat;
+ AppendFloat = function(dst, f, fmt, prec, bitSize) {
+ var bitSize, dst, f, fmt, prec;
+ return genericFtoa(dst, f, fmt, prec, bitSize);
+ };
+ $pkg.AppendFloat = AppendFloat;
+ genericFtoa = function(dst, val, fmt, prec, bitSize) {
+ var _1, _2, _3, _4, bitSize, bits$1, buf, buf$1, digits, digs, dst, exp, flt, fmt, mant, neg, ok, prec, s, shortest, val, x, x$1, x$2, x$3, y, y$1;
+ bits$1 = new $Uint64(0, 0);
+ flt = ptrType.nil;
+ _1 = bitSize;
+ if (_1 === (32)) {
+ bits$1 = (new $Uint64(0, math.Float32bits(($fround(val)))));
+ flt = float32info;
+ } else if (_1 === (64)) {
+ bits$1 = math.Float64bits(val);
+ flt = float64info;
+ } else {
+ $panic(new $String("strconv: illegal AppendFloat/FormatFloat bitSize"));
+ }
+ neg = !((x = $shiftRightUint64(bits$1, ((flt.expbits + flt.mantbits >>> 0))), (x.$high === 0 && x.$low === 0)));
+ exp = (($shiftRightUint64(bits$1, flt.mantbits).$low >> 0)) & ((((y = flt.expbits, y < 32 ? (1 << y) : 0) >> 0) - 1 >> 0));
+ mant = (x$1 = (x$2 = $shiftLeft64(new $Uint64(0, 1), flt.mantbits), new $Uint64(x$2.$high - 0, x$2.$low - 1)), new $Uint64(bits$1.$high & x$1.$high, (bits$1.$low & x$1.$low) >>> 0));
+ _2 = exp;
+ if (_2 === ((((y$1 = flt.expbits, y$1 < 32 ? (1 << y$1) : 0) >> 0) - 1 >> 0))) {
+ s = "";
+ if (!((mant.$high === 0 && mant.$low === 0))) {
+ s = "NaN";
+ } else if (neg) {
+ s = "-Inf";
+ } else {
+ s = "+Inf";
+ }
+ return $appendSlice(dst, s);
+ } else if (_2 === (0)) {
+ exp = exp + (1) >> 0;
+ } else {
+ mant = (x$3 = $shiftLeft64(new $Uint64(0, 1), flt.mantbits), new $Uint64(mant.$high | x$3.$high, (mant.$low | x$3.$low) >>> 0));
+ }
+ exp = exp + (flt.bias) >> 0;
+ if (fmt === 98) {
+ return fmtB(dst, neg, mant, exp, flt);
+ }
+ if ((fmt === 120) || (fmt === 88)) {
+ return fmtX(dst, prec, fmt, neg, mant, exp, flt);
+ }
+ if (!optimize) {
+ return bigFtoa(dst, prec, fmt, neg, mant, exp, flt);
+ }
+ digs = new decimalSlice.ptr(sliceType$6.nil, 0, 0, false);
+ ok = false;
+ shortest = prec < 0;
+ if (shortest) {
+ buf = arrayType$3.zero();
+ digs.d = new sliceType$6(buf);
+ ryuFtoaShortest(digs, mant, exp - ((flt.mantbits >> 0)) >> 0, flt);
+ ok = true;
+ _3 = fmt;
+ if ((_3 === (101)) || (_3 === (69))) {
+ prec = max(digs.nd - 1 >> 0, 0);
+ } else if (_3 === (102)) {
+ prec = max(digs.nd - digs.dp >> 0, 0);
+ } else if ((_3 === (103)) || (_3 === (71))) {
+ prec = digs.nd;
+ }
+ } else if (!((fmt === 102))) {
+ digits = prec;
+ _4 = fmt;
+ if ((_4 === (101)) || (_4 === (69))) {
+ digits = digits + (1) >> 0;
+ } else if ((_4 === (103)) || (_4 === (71))) {
+ if (prec === 0) {
+ prec = 1;
+ }
+ digits = prec;
+ }
+ buf$1 = arrayType$4.zero();
+ if ((bitSize === 32) && digits <= 9) {
+ digs.d = new sliceType$6(buf$1);
+ ryuFtoaFixed32(digs, ((mant.$low >>> 0)), exp - ((flt.mantbits >> 0)) >> 0, digits);
+ ok = true;
+ } else if (digits <= 18) {
+ digs.d = new sliceType$6(buf$1);
+ ryuFtoaFixed64(digs, mant, exp - ((flt.mantbits >> 0)) >> 0, digits);
+ ok = true;
+ }
+ }
+ if (!ok) {
+ return bigFtoa(dst, prec, fmt, neg, mant, exp, flt);
+ }
+ return formatDigits(dst, shortest, neg, $clone(digs, decimalSlice), prec, fmt);
+ };
+ bigFtoa = function(dst, prec, fmt, neg, mant, exp, flt) {
+ var _1, _2, d, digs, dst, exp, flt, fmt, mant, neg, prec, shortest;
+ d = new decimal.ptr(arrayType$5.zero(), 0, 0, false, false);
+ d.Assign(mant);
+ d.Shift(exp - ((flt.mantbits >> 0)) >> 0);
+ digs = new decimalSlice.ptr(sliceType$6.nil, 0, 0, false);
+ shortest = prec < 0;
+ if (shortest) {
+ roundShortest(d, mant, exp, flt);
+ decimalSlice.copy(digs, new decimalSlice.ptr(new sliceType$6(d.d), d.nd, d.dp, false));
+ _1 = fmt;
+ if ((_1 === (101)) || (_1 === (69))) {
+ prec = digs.nd - 1 >> 0;
+ } else if (_1 === (102)) {
+ prec = max(digs.nd - digs.dp >> 0, 0);
+ } else if ((_1 === (103)) || (_1 === (71))) {
+ prec = digs.nd;
+ }
+ } else {
+ _2 = fmt;
+ if ((_2 === (101)) || (_2 === (69))) {
+ d.Round(prec + 1 >> 0);
+ } else if (_2 === (102)) {
+ d.Round(d.dp + prec >> 0);
+ } else if ((_2 === (103)) || (_2 === (71))) {
+ if (prec === 0) {
+ prec = 1;
+ }
+ d.Round(prec);
+ }
+ decimalSlice.copy(digs, new decimalSlice.ptr(new sliceType$6(d.d), d.nd, d.dp, false));
+ }
+ return formatDigits(dst, shortest, neg, $clone(digs, decimalSlice), prec, fmt);
+ };
+ formatDigits = function(dst, shortest, neg, digs, prec, fmt) {
+ var _1, digs, dst, eprec, exp, fmt, neg, prec, shortest;
+ _1 = fmt;
+ if ((_1 === (101)) || (_1 === (69))) {
+ return fmtE(dst, neg, $clone(digs, decimalSlice), prec, fmt);
+ } else if (_1 === (102)) {
+ return fmtF(dst, neg, $clone(digs, decimalSlice), prec);
+ } else if ((_1 === (103)) || (_1 === (71))) {
+ eprec = prec;
+ if (eprec > digs.nd && digs.nd >= digs.dp) {
+ eprec = digs.nd;
+ }
+ if (shortest) {
+ eprec = 6;
+ }
+ exp = digs.dp - 1 >> 0;
+ if (exp < -4 || exp >= eprec) {
+ if (prec > digs.nd) {
+ prec = digs.nd;
+ }
+ return fmtE(dst, neg, $clone(digs, decimalSlice), prec - 1 >> 0, (fmt + 101 << 24 >>> 24) - 103 << 24 >>> 24);
+ }
+ if (prec > digs.dp) {
+ prec = digs.nd;
+ }
+ return fmtF(dst, neg, $clone(digs, decimalSlice), max(prec - digs.dp >> 0, 0));
+ }
+ return $append(dst, 37, fmt);
+ };
+ roundShortest = function(d, mant, exp, flt) {
+ var d, exp, explo, flt, inclusive, l, li, lower$1, m, mant, mantlo, mi, minexp, okdown, okup, u, ui, upper, upperdelta, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7;
+ if ((mant.$high === 0 && mant.$low === 0)) {
+ d.nd = 0;
+ return;
+ }
+ minexp = flt.bias + 1 >> 0;
+ if (exp > minexp && ($imul(332, ((d.dp - d.nd >> 0)))) >= ($imul(100, ((exp - ((flt.mantbits >> 0)) >> 0))))) {
+ return;
+ }
+ upper = new decimal.ptr(arrayType$5.zero(), 0, 0, false, false);
+ upper.Assign((x = $mul64(mant, new $Uint64(0, 2)), new $Uint64(x.$high + 0, x.$low + 1)));
+ upper.Shift((exp - ((flt.mantbits >> 0)) >> 0) - 1 >> 0);
+ mantlo = new $Uint64(0, 0);
+ explo = 0;
+ if ((x$1 = $shiftLeft64(new $Uint64(0, 1), flt.mantbits), (mant.$high > x$1.$high || (mant.$high === x$1.$high && mant.$low > x$1.$low))) || (exp === minexp)) {
+ mantlo = new $Uint64(mant.$high - 0, mant.$low - 1);
+ explo = exp;
+ } else {
+ mantlo = (x$2 = $mul64(mant, new $Uint64(0, 2)), new $Uint64(x$2.$high - 0, x$2.$low - 1));
+ explo = exp - 1 >> 0;
+ }
+ lower$1 = new decimal.ptr(arrayType$5.zero(), 0, 0, false, false);
+ lower$1.Assign((x$3 = $mul64(mantlo, new $Uint64(0, 2)), new $Uint64(x$3.$high + 0, x$3.$low + 1)));
+ lower$1.Shift((explo - ((flt.mantbits >> 0)) >> 0) - 1 >> 0);
+ inclusive = (x$4 = $div64(mant, new $Uint64(0, 2), true), (x$4.$high === 0 && x$4.$low === 0));
+ upperdelta = 0;
+ ui = 0;
+ while (true) {
+ mi = (ui - upper.dp >> 0) + d.dp >> 0;
+ if (mi >= d.nd) {
+ break;
+ }
+ li = (ui - upper.dp >> 0) + lower$1.dp >> 0;
+ l = 48;
+ if (li >= 0 && li < lower$1.nd) {
+ l = (x$5 = lower$1.d, ((li < 0 || li >= x$5.length) ? ($throwRuntimeError("index out of range"), undefined) : x$5[li]));
+ }
+ m = 48;
+ if (mi >= 0) {
+ m = (x$6 = d.d, ((mi < 0 || mi >= x$6.length) ? ($throwRuntimeError("index out of range"), undefined) : x$6[mi]));
+ }
+ u = 48;
+ if (ui < upper.nd) {
+ u = (x$7 = upper.d, ((ui < 0 || ui >= x$7.length) ? ($throwRuntimeError("index out of range"), undefined) : x$7[ui]));
+ }
+ okdown = !((l === m)) || inclusive && ((li + 1 >> 0) === lower$1.nd);
+ if ((upperdelta === 0) && (m + 1 << 24 >>> 24) < u) {
+ upperdelta = 2;
+ } else if ((upperdelta === 0) && !((m === u))) {
+ upperdelta = 1;
+ } else if ((upperdelta === 1) && (!((m === 57)) || !((u === 48)))) {
+ upperdelta = 2;
+ }
+ okup = upperdelta > 0 && (inclusive || upperdelta > 1 || (ui + 1 >> 0) < upper.nd);
+ if (okdown && okup) {
+ d.Round(mi + 1 >> 0);
+ return;
+ } else if (okdown) {
+ d.RoundDown(mi + 1 >> 0);
+ return;
+ } else if (okup) {
+ d.RoundUp(mi + 1 >> 0);
+ return;
+ }
+ ui = ui + (1) >> 0;
+ }
+ };
+ fmtE = function(dst, neg, d, prec, fmt) {
+ var _q, _q$1, _q$2, _r, _r$1, _r$2, ch, d, dst, exp, fmt, i, m, neg, prec, x;
+ if (neg) {
+ dst = $append(dst, 45);
+ }
+ ch = 48;
+ if (!((d.nd === 0))) {
+ ch = (x = d.d, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0]));
+ }
+ dst = $append(dst, ch);
+ if (prec > 0) {
+ dst = $append(dst, 46);
+ i = 1;
+ m = min(d.nd, prec + 1 >> 0);
+ if (i < m) {
+ dst = $appendSlice(dst, $subslice(d.d, i, m));
+ i = m;
+ }
+ while (true) {
+ if (!(i <= prec)) { break; }
+ dst = $append(dst, 48);
+ i = i + (1) >> 0;
+ }
+ }
+ dst = $append(dst, fmt);
+ exp = d.dp - 1 >> 0;
+ if (d.nd === 0) {
+ exp = 0;
+ }
+ if (exp < 0) {
+ ch = 45;
+ exp = -exp;
+ } else {
+ ch = 43;
+ }
+ dst = $append(dst, ch);
+ if (exp < 10) {
+ dst = $append(dst, 48, ((exp << 24 >>> 24)) + 48 << 24 >>> 24);
+ } else if (exp < 100) {
+ dst = $append(dst, (((_q = exp / 10, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) << 24 >>> 24)) + 48 << 24 >>> 24, (((_r = exp % 10, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) << 24 >>> 24)) + 48 << 24 >>> 24);
+ } else {
+ dst = $append(dst, (((_q$1 = exp / 100, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")) << 24 >>> 24)) + 48 << 24 >>> 24, (_r$1 = (((_q$2 = exp / 10, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero")) << 24 >>> 24)) % 10, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) + 48 << 24 >>> 24, (((_r$2 = exp % 10, _r$2 === _r$2 ? _r$2 : $throwRuntimeError("integer divide by zero")) << 24 >>> 24)) + 48 << 24 >>> 24);
+ }
+ return dst;
+ };
+ fmtF = function(dst, neg, d, prec) {
+ var ch, d, dst, i, j, m, neg, prec, x;
+ if (neg) {
+ dst = $append(dst, 45);
+ }
+ if (d.dp > 0) {
+ m = min(d.nd, d.dp);
+ dst = $appendSlice(dst, $subslice(d.d, 0, m));
+ while (true) {
+ if (!(m < d.dp)) { break; }
+ dst = $append(dst, 48);
+ m = m + (1) >> 0;
+ }
+ } else {
+ dst = $append(dst, 48);
+ }
+ if (prec > 0) {
+ dst = $append(dst, 46);
+ i = 0;
+ while (true) {
+ if (!(i < prec)) { break; }
+ ch = 48;
+ j = d.dp + i >> 0;
+ if (0 <= j && j < d.nd) {
+ ch = (x = d.d, ((j < 0 || j >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + j]));
+ }
+ dst = $append(dst, ch);
+ i = i + (1) >> 0;
+ }
+ }
+ return dst;
+ };
+ fmtB = function(dst, neg, mant, exp, flt) {
+ var _tuple, _tuple$1, dst, exp, flt, mant, neg;
+ if (neg) {
+ dst = $append(dst, 45);
+ }
+ _tuple = formatBits(dst, mant, 10, false, true);
+ dst = _tuple[0];
+ dst = $append(dst, 112);
+ exp = exp - (((flt.mantbits >> 0))) >> 0;
+ if (exp >= 0) {
+ dst = $append(dst, 43);
+ }
+ _tuple$1 = formatBits(dst, (new $Uint64(0, exp)), 10, exp < 0, true);
+ dst = _tuple$1[0];
+ return dst;
+ };
+ fmtX = function(dst, prec, fmt, neg, mant, exp, flt) {
+ var _q, _q$1, _q$2, _q$3, _q$4, _q$5, _r, _r$1, _r$2, _r$3, _r$4, _r$5, ch, dst, exp, extra, flt, fmt, hex, i, mant, neg, prec, shift, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8;
+ if ((mant.$high === 0 && mant.$low === 0)) {
+ exp = 0;
+ }
+ mant = $shiftLeft64(mant, ((60 - flt.mantbits >>> 0)));
+ while (true) {
+ if (!(!((mant.$high === 0 && mant.$low === 0)) && (x = new $Uint64(mant.$high & 268435456, (mant.$low & 0) >>> 0), (x.$high === 0 && x.$low === 0)))) { break; }
+ mant = $shiftLeft64(mant, (1));
+ exp = exp - (1) >> 0;
+ }
+ if (prec >= 0 && prec < 15) {
+ shift = ((($imul(prec, 4)) >>> 0));
+ extra = (x$1 = $shiftLeft64(mant, shift), new $Uint64(x$1.$high & 268435455, (x$1.$low & 4294967295) >>> 0));
+ mant = $shiftRightUint64(mant, ((60 - shift >>> 0)));
+ if ((x$2 = (x$3 = new $Uint64(mant.$high & 0, (mant.$low & 1) >>> 0), new $Uint64(extra.$high | x$3.$high, (extra.$low | x$3.$low) >>> 0)), (x$2.$high > 134217728 || (x$2.$high === 134217728 && x$2.$low > 0)))) {
+ mant = (x$4 = new $Uint64(0, 1), new $Uint64(mant.$high + x$4.$high, mant.$low + x$4.$low));
+ }
+ mant = $shiftLeft64(mant, ((60 - shift >>> 0)));
+ if (!((x$5 = new $Uint64(mant.$high & 536870912, (mant.$low & 0) >>> 0), (x$5.$high === 0 && x$5.$low === 0)))) {
+ mant = $shiftRightUint64(mant, (1));
+ exp = exp + (1) >> 0;
+ }
+ }
+ hex = "0123456789abcdef";
+ if (fmt === 88) {
+ hex = "0123456789ABCDEF";
+ }
+ if (neg) {
+ dst = $append(dst, 45);
+ }
+ dst = $append(dst, 48, fmt, 48 + (((x$6 = $shiftRightUint64(mant, 60), new $Uint64(x$6.$high & 0, (x$6.$low & 1) >>> 0)).$low << 24 >>> 24)) << 24 >>> 24);
+ mant = $shiftLeft64(mant, (4));
+ if (prec < 0 && !((mant.$high === 0 && mant.$low === 0))) {
+ dst = $append(dst, 46);
+ while (true) {
+ if (!(!((mant.$high === 0 && mant.$low === 0)))) { break; }
+ dst = $append(dst, hex.charCodeAt($flatten64((x$7 = $shiftRightUint64(mant, 60), new $Uint64(x$7.$high & 0, (x$7.$low & 15) >>> 0)))));
+ mant = $shiftLeft64(mant, (4));
+ }
+ } else if (prec > 0) {
+ dst = $append(dst, 46);
+ i = 0;
+ while (true) {
+ if (!(i < prec)) { break; }
+ dst = $append(dst, hex.charCodeAt($flatten64((x$8 = $shiftRightUint64(mant, 60), new $Uint64(x$8.$high & 0, (x$8.$low & 15) >>> 0)))));
+ mant = $shiftLeft64(mant, (4));
+ i = i + (1) >> 0;
+ }
+ }
+ ch = 80;
+ if (fmt === lower(fmt)) {
+ ch = 112;
+ }
+ dst = $append(dst, ch);
+ if (exp < 0) {
+ ch = 45;
+ exp = -exp;
+ } else {
+ ch = 43;
+ }
+ dst = $append(dst, ch);
+ if (exp < 100) {
+ dst = $append(dst, (((_q = exp / 10, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) << 24 >>> 24)) + 48 << 24 >>> 24, (((_r = exp % 10, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) << 24 >>> 24)) + 48 << 24 >>> 24);
+ } else if (exp < 1000) {
+ dst = $append(dst, (((_q$1 = exp / 100, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")) << 24 >>> 24)) + 48 << 24 >>> 24, (((_r$1 = ((_q$2 = exp / 10, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero"))) % 10, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) << 24 >>> 24)) + 48 << 24 >>> 24, (((_r$2 = exp % 10, _r$2 === _r$2 ? _r$2 : $throwRuntimeError("integer divide by zero")) << 24 >>> 24)) + 48 << 24 >>> 24);
+ } else {
+ dst = $append(dst, (((_q$3 = exp / 1000, (_q$3 === _q$3 && _q$3 !== 1/0 && _q$3 !== -1/0) ? _q$3 >> 0 : $throwRuntimeError("integer divide by zero")) << 24 >>> 24)) + 48 << 24 >>> 24, (_r$3 = (((_q$4 = exp / 100, (_q$4 === _q$4 && _q$4 !== 1/0 && _q$4 !== -1/0) ? _q$4 >> 0 : $throwRuntimeError("integer divide by zero")) << 24 >>> 24)) % 10, _r$3 === _r$3 ? _r$3 : $throwRuntimeError("integer divide by zero")) + 48 << 24 >>> 24, (((_r$4 = ((_q$5 = exp / 10, (_q$5 === _q$5 && _q$5 !== 1/0 && _q$5 !== -1/0) ? _q$5 >> 0 : $throwRuntimeError("integer divide by zero"))) % 10, _r$4 === _r$4 ? _r$4 : $throwRuntimeError("integer divide by zero")) << 24 >>> 24)) + 48 << 24 >>> 24, (((_r$5 = exp % 10, _r$5 === _r$5 ? _r$5 : $throwRuntimeError("integer divide by zero")) << 24 >>> 24)) + 48 << 24 >>> 24);
+ }
+ return dst;
+ };
+ min = function(a, b) {
+ var a, b;
+ if (a < b) {
+ return a;
+ }
+ return b;
+ };
+ max = function(a, b) {
+ var a, b;
+ if (a > b) {
+ return a;
+ }
+ return b;
+ };
+ eiselLemire64 = function(man, exp10, neg) {
+ var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, clz, exp10, f, man, mergedHi, mergedLo, msb, neg, ok, retBits, retExp2, retMantissa, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, xHi, xLo, yHi, yLo;
+ f = 0;
+ ok = false;
+ if ((man.$high === 0 && man.$low === 0)) {
+ if (neg) {
+ f = math.Float64frombits(new $Uint64(2147483648, 0));
+ }
+ _tmp = f;
+ _tmp$1 = true;
+ f = _tmp;
+ ok = _tmp$1;
+ return [f, ok];
+ }
+ if (exp10 < -348 || 347 < exp10) {
+ _tmp$2 = 0;
+ _tmp$3 = false;
+ f = _tmp$2;
+ ok = _tmp$3;
+ return [f, ok];
+ }
+ clz = bits.LeadingZeros64(man);
+ man = $shiftLeft64(man, (((clz >>> 0))));
+ retExp2 = (x = (new $Uint64(0, (((($imul(217706, exp10)) >> 16 >> 0) + 64 >> 0) + 1023 >> 0))), x$1 = (new $Uint64(0, clz)), new $Uint64(x.$high - x$1.$high, x.$low - x$1.$low));
+ _tuple = bits.Mul64(man, (x$2 = exp10 - -348 >> 0, ((x$2 < 0 || x$2 >= detailedPowersOfTen.length) ? ($throwRuntimeError("index out of range"), undefined) : detailedPowersOfTen[x$2]))[1]);
+ xHi = _tuple[0];
+ xLo = _tuple[1];
+ if ((x$3 = new $Uint64(xHi.$high & 0, (xHi.$low & 511) >>> 0), (x$3.$high === 0 && x$3.$low === 511)) && (x$4 = new $Uint64(xLo.$high + man.$high, xLo.$low + man.$low), (x$4.$high < man.$high || (x$4.$high === man.$high && x$4.$low < man.$low)))) {
+ _tuple$1 = bits.Mul64(man, (x$5 = exp10 - -348 >> 0, ((x$5 < 0 || x$5 >= detailedPowersOfTen.length) ? ($throwRuntimeError("index out of range"), undefined) : detailedPowersOfTen[x$5]))[0]);
+ yHi = _tuple$1[0];
+ yLo = _tuple$1[1];
+ _tmp$4 = xHi;
+ _tmp$5 = new $Uint64(xLo.$high + yHi.$high, xLo.$low + yHi.$low);
+ mergedHi = _tmp$4;
+ mergedLo = _tmp$5;
+ if ((mergedLo.$high < xLo.$high || (mergedLo.$high === xLo.$high && mergedLo.$low < xLo.$low))) {
+ mergedHi = (x$6 = new $Uint64(0, 1), new $Uint64(mergedHi.$high + x$6.$high, mergedHi.$low + x$6.$low));
+ }
+ if ((x$7 = new $Uint64(mergedHi.$high & 0, (mergedHi.$low & 511) >>> 0), (x$7.$high === 0 && x$7.$low === 511)) && (x$8 = new $Uint64(mergedLo.$high + 0, mergedLo.$low + 1), (x$8.$high === 0 && x$8.$low === 0)) && (x$9 = new $Uint64(yLo.$high + man.$high, yLo.$low + man.$low), (x$9.$high < man.$high || (x$9.$high === man.$high && x$9.$low < man.$low)))) {
+ _tmp$6 = 0;
+ _tmp$7 = false;
+ f = _tmp$6;
+ ok = _tmp$7;
+ return [f, ok];
+ }
+ _tmp$8 = mergedHi;
+ _tmp$9 = mergedLo;
+ xHi = _tmp$8;
+ xLo = _tmp$9;
+ }
+ msb = $shiftRightUint64(xHi, 63);
+ retMantissa = $shiftRightUint64(xHi, $flatten64((new $Uint64(msb.$high + 0, msb.$low + 9))));
+ retExp2 = (x$10 = new $Uint64(0 ^ msb.$high, (1 ^ msb.$low) >>> 0), new $Uint64(retExp2.$high - x$10.$high, retExp2.$low - x$10.$low));
+ if ((xLo.$high === 0 && xLo.$low === 0) && (x$11 = new $Uint64(xHi.$high & 0, (xHi.$low & 511) >>> 0), (x$11.$high === 0 && x$11.$low === 0)) && (x$12 = new $Uint64(retMantissa.$high & 0, (retMantissa.$low & 3) >>> 0), (x$12.$high === 0 && x$12.$low === 1))) {
+ _tmp$10 = 0;
+ _tmp$11 = false;
+ f = _tmp$10;
+ ok = _tmp$11;
+ return [f, ok];
+ }
+ retMantissa = (x$13 = new $Uint64(retMantissa.$high & 0, (retMantissa.$low & 1) >>> 0), new $Uint64(retMantissa.$high + x$13.$high, retMantissa.$low + x$13.$low));
+ retMantissa = $shiftRightUint64(retMantissa, (1));
+ if ((x$14 = $shiftRightUint64(retMantissa, 53), (x$14.$high > 0 || (x$14.$high === 0 && x$14.$low > 0)))) {
+ retMantissa = $shiftRightUint64(retMantissa, (1));
+ retExp2 = (x$15 = new $Uint64(0, 1), new $Uint64(retExp2.$high + x$15.$high, retExp2.$low + x$15.$low));
+ }
+ if ((x$16 = new $Uint64(retExp2.$high - 0, retExp2.$low - 1), (x$16.$high > 0 || (x$16.$high === 0 && x$16.$low >= 2046)))) {
+ _tmp$12 = 0;
+ _tmp$13 = false;
+ f = _tmp$12;
+ ok = _tmp$13;
+ return [f, ok];
+ }
+ retBits = (x$17 = $shiftLeft64(retExp2, 52), x$18 = new $Uint64(retMantissa.$high & 1048575, (retMantissa.$low & 4294967295) >>> 0), new $Uint64(x$17.$high | x$18.$high, (x$17.$low | x$18.$low) >>> 0));
+ if (neg) {
+ retBits = (x$19 = new $Uint64(2147483648, 0), new $Uint64(retBits.$high | x$19.$high, (retBits.$low | x$19.$low) >>> 0));
+ }
+ _tmp$14 = math.Float64frombits(retBits);
+ _tmp$15 = true;
+ f = _tmp$14;
+ ok = _tmp$15;
+ return [f, ok];
+ };
+ eiselLemire32 = function(man, exp10, neg) {
+ var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, clz, exp10, f, man, mergedHi, mergedLo, msb, neg, ok, retBits, retExp2, retMantissa, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, xHi, xLo, yHi, yLo;
+ f = 0;
+ ok = false;
+ if ((man.$high === 0 && man.$low === 0)) {
+ if (neg) {
+ f = math.Float32frombits(2147483648);
+ }
+ _tmp = f;
+ _tmp$1 = true;
+ f = _tmp;
+ ok = _tmp$1;
+ return [f, ok];
+ }
+ if (exp10 < -348 || 347 < exp10) {
+ _tmp$2 = 0;
+ _tmp$3 = false;
+ f = _tmp$2;
+ ok = _tmp$3;
+ return [f, ok];
+ }
+ clz = bits.LeadingZeros64(man);
+ man = $shiftLeft64(man, (((clz >>> 0))));
+ retExp2 = (x = (new $Uint64(0, (((($imul(217706, exp10)) >> 16 >> 0) + 64 >> 0) + 127 >> 0))), x$1 = (new $Uint64(0, clz)), new $Uint64(x.$high - x$1.$high, x.$low - x$1.$low));
+ _tuple = bits.Mul64(man, (x$2 = exp10 - -348 >> 0, ((x$2 < 0 || x$2 >= detailedPowersOfTen.length) ? ($throwRuntimeError("index out of range"), undefined) : detailedPowersOfTen[x$2]))[1]);
+ xHi = _tuple[0];
+ xLo = _tuple[1];
+ if ((x$3 = new $Uint64(xHi.$high & 63, (xHi.$low & 4294967295) >>> 0), (x$3.$high === 63 && x$3.$low === 4294967295)) && (x$4 = new $Uint64(xLo.$high + man.$high, xLo.$low + man.$low), (x$4.$high < man.$high || (x$4.$high === man.$high && x$4.$low < man.$low)))) {
+ _tuple$1 = bits.Mul64(man, (x$5 = exp10 - -348 >> 0, ((x$5 < 0 || x$5 >= detailedPowersOfTen.length) ? ($throwRuntimeError("index out of range"), undefined) : detailedPowersOfTen[x$5]))[0]);
+ yHi = _tuple$1[0];
+ yLo = _tuple$1[1];
+ _tmp$4 = xHi;
+ _tmp$5 = new $Uint64(xLo.$high + yHi.$high, xLo.$low + yHi.$low);
+ mergedHi = _tmp$4;
+ mergedLo = _tmp$5;
+ if ((mergedLo.$high < xLo.$high || (mergedLo.$high === xLo.$high && mergedLo.$low < xLo.$low))) {
+ mergedHi = (x$6 = new $Uint64(0, 1), new $Uint64(mergedHi.$high + x$6.$high, mergedHi.$low + x$6.$low));
+ }
+ if ((x$7 = new $Uint64(mergedHi.$high & 63, (mergedHi.$low & 4294967295) >>> 0), (x$7.$high === 63 && x$7.$low === 4294967295)) && (x$8 = new $Uint64(mergedLo.$high + 0, mergedLo.$low + 1), (x$8.$high === 0 && x$8.$low === 0)) && (x$9 = new $Uint64(yLo.$high + man.$high, yLo.$low + man.$low), (x$9.$high < man.$high || (x$9.$high === man.$high && x$9.$low < man.$low)))) {
+ _tmp$6 = 0;
+ _tmp$7 = false;
+ f = _tmp$6;
+ ok = _tmp$7;
+ return [f, ok];
+ }
+ _tmp$8 = mergedHi;
+ _tmp$9 = mergedLo;
+ xHi = _tmp$8;
+ xLo = _tmp$9;
+ }
+ msb = $shiftRightUint64(xHi, 63);
+ retMantissa = $shiftRightUint64(xHi, $flatten64((new $Uint64(msb.$high + 0, msb.$low + 38))));
+ retExp2 = (x$10 = new $Uint64(0 ^ msb.$high, (1 ^ msb.$low) >>> 0), new $Uint64(retExp2.$high - x$10.$high, retExp2.$low - x$10.$low));
+ if ((xLo.$high === 0 && xLo.$low === 0) && (x$11 = new $Uint64(xHi.$high & 63, (xHi.$low & 4294967295) >>> 0), (x$11.$high === 0 && x$11.$low === 0)) && (x$12 = new $Uint64(retMantissa.$high & 0, (retMantissa.$low & 3) >>> 0), (x$12.$high === 0 && x$12.$low === 1))) {
+ _tmp$10 = 0;
+ _tmp$11 = false;
+ f = _tmp$10;
+ ok = _tmp$11;
+ return [f, ok];
+ }
+ retMantissa = (x$13 = new $Uint64(retMantissa.$high & 0, (retMantissa.$low & 1) >>> 0), new $Uint64(retMantissa.$high + x$13.$high, retMantissa.$low + x$13.$low));
+ retMantissa = $shiftRightUint64(retMantissa, (1));
+ if ((x$14 = $shiftRightUint64(retMantissa, 24), (x$14.$high > 0 || (x$14.$high === 0 && x$14.$low > 0)))) {
+ retMantissa = $shiftRightUint64(retMantissa, (1));
+ retExp2 = (x$15 = new $Uint64(0, 1), new $Uint64(retExp2.$high + x$15.$high, retExp2.$low + x$15.$low));
+ }
+ if ((x$16 = new $Uint64(retExp2.$high - 0, retExp2.$low - 1), (x$16.$high > 0 || (x$16.$high === 0 && x$16.$low >= 254)))) {
+ _tmp$12 = 0;
+ _tmp$13 = false;
+ f = _tmp$12;
+ ok = _tmp$13;
+ return [f, ok];
+ }
+ retBits = (x$17 = $shiftLeft64(retExp2, 23), x$18 = new $Uint64(retMantissa.$high & 0, (retMantissa.$low & 8388607) >>> 0), new $Uint64(x$17.$high | x$18.$high, (x$17.$low | x$18.$low) >>> 0));
+ if (neg) {
+ retBits = (x$19 = new $Uint64(0, 2147483648), new $Uint64(retBits.$high | x$19.$high, (retBits.$low | x$19.$low) >>> 0));
+ }
+ _tmp$14 = math.Float32frombits(((retBits.$low >>> 0)));
+ _tmp$15 = true;
+ f = _tmp$14;
+ ok = _tmp$15;
+ return [f, ok];
+ };
+ decimal.ptr.prototype.String = function() {
+ var a, buf, n, w;
+ a = this;
+ n = 10 + a.nd >> 0;
+ if (a.dp > 0) {
+ n = n + (a.dp) >> 0;
+ }
+ if (a.dp < 0) {
+ n = n + (-a.dp) >> 0;
+ }
+ buf = $makeSlice(sliceType$6, n);
+ w = 0;
+ if ((a.nd === 0)) {
+ return "0";
+ } else if (a.dp <= 0) {
+ ((w < 0 || w >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + w] = 48);
+ w = w + (1) >> 0;
+ ((w < 0 || w >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + w] = 46);
+ w = w + (1) >> 0;
+ w = w + (digitZero($subslice(buf, w, (w + -a.dp >> 0)))) >> 0;
+ w = w + ($copySlice($subslice(buf, w), $subslice(new sliceType$6(a.d), 0, a.nd))) >> 0;
+ } else if (a.dp < a.nd) {
+ w = w + ($copySlice($subslice(buf, w), $subslice(new sliceType$6(a.d), 0, a.dp))) >> 0;
+ ((w < 0 || w >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + w] = 46);
+ w = w + (1) >> 0;
+ w = w + ($copySlice($subslice(buf, w), $subslice(new sliceType$6(a.d), a.dp, a.nd))) >> 0;
+ } else {
+ w = w + ($copySlice($subslice(buf, w), $subslice(new sliceType$6(a.d), 0, a.nd))) >> 0;
+ w = w + (digitZero($subslice(buf, w, ((w + a.dp >> 0) - a.nd >> 0)))) >> 0;
+ }
+ return ($bytesToString($subslice(buf, 0, w)));
+ };
+ decimal.prototype.String = function() { return this.$val.String(); };
+ digitZero = function(dst) {
+ var _i, _ref, dst, i;
+ _ref = dst;
+ _i = 0;
+ while (true) {
+ if (!(_i < _ref.$length)) { break; }
+ i = _i;
+ ((i < 0 || i >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + i] = 48);
+ _i++;
+ }
+ return dst.$length;
+ };
+ trim = function(a) {
+ var a, x, x$1;
+ while (true) {
+ if (!(a.nd > 0 && ((x = a.d, x$1 = a.nd - 1 >> 0, ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1])) === 48))) { break; }
+ a.nd = a.nd - (1) >> 0;
+ }
+ if (a.nd === 0) {
+ a.dp = 0;
+ }
+ };
+ decimal.ptr.prototype.Assign = function(v) {
+ var a, buf, n, v, v1, x, x$1, x$2;
+ a = this;
+ buf = arrayType$4.zero();
+ n = 0;
+ while (true) {
+ if (!((v.$high > 0 || (v.$high === 0 && v.$low > 0)))) { break; }
+ v1 = $div64(v, new $Uint64(0, 10), false);
+ v = (x = $mul64(new $Uint64(0, 10), v1), new $Uint64(v.$high - x.$high, v.$low - x.$low));
+ ((n < 0 || n >= buf.length) ? ($throwRuntimeError("index out of range"), undefined) : buf[n] = ((new $Uint64(v.$high + 0, v.$low + 48).$low << 24 >>> 24)));
+ n = n + (1) >> 0;
+ v = v1;
+ }
+ a.nd = 0;
+ n = n - (1) >> 0;
+ while (true) {
+ if (!(n >= 0)) { break; }
+ (x$1 = a.d, x$2 = a.nd, ((x$2 < 0 || x$2 >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[x$2] = ((n < 0 || n >= buf.length) ? ($throwRuntimeError("index out of range"), undefined) : buf[n])));
+ a.nd = a.nd + (1) >> 0;
+ n = n - (1) >> 0;
+ }
+ a.dp = a.nd;
+ trim(a);
+ };
+ decimal.prototype.Assign = function(v) { return this.$val.Assign(v); };
+ rightShift = function(a, k) {
+ var a, c, c$1, dig, dig$1, k, mask, n, r, w, x, x$1, x$2, x$3, y, y$1, y$2, y$3, y$4;
+ r = 0;
+ w = 0;
+ n = 0;
+ while (true) {
+ if (!(((y = k, y < 32 ? (n >>> y) : 0) >>> 0) === 0)) { break; }
+ if (r >= a.nd) {
+ if (n === 0) {
+ a.nd = 0;
+ return;
+ }
+ while (true) {
+ if (!(((y$1 = k, y$1 < 32 ? (n >>> y$1) : 0) >>> 0) === 0)) { break; }
+ n = n * 10 >>> 0;
+ r = r + (1) >> 0;
+ }
+ break;
+ }
+ c = (((x = a.d, ((r < 0 || r >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[r])) >>> 0));
+ n = ((n * 10 >>> 0) + c >>> 0) - 48 >>> 0;
+ r = r + (1) >> 0;
+ }
+ a.dp = a.dp - ((r - 1 >> 0)) >> 0;
+ mask = (((y$2 = k, y$2 < 32 ? (1 << y$2) : 0) >>> 0)) - 1 >>> 0;
+ while (true) {
+ if (!(r < a.nd)) { break; }
+ c$1 = (((x$1 = a.d, ((r < 0 || r >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[r])) >>> 0));
+ dig = (y$3 = k, y$3 < 32 ? (n >>> y$3) : 0) >>> 0;
+ n = (n & (mask)) >>> 0;
+ (x$2 = a.d, ((w < 0 || w >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[w] = (((dig + 48 >>> 0) << 24 >>> 24))));
+ w = w + (1) >> 0;
+ n = ((n * 10 >>> 0) + c$1 >>> 0) - 48 >>> 0;
+ r = r + (1) >> 0;
+ }
+ while (true) {
+ if (!(n > 0)) { break; }
+ dig$1 = (y$4 = k, y$4 < 32 ? (n >>> y$4) : 0) >>> 0;
+ n = (n & (mask)) >>> 0;
+ if (w < 800) {
+ (x$3 = a.d, ((w < 0 || w >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[w] = (((dig$1 + 48 >>> 0) << 24 >>> 24))));
+ w = w + (1) >> 0;
+ } else if (dig$1 > 0) {
+ a.trunc = true;
+ }
+ n = n * 10 >>> 0;
+ }
+ a.nd = w;
+ trim(a);
+ };
+ prefixIsLessThan = function(b, s) {
+ var b, i, s;
+ i = 0;
+ while (true) {
+ if (!(i < s.length)) { break; }
+ if (i >= b.$length) {
+ return true;
+ }
+ if (!((((i < 0 || i >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + i]) === s.charCodeAt(i)))) {
+ return ((i < 0 || i >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + i]) < s.charCodeAt(i);
+ }
+ i = i + (1) >> 0;
+ }
+ return false;
+ };
+ leftShift = function(a, k) {
+ var _q, _q$1, a, delta, k, n, quo, quo$1, r, rem, rem$1, w, x, x$1, x$2, y;
+ delta = ((k < 0 || k >= leftcheats.$length) ? ($throwRuntimeError("index out of range"), undefined) : leftcheats.$array[leftcheats.$offset + k]).delta;
+ if (prefixIsLessThan($subslice(new sliceType$6(a.d), 0, a.nd), ((k < 0 || k >= leftcheats.$length) ? ($throwRuntimeError("index out of range"), undefined) : leftcheats.$array[leftcheats.$offset + k]).cutoff)) {
+ delta = delta - (1) >> 0;
+ }
+ r = a.nd;
+ w = a.nd + delta >> 0;
+ n = 0;
+ r = r - (1) >> 0;
+ while (true) {
+ if (!(r >= 0)) { break; }
+ n = n + (((y = k, y < 32 ? ((((((x = a.d, ((r < 0 || r >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[r])) >>> 0)) - 48 >>> 0)) << y) : 0) >>> 0)) >>> 0;
+ quo = (_q = n / 10, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero"));
+ rem = n - (10 * quo >>> 0) >>> 0;
+ w = w - (1) >> 0;
+ if (w < 800) {
+ (x$1 = a.d, ((w < 0 || w >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[w] = (((rem + 48 >>> 0) << 24 >>> 24))));
+ } else if (!((rem === 0))) {
+ a.trunc = true;
+ }
+ n = quo;
+ r = r - (1) >> 0;
+ }
+ while (true) {
+ if (!(n > 0)) { break; }
+ quo$1 = (_q$1 = n / 10, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >>> 0 : $throwRuntimeError("integer divide by zero"));
+ rem$1 = n - (10 * quo$1 >>> 0) >>> 0;
+ w = w - (1) >> 0;
+ if (w < 800) {
+ (x$2 = a.d, ((w < 0 || w >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[w] = (((rem$1 + 48 >>> 0) << 24 >>> 24))));
+ } else if (!((rem$1 === 0))) {
+ a.trunc = true;
+ }
+ n = quo$1;
+ }
+ a.nd = a.nd + (delta) >> 0;
+ if (a.nd >= 800) {
+ a.nd = 800;
+ }
+ a.dp = a.dp + (delta) >> 0;
+ trim(a);
+ };
+ decimal.ptr.prototype.Shift = function(k) {
+ var a, k;
+ a = this;
+ if ((a.nd === 0)) {
+ } else if (k > 0) {
+ while (true) {
+ if (!(k > 28)) { break; }
+ leftShift(a, 28);
+ k = k - (28) >> 0;
+ }
+ leftShift(a, ((k >>> 0)));
+ } else if (k < 0) {
+ while (true) {
+ if (!(k < -28)) { break; }
+ rightShift(a, 28);
+ k = k + (28) >> 0;
+ }
+ rightShift(a, ((-k >>> 0)));
+ }
+ };
+ decimal.prototype.Shift = function(k) { return this.$val.Shift(k); };
+ shouldRoundUp = function(a, nd) {
+ var _r, a, nd, x, x$1, x$2, x$3;
+ if (nd < 0 || nd >= a.nd) {
+ return false;
+ }
+ if (((x = a.d, ((nd < 0 || nd >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[nd])) === 53) && ((nd + 1 >> 0) === a.nd)) {
+ if (a.trunc) {
+ return true;
+ }
+ return nd > 0 && !(((_r = (((x$1 = a.d, x$2 = nd - 1 >> 0, ((x$2 < 0 || x$2 >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[x$2])) - 48 << 24 >>> 24)) % 2, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) === 0));
+ }
+ return (x$3 = a.d, ((nd < 0 || nd >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[nd])) >= 53;
+ };
+ decimal.ptr.prototype.Round = function(nd) {
+ var a, nd;
+ a = this;
+ if (nd < 0 || nd >= a.nd) {
+ return;
+ }
+ if (shouldRoundUp(a, nd)) {
+ a.RoundUp(nd);
+ } else {
+ a.RoundDown(nd);
+ }
+ };
+ decimal.prototype.Round = function(nd) { return this.$val.Round(nd); };
+ decimal.ptr.prototype.RoundDown = function(nd) {
+ var a, nd;
+ a = this;
+ if (nd < 0 || nd >= a.nd) {
+ return;
+ }
+ a.nd = nd;
+ trim(a);
+ };
+ decimal.prototype.RoundDown = function(nd) { return this.$val.RoundDown(nd); };
+ decimal.ptr.prototype.RoundUp = function(nd) {
+ var a, c, i, nd, x, x$1, x$2;
+ a = this;
+ if (nd < 0 || nd >= a.nd) {
+ return;
+ }
+ i = nd - 1 >> 0;
+ while (true) {
+ if (!(i >= 0)) { break; }
+ c = (x = a.d, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i]));
+ if (c < 57) {
+ (x$2 = a.d, ((i < 0 || i >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i] = ((x$1 = a.d, ((i < 0 || i >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[i])) + (1) << 24 >>> 24)));
+ a.nd = i + 1 >> 0;
+ return;
+ }
+ i = i - (1) >> 0;
+ }
+ a.d[0] = 49;
+ a.nd = 1;
+ a.dp = a.dp + (1) >> 0;
+ };
+ decimal.prototype.RoundUp = function(nd) { return this.$val.RoundUp(nd); };
+ decimal.ptr.prototype.RoundedInteger = function() {
+ var a, i, n, x, x$1, x$2, x$3;
+ a = this;
+ if (a.dp > 20) {
+ return new $Uint64(4294967295, 4294967295);
+ }
+ i = 0;
+ n = new $Uint64(0, 0);
+ i = 0;
+ while (true) {
+ if (!(i < a.dp && i < a.nd)) { break; }
+ n = (x = $mul64(n, new $Uint64(0, 10)), x$1 = (new $Uint64(0, ((x$2 = a.d, ((i < 0 || i >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i])) - 48 << 24 >>> 24))), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low));
+ i = i + (1) >> 0;
+ }
+ while (true) {
+ if (!(i < a.dp)) { break; }
+ n = $mul64(n, (new $Uint64(0, 10)));
+ i = i + (1) >> 0;
+ }
+ if (shouldRoundUp(a, a.dp)) {
+ n = (x$3 = new $Uint64(0, 1), new $Uint64(n.$high + x$3.$high, n.$low + x$3.$low));
+ }
+ return n;
+ };
+ decimal.prototype.RoundedInteger = function() { return this.$val.RoundedInteger(); };
+ index = function(s, c) {
+ var c, s;
+ return bytealg.IndexByteString(s, c);
+ };
+ lower = function(c) {
+ var c;
+ return (c | 32) >>> 0;
+ };
+ NumError.ptr.prototype.Error = function() {
+ var {$24r, _r, e, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ e = this;
+ _r = e.Err.Error(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = "strconv." + e.Func + ": " + "parsing " + Quote(e.Num) + ": " + _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: NumError.ptr.prototype.Error, $c: true, $r, $24r, _r, e, $s};return $f;
+ };
+ NumError.prototype.Error = function() { return this.$val.Error(); };
+ NumError.ptr.prototype.Unwrap = function() {
+ var e;
+ e = this;
+ return e.Err;
+ };
+ NumError.prototype.Unwrap = function() { return this.$val.Unwrap(); };
+ syntaxError = function(fn, str) {
+ var fn, str;
+ return new NumError.ptr(fn, str, $pkg.ErrSyntax);
+ };
+ rangeError = function(fn, str) {
+ var fn, str;
+ return new NumError.ptr(fn, str, $pkg.ErrRange);
+ };
+ baseError = function(fn, str, base) {
+ var base, fn, str;
+ return new NumError.ptr(fn, str, errors.New("invalid base " + Itoa(base)));
+ };
+ bitSizeError = function(fn, str, bitSize) {
+ var bitSize, fn, str;
+ return new NumError.ptr(fn, str, errors.New("invalid bit size " + Itoa(bitSize)));
+ };
+ ParseUint = function(s, base, bitSize) {
+ var _1, _i, _ref, base, base0, bitSize, c, cutoff, d, maxVal, n, n1, s, s0, underscores, x, x$1, x$2;
+ if (s === "") {
+ return [new $Uint64(0, 0), syntaxError("ParseUint", s)];
+ }
+ base0 = base === 0;
+ s0 = s;
+ if (2 <= base && base <= 36) {
+ } else if ((base === 0)) {
+ base = 10;
+ if (s.charCodeAt(0) === 48) {
+ if (s.length >= 3 && (lower(s.charCodeAt(1)) === 98)) {
+ base = 2;
+ s = $substring(s, 2);
+ } else if (s.length >= 3 && (lower(s.charCodeAt(1)) === 111)) {
+ base = 8;
+ s = $substring(s, 2);
+ } else if (s.length >= 3 && (lower(s.charCodeAt(1)) === 120)) {
+ base = 16;
+ s = $substring(s, 2);
+ } else {
+ base = 8;
+ s = $substring(s, 1);
+ }
+ }
+ } else {
+ return [new $Uint64(0, 0), baseError("ParseUint", s0, base)];
+ }
+ if (bitSize === 0) {
+ bitSize = 32;
+ } else if (bitSize < 0 || bitSize > 64) {
+ return [new $Uint64(0, 0), bitSizeError("ParseUint", s0, bitSize)];
+ }
+ cutoff = new $Uint64(0, 0);
+ _1 = base;
+ if (_1 === (10)) {
+ cutoff = new $Uint64(429496729, 2576980378);
+ } else if (_1 === (16)) {
+ cutoff = new $Uint64(268435456, 0);
+ } else {
+ cutoff = (x = $div64(new $Uint64(4294967295, 4294967295), (new $Uint64(0, base)), false), new $Uint64(x.$high + 0, x.$low + 1));
+ }
+ maxVal = (x$1 = $shiftLeft64(new $Uint64(0, 1), ((bitSize >>> 0))), new $Uint64(x$1.$high - 0, x$1.$low - 1));
+ underscores = false;
+ n = new $Uint64(0, 0);
+ _ref = (new sliceType$6($stringToBytes(s)));
+ _i = 0;
+ while (true) {
+ if (!(_i < _ref.$length)) { break; }
+ c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]);
+ d = 0;
+ if ((c === 95) && base0) {
+ underscores = true;
+ _i++;
+ continue;
+ } else if (48 <= c && c <= 57) {
+ d = c - 48 << 24 >>> 24;
+ } else if (97 <= lower(c) && lower(c) <= 122) {
+ d = (lower(c) - 97 << 24 >>> 24) + 10 << 24 >>> 24;
+ } else {
+ return [new $Uint64(0, 0), syntaxError("ParseUint", s0)];
+ }
+ if (d >= ((base << 24 >>> 24))) {
+ return [new $Uint64(0, 0), syntaxError("ParseUint", s0)];
+ }
+ if ((n.$high > cutoff.$high || (n.$high === cutoff.$high && n.$low >= cutoff.$low))) {
+ return [maxVal, rangeError("ParseUint", s0)];
+ }
+ n = $mul64(n, ((new $Uint64(0, base))));
+ n1 = (x$2 = (new $Uint64(0, d)), new $Uint64(n.$high + x$2.$high, n.$low + x$2.$low));
+ if ((n1.$high < n.$high || (n1.$high === n.$high && n1.$low < n.$low)) || (n1.$high > maxVal.$high || (n1.$high === maxVal.$high && n1.$low > maxVal.$low))) {
+ return [maxVal, rangeError("ParseUint", s0)];
+ }
+ n = n1;
+ _i++;
+ }
+ if (underscores && !underscoreOK(s0)) {
+ return [new $Uint64(0, 0), syntaxError("ParseUint", s0)];
+ }
+ return [n, $ifaceNil];
+ };
+ $pkg.ParseUint = ParseUint;
+ ParseInt = function(s, base, bitSize) {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, base, bitSize, cutoff, err, i, n, neg, s, s0, un, x, x$1;
+ i = new $Int64(0, 0);
+ err = $ifaceNil;
+ if (s === "") {
+ _tmp = new $Int64(0, 0);
+ _tmp$1 = syntaxError("ParseInt", s);
+ i = _tmp;
+ err = _tmp$1;
+ return [i, err];
+ }
+ s0 = s;
+ neg = false;
+ if (s.charCodeAt(0) === 43) {
+ s = $substring(s, 1);
+ } else if (s.charCodeAt(0) === 45) {
+ neg = true;
+ s = $substring(s, 1);
+ }
+ un = new $Uint64(0, 0);
+ _tuple = ParseUint(s, base, bitSize);
+ un = _tuple[0];
+ err = _tuple[1];
+ if (!($interfaceIsEqual(err, $ifaceNil)) && !($interfaceIsEqual($assertType(err, ptrType$1).Err, $pkg.ErrRange))) {
+ $assertType(err, ptrType$1).Func = "ParseInt";
+ $assertType(err, ptrType$1).Num = s0;
+ _tmp$2 = new $Int64(0, 0);
+ _tmp$3 = err;
+ i = _tmp$2;
+ err = _tmp$3;
+ return [i, err];
+ }
+ if (bitSize === 0) {
+ bitSize = 32;
+ }
+ cutoff = ($shiftLeft64(new $Uint64(0, 1), (((bitSize - 1 >> 0) >>> 0))));
+ if (!neg && (un.$high > cutoff.$high || (un.$high === cutoff.$high && un.$low >= cutoff.$low))) {
+ _tmp$4 = ((x = new $Uint64(cutoff.$high - 0, cutoff.$low - 1), new $Int64(x.$high, x.$low)));
+ _tmp$5 = rangeError("ParseInt", s0);
+ i = _tmp$4;
+ err = _tmp$5;
+ return [i, err];
+ }
+ if (neg && (un.$high > cutoff.$high || (un.$high === cutoff.$high && un.$low > cutoff.$low))) {
+ _tmp$6 = (x$1 = (new $Int64(cutoff.$high, cutoff.$low)), new $Int64(-x$1.$high, -x$1.$low));
+ _tmp$7 = rangeError("ParseInt", s0);
+ i = _tmp$6;
+ err = _tmp$7;
+ return [i, err];
+ }
+ n = (new $Int64(un.$high, un.$low));
+ if (neg) {
+ n = new $Int64(-n.$high, -n.$low);
+ }
+ _tmp$8 = n;
+ _tmp$9 = $ifaceNil;
+ i = _tmp$8;
+ err = _tmp$9;
+ return [i, err];
+ };
+ $pkg.ParseInt = ParseInt;
+ underscoreOK = function(s) {
+ var hex, i, s, saw;
+ saw = 94;
+ i = 0;
+ if (s.length >= 1 && ((s.charCodeAt(0) === 45) || (s.charCodeAt(0) === 43))) {
+ s = $substring(s, 1);
+ }
+ hex = false;
+ if (s.length >= 2 && (s.charCodeAt(0) === 48) && ((lower(s.charCodeAt(1)) === 98) || (lower(s.charCodeAt(1)) === 111) || (lower(s.charCodeAt(1)) === 120))) {
+ i = 2;
+ saw = 48;
+ hex = lower(s.charCodeAt(1)) === 120;
+ }
+ while (true) {
+ if (!(i < s.length)) { break; }
+ if (48 <= s.charCodeAt(i) && s.charCodeAt(i) <= 57 || hex && 97 <= lower(s.charCodeAt(i)) && lower(s.charCodeAt(i)) <= 102) {
+ saw = 48;
+ i = i + (1) >> 0;
+ continue;
+ }
+ if (s.charCodeAt(i) === 95) {
+ if (!((saw === 48))) {
+ return false;
+ }
+ saw = 95;
+ i = i + (1) >> 0;
+ continue;
+ }
+ if (saw === 95) {
+ return false;
+ }
+ saw = 33;
+ i = i + (1) >> 0;
+ }
+ return !((saw === 95));
+ };
+ commonPrefixLenIgnoreCase = function(s, prefix) {
+ var c, i, n, prefix, s;
+ n = prefix.length;
+ if (n > s.length) {
+ n = s.length;
+ }
+ i = 0;
+ while (true) {
+ if (!(i < n)) { break; }
+ c = s.charCodeAt(i);
+ if (65 <= c && c <= 90) {
+ c = c + (32) << 24 >>> 24;
+ }
+ if (!((c === prefix.charCodeAt(i)))) {
+ return i;
+ }
+ i = i + (1) >> 0;
+ }
+ return n;
+ };
+ special = function(s) {
+ var _1, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, f, n, n$1, nsign, ok, s, sign;
+ f = 0;
+ n = 0;
+ ok = false;
+ if (s.length === 0) {
+ _tmp = 0;
+ _tmp$1 = 0;
+ _tmp$2 = false;
+ f = _tmp;
+ n = _tmp$1;
+ ok = _tmp$2;
+ return [f, n, ok];
+ }
+ sign = 1;
+ nsign = 0;
+ _1 = s.charCodeAt(0);
+ if ((_1 === (43)) || (_1 === (45))) {
+ if (s.charCodeAt(0) === 45) {
+ sign = -1;
+ }
+ nsign = 1;
+ s = $substring(s, 1);
+ n$1 = commonPrefixLenIgnoreCase(s, "infinity");
+ if (3 < n$1 && n$1 < 8) {
+ n$1 = 3;
+ }
+ if ((n$1 === 3) || (n$1 === 8)) {
+ _tmp$3 = math.Inf(sign);
+ _tmp$4 = nsign + n$1 >> 0;
+ _tmp$5 = true;
+ f = _tmp$3;
+ n = _tmp$4;
+ ok = _tmp$5;
+ return [f, n, ok];
+ }
+ } else if ((_1 === (105)) || (_1 === (73))) {
+ n$1 = commonPrefixLenIgnoreCase(s, "infinity");
+ if (3 < n$1 && n$1 < 8) {
+ n$1 = 3;
+ }
+ if ((n$1 === 3) || (n$1 === 8)) {
+ _tmp$6 = math.Inf(sign);
+ _tmp$7 = nsign + n$1 >> 0;
+ _tmp$8 = true;
+ f = _tmp$6;
+ n = _tmp$7;
+ ok = _tmp$8;
+ return [f, n, ok];
+ }
+ } else if ((_1 === (110)) || (_1 === (78))) {
+ if (commonPrefixLenIgnoreCase(s, "nan") === 3) {
+ _tmp$9 = math.NaN();
+ _tmp$10 = 3;
+ _tmp$11 = true;
+ f = _tmp$9;
+ n = _tmp$10;
+ ok = _tmp$11;
+ return [f, n, ok];
+ }
+ }
+ _tmp$12 = 0;
+ _tmp$13 = 0;
+ _tmp$14 = false;
+ f = _tmp$12;
+ n = _tmp$13;
+ ok = _tmp$14;
+ return [f, n, ok];
+ };
+ decimal.ptr.prototype.set = function(s) {
+ var b, e, esign, i, ok, s, sawdigits, sawdot, x, x$1;
+ ok = false;
+ b = this;
+ i = 0;
+ b.neg = false;
+ b.trunc = false;
+ if (i >= s.length) {
+ return ok;
+ }
+ if ((s.charCodeAt(i) === 43)) {
+ i = i + (1) >> 0;
+ } else if ((s.charCodeAt(i) === 45)) {
+ b.neg = true;
+ i = i + (1) >> 0;
+ }
+ sawdot = false;
+ sawdigits = false;
+ while (true) {
+ if (!(i < s.length)) { break; }
+ if ((s.charCodeAt(i) === 95)) {
+ i = i + (1) >> 0;
+ continue;
+ } else if ((s.charCodeAt(i) === 46)) {
+ if (sawdot) {
+ return ok;
+ }
+ sawdot = true;
+ b.dp = b.nd;
+ i = i + (1) >> 0;
+ continue;
+ } else if (48 <= s.charCodeAt(i) && s.charCodeAt(i) <= 57) {
+ sawdigits = true;
+ if ((s.charCodeAt(i) === 48) && (b.nd === 0)) {
+ b.dp = b.dp - (1) >> 0;
+ i = i + (1) >> 0;
+ continue;
+ }
+ if (b.nd < 800) {
+ (x = b.d, x$1 = b.nd, ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1] = s.charCodeAt(i)));
+ b.nd = b.nd + (1) >> 0;
+ } else if (!((s.charCodeAt(i) === 48))) {
+ b.trunc = true;
+ }
+ i = i + (1) >> 0;
+ continue;
+ }
+ break;
+ }
+ if (!sawdigits) {
+ return ok;
+ }
+ if (!sawdot) {
+ b.dp = b.nd;
+ }
+ if (i < s.length && (lower(s.charCodeAt(i)) === 101)) {
+ i = i + (1) >> 0;
+ if (i >= s.length) {
+ return ok;
+ }
+ esign = 1;
+ if (s.charCodeAt(i) === 43) {
+ i = i + (1) >> 0;
+ } else if (s.charCodeAt(i) === 45) {
+ i = i + (1) >> 0;
+ esign = -1;
+ }
+ if (i >= s.length || s.charCodeAt(i) < 48 || s.charCodeAt(i) > 57) {
+ return ok;
+ }
+ e = 0;
+ while (true) {
+ if (!(i < s.length && (48 <= s.charCodeAt(i) && s.charCodeAt(i) <= 57 || (s.charCodeAt(i) === 95)))) { break; }
+ if (s.charCodeAt(i) === 95) {
+ i = i + (1) >> 0;
+ continue;
+ }
+ if (e < 10000) {
+ e = (($imul(e, 10)) + ((s.charCodeAt(i) >> 0)) >> 0) - 48 >> 0;
+ }
+ i = i + (1) >> 0;
+ }
+ b.dp = b.dp + (($imul(e, esign))) >> 0;
+ }
+ if (!((i === s.length))) {
+ return ok;
+ }
+ ok = true;
+ return ok;
+ };
+ decimal.prototype.set = function(s) { return this.$val.set(s); };
+ readFloat = function(s) {
+ var _1, base, c, dp, e, esign, exp, expChar, hex, i, mantissa, maxMantDigits, nd, ndMant, neg, ok, s, sawdigits, sawdot, trunc, underscores, x, x$1;
+ mantissa = new $Uint64(0, 0);
+ exp = 0;
+ neg = false;
+ trunc = false;
+ hex = false;
+ i = 0;
+ ok = false;
+ underscores = false;
+ if (i >= s.length) {
+ return [mantissa, exp, neg, trunc, hex, i, ok];
+ }
+ if ((s.charCodeAt(i) === 43)) {
+ i = i + (1) >> 0;
+ } else if ((s.charCodeAt(i) === 45)) {
+ neg = true;
+ i = i + (1) >> 0;
+ }
+ base = new $Uint64(0, 10);
+ maxMantDigits = 19;
+ expChar = 101;
+ if ((i + 2 >> 0) < s.length && (s.charCodeAt(i) === 48) && (lower(s.charCodeAt((i + 1 >> 0))) === 120)) {
+ base = new $Uint64(0, 16);
+ maxMantDigits = 16;
+ i = i + (2) >> 0;
+ expChar = 112;
+ hex = true;
+ }
+ sawdot = false;
+ sawdigits = false;
+ nd = 0;
+ ndMant = 0;
+ dp = 0;
+ loop:
+ while (true) {
+ if (!(i < s.length)) { break; }
+ c = s.charCodeAt(i);
+ _1 = true;
+ if (_1 === ((c === 95))) {
+ underscores = true;
+ i = i + (1) >> 0;
+ continue;
+ } else if (_1 === ((c === 46))) {
+ if (sawdot) {
+ break loop;
+ }
+ sawdot = true;
+ dp = nd;
+ i = i + (1) >> 0;
+ continue;
+ } else if (_1 === (48 <= c && c <= 57)) {
+ sawdigits = true;
+ if ((c === 48) && (nd === 0)) {
+ dp = dp - (1) >> 0;
+ i = i + (1) >> 0;
+ continue;
+ }
+ nd = nd + (1) >> 0;
+ if (ndMant < maxMantDigits) {
+ mantissa = $mul64(mantissa, (base));
+ mantissa = (x = (new $Uint64(0, (c - 48 << 24 >>> 24))), new $Uint64(mantissa.$high + x.$high, mantissa.$low + x.$low));
+ ndMant = ndMant + (1) >> 0;
+ } else if (!((c === 48))) {
+ trunc = true;
+ }
+ i = i + (1) >> 0;
+ continue;
+ } else if (_1 === ((base.$high === 0 && base.$low === 16) && 97 <= lower(c) && lower(c) <= 102)) {
+ sawdigits = true;
+ nd = nd + (1) >> 0;
+ if (ndMant < maxMantDigits) {
+ mantissa = $mul64(mantissa, (new $Uint64(0, 16)));
+ mantissa = (x$1 = (new $Uint64(0, ((lower(c) - 97 << 24 >>> 24) + 10 << 24 >>> 24))), new $Uint64(mantissa.$high + x$1.$high, mantissa.$low + x$1.$low));
+ ndMant = ndMant + (1) >> 0;
+ } else {
+ trunc = true;
+ }
+ i = i + (1) >> 0;
+ continue;
+ }
+ break;
+ }
+ if (!sawdigits) {
+ return [mantissa, exp, neg, trunc, hex, i, ok];
+ }
+ if (!sawdot) {
+ dp = nd;
+ }
+ if ((base.$high === 0 && base.$low === 16)) {
+ dp = $imul(dp, (4));
+ ndMant = $imul(ndMant, (4));
+ }
+ if (i < s.length && (lower(s.charCodeAt(i)) === expChar)) {
+ i = i + (1) >> 0;
+ if (i >= s.length) {
+ return [mantissa, exp, neg, trunc, hex, i, ok];
+ }
+ esign = 1;
+ if (s.charCodeAt(i) === 43) {
+ i = i + (1) >> 0;
+ } else if (s.charCodeAt(i) === 45) {
+ i = i + (1) >> 0;
+ esign = -1;
+ }
+ if (i >= s.length || s.charCodeAt(i) < 48 || s.charCodeAt(i) > 57) {
+ return [mantissa, exp, neg, trunc, hex, i, ok];
+ }
+ e = 0;
+ while (true) {
+ if (!(i < s.length && (48 <= s.charCodeAt(i) && s.charCodeAt(i) <= 57 || (s.charCodeAt(i) === 95)))) { break; }
+ if (s.charCodeAt(i) === 95) {
+ underscores = true;
+ i = i + (1) >> 0;
+ continue;
+ }
+ if (e < 10000) {
+ e = (($imul(e, 10)) + ((s.charCodeAt(i) >> 0)) >> 0) - 48 >> 0;
+ }
+ i = i + (1) >> 0;
+ }
+ dp = dp + (($imul(e, esign))) >> 0;
+ } else if ((base.$high === 0 && base.$low === 16)) {
+ return [mantissa, exp, neg, trunc, hex, i, ok];
+ }
+ if (!((mantissa.$high === 0 && mantissa.$low === 0))) {
+ exp = dp - ndMant >> 0;
+ }
+ if (underscores && !underscoreOK($substring(s, 0, i))) {
+ return [mantissa, exp, neg, trunc, hex, i, ok];
+ }
+ ok = true;
+ return [mantissa, exp, neg, trunc, hex, i, ok];
+ };
+ decimal.ptr.prototype.floatBits = function(flt) {
+ var _tmp, _tmp$1, b, bits$1, d, exp, flt, mant, n, n$1, n$2, overflow, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, y, y$1, y$2, y$3, $s;
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ b = new $Uint64(0, 0);
+ overflow = false;
+ d = this;
+ exp = 0;
+ mant = new $Uint64(0, 0);
+ /* */ if (d.nd === 0) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (d.nd === 0) { */ case 1:
+ mant = new $Uint64(0, 0);
+ exp = flt.bias;
+ /* goto out */ $s = 3; continue;
+ /* } */ case 2:
+ /* */ if (d.dp > 310) { $s = 4; continue; }
+ /* */ $s = 5; continue;
+ /* if (d.dp > 310) { */ case 4:
+ /* goto overflow */ $s = 6; continue;
+ /* } */ case 5:
+ /* */ if (d.dp < -330) { $s = 7; continue; }
+ /* */ $s = 8; continue;
+ /* if (d.dp < -330) { */ case 7:
+ mant = new $Uint64(0, 0);
+ exp = flt.bias;
+ /* goto out */ $s = 3; continue;
+ /* } */ case 8:
+ exp = 0;
+ while (true) {
+ if (!(d.dp > 0)) { break; }
+ n = 0;
+ if (d.dp >= powtab.$length) {
+ n = 27;
+ } else {
+ n = (x = d.dp, ((x < 0 || x >= powtab.$length) ? ($throwRuntimeError("index out of range"), undefined) : powtab.$array[powtab.$offset + x]));
+ }
+ d.Shift(-n);
+ exp = exp + (n) >> 0;
+ }
+ while (true) {
+ if (!(d.dp < 0 || (d.dp === 0) && d.d[0] < 53)) { break; }
+ n$1 = 0;
+ if (-d.dp >= powtab.$length) {
+ n$1 = 27;
+ } else {
+ n$1 = (x$1 = -d.dp, ((x$1 < 0 || x$1 >= powtab.$length) ? ($throwRuntimeError("index out of range"), undefined) : powtab.$array[powtab.$offset + x$1]));
+ }
+ d.Shift(n$1);
+ exp = exp - (n$1) >> 0;
+ }
+ exp = exp - (1) >> 0;
+ if (exp < (flt.bias + 1 >> 0)) {
+ n$2 = (flt.bias + 1 >> 0) - exp >> 0;
+ d.Shift(-n$2);
+ exp = exp + (n$2) >> 0;
+ }
+ /* */ if ((exp - flt.bias >> 0) >= (((y = flt.expbits, y < 32 ? (1 << y) : 0) >> 0) - 1 >> 0)) { $s = 9; continue; }
+ /* */ $s = 10; continue;
+ /* if ((exp - flt.bias >> 0) >= (((y = flt.expbits, y < 32 ? (1 << y) : 0) >> 0) - 1 >> 0)) { */ case 9:
+ /* goto overflow */ $s = 6; continue;
+ /* } */ case 10:
+ d.Shift((((1 + flt.mantbits >>> 0) >> 0)));
+ mant = d.RoundedInteger();
+ /* */ if ((x$2 = $shiftLeft64(new $Uint64(0, 2), flt.mantbits), (mant.$high === x$2.$high && mant.$low === x$2.$low))) { $s = 11; continue; }
+ /* */ $s = 12; continue;
+ /* if ((x$2 = $shiftLeft64(new $Uint64(0, 2), flt.mantbits), (mant.$high === x$2.$high && mant.$low === x$2.$low))) { */ case 11:
+ mant = $shiftRightUint64(mant, (1));
+ exp = exp + (1) >> 0;
+ /* */ if ((exp - flt.bias >> 0) >= (((y$1 = flt.expbits, y$1 < 32 ? (1 << y$1) : 0) >> 0) - 1 >> 0)) { $s = 13; continue; }
+ /* */ $s = 14; continue;
+ /* if ((exp - flt.bias >> 0) >= (((y$1 = flt.expbits, y$1 < 32 ? (1 << y$1) : 0) >> 0) - 1 >> 0)) { */ case 13:
+ /* goto overflow */ $s = 6; continue;
+ /* } */ case 14:
+ /* } */ case 12:
+ if ((x$3 = (x$4 = $shiftLeft64(new $Uint64(0, 1), flt.mantbits), new $Uint64(mant.$high & x$4.$high, (mant.$low & x$4.$low) >>> 0)), (x$3.$high === 0 && x$3.$low === 0))) {
+ exp = flt.bias;
+ }
+ /* goto out */ $s = 3; continue;
+ /* overflow: */ case 6:
+ mant = new $Uint64(0, 0);
+ exp = (((y$2 = flt.expbits, y$2 < 32 ? (1 << y$2) : 0) >> 0) - 1 >> 0) + flt.bias >> 0;
+ overflow = true;
+ /* out: */ case 3:
+ bits$1 = (x$5 = (x$6 = $shiftLeft64(new $Uint64(0, 1), flt.mantbits), new $Uint64(x$6.$high - 0, x$6.$low - 1)), new $Uint64(mant.$high & x$5.$high, (mant.$low & x$5.$low) >>> 0));
+ bits$1 = (x$7 = $shiftLeft64((new $Uint64(0, (((exp - flt.bias >> 0)) & ((((y$3 = flt.expbits, y$3 < 32 ? (1 << y$3) : 0) >> 0) - 1 >> 0))))), flt.mantbits), new $Uint64(bits$1.$high | x$7.$high, (bits$1.$low | x$7.$low) >>> 0));
+ if (d.neg) {
+ bits$1 = (x$8 = $shiftLeft64($shiftLeft64(new $Uint64(0, 1), flt.mantbits), flt.expbits), new $Uint64(bits$1.$high | x$8.$high, (bits$1.$low | x$8.$low) >>> 0));
+ }
+ _tmp = bits$1;
+ _tmp$1 = overflow;
+ b = _tmp;
+ overflow = _tmp$1;
+ $s = -1; return [b, overflow];
+ /* */ } return; }
+ };
+ decimal.prototype.floatBits = function(flt) { return this.$val.floatBits(flt); };
+ atof64exact = function(mantissa, exp, neg) {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, exp, f, mantissa, neg, ok, x, x$1, x$2;
+ f = 0;
+ ok = false;
+ if (!((x = $shiftRightUint64(mantissa, float64info.mantbits), (x.$high === 0 && x.$low === 0)))) {
+ return [f, ok];
+ }
+ f = ($flatten64(mantissa));
+ if (neg) {
+ f = -f;
+ }
+ if ((exp === 0)) {
+ _tmp = f;
+ _tmp$1 = true;
+ f = _tmp;
+ ok = _tmp$1;
+ return [f, ok];
+ } else if (exp > 0 && exp <= 37) {
+ if (exp > 22) {
+ f = f * ((x$1 = exp - 22 >> 0, ((x$1 < 0 || x$1 >= float64pow10.$length) ? ($throwRuntimeError("index out of range"), undefined) : float64pow10.$array[float64pow10.$offset + x$1])));
+ exp = 22;
+ }
+ if (f > 1e+15 || f < -1e+15) {
+ return [f, ok];
+ }
+ _tmp$2 = f * ((exp < 0 || exp >= float64pow10.$length) ? ($throwRuntimeError("index out of range"), undefined) : float64pow10.$array[float64pow10.$offset + exp]);
+ _tmp$3 = true;
+ f = _tmp$2;
+ ok = _tmp$3;
+ return [f, ok];
+ } else if (exp < 0 && exp >= -22) {
+ _tmp$4 = f / (x$2 = -exp, ((x$2 < 0 || x$2 >= float64pow10.$length) ? ($throwRuntimeError("index out of range"), undefined) : float64pow10.$array[float64pow10.$offset + x$2]));
+ _tmp$5 = true;
+ f = _tmp$4;
+ ok = _tmp$5;
+ return [f, ok];
+ }
+ return [f, ok];
+ };
+ atof32exact = function(mantissa, exp, neg) {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, exp, f, mantissa, neg, ok, x, x$1, x$2;
+ f = 0;
+ ok = false;
+ if (!((x = $shiftRightUint64(mantissa, float32info.mantbits), (x.$high === 0 && x.$low === 0)))) {
+ return [f, ok];
+ }
+ f = ($flatten64(mantissa));
+ if (neg) {
+ f = -f;
+ }
+ if ((exp === 0)) {
+ _tmp = f;
+ _tmp$1 = true;
+ f = _tmp;
+ ok = _tmp$1;
+ return [f, ok];
+ } else if (exp > 0 && exp <= 17) {
+ if (exp > 10) {
+ f = $fround(f * ((x$1 = exp - 10 >> 0, ((x$1 < 0 || x$1 >= float32pow10.$length) ? ($throwRuntimeError("index out of range"), undefined) : float32pow10.$array[float32pow10.$offset + x$1]))));
+ exp = 10;
+ }
+ if (f > 1e+07 || f < -1e+07) {
+ return [f, ok];
+ }
+ _tmp$2 = $fround(f * ((exp < 0 || exp >= float32pow10.$length) ? ($throwRuntimeError("index out of range"), undefined) : float32pow10.$array[float32pow10.$offset + exp]));
+ _tmp$3 = true;
+ f = _tmp$2;
+ ok = _tmp$3;
+ return [f, ok];
+ } else if (exp < 0 && exp >= -10) {
+ _tmp$4 = $fround(f / (x$2 = -exp, ((x$2 < 0 || x$2 >= float32pow10.$length) ? ($throwRuntimeError("index out of range"), undefined) : float32pow10.$array[float32pow10.$offset + x$2])));
+ _tmp$5 = true;
+ f = _tmp$4;
+ ok = _tmp$5;
+ return [f, ok];
+ }
+ return [f, ok];
+ };
+ atofHex = function(s, flt, mantissa, exp, neg, trunc) {
+ var bits$1, err, exp, flt, mantissa, maxExp, minExp, neg, round, s, trunc, x, x$1, x$10, x$11, x$12, x$13, x$14, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, y, y$1;
+ maxExp = (((y = flt.expbits, y < 32 ? (1 << y) : 0) >> 0) + flt.bias >> 0) - 2 >> 0;
+ minExp = flt.bias + 1 >> 0;
+ exp = exp + (((flt.mantbits >> 0))) >> 0;
+ while (true) {
+ if (!(!((mantissa.$high === 0 && mantissa.$low === 0)) && (x = $shiftRightUint64(mantissa, ((flt.mantbits + 2 >>> 0))), (x.$high === 0 && x.$low === 0)))) { break; }
+ mantissa = $shiftLeft64(mantissa, (1));
+ exp = exp - (1) >> 0;
+ }
+ if (trunc) {
+ mantissa = (x$1 = new $Uint64(0, 1), new $Uint64(mantissa.$high | x$1.$high, (mantissa.$low | x$1.$low) >>> 0));
+ }
+ while (true) {
+ if (!(!((x$2 = $shiftRightUint64(mantissa, (((1 + flt.mantbits >>> 0) + 2 >>> 0))), (x$2.$high === 0 && x$2.$low === 0))))) { break; }
+ mantissa = (x$3 = $shiftRightUint64(mantissa, 1), x$4 = new $Uint64(mantissa.$high & 0, (mantissa.$low & 1) >>> 0), new $Uint64(x$3.$high | x$4.$high, (x$3.$low | x$4.$low) >>> 0));
+ exp = exp + (1) >> 0;
+ }
+ while (true) {
+ if (!((mantissa.$high > 0 || (mantissa.$high === 0 && mantissa.$low > 1)) && exp < (minExp - 2 >> 0))) { break; }
+ mantissa = (x$5 = $shiftRightUint64(mantissa, 1), x$6 = new $Uint64(mantissa.$high & 0, (mantissa.$low & 1) >>> 0), new $Uint64(x$5.$high | x$6.$high, (x$5.$low | x$6.$low) >>> 0));
+ exp = exp + (1) >> 0;
+ }
+ round = new $Uint64(mantissa.$high & 0, (mantissa.$low & 3) >>> 0);
+ mantissa = $shiftRightUint64(mantissa, (2));
+ round = (x$7 = new $Uint64(mantissa.$high & 0, (mantissa.$low & 1) >>> 0), new $Uint64(round.$high | x$7.$high, (round.$low | x$7.$low) >>> 0));
+ exp = exp + (2) >> 0;
+ if ((round.$high === 0 && round.$low === 3)) {
+ mantissa = (x$8 = new $Uint64(0, 1), new $Uint64(mantissa.$high + x$8.$high, mantissa.$low + x$8.$low));
+ if ((x$9 = $shiftLeft64(new $Uint64(0, 1), ((1 + flt.mantbits >>> 0))), (mantissa.$high === x$9.$high && mantissa.$low === x$9.$low))) {
+ mantissa = $shiftRightUint64(mantissa, (1));
+ exp = exp + (1) >> 0;
+ }
+ }
+ if ((x$10 = $shiftRightUint64(mantissa, flt.mantbits), (x$10.$high === 0 && x$10.$low === 0))) {
+ exp = flt.bias;
+ }
+ err = $ifaceNil;
+ if (exp > maxExp) {
+ mantissa = $shiftLeft64(new $Uint64(0, 1), flt.mantbits);
+ exp = maxExp + 1 >> 0;
+ err = rangeError("ParseFloat", s);
+ }
+ bits$1 = (x$11 = (x$12 = $shiftLeft64(new $Uint64(0, 1), flt.mantbits), new $Uint64(x$12.$high - 0, x$12.$low - 1)), new $Uint64(mantissa.$high & x$11.$high, (mantissa.$low & x$11.$low) >>> 0));
+ bits$1 = (x$13 = $shiftLeft64((new $Uint64(0, (((exp - flt.bias >> 0)) & ((((y$1 = flt.expbits, y$1 < 32 ? (1 << y$1) : 0) >> 0) - 1 >> 0))))), flt.mantbits), new $Uint64(bits$1.$high | x$13.$high, (bits$1.$low | x$13.$low) >>> 0));
+ if (neg) {
+ bits$1 = (x$14 = $shiftLeft64($shiftLeft64(new $Uint64(0, 1), flt.mantbits), flt.expbits), new $Uint64(bits$1.$high | x$14.$high, (bits$1.$low | x$14.$low) >>> 0));
+ }
+ if (flt === float32info) {
+ return [(math.Float32frombits(((bits$1.$low >>> 0)))), err];
+ }
+ return [math.Float64frombits(bits$1), err];
+ };
+ atof32 = function(s) {
+ var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, b, d, err, err$1, exp, f, f$1, f$2, f$3, fUp, hex, mantissa, n, n$1, neg, ok, ok$1, ok$2, ok$3, ok$4, ovf, s, trunc, val;
+ f = 0;
+ n = 0;
+ err = $ifaceNil;
+ _tuple = special(s);
+ val = _tuple[0];
+ n$1 = _tuple[1];
+ ok = _tuple[2];
+ if (ok) {
+ _tmp = ($fround(val));
+ _tmp$1 = n$1;
+ _tmp$2 = $ifaceNil;
+ f = _tmp;
+ n = _tmp$1;
+ err = _tmp$2;
+ return [f, n, err];
+ }
+ _tuple$1 = readFloat(s);
+ mantissa = _tuple$1[0];
+ exp = _tuple$1[1];
+ neg = _tuple$1[2];
+ trunc = _tuple$1[3];
+ hex = _tuple$1[4];
+ n = _tuple$1[5];
+ ok$1 = _tuple$1[6];
+ if (!ok$1) {
+ _tmp$3 = 0;
+ _tmp$4 = n;
+ _tmp$5 = syntaxError("ParseFloat", s);
+ f = _tmp$3;
+ n = _tmp$4;
+ err = _tmp$5;
+ return [f, n, err];
+ }
+ if (hex) {
+ _tuple$2 = atofHex($substring(s, 0, n), float32info, mantissa, exp, neg, trunc);
+ f$1 = _tuple$2[0];
+ err$1 = _tuple$2[1];
+ _tmp$6 = ($fround(f$1));
+ _tmp$7 = n;
+ _tmp$8 = err$1;
+ f = _tmp$6;
+ n = _tmp$7;
+ err = _tmp$8;
+ return [f, n, err];
+ }
+ if (optimize) {
+ if (!trunc) {
+ _tuple$3 = atof32exact(mantissa, exp, neg);
+ f$2 = _tuple$3[0];
+ ok$2 = _tuple$3[1];
+ if (ok$2) {
+ _tmp$9 = f$2;
+ _tmp$10 = n;
+ _tmp$11 = $ifaceNil;
+ f = _tmp$9;
+ n = _tmp$10;
+ err = _tmp$11;
+ return [f, n, err];
+ }
+ }
+ _tuple$4 = eiselLemire32(mantissa, exp, neg);
+ f$3 = _tuple$4[0];
+ ok$3 = _tuple$4[1];
+ if (ok$3) {
+ if (!trunc) {
+ _tmp$12 = f$3;
+ _tmp$13 = n;
+ _tmp$14 = $ifaceNil;
+ f = _tmp$12;
+ n = _tmp$13;
+ err = _tmp$14;
+ return [f, n, err];
+ }
+ _tuple$5 = eiselLemire32(new $Uint64(mantissa.$high + 0, mantissa.$low + 1), exp, neg);
+ fUp = _tuple$5[0];
+ ok$4 = _tuple$5[1];
+ if (ok$4 && (f$3 === fUp)) {
+ _tmp$15 = f$3;
+ _tmp$16 = n;
+ _tmp$17 = $ifaceNil;
+ f = _tmp$15;
+ n = _tmp$16;
+ err = _tmp$17;
+ return [f, n, err];
+ }
+ }
+ }
+ d = new decimal.ptr(arrayType$5.zero(), 0, 0, false, false);
+ if (!d.set($substring(s, 0, n))) {
+ _tmp$18 = 0;
+ _tmp$19 = n;
+ _tmp$20 = syntaxError("ParseFloat", s);
+ f = _tmp$18;
+ n = _tmp$19;
+ err = _tmp$20;
+ return [f, n, err];
+ }
+ _tuple$6 = d.floatBits(float32info);
+ b = _tuple$6[0];
+ ovf = _tuple$6[1];
+ f = math.Float32frombits(((b.$low >>> 0)));
+ if (ovf) {
+ err = rangeError("ParseFloat", s);
+ }
+ _tmp$21 = f;
+ _tmp$22 = n;
+ _tmp$23 = err;
+ f = _tmp$21;
+ n = _tmp$22;
+ err = _tmp$23;
+ return [f, n, err];
+ };
+ atof64 = function(s) {
+ var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, b, d, err, err$1, exp, f, f$1, f$2, f$3, fUp, hex, mantissa, n, n$1, neg, ok, ok$1, ok$2, ok$3, ok$4, ovf, s, trunc, val;
+ f = 0;
+ n = 0;
+ err = $ifaceNil;
+ _tuple = special(s);
+ val = _tuple[0];
+ n$1 = _tuple[1];
+ ok = _tuple[2];
+ if (ok) {
+ _tmp = val;
+ _tmp$1 = n$1;
+ _tmp$2 = $ifaceNil;
+ f = _tmp;
+ n = _tmp$1;
+ err = _tmp$2;
+ return [f, n, err];
+ }
+ _tuple$1 = readFloat(s);
+ mantissa = _tuple$1[0];
+ exp = _tuple$1[1];
+ neg = _tuple$1[2];
+ trunc = _tuple$1[3];
+ hex = _tuple$1[4];
+ n = _tuple$1[5];
+ ok$1 = _tuple$1[6];
+ if (!ok$1) {
+ _tmp$3 = 0;
+ _tmp$4 = n;
+ _tmp$5 = syntaxError("ParseFloat", s);
+ f = _tmp$3;
+ n = _tmp$4;
+ err = _tmp$5;
+ return [f, n, err];
+ }
+ if (hex) {
+ _tuple$2 = atofHex($substring(s, 0, n), float64info, mantissa, exp, neg, trunc);
+ f$1 = _tuple$2[0];
+ err$1 = _tuple$2[1];
+ _tmp$6 = f$1;
+ _tmp$7 = n;
+ _tmp$8 = err$1;
+ f = _tmp$6;
+ n = _tmp$7;
+ err = _tmp$8;
+ return [f, n, err];
+ }
+ if (optimize) {
+ if (!trunc) {
+ _tuple$3 = atof64exact(mantissa, exp, neg);
+ f$2 = _tuple$3[0];
+ ok$2 = _tuple$3[1];
+ if (ok$2) {
+ _tmp$9 = f$2;
+ _tmp$10 = n;
+ _tmp$11 = $ifaceNil;
+ f = _tmp$9;
+ n = _tmp$10;
+ err = _tmp$11;
+ return [f, n, err];
+ }
+ }
+ _tuple$4 = eiselLemire64(mantissa, exp, neg);
+ f$3 = _tuple$4[0];
+ ok$3 = _tuple$4[1];
+ if (ok$3) {
+ if (!trunc) {
+ _tmp$12 = f$3;
+ _tmp$13 = n;
+ _tmp$14 = $ifaceNil;
+ f = _tmp$12;
+ n = _tmp$13;
+ err = _tmp$14;
+ return [f, n, err];
+ }
+ _tuple$5 = eiselLemire64(new $Uint64(mantissa.$high + 0, mantissa.$low + 1), exp, neg);
+ fUp = _tuple$5[0];
+ ok$4 = _tuple$5[1];
+ if (ok$4 && (f$3 === fUp)) {
+ _tmp$15 = f$3;
+ _tmp$16 = n;
+ _tmp$17 = $ifaceNil;
+ f = _tmp$15;
+ n = _tmp$16;
+ err = _tmp$17;
+ return [f, n, err];
+ }
+ }
+ }
+ d = new decimal.ptr(arrayType$5.zero(), 0, 0, false, false);
+ if (!d.set($substring(s, 0, n))) {
+ _tmp$18 = 0;
+ _tmp$19 = n;
+ _tmp$20 = syntaxError("ParseFloat", s);
+ f = _tmp$18;
+ n = _tmp$19;
+ err = _tmp$20;
+ return [f, n, err];
+ }
+ _tuple$6 = d.floatBits(float64info);
+ b = _tuple$6[0];
+ ovf = _tuple$6[1];
+ f = math.Float64frombits(b);
+ if (ovf) {
+ err = rangeError("ParseFloat", s);
+ }
+ _tmp$21 = f;
+ _tmp$22 = n;
+ _tmp$23 = err;
+ f = _tmp$21;
+ n = _tmp$22;
+ err = _tmp$23;
+ return [f, n, err];
+ };
+ ParseFloat = function(s, bitSize) {
+ var _tuple, bitSize, err, f, n, s;
+ _tuple = parseFloatPrefix(s, bitSize);
+ f = _tuple[0];
+ n = _tuple[1];
+ err = _tuple[2];
+ if (!((n === s.length)) && ($interfaceIsEqual(err, $ifaceNil) || !($interfaceIsEqual($assertType(err, ptrType$1).Err, $pkg.ErrSyntax)))) {
+ return [0, syntaxError("ParseFloat", s)];
+ }
+ return [f, err];
+ };
+ $pkg.ParseFloat = ParseFloat;
+ parseFloatPrefix = function(s, bitSize) {
+ var _tuple, bitSize, err, f, n, s;
+ if (bitSize === 32) {
+ _tuple = atof32(s);
+ f = _tuple[0];
+ n = _tuple[1];
+ err = _tuple[2];
+ return [(f), n, err];
+ }
+ return atof64(s);
+ };
+ ParseBool = function(str) {
+ var _1, str;
+ _1 = str;
+ if (_1 === ("1") || _1 === ("t") || _1 === ("T") || _1 === ("true") || _1 === ("TRUE") || _1 === ("True")) {
+ return [true, $ifaceNil];
+ } else if (_1 === ("0") || _1 === ("f") || _1 === ("F") || _1 === ("false") || _1 === ("FALSE") || _1 === ("False")) {
+ return [false, $ifaceNil];
+ }
+ return [false, syntaxError("ParseBool", str)];
+ };
+ $pkg.ParseBool = ParseBool;
+ FormatBool = function(b) {
+ var b;
+ if (b) {
+ return "true";
+ }
+ return "false";
+ };
+ $pkg.FormatBool = FormatBool;
+ AppendBool = function(dst, b) {
+ var b, dst;
+ if (b) {
+ return $appendSlice(dst, "true");
+ }
+ return $appendSlice(dst, "false");
+ };
+ $pkg.AppendBool = AppendBool;
+ Itoa = function(i) {
+ var i;
+ return $internalize(i.toString(), $String);
+ };
+ $pkg.Itoa = Itoa;
+ Atoi = function(s) {
+ var floatval, i, jsValue, s, v;
+ if (s.length === 0) {
+ return [0, syntaxError("Atoi", s)];
+ }
+ i = 0;
+ while (true) {
+ if (!(i < s.length)) { break; }
+ v = s.charCodeAt(i);
+ if (v < 48 || v > 57) {
+ if (!((v === 43)) && !((v === 45))) {
+ return [0, syntaxError("Atoi", s)];
+ }
+ }
+ i = i + (1) >> 0;
+ }
+ jsValue = $global.Number($externalize(s, $String), 10);
+ if (!!!($global.isFinite(jsValue))) {
+ return [0, syntaxError("Atoi", s)];
+ }
+ floatval = $parseFloat(jsValue);
+ if (floatval > 2.147483647e+09) {
+ return [2147483647, rangeError("Atoi", s)];
+ } else if (floatval < -2.147483648e+09) {
+ return [-2147483648, rangeError("Atoi", s)];
+ }
+ return [$parseInt(jsValue) >> 0, $ifaceNil];
+ };
+ $pkg.Atoi = Atoi;
+ ptrType$2.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Assign", name: "Assign", pkg: "", typ: $funcType([$Uint64], [], false)}, {prop: "Shift", name: "Shift", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Round", name: "Round", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "RoundDown", name: "RoundDown", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "RoundUp", name: "RoundUp", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "RoundedInteger", name: "RoundedInteger", pkg: "", typ: $funcType([], [$Uint64], false)}, {prop: "set", name: "set", pkg: "strconv", typ: $funcType([$String], [$Bool], false)}, {prop: "floatBits", name: "floatBits", pkg: "strconv", typ: $funcType([ptrType], [$Uint64, $Bool], false)}];
+ ptrType$1.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Unwrap", name: "Unwrap", pkg: "", typ: $funcType([], [$error], false)}];
+ floatInfo.init("strconv", [{prop: "mantbits", name: "mantbits", embedded: false, exported: false, typ: $Uint, tag: ""}, {prop: "expbits", name: "expbits", embedded: false, exported: false, typ: $Uint, tag: ""}, {prop: "bias", name: "bias", embedded: false, exported: false, typ: $Int, tag: ""}]);
+ decimalSlice.init("strconv", [{prop: "d", name: "d", embedded: false, exported: false, typ: sliceType$6, tag: ""}, {prop: "nd", name: "nd", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "dp", name: "dp", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "neg", name: "neg", embedded: false, exported: false, typ: $Bool, tag: ""}]);
+ decimal.init("strconv", [{prop: "d", name: "d", embedded: false, exported: false, typ: arrayType$5, tag: ""}, {prop: "nd", name: "nd", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "dp", name: "dp", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "neg", name: "neg", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "trunc", name: "trunc", embedded: false, exported: false, typ: $Bool, tag: ""}]);
+ leftCheat.init("strconv", [{prop: "delta", name: "delta", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "cutoff", name: "cutoff", embedded: false, exported: false, typ: $String, tag: ""}]);
+ NumError.init("", [{prop: "Func", name: "Func", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Num", name: "Num", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Err", name: "Err", embedded: false, exported: true, typ: $error, 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 = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = js.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = bytealg.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = math.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = bits.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = utf8.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ isPrint16 = new sliceType([32, 126, 161, 887, 890, 895, 900, 1366, 1369, 1418, 1421, 1479, 1488, 1514, 1519, 1524, 1542, 1563, 1566, 1805, 1808, 1866, 1869, 1969, 1984, 2042, 2045, 2093, 2096, 2139, 2142, 2154, 2208, 2247, 2259, 2444, 2447, 2448, 2451, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2531, 2534, 2558, 2561, 2570, 2575, 2576, 2579, 2617, 2620, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2654, 2662, 2678, 2689, 2745, 2748, 2765, 2768, 2768, 2784, 2787, 2790, 2801, 2809, 2828, 2831, 2832, 2835, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2901, 2903, 2908, 2915, 2918, 2935, 2946, 2954, 2958, 2965, 2969, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3021, 3024, 3024, 3031, 3031, 3046, 3066, 3072, 3129, 3133, 3149, 3157, 3162, 3168, 3171, 3174, 3183, 3191, 3257, 3260, 3277, 3285, 3286, 3294, 3299, 3302, 3314, 3328, 3407, 3412, 3427, 3430, 3478, 3482, 3517, 3520, 3526, 3530, 3530, 3535, 3551, 3558, 3567, 3570, 3572, 3585, 3642, 3647, 3675, 3713, 3773, 3776, 3789, 3792, 3801, 3804, 3807, 3840, 3948, 3953, 4058, 4096, 4295, 4301, 4301, 4304, 4685, 4688, 4701, 4704, 4749, 4752, 4789, 4792, 4805, 4808, 4885, 4888, 4954, 4957, 4988, 4992, 5017, 5024, 5109, 5112, 5117, 5120, 5788, 5792, 5880, 5888, 5908, 5920, 5942, 5952, 5971, 5984, 6003, 6016, 6109, 6112, 6121, 6128, 6137, 6144, 6157, 6160, 6169, 6176, 6264, 6272, 6314, 6320, 6389, 6400, 6443, 6448, 6459, 6464, 6464, 6468, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6618, 6622, 6683, 6686, 6780, 6783, 6793, 6800, 6809, 6816, 6829, 6832, 6848, 6912, 6987, 6992, 7036, 7040, 7155, 7164, 7223, 7227, 7241, 7245, 7304, 7312, 7354, 7357, 7367, 7376, 7418, 7424, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8061, 8064, 8147, 8150, 8175, 8178, 8190, 8208, 8231, 8240, 8286, 8304, 8305, 8308, 8348, 8352, 8383, 8400, 8432, 8448, 8587, 8592, 9254, 9280, 9290, 9312, 11123, 11126, 11507, 11513, 11559, 11565, 11565, 11568, 11623, 11631, 11632, 11647, 11670, 11680, 11858, 11904, 12019, 12032, 12245, 12272, 12283, 12289, 12438, 12441, 12543, 12549, 12771, 12784, 40956, 40960, 42124, 42128, 42182, 42192, 42539, 42560, 42743, 42752, 42943, 42946, 42954, 42997, 43052, 43056, 43065, 43072, 43127, 43136, 43205, 43214, 43225, 43232, 43347, 43359, 43388, 43392, 43481, 43486, 43574, 43584, 43597, 43600, 43609, 43612, 43714, 43739, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43883, 43888, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64449, 64467, 64831, 64848, 64911, 64914, 64967, 65008, 65021, 65024, 65049, 65056, 65131, 65136, 65276, 65281, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65504, 65518, 65532, 65533]);
+ isNotPrint16 = new sliceType([173, 907, 909, 930, 1328, 1424, 1757, 2111, 2143, 2229, 2274, 2436, 2473, 2481, 2526, 2564, 2601, 2609, 2612, 2615, 2621, 2653, 2692, 2702, 2706, 2729, 2737, 2740, 2758, 2762, 2816, 2820, 2857, 2865, 2868, 2910, 2948, 2961, 2971, 2973, 3017, 3085, 3089, 3113, 3141, 3145, 3159, 3213, 3217, 3241, 3252, 3269, 3273, 3295, 3312, 3341, 3345, 3397, 3401, 3456, 3460, 3506, 3516, 3541, 3543, 3715, 3717, 3723, 3748, 3750, 3781, 3783, 3912, 3992, 4029, 4045, 4294, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823, 4881, 5760, 5901, 5997, 6001, 6431, 6751, 7674, 8024, 8026, 8028, 8030, 8117, 8133, 8156, 8181, 8335, 11158, 11311, 11359, 11558, 11687, 11695, 11703, 11711, 11719, 11727, 11735, 11743, 11930, 12352, 12592, 12687, 12831, 43470, 43519, 43815, 43823, 64311, 64317, 64319, 64322, 64325, 65107, 65127, 65141, 65511]);
+ isPrint32 = new sliceType$1([65536, 65613, 65616, 65629, 65664, 65786, 65792, 65794, 65799, 65843, 65847, 65948, 65952, 65952, 66000, 66045, 66176, 66204, 66208, 66256, 66272, 66299, 66304, 66339, 66349, 66378, 66384, 66426, 66432, 66499, 66504, 66517, 66560, 66717, 66720, 66729, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 66927, 66927, 67072, 67382, 67392, 67413, 67424, 67431, 67584, 67589, 67592, 67640, 67644, 67644, 67647, 67742, 67751, 67759, 67808, 67829, 67835, 67867, 67871, 67897, 67903, 67903, 67968, 68023, 68028, 68047, 68050, 68102, 68108, 68149, 68152, 68154, 68159, 68168, 68176, 68184, 68192, 68255, 68288, 68326, 68331, 68342, 68352, 68405, 68409, 68437, 68440, 68466, 68472, 68497, 68505, 68508, 68521, 68527, 68608, 68680, 68736, 68786, 68800, 68850, 68858, 68903, 68912, 68921, 69216, 69293, 69296, 69297, 69376, 69415, 69424, 69465, 69552, 69579, 69600, 69622, 69632, 69709, 69714, 69743, 69759, 69825, 69840, 69864, 69872, 69881, 69888, 69959, 69968, 70006, 70016, 70132, 70144, 70206, 70272, 70313, 70320, 70378, 70384, 70393, 70400, 70412, 70415, 70416, 70419, 70468, 70471, 70472, 70475, 70477, 70480, 70480, 70487, 70487, 70493, 70499, 70502, 70508, 70512, 70516, 70656, 70753, 70784, 70855, 70864, 70873, 71040, 71093, 71096, 71133, 71168, 71236, 71248, 71257, 71264, 71276, 71296, 71352, 71360, 71369, 71424, 71450, 71453, 71467, 71472, 71487, 71680, 71739, 71840, 71922, 71935, 71942, 71945, 71945, 71948, 71992, 71995, 72006, 72016, 72025, 72096, 72103, 72106, 72151, 72154, 72164, 72192, 72263, 72272, 72354, 72384, 72440, 72704, 72773, 72784, 72812, 72816, 72847, 72850, 72886, 72960, 73014, 73018, 73031, 73040, 73049, 73056, 73112, 73120, 73129, 73440, 73464, 73648, 73648, 73664, 73713, 73727, 74649, 74752, 74868, 74880, 75075, 77824, 78894, 82944, 83526, 92160, 92728, 92736, 92777, 92782, 92783, 92880, 92909, 92912, 92917, 92928, 92997, 93008, 93047, 93053, 93071, 93760, 93850, 93952, 94026, 94031, 94087, 94095, 94111, 94176, 94180, 94192, 94193, 94208, 100343, 100352, 101589, 101632, 101640, 110592, 110878, 110928, 110930, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 113820, 113823, 118784, 119029, 119040, 119078, 119081, 119154, 119163, 119272, 119296, 119365, 119520, 119539, 119552, 119638, 119648, 119672, 119808, 119967, 119970, 119970, 119973, 119974, 119977, 120074, 120077, 120134, 120138, 120485, 120488, 120779, 120782, 121483, 121499, 121519, 122880, 122904, 122907, 122922, 123136, 123180, 123184, 123197, 123200, 123209, 123214, 123215, 123584, 123641, 123647, 123647, 124928, 125124, 125127, 125142, 125184, 125259, 125264, 125273, 125278, 125279, 126065, 126132, 126209, 126269, 126464, 126500, 126503, 126523, 126530, 126530, 126535, 126548, 126551, 126564, 126567, 126619, 126625, 126651, 126704, 126705, 126976, 127019, 127024, 127123, 127136, 127150, 127153, 127221, 127232, 127405, 127462, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 128727, 128736, 128748, 128752, 128764, 128768, 128883, 128896, 128984, 128992, 129003, 129024, 129035, 129040, 129095, 129104, 129113, 129120, 129159, 129168, 129197, 129200, 129201, 129280, 129619, 129632, 129645, 129648, 129652, 129656, 129658, 129664, 129670, 129680, 129704, 129712, 129718, 129728, 129730, 129744, 129750, 129792, 129994, 130032, 130041, 131072, 173789, 173824, 177972, 177984, 178205, 178208, 183969, 183984, 191456, 194560, 195101, 196608, 201546, 917760, 917999]);
+ isNotPrint32 = new sliceType([12, 39, 59, 62, 399, 926, 2057, 2102, 2134, 2291, 2564, 2580, 2584, 3711, 3754, 4285, 4405, 4576, 4626, 4743, 4745, 4750, 4766, 4868, 4905, 4913, 4916, 4922, 5212, 6420, 6423, 6454, 7177, 7223, 7336, 7431, 7434, 7483, 7486, 7526, 7529, 7567, 7570, 9327, 27231, 27482, 27490, 54357, 54429, 54445, 54458, 54460, 54468, 54534, 54549, 54557, 54586, 54591, 54597, 54609, 55968, 57351, 57378, 57381, 60932, 60960, 60963, 60968, 60979, 60984, 60986, 61000, 61002, 61004, 61008, 61011, 61016, 61018, 61020, 61022, 61024, 61027, 61035, 61043, 61048, 61053, 61055, 61066, 61092, 61098, 61632, 61648, 63865, 63948, 64403]);
+ isGraphic = new sliceType([160, 5760, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8199, 8200, 8201, 8202, 8239, 8287, 12288]);
+ uint64pow10 = $toNativeArray($kindUint64, [new $Uint64(0, 1), new $Uint64(0, 10), new $Uint64(0, 100), new $Uint64(0, 1000), new $Uint64(0, 10000), new $Uint64(0, 100000), new $Uint64(0, 1000000), new $Uint64(0, 10000000), new $Uint64(0, 100000000), new $Uint64(0, 1000000000), new $Uint64(2, 1410065408), new $Uint64(23, 1215752192), new $Uint64(232, 3567587328), new $Uint64(2328, 1316134912), new $Uint64(23283, 276447232), new $Uint64(232830, 2764472320), new $Uint64(2328306, 1874919424), new $Uint64(23283064, 1569325056), new $Uint64(232830643, 2808348672), new $Uint64(2328306436, 2313682944)]);
+ float32info = new floatInfo.ptr(23, 8, -127);
+ float64info = new floatInfo.ptr(52, 11, -1023);
+ detailedPowersOfTen = $toNativeArray($kindArray, [$toNativeArray($kindUint64, [new $Uint64(389204073, 3445679187), new $Uint64(4203730336, 136053384)]), $toNativeArray($kindUint64, [new $Uint64(243252546, 542936756), new $Uint64(2627331460, 85033365)]), $toNativeArray($kindUint64, [new $Uint64(1377807506, 2826154593), new $Uint64(3284164325, 106291706)]), $toNativeArray($kindUint64, [new $Uint64(3869743031, 1385209593), new $Uint64(4105205406, 1206606456)]), $toNativeArray($kindUint64, [new $Uint64(2418589394, 2476368732), new $Uint64(2565753378, 3975354507)]), $toNativeArray($kindUint64, [new $Uint64(1949494919, 947977267), new $Uint64(3207191723, 2821709486)]), $toNativeArray($kindUint64, [new $Uint64(289385001, 111229759), new $Uint64(4008989654, 2453395034)]), $toNativeArray($kindUint64, [new $Uint64(1254607449, 2753873159), new $Uint64(2505618534, 459630072)]), $toNativeArray($kindUint64, [new $Uint64(1568259312, 221115977), new $Uint64(3132023167, 2722021238)]), $toNativeArray($kindUint64, [new $Uint64(4107807788, 276394972), new $Uint64(3915028959, 2328784723)]), $toNativeArray($kindUint64, [new $Uint64(2030508955, 2320230505), new $Uint64(2446893099, 3066103188)]), $toNativeArray($kindUint64, [new $Uint64(2538136194, 1826546308), new $Uint64(3058616374, 2758887161)]), $toNativeArray($kindUint64, [new $Uint64(4246412067, 135699237), new $Uint64(3823270468, 1301125303)]), $toNativeArray($kindUint64, [new $Uint64(4264620277, 3842908407), new $Uint64(2389544042, 2960686962)]), $toNativeArray($kindUint64, [new $Uint64(3183291699, 1582410037), new $Uint64(2986930053, 1553375055)]), $toNativeArray($kindUint64, [new $Uint64(2905372800, 904270722), new $Uint64(3733662566, 3015460643)]), $toNativeArray($kindUint64, [new $Uint64(1278987088, 565169201), new $Uint64(2333539104, 810921078)]), $toNativeArray($kindUint64, [new $Uint64(3746217508, 706461501), new $Uint64(2916923880, 1013651347)]), $toNativeArray($kindUint64, [new $Uint64(3609030061, 883076877), new $Uint64(3646154850, 1267064184)]), $toNativeArray($kindUint64, [new $Uint64(2255643788, 1088793960), new $Uint64(2278846781, 1865656939)]), $toNativeArray($kindUint64, [new $Uint64(1745812911, 1360992450), new $Uint64(2848558476, 3405812998)]), $toNativeArray($kindUint64, [new $Uint64(34782491, 627498738), new $Uint64(3560698095, 4257266248)]), $toNativeArray($kindUint64, [new $Uint64(21739056, 4150283095), new $Uint64(2225436309, 4271404141)]), $toNativeArray($kindUint64, [new $Uint64(1100915645, 892886573), new $Uint64(2781795387, 2118029704)]), $toNativeArray($kindUint64, [new $Uint64(1376144556, 2189850041), new $Uint64(3477244234, 1573795306)]), $toNativeArray($kindUint64, [new $Uint64(1933832171, 3516139923), new $Uint64(2173277646, 2057363890)]), $toNativeArray($kindUint64, [new $Uint64(269806566, 3321433080), new $Uint64(2716597058, 424221215)]), $toNativeArray($kindUint64, [new $Uint64(3558483680, 2004307702), new $Uint64(3395746322, 2677760166)]), $toNativeArray($kindUint64, [new $Uint64(2300620952, 2505384628), new $Uint64(4244682903, 1199716560)]), $toNativeArray($kindUint64, [new $Uint64(1437888095, 1565865392), new $Uint64(2652926814, 2360435586)]), $toNativeArray($kindUint64, [new $Uint64(3944843767, 883589917), new $Uint64(3316158518, 803060834)]), $toNativeArray($kindUint64, [new $Uint64(2783571061, 30745572), new $Uint64(4145198147, 3151309691)]), $toNativeArray($kindUint64, [new $Uint64(1202861001, 556086894), new $Uint64(2590748842, 1432697645)]), $toNativeArray($kindUint64, [new $Uint64(2577318075, 1768850442), new $Uint64(3238436052, 3938355704)]), $toNativeArray($kindUint64, [new $Uint64(3221647594, 1137321229), new $Uint64(4048045066, 627977334)]), $toNativeArray($kindUint64, [new $Uint64(939787922, 1784567592), new $Uint64(2530028166, 1466227658)]), $toNativeArray($kindUint64, [new $Uint64(3322218551, 83225842), new $Uint64(3162535207, 3980268220)]), $toNativeArray($kindUint64, [new $Uint64(4152773188, 3325257774), new $Uint64(3953169009, 3901593451)]), $toNativeArray($kindUint64, [new $Uint64(2058612330, 4225769757), new $Uint64(2470730631, 827883171)]), $toNativeArray($kindUint64, [new $Uint64(1499523589, 3134728548), new $Uint64(3088413288, 4256079436)]), $toNativeArray($kindUint64, [new $Uint64(1874404487, 697185213), new $Uint64(3860516611, 1025131999)]), $toNativeArray($kindUint64, [new $Uint64(2782115540, 2046353494), new $Uint64(2412822882, 103836587)]), $toNativeArray($kindUint64, [new $Uint64(2403902601, 2557941868), new $Uint64(3016028602, 2277279382)]), $toNativeArray($kindUint64, [new $Uint64(857394603, 4271169159), new $Uint64(3770035753, 699115580)]), $toNativeArray($kindUint64, [new $Uint64(2683355275, 2132609812), new $Uint64(2356272345, 3121301797)]), $toNativeArray($kindUint64, [new $Uint64(132968622, 1592020441), new $Uint64(2945340432, 680401775)]), $toNativeArray($kindUint64, [new $Uint64(3387436249, 4137509200), new $Uint64(3681675540, 850502218)]), $toNativeArray($kindUint64, [new $Uint64(3190889480, 975330514), new $Uint64(2301047212, 2679047534)]), $toNativeArray($kindUint64, [new $Uint64(1841128202, 1219163142), new $Uint64(2876309015, 3348809418)]), $toNativeArray($kindUint64, [new $Uint64(153926604, 3671437576), new $Uint64(3595386269, 3112269949)]), $toNativeArray($kindUint64, [new $Uint64(633075040, 147164837), new $Uint64(2247116418, 2482039630)]), $toNativeArray($kindUint64, [new $Uint64(2938827448, 183956046), new $Uint64(2808895523, 955065889)]), $toNativeArray($kindUint64, [new $Uint64(452308838, 229945057), new $Uint64(3511119404, 120090538)]), $toNativeArray($kindUint64, [new $Uint64(1356434847, 3364941133), new $Uint64(2194449627, 2222540234)]), $toNativeArray($kindUint64, [new $Uint64(3843027207, 3132434592), new $Uint64(2743062034, 1704433468)]), $toNativeArray($kindUint64, [new $Uint64(508816713, 2841801416), new $Uint64(3428827542, 4278025484)]), $toNativeArray($kindUint64, [new $Uint64(636020892, 331026298), new $Uint64(4286034428, 3200048207)]), $toNativeArray($kindUint64, [new $Uint64(2008125793, 2354375084), new $Uint64(2678771517, 4147513777)]), $toNativeArray($kindUint64, [new $Uint64(3583899065, 4016710679), new $Uint64(3348464397, 1963166749)]), $toNativeArray($kindUint64, [new $Uint64(1258648360, 1799662877), new $Uint64(4185580496, 3527700261)]), $toNativeArray($kindUint64, [new $Uint64(1323526137, 1124789298), new $Uint64(2615987810, 2204812663)]), $toNativeArray($kindUint64, [new $Uint64(580665847, 2479728447), new $Uint64(3269984763, 608532181)]), $toNativeArray($kindUint64, [new $Uint64(1799574133, 2025918735), new $Uint64(4087480953, 3981890698)]), $toNativeArray($kindUint64, [new $Uint64(2198475657, 1803070121), new $Uint64(2554675596, 878068950)]), $toNativeArray($kindUint64, [new $Uint64(600610923, 3327579475), new $Uint64(3193344495, 1097586188)]), $toNativeArray($kindUint64, [new $Uint64(750763654, 3085732520), new $Uint64(3991680619, 298240911)]), $toNativeArray($kindUint64, [new $Uint64(2079840020, 854841001), new $Uint64(2494800386, 3944496953)]), $toNativeArray($kindUint64, [new $Uint64(3673541849, 1068551251), new $Uint64(3118500483, 2783137543)]), $toNativeArray($kindUint64, [new $Uint64(3518185487, 2409430888), new $Uint64(3898125604, 2405180105)]), $toNativeArray($kindUint64, [new $Uint64(588253193, 3116507041), new $Uint64(2436328502, 3650721214)]), $toNativeArray($kindUint64, [new $Uint64(2882800140, 674408330), new $Uint64(3045410628, 2415917869)]), $toNativeArray($kindUint64, [new $Uint64(382274703, 843010412), new $Uint64(3806763285, 3019897337)]), $toNativeArray($kindUint64, [new $Uint64(2923276249, 2137494243), new $Uint64(2379227053, 2424306747)]), $toNativeArray($kindUint64, [new $Uint64(2580353487, 3745609628), new $Uint64(2974033816, 4104125258)]), $toNativeArray($kindUint64, [new $Uint64(1077958211, 3608270211), new $Uint64(3717542271, 835189277)]), $toNativeArray($kindUint64, [new $Uint64(1210594794, 1718297970), new $Uint64(2323463919, 2132606034)]), $toNativeArray($kindUint64, [new $Uint64(3660727141, 388815), new $Uint64(2904329899, 1592015718)]), $toNativeArray($kindUint64, [new $Uint64(2428425278, 1074227842), new $Uint64(3630412374, 916277824)]), $toNativeArray($kindUint64, [new $Uint64(1517765798, 3892617873), new $Uint64(2269007733, 3793899112)]), $toNativeArray($kindUint64, [new $Uint64(1897207248, 2718288694), new $Uint64(2836259667, 1521148418)]), $toNativeArray($kindUint64, [new $Uint64(224025412, 3397860867), new $Uint64(3545324584, 827693699)]), $toNativeArray($kindUint64, [new $Uint64(3898112266, 4271146690), new $Uint64(2215827865, 517308561)]), $toNativeArray($kindUint64, [new $Uint64(1651414861, 3191449714), new $Uint64(2769784831, 1720377526)]), $toNativeArray($kindUint64, [new $Uint64(4211752225, 768086671), new $Uint64(3462231039, 1076730083)]), $toNativeArray($kindUint64, [new $Uint64(2095474228, 3164408729), new $Uint64(2163894399, 2283569038)]), $toNativeArray($kindUint64, [new $Uint64(471859137, 3955510912), new $Uint64(2704867999, 1780719474)]), $toNativeArray($kindUint64, [new $Uint64(2737307570, 1723163168), new $Uint64(3381084999, 1152157518)]), $toNativeArray($kindUint64, [new $Uint64(1274150815, 6470312), new $Uint64(4226356249, 366455074)]), $toNativeArray($kindUint64, [new $Uint64(1870086083, 1614656681), new $Uint64(2641472655, 2913388981)]), $toNativeArray($kindUint64, [new $Uint64(3411349428, 944579027), new $Uint64(3301840819, 2567994402)]), $toNativeArray($kindUint64, [new $Uint64(2116703137, 1180723784), new $Uint64(4127301024, 2136251179)]), $toNativeArray($kindUint64, [new $Uint64(786068548, 3422306925), new $Uint64(2579563140, 1335156987)]), $toNativeArray($kindUint64, [new $Uint64(4203811157, 4277883656), new $Uint64(3224453925, 1668946233)]), $toNativeArray($kindUint64, [new $Uint64(2033538475, 2126129098), new $Uint64(4030567406, 3159924616)]), $toNativeArray($kindUint64, [new $Uint64(1270961547, 791959774), new $Uint64(2519104629, 901211061)]), $toNativeArray($kindUint64, [new $Uint64(2662443757, 4211175190), new $Uint64(3148880786, 2200255650)]), $toNativeArray($kindUint64, [new $Uint64(1180571049, 2042743516), new $Uint64(3936100983, 602835915)]), $toNativeArray($kindUint64, [new $Uint64(200985993, 3961069257), new $Uint64(2460063114, 1987385183)]), $toNativeArray($kindUint64, [new $Uint64(3472457964, 1730111099), new $Uint64(3075078893, 336747830)]), $toNativeArray($kindUint64, [new $Uint64(2193088807, 2162638874), new $Uint64(3843848616, 1494676612)]), $toNativeArray($kindUint64, [new $Uint64(3518164152, 2962262032), new $Uint64(2402405385, 934172882)]), $toNativeArray($kindUint64, [new $Uint64(2250221542, 3702827541), new $Uint64(3003006731, 2241457927)]), $toNativeArray($kindUint64, [new $Uint64(1739035104, 2481050778), new $Uint64(3753758414, 1728080585)]), $toNativeArray($kindUint64, [new $Uint64(3771251500, 1550656736), new $Uint64(2346099009, 6308541)]), $toNativeArray($kindUint64, [new $Uint64(1492838903, 1938320920), new $Uint64(2932623761, 1081627501)]), $toNativeArray($kindUint64, [new $Uint64(2939790453, 1349159326), new $Uint64(3665779701, 2425776200)]), $toNativeArray($kindUint64, [new $Uint64(1837369033, 1380095491), new $Uint64(2291112313, 2052981037)]), $toNativeArray($kindUint64, [new $Uint64(3370453115, 2798861187), new $Uint64(2863890391, 3639968120)]), $toNativeArray($kindUint64, [new $Uint64(4213066394, 2424834660), new $Uint64(3579862989, 3476218326)]), $toNativeArray($kindUint64, [new $Uint64(1559424672, 2589263487), new $Uint64(2237414368, 2709507366)]), $toNativeArray($kindUint64, [new $Uint64(4096764488, 3236579358), new $Uint64(2796767960, 3386884207)]), $toNativeArray($kindUint64, [new $Uint64(4047213786, 4045724198), new $Uint64(3495959950, 4233605259)]), $toNativeArray($kindUint64, [new $Uint64(1992637704, 3602319448), new $Uint64(2184974969, 1572261463)]), $toNativeArray($kindUint64, [new $Uint64(1417055307, 207932014), new $Uint64(2731218711, 3039068653)]), $toNativeArray($kindUint64, [new $Uint64(2845060957, 3481140489), new $Uint64(3414023389, 2725093992)]), $toNativeArray($kindUint64, [new $Uint64(3556326197, 1130200140), new $Uint64(4267529237, 185142018)]), $toNativeArray($kindUint64, [new $Uint64(3296445697, 1243245999), new $Uint64(2667205773, 652584673)]), $toNativeArray($kindUint64, [new $Uint64(899331649, 2627799323), new $Uint64(3334007216, 1889472666)]), $toNativeArray($kindUint64, [new $Uint64(3271648210, 63523682), new $Uint64(4167509020, 2361840832)]), $toNativeArray($kindUint64, [new $Uint64(2044780131, 1113444125), new $Uint64(2604693137, 3623634168)]), $toNativeArray($kindUint64, [new $Uint64(2555975164, 318063332), new $Uint64(3255866422, 1308317238)]), $toNativeArray($kindUint64, [new $Uint64(1047485307, 397579165), new $Uint64(4069833027, 3782880196)]), $toNativeArray($kindUint64, [new $Uint64(2802161964, 4006583362), new $Uint64(2543645642, 1827429210)]), $toNativeArray($kindUint64, [new $Uint64(1355218808, 713261907), new $Uint64(3179557053, 136802865)]), $toNativeArray($kindUint64, [new $Uint64(2767765334, 891577384), new $Uint64(3974446316, 1244745405)]), $toNativeArray($kindUint64, [new $Uint64(2266724245, 3778461337), new $Uint64(2484028947, 2925449526)]), $toNativeArray($kindUint64, [new $Uint64(685921659, 1501851199), new $Uint64(3105036184, 2583070084)]), $toNativeArray($kindUint64, [new $Uint64(857402074, 803572175), new $Uint64(3881295230, 3228837605)]), $toNativeArray($kindUint64, [new $Uint64(1072747208, 1575974433), new $Uint64(2425809519, 944281679)]), $toNativeArray($kindUint64, [new $Uint64(267192186, 1969968041), new $Uint64(3032261899, 106610275)]), $toNativeArray($kindUint64, [new $Uint64(3555215705, 314976404), new $Uint64(3790327373, 3354488315)]), $toNativeArray($kindUint64, [new $Uint64(1685138903, 2881214812), new $Uint64(2368954608, 2633426109)]), $toNativeArray($kindUint64, [new $Uint64(3180165453, 2527776691), new $Uint64(2961193260, 3291782636)]), $toNativeArray($kindUint64, [new $Uint64(3975206816, 4233462688), new $Uint64(3701491575, 4114728295)]), $toNativeArray($kindUint64, [new $Uint64(4095116996, 2645914180), new $Uint64(2313432234, 4182317920)]), $toNativeArray($kindUint64, [new $Uint64(823928949, 3307392725), new $Uint64(2891790293, 3080413753)]), $toNativeArray($kindUint64, [new $Uint64(2103653011, 913015435), new $Uint64(3614737867, 629291719)]), $toNativeArray($kindUint64, [new $Uint64(2925395868, 33763735), new $Uint64(2259211166, 4151403708)]), $toNativeArray($kindUint64, [new $Uint64(3656744835, 42204668), new $Uint64(2824013958, 3041770987)]), $toNativeArray($kindUint64, [new $Uint64(3497189219, 3273981307), new $Uint64(3530017448, 1654730086)]), $toNativeArray($kindUint64, [new $Uint64(1112001438, 1509367405), new $Uint64(2206260905, 1034206304)]), $toNativeArray($kindUint64, [new $Uint64(1390001797, 4034192904), new $Uint64(2757826131, 2366499704)]), $toNativeArray($kindUint64, [new $Uint64(1737502247, 1821515659), new $Uint64(3447282664, 1884382806)]), $toNativeArray($kindUint64, [new $Uint64(12197080, 2749060022), new $Uint64(2154551665, 1177739254)]), $toNativeArray($kindUint64, [new $Uint64(2162729998, 3436325028), new $Uint64(2693189581, 2545915891)]), $toNativeArray($kindUint64, [new $Uint64(1629670674, 2147922637), new $Uint64(3366486976, 4256136688)]), $toNativeArray($kindUint64, [new $Uint64(2037088343, 537419649), new $Uint64(4208108721, 1025203564)]), $toNativeArray($kindUint64, [new $Uint64(3420663862, 1946500016), new $Uint64(2630067950, 3325106787)]), $toNativeArray($kindUint64, [new $Uint64(3202088004, 285641372), new $Uint64(3287584938, 2008899836)]), $toNativeArray($kindUint64, [new $Uint64(4002610005, 357051716), new $Uint64(4109481173, 363641147)]), $toNativeArray($kindUint64, [new $Uint64(1964760341, 760028234), new $Uint64(2568425733, 764146629)]), $toNativeArray($kindUint64, [new $Uint64(3529692250, 2023777117), new $Uint64(3210532166, 2028925110)]), $toNativeArray($kindUint64, [new $Uint64(2264631665, 382237748), new $Uint64(4013165208, 388672740)]), $toNativeArray($kindUint64, [new $Uint64(3562878438, 2923253152), new $Uint64(2508228255, 242920462)]), $toNativeArray($kindUint64, [new $Uint64(2306114400, 1506582793), new $Uint64(3135285318, 3524876050)]), $toNativeArray($kindUint64, [new $Uint64(735159352, 1883228491), new $Uint64(3919106648, 2258611415)]), $toNativeArray($kindUint64, [new $Uint64(2070087331, 1177017807), new $Uint64(2449441655, 1411632134)]), $toNativeArray($kindUint64, [new $Uint64(440125516, 397530434), new $Uint64(3061802069, 690798344)]), $toNativeArray($kindUint64, [new $Uint64(550156895, 496913043), new $Uint64(3827252586, 1937239754)]), $toNativeArray($kindUint64, [new $Uint64(1417589883, 1921183388), new $Uint64(2392032866, 2284516670)]), $toNativeArray($kindUint64, [new $Uint64(3919471002, 1327737411), new $Uint64(2990041083, 708162189)]), $toNativeArray($kindUint64, [new $Uint64(1678113280, 3807155412), new $Uint64(3737551353, 4106428209)]), $toNativeArray($kindUint64, [new $Uint64(3733175360, 2379472132), new $Uint64(2335969596, 955904894)]), $toNativeArray($kindUint64, [new $Uint64(2518985552, 2974340165), new $Uint64(2919961995, 1194881118)]), $toNativeArray($kindUint64, [new $Uint64(1001248292, 3717925207), new $Uint64(3649952494, 419859574)]), $toNativeArray($kindUint64, [new $Uint64(3847005655, 176219606), new $Uint64(2281220308, 3483637705)]), $toNativeArray($kindUint64, [new $Uint64(1587531596, 3441499980), new $Uint64(2851525386, 59579836)]), $toNativeArray($kindUint64, [new $Uint64(1984414496, 6907679), new $Uint64(3564406732, 2221958443)]), $toNativeArray($kindUint64, [new $Uint64(703388148, 4317299), new $Uint64(2227754207, 3536207675)]), $toNativeArray($kindUint64, [new $Uint64(4100460657, 5396624), new $Uint64(2784692759, 3346517769)]), $toNativeArray($kindUint64, [new $Uint64(1904350349, 1080487604), new $Uint64(3480865949, 3109405388)]), $toNativeArray($kindUint64, [new $Uint64(3337702616, 1212175664), new $Uint64(2175541218, 2480249279)]), $toNativeArray($kindUint64, [new $Uint64(3098386446, 1515219580), new $Uint64(2719426523, 952827951)]), $toNativeArray($kindUint64, [new $Uint64(2799241233, 4041508124), new $Uint64(3399283154, 117293115)]), $toNativeArray($kindUint64, [new $Uint64(2425309718, 1830659683), new $Uint64(4249103942, 2294100042)]), $toNativeArray($kindUint64, [new $Uint64(2589560398, 70420478), new $Uint64(2655689964, 360070702)]), $toNativeArray($kindUint64, [new $Uint64(1089466849, 2235509245), new $Uint64(3319612455, 450088378)]), $toNativeArray($kindUint64, [new $Uint64(3509317209, 3868128380), new $Uint64(4149515568, 3783835944)]), $toNativeArray($kindUint64, [new $Uint64(2193323256, 806967502), new $Uint64(2593447230, 2364897465)]), $toNativeArray($kindUint64, [new $Uint64(3815395894, 1008709377), new $Uint64(3241809038, 808638183)]), $toNativeArray($kindUint64, [new $Uint64(3695503043, 3408370369), new $Uint64(4052261297, 3158281377)]), $toNativeArray($kindUint64, [new $Uint64(699076666, 1593360569), new $Uint64(2532663311, 363313125)]), $toNativeArray($kindUint64, [new $Uint64(1947587656, 4139184359), new $Uint64(3165829138, 3675366878)]), $toNativeArray($kindUint64, [new $Uint64(287000923, 879013153), new $Uint64(3957286423, 2446724950)]), $toNativeArray($kindUint64, [new $Uint64(3400601049, 12512308), new $Uint64(2473304014, 3139815829)]), $toNativeArray($kindUint64, [new $Uint64(1029525839, 1089382210), new $Uint64(3091630018, 1777286139)]), $toNativeArray($kindUint64, [new $Uint64(213165475, 287985938), new $Uint64(3864537523, 74124026)]), $toNativeArray($kindUint64, [new $Uint64(1206970245, 3938087595), new $Uint64(2415335951, 3804423900)]), $toNativeArray($kindUint64, [new $Uint64(1508712807, 1701384022), new $Uint64(3019169939, 3681788051)]), $toNativeArray($kindUint64, [new $Uint64(812149185, 1052988204), new $Uint64(3773962424, 3528493240)]), $toNativeArray($kindUint64, [new $Uint64(507593240, 3342472187), new $Uint64(2358726515, 2205308275)]), $toNativeArray($kindUint64, [new $Uint64(3855717022, 4178090234), new $Uint64(2948408144, 1682893519)]), $toNativeArray($kindUint64, [new $Uint64(3745904454, 3075129145), new $Uint64(3685510180, 2103616899)]), $toNativeArray($kindUint64, [new $Uint64(1804319372, 848213891), new $Uint64(2303443862, 3462244210)]), $toNativeArray($kindUint64, [new $Uint64(107915567, 1060267364), new $Uint64(2879304828, 2180321615)]), $toNativeArray($kindUint64, [new $Uint64(3356119931, 251592381), new $Uint64(3599131035, 2725402018)]), $toNativeArray($kindUint64, [new $Uint64(3171316780, 3915341622), new $Uint64(2249456897, 1166505349)]), $toNativeArray($kindUint64, [new $Uint64(742920504, 599209732), new $Uint64(2811821121, 2531873511)]), $toNativeArray($kindUint64, [new $Uint64(4149876102, 749012165), new $Uint64(3514776401, 4238583712)]), $toNativeArray($kindUint64, [new $Uint64(2593672563, 3689358075), new $Uint64(2196735251, 1038502084)]), $toNativeArray($kindUint64, [new $Uint64(3242090704, 3537955770), new $Uint64(2745919064, 224385781)]), $toNativeArray($kindUint64, [new $Uint64(831387909, 127477416), new $Uint64(3432398830, 280482227)]), $toNativeArray($kindUint64, [new $Uint64(4260460358, 1233088594), new $Uint64(4290498537, 2498086431)]), $toNativeArray($kindUint64, [new $Uint64(4273400459, 3991905843), new $Uint64(2681561585, 4245658579)]), $toNativeArray($kindUint64, [new $Uint64(4268008750, 3916140480), new $Uint64(3351951982, 2085847752)]), $toNativeArray($kindUint64, [new $Uint64(1040043642, 2747691952), new $Uint64(4189939978, 459826043)]), $toNativeArray($kindUint64, [new $Uint64(113156364, 2791049294), new $Uint64(2618712486, 1361133101)]), $toNativeArray($kindUint64, [new $Uint64(1215187279, 3488811618), new $Uint64(3273390607, 3848900024)]), $toNativeArray($kindUint64, [new $Uint64(1518984099, 3287272698), new $Uint64(4091738259, 3737383206)]), $toNativeArray($kindUint64, [new $Uint64(4170590534, 1517674524), new $Uint64(2557336412, 1798993591)]), $toNativeArray($kindUint64, [new $Uint64(4139496343, 4044576803), new $Uint64(3196670515, 2248741989)]), $toNativeArray($kindUint64, [new $Uint64(1953144957, 3981979180), new $Uint64(3995838144, 1737185663)]), $toNativeArray($kindUint64, [new $Uint64(2831328334, 3025607900), new $Uint64(2497398840, 1085741039)]), $toNativeArray($kindUint64, [new $Uint64(2465418594, 1634526227), new $Uint64(3121748550, 1357176299)]), $toNativeArray($kindUint64, [new $Uint64(2008031418, 4190641431), new $Uint64(3902185687, 3843954022)]), $toNativeArray($kindUint64, [new $Uint64(181277812, 3692892718), new $Uint64(2438866054, 4013084000)]), $toNativeArray($kindUint64, [new $Uint64(226597266, 321148602), new $Uint64(3048582568, 2868871352)]), $toNativeArray($kindUint64, [new $Uint64(283246582, 2548919401), new $Uint64(3810728210, 3586089190)]), $toNativeArray($kindUint64, [new $Uint64(3398254586, 519332801), new $Uint64(2381705131, 3315047567)]), $toNativeArray($kindUint64, [new $Uint64(3174076408, 2796649650), new $Uint64(2977131414, 3070067635)]), $toNativeArray($kindUint64, [new $Uint64(2893853686, 3495812062), new $Uint64(3721414268, 1690100896)]), $toNativeArray($kindUint64, [new $Uint64(1808658554, 1111140715), new $Uint64(2325883917, 3203796708)]), $toNativeArray($kindUint64, [new $Uint64(2260823192, 3536409542), new $Uint64(2907354897, 783520413)]), $toNativeArray($kindUint64, [new $Uint64(3899770815, 125544631), new $Uint64(3634193621, 2053142340)]), $toNativeArray($kindUint64, [new $Uint64(289873111, 1689078130), new $Uint64(2271371013, 1820084875)]), $toNativeArray($kindUint64, [new $Uint64(3583566861, 1037605839), new $Uint64(2839213766, 3348847917)]), $toNativeArray($kindUint64, [new $Uint64(1258233104, 2370749123), new $Uint64(3549017208, 2038576249)]), $toNativeArray($kindUint64, [new $Uint64(3470750250, 1481718202), new $Uint64(2218135755, 1274110155)]), $toNativeArray($kindUint64, [new $Uint64(3264695988, 3999631400), new $Uint64(2772669694, 518895870)]), $toNativeArray($kindUint64, [new $Uint64(1933386338, 704571954), new $Uint64(3465837117, 2796103486)]), $toNativeArray($kindUint64, [new $Uint64(134624637, 1514099295), new $Uint64(2166148198, 2284435591)]), $toNativeArray($kindUint64, [new $Uint64(3389506268, 2966365943), new $Uint64(2707685248, 708060840)]), $toNativeArray($kindUint64, [new $Uint64(4236882835, 3707957429), new $Uint64(3384606560, 885076050)]), $toNativeArray($kindUint64, [new $Uint64(3148619896, 3561204962), new $Uint64(4230758200, 1106345063)]), $toNativeArray($kindUint64, [new $Uint64(3578500171, 2225753101), new $Uint64(2644223875, 691465664)]), $toNativeArray($kindUint64, [new $Uint64(178157918, 1708449553), new $Uint64(3305279843, 4085557553)]), $toNativeArray($kindUint64, [new $Uint64(1296439221, 4283045589), new $Uint64(4131599804, 4033205117)]), $toNativeArray($kindUint64, [new $Uint64(1347145425, 3213774405), new $Uint64(2582249878, 373269550)]), $toNativeArray($kindUint64, [new $Uint64(3831415430, 795992534), new $Uint64(3227812347, 2614070585)]), $toNativeArray($kindUint64, [new $Uint64(1568043815, 3142474316), new $Uint64(4034765434, 2193846408)]), $toNativeArray($kindUint64, [new $Uint64(980027384, 3574659183), new $Uint64(2521728396, 2444895829)]), $toNativeArray($kindUint64, [new $Uint64(2298776055, 173356683), new $Uint64(3152160495, 3056119786)]), $toNativeArray($kindUint64, [new $Uint64(725986420, 3437921326), new $Uint64(3940200619, 2746407909)]), $toNativeArray($kindUint64, [new $Uint64(990612425, 1217181), new $Uint64(2462625387, 1179634031)]), $toNativeArray($kindUint64, [new $Uint64(164523707, 1075263300), new $Uint64(3078281734, 400800715)]), $toNativeArray($kindUint64, [new $Uint64(3426880106, 270337301), new $Uint64(3847852167, 2648484541)]), $toNativeArray($kindUint64, [new $Uint64(2678670978, 1242702637), new $Uint64(2404907604, 3265915574)]), $toNativeArray($kindUint64, [new $Uint64(1200855074, 3700861945), new $Uint64(3006134505, 4082394468)]), $toNativeArray($kindUint64, [new $Uint64(1501068843, 2478593783), new $Uint64(3757668132, 1881767613)]), $toNativeArray($kindUint64, [new $Uint64(1475038939, 1012250202), new $Uint64(2348542582, 3323588406)]), $toNativeArray($kindUint64, [new $Uint64(3991282322, 191570929), new $Uint64(2935678228, 2007001859)]), $toNativeArray($kindUint64, [new $Uint64(3915361078, 2386947309), new $Uint64(3669597785, 2508752324)]), $toNativeArray($kindUint64, [new $Uint64(299617026, 418100244), new $Uint64(2293498615, 4252324763)]), $toNativeArray($kindUint64, [new $Uint64(3595746754, 2670108953), new $Uint64(2866873269, 4241664129)]), $toNativeArray($kindUint64, [new $Uint64(1273457971, 1190152543), new $Uint64(3583591587, 2080854690)]), $toNativeArray($kindUint64, [new $Uint64(1869653056, 206974427), new $Uint64(2239744742, 763663269)]), $toNativeArray($kindUint64, [new $Uint64(3410808144, 258718034), new $Uint64(2799680927, 3102062734)]), $toNativeArray($kindUint64, [new $Uint64(2116026532, 323397543), new $Uint64(3499601159, 2803836594)]), $toNativeArray($kindUint64, [new $Uint64(2396258406, 2349607112), new $Uint64(2187250724, 3363010607)]), $toNativeArray($kindUint64, [new $Uint64(1921581184, 789525242), new $Uint64(2734063405, 4203763259)]), $toNativeArray($kindUint64, [new $Uint64(1328234656, 986906553), new $Uint64(3417579257, 2033478602)]), $toNativeArray($kindUint64, [new $Uint64(3807776968, 1233633192), new $Uint64(4271974071, 3615590076)]), $toNativeArray($kindUint64, [new $Uint64(232376957, 771020745), new $Uint64(2669983794, 3870356534)]), $toNativeArray($kindUint64, [new $Uint64(2437954844, 2037517755), new $Uint64(3337479743, 2690462019)]), $toNativeArray($kindUint64, [new $Uint64(1973701731, 2546897194), new $Uint64(4171849679, 2289335700)]), $toNativeArray($kindUint64, [new $Uint64(3381047230, 1054939834), new $Uint64(2607406049, 3041447548)]), $toNativeArray($kindUint64, [new $Uint64(4226309037, 3466158440), new $Uint64(3259257562, 580583963)]), $toNativeArray($kindUint64, [new $Uint64(4209144473, 1111472579), new $Uint64(4074071952, 2873213602)]), $toNativeArray($kindUint64, [new $Uint64(3704457119, 3379024922), new $Uint64(2546294970, 1795758501)]), $toNativeArray($kindUint64, [new $Uint64(1409345927, 3150039328), new $Uint64(3182868713, 97214479)]), $toNativeArray($kindUint64, [new $Uint64(687940585, 2863807336), new $Uint64(3978585891, 1195259923)]), $toNativeArray($kindUint64, [new $Uint64(4188059250, 179266849), new $Uint64(2486616182, 210166539)]), $toNativeArray($kindUint64, [new $Uint64(4161332238, 2371567209), new $Uint64(3108270227, 2410191822)]), $toNativeArray($kindUint64, [new $Uint64(3054181650, 816975364), new $Uint64(3885337784, 1938997954)]), $toNativeArray($kindUint64, [new $Uint64(2982605355, 1584351426), new $Uint64(2428336115, 1211873721)]), $toNativeArray($kindUint64, [new $Uint64(507031222, 906697459), new $Uint64(3035420144, 441100328)]), $toNativeArray($kindUint64, [new $Uint64(633789027, 3280855472), new $Uint64(3794275180, 551375410)]), $toNativeArray($kindUint64, [new $Uint64(1469859966, 1513663758), new $Uint64(2371421987, 2492093279)]), $toNativeArray($kindUint64, [new $Uint64(763583133, 4039563345), new $Uint64(2964277484, 2041374775)]), $toNativeArray($kindUint64, [new $Uint64(4175704389, 1828228709), new $Uint64(3705346855, 2551718468)]), $toNativeArray($kindUint64, [new $Uint64(462331595, 1679513855), new $Uint64(2315841784, 3205436779)]), $toNativeArray($kindUint64, [new $Uint64(3799139966, 1025650495), new $Uint64(2894802230, 4006795973)]), $toNativeArray($kindUint64, [new $Uint64(1527699485, 3429546767), new $Uint64(3618502788, 2861011319)]), $toNativeArray($kindUint64, [new $Uint64(2565424914, 2680337641), new $Uint64(2261564242, 3935615722)]), $toNativeArray($kindUint64, [new $Uint64(1059297495, 1202938404), new $Uint64(2826955303, 2772036005)]), $toNativeArray($kindUint64, [new $Uint64(2397863693, 429931181), new $Uint64(3533694129, 2391303182)]), $toNativeArray($kindUint64, [new $Uint64(424922984, 805577900), new $Uint64(2208558830, 4178919049)]), $toNativeArray($kindUint64, [new $Uint64(1604895554, 1006972375), new $Uint64(2760698538, 3076165163)]), $toNativeArray($kindUint64, [new $Uint64(932377618, 3406199117), new $Uint64(3450873173, 1697722806)]), $toNativeArray($kindUint64, [new $Uint64(3803961483, 3202616272), new $Uint64(2156795733, 1597947665)]), $toNativeArray($kindUint64, [new $Uint64(1533726382, 2929528516), new $Uint64(2695994666, 3071176406)]), $toNativeArray($kindUint64, [new $Uint64(4064641626, 1514426997), new $Uint64(3369993333, 1691486859)]), $toNativeArray($kindUint64, [new $Uint64(4007060208, 4040517394), new $Uint64(4212491666, 3188100398)]), $toNativeArray($kindUint64, [new $Uint64(1430670806, 2525323371), new $Uint64(2632807291, 3066304573)]), $toNativeArray($kindUint64, [new $Uint64(2862080332, 1009170566), new $Uint64(3291009114, 2759138892)]), $toNativeArray($kindUint64, [new $Uint64(3577600415, 1261463208), new $Uint64(4113761393, 1301439967)]), $toNativeArray($kindUint64, [new $Uint64(3846612995, 2399027241), new $Uint64(2571100870, 3497754539)]), $toNativeArray($kindUint64, [new $Uint64(3734524420, 1925042227), new $Uint64(3213876088, 2224709526)]), $toNativeArray($kindUint64, [new $Uint64(2520671877, 2406302784), new $Uint64(4017345110, 2780886908)]), $toNativeArray($kindUint64, [new $Uint64(3722903571, 2040810152), new $Uint64(2510840694, 664312493)]), $toNativeArray($kindUint64, [new $Uint64(1432403992, 1477270866), new $Uint64(3138550867, 2977874265)]), $toNativeArray($kindUint64, [new $Uint64(2864246814, 1846588582), new $Uint64(3923188584, 2648601007)]), $toNativeArray($kindUint64, [new $Uint64(3400766995, 80376040), new $Uint64(2451992865, 1655375629)]), $toNativeArray($kindUint64, [new $Uint64(1029733271, 3321695522), new $Uint64(3064991081, 3142961361)]), $toNativeArray($kindUint64, [new $Uint64(2360908413, 3078377578), new $Uint64(3831238852, 707476229)]), $toNativeArray($kindUint64, [new $Uint64(2012438670, 2460856898), new $Uint64(2394524282, 2589656291)]), $toNativeArray($kindUint64, [new $Uint64(1441806514, 928587475), new $Uint64(2993155353, 1089586716)]), $toNativeArray($kindUint64, [new $Uint64(1802258142, 3308217992), new $Uint64(3741444191, 2435725219)]), $toNativeArray($kindUint64, [new $Uint64(589540427, 993894421), new $Uint64(2338402619, 3132940998)]), $toNativeArray($kindUint64, [new $Uint64(2884409182, 168626202), new $Uint64(2923003274, 2842434423)]), $toNativeArray($kindUint64, [new $Uint64(2531769653, 2358266401), new $Uint64(3653754093, 1405559381)]), $toNativeArray($kindUint64, [new $Uint64(2119226945, 2010787412), new $Uint64(2283596308, 1415345525)]), $toNativeArray($kindUint64, [new $Uint64(3722775505, 3587226089), new $Uint64(2854495385, 1769181906)]), $toNativeArray($kindUint64, [new $Uint64(2505985734, 1262807140), new $Uint64(3568119231, 3285219207)]), $toNativeArray($kindUint64, [new $Uint64(3176853819, 4010479934), new $Uint64(2230074519, 3663874740)]), $toNativeArray($kindUint64, [new $Uint64(3971067274, 3939358094), new $Uint64(2787593149, 3506101601)]), $toNativeArray($kindUint64, [new $Uint64(1742608621, 2776713970), new $Uint64(3484491437, 1161401530)]), $toNativeArray($kindUint64, [new $Uint64(2162872212, 2272317143), new $Uint64(2177807148, 1262746868)]), $toNativeArray($kindUint64, [new $Uint64(2703590265, 2840396429), new $Uint64(2722258935, 1578433585)]), $toNativeArray($kindUint64, [new $Uint64(158262360, 329270064), new $Uint64(3402823669, 899300158)]), $toNativeArray($kindUint64, [new $Uint64(2345311598, 411587580), new $Uint64(4253529586, 2197867021)]), $toNativeArray($kindUint64, [new $Uint64(2002690660, 3478467709), new $Uint64(2658455991, 2447408712)]), $toNativeArray($kindUint64, [new $Uint64(2503363326, 53117341), new $Uint64(3323069989, 1985519066)]), $toNativeArray($kindUint64, [new $Uint64(981720509, 2213880324), new $Uint64(4153837486, 3555640657)]), $toNativeArray($kindUint64, [new $Uint64(3297929878, 1920546114), new $Uint64(2596148429, 1148533586)]), $toNativeArray($kindUint64, [new $Uint64(1974928700, 253198995), new $Uint64(3245185536, 2509408807)]), $toNativeArray($kindUint64, [new $Uint64(1394919051, 316498744), new $Uint64(4056481920, 3136761009)]), $toNativeArray($kindUint64, [new $Uint64(3556178966, 3955908099), new $Uint64(2535301200, 1960475630)]), $toNativeArray($kindUint64, [new $Uint64(2297740060, 2797401476), new $Uint64(3169126500, 2450594538)]), $toNativeArray($kindUint64, [new $Uint64(724691427, 3496751845), new $Uint64(3961408125, 3063243173)]), $toNativeArray($kindUint64, [new $Uint64(989803054, 1648598991), new $Uint64(2475880078, 2451397895)]), $toNativeArray($kindUint64, [new $Uint64(163511993, 4208232386), new $Uint64(3094850098, 916763721)]), $toNativeArray($kindUint64, [new $Uint64(1278131816, 2039065011), new $Uint64(3868562622, 3293438299)]), $toNativeArray($kindUint64, [new $Uint64(261961473, 1274415632), new $Uint64(2417851639, 984657113)]), $toNativeArray($kindUint64, [new $Uint64(1401193665, 2666761364), new $Uint64(3022314549, 157079567)]), $toNativeArray($kindUint64, [new $Uint64(677750258, 112226233), new $Uint64(3777893186, 1270091283)]), $toNativeArray($kindUint64, [new $Uint64(4181690295, 1143883219), new $Uint64(2361183241, 1867548875)]), $toNativeArray($kindUint64, [new $Uint64(4153371045, 356112200), new $Uint64(2951479051, 3408177918)]), $toNativeArray($kindUint64, [new $Uint64(3044230158, 1518882075), new $Uint64(3689348814, 3186480574)]), $toNativeArray($kindUint64, [new $Uint64(828902024, 4170526768), new $Uint64(2305843009, 917808535)]), $toNativeArray($kindUint64, [new $Uint64(4257353003, 918191165), new $Uint64(2882303761, 2221002492)]), $toNativeArray($kindUint64, [new $Uint64(1026723958, 73997132), new $Uint64(3602879701, 3849994940)]), $toNativeArray($kindUint64, [new $Uint64(2789186121, 3267473679), new $Uint64(2251799813, 2943117749)]), $toNativeArray($kindUint64, [new $Uint64(265257180, 863116627), new $Uint64(2814749767, 457671715)]), $toNativeArray($kindUint64, [new $Uint64(3552796947, 1078895784), new $Uint64(3518437208, 3793315115)]), $toNativeArray($kindUint64, [new $Uint64(1683627180, 137438953), new $Uint64(2199023255, 2370821947)]), $toNativeArray($kindUint64, [new $Uint64(1030792151, 171798691), new $Uint64(2748779069, 1889785610)]), $toNativeArray($kindUint64, [new $Uint64(3435973836, 3435973836), new $Uint64(3435973836, 3435973836)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(2147483648, 0)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(2684354560, 0)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(3355443200, 0)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(4194304000, 0)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(2621440000, 0)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(3276800000, 0)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(4096000000, 0)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(2560000000, 0)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(3200000000, 0)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(4000000000, 0)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(2500000000, 0)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(3125000000, 0)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(3906250000, 0)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(2441406250, 0)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(3051757812, 2147483648)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(3814697265, 2684354560)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(2384185791, 67108864)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(2980232238, 3305111552)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(3725290298, 1983905792)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(2328306436, 2313682944)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(2910383045, 2892103680)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(3637978807, 393904128)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(2273736754, 1856802816)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(2842170943, 173519872)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(3552713678, 3438125312)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(2220446049, 1075086496)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(2775557561, 2417599944)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(3469446951, 4095741754)]), $toNativeArray($kindUint64, [new $Uint64(1073741824, 0), new $Uint64(2168404344, 4170451332)]), $toNativeArray($kindUint64, [new $Uint64(1342177280, 0), new $Uint64(2710505431, 918096869)]), $toNativeArray($kindUint64, [new $Uint64(2751463424, 0), new $Uint64(3388131789, 73879262)]), $toNativeArray($kindUint64, [new $Uint64(1291845632, 0), new $Uint64(4235164736, 1166090902)]), $toNativeArray($kindUint64, [new $Uint64(4028628992, 0), new $Uint64(2646977960, 728806813)]), $toNativeArray($kindUint64, [new $Uint64(1814560768, 0), new $Uint64(3308722450, 911008517)]), $toNativeArray($kindUint64, [new $Uint64(3341942784, 0), new $Uint64(4135903062, 3286244294)]), $toNativeArray($kindUint64, [new $Uint64(1014972416, 0), new $Uint64(2584939414, 980160860)]), $toNativeArray($kindUint64, [new $Uint64(1268715520, 0), new $Uint64(3231174267, 3372684723)]), $toNativeArray($kindUint64, [new $Uint64(512152576, 0), new $Uint64(4038967834, 3142114080)]), $toNativeArray($kindUint64, [new $Uint64(320095360, 0), new $Uint64(2524354896, 3037563124)]), $toNativeArray($kindUint64, [new $Uint64(400119200, 0), new $Uint64(3155443620, 3796953905)]), $toNativeArray($kindUint64, [new $Uint64(1573890824, 0), new $Uint64(3944304526, 451225085)]), $toNativeArray($kindUint64, [new $Uint64(1520552677, 0), new $Uint64(2465190328, 3503241150)]), $toNativeArray($kindUint64, [new $Uint64(4048174494, 1073741824), new $Uint64(3081487911, 84084141)]), $toNativeArray($kindUint64, [new $Uint64(1838992645, 3489660928), new $Uint64(3851859888, 3326330649)]), $toNativeArray($kindUint64, [new $Uint64(3833724963, 2717908992), new $Uint64(2407412430, 2078956655)]), $toNativeArray($kindUint64, [new $Uint64(3718414380, 2323644416), new $Uint64(3009265538, 451212171)]), $toNativeArray($kindUint64, [new $Uint64(3574276151, 2904555520), new $Uint64(3761581922, 2711498862)]), $toNativeArray($kindUint64, [new $Uint64(1160180770, 3425959936), new $Uint64(2350988701, 2768428613)]), $toNativeArray($kindUint64, [new $Uint64(2523967787, 2134966272), new $Uint64(2938735877, 239310294)]), $toNativeArray($kindUint64, [new $Uint64(1007476086, 1594966016), new $Uint64(3673419846, 1372879692)]), $toNativeArray($kindUint64, [new $Uint64(2777156201, 4218079232), new $Uint64(2295887403, 4079275279)]), $toNativeArray($kindUint64, [new $Uint64(2397703428, 2051373568), new $Uint64(2869859254, 4025352275)]), $toNativeArray($kindUint64, [new $Uint64(1923387461, 2564216960), new $Uint64(3587324068, 2884206696)]), $toNativeArray($kindUint64, [new $Uint64(1202117163, 2139506512), new $Uint64(2242077542, 3950112833)]), $toNativeArray($kindUint64, [new $Uint64(2576388278, 1600641316), new $Uint64(2802596928, 2790157393)]), $toNativeArray($kindUint64, [new $Uint64(4294227171, 4148285293), new $Uint64(3503246160, 3487696741)]), $toNativeArray($kindUint64, [new $Uint64(3220762894, 2055807396), new $Uint64(2189528850, 2179810463)]), $toNativeArray($kindUint64, [new $Uint64(2952211794, 422275597), new $Uint64(2736911063, 577279431)]), $toNativeArray($kindUint64, [new $Uint64(2616522918, 2675328144), new $Uint64(3421138828, 3942824761)]), $toNativeArray($kindUint64, [new $Uint64(49428176, 1196676532), new $Uint64(4276423536, 633563656)]), $toNativeArray($kindUint64, [new $Uint64(30892610, 747922832), new $Uint64(2672764710, 395977285)]), $toNativeArray($kindUint64, [new $Uint64(1112357586, 3082387189), new $Uint64(3340955887, 2642455254)]), $toNativeArray($kindUint64, [new $Uint64(3537930631, 1705500338), new $Uint64(4176194859, 2229327243)]), $toNativeArray($kindUint64, [new $Uint64(1674335732, 2676550447), new $Uint64(2610121787, 856458615)]), $toNativeArray($kindUint64, [new $Uint64(1019177841, 3345688059), new $Uint64(3262652233, 4291798741)]), $toNativeArray($kindUint64, [new $Uint64(2347714126, 960884602), new $Uint64(4078315292, 2143522954)]), $toNativeArray($kindUint64, [new $Uint64(2541063152, 3821778348), new $Uint64(2548947057, 3487185494)]), $toNativeArray($kindUint64, [new $Uint64(1028845293, 482255639), new $Uint64(3186183822, 1137756396)]), $toNativeArray($kindUint64, [new $Uint64(1286056616, 1676561373), new $Uint64(3982729777, 3569679143)]), $toNativeArray($kindUint64, [new $Uint64(2414398121, 1047850858), new $Uint64(2489206111, 620436728)]), $toNativeArray($kindUint64, [new $Uint64(3017997651, 2383555396), new $Uint64(3111507638, 3996771382)]), $toNativeArray($kindUint64, [new $Uint64(1625013416, 1905702422), new $Uint64(3889384548, 2848480580)]), $toNativeArray($kindUint64, [new $Uint64(3163117033, 1191064013), new $Uint64(2430865342, 3927784010)]), $toNativeArray($kindUint64, [new $Uint64(1806412643, 2562571841), new $Uint64(3038581678, 2762246365)]), $toNativeArray($kindUint64, [new $Uint64(3331757628, 2129472977), new $Uint64(3798227098, 1305324308)]), $toNativeArray($kindUint64, [new $Uint64(4229832165, 3478404258), new $Uint64(2373891936, 1889569516)]), $toNativeArray($kindUint64, [new $Uint64(992322911, 1126779851), new $Uint64(2967364920, 2361961896)]), $toNativeArray($kindUint64, [new $Uint64(1240403639, 334732990), new $Uint64(3709206150, 2952452370)]), $toNativeArray($kindUint64, [new $Uint64(1848994098, 1819820855), new $Uint64(2318253844, 771540907)]), $toNativeArray($kindUint64, [new $Uint64(1237500799, 127292420), new $Uint64(2897817305, 964426134)]), $toNativeArray($kindUint64, [new $Uint64(3694359646, 3380340998), new $Uint64(3622271631, 2279274491)]), $toNativeArray($kindUint64, [new $Uint64(1772103867, 1038971299), new $Uint64(2263919769, 3035159293)]), $toNativeArray($kindUint64, [new $Uint64(3288871658, 224972300), new $Uint64(2829899712, 572723644)]), $toNativeArray($kindUint64, [new $Uint64(4111089572, 2428699024), new $Uint64(3537374640, 715904555)]), $toNativeArray($kindUint64, [new $Uint64(2032560070, 3665420538), new $Uint64(2210859150, 447440347)]), $toNativeArray($kindUint64, [new $Uint64(1466958264, 2434292024), new $Uint64(2763573937, 2706784082)]), $toNativeArray($kindUint64, [new $Uint64(3981181478, 3042865030), new $Uint64(3454467422, 162254630)]), $toNativeArray($kindUint64, [new $Uint64(1414496600, 828048820), new $Uint64(2159042138, 3322634616)]), $toNativeArray($kindUint64, [new $Uint64(1768120750, 1035061025), new $Uint64(2698802673, 2005809622)]), $toNativeArray($kindUint64, [new $Uint64(62667289, 3441309929), new $Uint64(3373503341, 3581003852)]), $toNativeArray($kindUint64, [new $Uint64(78334112, 1080411939), new $Uint64(4216879177, 1255029343)]), $toNativeArray($kindUint64, [new $Uint64(1659571556, 675257462), new $Uint64(2635549485, 3468747899)]), $toNativeArray($kindUint64, [new $Uint64(1000722621, 844071828), new $Uint64(3294436857, 1114709402)]), $toNativeArray($kindUint64, [new $Uint64(3398386924, 2128831609), new $Uint64(4118046071, 2467128576)]), $toNativeArray($kindUint64, [new $Uint64(2123991827, 3478003403), new $Uint64(2573778794, 3152568096)]), $toNativeArray($kindUint64, [new $Uint64(2654989784, 3273762430), new $Uint64(3217223493, 1793226472)]), $toNativeArray($kindUint64, [new $Uint64(3318737230, 4092203038), new $Uint64(4021529366, 3315274914)]), $toNativeArray($kindUint64, [new $Uint64(3147952593, 1483885074), new $Uint64(2513455854, 998304997)]), $toNativeArray($kindUint64, [new $Uint64(713715269, 2928598167), new $Uint64(3141819817, 3395364895)]), $toNativeArray($kindUint64, [new $Uint64(4113369559, 439522237), new $Uint64(3927274772, 1022980646)]), $toNativeArray($kindUint64, [new $Uint64(1497114150, 1885314134), new $Uint64(2454546732, 2786846552)]), $toNativeArray($kindUint64, [new $Uint64(1871392688, 209159020), new $Uint64(3068183415, 3483558190)]), $toNativeArray($kindUint64, [new $Uint64(191757212, 261448775), new $Uint64(3835229269, 3280705914)]), $toNativeArray($kindUint64, [new $Uint64(1193590081, 2310889132), new $Uint64(2397018293, 2587312108)]), $toNativeArray($kindUint64, [new $Uint64(1491987601, 3962353239), new $Uint64(2996272867, 12914663)]), $toNativeArray($kindUint64, [new $Uint64(791242678, 1731716077), new $Uint64(3745341083, 3237368801)]), $toNativeArray($kindUint64, [new $Uint64(3178881234, 8580724), new $Uint64(2340838177, 1486484588)]), $toNativeArray($kindUint64, [new $Uint64(3973601542, 2158209553), new $Uint64(2926047721, 2931847559)]), $toNativeArray($kindUint64, [new $Uint64(3893260104, 550278293), new $Uint64(3657559652, 443583977)]), $toNativeArray($kindUint64, [new $Uint64(822674829, 343923933), new $Uint64(2285974782, 2424723634)]), $toNativeArray($kindUint64, [new $Uint64(3175827184, 1503646741), new $Uint64(2857468478, 883420894)]), $toNativeArray($kindUint64, [new $Uint64(1822300332, 1879558426), new $Uint64(3571835597, 3251759766)]), $toNativeArray($kindUint64, [new $Uint64(65195883, 3322207664), new $Uint64(2232397248, 2569220766)]), $toNativeArray($kindUint64, [new $Uint64(2228978502, 3079017756), new $Uint64(2790496560, 3211525957)]), $toNativeArray($kindUint64, [new $Uint64(3859964952, 1701288547), new $Uint64(3488120700, 4014407446)]), $toNativeArray($kindUint64, [new $Uint64(1338736271, 1063305342), new $Uint64(2180075438, 361521006)]), $toNativeArray($kindUint64, [new $Uint64(3820903987, 255389853), new $Uint64(2725094297, 2599384905)]), $toNativeArray($kindUint64, [new $Uint64(1554904511, 3540462789), new $Uint64(3406367872, 28005660)]), $toNativeArray($kindUint64, [new $Uint64(1943630639, 3351836662), new $Uint64(4257959840, 35007075)]), $toNativeArray($kindUint64, [new $Uint64(677898237, 3705510650), new $Uint64(2661224900, 21879422)]), $toNativeArray($kindUint64, [new $Uint64(2994856445, 1410662840), new $Uint64(3326531125, 27349277)]), $toNativeArray($kindUint64, [new $Uint64(522345084, 2837070374), new $Uint64(4158163906, 1107928421)]), $toNativeArray($kindUint64, [new $Uint64(863336589, 3920652632), new $Uint64(2598852441, 1766197087)]), $toNativeArray($kindUint64, [new $Uint64(5428913, 1679590318), new $Uint64(3248565551, 3281488183)]), $toNativeArray($kindUint64, [new $Uint64(3228011613, 3173229722), new $Uint64(4060706939, 3028118404)]), $toNativeArray($kindUint64, [new $Uint64(4164990906, 2520139488), new $Uint64(2537941837, 1355703090)]), $toNativeArray($kindUint64, [new $Uint64(3058754985, 1002690712), new $Uint64(3172427296, 2768370687)]), $toNativeArray($kindUint64, [new $Uint64(2749701907, 2327105214), new $Uint64(3965534120, 3460463359)]), $toNativeArray($kindUint64, [new $Uint64(3329176428, 917569847), new $Uint64(2478458825, 2162789599)]), $toNativeArray($kindUint64, [new $Uint64(3087728711, 1146962308), new $Uint64(3098073531, 3777228823)]), $toNativeArray($kindUint64, [new $Uint64(2785919065, 359961061), new $Uint64(3872591914, 3647794205)]), $toNativeArray($kindUint64, [new $Uint64(2278070327, 2909330223), new $Uint64(2420369946, 3353613202)]), $toNativeArray($kindUint64, [new $Uint64(700104261, 2562920955), new $Uint64(3025462433, 2044532855)]), $toNativeArray($kindUint64, [new $Uint64(4096355798, 4277393018), new $Uint64(3781828041, 3629407892)]), $toNativeArray($kindUint64, [new $Uint64(412738726, 1599628812), new $Uint64(2363642526, 657767197)]), $toNativeArray($kindUint64, [new $Uint64(1589665231, 4147019663), new $Uint64(2954553157, 2969692644)]), $toNativeArray($kindUint64, [new $Uint64(1987081539, 4110032755), new $Uint64(3693191447, 490890333)]), $toNativeArray($kindUint64, [new $Uint64(1778796874, 2031899560), new $Uint64(2308244654, 1917419194)]), $toNativeArray($kindUint64, [new $Uint64(76012445, 392390802), new $Uint64(2885305818, 249290345)]), $toNativeArray($kindUint64, [new $Uint64(1168757380, 1564230326), new $Uint64(3606632272, 2459096579)]), $toNativeArray($kindUint64, [new $Uint64(193602450, 3125127602), new $Uint64(2254145170, 1536935362)]), $toNativeArray($kindUint64, [new $Uint64(2389486711, 1758925854), new $Uint64(2817681462, 4068652850)]), $toNativeArray($kindUint64, [new $Uint64(839374741, 1124915494), new $Uint64(3522101828, 2938332415)]), $toNativeArray($kindUint64, [new $Uint64(2135221949, 1239943096), new $Uint64(2201313642, 3983941407)]), $toNativeArray($kindUint64, [new $Uint64(1595285612, 2623670694), new $Uint64(2751642053, 2832443111)]), $toNativeArray($kindUint64, [new $Uint64(920365191, 3279588367), new $Uint64(3439552567, 319328417)]), $toNativeArray($kindUint64, [new $Uint64(3259582804, 3660355465), new $Uint64(2149720354, 1810192996)]), $toNativeArray($kindUint64, [new $Uint64(4074478506, 280477036), new $Uint64(2687150443, 115257597)]), $toNativeArray($kindUint64, [new $Uint64(1871872660, 2498079943), new $Uint64(3358938053, 3365297469)]), $toNativeArray($kindUint64, [new $Uint64(3413582649, 3122599929), new $Uint64(4198672567, 985396364)]), $toNativeArray($kindUint64, [new $Uint64(4280972804, 341012219), new $Uint64(2624170354, 2226485463)]), $toNativeArray($kindUint64, [new $Uint64(4277474181, 426265274), new $Uint64(3280212943, 635623181)]), $toNativeArray($kindUint64, [new $Uint64(2125617254, 1606573417), new $Uint64(4100266178, 4015754449)]), $toNativeArray($kindUint64, [new $Uint64(4012865343, 4225333857), new $Uint64(2562666361, 3583588354)]), $toNativeArray($kindUint64, [new $Uint64(2868598031, 4207925498), new $Uint64(3203332952, 1258259971)]), $toNativeArray($kindUint64, [new $Uint64(2512005715, 4186165048), new $Uint64(4004166190, 1572824964)]), $toNativeArray($kindUint64, [new $Uint64(3717487220, 2079482243), new $Uint64(2502603868, 4204241074)]), $toNativeArray($kindUint64, [new $Uint64(2499375377, 2599352804), new $Uint64(3128254836, 960334047)]), $toNativeArray($kindUint64, [new $Uint64(2050477398, 27965533), new $Uint64(3910318545, 1200417559)]), $toNativeArray($kindUint64, [new $Uint64(2892161109, 3238703930), new $Uint64(2443949090, 3434615534)]), $toNativeArray($kindUint64, [new $Uint64(1467717739, 827154441), new $Uint64(3054936363, 2145785770)]), $toNativeArray($kindUint64, [new $Uint64(3982130821, 4255168523), new $Uint64(3818670454, 1608490388)]), $toNativeArray($kindUint64, [new $Uint64(341348115, 3196351239), new $Uint64(2386669033, 4226531965)]), $toNativeArray($kindUint64, [new $Uint64(1500426968, 2921697224), new $Uint64(2983336292, 2061939484)]), $toNativeArray($kindUint64, [new $Uint64(1875533710, 3652121531), new $Uint64(3729170365, 2577424355)]), $toNativeArray($kindUint64, [new $Uint64(635337657, 1208834132), new $Uint64(2330731478, 2147761134)]), $toNativeArray($kindUint64, [new $Uint64(2941655719, 2584784490), new $Uint64(2913414348, 537217769)]), $toNativeArray($kindUint64, [new $Uint64(455844177, 2157238788), new $Uint64(3641767935, 671522212)]), $toNativeArray($kindUint64, [new $Uint64(2432386258, 4032628802), new $Uint64(2276104959, 2030314118)]), $toNativeArray($kindUint64, [new $Uint64(892999175, 2893302355), new $Uint64(2845131199, 1464150824)]), $toNativeArray($kindUint64, [new $Uint64(1116248969, 2542886120), new $Uint64(3556413999, 756446706)]), $toNativeArray($kindUint64, [new $Uint64(1771397429, 4273658385), new $Uint64(2222758749, 2083391927)]), $toNativeArray($kindUint64, [new $Uint64(1140504963, 2120847509), new $Uint64(2778448436, 3677981733)]), $toNativeArray($kindUint64, [new $Uint64(2499373028, 1577317563), new $Uint64(3473060546, 302509870)]), $toNativeArray($kindUint64, [new $Uint64(488366318, 3133307125), new $Uint64(2170662841, 1262810493)]), $toNativeArray($kindUint64, [new $Uint64(1684199722, 1769150258), new $Uint64(2713328551, 2652254940)]), $toNativeArray($kindUint64, [new $Uint64(2105249653, 63954174), new $Uint64(3391660689, 2241576851)]), $toNativeArray($kindUint64, [new $Uint64(1557820242, 1153684542), new $Uint64(4239575861, 3875712888)]), $toNativeArray($kindUint64, [new $Uint64(973637651, 1794794663), new $Uint64(2649734913, 2959191467)]), $toNativeArray($kindUint64, [new $Uint64(143305240, 1169751504), new $Uint64(3312168642, 477763862)]), $toNativeArray($kindUint64, [new $Uint64(2326615198, 1462189381), new $Uint64(4140210802, 2744688475)]), $toNativeArray($kindUint64, [new $Uint64(917263586, 4135093835), new $Uint64(2587631751, 2789172121)]), $toNativeArray($kindUint64, [new $Uint64(2220321307, 3021383645), new $Uint64(3234539689, 2412723327)]), $toNativeArray($kindUint64, [new $Uint64(1701659810, 2702987733), new $Uint64(4043174611, 4089645983)]), $toNativeArray($kindUint64, [new $Uint64(2674150117, 2763109157), new $Uint64(2526984132, 2019157827)]), $toNativeArray($kindUint64, [new $Uint64(2268945823, 232660974), new $Uint64(3158730165, 2523947284)]), $toNativeArray($kindUint64, [new $Uint64(2836182278, 3512051690), new $Uint64(3948412706, 4228675929)]), $toNativeArray($kindUint64, [new $Uint64(162001188, 1121290482), new $Uint64(2467757941, 3716664280)]), $toNativeArray($kindUint64, [new $Uint64(202501485, 1401613103), new $Uint64(3084697427, 1424604878)]), $toNativeArray($kindUint64, [new $Uint64(2400610504, 2825758202), new $Uint64(3855871784, 707014273)]), $toNativeArray($kindUint64, [new $Uint64(4184736125, 1766098876), new $Uint64(2409919865, 441883920)]), $toNativeArray($kindUint64, [new $Uint64(935952860, 3281365420), new $Uint64(3012399831, 1626096725)]), $toNativeArray($kindUint64, [new $Uint64(2243682899, 4101706775), new $Uint64(3765499789, 958879082)]), $toNativeArray($kindUint64, [new $Uint64(2476043636, 2026695822), new $Uint64(2353437368, 1136170338)]), $toNativeArray($kindUint64, [new $Uint64(947570897, 2533369778), new $Uint64(2941796710, 1420212923)]), $toNativeArray($kindUint64, [new $Uint64(110721797, 4240454046), new $Uint64(3677245887, 3922749802)]), $toNativeArray($kindUint64, [new $Uint64(1142942947, 3187154691), new $Uint64(2298278679, 4062331362)]), $toNativeArray($kindUint64, [new $Uint64(3576162332, 2910201539), new $Uint64(2872848349, 4004172378)]), $toNativeArray($kindUint64, [new $Uint64(2322719267, 3637751924), new $Uint64(3591060437, 1783990001)]), $toNativeArray($kindUint64, [new $Uint64(4136054102, 1736724041), new $Uint64(2244412773, 1651864662)]), $toNativeArray($kindUint64, [new $Uint64(3022583980, 23421403), new $Uint64(2805515966, 3138572652)]), $toNativeArray($kindUint64, [new $Uint64(3778229975, 29276754), new $Uint64(3506894958, 1775732167)]), $toNativeArray($kindUint64, [new $Uint64(3972006470, 1628910707), new $Uint64(2191809349, 36090780)]), $toNativeArray($kindUint64, [new $Uint64(670040791, 4183622032), new $Uint64(2739761686, 1118855300)]), $toNativeArray($kindUint64, [new $Uint64(837550989, 4155785716), new $Uint64(3424702107, 3546052773)]), $toNativeArray($kindUint64, [new $Uint64(2120680561, 1973506673), new $Uint64(4280877634, 3358824142)]), $toNativeArray($kindUint64, [new $Uint64(251683526, 3917796230), new $Uint64(2675548521, 3173006913)]), $toNativeArray($kindUint64, [new $Uint64(1388346232, 2749761640), new $Uint64(3344435652, 745033169)]), $toNativeArray($kindUint64, [new $Uint64(2809174614, 3437202050), new $Uint64(4180544565, 931291461)]), $toNativeArray($kindUint64, [new $Uint64(2292605046, 1074509457), new $Uint64(2612840353, 1118928075)]), $toNativeArray($kindUint64, [new $Uint64(1792014483, 3490620469), new $Uint64(3266050441, 2472401918)]), $toNativeArray($kindUint64, [new $Uint64(92534456, 3289533763), new $Uint64(4082563051, 4164244222)]), $toNativeArray($kindUint64, [new $Uint64(3279059507, 2055958602), new $Uint64(2551601907, 2065781726)]), $toNativeArray($kindUint64, [new $Uint64(1951340736, 1496206428), new $Uint64(3189502384, 1508485334)]), $toNativeArray($kindUint64, [new $Uint64(291692272, 1870258035), new $Uint64(3986877980, 1885606668)]), $toNativeArray($kindUint64, [new $Uint64(2329791318, 1168911272), new $Uint64(2491798737, 3325987815)]), $toNativeArray($kindUint64, [new $Uint64(1838497323, 3608622738), new $Uint64(3114748422, 936259297)]), $toNativeArray($kindUint64, [new $Uint64(3371863478, 3437036599), new $Uint64(3893435527, 3317807769)]), $toNativeArray($kindUint64, [new $Uint64(496801938, 1074406050), new $Uint64(2433397204, 3684242592)]), $toNativeArray($kindUint64, [new $Uint64(621002422, 3490491211), new $Uint64(3041746506, 310335944)]), $toNativeArray($kindUint64, [new $Uint64(776253028, 2215630365), new $Uint64(3802183132, 2535403578)]), $toNativeArray($kindUint64, [new $Uint64(1558899966, 3532252626), new $Uint64(2376364457, 3732110884)]), $toNativeArray($kindUint64, [new $Uint64(1948624958, 2267832135), new $Uint64(2970455572, 1443913133)]), $toNativeArray($kindUint64, [new $Uint64(3509523022, 687306521), new $Uint64(3713069465, 1804891416)]), $toNativeArray($kindUint64, [new $Uint64(2193451888, 3650792047), new $Uint64(2320668415, 3812411695)]), $toNativeArray($kindUint64, [new $Uint64(1668073037, 268522763), new $Uint64(2900835519, 3691772795)]), $toNativeArray($kindUint64, [new $Uint64(1011349472, 1409395278), new $Uint64(3626044399, 3540974170)]), $toNativeArray($kindUint64, [new $Uint64(1705835244, 880872049), new $Uint64(2266277749, 3823721592)]), $toNativeArray($kindUint64, [new $Uint64(2132294055, 1101090061), new $Uint64(2832847187, 1558426518)]), $toNativeArray($kindUint64, [new $Uint64(517883921, 302620752), new $Uint64(3541058984, 874291324)]), $toNativeArray($kindUint64, [new $Uint64(2471161098, 2873492530), new $Uint64(2213161865, 546432077)]), $toNativeArray($kindUint64, [new $Uint64(4162693197, 1444382015), new $Uint64(2766452331, 1756781920)]), $toNativeArray($kindUint64, [new $Uint64(908399200, 2879219342), new $Uint64(3458065414, 1122235577)]), $toNativeArray($kindUint64, [new $Uint64(3252104060, 1799512089), new $Uint64(2161290883, 3922622707)]), $toNativeArray($kindUint64, [new $Uint64(2991388251, 2249390111), new $Uint64(2701613604, 3829536560)]), $toNativeArray($kindUint64, [new $Uint64(3739235314, 1737995815), new $Uint64(3377017006, 491953404)]), $toNativeArray($kindUint64, [new $Uint64(379076847, 25011121), new $Uint64(4221271257, 2762425404)]), $toNativeArray($kindUint64, [new $Uint64(2384406677, 1626244686), new $Uint64(2638294536, 115903141)]), $toNativeArray($kindUint64, [new $Uint64(4054250170, 3106547682), new $Uint64(3297868170, 144878926)]), $toNativeArray($kindUint64, [new $Uint64(2920329065, 1735700955), new $Uint64(4122335212, 2328582306)]), $toNativeArray($kindUint64, [new $Uint64(2898947489, 3769167657), new $Uint64(2576459507, 3602847589)]), $toNativeArray($kindUint64, [new $Uint64(402458890, 1490234099), new $Uint64(3220574384, 3429817663)]), $toNativeArray($kindUint64, [new $Uint64(3724299084, 4010276272), new $Uint64(4025717980, 4287272078)]), $toNativeArray($kindUint64, [new $Uint64(1253945104, 358939022), new $Uint64(2516073738, 532061401)]), $toNativeArray($kindUint64, [new $Uint64(2641173204, 448673777), new $Uint64(3145092172, 2812560399)]), $toNativeArray($kindUint64, [new $Uint64(2227724681, 560842221), new $Uint64(3931365215, 3515700499)]), $toNativeArray($kindUint64, [new $Uint64(855457013, 3034880948), new $Uint64(2457103259, 3807925548)]), $toNativeArray($kindUint64, [new $Uint64(1069321267, 572375713), new $Uint64(3071379074, 3686165111)]), $toNativeArray($kindUint64, [new $Uint64(262909759, 3936695114), new $Uint64(3839223843, 2460222741)]), $toNativeArray($kindUint64, [new $Uint64(701189511, 4071047182), new $Uint64(2399514902, 1000768301)]), $toNativeArray($kindUint64, [new $Uint64(1950228713, 4015067154), new $Uint64(2999393627, 3398444024)]), $toNativeArray($kindUint64, [new $Uint64(2437785892, 1797608470), new $Uint64(3749242034, 3174313206)]), $toNativeArray($kindUint64, [new $Uint64(449874358, 3270988942), new $Uint64(2343276271, 3057687578)]), $toNativeArray($kindUint64, [new $Uint64(2709826596, 1941252529), new $Uint64(2929095339, 2748367648)]), $toNativeArray($kindUint64, [new $Uint64(3387283245, 2426565662), new $Uint64(3661369174, 2361717736)]), $toNativeArray($kindUint64, [new $Uint64(2117052028, 2053474450), new $Uint64(2288355734, 402331761)]), $toNativeArray($kindUint64, [new $Uint64(3720056859, 2566843063), new $Uint64(2860444667, 2650398349)]), $toNativeArray($kindUint64, [new $Uint64(1428845602, 2134812005), new $Uint64(3575555834, 2239256113)]), $toNativeArray($kindUint64, [new $Uint64(3577383061, 2407999327), new $Uint64(2234722396, 2473276894)]), $toNativeArray($kindUint64, [new $Uint64(2324245178, 4083740983), new $Uint64(2793402995, 3091596118)]), $toNativeArray($kindUint64, [new $Uint64(757822825, 2957192581), new $Uint64(3491753744, 2790753324)]), $toNativeArray($kindUint64, [new $Uint64(2621122914, 237632627), new $Uint64(2182346090, 1744220827)]), $toNativeArray($kindUint64, [new $Uint64(2202661818, 2444524431), new $Uint64(2727932613, 32792386)]), $toNativeArray($kindUint64, [new $Uint64(605843625, 908171891), new $Uint64(3409915766, 1114732307)]), $toNativeArray($kindUint64, [new $Uint64(3978530003, 2208956688), new $Uint64(4262394707, 3540899031)]), $toNativeArray($kindUint64, [new $Uint64(4097193988, 843727018), new $Uint64(2663996692, 1676190982)]), $toNativeArray($kindUint64, [new $Uint64(2974008837, 1054658773), new $Uint64(3329995865, 2095238728)]), $toNativeArray($kindUint64, [new $Uint64(3717511046, 2392065290), new $Uint64(4162494831, 3692790234)]), $toNativeArray($kindUint64, [new $Uint64(3397186228, 421298982), new $Uint64(2601559269, 3918606632)]), $toNativeArray($kindUint64, [new $Uint64(4246482785, 526623728), new $Uint64(3251949087, 1677032818)]), $toNativeArray($kindUint64, [new $Uint64(3160619833, 1732021484), new $Uint64(4064936359, 1022549199)]), $toNativeArray($kindUint64, [new $Uint64(3586000131, 3766867987), new $Uint64(2540585224, 2249705985)]), $toNativeArray($kindUint64, [new $Uint64(1261274692, 3634843160), new $Uint64(3175731530, 2812132482)]), $toNativeArray($kindUint64, [new $Uint64(3724077014, 248586654), new $Uint64(3969664413, 1367681954)]), $toNativeArray($kindUint64, [new $Uint64(3401289957, 3376592131), new $Uint64(2481040258, 1391672133)]), $toNativeArray($kindUint64, [new $Uint64(1030386975, 999514691), new $Uint64(3101300322, 3887073815)]), $toNativeArray($kindUint64, [new $Uint64(214241895, 175651540), new $Uint64(3876625403, 2711358621)]), $toNativeArray($kindUint64, [new $Uint64(670772096, 1720394949), new $Uint64(2422890877, 1157728226)]), $toNativeArray($kindUint64, [new $Uint64(2985948768, 2150493686), new $Uint64(3028613596, 2520902106)]), $toNativeArray($kindUint64, [new $Uint64(1584952312, 2688117107), new $Uint64(3785766995, 3151127633)]), $toNativeArray($kindUint64, [new $Uint64(3674949755, 1680073192), new $Uint64(2366104372, 1432583858)]), $toNativeArray($kindUint64, [new $Uint64(2446203546, 1026349666), new $Uint64(2957630465, 1790729823)]), $toNativeArray($kindUint64, [new $Uint64(1984012608, 3430420731), new $Uint64(3697038081, 3312154103)]), $toNativeArray($kindUint64, [new $Uint64(2850620616, 2144012957), new $Uint64(2310648801, 459483578)]), $toNativeArray($kindUint64, [new $Uint64(1415792122, 2680016196), new $Uint64(2888311001, 1648096297)]), $toNativeArray($kindUint64, [new $Uint64(2843481977, 1202536597), new $Uint64(3610388751, 3133862195)]), $toNativeArray($kindUint64, [new $Uint64(1240305323, 3435939933), new $Uint64(2256492969, 3569276608)]), $toNativeArray($kindUint64, [new $Uint64(1550381654, 3221183092), new $Uint64(2820616212, 1240370288)]), $toNativeArray($kindUint64, [new $Uint64(1937977068, 1878995217), new $Uint64(3525770265, 1550462860)]), $toNativeArray($kindUint64, [new $Uint64(3358719315, 3321855659), new $Uint64(2203606415, 3653393847)]), $toNativeArray($kindUint64, [new $Uint64(3124657320, 3078577749), new $Uint64(2754508019, 3493000485)]), $toNativeArray($kindUint64, [new $Uint64(684596178, 3848222187), new $Uint64(3443135024, 3292508783)]), $toNativeArray($kindUint64, [new $Uint64(2038485347, 3478880691), new $Uint64(2151959390, 2057817989)]), $toNativeArray($kindUint64, [new $Uint64(3621848508, 3274859039), new $Uint64(2689949238, 424788838)]), $toNativeArray($kindUint64, [new $Uint64(2379826987, 4093573799), new $Uint64(3362436547, 2678469696)]), $toNativeArray($kindUint64, [new $Uint64(2974783734, 4043225425), new $Uint64(4203045684, 2274345296)]), $toNativeArray($kindUint64, [new $Uint64(1859239834, 1453274067), new $Uint64(2626903552, 3568949458)]), $toNativeArray($kindUint64, [new $Uint64(176566144, 3964076232), new $Uint64(3283629441, 166219527)]), $toNativeArray($kindUint64, [new $Uint64(3441933153, 660127994), new $Uint64(4104536801, 1281516232)]), $toNativeArray($kindUint64, [new $Uint64(2151208220, 3096934556), new $Uint64(2565335500, 3485302205)]), $toNativeArray($kindUint64, [new $Uint64(3762752099, 3871168195), new $Uint64(3206669376, 61660460)]), $toNativeArray($kindUint64, [new $Uint64(408472828, 3765218420), new $Uint64(4008336720, 77075576)]), $toNativeArray($kindUint64, [new $Uint64(255295518, 205777864), new $Uint64(2505210450, 48172235)]), $toNativeArray($kindUint64, [new $Uint64(3540344869, 2404705978), new $Uint64(3131513062, 2207698941)]), $toNativeArray($kindUint64, [new $Uint64(1204205614, 4079624297), new $Uint64(3914391328, 612140029)]), $toNativeArray($kindUint64, [new $Uint64(1289499421, 1476023361), new $Uint64(2446494580, 382587518)]), $toNativeArray($kindUint64, [new $Uint64(3759357924, 2918771026), new $Uint64(3058118225, 478234397)]), $toNativeArray($kindUint64, [new $Uint64(1477971933, 3648463782), new $Uint64(3822647781, 1671534821)]), $toNativeArray($kindUint64, [new $Uint64(1460603370, 2817160776), new $Uint64(2389154863, 1581580175)]), $toNativeArray($kindUint64, [new $Uint64(752012389, 1373967322), new $Uint64(2986443579, 903233395)]), $toNativeArray($kindUint64, [new $Uint64(4161240958, 2791200977), new $Uint64(3733054474, 55299919)]), $toNativeArray($kindUint64, [new $Uint64(4211388335, 670758786), new $Uint64(2333159046, 1108304273)]), $toNativeArray($kindUint64, [new $Uint64(2043009946, 4059673955), new $Uint64(2916448807, 3532863990)]), $toNativeArray($kindUint64, [new $Uint64(406278785, 2927108796), new $Uint64(3645561009, 3342338164)]), $toNativeArray($kindUint64, [new $Uint64(2401407889, 218830261), new $Uint64(2278475631, 478348616)]), $toNativeArray($kindUint64, [new $Uint64(3001759861, 1347279650), new $Uint64(2848094538, 3819161242)]), $toNativeArray($kindUint64, [new $Uint64(1604716178, 2757841387), new $Uint64(3560118173, 2626467905)]), $toNativeArray($kindUint64, [new $Uint64(3687302171, 2797392691), new $Uint64(2225073858, 2178413352)]), $toNativeArray($kindUint64, [new $Uint64(314160418, 2422999040), new $Uint64(2781342323, 575533043)]), $toNativeArray($kindUint64, [new $Uint64(3613925995, 881265152), new $Uint64(3476677903, 3940641775)]), $toNativeArray($kindUint64, [new $Uint64(3869316483, 13919808), new $Uint64(2172923689, 4073513845)]), $toNativeArray($kindUint64, [new $Uint64(1615420131, 3238625232), new $Uint64(2716154612, 1870666835)]), $toNativeArray($kindUint64, [new $Uint64(945533340, 2974539716), new $Uint64(3395193265, 2338333544)]), $toNativeArray($kindUint64, [new $Uint64(1181916675, 3718174645), new $Uint64(4243991581, 3996658754)]), $toNativeArray($kindUint64, [new $Uint64(1812439746, 1786988241), new $Uint64(2652494738, 3034782633)]), $toNativeArray($kindUint64, [new $Uint64(3339291507, 86251653), new $Uint64(3315618423, 1645994643)]), $toNativeArray($kindUint64, [new $Uint64(3100372559, 3329040039), new $Uint64(4144523029, 983751480)]), $toNativeArray($kindUint64, [new $Uint64(1937732849, 3691262760), new $Uint64(2590326893, 1151715587)]), $toNativeArray($kindUint64, [new $Uint64(1348424238, 1392852978), new $Uint64(3237908616, 2513386308)]), $toNativeArray($kindUint64, [new $Uint64(1685530297, 3888549871), new $Uint64(4047385770, 3141732885)]), $toNativeArray($kindUint64, [new $Uint64(1590327348, 819730933), new $Uint64(2529616106, 3037324877)]), $toNativeArray($kindUint64, [new $Uint64(3061651009, 1024663666), new $Uint64(3162020133, 1649172448)]), $toNativeArray($kindUint64, [new $Uint64(3827063761, 2354571407), new $Uint64(3952525166, 3135207384)]), $toNativeArray($kindUint64, [new $Uint64(2391914850, 4155961689), new $Uint64(2470328229, 885762791)]), $toNativeArray($kindUint64, [new $Uint64(1916151739, 3047468464), new $Uint64(3087910286, 2180945313)]), $toNativeArray($kindUint64, [new $Uint64(3468931498, 2735593756), new $Uint64(3859887858, 578697993)]), $toNativeArray($kindUint64, [new $Uint64(557469450, 2783487921), new $Uint64(2412429911, 1435428070)]), $toNativeArray($kindUint64, [new $Uint64(2844320461, 1331876253), new $Uint64(3015537389, 720543263)]), $toNativeArray($kindUint64, [new $Uint64(2481658752, 2738587141), new $Uint64(3769421736, 1974420903)]), $toNativeArray($kindUint64, [new $Uint64(3161649456, 1711616963), new $Uint64(2355888585, 1234013064)]), $toNativeArray($kindUint64, [new $Uint64(3952061820, 2139521204), new $Uint64(2944860731, 2616258154)]), $toNativeArray($kindUint64, [new $Uint64(2792593627, 2674401505), new $Uint64(3681075914, 2196580869)]), $toNativeArray($kindUint64, [new $Uint64(2282241929, 1134630028), new $Uint64(2300672446, 2446604867)]), $toNativeArray($kindUint64, [new $Uint64(1779060587, 2492029360), new $Uint64(2875840558, 910772436)]), $toNativeArray($kindUint64, [new $Uint64(2223825734, 2041294876), new $Uint64(3594800697, 3285949193)]), $toNativeArray($kindUint64, [new $Uint64(4074245644, 202067473), new $Uint64(2246750436, 443105509)]), $toNativeArray($kindUint64, [new $Uint64(1871581583, 252584341), new $Uint64(2808438045, 553881887)]), $toNativeArray($kindUint64, [new $Uint64(1265735154, 3536955899), new $Uint64(3510547556, 1766094183)])]);
+ leftcheats = new sliceType$2([new leftCheat.ptr(0, ""), new leftCheat.ptr(1, "5"), new leftCheat.ptr(1, "25"), new leftCheat.ptr(1, "125"), new leftCheat.ptr(2, "625"), new leftCheat.ptr(2, "3125"), new leftCheat.ptr(2, "15625"), new leftCheat.ptr(3, "78125"), new leftCheat.ptr(3, "390625"), new leftCheat.ptr(3, "1953125"), new leftCheat.ptr(4, "9765625"), new leftCheat.ptr(4, "48828125"), new leftCheat.ptr(4, "244140625"), new leftCheat.ptr(4, "1220703125"), new leftCheat.ptr(5, "6103515625"), new leftCheat.ptr(5, "30517578125"), new leftCheat.ptr(5, "152587890625"), new leftCheat.ptr(6, "762939453125"), new leftCheat.ptr(6, "3814697265625"), new leftCheat.ptr(6, "19073486328125"), new leftCheat.ptr(7, "95367431640625"), new leftCheat.ptr(7, "476837158203125"), new leftCheat.ptr(7, "2384185791015625"), new leftCheat.ptr(7, "11920928955078125"), new leftCheat.ptr(8, "59604644775390625"), new leftCheat.ptr(8, "298023223876953125"), new leftCheat.ptr(8, "1490116119384765625"), new leftCheat.ptr(9, "7450580596923828125"), new leftCheat.ptr(9, "37252902984619140625"), new leftCheat.ptr(9, "186264514923095703125"), new leftCheat.ptr(10, "931322574615478515625"), new leftCheat.ptr(10, "4656612873077392578125"), new leftCheat.ptr(10, "23283064365386962890625"), new leftCheat.ptr(10, "116415321826934814453125"), new leftCheat.ptr(11, "582076609134674072265625"), new leftCheat.ptr(11, "2910383045673370361328125"), new leftCheat.ptr(11, "14551915228366851806640625"), new leftCheat.ptr(12, "72759576141834259033203125"), new leftCheat.ptr(12, "363797880709171295166015625"), new leftCheat.ptr(12, "1818989403545856475830078125"), new leftCheat.ptr(13, "9094947017729282379150390625"), new leftCheat.ptr(13, "45474735088646411895751953125"), new leftCheat.ptr(13, "227373675443232059478759765625"), new leftCheat.ptr(13, "1136868377216160297393798828125"), new leftCheat.ptr(14, "5684341886080801486968994140625"), new leftCheat.ptr(14, "28421709430404007434844970703125"), new leftCheat.ptr(14, "142108547152020037174224853515625"), new leftCheat.ptr(15, "710542735760100185871124267578125"), new leftCheat.ptr(15, "3552713678800500929355621337890625"), new leftCheat.ptr(15, "17763568394002504646778106689453125"), new leftCheat.ptr(16, "88817841970012523233890533447265625"), new leftCheat.ptr(16, "444089209850062616169452667236328125"), new leftCheat.ptr(16, "2220446049250313080847263336181640625"), new leftCheat.ptr(16, "11102230246251565404236316680908203125"), new leftCheat.ptr(17, "55511151231257827021181583404541015625"), new leftCheat.ptr(17, "277555756156289135105907917022705078125"), new leftCheat.ptr(17, "1387778780781445675529539585113525390625"), new leftCheat.ptr(18, "6938893903907228377647697925567626953125"), new leftCheat.ptr(18, "34694469519536141888238489627838134765625"), new leftCheat.ptr(18, "173472347597680709441192448139190673828125"), new leftCheat.ptr(19, "867361737988403547205962240695953369140625")]);
+ $pkg.ErrRange = errors.New("value out of range");
+ $pkg.ErrSyntax = errors.New("invalid syntax");
+ optimize = true;
+ powtab = new sliceType$3([1, 3, 6, 9, 13, 16, 19, 23, 26]);
+ float64pow10 = new sliceType$4([1, 10, 100, 1000, 10000, 100000, 1e+06, 1e+07, 1e+08, 1e+09, 1e+10, 1e+11, 1e+12, 1e+13, 1e+14, 1e+15, 1e+16, 1e+17, 1e+18, 1e+19, 1e+20, 1e+21, 1e+22]);
+ float32pow10 = new sliceType$5([1, 10, 100, 1000, 10000, 100000, 1e+06, 1e+07, 1e+08, 1e+09, 1e+10]);
+ /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
+ };
+ $pkg.$init = $init;
+ return $pkg;
+})();
+$packages["reflect"] = (function() {
+ var $pkg = {}, $init, errors, js, abi, bytealg, goarch, goexperiment, itoa, unsafeheader, math, runtime, strconv, sync, unicode, utf8, Value, flag, ValueError, MapIter, Type, Kind, tflag, rtype, method, ChanDir, arrayType, chanType, imethod, interfaceType, mapType, ptrType, sliceType, structField, structType, Method, nameOff, typeOff, textOff, StructField, StructTag, fieldScan, uncommonType, funcType, name, nameData, hiter, sliceType$1, ptrType$1, sliceType$2, sliceType$3, sliceType$4, ptrType$2, funcType$1, sliceType$6, ptrType$4, sliceType$7, ptrType$7, ptrType$8, sliceType$9, sliceType$10, ptrType$9, sliceType$11, ptrType$10, ptrType$11, sliceType$12, ptrType$12, ptrType$13, funcType$2, sliceType$14, sliceType$15, ptrType$18, structType$3, sliceType$16, ptrType$19, ptrType$20, sliceType$17, sliceType$18, arrayType$6, sliceType$19, funcType$3, ptrType$22, arrayType$7, ptrType$23, funcType$4, funcType$5, ptrType$25, ptrType$28, uint8Type, stringType, kindNames, initialized, uncommonTypeMap, nameMap, nameOffList, typeOffList, callHelper, jsObjectPtr, selectHelper, methodName, copyVal, overflowFloat32, typesMustMatch, grow, Append, AppendSlice, MakeMap, MakeMapWithSize, convertOp, makeFloat, makeFloat32, makeComplex, makeString, makeBytes, makeRunes, cvtInt, cvtUint, cvtFloatInt, cvtFloatUint, cvtIntFloat, cvtUintFloat, cvtFloat, cvtComplex, cvtIntString, cvtUintString, cvtBytesString, cvtStringBytes, cvtRunesString, cvtStringRunes, cvtT2I, cvtI2I, PtrTo, PointerTo, implements$1, specialChannelAssignability, directlyAssignable, haveIdenticalType, haveIdenticalUnderlyingType, toType, ifaceIndir, methodValueCallCodePtr, methodValueCall, init, New, jsType, reflectType, setKindType, newName, newMethodName, newNameOff, newTypeOff, internalStr, isWrapped, copyStruct, makeValue, MakeSlice, TypeOf, ValueOf, FuncOf, SliceOf, Zero, unsafe_New, makeInt, typedmemmove, makemap, keyFor, mapaccess, mapassign, mapdelete, mapaccess_faststr, mapassign_faststr, mapdelete_faststr, mapiterinit, mapiterkey, mapiterelem, mapiternext, maplen, cvtDirect, cvtSliceArrayPtr, Copy, methodReceiver, valueInterface, ifaceE2I, makeMethodValue, wrapJsObject, unwrapJsObject, getJsTag, chanrecv, chansend, DeepEqual, deepValueEqualJs, methodNameSkip, verifyNotInHeapPtr;
+ errors = $packages["errors"];
+ js = $packages["github.com/gopherjs/gopherjs/js"];
+ abi = $packages["internal/abi"];
+ bytealg = $packages["internal/bytealg"];
+ goarch = $packages["internal/goarch"];
+ goexperiment = $packages["internal/goexperiment"];
+ itoa = $packages["internal/itoa"];
+ unsafeheader = $packages["internal/unsafeheader"];
+ math = $packages["math"];
+ runtime = $packages["runtime"];
+ strconv = $packages["strconv"];
+ sync = $packages["sync"];
+ unicode = $packages["unicode"];
+ utf8 = $packages["unicode/utf8"];
+ Value = $pkg.Value = $newType(0, $kindStruct, "reflect.Value", true, "reflect", true, function(typ_, ptr_, flag_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.typ = ptrType$1.nil;
+ this.ptr = 0;
+ this.flag = 0;
+ return;
+ }
+ this.typ = typ_;
+ this.ptr = ptr_;
+ this.flag = flag_;
+ });
+ flag = $pkg.flag = $newType(4, $kindUintptr, "reflect.flag", true, "reflect", false, null);
+ ValueError = $pkg.ValueError = $newType(0, $kindStruct, "reflect.ValueError", true, "reflect", true, function(Method_, Kind_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.Method = "";
+ this.Kind = 0;
+ return;
+ }
+ this.Method = Method_;
+ this.Kind = Kind_;
+ });
+ MapIter = $pkg.MapIter = $newType(0, $kindStruct, "reflect.MapIter", true, "reflect", true, function(m_, hiter_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.m = new Value.ptr(ptrType$1.nil, 0, 0);
+ this.hiter = new hiter.ptr($ifaceNil, null, null, 0, null);
+ return;
+ }
+ this.m = m_;
+ this.hiter = hiter_;
+ });
+ Type = $pkg.Type = $newType(8, $kindInterface, "reflect.Type", true, "reflect", true, null);
+ Kind = $pkg.Kind = $newType(4, $kindUint, "reflect.Kind", true, "reflect", true, null);
+ tflag = $pkg.tflag = $newType(1, $kindUint8, "reflect.tflag", true, "reflect", false, null);
+ rtype = $pkg.rtype = $newType(0, $kindStruct, "reflect.rtype", true, "reflect", 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 = ptrType$13.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_;
+ });
+ method = $pkg.method = $newType(0, $kindStruct, "reflect.method", true, "reflect", 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_;
+ });
+ ChanDir = $pkg.ChanDir = $newType(4, $kindInt, "reflect.ChanDir", true, "reflect", true, null);
+ arrayType = $pkg.arrayType = $newType(0, $kindStruct, "reflect.arrayType", true, "reflect", false, function(rtype_, elem_, slice_, len_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.rtype = new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0);
+ this.elem = ptrType$1.nil;
+ this.slice = ptrType$1.nil;
+ this.len = 0;
+ return;
+ }
+ this.rtype = rtype_;
+ this.elem = elem_;
+ this.slice = slice_;
+ this.len = len_;
+ });
+ chanType = $pkg.chanType = $newType(0, $kindStruct, "reflect.chanType", true, "reflect", false, function(rtype_, elem_, dir_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.rtype = new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0);
+ this.elem = ptrType$1.nil;
+ this.dir = 0;
+ return;
+ }
+ this.rtype = rtype_;
+ this.elem = elem_;
+ this.dir = dir_;
+ });
+ imethod = $pkg.imethod = $newType(0, $kindStruct, "reflect.imethod", true, "reflect", false, function(name_, typ_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.name = 0;
+ this.typ = 0;
+ return;
+ }
+ this.name = name_;
+ this.typ = typ_;
+ });
+ interfaceType = $pkg.interfaceType = $newType(0, $kindStruct, "reflect.interfaceType", true, "reflect", false, function(rtype_, pkgPath_, methods_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.rtype = new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0);
+ this.pkgPath = new name.ptr(ptrType$13.nil);
+ this.methods = sliceType$14.nil;
+ return;
+ }
+ this.rtype = rtype_;
+ this.pkgPath = pkgPath_;
+ this.methods = methods_;
+ });
+ mapType = $pkg.mapType = $newType(0, $kindStruct, "reflect.mapType", true, "reflect", false, function(rtype_, key_, elem_, bucket_, hasher_, keysize_, valuesize_, bucketsize_, flags_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.rtype = new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0);
+ this.key = ptrType$1.nil;
+ this.elem = ptrType$1.nil;
+ this.bucket = ptrType$1.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_;
+ });
+ ptrType = $pkg.ptrType = $newType(0, $kindStruct, "reflect.ptrType", true, "reflect", false, function(rtype_, elem_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.rtype = new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0);
+ this.elem = ptrType$1.nil;
+ return;
+ }
+ this.rtype = rtype_;
+ this.elem = elem_;
+ });
+ sliceType = $pkg.sliceType = $newType(0, $kindStruct, "reflect.sliceType", true, "reflect", false, function(rtype_, elem_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.rtype = new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0);
+ this.elem = ptrType$1.nil;
+ return;
+ }
+ this.rtype = rtype_;
+ this.elem = elem_;
+ });
+ structField = $pkg.structField = $newType(0, $kindStruct, "reflect.structField", true, "reflect", false, function(name_, typ_, offsetEmbed_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.name = new name.ptr(ptrType$13.nil);
+ this.typ = ptrType$1.nil;
+ this.offsetEmbed = 0;
+ return;
+ }
+ this.name = name_;
+ this.typ = typ_;
+ this.offsetEmbed = offsetEmbed_;
+ });
+ structType = $pkg.structType = $newType(0, $kindStruct, "reflect.structType", true, "reflect", false, function(rtype_, pkgPath_, fields_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.rtype = new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0);
+ this.pkgPath = new name.ptr(ptrType$13.nil);
+ this.fields = sliceType$15.nil;
+ return;
+ }
+ this.rtype = rtype_;
+ this.pkgPath = pkgPath_;
+ this.fields = fields_;
+ });
+ Method = $pkg.Method = $newType(0, $kindStruct, "reflect.Method", true, "reflect", true, function(Name_, PkgPath_, Type_, Func_, Index_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.Name = "";
+ this.PkgPath = "";
+ this.Type = $ifaceNil;
+ this.Func = new Value.ptr(ptrType$1.nil, 0, 0);
+ this.Index = 0;
+ return;
+ }
+ this.Name = Name_;
+ this.PkgPath = PkgPath_;
+ this.Type = Type_;
+ this.Func = Func_;
+ this.Index = Index_;
+ });
+ nameOff = $pkg.nameOff = $newType(4, $kindInt32, "reflect.nameOff", true, "reflect", false, null);
+ typeOff = $pkg.typeOff = $newType(4, $kindInt32, "reflect.typeOff", true, "reflect", false, null);
+ textOff = $pkg.textOff = $newType(4, $kindInt32, "reflect.textOff", true, "reflect", false, null);
+ StructField = $pkg.StructField = $newType(0, $kindStruct, "reflect.StructField", true, "reflect", true, function(Name_, PkgPath_, Type_, Tag_, Offset_, Index_, Anonymous_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.Name = "";
+ this.PkgPath = "";
+ this.Type = $ifaceNil;
+ this.Tag = "";
+ this.Offset = 0;
+ this.Index = sliceType$6.nil;
+ this.Anonymous = false;
+ return;
+ }
+ this.Name = Name_;
+ this.PkgPath = PkgPath_;
+ this.Type = Type_;
+ this.Tag = Tag_;
+ this.Offset = Offset_;
+ this.Index = Index_;
+ this.Anonymous = Anonymous_;
+ });
+ StructTag = $pkg.StructTag = $newType(8, $kindString, "reflect.StructTag", true, "reflect", true, null);
+ fieldScan = $pkg.fieldScan = $newType(0, $kindStruct, "reflect.fieldScan", true, "reflect", false, function(typ_, index_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.typ = ptrType$12.nil;
+ this.index = sliceType$6.nil;
+ return;
+ }
+ this.typ = typ_;
+ this.index = index_;
+ });
+ uncommonType = $pkg.uncommonType = $newType(0, $kindStruct, "reflect.uncommonType", true, "reflect", 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 = sliceType$11.nil;
+ return;
+ }
+ this.pkgPath = pkgPath_;
+ this.mcount = mcount_;
+ this.xcount = xcount_;
+ this.moff = moff_;
+ this._methods = _methods_;
+ });
+ funcType = $pkg.funcType = $newType(0, $kindStruct, "reflect.funcType", true, "reflect", false, function(rtype_, inCount_, outCount_, _in_, _out_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.rtype = new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0);
+ this.inCount = 0;
+ this.outCount = 0;
+ this._in = sliceType$2.nil;
+ this._out = sliceType$2.nil;
+ return;
+ }
+ this.rtype = rtype_;
+ this.inCount = inCount_;
+ this.outCount = outCount_;
+ this._in = _in_;
+ this._out = _out_;
+ });
+ name = $pkg.name = $newType(0, $kindStruct, "reflect.name", true, "reflect", false, function(bytes_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.bytes = ptrType$13.nil;
+ return;
+ }
+ this.bytes = bytes_;
+ });
+ nameData = $pkg.nameData = $newType(0, $kindStruct, "reflect.nameData", true, "reflect", false, function(name_, tag_, exported_, pkgPath_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.name = "";
+ this.tag = "";
+ this.exported = false;
+ this.pkgPath = "";
+ return;
+ }
+ this.name = name_;
+ this.tag = tag_;
+ this.exported = exported_;
+ this.pkgPath = pkgPath_;
+ });
+ hiter = $pkg.hiter = $newType(0, $kindStruct, "reflect.hiter", true, "reflect", 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_;
+ });
+ sliceType$1 = $sliceType(name);
+ ptrType$1 = $ptrType(rtype);
+ sliceType$2 = $sliceType(ptrType$1);
+ sliceType$3 = $sliceType($String);
+ sliceType$4 = $sliceType($emptyInterface);
+ ptrType$2 = $ptrType(js.Object);
+ funcType$1 = $funcType([sliceType$4], [ptrType$2], true);
+ sliceType$6 = $sliceType($Int);
+ ptrType$4 = $ptrType(runtime.Func);
+ sliceType$7 = $sliceType(Value);
+ ptrType$7 = $ptrType($UnsafePointer);
+ ptrType$8 = $ptrType(unsafeheader.Slice);
+ sliceType$9 = $sliceType($Uint8);
+ sliceType$10 = $sliceType($Int32);
+ ptrType$9 = $ptrType(uncommonType);
+ sliceType$11 = $sliceType(method);
+ ptrType$10 = $ptrType(interfaceType);
+ ptrType$11 = $ptrType(imethod);
+ sliceType$12 = $sliceType(fieldScan);
+ ptrType$12 = $ptrType(structType);
+ ptrType$13 = $ptrType($Uint8);
+ funcType$2 = $funcType([], [], false);
+ sliceType$14 = $sliceType(imethod);
+ sliceType$15 = $sliceType(structField);
+ ptrType$18 = $ptrType(nameData);
+ structType$3 = $structType("reflect", [{prop: "str", name: "str", embedded: false, exported: false, typ: $String, tag: ""}]);
+ sliceType$16 = $sliceType(ptrType$2);
+ ptrType$19 = $ptrType($String);
+ ptrType$20 = $ptrType(funcType);
+ sliceType$17 = $sliceType(Type);
+ sliceType$18 = $sliceType(sliceType$16);
+ arrayType$6 = $arrayType($UnsafePointer, 2);
+ sliceType$19 = $sliceType(arrayType$6);
+ funcType$3 = $funcType([$String], [$Bool], false);
+ ptrType$22 = $ptrType(MapIter);
+ arrayType$7 = $arrayType($Uintptr, 2);
+ ptrType$23 = $ptrType(ValueError);
+ funcType$4 = $funcType([$UnsafePointer, $UnsafePointer], [$Bool], false);
+ funcType$5 = $funcType([$UnsafePointer, $Uintptr], [$Uintptr], false);
+ ptrType$25 = $ptrType(structField);
+ ptrType$28 = $ptrType(hiter);
+ flag.prototype.kind = function() {
+ var f;
+ f = this.$val;
+ return ((((f & 31) >>> 0) >>> 0));
+ };
+ $ptrType(flag).prototype.kind = function() { return new flag(this.$get()).kind(); };
+ flag.prototype.ro = function() {
+ var f;
+ f = this.$val;
+ if (!((((f & 96) >>> 0) === 0))) {
+ return 32;
+ }
+ return 0;
+ };
+ $ptrType(flag).prototype.ro = function() { return new flag(this.$get()).ro(); };
+ Value.ptr.prototype.pointer = function() {
+ var v;
+ v = this;
+ if (!((v.typ.size === 4)) || !v.typ.pointers()) {
+ $panic(new $String("can't call pointer on a non-pointer Value"));
+ }
+ if (!((((v.flag & 128) >>> 0) === 0))) {
+ return (v.ptr).$get();
+ }
+ return v.ptr;
+ };
+ Value.prototype.pointer = function() { return this.$val.pointer(); };
+ ValueError.ptr.prototype.Error = function() {
+ var e;
+ e = this;
+ if (e.Kind === 0) {
+ return "reflect: call of " + e.Method + " on zero Value";
+ }
+ return "reflect: call of " + e.Method + " on " + new Kind(e.Kind).String() + " Value";
+ };
+ ValueError.prototype.Error = function() { return this.$val.Error(); };
+ methodName = function() {
+ var _tuple, f, pc;
+ _tuple = runtime.Caller(2);
+ pc = _tuple[0];
+ f = runtime.FuncForPC(pc);
+ if (f === ptrType$4.nil) {
+ return "unknown method";
+ }
+ return f.Name();
+ };
+ flag.prototype.mustBe = function(expected) {
+ var expected, f;
+ f = this.$val;
+ if (!((((((f & 31) >>> 0) >>> 0)) === expected))) {
+ $panic(new ValueError.ptr(methodName(), new flag(f).kind()));
+ }
+ };
+ $ptrType(flag).prototype.mustBe = function(expected) { return new flag(this.$get()).mustBe(expected); };
+ flag.prototype.mustBeExported = function() {
+ var f;
+ f = this.$val;
+ if ((f === 0) || !((((f & 96) >>> 0) === 0))) {
+ new flag(f).mustBeExportedSlow();
+ }
+ };
+ $ptrType(flag).prototype.mustBeExported = function() { return new flag(this.$get()).mustBeExported(); };
+ flag.prototype.mustBeExportedSlow = function() {
+ var f;
+ f = this.$val;
+ if (f === 0) {
+ $panic(new ValueError.ptr(methodNameSkip(), 0));
+ }
+ if (!((((f & 96) >>> 0) === 0))) {
+ $panic(new $String("reflect: " + methodNameSkip() + " using value obtained using unexported field"));
+ }
+ };
+ $ptrType(flag).prototype.mustBeExportedSlow = function() { return new flag(this.$get()).mustBeExportedSlow(); };
+ flag.prototype.mustBeAssignable = function() {
+ var f;
+ f = this.$val;
+ if (!((((f & 96) >>> 0) === 0)) || (((f & 256) >>> 0) === 0)) {
+ new flag(f).mustBeAssignableSlow();
+ }
+ };
+ $ptrType(flag).prototype.mustBeAssignable = function() { return new flag(this.$get()).mustBeAssignable(); };
+ flag.prototype.mustBeAssignableSlow = function() {
+ var f;
+ f = this.$val;
+ if (f === 0) {
+ $panic(new ValueError.ptr(methodNameSkip(), 0));
+ }
+ if (!((((f & 96) >>> 0) === 0))) {
+ $panic(new $String("reflect: " + methodNameSkip() + " using value obtained using unexported field"));
+ }
+ if (((f & 256) >>> 0) === 0) {
+ $panic(new $String("reflect: " + methodNameSkip() + " using unaddressable value"));
+ }
+ };
+ $ptrType(flag).prototype.mustBeAssignableSlow = function() { return new flag(this.$get()).mustBeAssignableSlow(); };
+ Value.ptr.prototype.Addr = function() {
+ var fl, v;
+ v = this;
+ if (((v.flag & 256) >>> 0) === 0) {
+ $panic(new $String("reflect.Value.Addr of unaddressable value"));
+ }
+ fl = (v.flag & 96) >>> 0;
+ return new Value.ptr(v.typ.ptrTo(), v.ptr, (fl | 22) >>> 0);
+ };
+ Value.prototype.Addr = function() { return this.$val.Addr(); };
+ Value.ptr.prototype.Bool = function() {
+ var v;
+ v = this;
+ new flag(v.flag).mustBe(1);
+ return (v.ptr).$get();
+ };
+ Value.prototype.Bool = function() { return this.$val.Bool(); };
+ Value.ptr.prototype.Bytes = function() {
+ var {_r, v, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ new flag(v.flag).mustBe(23);
+ _r = v.typ.Elem().Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ /* */ if (!((_r === 8))) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (!((_r === 8))) { */ case 1:
+ $panic(new $String("reflect.Value.Bytes of non-byte slice"));
+ /* } */ case 2:
+ $s = -1; return (v.ptr).$get();
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.Bytes, $c: true, $r, _r, v, $s};return $f;
+ };
+ Value.prototype.Bytes = function() { return this.$val.Bytes(); };
+ Value.ptr.prototype.runes = function() {
+ var {_r, v, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ new flag(v.flag).mustBe(23);
+ _r = v.typ.Elem().Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ /* */ if (!((_r === 5))) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (!((_r === 5))) { */ case 1:
+ $panic(new $String("reflect.Value.Bytes of non-rune slice"));
+ /* } */ case 2:
+ $s = -1; return (v.ptr).$get();
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.runes, $c: true, $r, _r, v, $s};return $f;
+ };
+ Value.prototype.runes = function() { return this.$val.runes(); };
+ Value.ptr.prototype.CanAddr = function() {
+ var v;
+ v = this;
+ return !((((v.flag & 256) >>> 0) === 0));
+ };
+ Value.prototype.CanAddr = function() { return this.$val.CanAddr(); };
+ Value.ptr.prototype.CanSet = function() {
+ var v;
+ v = this;
+ return ((v.flag & 352) >>> 0) === 256;
+ };
+ Value.prototype.CanSet = function() { return this.$val.CanSet(); };
+ Value.ptr.prototype.Call = function(in$1) {
+ var {$24r, _r, in$1, v, $s, $r, $c} = $restore(this, {in$1});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ new flag(v.flag).mustBe(19);
+ new flag(v.flag).mustBeExported();
+ _r = $clone(v, Value).call("Call", in$1); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.Call, $c: true, $r, $24r, _r, in$1, v, $s};return $f;
+ };
+ Value.prototype.Call = function(in$1) { return this.$val.Call(in$1); };
+ Value.ptr.prototype.CallSlice = function(in$1) {
+ var {$24r, _r, in$1, v, $s, $r, $c} = $restore(this, {in$1});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ new flag(v.flag).mustBe(19);
+ new flag(v.flag).mustBeExported();
+ _r = $clone(v, Value).call("CallSlice", in$1); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.CallSlice, $c: true, $r, $24r, _r, in$1, v, $s};return $f;
+ };
+ Value.prototype.CallSlice = function(in$1) { return this.$val.CallSlice(in$1); };
+ Value.ptr.prototype.CanComplex = function() {
+ var _1, v;
+ v = this;
+ _1 = new flag(v.flag).kind();
+ if ((_1 === (15)) || (_1 === (16))) {
+ return true;
+ } else {
+ return false;
+ }
+ };
+ Value.prototype.CanComplex = function() { return this.$val.CanComplex(); };
+ Value.ptr.prototype.Complex = function() {
+ var _1, k, v, x;
+ v = this;
+ k = new flag(v.flag).kind();
+ _1 = k;
+ if (_1 === (15)) {
+ return ((x = (v.ptr).$get(), new $Complex128(x.$real, x.$imag)));
+ } else if (_1 === (16)) {
+ return (v.ptr).$get();
+ }
+ $panic(new ValueError.ptr("reflect.Value.Complex", new flag(v.flag).kind()));
+ };
+ Value.prototype.Complex = function() { return this.$val.Complex(); };
+ Value.ptr.prototype.FieldByIndex = function(index) {
+ var {$24r, _i, _r, _r$1, _r$2, _r$3, _ref, _v, i, index, v, x, $s, $r, $c} = $restore(this, {index});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ /* */ if (index.$length === 1) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (index.$length === 1) { */ case 1:
+ _r = $clone(v, Value).Field((0 >= index.$length ? ($throwRuntimeError("index out of range"), undefined) : index.$array[index.$offset + 0])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 4; case 4: return $24r;
+ /* } */ case 2:
+ new flag(v.flag).mustBe(25);
+ _ref = index;
+ _i = 0;
+ /* while (true) { */ case 5:
+ /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 6; continue; }
+ i = _i;
+ x = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]);
+ /* */ if (i > 0) { $s = 7; continue; }
+ /* */ $s = 8; continue;
+ /* if (i > 0) { */ case 7:
+ if (!($clone(v, Value).Kind() === 22)) { _v = false; $s = 11; continue s; }
+ _r$1 = v.typ.Elem().Kind(); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _v = _r$1 === 25; case 11:
+ /* */ if (_v) { $s = 9; continue; }
+ /* */ $s = 10; continue;
+ /* if (_v) { */ case 9:
+ if ($clone(v, Value).IsNil()) {
+ $panic(new $String("reflect: indirection through nil pointer to embedded struct"));
+ }
+ _r$2 = $clone(v, Value).Elem(); /* */ $s = 13; case 13: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ v = _r$2;
+ /* } */ case 10:
+ /* } */ case 8:
+ _r$3 = $clone(v, Value).Field(x); /* */ $s = 14; case 14: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
+ v = _r$3;
+ _i++;
+ $s = 5; continue;
+ case 6:
+ $s = -1; return v;
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.FieldByIndex, $c: true, $r, $24r, _i, _r, _r$1, _r$2, _r$3, _ref, _v, i, index, v, x, $s};return $f;
+ };
+ Value.prototype.FieldByIndex = function(index) { return this.$val.FieldByIndex(index); };
+ Value.ptr.prototype.FieldByIndexErr = function(index) {
+ var {$24r, $24r$1, _i, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _v, i, index, v, x, $s, $r, $c} = $restore(this, {index});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ /* */ if (index.$length === 1) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (index.$length === 1) { */ case 1:
+ _r = $clone(v, Value).Field((0 >= index.$length ? ($throwRuntimeError("index out of range"), undefined) : index.$array[index.$offset + 0])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = [_r, $ifaceNil];
+ $s = 4; case 4: return $24r;
+ /* } */ case 2:
+ new flag(v.flag).mustBe(25);
+ _ref = index;
+ _i = 0;
+ /* while (true) { */ case 5:
+ /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 6; continue; }
+ i = _i;
+ x = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]);
+ /* */ if (i > 0) { $s = 7; continue; }
+ /* */ $s = 8; continue;
+ /* if (i > 0) { */ case 7:
+ if (!($clone(v, Value).Kind() === 22)) { _v = false; $s = 11; continue s; }
+ _r$1 = v.typ.Elem().Kind(); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _v = _r$1 === 25; case 11:
+ /* */ if (_v) { $s = 9; continue; }
+ /* */ $s = 10; continue;
+ /* if (_v) { */ case 9:
+ /* */ if ($clone(v, Value).IsNil()) { $s = 13; continue; }
+ /* */ $s = 14; continue;
+ /* if ($clone(v, Value).IsNil()) { */ case 13:
+ _r$2 = v.typ.Elem().Name(); /* */ $s = 15; case 15: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ _r$3 = errors.New("reflect: indirection through nil pointer to embedded struct field " + _r$2); /* */ $s = 16; case 16: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
+ $24r$1 = [new Value.ptr(ptrType$1.nil, 0, 0), _r$3];
+ $s = 17; case 17: return $24r$1;
+ /* } */ case 14:
+ _r$4 = $clone(v, Value).Elem(); /* */ $s = 18; case 18: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
+ v = _r$4;
+ /* } */ case 10:
+ /* } */ case 8:
+ _r$5 = $clone(v, Value).Field(x); /* */ $s = 19; case 19: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
+ v = _r$5;
+ _i++;
+ $s = 5; continue;
+ case 6:
+ $s = -1; return [v, $ifaceNil];
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.FieldByIndexErr, $c: true, $r, $24r, $24r$1, _i, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _v, i, index, v, x, $s};return $f;
+ };
+ Value.prototype.FieldByIndexErr = function(index) { return this.$val.FieldByIndexErr(index); };
+ Value.ptr.prototype.FieldByName = function(name$1) {
+ var {$24r, _r, _r$1, _tuple, f, name$1, ok, v, $s, $r, $c} = $restore(this, {name$1});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ new flag(v.flag).mustBe(25);
+ _r = v.typ.FieldByName(name$1); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ f = $clone(_tuple[0], StructField);
+ ok = _tuple[1];
+ /* */ if (ok) { $s = 2; continue; }
+ /* */ $s = 3; continue;
+ /* if (ok) { */ case 2:
+ _r$1 = $clone(v, Value).FieldByIndex(f.Index); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ $24r = _r$1;
+ $s = 5; case 5: return $24r;
+ /* } */ case 3:
+ $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0);
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.FieldByName, $c: true, $r, $24r, _r, _r$1, _tuple, f, name$1, ok, v, $s};return $f;
+ };
+ Value.prototype.FieldByName = function(name$1) { return this.$val.FieldByName(name$1); };
+ Value.ptr.prototype.FieldByNameFunc = function(match) {
+ var {$24r, _r, _r$1, _tuple, f, match, ok, v, $s, $r, $c} = $restore(this, {match});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ _r = v.typ.FieldByNameFunc(match); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ f = $clone(_tuple[0], StructField);
+ ok = _tuple[1];
+ /* */ if (ok) { $s = 2; continue; }
+ /* */ $s = 3; continue;
+ /* if (ok) { */ case 2:
+ _r$1 = $clone(v, Value).FieldByIndex(f.Index); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ $24r = _r$1;
+ $s = 5; case 5: return $24r;
+ /* } */ case 3:
+ $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0);
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.FieldByNameFunc, $c: true, $r, $24r, _r, _r$1, _tuple, f, match, ok, v, $s};return $f;
+ };
+ Value.prototype.FieldByNameFunc = function(match) { return this.$val.FieldByNameFunc(match); };
+ Value.ptr.prototype.CanFloat = function() {
+ var _1, v;
+ v = this;
+ _1 = new flag(v.flag).kind();
+ if ((_1 === (13)) || (_1 === (14))) {
+ return true;
+ } else {
+ return false;
+ }
+ };
+ Value.prototype.CanFloat = function() { return this.$val.CanFloat(); };
+ Value.ptr.prototype.Float = function() {
+ var _1, k, v;
+ v = this;
+ k = new flag(v.flag).kind();
+ _1 = k;
+ if (_1 === (13)) {
+ return ((v.ptr).$get());
+ } else if (_1 === (14)) {
+ return (v.ptr).$get();
+ }
+ $panic(new ValueError.ptr("reflect.Value.Float", new flag(v.flag).kind()));
+ };
+ Value.prototype.Float = function() { return this.$val.Float(); };
+ Value.ptr.prototype.CanInt = function() {
+ var _1, v;
+ v = this;
+ _1 = new flag(v.flag).kind();
+ if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) {
+ return true;
+ } else {
+ return false;
+ }
+ };
+ Value.prototype.CanInt = function() { return this.$val.CanInt(); };
+ Value.ptr.prototype.Int = function() {
+ var _1, k, p, v;
+ v = this;
+ k = new flag(v.flag).kind();
+ p = v.ptr;
+ _1 = k;
+ if (_1 === (2)) {
+ return (new $Int64(0, (p).$get()));
+ } else if (_1 === (3)) {
+ return (new $Int64(0, (p).$get()));
+ } else if (_1 === (4)) {
+ return (new $Int64(0, (p).$get()));
+ } else if (_1 === (5)) {
+ return (new $Int64(0, (p).$get()));
+ } else if (_1 === (6)) {
+ return (p).$get();
+ }
+ $panic(new ValueError.ptr("reflect.Value.Int", new flag(v.flag).kind()));
+ };
+ Value.prototype.Int = function() { return this.$val.Int(); };
+ Value.ptr.prototype.CanInterface = function() {
+ var v;
+ v = this;
+ if (v.flag === 0) {
+ $panic(new ValueError.ptr("reflect.Value.CanInterface", 0));
+ }
+ return ((v.flag & 96) >>> 0) === 0;
+ };
+ Value.prototype.CanInterface = function() { return this.$val.CanInterface(); };
+ Value.ptr.prototype.Interface = function() {
+ var {$24r, _r, i, v, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ i = $ifaceNil;
+ v = this;
+ _r = valueInterface($clone(v, Value), true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ i = _r;
+ $24r = i;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.Interface, $c: true, $r, $24r, _r, i, v, $s};return $f;
+ };
+ Value.prototype.Interface = function() { return this.$val.Interface(); };
+ Value.ptr.prototype.IsValid = function() {
+ var v;
+ v = this;
+ return !((v.flag === 0));
+ };
+ Value.prototype.IsValid = function() { return this.$val.IsValid(); };
+ Value.ptr.prototype.IsZero = function() {
+ var {_1, _r, _r$1, _r$2, _r$3, c, i, i$1, v, x, x$1, x$2, x$3, x$4, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ _1 = new flag(v.flag).kind();
+ /* */ if (_1 === (1)) { $s = 2; continue; }
+ /* */ if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { $s = 3; continue; }
+ /* */ if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { $s = 4; continue; }
+ /* */ if ((_1 === (13)) || (_1 === (14))) { $s = 5; continue; }
+ /* */ if ((_1 === (15)) || (_1 === (16))) { $s = 6; continue; }
+ /* */ if (_1 === (17)) { $s = 7; continue; }
+ /* */ if ((_1 === (18)) || (_1 === (19)) || (_1 === (20)) || (_1 === (21)) || (_1 === (22)) || (_1 === (23)) || (_1 === (26))) { $s = 8; continue; }
+ /* */ if (_1 === (24)) { $s = 9; continue; }
+ /* */ if (_1 === (25)) { $s = 10; continue; }
+ /* */ $s = 11; continue;
+ /* if (_1 === (1)) { */ case 2:
+ $s = -1; return !$clone(v, Value).Bool();
+ /* } else if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { */ case 3:
+ $s = -1; return (x = $clone(v, Value).Int(), (x.$high === 0 && x.$low === 0));
+ /* } else if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { */ case 4:
+ $s = -1; return (x$1 = $clone(v, Value).Uint(), (x$1.$high === 0 && x$1.$low === 0));
+ /* } else if ((_1 === (13)) || (_1 === (14))) { */ case 5:
+ $s = -1; return (x$2 = math.Float64bits($clone(v, Value).Float()), (x$2.$high === 0 && x$2.$low === 0));
+ /* } else if ((_1 === (15)) || (_1 === (16))) { */ case 6:
+ c = $clone(v, Value).Complex();
+ $s = -1; return (x$3 = math.Float64bits(c.$real), (x$3.$high === 0 && x$3.$low === 0)) && (x$4 = math.Float64bits(c.$imag), (x$4.$high === 0 && x$4.$low === 0));
+ /* } else if (_1 === (17)) { */ case 7:
+ i = 0;
+ /* while (true) { */ case 13:
+ /* if (!(i < $clone(v, Value).Len())) { break; } */ if(!(i < $clone(v, Value).Len())) { $s = 14; continue; }
+ _r = $clone(v, Value).Index(i); /* */ $s = 17; case 17: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _r$1 = $clone(_r, Value).IsZero(); /* */ $s = 18; case 18: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ /* */ if (!_r$1) { $s = 15; continue; }
+ /* */ $s = 16; continue;
+ /* if (!_r$1) { */ case 15:
+ $s = -1; return false;
+ /* } */ case 16:
+ i = i + (1) >> 0;
+ $s = 13; continue;
+ case 14:
+ $s = -1; return true;
+ /* } else if ((_1 === (18)) || (_1 === (19)) || (_1 === (20)) || (_1 === (21)) || (_1 === (22)) || (_1 === (23)) || (_1 === (26))) { */ case 8:
+ $s = -1; return $clone(v, Value).IsNil();
+ /* } else if (_1 === (24)) { */ case 9:
+ $s = -1; return $clone(v, Value).Len() === 0;
+ /* } else if (_1 === (25)) { */ case 10:
+ i$1 = 0;
+ /* while (true) { */ case 19:
+ /* if (!(i$1 < $clone(v, Value).NumField())) { break; } */ if(!(i$1 < $clone(v, Value).NumField())) { $s = 20; continue; }
+ _r$2 = $clone(v, Value).Field(i$1); /* */ $s = 23; case 23: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ _r$3 = $clone(_r$2, Value).IsZero(); /* */ $s = 24; case 24: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
+ /* */ if (!_r$3) { $s = 21; continue; }
+ /* */ $s = 22; continue;
+ /* if (!_r$3) { */ case 21:
+ $s = -1; return false;
+ /* } */ case 22:
+ i$1 = i$1 + (1) >> 0;
+ $s = 19; continue;
+ case 20:
+ $s = -1; return true;
+ /* } else { */ case 11:
+ $panic(new ValueError.ptr("reflect.Value.IsZero", $clone(v, Value).Kind()));
+ /* } */ case 12:
+ case 1:
+ $s = -1; return false;
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.IsZero, $c: true, $r, _1, _r, _r$1, _r$2, _r$3, c, i, i$1, v, x, x$1, x$2, x$3, x$4, $s};return $f;
+ };
+ Value.prototype.IsZero = function() { return this.$val.IsZero(); };
+ Value.ptr.prototype.Kind = function() {
+ var v;
+ v = this;
+ return new flag(v.flag).kind();
+ };
+ Value.prototype.Kind = function() { return this.$val.Kind(); };
+ Value.ptr.prototype.MapIndex = function(key) {
+ var {_r, e, fl, k, k$1, key, tt, typ, v, $s, $r, $c} = $restore(this, {key});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ new flag(v.flag).mustBe(21);
+ tt = (v.typ.kindType);
+ e = 0;
+ /* */ if ((tt.key === stringType || (new flag(key.flag).kind() === 24)) && tt.key === key.typ && tt.elem.size <= 128) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if ((tt.key === stringType || (new flag(key.flag).kind() === 24)) && tt.key === key.typ && tt.elem.size <= 128) { */ case 1:
+ k = (key.ptr).$get();
+ e = mapaccess_faststr(v.typ, $clone(v, Value).pointer(), k);
+ $s = 3; continue;
+ /* } else { */ case 2:
+ _r = $clone(key, Value).assignTo("reflect.Value.MapIndex", tt.key, 0); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ key = _r;
+ k$1 = 0;
+ if (!((((key.flag & 128) >>> 0) === 0))) {
+ k$1 = key.ptr;
+ } else {
+ k$1 = ((key.$ptr_ptr || (key.$ptr_ptr = new ptrType$7(function() { return this.$target.ptr; }, function($v) { this.$target.ptr = $v; }, key))));
+ }
+ e = mapaccess(v.typ, $clone(v, Value).pointer(), k$1);
+ /* } */ case 3:
+ if (e === 0) {
+ $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0);
+ }
+ typ = tt.elem;
+ fl = new flag((((v.flag | key.flag) >>> 0))).ro();
+ fl = (fl | (((typ.Kind() >>> 0)))) >>> 0;
+ $s = -1; return copyVal(typ, fl, e);
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.MapIndex, $c: true, $r, _r, e, fl, k, k$1, key, tt, typ, v, $s};return $f;
+ };
+ Value.prototype.MapIndex = function(key) { return this.$val.MapIndex(key); };
+ Value.ptr.prototype.MapKeys = function() {
+ var {_r, a, fl, i, it, key, keyType, m, mlen, tt, v, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ it = [it];
+ v = this;
+ new flag(v.flag).mustBe(21);
+ tt = (v.typ.kindType);
+ keyType = tt.key;
+ fl = (new flag(v.flag).ro() | ((keyType.Kind() >>> 0))) >>> 0;
+ m = $clone(v, Value).pointer();
+ mlen = 0;
+ if (!(m === 0)) {
+ mlen = maplen(m);
+ }
+ it[0] = new hiter.ptr($ifaceNil, null, null, 0, null);
+ mapiterinit(v.typ, m, it[0]);
+ a = $makeSlice(sliceType$7, mlen);
+ i = 0;
+ i = 0;
+ /* while (true) { */ case 1:
+ /* if (!(i < a.$length)) { break; } */ if(!(i < a.$length)) { $s = 2; continue; }
+ _r = mapiterkey(it[0]); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ key = _r;
+ if (key === 0) {
+ /* break; */ $s = 2; continue;
+ }
+ ((i < 0 || i >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + i] = copyVal(keyType, fl, key));
+ mapiternext(it[0]);
+ i = i + (1) >> 0;
+ $s = 1; continue;
+ case 2:
+ $s = -1; return $subslice(a, 0, i);
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.MapKeys, $c: true, $r, _r, a, fl, i, it, key, keyType, m, mlen, tt, v, $s};return $f;
+ };
+ Value.prototype.MapKeys = function() { return this.$val.MapKeys(); };
+ hiter.ptr.prototype.initialized = function() {
+ var h;
+ h = this;
+ return !($interfaceIsEqual(h.t, $ifaceNil));
+ };
+ hiter.prototype.initialized = function() { return this.$val.initialized(); };
+ MapIter.ptr.prototype.Key = function() {
+ var {_r, iter, iterkey, ktype, t, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ iter = this;
+ if (!iter.hiter.initialized()) {
+ $panic(new $String("MapIter.Key called before Next"));
+ }
+ _r = mapiterkey(iter.hiter); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ iterkey = _r;
+ if (iterkey === 0) {
+ $panic(new $String("MapIter.Key called on exhausted iterator"));
+ }
+ t = (iter.m.typ.kindType);
+ ktype = t.key;
+ $s = -1; return copyVal(ktype, (new flag(iter.m.flag).ro() | ((ktype.Kind() >>> 0))) >>> 0, iterkey);
+ /* */ } return; } var $f = {$blk: MapIter.ptr.prototype.Key, $c: true, $r, _r, iter, iterkey, ktype, t, $s};return $f;
+ };
+ MapIter.prototype.Key = function() { return this.$val.Key(); };
+ Value.ptr.prototype.SetIterKey = function(iter) {
+ var {_r, _r$1, iter, iterkey, key, ktype, t, target, v, $s, $r, $c} = $restore(this, {iter});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ if (!iter.hiter.initialized()) {
+ $panic(new $String("reflect: Value.SetIterKey called before Next"));
+ }
+ _r = mapiterkey(iter.hiter); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ iterkey = _r;
+ if (iterkey === 0) {
+ $panic(new $String("reflect: Value.SetIterKey called on exhausted iterator"));
+ }
+ new flag(v.flag).mustBeAssignable();
+ target = 0;
+ if (new flag(v.flag).kind() === 20) {
+ target = v.ptr;
+ }
+ t = (iter.m.typ.kindType);
+ ktype = t.key;
+ key = new Value.ptr(ktype, iterkey, (((iter.m.flag | ((ktype.Kind() >>> 0))) >>> 0) | 128) >>> 0);
+ _r$1 = $clone(key, Value).assignTo("reflect.MapIter.SetKey", v.typ, target); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ key = _r$1;
+ typedmemmove(v.typ, v.ptr, key.ptr);
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.SetIterKey, $c: true, $r, _r, _r$1, iter, iterkey, key, ktype, t, target, v, $s};return $f;
+ };
+ Value.prototype.SetIterKey = function(iter) { return this.$val.SetIterKey(iter); };
+ MapIter.ptr.prototype.Value = function() {
+ var {_r, iter, iterelem, t, vtype, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ iter = this;
+ if (!iter.hiter.initialized()) {
+ $panic(new $String("MapIter.Value called before Next"));
+ }
+ _r = mapiterelem(iter.hiter); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ iterelem = _r;
+ if (iterelem === 0) {
+ $panic(new $String("MapIter.Value called on exhausted iterator"));
+ }
+ t = (iter.m.typ.kindType);
+ vtype = t.elem;
+ $s = -1; return copyVal(vtype, (new flag(iter.m.flag).ro() | ((vtype.Kind() >>> 0))) >>> 0, iterelem);
+ /* */ } return; } var $f = {$blk: MapIter.ptr.prototype.Value, $c: true, $r, _r, iter, iterelem, t, vtype, $s};return $f;
+ };
+ MapIter.prototype.Value = function() { return this.$val.Value(); };
+ Value.ptr.prototype.SetIterValue = function(iter) {
+ var {_r, _r$1, elem, iter, iterelem, t, target, v, vtype, $s, $r, $c} = $restore(this, {iter});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ if (!iter.hiter.initialized()) {
+ $panic(new $String("reflect: Value.SetIterValue called before Next"));
+ }
+ _r = mapiterelem(iter.hiter); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ iterelem = _r;
+ if (iterelem === 0) {
+ $panic(new $String("reflect: Value.SetIterValue called on exhausted iterator"));
+ }
+ new flag(v.flag).mustBeAssignable();
+ target = 0;
+ if (new flag(v.flag).kind() === 20) {
+ target = v.ptr;
+ }
+ t = (iter.m.typ.kindType);
+ vtype = t.elem;
+ elem = new Value.ptr(vtype, iterelem, (((iter.m.flag | ((vtype.Kind() >>> 0))) >>> 0) | 128) >>> 0);
+ _r$1 = $clone(elem, Value).assignTo("reflect.MapIter.SetValue", v.typ, target); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ elem = _r$1;
+ typedmemmove(v.typ, v.ptr, elem.ptr);
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.SetIterValue, $c: true, $r, _r, _r$1, elem, iter, iterelem, t, target, v, vtype, $s};return $f;
+ };
+ Value.prototype.SetIterValue = function(iter) { return this.$val.SetIterValue(iter); };
+ MapIter.ptr.prototype.Next = function() {
+ var {$24r, _r, _r$1, iter, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ iter = this;
+ if (!$clone(iter.m, Value).IsValid()) {
+ $panic(new $String("MapIter.Next called on an iterator that does not have an associated map Value"));
+ }
+ /* */ if (!iter.hiter.initialized()) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (!iter.hiter.initialized()) { */ case 1:
+ mapiterinit(iter.m.typ, $clone(iter.m, Value).pointer(), iter.hiter);
+ $s = 3; continue;
+ /* } else { */ case 2:
+ _r = mapiterkey(iter.hiter); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ /* */ if (_r === 0) { $s = 4; continue; }
+ /* */ $s = 5; continue;
+ /* if (_r === 0) { */ case 4:
+ $panic(new $String("MapIter.Next called on exhausted iterator"));
+ /* } */ case 5:
+ mapiternext(iter.hiter);
+ /* } */ case 3:
+ _r$1 = mapiterkey(iter.hiter); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ $24r = !(_r$1 === 0);
+ $s = 8; case 8: return $24r;
+ /* */ } return; } var $f = {$blk: MapIter.ptr.prototype.Next, $c: true, $r, $24r, _r, _r$1, iter, $s};return $f;
+ };
+ MapIter.prototype.Next = function() { return this.$val.Next(); };
+ MapIter.ptr.prototype.Reset = function(v) {
+ var iter, v;
+ iter = this;
+ if ($clone(v, Value).IsValid()) {
+ new flag(v.flag).mustBe(21);
+ }
+ iter.m = v;
+ hiter.copy(iter.hiter, new hiter.ptr($ifaceNil, null, null, 0, null));
+ };
+ MapIter.prototype.Reset = function(v) { return this.$val.Reset(v); };
+ Value.ptr.prototype.MapRange = function() {
+ var v;
+ v = this;
+ new flag(v.flag).mustBe(21);
+ return new MapIter.ptr($clone(v, Value), new hiter.ptr($ifaceNil, null, null, 0, null));
+ };
+ Value.prototype.MapRange = function() { return this.$val.MapRange(); };
+ copyVal = function(typ, fl, ptr) {
+ var c, fl, ptr, typ;
+ if (ifaceIndir(typ)) {
+ c = unsafe_New(typ);
+ typedmemmove(typ, c, ptr);
+ return new Value.ptr(typ, c, (fl | 128) >>> 0);
+ }
+ return new Value.ptr(typ, (ptr).$get(), fl);
+ };
+ Value.ptr.prototype.Method = function(i) {
+ var fl, i, v;
+ v = this;
+ if (v.typ === ptrType$1.nil) {
+ $panic(new ValueError.ptr("reflect.Value.Method", 0));
+ }
+ if (!((((v.flag & 512) >>> 0) === 0)) || ((i >>> 0)) >= ((v.typ.NumMethod() >>> 0))) {
+ $panic(new $String("reflect: Method index out of range"));
+ }
+ if ((v.typ.Kind() === 20) && $clone(v, Value).IsNil()) {
+ $panic(new $String("reflect: Method on nil interface value"));
+ }
+ fl = (new flag(v.flag).ro() | (((v.flag & 128) >>> 0))) >>> 0;
+ fl = (fl | (19)) >>> 0;
+ fl = (fl | ((((((i >>> 0)) << 10 >>> 0) | 512) >>> 0))) >>> 0;
+ return new Value.ptr(v.typ, v.ptr, fl);
+ };
+ Value.prototype.Method = function(i) { return this.$val.Method(i); };
+ Value.ptr.prototype.NumMethod = function() {
+ var v;
+ v = this;
+ if (v.typ === ptrType$1.nil) {
+ $panic(new ValueError.ptr("reflect.Value.NumMethod", 0));
+ }
+ if (!((((v.flag & 512) >>> 0) === 0))) {
+ return 0;
+ }
+ return v.typ.NumMethod();
+ };
+ Value.prototype.NumMethod = function() { return this.$val.NumMethod(); };
+ Value.ptr.prototype.MethodByName = function(name$1) {
+ var {_r, _tuple, m, name$1, ok, v, $s, $r, $c} = $restore(this, {name$1});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ if (v.typ === ptrType$1.nil) {
+ $panic(new ValueError.ptr("reflect.Value.MethodByName", 0));
+ }
+ if (!((((v.flag & 512) >>> 0) === 0))) {
+ $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0);
+ }
+ _r = v.typ.MethodByName(name$1); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ m = $clone(_tuple[0], Method);
+ ok = _tuple[1];
+ if (!ok) {
+ $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0);
+ }
+ $s = -1; return $clone(v, Value).Method(m.Index);
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.MethodByName, $c: true, $r, _r, _tuple, m, name$1, ok, v, $s};return $f;
+ };
+ Value.prototype.MethodByName = function(name$1) { return this.$val.MethodByName(name$1); };
+ Value.ptr.prototype.NumField = function() {
+ var tt, v;
+ v = this;
+ new flag(v.flag).mustBe(25);
+ tt = (v.typ.kindType);
+ return tt.fields.$length;
+ };
+ Value.prototype.NumField = function() { return this.$val.NumField(); };
+ Value.ptr.prototype.OverflowComplex = function(x) {
+ var _1, k, v, x;
+ v = this;
+ k = new flag(v.flag).kind();
+ _1 = k;
+ if (_1 === (15)) {
+ return overflowFloat32(x.$real) || overflowFloat32(x.$imag);
+ } else if (_1 === (16)) {
+ return false;
+ }
+ $panic(new ValueError.ptr("reflect.Value.OverflowComplex", new flag(v.flag).kind()));
+ };
+ Value.prototype.OverflowComplex = function(x) { return this.$val.OverflowComplex(x); };
+ Value.ptr.prototype.OverflowFloat = function(x) {
+ var _1, k, v, x;
+ v = this;
+ k = new flag(v.flag).kind();
+ _1 = k;
+ if (_1 === (13)) {
+ return overflowFloat32(x);
+ } else if (_1 === (14)) {
+ return false;
+ }
+ $panic(new ValueError.ptr("reflect.Value.OverflowFloat", new flag(v.flag).kind()));
+ };
+ Value.prototype.OverflowFloat = function(x) { return this.$val.OverflowFloat(x); };
+ overflowFloat32 = function(x) {
+ var x;
+ if (x < 0) {
+ x = -x;
+ }
+ return 3.4028234663852886e+38 < x && x <= 1.7976931348623157e+308;
+ };
+ Value.ptr.prototype.OverflowInt = function(x) {
+ var _1, bitSize, k, trunc, v, x;
+ v = this;
+ k = new flag(v.flag).kind();
+ _1 = k;
+ if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) {
+ bitSize = $imul(v.typ.size, 8) >>> 0;
+ trunc = $shiftRightInt64(($shiftLeft64(x, ((64 - bitSize >>> 0)))), ((64 - bitSize >>> 0)));
+ return !((x.$high === trunc.$high && x.$low === trunc.$low));
+ }
+ $panic(new ValueError.ptr("reflect.Value.OverflowInt", new flag(v.flag).kind()));
+ };
+ Value.prototype.OverflowInt = function(x) { return this.$val.OverflowInt(x); };
+ Value.ptr.prototype.OverflowUint = function(x) {
+ var _1, bitSize, k, trunc, v, x;
+ v = this;
+ k = new flag(v.flag).kind();
+ _1 = k;
+ if ((_1 === (7)) || (_1 === (12)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11))) {
+ bitSize = $imul(v.typ.size, 8) >>> 0;
+ trunc = $shiftRightUint64(($shiftLeft64(x, ((64 - bitSize >>> 0)))), ((64 - bitSize >>> 0)));
+ return !((x.$high === trunc.$high && x.$low === trunc.$low));
+ }
+ $panic(new ValueError.ptr("reflect.Value.OverflowUint", new flag(v.flag).kind()));
+ };
+ Value.prototype.OverflowUint = function(x) { return this.$val.OverflowUint(x); };
+ Value.ptr.prototype.Recv = function() {
+ var {$24r, _r, _tuple, ok, v, x, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ x = new Value.ptr(ptrType$1.nil, 0, 0);
+ ok = false;
+ v = this;
+ new flag(v.flag).mustBe(18);
+ new flag(v.flag).mustBeExported();
+ _r = $clone(v, Value).recv(false); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ x = _tuple[0];
+ ok = _tuple[1];
+ $24r = [x, ok];
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.Recv, $c: true, $r, $24r, _r, _tuple, ok, v, x, $s};return $f;
+ };
+ Value.prototype.Recv = function() { return this.$val.Recv(); };
+ Value.ptr.prototype.recv = function(nb) {
+ var {_r, _tuple, nb, ok, p, selected, t, tt, v, val, $s, $r, $c} = $restore(this, {nb});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ val = new Value.ptr(ptrType$1.nil, 0, 0);
+ ok = false;
+ v = this;
+ tt = (v.typ.kindType);
+ if ((((tt.dir >> 0)) & 1) === 0) {
+ $panic(new $String("reflect: recv on send-only channel"));
+ }
+ t = tt.elem;
+ val = new Value.ptr(t, 0, ((t.Kind() >>> 0)));
+ p = 0;
+ if (ifaceIndir(t)) {
+ p = unsafe_New(t);
+ val.ptr = p;
+ val.flag = (val.flag | (128)) >>> 0;
+ } else {
+ p = ((val.$ptr_ptr || (val.$ptr_ptr = new ptrType$7(function() { return this.$target.ptr; }, function($v) { this.$target.ptr = $v; }, val))));
+ }
+ _r = chanrecv($clone(v, Value).pointer(), nb, p); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ selected = _tuple[0];
+ ok = _tuple[1];
+ if (!selected) {
+ val = new Value.ptr(ptrType$1.nil, 0, 0);
+ }
+ $s = -1; return [val, ok];
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.recv, $c: true, $r, _r, _tuple, nb, ok, p, selected, t, tt, v, val, $s};return $f;
+ };
+ Value.prototype.recv = function(nb) { return this.$val.recv(nb); };
+ Value.ptr.prototype.Send = function(x) {
+ var {_r, v, x, $s, $r, $c} = $restore(this, {x});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ new flag(v.flag).mustBe(18);
+ new flag(v.flag).mustBeExported();
+ _r = $clone(v, Value).send($clone(x, Value), false); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _r;
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.Send, $c: true, $r, _r, v, x, $s};return $f;
+ };
+ Value.prototype.Send = function(x) { return this.$val.Send(x); };
+ Value.ptr.prototype.send = function(x, nb) {
+ var {$24r, _r, _r$1, nb, p, selected, tt, v, x, $s, $r, $c} = $restore(this, {x, nb});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ selected = false;
+ v = this;
+ tt = (v.typ.kindType);
+ if ((((tt.dir >> 0)) & 2) === 0) {
+ $panic(new $String("reflect: send on recv-only channel"));
+ }
+ new flag(x.flag).mustBeExported();
+ _r = $clone(x, Value).assignTo("reflect.Value.Send", tt.elem, 0); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ x = _r;
+ p = 0;
+ if (!((((x.flag & 128) >>> 0) === 0))) {
+ p = x.ptr;
+ } else {
+ p = ((x.$ptr_ptr || (x.$ptr_ptr = new ptrType$7(function() { return this.$target.ptr; }, function($v) { this.$target.ptr = $v; }, x))));
+ }
+ _r$1 = chansend($clone(v, Value).pointer(), p, nb); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ selected = _r$1;
+ $24r = selected;
+ $s = 3; case 3: return $24r;
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.send, $c: true, $r, $24r, _r, _r$1, nb, p, selected, tt, v, x, $s};return $f;
+ };
+ Value.prototype.send = function(x, nb) { return this.$val.send(x, nb); };
+ Value.ptr.prototype.SetBool = function(x) {
+ var v, x;
+ v = this;
+ new flag(v.flag).mustBeAssignable();
+ new flag(v.flag).mustBe(1);
+ (v.ptr).$set(x);
+ };
+ Value.prototype.SetBool = function(x) { return this.$val.SetBool(x); };
+ Value.ptr.prototype.setRunes = function(x) {
+ var {_r, v, x, $s, $r, $c} = $restore(this, {x});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ new flag(v.flag).mustBeAssignable();
+ new flag(v.flag).mustBe(23);
+ _r = v.typ.Elem().Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ /* */ if (!((_r === 5))) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (!((_r === 5))) { */ case 1:
+ $panic(new $String("reflect.Value.setRunes of non-rune slice"));
+ /* } */ case 2:
+ (v.ptr).$set(x);
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.setRunes, $c: true, $r, _r, v, x, $s};return $f;
+ };
+ Value.prototype.setRunes = function(x) { return this.$val.setRunes(x); };
+ Value.ptr.prototype.SetComplex = function(x) {
+ var _1, k, v, x;
+ v = this;
+ new flag(v.flag).mustBeAssignable();
+ k = new flag(v.flag).kind();
+ _1 = k;
+ if (_1 === (15)) {
+ (v.ptr).$set((new $Complex64(x.$real, x.$imag)));
+ } else if (_1 === (16)) {
+ (v.ptr).$set(x);
+ } else {
+ $panic(new ValueError.ptr("reflect.Value.SetComplex", new flag(v.flag).kind()));
+ }
+ };
+ Value.prototype.SetComplex = function(x) { return this.$val.SetComplex(x); };
+ Value.ptr.prototype.SetFloat = function(x) {
+ var _1, k, v, x;
+ v = this;
+ new flag(v.flag).mustBeAssignable();
+ k = new flag(v.flag).kind();
+ _1 = k;
+ if (_1 === (13)) {
+ (v.ptr).$set(($fround(x)));
+ } else if (_1 === (14)) {
+ (v.ptr).$set(x);
+ } else {
+ $panic(new ValueError.ptr("reflect.Value.SetFloat", new flag(v.flag).kind()));
+ }
+ };
+ Value.prototype.SetFloat = function(x) { return this.$val.SetFloat(x); };
+ Value.ptr.prototype.SetInt = function(x) {
+ var _1, k, v, x;
+ v = this;
+ new flag(v.flag).mustBeAssignable();
+ k = new flag(v.flag).kind();
+ _1 = k;
+ if (_1 === (2)) {
+ (v.ptr).$set((((x.$low + ((x.$high >> 31) * 4294967296)) >> 0)));
+ } else if (_1 === (3)) {
+ (v.ptr).$set((((x.$low + ((x.$high >> 31) * 4294967296)) << 24 >> 24)));
+ } else if (_1 === (4)) {
+ (v.ptr).$set((((x.$low + ((x.$high >> 31) * 4294967296)) << 16 >> 16)));
+ } else if (_1 === (5)) {
+ (v.ptr).$set((((x.$low + ((x.$high >> 31) * 4294967296)) >> 0)));
+ } else if (_1 === (6)) {
+ (v.ptr).$set(x);
+ } else {
+ $panic(new ValueError.ptr("reflect.Value.SetInt", new flag(v.flag).kind()));
+ }
+ };
+ Value.prototype.SetInt = function(x) { return this.$val.SetInt(x); };
+ Value.ptr.prototype.SetMapIndex = function(key, elem) {
+ var {_r, _r$1, _r$2, e, e$1, elem, k, k$1, key, tt, v, $s, $r, $c} = $restore(this, {key, elem});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ new flag(v.flag).mustBe(21);
+ new flag(v.flag).mustBeExported();
+ new flag(key.flag).mustBeExported();
+ tt = (v.typ.kindType);
+ /* */ if ((tt.key === stringType || (new flag(key.flag).kind() === 24)) && tt.key === key.typ && tt.elem.size <= 128) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if ((tt.key === stringType || (new flag(key.flag).kind() === 24)) && tt.key === key.typ && tt.elem.size <= 128) { */ case 1:
+ k = (key.ptr).$get();
+ if (elem.typ === ptrType$1.nil) {
+ mapdelete_faststr(v.typ, $clone(v, Value).pointer(), k);
+ $s = -1; return;
+ }
+ new flag(elem.flag).mustBeExported();
+ _r = $clone(elem, Value).assignTo("reflect.Value.SetMapIndex", tt.elem, 0); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ elem = _r;
+ e = 0;
+ if (!((((elem.flag & 128) >>> 0) === 0))) {
+ e = elem.ptr;
+ } else {
+ e = ((elem.$ptr_ptr || (elem.$ptr_ptr = new ptrType$7(function() { return this.$target.ptr; }, function($v) { this.$target.ptr = $v; }, elem))));
+ }
+ $r = mapassign_faststr(v.typ, $clone(v, Value).pointer(), k, e); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $s = -1; return;
+ /* } */ case 2:
+ _r$1 = $clone(key, Value).assignTo("reflect.Value.SetMapIndex", tt.key, 0); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ key = _r$1;
+ k$1 = 0;
+ if (!((((key.flag & 128) >>> 0) === 0))) {
+ k$1 = key.ptr;
+ } else {
+ k$1 = ((key.$ptr_ptr || (key.$ptr_ptr = new ptrType$7(function() { return this.$target.ptr; }, function($v) { this.$target.ptr = $v; }, key))));
+ }
+ if (elem.typ === ptrType$1.nil) {
+ mapdelete(v.typ, $clone(v, Value).pointer(), k$1);
+ $s = -1; return;
+ }
+ new flag(elem.flag).mustBeExported();
+ _r$2 = $clone(elem, Value).assignTo("reflect.Value.SetMapIndex", tt.elem, 0); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ elem = _r$2;
+ e$1 = 0;
+ if (!((((elem.flag & 128) >>> 0) === 0))) {
+ e$1 = elem.ptr;
+ } else {
+ e$1 = ((elem.$ptr_ptr || (elem.$ptr_ptr = new ptrType$7(function() { return this.$target.ptr; }, function($v) { this.$target.ptr = $v; }, elem))));
+ }
+ $r = mapassign(v.typ, $clone(v, Value).pointer(), k$1, e$1); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.SetMapIndex, $c: true, $r, _r, _r$1, _r$2, e, e$1, elem, k, k$1, key, tt, v, $s};return $f;
+ };
+ Value.prototype.SetMapIndex = function(key, elem) { return this.$val.SetMapIndex(key, elem); };
+ Value.ptr.prototype.SetUint = function(x) {
+ var _1, k, v, x;
+ v = this;
+ new flag(v.flag).mustBeAssignable();
+ k = new flag(v.flag).kind();
+ _1 = k;
+ if (_1 === (7)) {
+ (v.ptr).$set(((x.$low >>> 0)));
+ } else if (_1 === (8)) {
+ (v.ptr).$set(((x.$low << 24 >>> 24)));
+ } else if (_1 === (9)) {
+ (v.ptr).$set(((x.$low << 16 >>> 16)));
+ } else if (_1 === (10)) {
+ (v.ptr).$set(((x.$low >>> 0)));
+ } else if (_1 === (11)) {
+ (v.ptr).$set(x);
+ } else if (_1 === (12)) {
+ (v.ptr).$set(((x.$low >>> 0)));
+ } else {
+ $panic(new ValueError.ptr("reflect.Value.SetUint", new flag(v.flag).kind()));
+ }
+ };
+ Value.prototype.SetUint = function(x) { return this.$val.SetUint(x); };
+ Value.ptr.prototype.SetPointer = function(x) {
+ var v, x;
+ v = this;
+ new flag(v.flag).mustBeAssignable();
+ new flag(v.flag).mustBe(26);
+ (v.ptr).$set(x);
+ };
+ Value.prototype.SetPointer = function(x) { return this.$val.SetPointer(x); };
+ Value.ptr.prototype.SetString = function(x) {
+ var v, x;
+ v = this;
+ new flag(v.flag).mustBeAssignable();
+ new flag(v.flag).mustBe(24);
+ (v.ptr).$set(x);
+ };
+ Value.prototype.SetString = function(x) { return this.$val.SetString(x); };
+ Value.ptr.prototype.String = function() {
+ var {$24r, _1, _r, k, v, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ k = new flag(v.flag).kind();
+ _1 = k;
+ if (_1 === (0)) {
+ $s = -1; return "";
+ } else if (_1 === (24)) {
+ $s = -1; return (v.ptr).$get();
+ }
+ _r = $clone(v, Value).Type().String(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = "<" + _r + " Value>";
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.String, $c: true, $r, $24r, _1, _r, k, v, $s};return $f;
+ };
+ Value.prototype.String = function() { return this.$val.String(); };
+ Value.ptr.prototype.TryRecv = function() {
+ var {$24r, _r, _tuple, ok, v, x, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ x = new Value.ptr(ptrType$1.nil, 0, 0);
+ ok = false;
+ v = this;
+ new flag(v.flag).mustBe(18);
+ new flag(v.flag).mustBeExported();
+ _r = $clone(v, Value).recv(true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ x = _tuple[0];
+ ok = _tuple[1];
+ $24r = [x, ok];
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.TryRecv, $c: true, $r, $24r, _r, _tuple, ok, v, x, $s};return $f;
+ };
+ Value.prototype.TryRecv = function() { return this.$val.TryRecv(); };
+ Value.ptr.prototype.TrySend = function(x) {
+ var {$24r, _r, v, x, $s, $r, $c} = $restore(this, {x});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ new flag(v.flag).mustBe(18);
+ new flag(v.flag).mustBeExported();
+ _r = $clone(v, Value).send($clone(x, Value), true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.TrySend, $c: true, $r, $24r, _r, v, x, $s};return $f;
+ };
+ Value.prototype.TrySend = function(x) { return this.$val.TrySend(x); };
+ Value.ptr.prototype.Type = function() {
+ var f, i, m, m$1, ms, tt, v, x;
+ v = this;
+ f = v.flag;
+ if (f === 0) {
+ $panic(new ValueError.ptr("reflect.Value.Type", 0));
+ }
+ if (((f & 512) >>> 0) === 0) {
+ return v.typ;
+ }
+ i = ((v.flag >> 0)) >> 10 >> 0;
+ if (v.typ.Kind() === 20) {
+ tt = (v.typ.kindType);
+ if (((i >>> 0)) >= ((tt.methods.$length >>> 0))) {
+ $panic(new $String("reflect: internal error: invalid method index"));
+ }
+ m = (x = tt.methods, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]));
+ return v.typ.typeOff(m.typ);
+ }
+ ms = v.typ.exportedMethods();
+ if (((i >>> 0)) >= ((ms.$length >>> 0))) {
+ $panic(new $String("reflect: internal error: invalid method index"));
+ }
+ m$1 = $clone(((i < 0 || i >= ms.$length) ? ($throwRuntimeError("index out of range"), undefined) : ms.$array[ms.$offset + i]), method);
+ return v.typ.typeOff(m$1.mtyp);
+ };
+ Value.prototype.Type = function() { return this.$val.Type(); };
+ Value.ptr.prototype.CanUint = function() {
+ var _1, v;
+ v = this;
+ _1 = new flag(v.flag).kind();
+ if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) {
+ return true;
+ } else {
+ return false;
+ }
+ };
+ Value.prototype.CanUint = function() { return this.$val.CanUint(); };
+ Value.ptr.prototype.Uint = function() {
+ var _1, k, p, v, x;
+ v = this;
+ k = new flag(v.flag).kind();
+ p = v.ptr;
+ _1 = k;
+ if (_1 === (7)) {
+ return (new $Uint64(0, (p).$get()));
+ } else if (_1 === (8)) {
+ return (new $Uint64(0, (p).$get()));
+ } else if (_1 === (9)) {
+ return (new $Uint64(0, (p).$get()));
+ } else if (_1 === (10)) {
+ return (new $Uint64(0, (p).$get()));
+ } else if (_1 === (11)) {
+ return (p).$get();
+ } else if (_1 === (12)) {
+ return ((x = (p).$get(), new $Uint64(0, x.constructor === Number ? x : 1)));
+ }
+ $panic(new ValueError.ptr("reflect.Value.Uint", new flag(v.flag).kind()));
+ };
+ Value.prototype.Uint = function() { return this.$val.Uint(); };
+ Value.ptr.prototype.UnsafeAddr = function() {
+ var v;
+ v = this;
+ if (v.typ === ptrType$1.nil) {
+ $panic(new ValueError.ptr("reflect.Value.UnsafeAddr", 0));
+ }
+ if (((v.flag & 256) >>> 0) === 0) {
+ $panic(new $String("reflect.Value.UnsafeAddr of unaddressable value"));
+ }
+ return (v.ptr);
+ };
+ Value.prototype.UnsafeAddr = function() { return this.$val.UnsafeAddr(); };
+ Value.ptr.prototype.UnsafePointer = function() {
+ var {_1, _r, code, k, p, v, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ code = [code];
+ v = this;
+ k = new flag(v.flag).kind();
+ _1 = k;
+ /* */ if (_1 === (22)) { $s = 2; continue; }
+ /* */ if ((_1 === (18)) || (_1 === (21)) || (_1 === (26))) { $s = 3; continue; }
+ /* */ if (_1 === (19)) { $s = 4; continue; }
+ /* */ if (_1 === (23)) { $s = 5; continue; }
+ /* */ $s = 6; continue;
+ /* if (_1 === (22)) { */ case 2:
+ if (v.typ.ptrdata === 0) {
+ if (!verifyNotInHeapPtr((v.ptr).$get())) {
+ $panic(new $String("reflect: reflect.Value.UnsafePointer on an invalid notinheap pointer"));
+ }
+ $s = -1; return (v.ptr).$get();
+ }
+ $s = -1; return $clone(v, Value).pointer();
+ /* } else if ((_1 === (18)) || (_1 === (21)) || (_1 === (26))) { */ case 3:
+ $s = -1; return $clone(v, Value).pointer();
+ /* } else if (_1 === (19)) { */ case 4:
+ /* */ if (!((((v.flag & 512) >>> 0) === 0))) { $s = 7; continue; }
+ /* */ $s = 8; continue;
+ /* if (!((((v.flag & 512) >>> 0) === 0))) { */ case 7:
+ _r = methodValueCallCodePtr(); /* */ $s = 9; case 9: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ code[0] = _r;
+ $s = -1; return code[0];
+ /* } */ case 8:
+ p = $clone(v, Value).pointer();
+ if (!(p === 0)) {
+ p = (p).$get();
+ }
+ $s = -1; return p;
+ /* } else if (_1 === (23)) { */ case 5:
+ $s = -1; return ($pointerOfStructConversion(v.ptr, ptrType$8)).Data;
+ /* } */ case 6:
+ case 1:
+ $panic(new ValueError.ptr("reflect.Value.UnsafePointer", new flag(v.flag).kind()));
+ $s = -1; return 0;
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.UnsafePointer, $c: true, $r, _1, _r, code, k, p, v, $s};return $f;
+ };
+ Value.prototype.UnsafePointer = function() { return this.$val.UnsafePointer(); };
+ typesMustMatch = function(what, t1, t2) {
+ var {_r, _r$1, t1, t2, what, $s, $r, $c} = $restore(this, {what, t1, t2});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ /* */ if (!($interfaceIsEqual(t1, t2))) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (!($interfaceIsEqual(t1, t2))) { */ case 1:
+ _r = t1.String(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _r$1 = t2.String(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ $panic(new $String(what + ": " + _r + " != " + _r$1));
+ /* } */ case 2:
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: typesMustMatch, $c: true, $r, _r, _r$1, t1, t2, what, $s};return $f;
+ };
+ grow = function(s, extra) {
+ var {$24r, _q, _r, _r$1, _r$2, extra, i0, i1, m, s, t, $s, $r, $c} = $restore(this, {s, extra});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ i0 = $clone(s, Value).Len();
+ i1 = i0 + extra >> 0;
+ if (i1 < i0) {
+ $panic(new $String("reflect.Append: slice overflow"));
+ }
+ m = $clone(s, Value).Cap();
+ /* */ if (i1 <= m) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (i1 <= m) { */ case 1:
+ _r = $clone(s, Value).Slice(0, i1); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = [_r, i0, i1];
+ $s = 4; case 4: return $24r;
+ /* } */ case 2:
+ if (m === 0) {
+ m = extra;
+ } else {
+ while (true) {
+ if (!(m < i1)) { break; }
+ if (i0 < 256) {
+ m = m + (m) >> 0;
+ } else {
+ m = m + ((_q = ((m + 768 >> 0)) / 4, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))) >> 0;
+ }
+ }
+ }
+ _r$1 = MakeSlice($clone(s, Value).Type(), i1, m); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ t = _r$1;
+ _r$2 = Copy($clone(t, Value), $clone(s, Value)); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ _r$2;
+ $s = -1; return [t, i0, i1];
+ /* */ } return; } var $f = {$blk: grow, $c: true, $r, $24r, _q, _r, _r$1, _r$2, extra, i0, i1, m, s, t, $s};return $f;
+ };
+ Append = function(s, x) {
+ var {_r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, i, i0, i1, j, s, x, $s, $r, $c} = $restore(this, {s, x});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ new flag(s.flag).mustBe(23);
+ _r = grow($clone(s, Value), x.$length); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ s = _tuple[0];
+ i0 = _tuple[1];
+ i1 = _tuple[2];
+ _tmp = i0;
+ _tmp$1 = 0;
+ i = _tmp;
+ j = _tmp$1;
+ /* while (true) { */ case 2:
+ /* if (!(i < i1)) { break; } */ if(!(i < i1)) { $s = 3; continue; }
+ _r$1 = $clone(s, Value).Index(i); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ $r = $clone(_r$1, Value).Set($clone(((j < 0 || j >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + j]), Value)); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ _tmp$2 = i + 1 >> 0;
+ _tmp$3 = j + 1 >> 0;
+ i = _tmp$2;
+ j = _tmp$3;
+ $s = 2; continue;
+ case 3:
+ $s = -1; return s;
+ /* */ } return; } var $f = {$blk: Append, $c: true, $r, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, i, i0, i1, j, s, x, $s};return $f;
+ };
+ $pkg.Append = Append;
+ AppendSlice = function(s, t) {
+ var {_arg, _arg$1, _r, _r$1, _r$2, _r$3, _r$4, _tuple, i0, i1, s, t, $s, $r, $c} = $restore(this, {s, t});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ new flag(s.flag).mustBe(23);
+ new flag(t.flag).mustBe(23);
+ _r = $clone(s, Value).Type().Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _arg = _r;
+ _r$1 = $clone(t, Value).Type().Elem(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _arg$1 = _r$1;
+ $r = typesMustMatch("reflect.AppendSlice", _arg, _arg$1); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ _r$2 = grow($clone(s, Value), $clone(t, Value).Len()); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ _tuple = _r$2;
+ s = _tuple[0];
+ i0 = _tuple[1];
+ i1 = _tuple[2];
+ _r$3 = $clone(s, Value).Slice(i0, i1); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
+ _r$4 = Copy($clone(_r$3, Value), $clone(t, Value)); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
+ _r$4;
+ $s = -1; return s;
+ /* */ } return; } var $f = {$blk: AppendSlice, $c: true, $r, _arg, _arg$1, _r, _r$1, _r$2, _r$3, _r$4, _tuple, i0, i1, s, t, $s};return $f;
+ };
+ $pkg.AppendSlice = AppendSlice;
+ MakeMap = function(typ) {
+ var {$24r, _r, typ, $s, $r, $c} = $restore(this, {typ});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = MakeMapWithSize(typ, 0); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: MakeMap, $c: true, $r, $24r, _r, typ, $s};return $f;
+ };
+ $pkg.MakeMap = MakeMap;
+ MakeMapWithSize = function(typ, n) {
+ var {_r, m, n, t, typ, $s, $r, $c} = $restore(this, {typ, n});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = typ.Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ /* */ if (!((_r === 21))) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (!((_r === 21))) { */ case 1:
+ $panic(new $String("reflect.MakeMapWithSize of non-map type"));
+ /* } */ case 2:
+ t = $assertType(typ, ptrType$1);
+ m = makemap(t, n);
+ $s = -1; return new Value.ptr(t, m, 21);
+ /* */ } return; } var $f = {$blk: MakeMapWithSize, $c: true, $r, _r, m, n, t, typ, $s};return $f;
+ };
+ $pkg.MakeMapWithSize = MakeMapWithSize;
+ Value.ptr.prototype.Convert = function(t) {
+ var {$24r, _r, _r$1, _r$2, _r$3, _r$4, op, t, v, $s, $r, $c} = $restore(this, {t});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ /* */ if (!((((v.flag & 512) >>> 0) === 0))) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (!((((v.flag & 512) >>> 0) === 0))) { */ case 1:
+ _r = makeMethodValue("Convert", $clone(v, Value)); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ v = _r;
+ /* } */ case 2:
+ _r$1 = t.common(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _r$2 = convertOp(_r$1, v.typ); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ op = _r$2;
+ /* */ if (op === $throwNilPointerError) { $s = 6; continue; }
+ /* */ $s = 7; continue;
+ /* if (op === $throwNilPointerError) { */ case 6:
+ _r$3 = t.String(); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
+ $panic(new $String("reflect.Value.Convert: value of type " + v.typ.String() + " cannot be converted to type " + _r$3));
+ /* } */ case 7:
+ _r$4 = op($clone(v, Value), t); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
+ $24r = _r$4;
+ $s = 10; case 10: return $24r;
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.Convert, $c: true, $r, $24r, _r, _r$1, _r$2, _r$3, _r$4, op, t, v, $s};return $f;
+ };
+ Value.prototype.Convert = function(t) { return this.$val.Convert(t); };
+ Value.ptr.prototype.CanConvert = function(t) {
+ var {_r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _v, _v$1, n, t, v, vt, $s, $r, $c} = $restore(this, {t});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ vt = $clone(v, Value).Type();
+ _r = vt.ConvertibleTo(t); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ /* */ if (!_r) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (!_r) { */ case 1:
+ $s = -1; return false;
+ /* } */ case 2:
+ _r$1 = vt.Kind(); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ if (!(_r$1 === 23)) { _v$1 = false; $s = 7; continue s; }
+ _r$2 = t.Kind(); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ _v$1 = _r$2 === 22; case 7:
+ if (!(_v$1)) { _v = false; $s = 6; continue s; }
+ _r$3 = t.Elem(); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
+ _r$4 = _r$3.Kind(); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
+ _v = _r$4 === 17; case 6:
+ /* */ if (_v) { $s = 4; continue; }
+ /* */ $s = 5; continue;
+ /* if (_v) { */ case 4:
+ _r$5 = t.Elem(); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
+ _r$6 = _r$5.Len(); /* */ $s = 13; case 13: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; }
+ n = _r$6;
+ if (n > $clone(v, Value).Len()) {
+ $s = -1; return false;
+ }
+ /* } */ case 5:
+ $s = -1; return true;
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.CanConvert, $c: true, $r, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _v, _v$1, n, t, v, vt, $s};return $f;
+ };
+ Value.prototype.CanConvert = function(t) { return this.$val.CanConvert(t); };
+ convertOp = function(dst, src) {
+ var {_1, _2, _3, _4, _5, _6, _7, _arg, _arg$1, _r, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _v, _v$1, _v$2, _v$3, _v$4, _v$5, dst, src, $s, $r, $c} = $restore(this, {dst, src});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _1 = src.Kind();
+ /* */ if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { $s = 2; continue; }
+ /* */ if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { $s = 3; continue; }
+ /* */ if ((_1 === (13)) || (_1 === (14))) { $s = 4; continue; }
+ /* */ if ((_1 === (15)) || (_1 === (16))) { $s = 5; continue; }
+ /* */ if (_1 === (24)) { $s = 6; continue; }
+ /* */ if (_1 === (23)) { $s = 7; continue; }
+ /* */ if (_1 === (18)) { $s = 8; continue; }
+ /* */ $s = 9; continue;
+ /* if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { */ case 2:
+ _2 = dst.Kind();
+ if ((_2 === (2)) || (_2 === (3)) || (_2 === (4)) || (_2 === (5)) || (_2 === (6)) || (_2 === (7)) || (_2 === (8)) || (_2 === (9)) || (_2 === (10)) || (_2 === (11)) || (_2 === (12))) {
+ $s = -1; return cvtInt;
+ } else if ((_2 === (13)) || (_2 === (14))) {
+ $s = -1; return cvtIntFloat;
+ } else if (_2 === (24)) {
+ $s = -1; return cvtIntString;
+ }
+ $s = 9; continue;
+ /* } else if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { */ case 3:
+ _3 = dst.Kind();
+ if ((_3 === (2)) || (_3 === (3)) || (_3 === (4)) || (_3 === (5)) || (_3 === (6)) || (_3 === (7)) || (_3 === (8)) || (_3 === (9)) || (_3 === (10)) || (_3 === (11)) || (_3 === (12))) {
+ $s = -1; return cvtUint;
+ } else if ((_3 === (13)) || (_3 === (14))) {
+ $s = -1; return cvtUintFloat;
+ } else if (_3 === (24)) {
+ $s = -1; return cvtUintString;
+ }
+ $s = 9; continue;
+ /* } else if ((_1 === (13)) || (_1 === (14))) { */ case 4:
+ _4 = dst.Kind();
+ if ((_4 === (2)) || (_4 === (3)) || (_4 === (4)) || (_4 === (5)) || (_4 === (6))) {
+ $s = -1; return cvtFloatInt;
+ } else if ((_4 === (7)) || (_4 === (8)) || (_4 === (9)) || (_4 === (10)) || (_4 === (11)) || (_4 === (12))) {
+ $s = -1; return cvtFloatUint;
+ } else if ((_4 === (13)) || (_4 === (14))) {
+ $s = -1; return cvtFloat;
+ }
+ $s = 9; continue;
+ /* } else if ((_1 === (15)) || (_1 === (16))) { */ case 5:
+ _5 = dst.Kind();
+ if ((_5 === (15)) || (_5 === (16))) {
+ $s = -1; return cvtComplex;
+ }
+ $s = 9; continue;
+ /* } else if (_1 === (24)) { */ case 6:
+ if (!(dst.Kind() === 23)) { _v = false; $s = 12; continue s; }
+ _r = dst.Elem().PkgPath(); /* */ $s = 13; case 13: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _v = _r === ""; case 12:
+ /* */ if (_v) { $s = 10; continue; }
+ /* */ $s = 11; continue;
+ /* if (_v) { */ case 10:
+ _r$1 = dst.Elem().Kind(); /* */ $s = 15; case 15: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _6 = _r$1;
+ if (_6 === (8)) {
+ $s = -1; return cvtStringBytes;
+ } else if (_6 === (5)) {
+ $s = -1; return cvtStringRunes;
+ }
+ case 14:
+ /* } */ case 11:
+ $s = 9; continue;
+ /* } else if (_1 === (23)) { */ case 7:
+ if (!(dst.Kind() === 24)) { _v$1 = false; $s = 18; continue s; }
+ _r$2 = src.Elem().PkgPath(); /* */ $s = 19; case 19: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ _v$1 = _r$2 === ""; case 18:
+ /* */ if (_v$1) { $s = 16; continue; }
+ /* */ $s = 17; continue;
+ /* if (_v$1) { */ case 16:
+ _r$3 = src.Elem().Kind(); /* */ $s = 21; case 21: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
+ _7 = _r$3;
+ if (_7 === (8)) {
+ $s = -1; return cvtBytesString;
+ } else if (_7 === (5)) {
+ $s = -1; return cvtRunesString;
+ }
+ case 20:
+ /* } */ case 17:
+ if (!(dst.Kind() === 22)) { _v$3 = false; $s = 25; continue s; }
+ _r$4 = dst.Elem().Kind(); /* */ $s = 26; case 26: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
+ _v$3 = _r$4 === 17; case 25:
+ if (!(_v$3)) { _v$2 = false; $s = 24; continue s; }
+ _r$5 = dst.Elem().Elem(); /* */ $s = 27; case 27: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
+ _v$2 = $interfaceIsEqual(src.Elem(), _r$5); case 24:
+ /* */ if (_v$2) { $s = 22; continue; }
+ /* */ $s = 23; continue;
+ /* if (_v$2) { */ case 22:
+ $s = -1; return cvtSliceArrayPtr;
+ /* } */ case 23:
+ $s = 9; continue;
+ /* } else if (_1 === (18)) { */ case 8:
+ if (!(dst.Kind() === 18)) { _v$4 = false; $s = 30; continue s; }
+ _r$6 = specialChannelAssignability(dst, src); /* */ $s = 31; case 31: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; }
+ _v$4 = _r$6; case 30:
+ /* */ if (_v$4) { $s = 28; continue; }
+ /* */ $s = 29; continue;
+ /* if (_v$4) { */ case 28:
+ $s = -1; return cvtDirect;
+ /* } */ case 29:
+ /* } */ case 9:
+ case 1:
+ _r$7 = haveIdenticalUnderlyingType(dst, src, false); /* */ $s = 34; case 34: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; }
+ /* */ if (_r$7) { $s = 32; continue; }
+ /* */ $s = 33; continue;
+ /* if (_r$7) { */ case 32:
+ $s = -1; return cvtDirect;
+ /* } */ case 33:
+ if (!((dst.Kind() === 22) && dst.Name() === "" && (src.Kind() === 22) && src.Name() === "")) { _v$5 = false; $s = 37; continue s; }
+ _r$8 = dst.Elem().common(); /* */ $s = 38; case 38: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; }
+ _arg = _r$8;
+ _r$9 = src.Elem().common(); /* */ $s = 39; case 39: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; }
+ _arg$1 = _r$9;
+ _r$10 = haveIdenticalUnderlyingType(_arg, _arg$1, false); /* */ $s = 40; case 40: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; }
+ _v$5 = _r$10; case 37:
+ /* */ if (_v$5) { $s = 35; continue; }
+ /* */ $s = 36; continue;
+ /* if (_v$5) { */ case 35:
+ $s = -1; return cvtDirect;
+ /* } */ case 36:
+ if (implements$1(dst, src)) {
+ if (src.Kind() === 20) {
+ $s = -1; return cvtI2I;
+ }
+ $s = -1; return cvtT2I;
+ }
+ $s = -1; return $throwNilPointerError;
+ /* */ } return; } var $f = {$blk: convertOp, $c: true, $r, _1, _2, _3, _4, _5, _6, _7, _arg, _arg$1, _r, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _v, _v$1, _v$2, _v$3, _v$4, _v$5, dst, src, $s};return $f;
+ };
+ makeFloat = function(f, v, t) {
+ var {_1, _r, f, ptr, t, typ, v, $s, $r, $c} = $restore(this, {f, v, t});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = t.common(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ typ = _r;
+ ptr = unsafe_New(typ);
+ _1 = typ.size;
+ if (_1 === (4)) {
+ (ptr).$set(($fround(v)));
+ } else if (_1 === (8)) {
+ (ptr).$set(v);
+ }
+ $s = -1; return new Value.ptr(typ, ptr, (((f | 128) >>> 0) | ((typ.Kind() >>> 0))) >>> 0);
+ /* */ } return; } var $f = {$blk: makeFloat, $c: true, $r, _1, _r, f, ptr, t, typ, v, $s};return $f;
+ };
+ makeFloat32 = function(f, v, t) {
+ var {_r, f, ptr, t, typ, v, $s, $r, $c} = $restore(this, {f, v, t});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = t.common(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ typ = _r;
+ ptr = unsafe_New(typ);
+ (ptr).$set(v);
+ $s = -1; return new Value.ptr(typ, ptr, (((f | 128) >>> 0) | ((typ.Kind() >>> 0))) >>> 0);
+ /* */ } return; } var $f = {$blk: makeFloat32, $c: true, $r, _r, f, ptr, t, typ, v, $s};return $f;
+ };
+ makeComplex = function(f, v, t) {
+ var {_1, _r, f, ptr, t, typ, v, $s, $r, $c} = $restore(this, {f, v, t});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = t.common(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ typ = _r;
+ ptr = unsafe_New(typ);
+ _1 = typ.size;
+ if (_1 === (8)) {
+ (ptr).$set((new $Complex64(v.$real, v.$imag)));
+ } else if (_1 === (16)) {
+ (ptr).$set(v);
+ }
+ $s = -1; return new Value.ptr(typ, ptr, (((f | 128) >>> 0) | ((typ.Kind() >>> 0))) >>> 0);
+ /* */ } return; } var $f = {$blk: makeComplex, $c: true, $r, _1, _r, f, ptr, t, typ, v, $s};return $f;
+ };
+ makeString = function(f, v, t) {
+ var {_r, f, ret, t, v, $s, $r, $c} = $restore(this, {f, v, t});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = $clone(New(t), Value).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ ret = _r;
+ $clone(ret, Value).SetString(v);
+ ret.flag = (((ret.flag & ~256) >>> 0) | f) >>> 0;
+ $s = -1; return ret;
+ /* */ } return; } var $f = {$blk: makeString, $c: true, $r, _r, f, ret, t, v, $s};return $f;
+ };
+ makeBytes = function(f, v, t) {
+ var {_r, f, ret, t, v, $s, $r, $c} = $restore(this, {f, v, t});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = $clone(New(t), Value).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ ret = _r;
+ $r = $clone(ret, Value).SetBytes(v); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ ret.flag = (((ret.flag & ~256) >>> 0) | f) >>> 0;
+ $s = -1; return ret;
+ /* */ } return; } var $f = {$blk: makeBytes, $c: true, $r, _r, f, ret, t, v, $s};return $f;
+ };
+ makeRunes = function(f, v, t) {
+ var {_r, f, ret, t, v, $s, $r, $c} = $restore(this, {f, v, t});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = $clone(New(t), Value).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ ret = _r;
+ $r = $clone(ret, Value).setRunes(v); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ ret.flag = (((ret.flag & ~256) >>> 0) | f) >>> 0;
+ $s = -1; return ret;
+ /* */ } return; } var $f = {$blk: makeRunes, $c: true, $r, _r, f, ret, t, v, $s};return $f;
+ };
+ cvtInt = function(v, t) {
+ var {$24r, _r, t, v, x, $s, $r, $c} = $restore(this, {v, t});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = makeInt(new flag(v.flag).ro(), ((x = $clone(v, Value).Int(), new $Uint64(x.$high, x.$low))), t); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: cvtInt, $c: true, $r, $24r, _r, t, v, x, $s};return $f;
+ };
+ cvtUint = function(v, t) {
+ var {$24r, _r, t, v, $s, $r, $c} = $restore(this, {v, t});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = makeInt(new flag(v.flag).ro(), $clone(v, Value).Uint(), t); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: cvtUint, $c: true, $r, $24r, _r, t, v, $s};return $f;
+ };
+ cvtFloatInt = function(v, t) {
+ var {$24r, _r, t, v, x, $s, $r, $c} = $restore(this, {v, t});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = makeInt(new flag(v.flag).ro(), ((x = (new $Int64(0, $clone(v, Value).Float())), new $Uint64(x.$high, x.$low))), t); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: cvtFloatInt, $c: true, $r, $24r, _r, t, v, x, $s};return $f;
+ };
+ cvtFloatUint = function(v, t) {
+ var {$24r, _r, t, v, $s, $r, $c} = $restore(this, {v, t});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = makeInt(new flag(v.flag).ro(), (new $Uint64(0, $clone(v, Value).Float())), t); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: cvtFloatUint, $c: true, $r, $24r, _r, t, v, $s};return $f;
+ };
+ cvtIntFloat = function(v, t) {
+ var {$24r, _r, t, v, $s, $r, $c} = $restore(this, {v, t});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = makeFloat(new flag(v.flag).ro(), ($flatten64($clone(v, Value).Int())), t); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: cvtIntFloat, $c: true, $r, $24r, _r, t, v, $s};return $f;
+ };
+ cvtUintFloat = function(v, t) {
+ var {$24r, _r, t, v, $s, $r, $c} = $restore(this, {v, t});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = makeFloat(new flag(v.flag).ro(), ($flatten64($clone(v, Value).Uint())), t); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: cvtUintFloat, $c: true, $r, $24r, _r, t, v, $s};return $f;
+ };
+ cvtFloat = function(v, t) {
+ var {$24r, $24r$1, _r, _r$1, _r$2, _r$3, _v, t, v, $s, $r, $c} = $restore(this, {v, t});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = $clone(v, Value).Type().Kind(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ if (!(_r === 13)) { _v = false; $s = 3; continue s; }
+ _r$1 = t.Kind(); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _v = _r$1 === 13; case 3:
+ /* */ if (_v) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (_v) { */ case 1:
+ _r$2 = makeFloat32(new flag(v.flag).ro(), (v.ptr).$get(), t); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ $24r = _r$2;
+ $s = 7; case 7: return $24r;
+ /* } */ case 2:
+ _r$3 = makeFloat(new flag(v.flag).ro(), $clone(v, Value).Float(), t); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
+ $24r$1 = _r$3;
+ $s = 9; case 9: return $24r$1;
+ /* */ } return; } var $f = {$blk: cvtFloat, $c: true, $r, $24r, $24r$1, _r, _r$1, _r$2, _r$3, _v, t, v, $s};return $f;
+ };
+ cvtComplex = function(v, t) {
+ var {$24r, _r, t, v, $s, $r, $c} = $restore(this, {v, t});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = makeComplex(new flag(v.flag).ro(), $clone(v, Value).Complex(), t); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: cvtComplex, $c: true, $r, $24r, _r, t, v, $s};return $f;
+ };
+ cvtIntString = function(v, t) {
+ var {$24r, _r, s, t, v, x, x$1, $s, $r, $c} = $restore(this, {v, t});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ s = "\xEF\xBF\xBD";
+ x = $clone(v, Value).Int();
+ if ((x$1 = (new $Int64(0, (((x.$low + ((x.$high >> 31) * 4294967296)) >> 0)))), (x$1.$high === x.$high && x$1.$low === x.$low))) {
+ s = ($encodeRune((((x.$low + ((x.$high >> 31) * 4294967296)) >> 0))));
+ }
+ _r = makeString(new flag(v.flag).ro(), s, t); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: cvtIntString, $c: true, $r, $24r, _r, s, t, v, x, x$1, $s};return $f;
+ };
+ cvtUintString = function(v, t) {
+ var {$24r, _r, s, t, v, x, x$1, $s, $r, $c} = $restore(this, {v, t});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ s = "\xEF\xBF\xBD";
+ x = $clone(v, Value).Uint();
+ if ((x$1 = (new $Uint64(0, ((x.$low >> 0)))), (x$1.$high === x.$high && x$1.$low === x.$low))) {
+ s = ($encodeRune(((x.$low >> 0))));
+ }
+ _r = makeString(new flag(v.flag).ro(), s, t); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: cvtUintString, $c: true, $r, $24r, _r, s, t, v, x, x$1, $s};return $f;
+ };
+ cvtBytesString = function(v, t) {
+ var {$24r, _arg, _arg$1, _arg$2, _r, _r$1, t, v, $s, $r, $c} = $restore(this, {v, t});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _arg = new flag(v.flag).ro();
+ _r = $clone(v, Value).Bytes(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _arg$1 = ($bytesToString(_r));
+ _arg$2 = t;
+ _r$1 = makeString(_arg, _arg$1, _arg$2); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ $24r = _r$1;
+ $s = 3; case 3: return $24r;
+ /* */ } return; } var $f = {$blk: cvtBytesString, $c: true, $r, $24r, _arg, _arg$1, _arg$2, _r, _r$1, t, v, $s};return $f;
+ };
+ cvtStringBytes = function(v, t) {
+ var {$24r, _arg, _arg$1, _arg$2, _r, _r$1, t, v, $s, $r, $c} = $restore(this, {v, t});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _arg = new flag(v.flag).ro();
+ _r = $clone(v, Value).String(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _arg$1 = (new sliceType$9($stringToBytes(_r)));
+ _arg$2 = t;
+ _r$1 = makeBytes(_arg, _arg$1, _arg$2); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ $24r = _r$1;
+ $s = 3; case 3: return $24r;
+ /* */ } return; } var $f = {$blk: cvtStringBytes, $c: true, $r, $24r, _arg, _arg$1, _arg$2, _r, _r$1, t, v, $s};return $f;
+ };
+ cvtRunesString = function(v, t) {
+ var {$24r, _arg, _arg$1, _arg$2, _r, _r$1, t, v, $s, $r, $c} = $restore(this, {v, t});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _arg = new flag(v.flag).ro();
+ _r = $clone(v, Value).runes(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _arg$1 = ($runesToString(_r));
+ _arg$2 = t;
+ _r$1 = makeString(_arg, _arg$1, _arg$2); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ $24r = _r$1;
+ $s = 3; case 3: return $24r;
+ /* */ } return; } var $f = {$blk: cvtRunesString, $c: true, $r, $24r, _arg, _arg$1, _arg$2, _r, _r$1, t, v, $s};return $f;
+ };
+ cvtStringRunes = function(v, t) {
+ var {$24r, _arg, _arg$1, _arg$2, _r, _r$1, t, v, $s, $r, $c} = $restore(this, {v, t});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _arg = new flag(v.flag).ro();
+ _r = $clone(v, Value).String(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _arg$1 = (new sliceType$10($stringToRunes(_r)));
+ _arg$2 = t;
+ _r$1 = makeRunes(_arg, _arg$1, _arg$2); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ $24r = _r$1;
+ $s = 3; case 3: return $24r;
+ /* */ } return; } var $f = {$blk: cvtStringRunes, $c: true, $r, $24r, _arg, _arg$1, _arg$2, _r, _r$1, t, v, $s};return $f;
+ };
+ cvtT2I = function(v, typ) {
+ var {$24r, _r, _r$1, _r$2, _r$3, _r$4, target, typ, v, x, $s, $r, $c} = $restore(this, {v, typ});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = typ.common(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _r$1 = unsafe_New(_r); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ target = _r$1;
+ _r$2 = valueInterface($clone(v, Value), false); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ x = _r$2;
+ _r$3 = typ.NumMethod(); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
+ /* */ if (_r$3 === 0) { $s = 4; continue; }
+ /* */ $s = 5; continue;
+ /* if (_r$3 === 0) { */ case 4:
+ (target).$set(x);
+ $s = 6; continue;
+ /* } else { */ case 5:
+ ifaceE2I($assertType(typ, ptrType$1), x, target);
+ /* } */ case 6:
+ _r$4 = typ.common(); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
+ $24r = new Value.ptr(_r$4, target, (((new flag(v.flag).ro() | 128) >>> 0) | 20) >>> 0);
+ $s = 9; case 9: return $24r;
+ /* */ } return; } var $f = {$blk: cvtT2I, $c: true, $r, $24r, _r, _r$1, _r$2, _r$3, _r$4, target, typ, v, x, $s};return $f;
+ };
+ cvtI2I = function(v, typ) {
+ var {$24r, _r, _r$1, _r$2, ret, typ, v, $s, $r, $c} = $restore(this, {v, typ});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ /* */ if ($clone(v, Value).IsNil()) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if ($clone(v, Value).IsNil()) { */ case 1:
+ _r = Zero(typ); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ ret = _r;
+ ret.flag = (ret.flag | (new flag(v.flag).ro())) >>> 0;
+ $s = -1; return ret;
+ /* } */ case 2:
+ _r$1 = $clone(v, Value).Elem(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _r$2 = cvtT2I($clone(_r$1, Value), typ); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ $24r = _r$2;
+ $s = 6; case 6: return $24r;
+ /* */ } return; } var $f = {$blk: cvtI2I, $c: true, $r, $24r, _r, _r$1, _r$2, ret, typ, v, $s};return $f;
+ };
+ structField.ptr.prototype.offset = function() {
+ var f;
+ f = this;
+ return f.offsetEmbed >>> 1 >>> 0;
+ };
+ structField.prototype.offset = function() { return this.$val.offset(); };
+ structField.ptr.prototype.embedded = function() {
+ var f;
+ f = this;
+ return !((((f.offsetEmbed & 1) >>> 0) === 0));
+ };
+ structField.prototype.embedded = function() { return this.$val.embedded(); };
+ Method.ptr.prototype.IsExported = function() {
+ var m;
+ m = this;
+ return m.PkgPath === "";
+ };
+ Method.prototype.IsExported = function() { return this.$val.IsExported(); };
+ Kind.prototype.String = function() {
+ var k;
+ k = this.$val;
+ if (((k >> 0)) < kindNames.$length) {
+ return ((k < 0 || k >= kindNames.$length) ? ($throwRuntimeError("index out of range"), undefined) : kindNames.$array[kindNames.$offset + k]);
+ }
+ return "kind" + strconv.Itoa(((k >> 0)));
+ };
+ $ptrType(Kind).prototype.String = function() { return new Kind(this.$get()).String(); };
+ rtype.ptr.prototype.String = function() {
+ var s, t;
+ t = this;
+ s = $clone(t.nameOff(t.str), name).name();
+ if (!((((t.tflag & 2) >>> 0) === 0))) {
+ return $substring(s, 1);
+ }
+ return s;
+ };
+ rtype.prototype.String = function() { return this.$val.String(); };
+ rtype.ptr.prototype.Size = function() {
+ var t;
+ t = this;
+ return t.size;
+ };
+ rtype.prototype.Size = function() { return this.$val.Size(); };
+ rtype.ptr.prototype.Bits = function() {
+ var k, t;
+ t = this;
+ if (t === ptrType$1.nil) {
+ $panic(new $String("reflect: Bits of nil Type"));
+ }
+ k = t.Kind();
+ if (k < 2 || k > 16) {
+ $panic(new $String("reflect: Bits of non-arithmetic Type " + t.String()));
+ }
+ return $imul(((t.size >> 0)), 8);
+ };
+ rtype.prototype.Bits = function() { return this.$val.Bits(); };
+ rtype.ptr.prototype.Align = function() {
+ var t;
+ t = this;
+ return ((t.align >> 0));
+ };
+ rtype.prototype.Align = function() { return this.$val.Align(); };
+ rtype.ptr.prototype.FieldAlign = function() {
+ var t;
+ t = this;
+ return ((t.fieldAlign >> 0));
+ };
+ rtype.prototype.FieldAlign = function() { return this.$val.FieldAlign(); };
+ rtype.ptr.prototype.Kind = function() {
+ var t;
+ t = this;
+ return ((((t.kind & 31) >>> 0) >>> 0));
+ };
+ rtype.prototype.Kind = function() { return this.$val.Kind(); };
+ rtype.ptr.prototype.common = function() {
+ var t;
+ t = this;
+ return t;
+ };
+ rtype.prototype.common = function() { return this.$val.common(); };
+ rtype.ptr.prototype.exportedMethods = function() {
+ var t, ut;
+ t = this;
+ ut = t.uncommon();
+ if (ut === ptrType$9.nil) {
+ return sliceType$11.nil;
+ }
+ return ut.exportedMethods();
+ };
+ rtype.prototype.exportedMethods = function() { return this.$val.exportedMethods(); };
+ rtype.ptr.prototype.NumMethod = function() {
+ var t, tt;
+ t = this;
+ if (t.Kind() === 20) {
+ tt = (t.kindType);
+ return tt.NumMethod();
+ }
+ return t.exportedMethods().$length;
+ };
+ rtype.prototype.NumMethod = function() { return this.$val.NumMethod(); };
+ rtype.ptr.prototype.MethodByName = function(name$1) {
+ var {$24r, _i, _r, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, i, m, name$1, ok, p, t, tt, ut, $s, $r, $c} = $restore(this, {name$1});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ m = new Method.ptr("", "", $ifaceNil, new Value.ptr(ptrType$1.nil, 0, 0), 0);
+ ok = false;
+ t = this;
+ if (t.Kind() === 20) {
+ tt = (t.kindType);
+ _tuple = tt.MethodByName(name$1);
+ Method.copy(m, _tuple[0]);
+ ok = _tuple[1];
+ $s = -1; return [m, ok];
+ }
+ ut = t.uncommon();
+ if (ut === ptrType$9.nil) {
+ _tmp = new Method.ptr("", "", $ifaceNil, new Value.ptr(ptrType$1.nil, 0, 0), 0);
+ _tmp$1 = false;
+ Method.copy(m, _tmp);
+ ok = _tmp$1;
+ $s = -1; return [m, ok];
+ }
+ _ref = ut.exportedMethods();
+ _i = 0;
+ /* while (true) { */ case 1:
+ /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; }
+ i = _i;
+ p = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), method);
+ /* */ if ($clone(t.nameOff(p.name), name).name() === name$1) { $s = 3; continue; }
+ /* */ $s = 4; continue;
+ /* if ($clone(t.nameOff(p.name), name).name() === name$1) { */ case 3:
+ _r = t.Method(i); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tmp$2 = $clone(_r, Method);
+ _tmp$3 = true;
+ Method.copy(m, _tmp$2);
+ ok = _tmp$3;
+ $24r = [m, ok];
+ $s = 6; case 6: return $24r;
+ /* } */ case 4:
+ _i++;
+ $s = 1; continue;
+ case 2:
+ _tmp$4 = new Method.ptr("", "", $ifaceNil, new Value.ptr(ptrType$1.nil, 0, 0), 0);
+ _tmp$5 = false;
+ Method.copy(m, _tmp$4);
+ ok = _tmp$5;
+ $s = -1; return [m, ok];
+ /* */ } return; } var $f = {$blk: rtype.ptr.prototype.MethodByName, $c: true, $r, $24r, _i, _r, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, i, m, name$1, ok, p, t, tt, ut, $s};return $f;
+ };
+ rtype.prototype.MethodByName = function(name$1) { return this.$val.MethodByName(name$1); };
+ rtype.ptr.prototype.PkgPath = function() {
+ var t, ut;
+ t = this;
+ if (((t.tflag & 4) >>> 0) === 0) {
+ return "";
+ }
+ ut = t.uncommon();
+ if (ut === ptrType$9.nil) {
+ return "";
+ }
+ return $clone(t.nameOff(ut.pkgPath), name).name();
+ };
+ rtype.prototype.PkgPath = function() { return this.$val.PkgPath(); };
+ rtype.ptr.prototype.hasName = function() {
+ var t;
+ t = this;
+ return !((((t.tflag & 4) >>> 0) === 0));
+ };
+ rtype.prototype.hasName = function() { return this.$val.hasName(); };
+ rtype.ptr.prototype.Name = function() {
+ var _1, i, s, sqBrackets, t;
+ t = this;
+ if (!t.hasName()) {
+ return "";
+ }
+ s = t.String();
+ i = s.length - 1 >> 0;
+ sqBrackets = 0;
+ while (true) {
+ if (!(i >= 0 && (!((s.charCodeAt(i) === 46)) || !((sqBrackets === 0))))) { break; }
+ _1 = s.charCodeAt(i);
+ if (_1 === (93)) {
+ sqBrackets = sqBrackets + (1) >> 0;
+ } else if (_1 === (91)) {
+ sqBrackets = sqBrackets - (1) >> 0;
+ }
+ i = i - (1) >> 0;
+ }
+ return $substring(s, (i + 1 >> 0));
+ };
+ rtype.prototype.Name = function() { return this.$val.Name(); };
+ rtype.ptr.prototype.ChanDir = function() {
+ var t, tt;
+ t = this;
+ if (!((t.Kind() === 18))) {
+ $panic(new $String("reflect: ChanDir of non-chan type " + t.String()));
+ }
+ tt = (t.kindType);
+ return ((tt.dir >> 0));
+ };
+ rtype.prototype.ChanDir = function() { return this.$val.ChanDir(); };
+ rtype.ptr.prototype.IsVariadic = function() {
+ var t, tt;
+ t = this;
+ if (!((t.Kind() === 19))) {
+ $panic(new $String("reflect: IsVariadic of non-func type " + t.String()));
+ }
+ tt = (t.kindType);
+ return !((((tt.outCount & 32768) >>> 0) === 0));
+ };
+ rtype.prototype.IsVariadic = function() { return this.$val.IsVariadic(); };
+ rtype.ptr.prototype.Elem = function() {
+ var _1, t, tt, tt$1, tt$2, tt$3, tt$4;
+ t = this;
+ _1 = t.Kind();
+ if (_1 === (17)) {
+ tt = (t.kindType);
+ return toType(tt.elem);
+ } else if (_1 === (18)) {
+ tt$1 = (t.kindType);
+ return toType(tt$1.elem);
+ } else if (_1 === (21)) {
+ tt$2 = (t.kindType);
+ return toType(tt$2.elem);
+ } else if (_1 === (22)) {
+ tt$3 = (t.kindType);
+ return toType(tt$3.elem);
+ } else if (_1 === (23)) {
+ tt$4 = (t.kindType);
+ return toType(tt$4.elem);
+ }
+ $panic(new $String("reflect: Elem of invalid type " + t.String()));
+ };
+ rtype.prototype.Elem = function() { return this.$val.Elem(); };
+ rtype.ptr.prototype.Field = function(i) {
+ var i, t, tt;
+ t = this;
+ if (!((t.Kind() === 25))) {
+ $panic(new $String("reflect: Field of non-struct type " + t.String()));
+ }
+ tt = (t.kindType);
+ return tt.Field(i);
+ };
+ rtype.prototype.Field = function(i) { return this.$val.Field(i); };
+ rtype.ptr.prototype.FieldByIndex = function(index) {
+ var {$24r, _r, index, t, tt, $s, $r, $c} = $restore(this, {index});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ t = this;
+ if (!((t.Kind() === 25))) {
+ $panic(new $String("reflect: FieldByIndex of non-struct type " + t.String()));
+ }
+ tt = (t.kindType);
+ _r = tt.FieldByIndex(index); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: rtype.ptr.prototype.FieldByIndex, $c: true, $r, $24r, _r, index, t, tt, $s};return $f;
+ };
+ rtype.prototype.FieldByIndex = function(index) { return this.$val.FieldByIndex(index); };
+ rtype.ptr.prototype.FieldByName = function(name$1) {
+ var {$24r, _r, name$1, t, tt, $s, $r, $c} = $restore(this, {name$1});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ t = this;
+ if (!((t.Kind() === 25))) {
+ $panic(new $String("reflect: FieldByName of non-struct type " + t.String()));
+ }
+ tt = (t.kindType);
+ _r = tt.FieldByName(name$1); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: rtype.ptr.prototype.FieldByName, $c: true, $r, $24r, _r, name$1, t, tt, $s};return $f;
+ };
+ rtype.prototype.FieldByName = function(name$1) { return this.$val.FieldByName(name$1); };
+ rtype.ptr.prototype.FieldByNameFunc = function(match) {
+ var {$24r, _r, match, t, tt, $s, $r, $c} = $restore(this, {match});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ t = this;
+ if (!((t.Kind() === 25))) {
+ $panic(new $String("reflect: FieldByNameFunc of non-struct type " + t.String()));
+ }
+ tt = (t.kindType);
+ _r = tt.FieldByNameFunc(match); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: rtype.ptr.prototype.FieldByNameFunc, $c: true, $r, $24r, _r, match, t, tt, $s};return $f;
+ };
+ rtype.prototype.FieldByNameFunc = function(match) { return this.$val.FieldByNameFunc(match); };
+ rtype.ptr.prototype.In = function(i) {
+ var i, t, tt, x;
+ t = this;
+ if (!((t.Kind() === 19))) {
+ $panic(new $String("reflect: In of non-func type " + t.String()));
+ }
+ tt = (t.kindType);
+ return toType((x = tt.in$(), ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])));
+ };
+ rtype.prototype.In = function(i) { return this.$val.In(i); };
+ rtype.ptr.prototype.Key = function() {
+ var t, tt;
+ t = this;
+ if (!((t.Kind() === 21))) {
+ $panic(new $String("reflect: Key of non-map type " + t.String()));
+ }
+ tt = (t.kindType);
+ return toType(tt.key);
+ };
+ rtype.prototype.Key = function() { return this.$val.Key(); };
+ rtype.ptr.prototype.Len = function() {
+ var t, tt;
+ t = this;
+ if (!((t.Kind() === 17))) {
+ $panic(new $String("reflect: Len of non-array type " + t.String()));
+ }
+ tt = (t.kindType);
+ return ((tt.len >> 0));
+ };
+ rtype.prototype.Len = function() { return this.$val.Len(); };
+ rtype.ptr.prototype.NumField = function() {
+ var t, tt;
+ t = this;
+ if (!((t.Kind() === 25))) {
+ $panic(new $String("reflect: NumField of non-struct type " + t.String()));
+ }
+ tt = (t.kindType);
+ return tt.fields.$length;
+ };
+ rtype.prototype.NumField = function() { return this.$val.NumField(); };
+ rtype.ptr.prototype.NumIn = function() {
+ var t, tt;
+ t = this;
+ if (!((t.Kind() === 19))) {
+ $panic(new $String("reflect: NumIn of non-func type " + t.String()));
+ }
+ tt = (t.kindType);
+ return ((tt.inCount >> 0));
+ };
+ rtype.prototype.NumIn = function() { return this.$val.NumIn(); };
+ rtype.ptr.prototype.NumOut = function() {
+ var t, tt;
+ t = this;
+ if (!((t.Kind() === 19))) {
+ $panic(new $String("reflect: NumOut of non-func type " + t.String()));
+ }
+ tt = (t.kindType);
+ return tt.out().$length;
+ };
+ rtype.prototype.NumOut = function() { return this.$val.NumOut(); };
+ rtype.ptr.prototype.Out = function(i) {
+ var i, t, tt, x;
+ t = this;
+ if (!((t.Kind() === 19))) {
+ $panic(new $String("reflect: Out of non-func type " + t.String()));
+ }
+ tt = (t.kindType);
+ return toType((x = tt.out(), ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])));
+ };
+ rtype.prototype.Out = function(i) { return this.$val.Out(i); };
+ ChanDir.prototype.String = function() {
+ var _1, d;
+ d = this.$val;
+ _1 = d;
+ if (_1 === (2)) {
+ return "chan<-";
+ } else if (_1 === (1)) {
+ return "<-chan";
+ } else if (_1 === (3)) {
+ return "chan";
+ }
+ return "ChanDir" + strconv.Itoa(((d >> 0)));
+ };
+ $ptrType(ChanDir).prototype.String = function() { return new ChanDir(this.$get()).String(); };
+ interfaceType.ptr.prototype.Method = function(i) {
+ var i, m, p, pname, t, x;
+ m = new Method.ptr("", "", $ifaceNil, new Value.ptr(ptrType$1.nil, 0, 0), 0);
+ t = this;
+ if (i < 0 || i >= t.methods.$length) {
+ return m;
+ }
+ p = (x = t.methods, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]));
+ pname = $clone(t.rtype.nameOff(p.name), name);
+ m.Name = $clone(pname, name).name();
+ if (!$clone(pname, name).isExported()) {
+ m.PkgPath = $clone(pname, name).pkgPath();
+ if (m.PkgPath === "") {
+ m.PkgPath = $clone(t.pkgPath, name).name();
+ }
+ }
+ m.Type = toType(t.rtype.typeOff(p.typ));
+ m.Index = i;
+ return m;
+ };
+ interfaceType.prototype.Method = function(i) { return this.$val.Method(i); };
+ interfaceType.ptr.prototype.NumMethod = function() {
+ var t;
+ t = this;
+ return t.methods.$length;
+ };
+ interfaceType.prototype.NumMethod = function() { return this.$val.NumMethod(); };
+ interfaceType.ptr.prototype.MethodByName = function(name$1) {
+ var _i, _ref, _tmp, _tmp$1, i, m, name$1, ok, p, t, x;
+ m = new Method.ptr("", "", $ifaceNil, new Value.ptr(ptrType$1.nil, 0, 0), 0);
+ ok = false;
+ t = this;
+ if (t === ptrType$10.nil) {
+ return [m, ok];
+ }
+ p = ptrType$11.nil;
+ _ref = t.methods;
+ _i = 0;
+ while (true) {
+ if (!(_i < _ref.$length)) { break; }
+ i = _i;
+ p = (x = t.methods, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]));
+ if ($clone(t.rtype.nameOff(p.name), name).name() === name$1) {
+ _tmp = $clone(t.Method(i), Method);
+ _tmp$1 = true;
+ Method.copy(m, _tmp);
+ ok = _tmp$1;
+ return [m, ok];
+ }
+ _i++;
+ }
+ return [m, ok];
+ };
+ interfaceType.prototype.MethodByName = function(name$1) { return this.$val.MethodByName(name$1); };
+ StructField.ptr.prototype.IsExported = function() {
+ var f;
+ f = this;
+ return f.PkgPath === "";
+ };
+ StructField.prototype.IsExported = function() { return this.$val.IsExported(); };
+ StructTag.prototype.Get = function(key) {
+ var _tuple, key, tag, v;
+ tag = this.$val;
+ _tuple = new StructTag(tag).Lookup(key);
+ v = _tuple[0];
+ return v;
+ };
+ $ptrType(StructTag).prototype.Get = function(key) { return new StructTag(this.$get()).Get(key); };
+ StructTag.prototype.Lookup = function(key) {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, err, i, key, name$1, ok, qvalue, tag, value, value$1;
+ value = "";
+ ok = false;
+ tag = this.$val;
+ while (true) {
+ if (!(!(tag === ""))) { break; }
+ i = 0;
+ while (true) {
+ if (!(i < tag.length && (tag.charCodeAt(i) === 32))) { break; }
+ i = i + (1) >> 0;
+ }
+ tag = $substring(tag, i);
+ if (tag === "") {
+ break;
+ }
+ i = 0;
+ while (true) {
+ if (!(i < tag.length && tag.charCodeAt(i) > 32 && !((tag.charCodeAt(i) === 58)) && !((tag.charCodeAt(i) === 34)) && !((tag.charCodeAt(i) === 127)))) { break; }
+ i = i + (1) >> 0;
+ }
+ if ((i === 0) || (i + 1 >> 0) >= tag.length || !((tag.charCodeAt(i) === 58)) || !((tag.charCodeAt((i + 1 >> 0)) === 34))) {
+ break;
+ }
+ name$1 = ($substring(tag, 0, i));
+ tag = $substring(tag, (i + 1 >> 0));
+ i = 1;
+ while (true) {
+ if (!(i < tag.length && !((tag.charCodeAt(i) === 34)))) { break; }
+ if (tag.charCodeAt(i) === 92) {
+ i = i + (1) >> 0;
+ }
+ i = i + (1) >> 0;
+ }
+ if (i >= tag.length) {
+ break;
+ }
+ qvalue = ($substring(tag, 0, (i + 1 >> 0)));
+ tag = $substring(tag, (i + 1 >> 0));
+ if (key === name$1) {
+ _tuple = strconv.Unquote(qvalue);
+ value$1 = _tuple[0];
+ err = _tuple[1];
+ if (!($interfaceIsEqual(err, $ifaceNil))) {
+ break;
+ }
+ _tmp = value$1;
+ _tmp$1 = true;
+ value = _tmp;
+ ok = _tmp$1;
+ return [value, ok];
+ }
+ }
+ _tmp$2 = "";
+ _tmp$3 = false;
+ value = _tmp$2;
+ ok = _tmp$3;
+ return [value, ok];
+ };
+ $ptrType(StructTag).prototype.Lookup = function(key) { return new StructTag(this.$get()).Lookup(key); };
+ structType.ptr.prototype.Field = function(i) {
+ var f, i, p, t, tag, x;
+ f = new StructField.ptr("", "", $ifaceNil, "", 0, sliceType$6.nil, false);
+ t = this;
+ if (i < 0 || i >= t.fields.$length) {
+ $panic(new $String("reflect: Field index out of bounds"));
+ }
+ p = (x = t.fields, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]));
+ f.Type = toType(p.typ);
+ f.Name = $clone(p.name, name).name();
+ f.Anonymous = p.embedded();
+ if (!$clone(p.name, name).isExported()) {
+ f.PkgPath = $clone(t.pkgPath, name).name();
+ }
+ tag = $clone(p.name, name).tag();
+ if (!(tag === "")) {
+ f.Tag = (tag);
+ }
+ f.Offset = p.offset();
+ f.Index = new sliceType$6([i]);
+ return f;
+ };
+ structType.prototype.Field = function(i) { return this.$val.Field(i); };
+ structType.ptr.prototype.FieldByIndex = function(index) {
+ var {_i, _r, _r$1, _r$2, _r$3, _r$4, _ref, _v, f, ft, i, index, t, x, $s, $r, $c} = $restore(this, {index});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ f = new StructField.ptr("", "", $ifaceNil, "", 0, sliceType$6.nil, false);
+ t = this;
+ f.Type = toType(t.rtype);
+ _ref = index;
+ _i = 0;
+ /* while (true) { */ case 1:
+ /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; }
+ i = _i;
+ x = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]);
+ /* */ if (i > 0) { $s = 3; continue; }
+ /* */ $s = 4; continue;
+ /* if (i > 0) { */ case 3:
+ ft = f.Type;
+ _r = ft.Kind(); /* */ $s = 8; case 8: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ if (!(_r === 22)) { _v = false; $s = 7; continue s; }
+ _r$1 = ft.Elem(); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _r$2 = _r$1.Kind(); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ _v = _r$2 === 25; case 7:
+ /* */ if (_v) { $s = 5; continue; }
+ /* */ $s = 6; continue;
+ /* if (_v) { */ case 5:
+ _r$3 = ft.Elem(); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
+ ft = _r$3;
+ /* } */ case 6:
+ f.Type = ft;
+ /* } */ case 4:
+ _r$4 = f.Type.Field(x); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
+ StructField.copy(f, _r$4);
+ _i++;
+ $s = 1; continue;
+ case 2:
+ $s = -1; return f;
+ /* */ } return; } var $f = {$blk: structType.ptr.prototype.FieldByIndex, $c: true, $r, _i, _r, _r$1, _r$2, _r$3, _r$4, _ref, _v, f, ft, i, index, t, x, $s};return $f;
+ };
+ structType.prototype.FieldByIndex = function(index) { return this.$val.FieldByIndex(index); };
+ structType.ptr.prototype.FieldByNameFunc = function(match) {
+ var {_entry, _entry$1, _entry$2, _entry$3, _i, _i$1, _key, _key$1, _key$2, _key$3, _r, _r$1, _ref, _ref$1, _tmp, _tmp$1, _tmp$2, _tmp$3, count, current, f, fname, i, index, match, next, nextCount, ntyp, ok, result, scan, styp, t, t$1, visited, x, $s, $r, $c} = $restore(this, {match});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ result = new StructField.ptr("", "", $ifaceNil, "", 0, sliceType$6.nil, false);
+ ok = false;
+ t = this;
+ current = new sliceType$12([]);
+ next = new sliceType$12([new fieldScan.ptr(t, sliceType$6.nil)]);
+ nextCount = false;
+ visited = $makeMap(ptrType$12.keyFor, []);
+ /* while (true) { */ case 1:
+ /* if (!(next.$length > 0)) { break; } */ if(!(next.$length > 0)) { $s = 2; continue; }
+ _tmp = next;
+ _tmp$1 = $subslice(current, 0, 0);
+ current = _tmp;
+ next = _tmp$1;
+ count = nextCount;
+ nextCount = false;
+ _ref = current;
+ _i = 0;
+ /* while (true) { */ case 3:
+ /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 4; continue; }
+ scan = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), fieldScan);
+ t$1 = scan.typ;
+ if ((_entry = visited[ptrType$12.keyFor(t$1)], _entry !== undefined ? _entry.v : false)) {
+ _i++;
+ /* continue; */ $s = 3; continue;
+ }
+ _key = t$1; (visited || $throwRuntimeError("assignment to entry in nil map"))[ptrType$12.keyFor(_key)] = { k: _key, v: true };
+ _ref$1 = t$1.fields;
+ _i$1 = 0;
+ /* while (true) { */ case 5:
+ /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 6; continue; }
+ i = _i$1;
+ f = (x = t$1.fields, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]));
+ fname = $clone(f.name, name).name();
+ ntyp = ptrType$1.nil;
+ /* */ if (f.embedded()) { $s = 7; continue; }
+ /* */ $s = 8; continue;
+ /* if (f.embedded()) { */ case 7:
+ ntyp = f.typ;
+ /* */ if (ntyp.Kind() === 22) { $s = 9; continue; }
+ /* */ $s = 10; continue;
+ /* if (ntyp.Kind() === 22) { */ case 9:
+ _r = ntyp.Elem().common(); /* */ $s = 11; case 11: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ ntyp = _r;
+ /* } */ case 10:
+ /* } */ case 8:
+ _r$1 = match(fname); /* */ $s = 14; case 14: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ /* */ if (_r$1) { $s = 12; continue; }
+ /* */ $s = 13; continue;
+ /* if (_r$1) { */ case 12:
+ if ((_entry$1 = count[ptrType$12.keyFor(t$1)], _entry$1 !== undefined ? _entry$1.v : 0) > 1 || ok) {
+ _tmp$2 = new StructField.ptr("", "", $ifaceNil, "", 0, sliceType$6.nil, false);
+ _tmp$3 = false;
+ StructField.copy(result, _tmp$2);
+ ok = _tmp$3;
+ $s = -1; return [result, ok];
+ }
+ StructField.copy(result, t$1.Field(i));
+ result.Index = sliceType$6.nil;
+ result.Index = $appendSlice(result.Index, scan.index);
+ result.Index = $append(result.Index, i);
+ ok = true;
+ _i$1++;
+ /* continue; */ $s = 5; continue;
+ /* } */ case 13:
+ if (ok || ntyp === ptrType$1.nil || !((ntyp.Kind() === 25))) {
+ _i$1++;
+ /* continue; */ $s = 5; continue;
+ }
+ styp = (ntyp.kindType);
+ if ((_entry$2 = nextCount[ptrType$12.keyFor(styp)], _entry$2 !== undefined ? _entry$2.v : 0) > 0) {
+ _key$1 = styp; (nextCount || $throwRuntimeError("assignment to entry in nil map"))[ptrType$12.keyFor(_key$1)] = { k: _key$1, v: 2 };
+ _i$1++;
+ /* continue; */ $s = 5; continue;
+ }
+ if (nextCount === false) {
+ nextCount = $makeMap(ptrType$12.keyFor, []);
+ }
+ _key$2 = styp; (nextCount || $throwRuntimeError("assignment to entry in nil map"))[ptrType$12.keyFor(_key$2)] = { k: _key$2, v: 1 };
+ if ((_entry$3 = count[ptrType$12.keyFor(t$1)], _entry$3 !== undefined ? _entry$3.v : 0) > 1) {
+ _key$3 = styp; (nextCount || $throwRuntimeError("assignment to entry in nil map"))[ptrType$12.keyFor(_key$3)] = { k: _key$3, v: 2 };
+ }
+ index = sliceType$6.nil;
+ index = $appendSlice(index, scan.index);
+ index = $append(index, i);
+ next = $append(next, new fieldScan.ptr(styp, index));
+ _i$1++;
+ $s = 5; continue;
+ case 6:
+ _i++;
+ $s = 3; continue;
+ case 4:
+ if (ok) {
+ /* break; */ $s = 2; continue;
+ }
+ $s = 1; continue;
+ case 2:
+ $s = -1; return [result, ok];
+ /* */ } return; } var $f = {$blk: structType.ptr.prototype.FieldByNameFunc, $c: true, $r, _entry, _entry$1, _entry$2, _entry$3, _i, _i$1, _key, _key$1, _key$2, _key$3, _r, _r$1, _ref, _ref$1, _tmp, _tmp$1, _tmp$2, _tmp$3, count, current, f, fname, i, index, match, next, nextCount, ntyp, ok, result, scan, styp, t, t$1, visited, x, $s};return $f;
+ };
+ structType.prototype.FieldByNameFunc = function(match) { return this.$val.FieldByNameFunc(match); };
+ structType.ptr.prototype.FieldByName = function(name$1) {
+ var {$24r, _i, _r, _ref, _tmp, _tmp$1, _tuple, f, hasEmbeds, i, name$1, present, t, tf, x, $s, $r, $c} = $restore(this, {name$1});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ name$1 = [name$1];
+ f = new StructField.ptr("", "", $ifaceNil, "", 0, sliceType$6.nil, false);
+ present = false;
+ t = this;
+ hasEmbeds = false;
+ if (!(name$1[0] === "")) {
+ _ref = t.fields;
+ _i = 0;
+ while (true) {
+ if (!(_i < _ref.$length)) { break; }
+ i = _i;
+ tf = (x = t.fields, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]));
+ if ($clone(tf.name, name).name() === name$1[0]) {
+ _tmp = $clone(t.Field(i), StructField);
+ _tmp$1 = true;
+ StructField.copy(f, _tmp);
+ present = _tmp$1;
+ $s = -1; return [f, present];
+ }
+ if (tf.embedded()) {
+ hasEmbeds = true;
+ }
+ _i++;
+ }
+ }
+ if (!hasEmbeds) {
+ $s = -1; return [f, present];
+ }
+ _r = t.FieldByNameFunc((function(name$1) { return function(s) {
+ var s;
+ return s === name$1[0];
+ }; })(name$1)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ StructField.copy(f, _tuple[0]);
+ present = _tuple[1];
+ $24r = [f, present];
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: structType.ptr.prototype.FieldByName, $c: true, $r, $24r, _i, _r, _ref, _tmp, _tmp$1, _tuple, f, hasEmbeds, i, name$1, present, t, tf, x, $s};return $f;
+ };
+ structType.prototype.FieldByName = function(name$1) { return this.$val.FieldByName(name$1); };
+ PtrTo = function(t) {
+ var t;
+ return PointerTo(t);
+ };
+ $pkg.PtrTo = PtrTo;
+ PointerTo = function(t) {
+ var t;
+ return $assertType(t, ptrType$1).ptrTo();
+ };
+ $pkg.PointerTo = PointerTo;
+ rtype.ptr.prototype.Implements = function(u) {
+ var {_r, t, u, $s, $r, $c} = $restore(this, {u});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ t = this;
+ if ($interfaceIsEqual(u, $ifaceNil)) {
+ $panic(new $String("reflect: nil type passed to Type.Implements"));
+ }
+ _r = u.Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ /* */ if (!((_r === 20))) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (!((_r === 20))) { */ case 1:
+ $panic(new $String("reflect: non-interface type passed to Type.Implements"));
+ /* } */ case 2:
+ $s = -1; return implements$1($assertType(u, ptrType$1), t);
+ /* */ } return; } var $f = {$blk: rtype.ptr.prototype.Implements, $c: true, $r, _r, t, u, $s};return $f;
+ };
+ rtype.prototype.Implements = function(u) { return this.$val.Implements(u); };
+ rtype.ptr.prototype.AssignableTo = function(u) {
+ var {$24r, _r, t, u, uu, $s, $r, $c} = $restore(this, {u});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ t = this;
+ if ($interfaceIsEqual(u, $ifaceNil)) {
+ $panic(new $String("reflect: nil type passed to Type.AssignableTo"));
+ }
+ uu = $assertType(u, ptrType$1);
+ _r = directlyAssignable(uu, t); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r || implements$1(uu, t);
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: rtype.ptr.prototype.AssignableTo, $c: true, $r, $24r, _r, t, u, uu, $s};return $f;
+ };
+ rtype.prototype.AssignableTo = function(u) { return this.$val.AssignableTo(u); };
+ rtype.ptr.prototype.ConvertibleTo = function(u) {
+ var {$24r, _r, t, u, uu, $s, $r, $c} = $restore(this, {u});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ t = this;
+ if ($interfaceIsEqual(u, $ifaceNil)) {
+ $panic(new $String("reflect: nil type passed to Type.ConvertibleTo"));
+ }
+ uu = $assertType(u, ptrType$1);
+ _r = convertOp(uu, t); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = !(_r === $throwNilPointerError);
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: rtype.ptr.prototype.ConvertibleTo, $c: true, $r, $24r, _r, t, u, uu, $s};return $f;
+ };
+ rtype.prototype.ConvertibleTo = function(u) { return this.$val.ConvertibleTo(u); };
+ implements$1 = function(T, V) {
+ var T, V, i, i$1, j, j$1, t, tm, tm$1, tmName, tmName$1, tmPkgPath, tmPkgPath$1, v, v$1, vm, vm$1, vmName, vmName$1, vmPkgPath, vmPkgPath$1, vmethods, x, x$1, x$2;
+ if (!((T.Kind() === 20))) {
+ return false;
+ }
+ t = (T.kindType);
+ if (t.methods.$length === 0) {
+ return true;
+ }
+ if (V.Kind() === 20) {
+ v = (V.kindType);
+ i = 0;
+ j = 0;
+ while (true) {
+ if (!(j < v.methods.$length)) { break; }
+ tm = (x = t.methods, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]));
+ tmName = $clone(t.rtype.nameOff(tm.name), name);
+ vm = (x$1 = v.methods, ((j < 0 || j >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + j]));
+ vmName = $clone(V.nameOff(vm.name), name);
+ if ($clone(vmName, name).name() === $clone(tmName, name).name() && V.typeOff(vm.typ) === t.rtype.typeOff(tm.typ)) {
+ if (!$clone(tmName, name).isExported()) {
+ tmPkgPath = $clone(tmName, name).pkgPath();
+ if (tmPkgPath === "") {
+ tmPkgPath = $clone(t.pkgPath, name).name();
+ }
+ vmPkgPath = $clone(vmName, name).pkgPath();
+ if (vmPkgPath === "") {
+ vmPkgPath = $clone(v.pkgPath, name).name();
+ }
+ if (!(tmPkgPath === vmPkgPath)) {
+ j = j + (1) >> 0;
+ continue;
+ }
+ }
+ i = i + (1) >> 0;
+ if (i >= t.methods.$length) {
+ return true;
+ }
+ }
+ j = j + (1) >> 0;
+ }
+ return false;
+ }
+ v$1 = V.uncommon();
+ if (v$1 === ptrType$9.nil) {
+ return false;
+ }
+ i$1 = 0;
+ vmethods = v$1.methods();
+ j$1 = 0;
+ while (true) {
+ if (!(j$1 < ((v$1.mcount >> 0)))) { break; }
+ tm$1 = (x$2 = t.methods, ((i$1 < 0 || i$1 >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i$1]));
+ tmName$1 = $clone(t.rtype.nameOff(tm$1.name), name);
+ vm$1 = $clone(((j$1 < 0 || j$1 >= vmethods.$length) ? ($throwRuntimeError("index out of range"), undefined) : vmethods.$array[vmethods.$offset + j$1]), method);
+ vmName$1 = $clone(V.nameOff(vm$1.name), name);
+ if ($clone(vmName$1, name).name() === $clone(tmName$1, name).name() && V.typeOff(vm$1.mtyp) === t.rtype.typeOff(tm$1.typ)) {
+ if (!$clone(tmName$1, name).isExported()) {
+ tmPkgPath$1 = $clone(tmName$1, name).pkgPath();
+ if (tmPkgPath$1 === "") {
+ tmPkgPath$1 = $clone(t.pkgPath, name).name();
+ }
+ vmPkgPath$1 = $clone(vmName$1, name).pkgPath();
+ if (vmPkgPath$1 === "") {
+ vmPkgPath$1 = $clone(V.nameOff(v$1.pkgPath), name).name();
+ }
+ if (!(tmPkgPath$1 === vmPkgPath$1)) {
+ j$1 = j$1 + (1) >> 0;
+ continue;
+ }
+ }
+ i$1 = i$1 + (1) >> 0;
+ if (i$1 >= t.methods.$length) {
+ return true;
+ }
+ }
+ j$1 = j$1 + (1) >> 0;
+ }
+ return false;
+ };
+ specialChannelAssignability = function(T, V) {
+ var {$24r, T, V, _r, _v, $s, $r, $c} = $restore(this, {T, V});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ if (!((V.ChanDir() === 3) && (T.Name() === "" || V.Name() === ""))) { _v = false; $s = 1; continue s; }
+ _r = haveIdenticalType(T.Elem(), V.Elem(), true); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _v = _r; case 1:
+ $24r = _v;
+ $s = 3; case 3: return $24r;
+ /* */ } return; } var $f = {$blk: specialChannelAssignability, $c: true, $r, $24r, T, V, _r, _v, $s};return $f;
+ };
+ directlyAssignable = function(T, V) {
+ var {$24r, T, V, _r, _r$1, _v, $s, $r, $c} = $restore(this, {T, V});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ if (T === V) {
+ $s = -1; return true;
+ }
+ if (T.hasName() && V.hasName() || !((T.Kind() === V.Kind()))) {
+ $s = -1; return false;
+ }
+ if (!(T.Kind() === 18)) { _v = false; $s = 3; continue s; }
+ _r = specialChannelAssignability(T, V); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _v = _r; case 3:
+ /* */ if (_v) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (_v) { */ case 1:
+ $s = -1; return true;
+ /* } */ case 2:
+ _r$1 = haveIdenticalUnderlyingType(T, V, true); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ $24r = _r$1;
+ $s = 6; case 6: return $24r;
+ /* */ } return; } var $f = {$blk: directlyAssignable, $c: true, $r, $24r, T, V, _r, _r$1, _v, $s};return $f;
+ };
+ haveIdenticalType = function(T, V, cmpTags) {
+ var {$24r, T, V, _arg, _arg$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _v, _v$1, cmpTags, $s, $r, $c} = $restore(this, {T, V, cmpTags});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ if (cmpTags) {
+ $s = -1; return $interfaceIsEqual(T, V);
+ }
+ _r = T.Name(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _r$1 = V.Name(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ if (!(_r === _r$1)) { _v$1 = true; $s = 4; continue s; }
+ _r$2 = T.Kind(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ _r$3 = V.Kind(); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
+ _v$1 = !((_r$2 === _r$3)); case 4:
+ if (_v$1) { _v = true; $s = 3; continue s; }
+ _r$4 = T.PkgPath(); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
+ _r$5 = V.PkgPath(); /* */ $s = 10; case 10: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
+ _v = !(_r$4 === _r$5); case 3:
+ /* */ if (_v) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (_v) { */ case 1:
+ $s = -1; return false;
+ /* } */ case 2:
+ _r$6 = T.common(); /* */ $s = 11; case 11: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; }
+ _arg = _r$6;
+ _r$7 = V.common(); /* */ $s = 12; case 12: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; }
+ _arg$1 = _r$7;
+ _r$8 = haveIdenticalUnderlyingType(_arg, _arg$1, false); /* */ $s = 13; case 13: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; }
+ $24r = _r$8;
+ $s = 14; case 14: return $24r;
+ /* */ } return; } var $f = {$blk: haveIdenticalType, $c: true, $r, $24r, T, V, _arg, _arg$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _v, _v$1, cmpTags, $s};return $f;
+ };
+ haveIdenticalUnderlyingType = function(T, V, cmpTags) {
+ var {$24r, $24r$1, $24r$2, $24r$3, T, V, _1, _i, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _ref, _v, _v$1, _v$2, cmpTags, i, i$1, i$2, kind, t, t$1, t$2, tf, v, v$1, v$2, vf, x, x$1, $s, $r, $c} = $restore(this, {T, V, cmpTags});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ if (T === V) {
+ $s = -1; return true;
+ }
+ kind = T.Kind();
+ if (!((kind === V.Kind()))) {
+ $s = -1; return false;
+ }
+ if (1 <= kind && kind <= 16 || (kind === 24) || (kind === 26)) {
+ $s = -1; return true;
+ }
+ _1 = kind;
+ /* */ if (_1 === (17)) { $s = 2; continue; }
+ /* */ if (_1 === (18)) { $s = 3; continue; }
+ /* */ if (_1 === (19)) { $s = 4; continue; }
+ /* */ if (_1 === (20)) { $s = 5; continue; }
+ /* */ if (_1 === (21)) { $s = 6; continue; }
+ /* */ if ((_1 === (22)) || (_1 === (23))) { $s = 7; continue; }
+ /* */ if (_1 === (25)) { $s = 8; continue; }
+ /* */ $s = 9; continue;
+ /* if (_1 === (17)) { */ case 2:
+ if (!(T.Len() === V.Len())) { _v = false; $s = 10; continue s; }
+ _r = haveIdenticalType(T.Elem(), V.Elem(), cmpTags); /* */ $s = 11; case 11: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _v = _r; case 10:
+ $24r = _v;
+ $s = 12; case 12: return $24r;
+ /* } else if (_1 === (18)) { */ case 3:
+ if (!(V.ChanDir() === T.ChanDir())) { _v$1 = false; $s = 13; continue s; }
+ _r$1 = haveIdenticalType(T.Elem(), V.Elem(), cmpTags); /* */ $s = 14; case 14: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _v$1 = _r$1; case 13:
+ $24r$1 = _v$1;
+ $s = 15; case 15: return $24r$1;
+ /* } else if (_1 === (19)) { */ case 4:
+ t = (T.kindType);
+ v = (V.kindType);
+ if (!((t.outCount === v.outCount)) || !((t.inCount === v.inCount))) {
+ $s = -1; return false;
+ }
+ i = 0;
+ /* while (true) { */ case 16:
+ /* if (!(i < t.rtype.NumIn())) { break; } */ if(!(i < t.rtype.NumIn())) { $s = 17; continue; }
+ _r$2 = haveIdenticalType(t.rtype.In(i), v.rtype.In(i), cmpTags); /* */ $s = 20; case 20: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ /* */ if (!_r$2) { $s = 18; continue; }
+ /* */ $s = 19; continue;
+ /* if (!_r$2) { */ case 18:
+ $s = -1; return false;
+ /* } */ case 19:
+ i = i + (1) >> 0;
+ $s = 16; continue;
+ case 17:
+ i$1 = 0;
+ /* while (true) { */ case 21:
+ /* if (!(i$1 < t.rtype.NumOut())) { break; } */ if(!(i$1 < t.rtype.NumOut())) { $s = 22; continue; }
+ _r$3 = haveIdenticalType(t.rtype.Out(i$1), v.rtype.Out(i$1), cmpTags); /* */ $s = 25; case 25: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
+ /* */ if (!_r$3) { $s = 23; continue; }
+ /* */ $s = 24; continue;
+ /* if (!_r$3) { */ case 23:
+ $s = -1; return false;
+ /* } */ case 24:
+ i$1 = i$1 + (1) >> 0;
+ $s = 21; continue;
+ case 22:
+ $s = -1; return true;
+ /* } else if (_1 === (20)) { */ case 5:
+ t$1 = (T.kindType);
+ v$1 = (V.kindType);
+ if ((t$1.methods.$length === 0) && (v$1.methods.$length === 0)) {
+ $s = -1; return true;
+ }
+ $s = -1; return false;
+ /* } else if (_1 === (21)) { */ case 6:
+ _r$4 = haveIdenticalType(T.Key(), V.Key(), cmpTags); /* */ $s = 27; case 27: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
+ if (!(_r$4)) { _v$2 = false; $s = 26; continue s; }
+ _r$5 = haveIdenticalType(T.Elem(), V.Elem(), cmpTags); /* */ $s = 28; case 28: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
+ _v$2 = _r$5; case 26:
+ $24r$2 = _v$2;
+ $s = 29; case 29: return $24r$2;
+ /* } else if ((_1 === (22)) || (_1 === (23))) { */ case 7:
+ _r$6 = haveIdenticalType(T.Elem(), V.Elem(), cmpTags); /* */ $s = 30; case 30: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; }
+ $24r$3 = _r$6;
+ $s = 31; case 31: return $24r$3;
+ /* } else if (_1 === (25)) { */ case 8:
+ t$2 = (T.kindType);
+ v$2 = (V.kindType);
+ if (!((t$2.fields.$length === v$2.fields.$length))) {
+ $s = -1; return false;
+ }
+ if (!($clone(t$2.pkgPath, name).name() === $clone(v$2.pkgPath, name).name())) {
+ $s = -1; return false;
+ }
+ _ref = t$2.fields;
+ _i = 0;
+ /* while (true) { */ case 32:
+ /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 33; continue; }
+ i$2 = _i;
+ tf = (x = t$2.fields, ((i$2 < 0 || i$2 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i$2]));
+ vf = (x$1 = v$2.fields, ((i$2 < 0 || i$2 >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i$2]));
+ if (!($clone(tf.name, name).name() === $clone(vf.name, name).name())) {
+ $s = -1; return false;
+ }
+ _r$7 = haveIdenticalType(tf.typ, vf.typ, cmpTags); /* */ $s = 36; case 36: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; }
+ /* */ if (!_r$7) { $s = 34; continue; }
+ /* */ $s = 35; continue;
+ /* if (!_r$7) { */ case 34:
+ $s = -1; return false;
+ /* } */ case 35:
+ if (cmpTags && !($clone(tf.name, name).tag() === $clone(vf.name, name).tag())) {
+ $s = -1; return false;
+ }
+ if (!((tf.offsetEmbed === vf.offsetEmbed))) {
+ $s = -1; return false;
+ }
+ _i++;
+ $s = 32; continue;
+ case 33:
+ $s = -1; return true;
+ /* } */ case 9:
+ case 1:
+ $s = -1; return false;
+ /* */ } return; } var $f = {$blk: haveIdenticalUnderlyingType, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, T, V, _1, _i, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _ref, _v, _v$1, _v$2, cmpTags, i, i$1, i$2, kind, t, t$1, t$2, tf, v, v$1, v$2, vf, x, x$1, $s};return $f;
+ };
+ toType = function(t) {
+ var t;
+ if (t === ptrType$1.nil) {
+ return $ifaceNil;
+ }
+ return t;
+ };
+ ifaceIndir = function(t) {
+ var t;
+ return ((t.kind & 32) >>> 0) === 0;
+ };
+ methodValueCallCodePtr = function() {
+ var {$24r, _r, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = abi.FuncPCABI0(new funcType$2(methodValueCall)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: methodValueCallCodePtr, $c: true, $r, $24r, _r, $s};return $f;
+ };
+ methodValueCall = function() {
+ $throwRuntimeError("native function not implemented: reflect.methodValueCall");
+ };
+ init = function() {
+ var {used, x, x$1, x$10, x$11, x$12, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ used = (function(i) {
+ var i;
+ });
+ $r = used((x = new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0), new x.constructor.elem(x))); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = used((x$1 = new uncommonType.ptr(0, 0, 0, 0, sliceType$11.nil), new x$1.constructor.elem(x$1))); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = used((x$2 = new method.ptr(0, 0, 0, 0), new x$2.constructor.elem(x$2))); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = used((x$3 = new arrayType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0), ptrType$1.nil, ptrType$1.nil, 0), new x$3.constructor.elem(x$3))); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = used((x$4 = new chanType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0), ptrType$1.nil, 0), new x$4.constructor.elem(x$4))); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = used((x$5 = new funcType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0), 0, 0, sliceType$2.nil, sliceType$2.nil), new x$5.constructor.elem(x$5))); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = used((x$6 = new interfaceType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0), new name.ptr(ptrType$13.nil), sliceType$14.nil), new x$6.constructor.elem(x$6))); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = used((x$7 = new mapType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0), ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, $throwNilPointerError, 0, 0, 0, 0), new x$7.constructor.elem(x$7))); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = used((x$8 = new ptrType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0), ptrType$1.nil), new x$8.constructor.elem(x$8))); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = used((x$9 = new sliceType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0), ptrType$1.nil), new x$9.constructor.elem(x$9))); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = used((x$10 = new structType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0), new name.ptr(ptrType$13.nil), sliceType$15.nil), new x$10.constructor.elem(x$10))); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = used((x$11 = new imethod.ptr(0, 0), new x$11.constructor.elem(x$11))); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = used((x$12 = new structField.ptr(new name.ptr(ptrType$13.nil), ptrType$1.nil, 0), new x$12.constructor.elem(x$12))); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ initialized = true;
+ uint8Type = $assertType(TypeOf(new $Uint8(0)), ptrType$1);
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: init, $c: true, $r, used, x, x$1, x$10, x$11, x$12, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, $s};return $f;
+ };
+ New = function(typ) {
+ var fl, pt, ptr, t, typ;
+ if ($interfaceIsEqual(typ, $ifaceNil)) {
+ $panic(new $String("reflect: New(nil)"));
+ }
+ t = $assertType(typ, ptrType$1);
+ pt = t.ptrTo();
+ ptr = unsafe_New(t);
+ fl = 22;
+ return new Value.ptr(pt, ptr, fl);
+ };
+ $pkg.New = New;
+ jsType = function(typ) {
+ var typ;
+ return typ.jsType;
+ };
+ reflectType = function(typ) {
+ var _1, _i, _i$1, _i$2, _i$3, _key, _ref, _ref$1, _ref$2, _ref$3, dir, exported, exported$1, f, fields, i, i$1, i$2, i$3, i$4, i$5, imethods, in$1, m, m$1, m$2, methodSet, methods, offsetEmbed, out, outCount, params, reflectFields, reflectMethods, results, rt, typ, ut, xcount;
+ if (typ.reflectType === undefined) {
+ rt = new rtype.ptr(((($parseInt(typ.size) >> 0) >>> 0)), 0, 0, 0, 0, 0, ((($parseInt(typ.kind) >> 0) << 24 >>> 24)), $throwNilPointerError, ptrType$13.nil, newNameOff($clone(newName(internalStr(typ.string), "", !!(typ.exported)), name)), 0);
+ rt.jsType = typ;
+ typ.reflectType = rt;
+ methodSet = $methodSet(typ);
+ if (!(($parseInt(methodSet.length) === 0)) || !!(typ.named)) {
+ rt.tflag = (rt.tflag | (1)) >>> 0;
+ if (!!(typ.named)) {
+ rt.tflag = (rt.tflag | (4)) >>> 0;
+ }
+ reflectMethods = sliceType$11.nil;
+ i = 0;
+ while (true) {
+ if (!(i < $parseInt(methodSet.length))) { break; }
+ m = methodSet[i];
+ exported = internalStr(m.pkg) === "";
+ if (!exported) {
+ i = i + (1) >> 0;
+ continue;
+ }
+ reflectMethods = $append(reflectMethods, new method.ptr(newNameOff($clone(newMethodName(m), name)), newTypeOff(reflectType(m.typ)), 0, 0));
+ i = i + (1) >> 0;
+ }
+ xcount = ((reflectMethods.$length << 16 >>> 16));
+ i$1 = 0;
+ while (true) {
+ if (!(i$1 < $parseInt(methodSet.length))) { break; }
+ m$1 = methodSet[i$1];
+ exported$1 = internalStr(m$1.pkg) === "";
+ if (exported$1) {
+ i$1 = i$1 + (1) >> 0;
+ continue;
+ }
+ reflectMethods = $append(reflectMethods, new method.ptr(newNameOff($clone(newMethodName(m$1), name)), newTypeOff(reflectType(m$1.typ)), 0, 0));
+ i$1 = i$1 + (1) >> 0;
+ }
+ ut = new uncommonType.ptr(newNameOff($clone(newName(internalStr(typ.pkg), "", false), name)), (($parseInt(methodSet.length) << 16 >>> 16)), xcount, 0, reflectMethods);
+ _key = rt; (uncommonTypeMap || $throwRuntimeError("assignment to entry in nil map"))[ptrType$1.keyFor(_key)] = { k: _key, v: ut };
+ ut.jsType = typ;
+ }
+ _1 = rt.Kind();
+ if (_1 === (17)) {
+ setKindType(rt, new arrayType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0), reflectType(typ.elem), ptrType$1.nil, ((($parseInt(typ.len) >> 0) >>> 0))));
+ } else if (_1 === (18)) {
+ dir = 3;
+ if (!!(typ.sendOnly)) {
+ dir = 2;
+ }
+ if (!!(typ.recvOnly)) {
+ dir = 1;
+ }
+ setKindType(rt, new chanType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0), reflectType(typ.elem), ((dir >>> 0))));
+ } else if (_1 === (19)) {
+ params = typ.params;
+ in$1 = $makeSlice(sliceType$2, $parseInt(params.length));
+ _ref = in$1;
+ _i = 0;
+ while (true) {
+ if (!(_i < _ref.$length)) { break; }
+ i$2 = _i;
+ ((i$2 < 0 || i$2 >= in$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : in$1.$array[in$1.$offset + i$2] = reflectType(params[i$2]));
+ _i++;
+ }
+ results = typ.results;
+ out = $makeSlice(sliceType$2, $parseInt(results.length));
+ _ref$1 = out;
+ _i$1 = 0;
+ while (true) {
+ if (!(_i$1 < _ref$1.$length)) { break; }
+ i$3 = _i$1;
+ ((i$3 < 0 || i$3 >= out.$length) ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + i$3] = reflectType(results[i$3]));
+ _i$1++;
+ }
+ outCount = (($parseInt(results.length) << 16 >>> 16));
+ if (!!(typ.variadic)) {
+ outCount = (outCount | (32768)) >>> 0;
+ }
+ setKindType(rt, new funcType.ptr($clone(rt, rtype), (($parseInt(params.length) << 16 >>> 16)), outCount, in$1, out));
+ } else if (_1 === (20)) {
+ methods = typ.methods;
+ imethods = $makeSlice(sliceType$14, $parseInt(methods.length));
+ _ref$2 = imethods;
+ _i$2 = 0;
+ while (true) {
+ if (!(_i$2 < _ref$2.$length)) { break; }
+ i$4 = _i$2;
+ m$2 = methods[i$4];
+ imethod.copy(((i$4 < 0 || i$4 >= imethods.$length) ? ($throwRuntimeError("index out of range"), undefined) : imethods.$array[imethods.$offset + i$4]), new imethod.ptr(newNameOff($clone(newMethodName(m$2), name)), newTypeOff(reflectType(m$2.typ))));
+ _i$2++;
+ }
+ setKindType(rt, new interfaceType.ptr($clone(rt, rtype), $clone(newName(internalStr(typ.pkg), "", false), name), imethods));
+ } else if (_1 === (21)) {
+ setKindType(rt, new mapType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0), reflectType(typ.key), reflectType(typ.elem), ptrType$1.nil, $throwNilPointerError, 0, 0, 0, 0));
+ } else if (_1 === (22)) {
+ setKindType(rt, new ptrType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0), reflectType(typ.elem)));
+ } else if (_1 === (23)) {
+ setKindType(rt, new sliceType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0), reflectType(typ.elem)));
+ } else if (_1 === (25)) {
+ fields = typ.fields;
+ reflectFields = $makeSlice(sliceType$15, $parseInt(fields.length));
+ _ref$3 = reflectFields;
+ _i$3 = 0;
+ while (true) {
+ if (!(_i$3 < _ref$3.$length)) { break; }
+ i$5 = _i$3;
+ f = fields[i$5];
+ offsetEmbed = ((i$5 >>> 0)) << 1 >>> 0;
+ if (!!(f.embedded)) {
+ offsetEmbed = (offsetEmbed | (1)) >>> 0;
+ }
+ structField.copy(((i$5 < 0 || i$5 >= reflectFields.$length) ? ($throwRuntimeError("index out of range"), undefined) : reflectFields.$array[reflectFields.$offset + i$5]), new structField.ptr($clone(newName(internalStr(f.name), internalStr(f.tag), !!(f.exported)), name), reflectType(f.typ), offsetEmbed));
+ _i$3++;
+ }
+ setKindType(rt, new structType.ptr($clone(rt, rtype), $clone(newName(internalStr(typ.pkgPath), "", false), name), reflectFields));
+ }
+ }
+ return ((typ.reflectType));
+ };
+ setKindType = function(rt, kindType) {
+ var kindType, rt;
+ rt.kindType = kindType;
+ kindType.rtype = rt;
+ };
+ uncommonType.ptr.prototype.methods = function() {
+ var t;
+ t = this;
+ return t._methods;
+ };
+ uncommonType.prototype.methods = function() { return this.$val.methods(); };
+ uncommonType.ptr.prototype.exportedMethods = function() {
+ var t;
+ t = this;
+ return $subslice(t._methods, 0, t.xcount, t.xcount);
+ };
+ uncommonType.prototype.exportedMethods = function() { return this.$val.exportedMethods(); };
+ rtype.ptr.prototype.uncommon = function() {
+ var _entry, t;
+ t = this;
+ return (_entry = uncommonTypeMap[ptrType$1.keyFor(t)], _entry !== undefined ? _entry.v : ptrType$9.nil);
+ };
+ rtype.prototype.uncommon = function() { return this.$val.uncommon(); };
+ funcType.ptr.prototype.in$ = function() {
+ var t;
+ t = this;
+ return t._in;
+ };
+ funcType.prototype.in$ = function() { return this.$val.in$(); };
+ funcType.ptr.prototype.out = function() {
+ var t;
+ t = this;
+ return t._out;
+ };
+ funcType.prototype.out = function() { return this.$val.out(); };
+ name.ptr.prototype.name = function() {
+ var _entry, n, s;
+ s = "";
+ n = this;
+ s = (_entry = nameMap[ptrType$13.keyFor(n.bytes)], _entry !== undefined ? _entry.v : ptrType$18.nil).name;
+ return s;
+ };
+ name.prototype.name = function() { return this.$val.name(); };
+ name.ptr.prototype.tag = function() {
+ var _entry, n, s;
+ s = "";
+ n = this;
+ s = (_entry = nameMap[ptrType$13.keyFor(n.bytes)], _entry !== undefined ? _entry.v : ptrType$18.nil).tag;
+ return s;
+ };
+ name.prototype.tag = function() { return this.$val.tag(); };
+ name.ptr.prototype.pkgPath = function() {
+ var _entry, n;
+ n = this;
+ return (_entry = nameMap[ptrType$13.keyFor(n.bytes)], _entry !== undefined ? _entry.v : ptrType$18.nil).pkgPath;
+ };
+ name.prototype.pkgPath = function() { return this.$val.pkgPath(); };
+ name.ptr.prototype.isExported = function() {
+ var _entry, n;
+ n = this;
+ return (_entry = nameMap[ptrType$13.keyFor(n.bytes)], _entry !== undefined ? _entry.v : ptrType$18.nil).exported;
+ };
+ name.prototype.isExported = function() { return this.$val.isExported(); };
+ newName = function(n, tag, exported) {
+ var _key, b, exported, n, tag;
+ b = $newDataPointer(0, ptrType$13);
+ _key = b; (nameMap || $throwRuntimeError("assignment to entry in nil map"))[ptrType$13.keyFor(_key)] = { k: _key, v: new nameData.ptr(n, tag, exported, "") };
+ return new name.ptr(b);
+ };
+ newMethodName = function(m) {
+ var _key, b, m;
+ b = $newDataPointer(0, ptrType$13);
+ _key = b; (nameMap || $throwRuntimeError("assignment to entry in nil map"))[ptrType$13.keyFor(_key)] = { k: _key, v: new nameData.ptr(internalStr(m.name), "", internalStr(m.pkg) === "", internalStr(m.pkg)) };
+ return new name.ptr(b);
+ };
+ rtype.ptr.prototype.nameOff = function(off) {
+ var off, t, x;
+ t = this;
+ return (x = ((off >> 0)), ((x < 0 || x >= nameOffList.$length) ? ($throwRuntimeError("index out of range"), undefined) : nameOffList.$array[nameOffList.$offset + x]));
+ };
+ rtype.prototype.nameOff = function(off) { return this.$val.nameOff(off); };
+ newNameOff = function(n) {
+ var i, n;
+ i = nameOffList.$length;
+ nameOffList = $append(nameOffList, n);
+ return ((i >> 0));
+ };
+ rtype.ptr.prototype.typeOff = function(off) {
+ var off, t, x;
+ t = this;
+ return (x = ((off >> 0)), ((x < 0 || x >= typeOffList.$length) ? ($throwRuntimeError("index out of range"), undefined) : typeOffList.$array[typeOffList.$offset + x]));
+ };
+ rtype.prototype.typeOff = function(off) { return this.$val.typeOff(off); };
+ newTypeOff = function(t) {
+ var i, t;
+ i = typeOffList.$length;
+ typeOffList = $append(typeOffList, t);
+ return ((i >> 0));
+ };
+ internalStr = function(strObj) {
+ var c, strObj;
+ c = new structType$3.ptr("");
+ c.str = strObj;
+ return c.str;
+ };
+ isWrapped = function(typ) {
+ var typ;
+ return !!(jsType(typ).wrapped);
+ };
+ copyStruct = function(dst, src, typ) {
+ var dst, fields, i, prop, src, typ;
+ fields = jsType(typ).fields;
+ i = 0;
+ while (true) {
+ if (!(i < $parseInt(fields.length))) { break; }
+ prop = $internalize(fields[i].prop, $String);
+ dst[$externalize(prop, $String)] = src[$externalize(prop, $String)];
+ i = i + (1) >> 0;
+ }
+ };
+ makeValue = function(t, v, fl) {
+ var {$24r, $24r$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _v, _v$1, fl, rt, t, v, $s, $r, $c} = $restore(this, {t, v, fl});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = t.common(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ rt = _r;
+ _r$1 = t.Kind(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ if (_r$1 === 17) { _v$1 = true; $s = 5; continue s; }
+ _r$2 = t.Kind(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ _v$1 = _r$2 === 25; case 5:
+ if (_v$1) { _v = true; $s = 4; continue s; }
+ _r$3 = t.Kind(); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
+ _v = _r$3 === 22; case 4:
+ /* */ if (_v) { $s = 2; continue; }
+ /* */ $s = 3; continue;
+ /* if (_v) { */ case 2:
+ _r$4 = t.Kind(); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
+ $24r = new Value.ptr(rt, (v), (fl | ((_r$4 >>> 0))) >>> 0);
+ $s = 10; case 10: return $24r;
+ /* } */ case 3:
+ _r$5 = t.Kind(); /* */ $s = 11; case 11: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
+ $24r$1 = new Value.ptr(rt, ($newDataPointer(v, jsType(rt.ptrTo()))), (((fl | ((_r$5 >>> 0))) >>> 0) | 128) >>> 0);
+ $s = 12; case 12: return $24r$1;
+ /* */ } return; } var $f = {$blk: makeValue, $c: true, $r, $24r, $24r$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _v, _v$1, fl, rt, t, v, $s};return $f;
+ };
+ MakeSlice = function(typ, len, cap) {
+ var {$24r, _r, _r$1, cap, len, typ, $s, $r, $c} = $restore(this, {typ, len, cap});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ typ = [typ];
+ _r = typ[0].Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ /* */ if (!((_r === 23))) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (!((_r === 23))) { */ case 1:
+ $panic(new $String("reflect.MakeSlice of non-slice type"));
+ /* } */ case 2:
+ if (len < 0) {
+ $panic(new $String("reflect.MakeSlice: negative len"));
+ }
+ if (cap < 0) {
+ $panic(new $String("reflect.MakeSlice: negative cap"));
+ }
+ if (len > cap) {
+ $panic(new $String("reflect.MakeSlice: len > cap"));
+ }
+ _r$1 = makeValue(typ[0], $makeSlice(jsType(typ[0]), len, cap, (function(typ) { return function $b() {
+ var {$24r, _r$1, _r$2, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r$1 = typ[0].Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _r$2 = jsType(_r$1); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ $24r = _r$2.zero();
+ $s = 3; case 3: return $24r;
+ /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$1, _r$2, $s};return $f;
+ }; })(typ)), 0); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ $24r = _r$1;
+ $s = 5; case 5: return $24r;
+ /* */ } return; } var $f = {$blk: MakeSlice, $c: true, $r, $24r, _r, _r$1, cap, len, typ, $s};return $f;
+ };
+ $pkg.MakeSlice = MakeSlice;
+ TypeOf = function(i) {
+ var i;
+ if (!initialized) {
+ return new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0);
+ }
+ if ($interfaceIsEqual(i, $ifaceNil)) {
+ return $ifaceNil;
+ }
+ return reflectType(i.constructor);
+ };
+ $pkg.TypeOf = TypeOf;
+ ValueOf = function(i) {
+ var {$24r, _r, i, $s, $r, $c} = $restore(this, {i});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ if ($interfaceIsEqual(i, $ifaceNil)) {
+ $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0);
+ }
+ _r = makeValue(reflectType(i.constructor), i.$val, 0); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: ValueOf, $c: true, $r, $24r, _r, i, $s};return $f;
+ };
+ $pkg.ValueOf = ValueOf;
+ FuncOf = function(in$1, out, variadic) {
+ var {_i, _i$1, _r, _ref, _ref$1, _v, _v$1, i, i$1, in$1, jsIn, jsOut, out, v, v$1, variadic, x, $s, $r, $c} = $restore(this, {in$1, out, variadic});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ if (!(variadic)) { _v = false; $s = 3; continue s; }
+ if (in$1.$length === 0) { _v$1 = true; $s = 4; continue s; }
+ _r = (x = in$1.$length - 1 >> 0, ((x < 0 || x >= in$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : in$1.$array[in$1.$offset + x])).Kind(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _v$1 = !((_r === 23)); case 4:
+ _v = _v$1; case 3:
+ /* */ if (_v) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (_v) { */ case 1:
+ $panic(new $String("reflect.FuncOf: last arg of variadic func must be slice"));
+ /* } */ case 2:
+ jsIn = $makeSlice(sliceType$16, in$1.$length);
+ _ref = in$1;
+ _i = 0;
+ while (true) {
+ if (!(_i < _ref.$length)) { break; }
+ i = _i;
+ v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]);
+ ((i < 0 || i >= jsIn.$length) ? ($throwRuntimeError("index out of range"), undefined) : jsIn.$array[jsIn.$offset + i] = jsType(v));
+ _i++;
+ }
+ jsOut = $makeSlice(sliceType$16, out.$length);
+ _ref$1 = out;
+ _i$1 = 0;
+ while (true) {
+ if (!(_i$1 < _ref$1.$length)) { break; }
+ i$1 = _i$1;
+ v$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]);
+ ((i$1 < 0 || i$1 >= jsOut.$length) ? ($throwRuntimeError("index out of range"), undefined) : jsOut.$array[jsOut.$offset + i$1] = jsType(v$1));
+ _i$1++;
+ }
+ $s = -1; return reflectType($funcType($externalize(jsIn, sliceType$16), $externalize(jsOut, sliceType$16), $externalize(variadic, $Bool)));
+ /* */ } return; } var $f = {$blk: FuncOf, $c: true, $r, _i, _i$1, _r, _ref, _ref$1, _v, _v$1, i, i$1, in$1, jsIn, jsOut, out, v, v$1, variadic, x, $s};return $f;
+ };
+ $pkg.FuncOf = FuncOf;
+ rtype.ptr.prototype.ptrTo = function() {
+ var t;
+ t = this;
+ return reflectType($ptrType(jsType(t)));
+ };
+ rtype.prototype.ptrTo = function() { return this.$val.ptrTo(); };
+ SliceOf = function(t) {
+ var t;
+ return reflectType($sliceType(jsType(t)));
+ };
+ $pkg.SliceOf = SliceOf;
+ Zero = function(typ) {
+ var {$24r, _r, typ, $s, $r, $c} = $restore(this, {typ});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = makeValue(typ, jsType(typ).zero(), 0); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: Zero, $c: true, $r, $24r, _r, typ, $s};return $f;
+ };
+ $pkg.Zero = Zero;
+ unsafe_New = function(typ) {
+ var _1, typ;
+ _1 = typ.Kind();
+ if (_1 === (25)) {
+ return (new (jsType(typ).ptr)());
+ } else if (_1 === (17)) {
+ return (jsType(typ).zero());
+ } else {
+ return ($newDataPointer(jsType(typ).zero(), jsType(typ.ptrTo())));
+ }
+ };
+ makeInt = function(f, bits, t) {
+ var {_1, _r, bits, f, ptr, t, typ, $s, $r, $c} = $restore(this, {f, bits, t});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = t.common(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ typ = _r;
+ ptr = unsafe_New(typ);
+ _1 = typ.Kind();
+ if (_1 === (3)) {
+ (ptr).$set(((bits.$low << 24 >> 24)));
+ } else if (_1 === (4)) {
+ (ptr).$set(((bits.$low << 16 >> 16)));
+ } else if ((_1 === (2)) || (_1 === (5))) {
+ (ptr).$set(((bits.$low >> 0)));
+ } else if (_1 === (6)) {
+ (ptr).$set((new $Int64(bits.$high, bits.$low)));
+ } else if (_1 === (8)) {
+ (ptr).$set(((bits.$low << 24 >>> 24)));
+ } else if (_1 === (9)) {
+ (ptr).$set(((bits.$low << 16 >>> 16)));
+ } else if ((_1 === (7)) || (_1 === (10)) || (_1 === (12))) {
+ (ptr).$set(((bits.$low >>> 0)));
+ } else if (_1 === (11)) {
+ (ptr).$set((bits));
+ }
+ $s = -1; return new Value.ptr(typ, ptr, (((f | 128) >>> 0) | ((typ.Kind() >>> 0))) >>> 0);
+ /* */ } return; } var $f = {$blk: makeInt, $c: true, $r, _1, _r, bits, f, ptr, t, typ, $s};return $f;
+ };
+ typedmemmove = function(t, dst, src) {
+ var dst, src, t;
+ dst.$set(src.$get());
+ };
+ makemap = function(t, cap) {
+ var cap, m, t;
+ m = 0;
+ m = (new ($global.Object)());
+ return m;
+ };
+ keyFor = function(t, key) {
+ var k, key, kv, t;
+ kv = key;
+ if (!(kv.$get === undefined)) {
+ kv = kv.$get();
+ }
+ k = $internalize(jsType(t.Key()).keyFor(kv), $String);
+ return [kv, k];
+ };
+ mapaccess = function(t, m, key) {
+ var _tuple, entry, k, key, m, t;
+ _tuple = keyFor(t, key);
+ k = _tuple[1];
+ entry = m[$externalize(k, $String)];
+ if (entry === undefined) {
+ return 0;
+ }
+ return ($newDataPointer(entry.v, jsType(PtrTo(t.Elem()))));
+ };
+ mapassign = function(t, m, key, val) {
+ var {_r, _tuple, entry, et, jsVal, k, key, kv, m, newVal, t, val, $s, $r, $c} = $restore(this, {t, m, key, val});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _tuple = keyFor(t, key);
+ kv = _tuple[0];
+ k = _tuple[1];
+ jsVal = val.$get();
+ et = t.Elem();
+ _r = et.Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ /* */ if (_r === 25) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (_r === 25) { */ case 1:
+ newVal = jsType(et).zero();
+ copyStruct(newVal, jsVal, et);
+ jsVal = newVal;
+ /* } */ case 2:
+ entry = new ($global.Object)();
+ entry.k = kv;
+ entry.v = jsVal;
+ m[$externalize(k, $String)] = entry;
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: mapassign, $c: true, $r, _r, _tuple, entry, et, jsVal, k, key, kv, m, newVal, t, val, $s};return $f;
+ };
+ mapdelete = function(t, m, key) {
+ var _tuple, k, key, m, t;
+ _tuple = keyFor(t, key);
+ k = _tuple[1];
+ delete m[$externalize(k, $String)];
+ };
+ mapaccess_faststr = function(t, m, key) {
+ var key, key$24ptr, m, t, val;
+ val = 0;
+ val = mapaccess(t, m, ((key$24ptr || (key$24ptr = new ptrType$19(function() { return key; }, function($v) { key = $v; })))));
+ return val;
+ };
+ mapassign_faststr = function(t, m, key, val) {
+ var {key, m, t, val, $s, $r, $c} = $restore(this, {t, m, key, val});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ key = [key];
+ $r = mapassign(t, m, ((key.$ptr || (key.$ptr = new ptrType$19(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, key)))), val); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: mapassign_faststr, $c: true, $r, key, m, t, val, $s};return $f;
+ };
+ mapdelete_faststr = function(t, m, key) {
+ var key, key$24ptr, m, t;
+ mapdelete(t, m, ((key$24ptr || (key$24ptr = new ptrType$19(function() { return key; }, function($v) { key = $v; })))));
+ };
+ hiter.ptr.prototype.skipUntilValidKey = function() {
+ var iter, k;
+ iter = this;
+ while (true) {
+ if (!(iter.i < $parseInt(iter.keys.length))) { break; }
+ k = iter.keys[iter.i];
+ if (!(iter.m[$externalize($internalize(k, $String), $String)] === undefined)) {
+ break;
+ }
+ iter.i = iter.i + (1) >> 0;
+ }
+ };
+ hiter.prototype.skipUntilValidKey = function() { return this.$val.skipUntilValidKey(); };
+ mapiterinit = function(t, m, it) {
+ var it, m, t;
+ hiter.copy(it, new hiter.ptr(t, m, $keys(m), 0, null));
+ };
+ mapiterkey = function(it) {
+ var {$24r, _r, _r$1, _r$2, it, k, kv, $s, $r, $c} = $restore(this, {it});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ kv = null;
+ if (!(it.last === null)) {
+ kv = it.last;
+ } else {
+ it.skipUntilValidKey();
+ if (it.i === $parseInt(it.keys.length)) {
+ $s = -1; return 0;
+ }
+ k = it.keys[it.i];
+ kv = it.m[$externalize($internalize(k, $String), $String)];
+ it.last = kv;
+ }
+ _r = it.t.Key(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _r$1 = PtrTo(_r); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _r$2 = jsType(_r$1); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ $24r = ($newDataPointer(kv.k, _r$2));
+ $s = 4; case 4: return $24r;
+ /* */ } return; } var $f = {$blk: mapiterkey, $c: true, $r, $24r, _r, _r$1, _r$2, it, k, kv, $s};return $f;
+ };
+ mapiterelem = function(it) {
+ var {$24r, _r, _r$1, _r$2, it, k, kv, $s, $r, $c} = $restore(this, {it});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ kv = null;
+ if (!(it.last === null)) {
+ kv = it.last;
+ } else {
+ it.skipUntilValidKey();
+ if (it.i === $parseInt(it.keys.length)) {
+ $s = -1; return 0;
+ }
+ k = it.keys[it.i];
+ kv = it.m[$externalize($internalize(k, $String), $String)];
+ it.last = kv;
+ }
+ _r = it.t.Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _r$1 = PtrTo(_r); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _r$2 = jsType(_r$1); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ $24r = ($newDataPointer(kv.v, _r$2));
+ $s = 4; case 4: return $24r;
+ /* */ } return; } var $f = {$blk: mapiterelem, $c: true, $r, $24r, _r, _r$1, _r$2, it, k, kv, $s};return $f;
+ };
+ mapiternext = function(it) {
+ var it;
+ it.last = null;
+ it.i = it.i + (1) >> 0;
+ };
+ maplen = function(m) {
+ var m;
+ return $parseInt($keys(m).length);
+ };
+ cvtDirect = function(v, typ) {
+ var {$24r, $24r$1, _1, _2, _arg, _arg$1, _arg$2, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, k, slice, srcVal, typ, v, val, $s, $r, $c} = $restore(this, {v, typ});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ srcVal = $clone(v, Value).object();
+ /* */ if (srcVal === jsType(v.typ).nil) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (srcVal === jsType(v.typ).nil) { */ case 1:
+ _r = makeValue(typ, jsType(typ).nil, v.flag); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 4; case 4: return $24r;
+ /* } */ case 2:
+ val = null;
+ _r$1 = typ.Kind(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ k = _r$1;
+ _1 = k;
+ /* */ if (_1 === (23)) { $s = 7; continue; }
+ /* */ if (_1 === (22)) { $s = 8; continue; }
+ /* */ if (_1 === (25)) { $s = 9; continue; }
+ /* */ if ((_1 === (17)) || (_1 === (1)) || (_1 === (18)) || (_1 === (19)) || (_1 === (20)) || (_1 === (21)) || (_1 === (24)) || (_1 === (26))) { $s = 10; continue; }
+ /* */ $s = 11; continue;
+ /* if (_1 === (23)) { */ case 7:
+ slice = new (jsType(typ))(srcVal.$array);
+ slice.$offset = srcVal.$offset;
+ slice.$length = srcVal.$length;
+ slice.$capacity = srcVal.$capacity;
+ val = $newDataPointer(slice, jsType(PtrTo(typ)));
+ $s = 12; continue;
+ /* } else if (_1 === (22)) { */ case 8:
+ _r$2 = typ.Elem(); /* */ $s = 14; case 14: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ _r$3 = _r$2.Kind(); /* */ $s = 15; case 15: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
+ _2 = _r$3;
+ /* */ if (_2 === (25)) { $s = 16; continue; }
+ /* */ if (_2 === (17)) { $s = 17; continue; }
+ /* */ $s = 18; continue;
+ /* if (_2 === (25)) { */ case 16:
+ _r$4 = typ.Elem(); /* */ $s = 22; case 22: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
+ /* */ if ($interfaceIsEqual(_r$4, v.typ.Elem())) { $s = 20; continue; }
+ /* */ $s = 21; continue;
+ /* if ($interfaceIsEqual(_r$4, v.typ.Elem())) { */ case 20:
+ val = srcVal;
+ /* break; */ $s = 13; continue;
+ /* } */ case 21:
+ val = new (jsType(typ))();
+ _arg = val;
+ _arg$1 = srcVal;
+ _r$5 = typ.Elem(); /* */ $s = 23; case 23: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
+ _arg$2 = _r$5;
+ $r = copyStruct(_arg, _arg$1, _arg$2); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $s = 19; continue;
+ /* } else if (_2 === (17)) { */ case 17:
+ val = srcVal;
+ $s = 19; continue;
+ /* } else { */ case 18:
+ val = new (jsType(typ))(srcVal.$get, srcVal.$set);
+ /* } */ case 19:
+ case 13:
+ $s = 12; continue;
+ /* } else if (_1 === (25)) { */ case 9:
+ val = new (jsType(typ).ptr)();
+ copyStruct(val, srcVal, typ);
+ $s = 12; continue;
+ /* } else if ((_1 === (17)) || (_1 === (1)) || (_1 === (18)) || (_1 === (19)) || (_1 === (20)) || (_1 === (21)) || (_1 === (24)) || (_1 === (26))) { */ case 10:
+ val = v.ptr;
+ $s = 12; continue;
+ /* } else { */ case 11:
+ $panic(new ValueError.ptr("reflect.Convert", k));
+ /* } */ case 12:
+ case 5:
+ _r$6 = typ.common(); /* */ $s = 25; case 25: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; }
+ _r$7 = typ.Kind(); /* */ $s = 26; case 26: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; }
+ $24r$1 = new Value.ptr(_r$6, (val), (((new flag(v.flag).ro() | ((v.flag & 128) >>> 0)) >>> 0) | ((_r$7 >>> 0))) >>> 0);
+ $s = 27; case 27: return $24r$1;
+ /* */ } return; } var $f = {$blk: cvtDirect, $c: true, $r, $24r, $24r$1, _1, _2, _arg, _arg$1, _arg$2, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, k, slice, srcVal, typ, v, val, $s};return $f;
+ };
+ cvtSliceArrayPtr = function(v, t) {
+ var {$24r, _r, _r$1, _r$2, alen, array, slen, slice, t, v, $s, $r, $c} = $restore(this, {v, t});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ slice = $clone(v, Value).object();
+ slen = $parseInt(slice.$length) >> 0;
+ _r = t.Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _r$1 = _r.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ alen = _r$1;
+ if (alen > slen) {
+ $panic(new $String("reflect: cannot convert slice with length " + itoa.Itoa(slen) + " to pointer to array with length " + itoa.Itoa(alen)));
+ }
+ array = $sliceToGoArray(slice, jsType(t));
+ _r$2 = t.common(); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ $24r = new Value.ptr(_r$2, (array), (((v.flag & ~415) >>> 0) | 22) >>> 0);
+ $s = 4; case 4: return $24r;
+ /* */ } return; } var $f = {$blk: cvtSliceArrayPtr, $c: true, $r, $24r, _r, _r$1, _r$2, alen, array, slen, slice, t, v, $s};return $f;
+ };
+ Copy = function(dst, src) {
+ var {_r, _v, dk, dst, dstVal, sk, src, srcVal, stringCopy, $s, $r, $c} = $restore(this, {dst, src});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ dk = new flag(dst.flag).kind();
+ if (!((dk === 17)) && !((dk === 23))) {
+ $panic(new ValueError.ptr("reflect.Copy", dk));
+ }
+ if (dk === 17) {
+ new flag(dst.flag).mustBeAssignable();
+ }
+ new flag(dst.flag).mustBeExported();
+ sk = new flag(src.flag).kind();
+ stringCopy = false;
+ /* */ if (!((sk === 17)) && !((sk === 23))) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (!((sk === 17)) && !((sk === 23))) { */ case 1:
+ if (!(sk === 24)) { _v = false; $s = 3; continue s; }
+ _r = dst.typ.Elem().Kind(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _v = _r === 8; case 3:
+ stringCopy = _v;
+ if (!stringCopy) {
+ $panic(new ValueError.ptr("reflect.Copy", sk));
+ }
+ /* } */ case 2:
+ new flag(src.flag).mustBeExported();
+ /* */ if (!stringCopy) { $s = 5; continue; }
+ /* */ $s = 6; continue;
+ /* if (!stringCopy) { */ case 5:
+ $r = typesMustMatch("reflect.Copy", dst.typ.Elem(), src.typ.Elem()); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ /* } */ case 6:
+ dstVal = $clone(dst, Value).object();
+ if (dk === 17) {
+ dstVal = new (jsType(SliceOf(dst.typ.Elem())))(dstVal);
+ }
+ srcVal = $clone(src, Value).object();
+ if (sk === 17) {
+ srcVal = new (jsType(SliceOf(src.typ.Elem())))(srcVal);
+ }
+ if (stringCopy) {
+ $s = -1; return $parseInt($copyString(dstVal, srcVal)) >> 0;
+ }
+ $s = -1; return $parseInt($copySlice(dstVal, srcVal)) >> 0;
+ /* */ } return; } var $f = {$blk: Copy, $c: true, $r, _r, _v, dk, dst, dstVal, sk, src, srcVal, stringCopy, $s};return $f;
+ };
+ $pkg.Copy = Copy;
+ methodReceiver = function(op, v, i) {
+ var _$48, fn, i, m, m$1, ms, op, prop, rcvr, t, tt, v, x;
+ _$48 = ptrType$1.nil;
+ t = ptrType$20.nil;
+ fn = 0;
+ prop = "";
+ if (v.typ.Kind() === 20) {
+ tt = (v.typ.kindType);
+ if (i < 0 || i >= tt.methods.$length) {
+ $panic(new $String("reflect: internal error: invalid method index"));
+ }
+ m = (x = tt.methods, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]));
+ if (!$clone(tt.rtype.nameOff(m.name), name).isExported()) {
+ $panic(new $String("reflect: " + op + " of unexported method"));
+ }
+ t = (tt.rtype.typeOff(m.typ).kindType);
+ prop = $clone(tt.rtype.nameOff(m.name), name).name();
+ } else {
+ ms = v.typ.exportedMethods();
+ if (((i >>> 0)) >= ((ms.$length >>> 0))) {
+ $panic(new $String("reflect: internal error: invalid method index"));
+ }
+ m$1 = $clone(((i < 0 || i >= ms.$length) ? ($throwRuntimeError("index out of range"), undefined) : ms.$array[ms.$offset + i]), method);
+ if (!$clone(v.typ.nameOff(m$1.name), name).isExported()) {
+ $panic(new $String("reflect: " + op + " of unexported method"));
+ }
+ t = (v.typ.typeOff(m$1.mtyp).kindType);
+ prop = $internalize($methodSet(jsType(v.typ))[i].prop, $String);
+ }
+ rcvr = $clone(v, Value).object();
+ if (isWrapped(v.typ)) {
+ rcvr = new (jsType(v.typ))(rcvr);
+ }
+ fn = (rcvr[$externalize(prop, $String)]);
+ return [_$48, t, fn];
+ };
+ valueInterface = function(v, safe) {
+ var {_r, safe, v, $s, $r, $c} = $restore(this, {v, safe});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ if (v.flag === 0) {
+ $panic(new ValueError.ptr("reflect.Value.Interface", 0));
+ }
+ if (safe && !((((v.flag & 96) >>> 0) === 0))) {
+ $panic(new $String("reflect.Value.Interface: cannot return value obtained from unexported field or method"));
+ }
+ /* */ if (!((((v.flag & 512) >>> 0) === 0))) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (!((((v.flag & 512) >>> 0) === 0))) { */ case 1:
+ _r = makeMethodValue("Interface", $clone(v, Value)); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ v = _r;
+ /* } */ case 2:
+ if (isWrapped(v.typ)) {
+ $s = -1; return ((new (jsType(v.typ))($clone(v, Value).object())));
+ }
+ $s = -1; return (($clone(v, Value).object()));
+ /* */ } return; } var $f = {$blk: valueInterface, $c: true, $r, _r, safe, v, $s};return $f;
+ };
+ ifaceE2I = function(t, src, dst) {
+ var dst, src, t;
+ dst.$set(src);
+ };
+ makeMethodValue = function(op, v) {
+ var {$24r, _r, _tuple, fn, fv, op, rcvr, v, $s, $r, $c} = $restore(this, {op, v});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ fn = [fn];
+ rcvr = [rcvr];
+ if (((v.flag & 512) >>> 0) === 0) {
+ $panic(new $String("reflect: internal error: invalid use of makePartialFunc"));
+ }
+ _tuple = methodReceiver(op, $clone(v, Value), ((v.flag >> 0)) >> 10 >> 0);
+ fn[0] = _tuple[2];
+ rcvr[0] = $clone(v, Value).object();
+ if (isWrapped(v.typ)) {
+ rcvr[0] = new (jsType(v.typ))(rcvr[0]);
+ }
+ fv = js.MakeFunc((function(fn, rcvr) { return function(this$1, arguments$1) {
+ var arguments$1, this$1;
+ return new $jsObjectPtr(fn[0].apply(rcvr[0], $externalize(arguments$1, sliceType$16)));
+ }; })(fn, rcvr));
+ _r = $clone(v, Value).Type().common(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = new Value.ptr(_r, (fv), (new flag(v.flag).ro() | 19) >>> 0);
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: makeMethodValue, $c: true, $r, $24r, _r, _tuple, fn, fv, op, rcvr, v, $s};return $f;
+ };
+ rtype.ptr.prototype.pointers = function() {
+ var _1, t;
+ t = this;
+ _1 = t.Kind();
+ if ((_1 === (22)) || (_1 === (21)) || (_1 === (18)) || (_1 === (19)) || (_1 === (25)) || (_1 === (17))) {
+ return true;
+ } else {
+ return false;
+ }
+ };
+ rtype.prototype.pointers = function() { return this.$val.pointers(); };
+ rtype.ptr.prototype.Comparable = function() {
+ var {$24r, _1, _r, _r$1, i, t, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ t = this;
+ _1 = t.Kind();
+ /* */ if ((_1 === (19)) || (_1 === (23)) || (_1 === (21))) { $s = 2; continue; }
+ /* */ if (_1 === (17)) { $s = 3; continue; }
+ /* */ if (_1 === (25)) { $s = 4; continue; }
+ /* */ $s = 5; continue;
+ /* if ((_1 === (19)) || (_1 === (23)) || (_1 === (21))) { */ case 2:
+ $s = -1; return false;
+ /* } else if (_1 === (17)) { */ case 3:
+ _r = t.Elem().Comparable(); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 7; case 7: return $24r;
+ /* } else if (_1 === (25)) { */ case 4:
+ i = 0;
+ /* while (true) { */ case 8:
+ /* if (!(i < t.NumField())) { break; } */ if(!(i < t.NumField())) { $s = 9; continue; }
+ _r$1 = t.Field(i).Type.Comparable(); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ /* */ if (!_r$1) { $s = 10; continue; }
+ /* */ $s = 11; continue;
+ /* if (!_r$1) { */ case 10:
+ $s = -1; return false;
+ /* } */ case 11:
+ i = i + (1) >> 0;
+ $s = 8; continue;
+ case 9:
+ /* } */ case 5:
+ case 1:
+ $s = -1; return true;
+ /* */ } return; } var $f = {$blk: rtype.ptr.prototype.Comparable, $c: true, $r, $24r, _1, _r, _r$1, i, t, $s};return $f;
+ };
+ rtype.prototype.Comparable = function() { return this.$val.Comparable(); };
+ rtype.ptr.prototype.Method = function(i) {
+ var {_i, _i$1, _r, _ref, _ref$1, arg, fl, fn, ft, i, in$1, m, methods, mt, mtyp, out, p, pname, prop, ret, t, tt, $s, $r, $c} = $restore(this, {i});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ prop = [prop];
+ m = new Method.ptr("", "", $ifaceNil, new Value.ptr(ptrType$1.nil, 0, 0), 0);
+ t = this;
+ if (t.Kind() === 20) {
+ tt = (t.kindType);
+ Method.copy(m, tt.Method(i));
+ $s = -1; return m;
+ }
+ methods = t.exportedMethods();
+ if (i < 0 || i >= methods.$length) {
+ $panic(new $String("reflect: Method index out of range"));
+ }
+ p = $clone(((i < 0 || i >= methods.$length) ? ($throwRuntimeError("index out of range"), undefined) : methods.$array[methods.$offset + i]), method);
+ pname = $clone(t.nameOff(p.name), name);
+ m.Name = $clone(pname, name).name();
+ fl = 19;
+ mtyp = t.typeOff(p.mtyp);
+ ft = (mtyp.kindType);
+ in$1 = $makeSlice(sliceType$17, 0, (1 + ft.in$().$length >> 0));
+ in$1 = $append(in$1, t);
+ _ref = ft.in$();
+ _i = 0;
+ while (true) {
+ if (!(_i < _ref.$length)) { break; }
+ arg = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]);
+ in$1 = $append(in$1, arg);
+ _i++;
+ }
+ out = $makeSlice(sliceType$17, 0, ft.out().$length);
+ _ref$1 = ft.out();
+ _i$1 = 0;
+ while (true) {
+ if (!(_i$1 < _ref$1.$length)) { break; }
+ ret = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]);
+ out = $append(out, ret);
+ _i$1++;
+ }
+ _r = FuncOf(in$1, out, ft.rtype.IsVariadic()); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ mt = _r;
+ m.Type = mt;
+ prop[0] = $internalize($methodSet(t.jsType)[i].prop, $String);
+ fn = js.MakeFunc((function(prop) { return function(this$1, arguments$1) {
+ var arguments$1, rcvr, this$1;
+ rcvr = (0 >= arguments$1.$length ? ($throwRuntimeError("index out of range"), undefined) : arguments$1.$array[arguments$1.$offset + 0]);
+ return new $jsObjectPtr(rcvr[$externalize(prop[0], $String)].apply(rcvr, $externalize($subslice(arguments$1, 1), sliceType$16)));
+ }; })(prop));
+ m.Func = new Value.ptr($assertType(mt, ptrType$1), (fn), fl);
+ m.Index = i;
+ Method.copy(m, m);
+ $s = -1; return m;
+ /* */ } return; } var $f = {$blk: rtype.ptr.prototype.Method, $c: true, $r, _i, _i$1, _r, _ref, _ref$1, arg, fl, fn, ft, i, in$1, m, methods, mt, mtyp, out, p, pname, prop, ret, t, tt, $s};return $f;
+ };
+ rtype.prototype.Method = function(i) { return this.$val.Method(i); };
+ Value.ptr.prototype.object = function() {
+ var _1, newVal, v, val;
+ v = this;
+ if ((v.typ.Kind() === 17) || (v.typ.Kind() === 25)) {
+ return v.ptr;
+ }
+ if (!((((v.flag & 128) >>> 0) === 0))) {
+ val = v.ptr.$get();
+ if (!(val === $ifaceNil) && !(val.constructor === jsType(v.typ))) {
+ switch (0) { default:
+ _1 = v.typ.Kind();
+ if ((_1 === (11)) || (_1 === (6))) {
+ val = new (jsType(v.typ))(val.$high, val.$low);
+ } else if ((_1 === (15)) || (_1 === (16))) {
+ val = new (jsType(v.typ))(val.$real, val.$imag);
+ } else if (_1 === (23)) {
+ if (val === val.constructor.nil) {
+ val = jsType(v.typ).nil;
+ break;
+ }
+ newVal = new (jsType(v.typ))(val.$array);
+ newVal.$offset = val.$offset;
+ newVal.$length = val.$length;
+ newVal.$capacity = val.$capacity;
+ val = newVal;
+ }
+ }
+ }
+ return val;
+ }
+ return v.ptr;
+ };
+ Value.prototype.object = function() { return this.$val.object(); };
+ Value.ptr.prototype.assignTo = function(context, dst, target) {
+ var {_r, _r$1, _r$2, context, dst, fl, target, v, x, $s, $r, $c} = $restore(this, {context, dst, target});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ /* */ if (!((((v.flag & 512) >>> 0) === 0))) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (!((((v.flag & 512) >>> 0) === 0))) { */ case 1:
+ _r = makeMethodValue(context, $clone(v, Value)); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ v = _r;
+ /* } */ case 2:
+ _r$1 = directlyAssignable(dst, v.typ); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ /* */ if (_r$1) { $s = 5; continue; }
+ /* */ if (implements$1(dst, v.typ)) { $s = 6; continue; }
+ /* */ $s = 7; continue;
+ /* if (_r$1) { */ case 5:
+ fl = (((v.flag & 384) >>> 0) | new flag(v.flag).ro()) >>> 0;
+ fl = (fl | (((dst.Kind() >>> 0)))) >>> 0;
+ $s = -1; return new Value.ptr(dst, v.ptr, fl);
+ /* } else if (implements$1(dst, v.typ)) { */ case 6:
+ if (target === 0) {
+ target = unsafe_New(dst);
+ }
+ _r$2 = valueInterface($clone(v, Value), false); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ x = _r$2;
+ if (dst.NumMethod() === 0) {
+ (target).$set(x);
+ } else {
+ ifaceE2I(dst, x, target);
+ }
+ $s = -1; return new Value.ptr(dst, target, 148);
+ /* } */ case 7:
+ case 4:
+ $panic(new $String(context + ": value of type " + v.typ.String() + " is not assignable to type " + dst.String()));
+ $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0);
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.assignTo, $c: true, $r, _r, _r$1, _r$2, context, dst, fl, target, v, x, $s};return $f;
+ };
+ Value.prototype.assignTo = function(context, dst, target) { return this.$val.assignTo(context, dst, target); };
+ Value.ptr.prototype.call = function(op, in$1) {
+ var {$24r, _1, _arg, _arg$1, _arg$2, _arg$3, _i, _i$1, _i$2, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _tmp, _tmp$1, _tuple, arg, argsArray, elem, fn, i, i$1, i$2, i$3, in$1, isSlice, m, n, nin, nout, op, origIn, rcvr, results, ret, slice, t, targ, v, x, x$1, x$2, xt, xt$1, $s, $r, $c} = $restore(this, {op, in$1});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ t = ptrType$20.nil;
+ fn = 0;
+ rcvr = null;
+ if (!((((v.flag & 512) >>> 0) === 0))) {
+ _tuple = methodReceiver(op, $clone(v, Value), ((v.flag >> 0)) >> 10 >> 0);
+ t = _tuple[1];
+ fn = _tuple[2];
+ rcvr = $clone(v, Value).object();
+ if (isWrapped(v.typ)) {
+ rcvr = new (jsType(v.typ))(rcvr);
+ }
+ } else {
+ t = (v.typ.kindType);
+ fn = ($clone(v, Value).object());
+ rcvr = undefined;
+ }
+ if (fn === 0) {
+ $panic(new $String("reflect.Value.Call: call of nil function"));
+ }
+ isSlice = op === "CallSlice";
+ n = t.rtype.NumIn();
+ if (isSlice) {
+ if (!t.rtype.IsVariadic()) {
+ $panic(new $String("reflect: CallSlice of non-variadic function"));
+ }
+ if (in$1.$length < n) {
+ $panic(new $String("reflect: CallSlice with too few input arguments"));
+ }
+ if (in$1.$length > n) {
+ $panic(new $String("reflect: CallSlice with too many input arguments"));
+ }
+ } else {
+ if (t.rtype.IsVariadic()) {
+ n = n - (1) >> 0;
+ }
+ if (in$1.$length < n) {
+ $panic(new $String("reflect: Call with too few input arguments"));
+ }
+ if (!t.rtype.IsVariadic() && in$1.$length > n) {
+ $panic(new $String("reflect: Call with too many input arguments"));
+ }
+ }
+ _ref = in$1;
+ _i = 0;
+ while (true) {
+ if (!(_i < _ref.$length)) { break; }
+ x = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]);
+ if ($clone(x, Value).Kind() === 0) {
+ $panic(new $String("reflect: " + op + " using zero Value argument"));
+ }
+ _i++;
+ }
+ i = 0;
+ /* while (true) { */ case 1:
+ /* if (!(i < n)) { break; } */ if(!(i < n)) { $s = 2; continue; }
+ _tmp = $clone(((i < 0 || i >= in$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : in$1.$array[in$1.$offset + i]), Value).Type();
+ _tmp$1 = t.rtype.In(i);
+ xt = _tmp;
+ targ = _tmp$1;
+ _r = xt.AssignableTo(targ); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ /* */ if (!_r) { $s = 3; continue; }
+ /* */ $s = 4; continue;
+ /* if (!_r) { */ case 3:
+ _r$1 = xt.String(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _r$2 = targ.String(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ $panic(new $String("reflect: " + op + " using " + _r$1 + " as type " + _r$2));
+ /* } */ case 4:
+ i = i + (1) >> 0;
+ $s = 1; continue;
+ case 2:
+ /* */ if (!isSlice && t.rtype.IsVariadic()) { $s = 8; continue; }
+ /* */ $s = 9; continue;
+ /* if (!isSlice && t.rtype.IsVariadic()) { */ case 8:
+ m = in$1.$length - n >> 0;
+ _r$3 = MakeSlice(t.rtype.In(n), m, m); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
+ slice = _r$3;
+ _r$4 = t.rtype.In(n).Elem(); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
+ elem = _r$4;
+ i$1 = 0;
+ /* while (true) { */ case 12:
+ /* if (!(i$1 < m)) { break; } */ if(!(i$1 < m)) { $s = 13; continue; }
+ x$2 = (x$1 = n + i$1 >> 0, ((x$1 < 0 || x$1 >= in$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : in$1.$array[in$1.$offset + x$1]));
+ xt$1 = $clone(x$2, Value).Type();
+ _r$5 = xt$1.AssignableTo(elem); /* */ $s = 16; case 16: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
+ /* */ if (!_r$5) { $s = 14; continue; }
+ /* */ $s = 15; continue;
+ /* if (!_r$5) { */ case 14:
+ _r$6 = xt$1.String(); /* */ $s = 17; case 17: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; }
+ _r$7 = elem.String(); /* */ $s = 18; case 18: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; }
+ $panic(new $String("reflect: cannot use " + _r$6 + " as type " + _r$7 + " in " + op));
+ /* } */ case 15:
+ _r$8 = $clone(slice, Value).Index(i$1); /* */ $s = 19; case 19: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; }
+ $r = $clone(_r$8, Value).Set($clone(x$2, Value)); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ i$1 = i$1 + (1) >> 0;
+ $s = 12; continue;
+ case 13:
+ origIn = in$1;
+ in$1 = $makeSlice(sliceType$7, (n + 1 >> 0));
+ $copySlice($subslice(in$1, 0, n), origIn);
+ ((n < 0 || n >= in$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : in$1.$array[in$1.$offset + n] = slice);
+ /* } */ case 9:
+ nin = in$1.$length;
+ if (!((nin === t.rtype.NumIn()))) {
+ $panic(new $String("reflect.Value.Call: wrong argument count"));
+ }
+ nout = t.rtype.NumOut();
+ argsArray = new ($global.Array)(t.rtype.NumIn());
+ _ref$1 = in$1;
+ _i$1 = 0;
+ /* while (true) { */ case 21:
+ /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 22; continue; }
+ i$2 = _i$1;
+ arg = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]);
+ _arg = t.rtype.In(i$2);
+ _r$9 = t.rtype.In(i$2).common(); /* */ $s = 23; case 23: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; }
+ _arg$1 = _r$9;
+ _arg$2 = 0;
+ _r$10 = $clone(arg, Value).assignTo("reflect.Value.Call", _arg$1, _arg$2); /* */ $s = 24; case 24: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; }
+ _r$11 = $clone(_r$10, Value).object(); /* */ $s = 25; case 25: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; }
+ _arg$3 = _r$11;
+ _r$12 = unwrapJsObject(_arg, _arg$3); /* */ $s = 26; case 26: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; }
+ argsArray[i$2] = _r$12;
+ _i$1++;
+ $s = 21; continue;
+ case 22:
+ _r$13 = callHelper(new sliceType$4([new $jsObjectPtr(fn), new $jsObjectPtr(rcvr), new $jsObjectPtr(argsArray)])); /* */ $s = 27; case 27: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; }
+ results = _r$13;
+ _1 = nout;
+ /* */ if (_1 === (0)) { $s = 29; continue; }
+ /* */ if (_1 === (1)) { $s = 30; continue; }
+ /* */ $s = 31; continue;
+ /* if (_1 === (0)) { */ case 29:
+ $s = -1; return sliceType$7.nil;
+ /* } else if (_1 === (1)) { */ case 30:
+ _r$14 = makeValue(t.rtype.Out(0), wrapJsObject(t.rtype.Out(0), results), 0); /* */ $s = 33; case 33: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; }
+ $24r = new sliceType$7([$clone(_r$14, Value)]);
+ $s = 34; case 34: return $24r;
+ /* } else { */ case 31:
+ ret = $makeSlice(sliceType$7, nout);
+ _ref$2 = ret;
+ _i$2 = 0;
+ /* while (true) { */ case 35:
+ /* if (!(_i$2 < _ref$2.$length)) { break; } */ if(!(_i$2 < _ref$2.$length)) { $s = 36; continue; }
+ i$3 = _i$2;
+ _r$15 = makeValue(t.rtype.Out(i$3), wrapJsObject(t.rtype.Out(i$3), results[i$3]), 0); /* */ $s = 37; case 37: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; }
+ ((i$3 < 0 || i$3 >= ret.$length) ? ($throwRuntimeError("index out of range"), undefined) : ret.$array[ret.$offset + i$3] = _r$15);
+ _i$2++;
+ $s = 35; continue;
+ case 36:
+ $s = -1; return ret;
+ /* } */ case 32:
+ case 28:
+ $s = -1; return sliceType$7.nil;
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.call, $c: true, $r, $24r, _1, _arg, _arg$1, _arg$2, _arg$3, _i, _i$1, _i$2, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _tmp, _tmp$1, _tuple, arg, argsArray, elem, fn, i, i$1, i$2, i$3, in$1, isSlice, m, n, nin, nout, op, origIn, rcvr, results, ret, slice, t, targ, v, x, x$1, x$2, xt, xt$1, $s};return $f;
+ };
+ Value.prototype.call = function(op, in$1) { return this.$val.call(op, in$1); };
+ Value.ptr.prototype.Cap = function() {
+ var _1, k, v;
+ v = this;
+ k = new flag(v.flag).kind();
+ _1 = k;
+ if (_1 === (17)) {
+ return v.typ.Len();
+ } else if ((_1 === (18)) || (_1 === (23))) {
+ return $parseInt($clone(v, Value).object().$capacity) >> 0;
+ }
+ $panic(new ValueError.ptr("reflect.Value.Cap", k));
+ };
+ Value.prototype.Cap = function() { return this.$val.Cap(); };
+ wrapJsObject = function(typ, val) {
+ var typ, val;
+ if ($interfaceIsEqual(typ, jsObjectPtr)) {
+ return new (jsType(jsObjectPtr))(val);
+ }
+ return val;
+ };
+ unwrapJsObject = function(typ, val) {
+ var typ, val;
+ if ($interfaceIsEqual(typ, jsObjectPtr)) {
+ return val.object;
+ }
+ return val;
+ };
+ Value.ptr.prototype.Elem = function() {
+ var {$24r, _1, _r, fl, k, tt, typ, v, val, val$1, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ k = new flag(v.flag).kind();
+ _1 = k;
+ /* */ if (_1 === (20)) { $s = 2; continue; }
+ /* */ if (_1 === (22)) { $s = 3; continue; }
+ /* */ $s = 4; continue;
+ /* if (_1 === (20)) { */ case 2:
+ val = $clone(v, Value).object();
+ if (val === $ifaceNil) {
+ $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0);
+ }
+ typ = reflectType(val.constructor);
+ _r = makeValue(typ, val.$val, new flag(v.flag).ro()); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 7; case 7: return $24r;
+ /* } else if (_1 === (22)) { */ case 3:
+ if ($clone(v, Value).IsNil()) {
+ $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0);
+ }
+ val$1 = $clone(v, Value).object();
+ tt = (v.typ.kindType);
+ fl = (((((v.flag & 96) >>> 0) | 128) >>> 0) | 256) >>> 0;
+ fl = (fl | (((tt.elem.Kind() >>> 0)))) >>> 0;
+ $s = -1; return new Value.ptr(tt.elem, (wrapJsObject(tt.elem, val$1)), fl);
+ /* } else { */ case 4:
+ $panic(new ValueError.ptr("reflect.Value.Elem", k));
+ /* } */ case 5:
+ case 1:
+ $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0);
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.Elem, $c: true, $r, $24r, _1, _r, fl, k, tt, typ, v, val, val$1, $s};return $f;
+ };
+ Value.prototype.Elem = function() { return this.$val.Elem(); };
+ Value.ptr.prototype.Field = function(i) {
+ var {$24r, _r, _r$1, _r$2, field, fl, i, jsTag, o, prop, s, tag, tt, typ, v, x, x$1, $s, $r, $c} = $restore(this, {i});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ jsTag = [jsTag];
+ prop = [prop];
+ s = [s];
+ typ = [typ];
+ v = this;
+ if (!((new flag(v.flag).kind() === 25))) {
+ $panic(new ValueError.ptr("reflect.Value.Field", new flag(v.flag).kind()));
+ }
+ tt = (v.typ.kindType);
+ if (((i >>> 0)) >= ((tt.fields.$length >>> 0))) {
+ $panic(new $String("reflect: Field index out of range"));
+ }
+ prop[0] = $internalize(jsType(v.typ).fields[i].prop, $String);
+ field = (x = tt.fields, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]));
+ typ[0] = field.typ;
+ fl = (((v.flag & 416) >>> 0) | ((typ[0].Kind() >>> 0))) >>> 0;
+ if (!$clone(field.name, name).isExported()) {
+ if (field.embedded()) {
+ fl = (fl | (64)) >>> 0;
+ } else {
+ fl = (fl | (32)) >>> 0;
+ }
+ }
+ tag = $clone((x$1 = tt.fields, ((i < 0 || i >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i])).name, name).tag();
+ /* */ if (!(tag === "") && !((i === 0))) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (!(tag === "") && !((i === 0))) { */ case 1:
+ jsTag[0] = getJsTag(tag);
+ /* */ if (!(jsTag[0] === "")) { $s = 3; continue; }
+ /* */ $s = 4; continue;
+ /* if (!(jsTag[0] === "")) { */ case 3:
+ /* while (true) { */ case 5:
+ o = [o];
+ _r = $clone(v, Value).Field(0); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ v = _r;
+ /* */ if (v.typ === jsObjectPtr) { $s = 8; continue; }
+ /* */ $s = 9; continue;
+ /* if (v.typ === jsObjectPtr) { */ case 8:
+ o[0] = $clone(v, Value).object().object;
+ $s = -1; return new Value.ptr(typ[0], (new (jsType(PtrTo(typ[0])))((function(jsTag, o, prop, s, typ) { return function() {
+ return $internalize(o[0][$externalize(jsTag[0], $String)], jsType(typ[0]));
+ }; })(jsTag, o, prop, s, typ), (function(jsTag, o, prop, s, typ) { return function(x$2) {
+ var x$2;
+ o[0][$externalize(jsTag[0], $String)] = $externalize(x$2, jsType(typ[0]));
+ }; })(jsTag, o, prop, s, typ))), fl);
+ /* } */ case 9:
+ /* */ if (v.typ.Kind() === 22) { $s = 10; continue; }
+ /* */ $s = 11; continue;
+ /* if (v.typ.Kind() === 22) { */ case 10:
+ _r$1 = $clone(v, Value).Elem(); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ v = _r$1;
+ /* } */ case 11:
+ $s = 5; continue;
+ case 6:
+ /* } */ case 4:
+ /* } */ case 2:
+ s[0] = v.ptr;
+ /* */ if (!((((fl & 128) >>> 0) === 0)) && !((typ[0].Kind() === 17)) && !((typ[0].Kind() === 25))) { $s = 13; continue; }
+ /* */ $s = 14; continue;
+ /* if (!((((fl & 128) >>> 0) === 0)) && !((typ[0].Kind() === 17)) && !((typ[0].Kind() === 25))) { */ case 13:
+ $s = -1; return new Value.ptr(typ[0], (new (jsType(PtrTo(typ[0])))((function(jsTag, prop, s, typ) { return function() {
+ return wrapJsObject(typ[0], s[0][$externalize(prop[0], $String)]);
+ }; })(jsTag, prop, s, typ), (function(jsTag, prop, s, typ) { return function(x$2) {
+ var x$2;
+ s[0][$externalize(prop[0], $String)] = unwrapJsObject(typ[0], x$2);
+ }; })(jsTag, prop, s, typ))), fl);
+ /* } */ case 14:
+ _r$2 = makeValue(typ[0], wrapJsObject(typ[0], s[0][$externalize(prop[0], $String)]), fl); /* */ $s = 15; case 15: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ $24r = _r$2;
+ $s = 16; case 16: return $24r;
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.Field, $c: true, $r, $24r, _r, _r$1, _r$2, field, fl, i, jsTag, o, prop, s, tag, tt, typ, v, x, x$1, $s};return $f;
+ };
+ Value.prototype.Field = function(i) { return this.$val.Field(i); };
+ getJsTag = function(tag) {
+ var _tuple, i, name$1, qvalue, tag, value;
+ while (true) {
+ if (!(!(tag === ""))) { break; }
+ i = 0;
+ while (true) {
+ if (!(i < tag.length && (tag.charCodeAt(i) === 32))) { break; }
+ i = i + (1) >> 0;
+ }
+ tag = $substring(tag, i);
+ if (tag === "") {
+ break;
+ }
+ i = 0;
+ while (true) {
+ if (!(i < tag.length && !((tag.charCodeAt(i) === 32)) && !((tag.charCodeAt(i) === 58)) && !((tag.charCodeAt(i) === 34)))) { break; }
+ i = i + (1) >> 0;
+ }
+ if ((i + 1 >> 0) >= tag.length || !((tag.charCodeAt(i) === 58)) || !((tag.charCodeAt((i + 1 >> 0)) === 34))) {
+ break;
+ }
+ name$1 = ($substring(tag, 0, i));
+ tag = $substring(tag, (i + 1 >> 0));
+ i = 1;
+ while (true) {
+ if (!(i < tag.length && !((tag.charCodeAt(i) === 34)))) { break; }
+ if (tag.charCodeAt(i) === 92) {
+ i = i + (1) >> 0;
+ }
+ i = i + (1) >> 0;
+ }
+ if (i >= tag.length) {
+ break;
+ }
+ qvalue = ($substring(tag, 0, (i + 1 >> 0)));
+ tag = $substring(tag, (i + 1 >> 0));
+ if (name$1 === "js") {
+ _tuple = strconv.Unquote(qvalue);
+ value = _tuple[0];
+ return value;
+ }
+ }
+ return "";
+ };
+ Value.ptr.prototype.Index = function(i) {
+ var {$24r, $24r$1, _1, _r, _r$1, a, a$1, c, fl, fl$1, fl$2, i, k, s, str, tt, tt$1, typ, typ$1, v, $s, $r, $c} = $restore(this, {i});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ a = [a];
+ a$1 = [a$1];
+ c = [c];
+ i = [i];
+ typ = [typ];
+ typ$1 = [typ$1];
+ v = this;
+ k = new flag(v.flag).kind();
+ _1 = k;
+ /* */ if (_1 === (17)) { $s = 2; continue; }
+ /* */ if (_1 === (23)) { $s = 3; continue; }
+ /* */ if (_1 === (24)) { $s = 4; continue; }
+ /* */ $s = 5; continue;
+ /* if (_1 === (17)) { */ case 2:
+ tt = (v.typ.kindType);
+ if (i[0] < 0 || i[0] > ((tt.len >> 0))) {
+ $panic(new $String("reflect: array index out of range"));
+ }
+ typ[0] = tt.elem;
+ fl = (((((v.flag & 384) >>> 0) | new flag(v.flag).ro()) >>> 0) | ((typ[0].Kind() >>> 0))) >>> 0;
+ a[0] = v.ptr;
+ /* */ if (!((((fl & 128) >>> 0) === 0)) && !((typ[0].Kind() === 17)) && !((typ[0].Kind() === 25))) { $s = 7; continue; }
+ /* */ $s = 8; continue;
+ /* if (!((((fl & 128) >>> 0) === 0)) && !((typ[0].Kind() === 17)) && !((typ[0].Kind() === 25))) { */ case 7:
+ $s = -1; return new Value.ptr(typ[0], (new (jsType(PtrTo(typ[0])))((function(a, a$1, c, i, typ, typ$1) { return function() {
+ return wrapJsObject(typ[0], a[0][i[0]]);
+ }; })(a, a$1, c, i, typ, typ$1), (function(a, a$1, c, i, typ, typ$1) { return function(x) {
+ var x;
+ a[0][i[0]] = unwrapJsObject(typ[0], x);
+ }; })(a, a$1, c, i, typ, typ$1))), fl);
+ /* } */ case 8:
+ _r = makeValue(typ[0], wrapJsObject(typ[0], a[0][i[0]]), fl); /* */ $s = 9; case 9: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 10; case 10: return $24r;
+ /* } else if (_1 === (23)) { */ case 3:
+ s = $clone(v, Value).object();
+ if (i[0] < 0 || i[0] >= ($parseInt(s.$length) >> 0)) {
+ $panic(new $String("reflect: slice index out of range"));
+ }
+ tt$1 = (v.typ.kindType);
+ typ$1[0] = tt$1.elem;
+ fl$1 = (((384 | new flag(v.flag).ro()) >>> 0) | ((typ$1[0].Kind() >>> 0))) >>> 0;
+ i[0] = i[0] + (($parseInt(s.$offset) >> 0)) >> 0;
+ a$1[0] = s.$array;
+ /* */ if (!((((fl$1 & 128) >>> 0) === 0)) && !((typ$1[0].Kind() === 17)) && !((typ$1[0].Kind() === 25))) { $s = 11; continue; }
+ /* */ $s = 12; continue;
+ /* if (!((((fl$1 & 128) >>> 0) === 0)) && !((typ$1[0].Kind() === 17)) && !((typ$1[0].Kind() === 25))) { */ case 11:
+ $s = -1; return new Value.ptr(typ$1[0], (new (jsType(PtrTo(typ$1[0])))((function(a, a$1, c, i, typ, typ$1) { return function() {
+ return wrapJsObject(typ$1[0], a$1[0][i[0]]);
+ }; })(a, a$1, c, i, typ, typ$1), (function(a, a$1, c, i, typ, typ$1) { return function(x) {
+ var x;
+ a$1[0][i[0]] = unwrapJsObject(typ$1[0], x);
+ }; })(a, a$1, c, i, typ, typ$1))), fl$1);
+ /* } */ case 12:
+ _r$1 = makeValue(typ$1[0], wrapJsObject(typ$1[0], a$1[0][i[0]]), fl$1); /* */ $s = 13; case 13: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ $24r$1 = _r$1;
+ $s = 14; case 14: return $24r$1;
+ /* } else if (_1 === (24)) { */ case 4:
+ str = (v.ptr).$get();
+ if (i[0] < 0 || i[0] >= str.length) {
+ $panic(new $String("reflect: string index out of range"));
+ }
+ fl$2 = (((new flag(v.flag).ro() | 8) >>> 0) | 128) >>> 0;
+ c[0] = str.charCodeAt(i[0]);
+ $s = -1; return new Value.ptr(uint8Type, ((c.$ptr || (c.$ptr = new ptrType$13(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, c)))), fl$2);
+ /* } else { */ case 5:
+ $panic(new ValueError.ptr("reflect.Value.Index", k));
+ /* } */ case 6:
+ case 1:
+ $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0);
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.Index, $c: true, $r, $24r, $24r$1, _1, _r, _r$1, a, a$1, c, fl, fl$1, fl$2, i, k, s, str, tt, tt$1, typ, typ$1, v, $s};return $f;
+ };
+ Value.prototype.Index = function(i) { return this.$val.Index(i); };
+ Value.ptr.prototype.InterfaceData = function() {
+ var v;
+ v = this;
+ $panic(errors.New("InterfaceData is not supported by GopherJS"));
+ };
+ Value.prototype.InterfaceData = function() { return this.$val.InterfaceData(); };
+ Value.ptr.prototype.IsNil = function() {
+ var _1, k, v;
+ v = this;
+ k = new flag(v.flag).kind();
+ _1 = k;
+ if ((_1 === (22)) || (_1 === (23))) {
+ return $clone(v, Value).object() === jsType(v.typ).nil;
+ } else if (_1 === (18)) {
+ return $clone(v, Value).object() === $chanNil;
+ } else if (_1 === (19)) {
+ return $clone(v, Value).object() === $throwNilPointerError;
+ } else if (_1 === (21)) {
+ return $clone(v, Value).object() === false;
+ } else if (_1 === (20)) {
+ return $clone(v, Value).object() === $ifaceNil;
+ } else if (_1 === (26)) {
+ return $clone(v, Value).object() === 0;
+ } else {
+ $panic(new ValueError.ptr("reflect.Value.IsNil", k));
+ }
+ };
+ Value.prototype.IsNil = function() { return this.$val.IsNil(); };
+ Value.ptr.prototype.Len = function() {
+ var _1, k, v;
+ v = this;
+ k = new flag(v.flag).kind();
+ _1 = k;
+ if ((_1 === (17)) || (_1 === (24))) {
+ return $parseInt($clone(v, Value).object().length);
+ } else if (_1 === (23)) {
+ return $parseInt($clone(v, Value).object().$length) >> 0;
+ } else if (_1 === (18)) {
+ return $parseInt($clone(v, Value).object().$buffer.length) >> 0;
+ } else if (_1 === (21)) {
+ return $parseInt($keys($clone(v, Value).object()).length);
+ } else {
+ $panic(new ValueError.ptr("reflect.Value.Len", k));
+ }
+ };
+ Value.prototype.Len = function() { return this.$val.Len(); };
+ Value.ptr.prototype.Pointer = function() {
+ var _1, k, v;
+ v = this;
+ k = new flag(v.flag).kind();
+ _1 = k;
+ if ((_1 === (18)) || (_1 === (21)) || (_1 === (22)) || (_1 === (26))) {
+ if ($clone(v, Value).IsNil()) {
+ return 0;
+ }
+ return $clone(v, Value).object();
+ } else if (_1 === (19)) {
+ if ($clone(v, Value).IsNil()) {
+ return 0;
+ }
+ return 1;
+ } else if (_1 === (23)) {
+ if ($clone(v, Value).IsNil()) {
+ return 0;
+ }
+ return $clone(v, Value).object().$array;
+ } else {
+ $panic(new ValueError.ptr("reflect.Value.Pointer", k));
+ }
+ };
+ Value.prototype.Pointer = function() { return this.$val.Pointer(); };
+ Value.ptr.prototype.Set = function(x) {
+ var {_1, _r, _r$1, v, x, $s, $r, $c} = $restore(this, {x});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ new flag(v.flag).mustBeAssignable();
+ new flag(x.flag).mustBeExported();
+ _r = $clone(x, Value).assignTo("reflect.Set", v.typ, 0); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ x = _r;
+ /* */ if (!((((v.flag & 128) >>> 0) === 0))) { $s = 2; continue; }
+ /* */ $s = 3; continue;
+ /* if (!((((v.flag & 128) >>> 0) === 0))) { */ case 2:
+ _1 = v.typ.Kind();
+ /* */ if (_1 === (17)) { $s = 5; continue; }
+ /* */ if (_1 === (20)) { $s = 6; continue; }
+ /* */ if (_1 === (25)) { $s = 7; continue; }
+ /* */ $s = 8; continue;
+ /* if (_1 === (17)) { */ case 5:
+ jsType(v.typ).copy(v.ptr, x.ptr);
+ $s = 9; continue;
+ /* } else if (_1 === (20)) { */ case 6:
+ _r$1 = valueInterface($clone(x, Value), false); /* */ $s = 10; case 10: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ v.ptr.$set(_r$1);
+ $s = 9; continue;
+ /* } else if (_1 === (25)) { */ case 7:
+ copyStruct(v.ptr, x.ptr, v.typ);
+ $s = 9; continue;
+ /* } else { */ case 8:
+ v.ptr.$set($clone(x, Value).object());
+ /* } */ case 9:
+ case 4:
+ $s = -1; return;
+ /* } */ case 3:
+ v.ptr = x.ptr;
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.Set, $c: true, $r, _1, _r, _r$1, v, x, $s};return $f;
+ };
+ Value.prototype.Set = function(x) { return this.$val.Set(x); };
+ Value.ptr.prototype.SetBytes = function(x) {
+ var {_r, _r$1, _v, slice, typedSlice, v, x, $s, $r, $c} = $restore(this, {x});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ new flag(v.flag).mustBeAssignable();
+ new flag(v.flag).mustBe(23);
+ _r = v.typ.Elem().Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ /* */ if (!((_r === 8))) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (!((_r === 8))) { */ case 1:
+ $panic(new $String("reflect.Value.SetBytes of non-byte slice"));
+ /* } */ case 2:
+ slice = x;
+ if (!(v.typ.Name() === "")) { _v = true; $s = 6; continue s; }
+ _r$1 = v.typ.Elem().Name(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _v = !(_r$1 === ""); case 6:
+ /* */ if (_v) { $s = 4; continue; }
+ /* */ $s = 5; continue;
+ /* if (_v) { */ case 4:
+ typedSlice = new (jsType(v.typ))(slice.$array);
+ typedSlice.$offset = slice.$offset;
+ typedSlice.$length = slice.$length;
+ typedSlice.$capacity = slice.$capacity;
+ slice = typedSlice;
+ /* } */ case 5:
+ v.ptr.$set(slice);
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.SetBytes, $c: true, $r, _r, _r$1, _v, slice, typedSlice, v, x, $s};return $f;
+ };
+ Value.prototype.SetBytes = function(x) { return this.$val.SetBytes(x); };
+ Value.ptr.prototype.SetCap = function(n) {
+ var n, newSlice, s, v;
+ v = this;
+ new flag(v.flag).mustBeAssignable();
+ new flag(v.flag).mustBe(23);
+ s = v.ptr.$get();
+ if (n < ($parseInt(s.$length) >> 0) || n > ($parseInt(s.$capacity) >> 0)) {
+ $panic(new $String("reflect: slice capacity out of range in SetCap"));
+ }
+ newSlice = new (jsType(v.typ))(s.$array);
+ newSlice.$offset = s.$offset;
+ newSlice.$length = s.$length;
+ newSlice.$capacity = n;
+ v.ptr.$set(newSlice);
+ };
+ Value.prototype.SetCap = function(n) { return this.$val.SetCap(n); };
+ Value.ptr.prototype.SetLen = function(n) {
+ var n, newSlice, s, v;
+ v = this;
+ new flag(v.flag).mustBeAssignable();
+ new flag(v.flag).mustBe(23);
+ s = v.ptr.$get();
+ if (n < 0 || n > ($parseInt(s.$capacity) >> 0)) {
+ $panic(new $String("reflect: slice length out of range in SetLen"));
+ }
+ newSlice = new (jsType(v.typ))(s.$array);
+ newSlice.$offset = s.$offset;
+ newSlice.$length = n;
+ newSlice.$capacity = s.$capacity;
+ v.ptr.$set(newSlice);
+ };
+ Value.prototype.SetLen = function(n) { return this.$val.SetLen(n); };
+ Value.ptr.prototype.Slice = function(i, j) {
+ var {$24r, $24r$1, _1, _r, _r$1, cap, i, j, kind, s, str, tt, typ, v, $s, $r, $c} = $restore(this, {i, j});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ cap = 0;
+ typ = $ifaceNil;
+ s = null;
+ kind = new flag(v.flag).kind();
+ _1 = kind;
+ /* */ if (_1 === (17)) { $s = 2; continue; }
+ /* */ if (_1 === (23)) { $s = 3; continue; }
+ /* */ if (_1 === (24)) { $s = 4; continue; }
+ /* */ $s = 5; continue;
+ /* if (_1 === (17)) { */ case 2:
+ if (((v.flag & 256) >>> 0) === 0) {
+ $panic(new $String("reflect.Value.Slice: slice of unaddressable array"));
+ }
+ tt = (v.typ.kindType);
+ cap = ((tt.len >> 0));
+ typ = SliceOf(tt.elem);
+ s = new (jsType(typ))($clone(v, Value).object());
+ $s = 6; continue;
+ /* } else if (_1 === (23)) { */ case 3:
+ typ = v.typ;
+ s = $clone(v, Value).object();
+ cap = $parseInt(s.$capacity) >> 0;
+ $s = 6; continue;
+ /* } else if (_1 === (24)) { */ case 4:
+ str = (v.ptr).$get();
+ if (i < 0 || j < i || j > str.length) {
+ $panic(new $String("reflect.Value.Slice: string slice index out of bounds"));
+ }
+ _r = ValueOf(new $String($substring(str, i, j))); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 8; case 8: return $24r;
+ /* } else { */ case 5:
+ $panic(new ValueError.ptr("reflect.Value.Slice", kind));
+ /* } */ case 6:
+ case 1:
+ if (i < 0 || j < i || j > cap) {
+ $panic(new $String("reflect.Value.Slice: slice index out of bounds"));
+ }
+ _r$1 = makeValue(typ, $subslice(s, i, j), new flag(v.flag).ro()); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ $24r$1 = _r$1;
+ $s = 10; case 10: return $24r$1;
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.Slice, $c: true, $r, $24r, $24r$1, _1, _r, _r$1, cap, i, j, kind, s, str, tt, typ, v, $s};return $f;
+ };
+ Value.prototype.Slice = function(i, j) { return this.$val.Slice(i, j); };
+ Value.ptr.prototype.Slice3 = function(i, j, k) {
+ var {$24r, _1, _r, cap, i, j, k, kind, s, tt, typ, v, $s, $r, $c} = $restore(this, {i, j, k});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ v = this;
+ cap = 0;
+ typ = $ifaceNil;
+ s = null;
+ kind = new flag(v.flag).kind();
+ _1 = kind;
+ if (_1 === (17)) {
+ if (((v.flag & 256) >>> 0) === 0) {
+ $panic(new $String("reflect.Value.Slice: slice of unaddressable array"));
+ }
+ tt = (v.typ.kindType);
+ cap = ((tt.len >> 0));
+ typ = SliceOf(tt.elem);
+ s = new (jsType(typ))($clone(v, Value).object());
+ } else if (_1 === (23)) {
+ typ = v.typ;
+ s = $clone(v, Value).object();
+ cap = $parseInt(s.$capacity) >> 0;
+ } else {
+ $panic(new ValueError.ptr("reflect.Value.Slice3", kind));
+ }
+ if (i < 0 || j < i || k < j || k > cap) {
+ $panic(new $String("reflect.Value.Slice3: slice index out of bounds"));
+ }
+ _r = makeValue(typ, $subslice(s, i, j, k), new flag(v.flag).ro()); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: Value.ptr.prototype.Slice3, $c: true, $r, $24r, _1, _r, cap, i, j, k, kind, s, tt, typ, v, $s};return $f;
+ };
+ Value.prototype.Slice3 = function(i, j, k) { return this.$val.Slice3(i, j, k); };
+ Value.ptr.prototype.Close = function() {
+ var v;
+ v = this;
+ new flag(v.flag).mustBe(18);
+ new flag(v.flag).mustBeExported();
+ $close($clone(v, Value).object());
+ };
+ Value.prototype.Close = function() { return this.$val.Close(); };
+ chanrecv = function(ch, nb, val) {
+ var {_r, _tmp, _tmp$1, _tmp$2, _tmp$3, ch, comms, nb, received, recvRes, selectRes, selected, val, $s, $r, $c} = $restore(this, {ch, nb, val});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ selected = false;
+ received = false;
+ comms = new sliceType$18([new sliceType$16([ch])]);
+ if (nb) {
+ comms = $append(comms, new sliceType$16([]));
+ }
+ _r = selectHelper(new sliceType$4([comms])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ selectRes = _r;
+ if (nb && (($parseInt(selectRes[0]) >> 0) === 1)) {
+ _tmp = false;
+ _tmp$1 = false;
+ selected = _tmp;
+ received = _tmp$1;
+ $s = -1; return [selected, received];
+ }
+ recvRes = selectRes[1];
+ val.$set(recvRes[0]);
+ _tmp$2 = true;
+ _tmp$3 = !!(recvRes[1]);
+ selected = _tmp$2;
+ received = _tmp$3;
+ $s = -1; return [selected, received];
+ /* */ } return; } var $f = {$blk: chanrecv, $c: true, $r, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, ch, comms, nb, received, recvRes, selectRes, selected, val, $s};return $f;
+ };
+ chansend = function(ch, val, nb) {
+ var {_r, ch, comms, nb, selectRes, val, $s, $r, $c} = $restore(this, {ch, val, nb});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ comms = new sliceType$18([new sliceType$16([ch, val.$get()])]);
+ if (nb) {
+ comms = $append(comms, new sliceType$16([]));
+ }
+ _r = selectHelper(new sliceType$4([comms])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ selectRes = _r;
+ if (nb && (($parseInt(selectRes[0]) >> 0) === 1)) {
+ $s = -1; return false;
+ }
+ $s = -1; return true;
+ /* */ } return; } var $f = {$blk: chansend, $c: true, $r, _r, ch, comms, nb, selectRes, val, $s};return $f;
+ };
+ DeepEqual = function(a1, a2) {
+ var {$24r, _arg, _arg$1, _arg$2, _r, _r$1, _r$2, a1, a2, i1, i2, $s, $r, $c} = $restore(this, {a1, a2});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ i1 = a1;
+ i2 = a2;
+ if (i1 === i2) {
+ $s = -1; return true;
+ }
+ if (i1 === null || i2 === null || !(i1.constructor === i2.constructor)) {
+ $s = -1; return false;
+ }
+ _r = ValueOf(a1); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _arg = $clone(_r, Value);
+ _r$1 = ValueOf(a2); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _arg$1 = $clone(_r$1, Value);
+ _arg$2 = sliceType$19.nil;
+ _r$2 = deepValueEqualJs(_arg, _arg$1, _arg$2); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ $24r = _r$2;
+ $s = 4; case 4: return $24r;
+ /* */ } return; } var $f = {$blk: DeepEqual, $c: true, $r, $24r, _arg, _arg$1, _arg$2, _r, _r$1, _r$2, a1, a2, i1, i2, $s};return $f;
+ };
+ $pkg.DeepEqual = DeepEqual;
+ deepValueEqualJs = function(v1, v2, visited) {
+ var {$24r, $24r$1, $24r$2, _1, _2, _arg, _arg$1, _arg$10, _arg$11, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _arg$8, _arg$9, _i, _i$1, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _v, entry, i, i$1, k, keys, n, n$1, v1, v2, val1, val2, visited, $s, $r, $c} = $restore(this, {v1, v2, visited});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ if (!$clone(v1, Value).IsValid() || !$clone(v2, Value).IsValid()) {
+ $s = -1; return !$clone(v1, Value).IsValid() && !$clone(v2, Value).IsValid();
+ }
+ if (!($interfaceIsEqual($clone(v1, Value).Type(), $clone(v2, Value).Type()))) {
+ $s = -1; return false;
+ }
+ if ($interfaceIsEqual($clone(v1, Value).Type(), jsObjectPtr)) {
+ $s = -1; return unwrapJsObject(jsObjectPtr, $clone(v1, Value).object()) === unwrapJsObject(jsObjectPtr, $clone(v2, Value).object());
+ }
+ _1 = $clone(v1, Value).Kind();
+ if ((_1 === (17)) || (_1 === (21)) || (_1 === (23)) || (_1 === (25))) {
+ _ref = visited;
+ _i = 0;
+ while (true) {
+ if (!(_i < _ref.$length)) { break; }
+ entry = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), arrayType$6);
+ if (v1.ptr === entry[0] && v2.ptr === entry[1]) {
+ $s = -1; return true;
+ }
+ _i++;
+ }
+ visited = $append(visited, $toNativeArray($kindUnsafePointer, [v1.ptr, v2.ptr]));
+ }
+ _2 = $clone(v1, Value).Kind();
+ /* */ if ((_2 === (17)) || (_2 === (23))) { $s = 2; continue; }
+ /* */ if (_2 === (20)) { $s = 3; continue; }
+ /* */ if (_2 === (22)) { $s = 4; continue; }
+ /* */ if (_2 === (25)) { $s = 5; continue; }
+ /* */ if (_2 === (21)) { $s = 6; continue; }
+ /* */ if (_2 === (19)) { $s = 7; continue; }
+ /* */ if (_2 === (26)) { $s = 8; continue; }
+ /* */ $s = 9; continue;
+ /* if ((_2 === (17)) || (_2 === (23))) { */ case 2:
+ if ($clone(v1, Value).Kind() === 23) {
+ if (!($clone(v1, Value).IsNil() === $clone(v2, Value).IsNil())) {
+ $s = -1; return false;
+ }
+ if ($clone(v1, Value).object() === $clone(v2, Value).object()) {
+ $s = -1; return true;
+ }
+ }
+ n = $clone(v1, Value).Len();
+ if (!((n === $clone(v2, Value).Len()))) {
+ $s = -1; return false;
+ }
+ i = 0;
+ /* while (true) { */ case 10:
+ /* if (!(i < n)) { break; } */ if(!(i < n)) { $s = 11; continue; }
+ _r = $clone(v1, Value).Index(i); /* */ $s = 14; case 14: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _arg = $clone(_r, Value);
+ _r$1 = $clone(v2, Value).Index(i); /* */ $s = 15; case 15: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _arg$1 = $clone(_r$1, Value);
+ _arg$2 = visited;
+ _r$2 = deepValueEqualJs(_arg, _arg$1, _arg$2); /* */ $s = 16; case 16: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ /* */ if (!_r$2) { $s = 12; continue; }
+ /* */ $s = 13; continue;
+ /* if (!_r$2) { */ case 12:
+ $s = -1; return false;
+ /* } */ case 13:
+ i = i + (1) >> 0;
+ $s = 10; continue;
+ case 11:
+ $s = -1; return true;
+ /* } else if (_2 === (20)) { */ case 3:
+ if ($clone(v1, Value).IsNil() || $clone(v2, Value).IsNil()) {
+ $s = -1; return $clone(v1, Value).IsNil() && $clone(v2, Value).IsNil();
+ }
+ _r$3 = $clone(v1, Value).Elem(); /* */ $s = 17; case 17: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
+ _arg$3 = $clone(_r$3, Value);
+ _r$4 = $clone(v2, Value).Elem(); /* */ $s = 18; case 18: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
+ _arg$4 = $clone(_r$4, Value);
+ _arg$5 = visited;
+ _r$5 = deepValueEqualJs(_arg$3, _arg$4, _arg$5); /* */ $s = 19; case 19: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
+ $24r = _r$5;
+ $s = 20; case 20: return $24r;
+ /* } else if (_2 === (22)) { */ case 4:
+ _r$6 = $clone(v1, Value).Elem(); /* */ $s = 21; case 21: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; }
+ _arg$6 = $clone(_r$6, Value);
+ _r$7 = $clone(v2, Value).Elem(); /* */ $s = 22; case 22: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; }
+ _arg$7 = $clone(_r$7, Value);
+ _arg$8 = visited;
+ _r$8 = deepValueEqualJs(_arg$6, _arg$7, _arg$8); /* */ $s = 23; case 23: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; }
+ $24r$1 = _r$8;
+ $s = 24; case 24: return $24r$1;
+ /* } else if (_2 === (25)) { */ case 5:
+ n$1 = $clone(v1, Value).NumField();
+ i$1 = 0;
+ /* while (true) { */ case 25:
+ /* if (!(i$1 < n$1)) { break; } */ if(!(i$1 < n$1)) { $s = 26; continue; }
+ _r$9 = $clone(v1, Value).Field(i$1); /* */ $s = 29; case 29: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; }
+ _arg$9 = $clone(_r$9, Value);
+ _r$10 = $clone(v2, Value).Field(i$1); /* */ $s = 30; case 30: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; }
+ _arg$10 = $clone(_r$10, Value);
+ _arg$11 = visited;
+ _r$11 = deepValueEqualJs(_arg$9, _arg$10, _arg$11); /* */ $s = 31; case 31: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; }
+ /* */ if (!_r$11) { $s = 27; continue; }
+ /* */ $s = 28; continue;
+ /* if (!_r$11) { */ case 27:
+ $s = -1; return false;
+ /* } */ case 28:
+ i$1 = i$1 + (1) >> 0;
+ $s = 25; continue;
+ case 26:
+ $s = -1; return true;
+ /* } else if (_2 === (21)) { */ case 6:
+ if (!($clone(v1, Value).IsNil() === $clone(v2, Value).IsNil())) {
+ $s = -1; return false;
+ }
+ if ($clone(v1, Value).object() === $clone(v2, Value).object()) {
+ $s = -1; return true;
+ }
+ _r$12 = $clone(v1, Value).MapKeys(); /* */ $s = 32; case 32: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; }
+ keys = _r$12;
+ if (!((keys.$length === $clone(v2, Value).Len()))) {
+ $s = -1; return false;
+ }
+ _ref$1 = keys;
+ _i$1 = 0;
+ /* while (true) { */ case 33:
+ /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 34; continue; }
+ k = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]);
+ _r$13 = $clone(v1, Value).MapIndex($clone(k, Value)); /* */ $s = 35; case 35: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; }
+ val1 = _r$13;
+ _r$14 = $clone(v2, Value).MapIndex($clone(k, Value)); /* */ $s = 36; case 36: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; }
+ val2 = _r$14;
+ if (!$clone(val1, Value).IsValid() || !$clone(val2, Value).IsValid()) { _v = true; $s = 39; continue s; }
+ _r$15 = deepValueEqualJs($clone(val1, Value), $clone(val2, Value), visited); /* */ $s = 40; case 40: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; }
+ _v = !_r$15; case 39:
+ /* */ if (_v) { $s = 37; continue; }
+ /* */ $s = 38; continue;
+ /* if (_v) { */ case 37:
+ $s = -1; return false;
+ /* } */ case 38:
+ _i$1++;
+ $s = 33; continue;
+ case 34:
+ $s = -1; return true;
+ /* } else if (_2 === (19)) { */ case 7:
+ $s = -1; return $clone(v1, Value).IsNil() && $clone(v2, Value).IsNil();
+ /* } else if (_2 === (26)) { */ case 8:
+ $s = -1; return $clone(v1, Value).object() === $clone(v2, Value).object();
+ /* } */ case 9:
+ case 1:
+ _r$16 = valueInterface($clone(v1, Value), false); /* */ $s = 41; case 41: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; }
+ _r$17 = valueInterface($clone(v2, Value), false); /* */ $s = 42; case 42: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; }
+ $24r$2 = !!($interfaceIsEqual(_r$16, _r$17));
+ $s = 43; case 43: return $24r$2;
+ /* */ } return; } var $f = {$blk: deepValueEqualJs, $c: true, $r, $24r, $24r$1, $24r$2, _1, _2, _arg, _arg$1, _arg$10, _arg$11, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _arg$8, _arg$9, _i, _i$1, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _v, entry, i, i$1, k, keys, n, n$1, v1, v2, val1, val2, visited, $s};return $f;
+ };
+ methodNameSkip = function() {
+ var _tuple, f, idx, name$1, pc;
+ _tuple = runtime.Caller(3);
+ pc = _tuple[0];
+ f = runtime.FuncForPC(pc);
+ if (f === ptrType$4.nil) {
+ return "unknown method";
+ }
+ name$1 = f.Name();
+ idx = name$1.length - 1 >> 0;
+ while (true) {
+ if (!(idx > 0)) { break; }
+ if (name$1.charCodeAt(idx) === 46) {
+ break;
+ }
+ idx = idx - (1) >> 0;
+ }
+ if (idx < 0) {
+ return name$1;
+ }
+ return "Value" + $substring(name$1, idx);
+ };
+ verifyNotInHeapPtr = function(p) {
+ var p;
+ return true;
+ };
+ Value.methods = [{prop: "pointer", name: "pointer", pkg: "reflect", typ: $funcType([], [$UnsafePointer], false)}, {prop: "Addr", name: "Addr", pkg: "", typ: $funcType([], [Value], false)}, {prop: "Bool", name: "Bool", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Bytes", name: "Bytes", pkg: "", typ: $funcType([], [sliceType$9], false)}, {prop: "runes", name: "runes", pkg: "reflect", typ: $funcType([], [sliceType$10], false)}, {prop: "CanAddr", name: "CanAddr", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "CanSet", name: "CanSet", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Call", name: "Call", pkg: "", typ: $funcType([sliceType$7], [sliceType$7], false)}, {prop: "CallSlice", name: "CallSlice", pkg: "", typ: $funcType([sliceType$7], [sliceType$7], false)}, {prop: "CanComplex", name: "CanComplex", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Complex", name: "Complex", pkg: "", typ: $funcType([], [$Complex128], false)}, {prop: "FieldByIndex", name: "FieldByIndex", pkg: "", typ: $funcType([sliceType$6], [Value], false)}, {prop: "FieldByIndexErr", name: "FieldByIndexErr", pkg: "", typ: $funcType([sliceType$6], [Value, $error], false)}, {prop: "FieldByName", name: "FieldByName", pkg: "", typ: $funcType([$String], [Value], false)}, {prop: "FieldByNameFunc", name: "FieldByNameFunc", pkg: "", typ: $funcType([funcType$3], [Value], false)}, {prop: "CanFloat", name: "CanFloat", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Float", name: "Float", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "CanInt", name: "CanInt", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Int", name: "Int", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "CanInterface", name: "CanInterface", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Interface", name: "Interface", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "IsValid", name: "IsValid", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsZero", name: "IsZero", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Kind", name: "Kind", pkg: "", typ: $funcType([], [Kind], false)}, {prop: "MapIndex", name: "MapIndex", pkg: "", typ: $funcType([Value], [Value], false)}, {prop: "MapKeys", name: "MapKeys", pkg: "", typ: $funcType([], [sliceType$7], false)}, {prop: "SetIterKey", name: "SetIterKey", pkg: "", typ: $funcType([ptrType$22], [], false)}, {prop: "SetIterValue", name: "SetIterValue", pkg: "", typ: $funcType([ptrType$22], [], false)}, {prop: "MapRange", name: "MapRange", pkg: "", typ: $funcType([], [ptrType$22], false)}, {prop: "Method", name: "Method", pkg: "", typ: $funcType([$Int], [Value], false)}, {prop: "NumMethod", name: "NumMethod", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "MethodByName", name: "MethodByName", pkg: "", typ: $funcType([$String], [Value], false)}, {prop: "NumField", name: "NumField", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "OverflowComplex", name: "OverflowComplex", pkg: "", typ: $funcType([$Complex128], [$Bool], false)}, {prop: "OverflowFloat", name: "OverflowFloat", pkg: "", typ: $funcType([$Float64], [$Bool], false)}, {prop: "OverflowInt", name: "OverflowInt", pkg: "", typ: $funcType([$Int64], [$Bool], false)}, {prop: "OverflowUint", name: "OverflowUint", pkg: "", typ: $funcType([$Uint64], [$Bool], false)}, {prop: "Recv", name: "Recv", pkg: "", typ: $funcType([], [Value, $Bool], false)}, {prop: "recv", name: "recv", pkg: "reflect", typ: $funcType([$Bool], [Value, $Bool], false)}, {prop: "Send", name: "Send", pkg: "", typ: $funcType([Value], [], false)}, {prop: "send", name: "send", pkg: "reflect", typ: $funcType([Value, $Bool], [$Bool], false)}, {prop: "SetBool", name: "SetBool", pkg: "", typ: $funcType([$Bool], [], false)}, {prop: "setRunes", name: "setRunes", pkg: "reflect", typ: $funcType([sliceType$10], [], false)}, {prop: "SetComplex", name: "SetComplex", pkg: "", typ: $funcType([$Complex128], [], false)}, {prop: "SetFloat", name: "SetFloat", pkg: "", typ: $funcType([$Float64], [], false)}, {prop: "SetInt", name: "SetInt", pkg: "", typ: $funcType([$Int64], [], false)}, {prop: "SetMapIndex", name: "SetMapIndex", pkg: "", typ: $funcType([Value, Value], [], false)}, {prop: "SetUint", name: "SetUint", pkg: "", typ: $funcType([$Uint64], [], false)}, {prop: "SetPointer", name: "SetPointer", pkg: "", typ: $funcType([$UnsafePointer], [], false)}, {prop: "SetString", name: "SetString", pkg: "", typ: $funcType([$String], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "TryRecv", name: "TryRecv", pkg: "", typ: $funcType([], [Value, $Bool], false)}, {prop: "TrySend", name: "TrySend", pkg: "", typ: $funcType([Value], [$Bool], false)}, {prop: "Type", name: "Type", pkg: "", typ: $funcType([], [Type], false)}, {prop: "CanUint", name: "CanUint", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Uint", name: "Uint", pkg: "", typ: $funcType([], [$Uint64], false)}, {prop: "UnsafeAddr", name: "UnsafeAddr", pkg: "", typ: $funcType([], [$Uintptr], false)}, {prop: "UnsafePointer", name: "UnsafePointer", pkg: "", typ: $funcType([], [$UnsafePointer], false)}, {prop: "Convert", name: "Convert", pkg: "", typ: $funcType([Type], [Value], false)}, {prop: "CanConvert", name: "CanConvert", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "object", name: "object", pkg: "reflect", typ: $funcType([], [ptrType$2], false)}, {prop: "assignTo", name: "assignTo", pkg: "reflect", typ: $funcType([$String, ptrType$1, $UnsafePointer], [Value], false)}, {prop: "call", name: "call", pkg: "reflect", typ: $funcType([$String, sliceType$7], [sliceType$7], false)}, {prop: "Cap", name: "Cap", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Elem", name: "Elem", pkg: "", typ: $funcType([], [Value], false)}, {prop: "Field", name: "Field", pkg: "", typ: $funcType([$Int], [Value], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([$Int], [Value], false)}, {prop: "InterfaceData", name: "InterfaceData", pkg: "", typ: $funcType([], [arrayType$7], 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([Value], [], false)}, {prop: "SetBytes", name: "SetBytes", pkg: "", typ: $funcType([sliceType$9], [], 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], [Value], false)}, {prop: "Slice3", name: "Slice3", pkg: "", typ: $funcType([$Int, $Int, $Int], [Value], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [], false)}];
+ flag.methods = [{prop: "kind", name: "kind", pkg: "reflect", typ: $funcType([], [Kind], false)}, {prop: "ro", name: "ro", pkg: "reflect", typ: $funcType([], [flag], false)}, {prop: "mustBe", name: "mustBe", pkg: "reflect", typ: $funcType([Kind], [], false)}, {prop: "mustBeExported", name: "mustBeExported", pkg: "reflect", typ: $funcType([], [], false)}, {prop: "mustBeExportedSlow", name: "mustBeExportedSlow", pkg: "reflect", typ: $funcType([], [], false)}, {prop: "mustBeAssignable", name: "mustBeAssignable", pkg: "reflect", typ: $funcType([], [], false)}, {prop: "mustBeAssignableSlow", name: "mustBeAssignableSlow", pkg: "reflect", typ: $funcType([], [], false)}];
+ ptrType$23.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}];
+ ptrType$22.methods = [{prop: "Key", name: "Key", pkg: "", typ: $funcType([], [Value], false)}, {prop: "Value", name: "Value", pkg: "", typ: $funcType([], [Value], false)}, {prop: "Next", name: "Next", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([Value], [], false)}];
+ Kind.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}];
+ ptrType$1.methods = [{prop: "textOff", name: "textOff", pkg: "reflect", typ: $funcType([textOff], [$UnsafePointer], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Uintptr], false)}, {prop: "Bits", name: "Bits", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Align", name: "Align", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "FieldAlign", name: "FieldAlign", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Kind", name: "Kind", pkg: "", typ: $funcType([], [Kind], false)}, {prop: "common", name: "common", pkg: "reflect", typ: $funcType([], [ptrType$1], false)}, {prop: "exportedMethods", name: "exportedMethods", pkg: "reflect", typ: $funcType([], [sliceType$11], false)}, {prop: "NumMethod", name: "NumMethod", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "MethodByName", name: "MethodByName", pkg: "", typ: $funcType([$String], [Method, $Bool], false)}, {prop: "PkgPath", name: "PkgPath", pkg: "", typ: $funcType([], [$String], false)}, {prop: "hasName", name: "hasName", pkg: "reflect", typ: $funcType([], [$Bool], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "ChanDir", name: "ChanDir", pkg: "", typ: $funcType([], [ChanDir], false)}, {prop: "IsVariadic", name: "IsVariadic", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Elem", name: "Elem", pkg: "", typ: $funcType([], [Type], false)}, {prop: "Field", name: "Field", pkg: "", typ: $funcType([$Int], [StructField], false)}, {prop: "FieldByIndex", name: "FieldByIndex", pkg: "", typ: $funcType([sliceType$6], [StructField], false)}, {prop: "FieldByName", name: "FieldByName", pkg: "", typ: $funcType([$String], [StructField, $Bool], false)}, {prop: "FieldByNameFunc", name: "FieldByNameFunc", pkg: "", typ: $funcType([funcType$3], [StructField, $Bool], false)}, {prop: "In", name: "In", pkg: "", typ: $funcType([$Int], [Type], false)}, {prop: "Key", name: "Key", pkg: "", typ: $funcType([], [Type], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumField", name: "NumField", 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], [Type], false)}, {prop: "Implements", name: "Implements", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "AssignableTo", name: "AssignableTo", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "ConvertibleTo", name: "ConvertibleTo", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "gcSlice", name: "gcSlice", pkg: "reflect", typ: $funcType([$Uintptr, $Uintptr], [sliceType$9], false)}, {prop: "uncommon", name: "uncommon", pkg: "reflect", typ: $funcType([], [ptrType$9], false)}, {prop: "nameOff", name: "nameOff", pkg: "reflect", typ: $funcType([nameOff], [name], false)}, {prop: "typeOff", name: "typeOff", pkg: "reflect", typ: $funcType([typeOff], [ptrType$1], false)}, {prop: "ptrTo", name: "ptrTo", pkg: "reflect", typ: $funcType([], [ptrType$1], false)}, {prop: "pointers", name: "pointers", pkg: "reflect", typ: $funcType([], [$Bool], false)}, {prop: "Comparable", name: "Comparable", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Method", name: "Method", pkg: "", typ: $funcType([$Int], [Method], false)}];
+ ChanDir.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}];
+ ptrType$10.methods = [{prop: "Method", name: "Method", pkg: "", typ: $funcType([$Int], [Method], false)}, {prop: "NumMethod", name: "NumMethod", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "MethodByName", name: "MethodByName", pkg: "", typ: $funcType([$String], [Method, $Bool], false)}];
+ ptrType$25.methods = [{prop: "offset", name: "offset", pkg: "reflect", typ: $funcType([], [$Uintptr], false)}, {prop: "embedded", name: "embedded", pkg: "reflect", typ: $funcType([], [$Bool], false)}];
+ ptrType$12.methods = [{prop: "Field", name: "Field", pkg: "", typ: $funcType([$Int], [StructField], false)}, {prop: "FieldByIndex", name: "FieldByIndex", pkg: "", typ: $funcType([sliceType$6], [StructField], false)}, {prop: "FieldByNameFunc", name: "FieldByNameFunc", pkg: "", typ: $funcType([funcType$3], [StructField, $Bool], false)}, {prop: "FieldByName", name: "FieldByName", pkg: "", typ: $funcType([$String], [StructField, $Bool], false)}];
+ Method.methods = [{prop: "IsExported", name: "IsExported", pkg: "", typ: $funcType([], [$Bool], false)}];
+ StructField.methods = [{prop: "IsExported", name: "IsExported", pkg: "", typ: $funcType([], [$Bool], false)}];
+ StructTag.methods = [{prop: "Get", name: "Get", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "Lookup", name: "Lookup", pkg: "", typ: $funcType([$String], [$String, $Bool], false)}];
+ ptrType$9.methods = [{prop: "methods", name: "methods", pkg: "reflect", typ: $funcType([], [sliceType$11], false)}, {prop: "exportedMethods", name: "exportedMethods", pkg: "reflect", typ: $funcType([], [sliceType$11], false)}];
+ ptrType$20.methods = [{prop: "in$", name: "in", pkg: "reflect", typ: $funcType([], [sliceType$2], false)}, {prop: "out", name: "out", pkg: "reflect", typ: $funcType([], [sliceType$2], false)}];
+ name.methods = [{prop: "data", name: "data", pkg: "reflect", typ: $funcType([$Int, $String], [ptrType$13], false)}, {prop: "hasTag", name: "hasTag", pkg: "reflect", typ: $funcType([], [$Bool], false)}, {prop: "readVarint", name: "readVarint", pkg: "reflect", typ: $funcType([$Int], [$Int, $Int], false)}, {prop: "name", name: "name", pkg: "reflect", typ: $funcType([], [$String], false)}, {prop: "tag", name: "tag", pkg: "reflect", typ: $funcType([], [$String], false)}, {prop: "pkgPath", name: "pkgPath", pkg: "reflect", typ: $funcType([], [$String], false)}, {prop: "isExported", name: "isExported", pkg: "reflect", typ: $funcType([], [$Bool], false)}];
+ ptrType$28.methods = [{prop: "initialized", name: "initialized", pkg: "reflect", typ: $funcType([], [$Bool], false)}, {prop: "skipUntilValidKey", name: "skipUntilValidKey", pkg: "reflect", typ: $funcType([], [], false)}];
+ Value.init("reflect", [{prop: "typ", name: "typ", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "ptr", name: "ptr", embedded: false, exported: false, typ: $UnsafePointer, tag: ""}, {prop: "flag", name: "flag", embedded: true, exported: false, typ: flag, tag: ""}]);
+ ValueError.init("", [{prop: "Method", name: "Method", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Kind", name: "Kind", embedded: false, exported: true, typ: Kind, tag: ""}]);
+ MapIter.init("reflect", [{prop: "m", name: "m", embedded: false, exported: false, typ: Value, tag: ""}, {prop: "hiter", name: "hiter", embedded: false, exported: false, typ: hiter, tag: ""}]);
+ Type.init([{prop: "Align", name: "Align", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "AssignableTo", name: "AssignableTo", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "Bits", name: "Bits", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "ChanDir", name: "ChanDir", pkg: "", typ: $funcType([], [ChanDir], false)}, {prop: "Comparable", name: "Comparable", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "ConvertibleTo", name: "ConvertibleTo", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "Elem", name: "Elem", pkg: "", typ: $funcType([], [Type], false)}, {prop: "Field", name: "Field", pkg: "", typ: $funcType([$Int], [StructField], false)}, {prop: "FieldAlign", name: "FieldAlign", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "FieldByIndex", name: "FieldByIndex", pkg: "", typ: $funcType([sliceType$6], [StructField], false)}, {prop: "FieldByName", name: "FieldByName", pkg: "", typ: $funcType([$String], [StructField, $Bool], false)}, {prop: "FieldByNameFunc", name: "FieldByNameFunc", pkg: "", typ: $funcType([funcType$3], [StructField, $Bool], false)}, {prop: "Implements", name: "Implements", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "In", name: "In", pkg: "", typ: $funcType([$Int], [Type], false)}, {prop: "IsVariadic", name: "IsVariadic", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Key", name: "Key", pkg: "", typ: $funcType([], [Type], false)}, {prop: "Kind", name: "Kind", pkg: "", typ: $funcType([], [Kind], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Method", name: "Method", pkg: "", typ: $funcType([$Int], [Method], false)}, {prop: "MethodByName", name: "MethodByName", pkg: "", typ: $funcType([$String], [Method, $Bool], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "NumField", name: "NumField", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumIn", name: "NumIn", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumMethod", name: "NumMethod", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumOut", name: "NumOut", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Out", name: "Out", pkg: "", typ: $funcType([$Int], [Type], 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: "reflect", typ: $funcType([], [ptrType$1], false)}, {prop: "uncommon", name: "uncommon", pkg: "reflect", typ: $funcType([], [ptrType$9], false)}]);
+ rtype.init("reflect", [{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: tflag, 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: funcType$4, tag: ""}, {prop: "gcdata", name: "gcdata", embedded: false, exported: false, typ: ptrType$13, tag: ""}, {prop: "str", name: "str", embedded: false, exported: false, typ: nameOff, tag: ""}, {prop: "ptrToThis", name: "ptrToThis", embedded: false, exported: false, typ: typeOff, tag: ""}]);
+ method.init("reflect", [{prop: "name", name: "name", embedded: false, exported: false, typ: nameOff, tag: ""}, {prop: "mtyp", name: "mtyp", embedded: false, exported: false, typ: typeOff, tag: ""}, {prop: "ifn", name: "ifn", embedded: false, exported: false, typ: textOff, tag: ""}, {prop: "tfn", name: "tfn", embedded: false, exported: false, typ: textOff, tag: ""}]);
+ arrayType.init("reflect", [{prop: "rtype", name: "rtype", embedded: true, exported: false, typ: rtype, tag: ""}, {prop: "elem", name: "elem", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "slice", name: "slice", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "len", name: "len", embedded: false, exported: false, typ: $Uintptr, tag: ""}]);
+ chanType.init("reflect", [{prop: "rtype", name: "rtype", embedded: true, exported: false, typ: rtype, tag: ""}, {prop: "elem", name: "elem", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "dir", name: "dir", embedded: false, exported: false, typ: $Uintptr, tag: ""}]);
+ imethod.init("reflect", [{prop: "name", name: "name", embedded: false, exported: false, typ: nameOff, tag: ""}, {prop: "typ", name: "typ", embedded: false, exported: false, typ: typeOff, tag: ""}]);
+ interfaceType.init("reflect", [{prop: "rtype", name: "rtype", embedded: true, exported: false, typ: rtype, tag: ""}, {prop: "pkgPath", name: "pkgPath", embedded: false, exported: false, typ: name, tag: ""}, {prop: "methods", name: "methods", embedded: false, exported: false, typ: sliceType$14, tag: ""}]);
+ mapType.init("reflect", [{prop: "rtype", name: "rtype", embedded: true, exported: false, typ: rtype, tag: ""}, {prop: "key", name: "key", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "elem", name: "elem", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "bucket", name: "bucket", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "hasher", name: "hasher", embedded: false, exported: false, typ: funcType$5, 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: ""}]);
+ ptrType.init("reflect", [{prop: "rtype", name: "rtype", embedded: true, exported: false, typ: rtype, tag: ""}, {prop: "elem", name: "elem", embedded: false, exported: false, typ: ptrType$1, tag: ""}]);
+ sliceType.init("reflect", [{prop: "rtype", name: "rtype", embedded: true, exported: false, typ: rtype, tag: ""}, {prop: "elem", name: "elem", embedded: false, exported: false, typ: ptrType$1, tag: ""}]);
+ structField.init("reflect", [{prop: "name", name: "name", embedded: false, exported: false, typ: name, tag: ""}, {prop: "typ", name: "typ", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "offsetEmbed", name: "offsetEmbed", embedded: false, exported: false, typ: $Uintptr, tag: ""}]);
+ structType.init("reflect", [{prop: "rtype", name: "rtype", embedded: true, exported: false, typ: rtype, tag: ""}, {prop: "pkgPath", name: "pkgPath", embedded: false, exported: false, typ: name, tag: ""}, {prop: "fields", name: "fields", embedded: false, exported: false, typ: sliceType$15, tag: ""}]);
+ Method.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: Type, tag: ""}, {prop: "Func", name: "Func", embedded: false, exported: true, typ: Value, tag: ""}, {prop: "Index", name: "Index", embedded: false, exported: true, typ: $Int, tag: ""}]);
+ StructField.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: Type, tag: ""}, {prop: "Tag", name: "Tag", embedded: false, exported: true, typ: StructTag, tag: ""}, {prop: "Offset", name: "Offset", embedded: false, exported: true, typ: $Uintptr, tag: ""}, {prop: "Index", name: "Index", embedded: false, exported: true, typ: sliceType$6, tag: ""}, {prop: "Anonymous", name: "Anonymous", embedded: false, exported: true, typ: $Bool, tag: ""}]);
+ fieldScan.init("reflect", [{prop: "typ", name: "typ", embedded: false, exported: false, typ: ptrType$12, tag: ""}, {prop: "index", name: "index", embedded: false, exported: false, typ: sliceType$6, tag: ""}]);
+ uncommonType.init("reflect", [{prop: "pkgPath", name: "pkgPath", embedded: false, exported: false, typ: nameOff, 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: sliceType$11, tag: ""}]);
+ funcType.init("reflect", [{prop: "rtype", name: "rtype", embedded: true, exported: false, typ: rtype, 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: sliceType$2, tag: ""}, {prop: "_out", name: "_out", embedded: false, exported: false, typ: sliceType$2, tag: ""}]);
+ name.init("reflect", [{prop: "bytes", name: "bytes", embedded: false, exported: false, typ: ptrType$13, tag: ""}]);
+ nameData.init("reflect", [{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: ""}, {prop: "pkgPath", name: "pkgPath", embedded: false, exported: false, typ: $String, tag: ""}]);
+ hiter.init("reflect", [{prop: "t", name: "t", embedded: false, exported: false, typ: Type, tag: ""}, {prop: "m", name: "m", embedded: false, exported: false, typ: ptrType$2, tag: ""}, {prop: "keys", name: "keys", embedded: false, exported: false, typ: ptrType$2, tag: ""}, {prop: "i", name: "i", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "last", name: "last", embedded: false, exported: false, typ: ptrType$2, 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 = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = js.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = abi.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = bytealg.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = goarch.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = goexperiment.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = itoa.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = unsafeheader.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = math.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = runtime.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = strconv.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = sync.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = unicode.$init(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = utf8.$init(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ nameOffList = sliceType$1.nil;
+ typeOffList = sliceType$2.nil;
+ kindNames = new sliceType$3(["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"]);
+ initialized = false;
+ uncommonTypeMap = {};
+ nameMap = {};
+ uint8Type = $assertType(TypeOf(new $Uint8(0)), ptrType$1);
+ stringType = $assertType(TypeOf(new $String("")), ptrType$1);
+ callHelper = $assertType($internalize($call, $emptyInterface), funcType$1);
+ jsObjectPtr = reflectType($jsObjectPtr);
+ selectHelper = $assertType($internalize($select, $emptyInterface), funcType$1);
+ $r = init(); /* */ $s = 15; case 15: 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, reflectlite, lessSwap, IntSlice, StringSlice, sliceType, sliceType$2, funcType, funcType$1, reflectValueOf, reflectSwapper, insertionSort_func, siftDown_func, heapSort_func, medianOfThree_func, doPivot_func, quickSort_func, insertionSort, siftDown, heapSort, medianOfThree, swapRange, doPivot, quickSort, Sort, maxDepth, Ints, Strings, Stable, stable, symMerge, rotate, Slice, Search, SearchInts, SearchStrings;
+ reflectlite = $packages["internal/reflectlite"];
+ lessSwap = $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_;
+ });
+ IntSlice = $pkg.IntSlice = $newType(12, $kindSlice, "sort.IntSlice", true, "sort", true, null);
+ StringSlice = $pkg.StringSlice = $newType(12, $kindSlice, "sort.StringSlice", true, "sort", true, null);
+ sliceType = $sliceType($Int);
+ sliceType$2 = $sliceType($String);
+ funcType = $funcType([$Int, $Int], [$Bool], false);
+ funcType$1 = $funcType([$Int, $Int], [], false);
+ insertionSort_func = function(data, a, b) {
+ var {_r, _v, a, b, data, i, j, $s, $r, $c} = $restore(this, {data, a, b});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ i = a + 1 >> 0;
+ /* while (true) { */ case 1:
+ /* if (!(i < b)) { break; } */ if(!(i < b)) { $s = 2; continue; }
+ j = i;
+ /* while (true) { */ case 3:
+ if (!(j > a)) { _v = false; $s = 5; continue s; }
+ _r = data.Less(j, j - 1 >> 0); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _v = _r; case 5:
+ /* if (!(_v)) { break; } */ if(!(_v)) { $s = 4; continue; }
+ $r = data.Swap(j, j - 1 >> 0); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ j = j - (1) >> 0;
+ $s = 3; continue;
+ case 4:
+ i = i + (1) >> 0;
+ $s = 1; continue;
+ case 2:
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: insertionSort_func, $c: true, $r, _r, _v, a, b, data, i, j, $s};return $f;
+ };
+ siftDown_func = function(data, lo, hi, first) {
+ var {_r, _r$1, _v, child, data, first, hi, lo, root, $s, $r, $c} = $restore(this, {data, lo, hi, first});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ root = lo;
+ /* while (true) { */ case 1:
+ child = ($imul(2, root)) + 1 >> 0;
+ if (child >= hi) {
+ /* break; */ $s = 2; continue;
+ }
+ if (!((child + 1 >> 0) < hi)) { _v = false; $s = 5; continue s; }
+ _r = data.Less(first + child >> 0, (first + child >> 0) + 1 >> 0); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _v = _r; case 5:
+ /* */ if (_v) { $s = 3; continue; }
+ /* */ $s = 4; continue;
+ /* if (_v) { */ case 3:
+ child = child + (1) >> 0;
+ /* } */ case 4:
+ _r$1 = data.Less(first + root >> 0, first + child >> 0); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ /* */ if (!_r$1) { $s = 7; continue; }
+ /* */ $s = 8; continue;
+ /* if (!_r$1) { */ case 7:
+ $s = -1; return;
+ /* } */ case 8:
+ $r = data.Swap(first + root >> 0, first + child >> 0); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ root = child;
+ $s = 1; continue;
+ case 2:
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: siftDown_func, $c: true, $r, _r, _r$1, _v, child, data, first, hi, lo, root, $s};return $f;
+ };
+ heapSort_func = function(data, a, b) {
+ var {_q, a, b, data, first, hi, i, i$1, lo, $s, $r, $c} = $restore(this, {data, a, b});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ first = a;
+ lo = 0;
+ hi = b - a >> 0;
+ i = (_q = ((hi - 1 >> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"));
+ /* while (true) { */ case 1:
+ /* if (!(i >= 0)) { break; } */ if(!(i >= 0)) { $s = 2; continue; }
+ $r = siftDown_func($clone(data, lessSwap), i, hi, first); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ i = i - (1) >> 0;
+ $s = 1; continue;
+ case 2:
+ i$1 = hi - 1 >> 0;
+ /* while (true) { */ case 4:
+ /* if (!(i$1 >= 0)) { break; } */ if(!(i$1 >= 0)) { $s = 5; continue; }
+ $r = data.Swap(first, first + i$1 >> 0); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = siftDown_func($clone(data, lessSwap), lo, i$1, first); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ i$1 = i$1 - (1) >> 0;
+ $s = 4; continue;
+ case 5:
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: heapSort_func, $c: true, $r, _q, a, b, data, first, hi, i, i$1, lo, $s};return $f;
+ };
+ medianOfThree_func = function(data, m1, m0, m2) {
+ var {_r, _r$1, _r$2, data, m0, m1, m2, $s, $r, $c} = $restore(this, {data, m1, m0, m2});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = data.Less(m1, m0); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ /* */ if (_r) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (_r) { */ case 1:
+ $r = data.Swap(m1, m0); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ /* } */ case 2:
+ _r$1 = data.Less(m2, m1); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ /* */ if (_r$1) { $s = 5; continue; }
+ /* */ $s = 6; continue;
+ /* if (_r$1) { */ case 5:
+ $r = data.Swap(m2, m1); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ _r$2 = data.Less(m1, m0); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ /* */ if (_r$2) { $s = 9; continue; }
+ /* */ $s = 10; continue;
+ /* if (_r$2) { */ case 9:
+ $r = data.Swap(m1, m0); /* */ $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: medianOfThree_func, $c: true, $r, _r, _r$1, _r$2, data, m0, m1, m2, $s};return $f;
+ };
+ doPivot_func = function(data, lo, hi) {
+ var {_q, _q$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, _tmp$2, _tmp$3, _v, _v$1, _v$2, _v$3, _v$4, a, b, c, data, dups, hi, lo, m, midhi, midlo, pivot, protect, s, $s, $r, $c} = $restore(this, {data, lo, hi});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ midlo = 0;
+ midhi = 0;
+ m = ((((((lo + hi >> 0) >>> 0)) >>> 1 >>> 0) >> 0));
+ /* */ if ((hi - lo >> 0) > 40) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if ((hi - lo >> 0) > 40) { */ case 1:
+ s = (_q = ((hi - lo >> 0)) / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"));
+ $r = medianOfThree_func($clone(data, lessSwap), lo, lo + s >> 0, lo + ($imul(2, s)) >> 0); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = medianOfThree_func($clone(data, lessSwap), m, m - s >> 0, m + s >> 0); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = medianOfThree_func($clone(data, lessSwap), hi - 1 >> 0, (hi - 1 >> 0) - s >> 0, (hi - 1 >> 0) - ($imul(2, s)) >> 0); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ /* } */ case 2:
+ $r = medianOfThree_func($clone(data, lessSwap), lo, m, hi - 1 >> 0); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ pivot = lo;
+ _tmp = lo + 1 >> 0;
+ _tmp$1 = hi - 1 >> 0;
+ a = _tmp;
+ c = _tmp$1;
+ /* while (true) { */ case 7:
+ if (!(a < c)) { _v = false; $s = 9; continue s; }
+ _r = data.Less(a, pivot); /* */ $s = 10; case 10: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _v = _r; case 9:
+ /* if (!(_v)) { break; } */ if(!(_v)) { $s = 8; continue; }
+ a = a + (1) >> 0;
+ $s = 7; continue;
+ case 8:
+ b = a;
+ /* while (true) { */ case 11:
+ /* while (true) { */ case 13:
+ if (!(b < c)) { _v$1 = false; $s = 15; continue s; }
+ _r$1 = data.Less(pivot, b); /* */ $s = 16; case 16: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _v$1 = !_r$1; case 15:
+ /* if (!(_v$1)) { break; } */ if(!(_v$1)) { $s = 14; continue; }
+ b = b + (1) >> 0;
+ $s = 13; continue;
+ case 14:
+ /* while (true) { */ case 17:
+ if (!(b < c)) { _v$2 = false; $s = 19; continue s; }
+ _r$2 = data.Less(pivot, c - 1 >> 0); /* */ $s = 20; case 20: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ _v$2 = _r$2; case 19:
+ /* if (!(_v$2)) { break; } */ if(!(_v$2)) { $s = 18; continue; }
+ c = c - (1) >> 0;
+ $s = 17; continue;
+ case 18:
+ if (b >= c) {
+ /* break; */ $s = 12; continue;
+ }
+ $r = data.Swap(b, c - 1 >> 0); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ b = b + (1) >> 0;
+ c = c - (1) >> 0;
+ $s = 11; continue;
+ case 12:
+ protect = (hi - c >> 0) < 5;
+ /* */ if (!protect && (hi - c >> 0) < (_q$1 = ((hi - lo >> 0)) / 4, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"))) { $s = 22; continue; }
+ /* */ $s = 23; continue;
+ /* if (!protect && (hi - c >> 0) < (_q$1 = ((hi - lo >> 0)) / 4, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"))) { */ case 22:
+ dups = 0;
+ _r$3 = data.Less(pivot, hi - 1 >> 0); /* */ $s = 26; case 26: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
+ /* */ if (!_r$3) { $s = 24; continue; }
+ /* */ $s = 25; continue;
+ /* if (!_r$3) { */ case 24:
+ $r = data.Swap(c, hi - 1 >> 0); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ c = c + (1) >> 0;
+ dups = dups + (1) >> 0;
+ /* } */ case 25:
+ _r$4 = data.Less(b - 1 >> 0, pivot); /* */ $s = 30; case 30: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
+ /* */ if (!_r$4) { $s = 28; continue; }
+ /* */ $s = 29; continue;
+ /* if (!_r$4) { */ case 28:
+ b = b - (1) >> 0;
+ dups = dups + (1) >> 0;
+ /* } */ case 29:
+ _r$5 = data.Less(m, pivot); /* */ $s = 33; case 33: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
+ /* */ if (!_r$5) { $s = 31; continue; }
+ /* */ $s = 32; continue;
+ /* if (!_r$5) { */ case 31:
+ $r = data.Swap(m, b - 1 >> 0); /* */ $s = 34; case 34: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ b = b - (1) >> 0;
+ dups = dups + (1) >> 0;
+ /* } */ case 32:
+ protect = dups > 1;
+ /* } */ case 23:
+ /* */ if (protect) { $s = 35; continue; }
+ /* */ $s = 36; continue;
+ /* if (protect) { */ case 35:
+ /* while (true) { */ case 37:
+ /* while (true) { */ case 39:
+ if (!(a < b)) { _v$3 = false; $s = 41; continue s; }
+ _r$6 = data.Less(b - 1 >> 0, pivot); /* */ $s = 42; case 42: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; }
+ _v$3 = !_r$6; case 41:
+ /* if (!(_v$3)) { break; } */ if(!(_v$3)) { $s = 40; continue; }
+ b = b - (1) >> 0;
+ $s = 39; continue;
+ case 40:
+ /* while (true) { */ case 43:
+ if (!(a < b)) { _v$4 = false; $s = 45; continue s; }
+ _r$7 = data.Less(a, pivot); /* */ $s = 46; case 46: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; }
+ _v$4 = _r$7; case 45:
+ /* if (!(_v$4)) { break; } */ if(!(_v$4)) { $s = 44; continue; }
+ a = a + (1) >> 0;
+ $s = 43; continue;
+ case 44:
+ if (a >= b) {
+ /* break; */ $s = 38; continue;
+ }
+ $r = data.Swap(a, b - 1 >> 0); /* */ $s = 47; case 47: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ a = a + (1) >> 0;
+ b = b - (1) >> 0;
+ $s = 37; continue;
+ case 38:
+ /* } */ case 36:
+ $r = data.Swap(pivot, b - 1 >> 0); /* */ $s = 48; case 48: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ _tmp$2 = b - 1 >> 0;
+ _tmp$3 = c;
+ midlo = _tmp$2;
+ midhi = _tmp$3;
+ $s = -1; return [midlo, midhi];
+ /* */ } return; } var $f = {$blk: doPivot_func, $c: true, $r, _q, _q$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, _tmp$2, _tmp$3, _v, _v$1, _v$2, _v$3, _v$4, a, b, c, data, dups, hi, lo, m, midhi, midlo, pivot, protect, s, $s};return $f;
+ };
+ quickSort_func = function(data, a, b, maxDepth$1) {
+ var {_r, _r$1, _tuple, a, b, data, i, maxDepth$1, mhi, mlo, $s, $r, $c} = $restore(this, {data, a, b, maxDepth$1});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ /* while (true) { */ case 1:
+ /* if (!((b - a >> 0) > 12)) { break; } */ if(!((b - a >> 0) > 12)) { $s = 2; continue; }
+ /* */ if (maxDepth$1 === 0) { $s = 3; continue; }
+ /* */ $s = 4; continue;
+ /* if (maxDepth$1 === 0) { */ case 3:
+ $r = heapSort_func($clone(data, lessSwap), a, b); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $s = -1; return;
+ /* } */ case 4:
+ maxDepth$1 = maxDepth$1 - (1) >> 0;
+ _r = doPivot_func($clone(data, lessSwap), a, b); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ mlo = _tuple[0];
+ mhi = _tuple[1];
+ /* */ if ((mlo - a >> 0) < (b - mhi >> 0)) { $s = 7; continue; }
+ /* */ $s = 8; continue;
+ /* if ((mlo - a >> 0) < (b - mhi >> 0)) { */ case 7:
+ $r = quickSort_func($clone(data, lessSwap), a, mlo, maxDepth$1); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ a = mhi;
+ $s = 9; continue;
+ /* } else { */ case 8:
+ $r = quickSort_func($clone(data, lessSwap), mhi, b, maxDepth$1); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ b = mlo;
+ /* } */ case 9:
+ $s = 1; continue;
+ case 2:
+ /* */ if ((b - a >> 0) > 1) { $s = 12; continue; }
+ /* */ $s = 13; continue;
+ /* if ((b - a >> 0) > 1) { */ case 12:
+ i = a + 6 >> 0;
+ /* while (true) { */ case 14:
+ /* if (!(i < b)) { break; } */ if(!(i < b)) { $s = 15; continue; }
+ _r$1 = data.Less(i, i - 6 >> 0); /* */ $s = 18; case 18: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ /* */ if (_r$1) { $s = 16; continue; }
+ /* */ $s = 17; continue;
+ /* if (_r$1) { */ case 16:
+ $r = data.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 = insertionSort_func($clone(data, lessSwap), a, b); /* */ $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: quickSort_func, $c: true, $r, _r, _r$1, _tuple, a, b, data, i, maxDepth$1, mhi, mlo, $s};return $f;
+ };
+ insertionSort = function(data, a, b) {
+ var {_r, _v, a, b, data, i, j, $s, $r, $c} = $restore(this, {data, a, b});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ i = a + 1 >> 0;
+ /* while (true) { */ case 1:
+ /* if (!(i < b)) { break; } */ if(!(i < b)) { $s = 2; continue; }
+ j = i;
+ /* while (true) { */ case 3:
+ if (!(j > a)) { _v = false; $s = 5; continue s; }
+ _r = data.Less(j, j - 1 >> 0); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _v = _r; case 5:
+ /* if (!(_v)) { break; } */ if(!(_v)) { $s = 4; continue; }
+ $r = data.Swap(j, j - 1 >> 0); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ j = j - (1) >> 0;
+ $s = 3; continue;
+ case 4:
+ i = i + (1) >> 0;
+ $s = 1; continue;
+ case 2:
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: insertionSort, $c: true, $r, _r, _v, a, b, data, i, j, $s};return $f;
+ };
+ siftDown = function(data, lo, hi, first) {
+ var {_r, _r$1, _v, child, data, first, hi, lo, root, $s, $r, $c} = $restore(this, {data, lo, hi, first});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ root = lo;
+ /* while (true) { */ case 1:
+ child = ($imul(2, root)) + 1 >> 0;
+ if (child >= hi) {
+ /* break; */ $s = 2; continue;
+ }
+ if (!((child + 1 >> 0) < hi)) { _v = false; $s = 5; continue s; }
+ _r = data.Less(first + child >> 0, (first + child >> 0) + 1 >> 0); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _v = _r; case 5:
+ /* */ if (_v) { $s = 3; continue; }
+ /* */ $s = 4; continue;
+ /* if (_v) { */ case 3:
+ child = child + (1) >> 0;
+ /* } */ case 4:
+ _r$1 = data.Less(first + root >> 0, first + child >> 0); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ /* */ if (!_r$1) { $s = 7; continue; }
+ /* */ $s = 8; continue;
+ /* if (!_r$1) { */ case 7:
+ $s = -1; return;
+ /* } */ case 8:
+ $r = data.Swap(first + root >> 0, first + child >> 0); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ root = child;
+ $s = 1; continue;
+ case 2:
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: siftDown, $c: true, $r, _r, _r$1, _v, child, data, first, hi, lo, root, $s};return $f;
+ };
+ heapSort = function(data, a, b) {
+ var {_q, a, b, data, first, hi, i, i$1, lo, $s, $r, $c} = $restore(this, {data, a, b});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ first = a;
+ lo = 0;
+ hi = b - a >> 0;
+ i = (_q = ((hi - 1 >> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"));
+ /* while (true) { */ case 1:
+ /* if (!(i >= 0)) { break; } */ if(!(i >= 0)) { $s = 2; continue; }
+ $r = siftDown(data, i, hi, first); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ i = i - (1) >> 0;
+ $s = 1; continue;
+ case 2:
+ i$1 = hi - 1 >> 0;
+ /* while (true) { */ case 4:
+ /* if (!(i$1 >= 0)) { break; } */ if(!(i$1 >= 0)) { $s = 5; continue; }
+ $r = data.Swap(first, first + i$1 >> 0); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = siftDown(data, lo, i$1, first); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ i$1 = i$1 - (1) >> 0;
+ $s = 4; continue;
+ case 5:
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: heapSort, $c: true, $r, _q, a, b, data, first, hi, i, i$1, lo, $s};return $f;
+ };
+ medianOfThree = function(data, m1, m0, m2) {
+ var {_r, _r$1, _r$2, data, m0, m1, m2, $s, $r, $c} = $restore(this, {data, m1, m0, m2});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = data.Less(m1, m0); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ /* */ if (_r) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (_r) { */ case 1:
+ $r = data.Swap(m1, m0); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ /* } */ case 2:
+ _r$1 = data.Less(m2, m1); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ /* */ if (_r$1) { $s = 5; continue; }
+ /* */ $s = 6; continue;
+ /* if (_r$1) { */ case 5:
+ $r = data.Swap(m2, m1); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ _r$2 = data.Less(m1, m0); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ /* */ if (_r$2) { $s = 9; continue; }
+ /* */ $s = 10; continue;
+ /* if (_r$2) { */ case 9:
+ $r = data.Swap(m1, m0); /* */ $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: medianOfThree, $c: true, $r, _r, _r$1, _r$2, data, m0, m1, m2, $s};return $f;
+ };
+ swapRange = function(data, a, b, n) {
+ var {a, b, data, i, n, $s, $r, $c} = $restore(this, {data, a, b, n});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ i = 0;
+ /* while (true) { */ case 1:
+ /* if (!(i < n)) { break; } */ if(!(i < n)) { $s = 2; continue; }
+ $r = data.Swap(a + i >> 0, b + i >> 0); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ i = i + (1) >> 0;
+ $s = 1; continue;
+ case 2:
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: swapRange, $c: true, $r, a, b, data, i, n, $s};return $f;
+ };
+ doPivot = function(data, lo, hi) {
+ var {_q, _q$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, _tmp$2, _tmp$3, _v, _v$1, _v$2, _v$3, _v$4, a, b, c, data, dups, hi, lo, m, midhi, midlo, pivot, protect, s, $s, $r, $c} = $restore(this, {data, lo, hi});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ midlo = 0;
+ midhi = 0;
+ m = ((((((lo + hi >> 0) >>> 0)) >>> 1 >>> 0) >> 0));
+ /* */ if ((hi - lo >> 0) > 40) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if ((hi - lo >> 0) > 40) { */ case 1:
+ s = (_q = ((hi - lo >> 0)) / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"));
+ $r = medianOfThree(data, lo, lo + s >> 0, lo + ($imul(2, s)) >> 0); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = medianOfThree(data, m, m - s >> 0, m + s >> 0); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = medianOfThree(data, hi - 1 >> 0, (hi - 1 >> 0) - s >> 0, (hi - 1 >> 0) - ($imul(2, s)) >> 0); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ /* } */ case 2:
+ $r = medianOfThree(data, lo, m, hi - 1 >> 0); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ pivot = lo;
+ _tmp = lo + 1 >> 0;
+ _tmp$1 = hi - 1 >> 0;
+ a = _tmp;
+ c = _tmp$1;
+ /* while (true) { */ case 7:
+ if (!(a < c)) { _v = false; $s = 9; continue s; }
+ _r = data.Less(a, pivot); /* */ $s = 10; case 10: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _v = _r; case 9:
+ /* if (!(_v)) { break; } */ if(!(_v)) { $s = 8; continue; }
+ a = a + (1) >> 0;
+ $s = 7; continue;
+ case 8:
+ b = a;
+ /* while (true) { */ case 11:
+ /* while (true) { */ case 13:
+ if (!(b < c)) { _v$1 = false; $s = 15; continue s; }
+ _r$1 = data.Less(pivot, b); /* */ $s = 16; case 16: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _v$1 = !_r$1; case 15:
+ /* if (!(_v$1)) { break; } */ if(!(_v$1)) { $s = 14; continue; }
+ b = b + (1) >> 0;
+ $s = 13; continue;
+ case 14:
+ /* while (true) { */ case 17:
+ if (!(b < c)) { _v$2 = false; $s = 19; continue s; }
+ _r$2 = data.Less(pivot, c - 1 >> 0); /* */ $s = 20; case 20: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ _v$2 = _r$2; case 19:
+ /* if (!(_v$2)) { break; } */ if(!(_v$2)) { $s = 18; continue; }
+ c = c - (1) >> 0;
+ $s = 17; continue;
+ case 18:
+ if (b >= c) {
+ /* break; */ $s = 12; continue;
+ }
+ $r = data.Swap(b, c - 1 >> 0); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ b = b + (1) >> 0;
+ c = c - (1) >> 0;
+ $s = 11; continue;
+ case 12:
+ protect = (hi - c >> 0) < 5;
+ /* */ if (!protect && (hi - c >> 0) < (_q$1 = ((hi - lo >> 0)) / 4, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"))) { $s = 22; continue; }
+ /* */ $s = 23; continue;
+ /* if (!protect && (hi - c >> 0) < (_q$1 = ((hi - lo >> 0)) / 4, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"))) { */ case 22:
+ dups = 0;
+ _r$3 = data.Less(pivot, hi - 1 >> 0); /* */ $s = 26; case 26: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
+ /* */ if (!_r$3) { $s = 24; continue; }
+ /* */ $s = 25; continue;
+ /* if (!_r$3) { */ case 24:
+ $r = data.Swap(c, hi - 1 >> 0); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ c = c + (1) >> 0;
+ dups = dups + (1) >> 0;
+ /* } */ case 25:
+ _r$4 = data.Less(b - 1 >> 0, pivot); /* */ $s = 30; case 30: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
+ /* */ if (!_r$4) { $s = 28; continue; }
+ /* */ $s = 29; continue;
+ /* if (!_r$4) { */ case 28:
+ b = b - (1) >> 0;
+ dups = dups + (1) >> 0;
+ /* } */ case 29:
+ _r$5 = data.Less(m, pivot); /* */ $s = 33; case 33: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
+ /* */ if (!_r$5) { $s = 31; continue; }
+ /* */ $s = 32; continue;
+ /* if (!_r$5) { */ case 31:
+ $r = data.Swap(m, b - 1 >> 0); /* */ $s = 34; case 34: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ b = b - (1) >> 0;
+ dups = dups + (1) >> 0;
+ /* } */ case 32:
+ protect = dups > 1;
+ /* } */ case 23:
+ /* */ if (protect) { $s = 35; continue; }
+ /* */ $s = 36; continue;
+ /* if (protect) { */ case 35:
+ /* while (true) { */ case 37:
+ /* while (true) { */ case 39:
+ if (!(a < b)) { _v$3 = false; $s = 41; continue s; }
+ _r$6 = data.Less(b - 1 >> 0, pivot); /* */ $s = 42; case 42: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; }
+ _v$3 = !_r$6; case 41:
+ /* if (!(_v$3)) { break; } */ if(!(_v$3)) { $s = 40; continue; }
+ b = b - (1) >> 0;
+ $s = 39; continue;
+ case 40:
+ /* while (true) { */ case 43:
+ if (!(a < b)) { _v$4 = false; $s = 45; continue s; }
+ _r$7 = data.Less(a, pivot); /* */ $s = 46; case 46: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; }
+ _v$4 = _r$7; case 45:
+ /* if (!(_v$4)) { break; } */ if(!(_v$4)) { $s = 44; continue; }
+ a = a + (1) >> 0;
+ $s = 43; continue;
+ case 44:
+ if (a >= b) {
+ /* break; */ $s = 38; continue;
+ }
+ $r = data.Swap(a, b - 1 >> 0); /* */ $s = 47; case 47: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ a = a + (1) >> 0;
+ b = b - (1) >> 0;
+ $s = 37; continue;
+ case 38:
+ /* } */ case 36:
+ $r = data.Swap(pivot, b - 1 >> 0); /* */ $s = 48; case 48: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ _tmp$2 = b - 1 >> 0;
+ _tmp$3 = c;
+ midlo = _tmp$2;
+ midhi = _tmp$3;
+ $s = -1; return [midlo, midhi];
+ /* */ } return; } var $f = {$blk: doPivot, $c: true, $r, _q, _q$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, _tmp$2, _tmp$3, _v, _v$1, _v$2, _v$3, _v$4, a, b, c, data, dups, hi, lo, m, midhi, midlo, pivot, protect, s, $s};return $f;
+ };
+ quickSort = function(data, a, b, maxDepth$1) {
+ var {_r, _r$1, _tuple, a, b, data, i, maxDepth$1, mhi, mlo, $s, $r, $c} = $restore(this, {data, a, b, maxDepth$1});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ /* while (true) { */ case 1:
+ /* if (!((b - a >> 0) > 12)) { break; } */ if(!((b - a >> 0) > 12)) { $s = 2; continue; }
+ /* */ if (maxDepth$1 === 0) { $s = 3; continue; }
+ /* */ $s = 4; continue;
+ /* if (maxDepth$1 === 0) { */ case 3:
+ $r = heapSort(data, a, b); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $s = -1; return;
+ /* } */ case 4:
+ maxDepth$1 = maxDepth$1 - (1) >> 0;
+ _r = doPivot(data, a, b); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tuple = _r;
+ mlo = _tuple[0];
+ mhi = _tuple[1];
+ /* */ if ((mlo - a >> 0) < (b - mhi >> 0)) { $s = 7; continue; }
+ /* */ $s = 8; continue;
+ /* if ((mlo - a >> 0) < (b - mhi >> 0)) { */ case 7:
+ $r = quickSort(data, a, mlo, maxDepth$1); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ a = mhi;
+ $s = 9; continue;
+ /* } else { */ case 8:
+ $r = quickSort(data, mhi, b, maxDepth$1); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ b = mlo;
+ /* } */ case 9:
+ $s = 1; continue;
+ case 2:
+ /* */ if ((b - a >> 0) > 1) { $s = 12; continue; }
+ /* */ $s = 13; continue;
+ /* if ((b - a >> 0) > 1) { */ case 12:
+ i = a + 6 >> 0;
+ /* while (true) { */ case 14:
+ /* if (!(i < b)) { break; } */ if(!(i < b)) { $s = 15; continue; }
+ _r$1 = data.Less(i, i - 6 >> 0); /* */ $s = 18; case 18: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ /* */ if (_r$1) { $s = 16; continue; }
+ /* */ $s = 17; continue;
+ /* if (_r$1) { */ case 16:
+ $r = data.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 = insertionSort(data, a, b); /* */ $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: quickSort, $c: true, $r, _r, _r$1, _tuple, a, b, data, i, maxDepth$1, mhi, mlo, $s};return $f;
+ };
+ Sort = function(data) {
+ var {_r, data, n, $s, $r, $c} = $restore(this, {data});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = data.Len(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ n = _r;
+ $r = quickSort(data, 0, n, maxDepth(n)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: Sort, $c: true, $r, _r, data, n, $s};return $f;
+ };
+ $pkg.Sort = Sort;
+ maxDepth = function(n) {
+ var depth, i, n;
+ depth = 0;
+ i = n;
+ while (true) {
+ if (!(i > 0)) { break; }
+ depth = depth + (1) >> 0;
+ i = (i >> $min((1), 31)) >> 0;
+ }
+ return $imul(depth, 2);
+ };
+ IntSlice.prototype.Len = function() {
+ var x;
+ x = this;
+ return x.$length;
+ };
+ $ptrType(IntSlice).prototype.Len = function() { return this.$get().Len(); };
+ IntSlice.prototype.Less = function(i, j) {
+ var i, j, x;
+ x = this;
+ return ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) < ((j < 0 || j >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + j]);
+ };
+ $ptrType(IntSlice).prototype.Less = function(i, j) { return this.$get().Less(i, j); };
+ IntSlice.prototype.Swap = function(i, j) {
+ var _tmp, _tmp$1, i, j, x;
+ x = this;
+ _tmp = ((j < 0 || j >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + j]);
+ _tmp$1 = ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]);
+ ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i] = _tmp);
+ ((j < 0 || j >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + j] = _tmp$1);
+ };
+ $ptrType(IntSlice).prototype.Swap = function(i, j) { return this.$get().Swap(i, j); };
+ IntSlice.prototype.Sort = function() {
+ var {x, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ x = this;
+ $r = Sort(x); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: IntSlice.prototype.Sort, $c: true, $r, x, $s};return $f;
+ };
+ $ptrType(IntSlice).prototype.Sort = function() { return this.$get().Sort(); };
+ StringSlice.prototype.Len = function() {
+ var x;
+ x = this;
+ return x.$length;
+ };
+ $ptrType(StringSlice).prototype.Len = function() { return this.$get().Len(); };
+ StringSlice.prototype.Less = function(i, j) {
+ var i, j, x;
+ x = this;
+ return ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) < ((j < 0 || j >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + j]);
+ };
+ $ptrType(StringSlice).prototype.Less = function(i, j) { return this.$get().Less(i, j); };
+ StringSlice.prototype.Swap = function(i, j) {
+ var _tmp, _tmp$1, i, j, x;
+ x = this;
+ _tmp = ((j < 0 || j >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + j]);
+ _tmp$1 = ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]);
+ ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i] = _tmp);
+ ((j < 0 || j >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + j] = _tmp$1);
+ };
+ $ptrType(StringSlice).prototype.Swap = function(i, j) { return this.$get().Swap(i, j); };
+ StringSlice.prototype.Sort = function() {
+ var {x, $s, $r, $c} = $restore(this, {});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ x = this;
+ $r = Sort(x); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: StringSlice.prototype.Sort, $c: true, $r, x, $s};return $f;
+ };
+ $ptrType(StringSlice).prototype.Sort = function() { return this.$get().Sort(); };
+ Ints = function(x) {
+ var {x, $s, $r, $c} = $restore(this, {x});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ $r = Sort(($convertSliceType(x, IntSlice))); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: Ints, $c: true, $r, x, $s};return $f;
+ };
+ $pkg.Ints = Ints;
+ Strings = function(x) {
+ var {x, $s, $r, $c} = $restore(this, {x});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ $r = Sort(($convertSliceType(x, StringSlice))); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: Strings, $c: true, $r, x, $s};return $f;
+ };
+ $pkg.Strings = Strings;
+ Stable = function(data) {
+ var {_arg, _arg$1, _r, data, $s, $r, $c} = $restore(this, {data});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _arg = data;
+ _r = data.Len(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _arg$1 = _r;
+ $r = stable(_arg, _arg$1); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: Stable, $c: true, $r, _arg, _arg$1, _r, data, $s};return $f;
+ };
+ $pkg.Stable = Stable;
+ stable = function(data, n) {
+ var {_tmp, _tmp$1, _tmp$2, _tmp$3, a, b, blockSize, data, m, n, $s, $r, $c} = $restore(this, {data, n});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ blockSize = 20;
+ _tmp = 0;
+ _tmp$1 = blockSize;
+ a = _tmp;
+ b = _tmp$1;
+ /* while (true) { */ case 1:
+ /* if (!(b <= n)) { break; } */ if(!(b <= n)) { $s = 2; continue; }
+ $r = insertionSort(data, a, b); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ a = b;
+ b = b + (blockSize) >> 0;
+ $s = 1; continue;
+ case 2:
+ $r = insertionSort(data, a, n); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ /* while (true) { */ case 5:
+ /* if (!(blockSize < n)) { break; } */ if(!(blockSize < n)) { $s = 6; continue; }
+ _tmp$2 = 0;
+ _tmp$3 = $imul(2, blockSize);
+ a = _tmp$2;
+ b = _tmp$3;
+ /* while (true) { */ case 7:
+ /* if (!(b <= n)) { break; } */ if(!(b <= n)) { $s = 8; continue; }
+ $r = symMerge(data, a, a + blockSize >> 0, b); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ a = b;
+ b = b + (($imul(2, blockSize))) >> 0;
+ $s = 7; continue;
+ case 8:
+ m = a + blockSize >> 0;
+ /* */ if (m < n) { $s = 10; continue; }
+ /* */ $s = 11; continue;
+ /* if (m < n) { */ case 10:
+ $r = symMerge(data, a, m, n); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ /* } */ case 11:
+ blockSize = $imul(blockSize, (2));
+ $s = 5; continue;
+ case 6:
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: stable, $c: true, $r, _tmp, _tmp$1, _tmp$2, _tmp$3, a, b, blockSize, data, m, n, $s};return $f;
+ };
+ symMerge = function(data, a, m, b) {
+ var {_r, _r$1, _r$2, _tmp, _tmp$1, a, b, c, data, end, h, h$1, i, i$1, j, j$1, k, k$1, m, mid, n, p, r, start, $s, $r, $c} = $restore(this, {data, a, m, b});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ /* */ if ((m - a >> 0) === 1) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if ((m - a >> 0) === 1) { */ case 1:
+ i = m;
+ j = b;
+ /* while (true) { */ case 3:
+ /* if (!(i < j)) { break; } */ if(!(i < j)) { $s = 4; continue; }
+ h = ((((((i + j >> 0) >>> 0)) >>> 1 >>> 0) >> 0));
+ _r = data.Less(h, a); /* */ $s = 8; case 8: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ /* */ if (_r) { $s = 5; continue; }
+ /* */ $s = 6; continue;
+ /* if (_r) { */ case 5:
+ i = h + 1 >> 0;
+ $s = 7; continue;
+ /* } else { */ case 6:
+ j = h;
+ /* } */ case 7:
+ $s = 3; continue;
+ case 4:
+ k = a;
+ /* while (true) { */ case 9:
+ /* if (!(k < (i - 1 >> 0))) { break; } */ if(!(k < (i - 1 >> 0))) { $s = 10; continue; }
+ $r = data.Swap(k, k + 1 >> 0); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ k = k + (1) >> 0;
+ $s = 9; continue;
+ case 10:
+ $s = -1; return;
+ /* } */ case 2:
+ /* */ if ((b - m >> 0) === 1) { $s = 12; continue; }
+ /* */ $s = 13; continue;
+ /* if ((b - m >> 0) === 1) { */ case 12:
+ i$1 = a;
+ j$1 = m;
+ /* while (true) { */ case 14:
+ /* if (!(i$1 < j$1)) { break; } */ if(!(i$1 < j$1)) { $s = 15; continue; }
+ h$1 = ((((((i$1 + j$1 >> 0) >>> 0)) >>> 1 >>> 0) >> 0));
+ _r$1 = data.Less(m, h$1); /* */ $s = 19; case 19: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ /* */ if (!_r$1) { $s = 16; continue; }
+ /* */ $s = 17; continue;
+ /* if (!_r$1) { */ case 16:
+ i$1 = h$1 + 1 >> 0;
+ $s = 18; continue;
+ /* } else { */ case 17:
+ j$1 = h$1;
+ /* } */ case 18:
+ $s = 14; continue;
+ case 15:
+ k$1 = m;
+ /* while (true) { */ case 20:
+ /* if (!(k$1 > i$1)) { break; } */ if(!(k$1 > i$1)) { $s = 21; continue; }
+ $r = data.Swap(k$1, k$1 - 1 >> 0); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ k$1 = k$1 - (1) >> 0;
+ $s = 20; continue;
+ case 21:
+ $s = -1; return;
+ /* } */ case 13:
+ mid = ((((((a + b >> 0) >>> 0)) >>> 1 >>> 0) >> 0));
+ n = mid + m >> 0;
+ _tmp = 0;
+ _tmp$1 = 0;
+ start = _tmp;
+ r = _tmp$1;
+ if (m > mid) {
+ start = n - b >> 0;
+ r = mid;
+ } else {
+ start = a;
+ r = m;
+ }
+ p = n - 1 >> 0;
+ /* while (true) { */ case 23:
+ /* if (!(start < r)) { break; } */ if(!(start < r)) { $s = 24; continue; }
+ c = ((((((start + r >> 0) >>> 0)) >>> 1 >>> 0) >> 0));
+ _r$2 = data.Less(p - c >> 0, c); /* */ $s = 28; case 28: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ /* */ if (!_r$2) { $s = 25; continue; }
+ /* */ $s = 26; continue;
+ /* if (!_r$2) { */ case 25:
+ start = c + 1 >> 0;
+ $s = 27; continue;
+ /* } else { */ case 26:
+ r = c;
+ /* } */ case 27:
+ $s = 23; continue;
+ case 24:
+ end = n - start >> 0;
+ /* */ if (start < m && m < end) { $s = 29; continue; }
+ /* */ $s = 30; continue;
+ /* if (start < m && m < end) { */ case 29:
+ $r = rotate(data, start, m, end); /* */ $s = 31; case 31: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ /* } */ case 30:
+ /* */ if (a < start && start < mid) { $s = 32; continue; }
+ /* */ $s = 33; continue;
+ /* if (a < start && start < mid) { */ case 32:
+ $r = symMerge(data, a, start, mid); /* */ $s = 34; case 34: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ /* } */ case 33:
+ /* */ if (mid < end && end < b) { $s = 35; continue; }
+ /* */ $s = 36; continue;
+ /* if (mid < end && end < b) { */ case 35:
+ $r = symMerge(data, mid, end, b); /* */ $s = 37; case 37: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ /* } */ case 36:
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: symMerge, $c: true, $r, _r, _r$1, _r$2, _tmp, _tmp$1, a, b, c, data, end, h, h$1, i, i$1, j, j$1, k, k$1, m, mid, n, p, r, start, $s};return $f;
+ };
+ rotate = function(data, a, m, b) {
+ var {a, b, data, i, j, m, $s, $r, $c} = $restore(this, {data, a, m, b});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ i = m - a >> 0;
+ j = b - m >> 0;
+ /* while (true) { */ case 1:
+ /* if (!(!((i === j)))) { break; } */ if(!(!((i === j)))) { $s = 2; continue; }
+ /* */ if (i > j) { $s = 3; continue; }
+ /* */ $s = 4; continue;
+ /* if (i > j) { */ case 3:
+ $r = swapRange(data, m - i >> 0, m, j); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ i = i - (j) >> 0;
+ $s = 5; continue;
+ /* } else { */ case 4:
+ $r = swapRange(data, m - i >> 0, (m + j >> 0) - i >> 0, i); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ j = j - (i) >> 0;
+ /* } */ case 5:
+ $s = 1; continue;
+ case 2:
+ $r = swapRange(data, m - i >> 0, m, i); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $s = -1; return;
+ /* */ } return; } var $f = {$blk: rotate, $c: true, $r, a, b, data, i, j, m, $s};return $f;
+ };
+ Slice = function(x, less) {
+ var {_r, _r$1, length, less, rv, swap, x, $s, $r, $c} = $restore(this, {x, less});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = reflectValueOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ rv = $clone(_r, reflectlite.Value);
+ _r$1 = reflectSwapper(x); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ swap = _r$1;
+ length = $clone(rv, reflectlite.Value).Len();
+ $r = quickSort_func(new lessSwap.ptr(less, swap), 0, length, maxDepth(length)); /* */ $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: Slice, $c: true, $r, _r, _r$1, length, less, rv, swap, x, $s};return $f;
+ };
+ $pkg.Slice = Slice;
+ Search = function(n, f) {
+ var {_r, _tmp, _tmp$1, f, h, i, j, n, $s, $r, $c} = $restore(this, {n, f});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _tmp = 0;
+ _tmp$1 = n;
+ i = _tmp;
+ j = _tmp$1;
+ /* while (true) { */ case 1:
+ /* if (!(i < j)) { break; } */ if(!(i < j)) { $s = 2; continue; }
+ h = ((((((i + j >> 0) >>> 0)) >>> 1 >>> 0) >> 0));
+ _r = f(h); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ /* */ if (!_r) { $s = 3; continue; }
+ /* */ $s = 4; continue;
+ /* if (!_r) { */ case 3:
+ i = h + 1 >> 0;
+ $s = 5; continue;
+ /* } else { */ case 4:
+ j = h;
+ /* } */ case 5:
+ $s = 1; continue;
+ case 2:
+ $s = -1; return i;
+ /* */ } return; } var $f = {$blk: Search, $c: true, $r, _r, _tmp, _tmp$1, f, h, i, j, n, $s};return $f;
+ };
+ $pkg.Search = Search;
+ SearchInts = function(a, x) {
+ var {$24r, _r, a, x, $s, $r, $c} = $restore(this, {a, x});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ a = [a];
+ x = [x];
+ _r = Search(a[0].$length, (function(a, x) { return function(i) {
+ var i;
+ return ((i < 0 || i >= a[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : a[0].$array[a[0].$offset + i]) >= x[0];
+ }; })(a, x)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: SearchInts, $c: true, $r, $24r, _r, a, x, $s};return $f;
+ };
+ $pkg.SearchInts = SearchInts;
+ SearchStrings = function(a, x) {
+ var {$24r, _r, a, x, $s, $r, $c} = $restore(this, {a, x});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ a = [a];
+ x = [x];
+ _r = Search(a[0].$length, (function(a, x) { return function(i) {
+ var i;
+ return ((i < 0 || i >= a[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : a[0].$array[a[0].$offset + i]) >= x[0];
+ }; })(a, x)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: SearchStrings, $c: true, $r, $24r, _r, a, x, $s};return $f;
+ };
+ $pkg.SearchStrings = SearchStrings;
+ IntSlice.prototype.Search = function(x) {
+ var {$24r, _r, p, x, $s, $r, $c} = $restore(this, {x});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ p = this;
+ _r = SearchInts($convertSliceType(p, sliceType), x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: IntSlice.prototype.Search, $c: true, $r, $24r, _r, p, x, $s};return $f;
+ };
+ $ptrType(IntSlice).prototype.Search = function(x) { return this.$get().Search(x); };
+ StringSlice.prototype.Search = function(x) {
+ var {$24r, _r, p, x, $s, $r, $c} = $restore(this, {x});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ p = this;
+ _r = SearchStrings($convertSliceType(p, sliceType$2), x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: StringSlice.prototype.Search, $c: true, $r, $24r, _r, p, x, $s};return $f;
+ };
+ $ptrType(StringSlice).prototype.Search = function(x) { return this.$get().Search(x); };
+ IntSlice.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Less", name: "Less", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int, $Int], [], false)}, {prop: "Sort", name: "Sort", pkg: "", typ: $funcType([], [], false)}, {prop: "Search", name: "Search", pkg: "", typ: $funcType([$Int], [$Int], false)}];
+ StringSlice.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Less", name: "Less", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int, $Int], [], false)}, {prop: "Sort", name: "Sort", pkg: "", typ: $funcType([], [], false)}, {prop: "Search", name: "Search", pkg: "", typ: $funcType([$String], [$Int], false)}];
+ lessSwap.init("", [{prop: "Less", name: "Less", embedded: false, exported: true, typ: funcType, tag: ""}, {prop: "Swap", name: "Swap", embedded: false, exported: true, typ: funcType$1, tag: ""}]);
+ IntSlice.init($Int);
+ StringSlice.init($String);
+ $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 = reflectlite.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ reflectValueOf = reflectlite.ValueOf;
+ reflectSwapper = reflectlite.Swapper;
+ /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
+ };
+ $pkg.$init = $init;
+ return $pkg;
+})();
+$packages["internal/fmtsort"] = (function() {
+ var $pkg = {}, $init, reflect, sort, SortedMap, ptrType, sliceType, Sort, compare, nilCompare, floatCompare, isNaN;
+ reflect = $packages["reflect"];
+ sort = $packages["sort"];
+ SortedMap = $pkg.SortedMap = $newType(0, $kindStruct, "fmtsort.SortedMap", true, "internal/fmtsort", true, function(Key_, Value_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.Key = sliceType.nil;
+ this.Value = sliceType.nil;
+ return;
+ }
+ this.Key = Key_;
+ this.Value = Value_;
+ });
+ ptrType = $ptrType(SortedMap);
+ sliceType = $sliceType(reflect.Value);
+ SortedMap.ptr.prototype.Len = function() {
+ var o;
+ o = this;
+ return o.Key.$length;
+ };
+ SortedMap.prototype.Len = function() { return this.$val.Len(); };
+ SortedMap.ptr.prototype.Less = function(i, j) {
+ var {$24r, _r, i, j, o, x, x$1, $s, $r, $c} = $restore(this, {i, j});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ o = this;
+ _r = compare($clone((x = o.Key, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])), reflect.Value), $clone((x$1 = o.Key, ((j < 0 || j >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + j])), reflect.Value)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r < 0;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: SortedMap.ptr.prototype.Less, $c: true, $r, $24r, _r, i, j, o, x, x$1, $s};return $f;
+ };
+ SortedMap.prototype.Less = function(i, j) { return this.$val.Less(i, j); };
+ SortedMap.ptr.prototype.Swap = function(i, j) {
+ var _tmp, _tmp$1, _tmp$2, _tmp$3, i, j, o, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7;
+ o = this;
+ _tmp = (x = o.Key, ((j < 0 || j >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + j]));
+ _tmp$1 = (x$1 = o.Key, ((i < 0 || i >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i]));
+ (x$2 = o.Key, ((i < 0 || i >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i] = _tmp));
+ (x$3 = o.Key, ((j < 0 || j >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + j] = _tmp$1));
+ _tmp$2 = (x$4 = o.Value, ((j < 0 || j >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + j]));
+ _tmp$3 = (x$5 = o.Value, ((i < 0 || i >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + i]));
+ (x$6 = o.Value, ((i < 0 || i >= x$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + i] = _tmp$2));
+ (x$7 = o.Value, ((j < 0 || j >= x$7.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$7.$array[x$7.$offset + j] = _tmp$3));
+ };
+ SortedMap.prototype.Swap = function(i, j) { return this.$val.Swap(i, j); };
+ Sort = function(mapValue) {
+ var {_r, _r$1, _r$2, _r$3, iter, key, mapValue, n, sorted, value, $s, $r, $c} = $restore(this, {mapValue});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _r = $clone(mapValue, reflect.Value).Type().Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ /* */ if (!((_r === 21))) { $s = 1; continue; }
+ /* */ $s = 2; continue;
+ /* if (!((_r === 21))) { */ case 1:
+ $s = -1; return ptrType.nil;
+ /* } */ case 2:
+ n = $clone(mapValue, reflect.Value).Len();
+ key = $makeSlice(sliceType, 0, n);
+ value = $makeSlice(sliceType, 0, n);
+ iter = $clone(mapValue, reflect.Value).MapRange();
+ /* while (true) { */ case 4:
+ _r$1 = iter.Next(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ /* if (!(_r$1)) { break; } */ if(!(_r$1)) { $s = 5; continue; }
+ _r$2 = iter.Key(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ key = $append(key, _r$2);
+ _r$3 = iter.Value(); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
+ value = $append(value, _r$3);
+ $s = 4; continue;
+ case 5:
+ sorted = new SortedMap.ptr(key, value);
+ $r = sort.Stable(sorted); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $s = -1; return sorted;
+ /* */ } return; } var $f = {$blk: Sort, $c: true, $r, _r, _r$1, _r$2, _r$3, iter, key, mapValue, n, sorted, value, $s};return $f;
+ };
+ $pkg.Sort = Sort;
+ compare = function(aVal, bVal) {
+ var {$24r, _1, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, a, a$1, a$2, a$3, a$4, a$5, aType, aVal, ap, b, b$1, b$2, b$3, b$4, b$5, bType, bVal, bp, c, c$1, c$2, c$3, c$4, c$5, i, i$1, ok, ok$1, $s, $r, $c} = $restore(this, {aVal, bVal});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ _tmp = $clone(aVal, reflect.Value).Type();
+ _tmp$1 = $clone(bVal, reflect.Value).Type();
+ aType = _tmp;
+ bType = _tmp$1;
+ if (!($interfaceIsEqual(aType, bType))) {
+ $s = -1; return -1;
+ }
+ _1 = $clone(aVal, reflect.Value).Kind();
+ /* */ if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { $s = 2; continue; }
+ /* */ if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { $s = 3; continue; }
+ /* */ if (_1 === (24)) { $s = 4; continue; }
+ /* */ if ((_1 === (13)) || (_1 === (14))) { $s = 5; continue; }
+ /* */ if ((_1 === (15)) || (_1 === (16))) { $s = 6; continue; }
+ /* */ if (_1 === (1)) { $s = 7; continue; }
+ /* */ if ((_1 === (22)) || (_1 === (26))) { $s = 8; continue; }
+ /* */ if (_1 === (18)) { $s = 9; continue; }
+ /* */ if (_1 === (25)) { $s = 10; continue; }
+ /* */ if (_1 === (17)) { $s = 11; continue; }
+ /* */ if (_1 === (20)) { $s = 12; continue; }
+ /* */ $s = 13; continue;
+ /* if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { */ case 2:
+ _tmp$2 = $clone(aVal, reflect.Value).Int();
+ _tmp$3 = $clone(bVal, reflect.Value).Int();
+ a = _tmp$2;
+ b = _tmp$3;
+ if ((a.$high < b.$high || (a.$high === b.$high && a.$low < b.$low))) {
+ $s = -1; return -1;
+ } else if ((a.$high > b.$high || (a.$high === b.$high && a.$low > b.$low))) {
+ $s = -1; return 1;
+ } else {
+ $s = -1; return 0;
+ }
+ $s = 14; continue;
+ /* } else if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { */ case 3:
+ _tmp$4 = $clone(aVal, reflect.Value).Uint();
+ _tmp$5 = $clone(bVal, reflect.Value).Uint();
+ a$1 = _tmp$4;
+ b$1 = _tmp$5;
+ if ((a$1.$high < b$1.$high || (a$1.$high === b$1.$high && a$1.$low < b$1.$low))) {
+ $s = -1; return -1;
+ } else if ((a$1.$high > b$1.$high || (a$1.$high === b$1.$high && a$1.$low > b$1.$low))) {
+ $s = -1; return 1;
+ } else {
+ $s = -1; return 0;
+ }
+ $s = 14; continue;
+ /* } else if (_1 === (24)) { */ case 4:
+ _r = $clone(aVal, reflect.Value).String(); /* */ $s = 15; case 15: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ _tmp$6 = _r;
+ _r$1 = $clone(bVal, reflect.Value).String(); /* */ $s = 16; case 16: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
+ _tmp$7 = _r$1;
+ a$2 = _tmp$6;
+ b$2 = _tmp$7;
+ if (a$2 < b$2) {
+ $s = -1; return -1;
+ } else if (a$2 > b$2) {
+ $s = -1; return 1;
+ } else {
+ $s = -1; return 0;
+ }
+ $s = 14; continue;
+ /* } else if ((_1 === (13)) || (_1 === (14))) { */ case 5:
+ $s = -1; return floatCompare($clone(aVal, reflect.Value).Float(), $clone(bVal, reflect.Value).Float());
+ /* } else if ((_1 === (15)) || (_1 === (16))) { */ case 6:
+ _tmp$8 = $clone(aVal, reflect.Value).Complex();
+ _tmp$9 = $clone(bVal, reflect.Value).Complex();
+ a$3 = _tmp$8;
+ b$3 = _tmp$9;
+ c = floatCompare(a$3.$real, b$3.$real);
+ if (!((c === 0))) {
+ $s = -1; return c;
+ }
+ $s = -1; return floatCompare(a$3.$imag, b$3.$imag);
+ /* } else if (_1 === (1)) { */ case 7:
+ _tmp$10 = $clone(aVal, reflect.Value).Bool();
+ _tmp$11 = $clone(bVal, reflect.Value).Bool();
+ a$4 = _tmp$10;
+ b$4 = _tmp$11;
+ if (a$4 === b$4) {
+ $s = -1; return 0;
+ } else if (a$4) {
+ $s = -1; return 1;
+ } else {
+ $s = -1; return -1;
+ }
+ $s = 14; continue;
+ /* } else if ((_1 === (22)) || (_1 === (26))) { */ case 8:
+ _tmp$12 = $clone(aVal, reflect.Value).Pointer();
+ _tmp$13 = $clone(bVal, reflect.Value).Pointer();
+ a$5 = _tmp$12;
+ b$5 = _tmp$13;
+ if (a$5 < b$5) {
+ $s = -1; return -1;
+ } else if (a$5 > b$5) {
+ $s = -1; return 1;
+ } else {
+ $s = -1; return 0;
+ }
+ $s = 14; continue;
+ /* } else if (_1 === (18)) { */ case 9:
+ _tuple = nilCompare($clone(aVal, reflect.Value), $clone(bVal, reflect.Value));
+ c$1 = _tuple[0];
+ ok = _tuple[1];
+ if (ok) {
+ $s = -1; return c$1;
+ }
+ _tmp$14 = $clone(aVal, reflect.Value).Pointer();
+ _tmp$15 = $clone(bVal, reflect.Value).Pointer();
+ ap = _tmp$14;
+ bp = _tmp$15;
+ if (ap < bp) {
+ $s = -1; return -1;
+ } else if (ap > bp) {
+ $s = -1; return 1;
+ } else {
+ $s = -1; return 0;
+ }
+ $s = 14; continue;
+ /* } else if (_1 === (25)) { */ case 10:
+ i = 0;
+ /* while (true) { */ case 17:
+ /* if (!(i < $clone(aVal, reflect.Value).NumField())) { break; } */ if(!(i < $clone(aVal, reflect.Value).NumField())) { $s = 18; continue; }
+ _r$2 = $clone(aVal, reflect.Value).Field(i); /* */ $s = 19; case 19: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
+ _arg = $clone(_r$2, reflect.Value);
+ _r$3 = $clone(bVal, reflect.Value).Field(i); /* */ $s = 20; case 20: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
+ _arg$1 = $clone(_r$3, reflect.Value);
+ _r$4 = compare(_arg, _arg$1); /* */ $s = 21; case 21: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
+ c$2 = _r$4;
+ if (!((c$2 === 0))) {
+ $s = -1; return c$2;
+ }
+ i = i + (1) >> 0;
+ $s = 17; continue;
+ case 18:
+ $s = -1; return 0;
+ /* } else if (_1 === (17)) { */ case 11:
+ i$1 = 0;
+ /* while (true) { */ case 22:
+ /* if (!(i$1 < $clone(aVal, reflect.Value).Len())) { break; } */ if(!(i$1 < $clone(aVal, reflect.Value).Len())) { $s = 23; continue; }
+ _r$5 = $clone(aVal, reflect.Value).Index(i$1); /* */ $s = 24; case 24: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
+ _arg$2 = $clone(_r$5, reflect.Value);
+ _r$6 = $clone(bVal, reflect.Value).Index(i$1); /* */ $s = 25; case 25: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; }
+ _arg$3 = $clone(_r$6, reflect.Value);
+ _r$7 = compare(_arg$2, _arg$3); /* */ $s = 26; case 26: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; }
+ c$3 = _r$7;
+ if (!((c$3 === 0))) {
+ $s = -1; return c$3;
+ }
+ i$1 = i$1 + (1) >> 0;
+ $s = 22; continue;
+ case 23:
+ $s = -1; return 0;
+ /* } else if (_1 === (20)) { */ case 12:
+ _tuple$1 = nilCompare($clone(aVal, reflect.Value), $clone(bVal, reflect.Value));
+ c$4 = _tuple$1[0];
+ ok$1 = _tuple$1[1];
+ if (ok$1) {
+ $s = -1; return c$4;
+ }
+ _r$8 = $clone(aVal, reflect.Value).Elem(); /* */ $s = 27; case 27: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; }
+ _r$9 = $clone(_r$8, reflect.Value).Type(); /* */ $s = 28; case 28: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; }
+ _r$10 = reflect.ValueOf(_r$9); /* */ $s = 29; case 29: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; }
+ _arg$4 = $clone(_r$10, reflect.Value);
+ _r$11 = $clone(bVal, reflect.Value).Elem(); /* */ $s = 30; case 30: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; }
+ _r$12 = $clone(_r$11, reflect.Value).Type(); /* */ $s = 31; case 31: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; }
+ _r$13 = reflect.ValueOf(_r$12); /* */ $s = 32; case 32: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; }
+ _arg$5 = $clone(_r$13, reflect.Value);
+ _r$14 = compare(_arg$4, _arg$5); /* */ $s = 33; case 33: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; }
+ c$5 = _r$14;
+ if (!((c$5 === 0))) {
+ $s = -1; return c$5;
+ }
+ _r$15 = $clone(aVal, reflect.Value).Elem(); /* */ $s = 34; case 34: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; }
+ _arg$6 = $clone(_r$15, reflect.Value);
+ _r$16 = $clone(bVal, reflect.Value).Elem(); /* */ $s = 35; case 35: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; }
+ _arg$7 = $clone(_r$16, reflect.Value);
+ _r$17 = compare(_arg$6, _arg$7); /* */ $s = 36; case 36: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; }
+ $24r = _r$17;
+ $s = 37; case 37: return $24r;
+ /* } else { */ case 13:
+ _r$18 = aType.String(); /* */ $s = 38; case 38: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; }
+ $panic(new $String("bad type in compare: " + _r$18));
+ /* } */ case 14:
+ case 1:
+ $s = -1; return 0;
+ /* */ } return; } var $f = {$blk: compare, $c: true, $r, $24r, _1, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, a, a$1, a$2, a$3, a$4, a$5, aType, aVal, ap, b, b$1, b$2, b$3, b$4, b$5, bType, bVal, bp, c, c$1, c$2, c$3, c$4, c$5, i, i$1, ok, ok$1, $s};return $f;
+ };
+ nilCompare = function(aVal, bVal) {
+ var aVal, bVal;
+ if ($clone(aVal, reflect.Value).IsNil()) {
+ if ($clone(bVal, reflect.Value).IsNil()) {
+ return [0, true];
+ }
+ return [-1, true];
+ }
+ if ($clone(bVal, reflect.Value).IsNil()) {
+ return [1, true];
+ }
+ return [0, false];
+ };
+ floatCompare = function(a, b) {
+ var a, b;
+ if (isNaN(a)) {
+ return -1;
+ } else if (isNaN(b)) {
+ return 1;
+ } else if (a < b) {
+ return -1;
+ } else if (a > b) {
+ return 1;
+ }
+ return 0;
+ };
+ isNaN = function(a) {
+ var a;
+ return !((a === a));
+ };
+ ptrType.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Less", name: "Less", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int, $Int], [], false)}];
+ SortedMap.init("", [{prop: "Key", name: "Key", embedded: false, exported: true, typ: sliceType, tag: ""}, {prop: "Value", name: "Value", embedded: false, exported: true, typ: sliceType, 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 = reflect.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $r = sort.$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["internal/oserror"] = (function() {
+ var $pkg = {}, $init, errors;
+ errors = $packages["errors"];
+ $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 = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
+ $pkg.ErrInvalid = errors.New("invalid argument");
+ $pkg.ErrPermission = errors.New("permission denied");
+ $pkg.ErrExist = errors.New("file already exists");
+ $pkg.ErrNotExist = errors.New("file does not exist");
+ $pkg.ErrClosed = errors.New("file already closed");
+ /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
+ };
+ $pkg.$init = $init;
+ return $pkg;
+})();
+$packages["syscall/js"] = (function() {
+ var $pkg = {}, $init, js, Type, Func, Error, Value, ValueError, funcType, arrayType, sliceType, mapType, sliceType$1, ptrType, sliceType$2, ptrType$1, ptrType$2, id, instanceOf, getValueType, Global, Null, Undefined, FuncOf, objectToValue, init, ValueOf, convertArgs, convertJSError, CopyBytesToGo, CopyBytesToJS;
+ js = $packages["github.com/gopherjs/gopherjs/js"];
+ Type = $pkg.Type = $newType(4, $kindInt, "js.Type", true, "syscall/js", true, null);
+ Func = $pkg.Func = $newType(0, $kindStruct, "js.Func", true, "syscall/js", true, function(Value_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.Value = new Value.ptr(null, false, arrayType.zero());
+ return;
+ }
+ this.Value = Value_;
+ });
+ Error = $pkg.Error = $newType(0, $kindStruct, "js.Error", true, "syscall/js", true, function(Value_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.Value = new Value.ptr(null, false, arrayType.zero());
+ return;
+ }
+ this.Value = Value_;
+ });
+ Value = $pkg.Value = $newType(0, $kindStruct, "js.Value", true, "syscall/js", true, function(v_, inited_, _$2_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.v = null;
+ this.inited = false;
+ this._$2 = arrayType.zero();
+ return;
+ }
+ this.v = v_;
+ this.inited = inited_;
+ this._$2 = _$2_;
+ });
+ ValueError = $pkg.ValueError = $newType(0, $kindStruct, "js.ValueError", true, "syscall/js", true, function(Method_, Type_) {
+ this.$val = this;
+ if (arguments.length === 0) {
+ this.Method = "";
+ this.Type = 0;
+ return;
+ }
+ this.Method = Method_;
+ this.Type = Type_;
+ });
+ funcType = $funcType([], [], false);
+ arrayType = $arrayType(funcType, 0);
+ sliceType = $sliceType(Value);
+ mapType = $mapType($String, $emptyInterface);
+ sliceType$1 = $sliceType($emptyInterface);
+ ptrType = $ptrType(js.Error);
+ sliceType$2 = $sliceType($Uint8);
+ ptrType$1 = $ptrType(js.Object);
+ ptrType$2 = $ptrType(ValueError);
+ Type.prototype.String = function() {
+ var _1, t;
+ t = this.$val;
+ _1 = t;
+ if (_1 === (0)) {
+ return "undefined";
+ } else if (_1 === (1)) {
+ return "null";
+ } else if (_1 === (2)) {
+ return "boolean";
+ } else if (_1 === (3)) {
+ return "number";
+ } else if (_1 === (4)) {
+ return "string";
+ } else if (_1 === (5)) {
+ return "symbol";
+ } else if (_1 === (6)) {
+ return "object";
+ } else if (_1 === (7)) {
+ return "function";
+ } else {
+ $panic(new $String("bad type"));
+ }
+ };
+ $ptrType(Type).prototype.String = function() { return new Type(this.$get()).String(); };
+ Type.prototype.isObject = function() {
+ var t;
+ t = this.$val;
+ return (t === 6) || (t === 7);
+ };
+ $ptrType(Type).prototype.isObject = function() { return new Type(this.$get()).isObject(); };
+ Global = function() {
+ return objectToValue($global);
+ };
+ $pkg.Global = Global;
+ Null = function() {
+ return objectToValue(null);
+ };
+ $pkg.Null = Null;
+ Undefined = function() {
+ return objectToValue(undefined);
+ };
+ $pkg.Undefined = Undefined;
+ Func.ptr.prototype.Release = function() {
+ var f;
+ f = this;
+ $exportedFunctions = ($parseInt($exportedFunctions) >> 0) - 1 >> 0;
+ Value.copy(f.Value, Null());
+ };
+ Func.prototype.Release = function() { return this.$val.Release(); };
+ FuncOf = function(fn) {
+ var fn;
+ $exportedFunctions = ($parseInt($exportedFunctions) >> 0) + 1 >> 0;
+ return new Func.ptr($clone(objectToValue(js.MakeFunc((function $b(this$1, args) {
+ var {$24r, _i, _r, _ref, a, args, i, this$1, vargs, $s, $r, $c} = $restore(this, {this$1, args});
+ /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
+ vargs = $makeSlice(sliceType, args.$length);
+ _ref = args;
+ _i = 0;
+ while (true) {
+ if (!(_i < _ref.$length)) { break; }
+ i = _i;
+ a = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]);
+ Value.copy(((i < 0 || i >= vargs.$length) ? ($throwRuntimeError("index out of range"), undefined) : vargs.$array[vargs.$offset + i]), objectToValue(a));
+ _i++;
+ }
+ _r = fn($clone(objectToValue(this$1), Value), vargs); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
+ $24r = _r;
+ $s = 2; case 2: return $24r;
+ /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _i, _r, _ref, a, args, i, this$1, vargs, $s};return $f;
+ }))), Value));
+ };
+ $pkg.FuncOf = FuncOf;
+ Error.ptr.prototype.Error = function() {
+ var e;
+ e = this;
+ return "JavaScript error: " + $clone($clone(e.Value, Value).Get("message"), Value).String();
+ };
+ Error.prototype.Error = function() { return this.$val.Error(); };
+ objectToValue = function(obj) {
+ var obj;
+ if (obj === undefined) {
+ return new Value.ptr(null, false, arrayType.zero());
+ }
+ return new Value.ptr(obj, true, arrayType.zero());
+ };
+ init = function() {
+ if (!($global === null)) {
+ id = $global.eval($externalize("(function(x) { return x; })", $String));
+ instanceOf = $global.eval($externalize("(function(x, y) { return x instanceof y; })", $String));
+ getValueType = $global.eval($externalize("(function(x) {\n if (typeof(x) === \"undefined\") {\n return 0; // TypeUndefined\n }\n if (x === null) {\n return 1; // TypeNull\n }\n if (typeof(x) === \"boolean\") {\n return 2; // TypeBoolean\n }\n if (typeof(x) === \"number\") {\n return 3; // TypeNumber\n }\n if (typeof(x) === \"string\") {\n return 4; // TypeString\n }\n if (typeof(x) === \"symbol\") {\n return 5; // TypeSymbol\n }\n if (typeof(x) === \"function\") {\n return 7; // TypeFunction\n }\n return 6; // TypeObject\n})", $String));
+ }
+ };
+ ValueOf = function(x) {
+ var _ref, x, x$1, x$2, x$3, x$4, x$5;
+ _ref = x;
+ if ($assertType(_ref, Value, true)[1]) {
+ x$1 = $clone(_ref.$val, Value);
+ return x$1;
+ } else if ($assertType(_ref, Func, true)[1]) {
+ x$2 = $clone(_ref.$val, Func);
+ return x$2.Value;
+ } else if (_ref === $ifaceNil) {
+ x$3 = _ref;
+ return Null();
+ } else if ($assertType(_ref, $Bool, true)[1] || $assertType(_ref, $Int, true)[1] || $assertType(_ref, $Int8, true)[1] || $assertType(_ref, $Int16, true)[1] || $assertType(_ref, $Int32, true)[1] || $assertType(_ref, $Int64, true)[1] || $assertType(_ref, $Uint, true)[1] || $assertType(_ref, $Uint8, true)[1] || $assertType(_ref, $Uint16, true)[1] || $assertType(_ref, $Uint32, true)[1] || $assertType(_ref, $Uint64, true)[1] || $assertType(_ref, $Float32, true)[1] || $assertType(_ref, $Float64, true)[1] || $assertType(_ref, $UnsafePointer, true)[1] || $assertType(_ref, $String, true)[1] || $assertType(_ref, mapType, true)[1] || $assertType(_ref, sliceType$1, true)[1]) {
+ x$4 = _ref;
+ return objectToValue(id($externalize(x$4, $emptyInterface)));
+ } else {
+ x$5 = _ref;
+ $panic(new $String("ValueOf: invalid value"));
+ }
+ };
+ $pkg.ValueOf = ValueOf;
+ Value.ptr.prototype.internal = function() {
+ var v;
+ v = this;
+ if (!v.inited) {
+ return undefined;
+ }
+ return v.v;
+ };
+ Value.prototype.internal = function() { return this.$val.internal(); };
+ Value.ptr.prototype.Bool = function() {
+ var v, vType;
+ v = this;
+ vType = $clone(v, Value).Type();
+ if (!((vType === 2))) {
+ $panic(new ValueError.ptr("Value.Bool", vType));
+ }
+ return !!($clone(v, Value).internal());
+ };
+ Value.prototype.Bool = function() { return this.$val.Bool(); };
+ convertArgs = function(args) {
+ var _i, _ref, arg, args, newArgs, v;
+ newArgs = new sliceType$1([]);
+ _ref = args;
+ _i = 0;
+ while (true) {
+ if (!(_i < _ref.$length)) { break; }
+ arg = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]);
+ v = $clone(ValueOf(arg), Value);
+ newArgs = $append(newArgs, new $jsObjectPtr($clone(v, Value).internal()));
+ _i++;
+ }
+ return newArgs;
+ };
+ convertJSError = function() {
+ var _tuple, err, jsErr, ok, x;
+ err = $recover();
+ if ($interfaceIsEqual(err, $ifaceNil)) {
+ return;
+ }
+ _tuple = $assertType(err, ptrType, true);
+ jsErr = _tuple[0];
+ ok = _tuple[1];
+ if (ok) {
+ $panic((x = new Error.ptr($clone(objectToValue(jsErr.Object), Value)), new x.constructor.elem(x)));
+ }
+ $panic(err);
+ };
+ Value.ptr.prototype.Call = function(m, args) {
+ var {$24r, args, m, obj, propType, v, vType, $s, $deferred, $r, $c} = $restore(this, {m, args});
+ /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred);
+ v = this;
+ vType = $clone(v, Value).Type();
+ if (!((vType === 6)) && !((vType === 7))) {
+ $panic(new ValueError.ptr("Value.Call", vType));
+ }
+ propType = $clone($clone(v, Value).Get(m), Value).Type();
+ if (!((propType === 7))) {
+ $panic(new $String("js: Value.Call: property " + m + " is not a function, got " + new Type(propType).String()));
+ }
+ $deferred.push([convertJSError, []]);
+ $24r = objectToValue((obj = $clone(v, Value).internal(), obj[$externalize(m, $String)].apply(obj, $externalize(convertArgs(args), sliceType$1))));
+ $s = 1; case 1: return $24r;
+ /* */ } return; } } catch(err) { $err = err; $s = -1; return new Value.ptr(null, false, arrayType.zero()); } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Value.ptr.prototype.Call, $c: true, $r, $24r, args, m, obj, propType, v, vType, $s, $deferred};return $f; } }
+ };
+ Value.prototype.Call = function(m, args) { return this.$val.Call(m, args); };
+ Value.ptr.prototype.Float = function() {
+ var v, vType;
+ v = this;
+ vType = $clone(v, Value).Type();
+ if (!((vType === 3))) {
+ $panic(new ValueError.ptr("Value.Float", vType));
+ }
+ return $parseFloat($clone(v, Value).internal());
+ };
+ Value.prototype.Float = function() { return this.$val.Float(); };
+ Value.ptr.prototype.Get = function(p) {
+ var p, v, vType;
+ v = this;
+ vType = $clone(v, Value).Type();
+ if (!new Type(vType).isObject()) {
+ $panic(new ValueError.ptr("Value.Get", vType));
+ }
+ return objectToValue($clone(v, Value).internal()[$externalize(p, $String)]);
+ };
+ Value.prototype.Get = function(p) { return this.$val.Get(p); };
+ Value.ptr.prototype.Index = function(i) {
+ var i, v, vType;
+ v = this;
+ vType = $clone(v, Value).Type();
+ if (!new Type(vType).isObject()) {
+ $panic(new ValueError.ptr("Value.Index", vType));
+ }
+ return objectToValue($clone(v, Value).internal()[i]);
+ };
+ Value.prototype.Index = function(i) { return this.$val.Index(i); };
+ Value.ptr.prototype.Int = function() {
+ var v, vType;
+ v = this;
+ vType = $clone(v, Value).Type();
+ if (!((vType === 3))) {
+ $panic(new ValueError.ptr("Value.Int", vType));
+ }
+ return $parseInt($clone(v, Value).internal()) >> 0;
+ };
+ Value.prototype.Int = function() { return this.$val.Int(); };
+ Value.ptr.prototype.InstanceOf = function(t) {
+ var t, v;
+ v = this;
+ return !!(instanceOf($clone(v, Value).internal(), $clone(t, Value).internal()));
+ };
+ Value.prototype.InstanceOf = function(t) { return this.$val.InstanceOf(t); };
+ Value.ptr.prototype.Invoke = function(args) {
+ var args, v, vType;
+ v = this;
+ vType = $clone(v, Value).Type();
+ if (!((vType === 7))) {
+ $panic(new ValueError.ptr("Value.Invoke", vType));
+ }
+ return objectToValue($clone(v, Value).internal().apply(undefined, $externalize(convertArgs(args), sliceType$1)));
+ };
+ Value.prototype.Invoke = function(args) { return this.$val.Invoke(args); };
+ Value.ptr.prototype.JSValue = function() {
+ var v;
+ v = this;
+ return v;
+ };
+ Value.prototype.JSValue = function() { return this.$val.JSValue(); };
+ Value.ptr.prototype.Length = function() {
+ var v;
+ v = this;
+ return $parseInt($clone(v, Value).internal().length);
+ };
+ Value.prototype.Length = function() { return this.$val.Length(); };
+ Value.ptr.prototype.New = function(args) {
+ var {$24r, args, v, $s, $deferred, $r, $c} = $restore(this, {args});
+ /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred);
+ v = [v];
+ v[0] = this;
+ $deferred.push([(function(v) { return function() {
+ var _tuple, err, jsErr, ok, vType, x;
+ err = $recover();
+ if ($interfaceIsEqual(err, $ifaceNil)) {
+ return;
+ }
+ vType = $clone(v[0], Value).Type();
+ if (!((vType === 7))) {
+ $panic(new ValueError.ptr("Value.New", vType));
+ }
+ _tuple = $assertType(err, ptrType, true);
+ jsErr = _tuple[0];
+ ok = _tuple[1];
+ if (ok) {
+ $panic((x = new Error.ptr($clone(objectToValue(jsErr.Object), Value)), new x.constructor.elem(x)));
+ }
+ $panic(err);
+ }; })(v), []]);
+ $24r = objectToValue(new ($global.Function.prototype.bind.apply($clone(v[0], Value).internal(), [undefined].concat($externalize(convertArgs(args), sliceType$1)))));
+ $s = 1; case 1: return $24r;
+ /* */ } return; } } catch(err) { $err = err; $s = -1; return new Value.ptr(null, false, arrayType.zero()); } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Value.ptr.prototype.New, $c: true, $r, $24r, args, v, $s, $deferred};return $f; } }
+ };
+ Value.prototype.New = function(args) { return this.$val.New(args); };
+ Value.ptr.prototype.Set = function(p, x) {
+ var p, v, vType, x, x$1;
+ v = this;
+ vType = $clone(v, Value).Type();
+ if (!new Type(vType).isObject()) {
+ $panic(new ValueError.ptr("Value.Set", vType));
+ }
+ $clone(v, Value).internal()[$externalize(p, $String)] = $externalize((x$1 = convertArgs(new sliceType$1([x])), (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])), $emptyInterface);
+ };
+ Value.prototype.Set = function(p, x) { return this.$val.Set(p, x); };
+ Value.ptr.prototype.SetIndex = function(i, x) {
+ var i, v, vType, x, x$1;
+ v = this;
+ vType = $clone(v, Value).Type();
+ if (!new Type(vType).isObject()) {
+ $panic(new ValueError.ptr("Value.SetIndex", vType));
+ }
+ $clone(v, Value).internal()[i] = $externalize((x$1 = convertArgs(new sliceType$1([x])), (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])), $emptyInterface);
+ };
+ Value.prototype.SetIndex = function(i, x) { return this.$val.SetIndex(i, x); };
+ Value.ptr.prototype.String = function() {
+ var _1, v;
+ v = this;
+ _1 = $clone(v, Value).Type();
+ if (_1 === (4)) {
+ return $internalize($clone(v, Value).internal(), $String);
+ } else if (_1 === (0)) {
+ return "";
+ } else if (_1 === (1)) {
+ return "";
+ } else if (_1 === (2)) {
+ return "";
+ } else if (_1 === (3)) {
+ return "";
+ } else if (_1 === (5)) {
+ return "";
+ } else if (_1 === (6)) {
+ return "