@supraio/client-daemon-js 0.0.1-mz-resolution.1 → 0.0.1-mz-resolution.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -123957,11 +123957,11 @@ $packages["net/http"] = (function() {
123957
123957
  http2randomWriteScheduler.ptr.prototype.Push = function(wr) {
123958
123958
  var _entry, _key, _tuple, id, ok, q, wr, ws;
123959
123959
  ws = this;
123960
- id = $clone(wr, http2FrameWriteRequest).StreamID();
123961
- if (id === 0) {
123960
+ if ($clone(wr, http2FrameWriteRequest).isControl()) {
123962
123961
  ws.zero.push($clone(wr, http2FrameWriteRequest));
123963
123962
  return;
123964
123963
  }
123964
+ id = $clone(wr, http2FrameWriteRequest).StreamID();
123965
123965
  _tuple = (_entry = ws.sq[$Uint32.keyFor(id)], _entry !== undefined ? [_entry.v, true] : [ptrType$81.nil, false]);
123966
123966
  q = _tuple[0];
123967
123967
  ok = _tuple[1];
@@ -132127,411 +132127,78 @@ $packages["github.com/google/go-querystring/query"] = (function() {
132127
132127
  $pkg.$init = $init;
132128
132128
  return $pkg;
132129
132129
  })();
132130
- $packages["github.com/supraio/client-daemon/pkg/clipboard"] = (function() {
132131
- var $pkg = {}, $init, errs, time, UpdateClipboardInfo, JsClipboard, ptrType, sliceType, ptrType$1, NewClipboard;
132132
- errs = $packages["github.com/supraio/client-daemon/pkg/errs"];
132133
- time = $packages["time"];
132134
- UpdateClipboardInfo = $pkg.UpdateClipboardInfo = $newType(0, $kindStruct, "clipboard.UpdateClipboardInfo", true, "github.com/supraio/client-daemon/pkg/clipboard", true, function(Value_) {
132130
+ $packages["image/color"] = (function() {
132131
+ var $pkg = {}, $init, Color, RGBA, RGBA64, NRGBA, NRGBA64, Alpha, Alpha16, Gray, Gray16, Model, modelFunc, Palette, YCbCr, NYCbCrA, CMYK, ptrType, funcType, ModelFunc, rgbaModel, rgba64Model, nrgbaModel, nrgba64Model, alphaModel, alpha16Model, grayModel, gray16Model, sqDiff, RGBToYCbCr, yCbCrModel, nYCbCrAModel, RGBToCMYK, CMYKToRGB, cmykModel;
132132
+ Color = $pkg.Color = $newType(8, $kindInterface, "color.Color", true, "image/color", true, null);
132133
+ RGBA = $pkg.RGBA = $newType(0, $kindStruct, "color.RGBA", true, "image/color", true, function(R_, G_, B_, A_) {
132135
132134
  this.$val = this;
132136
132135
  if (arguments.length === 0) {
132137
- this.Value = "";
132136
+ this.R = 0;
132137
+ this.G = 0;
132138
+ this.B = 0;
132139
+ this.A = 0;
132138
132140
  return;
132139
132141
  }
132140
- this.Value = Value_;
132142
+ this.R = R_;
132143
+ this.G = G_;
132144
+ this.B = B_;
132145
+ this.A = A_;
132141
132146
  });
132142
- JsClipboard = $pkg.JsClipboard = $newType(0, $kindStruct, "clipboard.JsClipboard", true, "github.com/supraio/client-daemon/pkg/clipboard", true, function() {
132147
+ RGBA64 = $pkg.RGBA64 = $newType(0, $kindStruct, "color.RGBA64", true, "image/color", true, function(R_, G_, B_, A_) {
132143
132148
  this.$val = this;
132144
132149
  if (arguments.length === 0) {
132150
+ this.R = 0;
132151
+ this.G = 0;
132152
+ this.B = 0;
132153
+ this.A = 0;
132145
132154
  return;
132146
132155
  }
132156
+ this.R = R_;
132157
+ this.G = G_;
132158
+ this.B = B_;
132159
+ this.A = A_;
132147
132160
  });
132148
- ptrType = $ptrType(UpdateClipboardInfo);
132149
- sliceType = $sliceType($emptyInterface);
132150
- ptrType$1 = $ptrType(JsClipboard);
132151
- NewClipboard = function() {
132152
- return [new JsClipboard.ptr(), $ifaceNil];
132153
- };
132154
- $pkg.NewClipboard = NewClipboard;
132155
- JsClipboard.ptr.prototype.NextUpdateInfo = function() {
132156
- var _r, c, $s, $r;
132157
- /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; c = $f.c; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
132158
- c = this;
132159
- /* while (true) { */ case 1:
132160
- $r = time.Sleep(new time.Duration(1396, 4225654784)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
132161
- _r = errs.Errorf("Not implemented", new sliceType([])); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
132162
- $s = -1; return [ptrType.nil, _r];
132163
- /* } */ $s = 1; continue; case 2:
132164
- $s = -1; return [ptrType.nil, $ifaceNil];
132165
- /* */ } return; } if ($f === undefined) { $f = { $blk: JsClipboard.ptr.prototype.NextUpdateInfo }; } $f._r = _r; $f.c = c; $f.$s = $s; $f.$r = $r; return $f;
132166
- };
132167
- JsClipboard.prototype.NextUpdateInfo = function() { return this.$val.NextUpdateInfo(); };
132168
- ptrType$1.methods = [{prop: "NextUpdateInfo", name: "NextUpdateInfo", pkg: "", typ: $funcType([], [ptrType, $error], false)}];
132169
- UpdateClipboardInfo.init("", [{prop: "Value", name: "Value", embedded: false, exported: true, typ: $String, tag: ""}]);
132170
- JsClipboard.init("", []);
132171
- $init = function() {
132172
- $pkg.$init = function() {};
132173
- /* */ 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:
132174
- $r = errs.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
132175
- $r = time.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
132176
- /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
132177
- };
132178
- $pkg.$init = $init;
132179
- return $pkg;
132180
- })();
132181
- $packages["github.com/supraio/client-daemon/pkg/message"] = (function() {
132182
- var $pkg = {}, $init, binary, MsgType, Sender, sliceType, DecodeMessageType, EncodeMessageType;
132183
- binary = $packages["encoding/binary"];
132184
- MsgType = $pkg.MsgType = $newType(2, $kindUint16, "message.MsgType", true, "github.com/supraio/client-daemon/pkg/message", true, null);
132185
- Sender = $pkg.Sender = $newType(8, $kindInterface, "message.Sender", true, "github.com/supraio/client-daemon/pkg/message", true, null);
132186
- sliceType = $sliceType($Uint8);
132187
- DecodeMessageType = function(data) {
132188
- var data;
132189
- return (($clone(binary.BigEndian, binary.bigEndian).Uint16($subslice(data, 0, 2)) << 16 >>> 16));
132190
- };
132191
- $pkg.DecodeMessageType = DecodeMessageType;
132192
- EncodeMessageType = function(msgType) {
132193
- var data, msgType;
132194
- data = $makeSlice(sliceType, 2);
132195
- $clone(binary.BigEndian, binary.bigEndian).PutUint16(data, ((msgType << 16 >>> 16)));
132196
- return data;
132197
- };
132198
- $pkg.EncodeMessageType = EncodeMessageType;
132199
- Sender.init([{prop: "Send", name: "Send", pkg: "", typ: $funcType([MsgType, sliceType], [$error], false)}]);
132200
- $init = function() {
132201
- $pkg.$init = function() {};
132202
- /* */ 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:
132203
- $r = binary.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
132204
- /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
132205
- };
132206
- $pkg.$init = $init;
132207
- return $pkg;
132208
- })();
132209
- $packages["golang.org/x/mobile/event/focus"] = (function() {
132210
- var $pkg = {}, $init, fmt, Event, sliceType;
132211
- fmt = $packages["fmt"];
132212
- Event = $pkg.Event = $newType(0, $kindStruct, "focus.Event", true, "golang.org/x/mobile/event/focus", true, function(In_) {
132161
+ NRGBA = $pkg.NRGBA = $newType(0, $kindStruct, "color.NRGBA", true, "image/color", true, function(R_, G_, B_, A_) {
132213
132162
  this.$val = this;
132214
132163
  if (arguments.length === 0) {
132215
- this.In = false;
132164
+ this.R = 0;
132165
+ this.G = 0;
132166
+ this.B = 0;
132167
+ this.A = 0;
132216
132168
  return;
132217
132169
  }
132218
- this.In = In_;
132170
+ this.R = R_;
132171
+ this.G = G_;
132172
+ this.B = B_;
132173
+ this.A = A_;
132219
132174
  });
132220
- sliceType = $sliceType($emptyInterface);
132221
- Event.ptr.prototype.String = function() {
132222
- var _r, e, str, $s, $r;
132223
- /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; e = $f.e; str = $f.str; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
132224
- e = this;
132225
- str = "FocusedIn";
132226
- if (!e.In) {
132227
- str = "FocusedOut";
132175
+ NRGBA64 = $pkg.NRGBA64 = $newType(0, $kindStruct, "color.NRGBA64", true, "image/color", true, function(R_, G_, B_, A_) {
132176
+ this.$val = this;
132177
+ if (arguments.length === 0) {
132178
+ this.R = 0;
132179
+ this.G = 0;
132180
+ this.B = 0;
132181
+ this.A = 0;
132182
+ return;
132228
132183
  }
132229
- _r = fmt.Sprintf("focus.Event{(%s)}", new sliceType([new $String(str)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
132230
- $s = -1; return _r;
132231
- /* */ } return; } if ($f === undefined) { $f = { $blk: Event.ptr.prototype.String }; } $f._r = _r; $f.e = e; $f.str = str; $f.$s = $s; $f.$r = $r; return $f;
132232
- };
132233
- Event.prototype.String = function() { return this.$val.String(); };
132234
- Event.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}];
132235
- Event.init("", [{prop: "In", name: "In", embedded: false, exported: true, typ: $Bool, tag: ""}]);
132236
- $init = function() {
132237
- $pkg.$init = function() {};
132238
- /* */ 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:
132239
- $r = fmt.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
132240
- /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
132241
- };
132242
- $pkg.$init = $init;
132243
- return $pkg;
132244
- })();
132245
- $packages["golang.org/x/mobile/event/key"] = (function() {
132246
- var $pkg = {}, $init, fmt, strings, Event, Direction, Modifiers, Code, structType, sliceType, sliceType$1, _Code_index_1, _Code_index_2, _Code_index_3, _Code_index_4, _Code_index_6, _Code_index_7, mods;
132247
- fmt = $packages["fmt"];
132248
- strings = $packages["strings"];
132249
- Event = $pkg.Event = $newType(0, $kindStruct, "key.Event", true, "golang.org/x/mobile/event/key", true, function(Rune_, Code_, Modifiers_, Direction_) {
132184
+ this.R = R_;
132185
+ this.G = G_;
132186
+ this.B = B_;
132187
+ this.A = A_;
132188
+ });
132189
+ Alpha = $pkg.Alpha = $newType(0, $kindStruct, "color.Alpha", true, "image/color", true, function(A_) {
132250
132190
  this.$val = this;
132251
132191
  if (arguments.length === 0) {
132252
- this.Rune = 0;
132253
- this.Code = 0;
132254
- this.Modifiers = 0;
132255
- this.Direction = 0;
132192
+ this.A = 0;
132256
132193
  return;
132257
132194
  }
132258
- this.Rune = Rune_;
132259
- this.Code = Code_;
132260
- this.Modifiers = Modifiers_;
132261
- this.Direction = Direction_;
132195
+ this.A = A_;
132262
132196
  });
132263
- Direction = $pkg.Direction = $newType(1, $kindUint8, "key.Direction", true, "golang.org/x/mobile/event/key", true, null);
132264
- Modifiers = $pkg.Modifiers = $newType(4, $kindUint32, "key.Modifiers", true, "golang.org/x/mobile/event/key", true, null);
132265
- Code = $pkg.Code = $newType(4, $kindUint32, "key.Code", true, "golang.org/x/mobile/event/key", true, null);
132266
- structType = $structType("golang.org/x/mobile/event/key", [{prop: "m", name: "m", embedded: false, exported: false, typ: Modifiers, tag: ""}, {prop: "s", name: "s", embedded: false, exported: false, typ: $String, tag: ""}]);
132267
- sliceType = $sliceType($emptyInterface);
132268
- sliceType$1 = $sliceType($String);
132269
- Code.prototype.String = function() {
132270
- var _r, i, x, x$1, x$2, x$3, x$4, x$5, $s, $r;
132271
- /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; i = $f.i; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; x$4 = $f.x$4; x$5 = $f.x$5; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
132272
- i = this.$val;
132273
- /* */ if ((i === 0)) { $s = 2; continue; }
132274
- /* */ if (4 <= i && i <= 49) { $s = 3; continue; }
132275
- /* */ if (51 <= i && i <= 69) { $s = 4; continue; }
132276
- /* */ if (72 <= i && i <= 99) { $s = 5; continue; }
132277
- /* */ if (103 <= i && i <= 115) { $s = 6; continue; }
132278
- /* */ if ((i === 117)) { $s = 7; continue; }
132279
- /* */ if (127 <= i && i <= 129) { $s = 8; continue; }
132280
- /* */ if (224 <= i && i <= 231) { $s = 9; continue; }
132281
- /* */ if ((i === 65536)) { $s = 10; continue; }
132282
- /* */ $s = 11; continue;
132283
- /* if ((i === 0)) { */ case 2:
132284
- $s = -1; return "CodeUnknown";
132285
- /* } else if (4 <= i && i <= 49) { */ case 3:
132286
- i = i - (4) >>> 0;
132287
- $s = -1; return $substring("CodeACodeBCodeCCodeDCodeECodeFCodeGCodeHCodeICodeJCodeKCodeLCodeMCodeNCodeOCodePCodeQCodeRCodeSCodeTCodeUCodeVCodeWCodeXCodeYCodeZCode1Code2Code3Code4Code5Code6Code7Code8Code9Code0CodeReturnEnterCodeEscapeCodeDeleteBackspaceCodeTabCodeSpacebarCodeHyphenMinusCodeEqualSignCodeLeftSquareBracketCodeRightSquareBracketCodeBackslash", ((i < 0 || i >= _Code_index_1.length) ? ($throwRuntimeError("index out of range"), undefined) : _Code_index_1[i]), (x = i + 1 >>> 0, ((x < 0 || x >= _Code_index_1.length) ? ($throwRuntimeError("index out of range"), undefined) : _Code_index_1[x])));
132288
- /* } else if (51 <= i && i <= 69) { */ case 4:
132289
- i = i - (51) >>> 0;
132290
- $s = -1; return $substring("CodeSemicolonCodeApostropheCodeGraveAccentCodeCommaCodeFullStopCodeSlashCodeCapsLockCodeF1CodeF2CodeF3CodeF4CodeF5CodeF6CodeF7CodeF8CodeF9CodeF10CodeF11CodeF12", ((i < 0 || i >= _Code_index_2.length) ? ($throwRuntimeError("index out of range"), undefined) : _Code_index_2[i]), (x$1 = i + 1 >>> 0, ((x$1 < 0 || x$1 >= _Code_index_2.length) ? ($throwRuntimeError("index out of range"), undefined) : _Code_index_2[x$1])));
132291
- /* } else if (72 <= i && i <= 99) { */ case 5:
132292
- i = i - (72) >>> 0;
132293
- $s = -1; return $substring("CodePauseCodeInsertCodeHomeCodePageUpCodeDeleteForwardCodeEndCodePageDownCodeRightArrowCodeLeftArrowCodeDownArrowCodeUpArrowCodeKeypadNumLockCodeKeypadSlashCodeKeypadAsteriskCodeKeypadHyphenMinusCodeKeypadPlusSignCodeKeypadEnterCodeKeypad1CodeKeypad2CodeKeypad3CodeKeypad4CodeKeypad5CodeKeypad6CodeKeypad7CodeKeypad8CodeKeypad9CodeKeypad0CodeKeypadFullStop", ((i < 0 || i >= _Code_index_3.length) ? ($throwRuntimeError("index out of range"), undefined) : _Code_index_3[i]), (x$2 = i + 1 >>> 0, ((x$2 < 0 || x$2 >= _Code_index_3.length) ? ($throwRuntimeError("index out of range"), undefined) : _Code_index_3[x$2])));
132294
- /* } else if (103 <= i && i <= 115) { */ case 6:
132295
- i = i - (103) >>> 0;
132296
- $s = -1; return $substring("CodeKeypadEqualSignCodeF13CodeF14CodeF15CodeF16CodeF17CodeF18CodeF19CodeF20CodeF21CodeF22CodeF23CodeF24", ((i < 0 || i >= _Code_index_4.length) ? ($throwRuntimeError("index out of range"), undefined) : _Code_index_4[i]), (x$3 = i + 1 >>> 0, ((x$3 < 0 || x$3 >= _Code_index_4.length) ? ($throwRuntimeError("index out of range"), undefined) : _Code_index_4[x$3])));
132297
- /* } else if ((i === 117)) { */ case 7:
132298
- $s = -1; return "CodeHelp";
132299
- /* } else if (127 <= i && i <= 129) { */ case 8:
132300
- i = i - (127) >>> 0;
132301
- $s = -1; return $substring("CodeMuteCodeVolumeUpCodeVolumeDown", ((i < 0 || i >= _Code_index_6.length) ? ($throwRuntimeError("index out of range"), undefined) : _Code_index_6[i]), (x$4 = i + 1 >>> 0, ((x$4 < 0 || x$4 >= _Code_index_6.length) ? ($throwRuntimeError("index out of range"), undefined) : _Code_index_6[x$4])));
132302
- /* } else if (224 <= i && i <= 231) { */ case 9:
132303
- i = i - (224) >>> 0;
132304
- $s = -1; return $substring("CodeLeftControlCodeLeftShiftCodeLeftAltCodeLeftGUICodeRightControlCodeRightShiftCodeRightAltCodeRightGUI", ((i < 0 || i >= _Code_index_7.length) ? ($throwRuntimeError("index out of range"), undefined) : _Code_index_7[i]), (x$5 = i + 1 >>> 0, ((x$5 < 0 || x$5 >= _Code_index_7.length) ? ($throwRuntimeError("index out of range"), undefined) : _Code_index_7[x$5])));
132305
- /* } else if ((i === 65536)) { */ case 10:
132306
- $s = -1; return "CodeCompose";
132307
- /* } else { */ case 11:
132308
- _r = fmt.Sprintf("Code(%d)", new sliceType([new Code(i)])); /* */ $s = 13; case 13: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
132309
- $s = -1; return _r;
132310
- /* } */ case 12:
132311
- case 1:
132312
- $s = -1; return "";
132313
- /* */ } return; } if ($f === undefined) { $f = { $blk: Code.prototype.String }; } $f._r = _r; $f.i = i; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.x$4 = x$4; $f.x$5 = x$5; $f.$s = $s; $f.$r = $r; return $f;
132314
- };
132315
- $ptrType(Code).prototype.String = function() { return new Code(this.$get()).String(); };
132316
- Event.ptr.prototype.String = function() {
132317
- var _r, _r$1, e, $s, $r;
132318
- /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; e = $f.e; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
132319
- e = this;
132320
- /* */ if (e.Rune >= 0) { $s = 1; continue; }
132321
- /* */ $s = 2; continue;
132322
- /* if (e.Rune >= 0) { */ case 1:
132323
- _r = fmt.Sprintf("key.Event{%q (%v), %v, %v}", new sliceType([new $Int32(e.Rune), new Code(e.Code), new Modifiers(e.Modifiers), new Direction(e.Direction)])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
132324
- $s = -1; return _r;
132325
- /* } */ case 2:
132326
- _r$1 = fmt.Sprintf("key.Event{(%v), %v, %v}", new sliceType([new Code(e.Code), new Modifiers(e.Modifiers), new Direction(e.Direction)])); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
132327
- $s = -1; return _r$1;
132328
- /* */ } return; } if ($f === undefined) { $f = { $blk: Event.ptr.prototype.String }; } $f._r = _r; $f._r$1 = _r$1; $f.e = e; $f.$s = $s; $f.$r = $r; return $f;
132329
- };
132330
- Event.prototype.String = function() { return this.$val.String(); };
132331
- Modifiers.prototype.String = function() {
132332
- var _i, _ref, m, match, mod;
132333
- m = this.$val;
132334
- match = sliceType$1.nil;
132335
- _ref = mods;
132336
- _i = 0;
132337
- while (true) {
132338
- if (!(_i < 4)) { break; }
132339
- mod = $clone(((_i < 0 || _i >= _ref.length) ? ($throwRuntimeError("index out of range"), undefined) : _ref[_i]), structType);
132340
- if (!((((mod.m & m) >>> 0) === 0))) {
132341
- match = $append(match, mod.s);
132342
- }
132343
- _i++;
132344
- }
132345
- return "key.Modifiers(" + strings.Join(match, "|") + ")";
132346
- };
132347
- $ptrType(Modifiers).prototype.String = function() { return new Modifiers(this.$get()).String(); };
132348
- Direction.prototype.String = function() {
132349
- var _1, _r, d, $s, $r;
132350
- /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r = $f._r; d = $f.d; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
132351
- d = this.$val;
132352
- _1 = d;
132353
- /* */ if (_1 === (0)) { $s = 2; continue; }
132354
- /* */ if (_1 === (1)) { $s = 3; continue; }
132355
- /* */ if (_1 === (2)) { $s = 4; continue; }
132356
- /* */ $s = 5; continue;
132357
- /* if (_1 === (0)) { */ case 2:
132358
- $s = -1; return "None";
132359
- /* } else if (_1 === (1)) { */ case 3:
132360
- $s = -1; return "Press";
132361
- /* } else if (_1 === (2)) { */ case 4:
132362
- $s = -1; return "Release";
132363
- /* } else { */ case 5:
132364
- _r = fmt.Sprintf("key.Direction(%d)", new sliceType([new Direction(d)])); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
132365
- $s = -1; return _r;
132366
- /* } */ case 6:
132367
- case 1:
132368
- $s = -1; return "";
132369
- /* */ } return; } if ($f === undefined) { $f = { $blk: Direction.prototype.String }; } $f._1 = _1; $f._r = _r; $f.d = d; $f.$s = $s; $f.$r = $r; return $f;
132370
- };
132371
- $ptrType(Direction).prototype.String = function() { return new Direction(this.$get()).String(); };
132372
- Event.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}];
132373
- Direction.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}];
132374
- Modifiers.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}];
132375
- Code.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}];
132376
- Event.init("", [{prop: "Rune", name: "Rune", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "Code", name: "Code", embedded: false, exported: true, typ: Code, tag: ""}, {prop: "Modifiers", name: "Modifiers", embedded: false, exported: true, typ: Modifiers, tag: ""}, {prop: "Direction", name: "Direction", embedded: false, exported: true, typ: Direction, tag: ""}]);
132377
- $init = function() {
132378
- $pkg.$init = function() {};
132379
- /* */ 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:
132380
- $r = fmt.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
132381
- $r = strings.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
132382
- _Code_index_1 = $toNativeArray($kindUint16, [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, 160, 165, 170, 175, 180, 195, 205, 224, 231, 243, 258, 271, 292, 314, 327]);
132383
- _Code_index_2 = $toNativeArray($kindUint8, [0, 13, 27, 42, 51, 63, 72, 84, 90, 96, 102, 108, 114, 120, 126, 132, 138, 145, 152, 159]);
132384
- _Code_index_3 = $toNativeArray($kindUint16, [0, 9, 19, 27, 37, 54, 61, 73, 87, 100, 113, 124, 141, 156, 174, 195, 213, 228, 239, 250, 261, 272, 283, 294, 305, 316, 327, 338, 356]);
132385
- _Code_index_4 = $toNativeArray($kindUint8, [0, 19, 26, 33, 40, 47, 54, 61, 68, 75, 82, 89, 96, 103]);
132386
- _Code_index_6 = $toNativeArray($kindUint8, [0, 8, 20, 34]);
132387
- _Code_index_7 = $toNativeArray($kindUint8, [0, 15, 28, 39, 50, 66, 80, 92, 104]);
132388
- mods = $toNativeArray($kindStruct, [new structType.ptr(1, "Shift"), new structType.ptr(2, "Control"), new structType.ptr(4, "Alt"), new structType.ptr(8, "Meta")]);
132389
- /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
132390
- };
132391
- $pkg.$init = $init;
132392
- return $pkg;
132393
- })();
132394
- $packages["golang.org/x/mobile/event/mouse"] = (function() {
132395
- var $pkg = {}, $init, fmt, key, Event, Button, Direction, sliceType;
132396
- fmt = $packages["fmt"];
132397
- key = $packages["golang.org/x/mobile/event/key"];
132398
- Event = $pkg.Event = $newType(0, $kindStruct, "mouse.Event", true, "golang.org/x/mobile/event/mouse", true, function(X_, Y_, Button_, Modifiers_, Direction_) {
132399
- this.$val = this;
132400
- if (arguments.length === 0) {
132401
- this.X = 0;
132402
- this.Y = 0;
132403
- this.Button = 0;
132404
- this.Modifiers = 0;
132405
- this.Direction = 0;
132406
- return;
132407
- }
132408
- this.X = X_;
132409
- this.Y = Y_;
132410
- this.Button = Button_;
132411
- this.Modifiers = Modifiers_;
132412
- this.Direction = Direction_;
132413
- });
132414
- Button = $pkg.Button = $newType(4, $kindInt32, "mouse.Button", true, "golang.org/x/mobile/event/mouse", true, null);
132415
- Direction = $pkg.Direction = $newType(1, $kindUint8, "mouse.Direction", true, "golang.org/x/mobile/event/mouse", true, null);
132416
- sliceType = $sliceType($emptyInterface);
132417
- Button.prototype.IsWheel = function() {
132418
- var b;
132419
- b = this.$val;
132420
- return b < 0;
132421
- };
132422
- $ptrType(Button).prototype.IsWheel = function() { return new Button(this.$get()).IsWheel(); };
132423
- Direction.prototype.String = function() {
132424
- var _1, _r, d, $s, $r;
132425
- /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r = $f._r; d = $f.d; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
132426
- d = this.$val;
132427
- _1 = d;
132428
- /* */ if (_1 === (0)) { $s = 2; continue; }
132429
- /* */ if (_1 === (1)) { $s = 3; continue; }
132430
- /* */ if (_1 === (2)) { $s = 4; continue; }
132431
- /* */ if (_1 === (3)) { $s = 5; continue; }
132432
- /* */ $s = 6; continue;
132433
- /* if (_1 === (0)) { */ case 2:
132434
- $s = -1; return "None";
132435
- /* } else if (_1 === (1)) { */ case 3:
132436
- $s = -1; return "Press";
132437
- /* } else if (_1 === (2)) { */ case 4:
132438
- $s = -1; return "Release";
132439
- /* } else if (_1 === (3)) { */ case 5:
132440
- $s = -1; return "Step";
132441
- /* } else { */ case 6:
132442
- _r = fmt.Sprintf("mouse.Direction(%d)", new sliceType([new Direction(d)])); /* */ $s = 8; case 8: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
132443
- $s = -1; return _r;
132444
- /* } */ case 7:
132445
- case 1:
132446
- $s = -1; return "";
132447
- /* */ } return; } if ($f === undefined) { $f = { $blk: Direction.prototype.String }; } $f._1 = _1; $f._r = _r; $f.d = d; $f.$s = $s; $f.$r = $r; return $f;
132448
- };
132449
- $ptrType(Direction).prototype.String = function() { return new Direction(this.$get()).String(); };
132450
- Button.methods = [{prop: "IsWheel", name: "IsWheel", pkg: "", typ: $funcType([], [$Bool], false)}];
132451
- Direction.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}];
132452
- Event.init("", [{prop: "X", name: "X", embedded: false, exported: true, typ: $Float32, tag: ""}, {prop: "Y", name: "Y", embedded: false, exported: true, typ: $Float32, tag: ""}, {prop: "Button", name: "Button", embedded: false, exported: true, typ: Button, tag: ""}, {prop: "Modifiers", name: "Modifiers", embedded: false, exported: true, typ: key.Modifiers, tag: ""}, {prop: "Direction", name: "Direction", embedded: false, exported: true, typ: Direction, tag: ""}]);
132453
- $init = function() {
132454
- $pkg.$init = function() {};
132455
- /* */ 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:
132456
- $r = fmt.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
132457
- $r = key.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
132458
- /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
132459
- };
132460
- $pkg.$init = $init;
132461
- return $pkg;
132462
- })();
132463
- $packages["image/color"] = (function() {
132464
- var $pkg = {}, $init, Color, RGBA, RGBA64, NRGBA, NRGBA64, Alpha, Alpha16, Gray, Gray16, Model, modelFunc, Palette, YCbCr, NYCbCrA, CMYK, ptrType, funcType, ModelFunc, rgbaModel, rgba64Model, nrgbaModel, nrgba64Model, alphaModel, alpha16Model, grayModel, gray16Model, sqDiff, RGBToYCbCr, yCbCrModel, nYCbCrAModel, RGBToCMYK, CMYKToRGB, cmykModel;
132465
- Color = $pkg.Color = $newType(8, $kindInterface, "color.Color", true, "image/color", true, null);
132466
- RGBA = $pkg.RGBA = $newType(0, $kindStruct, "color.RGBA", true, "image/color", true, function(R_, G_, B_, A_) {
132467
- this.$val = this;
132468
- if (arguments.length === 0) {
132469
- this.R = 0;
132470
- this.G = 0;
132471
- this.B = 0;
132472
- this.A = 0;
132473
- return;
132474
- }
132475
- this.R = R_;
132476
- this.G = G_;
132477
- this.B = B_;
132478
- this.A = A_;
132479
- });
132480
- RGBA64 = $pkg.RGBA64 = $newType(0, $kindStruct, "color.RGBA64", true, "image/color", true, function(R_, G_, B_, A_) {
132481
- this.$val = this;
132482
- if (arguments.length === 0) {
132483
- this.R = 0;
132484
- this.G = 0;
132485
- this.B = 0;
132486
- this.A = 0;
132487
- return;
132488
- }
132489
- this.R = R_;
132490
- this.G = G_;
132491
- this.B = B_;
132492
- this.A = A_;
132493
- });
132494
- NRGBA = $pkg.NRGBA = $newType(0, $kindStruct, "color.NRGBA", true, "image/color", true, function(R_, G_, B_, A_) {
132495
- this.$val = this;
132496
- if (arguments.length === 0) {
132497
- this.R = 0;
132498
- this.G = 0;
132499
- this.B = 0;
132500
- this.A = 0;
132501
- return;
132502
- }
132503
- this.R = R_;
132504
- this.G = G_;
132505
- this.B = B_;
132506
- this.A = A_;
132507
- });
132508
- NRGBA64 = $pkg.NRGBA64 = $newType(0, $kindStruct, "color.NRGBA64", true, "image/color", true, function(R_, G_, B_, A_) {
132509
- this.$val = this;
132510
- if (arguments.length === 0) {
132511
- this.R = 0;
132512
- this.G = 0;
132513
- this.B = 0;
132514
- this.A = 0;
132515
- return;
132516
- }
132517
- this.R = R_;
132518
- this.G = G_;
132519
- this.B = B_;
132520
- this.A = A_;
132521
- });
132522
- Alpha = $pkg.Alpha = $newType(0, $kindStruct, "color.Alpha", true, "image/color", true, function(A_) {
132523
- this.$val = this;
132524
- if (arguments.length === 0) {
132525
- this.A = 0;
132526
- return;
132527
- }
132528
- this.A = A_;
132529
- });
132530
- Alpha16 = $pkg.Alpha16 = $newType(0, $kindStruct, "color.Alpha16", true, "image/color", true, function(A_) {
132531
- this.$val = this;
132532
- if (arguments.length === 0) {
132533
- this.A = 0;
132534
- return;
132197
+ Alpha16 = $pkg.Alpha16 = $newType(0, $kindStruct, "color.Alpha16", true, "image/color", true, function(A_) {
132198
+ this.$val = this;
132199
+ if (arguments.length === 0) {
132200
+ this.A = 0;
132201
+ return;
132535
132202
  }
132536
132203
  this.A = A_;
132537
132204
  });
@@ -134337,63 +134004,463 @@ $packages["image"] = (function() {
134337
134004
  if ($clone(r, Rectangle).Empty()) {
134338
134005
  return new YCbCr.ptr(sliceType$1.nil, sliceType$1.nil, sliceType$1.nil, 0, 0, p.SubsampleRatio, new Rectangle.ptr(new Point.ptr(0, 0), new Point.ptr(0, 0)));
134339
134006
  }
134340
- yi = p.YOffset(r.Min.X, r.Min.Y);
134341
- ci = p.COffset(r.Min.X, r.Min.Y);
134342
- return new YCbCr.ptr($subslice(p.Y, yi), $subslice(p.Cb, ci), $subslice(p.Cr, ci), p.YStride, p.CStride, p.SubsampleRatio, $clone(r, Rectangle));
134007
+ yi = p.YOffset(r.Min.X, r.Min.Y);
134008
+ ci = p.COffset(r.Min.X, r.Min.Y);
134009
+ return new YCbCr.ptr($subslice(p.Y, yi), $subslice(p.Cb, ci), $subslice(p.Cr, ci), p.YStride, p.CStride, p.SubsampleRatio, $clone(r, Rectangle));
134010
+ };
134011
+ YCbCr.prototype.SubImage = function(r) { return this.$val.SubImage(r); };
134012
+ YCbCr.ptr.prototype.Opaque = function() {
134013
+ var p;
134014
+ p = this;
134015
+ return true;
134016
+ };
134017
+ YCbCr.prototype.Opaque = function() { return this.$val.Opaque(); };
134018
+ Point.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([Point], [Point], false)}, {prop: "Sub", name: "Sub", pkg: "", typ: $funcType([Point], [Point], false)}, {prop: "Mul", name: "Mul", pkg: "", typ: $funcType([$Int], [Point], false)}, {prop: "Div", name: "Div", pkg: "", typ: $funcType([$Int], [Point], false)}, {prop: "In", name: "In", pkg: "", typ: $funcType([Rectangle], [$Bool], false)}, {prop: "Mod", name: "Mod", pkg: "", typ: $funcType([Rectangle], [Point], false)}, {prop: "Eq", name: "Eq", pkg: "", typ: $funcType([Point], [$Bool], false)}];
134019
+ Rectangle.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Dx", name: "Dx", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Dy", name: "Dy", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [Point], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([Point], [Rectangle], false)}, {prop: "Sub", name: "Sub", pkg: "", typ: $funcType([Point], [Rectangle], false)}, {prop: "Inset", name: "Inset", pkg: "", typ: $funcType([$Int], [Rectangle], false)}, {prop: "Intersect", name: "Intersect", pkg: "", typ: $funcType([Rectangle], [Rectangle], false)}, {prop: "Union", name: "Union", pkg: "", typ: $funcType([Rectangle], [Rectangle], false)}, {prop: "Empty", name: "Empty", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Eq", name: "Eq", pkg: "", typ: $funcType([Rectangle], [$Bool], false)}, {prop: "Overlaps", name: "Overlaps", pkg: "", typ: $funcType([Rectangle], [$Bool], false)}, {prop: "In", name: "In", pkg: "", typ: $funcType([Rectangle], [$Bool], false)}, {prop: "Canon", name: "Canon", pkg: "", typ: $funcType([], [Rectangle], false)}, {prop: "At", name: "At", pkg: "", typ: $funcType([$Int, $Int], [color.Color], false)}, {prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [Rectangle], false)}, {prop: "ColorModel", name: "ColorModel", pkg: "", typ: $funcType([], [color.Model], false)}];
134020
+ ptrType.methods = [{prop: "ColorModel", name: "ColorModel", pkg: "", typ: $funcType([], [color.Model], false)}, {prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [Rectangle], false)}, {prop: "At", name: "At", pkg: "", typ: $funcType([$Int, $Int], [color.Color], false)}, {prop: "RGBAAt", name: "RGBAAt", pkg: "", typ: $funcType([$Int, $Int], [color.RGBA], false)}, {prop: "PixOffset", name: "PixOffset", pkg: "", typ: $funcType([$Int, $Int], [$Int], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$Int, $Int, color.Color], [], false)}, {prop: "SetRGBA", name: "SetRGBA", pkg: "", typ: $funcType([$Int, $Int, color.RGBA], [], false)}, {prop: "SubImage", name: "SubImage", pkg: "", typ: $funcType([Rectangle], [Image], false)}, {prop: "Opaque", name: "Opaque", pkg: "", typ: $funcType([], [$Bool], false)}];
134021
+ ptrType$2.methods = [{prop: "ColorModel", name: "ColorModel", pkg: "", typ: $funcType([], [color.Model], false)}, {prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [Rectangle], false)}, {prop: "At", name: "At", pkg: "", typ: $funcType([$Int, $Int], [color.Color], false)}, {prop: "NRGBAAt", name: "NRGBAAt", pkg: "", typ: $funcType([$Int, $Int], [color.NRGBA], false)}, {prop: "PixOffset", name: "PixOffset", pkg: "", typ: $funcType([$Int, $Int], [$Int], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$Int, $Int, color.Color], [], false)}, {prop: "SetNRGBA", name: "SetNRGBA", pkg: "", typ: $funcType([$Int, $Int, color.NRGBA], [], false)}, {prop: "SubImage", name: "SubImage", pkg: "", typ: $funcType([Rectangle], [Image], false)}, {prop: "Opaque", name: "Opaque", pkg: "", typ: $funcType([], [$Bool], false)}];
134022
+ ptrType$4.methods = [{prop: "ColorModel", name: "ColorModel", pkg: "", typ: $funcType([], [color.Model], false)}, {prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [Rectangle], false)}, {prop: "At", name: "At", pkg: "", typ: $funcType([$Int, $Int], [color.Color], false)}, {prop: "AlphaAt", name: "AlphaAt", pkg: "", typ: $funcType([$Int, $Int], [color.Alpha], false)}, {prop: "PixOffset", name: "PixOffset", pkg: "", typ: $funcType([$Int, $Int], [$Int], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$Int, $Int, color.Color], [], false)}, {prop: "SetAlpha", name: "SetAlpha", pkg: "", typ: $funcType([$Int, $Int, color.Alpha], [], false)}, {prop: "SubImage", name: "SubImage", pkg: "", typ: $funcType([Rectangle], [Image], false)}, {prop: "Opaque", name: "Opaque", pkg: "", typ: $funcType([], [$Bool], false)}];
134023
+ ptrType$6.methods = [{prop: "ColorModel", name: "ColorModel", pkg: "", typ: $funcType([], [color.Model], false)}, {prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [Rectangle], false)}, {prop: "At", name: "At", pkg: "", typ: $funcType([$Int, $Int], [color.Color], false)}, {prop: "GrayAt", name: "GrayAt", pkg: "", typ: $funcType([$Int, $Int], [color.Gray], false)}, {prop: "PixOffset", name: "PixOffset", pkg: "", typ: $funcType([$Int, $Int], [$Int], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$Int, $Int, color.Color], [], false)}, {prop: "SetGray", name: "SetGray", pkg: "", typ: $funcType([$Int, $Int, color.Gray], [], false)}, {prop: "SubImage", name: "SubImage", pkg: "", typ: $funcType([Rectangle], [Image], false)}, {prop: "Opaque", name: "Opaque", pkg: "", typ: $funcType([], [$Bool], false)}];
134024
+ ptrType$8.methods = [{prop: "ColorModel", name: "ColorModel", pkg: "", typ: $funcType([], [color.Model], false)}, {prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [Rectangle], false)}, {prop: "At", name: "At", pkg: "", typ: $funcType([$Int, $Int], [color.Color], false)}, {prop: "CMYKAt", name: "CMYKAt", pkg: "", typ: $funcType([$Int, $Int], [color.CMYK], false)}, {prop: "PixOffset", name: "PixOffset", pkg: "", typ: $funcType([$Int, $Int], [$Int], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$Int, $Int, color.Color], [], false)}, {prop: "SetCMYK", name: "SetCMYK", pkg: "", typ: $funcType([$Int, $Int, color.CMYK], [], false)}, {prop: "SubImage", name: "SubImage", pkg: "", typ: $funcType([Rectangle], [Image], false)}, {prop: "Opaque", name: "Opaque", pkg: "", typ: $funcType([], [$Bool], false)}];
134025
+ ptrType$9.methods = [{prop: "ColorModel", name: "ColorModel", pkg: "", typ: $funcType([], [color.Model], false)}, {prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [Rectangle], false)}, {prop: "At", name: "At", pkg: "", typ: $funcType([$Int, $Int], [color.Color], false)}, {prop: "PixOffset", name: "PixOffset", pkg: "", typ: $funcType([$Int, $Int], [$Int], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$Int, $Int, color.Color], [], false)}, {prop: "ColorIndexAt", name: "ColorIndexAt", pkg: "", typ: $funcType([$Int, $Int], [$Uint8], false)}, {prop: "SetColorIndex", name: "SetColorIndex", pkg: "", typ: $funcType([$Int, $Int, $Uint8], [], false)}, {prop: "SubImage", name: "SubImage", pkg: "", typ: $funcType([Rectangle], [Image], false)}, {prop: "Opaque", name: "Opaque", pkg: "", typ: $funcType([], [$Bool], false)}];
134026
+ ptrType$10.methods = [{prop: "RGBA", name: "RGBA", pkg: "", typ: $funcType([], [$Uint32, $Uint32, $Uint32, $Uint32], false)}, {prop: "ColorModel", name: "ColorModel", pkg: "", typ: $funcType([], [color.Model], false)}, {prop: "Convert", name: "Convert", pkg: "", typ: $funcType([color.Color], [color.Color], false)}, {prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [Rectangle], false)}, {prop: "At", name: "At", pkg: "", typ: $funcType([$Int, $Int], [color.Color], false)}, {prop: "Opaque", name: "Opaque", pkg: "", typ: $funcType([], [$Bool], false)}];
134027
+ YCbCrSubsampleRatio.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}];
134028
+ ptrType$11.methods = [{prop: "ColorModel", name: "ColorModel", pkg: "", typ: $funcType([], [color.Model], false)}, {prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [Rectangle], false)}, {prop: "At", name: "At", pkg: "", typ: $funcType([$Int, $Int], [color.Color], false)}, {prop: "YCbCrAt", name: "YCbCrAt", pkg: "", typ: $funcType([$Int, $Int], [color.YCbCr], false)}, {prop: "YOffset", name: "YOffset", pkg: "", typ: $funcType([$Int, $Int], [$Int], false)}, {prop: "COffset", name: "COffset", pkg: "", typ: $funcType([$Int, $Int], [$Int], false)}, {prop: "SubImage", name: "SubImage", pkg: "", typ: $funcType([Rectangle], [Image], false)}, {prop: "Opaque", name: "Opaque", pkg: "", typ: $funcType([], [$Bool], false)}];
134029
+ Point.init("", [{prop: "X", name: "X", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Y", name: "Y", embedded: false, exported: true, typ: $Int, tag: ""}]);
134030
+ Rectangle.init("", [{prop: "Min", name: "Min", embedded: false, exported: true, typ: Point, tag: ""}, {prop: "Max", name: "Max", embedded: false, exported: true, typ: Point, tag: ""}]);
134031
+ Image.init([{prop: "At", name: "At", pkg: "", typ: $funcType([$Int, $Int], [color.Color], false)}, {prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [Rectangle], false)}, {prop: "ColorModel", name: "ColorModel", pkg: "", typ: $funcType([], [color.Model], false)}]);
134032
+ RGBA.init("", [{prop: "Pix", name: "Pix", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "Stride", name: "Stride", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Rect", name: "Rect", embedded: false, exported: true, typ: Rectangle, tag: ""}]);
134033
+ NRGBA.init("", [{prop: "Pix", name: "Pix", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "Stride", name: "Stride", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Rect", name: "Rect", embedded: false, exported: true, typ: Rectangle, tag: ""}]);
134034
+ Alpha.init("", [{prop: "Pix", name: "Pix", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "Stride", name: "Stride", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Rect", name: "Rect", embedded: false, exported: true, typ: Rectangle, tag: ""}]);
134035
+ Gray.init("", [{prop: "Pix", name: "Pix", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "Stride", name: "Stride", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Rect", name: "Rect", embedded: false, exported: true, typ: Rectangle, tag: ""}]);
134036
+ CMYK.init("", [{prop: "Pix", name: "Pix", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "Stride", name: "Stride", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Rect", name: "Rect", embedded: false, exported: true, typ: Rectangle, tag: ""}]);
134037
+ Paletted.init("", [{prop: "Pix", name: "Pix", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "Stride", name: "Stride", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Rect", name: "Rect", embedded: false, exported: true, typ: Rectangle, tag: ""}, {prop: "Palette", name: "Palette", embedded: false, exported: true, typ: color.Palette, tag: ""}]);
134038
+ Uniform.init("", [{prop: "C", name: "C", embedded: false, exported: true, typ: color.Color, tag: ""}]);
134039
+ YCbCr.init("", [{prop: "Y", name: "Y", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "Cb", name: "Cb", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "Cr", name: "Cr", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "YStride", name: "YStride", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "CStride", name: "CStride", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "SubsampleRatio", name: "SubsampleRatio", embedded: false, exported: true, typ: YCbCrSubsampleRatio, tag: ""}, {prop: "Rect", name: "Rect", embedded: false, exported: true, typ: Rectangle, tag: ""}]);
134040
+ $init = function() {
134041
+ $pkg.$init = function() {};
134042
+ /* */ 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:
134043
+ $r = bufio.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134044
+ $r = errors.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134045
+ $r = color.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134046
+ $r = io.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134047
+ $r = bits.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134048
+ $r = strconv.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134049
+ $r = sync.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134050
+ $r = atomic.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134051
+ $pkg.ZR = new Rectangle.ptr(new Point.ptr(0, 0), new Point.ptr(0, 0));
134052
+ $pkg.ErrFormat = errors.New("image: unknown format");
134053
+ $pkg.Black = NewUniform((x = color.Black, new x.constructor.elem(x)));
134054
+ $pkg.White = NewUniform((x$1 = color.White, new x$1.constructor.elem(x$1)));
134055
+ $pkg.Transparent = NewUniform((x$2 = color.Transparent, new x$2.constructor.elem(x$2)));
134056
+ $pkg.Opaque = NewUniform((x$3 = color.Opaque, new x$3.constructor.elem(x$3)));
134057
+ /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
134058
+ };
134059
+ $pkg.$init = $init;
134060
+ return $pkg;
134061
+ })();
134062
+ $packages["github.com/supraio/client-daemon/pkg/clientscreen"] = (function() {
134063
+ var $pkg = {}, $init, image, js, ptrType, sliceType, GetScreenResolution, ScreenResolutionChan;
134064
+ image = $packages["image"];
134065
+ js = $packages["syscall/js"];
134066
+ ptrType = $ptrType(image.Point);
134067
+ sliceType = $sliceType($emptyInterface);
134068
+ GetScreenResolution = function() {
134069
+ return [new image.Point.ptr($clone($clone($clone(js.Global(), js.Value).Get("screen"), js.Value).Get("width"), js.Value).Int(), $clone($clone($clone(js.Global(), js.Value).Get("screen"), js.Value).Get("height"), js.Value).Int()), $ifaceNil];
134070
+ };
134071
+ $pkg.GetScreenResolution = GetScreenResolution;
134072
+ ScreenResolutionChan = function() {
134073
+ var _r, lastSize, resChan, resizeCallback, updateRes, $s, $r;
134074
+ /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; lastSize = $f.lastSize; resChan = $f.resChan; resizeCallback = $f.resizeCallback; updateRes = $f.updateRes; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
134075
+ lastSize = [lastSize];
134076
+ resChan = [resChan];
134077
+ resizeCallback = [resizeCallback];
134078
+ updateRes = [updateRes];
134079
+ resChan[0] = new $Chan(ptrType, 0);
134080
+ lastSize[0] = new image.Point.ptr(0, 0);
134081
+ updateRes[0] = (function(lastSize, resChan, resizeCallback, updateRes) { return function $b() {
134082
+ var _tuple, err, newSize, $s, $r;
134083
+ /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _tuple = $f._tuple; err = $f.err; newSize = $f.newSize; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
134084
+ _tuple = GetScreenResolution();
134085
+ newSize = _tuple[0];
134086
+ err = _tuple[1];
134087
+ /* */ if ($interfaceIsEqual(err, $ifaceNil) && (!((newSize.X === lastSize[0].X)) || !((newSize.Y === lastSize[0].Y)))) { $s = 1; continue; }
134088
+ /* */ $s = 2; continue;
134089
+ /* if ($interfaceIsEqual(err, $ifaceNil) && (!((newSize.X === lastSize[0].X)) || !((newSize.Y === lastSize[0].Y)))) { */ case 1:
134090
+ $r = $send(resChan[0], newSize); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134091
+ lastSize[0] = newSize;
134092
+ /* } */ case 2:
134093
+ $s = -1; return;
134094
+ /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._tuple = _tuple; $f.err = err; $f.newSize = newSize; $f.$s = $s; $f.$r = $r; return $f;
134095
+ }; })(lastSize, resChan, resizeCallback, updateRes);
134096
+ $go(updateRes[0], []);
134097
+ resizeCallback[0] = $clone(js.FuncOf((function(lastSize, resChan, resizeCallback, updateRes) { return function $b(this$1, args) {
134098
+ var args, this$1, $s, $r;
134099
+ /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; args = $f.args; this$1 = $f.this$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
134100
+ $r = updateRes[0](); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134101
+ $s = -1; return $ifaceNil;
134102
+ /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.args = args; $f.this$1 = this$1; $f.$s = $s; $f.$r = $r; return $f;
134103
+ }; })(lastSize, resChan, resizeCallback, updateRes)), js.Func);
134104
+ _r = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType([new $String("resize"), new resizeCallback[0].constructor.elem(resizeCallback[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
134105
+ _r;
134106
+ $s = -1; return [resChan[0], (function(lastSize, resChan, resizeCallback, updateRes) { return function $b() {
134107
+ var _r$1, $s, $r;
134108
+ /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r$1 = $f._r$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
134109
+ _r$1 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType([new $String("resize"), new resizeCallback[0].constructor.elem(resizeCallback[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
134110
+ _r$1;
134111
+ $clone(resizeCallback[0], js.Func).Release();
134112
+ $close(resChan[0]);
134113
+ $s = -1; return;
134114
+ /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$1 = _r$1; $f.$s = $s; $f.$r = $r; return $f;
134115
+ }; })(lastSize, resChan, resizeCallback, updateRes)];
134116
+ /* */ } return; } if ($f === undefined) { $f = { $blk: ScreenResolutionChan }; } $f._r = _r; $f.lastSize = lastSize; $f.resChan = resChan; $f.resizeCallback = resizeCallback; $f.updateRes = updateRes; $f.$s = $s; $f.$r = $r; return $f;
134117
+ };
134118
+ $pkg.ScreenResolutionChan = ScreenResolutionChan;
134119
+ $init = function() {
134120
+ $pkg.$init = function() {};
134121
+ /* */ 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:
134122
+ $r = image.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134123
+ $r = js.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134124
+ /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
134125
+ };
134126
+ $pkg.$init = $init;
134127
+ return $pkg;
134128
+ })();
134129
+ $packages["github.com/supraio/client-daemon/pkg/clipboard"] = (function() {
134130
+ var $pkg = {}, $init, errs, time, UpdateClipboardInfo, JsClipboard, ptrType, sliceType, ptrType$1, NewClipboard;
134131
+ errs = $packages["github.com/supraio/client-daemon/pkg/errs"];
134132
+ time = $packages["time"];
134133
+ UpdateClipboardInfo = $pkg.UpdateClipboardInfo = $newType(0, $kindStruct, "clipboard.UpdateClipboardInfo", true, "github.com/supraio/client-daemon/pkg/clipboard", true, function(Value_) {
134134
+ this.$val = this;
134135
+ if (arguments.length === 0) {
134136
+ this.Value = "";
134137
+ return;
134138
+ }
134139
+ this.Value = Value_;
134140
+ });
134141
+ JsClipboard = $pkg.JsClipboard = $newType(0, $kindStruct, "clipboard.JsClipboard", true, "github.com/supraio/client-daemon/pkg/clipboard", true, function() {
134142
+ this.$val = this;
134143
+ if (arguments.length === 0) {
134144
+ return;
134145
+ }
134146
+ });
134147
+ ptrType = $ptrType(UpdateClipboardInfo);
134148
+ sliceType = $sliceType($emptyInterface);
134149
+ ptrType$1 = $ptrType(JsClipboard);
134150
+ NewClipboard = function() {
134151
+ return [new JsClipboard.ptr(), $ifaceNil];
134152
+ };
134153
+ $pkg.NewClipboard = NewClipboard;
134154
+ JsClipboard.ptr.prototype.NextUpdateInfo = function() {
134155
+ var _r, c, $s, $r;
134156
+ /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; c = $f.c; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
134157
+ c = this;
134158
+ /* while (true) { */ case 1:
134159
+ $r = time.Sleep(new time.Duration(1396, 4225654784)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134160
+ _r = errs.Errorf("Not implemented", new sliceType([])); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
134161
+ $s = -1; return [ptrType.nil, _r];
134162
+ /* } */ $s = 1; continue; case 2:
134163
+ $s = -1; return [ptrType.nil, $ifaceNil];
134164
+ /* */ } return; } if ($f === undefined) { $f = { $blk: JsClipboard.ptr.prototype.NextUpdateInfo }; } $f._r = _r; $f.c = c; $f.$s = $s; $f.$r = $r; return $f;
134165
+ };
134166
+ JsClipboard.prototype.NextUpdateInfo = function() { return this.$val.NextUpdateInfo(); };
134167
+ ptrType$1.methods = [{prop: "NextUpdateInfo", name: "NextUpdateInfo", pkg: "", typ: $funcType([], [ptrType, $error], false)}];
134168
+ UpdateClipboardInfo.init("", [{prop: "Value", name: "Value", embedded: false, exported: true, typ: $String, tag: ""}]);
134169
+ JsClipboard.init("", []);
134170
+ $init = function() {
134171
+ $pkg.$init = function() {};
134172
+ /* */ 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:
134173
+ $r = errs.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134174
+ $r = time.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134175
+ /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
134176
+ };
134177
+ $pkg.$init = $init;
134178
+ return $pkg;
134179
+ })();
134180
+ $packages["github.com/supraio/client-daemon/pkg/message"] = (function() {
134181
+ var $pkg = {}, $init, binary, MsgType, Sender, sliceType, DecodeMessageType, EncodeMessageType;
134182
+ binary = $packages["encoding/binary"];
134183
+ MsgType = $pkg.MsgType = $newType(2, $kindUint16, "message.MsgType", true, "github.com/supraio/client-daemon/pkg/message", true, null);
134184
+ Sender = $pkg.Sender = $newType(8, $kindInterface, "message.Sender", true, "github.com/supraio/client-daemon/pkg/message", true, null);
134185
+ sliceType = $sliceType($Uint8);
134186
+ DecodeMessageType = function(data) {
134187
+ var data;
134188
+ return (($clone(binary.BigEndian, binary.bigEndian).Uint16($subslice(data, 0, 2)) << 16 >>> 16));
134189
+ };
134190
+ $pkg.DecodeMessageType = DecodeMessageType;
134191
+ EncodeMessageType = function(msgType) {
134192
+ var data, msgType;
134193
+ data = $makeSlice(sliceType, 2);
134194
+ $clone(binary.BigEndian, binary.bigEndian).PutUint16(data, ((msgType << 16 >>> 16)));
134195
+ return data;
134196
+ };
134197
+ $pkg.EncodeMessageType = EncodeMessageType;
134198
+ Sender.init([{prop: "Send", name: "Send", pkg: "", typ: $funcType([MsgType, sliceType], [$error], false)}]);
134199
+ $init = function() {
134200
+ $pkg.$init = function() {};
134201
+ /* */ 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:
134202
+ $r = binary.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134203
+ /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
134204
+ };
134205
+ $pkg.$init = $init;
134206
+ return $pkg;
134207
+ })();
134208
+ $packages["golang.org/x/mobile/event/focus"] = (function() {
134209
+ var $pkg = {}, $init, fmt, Event, sliceType;
134210
+ fmt = $packages["fmt"];
134211
+ Event = $pkg.Event = $newType(0, $kindStruct, "focus.Event", true, "golang.org/x/mobile/event/focus", true, function(In_) {
134212
+ this.$val = this;
134213
+ if (arguments.length === 0) {
134214
+ this.In = false;
134215
+ return;
134216
+ }
134217
+ this.In = In_;
134218
+ });
134219
+ sliceType = $sliceType($emptyInterface);
134220
+ Event.ptr.prototype.String = function() {
134221
+ var _r, e, str, $s, $r;
134222
+ /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; e = $f.e; str = $f.str; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
134223
+ e = this;
134224
+ str = "FocusedIn";
134225
+ if (!e.In) {
134226
+ str = "FocusedOut";
134227
+ }
134228
+ _r = fmt.Sprintf("focus.Event{(%s)}", new sliceType([new $String(str)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
134229
+ $s = -1; return _r;
134230
+ /* */ } return; } if ($f === undefined) { $f = { $blk: Event.ptr.prototype.String }; } $f._r = _r; $f.e = e; $f.str = str; $f.$s = $s; $f.$r = $r; return $f;
134231
+ };
134232
+ Event.prototype.String = function() { return this.$val.String(); };
134233
+ Event.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}];
134234
+ Event.init("", [{prop: "In", name: "In", embedded: false, exported: true, typ: $Bool, tag: ""}]);
134235
+ $init = function() {
134236
+ $pkg.$init = function() {};
134237
+ /* */ 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:
134238
+ $r = fmt.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134239
+ /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
134240
+ };
134241
+ $pkg.$init = $init;
134242
+ return $pkg;
134243
+ })();
134244
+ $packages["golang.org/x/mobile/event/key"] = (function() {
134245
+ var $pkg = {}, $init, fmt, strings, Event, Direction, Modifiers, Code, structType, sliceType, sliceType$1, _Code_index_1, _Code_index_2, _Code_index_3, _Code_index_4, _Code_index_6, _Code_index_7, mods;
134246
+ fmt = $packages["fmt"];
134247
+ strings = $packages["strings"];
134248
+ Event = $pkg.Event = $newType(0, $kindStruct, "key.Event", true, "golang.org/x/mobile/event/key", true, function(Rune_, Code_, Modifiers_, Direction_) {
134249
+ this.$val = this;
134250
+ if (arguments.length === 0) {
134251
+ this.Rune = 0;
134252
+ this.Code = 0;
134253
+ this.Modifiers = 0;
134254
+ this.Direction = 0;
134255
+ return;
134256
+ }
134257
+ this.Rune = Rune_;
134258
+ this.Code = Code_;
134259
+ this.Modifiers = Modifiers_;
134260
+ this.Direction = Direction_;
134261
+ });
134262
+ Direction = $pkg.Direction = $newType(1, $kindUint8, "key.Direction", true, "golang.org/x/mobile/event/key", true, null);
134263
+ Modifiers = $pkg.Modifiers = $newType(4, $kindUint32, "key.Modifiers", true, "golang.org/x/mobile/event/key", true, null);
134264
+ Code = $pkg.Code = $newType(4, $kindUint32, "key.Code", true, "golang.org/x/mobile/event/key", true, null);
134265
+ structType = $structType("golang.org/x/mobile/event/key", [{prop: "m", name: "m", embedded: false, exported: false, typ: Modifiers, tag: ""}, {prop: "s", name: "s", embedded: false, exported: false, typ: $String, tag: ""}]);
134266
+ sliceType = $sliceType($emptyInterface);
134267
+ sliceType$1 = $sliceType($String);
134268
+ Code.prototype.String = function() {
134269
+ var _r, i, x, x$1, x$2, x$3, x$4, x$5, $s, $r;
134270
+ /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; i = $f.i; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; x$4 = $f.x$4; x$5 = $f.x$5; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
134271
+ i = this.$val;
134272
+ /* */ if ((i === 0)) { $s = 2; continue; }
134273
+ /* */ if (4 <= i && i <= 49) { $s = 3; continue; }
134274
+ /* */ if (51 <= i && i <= 69) { $s = 4; continue; }
134275
+ /* */ if (72 <= i && i <= 99) { $s = 5; continue; }
134276
+ /* */ if (103 <= i && i <= 115) { $s = 6; continue; }
134277
+ /* */ if ((i === 117)) { $s = 7; continue; }
134278
+ /* */ if (127 <= i && i <= 129) { $s = 8; continue; }
134279
+ /* */ if (224 <= i && i <= 231) { $s = 9; continue; }
134280
+ /* */ if ((i === 65536)) { $s = 10; continue; }
134281
+ /* */ $s = 11; continue;
134282
+ /* if ((i === 0)) { */ case 2:
134283
+ $s = -1; return "CodeUnknown";
134284
+ /* } else if (4 <= i && i <= 49) { */ case 3:
134285
+ i = i - (4) >>> 0;
134286
+ $s = -1; return $substring("CodeACodeBCodeCCodeDCodeECodeFCodeGCodeHCodeICodeJCodeKCodeLCodeMCodeNCodeOCodePCodeQCodeRCodeSCodeTCodeUCodeVCodeWCodeXCodeYCodeZCode1Code2Code3Code4Code5Code6Code7Code8Code9Code0CodeReturnEnterCodeEscapeCodeDeleteBackspaceCodeTabCodeSpacebarCodeHyphenMinusCodeEqualSignCodeLeftSquareBracketCodeRightSquareBracketCodeBackslash", ((i < 0 || i >= _Code_index_1.length) ? ($throwRuntimeError("index out of range"), undefined) : _Code_index_1[i]), (x = i + 1 >>> 0, ((x < 0 || x >= _Code_index_1.length) ? ($throwRuntimeError("index out of range"), undefined) : _Code_index_1[x])));
134287
+ /* } else if (51 <= i && i <= 69) { */ case 4:
134288
+ i = i - (51) >>> 0;
134289
+ $s = -1; return $substring("CodeSemicolonCodeApostropheCodeGraveAccentCodeCommaCodeFullStopCodeSlashCodeCapsLockCodeF1CodeF2CodeF3CodeF4CodeF5CodeF6CodeF7CodeF8CodeF9CodeF10CodeF11CodeF12", ((i < 0 || i >= _Code_index_2.length) ? ($throwRuntimeError("index out of range"), undefined) : _Code_index_2[i]), (x$1 = i + 1 >>> 0, ((x$1 < 0 || x$1 >= _Code_index_2.length) ? ($throwRuntimeError("index out of range"), undefined) : _Code_index_2[x$1])));
134290
+ /* } else if (72 <= i && i <= 99) { */ case 5:
134291
+ i = i - (72) >>> 0;
134292
+ $s = -1; return $substring("CodePauseCodeInsertCodeHomeCodePageUpCodeDeleteForwardCodeEndCodePageDownCodeRightArrowCodeLeftArrowCodeDownArrowCodeUpArrowCodeKeypadNumLockCodeKeypadSlashCodeKeypadAsteriskCodeKeypadHyphenMinusCodeKeypadPlusSignCodeKeypadEnterCodeKeypad1CodeKeypad2CodeKeypad3CodeKeypad4CodeKeypad5CodeKeypad6CodeKeypad7CodeKeypad8CodeKeypad9CodeKeypad0CodeKeypadFullStop", ((i < 0 || i >= _Code_index_3.length) ? ($throwRuntimeError("index out of range"), undefined) : _Code_index_3[i]), (x$2 = i + 1 >>> 0, ((x$2 < 0 || x$2 >= _Code_index_3.length) ? ($throwRuntimeError("index out of range"), undefined) : _Code_index_3[x$2])));
134293
+ /* } else if (103 <= i && i <= 115) { */ case 6:
134294
+ i = i - (103) >>> 0;
134295
+ $s = -1; return $substring("CodeKeypadEqualSignCodeF13CodeF14CodeF15CodeF16CodeF17CodeF18CodeF19CodeF20CodeF21CodeF22CodeF23CodeF24", ((i < 0 || i >= _Code_index_4.length) ? ($throwRuntimeError("index out of range"), undefined) : _Code_index_4[i]), (x$3 = i + 1 >>> 0, ((x$3 < 0 || x$3 >= _Code_index_4.length) ? ($throwRuntimeError("index out of range"), undefined) : _Code_index_4[x$3])));
134296
+ /* } else if ((i === 117)) { */ case 7:
134297
+ $s = -1; return "CodeHelp";
134298
+ /* } else if (127 <= i && i <= 129) { */ case 8:
134299
+ i = i - (127) >>> 0;
134300
+ $s = -1; return $substring("CodeMuteCodeVolumeUpCodeVolumeDown", ((i < 0 || i >= _Code_index_6.length) ? ($throwRuntimeError("index out of range"), undefined) : _Code_index_6[i]), (x$4 = i + 1 >>> 0, ((x$4 < 0 || x$4 >= _Code_index_6.length) ? ($throwRuntimeError("index out of range"), undefined) : _Code_index_6[x$4])));
134301
+ /* } else if (224 <= i && i <= 231) { */ case 9:
134302
+ i = i - (224) >>> 0;
134303
+ $s = -1; return $substring("CodeLeftControlCodeLeftShiftCodeLeftAltCodeLeftGUICodeRightControlCodeRightShiftCodeRightAltCodeRightGUI", ((i < 0 || i >= _Code_index_7.length) ? ($throwRuntimeError("index out of range"), undefined) : _Code_index_7[i]), (x$5 = i + 1 >>> 0, ((x$5 < 0 || x$5 >= _Code_index_7.length) ? ($throwRuntimeError("index out of range"), undefined) : _Code_index_7[x$5])));
134304
+ /* } else if ((i === 65536)) { */ case 10:
134305
+ $s = -1; return "CodeCompose";
134306
+ /* } else { */ case 11:
134307
+ _r = fmt.Sprintf("Code(%d)", new sliceType([new Code(i)])); /* */ $s = 13; case 13: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
134308
+ $s = -1; return _r;
134309
+ /* } */ case 12:
134310
+ case 1:
134311
+ $s = -1; return "";
134312
+ /* */ } return; } if ($f === undefined) { $f = { $blk: Code.prototype.String }; } $f._r = _r; $f.i = i; $f.x = x; $f.x$1 = x$1; $f.x$2 = x$2; $f.x$3 = x$3; $f.x$4 = x$4; $f.x$5 = x$5; $f.$s = $s; $f.$r = $r; return $f;
134313
+ };
134314
+ $ptrType(Code).prototype.String = function() { return new Code(this.$get()).String(); };
134315
+ Event.ptr.prototype.String = function() {
134316
+ var _r, _r$1, e, $s, $r;
134317
+ /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; e = $f.e; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
134318
+ e = this;
134319
+ /* */ if (e.Rune >= 0) { $s = 1; continue; }
134320
+ /* */ $s = 2; continue;
134321
+ /* if (e.Rune >= 0) { */ case 1:
134322
+ _r = fmt.Sprintf("key.Event{%q (%v), %v, %v}", new sliceType([new $Int32(e.Rune), new Code(e.Code), new Modifiers(e.Modifiers), new Direction(e.Direction)])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
134323
+ $s = -1; return _r;
134324
+ /* } */ case 2:
134325
+ _r$1 = fmt.Sprintf("key.Event{(%v), %v, %v}", new sliceType([new Code(e.Code), new Modifiers(e.Modifiers), new Direction(e.Direction)])); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
134326
+ $s = -1; return _r$1;
134327
+ /* */ } return; } if ($f === undefined) { $f = { $blk: Event.ptr.prototype.String }; } $f._r = _r; $f._r$1 = _r$1; $f.e = e; $f.$s = $s; $f.$r = $r; return $f;
134328
+ };
134329
+ Event.prototype.String = function() { return this.$val.String(); };
134330
+ Modifiers.prototype.String = function() {
134331
+ var _i, _ref, m, match, mod;
134332
+ m = this.$val;
134333
+ match = sliceType$1.nil;
134334
+ _ref = mods;
134335
+ _i = 0;
134336
+ while (true) {
134337
+ if (!(_i < 4)) { break; }
134338
+ mod = $clone(((_i < 0 || _i >= _ref.length) ? ($throwRuntimeError("index out of range"), undefined) : _ref[_i]), structType);
134339
+ if (!((((mod.m & m) >>> 0) === 0))) {
134340
+ match = $append(match, mod.s);
134341
+ }
134342
+ _i++;
134343
+ }
134344
+ return "key.Modifiers(" + strings.Join(match, "|") + ")";
134345
+ };
134346
+ $ptrType(Modifiers).prototype.String = function() { return new Modifiers(this.$get()).String(); };
134347
+ Direction.prototype.String = function() {
134348
+ var _1, _r, d, $s, $r;
134349
+ /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r = $f._r; d = $f.d; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
134350
+ d = this.$val;
134351
+ _1 = d;
134352
+ /* */ if (_1 === (0)) { $s = 2; continue; }
134353
+ /* */ if (_1 === (1)) { $s = 3; continue; }
134354
+ /* */ if (_1 === (2)) { $s = 4; continue; }
134355
+ /* */ $s = 5; continue;
134356
+ /* if (_1 === (0)) { */ case 2:
134357
+ $s = -1; return "None";
134358
+ /* } else if (_1 === (1)) { */ case 3:
134359
+ $s = -1; return "Press";
134360
+ /* } else if (_1 === (2)) { */ case 4:
134361
+ $s = -1; return "Release";
134362
+ /* } else { */ case 5:
134363
+ _r = fmt.Sprintf("key.Direction(%d)", new sliceType([new Direction(d)])); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
134364
+ $s = -1; return _r;
134365
+ /* } */ case 6:
134366
+ case 1:
134367
+ $s = -1; return "";
134368
+ /* */ } return; } if ($f === undefined) { $f = { $blk: Direction.prototype.String }; } $f._1 = _1; $f._r = _r; $f.d = d; $f.$s = $s; $f.$r = $r; return $f;
134369
+ };
134370
+ $ptrType(Direction).prototype.String = function() { return new Direction(this.$get()).String(); };
134371
+ Event.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}];
134372
+ Direction.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}];
134373
+ Modifiers.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}];
134374
+ Code.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}];
134375
+ Event.init("", [{prop: "Rune", name: "Rune", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "Code", name: "Code", embedded: false, exported: true, typ: Code, tag: ""}, {prop: "Modifiers", name: "Modifiers", embedded: false, exported: true, typ: Modifiers, tag: ""}, {prop: "Direction", name: "Direction", embedded: false, exported: true, typ: Direction, tag: ""}]);
134376
+ $init = function() {
134377
+ $pkg.$init = function() {};
134378
+ /* */ 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:
134379
+ $r = fmt.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134380
+ $r = strings.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134381
+ _Code_index_1 = $toNativeArray($kindUint16, [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, 160, 165, 170, 175, 180, 195, 205, 224, 231, 243, 258, 271, 292, 314, 327]);
134382
+ _Code_index_2 = $toNativeArray($kindUint8, [0, 13, 27, 42, 51, 63, 72, 84, 90, 96, 102, 108, 114, 120, 126, 132, 138, 145, 152, 159]);
134383
+ _Code_index_3 = $toNativeArray($kindUint16, [0, 9, 19, 27, 37, 54, 61, 73, 87, 100, 113, 124, 141, 156, 174, 195, 213, 228, 239, 250, 261, 272, 283, 294, 305, 316, 327, 338, 356]);
134384
+ _Code_index_4 = $toNativeArray($kindUint8, [0, 19, 26, 33, 40, 47, 54, 61, 68, 75, 82, 89, 96, 103]);
134385
+ _Code_index_6 = $toNativeArray($kindUint8, [0, 8, 20, 34]);
134386
+ _Code_index_7 = $toNativeArray($kindUint8, [0, 15, 28, 39, 50, 66, 80, 92, 104]);
134387
+ mods = $toNativeArray($kindStruct, [new structType.ptr(1, "Shift"), new structType.ptr(2, "Control"), new structType.ptr(4, "Alt"), new structType.ptr(8, "Meta")]);
134388
+ /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
134389
+ };
134390
+ $pkg.$init = $init;
134391
+ return $pkg;
134392
+ })();
134393
+ $packages["golang.org/x/mobile/event/mouse"] = (function() {
134394
+ var $pkg = {}, $init, fmt, key, Event, Button, Direction, sliceType;
134395
+ fmt = $packages["fmt"];
134396
+ key = $packages["golang.org/x/mobile/event/key"];
134397
+ Event = $pkg.Event = $newType(0, $kindStruct, "mouse.Event", true, "golang.org/x/mobile/event/mouse", true, function(X_, Y_, Button_, Modifiers_, Direction_) {
134398
+ this.$val = this;
134399
+ if (arguments.length === 0) {
134400
+ this.X = 0;
134401
+ this.Y = 0;
134402
+ this.Button = 0;
134403
+ this.Modifiers = 0;
134404
+ this.Direction = 0;
134405
+ return;
134406
+ }
134407
+ this.X = X_;
134408
+ this.Y = Y_;
134409
+ this.Button = Button_;
134410
+ this.Modifiers = Modifiers_;
134411
+ this.Direction = Direction_;
134412
+ });
134413
+ Button = $pkg.Button = $newType(4, $kindInt32, "mouse.Button", true, "golang.org/x/mobile/event/mouse", true, null);
134414
+ Direction = $pkg.Direction = $newType(1, $kindUint8, "mouse.Direction", true, "golang.org/x/mobile/event/mouse", true, null);
134415
+ sliceType = $sliceType($emptyInterface);
134416
+ Button.prototype.IsWheel = function() {
134417
+ var b;
134418
+ b = this.$val;
134419
+ return b < 0;
134343
134420
  };
134344
- YCbCr.prototype.SubImage = function(r) { return this.$val.SubImage(r); };
134345
- YCbCr.ptr.prototype.Opaque = function() {
134346
- var p;
134347
- p = this;
134348
- return true;
134421
+ $ptrType(Button).prototype.IsWheel = function() { return new Button(this.$get()).IsWheel(); };
134422
+ Direction.prototype.String = function() {
134423
+ var _1, _r, d, $s, $r;
134424
+ /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _r = $f._r; d = $f.d; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
134425
+ d = this.$val;
134426
+ _1 = d;
134427
+ /* */ if (_1 === (0)) { $s = 2; continue; }
134428
+ /* */ if (_1 === (1)) { $s = 3; continue; }
134429
+ /* */ if (_1 === (2)) { $s = 4; continue; }
134430
+ /* */ if (_1 === (3)) { $s = 5; continue; }
134431
+ /* */ $s = 6; continue;
134432
+ /* if (_1 === (0)) { */ case 2:
134433
+ $s = -1; return "None";
134434
+ /* } else if (_1 === (1)) { */ case 3:
134435
+ $s = -1; return "Press";
134436
+ /* } else if (_1 === (2)) { */ case 4:
134437
+ $s = -1; return "Release";
134438
+ /* } else if (_1 === (3)) { */ case 5:
134439
+ $s = -1; return "Step";
134440
+ /* } else { */ case 6:
134441
+ _r = fmt.Sprintf("mouse.Direction(%d)", new sliceType([new Direction(d)])); /* */ $s = 8; case 8: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
134442
+ $s = -1; return _r;
134443
+ /* } */ case 7:
134444
+ case 1:
134445
+ $s = -1; return "";
134446
+ /* */ } return; } if ($f === undefined) { $f = { $blk: Direction.prototype.String }; } $f._1 = _1; $f._r = _r; $f.d = d; $f.$s = $s; $f.$r = $r; return $f;
134349
134447
  };
134350
- YCbCr.prototype.Opaque = function() { return this.$val.Opaque(); };
134351
- Point.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([Point], [Point], false)}, {prop: "Sub", name: "Sub", pkg: "", typ: $funcType([Point], [Point], false)}, {prop: "Mul", name: "Mul", pkg: "", typ: $funcType([$Int], [Point], false)}, {prop: "Div", name: "Div", pkg: "", typ: $funcType([$Int], [Point], false)}, {prop: "In", name: "In", pkg: "", typ: $funcType([Rectangle], [$Bool], false)}, {prop: "Mod", name: "Mod", pkg: "", typ: $funcType([Rectangle], [Point], false)}, {prop: "Eq", name: "Eq", pkg: "", typ: $funcType([Point], [$Bool], false)}];
134352
- Rectangle.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Dx", name: "Dx", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Dy", name: "Dy", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [Point], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([Point], [Rectangle], false)}, {prop: "Sub", name: "Sub", pkg: "", typ: $funcType([Point], [Rectangle], false)}, {prop: "Inset", name: "Inset", pkg: "", typ: $funcType([$Int], [Rectangle], false)}, {prop: "Intersect", name: "Intersect", pkg: "", typ: $funcType([Rectangle], [Rectangle], false)}, {prop: "Union", name: "Union", pkg: "", typ: $funcType([Rectangle], [Rectangle], false)}, {prop: "Empty", name: "Empty", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Eq", name: "Eq", pkg: "", typ: $funcType([Rectangle], [$Bool], false)}, {prop: "Overlaps", name: "Overlaps", pkg: "", typ: $funcType([Rectangle], [$Bool], false)}, {prop: "In", name: "In", pkg: "", typ: $funcType([Rectangle], [$Bool], false)}, {prop: "Canon", name: "Canon", pkg: "", typ: $funcType([], [Rectangle], false)}, {prop: "At", name: "At", pkg: "", typ: $funcType([$Int, $Int], [color.Color], false)}, {prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [Rectangle], false)}, {prop: "ColorModel", name: "ColorModel", pkg: "", typ: $funcType([], [color.Model], false)}];
134353
- ptrType.methods = [{prop: "ColorModel", name: "ColorModel", pkg: "", typ: $funcType([], [color.Model], false)}, {prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [Rectangle], false)}, {prop: "At", name: "At", pkg: "", typ: $funcType([$Int, $Int], [color.Color], false)}, {prop: "RGBAAt", name: "RGBAAt", pkg: "", typ: $funcType([$Int, $Int], [color.RGBA], false)}, {prop: "PixOffset", name: "PixOffset", pkg: "", typ: $funcType([$Int, $Int], [$Int], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$Int, $Int, color.Color], [], false)}, {prop: "SetRGBA", name: "SetRGBA", pkg: "", typ: $funcType([$Int, $Int, color.RGBA], [], false)}, {prop: "SubImage", name: "SubImage", pkg: "", typ: $funcType([Rectangle], [Image], false)}, {prop: "Opaque", name: "Opaque", pkg: "", typ: $funcType([], [$Bool], false)}];
134354
- ptrType$2.methods = [{prop: "ColorModel", name: "ColorModel", pkg: "", typ: $funcType([], [color.Model], false)}, {prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [Rectangle], false)}, {prop: "At", name: "At", pkg: "", typ: $funcType([$Int, $Int], [color.Color], false)}, {prop: "NRGBAAt", name: "NRGBAAt", pkg: "", typ: $funcType([$Int, $Int], [color.NRGBA], false)}, {prop: "PixOffset", name: "PixOffset", pkg: "", typ: $funcType([$Int, $Int], [$Int], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$Int, $Int, color.Color], [], false)}, {prop: "SetNRGBA", name: "SetNRGBA", pkg: "", typ: $funcType([$Int, $Int, color.NRGBA], [], false)}, {prop: "SubImage", name: "SubImage", pkg: "", typ: $funcType([Rectangle], [Image], false)}, {prop: "Opaque", name: "Opaque", pkg: "", typ: $funcType([], [$Bool], false)}];
134355
- ptrType$4.methods = [{prop: "ColorModel", name: "ColorModel", pkg: "", typ: $funcType([], [color.Model], false)}, {prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [Rectangle], false)}, {prop: "At", name: "At", pkg: "", typ: $funcType([$Int, $Int], [color.Color], false)}, {prop: "AlphaAt", name: "AlphaAt", pkg: "", typ: $funcType([$Int, $Int], [color.Alpha], false)}, {prop: "PixOffset", name: "PixOffset", pkg: "", typ: $funcType([$Int, $Int], [$Int], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$Int, $Int, color.Color], [], false)}, {prop: "SetAlpha", name: "SetAlpha", pkg: "", typ: $funcType([$Int, $Int, color.Alpha], [], false)}, {prop: "SubImage", name: "SubImage", pkg: "", typ: $funcType([Rectangle], [Image], false)}, {prop: "Opaque", name: "Opaque", pkg: "", typ: $funcType([], [$Bool], false)}];
134356
- ptrType$6.methods = [{prop: "ColorModel", name: "ColorModel", pkg: "", typ: $funcType([], [color.Model], false)}, {prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [Rectangle], false)}, {prop: "At", name: "At", pkg: "", typ: $funcType([$Int, $Int], [color.Color], false)}, {prop: "GrayAt", name: "GrayAt", pkg: "", typ: $funcType([$Int, $Int], [color.Gray], false)}, {prop: "PixOffset", name: "PixOffset", pkg: "", typ: $funcType([$Int, $Int], [$Int], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$Int, $Int, color.Color], [], false)}, {prop: "SetGray", name: "SetGray", pkg: "", typ: $funcType([$Int, $Int, color.Gray], [], false)}, {prop: "SubImage", name: "SubImage", pkg: "", typ: $funcType([Rectangle], [Image], false)}, {prop: "Opaque", name: "Opaque", pkg: "", typ: $funcType([], [$Bool], false)}];
134357
- ptrType$8.methods = [{prop: "ColorModel", name: "ColorModel", pkg: "", typ: $funcType([], [color.Model], false)}, {prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [Rectangle], false)}, {prop: "At", name: "At", pkg: "", typ: $funcType([$Int, $Int], [color.Color], false)}, {prop: "CMYKAt", name: "CMYKAt", pkg: "", typ: $funcType([$Int, $Int], [color.CMYK], false)}, {prop: "PixOffset", name: "PixOffset", pkg: "", typ: $funcType([$Int, $Int], [$Int], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$Int, $Int, color.Color], [], false)}, {prop: "SetCMYK", name: "SetCMYK", pkg: "", typ: $funcType([$Int, $Int, color.CMYK], [], false)}, {prop: "SubImage", name: "SubImage", pkg: "", typ: $funcType([Rectangle], [Image], false)}, {prop: "Opaque", name: "Opaque", pkg: "", typ: $funcType([], [$Bool], false)}];
134358
- ptrType$9.methods = [{prop: "ColorModel", name: "ColorModel", pkg: "", typ: $funcType([], [color.Model], false)}, {prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [Rectangle], false)}, {prop: "At", name: "At", pkg: "", typ: $funcType([$Int, $Int], [color.Color], false)}, {prop: "PixOffset", name: "PixOffset", pkg: "", typ: $funcType([$Int, $Int], [$Int], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$Int, $Int, color.Color], [], false)}, {prop: "ColorIndexAt", name: "ColorIndexAt", pkg: "", typ: $funcType([$Int, $Int], [$Uint8], false)}, {prop: "SetColorIndex", name: "SetColorIndex", pkg: "", typ: $funcType([$Int, $Int, $Uint8], [], false)}, {prop: "SubImage", name: "SubImage", pkg: "", typ: $funcType([Rectangle], [Image], false)}, {prop: "Opaque", name: "Opaque", pkg: "", typ: $funcType([], [$Bool], false)}];
134359
- ptrType$10.methods = [{prop: "RGBA", name: "RGBA", pkg: "", typ: $funcType([], [$Uint32, $Uint32, $Uint32, $Uint32], false)}, {prop: "ColorModel", name: "ColorModel", pkg: "", typ: $funcType([], [color.Model], false)}, {prop: "Convert", name: "Convert", pkg: "", typ: $funcType([color.Color], [color.Color], false)}, {prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [Rectangle], false)}, {prop: "At", name: "At", pkg: "", typ: $funcType([$Int, $Int], [color.Color], false)}, {prop: "Opaque", name: "Opaque", pkg: "", typ: $funcType([], [$Bool], false)}];
134360
- YCbCrSubsampleRatio.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}];
134361
- ptrType$11.methods = [{prop: "ColorModel", name: "ColorModel", pkg: "", typ: $funcType([], [color.Model], false)}, {prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [Rectangle], false)}, {prop: "At", name: "At", pkg: "", typ: $funcType([$Int, $Int], [color.Color], false)}, {prop: "YCbCrAt", name: "YCbCrAt", pkg: "", typ: $funcType([$Int, $Int], [color.YCbCr], false)}, {prop: "YOffset", name: "YOffset", pkg: "", typ: $funcType([$Int, $Int], [$Int], false)}, {prop: "COffset", name: "COffset", pkg: "", typ: $funcType([$Int, $Int], [$Int], false)}, {prop: "SubImage", name: "SubImage", pkg: "", typ: $funcType([Rectangle], [Image], false)}, {prop: "Opaque", name: "Opaque", pkg: "", typ: $funcType([], [$Bool], false)}];
134362
- Point.init("", [{prop: "X", name: "X", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Y", name: "Y", embedded: false, exported: true, typ: $Int, tag: ""}]);
134363
- Rectangle.init("", [{prop: "Min", name: "Min", embedded: false, exported: true, typ: Point, tag: ""}, {prop: "Max", name: "Max", embedded: false, exported: true, typ: Point, tag: ""}]);
134364
- Image.init([{prop: "At", name: "At", pkg: "", typ: $funcType([$Int, $Int], [color.Color], false)}, {prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [Rectangle], false)}, {prop: "ColorModel", name: "ColorModel", pkg: "", typ: $funcType([], [color.Model], false)}]);
134365
- RGBA.init("", [{prop: "Pix", name: "Pix", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "Stride", name: "Stride", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Rect", name: "Rect", embedded: false, exported: true, typ: Rectangle, tag: ""}]);
134366
- NRGBA.init("", [{prop: "Pix", name: "Pix", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "Stride", name: "Stride", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Rect", name: "Rect", embedded: false, exported: true, typ: Rectangle, tag: ""}]);
134367
- Alpha.init("", [{prop: "Pix", name: "Pix", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "Stride", name: "Stride", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Rect", name: "Rect", embedded: false, exported: true, typ: Rectangle, tag: ""}]);
134368
- Gray.init("", [{prop: "Pix", name: "Pix", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "Stride", name: "Stride", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Rect", name: "Rect", embedded: false, exported: true, typ: Rectangle, tag: ""}]);
134369
- CMYK.init("", [{prop: "Pix", name: "Pix", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "Stride", name: "Stride", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Rect", name: "Rect", embedded: false, exported: true, typ: Rectangle, tag: ""}]);
134370
- Paletted.init("", [{prop: "Pix", name: "Pix", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "Stride", name: "Stride", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Rect", name: "Rect", embedded: false, exported: true, typ: Rectangle, tag: ""}, {prop: "Palette", name: "Palette", embedded: false, exported: true, typ: color.Palette, tag: ""}]);
134371
- Uniform.init("", [{prop: "C", name: "C", embedded: false, exported: true, typ: color.Color, tag: ""}]);
134372
- YCbCr.init("", [{prop: "Y", name: "Y", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "Cb", name: "Cb", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "Cr", name: "Cr", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "YStride", name: "YStride", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "CStride", name: "CStride", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "SubsampleRatio", name: "SubsampleRatio", embedded: false, exported: true, typ: YCbCrSubsampleRatio, tag: ""}, {prop: "Rect", name: "Rect", embedded: false, exported: true, typ: Rectangle, tag: ""}]);
134448
+ $ptrType(Direction).prototype.String = function() { return new Direction(this.$get()).String(); };
134449
+ Button.methods = [{prop: "IsWheel", name: "IsWheel", pkg: "", typ: $funcType([], [$Bool], false)}];
134450
+ Direction.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}];
134451
+ Event.init("", [{prop: "X", name: "X", embedded: false, exported: true, typ: $Float32, tag: ""}, {prop: "Y", name: "Y", embedded: false, exported: true, typ: $Float32, tag: ""}, {prop: "Button", name: "Button", embedded: false, exported: true, typ: Button, tag: ""}, {prop: "Modifiers", name: "Modifiers", embedded: false, exported: true, typ: key.Modifiers, tag: ""}, {prop: "Direction", name: "Direction", embedded: false, exported: true, typ: Direction, tag: ""}]);
134373
134452
  $init = function() {
134374
134453
  $pkg.$init = function() {};
134375
134454
  /* */ 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:
134376
- $r = bufio.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134377
- $r = errors.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134378
- $r = color.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134379
- $r = io.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134380
- $r = bits.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134381
- $r = strconv.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134382
- $r = sync.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134383
- $r = atomic.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134384
- $pkg.ZR = new Rectangle.ptr(new Point.ptr(0, 0), new Point.ptr(0, 0));
134385
- $pkg.ErrFormat = errors.New("image: unknown format");
134386
- $pkg.Black = NewUniform((x = color.Black, new x.constructor.elem(x)));
134387
- $pkg.White = NewUniform((x$1 = color.White, new x$1.constructor.elem(x$1)));
134388
- $pkg.Transparent = NewUniform((x$2 = color.Transparent, new x$2.constructor.elem(x$2)));
134389
- $pkg.Opaque = NewUniform((x$3 = color.Opaque, new x$3.constructor.elem(x$3)));
134455
+ $r = fmt.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134456
+ $r = key.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134390
134457
  /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
134391
134458
  };
134392
134459
  $pkg.$init = $init;
134393
134460
  return $pkg;
134394
134461
  })();
134395
134462
  $packages["github.com/supraio/client-daemon/pkg/input"] = (function() {
134396
- var $pkg = {}, $init, binary, fmt, errs, message, focus, key, mouse, image, sync, Helper, JsHelper, KeyTransformer, KeyHandler, MouseHandler, sliceType, ptrType, sliceType$1, sliceType$2, ptrType$1, ptrType$2, chanType, chanType$1, ptrType$3, chanType$2, NewHelper, NewKeyTransformer, GetScreenResolution, NewKeyHandler, NewMouseHandler;
134463
+ var $pkg = {}, $init, binary, fmt, errs, message, focus, key, mouse, sync, Helper, JsHelper, KeyTransformer, KeyHandler, MouseHandler, sliceType, ptrType, sliceType$1, sliceType$2, ptrType$1, ptrType$2, chanType, chanType$1, ptrType$3, chanType$2, NewHelper, NewKeyTransformer, NewKeyHandler, NewMouseHandler;
134397
134464
  binary = $packages["encoding/binary"];
134398
134465
  fmt = $packages["fmt"];
134399
134466
  errs = $packages["github.com/supraio/client-daemon/pkg/errs"];
@@ -134401,7 +134468,6 @@ $packages["github.com/supraio/client-daemon/pkg/input"] = (function() {
134401
134468
  focus = $packages["golang.org/x/mobile/event/focus"];
134402
134469
  key = $packages["golang.org/x/mobile/event/key"];
134403
134470
  mouse = $packages["golang.org/x/mobile/event/mouse"];
134404
- image = $packages["image"];
134405
134471
  sync = $packages["sync"];
134406
134472
  Helper = $pkg.Helper = $newType(8, $kindInterface, "input.Helper", true, "github.com/supraio/client-daemon/pkg/input", true, null);
134407
134473
  JsHelper = $pkg.JsHelper = $newType(0, $kindStruct, "input.JsHelper", true, "github.com/supraio/client-daemon/pkg/input", true, function() {
@@ -134507,10 +134573,6 @@ $packages["github.com/supraio/client-daemon/pkg/input"] = (function() {
134507
134573
  /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return transformedEvs; } if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: KeyTransformer.ptr.prototype.TransformAltGr }; } $f.ev = ev; $f.t = t; $f.transformedEvs = transformedEvs; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } }
134508
134574
  };
134509
134575
  KeyTransformer.prototype.TransformAltGr = function(ev) { return this.$val.TransformAltGr(ev); };
134510
- GetScreenResolution = function() {
134511
- return [new image.Point.ptr(3840, 2160), $ifaceNil];
134512
- };
134513
- $pkg.GetScreenResolution = GetScreenResolution;
134514
134576
  NewKeyHandler = function(keyEventChan, focusEventChan, messageSender) {
134515
134577
  var focusEventChan, keyEventChan, messageSender;
134516
134578
  return new KeyHandler.ptr(NewHelper(), keyEventChan, focusEventChan, messageSender, true, NewKeyTransformer());
@@ -134746,8 +134808,7 @@ $packages["github.com/supraio/client-daemon/pkg/input"] = (function() {
134746
134808
  $r = focus.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134747
134809
  $r = key.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134748
134810
  $r = mouse.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134749
- $r = image.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134750
- $r = sync.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134811
+ $r = sync.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
134751
134812
  /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
134752
134813
  };
134753
134814
  $pkg.$init = $init;
@@ -135422,10 +135483,11 @@ $packages["github.com/supraio/client-daemon/pkg/netclient"] = (function() {
135422
135483
  return $pkg;
135423
135484
  })();
135424
135485
  $packages["github.com/supraio/client-daemon/pkg/stats"] = (function() {
135425
- var $pkg = {}, $init, log, time, ClientStats, Frame, Stats, ptrType, sliceType, sliceType$1, ptrType$1, ptrType$2, mapType, NewStats;
135486
+ var $pkg = {}, $init, image, log, time, ClientStats, Frame, Stats, ptrType, sliceType, sliceType$1, ptrType$1, ptrType$2, ptrType$3, mapType, NewStats;
135487
+ image = $packages["image"];
135426
135488
  log = $packages["log"];
135427
135489
  time = $packages["time"];
135428
- ClientStats = $pkg.ClientStats = $newType(0, $kindStruct, "stats.ClientStats", true, "github.com/supraio/client-daemon/pkg/stats", true, function(LatencyNano_, ServerTimestampAhead_, CurrentFramesCount_, LastFrameRate_, TotalFramesCount_, CurrentCorruptedFramesCount_, LastCorruptedFrameRate_, TotalCorruptedFramesCount_, CurrentLostFramesCount_, LastLostFrameRate_, TotalLostFramesCount_, LastFramesLatencyAverage_, LastFramesCollectionAverage_, LastFramesDecodeAverage_, LastFramesRenderAverage_) {
135490
+ ClientStats = $pkg.ClientStats = $newType(0, $kindStruct, "stats.ClientStats", true, "github.com/supraio/client-daemon/pkg/stats", true, function(LatencyNano_, ServerTimestampAhead_, CurrentFramesCount_, LastFrameRate_, TotalFramesCount_, CurrentCorruptedFramesCount_, LastCorruptedFrameRate_, TotalCorruptedFramesCount_, CurrentLostFramesCount_, LastLostFrameRate_, TotalLostFramesCount_, LastFramesLatencyAverage_, LastFramesCollectionAverage_, LastFramesDecodeAverage_, LastFramesRenderAverage_, ScreenResolutionWidth_, ScreenResolutionHeight_) {
135429
135491
  this.$val = this;
135430
135492
  if (arguments.length === 0) {
135431
135493
  this.LatencyNano = new $Int64(0, 0);
@@ -135443,6 +135505,8 @@ $packages["github.com/supraio/client-daemon/pkg/stats"] = (function() {
135443
135505
  this.LastFramesCollectionAverage = new $Int64(0, 0);
135444
135506
  this.LastFramesDecodeAverage = new $Int64(0, 0);
135445
135507
  this.LastFramesRenderAverage = new $Int64(0, 0);
135508
+ this.ScreenResolutionWidth = 0;
135509
+ this.ScreenResolutionHeight = 0;
135446
135510
  return;
135447
135511
  }
135448
135512
  this.LatencyNano = LatencyNano_;
@@ -135460,9 +135524,11 @@ $packages["github.com/supraio/client-daemon/pkg/stats"] = (function() {
135460
135524
  this.LastFramesCollectionAverage = LastFramesCollectionAverage_;
135461
135525
  this.LastFramesDecodeAverage = LastFramesDecodeAverage_;
135462
135526
  this.LastFramesRenderAverage = LastFramesRenderAverage_;
135527
+ this.ScreenResolutionWidth = ScreenResolutionWidth_;
135528
+ this.ScreenResolutionHeight = ScreenResolutionHeight_;
135463
135529
  });
135464
135530
  Frame = $pkg.Frame = $newType(8, $kindInterface, "stats.Frame", true, "github.com/supraio/client-daemon/pkg/stats", true, null);
135465
- Stats = $pkg.Stats = $newType(0, $kindStruct, "stats.Stats", true, "github.com/supraio/client-daemon/pkg/stats", true, function(stopped_, lastFrameAt_, latencyNano_, serverTimestampAhead_, currentFramesCount_, lastFrameRate_, totalFramesCount_, currentCorruptedFramesCount_, lastCorruptedFrameRate_, totalCorruptedFramesCount_, currentLostFramesCount_, lastLostFrameRate_, totalLostFramesCount_, currentFramesLatencies_, lastFramesLatencyAverage_, frameCollectionStartedAt_, frameCollections_, lastFramesCollectionAverage_, frameDecodeStartedAt_, frameDecodes_, lastFramesDecodeAverage_, frameRenderStartedAt_, frameRenders_, lastFramesRenderAverage_) {
135531
+ Stats = $pkg.Stats = $newType(0, $kindStruct, "stats.Stats", true, "github.com/supraio/client-daemon/pkg/stats", true, function(stopped_, lastFrameAt_, latencyNano_, serverTimestampAhead_, currentFramesCount_, lastFrameRate_, totalFramesCount_, currentCorruptedFramesCount_, lastCorruptedFrameRate_, totalCorruptedFramesCount_, currentLostFramesCount_, lastLostFrameRate_, totalLostFramesCount_, currentFramesLatencies_, lastFramesLatencyAverage_, frameCollectionStartedAt_, frameCollections_, lastFramesCollectionAverage_, frameDecodeStartedAt_, frameDecodes_, lastFramesDecodeAverage_, frameRenderStartedAt_, frameRenders_, lastFramesRenderAverage_, screenResolutionWidth_, screenResolutionHeight_) {
135466
135532
  this.$val = this;
135467
135533
  if (arguments.length === 0) {
135468
135534
  this.stopped = false;
@@ -135489,6 +135555,8 @@ $packages["github.com/supraio/client-daemon/pkg/stats"] = (function() {
135489
135555
  this.frameRenderStartedAt = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil);
135490
135556
  this.frameRenders = sliceType.nil;
135491
135557
  this.lastFramesRenderAverage = new $Int64(0, 0);
135558
+ this.screenResolutionWidth = 0;
135559
+ this.screenResolutionHeight = 0;
135492
135560
  return;
135493
135561
  }
135494
135562
  this.stopped = stopped_;
@@ -135515,16 +135583,19 @@ $packages["github.com/supraio/client-daemon/pkg/stats"] = (function() {
135515
135583
  this.frameRenderStartedAt = frameRenderStartedAt_;
135516
135584
  this.frameRenders = frameRenders_;
135517
135585
  this.lastFramesRenderAverage = lastFramesRenderAverage_;
135586
+ this.screenResolutionWidth = screenResolutionWidth_;
135587
+ this.screenResolutionHeight = screenResolutionHeight_;
135518
135588
  });
135519
135589
  ptrType = $ptrType(time.Location);
135520
135590
  sliceType = $sliceType($Int64);
135521
135591
  sliceType$1 = $sliceType($emptyInterface);
135522
135592
  ptrType$1 = $ptrType(ClientStats);
135523
- ptrType$2 = $ptrType(Stats);
135593
+ ptrType$2 = $ptrType(image.Point);
135594
+ ptrType$3 = $ptrType(Stats);
135524
135595
  mapType = $mapType($Uint16, time.Time);
135525
135596
  NewStats = function() {
135526
135597
  var s;
135527
- s = new Stats.ptr(false, $clone(time.Now(), time.Time), new $Int64(0, 0), new $Int64(0, 0), 0, 0, 0, 0, 0, 0, 0, 0, 0, sliceType.nil, new $Int64(0, 0), {}, sliceType.nil, new $Int64(0, 0), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil), sliceType.nil, new $Int64(0, 0), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil), sliceType.nil, new $Int64(0, 0));
135598
+ s = new Stats.ptr(false, $clone(time.Now(), time.Time), new $Int64(0, 0), new $Int64(0, 0), 0, 0, 0, 0, 0, 0, 0, 0, 0, sliceType.nil, new $Int64(0, 0), {}, sliceType.nil, new $Int64(0, 0), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil), sliceType.nil, new $Int64(0, 0), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil), sliceType.nil, new $Int64(0, 0), 0, 0);
135528
135599
  $go($methodVal(s, "startCalculations"), []);
135529
135600
  return s;
135530
135601
  };
@@ -135532,7 +135603,7 @@ $packages["github.com/supraio/client-daemon/pkg/stats"] = (function() {
135532
135603
  Stats.ptr.prototype.GetClientStats = function() {
135533
135604
  var s;
135534
135605
  s = this;
135535
- return new ClientStats.ptr(s.latencyNano, s.serverTimestampAhead, s.currentFramesCount, s.lastFrameRate, s.totalFramesCount, s.currentCorruptedFramesCount, s.lastCorruptedFrameRate, s.totalCorruptedFramesCount, s.currentLostFramesCount, s.lastLostFrameRate, s.totalLostFramesCount, s.lastFramesLatencyAverage, s.lastFramesCollectionAverage, s.lastFramesDecodeAverage, s.lastFramesRenderAverage);
135606
+ return new ClientStats.ptr(s.latencyNano, s.serverTimestampAhead, s.currentFramesCount, s.lastFrameRate, s.totalFramesCount, s.currentCorruptedFramesCount, s.lastCorruptedFrameRate, s.totalCorruptedFramesCount, s.currentLostFramesCount, s.lastLostFrameRate, s.totalLostFramesCount, s.lastFramesLatencyAverage, s.lastFramesCollectionAverage, s.lastFramesDecodeAverage, s.lastFramesRenderAverage, s.screenResolutionWidth, s.screenResolutionHeight);
135536
135607
  };
135537
135608
  Stats.prototype.GetClientStats = function() { return this.$val.GetClientStats(); };
135538
135609
  Stats.ptr.prototype.SetLatency = function(latencyNano) {
@@ -135547,6 +135618,13 @@ $packages["github.com/supraio/client-daemon/pkg/stats"] = (function() {
135547
135618
  s.serverTimestampAhead = aheadNano;
135548
135619
  };
135549
135620
  Stats.prototype.SetServerTimestampAhead = function(aheadNano) { return this.$val.SetServerTimestampAhead(aheadNano); };
135621
+ Stats.ptr.prototype.SetScreenResolution = function(res) {
135622
+ var res, s;
135623
+ s = this;
135624
+ s.screenResolutionWidth = ((res.X >>> 0));
135625
+ s.screenResolutionHeight = ((res.Y >>> 0));
135626
+ };
135627
+ Stats.prototype.SetScreenResolution = function(res) { return this.$val.SetScreenResolution(res); };
135550
135628
  Stats.ptr.prototype.NotifyFrame = function(frame) {
135551
135629
  var _r, frame, frameLatency, s, x, x$1, x$2, x$3, x$4, $s, $r;
135552
135630
  /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; frame = $f.frame; frameLatency = $f.frameLatency; s = $f.s; x = $f.x; x$1 = $f.x$1; x$2 = $f.x$2; x$3 = $f.x$3; x$4 = $f.x$4; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
@@ -135724,15 +135802,16 @@ $packages["github.com/supraio/client-daemon/pkg/stats"] = (function() {
135724
135802
  /* */ } return; } if ($f === undefined) { $f = { $blk: Stats.ptr.prototype.print }; } $f.s = s; $f.$s = $s; $f.$r = $r; return $f;
135725
135803
  };
135726
135804
  Stats.prototype.print = function() { return this.$val.print(); };
135727
- ptrType$2.methods = [{prop: "GetClientStats", name: "GetClientStats", pkg: "", typ: $funcType([], [ptrType$1], false)}, {prop: "SetLatency", name: "SetLatency", pkg: "", typ: $funcType([$Int64], [], false)}, {prop: "SetServerTimestampAhead", name: "SetServerTimestampAhead", pkg: "", typ: $funcType([$Int64], [], false)}, {prop: "NotifyFrame", name: "NotifyFrame", pkg: "", typ: $funcType([Frame], [], false)}, {prop: "NotifyCorruptedFrame", name: "NotifyCorruptedFrame", pkg: "", typ: $funcType([$Uint16], [], false)}, {prop: "NotifyLostFrame", name: "NotifyLostFrame", pkg: "", typ: $funcType([$Uint16], [], false)}, {prop: "NotifyFrameCollectionStarted", name: "NotifyFrameCollectionStarted", pkg: "", typ: $funcType([$Uint16], [], false)}, {prop: "NotifyFrameCollectionEnded", name: "NotifyFrameCollectionEnded", pkg: "", typ: $funcType([$Uint16], [], false)}, {prop: "NotifyFrameDecodeStarted", name: "NotifyFrameDecodeStarted", pkg: "", typ: $funcType([], [], false)}, {prop: "NotifyFrameDecodeEnded", name: "NotifyFrameDecodeEnded", pkg: "", typ: $funcType([], [], false)}, {prop: "NotifyFrameRenderStarted", name: "NotifyFrameRenderStarted", pkg: "", typ: $funcType([], [], false)}, {prop: "NotifyFrameRenderEnded", name: "NotifyFrameRenderEnded", pkg: "", typ: $funcType([], [], false)}, {prop: "GetLastFrameAt", name: "GetLastFrameAt", pkg: "", typ: $funcType([], [time.Time], false)}, {prop: "GetFrameRate", name: "GetFrameRate", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetCorruptedFrameRate", name: "GetCorruptedFrameRate", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetLostFrameRate", name: "GetLostFrameRate", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "startCalculations", name: "startCalculations", pkg: "github.com/supraio/client-daemon/pkg/stats", typ: $funcType([], [], false)}, {prop: "print", name: "print", pkg: "github.com/supraio/client-daemon/pkg/stats", typ: $funcType([], [], false)}];
135728
- ClientStats.init("", [{prop: "LatencyNano", name: "LatencyNano", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "ServerTimestampAhead", name: "ServerTimestampAhead", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "CurrentFramesCount", name: "CurrentFramesCount", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "LastFrameRate", name: "LastFrameRate", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "TotalFramesCount", name: "TotalFramesCount", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "CurrentCorruptedFramesCount", name: "CurrentCorruptedFramesCount", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "LastCorruptedFrameRate", name: "LastCorruptedFrameRate", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "TotalCorruptedFramesCount", name: "TotalCorruptedFramesCount", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "CurrentLostFramesCount", name: "CurrentLostFramesCount", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "LastLostFrameRate", name: "LastLostFrameRate", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "TotalLostFramesCount", name: "TotalLostFramesCount", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "LastFramesLatencyAverage", name: "LastFramesLatencyAverage", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "LastFramesCollectionAverage", name: "LastFramesCollectionAverage", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "LastFramesDecodeAverage", name: "LastFramesDecodeAverage", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "LastFramesRenderAverage", name: "LastFramesRenderAverage", embedded: false, exported: true, typ: $Int64, tag: ""}]);
135805
+ ptrType$3.methods = [{prop: "GetClientStats", name: "GetClientStats", pkg: "", typ: $funcType([], [ptrType$1], false)}, {prop: "SetLatency", name: "SetLatency", pkg: "", typ: $funcType([$Int64], [], false)}, {prop: "SetServerTimestampAhead", name: "SetServerTimestampAhead", pkg: "", typ: $funcType([$Int64], [], false)}, {prop: "SetScreenResolution", name: "SetScreenResolution", pkg: "", typ: $funcType([ptrType$2], [], false)}, {prop: "NotifyFrame", name: "NotifyFrame", pkg: "", typ: $funcType([Frame], [], false)}, {prop: "NotifyCorruptedFrame", name: "NotifyCorruptedFrame", pkg: "", typ: $funcType([$Uint16], [], false)}, {prop: "NotifyLostFrame", name: "NotifyLostFrame", pkg: "", typ: $funcType([$Uint16], [], false)}, {prop: "NotifyFrameCollectionStarted", name: "NotifyFrameCollectionStarted", pkg: "", typ: $funcType([$Uint16], [], false)}, {prop: "NotifyFrameCollectionEnded", name: "NotifyFrameCollectionEnded", pkg: "", typ: $funcType([$Uint16], [], false)}, {prop: "NotifyFrameDecodeStarted", name: "NotifyFrameDecodeStarted", pkg: "", typ: $funcType([], [], false)}, {prop: "NotifyFrameDecodeEnded", name: "NotifyFrameDecodeEnded", pkg: "", typ: $funcType([], [], false)}, {prop: "NotifyFrameRenderStarted", name: "NotifyFrameRenderStarted", pkg: "", typ: $funcType([], [], false)}, {prop: "NotifyFrameRenderEnded", name: "NotifyFrameRenderEnded", pkg: "", typ: $funcType([], [], false)}, {prop: "GetLastFrameAt", name: "GetLastFrameAt", pkg: "", typ: $funcType([], [time.Time], false)}, {prop: "GetFrameRate", name: "GetFrameRate", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetCorruptedFrameRate", name: "GetCorruptedFrameRate", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetLostFrameRate", name: "GetLostFrameRate", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "startCalculations", name: "startCalculations", pkg: "github.com/supraio/client-daemon/pkg/stats", typ: $funcType([], [], false)}, {prop: "print", name: "print", pkg: "github.com/supraio/client-daemon/pkg/stats", typ: $funcType([], [], false)}];
135806
+ ClientStats.init("", [{prop: "LatencyNano", name: "LatencyNano", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "ServerTimestampAhead", name: "ServerTimestampAhead", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "CurrentFramesCount", name: "CurrentFramesCount", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "LastFrameRate", name: "LastFrameRate", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "TotalFramesCount", name: "TotalFramesCount", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "CurrentCorruptedFramesCount", name: "CurrentCorruptedFramesCount", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "LastCorruptedFrameRate", name: "LastCorruptedFrameRate", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "TotalCorruptedFramesCount", name: "TotalCorruptedFramesCount", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "CurrentLostFramesCount", name: "CurrentLostFramesCount", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "LastLostFrameRate", name: "LastLostFrameRate", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "TotalLostFramesCount", name: "TotalLostFramesCount", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "LastFramesLatencyAverage", name: "LastFramesLatencyAverage", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "LastFramesCollectionAverage", name: "LastFramesCollectionAverage", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "LastFramesDecodeAverage", name: "LastFramesDecodeAverage", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "LastFramesRenderAverage", name: "LastFramesRenderAverage", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "ScreenResolutionWidth", name: "ScreenResolutionWidth", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "ScreenResolutionHeight", name: "ScreenResolutionHeight", embedded: false, exported: true, typ: $Uint32, tag: ""}]);
135729
135807
  Frame.init([{prop: "GetTimestmap", name: "GetTimestmap", pkg: "", typ: $funcType([], [$Uint64], false)}]);
135730
- Stats.init("github.com/supraio/client-daemon/pkg/stats", [{prop: "stopped", name: "stopped", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "lastFrameAt", name: "lastFrameAt", embedded: false, exported: false, typ: time.Time, tag: ""}, {prop: "latencyNano", name: "latencyNano", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "serverTimestampAhead", name: "serverTimestampAhead", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "currentFramesCount", name: "currentFramesCount", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "lastFrameRate", name: "lastFrameRate", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "totalFramesCount", name: "totalFramesCount", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "currentCorruptedFramesCount", name: "currentCorruptedFramesCount", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "lastCorruptedFrameRate", name: "lastCorruptedFrameRate", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "totalCorruptedFramesCount", name: "totalCorruptedFramesCount", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "currentLostFramesCount", name: "currentLostFramesCount", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "lastLostFrameRate", name: "lastLostFrameRate", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "totalLostFramesCount", name: "totalLostFramesCount", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "currentFramesLatencies", name: "currentFramesLatencies", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "lastFramesLatencyAverage", name: "lastFramesLatencyAverage", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "frameCollectionStartedAt", name: "frameCollectionStartedAt", embedded: false, exported: false, typ: mapType, tag: ""}, {prop: "frameCollections", name: "frameCollections", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "lastFramesCollectionAverage", name: "lastFramesCollectionAverage", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "frameDecodeStartedAt", name: "frameDecodeStartedAt", embedded: false, exported: false, typ: time.Time, tag: ""}, {prop: "frameDecodes", name: "frameDecodes", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "lastFramesDecodeAverage", name: "lastFramesDecodeAverage", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "frameRenderStartedAt", name: "frameRenderStartedAt", embedded: false, exported: false, typ: time.Time, tag: ""}, {prop: "frameRenders", name: "frameRenders", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "lastFramesRenderAverage", name: "lastFramesRenderAverage", embedded: false, exported: false, typ: $Int64, tag: ""}]);
135808
+ Stats.init("github.com/supraio/client-daemon/pkg/stats", [{prop: "stopped", name: "stopped", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "lastFrameAt", name: "lastFrameAt", embedded: false, exported: false, typ: time.Time, tag: ""}, {prop: "latencyNano", name: "latencyNano", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "serverTimestampAhead", name: "serverTimestampAhead", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "currentFramesCount", name: "currentFramesCount", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "lastFrameRate", name: "lastFrameRate", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "totalFramesCount", name: "totalFramesCount", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "currentCorruptedFramesCount", name: "currentCorruptedFramesCount", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "lastCorruptedFrameRate", name: "lastCorruptedFrameRate", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "totalCorruptedFramesCount", name: "totalCorruptedFramesCount", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "currentLostFramesCount", name: "currentLostFramesCount", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "lastLostFrameRate", name: "lastLostFrameRate", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "totalLostFramesCount", name: "totalLostFramesCount", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "currentFramesLatencies", name: "currentFramesLatencies", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "lastFramesLatencyAverage", name: "lastFramesLatencyAverage", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "frameCollectionStartedAt", name: "frameCollectionStartedAt", embedded: false, exported: false, typ: mapType, tag: ""}, {prop: "frameCollections", name: "frameCollections", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "lastFramesCollectionAverage", name: "lastFramesCollectionAverage", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "frameDecodeStartedAt", name: "frameDecodeStartedAt", embedded: false, exported: false, typ: time.Time, tag: ""}, {prop: "frameDecodes", name: "frameDecodes", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "lastFramesDecodeAverage", name: "lastFramesDecodeAverage", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "frameRenderStartedAt", name: "frameRenderStartedAt", embedded: false, exported: false, typ: time.Time, tag: ""}, {prop: "frameRenders", name: "frameRenders", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "lastFramesRenderAverage", name: "lastFramesRenderAverage", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "screenResolutionWidth", name: "screenResolutionWidth", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "screenResolutionHeight", name: "screenResolutionHeight", embedded: false, exported: false, typ: $Uint32, tag: ""}]);
135731
135809
  $init = function() {
135732
135810
  $pkg.$init = function() {};
135733
135811
  /* */ 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:
135734
- $r = log.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
135735
- $r = time.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
135812
+ $r = image.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
135813
+ $r = log.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
135814
+ $r = time.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
135736
135815
  /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
135737
135816
  };
135738
135817
  $pkg.$init = $init;
@@ -135868,7 +135947,7 @@ $packages["github.com/supraio/client-daemon/pkg/window"] = (function() {
135868
135947
  /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 5; continue; }
135869
135948
  /* */ $s = 6; continue;
135870
135949
  /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 5:
135871
- $r = errs.Print("Cannot send screen resize event", err); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
135950
+ $r = errs.Print("Cannot send window resize event", err); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
135872
135951
  /* } */ case 6:
135873
135952
  /* } */ $s = 1; continue; case 2:
135874
135953
  $s = -1; return;
@@ -136366,18 +136445,18 @@ $packages["github.com/nuberu/webgl"] = (function() {
136366
136445
  /* */ if ($assertType(_ref, sliceType$9, true)[1]) { $s = 10; continue; }
136367
136446
  /* */ $s = 11; continue;
136368
136447
  /* if ($assertType(_ref, sliceType, true)[1]) { */ case 1:
136369
- s$9[0] = _ref.$val;
136370
- h = ($pointerOfStructConversion(((s$9.$ptr || (s$9.$ptr = new ptrType$1(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, s$9)))), ptrType));
136448
+ s$1[0] = _ref.$val;
136449
+ h = ($pointerOfStructConversion(((s$1.$ptr || (s$1.$ptr = new ptrType$1(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, s$1)))), ptrType));
136371
136450
  $s = -1; return ((h)).$get();
136372
136451
  /* } else if ($assertType(_ref, sliceType$1, true)[1]) { */ case 2:
136373
- s$5[0] = _ref.$val;
136374
- h$1 = ($pointerOfStructConversion(((s$5.$ptr || (s$5.$ptr = new ptrType$2(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, s$5)))), ptrType));
136452
+ s$6[0] = _ref.$val;
136453
+ h$1 = ($pointerOfStructConversion(((s$6.$ptr || (s$6.$ptr = new ptrType$2(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, s$6)))), ptrType));
136375
136454
  h$1.Len = $imul(h$1.Len, (2));
136376
136455
  h$1.Cap = $imul(h$1.Cap, (2));
136377
136456
  $s = -1; return ((h$1)).$get();
136378
136457
  /* } else if ($assertType(_ref, sliceType$2, true)[1]) { */ case 3:
136379
- s$6[0] = _ref.$val;
136380
- h$2 = ($pointerOfStructConversion(((s$6.$ptr || (s$6.$ptr = new ptrType$3(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, s$6)))), ptrType));
136458
+ s$2[0] = _ref.$val;
136459
+ h$2 = ($pointerOfStructConversion(((s$2.$ptr || (s$2.$ptr = new ptrType$3(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, s$2)))), ptrType));
136381
136460
  h$2.Len = $imul(h$2.Len, (4));
136382
136461
  h$2.Cap = $imul(h$2.Cap, (4));
136383
136462
  $s = -1; return ((h$2)).$get();
@@ -136391,20 +136470,20 @@ $packages["github.com/nuberu/webgl"] = (function() {
136391
136470
  s$10 = _ref.$val;
136392
136471
  $s = -1; return s$10;
136393
136472
  /* } else if ($assertType(_ref, sliceType$5, true)[1]) { */ case 6:
136394
- s$1[0] = _ref.$val;
136395
- h$4 = ($pointerOfStructConversion(((s$1.$ptr || (s$1.$ptr = new ptrType$5(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, s$1)))), ptrType));
136473
+ s$3[0] = _ref.$val;
136474
+ h$4 = ($pointerOfStructConversion(((s$3.$ptr || (s$3.$ptr = new ptrType$5(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, s$3)))), ptrType));
136396
136475
  h$4.Len = $imul(h$4.Len, (2));
136397
136476
  h$4.Cap = $imul(h$4.Cap, (2));
136398
136477
  $s = -1; return ((h$4)).$get();
136399
136478
  /* } else if ($assertType(_ref, sliceType$6, true)[1]) { */ case 7:
136400
- s$2[0] = _ref.$val;
136401
- h$5 = ($pointerOfStructConversion(((s$2.$ptr || (s$2.$ptr = new ptrType$6(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, s$2)))), ptrType));
136479
+ s$4[0] = _ref.$val;
136480
+ h$5 = ($pointerOfStructConversion(((s$4.$ptr || (s$4.$ptr = new ptrType$6(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, s$4)))), ptrType));
136402
136481
  h$5.Len = $imul(h$5.Len, (4));
136403
136482
  h$5.Cap = $imul(h$5.Cap, (4));
136404
136483
  $s = -1; return ((h$5)).$get();
136405
136484
  /* } else if ($assertType(_ref, sliceType$7, true)[1]) { */ case 8:
136406
- s$3[0] = _ref.$val;
136407
- h$6 = ($pointerOfStructConversion(((s$3.$ptr || (s$3.$ptr = new ptrType$7(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, s$3)))), ptrType));
136485
+ s$5[0] = _ref.$val;
136486
+ h$6 = ($pointerOfStructConversion(((s$5.$ptr || (s$5.$ptr = new ptrType$7(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, s$5)))), ptrType));
136408
136487
  h$6.Len = $imul(h$6.Len, (8));
136409
136488
  h$6.Cap = $imul(h$6.Cap, (8));
136410
136489
  $s = -1; return ((h$6)).$get();
@@ -136415,8 +136494,8 @@ $packages["github.com/nuberu/webgl"] = (function() {
136415
136494
  h$7.Cap = $imul(h$7.Cap, (4));
136416
136495
  $s = -1; return ((h$7)).$get();
136417
136496
  /* } else if ($assertType(_ref, sliceType$9, true)[1]) { */ case 10:
136418
- s$4[0] = _ref.$val;
136419
- h$8 = ($pointerOfStructConversion(((s$4.$ptr || (s$4.$ptr = new ptrType$9(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, s$4)))), ptrType));
136497
+ s$9[0] = _ref.$val;
136498
+ h$8 = ($pointerOfStructConversion(((s$9.$ptr || (s$9.$ptr = new ptrType$9(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, s$9)))), ptrType));
136420
136499
  h$8.Len = $imul(h$8.Len, (8));
136421
136500
  h$8.Cap = $imul(h$8.Cap, (8));
136422
136501
  $s = -1; return ((h$8)).$get();
@@ -142271,7 +142350,7 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
142271
142350
  }
142272
142351
  this.doc = doc_;
142273
142352
  });
142274
- windowImpl = $pkg.windowImpl = $newType(0, $kindStruct, "webgldriver.windowImpl", true, "golang.org/x/exp/shiny/driver/webgldriver", false, function(screen_, mutex_, canvasEl_, gl_, programRGBA_, imageTexRGBA_, programYUV420_, imageTexY_, imageTexU_, imageTexV_, vertexArray_, released_, domEvents_, resizeCallback_) {
142353
+ windowImpl = $pkg.windowImpl = $newType(0, $kindStruct, "webgldriver.windowImpl", true, "golang.org/x/exp/shiny/driver/webgldriver", false, function(screen_, mutex_, canvasEl_, gl_, programRGBA_, imageTexRGBA_, programYUV420_, imageTexY_, imageTexU_, imageTexV_, vertexArray_, released_, domEvents_, width_, height_) {
142275
142354
  this.$val = this;
142276
142355
  if (arguments.length === 0) {
142277
142356
  this.screen = ptrType.nil;
@@ -142287,7 +142366,8 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
142287
142366
  this.vertexArray = ptrType$6.nil;
142288
142367
  this.released = false;
142289
142368
  this.domEvents = ptrType$7.nil;
142290
- this.resizeCallback = new js.Func.ptr(new js.Value.ptr(null, false));
142369
+ this.width = 0;
142370
+ this.height = 0;
142291
142371
  return;
142292
142372
  }
142293
142373
  this.screen = screen_;
@@ -142303,7 +142383,8 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
142303
142383
  this.vertexArray = vertexArray_;
142304
142384
  this.released = released_;
142305
142385
  this.domEvents = domEvents_;
142306
- this.resizeCallback = resizeCallback_;
142386
+ this.width = width_;
142387
+ this.height = height_;
142307
142388
  });
142308
142389
  sliceType = $sliceType($Uint16);
142309
142390
  sliceType$1 = $sliceType($Float32);
@@ -142457,6 +142538,37 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
142457
142538
  /* */ } return; } if ($f === undefined) { $f = { $blk: windowImpl.ptr.prototype.createTexture }; } $f._r = _r; $f.format = format; $f.height = height; $f.imageTex = imageTex; $f.unit = unit; $f.w = w; $f.width = width; $f.$s = $s; $f.$r = $r; return $f;
142458
142539
  };
142459
142540
  windowImpl.prototype.createTexture = function(unit, format, width, height) { return this.$val.createTexture(unit, format, width, height); };
142541
+ windowImpl.ptr.prototype.ensureRGBATextures = function(width, height) {
142542
+ var _r, _r$1, _tuple, err, height, w, width, $s, $r;
142543
+ /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _tuple = $f._tuple; err = $f.err; height = $f.height; w = $f.w; width = $f.width; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
142544
+ w = this;
142545
+ /* */ if (w.programRGBA === ptrType$3.nil) { $s = 1; continue; }
142546
+ /* */ $s = 2; continue;
142547
+ /* if (w.programRGBA === ptrType$3.nil) { */ case 1:
142548
+ err = $ifaceNil;
142549
+ _r = w.createAndLinkProgramRGBA(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
142550
+ _tuple = _r;
142551
+ w.programRGBA = _tuple[0];
142552
+ err = _tuple[1];
142553
+ if (!($interfaceIsEqual(err, $ifaceNil))) {
142554
+ $panic(err);
142555
+ }
142556
+ /* } */ case 2:
142557
+ if ((w.width === width) && (w.height === height)) {
142558
+ $s = -1; return;
142559
+ }
142560
+ $r = w.ensureCanvasSize(width, height); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142561
+ _r$1 = w.createTexture(33984, 6408, width, height); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
142562
+ w.imageTexRGBA = _r$1;
142563
+ $r = w.gl.Enable(2929); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142564
+ $r = w.gl.Viewport(0, 0, width, height); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142565
+ w.width = width;
142566
+ w.height = height;
142567
+ $r = w.clear(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142568
+ $s = -1; return;
142569
+ /* */ } return; } if ($f === undefined) { $f = { $blk: windowImpl.ptr.prototype.ensureRGBATextures }; } $f._r = _r; $f._r$1 = _r$1; $f._tuple = _tuple; $f.err = err; $f.height = height; $f.w = w; $f.width = width; $f.$s = $s; $f.$r = $r; return $f;
142570
+ };
142571
+ windowImpl.prototype.ensureRGBATextures = function(width, height) { return this.$val.ensureRGBATextures(width, height); };
142460
142572
  windowImpl.ptr.prototype.createAndLinkProgramRGBA = function() {
142461
142573
  var _arg, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, err, imageLoc, shaderProgram, w, $s, $r;
142462
142574
  /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; err = $f.err; imageLoc = $f.imageLoc; shaderProgram = $f.shaderProgram; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
@@ -142495,22 +142607,58 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
142495
142607
  var _arg, _arg$1, _arg$2, _arg$3, _arg$4, _r, _r$1, dp, sr, src, w, $s, $r;
142496
142608
  /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _arg$1 = $f._arg$1; _arg$2 = $f._arg$2; _arg$3 = $f._arg$3; _arg$4 = $f._arg$4; _r = $f._r; _r$1 = $f._r$1; dp = $f.dp; sr = $f.sr; src = $f.src; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
142497
142609
  w = this;
142498
- $r = w.gl.UseProgram(w.programRGBA); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142499
- $r = w.gl.BindTexture(3553, w.imageTexRGBA); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142610
+ $r = w.ensureRGBATextures(sr.Max.X, sr.Max.Y); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142611
+ $r = w.gl.UseProgram(w.programRGBA); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142612
+ $r = w.gl.BindTexture(3553, w.imageTexRGBA); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142500
142613
  _arg = dp.X;
142501
142614
  _arg$1 = dp.Y;
142502
142615
  _arg$2 = sr.Max.X;
142503
142616
  _arg$3 = sr.Max.Y;
142504
- _r = src.RGBA(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
142505
- _r$1 = webgl.TypedArrayOf(_r.Pix); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
142617
+ _r = src.RGBA(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
142618
+ _r$1 = webgl.TypedArrayOf(_r.Pix); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
142506
142619
  _arg$4 = $clone(_r$1, js.Value);
142507
- $r = w.gl.TexSubImage2D(3553, 0, _arg, _arg$1, _arg$2, _arg$3, 6408, 5121, _arg$4); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142508
- $r = w.gl.BindVertexArray(w.vertexArray); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142509
- $r = w.gl.DrawElements(4, elementsIndices.$length, 5123, new $Int64(0, 0)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142620
+ $r = w.gl.TexSubImage2D(3553, 0, _arg, _arg$1, _arg$2, _arg$3, 6408, 5121, _arg$4); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142621
+ $r = w.gl.BindVertexArray(w.vertexArray); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142622
+ $r = w.gl.DrawElements(4, elementsIndices.$length, 5123, new $Int64(0, 0)); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142510
142623
  $s = -1; return;
142511
142624
  /* */ } return; } if ($f === undefined) { $f = { $blk: windowImpl.ptr.prototype.drawBufferRGBA }; } $f._arg = _arg; $f._arg$1 = _arg$1; $f._arg$2 = _arg$2; $f._arg$3 = _arg$3; $f._arg$4 = _arg$4; $f._r = _r; $f._r$1 = _r$1; $f.dp = dp; $f.sr = sr; $f.src = src; $f.w = w; $f.$s = $s; $f.$r = $r; return $f;
142512
142625
  };
142513
142626
  windowImpl.prototype.drawBufferRGBA = function(dp, src, sr) { return this.$val.drawBufferRGBA(dp, src, sr); };
142627
+ windowImpl.ptr.prototype.ensureYUV420Textures = function(width, height) {
142628
+ var _q, _q$1, _q$2, _q$3, _r, _r$1, _r$2, _r$3, _tuple, err, height, w, width, $s, $r;
142629
+ /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _q = $f._q; _q$1 = $f._q$1; _q$2 = $f._q$2; _q$3 = $f._q$3; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _tuple = $f._tuple; err = $f.err; height = $f.height; w = $f.w; width = $f.width; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
142630
+ w = this;
142631
+ /* */ if (w.programYUV420 === ptrType$3.nil) { $s = 1; continue; }
142632
+ /* */ $s = 2; continue;
142633
+ /* if (w.programYUV420 === ptrType$3.nil) { */ case 1:
142634
+ err = $ifaceNil;
142635
+ _r = w.createAndLinkProgramYUV420(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
142636
+ _tuple = _r;
142637
+ w.programYUV420 = _tuple[0];
142638
+ err = _tuple[1];
142639
+ if (!($interfaceIsEqual(err, $ifaceNil))) {
142640
+ $panic(err);
142641
+ }
142642
+ /* } */ case 2:
142643
+ if ((w.width === width) && (w.height === height)) {
142644
+ $s = -1; return;
142645
+ }
142646
+ $r = w.ensureCanvasSize(width, height); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142647
+ _r$1 = w.createTexture(33985, 6409, width, height); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
142648
+ w.imageTexY = _r$1;
142649
+ _r$2 = w.createTexture(33986, 6409, (_q = width / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")), (_q$1 = height / 2, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"))); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
142650
+ w.imageTexU = _r$2;
142651
+ _r$3 = w.createTexture(33987, 6409, (_q$2 = width / 2, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero")), (_q$3 = height / 2, (_q$3 === _q$3 && _q$3 !== 1/0 && _q$3 !== -1/0) ? _q$3 >> 0 : $throwRuntimeError("integer divide by zero"))); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
142652
+ w.imageTexV = _r$3;
142653
+ $r = w.gl.Enable(2929); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142654
+ $r = w.gl.Viewport(0, 0, width, height); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142655
+ w.width = width;
142656
+ w.height = height;
142657
+ $r = w.clear(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142658
+ $s = -1; return;
142659
+ /* */ } return; } if ($f === undefined) { $f = { $blk: windowImpl.ptr.prototype.ensureYUV420Textures }; } $f._q = _q; $f._q$1 = _q$1; $f._q$2 = _q$2; $f._q$3 = _q$3; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._tuple = _tuple; $f.err = err; $f.height = height; $f.w = w; $f.width = width; $f.$s = $s; $f.$r = $r; return $f;
142660
+ };
142661
+ windowImpl.prototype.ensureYUV420Textures = function(width, height) { return this.$val.ensureYUV420Textures(width, height); };
142514
142662
  windowImpl.ptr.prototype.createAndLinkProgramYUV420 = function() {
142515
142663
  var _arg, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, err, imageULoc, imageVLoc, imageYLoc, shaderProgram, w, $s, $r;
142516
142664
  /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; err = $f.err; imageULoc = $f.imageULoc; imageVLoc = $f.imageVLoc; imageYLoc = $f.imageYLoc; shaderProgram = $f.shaderProgram; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
@@ -142575,15 +142723,16 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
142575
142723
  var _q, _q$1, _q$2, _q$3, cb, cr, dp, sr, w, y, $s, $r;
142576
142724
  /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _q = $f._q; _q$1 = $f._q$1; _q$2 = $f._q$2; _q$3 = $f._q$3; cb = $f.cb; cr = $f.cr; dp = $f.dp; sr = $f.sr; w = $f.w; y = $f.y; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
142577
142725
  w = this;
142578
- $r = w.gl.UseProgram(w.programYUV420); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142579
- $r = w.gl.BindTexture(3553, w.imageTexY); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142580
- $r = w.gl.TexSubImage2D(3553, 0, dp.X, dp.Y, sr.Max.X, sr.Max.Y, 6409, 5121, $clone(y, js.Value)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142581
- $r = w.gl.BindTexture(3553, w.imageTexU); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142582
- $r = w.gl.TexSubImage2D(3553, 0, dp.X, dp.Y, (_q = sr.Max.X / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")), (_q$1 = sr.Max.Y / 2, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")), 6409, 5121, $clone(cb, js.Value)); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142583
- $r = w.gl.BindTexture(3553, w.imageTexV); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142584
- $r = w.gl.TexSubImage2D(3553, 0, dp.X, dp.Y, (_q$2 = sr.Max.X / 2, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero")), (_q$3 = sr.Max.Y / 2, (_q$3 === _q$3 && _q$3 !== 1/0 && _q$3 !== -1/0) ? _q$3 >> 0 : $throwRuntimeError("integer divide by zero")), 6409, 5121, $clone(cr, js.Value)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142585
- $r = w.gl.BindVertexArray(w.vertexArray); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142586
- $r = w.gl.DrawElements(4, elementsIndices.$length, 5123, new $Int64(0, 0)); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142726
+ $r = w.ensureYUV420Textures(sr.Max.X, sr.Max.Y); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142727
+ $r = w.gl.UseProgram(w.programYUV420); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142728
+ $r = w.gl.BindTexture(3553, w.imageTexY); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142729
+ $r = w.gl.TexSubImage2D(3553, 0, dp.X, dp.Y, sr.Max.X, sr.Max.Y, 6409, 5121, $clone(y, js.Value)); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142730
+ $r = w.gl.BindTexture(3553, w.imageTexU); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142731
+ $r = w.gl.TexSubImage2D(3553, 0, dp.X, dp.Y, (_q = sr.Max.X / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")), (_q$1 = sr.Max.Y / 2, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")), 6409, 5121, $clone(cb, js.Value)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142732
+ $r = w.gl.BindTexture(3553, w.imageTexV); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142733
+ $r = w.gl.TexSubImage2D(3553, 0, dp.X, dp.Y, (_q$2 = sr.Max.X / 2, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero")), (_q$3 = sr.Max.Y / 2, (_q$3 === _q$3 && _q$3 !== 1/0 && _q$3 !== -1/0) ? _q$3 >> 0 : $throwRuntimeError("integer divide by zero")), 6409, 5121, $clone(cr, js.Value)); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142734
+ $r = w.gl.BindVertexArray(w.vertexArray); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142735
+ $r = w.gl.DrawElements(4, elementsIndices.$length, 5123, new $Int64(0, 0)); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142587
142736
  $s = -1; return;
142588
142737
  /* */ } return; } if ($f === undefined) { $f = { $blk: windowImpl.ptr.prototype.drawBufferYUV420JSArrayBuffers }; } $f._q = _q; $f._q$1 = _q$1; $f._q$2 = _q$2; $f._q$3 = _q$3; $f.cb = cb; $f.cr = cr; $f.dp = dp; $f.sr = sr; $f.w = w; $f.y = y; $f.$s = $s; $f.$r = $r; return $f;
142589
142738
  };
@@ -142675,101 +142824,62 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
142675
142824
  /* */ } return; } if ($f === undefined) { $f = { $blk: main }; } $f._tuple = _tuple; $f.err = err; $f.f = f; $f.retErr = retErr; $f.s = s; $f.$s = $s; $f.$r = $r; return $f;
142676
142825
  };
142677
142826
  newWindow = function(screen$1, opts) {
142678
- var _q, _q$1, _q$2, _q$3, _r, _r$1, _r$10, _r$11, _r$12, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, adaptCanvas, canvasEl, domEvents, err, gl, height, opts, resizeCallback, screen$1, w, width, $s, $r;
142679
- /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _q = $f._q; _q$1 = $f._q$1; _q$2 = $f._q$2; _q$3 = $f._q$3; _r = $f._r; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$12 = $f._r$12; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; _tuple$2 = $f._tuple$2; adaptCanvas = $f.adaptCanvas; canvasEl = $f.canvasEl; domEvents = $f.domEvents; err = $f.err; gl = $f.gl; height = $f.height; opts = $f.opts; resizeCallback = $f.resizeCallback; screen$1 = $f.screen$1; w = $f.w; width = $f.width; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
142680
- adaptCanvas = [adaptCanvas];
142681
- canvasEl = [canvasEl];
142827
+ var _r, _r$1, _r$2, _r$3, _r$4, _r$5, _tuple, canvasEl, domEvents, err, gl, opts, screen$1, w, $s, $r;
142828
+ /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _tuple = $f._tuple; canvasEl = $f.canvasEl; domEvents = $f.domEvents; err = $f.err; gl = $f.gl; opts = $f.opts; screen$1 = $f.screen$1; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
142682
142829
  _r = $clone(screen$1.doc, js.Value).Call("createElement", new sliceType$2([new $String("canvas")])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
142683
- canvasEl[0] = $clone(_r, js.Value);
142684
- _r$1 = $clone($clone(screen$1.doc, js.Value).Get("body"), js.Value).Call("appendChild", new sliceType$2([new canvasEl[0].constructor.elem(canvasEl[0])])); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
142830
+ canvasEl = $clone(_r, js.Value);
142831
+ _r$1 = $clone($clone(screen$1.doc, js.Value).Get("body"), js.Value).Call("appendChild", new sliceType$2([new canvasEl.constructor.elem(canvasEl)])); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
142685
142832
  _r$1;
142686
- adaptCanvas[0] = (function(adaptCanvas, canvasEl) { return function $b() {
142687
- var height, width, $s, $r;
142688
- /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; height = $f.height; width = $f.width; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
142689
- width = dom.GetScreenWidth();
142690
- /* */ if (!(($clone($clone(canvasEl[0], js.Value).Get("width"), js.Value).Int() === width))) { $s = 1; continue; }
142691
- /* */ $s = 2; continue;
142692
- /* if (!(($clone($clone(canvasEl[0], js.Value).Get("width"), js.Value).Int() === width))) { */ case 1:
142693
- $r = $clone(canvasEl[0], js.Value).Set("width", new $Int(width)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142694
- /* } */ case 2:
142695
- height = dom.GetScreenHeight();
142696
- /* */ if (!(($clone($clone(canvasEl[0], js.Value).Get("height"), js.Value).Int() === height))) { $s = 4; continue; }
142697
- /* */ $s = 5; continue;
142698
- /* if (!(($clone($clone(canvasEl[0], js.Value).Get("height"), js.Value).Int() === height))) { */ case 4:
142699
- $r = $clone(canvasEl[0], js.Value).Set("height", new $Int(height)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142700
- /* } */ case 5:
142701
- $s = -1; return;
142702
- /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.height = height; $f.width = width; $f.$s = $s; $f.$r = $r; return $f;
142703
- }; })(adaptCanvas, canvasEl);
142704
- $r = adaptCanvas[0](); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142705
- resizeCallback = $clone(js.FuncOf((function(adaptCanvas, canvasEl) { return function $b(this$1, args) {
142706
- var args, this$1, $s, $r;
142707
- /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; args = $f.args; this$1 = $f.this$1; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
142708
- $r = adaptCanvas[0](); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142709
- $s = -1; return $ifaceNil;
142710
- /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f.args = args; $f.this$1 = this$1; $f.$s = $s; $f.$r = $r; return $f;
142711
- }; })(adaptCanvas, canvasEl)), js.Func);
142712
- _r$2 = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType$2([new $String("resize"), new resizeCallback.constructor.elem(resizeCallback)])); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
142713
- _r$2;
142714
- /* */ if (!((opts.Width === 0))) { $s = 5; continue; }
142715
- /* */ $s = 6; continue;
142716
- /* if (!((opts.Width === 0))) { */ case 5:
142717
- $r = dom.SetWindowWidth(opts.Width); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142718
- /* } */ case 6:
142719
- /* */ if (!((opts.Height === 0))) { $s = 8; continue; }
142720
- /* */ $s = 9; continue;
142721
- /* if (!((opts.Height === 0))) { */ case 8:
142722
- $r = dom.SetWindowHeight(opts.Height); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142723
- /* } */ case 9:
142724
- /* */ if (!(opts.Title === "")) { $s = 11; continue; }
142725
- /* */ $s = 12; continue;
142726
- /* if (!(opts.Title === "")) { */ case 11:
142727
- _r$3 = $clone($clone(screen$1.doc, js.Value).Get("head"), js.Value).Call("getElementsByTagName", new sliceType$2([new $String("title")])); /* */ $s = 13; case 13: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
142728
- _r$4 = $clone(_r$3, js.Value).Call("item", new sliceType$2([new $Int(0)])); /* */ $s = 14; case 14: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
142729
- $r = $clone(_r$4, js.Value).Set("innerHTML", new $String(opts.Title)); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142730
- /* } */ case 12:
142731
- _r$5 = webgl.FromCanvas($clone(canvasEl[0], js.Value)); /* */ $s = 16; case 16: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
142732
- _tuple = _r$5;
142833
+ _r$2 = webgl.FromCanvas($clone(canvasEl, js.Value)); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
142834
+ _tuple = _r$2;
142733
142835
  gl = _tuple[0];
142734
142836
  err = _tuple[1];
142735
142837
  if (!($interfaceIsEqual(err, $ifaceNil))) {
142736
142838
  $panic(err);
142737
142839
  }
142738
142840
  domEvents = dom.NewDomEvents();
142739
- w = new windowImpl.ptr(screen$1, ptrType$1.nil, $clone(canvasEl[0], js.Value), gl, ptrType$3.nil, ptrType$5.nil, ptrType$3.nil, ptrType$5.nil, ptrType$5.nil, ptrType$5.nil, ptrType$6.nil, false, domEvents, $clone(resizeCallback, js.Func));
142740
- width = dom.GetScreenWidth();
142741
- height = dom.GetScreenHeight();
142742
- _r$6 = w.createAndLinkProgramRGBA(); /* */ $s = 17; case 17: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; }
142743
- _tuple$1 = _r$6;
142744
- w.programRGBA = _tuple$1[0];
142745
- err = _tuple$1[1];
142746
- if (!($interfaceIsEqual(err, $ifaceNil))) {
142747
- $panic(err);
142748
- }
142749
- _r$7 = w.createTexture(33984, 6408, width, height); /* */ $s = 18; case 18: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; }
142750
- w.imageTexRGBA = _r$7;
142751
- _r$8 = w.createAndLinkProgramYUV420(); /* */ $s = 19; case 19: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; }
142752
- _tuple$2 = _r$8;
142753
- w.programYUV420 = _tuple$2[0];
142754
- err = _tuple$2[1];
142755
- if (!($interfaceIsEqual(err, $ifaceNil))) {
142756
- $panic(err);
142757
- }
142758
- _r$9 = w.createTexture(33985, 6409, width, height); /* */ $s = 20; case 20: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; }
142759
- w.imageTexY = _r$9;
142760
- _r$10 = w.createTexture(33986, 6409, (_q = width / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")), (_q$1 = height / 2, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"))); /* */ $s = 21; case 21: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; }
142761
- w.imageTexU = _r$10;
142762
- _r$11 = w.createTexture(33987, 6409, (_q$2 = width / 2, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero")), (_q$3 = height / 2, (_q$3 === _q$3 && _q$3 !== 1/0 && _q$3 !== -1/0) ? _q$3 >> 0 : $throwRuntimeError("integer divide by zero"))); /* */ $s = 22; case 22: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; }
142763
- w.imageTexV = _r$11;
142764
- _r$12 = w.createBuffers(); /* */ $s = 23; case 23: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; }
142765
- w.vertexArray = _r$12;
142766
- $r = w.gl.Enable(2929); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142767
- $r = w.gl.Viewport(0, 0, width, height); /* */ $s = 25; case 25: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142768
- $r = w.clear(); /* */ $s = 26; case 26: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142769
- $r = domEvents.BindEvents(); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142841
+ w = new windowImpl.ptr(screen$1, ptrType$1.nil, $clone(canvasEl, js.Value), gl, ptrType$3.nil, ptrType$5.nil, ptrType$3.nil, ptrType$5.nil, ptrType$5.nil, ptrType$5.nil, ptrType$6.nil, false, domEvents, 0, 0);
142842
+ /* */ if (!((opts.Width === 0))) { $s = 4; continue; }
142843
+ /* */ $s = 5; continue;
142844
+ /* if (!((opts.Width === 0))) { */ case 4:
142845
+ $r = dom.SetWindowWidth(opts.Width); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142846
+ /* } */ case 5:
142847
+ /* */ if (!((opts.Height === 0))) { $s = 7; continue; }
142848
+ /* */ $s = 8; continue;
142849
+ /* if (!((opts.Height === 0))) { */ case 7:
142850
+ $r = dom.SetWindowHeight(opts.Height); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142851
+ /* } */ case 8:
142852
+ /* */ if (!(opts.Title === "")) { $s = 10; continue; }
142853
+ /* */ $s = 11; continue;
142854
+ /* if (!(opts.Title === "")) { */ case 10:
142855
+ _r$3 = $clone($clone(screen$1.doc, js.Value).Get("head"), js.Value).Call("getElementsByTagName", new sliceType$2([new $String("title")])); /* */ $s = 12; case 12: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
142856
+ _r$4 = $clone(_r$3, js.Value).Call("item", new sliceType$2([new $Int(0)])); /* */ $s = 13; case 13: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
142857
+ $r = $clone(_r$4, js.Value).Set("innerHTML", new $String(opts.Title)); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142858
+ /* } */ case 11:
142859
+ _r$5 = w.createBuffers(); /* */ $s = 15; case 15: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
142860
+ w.vertexArray = _r$5;
142861
+ $r = domEvents.BindEvents(); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142770
142862
  $s = -1; return w;
142771
- /* */ } return; } if ($f === undefined) { $f = { $blk: newWindow }; } $f._q = _q; $f._q$1 = _q$1; $f._q$2 = _q$2; $f._q$3 = _q$3; $f._r = _r; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$12 = _r$12; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f._tuple$2 = _tuple$2; $f.adaptCanvas = adaptCanvas; $f.canvasEl = canvasEl; $f.domEvents = domEvents; $f.err = err; $f.gl = gl; $f.height = height; $f.opts = opts; $f.resizeCallback = resizeCallback; $f.screen$1 = screen$1; $f.w = w; $f.width = width; $f.$s = $s; $f.$r = $r; return $f;
142863
+ /* */ } return; } if ($f === undefined) { $f = { $blk: newWindow }; } $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._tuple = _tuple; $f.canvasEl = canvasEl; $f.domEvents = domEvents; $f.err = err; $f.gl = gl; $f.opts = opts; $f.screen$1 = screen$1; $f.w = w; $f.$s = $s; $f.$r = $r; return $f;
142864
+ };
142865
+ windowImpl.ptr.prototype.ensureCanvasSize = function(width, height) {
142866
+ var height, w, width, $s, $r;
142867
+ /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; height = $f.height; w = $f.w; width = $f.width; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
142868
+ w = this;
142869
+ /* */ if (!(($clone($clone(w.canvasEl, js.Value).Get("width"), js.Value).Int() === width))) { $s = 1; continue; }
142870
+ /* */ $s = 2; continue;
142871
+ /* if (!(($clone($clone(w.canvasEl, js.Value).Get("width"), js.Value).Int() === width))) { */ case 1:
142872
+ $r = $clone(w.canvasEl, js.Value).Set("width", new $Int(width)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142873
+ /* } */ case 2:
142874
+ /* */ if (!(($clone($clone(w.canvasEl, js.Value).Get("height"), js.Value).Int() === height))) { $s = 4; continue; }
142875
+ /* */ $s = 5; continue;
142876
+ /* if (!(($clone($clone(w.canvasEl, js.Value).Get("height"), js.Value).Int() === height))) { */ case 4:
142877
+ $r = $clone(w.canvasEl, js.Value).Set("height", new $Int(height)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142878
+ /* } */ case 5:
142879
+ $s = -1; return;
142880
+ /* */ } return; } if ($f === undefined) { $f = { $blk: windowImpl.ptr.prototype.ensureCanvasSize }; } $f.height = height; $f.w = w; $f.width = width; $f.$s = $s; $f.$r = $r; return $f;
142772
142881
  };
142882
+ windowImpl.prototype.ensureCanvasSize = function(width, height) { return this.$val.ensureCanvasSize(width, height); };
142773
142883
  windowImpl.ptr.prototype.clear = function() {
142774
142884
  var w, $s, $r;
142775
142885
  /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; w = $f.w; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
@@ -142781,23 +142891,20 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
142781
142891
  };
142782
142892
  windowImpl.prototype.clear = function() { return this.$val.clear(); };
142783
142893
  windowImpl.ptr.prototype.Release = function() {
142784
- var _r, _r$1, w, x, $s, $deferred, $r;
142785
- /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; w = $f.w; x = $f.x; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred);
142894
+ var _r, w, $s, $deferred, $r;
142895
+ /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; w = $f.w; $s = $f.$s; $deferred = $f.$deferred; $r = $f.$r; } var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $deferred.index = $curGoroutine.deferStack.length; $curGoroutine.deferStack.push($deferred);
142786
142896
  w = this;
142787
142897
  $r = w.mutex.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142788
142898
  $deferred.push([$methodVal(w.mutex, "Unlock"), []]);
142789
142899
  if (w.released) {
142790
142900
  $s = -1; return;
142791
142901
  }
142792
- _r = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType$2([new $String("resize"), (x = w.resizeCallback, new x.constructor.elem(x))])); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
142902
+ _r = $clone(w.canvasEl, js.Value).Call("remove", new sliceType$2([])); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
142793
142903
  _r;
142794
- $clone(w.resizeCallback, js.Func).Release();
142795
- _r$1 = $clone(w.canvasEl, js.Value).Call("remove", new sliceType$2([])); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
142796
- _r$1;
142797
- $r = w.domEvents.Release(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142904
+ $r = w.domEvents.Release(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
142798
142905
  w.released = true;
142799
142906
  $s = -1; return;
142800
- /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: windowImpl.ptr.prototype.Release }; } $f._r = _r; $f._r$1 = _r$1; $f.w = w; $f.x = x; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } }
142907
+ /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { if ($f === undefined) { $f = { $blk: windowImpl.ptr.prototype.Release }; } $f._r = _r; $f.w = w; $f.$s = $s; $f.$deferred = $deferred; $f.$r = $r; return $f; } }
142801
142908
  };
142802
142909
  windowImpl.prototype.Release = function() { return this.$val.Release(); };
142803
142910
  windowImpl.ptr.prototype.Publish = function() {
@@ -142953,12 +143060,12 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
142953
143060
  ptrType$9.methods = [{prop: "slice", name: "slice", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([], [js.Value], false)}];
142954
143061
  ptrType$8.methods = [{prop: "Size", name: "Size", pkg: "", typ: $funcType([], [image.Point], false)}, {prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [image.Rectangle], false)}, {prop: "RGBA", name: "RGBA", pkg: "", typ: $funcType([], [ptrType$10], false)}, {prop: "YCbCr", name: "YCbCr", pkg: "", typ: $funcType([], [ptrType$11], false)}, {prop: "YCbCrJS", name: "YCbCrJS", pkg: "", typ: $funcType([], [ptrType$2], false)}, {prop: "Release", name: "Release", pkg: "", typ: $funcType([], [], false)}];
142955
143062
  ptrType.methods = [{prop: "NewBuffer", name: "NewBuffer", pkg: "", typ: $funcType([image.Point], [screen.Buffer, $error], false)}, {prop: "NewTexture", name: "NewTexture", pkg: "", typ: $funcType([image.Point], [screen.Texture, $error], false)}, {prop: "NewWindow", name: "NewWindow", pkg: "", typ: $funcType([ptrType$12], [screen.Window, $error], false)}];
142956
- ptrType$14.methods = [{prop: "createBuffers", name: "createBuffers", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([], [ptrType$6], false)}, {prop: "createAndAttachFragmentShader", name: "createAndAttachFragmentShader", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([ptrType$3, $String], [$error], false)}, {prop: "createTexture", name: "createTexture", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([types.GLEnum, types.GLEnum, $Int, $Int], [ptrType$5], false)}, {prop: "createAndLinkProgramRGBA", name: "createAndLinkProgramRGBA", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([], [ptrType$3, $error], false)}, {prop: "drawBufferRGBA", name: "drawBufferRGBA", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([image.Point, screen.Buffer, image.Rectangle], [], false)}, {prop: "createAndLinkProgramYUV420", name: "createAndLinkProgramYUV420", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([], [ptrType$3, $error], false)}, {prop: "drawBufferYUV420", name: "drawBufferYUV420", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([image.Point, screen.Buffer, image.Rectangle], [], false)}, {prop: "drawBufferYUV420JSArrayBuffers", name: "drawBufferYUV420JSArrayBuffers", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([image.Point, js.Value, js.Value, js.Value, image.Rectangle], [], false)}, {prop: "createAndAttachVertexShader", name: "createAndAttachVertexShader", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([ptrType$3], [$error], false)}, {prop: "clear", name: "clear", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([], [], false)}, {prop: "Release", name: "Release", pkg: "", typ: $funcType([], [], false)}, {prop: "Publish", name: "Publish", pkg: "", typ: $funcType([], [screen.PublishResult], false)}, {prop: "Send", name: "Send", pkg: "", typ: $funcType([$emptyInterface], [], false)}, {prop: "SendFirst", name: "SendFirst", pkg: "", typ: $funcType([$emptyInterface], [], false)}, {prop: "NextEvent", name: "NextEvent", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "Upload", name: "Upload", pkg: "", typ: $funcType([image.Point, screen.Buffer, image.Rectangle], [], false)}, {prop: "UploadYCbCr", name: "UploadYCbCr", pkg: "", typ: $funcType([image.Point, screen.Buffer, image.Rectangle], [], false)}, {prop: "Fill", name: "Fill", pkg: "", typ: $funcType([image.Rectangle, color.Color, draw.Op], [], false)}, {prop: "Draw", name: "Draw", pkg: "", typ: $funcType([f64.Aff3, screen.Texture, image.Rectangle, draw.Op, ptrType$13], [], false)}, {prop: "DrawUniform", name: "DrawUniform", pkg: "", typ: $funcType([f64.Aff3, color.Color, image.Rectangle, draw.Op, ptrType$13], [], false)}, {prop: "Copy", name: "Copy", pkg: "", typ: $funcType([image.Point, screen.Texture, image.Rectangle, draw.Op, ptrType$13], [], false)}, {prop: "Scale", name: "Scale", pkg: "", typ: $funcType([image.Rectangle, screen.Texture, image.Rectangle, draw.Op, ptrType$13], [], false)}];
143063
+ ptrType$14.methods = [{prop: "createBuffers", name: "createBuffers", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([], [ptrType$6], false)}, {prop: "createAndAttachFragmentShader", name: "createAndAttachFragmentShader", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([ptrType$3, $String], [$error], false)}, {prop: "createTexture", name: "createTexture", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([types.GLEnum, types.GLEnum, $Int, $Int], [ptrType$5], false)}, {prop: "ensureRGBATextures", name: "ensureRGBATextures", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([$Int, $Int], [], false)}, {prop: "createAndLinkProgramRGBA", name: "createAndLinkProgramRGBA", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([], [ptrType$3, $error], false)}, {prop: "drawBufferRGBA", name: "drawBufferRGBA", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([image.Point, screen.Buffer, image.Rectangle], [], false)}, {prop: "ensureYUV420Textures", name: "ensureYUV420Textures", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([$Int, $Int], [], false)}, {prop: "createAndLinkProgramYUV420", name: "createAndLinkProgramYUV420", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([], [ptrType$3, $error], false)}, {prop: "drawBufferYUV420", name: "drawBufferYUV420", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([image.Point, screen.Buffer, image.Rectangle], [], false)}, {prop: "drawBufferYUV420JSArrayBuffers", name: "drawBufferYUV420JSArrayBuffers", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([image.Point, js.Value, js.Value, js.Value, image.Rectangle], [], false)}, {prop: "createAndAttachVertexShader", name: "createAndAttachVertexShader", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([ptrType$3], [$error], false)}, {prop: "ensureCanvasSize", name: "ensureCanvasSize", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([$Int, $Int], [], false)}, {prop: "clear", name: "clear", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([], [], false)}, {prop: "Release", name: "Release", pkg: "", typ: $funcType([], [], false)}, {prop: "Publish", name: "Publish", pkg: "", typ: $funcType([], [screen.PublishResult], false)}, {prop: "Send", name: "Send", pkg: "", typ: $funcType([$emptyInterface], [], false)}, {prop: "SendFirst", name: "SendFirst", pkg: "", typ: $funcType([$emptyInterface], [], false)}, {prop: "NextEvent", name: "NextEvent", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "Upload", name: "Upload", pkg: "", typ: $funcType([image.Point, screen.Buffer, image.Rectangle], [], false)}, {prop: "UploadYCbCr", name: "UploadYCbCr", pkg: "", typ: $funcType([image.Point, screen.Buffer, image.Rectangle], [], false)}, {prop: "Fill", name: "Fill", pkg: "", typ: $funcType([image.Rectangle, color.Color, draw.Op], [], false)}, {prop: "Draw", name: "Draw", pkg: "", typ: $funcType([f64.Aff3, screen.Texture, image.Rectangle, draw.Op, ptrType$13], [], false)}, {prop: "DrawUniform", name: "DrawUniform", pkg: "", typ: $funcType([f64.Aff3, color.Color, image.Rectangle, draw.Op, ptrType$13], [], false)}, {prop: "Copy", name: "Copy", pkg: "", typ: $funcType([image.Point, screen.Texture, image.Rectangle, draw.Op, ptrType$13], [], false)}, {prop: "Scale", name: "Scale", pkg: "", typ: $funcType([image.Rectangle, screen.Texture, image.Rectangle, draw.Op, ptrType$13], [], false)}];
142957
143064
  ArrayBufferSlice.init("", [{prop: "ArrayBuffer", name: "ArrayBuffer", embedded: false, exported: true, typ: js.Value, tag: ""}, {prop: "Offset", name: "Offset", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Length", name: "Length", embedded: false, exported: true, typ: $Int, tag: ""}]);
142958
143065
  YCbCrJS.init("", [{prop: "Y", name: "Y", embedded: false, exported: true, typ: ArrayBufferSlice, tag: ""}, {prop: "Cb", name: "Cb", embedded: false, exported: true, typ: ArrayBufferSlice, tag: ""}, {prop: "Cr", name: "Cr", embedded: false, exported: true, typ: ArrayBufferSlice, tag: ""}, {prop: "YStride", name: "YStride", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "CStride", name: "CStride", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "SubsampleRatio", name: "SubsampleRatio", embedded: false, exported: true, typ: image.YCbCrSubsampleRatio, tag: ""}, {prop: "Rect", name: "Rect", embedded: false, exported: true, typ: image.Rectangle, tag: ""}, {prop: "Use", name: "Use", embedded: false, exported: true, typ: $Bool, tag: ""}]);
142959
143066
  BufferImpl.init("golang.org/x/exp/shiny/driver/webgldriver", [{prop: "screen", name: "screen", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "size", name: "size", embedded: false, exported: false, typ: image.Point, tag: ""}, {prop: "mutex", name: "mutex", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "released", name: "released", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "rgba", name: "rgba", embedded: false, exported: false, typ: image.RGBA, tag: ""}, {prop: "ycbcr", name: "ycbcr", embedded: false, exported: false, typ: image.YCbCr, tag: ""}, {prop: "ycbcrJS", name: "ycbcrJS", embedded: false, exported: false, typ: ptrType$2, tag: ""}]);
142960
143067
  screenImpl.init("golang.org/x/exp/shiny/driver/webgldriver", [{prop: "doc", name: "doc", embedded: false, exported: false, typ: js.Value, tag: ""}]);
142961
- windowImpl.init("golang.org/x/exp/shiny/driver/webgldriver", [{prop: "screen", name: "screen", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "mutex", name: "mutex", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "canvasEl", name: "canvasEl", embedded: false, exported: false, typ: js.Value, tag: ""}, {prop: "gl", name: "gl", embedded: false, exported: false, typ: ptrType$4, tag: ""}, {prop: "programRGBA", name: "programRGBA", embedded: false, exported: false, typ: ptrType$3, tag: ""}, {prop: "imageTexRGBA", name: "imageTexRGBA", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "programYUV420", name: "programYUV420", embedded: false, exported: false, typ: ptrType$3, tag: ""}, {prop: "imageTexY", name: "imageTexY", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "imageTexU", name: "imageTexU", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "imageTexV", name: "imageTexV", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "vertexArray", name: "vertexArray", embedded: false, exported: false, typ: ptrType$6, tag: ""}, {prop: "released", name: "released", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "domEvents", name: "domEvents", embedded: false, exported: false, typ: ptrType$7, tag: ""}, {prop: "resizeCallback", name: "resizeCallback", embedded: false, exported: false, typ: js.Func, tag: ""}]);
143068
+ windowImpl.init("golang.org/x/exp/shiny/driver/webgldriver", [{prop: "screen", name: "screen", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "mutex", name: "mutex", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "canvasEl", name: "canvasEl", embedded: false, exported: false, typ: js.Value, tag: ""}, {prop: "gl", name: "gl", embedded: false, exported: false, typ: ptrType$4, tag: ""}, {prop: "programRGBA", name: "programRGBA", embedded: false, exported: false, typ: ptrType$3, tag: ""}, {prop: "imageTexRGBA", name: "imageTexRGBA", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "programYUV420", name: "programYUV420", embedded: false, exported: false, typ: ptrType$3, tag: ""}, {prop: "imageTexY", name: "imageTexY", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "imageTexU", name: "imageTexU", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "imageTexV", name: "imageTexV", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "vertexArray", name: "vertexArray", embedded: false, exported: false, typ: ptrType$6, tag: ""}, {prop: "released", name: "released", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "domEvents", name: "domEvents", embedded: false, exported: false, typ: ptrType$7, tag: ""}, {prop: "width", name: "width", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "height", name: "height", embedded: false, exported: false, typ: $Int, tag: ""}]);
142962
143069
  $init = function() {
142963
143070
  $pkg.$init = function() {};
142964
143071
  /* */ 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:
@@ -142989,47 +143096,43 @@ $packages["github.com/supraio/client-daemon/pkg/x264/h264decoder"] = (function()
142989
143096
  webgldriver = $packages["golang.org/x/exp/shiny/driver/webgldriver"];
142990
143097
  image = $packages["image"];
142991
143098
  js = $packages["syscall/js"];
142992
- H264Decoder = $pkg.H264Decoder = $newType(0, $kindStruct, "h264_decoder.H264Decoder", true, "github.com/supraio/client-daemon/pkg/x264/h264decoder", true, function(decoder_, nalBuffer_) {
143099
+ H264Decoder = $pkg.H264Decoder = $newType(0, $kindStruct, "h264_decoder.H264Decoder", true, "github.com/supraio/client-daemon/pkg/x264/h264decoder", true, function(decoder_) {
142993
143100
  this.$val = this;
142994
143101
  if (arguments.length === 0) {
142995
143102
  this.decoder = new js.Value.ptr(null, false);
142996
- this.nalBuffer = new js.Value.ptr(null, false);
142997
143103
  return;
142998
143104
  }
142999
143105
  this.decoder = decoder_;
143000
- this.nalBuffer = nalBuffer_;
143001
143106
  });
143002
143107
  sliceType = $sliceType($emptyInterface);
143003
143108
  ptrType = $ptrType(webgldriver.BufferImpl);
143004
143109
  sliceType$1 = $sliceType($Uint8);
143005
143110
  ptrType$1 = $ptrType(H264Decoder);
143006
143111
  NewDecoder = function(header) {
143007
- var _r, decoder, header, nalBuffer, nalBufferOffset, $s, $r;
143008
- /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; decoder = $f.decoder; header = $f.header; nalBuffer = $f.nalBuffer; nalBufferOffset = $f.nalBufferOffset; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
143112
+ var decoder, header;
143009
143113
  decoder = $clone($clone(js.Global(), js.Value).Get("h264Decoder"), js.Value);
143010
- nalBufferOffset = $clone($clone(decoder, js.Value).Get("decBuffer"), js.Value);
143011
- _r = $clone($clone($clone(decoder, js.Value).Get("memory"), js.Value).Get("HEAPU8"), js.Value).Call("subarray", new sliceType([new nalBufferOffset.constructor.elem(nalBufferOffset)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
143012
- nalBuffer = $clone(_r, js.Value);
143013
- $s = -1; return new H264Decoder.ptr($clone(decoder, js.Value), $clone(nalBuffer, js.Value));
143014
- /* */ } return; } if ($f === undefined) { $f = { $blk: NewDecoder }; } $f._r = _r; $f.decoder = decoder; $f.header = header; $f.nalBuffer = nalBuffer; $f.nalBufferOffset = nalBufferOffset; $f.$s = $s; $f.$r = $r; return $f;
143114
+ return new H264Decoder.ptr($clone(decoder, js.Value));
143015
143115
  };
143016
143116
  $pkg.NewDecoder = NewDecoder;
143017
143117
  H264Decoder.ptr.prototype.Decode = function(nal, outputBuffer) {
143018
- var _q, _q$1, _q$2, _r, _r$1, _r$2, _r$3, _r$4, cSize, cStride, height, heightIndex, m, nal, outputBuffer, pHeight, pPicture, pWidth, pictureBuffer, pictureBufferOffset, pictureIndex, pictureLen, status, width, widthIndex, x, x$1, ySize, yStride, ycbcrImg, ycbcrJSImg, $s, $r;
143019
- /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _q = $f._q; _q$1 = $f._q$1; _q$2 = $f._q$2; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; cSize = $f.cSize; cStride = $f.cStride; height = $f.height; heightIndex = $f.heightIndex; m = $f.m; nal = $f.nal; outputBuffer = $f.outputBuffer; pHeight = $f.pHeight; pPicture = $f.pPicture; pWidth = $f.pWidth; pictureBuffer = $f.pictureBuffer; pictureBufferOffset = $f.pictureBufferOffset; pictureIndex = $f.pictureIndex; pictureLen = $f.pictureLen; status = $f.status; width = $f.width; widthIndex = $f.widthIndex; x = $f.x; x$1 = $f.x$1; ySize = $f.ySize; yStride = $f.yStride; ycbcrImg = $f.ycbcrImg; ycbcrJSImg = $f.ycbcrJSImg; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
143118
+ var _q, _q$1, _q$2, _r, _r$1, _r$2, _r$3, _r$4, _r$5, cSize, cStride, height, heightIndex, m, nal, nalBuffer, nalBufferOffset, outputBuffer, pHeight, pPicture, pWidth, pictureBuffer, pictureBufferOffset, pictureIndex, pictureLen, status, width, widthIndex, x, x$1, ySize, yStride, ycbcrImg, ycbcrJSImg, $s, $r;
143119
+ /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _q = $f._q; _q$1 = $f._q$1; _q$2 = $f._q$2; _r = $f._r; _r$1 = $f._r$1; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; cSize = $f.cSize; cStride = $f.cStride; height = $f.height; heightIndex = $f.heightIndex; m = $f.m; nal = $f.nal; nalBuffer = $f.nalBuffer; nalBufferOffset = $f.nalBufferOffset; outputBuffer = $f.outputBuffer; pHeight = $f.pHeight; pPicture = $f.pPicture; pWidth = $f.pWidth; pictureBuffer = $f.pictureBuffer; pictureBufferOffset = $f.pictureBufferOffset; pictureIndex = $f.pictureIndex; pictureLen = $f.pictureLen; status = $f.status; width = $f.width; widthIndex = $f.widthIndex; x = $f.x; x$1 = $f.x$1; ySize = $f.ySize; yStride = $f.yStride; ycbcrImg = $f.ycbcrImg; ycbcrJSImg = $f.ycbcrJSImg; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
143020
143120
  m = this;
143021
- js.CopyBytesToJS($clone(m.nalBuffer, js.Value), nal);
143121
+ nalBufferOffset = $clone($clone(m.decoder, js.Value).Get("decBuffer"), js.Value);
143122
+ _r = $clone($clone($clone(m.decoder, js.Value).Get("memory"), js.Value).Get("HEAPU8"), js.Value).Call("subarray", new sliceType([new nalBufferOffset.constructor.elem(nalBufferOffset)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
143123
+ nalBuffer = $clone(_r, js.Value);
143124
+ js.CopyBytesToJS($clone(nalBuffer, js.Value), nal);
143022
143125
  pPicture = $clone($clone(m.decoder, js.Value).Get("pPicture"), js.Value);
143023
143126
  pWidth = $clone($clone(m.decoder, js.Value).Get("pWidth"), js.Value);
143024
143127
  pHeight = $clone($clone(m.decoder, js.Value).Get("pHeight"), js.Value);
143025
- _r = $clone($clone(m.decoder, js.Value).Get("asm"), js.Value).Call("decode", new sliceType([(x = $clone(m.decoder, js.Value).Get("pStorage"), new x.constructor.elem(x)), (x$1 = $clone(m.decoder, js.Value).Get("decBuffer"), new x$1.constructor.elem(x$1)), new $Int(nal.$length), new pPicture.constructor.elem(pPicture), new pWidth.constructor.elem(pWidth), new pHeight.constructor.elem(pHeight)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
143026
- status = $clone(_r, js.Value);
143027
- /* */ if (!(($clone(status, js.Value).Int() === 1))) { $s = 2; continue; }
143028
- /* */ $s = 3; continue;
143029
- /* if (!(($clone(status, js.Value).Int() === 1))) { */ case 2:
143030
- _r$1 = errs.Errorf("Decoding failed with status code %d", new sliceType([new $Int($clone(status, js.Value).Int())])); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
143031
- $s = -1; return _r$1;
143032
- /* } */ case 3:
143128
+ _r$1 = $clone($clone(m.decoder, js.Value).Get("asm"), js.Value).Call("decode", new sliceType([(x = $clone(m.decoder, js.Value).Get("pStorage"), new x.constructor.elem(x)), (x$1 = $clone(m.decoder, js.Value).Get("decBuffer"), new x$1.constructor.elem(x$1)), new $Int(nal.$length), new pPicture.constructor.elem(pPicture), new pWidth.constructor.elem(pWidth), new pHeight.constructor.elem(pHeight)])); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
143129
+ status = $clone(_r$1, js.Value);
143130
+ /* */ if (!(($clone(status, js.Value).Int() === 1))) { $s = 3; continue; }
143131
+ /* */ $s = 4; continue;
143132
+ /* if (!(($clone(status, js.Value).Int() === 1))) { */ case 3:
143133
+ _r$2 = errs.Errorf("Decoding failed with status code %d", new sliceType([new $Int($clone(status, js.Value).Int())])); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
143134
+ $s = -1; return _r$2;
143135
+ /* } */ case 4:
143033
143136
  widthIndex = $clone(pWidth, js.Value).Int() >> 2 >> 0;
143034
143137
  heightIndex = $clone(pHeight, js.Value).Int() >> 2 >> 0;
143035
143138
  width = $clone($clone($clone($clone(m.decoder, js.Value).Get("memory"), js.Value).Get("HEAP32"), js.Value).Index(widthIndex), js.Value).Int();
@@ -143037,14 +143140,14 @@ $packages["github.com/supraio/client-daemon/pkg/x264/h264decoder"] = (function()
143037
143140
  pictureIndex = $clone(pPicture, js.Value).Int() >> 2 >> 0;
143038
143141
  pictureBufferOffset = $clone($clone($clone($clone(m.decoder, js.Value).Get("memory"), js.Value).Get("HEAP32"), js.Value).Index(pictureIndex), js.Value).Int();
143039
143142
  pictureLen = (_q = ($imul(($imul(width, height)), 3)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"));
143040
- _r$2 = $clone($clone($clone(m.decoder, js.Value).Get("memory"), js.Value).Get("HEAPU8"), js.Value).Call("subarray", new sliceType([new $Int(pictureBufferOffset), new $Int((pictureBufferOffset + pictureLen >> 0))])); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
143041
- pictureBuffer = $clone(_r$2, js.Value);
143143
+ _r$3 = $clone($clone($clone(m.decoder, js.Value).Get("memory"), js.Value).Get("HEAPU8"), js.Value).Call("subarray", new sliceType([new $Int(pictureBufferOffset), new $Int((pictureBufferOffset + pictureLen >> 0))])); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
143144
+ pictureBuffer = $clone(_r$3, js.Value);
143042
143145
  yStride = width;
143043
143146
  cStride = (_q$1 = yStride / 2, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"));
143044
143147
  ySize = $imul(yStride, height);
143045
143148
  cSize = (_q$2 = ($imul(cStride, height)) / 2, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero"));
143046
- _r$3 = $assertType(outputBuffer, ptrType).YCbCrJS(); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
143047
- ycbcrJSImg = _r$3;
143149
+ _r$4 = $assertType(outputBuffer, ptrType).YCbCrJS(); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
143150
+ ycbcrJSImg = _r$4;
143048
143151
  webgldriver.ArrayBufferSlice.copy(ycbcrJSImg.Y, new webgldriver.ArrayBufferSlice.ptr($clone(pictureBuffer, js.Value), 0, ySize));
143049
143152
  webgldriver.ArrayBufferSlice.copy(ycbcrJSImg.Cb, new webgldriver.ArrayBufferSlice.ptr($clone(pictureBuffer, js.Value), ySize, ySize + cSize >> 0));
143050
143153
  webgldriver.ArrayBufferSlice.copy(ycbcrJSImg.Cr, new webgldriver.ArrayBufferSlice.ptr($clone(pictureBuffer, js.Value), ySize + cSize >> 0, ySize + ($imul(cSize, 2)) >> 0));
@@ -143053,12 +143156,12 @@ $packages["github.com/supraio/client-daemon/pkg/x264/h264decoder"] = (function()
143053
143156
  ycbcrJSImg.SubsampleRatio = 2;
143054
143157
  image.Rectangle.copy(ycbcrJSImg.Rect, image.Rect(0, 0, width, height));
143055
143158
  ycbcrJSImg.Use = true;
143056
- _r$4 = outputBuffer.YCbCr(); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
143057
- ycbcrImg = _r$4;
143159
+ _r$5 = outputBuffer.YCbCr(); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
143160
+ ycbcrImg = _r$5;
143058
143161
  image.Rectangle.copy(ycbcrImg.Rect, ycbcrJSImg.Rect);
143059
143162
  ycbcrImg.SubsampleRatio = 2;
143060
143163
  $s = -1; return $ifaceNil;
143061
- /* */ } return; } if ($f === undefined) { $f = { $blk: H264Decoder.ptr.prototype.Decode }; } $f._q = _q; $f._q$1 = _q$1; $f._q$2 = _q$2; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f.cSize = cSize; $f.cStride = cStride; $f.height = height; $f.heightIndex = heightIndex; $f.m = m; $f.nal = nal; $f.outputBuffer = outputBuffer; $f.pHeight = pHeight; $f.pPicture = pPicture; $f.pWidth = pWidth; $f.pictureBuffer = pictureBuffer; $f.pictureBufferOffset = pictureBufferOffset; $f.pictureIndex = pictureIndex; $f.pictureLen = pictureLen; $f.status = status; $f.width = width; $f.widthIndex = widthIndex; $f.x = x; $f.x$1 = x$1; $f.ySize = ySize; $f.yStride = yStride; $f.ycbcrImg = ycbcrImg; $f.ycbcrJSImg = ycbcrJSImg; $f.$s = $s; $f.$r = $r; return $f;
143164
+ /* */ } return; } if ($f === undefined) { $f = { $blk: H264Decoder.ptr.prototype.Decode }; } $f._q = _q; $f._q$1 = _q$1; $f._q$2 = _q$2; $f._r = _r; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f.cSize = cSize; $f.cStride = cStride; $f.height = height; $f.heightIndex = heightIndex; $f.m = m; $f.nal = nal; $f.nalBuffer = nalBuffer; $f.nalBufferOffset = nalBufferOffset; $f.outputBuffer = outputBuffer; $f.pHeight = pHeight; $f.pPicture = pPicture; $f.pWidth = pWidth; $f.pictureBuffer = pictureBuffer; $f.pictureBufferOffset = pictureBufferOffset; $f.pictureIndex = pictureIndex; $f.pictureLen = pictureLen; $f.status = status; $f.width = width; $f.widthIndex = widthIndex; $f.x = x; $f.x$1 = x$1; $f.ySize = ySize; $f.yStride = yStride; $f.ycbcrImg = ycbcrImg; $f.ycbcrJSImg = ycbcrJSImg; $f.$s = $s; $f.$r = $r; return $f;
143062
143165
  };
143063
143166
  H264Decoder.prototype.Decode = function(nal, outputBuffer) { return this.$val.Decode(nal, outputBuffer); };
143064
143167
  H264Decoder.ptr.prototype.Release = function(outputBuffer) {
@@ -143067,7 +143170,7 @@ $packages["github.com/supraio/client-daemon/pkg/x264/h264decoder"] = (function()
143067
143170
  };
143068
143171
  H264Decoder.prototype.Release = function(outputBuffer) { return this.$val.Release(outputBuffer); };
143069
143172
  ptrType$1.methods = [{prop: "Decode", name: "Decode", pkg: "", typ: $funcType([sliceType$1, general.OutputBuffer], [$error], false)}, {prop: "Release", name: "Release", pkg: "", typ: $funcType([general.OutputBuffer], [], false)}];
143070
- H264Decoder.init("github.com/supraio/client-daemon/pkg/x264/h264decoder", [{prop: "decoder", name: "decoder", embedded: false, exported: false, typ: js.Value, tag: ""}, {prop: "nalBuffer", name: "nalBuffer", embedded: false, exported: false, typ: js.Value, tag: ""}]);
143173
+ H264Decoder.init("github.com/supraio/client-daemon/pkg/x264/h264decoder", [{prop: "decoder", name: "decoder", embedded: false, exported: false, typ: js.Value, tag: ""}]);
143071
143174
  $init = function() {
143072
143175
  $pkg.$init = function() {};
143073
143176
  /* */ 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:
@@ -143563,13 +143666,14 @@ $packages["golang.org/x/exp/shiny/driver/canvasdriver"] = (function() {
143563
143666
  return $pkg;
143564
143667
  })();
143565
143668
  $packages["github.com/supraio/client-daemon/pkg/x264/webcodecs"] = (function() {
143566
- var $pkg = {}, $init, hex, webgl, errs, jshelper, general, canvasdriver, js, Decoder, sliceType, ptrType, sliceType$1, ptrType$1, sliceType$2, ptrType$2, funcType, NewDecoder;
143669
+ var $pkg = {}, $init, hex, webgl, errs, jshelper, general, canvasdriver, image, js, Decoder, sliceType, ptrType, sliceType$1, ptrType$1, sliceType$2, ptrType$2, funcType, NewDecoder;
143567
143670
  hex = $packages["encoding/hex"];
143568
143671
  webgl = $packages["github.com/nuberu/webgl"];
143569
143672
  errs = $packages["github.com/supraio/client-daemon/pkg/errs"];
143570
143673
  jshelper = $packages["github.com/supraio/client-daemon/pkg/jshelper"];
143571
143674
  general = $packages["github.com/supraio/client-daemon/pkg/x264/general"];
143572
143675
  canvasdriver = $packages["golang.org/x/exp/shiny/driver/canvasdriver"];
143676
+ image = $packages["image"];
143573
143677
  js = $packages["syscall/js"];
143574
143678
  Decoder = $pkg.Decoder = $newType(0, $kindStruct, "webcodecs.Decoder", true, "github.com/supraio/client-daemon/pkg/x264/webcodecs", true, function(jsVideoDecoder_, resolves_, rejects_, releaseVideoDecoder_) {
143575
143679
  this.$val = this;
@@ -143673,8 +143777,8 @@ $packages["github.com/supraio/client-daemon/pkg/x264/webcodecs"] = (function() {
143673
143777
  };
143674
143778
  Decoder.prototype.detectCodecName = function(nal) { return this.$val.detectCodecName(nal); };
143675
143779
  Decoder.ptr.prototype.Decode = function(nal, outputBuffer) {
143676
- var _arg, _r, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, chunk, chunkOpts, d, err, errDec, errMessage, frame, frameData, framePromise, framePromiseCb, frameType, nal, outputBuffer, racePromise, timeoutPromise, timeoutPromiseCb, x, ycbcrJSImg, $s, $r;
143677
- /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _r = $f._r; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tuple = $f._tuple; chunk = $f.chunk; chunkOpts = $f.chunkOpts; d = $f.d; err = $f.err; errDec = $f.errDec; errMessage = $f.errMessage; frame = $f.frame; frameData = $f.frameData; framePromise = $f.framePromise; framePromiseCb = $f.framePromiseCb; frameType = $f.frameType; nal = $f.nal; outputBuffer = $f.outputBuffer; racePromise = $f.racePromise; timeoutPromise = $f.timeoutPromise; timeoutPromiseCb = $f.timeoutPromiseCb; x = $f.x; ycbcrJSImg = $f.ycbcrJSImg; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
143780
+ var _arg, _r, _r$1, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, chunk, chunkOpts, d, displayHeight, displayWidth, err, errDec, errMessage, frame, frameData, framePromise, framePromiseCb, frameType, nal, outputBuffer, racePromise, timeoutPromise, timeoutPromiseCb, x, ycbcrImg, ycbcrJSImg, $s, $r;
143781
+ /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _arg = $f._arg; _r = $f._r; _r$1 = $f._r$1; _r$10 = $f._r$10; _r$11 = $f._r$11; _r$2 = $f._r$2; _r$3 = $f._r$3; _r$4 = $f._r$4; _r$5 = $f._r$5; _r$6 = $f._r$6; _r$7 = $f._r$7; _r$8 = $f._r$8; _r$9 = $f._r$9; _tuple = $f._tuple; chunk = $f.chunk; chunkOpts = $f.chunkOpts; d = $f.d; displayHeight = $f.displayHeight; displayWidth = $f.displayWidth; err = $f.err; errDec = $f.errDec; errMessage = $f.errMessage; frame = $f.frame; frameData = $f.frameData; framePromise = $f.framePromise; framePromiseCb = $f.framePromiseCb; frameType = $f.frameType; nal = $f.nal; outputBuffer = $f.outputBuffer; racePromise = $f.racePromise; timeoutPromise = $f.timeoutPromise; timeoutPromiseCb = $f.timeoutPromiseCb; x = $f.x; ycbcrImg = $f.ycbcrImg; ycbcrJSImg = $f.ycbcrJSImg; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
143678
143782
  d = [d];
143679
143783
  d[0] = this;
143680
143784
  frameType = "delta";
@@ -143759,8 +143863,14 @@ $packages["github.com/supraio/client-daemon/pkg/x264/webcodecs"] = (function() {
143759
143863
  /* } */ case 27:
143760
143864
  ycbcrJSImg = $assertType(outputBuffer, ptrType$1).YCbCrJS();
143761
143865
  ycbcrJSImg.CanvasImageSource = frame;
143866
+ displayWidth = $clone($clone(frame, js.Value).Get("displayWidth"), js.Value).Int();
143867
+ displayHeight = $clone($clone(frame, js.Value).Get("displayHeight"), js.Value).Int();
143868
+ _r$11 = outputBuffer.YCbCr(); /* */ $s = 29; case 29: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; }
143869
+ ycbcrImg = _r$11;
143870
+ image.Rectangle.copy(ycbcrImg.Rect, image.Rect(0, 0, displayWidth, displayHeight));
143871
+ ycbcrImg.SubsampleRatio = 2;
143762
143872
  $s = -1; return $ifaceNil;
143763
- /* */ } return; } if ($f === undefined) { $f = { $blk: Decoder.ptr.prototype.Decode }; } $f._arg = _arg; $f._r = _r; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tuple = _tuple; $f.chunk = chunk; $f.chunkOpts = chunkOpts; $f.d = d; $f.err = err; $f.errDec = errDec; $f.errMessage = errMessage; $f.frame = frame; $f.frameData = frameData; $f.framePromise = framePromise; $f.framePromiseCb = framePromiseCb; $f.frameType = frameType; $f.nal = nal; $f.outputBuffer = outputBuffer; $f.racePromise = racePromise; $f.timeoutPromise = timeoutPromise; $f.timeoutPromiseCb = timeoutPromiseCb; $f.x = x; $f.ycbcrJSImg = ycbcrJSImg; $f.$s = $s; $f.$r = $r; return $f;
143873
+ /* */ } return; } if ($f === undefined) { $f = { $blk: Decoder.ptr.prototype.Decode }; } $f._arg = _arg; $f._r = _r; $f._r$1 = _r$1; $f._r$10 = _r$10; $f._r$11 = _r$11; $f._r$2 = _r$2; $f._r$3 = _r$3; $f._r$4 = _r$4; $f._r$5 = _r$5; $f._r$6 = _r$6; $f._r$7 = _r$7; $f._r$8 = _r$8; $f._r$9 = _r$9; $f._tuple = _tuple; $f.chunk = chunk; $f.chunkOpts = chunkOpts; $f.d = d; $f.displayHeight = displayHeight; $f.displayWidth = displayWidth; $f.err = err; $f.errDec = errDec; $f.errMessage = errMessage; $f.frame = frame; $f.frameData = frameData; $f.framePromise = framePromise; $f.framePromiseCb = framePromiseCb; $f.frameType = frameType; $f.nal = nal; $f.outputBuffer = outputBuffer; $f.racePromise = racePromise; $f.timeoutPromise = timeoutPromise; $f.timeoutPromiseCb = timeoutPromiseCb; $f.x = x; $f.ycbcrImg = ycbcrImg; $f.ycbcrJSImg = ycbcrJSImg; $f.$s = $s; $f.$r = $r; return $f;
143764
143874
  };
143765
143875
  Decoder.prototype.Decode = function(nal, outputBuffer) { return this.$val.Decode(nal, outputBuffer); };
143766
143876
  Decoder.ptr.prototype.Release = function(outputBuffer) {
@@ -143815,7 +143925,8 @@ $packages["github.com/supraio/client-daemon/pkg/x264/webcodecs"] = (function() {
143815
143925
  $r = jshelper.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
143816
143926
  $r = general.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
143817
143927
  $r = canvasdriver.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
143818
- $r = js.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
143928
+ $r = image.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
143929
+ $r = js.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
143819
143930
  /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
143820
143931
  };
143821
143932
  $pkg.$init = $init;
@@ -143841,8 +143952,8 @@ $packages["github.com/supraio/client-daemon/pkg/x264"] = (function() {
143841
143952
  sliceType = $sliceType($emptyInterface);
143842
143953
  sliceType$1 = $sliceType($Uint8);
143843
143954
  NewH264Decoder = function(header) {
143844
- var _r, _r$1, decoder, header, $s, $r;
143845
- /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; _r$1 = $f._r$1; decoder = $f.decoder; header = $f.header; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
143955
+ var _r, decoder, header, $s, $r;
143956
+ /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _r = $f._r; decoder = $f.decoder; header = $f.header; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
143846
143957
  decoder = $ifaceNil;
143847
143958
  /* */ if (!$clone($clone(js.Global(), js.Value).Get("VideoDecoder"), js.Value).IsUndefined()) { $s = 1; continue; }
143848
143959
  /* */ if (!$clone($clone(js.Global(), js.Value).Get("h264Decoder"), js.Value).IsUndefined()) { $s = 2; continue; }
@@ -143851,15 +143962,14 @@ $packages["github.com/supraio/client-daemon/pkg/x264"] = (function() {
143851
143962
  decoder = webcodecs.NewDecoder(header);
143852
143963
  $s = 4; continue;
143853
143964
  /* } else if (!$clone($clone(js.Global(), js.Value).Get("h264Decoder"), js.Value).IsUndefined()) { */ case 2:
143854
- _r = h264_decoder.NewDecoder(header); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
143855
- decoder = _r;
143965
+ decoder = h264_decoder.NewDecoder(header);
143856
143966
  $s = 4; continue;
143857
143967
  /* } else { */ case 3:
143858
- _r$1 = errs.Errorf("Not available any h264 docoder adapeter in JS", new sliceType([])); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
143859
- $s = -1; return [ptrType.nil, _r$1];
143968
+ _r = errs.Errorf("Not available any h264 docoder adapeter in JS", new sliceType([])); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
143969
+ $s = -1; return [ptrType.nil, _r];
143860
143970
  /* } */ case 4:
143861
143971
  $s = -1; return [new H264Decoder.ptr(decoder), $ifaceNil];
143862
- /* */ } return; } if ($f === undefined) { $f = { $blk: NewH264Decoder }; } $f._r = _r; $f._r$1 = _r$1; $f.decoder = decoder; $f.header = header; $f.$s = $s; $f.$r = $r; return $f;
143972
+ /* */ } return; } if ($f === undefined) { $f = { $blk: NewH264Decoder }; } $f._r = _r; $f.decoder = decoder; $f.header = header; $f.$s = $s; $f.$r = $r; return $f;
143863
143973
  };
143864
143974
  $pkg.NewH264Decoder = NewH264Decoder;
143865
143975
  H264Decoder.ptr.prototype.Decode = function(nal, outputBuffer) {
@@ -143987,10 +144097,11 @@ $packages["golang.org/x/mobile/event/lifecycle"] = (function() {
143987
144097
  return $pkg;
143988
144098
  })();
143989
144099
  $packages["github.com/supraio/client-daemon/pkg/render"] = (function() {
143990
- var $pkg = {}, $init, binary, json, query, clipboard, errs, input, message, netclient, netpacket, netstream, stats, window, x264, canvasdriver, webgldriver, screen, focus, key, lifecycle, mouse, size, image, io, ioutil, log, os, path, strings, sync, js, time, Frame, FrameType, FrameCollector, FrameMapItem, ProcessInfo, ProcessInfoManager, ScreenWindow, X264FrameRenderer, ptrType, sliceType, ptrType$1, ptrType$2, sliceType$1, sliceType$2, ptrType$3, funcType, sliceType$3, ptrType$4, ptrType$5, ptrType$6, ptrType$7, ptrType$8, ptrType$9, ptrType$10, ptrType$11, structType, ptrType$12, mapType, funcType$1, ptrType$14, chanType, chanType$1, chanType$2, chanType$3, chanType$4, NewFrameCollector, NewProcessInfoManager, MainDriver, NewScreenWindow, NewX264FrameRenderer;
144100
+ var $pkg = {}, $init, binary, json, query, clientscreen, clipboard, errs, input, message, netclient, netpacket, netstream, stats, window, x264, canvasdriver, webgldriver, screen, focus, key, lifecycle, mouse, size, image, io, ioutil, log, os, path, strings, sync, js, time, Frame, FrameType, FrameCollector, FrameMapItem, ProcessInfo, ProcessInfoManager, ScreenWindow, X264FrameRenderer, ptrType, sliceType, ptrType$1, ptrType$2, sliceType$1, sliceType$2, ptrType$3, funcType, sliceType$3, ptrType$4, ptrType$5, ptrType$6, ptrType$7, ptrType$8, ptrType$9, ptrType$10, ptrType$11, structType, ptrType$12, mapType, funcType$1, ptrType$14, chanType, chanType$1, chanType$2, chanType$3, chanType$4, NewFrameCollector, NewProcessInfoManager, MainDriver, NewScreenWindow, NewX264FrameRenderer;
143991
144101
  binary = $packages["encoding/binary"];
143992
144102
  json = $packages["encoding/json"];
143993
144103
  query = $packages["github.com/google/go-querystring/query"];
144104
+ clientscreen = $packages["github.com/supraio/client-daemon/pkg/clientscreen"];
143994
144105
  clipboard = $packages["github.com/supraio/client-daemon/pkg/clipboard"];
143995
144106
  errs = $packages["github.com/supraio/client-daemon/pkg/errs"];
143996
144107
  input = $packages["github.com/supraio/client-daemon/pkg/input"];
@@ -144648,6 +144759,28 @@ $packages["github.com/supraio/client-daemon/pkg/render"] = (function() {
144648
144759
  $s = -1; return;
144649
144760
  /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._r$1 = _r$1; $f._ref = _ref; $f.e = e; $f.e$1 = e$1; $f.e$2 = e$2; $f.e$3 = e$3; $f.e$4 = e$4; $f.$s = $s; $f.$r = $r; return $f;
144650
144761
  }; })(w, windowChannel), []);
144762
+ $go((function(w, windowChannel) { return function $b() {
144763
+ var _1, _2, _r$1, _r$2, _tuple, _tuple$1, close, point, resChan, $s, $r;
144764
+ /* */ $s = 0; var $f, $c = false; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; _1 = $f._1; _2 = $f._2; _r$1 = $f._r$1; _r$2 = $f._r$2; _tuple = $f._tuple; _tuple$1 = $f._tuple$1; close = $f.close; point = $f.point; resChan = $f.resChan; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
144765
+ _r$1 = clientscreen.ScreenResolutionChan(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
144766
+ _tuple = _r$1;
144767
+ resChan = _tuple[0];
144768
+ close = _tuple[1];
144769
+ _2 = resChan;
144770
+ /* while (true) { */ case 2:
144771
+ _r$2 = $recv(_2); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
144772
+ _tuple$1 = _r$2;
144773
+ point = _tuple$1[0];
144774
+ _1 = _tuple$1[1];
144775
+ if (!_1) {
144776
+ /* break; */ $s = 3; continue;
144777
+ }
144778
+ w[0].stats.SetScreenResolution(point);
144779
+ /* } */ $s = 2; continue; case 3:
144780
+ $r = close(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
144781
+ $s = -1; return;
144782
+ /* */ } return; } if ($f === undefined) { $f = { $blk: $b }; } $f._1 = _1; $f._2 = _2; $f._r$1 = _r$1; $f._r$2 = _r$2; $f._tuple = _tuple; $f._tuple$1 = _tuple$1; $f.close = close; $f.point = point; $f.resChan = resChan; $f.$s = $s; $f.$r = $r; return $f;
144783
+ }; })(w, windowChannel), []);
144651
144784
  $s = -1; return err;
144652
144785
  /* */ } return; } if ($f === undefined) { $f = { $blk: ScreenWindow.ptr.prototype.startWindow }; } $f._r = _r; $f.err = err; $f.w = w; $f.windowChannel = windowChannel; $f.$s = $s; $f.$r = $r; return $f;
144653
144786
  };
@@ -144942,7 +145075,7 @@ $packages["github.com/supraio/client-daemon/pkg/render"] = (function() {
144942
145075
  w = [w];
144943
145076
  w[0] = this;
144944
145077
  err = $ifaceNil;
144945
- _tuple = input.GetScreenResolution();
145078
+ _tuple = clientscreen.GetScreenResolution();
144946
145079
  localScreenSize = _tuple[0];
144947
145080
  err = _tuple[1];
144948
145081
  if (!($interfaceIsEqual(err, $ifaceNil))) {
@@ -145079,34 +145212,35 @@ $packages["github.com/supraio/client-daemon/pkg/render"] = (function() {
145079
145212
  $r = binary.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145080
145213
  $r = json.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145081
145214
  $r = query.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145082
- $r = clipboard.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145083
- $r = errs.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145084
- $r = input.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145085
- $r = message.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145086
- $r = netclient.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145087
- $r = netpacket.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145088
- $r = netstream.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145089
- $r = stats.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145090
- $r = window.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145091
- $r = x264.$init(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145092
- $r = canvasdriver.$init(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145093
- $r = webgldriver.$init(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145094
- $r = screen.$init(); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145095
- $r = focus.$init(); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145096
- $r = key.$init(); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145097
- $r = lifecycle.$init(); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145098
- $r = mouse.$init(); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145099
- $r = size.$init(); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145100
- $r = image.$init(); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145101
- $r = io.$init(); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145102
- $r = ioutil.$init(); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145103
- $r = log.$init(); /* */ $s = 25; case 25: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145104
- $r = os.$init(); /* */ $s = 26; case 26: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145105
- $r = path.$init(); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145106
- $r = strings.$init(); /* */ $s = 28; case 28: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145107
- $r = sync.$init(); /* */ $s = 29; case 29: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145108
- $r = js.$init(); /* */ $s = 30; case 30: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145109
- $r = time.$init(); /* */ $s = 31; case 31: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145215
+ $r = clientscreen.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145216
+ $r = clipboard.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145217
+ $r = errs.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145218
+ $r = input.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145219
+ $r = message.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145220
+ $r = netclient.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145221
+ $r = netpacket.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145222
+ $r = netstream.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145223
+ $r = stats.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145224
+ $r = window.$init(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145225
+ $r = x264.$init(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145226
+ $r = canvasdriver.$init(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145227
+ $r = webgldriver.$init(); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145228
+ $r = screen.$init(); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145229
+ $r = focus.$init(); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145230
+ $r = key.$init(); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145231
+ $r = lifecycle.$init(); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145232
+ $r = mouse.$init(); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145233
+ $r = size.$init(); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145234
+ $r = image.$init(); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145235
+ $r = io.$init(); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145236
+ $r = ioutil.$init(); /* */ $s = 25; case 25: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145237
+ $r = log.$init(); /* */ $s = 26; case 26: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145238
+ $r = os.$init(); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145239
+ $r = path.$init(); /* */ $s = 28; case 28: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145240
+ $r = strings.$init(); /* */ $s = 29; case 29: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145241
+ $r = sync.$init(); /* */ $s = 30; case 30: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145242
+ $r = js.$init(); /* */ $s = 31; case 31: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145243
+ $r = time.$init(); /* */ $s = 32; case 32: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
145110
145244
  /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
145111
145245
  };
145112
145246
  $pkg.$init = $init;