This repository was archived by the owner on Dec 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 91
/
Copy pathpcx86.js
721 lines (721 loc) · 283 KB
/
pcx86.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
(function(){/*
https://www.pcjs.org/modules/shared/lib/diskapi.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/shared/lib/dumpapi.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/shared/lib/reportapi.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/shared/lib/userapi.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/shared/lib/keys.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/shared/lib/strlib.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/shared/lib/weblib.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/x86.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/interrupts.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/messages.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/debugger.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/shared/lib/state.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/shared/lib/embed.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/shared/lib/defines.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/shared/lib/usrlib.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/shared/lib/component.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/defines.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/panel.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/bus.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/memory.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/cpu.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/x86seg.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/x86cpu.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/x86fpu.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/x86func.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/x86help.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/x86mods.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/x86ops.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/x86op0f.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/chipset.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/rom.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/ram.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/keyboard.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/video.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/parallel.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/serial.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/mouse.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/disk.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/fdc.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/hdc.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/shared/lib/debugger.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/computer.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/shared/lib/save.js (C) Jeff Parsons 2012-2017
*/
var l,aa,ba="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ca;if("function"==typeof Object.setPrototypeOf)ca=Object.setPrototypeOf;else{var ea;a:{var fa={fd:!0},ha={};try{ha.__proto__=fa;ea=ha.fd;break a}catch(a){}ea=!1}ca=ea?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var ia=ca;
function ja(a,b){a.prototype=ba(b.prototype);a.prototype.constructor=a;if(ia)ia(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Uo=b.prototype}
var ka="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},la="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function ma(a,b){if(b){var c=la;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ka(c,a,{configurable:!0,writable:!0,value:b})}}
ma("Math.trunc",function(a){return a?a:function(a){a=Number(a);if(isNaN(a)||Infinity===a||-Infinity===a||0===a)return a;var b=Math.floor(Math.abs(a));return 0>a?-b:b}});ma("Math.sign",function(a){return a?a:function(a){a=Number(a);return 0===a||isNaN(a)?a:0<a?1:-1}});
var na={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[40,2,9,,253],737280:[80,2,9,,249],1228800:[80,2,15,,249],1474560:[80,2,18,,240],2949120:[80,2,36,,240],10653696:[306,4,17],21411840:[615,4,17],256256:[77,1,26,128],2494464:[203,2,12,512],5242880:[256,2,40,256],10485760:[512,2,40,256]},n={to:0,Xj:1,Yj:2,Zj:3,$j:4,ak:5,bk:6,ck:7,dk:8,$f:9,ag:10,ek:11,fk:12,bg:13,gk:14,hk:15,ik:16,jk:17,kk:18,lk:19,mk:20,nk:21,pk:22,qk:23,rk:24,sk:25,yh:26,wo:27," ":32,"!":33,'"':34,"#":35,
$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,Fd:65,wh:66,xh:67,zh:68,E:69,Ah:70,Bh:71,Ch:72,Dh:73,Eh:74,Fh:75,Gh:76,Hh:77,Ih:78,Jh:79,Kh:80,Q:81,Lh:82,Mh:83,Nh:84,Oh:85,Ph:86,Qh:87,Rh:88,Sh:89,qf:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,fd:97,Dk:98,Ek:99,d:100,e:101,Nk:102,Ok:103,Pk:104,Qk:105,em:106,k:107,fm:108,jm:109,n:110,rm:111,p:112,q:113,r:114,Sn:115,t:116,
Vn:117,Wn:118,Xn:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126,vo:127},pa={};pa[173]=n["-"];pa[186]=n[";"];pa[187]=n["="];pa[189]=n["-"];pa[188]=n[","];pa[190]=n["."];pa[191]=n["/"];pa[192]=n["`"];pa[219]=n["["];pa[220]=n["\\"];pa[221]=n["]"];pa[222]=n["'"];var p={};p[n["1"]]=n["!"];p[n["2"]]=n["@"];p[n["3"]]=n["#"];p[n["4"]]=n.$;p[n["5"]]=n["%"];p[n["6"]]=n["^"];p[n["7"]]=n["&"];p[n["8"]]=n["*"];p[n["9"]]=n["("];p[n["0"]]=n[")"];p[186]=n[":"];p[187]=n["+"];p[188]=n["<"];p[189]=n._;
p[190]=n[">"];p[191]=n["?"];p[192]=n["~"];p[219]=n["{"];p[220]=n["|"];p[221]=n["}"];p[222]=n['"'];p[173]=n._;p[61]=n["+"];p[59]=n[":"];
function qa(a,b){if(a){b||(b=10);var c,d=0<a.indexOf(",");d&&(a=a.replace(/,/g,""));var e=c=a.charAt(0);"#"==c?(b=8,c=""):"$"==c&&(b=16,c="");e!=c?a=a.substr(1):(e=c=a.substr(0,2),"0b"==c&&d||"^B"==c?(b=2,c=""):"0o"==c||"^O"==c?(b=8,c=""):"^D"==c?(b=10,c=""):"0x"==c&&(b=16,c=""),e!=c&&(a=a.substr(2)));e=c=a.slice(-1);"Y"==c||"y"==c?(b=2,c=""):"."==c?(b=10,c=""):"H"==c||"h"==c?(b=16,c=""):"K"==c?c="000":"M"==c?c="000000":"G"==c&&(c="000000000");e!=c&&(a=a.slice(0,-1)+c);var f;e=0;10>=b&&(c=a.match(/(-?[0-9]+)B([0-9]*)/))&&
(a=c[1],e=35-((c[2]||35)&255));c=a;if(((d=b)&&10!=d?16==d?null!==c.match(/^-?[0-9a-f]+$/i):8==d?null!==c.match(/^-?[0-7]+$/):2==d&&null!==c.match(/^-?[01]+$/):null!==c.match(/^-?[0-9]+$/))&&!isNaN(f=parseInt(a,b))){e&&(0>f&&(f+=Math.pow(2,36)),f=0<e?f*Math.pow(2,e):Math.trunc(f/Math.pow(2,-e)));var g=f}}return g}
function ra(a,b,c){b?9<b&&(b=9):(b=Math.abs(a),b=65535>=b?4:4294967295>=b?8:9);c=c?"0x":"";var d=void 0===d?0:d;var e="";isNaN(a)?a=null:null!=a&&(0>a&&-1<a&&(a=-1),0>a&&(a+=Math.pow(16,b)),a>=Math.pow(16,b)&&(b=Math.ceil(Math.log(a)/Math.log(16))));for(var f=d||-1;0<b--;){f||(e=","+e,f=d);if(null==a)e="?"+e;else{var g=a%16;g+=0<=g&&9>=g?48:55;e=String.fromCharCode(g)+e;a=Math.trunc(a/16)}f--}return(void 0===c?"":c)+e}
function sa(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0<d&&(c=c.substr(0,d));b&&(d=c.lastIndexOf("."),0<d&&(c=c.substring(0,d)));return c}function ta(a){var b="",c=a.lastIndexOf(".");0<=c&&(b=a.substr(c+1).toLowerCase());return b}function ua(a,b){return-1!==a.indexOf(b,a.length-b.length)}function va(a){return a.replace(/[&<>"']/g,function(a){return wa[a]})}function xa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}
function ya(a){var b;a!=za&&a!=Aa&&(b=Ba[a]);return b=b?"<"+b+">":String.fromCharCode(a)}var wa={"&":"&","<":"<",">":">",'"':""","'":"'"},Ba={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",10:"LF",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US",127:"DEL"},Aa=10,za=13;
function Ca(a){var b,c="";b||(b=new Date);for(var d=b.getHours(),e=b.getDate(),f=b.getMonth()+1,g=0;g<a.length;g++){var h;switch(h=a.charAt(g)){case "a":c+=12>d?"am":"pm";break;case "d":c+=("0"+e).slice(-2);break;case "D":c+=Da[b.getDay()].substr(0,3);break;case "F":c+=Ea[f-1];break;case "g":c+=d?12<d?d-12:d:12;break;case "h":c+=d;break;case "H":c+=("0"+d).slice(-2);break;case "i":c+=("0"+b.getMinutes()).slice(-2);break;case "j":c+=e;break;case "l":c+=Da[b.getDay()];break;case "m":c+=("0"+f).slice(-2);
break;case "M":c+=Ea[f-1].substr(0,3);break;case "n":c+=f;break;case "s":c+=("0"+b.getSeconds()).slice(-2);break;case "y":c+=(""+b.getFullYear()).slice(-2);break;case "Y":c+=b.getFullYear();break;default:c+=h}}return c}var Da="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),Ea="January February March April May June July August September October November December".split(" "),Fa=[31,28,31,30,31,30,31,31,30,31,30,31],Ga=Date.now||function(){return+new Date};
function Ha(a,b,c,d,e){c=void 0===c?!1:c;var f=0,g=null,h=null;if("object"==typeof resources&&(g=resources[a]))return d&&d(a,g,f),[g,f];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),h;var k=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(k.onreadystatechange=function(){4!==k.readyState?e&&e(1):(g=k.responseText,200==k.status||!k.status&&g.length&&"file:"==(window?window.location.protocol:"file:")||(f=k.status||-1),
e&&e(2),d&&d(a,g,f))});e&&e(0);if(b&&"object"==typeof b){var m="",r;for(r in b)b.hasOwnProperty(r)&&(m&&(m+="&"),m+=r+"="+encodeURIComponent(b[r]));m=m.replace(/%20/g,"+");k.open("POST",a,c);k.setRequestHeader("Content-type","application/x-www-form-urlencoded");k.send(m)}else k.open("GET",a,c),"bytes"==b&&k.overrideMimeType("text/plain; charset=x-user-defined"),k.send();c||(g=k.responseText,200!=k.status&&(f=k.status||-1),d&&d(a,g,f),h=[g,f]);return h}
function Ia(){return"http://"+(window?window.location.host:"www.pcjs.org")}function Ja(){return window?window.navigator.userAgent:""}function Ka(){if(null==La){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}La=a}return La}function Ma(a){if(window)try{var b=window.localStorage.getItem(a)}catch(c){}return b}
function Na(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Oa(a){if(window){var b=Ja();return"iOS"==a&&!!b.match(/(iPod|iPhone|iPad)/)&&!!b.match(/AppleWebKit/)||"MSIE"==a&&!!b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)}return!1}function Pa(a,b,c){if(a)for(var d=0;d<Qa.length;d++){var e=Qa[d];if(c){if(e+=c,b+e in a)return e}else if(e=e?e+b[0].toUpperCase():b[0],e+=b.substr(1),e in a)return e}return null}
function Ra(a){if(!Sa){var b,c={};if(window){b||(b=window.location.search.substr(1));for(var d,e=/\+/g,f=/([^&=]+)=?([^&]*)/g;d=f.exec(b);)c[decodeURIComponent(d[1].replace(e," "))]=decodeURIComponent(d[2].replace(e," "))}Sa=c}return Sa[a]||Sa[a.toLowerCase()]}
function Ta(a,b,c,d){var e=null;b="data:application/"+b+(c?";base64":"")+",";b=Oa("Firefox")?b+(c?a:encodeURIComponent(a)):b+(c?a:encodeURI(a));d&&(e=document.createElement("a"),"string"!=typeof e.download&&(e=null));e?(e.href=b,e.download=d,document.body.appendChild(e),e.click(),document.body.removeChild(e),a="Check your Downloads folder for "+d+"."):(window.open(b),a="Check your browser for a new window/tab containing the requested data"+(d?" ("+d+")":"")+".");return a}
function Ua(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function Va(a){Wa.init.push(a)}function Xa(a){if(Ya)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){q(""+("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to [email protected]. Thanks."))}}function Za(a){!Ya&&a?(Ya=!0,$a&&ab("init"),bb&&ab("show")):Ya=a}function ab(a){Wa[a]&&Xa(Wa[a])}
var Sa=null,Wa={init:[],show:[],exit:[]},Qa=["","moz","ms","webkit"],$a=!1,bb=!1,Ya=!0,La=null;Ua("onload",function(){$a=!0;Xa(Wa.init)});Ua("onpageshow",function(){bb=!0;Xa(Wa.show)});Ua(Oa("iOS")?"onpagehide":Oa("Opera")?"onunload":"onbeforeunload",function(){Xa(Wa.exit)});
function u(a,b){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.ri=b.comment;this.Gj=b;this.exports={};this.ja=this.bindings={};a=this.id.indexOf(".");0>a?this.Ce=this.id:(this.Dd=this.id.substr(0,a),this.Ce=this.id.substr(a+1));this.Y={ready:!1,Oo:!1,Po:!1,Ke:!1,Sb:!1,Zd:!1,error:!1};this.Df=null;this.Y.error=!1;this.Ea=this.R=this.oa=this.na=null;cb.push(this)}function db(a,b,c){fb[a]&&b&&(fb[a][b]=c)}function q(a){window&&window.alert(a)}
function gb(a){var b=!1;window&&(b=window.confirm(a));return b}function hb(a,b){a.value+=b;b=a.value;8192<b.length&&(a.value=b.substr(b.length-4096));a.scrollTop=a.scrollHeight}function ib(a,b,c){var d=a.value,e=d.lastIndexOf(b);0>e?d+=b+"\n":d=d.substr(0,e)+c+d.substr(e+b.length);8192<d.length&&(d=d.substr(d.length-4096));a.value=d;a.scrollTop=a.scrollHeight}function jb(a,b,c){var d;b&&(void 0===d&&(d="Panel"),(d=kb(d,a.id))&&(b=d.ja[b])&&a.Bb(null,c,b))}
function lb(a,b){b=mb(b.parentNode,"pcx86-control");for(var c=0;c<b.length;c++)for(var d=b[c].childNodes,e=0;e<d.length;e++){var f=d[e];if(1===f.nodeType){var g=f.getAttribute("class");if(g)for(var h=g.split(" "),k=0;k<h.length;k++)switch(g=h[k],g){case "pcx86-binding":(g=nb(f))&&g.binding&&a.Bb(g.type,g.binding,f,g.value),k=h.length}}}}function ob(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b<cb.length;b++){var d=cb[b];a&&d.id.indexOf(a)||c.push(d)}return c}
function pb(a,b){if(void 0!==a){var c;b&&0<(c=b.indexOf("."))&&(a=b.substr(0,c+1)+a);for(c=0;c<cb.length;c++)if(cb[c].id===a)return cb[c]}return null}function kb(a,b){var c;if(void 0!==a){var d;b&&(b=0<(d=b.indexOf("."))?b.substr(0,d+1):"");for(d=0;d<cb.length;d++)if(c)c==cb[d]&&(c=null);else if(!(a!=cb[d].type||b&&cb[d].id.indexOf(b)))return cb[d]}return null}function nb(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")}catch(c){q(c.message+" ("+a+")")}return b}
function mb(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var e=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b<d;b++)e.test(a[b].className)&&c.push(a[b]);return c}
function qb(a,b){var c=!1;a+=".machine";if(!b)delete rb[a],c=!0;else if("string"==typeof b&&!rb[a]){c=!0;for(var d=rb,e=a,f=b.length,g=[],h=[],k="",m=null,r=0;r<f;r++){var x=b[r];if('"'==x||"'"==x)m&&x!=m?k+=x:(m?m=null:m=x,k&&(h.push(k),k=""));else{if(!m){if("\r"==x||"\n"==x)x=";";if(" "==x||"\t"==x||";"==x){k&&(h.push(k),k="");";"==x&&h.length&&(g.push(h),h=[]);continue}}k+=x}}k&&h.push(k);h.length&&g.push(h);d[e]=g;sb(a)||(c=!1)}return c}
function sb(a){for(var b=!0,c=rb[a];c&&c.length;){var d=c.splice(0,1)[0],e=d[0],f=null;0<=tb.indexOf(e)&&(f=function(){return function(){sb(a)}}());var g=ub[e];if(g)if(!f)b=g(d[1],d[2],d[3]);else{if(!g(f,d[1],d[2],d[3]))break}else{b=!1;var h=kb(d[1],a);if(h)if(g=vb[e])b=g(h,d[2],d[3]);else{var k=h.exports;if(k&&(g=k[e]))if(b=!0,!f)b=g.call(h,d[2],d[3]);else if(!g.call(h,f,d[2],d[3]))break}}if(!b){q("Script error: '"+e+(g?" failed":" unrecognized"));break}}c&&!c.length&&delete rb[a];return b}l=u.prototype;
l.toString=function(){return this.name?this.name:this.id||this.type};
l.Bb=function(a,b,c){switch(b){case "clear":return this.ja[b]||(this.ja[b]=c,c.onclick=function(a){return function(){a.ja.print&&(a.ja.print.value="")}}(this)),!0;case "print":return this.ja[b]||(this.ja[b]=c,this.wa=function(a){this.rb(a,this.type);return!0},c.value="",this.print=function(a){return function(b){hb(a,b)}}(c),this.rb=function(a,b){return function(a,c){a||(a="");c!=wb||"..."!=a.slice(-3)?(c&&(a=c+": "+a),hb(b,a+"\n")):ib(b,a,a+".")}}(this,c)),!0;default:return!1}};l.log=function(){};
l.print=function(){};l.rb=function(){};l.status=function(a){this.rb(this.type+": "+a)};l.wa=function(a,b,c){if(!b){var d=kb("Computer",this.id);if(d&&d.Y.Zd)return console.log("ignoring notice during unload: "+a),!1}c=c||this.type;b||q((c?c+": ":"")+a);return!0};function xb(a,b){a.Y.error=!0;a.wa(b)}function yb(a,b){b&&(a.Y.ready?b():a.Df=b);return a.Y.ready}function zb(a,b){a.Y.error||(a.Y.ready=!1!==b,a.Y.ready&&(b=a.Df,a.Df=null,b&&b()))}l.Rb=function(){return this.Y.Sb=!0};
l.Qb=function(a,b){b&&(this.Y.Sb=!1);return!0};var wb="progress";window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]),window.PCjs.Commands||(window.PCjs.Commands={}));
var fb=window?window.PCjs.Machines:{},cb=window?window.PCjs.Components:[],rb=window?window.PCjs.Commands:{},tb=["hold","sleep","wait"],ub={alert:function(a){q(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},vb={select:function(a,b,c){var d=!1;if(a=a.bindings[b])for(b=0;b<a.options.length;b++)if(a.options[b].textContent==c){a.selectedIndex!=b&&(a.selectedIndex=b);d=!0;break}return d}};
Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});
Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});
var Ab="undefined"!==typeof ArrayBuffer,Bb={Of:4,gc:5,ad:6,Bc:7,Cc:8,Pa:9,Mb:11,Nb:12,Qd:4,Di:60,Ei:83,Zb:3,Ab:9,mc:16,Nf:1,Ii:19,Ki:28,Mi:16,Li:21,Ji:37,Gi:2,Dg:9,Hi:5,Fi:33,Fg:10,Eg:8,Se:3,Re:15,$i:51,aj:1,bj:2,cj:4,Zi:32,Gg:15,ej:15,Ja:16,Ka:4,gj:11,fj:18,dj:24,Ob:4,hj:2,ue:16,ij:17,Lg:18,jj:19,Kg:5,Mg:6,oj:2,nj:8,lj:9,mj:10,kj:10,Ng:10,Og:10,Oi:80,Qi:144,Ni:86,Pi:154,Si:101,Ui:165,Ri:107,Ti:171,qj:70,sj:113,pj:76,rj:124,Wi:80,Yi:128,Vi:86,Xi:134,Ue:3,Te:16,Tg:10,Sg:8,tj:51,$b:8,uj:17,vj:36,tc:11,
wj:16,Rd:10,Ic:2,Ag:18,Bg:7,Cg:15,Hg:12,Ig:7,Jg:11,Pg:18,Qg:7,Rg:15,Ug:15,Vg:7,Wg:13,$g:11,ah:7,bh:8,xj:8,Aj:12,yj:18,zj:17,Bj:15,Yg:8,Xg:20,Zg:2,fh:3,Ve:9,eh:5,dh:11,hh:4,gh:17,Cj:11},Cb={Of:0,gc:0,ad:0,Bc:0,Cc:0,Pa:0,Mb:1,Nb:1,Qd:3,Di:14,Ei:16,Zb:2,Ab:7,mc:7,Nf:0,Ii:7,Ki:13,Mi:7,Li:11,Ji:16,Gi:3,Dg:6,Hi:2,Fi:13,Fg:5,Eg:5,Se:2,Re:7,$i:23,aj:0,bj:1,cj:3,Zi:17,Gg:7,ej:11,Ja:7,Ka:3,gj:7,fj:11,dj:15,Ob:2,hj:3,ue:7,ij:8,Lg:8,jj:8,Kg:4,Mg:4,oj:2,nj:3,lj:5,mj:2,kj:3,Ng:5,Og:3,Oi:14,Qi:22,Ni:17,Pi:25,Si:17,
Ui:25,Ri:20,Ti:28,qj:13,sj:21,pj:16,rj:24,Wi:13,Yi:21,Vi:16,Xi:24,Ue:2,Te:7,Tg:5,Sg:5,tj:19,$b:5,uj:5,vj:17,tc:3,wj:5,Rd:3,Ic:0,Ag:8,Bg:5,Cg:9,Hg:5,Ig:5,Jg:4,Pg:5,Qg:5,Rg:4,Ug:7,Vg:5,Wg:8,$g:3,ah:4,bh:3,xj:11,Aj:11,yj:15,zj:15,Bj:7,Yg:5,Xg:8,Zg:0,fh:2,Ve:6,eh:3,dh:6,hh:3,gh:5,Cj:5};function Db(a){u.call(this,"Panel",a);this.qh=this.A=this.B=this.G=-1}ja(Db,u);l=Db.prototype;l.jc=function(a,b,c,d){this.na=a;this.oa=b;this.R=c;this.Ea=d;this.C=Eb(a,"Keyboard")};
l.Bb=function(a,b,c,d){return this.na&&this.na.Bb(a,b,c,d)||this.R&&this.R.Bb(a,b,c,d)||this.C&&this.C.Bb(a,b,c,d)?!0:u.prototype.Bb.call(this,a,b,c,d)};l.Rb=function(a,b){b||Fb();return!0};l.Qb=function(){return!0};l.je=function(a,b){a.button||(this.G=b?0:-1,Gb(this,a,b))};l.qg=function(a){Gb(this,a)};
function Gb(a,b,c){var d=Hb/null.offsetWidth,e=Ib/null.offsetHeight,f=null.getBoundingClientRect();d=(b.clientX-f.left)*d|0;b=(b.clientY-f.top)*e|0;null==c&&(a.G||(a.G=Math.abs(a.A-d)>Math.abs(a.B-b)?1:2),1==a.G?b=a.B:2==a.G&&(d=a.A));a.A=d;a.B=b;if(0<=d&&d<Hb&&0<=b&&b<Ib){a:{c=d;if(c<Jb&&a.F&&a.F.Wh)for(f=0;f<a.F.Wh.length;f++)if(e=a.F.Wh[f],e.contains(c,b)){c-=e.x;b-=e.y;f=a.F.Mo[f];d=Kb.qm;var g=(a.F.Lo[f.So]&d.km)>>d.shift;d=g*a.oa.A;f=(g+f.Qo)*a.oa.A-1;0<b&&(d+=e.Ro*(b-1)*a.fa);d+=c*a.fa;d|=
0;d>f&&(d=f);c=d;break a}c=-1}if(-1!==c&&(c&=-16,c!=a.M)){b=c;if(a.context&&a.J&&a.K){e=Lb-Mb;f=a.J.width;a.K.fillStyle=Nb;a.K.fillRect(0,e,f,Mb);d=e+Ob;g=a.J;var h=a.K,k,m=null.style.color,r=a.ia=10;a.D=r;a.I=d;a.ba=a.aa=Ob;k||(k=a.W||a.aa+"px "+Pb);a.X=a.W=k;g&&(a.N=g);h&&(a.H=h,a.V=m||"white");a.L=a.N.width/24|0;if(null==b)Qb(a,"Mouse over memory to dump");else for(Qb(a,ra(b,8,!0),null,0,1),k=1;16>=k;k++){d="";for(g=1;8>=g;g++)h=a.oa,m=b++,h=h.X[(m&h.D)>>>h.B].Cd(m&h.C,m),Qb(a,ra(h,2),null,1),
d+=32<=h&&128>h?String.fromCharCode(h):".";Qb(a,d,null,0,1)}a.context.drawImage(a.J,0,e,f,Mb,a.qa,a.ra,a.ka,a.pa)}a.M=c}}}function Qb(a,b,c,d,e){a.H.font=a.X;a.H.fillStyle=a.V;a.H.fillText(b,a.D,a.I);a.D+=a.L;null!=c&&(16!=a.ma?b=c.toString():(b=8>a.da?"0x":"",b+=ra(c,a.da)),a.H.fillText(b,a.D,a.I),a.D+=a.L);d&&(a.D+=a.L*d);e&&(a.D=a.ia,a.I+=(a.ba+2)*(e||1))}
function Fb(){for(var a=!1,b=mb(document,"pcx86","panel"),c=0;c<b.length;c++){var d=b[c],e=nb(d),f=pb(e.id);f||(a=!0,f=new Db(e));lb(f,d);a&&zb(f)}}var Hb=1280,Ib=720,Ob=18,Pb="Monaco, Lucida Console, Courier New",Jb=3*Hb>>2,Lb=Ib,Nb="black",Mb=Ib>>1;Va(Fb);
function Rb(a,b,c){u.call(this,"Bus",a);this.R=b;this.Ea=c;this.F=a.busWidth||20;this.N=Math.pow(2,this.F);this.W=this.D=this.N-1|0;this.B=32==this.F||20>=this.F?12:24>=this.F?14:15;this.A=1<<this.B;this.V=this.A>>2;this.C=this.A-1;this.H=this.N/this.A|0;this.K=this.H-1;this.I=[];this.J=[];this.L=[];this.M=[];a=new v;Sb(a,this.Ea);this.X=Array(this.H);for(b=0;b<this.H;b++)this.X[b]=a;a=this.R;b=this.X;c=this.B;a.Oc=a.X=b;a.Fb=c;a.vh=1<<a.Fb;a.Eb=a.vh-1;a.jf=b.length;a.Ae=a.jf-1;a=this.R;a.Be=a.Dc=
this.D;zb(this)}ja(Rb,u);l=Rb.prototype;l.reset=function(){Tb(this,!0)};l.Rb=function(a,b){b||this.reset();return!0};
function Ub(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.B;0<g&&h<a.X.length;){var k=a.X[h],m=h*a.A,r=a.A-(f-m);r>g&&(r=g);if(k&&k.size){if(k.type==d&&k.controller==e){if(f+g<=k.fe)return k.ye+=k.fe-f,k.fe=f,!0;if(f>=k.fe+k.ye){r=k.size-(f-m);r>g&&(r=g);k.ye=f-k.fe+r;f=m+a.A;g-=r;h++;continue}}return Vb(a,Wb,f,g)}f=new v(f,r,a.A,d,e);Sb(f,a.Ea,k);a.X[h++]=f;f=m+a.A;g-=r}return 0>=g?(Xb(a.R),a.R.Y.cb||(e=c/1024|0,a.status((e?e+"Kb ":c+" bytes ")+Yb[d]+" at "+ra(b))),!0):Vb(a,Zb,b,c)}
function Tb(a,b){32==a.F?b?a.G&&($b(a,1048576,1048576,a.G),a.G=null):a.G||(a.G=ac(a,1048576,1048576),$b(a,1048576,1048576,ac(a,0,1048576))):20<a.F&&(b=a.D&-1048577|(b?1048576:0),b!=a.D&&(a.D=b,a.R&&(a=a.R,a.Be=a.Dc=b)))}l.Yf=function(a,b,c,d){if(!(a&this.C||!b||b&this.C)){for(var e=a>>>this.B;0<b;){var f=this.X[e];if(!f.controller)return Vb(this,bc,a,b,d);cc(f,c,!0);b-=this.A;e++}return!0}return Vb(this,dc,a,b)};
function ec(a,b,c){if(!(b&a.C||!c||c&a.C)){for(var d=b>>>a.B;0<c;){var e=a.X[d];b=new v(b);Sb(b,a.Ea,e);a.X[d++]=b;b=d*a.A;c-=a.A}Xb(a.R);return!0}return Vb(a,fc,b,c)}function ac(a,b,c){var d=[];for(b>>>=a.B;0<c&&b<a.X.length;)d.push(a.X[b++]),c-=a.A;return d}
function $b(a,b,c,d,e){for(var f=0,g=b>>>a.B;0<c&&g<a.X.length;){var h=d[f++];if(!h)break;if(void 0!==e){var k=new v(b),m=k,r=e,x=a.Ea;m.id=h.id|1;m.ye=h.ye;m.size=h.size;r&&(m.type=r,m.H=r==gc);Ab?(m.L=h.L,m.K=h.K,m.Ha=h.Ha,m.vd=h.vd,m.S=h.S,cc(m,hc?ic:jc)):(m.S=h.S,cc(m,kc));Sb(m,x,h);h=k}a.X[g++]=h;c-=a.A}}l.Ia=function(a){return this.X[(a&this.D)>>>this.B].nc(a&this.C,a)};function lc(a,b){var c=b&a.C,d=(b&a.D)>>>a.B;return c!=a.C?a.X[d].af(c,b):a.X[d++].Cd(c,b)|a.X[d&a.K].Cd(0,b+1)<<8}
l.Cb=function(a,b){this.X[(a&this.D)>>>this.B].pc(a&this.C,b&255,a)};function mc(a,b,c){var d=b&a.C,e=(b&a.D)>>>a.B;d!=a.C?a.X[e].uh(d,c&65535,b):(a.X[e++].ef(d,c&255,b),a.X[e&a.K].ef(0,c>>8&255,b+1))}
function nc(a,b){var c=0,d=[],e=!a.G&&a.W==a.D;e||Tb(a,!0);for(var f=0;f<a.H;f++){var g=a.X[f];if(b&&g.type!=gc||g.Fa||g.ki){d[c++]=f;var h=c++;if(g=g.save()){for(var k=0,m=0,r=[];k<g.length;){for(var x=g[k],t=k+1;t<g.length&&g[t]===x;)t++;r[m++]=t-k;r[m++]=x;k=t}r.length<g.length&&(g=r)}d[h]=g}}e||Tb(a,!1);d[c]=e;return d}
function oc(a,b,c,d){void 0===d&&(d=0);for(var e in c){var f=a,g=+e+d,h=c[e].bind(b);if(h)for(var k=+e+d;k<=g;k++)void 0!==f.I[k]?q("Input port "+ra(k,4,!0)+" already registered"):f.I[k]=[h,!1]}}function pc(a,b,c,d){for(var e=0,f=0;0<c;){var g=a.I[b],h=a.L[b]||1,k=1==h?255:2==h?65535:-1,m=k;void 0!==g&&g[0]&&(m=g[0](b,d),null==m?m=k:m&=k);e|=m<<f;f+=h<<3;b+=h;c-=h}return e}
function qc(a,b,c,d){void 0===d&&(d=0);for(var e in c){var f=a,g=+e+d,h=c[e].bind(b);if(h)for(var k=+e+d;k<=g;k++)void 0!==f.J[k]?q("Output port "+ra(k,4,!0)+" already registered"):f.J[k]=[h,!1]}}function rc(a,b,c,d,e){for(var f=0;0<c;){var g=a.J[b],h=a.M[b]||1,k=1==h?255:2==h?65535:-1;k&=d>>>=f;if(void 0!==g&&g[0])g[0](b,k,e);f+=h<<3;b+=h;c-=h}}function Vb(a,b,c,d,e){b="Memory block error ("+b+": "+ra(c)+","+ra(d)+")";e?a.Ea?a.Ea.message(b):a.log(b):q(b);return!1}
var Kb,sc={qm:20,count:8,No:1,type:3},uc=0,vc;for(vc in sc){var wc=sc[vc];sc[vc]={km:(1<<wc)-1<<uc,shift:uc};uc+=wc}Kb=sc;var Wb=1,Zb=2,bc=3,dc=4,fc=5,xc;if(Ab){var yc=new ArrayBuffer(2);(new DataView(yc)).setUint16(0,256,!0);xc=256===(new Uint16Array(yc))[0]}else xc=!1;var hc=xc;
function v(a,b,c,d,e,f){this.id=zc+=2;this.S=null;this.G=0;this.fe=a;this.ye=b;this.size=c||0;this.type=d||Ac;this.H=d==gc;this.controller=null;this.F=f;Sb(this);this.Fa=this.ki=!1;if(c)if(e)this.controller=e,a=e.pi(a),this.S=a[0],this.G=a[1],cc(this,e.og());else if(Ab)this.L=new ArrayBuffer(c),this.K=new DataView(this.L,0,c),this.Ha=new Uint8Array(this.L,0,c),this.vd=new Uint16Array(this.L,0,c>>1),this.S=new Int32Array(this.L,0,c>>2),cc(this,hc?ic:jc);else{this.S=Array(c>>2);for(e=0;e<this.S.length;e++)this.S[e]=
0;cc(this,kc)}else cc(this)}l=v.prototype;l.am=function(a){this.fe=a};l.save=function(){var a;if(this.controller)var b=null;else if(Ab)for(b=Array(this.size>>2),a=0;a<b.length;a++)b[a]=this.K.getInt32(a<<2,!0);else b=this.S;return b};l.restore=function(a){if(this.controller)return!a;if(a&&this.size==a.length<<2){var b;if(Ab)for(b=0;b<a.length;b++)this.K.setInt32(b<<2,a[b],!0);else this.S=a;return this.Fa=!0}return!1};function cc(a,b,c){b||(b=a.type==Bc?Cc:a.type==Dc?Ec:Fc);Gc(a,b,c);Hc(a,b,c)}
function Gc(a,b,c){c&&a.ge||(a.nc=b[0]||a.Kj,a.$e=b[2]||a.Lj,a.Sd=b[4]||a.Ij);if(c||void 0===c)a.Cd=b[0]||a.Kj,a.af=b[2]||a.Lj,a.lh=b[4]||a.Ij}function Hc(a,b,c){c&&a.he||(a.pc=!a.H&&b[1]||a.sh,a.gf=!a.H&&b[3]||a.th,a.ff=!a.H&&b[5]||a.rh);if(c||void 0===c)a.ef=b[1]||a.sh,a.uh=b[3]||a.th,a.R=b[5]||a.rh}function Sb(a,b,c){a.Ea=b;a.ge=a.he=0;c&&(c.F&&(a.F=c.F),(a.ge=c.ge)&&Gc(a,Ic,!1),(a.he=c.he)&&Hc(a,Ic,!1))}l.Kj=function(){return 255};l.sh=function(){};
l.Lj=function(a,b){return this.nc(a++,b++)|this.nc(a,b)<<8};l.Ij=function(a,b){return this.nc(a++,b++)|this.nc(a++,b++)<<8|this.nc(a++,b++)<<16|this.nc(a,b)<<24};l.th=function(a,b,c){this.pc(a++,b&255,c++);this.pc(a,b>>8,c)};l.rh=function(a,b,c){this.pc(a++,b&255,c++);this.pc(a++,b>>8&255,c++);this.pc(a++,b>>16&255,c++);this.pc(a,b>>>24,c)};l.Bn=function(a){return this.S[a>>2]>>>((a&3)<<3)&255};
l.Nn=function(a){var b=a>>2;a=(a&3)<<3;var c=this.S[b]>>a;return 24>a?c&65535:c&255|(this.S[b+1]&255)<<8};l.Hn=function(a){var b=a>>2;a=(a&3)<<3;var c=this.S[b];a&&(c=c>>>a|this.S[b+1]<<32-a);return c};l.bo=function(a,b){var c=a>>2;a=(a&3)<<3;this.S[c]=this.S[c]&~(255<<a)|b<<a;this.Fa=!0};l.po=function(a,b){var c=a>>2;a=(a&3)<<3;24>a?this.S[c]=this.S[c]&~(65535<<a)|b<<a:(this.S[c]=this.S[c]&16777215|b<<24,c++,this.S[c]=this.S[c]&-256|b>>8);this.Fa=!0};
l.jo=function(a,b){var c=a>>2;if(a=(a&3)<<3){var d=-1<<a;this.S[c]=this.S[c]&~d|b<<a;c++;this.S[c]=this.S[c]&d|b>>>32-a}else this.S[c]=b;this.Fa=!0};l.An=function(a,b){this.F&&Jc(this.F,b,1,!1);return this.Cd(a,b)};l.Mn=function(a,b){this.F&&Jc(this.F,b,2,!1);return this.af(a,b)};l.Gn=function(a,b){this.F&&Jc(this.F,b,4,!1);return this.lh(a,b)};l.ao=function(a,b,c){this.F&&Jc(this.F,c,1,!0);this.H||this.ef(a,b,c)};l.oo=function(a,b,c){this.F&&Jc(this.F,c,2,!0);this.H||this.uh(a,b,c)};
l.io=function(a,b,c){this.F&&Jc(this.F,c,4,!0);this.H||this.R(a,b,c)};l.Dn=function(a,b){this.A.S[this.C]|=this.I;this.B.S[this.D]|=this.I;return this.J.nc(a,b)};l.Pn=function(a,b){this.A.S[this.C]|=this.I;this.B.S[this.D]|=this.I;return this.J.$e(a,b)};l.Jn=function(a,b){this.A.S[this.C]|=this.I;this.B.S[this.D]|=this.I;return this.J.Sd(a,b)};l.eo=function(a,b,c){this.A.S[this.C]|=this.I;this.B.S[this.D]|=this.M;this.J.pc(a,b,c)};
l.ro=function(a,b,c){this.A.S[this.C]|=this.I;this.B.S[this.D]|=this.M;this.J.gf(a,b,c)};l.lo=function(a,b,c){this.A.S[this.C]|=this.I;this.B.S[this.D]|=this.M;this.J.ff(a,b,c)};l.En=function(a,b){return Kc(this.F,b,!1).nc(a,b)};l.Qn=function(a,b){return Kc(this.F,b,!1).$e(a,b)};l.Kn=function(a,b){return Kc(this.F,b,!1).Sd(a,b)};l.fo=function(a,b,c){Kc(this.F,c,!0).pc(a,b,c)};l.so=function(a,b,c){Kc(this.F,c,!0).gf(a,b,c)};l.mo=function(a,b,c){Kc(this.F,c,!0).ff(a,b,c)};l.zn=function(a){return this.Ha[a]};
l.Hj=function(a){return this.Ha[a]};l.Cn=function(a){this.A.S[this.C]|=32;this.B.S[this.D]|=32;this.nc=this.Hj;return this.Ha[a]};l.Ln=function(a){return this.K.getUint16(a,!0)};l.Mj=function(a){return a&1?this.Ha[a]|this.Ha[a+1]<<8:this.vd[a>>1]};l.On=function(a){this.A.S[this.C]|=32;this.B.S[this.D]|=32;this.$e=this.Mj;return a&1?this.Ha[a]|this.Ha[a+1]<<8:this.vd[a>>1]};l.Fn=function(a){return this.K.getInt32(a,!0)};
l.Jj=function(a){return a&3?this.Ha[a]|this.Ha[a+1]<<8|this.Ha[a+2]<<16|this.Ha[a+3]<<24:this.S[a>>2]};l.In=function(a){this.A.S[this.C]|=32;this.B.S[this.D]|=32;this.Sd=this.Jj;return a&3?this.Ha[a]|this.Ha[a+1]<<8|this.Ha[a+2]<<16|this.Ha[a+3]<<24:this.S[a>>2]};l.$n=function(a,b){this.Ha[a]=b;this.Fa=!0};l.Uj=function(a,b){this.Ha[a]=b;this.Fa=!0};l.co=function(a,b){this.Ha[a]=b;this.A.S[this.C]|=32;this.B.S[this.D]|=96;this.pc=this.Uj;this.J.Fa=!0};
l.no=function(a,b){this.K.setUint16(a,b,!0);this.Fa=!0};l.Wj=function(a,b){a&1?(this.Ha[a]=b,this.Ha[a+1]=b>>8):this.vd[a>>1]=b;this.Fa=!0};l.qo=function(a,b){a&1?(this.Ha[a]=b,this.Ha[a+1]=b>>8):this.vd[a>>1]=b;this.A.S[this.C]|=32;this.B.S[this.D]|=96;this.gf=this.Wj;this.J.Fa=!0};l.ho=function(a,b){this.K.setInt32(a,b,!0);this.Fa=!0};l.Vj=function(a,b){a&3?(this.Ha[a]=b,this.Ha[a+1]=b>>8,this.Ha[a+2]=b>>16,this.Ha[a+3]=b>>24):this.S[a>>2]=b;this.Fa=!0};
l.ko=function(a,b){a&3?(this.Ha[a]=b,this.Ha[a+1]=b>>8,this.Ha[a+2]=b>>16,this.Ha[a+3]=b>>24):this.S[a>>2]=b;this.A.S[this.C]|=32;this.B.S[this.D]|=96;this.ff=this.Vj;this.J.Fa=!0};function Lc(a){Ab&&!hc&&(a=a<<24|a<<8&16711680|a>>8&65280|a>>>24);return a}
var Ac=0,gc=2,Bc=5,Dc=6,Yb="NONE RAM ROM VIDEO H/W UNPAGED PAGED".split(" "),zc=0,Fc=[],kc=[v.prototype.Bn,v.prototype.bo,v.prototype.Nn,v.prototype.po,v.prototype.Hn,v.prototype.jo],Ic=[v.prototype.An,v.prototype.ao,v.prototype.Mn,v.prototype.oo,v.prototype.Gn,v.prototype.io],Ec=[v.prototype.Dn,v.prototype.eo,v.prototype.Pn,v.prototype.ro,v.prototype.Jn,v.prototype.lo],Cc=[v.prototype.En,v.prototype.fo,v.prototype.Qn,v.prototype.so,v.prototype.Kn,v.prototype.mo];
if(Ab)var jc=[v.prototype.zn,v.prototype.$n,v.prototype.Ln,v.prototype.no,v.prototype.Fn,v.prototype.ho],ic=[v.prototype.Hj,v.prototype.Uj,v.prototype.Mj,v.prototype.Wj,v.prototype.Jj,v.prototype.Vj],Mc=[v.prototype.Cn,v.prototype.co,v.prototype.On,v.prototype.qo,v.prototype.In,v.prototype.ko];
function Nc(a,b){u.call(this,"CPU",a);b=a.cycles||b;var c=a.multiplier||1;this.U={};this.U.zd=b;this.U.rg=Math.round(1E3/Oc);this.U.Ci=this.U.wg=this.U.nd=c;this.U.Gf=Math.round(this.U.zd/1E4)/100;this.U.jd=this.U.se=this.U.Gf*this.U.nd;this.Y.Sj=this.Y.cb=this.Y.Zf=!1;this.Y.Gd=a.autoStart;this.Y.hi=!1;this.Y.zf=!1;this.U.Hf=this.U.te=0;this.U.If=a.csStart;this.U.Me=a.csInterval;this.U.Ne=a.csStop;this.pa=[];this.sd=0;this.vi=this.Rn.bind(this)}ja(Nc,u);l=Nc.prototype;
l.jc=function(a,b,c,d){this.na=a;this.oa=b;this.Ea=d;for(b=0;b<Pc.length;b++)(d=this.ja[Pc[b]])&&this.na.Bb(null,Pc[b],d);this.rd=Eb(a,"FPU");this.V=Eb(a,"ChipSet");a=Qc(a,"autoStart");null!=a&&(this.Y.Gd="true"==a?!0:"false"==a?!1:!!a);Rc(c,this.id,function(){c.Y.Zf=!0},this.U.rg);zb(this)};l.reset=function(){};l.save=function(){return null};l.restore=function(){return!1};
l.Rb=function(a,b){if(!b){if(a&&this.restore){Sc(this);if(!this.restore(a))return!1;Tc(this)}else this.reset();this.rb("No debugger detected")}Uc(this);return!0};l.Qb=function(a,b){var c=this.Y.cb;b&&Vc(this);return a?this.save(c):!0};l.Gd=function(){return this.Y.cb?!0:this.Y.Gd||void 0===this.ja.run?Wc(this):!1};l.oi=function(){return 0};
function Tc(a){void 0===a.U.If&&(a.U.If=0);void 0===a.U.Me&&(a.U.Me=-1);void 0===a.U.Ne&&(a.U.Ne=-1);a.Y.zf=0<=a.U.If&&0<a.U.Me;a.Y.zf&&(a.U.Hf=0,a.U.te=a.U.If-a.Jc)}
l.Bb=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.ja[b]=c;a=!0;break;case "run":this.ja[b]=c;c.onclick=function(){var a=d.Y.cb,b;if(b=d.na)if(b=d.na,b.Y.Zd&&(b.Y.Zd=!1,b.Y.Ke&&!b.Y.Sb&&b.ve(Xc)),b.Y.Sb)b=!0;else{var c=null,h,k=ob(b.id);for(h=0;h<k.length&&(c=k[h],c===b||c.Y.ready);h++);if(h==k.length)for(h=0;h<k.length&&(c=k[h],c===b||c.Y.Sb);h++);h==k.length&&(c=b);q("The "+c.type+" component ("+c.id+") is not "+(c.Y.ready?"powered yet":"ready yet"+(c.Df?" (waiting for notification)":
""))+".");b=!1}b&&a==d.Y.cb&&(d.Y.cb?Vc(d,!0):Wc(d,!0))};a=!0;break;case "speed":this.ja[b]=c;a=!0;break;case "setSpeed":this.ja[b]=c,c.onclick=function(){Yc(d,d.U.nd<<1,!0)},c.textContent=this.U.se.toFixed(2)+"Mhz",a=!0}return a};function Zc(a,b){a.Y.cb&&(b=a.A-b,a.A-=b,a.Xc-=b)}function $c(a){var b=a.U.jd/a.U.Gf;if(!b||b>a.U.nd)b=a.U.nd;a.U.nm=Math.floor(a.U.zd/Oc*b);a.U.wg=b}function ad(a,b){var c=a.Jc+a.Tc+a.Xc-a.A;b&&1<a.U.nd&&a.U.jd>a.U.Gf&&(c=Math.round(c/a.U.nd));return c}
function Sc(a){a.Jc=a.Tc=a.Xc=a.A=0;Tc(a);Yc(a,a.U.Ci)}function Yc(a,b,c){if(void 0!==b){0<a.U.jd&&a.U.jd<.9*a.U.se&&(b=a.U.Ci);a.U.jd=0;a.U.nd=b;b=a.U.Gf*a.U.nd;if(a.U.se!=b){a.U.se=b;b=a.U.se.toFixed(2)+"Mhz";var d=a.ja.setSpeed;d&&(d.textContent=b);a.rb("target speed: "+b)}c&&a.na&&bd(a.na)}a.Jc+=a.Tc;a.Tc=0;a.U.Hc=a.U.Od=0;$c(a);for(c=a.pa.length-1;0<=c;c--)b=a.pa[c],0<=b[2]&&cd(a,c,b[2],!0)}
function Rc(a,b,c,d){d=void 0===d?-1:d;var e=a.pa.length;a.pa.push([b,-1,d,c]);0<=d&&cd(a,e,d);return e}function cd(a,b,c,d){0<=b&&b<a.pa.length&&(b=a.pa[b],d||0>b[1])&&(c=a.U.zd*a.U.wg/1E3*c|0,a.Y.cb&&(c+=dd(a)),b[1]=c)}function ed(a){for(var b=[],c=0;c<a.pa.length;c++){var d=a.pa[c];b.push([d[0],d[1],d[2]])}return b}function dd(a){var b=a.Xc-a.A;a.Xc=a.A=0;a.U.Jf+=b;a.Tc+=b;return b}
l.Rn=function(){this.sd=0;if(this.Y.cb){$c(this);this.U.Jf=0;this.U.Le=0;this.U.Pd=Ga();this.U.Hc||(this.U.Hc=this.U.Pd);if(this.U.Od){var a=this.U.Pd-this.U.Od;a>this.U.rg&&(this.U.Hc+=a,this.U.Hc>this.U.Pd&&(this.U.Hc=this.U.Pd))}try{this.Y.Zf=!1;do{for(var b,c=this.Y.zf?1:this.U.zd*this.U.wg|0,d=this.pa.length-1;0<=d;d--){var e=this.pa[d];0>e[1]||c>e[1]&&(c=e[1])}b=c;if(this.V){fd(this.V);var f=this.V;a=b;var g=f.pa[0];if(g.Ld){var h=(ad(f.R,f.M)-g.kd)/f.Ba|0,k=gd(f,0)-h;g.mode==hd&&(k-=h);var m=
k*f.Ba|0;g.mode==hd&&(m>>=1);a>m&&(a=m)}b=a;var r=this.V;a=b;if(r.A&&r.A[id]&jd){var x=r.X-ad(r.R,r.M);0<x&&a>x&&(a=x)}b=a}try{this.Tj(b)}catch(O){if("number"!=typeof O)throw O;}a=b=dd(this);for(var t=this.pa.length-1;0<=t;t--){var z=this.pa[t];0>z[1]||(z[1]-=a,0>=z[1]&&(z[1]=-1,z[3](),0<=z[2]&&cd(this,t,z[2])))}a=b;if(this.Y.zf){var E=!1;this.U.Hf=this.U.Hf+this.oi()|0;this.U.te-=a;0>=this.U.te&&(this.U.te+=this.U.Me,E=!0);0<=this.U.Ne&&this.U.Ne<=ad(this)&&(this.U.Me=this.U.Ne=-1,Tc(this),Vc(this),
E=!0);E&&this.rb(ad(this)+" cycles: checksum="+ra(this.U.Hf))}}while(this.Y.cb&&!this.Y.Zf)}catch(O){Vc(this);Uc(this);this.na&&this.na.stop(Ga(),ad(this));xb(this,O.stack||O.message);return}if(this.Y.cb){b=setTimeout;c=this.vi;this.U.Od=Ga();this.U.Le&&(this.U.Hc+=this.U.Le,this.U.Pd+=this.U.Le);d=this.U.rg;this.U.Jf&&(d=Math.round(d*this.U.Jf/this.U.nm));d-=this.U.Od-this.U.Pd;if(e=this.U.Od-this.U.Hc)this.U.jd=Math.round(this.Tc/(10*e))/100,864E5<=e&&(this.Jc=0,this.V&&fd(this.V,!0),Yc(this));
0>d?(-1E3>d&&(this.U.Hc-=d),d=0):this.U.jd<this.U.se&&(d=0);this.U.Od+=d;this.sd=b(c,d)}}};function Wc(a,b){if(a.Y.error){a.rb(a.toString()+" error");var c=!0}else c=!1;if(c)return!1;if(a.Y.cb)return a.rb(a.toString()+" busy"),!1;a.sd&&(clearTimeout(a.sd),a.sd=0);Yc(a);a.Y.cb=!0;a.Y.Sj=!0;a.V&&a.V.start();if(c=a.ja.run)c.textContent="Halt";a.na&&(kd(a.na,!0),b&&bd(a.na,!0),a.na.start(a.U.Hc,ad(a)));a.sd=setTimeout(a.vi,0);return!0}l.Tj=function(){return 0};
function Vc(a,b){if(a.Y.cb){dd(a);a.Jc+=a.Tc;a.Tc=0;a.Y.cb=!1;a.V&&a.V.stop();var c=a.ja.run;c&&(c.textContent="Run");a.na&&(a.na.stop(Date.now()||+new Date,ad(a)),kd(a.na,!0));a.Ea||a.status("Stopped")}a.Y.complete=b}function ld(a,b){var c=Ga();b()&&(b=Ga(),a.U.Le+=b-c)}function Uc(a){a.na&&kd(a.na,void 0)}var Oc=30,Pc=["power","reset"];
function md(a,b,c,d){this.A=a;this.Ea=a.Ea;this.id=b;this.Xf=c||"";this.ha=0;this.jb=65535;this.C=this.jb+1;this.ub=this.ic=this.ext=this.nb=this.type=this.va=0;this.bc=-1;this.T=this.Kc=2;this.O=this.ta=65535;this.J=this.zi;this.I=this.H=this.xf;this.B={ha:-1,va:0,jb:0,nb:0,type:0,ext:0,bc:-1};1==this.id&&(this.Ze=0,this.D=null,this.oe=!1,this.G=Array(32),this.F=[]);nd(this,!0,d);0==this.id&&(this.Kb=this.tb=this.ei)}l=md.prototype;l.zi=function(a){this.ha=a&65535;return this.va=this.ha<<4};
l.Ff=function(a,b){var c=this.A;a&=65535;if(a&4){var d=c.lc.va;var e=d+c.lc.jb|0}else d=c.Jb,e=c.Pc;if(d){d=d+(a&65528)|0;if(e-d|0)return c.A-=15,od(this,d,a,b);this.id<pd&&w.call(c,b&&this.id==qd?10:13,a&65532)}return-1};l.im=function(a){var b=this.A;a=b.Wb+(a<<2);var c=b.ga(a);b.N&=-769;return this.load(b.ga(a+2))+c|0};l.hm=function(a){var b=this.A;a<<=3;var c=b.Wb+a|0;if(7<=(b.Rc-c|0))return this.D=!0,a=od(this,c,a),-1!==a&&(a+=this.Ze),a;w.call(b,13,a|2);return-1};
l.ei=function(a){return this.va+a|0};l.xf=function(a,b){(a>>>0)+b>this.C&&(8088>=this.A.ca?this.A.K|=8:w.call(this.A,13));return this.va+a|0};l.di=function(a,b){return(a>>>0)+b<=this.C?this.va+a|0:this.wf()};l.Fk=function(a,b){return(a>>>0)+b>this.C?this.va+a|0:this.wf()};l.wf=function(){w.call(this.A,13,0);return-1};l.fi=function(a,b){return(a>>>0)+b<=this.C?this.va+a|0:this.yf()};l.Gk=function(a,b){return(a>>>0)+b>this.C?this.va+a|0:this.yf()};l.yf=function(){w.call(this.A,13,0);return-1};
function rd(a,b,c,d,e){a.ha=b;a.va=d;a.jb=e;a.C=(e>>>0)+1;a.nb=c;a.type=c&7936;a.ext=c>>16&192;a.bc=(b&4?a.A.lc.va:a.A.Jb)+(b&65528)|0;a.id<sd&&nd(a,!0)}function td(a,b,c){var d=a.A,e=d.ga(b+2),f=d.ga(b)|(e&255)<<16;d=d.ga(b+4);a.ha=c;a.va=f;a.jb=d;a.C=(d>>>0)+1;a.nb=e;a.type=e&7936;a.ext=0;a.bc=b;a.id<sd&&nd(a,!0)}
function od(a,b,c,d){var e=a.A;if(!d&&c===a.B.ha)return a.ha=c,a.va=a.B.va,a.jb=a.B.jb,a.C=(a.B.jb>>>0)+1,a.nb=a.B.nb,a.type=a.B.type,a.ext=a.B.ext,a.bc=a.B.bc,a.B.ha=-1,nd(a,!0,!0,!1),a.va;a.B.ha=-1;var f=e.ga(b+0),g=e.ga(b+4),h=g&7936,k=e.ga(b+2)|(g&255)<<16,m=e.ga(b+6),r=c&65528;if(80386<=e.ca){var x=f;k|=(m&65280)<<16;f|=(m&15)<<16;m&128&&(f=f<<12|4095)}switch(a.id){case ud:var t=a.D;a.oe=!1;if(t&&c==vd&&a.F.length){var z=a.F[a.Ze-1];if(z&&!z())return-1}var E=c&3,O=(g&24576)>>13;z=-1;r||b>=e.Jb&&
b<e.Pc&&(h=0);if(6144<=h)null!=d?z=0:!1!==t?(h&1024?O<=a.ub&&(z=0):E<=a.ub&&O==a.ub&&(z=0),z||(c=c&-4|a.ub&3)):E>=a.ub&&(E>a.ub&&(z=y(e),wd(e,y(e),!0),A(e,z),a.oe=!0),z=0);else{if(256==h||2304==h)return xd(a,c,t)?a.va:-1;if(1024==h){z=2;var K=0;E<a.ub&&(E=a.ub)}else if(3072==h)z=4,K=0,E<a.ub&&(E=a.ub);else if(1536==h)z=2,K=148224;else if(3584==h)z=4,K=148224;else if(1792==h)z=2,K=147712;else if(3840==h)z=4,K=147712;else if(1280==h)return xd(a,k&65535,t)?a.va:-1}0<z&&!(g&32768)&&(z=0);if(0<z){r=a.ub;
var da=b==e.Wb+c;if(E<=O&&(!da||0<=e.sc||r<=O)){b=k&65535;h&2048&&(f=x|m<<16);m=h=0;d=b&3;if(d<r){if(-1===a.Ff(b,!0))return-1;m=e.ka.va;e.ka.type&2048?(c=(d<<3)+4,x=4):(c=(d<<2)+2,x=2);h=e.ga(m+c+x);if(!h)return w.call(e,10,h),-1;if(-1===e.W.Ff(h,!0))return-1;m=2==x?e.ga(m+c):e.ea(m+c)}c=e.N;e.N&=~K;c&131072&&yd(e,!0,!1);if(-1===a.Ff(b,!1))return-1;zd(e,z);a.Ze=f;if(d<r){if(!0!==t)return-1;z=B(e);f=0;for(g&=31;g--;)a.G[f++]=Ad(e,e.W,z),z+=2;t=e.W.ha;g=B(e);wd(e,h,!0);A(e,m);c&131072&&(zd(e,4),Bd(e,
e.wb.ha,4,2),e.wb.load(0),Bd(e,e.sb.ha,4,2),e.sb.load(0),Bd(e,e.Ga.ha,4,2),Cd(e,0),Bd(e,e.xa.ha,4,2),Dd(e,0));Bd(e,t,e.T,2);for(C(e,g);f;)C(e,a.G[--f]);a.oe=!0}return a.va}}if(0!=z)return w.call(e,13,c&65532|(da?2:0)),-1;if(!(g&32768))return w.call(e,11,c&65532|(da?2:0)),-1;break;case Ed:if(r){if(4096>h||2048==(h&2560))return w.call(e,13,c&65532),-1;if(!(g&32768))return w.call(e,11,c&65532),-1}break;case qd:if(!r||4096>h||512!=(h&2560))return w.call(e,13,c&65532),-1;if(!(g&32768))return w.call(e,
12,c&65532),-1;break;case sd:t=h&-513;if(!r||256!=t&&2304!=t)return w.call(e,13,c&65532),-1;2304==t&&(a.Yh=k+e.ga(k+102)|0,a.Ck=k+a.jb|0);break;case pd:if(!(h&4096)&&768<h&&2304!=h&&2816!=h)return-1}d?(a.B.ha=c,a.B.va=k,a.B.jb=f,a.B.nb=g,a.B.type=h,a.B.ext=m,a.B.bc=b):(a.ha=c,a.va=k,a.jb=f,a.C=(f>>>0)+1,a.nb=g,a.type=h,a.ext=m,a.bc=b,nd(a,!0,!0,!1));return k}
function xd(a,b,c){var d=a.A,e=a.ub,f=d.ka.ha,g=d.ka.va;if(!c){if(!(d.ka.type&512))return w.call(d,13,b&65532),!1;d.Za(d.ka.bc+4,d.ka.nb&=-513)}if(-1===d.ka.load(b))return!1;var h=d.ka.va;if(!1!==c){if(d.ka.type&512)return w.call(d,13,b&65532),!1;d.Za(d.ka.bc+4,d.ka.nb|=512)}d.ka.type=d.ka.type&-513|d.ka.nb&512;256==d.ka.type||768==d.ka.type?(d.Za(g+14,D(d)),d.Za(g+16,Fd(d)),d.Za(g+18,d.F),d.Za(g+20,d.H),d.Za(g+22,d.L),d.Za(g+24,d.G),d.Za(g+26,B(d)),d.Za(g+28,d.M),d.Za(g+30,d.J),d.Za(g+32,d.I),d.Za(g+
34,d.xa.ha),d.Za(g+36,d.fa.ha),d.Za(g+38,d.W.ha),d.Za(g+40,d.Ga.ha),d.lc.load(d.ga(h+42)),Gd(d,d.ga(h+16)|(c?16384:0)),d.F=d.ga(h+18),d.H=d.ga(h+20),d.L=d.ga(h+22),d.G=d.ga(h+24),d.M=d.ga(h+28),d.J=d.ga(h+30),d.I=d.ga(h+32),d.xa.load(d.ga(h+34)),d.Ga.load(d.ga(h+40)),Hd(d,d.ga(h+14),d.ga(h+36)),b=38,g=26,a.ub<e&&(g=(a.ub<<2)+2,b=g+2),wd(d,d.ga(h+b),!0),A(d,d.ga(h+g))):(d.Ta(g+28,d.Wc),d.Ta(g+32,D(d)),d.Ta(g+36,Fd(d)),d.Ta(g+40,d.F),d.Ta(g+44,d.H),d.Ta(g+48,d.L),d.Ta(g+52,d.G),d.Ta(g+56,B(d)),d.Ta(g+
60,d.M),d.Ta(g+64,d.J),d.Ta(g+68,d.I),d.Ta(g+72,d.xa.ha),d.Ta(g+76,d.fa.ha),d.Ta(g+80,d.W.ha),d.Ta(g+84,d.Ga.ha),d.Ta(g+88,d.sb.ha),d.Ta(g+92,d.wb.ha),b=d.ea(h+28),d.Wc=b,Xb(d),d.lc.load(d.ga(h+96)),Gd(d,d.ea(h+36)|(c?16384:0)),d.F=d.ea(h+40),d.H=d.ea(h+44),d.L=d.ea(h+48),d.G=d.ea(h+52),d.M=d.ea(h+60),d.J=d.ea(h+64),d.I=d.ea(h+68),d.xa.load(d.ga(h+72)),d.Ga.load(d.ga(h+84)),d.sb.load(d.ga(h+88)),d.wb.load(d.ga(h+92)),Hd(d,d.ea(h+32),d.ga(h+76)),b=80,g=56,a.ub<e&&(g=(a.ub<<3)+4,b=g+4),wd(d,d.ga(h+
b),!0),A(d,d.ea(h+g)));c&&d.Za(h+0,f);d.ra|=8;return!0}l.save=function(){return[this.ha,this.va,this.jb,this.nb,this.id,this.Xf,this.ub,this.ic,this.bc,this.Kc,this.ta,this.T,this.O,this.type,this.C]};
l.restore=function(a){"number"==typeof a?this.load(a):(this.ha=a[0],this.va=a[1],this.jb=a[2],this.nb=a[3],this.id=a[4],this.Xf=a[5],this.ub=a[6],this.ic=a[7],this.bc=a[8],this.Kc=a[9]||2,this.ta=a[10]||65535,this.T=a[11]||2,this.O=a[12]||65535,this.type=a[13]||this.nb&7936,this.C=a[14]||(this.jb>>>0)+1)};
function nd(a,b,c,d){void 0===c&&(c=!!(a.A.ra&1));a.le=!1;if(c)if(a.load=a.Ff,a.yi=a.hm,a.tb=a.di,a.Kb=a.fi,void 0===d&&(d=!!(a.A.N&131072)),d)a.load=a.J,a.tb=a.H,a.Kb=a.I,a.ub=a.ic=3,a.T=2,a.O=a.ta=65535,a.jb=65535,a.C=a.jb+1,a.Kc=a.T,a.bc=-1,a.oe=!1;else{if(!(a.ha&-4))a.tb=a.wf,a.Kb=a.yf;else if(a.type&4096){6144==(a.type&6656)&&(a.tb=a.wf);if(a.type&2048||!(a.type&512))a.Kb=a.yf;1024==(a.type&3072)&&(a.tb==a.di&&(a.tb=a.Fk),a.Kb==a.fi&&(a.Kb=a.Gk),a.le=!0);b&&a.id<pd&&a.ha&-4&&-1!==a.bc&&(c=a.bc+
5,d=a.A.Ia(c),d&1||a.A.Cb(c,d|1))}b&&(a.ub=a.ha&3,a.ic=(a.nb&24576)>>13,80386>a.A.ca||!(a.ext&64)?(a.T=2,a.O=65535):(a.T=4,a.O=-1),a.Kc=a.T,a.ta=a.O)}else a.load=a.zi,a.yi=a.im,a.tb=a.xf,a.Kb=a.xf,a.ub=a.ic=0,a.bc=-1,a.oe=!1}var ud=1,Ed=2,qd=3,sd=4,pd=6,vd=1;
function Id(a){var b=+a.model||8088;switch(b){default:var c=4772727;break;case 80286:c=6E6;break;case 80386:c=16E6}Nc.call(this,a,c);this.ca=b;a=a.stepping;this.qd=b+(a?qa(a,16):0);this.Uh=61442;this.pd=1792;this.Th=28672;this.hf=4;this.Ma=255;this.B=80286<=this.ca?Cb:Bb;this.qa=Jd;this.ci=Kd;this.gi=Ld;this.ji=Md;if(80186<=this.ca&&(this.qa=Jd.slice(),this.ci=Kd.slice(),this.gi=Ld.slice(),this.Ma=31,this.qa[15]=Nd,this.qa[96]=Od,this.qa[97]=Pd,this.qa[98]=Qd,this.qa[99]=Nd,this.qa[100]=Nd,this.qa[101]=
Nd,this.qa[102]=Nd,this.qa[103]=Nd,this.qa[104]=Rd,this.qa[105]=Sd,this.qa[106]=Td,this.qa[107]=Ud,this.qa[108]=Vd,this.qa[109]=Wd,this.qa[110]=Xd,this.qa[111]=Yd,this.qa[192]=Zd,this.qa[193]=$d,this.qa[200]=ae,this.qa[201]=be,this.qa[241]=ce,this.ci[7]=de,this.gi[7]=de,80286<=this.ca)){this.Uh=2;this.pd|=28672;this.hf=0;this.qa[15]=ee;this.dd=fe.slice();for(b=0;b<this.dd.length;b++)this.dd[b]||(this.dd[b]=ge);this.qa[84]=he;this.qa[99]=ie;if(80386<=this.ca){var d;this.Th=0;this.pd|=196608;this.qa[100]=
je;this.qa[101]=ke;this.qa[102]=le;this.qa[103]=me;for(d in F)this.dd[+d]=F[+d];80546<=this.qd&&80562>=this.qd&&(this.dd[166]=ne,this.dd[167]=oe)}}this.lf=[];this.bi=[];this.dg=0;Sc(this);this.Y.complete=this.Y.Hk=!1;this.ni=0;this.Oc=this.X=[];this.Fb=this.vh=this.Eb=this.jf=this.Ae=this.Be=this.Dc=0;pe(this)}ja(Id,Nc);
function qe(a){var b;if(a.X===a.Oc){a.X=Array(a.jf);a.mf=new v(null,0,0,Bc,null,a);Sb(a.mf,a.Ea);for(b=0;b<a.jf;b++)a.X[b]=a.mf;a.De=new v;a.Xh=Array(re);a.nf=0}else for(var c=0;c<a.kf.length;c++){b=a.kf[c];var d=a.X[b];a.nf<re&&(a.Xh[a.nf++]=d);a.X[b]=a.mf}a.kf=[]}function Xb(a){a.ra&-2147483648&&qe(a)}
function Kc(a,b,c,d){var e=(b&-4194304)>>>20,f=a.Oc[(a.Wc+e&a.Be)>>>a.Fb],g=f.Sd(e);if(!(g&1))return d||se.call(a,b,!1,c),a.De;if(!(g&4)&&3==a.La)return d||se.call(a,b,!0,c),a.De;var h=(b&4190208)>>>10;g=a.Oc[((g&-4096)+h&a.Be)>>>a.Fb];var k=g.Sd(h);if(!(k&1))return d||se.call(a,b,!1,c),a.De;if(!(k&4)&&3==a.La)return d||se.call(a,b,!0,c),a.De;c=a.Oc[((k&-4096)+(b&4095)&a.Be)>>>a.Fb];if(d)return c;d=b>>>a.Fb;k=a.X[d];b&=-4096;if(0<a.nf){var m=a.Xh[--a.nf];m.am(b)}else m=new v(b,0,0,Dc);b=m;b.J=c;b.A=
f;b.C=e>>2;b.B=g;b.D=h>>2;Ab&&hc&&c.S&&!c.controller&&!c.ge&&!c.he?(b.Ha=c.Ha,b.vd=c.vd,b.S=c.S,cc(b,Mc)):(b.I=c?Lc(32):0,b.M=c?Lc(96):0,cc(b,Ec));Sb(b,a.Ea,k);a.X[d]=b;a.kf.push(d);return b}function te(a){a.X!==a.Oc&&(a.X=a.Oc,a.mf=null,a.kf=null,a.De=null)}l=Id.prototype;l.reset=function(){pe(this);Sc(this);this.Y.error=!1};
function ue(a,b){switch(b){case 0:var c=a.F;break;case 1:c=a.H;break;case 2:c=a.L;break;case 3:c=a.G;break;case 4:c=B(a);break;case 5:c=a.M;break;case 6:c=a.J;break;case 7:c=a.I}return c}function ve(a,b,c){switch(b){case 0:a.F=c;break;case 1:a.H=c;break;case 2:a.L=c;break;case 3:a.G=c;break;case 4:A(a,c);break;case 5:a.M=c;break;case 6:a.J=c;break;case 7:a.I=c}}
function pe(a){a.F=0;a.G=0;a.H=0;a.L=0;a.kc=0;a.M=0;a.J=0;a.I=0;a.fc=!1;a.Ba=a.Sa=0;a.pm=[0,0];a.sm=[0,0];a.ua=0;a.mi=0;a.aa=0;a.ra=65520;a.Wb=0;a.Rc=1023;a.N=a.Yb=0;a.ae=a.Ee=a.$d=a.be=0;a.sc=-1;a.Uc=a.uc=-1;a.Vc=a.ma=-1;a.fa=new md(a,ud,"CS");a.Ga=new md(a,Ed,"DS");a.xa=new md(a,Ed,"ES");a.W=new md(a,qd,"SS");A(a,0);wd(a,0);if(80386<=a.ca){switch(a.qd){case 80562:case 80563:a.L=771;break;case 80578:a.L=772;break;case 80594:a.L=773;break;case 80595:case 80596:a.L=776}a.ra=16;a.wi=0;a.td=0;a.Wc=0;
a.Db=[0,0,0,0,null,null,0,0];a.pf=[null,null,null,null,null,null,0,0];a.sb=new md(a,Ed,"FS");a.wb=new md(a,Ed,"GS");te(a)}a.fg=new md(a,0,"NULL");a.Ca=a.Ga;a.Gb=a.W;a.K=a.ba=0;a.C=a.D=-1;a.Da=a.fg;a.Qa=0;if(80286>a.ca)Hd(a,0,65535);else{a.Jb=0;a.Pc=65535;a.lc=new md(a,5,"LDT",!0);a.ka=new md(a,sd,"TSS",!0);a.gb=new md(a,pd,"VER",!0);Hd(a,65520,61440);var b=D(a);var c=a.fa;var d=-65536;80386>c.A.ca&&(d&=16777215);c=c.va=d;a.da=c+b|0;a.eg=(c>>>0)+(a.fa.jb>>>0)+1}Gd(a,0);yd(a)}
function we(a){2==a.Kc?(a.ti=a.ga,a.Xb=xe,a.ec=ye,a.Sc=ze,2==a.T?(a.ia=Ae,a.za=Be,a.eb=Ce):(a.ia=De,a.za=Ee,a.eb=Fe)):(a.ti=a.ea,a.Xb=Ge,a.ec=He,a.Sc=Ie,2==a.T?(a.ia=Je,a.za=Ke,a.eb=Le):(a.ia=Me,a.za=Ne,a.eb=Oe))}function zd(a,b){a.T!=b&&(a.ba|=1024,a.T=b,a.O=2==b?65535:-1,Pe(a))}function Pe(a){2==a.T?(a.xb=32768,a.mb=a.ga,a.Lb=a.Za,2==a.Kc?(a.ia=Ae,a.za=Be,a.eb=Ce):(a.ia=Je,a.za=Ke,a.eb=Le)):(a.xb=-2147483648,a.mb=a.ea,a.Lb=a.Ta,2==a.Kc?(a.ia=De,a.za=Ee,a.eb=Fe):(a.ia=Me,a.za=Ne,a.eb=Oe))}
function Qe(a){a.Kc=a.fa.Kc;a.ta=a.fa.ta;we(a);a.T=a.fa.T;a.O=a.fa.O;Pe(a);a.ba&=-3073}l.oi=function(){var a=this.F+this.G+this.H+this.L+B(this)+this.M+this.J+this.I|0;return a=a+D(this)+this.fa.ha+this.Ga.ha+this.W.ha+this.xa.ha+Fd(this)|0};function Re(a,b,c){void 0===a.lf[b]&&(a.lf[b]=[]);a.lf[b].push(c)}function Se(a,b){var c=a.bi[b];null!=c&&(c(--a.dg),delete a.bi[b])}
function Te(a,b){for(var c=a.Db[7],d=c>>16,e=0;4>e;e++){if(c&3){var f=!!(d&1),g=a.Db[e];g&=~(d>>2&3);if(b){g=a.X[g>>>a.Fb];var h=a;f?0===g.he++&&(h&&(g.F=h),Hc(g,Ic,!1)):0===g.ge++&&(h&&(g.F=h),Gc(g,Ic,!1))}else g=a.X[g>>>a.Fb],f?0===--g.he&&(f=g,f.pc=f.H?f.sh:f.ef,f.gf=f.H?f.th:f.uh,f.ff=f.H?f.rh:f.R):0===--g.ge&&(f=g,f.nc=f.Cd,f.$e=f.af,f.Sd=f.lh)}c>>=2;d>>=4}}
function Jc(a,b,c,d){if(!(a.K&8192)&&a.Db[7]&255){c--;var e=a.Db[7],f=e>>16;d=d?1:0==d?3:0;for(var g=0;4>g;g++){if(e&3&&(f&3)==d){var h=f>>2;if(b+c>=a.Db[g]&&b<=a.Db[g]+h){a.Db[6]|=1<<g;a.Qa|=2;break}}e>>=2;f>>=4}}}function yd(a,b,c){void 0===b&&(b=!!(a.ra&1));void 0===c&&(c=!!(a.N&131072));a.ji=b&&!c?Ue:Md;nd(a.fa,!1,b,c);nd(a.Ga,!1,b,c);nd(a.W,!1,b,c);nd(a.xa,!1,b,c);80386<=a.ca&&(nd(a.sb,!1,b,c),nd(a.wb,!1,b,c));Qe(a)}
l.save=function(a){var b=new Ve(this);b.set(0,[this.F,this.G,this.H,this.L,B(this),this.M,this.J,this.I]);var c=D(this),d=this.fa.save(),e=this.Ga.save(),f=this.W.save(),g=this.xa.save();if(null!=this.Jb){var h=[this.ra,this.Jb,this.Pc,this.Wb,this.Rc,this.lc.save(),this.ka.save(),this.Yb];80386<=this.ca&&(h.push(this.wi),h.push(this.td),h.push(this.Wc),h.push(this.Db),h.push(this.pf))}else h=null;c=[c,d,e,f,g,h,Fd(this)];80386<=this.ca&&(c.push(this.sb.save()),c.push(this.wb.save()));b.set(1,c);
b.set(2,[this.Ca.Xf,this.Gb.Xf,this.K,this.ba,this.Qa,this.C,this.D]);b.set(3,[0,this.Jc,this.U.nd,a,ed(this)]);b.set(4,nc(this.oa,!!(this.ra&-2147483648)));return b.data()};
l.restore=function(a){var b=a[0];this.F=b[0];this.G=b[1];this.H=b[2];this.L=b[3];var c=b[4];this.M=b[5];this.J=b[6];this.I=b[7];b=a[1];this.fa.restore(b[1]);this.Ga.restore(b[2]);this.W.restore(b[3]);this.xa.restore(b[4]);var d=b[5];d&&d.length&&(this.ra=d[0],this.Jb=d[1],this.Pc=d[2],this.Wb=d[3],this.Rc=d[4],this.lc.restore(d[5]),this.ka.restore(d[6]),this.Yb=d[7],80386<=this.ca&&(this.wi=d[8],this.td=d[9],this.Wc=d[10],this.Db=d[11],this.pf=d[12]),yd(this));Gd(this,b[6]);d=!1;a:{var e=this.oa;
var f=a[4],g;for(g=0;g<f.length-1;g+=2){var h=f[g],k=f[g+1];if(k&&k.length<e.V){for(var m=0,r=Array(e.V),x=0;x<k.length-1;)for(var t=k[x++],z=k[x++];t--;)r[m++]=z;k=r}m=e.X[h];if(!m||!m.restore(k)){q("Unable to restore memory block "+h);e=!1;break a}}void 0!==f[g]&&Tb(e,f[g]);e=!0}e&&(Hd(this,b[0],this.fa.ha),A(this,c),wd(this,this.W.ha),80386<=this.ca&&(this.sb.restore(b[7]),this.wb.restore(b[8])),d=!0);b=a[2];this.Ca=null!=b[0]&&We(this,b[0])||this.Ga;this.Gb=null!=b[1]&&We(this,b[1])||this.W;this.K=
b[2];this.ba=b[3];this.Qa=b[4];this.C=b[5];this.D=b[6];b=a[3];this.Jc=b[1];Yc(this,b[2]);null!=b[3]&&(this.Y.Gd=b[3]);if(null!=b[4])for(a=b[4],b=0;b<a.length;b++){c=a[b];a:{for(e=0;e<this.pa.length;e++)if(f=this.pa[e],f[0]==c[0]){e=f;break a}e=null}e&&(e[1]=c[1],e[2]=c[2])}return d};function We(a,b){switch(b){case "CS":return a.fa;case "DS":return a.Ga;case "SS":return a.W;case "ES":return a.xa;case "NULL":return a.fg;default:return[0,b,0,0,""]}}function Xe(a,b){null!=Hd(a,D(a),b)&&(a.K|=a.hf)}
function Cd(a,b){-1!==a.Ga.load(b)&&(a.K|=a.hf)}function wd(a,b,c){var d=B(a);-1!==a.W.load(b)&&(A(a,d),a.W.le?(a.xi=a.W.va+a.W.ta|0,a.Bi=a.W.va+a.W.jb|0):(a.xi=a.W.va+a.W.jb|0,a.Bi=a.W.va),c||(a.K|=4))}function Dd(a,b){-1!==a.xa.load(b)&&(a.K|=a.hf)}function D(a){return a.da-a.fa.va|0}function G(a,b){a.da=a.fa.va+(b&a.O)|0}function Ye(a,b){a.da=b;a.eg=(a.fa.va>>>0)+(a.fa.jb>>>0)+1;a.La=a.fa.ub;Qe(a)}
function Hd(a,b,c,d){var e=a.fa;e.Ze=b;e.D=d;b=e.load(c);return-1!==b?(Ye(a,b+(a.fa.Ze&a.fa.O)),a.fa.oe):null}function Ze(a,b){var c=(a.da>>>0)+b;c>a.eg&&(8088>=a.ca?(c=a.fa.va+(c-a.eg&a.O),2==b&&(a.K|=8)):w.call(a,13,0));return c|0}function $e(a){a.da=a.Vc}function B(a){return a.kc&~a.W.ta|a.Aa-a.W.va}function A(a,b){a.kc=b;a.Aa=a.W.va+(b&a.W.ta)|0}
function af(a,b,c,d,e,f){if(63!=(e&63)&&e!=a.resultType){var g=(e^a.resultType)&a.resultType;g&&(g&1&&bf(a),g&2&&cf(a),g&4&&df(a),g&8&&ef(a),g&16&&ff(a),g&32&&gf(a))}f?(a.ae=d,a.$d=b):(a.ae=b,a.$d=d);a.Ee=c;a.be=d;a.resultType=e}function hf(a,b,c,d,e){a.resultType=c|26;a.be=b;d?jf(a):kf(a);e?lf(a):mf(a);return b}function nf(a,b,c,d){c&d?jf(a):kf(a);(b^c)&d?lf(a):mf(a)}function of(a){return bf(a)?1:0}
function bf(a){a.resultType&1&&(a.N&=-2,(a.ae^(a.ae^a.Ee)&(a.Ee^a.$d))&a.resultType&-2147450752&&(a.N|=1),a.resultType&=-2);return a.N&1}function cf(a){a.resultType&2&&(a.N&=-5,38505>>((a.be^a.be>>4)&15)&1&&(a.N|=4),a.resultType&=-3);return a.N&4}function df(a){a.resultType&4&&(a.N&=-17,(a.$d^a.ae^a.Ee)&16&&(a.N|=16),a.resultType&=-5);return a.N&16}function ef(a){a.resultType&8&&(a.N&=-65,a.be&((a.resultType&-2147450752)-1|a.resultType&-2147450752)||(a.N|=64),a.resultType&=-9);return a.N&64}
function ff(a){a.resultType&16&&(a.N&=-129,a.be&a.resultType&-2147450752&&(a.N|=128),a.resultType&=-17);return a.N&128}function gf(a){a.resultType&32&&(a.N&=-2049,(a.ae^a.$d)&(a.Ee^a.$d)&a.resultType&-2147450752&&(a.N|=2048),a.resultType&=-33);return a.N&2048}function kf(a){a.resultType&=-2;a.N&=-2}function pf(a){a.resultType&=-5;a.N&=-17}function qf(a){a.resultType&=-9;a.N&=-65}function mf(a){a.resultType&=-33;a.N&=-2049}function jf(a){a.resultType&=-2;a.N|=1}
function rf(a){a.resultType&=-5;a.N|=16}function sf(a){a.resultType&=-9;a.N|=64}function lf(a){a.resultType&=-33;a.N|=2048}function Fd(a){return a.N&-2262|bf(a)|cf(a)|df(a)|ef(a)|ff(a)|gf(a)}function tf(a,b){b|=a.ra&1|65520;a.ra=a.ra&-65536|b&65535;a.ra&1&&yd(a,!0)}function Gd(a,b,c){a.ra&1||(b&=~a.Th);void 0===c&&(c=a.La);c?b=b&-12289|a.N&12288:a.Yb=(b&12288)>>12;c>a.Yb&&(b=b&-513|a.N&512);a.resultType=128;a.N=a.N&~(a.pd|2261)|b&(a.pd|2261)|a.Uh;a.N&256&&(a.Qa|=2,a.K|=4)}
function uf(a,b,c){var d=0;if(a.ra&1&&(a.La>a.Yb||a.N&131072)&&a.ka.Yh){var e=a.ka.Yh+(b>>>3);for(d=(1<<c)-1<<(b&7);d&&e<=a.ka.Ck&&!(a.Ia(e)&d);)d>>>=8,e++}return d?(w.call(a,13,0),!1):!0}
l.Bb=function(a,b,c){switch(b){case "EAX":case "EBX":case "ECX":case "EDX":case "ESP":case "EBP":case "ESI":case "EDI":case "EIP":case "AX":case "BX":case "CX":case "DX":case "SP":case "BP":case "SI":case "DI":case "IP":case "PC":case "CS":case "DS":case "SS":case "ES":case "FS":case "GS":case "CR0":case "CR2":case "CR3":case "PS":case "C":case "P":case "A":case "Z":case "S":case "T":case "I":case "D":case "V":this.ja[b]=c;this.ni++;a=!0;break;default:a=Nc.prototype.Bb.call(this,a,b,c)}return a};
function vf(a,b,c,d){var e=(d?a.Oc:a.X)[(b&a.Dc)>>>a.Fb];e&&e.type==Bc&&(e=Kc(a,b,!1,!0));if(e){var f=b&a.Eb;if(!c||1==c)return e.Cd(f,b);if(2==c)return f<a.Eb?e.af(f,b):e.Cd(f,b)|vf(a,b+1,1,d)<<8;if(4==c)return f<a.Eb-2?e.lh(f,b):f==a.Eb-1?e.af(f,b)|vf(a,b+2,2,d)<<16:e.Cd(f,b)|vf(a,b+1,1,d)<<8|vf(a,b+2,1,d)<<16|vf(a,b+3,1,d)<<24}return null}l.Ia=function(a){return this.X[(a&this.Dc)>>>this.Fb].nc(a&this.Eb,a)};
l.ga=function(a){var b=a&this.Eb,c=(a&this.Dc)>>>this.Fb;this.A-=this.B.Of;if(b<this.Eb)return this.X[c].$e(b,a);b=this.X[c].nc(b,a);this.K&4096||(b|=this.X[c+1&this.Ae].nc(0,a+1)<<8);return b};l.ea=function(a){var b=a&this.Eb,c=(a&this.Dc)>>>this.Fb;if(b<this.Eb-2)return this.X[c].Sd(b,a);for(var d=0,e=4,f=0,g=4-(b&3);e--;){d|=this.X[c].nc(b++,a++)<<f;if(this.K&4096)break;--g||(c=c+1&this.Ae,b=0);f+=8}return d};l.Cb=function(a,b){this.X[(a&this.Dc)>>>this.Fb].pc(a&this.Eb,b&255,a)};
l.Za=function(a,b){var c=a&this.Eb,d=(a&this.Dc)>>>this.Fb;this.A-=this.B.Of;c<this.Eb?this.X[d].gf(c,b&65535,a):(this.X[d++].pc(c,b&255,a),this.K&4096||this.X[d&this.Ae].pc(0,b>>8&255,a+1))};l.Ta=function(a,b){var c=a&this.Eb,d=(a&this.Dc)>>>this.Fb;this.A-=this.B.Of;if(c<this.Eb-2)this.X[d].ff(c,b,a);else for(var e=4,f=4-(c&3);e--;){this.X[d].pc(c++,b&255,a++);if(this.K&4096)break;--f||(d=d+1&this.Ae,c=0);b>>>=8}};function wf(a,b,c){a.Da=b;a.fb=c&a.ta;a.C=b.tb(a.fb,1);return a.K&1?0:a.Ia(a.C)}
function H(a,b){return wf(a,a.Ca,b)}function I(a,b){return wf(a,a.Gb,b)}function xf(a,b,c){a.Da=b;a.fb=c&a.ta;a.C=b.tb(a.fb,a.T);if(a.K&9){if(a.K&1)return 0;a=a.Ia(a.C)|a.Ia(b.tb(0,1))<<8}else a=a.mb(a.C);return a}function J(a,b){a.Da=a.Ca;a.fb=b&a.ta;a.C=a.Da.tb(a.fb,2);if(a.K&9){if(a.K&1)return 0;b=a.Ia(a.C)|a.Ia(a.Da.tb(0,1))<<8;a.K&=-9}else b=a.ga(a.C);return b}
function L(a,b){a.Da=a.Gb;a.fb=b&a.ta;a.C=a.Da.tb(a.fb,2);if(a.K&9){if(a.K&1)return 0;b=a.Ia(a.C)|a.Ia(a.Da.tb(0,1))<<8;a.K&=-9}else b=a.ga(a.C);return b}function M(a,b){a.Da=a.Ca;a.fb=b&a.ta;a.C=a.Da.tb(a.fb,4);return a.K&1?0:a.ea(a.C)}function N(a,b){a.Da=a.Gb;a.fb=b&a.ta;a.C=a.Da.tb(a.fb,4);return a.K&1?0:a.ea(a.C)}function yf(a,b){a.K&2||a.Cb(a.Da.Kb(a.fb,1),b)}function zf(a,b){if(!(a.K&2)){var c=a.Da.Kb(a.fb,2);a.K&8?(a.Cb(c,b),a.Cb(a.Da.Kb(0,1),b>>8),a.K&=-9):a.Za(c,b)}}
function Af(a,b){a.K&2||a.Ta(a.Da.Kb(a.fb,4),b)}function Ad(a,b,c){c=b.tb(c,a.T);a.K&8?(b=a.Ia(c)|a.Ia(b.tb(0,1))<<8,a.K&=-9):b=a.mb(c);return b}function Bf(a,b,c,d){c=b.Kb(c,a.T);a.K&8?(a.Cb(c,d),a.Cb(b.Kb(0,1),d>>8),a.K&=-9):a.Lb(c,d)}l.la=function(){var a=Ze(this,1),b=this.Ia(this.da);this.da=a;return b};function Cf(a){var b=Ze(a,2);if(a.K&8){var c=a.Ia(a.da)|a.Ia(b-1)<<8;a.K&=-9}else c=a.ga(a.da);a.da=b;return c}
function P(a){var b=Ze(a,a.Kc);if(a.K&8){var c=a.Ia(a.da)|a.Ia(b-1)<<8;a.K&=-9}else c=a.ti(a.da);a.da=b;return c}l.ya=function(){var a=Ze(this,this.T);if(this.K&8){var b=this.Ia(this.da)|this.Ia(a-1)<<8;this.K&=-9}else b=this.mb(this.da);this.da=a;return b};l.P=function(){var a=Ze(this,1),b=this.Ia(this.da)<<24>>24;this.da=a;return b};
function y(a){var b=a.mb(a.Aa);a.Aa=a.Aa+a.T|0;var c=(a.xi>>>0)-(a.Aa>>>0);0>c&&(8088>=a.ca?(A(a,a.Aa-a.W.va&a.W.ta),-1>c&&(b=b&255|a.Ia(a.Aa-1)<<8)):-1>c?w.call(a,12,0):(!a.W.le&&a.W.jb==a.W.ta||a.W.le&&!a.W.jb)&&A(a,a.Aa-a.W.va&a.W.ta));return b}function C(a,b){Bd(a,b,a.T)}
function Bd(a,b,c,d){d=void 0===d?c:d;var e=a.Aa-c|0,f=(e>>>0)-(a.Bi>>>0);if(0>f){if(8088>=a.ca&&-1==f){a.Cb(e+1,b>>8);A(a,e-a.W.va&a.W.ta);a.Cb(a.Aa,b);return}if(!a.W.le&&a.W.jb==a.W.ta||a.W.le&&!a.W.jb){if(f>-c){w.call(a,12,0);return}A(a,e-a.W.va&a.W.ta);e=a.Aa}else{w.call(a,12,0);return}}switch(d){case 1:a.Cb(e,b);break;case 2:a.Za(e,b);break;case 4:a.Ta(e,b)}a.Aa=e}
function Df(a,b,c){var d=4;1==b.length&&(d=1,c=c?1:0);if(80386>a.ca)2<b.length&&(b=b.substr(1,2));else if("PS"==b||2<b.length)d=8;a.ja[b]&&(void 0===c&&(xb(a,"Value for "+b+" is invalid"),Vc(a)),d=!a.Y.cb||a.Y.hi?ra(c,d):"--------".substr(0,d),a.ja[b].textContent!=d&&(a.ja[b].textContent=d))}
l.Tj=function(a){this.Y.complete=!0;this.Y.Hk=!1;this.Y.Sj=!1;this.Xc=this.A=a;this.V&&!a&&fd(this.V);a||(this.K|=4);do{if(a=this.K&3312)this.ba|=a;else if(this.Vc=this.da,this.Ca=this.Ga,this.Gb=this.W,this.C=this.D=-1,this.ba&3072&&Qe(this),this.ba=this.K&256,this.Qa){a:if(!(this.K&4)){a=80286>this.ca?0:1;for(var b=0;2>b;b++){switch(a){case 0:if(this.Qa&1&&this.N&512){var c=Ef(this.V);if(-1<=c&&(this.Qa&=-2,0<=c)){this.Qa&=-5;Ff.call(this,c);break a}}break;case 1:if(this.Qa&2){this.Qa&=-3;80386<=
this.ca&&(this.Db[6]|=16384);Ff.call(this,1);break a}}a=1-a}}if(this.Qa&4){this.K=this.A=0;break}}this.K=0;this.qa[this.la()].call(this)}while(0<this.A);return this.Y.complete?this.Xc-this.A:void 0===this.Y.complete?0:-1};var re=512;Va(function(){for(var a=mb(document,"pcx86","cpu"),b=0;b<a.length;b++){var c=a[b],d=nb(c);d=new Id(d);lb(d,c)}});
function Gf(a){u.call(this,"FPU",a);this.ca=a.model||8087;this.H=new Float64Array(8);this.aa=new Int32Array(this.H.buffer);this.X=new Float32Array(1);this.ia=new Int32Array(this.X.buffer);this.K=new Float64Array(1);this.G=new Int32Array(this.K.buffer);this.D=Array(3);this.L=this.M=-1;this.I=this.J=this.N=this.A=0;this.W=new Float64Array(1);this.ba=new Int32Array(this.W.buffer);this.ba[0]=0;this.ba[1]=268402688;Hf(this);this.fa=Gf.prototype.ph;this.da=Gf.prototype.Rj}ja(Gf,u);l=Gf.prototype;
l.jc=function(a,b,c){this.R=c;this.V=Eb(a,"ChipSet");zb(this)};l.Rb=function(a,b){if(!b)if(!a||!this.restore)Hf(this);else if(!this.restore(a))return!1;return!0};l.Qb=function(a){return a?this.save():!0};l.save=function(){var a=new Ve(this),b=[],c=0;b[c++]=this.F;b[c++]=this.Z|this.B<<11;b[c++]=If(this);for(var d=0;d<this.H.length;d++)b[c++]=this.H[d];a.set(0,b);return a.data()};
l.restore=function(a){a=a[0];var b=0;this.F=a[b++]&-57409;var c=a[b++];this.Z=c&-14337;this.B=(c&14336)>>11;Jf(this);Kf(this,a[b++]);for(c=0;c<this.H.length;c++)this.H[c]=a[b++];return!0};function Hf(a){a.C=0;a.F=959;a.Z=0;a.B=0;a.V&&(a=a.V,a.ca>=Lf&&Mf(a,Nf))}function Jf(a){a.Z&=-129;a.Z&~a.F&63&&(a.Z|=128);if(a.Z&128&&!(a.F&128))return a=a.V,a.ca>=Lf?Of(a,Nf):a.da&Pf||Ff.call(a.R,2),!0;a=a.V;a.ca>=Lf&&Mf(a,Nf);return!1}function Qf(a,b){80387<=a.ca||(b&=-65);a.Z|=b;return Jf(a)}
function Rf(a,b){return isFinite(b)?!0:!Qf(a,Infinity===b?8:16)}function Sf(a,b,c){var d=null;null!=b&&null!=c&&(d=b+c,Rf(a,d)||(d=null));return d}function Tf(a,b,c){var d=null;null!=b&&null!=c&&(d=b-c,Rf(a,d)||(d=null));return d}function Xf(a,b,c){var d=null;null!=b&&null!=c&&(d=b*c,Rf(a,d)||(d=null));return d}function Yf(a,b,c){var d=null;null==b||null==c||!c&&Qf(a,2)||(d=b/c,Rf(a,d)||(d=null));return d}
function Zf(a,b,c){if(null!=b&&null!=c){var d=0;isNaN(b)||isNaN(c)?d=17664:(b-=c,0>b?d=256:0===b&&(d=16384));a.Z=a.Z&-18177|d;return!0}return!1}function $f(a,b,c){if(null==b)return null;var d=a.F&3072;0==d?(d=Math.round(b),.5===d-b&&d%2&&d--):d=1024==d||3072==d&&0<b?Math.floor(b):Math.ceil(b);if(c){if(d>=c){if(Qf(a,1))return null;d=-c}else if(d<-c){if(Qf(a,1))return null;d=-c}a.G[0]=d|0;2147483648<c&&(a.G[1]=d/4294967296|0,!a.G[1]&&0>d&&(a.G[1]=-1))}return d}
function ag(a,b){var c=3;a.C&1<<b&&(a=a.H[b],c=0,0===a?c=1:isFinite(a)||(c=2));return c}function If(a){for(var b=0,c=a.H.length-1;0<=c;c--)b<<=2,b|=ag(a,c);return b}function Kf(a,b){a.C=0;for(var c=1;128>=c;c<<=1)3!=(b&3)&&(a.C|=c),b>>=2}function bg(a){var b=a.B+0&7;return a.C&1<<b?(a.X[0]=a.H[b],!0):Qf(a,1)?!1:(a.X[0]=a.W[0],!0)}function cg(a){var b=a.B+0&7;return a.C&1<<b?(a.K[0]=a.H[b],!0):Qf(a,1)?!1:(a.K[0]=a.W[0],!0)}
function Q(a,b){var c=null;b=a.B+b&7;a.C&1<<b?c=a.H[b]:Qf(a,1)||(c=a.W[0]);return c}function R(a,b,c){return null!=c&&(isNaN(c)?!Qf(a,1):1)?(b=a.B+b&7,a.H[b]=c,a.C|=1<<b,!0):!1}function dg(a,b,c){var d=null;b=a.B+b&7;if(c||a.C&1<<b||!Qf(a,1)){d=b<<1;c=a.aa[d];d=a.aa[d+1];b=d>>20&2047;var e=2147483648|(d&1048575)<<11|c>>>21;2047==b?b=32767:b?b+=15360:e&=2147483647;a.D[0]=c<<11;a.D[1]=e;a.D[2]=d>>16&32768|b;d=a.D}return d}function eg(a){return a.R.ga(a.R.C)<<16>>16}
function fg(a){return a.R.ea(a.R.C)}function gg(a){a.ia[0]=a.R.ea(a.R.C);return a.X[0]}function hg(a){a.G[0]=a.R.ea(a.R.C);a.G[1]=a.R.ea(a.R.C+4);return a.K[0]}function ig(a){a.D[0]=a.R.ea(a.R.C);a.D[1]=a.R.ea(a.R.C+4);a.D[2]=a.R.ga(a.R.C+8);return a.D}l.ph=function(){this.R.Ta(this.R.C,this.G[0])};l.Rj=function(){this.R.Ta(this.R.C,this.G[0]);this.R.Ta(this.R.C+4,this.G[1])};function jg(a){a.R.Ta(a.R.C,a.D[0]);a.R.Ta(a.R.C+4,a.D[1]);a.R.Za(a.R.C+8,a.D[2])}
function kg(a,b){var c=b[1],d=(b[2]&32768)>>4,e=b[2]&32767;b=b[0]>>>11|c<<21;c=c>>11&1048575;32767==e?e=2047:e&&(e+=-15360,0>=e&&(e=2047,b=c=0));a.G[0]=b;a.G[1]=c|(d|e)<<20;return a.K[0]}function lg(a,b){for(var c=0,d=1;b--;)c+=(a&15)*d,d*=10,a>>=4;return c}function mg(a,b){for(var c=0,d=0;b--;)c|=a%10<<d,a/=10,d+=4;return c}function ng(a){var b=null,c=1<<a.B;if(!(a.C&c)&&(a.Z&=-513,Qf(a,65)))return b;a.C&=~c;b=a.H[a.B];a.B=a.B+1&7;return b}
function og(a,b){if(null!=b){var c=a.B-1&7,d=1<<c;if(a.C&d&&(a.Z|=512,Qf(a,65)))return;if(isNaN(b)&&Qf(a,1)){if(Qf(a,1))return;b=NaN}a.H[a.B=c]=b;a.C|=d}}
function pg(a,b){var c=a.R;var d=c.mb(b);a.F=d&-57409;d=c.mb(b+=c.T);a.Z=d&-14337;a.B=(d&14336)>>11;Jf(a);Kf(a,c.mb(b+=c.T));!(c.ra&1)||c.N&131072?(a.I=c.mb(b+=c.T),d=c.mb(b+=c.T),a.N=d&2047,a.I|=(d&-4096)<<4,a.L=-1,a.J=c.mb(b+=c.T),a.J|=(c.mb(b+=c.T)&-4096)<<4,a.M=-1):(a.I=c.mb(b+=c.T),d=c.mb(b+=c.T),a.L=d&65535,a.N=d>>16&2047,a.J=c.mb(b+=c.T),a.M=c.mb(b+=c.T)&65535);return b+c.T}
function qg(a,b){var c=a.R;c.Lb(b,a.F);c.Lb(b+=c.T,a.Z|a.B<<11);c.Lb(b+=c.T,If(a));if(!(c.ra&1)||c.N&131072){var d=(a.L<<4)+a.I;c.Lb(b+=c.T,d);c.Lb(b+=c.T,d>>4&-4096|a.N);d=(a.M<<4)+a.J;c.Lb(b+=c.T,d);c.Lb(b+=c.T,d>>4&-4096)}else c.Lb(b+=c.T,a.I),c.Lb(b+=c.T,a.L|a.N<<16),c.Lb(b+=c.T,a.J),c.Lb(b+=c.T,a.M);return b+c.T}function rg(){this.Z&=-32896;Jf(this)}function sg(){Zf(this,Q(this,0),Q(this,this.A))}function tg(){Zf(this,Q(this,0),Q(this,this.A))&&ng(this)}function ug(){tg.call(this)}
function vg(){R(this,0,Yf(this,Q(this,0),gg(this)))}function wg(){this.C&=~(1<<this.B)}function xg(){Hf(this)}function yg(){this.F=this.R.ga(this.R.C)&-57409}function zg(){pg(this,this.R.C)}function Ag(){for(var a=this.R,b=pg(this,a.C),c=this.D,d=0;d<this.H.length;d++)c[0]=a.ea(b),c[1]=a.ea(b+=4),c[2]=a.ga(b+=4),c&&R(this,d,kg(this,c)),b+=2}function Bg(){for(var a=this.R,b=qg(this,a.C),c=0;c<this.H.length;c++){var d=dg(this,c,!0);a.Ta(b,d[0]);a.Ta(b+=4,d[1]);a.Za(b+=4,d[2]);b+=2}Hf(this)}
function Cg(){qg(this,this.R.C);this.F|=63}function Dg(){R(this,this.A,Q(this,0))&&ng(this)}function Eg(){Dg.call(this)}function Fg(){this.R.Za(this.R.C,this.F)}function Gg(){this.R.Za(this.R.C,this.Z|this.B<<11)}function Hg(){80287<=this.ca&&(this.R.F=this.R.F&-65536|this.Z|this.B<<11)}function Ig(){var a=Q(this,0);R(this,0,Q(this,this.A));R(this,this.A,a)}function Jg(){Ig.call(this)}
var Kg=Math.log(10)/Math.LN2,Lg=Math.LOG2E,Mg=Math.PI,Ng=Math.log(2)/Math.LN10,Og=Math.LN2,Pg=Math.pow(2,63),Qg={216:{0:function(){R(this,0,Sf(this,Q(this,0),gg(this)))},1:function(){R(this,0,Xf(this,Q(this,0),gg(this)))},2:function(){Zf(this,Q(this,0),gg(this))},3:function(){Zf(this,Q(this,0),gg(this))&&ng(this)},4:function(){R(this,0,Tf(this,Q(this,0),gg(this)))},5:function(){R(this,0,Tf(this,gg(this),Q(this,0)))},6:vg,7:vg,48:function(){R(this,0,Sf(this,Q(this,0),Q(this,this.A)))},49:function(){R(this,
0,Xf(this,Q(this,0),Q(this,this.A)))},50:sg,51:tg,52:function(){R(this,0,Tf(this,Q(this,0),Q(this,this.A)))},53:function(){R(this,0,Tf(this,Q(this,this.A),Q(this,0)))},54:function(){R(this,0,Yf(this,Q(this,0),Q(this,this.A)))},55:function(){R(this,0,Yf(this,Q(this,this.A),Q(this,0)))}},217:{0:function(){og(this,gg(this))},2:function(){bg(this)&&this.fa()},3:function(){bg(this)&&(this.fa(),ng(this))},4:zg,5:yg,6:Cg,7:Fg,48:function(){og(this,Q(this,this.A))},49:Ig,50:function(){},51:Eg,64:function(){R(this,
0,-Q(this,0))},65:function(){R(this,0,Math.abs(Q(this,0)))},68:function(){Zf(this,Q(this,0),0)},69:function(){this.Z&=-18177;this.aa[((this.B+0&7)<<1)+1]&-2147483648&&(this.Z|=512);if(3==ag(this,this.B))this.Z|=16640;else{var a=Q(this,0);this.Z=isNaN(a)?this.Z|256:0===a?this.Z|16384:Infinity===a||-Infinity===a?this.Z|1280:this.Z|1024}},80:function(){og(this,1)},81:function(){og(this,Kg)},82:function(){og(this,Lg)},83:function(){og(this,Mg)},84:function(){og(this,Ng)},85:function(){og(this,Og)},86:function(){og(this,
0)},96:function(){R(this,0,Math.pow(2,Q(this,0))-1)},97:function(){R(this,1,Q(this,1)*Math.log(Q(this,0))/Math.LN2)&&ng(this)},98:function(){R(this,0,Math.tan(Q(this,0)))&&og(this,1)},99:function(){R(this,1,Math.atan2(Q(this,1),Q(this,0)))&&ng(this)},100:function(){var a=Q(this,0);null!=a&&(this.K[0]=a,R(this,0,(this.G[1]>>20&2047)-1023),this.G[1]=(this.G[1]|1072693248)&-1073741825,og(this,this.K[0]))},102:function(){this.B=this.B-1&7;this.Z&=-513},103:function(){this.B=this.B+1&7;this.Z&=-513},112:function(){R(this,
0,Q(this,0)%Q(this,1))},113:function(){R(this,1,Q(this,1)*Math.log(Q(this,0)+1)/Math.LN2)&&ng(this)},114:function(){var a=Q(this,0),b=null;if(0<=a||!Qf(this,1))b=Math.sqrt(a),Rf(this,b)||(b=null);R(this,0,b)},116:function(){R(this,0,$f(this,Q(this,0),Pg))},117:function(){var a=Q(this,0),b=Q(this,1);null!=a&&null!=b&&R(this,0,a*Math.pow(2,0<b?Math.floor(b):Math.ceil(b)))}},218:{0:function(){R(this,0,Sf(this,Q(this,0),fg(this)))},1:function(){R(this,0,Xf(this,Q(this,0),fg(this)))},2:function(){Zf(this,
Q(this,0),fg(this))},3:function(){Zf(this,Q(this,0),fg(this))&&ng(this)},4:function(){R(this,0,Tf(this,Q(this,0),fg(this)))},5:function(){R(this,0,Tf(this,fg(this),Q(this,0)))},6:function(){R(this,0,Yf(this,Q(this,0),fg(this)))},7:function(){R(this,0,Yf(this,fg(this),Q(this,0)))}},219:{0:function(){og(this,fg(this))},2:function(){null!=$f(this,Q(this,0),2147483648)&&this.ph()},3:function(){null!=$f(this,Q(this,0),2147483648)&&(this.ph(),ng(this))},5:function(){og(this,kg(this,ig(this)))},7:function(){dg(this,
0)&&(jg(this),ng(this))},64:function(){8087==this.ca&&(this.F&=-129)},65:function(){8087==this.ca&&(this.F|=128)},66:rg,67:xg,68:function(){},115:function(){}},220:{0:function(){R(this,0,Sf(this,Q(this,0),hg(this)))},1:function(){R(this,0,Xf(this,Q(this,0),hg(this)))},2:function(){Zf(this,Q(this,0),hg(this))},3:function(){Zf(this,Q(this,0),hg(this))&&ng(this)},4:function(){R(this,0,Tf(this,Q(this,0),hg(this)))},5:function(){R(this,0,Tf(this,hg(this),Q(this,0)))},6:function(){R(this,0,Yf(this,Q(this,
0),hg(this)))},7:function(){R(this,0,Yf(this,hg(this),Q(this,0)))},48:function(){R(this,this.A,Sf(this,Q(this,this.A),Q(this,0)))},49:function(){R(this,this.A,Xf(this,Q(this,this.A),Q(this,0)))},50:function(){sg.call(this)},51:ug,52:function(){R(this,this.A,Tf(this,Q(this,0),Q(this,this.A)))},53:function(){R(this,this.A,Tf(this,Q(this,this.A),Q(this,0)))},54:function(){R(this,this.A,Yf(this,Q(this,0),Q(this,this.A)))},55:function(){R(this,this.A,Yf(this,Q(this,this.A),Q(this,0)))}},221:{0:function(){og(this,
hg(this))},2:function(){cg(this)&&this.da()},3:function(){cg(this)&&(this.da(),ng(this))},4:Ag,6:Bg,7:Gg,48:wg,49:Jg,50:function(){R(this,this.A,Q(this,0))},51:Dg},222:{0:function(){R(this,0,Sf(this,Q(this,0),eg(this)))},1:function(){R(this,0,Xf(this,Q(this,0),eg(this)))},2:function(){Zf(this,Q(this,0),eg(this))},3:function(){Zf(this,Q(this,0),eg(this))&&ng(this)},4:function(){R(this,0,Tf(this,Q(this,0),eg(this)))},5:function(){R(this,0,Tf(this,eg(this),Q(this,0)))},6:function(){R(this,0,Yf(this,
Q(this,0),eg(this)))},7:function(){R(this,0,Yf(this,eg(this),Q(this,0)))},48:function(){R(this,this.A,Sf(this,Q(this,this.A),Q(this,0)))&&ng(this)},49:function(){R(this,this.A,Xf(this,Q(this,this.A),Q(this,0)))&&ng(this)},50:ug,51:function(){Zf(this,Q(this,0),Q(this,1))&&null!=ng(this)&&ng(this)},52:function(){R(this,this.A,Tf(this,Q(this,0),Q(this,this.A)))&&ng(this)},53:function(){R(this,this.A,Tf(this,Q(this,this.A),Q(this,0)))&&ng(this)},54:function(){R(this,this.A,Yf(this,Q(this,0),Q(this,this.A)))&&
ng(this)},55:function(){R(this,this.A,Yf(this,Q(this,this.A),Q(this,0)))&&ng(this)}},223:{0:function(){og(this,eg(this))},2:function(){null!=$f(this,Q(this,0),32768)&&this.R.Za(this.R.C,this.G[0])},3:function(){null!=$f(this,Q(this,0),32768)&&(this.R.Za(this.R.C,this.G[0]),ng(this))},4:function(){var a=ig(this),b=lg(a[0],8)+1E8*lg(a[1],8)+1E16*lg(a[2],2);a[2]&32768&&(b=-b);og(this,b)},5:function(){var a=this.R.ea(this.R.C);a=4294967296*this.R.ea(this.R.C+4)+(a>>>0);og(this,a)},6:function(){var a=
$f(this,ng(this));null!=a&&(this.D[0]=mg(a,8),this.D[1]=mg(a/1E8,8),this.D[2]=mg(a/1E16,2),0>a&&(this.D[2]|=32768),jg(this))},7:function(){null!=$f(this,Q(this,0),Pg)&&(this.Rj(),ng(this))},48:function(){wg.call(this);ng(this)},49:Jg,50:Eg,51:Eg,52:Hg}},Rg=[rg,xg,yg,zg,Ag,Bg,Fg,Cg,Gg,Hg];Va(function(){for(var a=mb(document,"pcx86","fpu"),b=0;b<a.length;b++){var c=a[b],d=nb(c);d=new Gf(d);lb(d,c)}});
function Sg(a,b){var c=a+b+of(this)|0;af(this,a,b,c,191);this.A-=-1===this.D?-1===this.C?this.B.Zb:this.B.Ab:this.B.mc;return c&255}function Tg(a,b){var c=a+b+of(this)|0;af(this,a,b,c,this.xb|63);this.A-=-1===this.D?-1===this.C?this.B.Zb:this.B.Ab:this.B.mc;return c&this.O}function Ug(a,b){var c=a+b|0;af(this,a,b,c,191);this.A-=-1===this.D?-1===this.C?this.B.Zb:this.B.Ab:this.B.mc;return c&255}
function Vg(a,b){var c=a+b|0;af(this,a,b,c,this.xb|63);this.A-=-1===this.D?-1===this.C?this.B.Zb:this.B.Ab:this.B.mc;return c&this.O}function Wg(a,b){a&=b;hf(this,a,128);this.A-=-1===this.D?-1===this.C?this.B.Zb:this.B.Ab:this.B.mc;return a}function Xg(a,b){this.A-=-1===this.D?-1===this.C?this.B.Zb:this.B.Ab:this.B.mc;return hf(this,a&b,this.xb)&this.O}function Yg(a,b){this.A-=10+(-1===this.C?0:1);if((a&3)<(b&3))return a=a&-4|b&3,sf(this),a;qf(this);return a}
function Zg(a){if(-1===this.C)return w.call(this,6),a;var b=a,c=this.mb(this.C),d=this.mb(this.C+this.T);2==this.T&&(b=a<<16>>16,c=c<<16>>16,d=d<<16>>16);this.A-=this.B.Fi;(b<c||b>d)&&w.call(this,5);this.K|=2;return a}function $g(a,b){var c=0;if(b){qf(this);for(var d=1;d&this.O;){if(b&d){a=c;break}d<<=1;c++}}else sf(this);this.A-=11+3*c;return a}function ah(a,b){var c=0;if(b){qf(this);for(var d=2==this.T?15:31,e=1<<d;e;){if(b&e){a=d;break}e>>>=1;c++;d--}}else sf(this);this.A-=11+3*c;return a}
function bh(a,b){a&1<<(b&(2==this.T?15:31))?jf(this):kf(this);this.A-=-1===this.C?3:6;this.K|=2;return a}function ch(a,b){b=1<<(b&(2==this.T?15:31));a&b?jf(this):kf(this);this.A-=-1===this.C?6:8;return a^b}function dh(a,b){b=1<<(b&(2==this.T?15:31));a&b?jf(this):kf(this);this.A-=-1===this.C?6:8;return a&~b}function eh(a,b){b=1<<(b&(2==this.T?15:31));a&b?jf(this):kf(this);this.A-=-1===this.C?6:8;return a|b}
function fh(a,b){if(-1===this.C)return bh.call(this,a,b);var c=this.T<<3;if(b>=c||b<-c)a=xf(this,this.Da,this.fb+(b>>(2==this.T?4:5))*this.T);b=1<<(b&(2==this.T?15:31));a&b?jf(this):kf(this);this.A-=6;this.K|=2;return a}function gh(a,b){if(-1===this.C)return ch.call(this,a,b);var c=this.T<<3;if(b>=c||b<-c)a=xf(this,this.Da,this.fb+(b>>(2==this.T?4:5))*this.T);b=1<<(b&(2==this.T?15:31));a&b?jf(this):kf(this);this.A-=8;return a^b}
function hh(a,b){if(-1===this.C)return dh.call(this,a,b);var c=this.T<<3;if(b>=c||b<-c)a=xf(this,this.Da,this.fb+(b>>(2==this.T?4:5))*this.T);b=1<<(b&(2==this.T?15:31));a&b?jf(this):kf(this);this.A-=8;return a&~b}function ih(a,b){if(-1===this.C)return eh.call(this,a,b);var c=this.T<<3;if(b>=c||b<-c)a=xf(this,this.Da,this.fb+(b>>(2==this.T?4:5))*this.T);b=1<<(b&(2==this.T?15:31));a&b?jf(this):kf(this);this.A-=8;return a|b}
function jh(a,b){af(this,a,b,a-b|0,191,!0);this.A-=-1===this.D?-1===this.C?this.B.Zb:this.B.Dg:this.B.Ab;this.K|=2;return a}function kh(a,b){af(this,a,b,a-b|0,this.xb|63,!0);this.A-=-1===this.D?-1===this.C?this.B.Zb:this.B.Dg:this.B.Ab;this.K|=2;return a}
function lh(a){if(this.rd){var b=this.rd,c=this.mi,d=this.aa,e=d>>3&7;b.A=d&7;var f=(3>(d>>6&3)?0:48)+e;(217==c||219==c)&&52<=f&&(f=e<<4|b.A);if(e=Qg[c][f]){if(0>Rg.indexOf(e)){f=b.R;var g=f.Vc;8087==b.ca&&(f.ba&16&&g++,f.ba&32&&g++);b.L=f.fa.ha;b.I=g-f.fa.va;-1!==f.C&&(b.M=f.Da.ha,b.J=f.C-f.Da.va);b.N=(c&7)<<8|d}e.call(b)}}this.A-=-1===this.C?2:8;return a}function mh(a){if(80186>this.ca)return S.call(this,a);w.call(this,13,0);return a}function de(a){w.call(this,6);return a}
function S(a){ge.call(this);return a}function nh(a,b){a=oh.call(this,this.P(),b);80386>this.ca&&(this.A-=12);return a}function ph(a,b){a=this.ya();a=2==this.T?oh.call(this,a,b):qh.call(this,a,b);80386>this.ca&&(this.A-=12);return a}function rh(a,b){var c=!1;0>b&&(b=-b|0,c=!c);0>a&&(a=-a|0,c=!c);sh.call(this,a,b);c&&(this.Ba=~this.Ba+1|0,this.Sa=~this.Sa+(this.Ba?0:1)|0)}
function oh(a,b){a=(a<<16>>16)*(b<<16>>16)|0;32767<a||-32768>a?(jf(this),lf(this)):(kf(this),mf(this));this.A-=-1===this.C?9:12;return a&65535}function qh(a,b){rh.call(this,a,b);this.Sa!=this.Ba>>31?(jf(this),lf(this)):(kf(this),mf(this));this.A-=-1===this.C?9:12;return this.Ba}function th(a,b){this.A-=14+(-1===this.C?0:2);qf(this);-1!==this.gb.load(b)&&this.gb.ic>=this.La&&this.gb.ic>=(b&3)&&(sf(this),a=this.gb.nb&-256,2<this.T&&(a|=(this.gb.ext&-65281)<<16));return a}
function uh(a,b){if(-1===this.C)return ge.call(this),a;Cd(this,this.ga(this.C+this.T));this.A-=this.B.ue;return b}function vh(){this.A-=this.B.hj;return this.C}function wh(a,b){if(-1===this.C)return ge.call(this),a;Dd(this,this.ga(this.C+this.T));this.A-=this.B.ue;return b}function xh(a,b){if(-1===this.C)return ge.call(this),a;a=this.ga(this.C+this.T);this.sb.load(a);this.A-=this.B.ue;return b}
function yh(a,b){if(-1===this.C)return ge.call(this),a;a=this.ga(this.C+this.T);this.wb.load(a);this.A-=this.B.ue;return b}function zh(a,b){this.A-=14+(-1===this.C?0:2);if(b&65528&&-1!==this.gb.load(b)&&(7168==(this.gb.nb&7168)||this.gb.ic>=this.La)&&this.gb.ic>=(b&3))return sf(this),this.gb.jb;qf(this);return a}function Ah(a,b){if(-1===this.C)return ge.call(this),a;wd(this,this.ga(this.C+this.T));this.A-=this.B.ue;return b}
function Bh(a,b){this.A-=-1===this.D?-1===this.C?this.B.oj:this.B.nj:this.B.lj;return b}function Ch(a,b){switch(this.aa>>3&7){case 4:this.ua=this.F;break;case 5:this.ua=this.H;break;case 6:this.ua=this.L;break;case 7:this.ua=this.G}return b}function Dh(a,b){return b}
function Eh(a,b){a=this.aa>>3&7;switch(a){case 0:this.ua=this.F;break;case 2:this.ua=this.L;break;case 3:this.ua=this.G;break;default:if(80286==this.ca||80386==this.ca&&4!=a&&5!=a)w.call(this,6);else switch(a){case 1:this.ua=this.H;break;case 4:this.ua=B(this);break;case 5:this.ua=this.M;break;case 6:this.ua=this.J;break;case 7:this.ua=this.I}}return Bh.call(this,0,b)}
function Fh(a,b){switch(this.aa>>3&7){case 0:b=this.xa.ha;break;case 1:b=this.fa.ha;break;case 2:b=this.W.ha;break;case 3:b=this.Ga.ha;break;case 4:if(80386<=this.ca){b=this.sb.ha;break}w.call(this,6);b=a;break;case 5:if(80386<=this.ca){b=this.wb.ha;break}default:w.call(this,6),b=a}-1!==this.D&&zd(this,2);return Bh.call(this,0,b)}
function sh(a,b){if(a&-65536||b&-65536){var c=b&65535;b>>>=16;var d=a&65535;a>>>=16;var e=c*d;d=(e>>>16)+b*d;var f=d>>>16;d=(d&65535)+c*a;this.Ba=d<<16|e&65535;this.Sa=f+((d>>>16)+b*a)|0}else this.Ba=a*b|0,this.Sa=0}function Gh(a,b){this.A-=-1===this.D?-1===this.C?this.B.Zb:this.B.Ab:this.B.mc;return hf(this,a|b,128)}function Hh(a,b){this.A-=-1===this.D?-1===this.C?this.B.Zb:this.B.Ab:this.B.mc;return hf(this,a|b,this.xb)&this.O}
function Ih(a,b){var c=a-b-of(this)|0;af(this,a,b,c,191,!0);this.A-=-1===this.D?-1===this.C?this.B.Zb:this.B.Ab:this.B.mc;return c&255}function Jh(a,b){var c=a-b-of(this)|0;af(this,a,b,c,this.xb|63,!0);this.A-=-1===this.D?-1===this.C?this.B.Zb:this.B.Ab:this.B.mc;return c&this.O}function Kh(){return gf(this)?1:0}function Lh(){return bf(this)?1:0}function Mh(){return bf(this)?0:1}function Nh(){return ef(this)?1:0}function Oh(){return ef(this)?0:1}function Ph(){return bf(this)||ef(this)?1:0}
function Qh(){return bf(this)||ef(this)?0:1}function Rh(){return ff(this)?1:0}function Sh(){return ff(this)?0:1}function Th(){return cf(this)?1:0}function Uh(){return cf(this)?0:1}function Vh(){return!ff(this)!=!gf(this)?1:0}function Wh(){return!ff(this)!=!gf(this)?0:1}function Xh(){return ef(this)||!ff(this)!=!gf(this)?1:0}function Yh(){return ef(this)||!ff(this)!=!gf(this)?0:1}function Zh(a,b){return $h.call(this,a,b,this.la())}function di(a,b){return ei.call(this,a,b,this.la())}
function fi(a,b){return $h.call(this,a,b,this.H&31)}function gi(a,b){return ei.call(this,a,b,this.H&31)}function hi(a,b){return ii.call(this,a,b,this.la())}function ji(a,b){return ki.call(this,a,b,this.la())}function li(a,b){return ii.call(this,a,b,this.H&31)}function mi(a,b){return ki.call(this,a,b,this.H&31)}function ni(a,b){var c=a-b|0;af(this,a,b,c,191,!0);this.A-=-1===this.D?-1===this.C?this.B.Zb:this.B.Ab:this.B.mc;return c&255}
function oi(a,b){var c=a-b|0;af(this,a,b,c,this.xb|63,!0);this.A-=-1===this.D?-1===this.C?this.B.Zb:this.B.Ab:this.B.mc;return c&this.O}function pi(a,b){hf(this,a&b,128);this.A-=-1===this.D?-1===this.C?this.B.fh:this.B.Ve:this.B.Ve;this.K|=2;return a}function qi(a,b){hf(this,a&b,this.xb);this.A-=-1===this.D?-1===this.C?this.B.fh:this.B.Ve:this.B.Ve;this.K|=2;return a}function ri(a,b){var c=this.F&this.O,d=(1<<(this.H&31))-1;return a&~(d<<c)|(b&d)<<c}
function si(a,b){return b>>(this.F&this.O)&(1<<(this.H&31))-1&this.O}function ti(a,b){if(-1===this.C){switch(this.aa&7){case 0:this.F=this.F&-256|a;break;case 1:this.H=this.H&-256|a;break;case 2:this.L=this.L&-256|a;break;case 3:this.G=this.G&-256|a;break;case 4:this.F=this.F&-65281|a<<8;break;case 5:this.H=this.H&-65281|a<<8;break;case 6:this.L=this.L&-65281|a<<8;break;case 7:this.G=this.G&-65281|a<<8}this.A-=this.B.hh}else this.D=this.C,yf(this,a),this.A-=this.B.gh;return b}
function ui(a,b){if(-1===this.C){switch(this.aa&7){case 0:this.F=this.F&~this.O|a;break;case 1:this.H=this.H&~this.O|a;break;case 2:this.L=this.L&~this.O|a;break;case 3:this.G=this.G&~this.O|a;break;case 4:A(this,B(this)&~this.O|a);break;case 5:this.M=this.G&~this.O|a;break;case 6:this.J=this.J&~this.O|a;break;case 7:this.I=this.I&~this.O|a}this.A-=this.B.hh}else{this.D=this.C;if(!(this.K&2)){var c=this.Da.Kb(this.fb,this.T);this.K&8?(this.Cb(c,a),this.Cb(this.Da.Kb(0,1),a>>8),this.K&=-9):this.Lb(c,
a)}this.A-=this.B.gh}return b}function vi(a,b){a^=b;hf(this,a,128);this.A-=-1===this.D?-1===this.C?this.B.Zb:this.B.Ab:this.B.mc;return a}function wi(a,b){this.A-=-1===this.D?-1===this.C?this.B.Zb:this.B.Ab:this.B.mc;return hf(this,a^b,this.xb)&this.O}function xi(a,b){var c=a[1]-b[1];c||(c=a[0]-b[0]);return c}function yi(a){var b=a-1|0;af(this,a,1,b,this.xb|62,!0);this.A-=2;return a&~this.O|b&this.O}
function zi(a,b,c){c>>>=0;if(!c||c<=b>>>0)return!1;var d=0,e=1,f=this.pm;f[0]=c>>>0;f[1]=0;c=this.sm;c[0]=a>>>0;for(c[1]=b>>>0;0<xi(c,f);)b=a=f,a[0]+=b[0],a[1]+=b[1],4294967295<a[0]&&(a[0]>>>=0,a[1]++),e+=e;do 0<=xi(c,f)&&(a=c,b=f,a[0]-=b[0],a[1]-=b[1],0>a[0]&&(a[0]>>>=0,a[1]--),d+=e),a=f,a[0]>>>=1,a[1]&1&&(a[0]=(a[0]|2147483648)>>>0),a[1]>>>=1,e/=2;while(1<=e);this.Ba=d;this.Sa=c[0];return!0}function Ai(a){var b=a+1|0;af(this,a,1,b,this.xb|62);this.A-=2;return a&~this.O|b&this.O}
function Bi(a){this.K|=1;this.ec.call(this,a);this.A-=-1===this.C?4:5}function $h(a,b,c){if(c){16<c&&(a=b,c-=16);var d=a<<c-1;a=(d<<1|b>>>16-c)&65535;hf(this,a,32768,d&32768)}return a}function ei(a,b,c){if(c){var d=a<<c-1;a=d<<1|b>>>32-c;hf(this,a,-2147483648,d&-2147483648)}return a}function ii(a,b,c){if(c){16<c&&(a=b,c-=16);var d=a>>>c-1;a=(d>>>1|b<<16-c)&65535;hf(this,a,32768,d&1)}return a}function ki(a,b,c){if(c){var d=a>>>c-1;a=d>>>1|b<<32-c;hf(this,a,-2147483648,d&1)}return a}
function Ci(){this.A-=-1===this.C?2:this.B.Bj;return 1}function Di(){var a=this.H&255;this.A-=(-1===this.C?this.B.Yg:this.B.Xg)+(a<<this.B.Zg);return a}function Ei(){var a=this.la();this.A-=(-1===this.C?this.B.Yg:this.B.Xg)+(a<<this.B.Zg);return a}function Fi(){return null}function Gi(){return this.ua}function Hi(a,b){this.Uc=this.fa.ha;this.uc=this.W.ha;this.ma=this.Aa;var c=D(this),d=this.T;null!=Hd(this,a,b,!0)&&(Bd(this,this.Uc,d,2),Bd(this,c,d,d));this.Uc=this.uc=this.ma=-1}
function Ii(a,b,c){this.A-=this.B.$i+(c||0);c=Fd(this);var d=this.fa.ha,e=D(this);a=this.fa.yi(a);-1!==a&&(C(this,c),C(this,d),C(this,e),null!=b&&C(this,b),this.sc=-1,Ye(this,a))}function Ji(a){this.uc=this.W.ha;this.ma=this.Aa;var b=y(this),c=y(this);a&&A(this,B(this)+a);Hd(this,b,c,!1)&&(a&&A(this,B(this)+a),Ki.call(this,this.Ga),Ki.call(this,this.xa),80386<=this.ca&&(Ki.call(this,this.sb),Ki.call(this,this.wb)));2==a&&this.dg&&Se(this,this.da);this.uc=this.ma=-1}
function Li(){8086==this.ca?(this.sc=-1,Ii.call(this,0,null,2)):w.call(this,0,null,2)}function Ff(a,b){this.sc=a;void 0===b&&(b=11);Ii.call(this,a,null,b)}
function w(a,b,c,d){var e=!1;this.Y.complete?80186<=this.ca&&(e=!0,0>this.sc?(-1!=this.Uc&&(this.Uc!==this.fa.ha&&(this.fa.ub=this.Uc&3,Xe(this,this.Uc)),this.Uc=-1),this.Vc!==this.da&&Ye(this,this.Vc),-1!=this.uc&&(this.uc!==this.W.ha&&wd(this,this.uc),this.uc=-1),-1!==this.ma&&(this.ma!==this.Aa&&A(this,this.kc&~this.W.ta|this.ma-this.W.va),this.ma=-1)):8!=this.sc?(b=0,a=8):(b=0,a=-1,pe(this),e=d=!1)):Ye(this,this.Vc);var f=a,g=b,h=vf(this,this.da);204!=h||this.Rc||(d=!1);this.N&131072&&(6==f&&
99==h||13==f&&205==h)&&(d=!1);983040<=this.da&&1048575>=this.da&&(d=!1);if(d){var k=this.Y.cb;f="Fault "+ra(f,2,!0)+(null!=g?" ("+ra(g,4,!0)+")":"")+" on opcode "+ra(h,2,!0);d&&k&&(f+=" (blocked)");this.wa(f);Vc(this)}if(d&&e)throw-1;if(e)throw this.sc=a,Ii.call(this,a,b,c),this.Vc=this.da,this.K=1==a?this.K|8192:this.K|4096,a;}function se(a,b,c){this.td=a;a=0;b&&(a|=1);c&&(a|=2);3==this.La&&(a|=4);w.call(this,14,a)}
function Ki(a){var b=a.nb&7680;a.ha&65528&&(6144==b||7168==b||7168>b&&a.ic<this.La&&a.ic<(a.ha&3))&&a.load(0)}
function xe(a){switch((this.aa=this.la())&199){case 0:var b=H(this,this.G+this.J);this.A-=this.B.Bc;break;case 1:b=H(this,this.G+this.I);this.A-=this.B.Cc;break;case 2:b=I(this,this.M+this.J);this.A-=this.B.Cc;break;case 3:b=I(this,this.M+this.I);this.A-=this.B.Bc;break;case 4:b=H(this,this.J);this.A-=this.B.gc;break;case 5:b=H(this,this.I);this.A-=this.B.gc;break;case 6:b=H(this,P(this));this.A-=this.B.ad;break;case 7:b=H(this,this.G);this.A-=this.B.gc;break;case 64:b=H(this,this.G+this.J+this.P());
this.A-=this.B.Mb;break;case 65:b=H(this,this.G+this.I+this.P());this.A-=this.B.Nb;break;case 66:b=I(this,this.M+this.J+this.P());this.A-=this.B.Nb;break;case 67:b=I(this,this.M+this.I+this.P());this.A-=this.B.Mb;break;case 68:b=H(this,this.J+this.P());this.A-=this.B.Pa;break;case 69:b=H(this,this.I+this.P());this.A-=this.B.Pa;break;case 70:b=I(this,this.M+this.P());this.A-=this.B.Pa;break;case 71:b=H(this,this.G+this.P());this.A-=this.B.Pa;break;case 128:b=H(this,this.G+this.J+P(this));this.A-=this.B.Mb;
break;case 129:b=H(this,this.G+this.I+P(this));this.A-=this.B.Nb;break;case 130:b=I(this,this.M+this.J+P(this));this.A-=this.B.Nb;break;case 131:b=I(this,this.M+this.I+P(this));this.A-=this.B.Mb;break;case 132:b=H(this,this.J+P(this));this.A-=this.B.Pa;break;case 133:b=H(this,this.I+P(this));this.A-=this.B.Pa;break;case 134:b=I(this,this.M+P(this));this.A-=this.B.Pa;break;case 135:b=H(this,this.G+P(this));this.A-=this.B.Pa;break;case 192:b=this.F&255;break;case 193:b=this.H&255;break;case 194:b=this.L&
255;break;case 195:b=this.G&255;break;case 196:b=this.F>>8&255;break;case 197:b=this.H>>8&255;break;case 198:b=this.L>>8&255;break;case 199:b=this.G>>8&255;break;default:b=0}var c=this.aa>>3&7;switch(c){case 0:var d=this.F&255;break;case 1:d=this.H&255;break;case 2:d=this.L&255;break;case 3:d=this.G&255;break;case 4:d=this.F>>8&255;break;case 5:d=this.H>>8&255;break;case 6:d=this.L>>8&255;break;case 7:d=this.G>>8&255;break;default:d=0}a=a.call(this,d,b);switch(c){case 0:this.F=this.F&-256|a;break;
case 1:this.H=this.H&-256|a;break;case 2:this.L=this.L&-256|a;break;case 3:this.G=this.G&-256|a;break;case 4:this.F=this.F&-65281|a<<8;break;case 5:this.H=this.H&-65281|a<<8;break;case 6:this.L=this.L&-65281|a<<8;break;case 7:this.G=this.G&-65281|a<<8}}
function ye(a){var b=(this.aa=this.la())&199;switch(b){case 0:var c=H(this,this.G+this.J);this.D=this.C;break;case 1:c=H(this,this.G+this.I);this.D=this.C;break;case 2:c=I(this,this.M+this.J);this.D=this.C;break;case 3:c=I(this,this.M+this.I);this.D=this.C;break;case 4:c=H(this,this.J);this.D=this.C;break;case 5:c=H(this,this.I);this.D=this.C;break;case 6:c=H(this,P(this));this.D=this.C;break;case 7:c=H(this,this.G);this.D=this.C;break;case 64:c=H(this,this.G+this.J+this.P());this.D=this.C;break;
case 65:c=H(this,this.G+this.I+this.P());this.D=this.C;break;case 66:c=I(this,this.M+this.J+this.P());this.D=this.C;break;case 67:c=I(this,this.M+this.I+this.P());this.D=this.C;break;case 68:c=H(this,this.J+this.P());this.D=this.C;break;case 69:c=H(this,this.I+this.P());this.D=this.C;break;case 70:c=I(this,this.M+this.P());this.D=this.C;break;case 71:c=H(this,this.G+this.P());this.D=this.C;break;case 128:c=H(this,this.G+this.J+P(this));this.D=this.C;break;case 129:c=H(this,this.G+this.I+P(this));
this.D=this.C;break;case 130:c=I(this,this.M+this.J+P(this));this.D=this.C;break;case 131:c=I(this,this.M+this.I+P(this));this.D=this.C;break;case 132:c=H(this,this.J+P(this));this.D=this.C;break;case 133:c=H(this,this.I+P(this));this.D=this.C;break;case 134:c=I(this,this.M+P(this));this.D=this.C;break;case 135:c=H(this,this.G+P(this));this.D=this.C;break;case 192:c=this.F&255;break;case 193:c=this.H&255;break;case 194:c=this.L&255;break;case 195:c=this.G&255;break;case 196:c=this.F>>8&255;break;
case 197:c=this.H>>8&255;break;case 198:c=this.L>>8&255;break;case 199:c=this.G>>8&255;break;default:c=0}switch(this.aa>>3&7){case 0:var d=this.F&255;break;case 1:d=this.H&255;break;case 2:d=this.L&255;break;case 3:d=this.G&255;break;case 4:d=this.F>>8&255;break;case 5:d=this.H>>8&255;break;case 6:d=this.L>>8&255;break;case 7:d=this.G>>8&255;break;default:d=0}a=a.call(this,c,d);switch(b){case 0:case 3:yf(this,a);this.A-=this.B.Bc;break;case 1:case 2:yf(this,a);this.A-=this.B.Cc;break;case 4:case 5:case 7:yf(this,
a);this.A-=this.B.gc;break;case 6:yf(this,a);this.A-=this.B.ad;break;case 64:case 67:case 128:case 131:yf(this,a);this.A-=this.B.Mb;break;case 65:case 66:case 129:case 130:yf(this,a);this.A-=this.B.Nb;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:yf(this,a);this.A-=this.B.Pa;break;case 192:this.F=this.F&-256|a;break;case 193:this.H=this.H&-256|a;break;case 194:this.L=this.L&-256|a;break;case 195:this.G=this.G&-256|a;break;case 196:this.F=this.F&-65281|a<<8;break;case 197:this.H=
this.H&-65281|a<<8;break;case 198:this.L=this.L&-65281|a<<8;break;case 199:this.G=this.G&-65281|a<<8}}
function ze(a,b){var c=(this.aa=this.la())&199;switch(c){case 0:var d=H(this,this.G+this.J);this.D=this.C;break;case 1:d=H(this,this.G+this.I);this.D=this.C;break;case 2:d=I(this,this.M+this.J);this.D=this.C;break;case 3:d=I(this,this.M+this.I);this.D=this.C;break;case 4:d=H(this,this.J);this.D=this.C;break;case 5:d=H(this,this.I);this.D=this.C;break;case 6:d=H(this,P(this));this.D=this.C;break;case 7:d=H(this,this.G);this.D=this.C;break;case 64:d=H(this,this.G+this.J+this.P());this.D=this.C;break;
case 65:d=H(this,this.G+this.I+this.P());this.D=this.C;break;case 66:d=I(this,this.M+this.J+this.P());this.D=this.C;break;case 67:d=I(this,this.M+this.I+this.P());this.D=this.C;break;case 68:d=H(this,this.J+this.P());this.D=this.C;break;case 69:d=H(this,this.I+this.P());this.D=this.C;break;case 70:d=I(this,this.M+this.P());this.D=this.C;break;case 71:d=H(this,this.G+this.P());this.D=this.C;break;case 128:d=H(this,this.G+this.J+P(this));this.D=this.C;break;case 129:d=H(this,this.G+this.I+P(this));
this.D=this.C;break;case 130:d=I(this,this.M+this.J+P(this));this.D=this.C;break;case 131:d=I(this,this.M+this.I+P(this));this.D=this.C;break;case 132:d=H(this,this.J+P(this));this.D=this.C;break;case 133:d=H(this,this.I+P(this));this.D=this.C;break;case 134:d=I(this,this.M+P(this));this.D=this.C;break;case 135:d=H(this,this.G+P(this));this.D=this.C;break;case 192:d=this.F&255;break;case 193:d=this.H&255;break;case 194:d=this.L&255;break;case 195:d=this.G&255;break;case 196:d=this.F>>8&255;break;
case 197:d=this.H>>8&255;break;case 198:d=this.L>>8&255;break;case 199:d=this.G>>8&255;break;default:d=0}a=a[this.aa>>3&7].call(this,d,b.call(this));switch(c){case 0:case 3:yf(this,a);this.A-=this.B.Bc;break;case 1:case 2:yf(this,a);this.A-=this.B.Cc;break;case 4:case 5:case 7:yf(this,a);this.A-=this.B.gc;break;case 6:yf(this,a);this.A-=this.B.ad;break;case 64:case 67:case 128:case 131:yf(this,a);this.A-=this.B.Mb;break;case 65:case 66:case 129:case 130:yf(this,a);this.A-=this.B.Nb;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:yf(this,
a);this.A-=this.B.Pa;break;case 192:this.F=this.F&-256|a;break;case 193:this.H=this.H&-256|a;break;case 194:this.L=this.L&-256|a;break;case 195:this.G=this.G&-256|a;break;case 196:this.F=this.F&-65281|a<<8;break;case 197:this.H=this.H&-65281|a<<8;break;case 198:this.L=this.L&-65281|a<<8;break;case 199:this.G=this.G&-65281|a<<8}}
function Ae(a){switch((this.aa=this.la())&199){case 0:var b=J(this,this.G+this.J);this.A-=this.B.Bc;break;case 1:b=J(this,this.G+this.I);this.A-=this.B.Cc;break;case 2:b=L(this,this.M+this.J);this.A-=this.B.Cc;break;case 3:b=L(this,this.M+this.I);this.A-=this.B.Bc;break;case 4:b=J(this,this.J);this.A-=this.B.gc;break;case 5:b=J(this,this.I);this.A-=this.B.gc;break;case 6:b=J(this,P(this));this.A-=this.B.ad;break;case 7:b=J(this,this.G);this.A-=this.B.gc;break;case 64:b=J(this,this.G+this.J+this.P());
this.A-=this.B.Mb;break;case 65:b=J(this,this.G+this.I+this.P());this.A-=this.B.Nb;break;case 66:b=L(this,this.M+this.J+this.P());this.A-=this.B.Nb;break;case 67:b=L(this,this.M+this.I+this.P());this.A-=this.B.Mb;break;case 68:b=J(this,this.J+this.P());this.A-=this.B.Pa;break;case 69:b=J(this,this.I+this.P());this.A-=this.B.Pa;break;case 70:b=L(this,this.M+this.P());this.A-=this.B.Pa;break;case 71:b=J(this,this.G+this.P());this.A-=this.B.Pa;break;case 128:b=J(this,this.G+this.J+P(this));this.A-=this.B.Mb;
break;case 129:b=J(this,this.G+this.I+P(this));this.A-=this.B.Nb;break;case 130:b=L(this,this.M+this.J+P(this));this.A-=this.B.Nb;break;case 131:b=L(this,this.M+this.I+P(this));this.A-=this.B.Mb;break;case 132:b=J(this,this.J+P(this));this.A-=this.B.Pa;break;case 133:b=J(this,this.I+P(this));this.A-=this.B.Pa;break;case 134:b=L(this,this.M+P(this));this.A-=this.B.Pa;break;case 135:b=J(this,this.G+P(this));this.A-=this.B.Pa;break;case 192:b=this.F&65535;break;case 193:b=this.H&65535;break;case 194:b=
this.L&65535;break;case 195:b=this.G&65535;break;case 196:b=B(this)&65535;break;case 197:b=this.M&65535;break;case 198:b=this.J&65535;break;case 199:b=this.I&65535;break;default:b=0}var c=this.aa>>3&7;switch(c){case 0:var d=this.F&65535;break;case 1:d=this.H&65535;break;case 2:d=this.L&65535;break;case 3:d=this.G&65535;break;case 4:d=B(this)&65535;break;case 5:d=this.M&65535;break;case 6:d=this.J&65535;break;case 7:d=this.I&65535;break;default:d=0}a=a.call(this,d,b);switch(c){case 0:this.F=this.F&
-65536|a;break;case 1:this.H=this.H&-65536|a;break;case 2:this.L=this.L&-65536|a;break;case 3:this.G=this.G&-65536|a;break;case 4:A(this,B(this)&-65536|a);break;case 5:this.M=this.M&-65536|a;break;case 6:this.J=this.J&-65536|a;break;case 7:this.I=this.I&-65536|a}}
function Be(a){var b=(this.aa=this.la())&199;switch(b){case 0:var c=J(this,this.G+this.J);this.D=this.C;break;case 1:c=J(this,this.G+this.I);this.D=this.C;break;case 2:c=L(this,this.M+this.J);this.D=this.C;break;case 3:c=L(this,this.M+this.I);this.D=this.C;break;case 4:c=J(this,this.J);this.D=this.C;break;case 5:c=J(this,this.I);this.D=this.C;break;case 6:c=J(this,P(this));this.D=this.C;break;case 7:c=J(this,this.G);this.D=this.C;break;case 64:c=J(this,this.G+this.J+this.P());this.D=this.C;break;
case 65:c=J(this,this.G+this.I+this.P());this.D=this.C;break;case 66:c=L(this,this.M+this.J+this.P());this.D=this.C;break;case 67:c=L(this,this.M+this.I+this.P());this.D=this.C;break;case 68:c=J(this,this.J+this.P());this.D=this.C;break;case 69:c=J(this,this.I+this.P());this.D=this.C;break;case 70:c=L(this,this.M+this.P());this.D=this.C;break;case 71:c=J(this,this.G+this.P());this.D=this.C;break;case 128:c=J(this,this.G+this.J+P(this));this.D=this.C;break;case 129:c=J(this,this.G+this.I+P(this));
this.D=this.C;break;case 130:c=L(this,this.M+this.J+P(this));this.D=this.C;break;case 131:c=L(this,this.M+this.I+P(this));this.D=this.C;break;case 132:c=J(this,this.J+P(this));this.D=this.C;break;case 133:c=J(this,this.I+P(this));this.D=this.C;break;case 134:c=L(this,this.M+P(this));this.D=this.C;break;case 135:c=J(this,this.G+P(this));this.D=this.C;break;case 192:c=this.F&65535;break;case 193:c=this.H&65535;break;case 194:c=this.L&65535;break;case 195:c=this.G&65535;break;case 196:c=B(this)&65535;
break;case 197:c=this.M&65535;break;case 198:c=this.J&65535;break;case 199:c=this.I&65535;break;default:c=0}switch(this.aa>>3&7){case 0:var d=this.F&65535;break;case 1:d=this.H&65535;break;case 2:d=this.L&65535;break;case 3:d=this.G&65535;break;case 4:d=B(this)&65535;break;case 5:d=this.M&65535;break;case 6:d=this.J&65535;break;case 7:d=this.I&65535;break;default:d=0}a=a.call(this,c,d);switch(b){case 0:case 3:zf(this,a);this.A-=this.B.Bc;break;case 1:case 2:zf(this,a);this.A-=this.B.Cc;break;case 4:case 5:case 7:zf(this,
a);this.A-=this.B.gc;break;case 6:zf(this,a);this.A-=this.B.ad;break;case 64:case 67:case 128:case 131:zf(this,a);this.A-=this.B.Mb;break;case 65:case 66:case 129:case 130:zf(this,a);this.A-=this.B.Nb;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:zf(this,a);this.A-=this.B.Pa;break;case 192:this.F=this.F&-65536|a;break;case 193:this.H=this.H&-65536|a;break;case 194:this.L=this.L&-65536|a;break;case 195:this.G=this.G&-65536|a;break;case 196:A(this,B(this)&-65536|a);break;
case 197:this.M=this.M&-65536|a;break;case 198:this.J=this.J&-65536|a;break;case 199:this.I=this.I&-65536|a}}
function Ce(a,b){var c=(this.aa=this.la())&199;switch(c){case 0:var d=J(this,this.G+this.J);this.D=this.C;break;case 1:d=J(this,this.G+this.I);this.D=this.C;break;case 2:d=L(this,this.M+this.J);this.D=this.C;break;case 3:d=L(this,this.M+this.I);this.D=this.C;break;case 4:d=J(this,this.J);this.D=this.C;break;case 5:d=J(this,this.I);this.D=this.C;break;case 6:d=J(this,P(this));this.D=this.C;break;case 7:d=J(this,this.G);this.D=this.C;break;case 64:d=J(this,this.G+this.J+this.P());this.D=this.C;break;
case 65:d=J(this,this.G+this.I+this.P());this.D=this.C;break;case 66:d=L(this,this.M+this.J+this.P());this.D=this.C;break;case 67:d=L(this,this.M+this.I+this.P());this.D=this.C;break;case 68:d=J(this,this.J+this.P());this.D=this.C;break;case 69:d=J(this,this.I+this.P());this.D=this.C;break;case 70:d=L(this,this.M+this.P());this.D=this.C;break;case 71:d=J(this,this.G+this.P());this.D=this.C;break;case 128:d=J(this,this.G+this.J+P(this));this.D=this.C;break;case 129:d=J(this,this.G+this.I+P(this));
this.D=this.C;break;case 130:d=L(this,this.M+this.J+P(this));this.D=this.C;break;case 131:d=L(this,this.M+this.I+P(this));this.D=this.C;break;case 132:d=J(this,this.J+P(this));this.D=this.C;break;case 133:d=J(this,this.I+P(this));this.D=this.C;break;case 134:d=L(this,this.M+P(this));this.D=this.C;break;case 135:d=J(this,this.G+P(this));this.D=this.C;break;case 192:d=this.F&65535;break;case 193:d=this.H&65535;break;case 194:d=this.L&65535;break;case 195:d=this.G&65535;break;case 196:d=B(this)&65535;
break;case 197:d=this.M&65535;break;case 198:d=this.J&65535;break;case 199:d=this.I&65535;break;default:d=0}a=a[this.aa>>3&7].call(this,d,b.call(this));switch(c){case 0:case 3:zf(this,a);this.A-=this.B.Bc;break;case 1:case 2:zf(this,a);this.A-=this.B.Cc;break;case 4:case 5:case 7:zf(this,a);this.A-=this.B.gc;break;case 6:zf(this,a);this.A-=this.B.ad;break;case 64:case 67:case 128:case 131:zf(this,a);this.A-=this.B.Mb;break;case 65:case 66:case 129:case 130:zf(this,a);this.A-=this.B.Nb;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:zf(this,
a);this.A-=this.B.Pa;break;case 192:this.F=this.F&-65536|a;break;case 193:this.H=this.H&-65536|a;break;case 194:this.L=this.L&-65536|a;break;case 195:this.G=this.G&-65536|a;break;case 196:A(this,B(this)&-65536|a);break;case 197:this.M=this.M&-65536|a;break;case 198:this.J=this.J&-65536|a;break;case 199:this.I=this.I&-65536|a}}
function De(a){switch((this.aa=this.la())&199){case 0:var b=M(this,this.G+this.J);this.A-=this.B.Bc;break;case 1:b=M(this,this.G+this.I);this.A-=this.B.Cc;break;case 2:b=N(this,this.M+this.J);this.A-=this.B.Cc;break;case 3:b=N(this,this.M+this.I);this.A-=this.B.Bc;break;case 4:b=M(this,this.J);this.A-=this.B.gc;break;case 5:b=M(this,this.I);this.A-=this.B.gc;break;case 6:b=M(this,P(this));this.A-=this.B.ad;break;case 7:b=M(this,this.G);this.A-=this.B.gc;break;case 64:b=M(this,this.G+this.J+this.P());
this.A-=this.B.Mb;break;case 65:b=M(this,this.G+this.I+this.P());this.A-=this.B.Nb;break;case 66:b=N(this,this.M+this.J+this.P());this.A-=this.B.Nb;break;case 67:b=N(this,this.M+this.I+this.P());this.A-=this.B.Mb;break;case 68:b=M(this,this.J+this.P());this.A-=this.B.Pa;break;case 69:b=M(this,this.I+this.P());this.A-=this.B.Pa;break;case 70:b=N(this,this.M+this.P());this.A-=this.B.Pa;break;case 71:b=M(this,this.G+this.P());this.A-=this.B.Pa;break;case 128:b=M(this,this.G+this.J+P(this));this.A-=this.B.Mb;
break;case 129:b=M(this,this.G+this.I+P(this));this.A-=this.B.Nb;break;case 130:b=N(this,this.M+this.J+P(this));this.A-=this.B.Nb;break;case 131:b=N(this,this.M+this.I+P(this));this.A-=this.B.Mb;break;case 132:b=M(this,this.J+P(this));this.A-=this.B.Pa;break;case 133:b=M(this,this.I+P(this));this.A-=this.B.Pa;break;case 134:b=N(this,this.M+P(this));this.A-=this.B.Pa;break;case 135:b=M(this,this.G+P(this));this.A-=this.B.Pa;break;case 192:b=this.F;break;case 193:b=this.H;break;case 194:b=this.L;break;
case 195:b=this.G;break;case 196:b=B(this);break;case 197:b=this.M;break;case 198:b=this.J;break;case 199:b=this.I;break;default:b=0}var c=this.aa>>3&7;switch(c){case 0:var d=this.F;break;case 1:d=this.H;break;case 2:d=this.L;break;case 3:d=this.G;break;case 4:d=B(this);break;case 5:d=this.M;break;case 6:d=this.J;break;case 7:d=this.I;break;default:d=0}a=a.call(this,d,b);switch(c){case 0:this.F=a;break;case 1:this.H=a;break;case 2:this.L=a;break;case 3:this.G=a;break;case 4:A(this,a);break;case 5:this.M=
a;break;case 6:this.J=a;break;case 7:this.I=a}}
function Ee(a){var b=(this.aa=this.la())&199;switch(b){case 0:var c=M(this,this.G+this.J);this.D=this.C;break;case 1:c=M(this,this.G+this.I);this.D=this.C;break;case 2:c=N(this,this.M+this.J);this.D=this.C;break;case 3:c=N(this,this.M+this.I);this.D=this.C;break;case 4:c=M(this,this.J);this.D=this.C;break;case 5:c=M(this,this.I);this.D=this.C;break;case 6:c=M(this,P(this));this.D=this.C;break;case 7:c=M(this,this.G);this.D=this.C;break;case 64:c=M(this,this.G+this.J+this.P());this.D=this.C;break;
case 65:c=M(this,this.G+this.I+this.P());this.D=this.C;break;case 66:c=N(this,this.M+this.J+this.P());this.D=this.C;break;case 67:c=N(this,this.M+this.I+this.P());this.D=this.C;break;case 68:c=M(this,this.J+this.P());this.D=this.C;break;case 69:c=M(this,this.I+this.P());this.D=this.C;break;case 70:c=N(this,this.M+this.P());this.D=this.C;break;case 71:c=M(this,this.G+this.P());this.D=this.C;break;case 128:c=M(this,this.G+this.J+P(this));this.D=this.C;break;case 129:c=M(this,this.G+this.I+P(this));
this.D=this.C;break;case 130:c=N(this,this.M+this.J+P(this));this.D=this.C;break;case 131:c=N(this,this.M+this.I+P(this));this.D=this.C;break;case 132:c=M(this,this.J+P(this));this.D=this.C;break;case 133:c=M(this,this.I+P(this));this.D=this.C;break;case 134:c=N(this,this.M+P(this));this.D=this.C;break;case 135:c=M(this,this.G+P(this));this.D=this.C;break;case 192:c=this.F;break;case 193:c=this.H;break;case 194:c=this.L;break;case 195:c=this.G;break;case 196:c=B(this);break;case 197:c=this.M;break;
case 198:c=this.J;break;case 199:c=this.I;break;default:c=0}switch(this.aa>>3&7){case 0:var d=this.F;break;case 1:d=this.H;break;case 2:d=this.L;break;case 3:d=this.G;break;case 4:d=B(this);break;case 5:d=this.M;break;case 6:d=this.J;break;case 7:d=this.I;break;default:d=0}a=a.call(this,c,d);switch(b){case 0:case 3:Af(this,a);this.A-=this.B.Bc;break;case 1:case 2:Af(this,a);this.A-=this.B.Cc;break;case 4:case 5:case 7:Af(this,a);this.A-=this.B.gc;break;case 6:Af(this,a);this.A-=this.B.ad;break;case 64:case 67:case 128:case 131:Af(this,
a);this.A-=this.B.Mb;break;case 65:case 66:case 129:case 130:Af(this,a);this.A-=this.B.Nb;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Af(this,a);this.A-=this.B.Pa;break;case 192:this.F=a;break;case 193:this.H=a;break;case 194:this.L=a;break;case 195:this.G=a;break;case 196:A(this,a);break;case 197:this.M=a;break;case 198:this.J=a;break;case 199:this.I=a}}
function Fe(a,b){var c=(this.aa=this.la())&199;switch(c){case 0:var d=M(this,this.G+this.J);this.D=this.C;break;case 1:d=M(this,this.G+this.I);this.D=this.C;break;case 2:d=N(this,this.M+this.J);this.D=this.C;break;case 3:d=N(this,this.M+this.I);this.D=this.C;break;case 4:d=M(this,this.J);this.D=this.C;break;case 5:d=M(this,this.I);this.D=this.C;break;case 6:d=M(this,P(this));this.D=this.C;break;case 7:d=M(this,this.G);this.D=this.C;break;case 64:d=M(this,this.G+this.J+this.P());this.D=this.C;break;
case 65:d=M(this,this.G+this.I+this.P());this.D=this.C;break;case 66:d=N(this,this.M+this.J+this.P());this.D=this.C;break;case 67:d=N(this,this.M+this.I+this.P());this.D=this.C;break;case 68:d=M(this,this.J+this.P());this.D=this.C;break;case 69:d=M(this,this.I+this.P());this.D=this.C;break;case 70:d=N(this,this.M+this.P());this.D=this.C;break;case 71:d=M(this,this.G+this.P());this.D=this.C;break;case 128:d=M(this,this.G+this.J+P(this));this.D=this.C;break;case 129:d=M(this,this.G+this.I+P(this));
this.D=this.C;break;case 130:d=N(this,this.M+this.J+P(this));this.D=this.C;break;case 131:d=N(this,this.M+this.I+P(this));this.D=this.C;break;case 132:d=M(this,this.J+P(this));this.D=this.C;break;case 133:d=M(this,this.I+P(this));this.D=this.C;break;case 134:d=N(this,this.M+P(this));this.D=this.C;break;case 135:d=M(this,this.G+P(this));this.D=this.C;break;case 192:d=this.F;break;case 193:d=this.H;break;case 194:d=this.L;break;case 195:d=this.G;break;case 196:d=B(this);break;case 197:d=this.M;break;
case 198:d=this.J;break;case 199:d=this.I}a=a[this.aa>>3&7].call(this,d,b.call(this));switch(c){case 0:case 3:Af(this,a);this.A-=this.B.Bc;break;case 1:case 2:Af(this,a);this.A-=this.B.Cc;break;case 4:case 5:case 7:Af(this,a);this.A-=this.B.gc;break;case 6:Af(this,a);this.A-=this.B.ad;break;case 64:case 67:case 128:case 131:Af(this,a);this.A-=this.B.Mb;break;case 65:case 66:case 129:case 130:Af(this,a);this.A-=this.B.Nb;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Af(this,
a);this.A-=this.B.Pa;break;case 192:this.F=a;break;case 193:this.H=a;break;case 194:this.L=a;break;case 195:this.G=a;break;case 196:A(this,a);break;case 197:this.M=a;break;case 198:this.J=a;break;case 199:this.I=a}}
function Ge(a){switch((this.aa=this.la())&199){case 0:var b=H(this,this.F);break;case 1:b=H(this,this.H);break;case 2:b=H(this,this.L);break;case 3:b=H(this,this.G);break;case 4:b=H(this,Mi.call(this,0));break;case 5:b=H(this,P(this));break;case 6:b=H(this,this.J);break;case 7:b=H(this,this.I);break;case 64:b=H(this,this.F+this.P());break;case 65:b=H(this,this.H+this.P());break;case 66:b=H(this,this.L+this.P());break;case 67:b=H(this,this.G+this.P());break;case 68:b=H(this,Mi.call(this,1)+this.P());
break;case 69:b=I(this,this.M+this.P());break;case 70:b=H(this,this.J+this.P());break;case 71:b=H(this,this.I+this.P());break;case 128:b=H(this,this.F+P(this));break;case 129:b=H(this,this.H+P(this));break;case 130:b=H(this,this.L+P(this));break;case 131:b=H(this,this.G+P(this));break;case 132:b=H(this,Mi.call(this,2)+P(this));break;case 133:b=I(this,this.M+P(this));break;case 134:b=H(this,this.J+P(this));break;case 135:b=H(this,this.I+P(this));break;case 192:b=this.F&255;break;case 193:b=this.H&
255;break;case 194:b=this.L&255;break;case 195:b=this.G&255;break;case 196:b=this.F>>8&255;break;case 197:b=this.H>>8&255;break;case 198:b=this.L>>8&255;break;case 199:b=this.G>>8&255;break;default:b=0}var c=this.aa>>3&7;switch(c){case 0:var d=this.F&255;break;case 1:d=this.H&255;break;case 2:d=this.L&255;break;case 3:d=this.G&255;break;case 4:d=this.F>>8&255;break;case 5:d=this.H>>8&255;break;case 6:d=this.L>>8&255;break;case 7:d=this.G>>8&255;break;default:d=0}a=a.call(this,d,b);switch(c){case 0:this.F=
this.F&-256|a;break;case 1:this.H=this.H&-256|a;break;case 2:this.L=this.L&-256|a;break;case 3:this.G=this.G&-256|a;break;case 4:this.F=this.F&-65281|a<<8;break;case 5:this.H=this.H&-65281|a<<8;break;case 6:this.L=this.L&-65281|a<<8;break;case 7:this.G=this.G&-65281|a<<8}}
function He(a){var b=(this.aa=this.la())&199;switch(b){case 0:var c=H(this,this.F);this.D=this.C;break;case 1:c=H(this,this.H);this.D=this.C;break;case 2:c=H(this,this.L);this.D=this.C;break;case 3:c=H(this,this.G);this.D=this.C;break;case 4:c=H(this,Mi.call(this,0));this.D=this.C;break;case 5:c=H(this,P(this));this.D=this.C;break;case 6:c=H(this,this.J);this.D=this.C;break;case 7:c=H(this,this.I);this.D=this.C;break;case 64:c=H(this,this.F+this.P());this.D=this.C;break;case 65:c=H(this,this.H+this.P());
this.D=this.C;break;case 66:c=H(this,this.L+this.P());this.D=this.C;break;case 67:c=H(this,this.G+this.P());this.D=this.C;break;case 68:c=H(this,Mi.call(this,1)+this.P());this.D=this.C;break;case 69:c=I(this,this.M+this.P());this.D=this.C;break;case 70:c=H(this,this.J+this.P());this.D=this.C;break;case 71:c=H(this,this.I+this.P());this.D=this.C;break;case 128:c=H(this,this.F+P(this));this.D=this.C;break;case 129:c=H(this,this.H+P(this));this.D=this.C;break;case 130:c=H(this,this.L+P(this));this.D=
this.C;break;case 131:c=H(this,this.G+P(this));this.D=this.C;break;case 132:c=H(this,Mi.call(this,2)+P(this));this.D=this.C;break;case 133:c=I(this,this.M+P(this));this.D=this.C;break;case 134:c=H(this,this.J+P(this));this.D=this.C;break;case 135:c=H(this,this.I+P(this));this.D=this.C;break;case 192:c=this.F&255;break;case 193:c=this.H&255;break;case 194:c=this.L&255;break;case 195:c=this.G&255;break;case 196:c=this.F>>8&255;break;case 197:c=this.H>>8&255;break;case 198:c=this.L>>8&255;break;case 199:c=
this.G>>8&255;break;default:c=0}switch(this.aa>>3&7){case 0:var d=this.F&255;break;case 1:d=this.H&255;break;case 2:d=this.L&255;break;case 3:d=this.G&255;break;case 4:d=this.F>>8&255;break;case 5:d=this.H>>8&255;break;case 6:d=this.L>>8&255;break;case 7:d=this.G>>8&255;break;default:d=0}a=a.call(this,c,d);switch(b){case 192:this.F=this.F&-256|a;break;case 193:this.H=this.H&-256|a;break;case 194:this.L=this.L&-256|a;break;case 195:this.G=this.G&-256|a;break;case 196:this.F=this.F&-65281|a<<8;break;
case 197:this.H=this.H&-65281|a<<8;break;case 198:this.L=this.L&-65281|a<<8;break;case 199:this.G=this.G&-65281|a<<8;break;default:yf(this,a)}}
function Ie(a,b){var c=(this.aa=this.la())&199;switch(c){case 0:var d=H(this,this.F);this.D=this.C;break;case 1:d=H(this,this.H);this.D=this.C;break;case 2:d=H(this,this.L);this.D=this.C;break;case 3:d=H(this,this.G);this.D=this.C;break;case 4:d=H(this,Mi.call(this,0));this.D=this.C;break;case 5:d=H(this,P(this));this.D=this.C;break;case 6:d=H(this,this.J);this.D=this.C;break;case 7:d=H(this,this.I);this.D=this.C;break;case 64:d=H(this,this.F+this.P());this.D=this.C;break;case 65:d=H(this,this.H+
this.P());this.D=this.C;break;case 66:d=H(this,this.L+this.P());this.D=this.C;break;case 67:d=H(this,this.G+this.P());this.D=this.C;break;case 68:d=H(this,Mi.call(this,1)+this.P());this.D=this.C;break;case 69:d=I(this,this.M+this.P());this.D=this.C;break;case 70:d=H(this,this.J+this.P());this.D=this.C;break;case 71:d=H(this,this.I+this.P());this.D=this.C;break;case 128:d=H(this,this.F+P(this));this.D=this.C;break;case 129:d=H(this,this.H+P(this));this.D=this.C;break;case 130:d=H(this,this.L+P(this));
this.D=this.C;break;case 131:d=H(this,this.G+P(this));this.D=this.C;break;case 132:d=H(this,Mi.call(this,2)+P(this));this.D=this.C;break;case 133:d=I(this,this.M+P(this));this.D=this.C;break;case 134:d=H(this,this.J+P(this));this.D=this.C;break;case 135:d=H(this,this.I+P(this));this.D=this.C;break;case 192:d=this.F&255;break;case 193:d=this.H&255;break;case 194:d=this.L&255;break;case 195:d=this.G&255;break;case 196:d=this.F>>8&255;break;case 197:d=this.H>>8&255;break;case 198:d=this.L>>8&255;break;
case 199:d=this.G>>8&255;break;default:d=0}a=a[this.aa>>3&7].call(this,d,b.call(this));switch(c){case 192:this.F=this.F&-256|a;break;case 193:this.H=this.H&-256|a;break;case 194:this.L=this.L&-256|a;break;case 195:this.G=this.G&-256|a;break;case 196:this.F=this.F&-65281|a<<8;break;case 197:this.H=this.H&-65281|a<<8;break;case 198:this.L=this.L&-65281|a<<8;break;case 199:this.G=this.G&-65281|a<<8;break;default:yf(this,a)}}
function Je(a){switch((this.aa=this.la())&199){case 0:var b=J(this,this.F);break;case 1:b=J(this,this.H);break;case 2:b=J(this,this.L);break;case 3:b=J(this,this.G);break;case 4:b=J(this,Mi.call(this,0));break;case 5:b=J(this,P(this));break;case 6:b=J(this,this.J);break;case 7:b=J(this,this.I);break;case 64:b=J(this,this.F+this.P());break;case 65:b=J(this,this.H+this.P());break;case 66:b=J(this,this.L+this.P());break;case 67:b=J(this,this.G+this.P());break;case 68:b=J(this,Mi.call(this,1)+this.P());
break;case 69:b=L(this,this.M+this.P());break;case 70:b=J(this,this.J+this.P());break;case 71:b=J(this,this.I+this.P());break;case 128:b=J(this,this.F+P(this));break;case 129:b=J(this,this.H+P(this));break;case 130:b=J(this,this.L+P(this));break;case 131:b=J(this,this.G+P(this));break;case 132:b=J(this,Mi.call(this,2)+P(this));break;case 133:b=L(this,this.M+P(this));break;case 134:b=J(this,this.J+P(this));break;case 135:b=J(this,this.I+P(this));break;case 192:b=this.F&65535;break;case 193:b=this.H&
65535;break;case 194:b=this.L&65535;break;case 195:b=this.G&65535;break;case 196:b=B(this)&65535;break;case 197:b=this.M&65535;break;case 198:b=this.J&65535;break;case 199:b=this.I&65535;break;default:b=0}var c=this.aa>>3&7;switch(c){case 0:var d=this.F&65535;break;case 1:d=this.H&65535;break;case 2:d=this.L&65535;break;case 3:d=this.G&65535;break;case 4:d=B(this)&65535;break;case 5:d=this.M&65535;break;case 6:d=this.J&65535;break;case 7:d=this.I&65535;break;default:d=0}a=a.call(this,d,b);switch(c){case 0:this.F=
this.F&-65536|a;break;case 1:this.H=this.H&-65536|a;break;case 2:this.L=this.L&-65536|a;break;case 3:this.G=this.G&-65536|a;break;case 4:A(this,B(this)&-65536|a);break;case 5:this.M=this.M&-65536|a;break;case 6:this.J=this.J&-65536|a;break;case 7:this.I=this.I&-65536|a}}
function Ke(a){var b=(this.aa=this.la())&199;switch(b){case 0:var c=J(this,this.F);this.D=this.C;break;case 1:c=J(this,this.H);this.D=this.C;break;case 2:c=J(this,this.L);this.D=this.C;break;case 3:c=J(this,this.G);this.D=this.C;break;case 4:c=J(this,Mi.call(this,0));this.D=this.C;break;case 5:c=J(this,P(this));this.D=this.C;break;case 6:c=J(this,this.J);this.D=this.C;break;case 7:c=J(this,this.I);this.D=this.C;break;case 64:c=J(this,this.F+this.P());this.D=this.C;break;case 65:c=J(this,this.H+this.P());
this.D=this.C;break;case 66:c=J(this,this.L+this.P());this.D=this.C;break;case 67:c=J(this,this.G+this.P());this.D=this.C;break;case 68:c=J(this,Mi.call(this,1)+this.P());this.D=this.C;break;case 69:c=L(this,this.M+this.P());this.D=this.C;break;case 70:c=J(this,this.J+this.P());this.D=this.C;break;case 71:c=J(this,this.I+this.P());this.D=this.C;break;case 128:c=J(this,this.F+P(this));this.D=this.C;break;case 129:c=J(this,this.H+P(this));this.D=this.C;break;case 130:c=J(this,this.L+P(this));this.D=
this.C;break;case 131:c=J(this,this.G+P(this));this.D=this.C;break;case 132:c=J(this,Mi.call(this,2)+P(this));this.D=this.C;break;case 133:c=L(this,this.M+P(this));this.D=this.C;break;case 134:c=J(this,this.J+P(this));this.D=this.C;break;case 135:c=J(this,this.I+P(this));this.D=this.C;break;case 192:c=this.F&65535;break;case 193:c=this.H&65535;break;case 194:c=this.L&65535;break;case 195:c=this.G&65535;break;case 196:c=B(this)&65535;break;case 197:c=this.M&65535;break;case 198:c=this.J&65535;break;
case 199:c=this.I&65535;break;default:c=0}switch(this.aa>>3&7){case 0:var d=this.F&65535;break;case 1:d=this.H&65535;break;case 2:d=this.L&65535;break;case 3:d=this.G&65535;break;case 4:d=B(this)&65535;break;case 5:d=this.M&65535;break;case 6:d=this.J&65535;break;case 7:d=this.I&65535;break;default:d=0}a=a.call(this,c,d);switch(b){case 192:this.F=this.F&-65536|a;break;case 193:this.H=this.H&-65536|a;break;case 194:this.L=this.L&-65536|a;break;case 195:this.G=this.G&-65536|a;break;case 196:A(this,
B(this)&-65536|a);break;case 197:this.M=this.M&-65536|a;break;case 198:this.J=this.J&-65536|a;break;case 199:this.I=this.I&-65536|a;break;default:zf(this,a)}}
function Le(a,b){var c=(this.aa=this.la())&199;switch(c){case 0:var d=J(this,this.F);this.D=this.C;break;case 1:d=J(this,this.H);this.D=this.C;break;case 2:d=J(this,this.L);this.D=this.C;break;case 3:d=J(this,this.G);this.D=this.C;break;case 4:d=J(this,Mi.call(this,0));this.D=this.C;break;case 5:d=J(this,P(this));this.D=this.C;break;case 6:d=J(this,this.J);this.D=this.C;break;case 7:d=J(this,this.I);this.D=this.C;break;case 64:d=J(this,this.F+this.P());this.D=this.C;break;case 65:d=J(this,this.H+
this.P());this.D=this.C;break;case 66:d=J(this,this.L+this.P());this.D=this.C;break;case 67:d=J(this,this.G+this.P());this.D=this.C;break;case 68:d=J(this,Mi.call(this,1)+this.P());this.D=this.C;break;case 69:d=L(this,this.M+this.P());this.D=this.C;break;case 70:d=J(this,this.J+this.P());this.D=this.C;break;case 71:d=J(this,this.I+this.P());this.D=this.C;break;case 128:d=J(this,this.F+P(this));this.D=this.C;break;case 129:d=J(this,this.H+P(this));this.D=this.C;break;case 130:d=J(this,this.L+P(this));
this.D=this.C;break;case 131:d=J(this,this.G+P(this));this.D=this.C;break;case 132:d=J(this,Mi.call(this,2)+P(this));this.D=this.C;break;case 133:d=L(this,this.M+P(this));this.D=this.C;break;case 134:d=J(this,this.J+P(this));this.D=this.C;break;case 135:d=J(this,this.I+P(this));this.D=this.C;break;case 192:d=this.F&65535;break;case 193:d=this.H&65535;break;case 194:d=this.L&65535;break;case 195:d=this.G&65535;break;case 196:d=B(this)&65535;break;case 197:d=this.M&65535;break;case 198:d=this.J&65535;
break;case 199:d=this.I&65535;break;default:d=0}a=a[this.aa>>3&7].call(this,d,b.call(this));switch(c){case 192:this.F=this.F&-65536|a;break;case 193:this.H=this.H&-65536|a;break;case 194:this.L=this.L&-65536|a;break;case 195:this.G=this.G&-65536|a;break;case 196:A(this,B(this)&-65536|a);break;case 197:this.M=this.M&-65536|a;break;case 198:this.J=this.J&-65536|a;break;case 199:this.I=this.I&-65536|a;break;default:zf(this,a)}}
function Me(a){switch((this.aa=this.la())&199){case 0:var b=M(this,this.F);break;case 1:b=M(this,this.H);break;case 2:b=M(this,this.L);break;case 3:b=M(this,this.G);break;case 4:b=M(this,Mi.call(this,0));break;case 5:b=M(this,P(this));break;case 6:b=M(this,this.J);break;case 7:b=M(this,this.I);break;case 64:b=M(this,this.F+this.P());break;case 65:b=M(this,this.H+this.P());break;case 66:b=M(this,this.L+this.P());break;case 67:b=M(this,this.G+this.P());break;case 68:b=M(this,Mi.call(this,1)+this.P());
break;case 69:b=N(this,this.M+this.P());break;case 70:b=M(this,this.J+this.P());break;case 71:b=M(this,this.I+this.P());break;case 128:b=M(this,this.F+P(this));break;case 129:b=M(this,this.H+P(this));break;case 130:b=M(this,this.L+P(this));break;case 131:b=M(this,this.G+P(this));break;case 132:b=M(this,Mi.call(this,2)+P(this));break;case 133:b=N(this,this.M+P(this));break;case 134:b=M(this,this.J+P(this));break;case 135:b=M(this,this.I+P(this));break;case 192:b=this.F;break;case 193:b=this.H;break;
case 194:b=this.L;break;case 195:b=this.G;break;case 196:b=B(this);break;case 197:b=this.M;break;case 198:b=this.J;break;case 199:b=this.I;break;default:b=0}var c=this.aa>>3&7;switch(c){case 0:var d=this.F;break;case 1:d=this.H;break;case 2:d=this.L;break;case 3:d=this.G;break;case 4:d=B(this);break;case 5:d=this.M;break;case 6:d=this.J;break;case 7:d=this.I;break;default:d=0}a=a.call(this,d,b);switch(c){case 0:this.F=a;break;case 1:this.H=a;break;case 2:this.L=a;break;case 3:this.G=a;break;case 4:A(this,
a);break;case 5:this.M=a;break;case 6:this.J=a;break;case 7:this.I=a}}
function Ne(a){var b=(this.aa=this.la())&199;switch(b){case 0:var c=M(this,this.F);this.D=this.C;break;case 1:c=M(this,this.H);this.D=this.C;break;case 2:c=M(this,this.L);this.D=this.C;break;case 3:c=M(this,this.G);this.D=this.C;break;case 4:c=M(this,Mi.call(this,0));this.D=this.C;break;case 5:c=M(this,P(this));this.D=this.C;break;case 6:c=M(this,this.J);this.D=this.C;break;case 7:c=M(this,this.I);this.D=this.C;break;case 64:c=M(this,this.F+this.P());this.D=this.C;break;case 65:c=M(this,this.H+this.P());
this.D=this.C;break;case 66:c=M(this,this.L+this.P());this.D=this.C;break;case 67:c=M(this,this.G+this.P());this.D=this.C;break;case 68:c=M(this,Mi.call(this,1)+this.P());this.D=this.C;break;case 69:c=N(this,this.M+this.P());this.D=this.C;break;case 70:c=M(this,this.J+this.P());this.D=this.C;break;case 71:c=M(this,this.I+this.P());this.D=this.C;break;case 128:c=M(this,this.F+P(this));this.D=this.C;break;case 129:c=M(this,this.H+P(this));this.D=this.C;break;case 130:c=M(this,this.L+P(this));this.D=
this.C;break;case 131:c=M(this,this.G+P(this));this.D=this.C;break;case 132:c=M(this,Mi.call(this,2)+P(this));this.D=this.C;break;case 133:c=N(this,this.M+P(this));this.D=this.C;break;case 134:c=M(this,this.J+P(this));this.D=this.C;break;case 135:c=M(this,this.I+P(this));this.D=this.C;break;case 192:c=this.F;break;case 193:c=this.H;break;case 194:c=this.L;break;case 195:c=this.G;break;case 196:c=B(this);break;case 197:c=this.M;break;case 198:c=this.J;break;case 199:c=this.I;break;default:c=0}switch(this.aa>>
3&7){case 0:var d=this.F;break;case 1:d=this.H;break;case 2:d=this.L;break;case 3:d=this.G;break;case 4:d=B(this);break;case 5:d=this.M;break;case 6:d=this.J;break;case 7:d=this.I;break;default:d=0}a=a.call(this,c,d);switch(b){case 192:this.F=a;break;case 193:this.H=a;break;case 194:this.L=a;break;case 195:this.G=a;break;case 196:A(this,a);break;case 197:this.M=a;break;case 198:this.J=a;break;case 199:this.I=a;break;default:Af(this,a)}}
function Oe(a,b){var c=(this.aa=this.la())&199;switch(c){case 0:var d=M(this,this.F);this.D=this.C;break;case 1:d=M(this,this.H);this.D=this.C;break;case 2:d=M(this,this.L);this.D=this.C;break;case 3:d=M(this,this.G);this.D=this.C;break;case 4:d=M(this,Mi.call(this,0));this.D=this.C;break;case 5:d=M(this,P(this));this.D=this.C;break;case 6:d=M(this,this.J);this.D=this.C;break;case 7:d=M(this,this.I);this.D=this.C;break;case 64:d=M(this,this.F+this.P());this.D=this.C;break;case 65:d=M(this,this.H+
this.P());this.D=this.C;break;case 66:d=M(this,this.L+this.P());this.D=this.C;break;case 67:d=M(this,this.G+this.P());this.D=this.C;break;case 68:d=M(this,Mi.call(this,1)+this.P());this.D=this.C;break;case 69:d=N(this,this.M+this.P());this.D=this.C;break;case 70:d=M(this,this.J+this.P());this.D=this.C;break;case 71:d=M(this,this.I+this.P());this.D=this.C;break;case 128:d=M(this,this.F+P(this));this.D=this.C;break;case 129:d=M(this,this.H+P(this));this.D=this.C;break;case 130:d=M(this,this.L+P(this));
this.D=this.C;break;case 131:d=M(this,this.G+P(this));this.D=this.C;break;case 132:d=M(this,Mi.call(this,2)+P(this));this.D=this.C;break;case 133:d=N(this,this.M+P(this));this.D=this.C;break;case 134:d=M(this,this.J+P(this));this.D=this.C;break;case 135:d=M(this,this.I+P(this));this.D=this.C;break;case 192:d=this.F;break;case 193:d=this.H;break;case 194:d=this.L;break;case 195:d=this.G;break;case 196:d=B(this);break;case 197:d=this.M;break;case 198:d=this.J;break;case 199:d=this.I;break;default:d=
0}a=a[this.aa>>3&7].call(this,d,b.call(this));switch(c){case 192:this.F=a;break;case 193:this.H=a;break;case 194:this.L=a;break;case 195:this.G=a;break;case 196:A(this,a);break;case 197:this.M=a;break;case 198:this.J=a;break;case 199:this.I=a;break;default:Af(this,a)}}
function Mi(a){var b=this.la(),c=b>>6;switch(b>>3&7){case 0:var d=this.F;break;case 1:d=this.H;break;case 2:d=this.L;break;case 3:d=this.G;break;case 4:d=0;break;case 5:d=this.M;break;case 6:d=this.J;break;case 7:d=this.I}switch(b&7){case 0:var e=this.F;break;case 1:e=this.H;break;case 2:e=this.L;break;case 3:e=this.G;break;case 4:e=B(this);this.Ca=this.Gb;break;case 5:a?(e=this.M,this.Ca=this.Gb):e=P(this);break;case 6:e=this.J;break;case 7:e=this.I}return(d<<c)+e|0}
function ee(){this.dd[this.la()].call(this)}function he(){C(this,B(this)&this.O);this.A-=this.B.tc}function Od(){this.ma=this.Aa;var a=B(this)&this.O;C(this,this.F&this.O);C(this,this.H&this.O);C(this,this.L&this.O);C(this,this.G&this.O);C(this,a);C(this,this.M&this.O);C(this,this.J&this.O);C(this,this.I&this.O);this.A-=this.B.vj;this.ma=-1}
function Pd(){this.ma=this.Aa;this.I=this.I&~this.O|y(this);this.J=this.J&~this.O|y(this);this.M=this.M&~this.O|y(this);A(this,B(this)+this.T);this.G=this.G&~this.O|y(this);this.L=this.L&~this.O|y(this);this.H=this.H&~this.O|y(this);this.F=this.F&~this.O|y(this);this.A-=this.B.tj;this.ma=-1}function Qd(){this.ia.call(this,Zg)}function ie(){!(this.ra&1)||this.N&131072?w.call(this,6):this.za.call(this,Yg)}function je(){this.K|=20;this.Ca=this.Gb=this.sb;this.A-=this.B.Ic}
function ke(){this.K|=20;this.Ca=this.Gb=this.wb;this.A-=this.B.Ic}function le(){this.K|=1024;this.ba&1024||(this.T^=6,this.O^=-65536,Pe(this));this.A-=this.B.Ic}function me(){this.K|=2048;this.ba&2048||(this.Kc^=6,this.ta^=-65536,we(this));this.A-=this.B.Ic}function Rd(){C(this,this.ya());this.A-=this.B.tc}function Sd(){this.ia.call(this,ph)}function Td(){C(this,this.P());this.A-=this.B.tc}function Ud(){this.ia.call(this,nh)}
function Vd(){var a=1,b=0,c=this.ta,d=5;this.ba&192&&(a=this.H&c,b=1,this.ba&256&&(d=4));if(a--){var e=this.L&65535;uf(this,e,1)&&(e=pc(this.oa,e,1,this.da-b-1),this.Cb(this.xa.Kb(this.I&c,1),e),this.I=this.I&~c|this.I+(this.N&1024?-1:1)&c,this.H=this.H&~c|this.H-b&c,this.A-=d,a&&($e(this),this.K|=256))}}
function Wd(){var a=1,b=0,c=this.ta,d=5;this.ba&192&&(a=this.H&c,b=1,this.ba&256&&(d=4));if(a--){var e=this.L&65535;uf(this,e,this.T)&&(e=pc(this.oa,e,this.T,this.da-b-1),Bf(this,this.xa,this.I&c,e),this.I=this.I&~c|this.I+(this.N&1024?-this.T:this.T)&c,this.H=this.H&~c|this.H-b&c,this.A-=d,a&&($e(this),this.K|=256))}}
function Xd(){var a=1,b=0,c=this.ta,d=5;this.ba&192&&(a=this.H&c,b=1,this.ba&256&&(d=4));if(a--){var e=this.L&65535;if(uf(this,e,1)){var f=this.Ia(this.Ga.tb(this.J&c,1));rc(this.oa,e,1,f,this.da-b-1);this.J=this.J&~c|this.J+(this.N&1024?-1:1)&c;this.H=this.H&~c|this.H-b&c;this.A-=d;a&&($e(this),this.K|=256)}}}
function Yd(){var a=1,b=0,c=this.ta,d=5;this.ba&192&&(a=this.H&c,b=1,this.ba&256&&(d=4));if(a--){var e=Ad(this,this.Ga,this.J&c),f=this.L&65535;uf(this,f,this.T)&&(rc(this.oa,f,this.T,e,this.da-b-1),this.J=this.J&~c|this.J+(this.N&1024?-this.T:this.T)&c,this.H=this.H&~c|this.H-b&c,this.A-=d,a&&($e(this),this.K|=256))}}function Ni(){var a=this.P();gf(this)?(G(this,D(this)+a),this.A-=this.B.Ja):this.A-=this.B.Ka}
function Oi(){var a=this.P();gf(this)?this.A-=this.B.Ka:(G(this,D(this)+a),this.A-=this.B.Ja)}function Pi(){var a=this.P();bf(this)?(G(this,D(this)+a),this.A-=this.B.Ja):this.A-=this.B.Ka}function Qi(){var a=this.P();bf(this)?this.A-=this.B.Ka:(G(this,D(this)+a),this.A-=this.B.Ja)}function Ri(){var a=this.P();ef(this)?(G(this,D(this)+a),this.A-=this.B.Ja):this.A-=this.B.Ka}function Si(){var a=this.P();ef(this)?this.A-=this.B.Ka:(G(this,D(this)+a),this.A-=this.B.Ja)}
function Ti(){var a=this.P();bf(this)||ef(this)?(G(this,D(this)+a),this.A-=this.B.Ja):this.A-=this.B.Ka}function Ui(){var a=this.P();bf(this)||ef(this)?this.A-=this.B.Ka:(G(this,D(this)+a),this.A-=this.B.Ja)}function Vi(){var a=this.P();ff(this)?(G(this,D(this)+a),this.A-=this.B.Ja):this.A-=this.B.Ka}function Wi(){var a=this.P();ff(this)?this.A-=this.B.Ka:(G(this,D(this)+a),this.A-=this.B.Ja)}function Xi(){var a=this.P();cf(this)?(G(this,D(this)+a),this.A-=this.B.Ja):this.A-=this.B.Ka}
function Yi(){var a=this.P();cf(this)?this.A-=this.B.Ka:(G(this,D(this)+a),this.A-=this.B.Ja)}function Zi(){var a=this.P();!ff(this)!=!gf(this)?(G(this,D(this)+a),this.A-=this.B.Ja):this.A-=this.B.Ka}function $i(){var a=this.P();!ff(this)==!gf(this)?(G(this,D(this)+a),this.A-=this.B.Ja):this.A-=this.B.Ka}function aj(){var a=this.P();ef(this)||!ff(this)!=!gf(this)?(G(this,D(this)+a),this.A-=this.B.Ja):this.A-=this.B.Ka}
function bj(){var a=this.P();ef(this)||!ff(this)!=!gf(this)?this.A-=this.B.Ka:(G(this,D(this)+a),this.A-=this.B.Ja)}function cj(){this.Sc.call(this,dj,this.la);this.A-=-1===this.D?1:this.B.Nf}function ej(){this.K|=1;this.ec.call(this,Bh)}function fj(){this.K|=1;this.za.call(this,Bh)}function gj(){this.Xb.call(this,Bh)}function hj(){this.ia.call(this,Bh)}function Zd(){this.Sc.call(this,ij,Ei)}function $d(){this.eb.call(this,2==this.T?jj:kj,Ei)}
function lj(){var a=Cf(this),b=y(this);G(this,b);a&&A(this,B(this)+a);this.A-=this.B.Aj}function mj(){var a=y(this);G(this,a);this.A-=this.B.xj}function ae(){this.ma=this.Aa;var a=Cf(this),b=this.la()&31;this.A-=11;C(this,this.M);var c=B(this)&this.O;if(0<b){for(this.A-=(b<<2)+(1<b?1:0);--b;)this.M=this.M&~this.O|this.M-this.T&this.O,C(this,Ad(this,this.W,this.M&this.O));C(this,c)}this.M=this.M&~this.O|c;A(this,B(this)&~this.W.ta|B(this)-a&this.W.ta);this.ma=-1}
function be(){this.ma=this.Aa;A(this,B(this)&~this.W.ta|this.M&this.W.ta);this.M=this.M&~this.O|y(this)&this.O;this.A-=5;this.ma=-1}function nj(){Ji.call(this,Cf(this));this.A-=this.B.zj}function oj(){Ji.call(this,0);this.A-=this.B.yj}function pj(a){this.mi=a;this.ia.call(this,lh)}function qj(){this.K|=36;this.A-=this.B.Ic}function ce(){ge.call(this)}function Nd(){w.call(this,6)}
function ge(){G(this,this.Vc-this.fa.va);xb(this,"Undefined opcode "+ra(this.Ia(this.da),2,!0)+" at "+ra(this.da,8,!0));Vc(this)}
var Jd=[function(){this.ec.call(this,Ug)},function(){this.za.call(this,Vg)},function(){this.Xb.call(this,Ug)},function(){this.ia.call(this,Vg)},function(){this.F=this.F&-256|Ug.call(this,this.F&255,this.la());this.A--},function(){this.F=this.F&~this.O|Vg.call(this,this.F&this.O,this.ya());this.A--},function(){Bd(this,this.xa.ha,this.T,2);this.A-=this.B.Rd},function(){this.ma=this.Aa;Dd(this,y(this));this.A-=this.B.$b;this.ma=-1},function(){this.ec.call(this,Gh)},function(){this.za.call(this,Hh)},
function(){this.Xb.call(this,Gh)},function(){this.ia.call(this,Hh)},function(){this.F=this.F&-256|Gh.call(this,this.F&255,this.la());this.A--},function(){this.F=this.F&~this.O|Hh.call(this,this.F&this.O,this.ya());this.A--},function(){Bd(this,this.fa.ha,this.T,2);this.A-=this.B.Rd},function(){Xe(this,y(this));this.A-=this.B.$b},function(){this.ec.call(this,Sg)},function(){this.za.call(this,Tg)},function(){this.Xb.call(this,Sg)},function(){this.ia.call(this,Tg)},function(){this.F=this.F&-256|Sg.call(this,
this.F&255,this.la());this.A--},function(){this.F=this.F&~this.O|Tg.call(this,this.F&this.O,this.ya());this.A--},function(){Bd(this,this.W.ha,this.T,2);this.A-=this.B.Rd},function(){this.ma=this.Aa;wd(this,y(this));this.A-=this.B.$b;this.ma=-1},function(){this.ec.call(this,Ih)},function(){this.za.call(this,Jh)},function(){this.Xb.call(this,Ih)},function(){this.ia.call(this,Jh)},function(){this.F=this.F&-256|Ih.call(this,this.F&255,this.la());this.A--},function(){this.F=this.F&~this.O|Jh.call(this,
this.F&this.O,this.ya());this.A--},function(){Bd(this,this.Ga.ha,this.T,2);this.A-=this.B.Rd},function(){this.ma=this.Aa;Cd(this,y(this));this.A-=this.B.$b;this.ma=-1},function(){this.ec.call(this,Wg)},function(){this.za.call(this,Xg)},function(){this.Xb.call(this,Wg)},function(){this.ia.call(this,Xg)},function(){this.F=this.F&-256|Wg.call(this,this.F&255,this.la());this.A--},function(){this.F=this.F&~this.O|Xg.call(this,this.F&this.O,this.ya());this.A--},function(){this.K|=20;this.Ca=this.Gb=this.xa;
this.A-=this.B.Ic},function(){var a=this.F&255,b=df(this),c=bf(this);9<(a&15)||b?(a+=6,b=16):b=0;159<a||c?(a+=96,c=1):c=0;a&=255;this.F=this.F&-256|a;hf(this,a,128);c?jf(this):kf(this);b?rf(this):pf(this);this.A-=this.B.Qd},function(){this.ec.call(this,ni)},function(){this.za.call(this,oi)},function(){this.Xb.call(this,ni)},function(){this.ia.call(this,oi)},function(){this.F=this.F&-256|ni.call(this,this.F&255,this.la());this.A--},function(){this.F=this.F&~this.O|oi.call(this,this.F&this.O,this.ya());
this.A--},function(){this.K|=20;this.Ca=this.Gb=this.fa;this.A-=this.B.Ic},function(){var a=this.F&255,b=df(this),c=bf(this);9<(a&15)||b?(a-=6,b=16):b=0;159<a||c?(a-=96,c=1):c=0;a&=255;this.F=this.F&-256|a;hf(this,a,128);c?jf(this):kf(this);b?rf(this):pf(this);this.A-=this.B.Qd},function(){this.ec.call(this,vi)},function(){this.za.call(this,wi)},function(){this.Xb.call(this,vi)},function(){this.ia.call(this,wi)},function(){this.F=this.F&-256|vi.call(this,this.F&255,this.la());this.A--},function(){this.F=
this.F&~this.O|wi.call(this,this.F&this.O,this.ya());this.A--},function(){this.K|=20;this.Ca=this.Gb=this.W;this.A-=this.B.Ic},function(){var a,b=this.F&255,c=this.F>>8&255;if(9<(b&15)||df(this)){b+=6;80286<=this.ca&&255<b&&c++;c++;var d=a=1}else d=a=0;this.F=this.F&-65536|(c<<8|b)&65295;d?jf(this):kf(this);a?rf(this):pf(this);this.A-=this.B.Qd},function(){this.ec.call(this,jh)},function(){this.za.call(this,kh)},function(){this.Xb.call(this,jh)},function(){this.ia.call(this,kh)},function(){jh.call(this,
this.F&255,this.la());this.A--},function(){kh.call(this,this.F&this.O,this.ya());this.A--},function(){this.K|=20;this.Ca=this.Gb=this.Ga;this.A-=this.B.Ic},function(){var a,b=this.F&255,c=this.F>>8&255;if(9<(b&15)||df(this)){b=b-6&15;c=c-1&255;var d=a=1}else d=a=0;this.F=this.F&-65536|c<<8|b;d?jf(this):kf(this);a?rf(this):pf(this);this.A-=this.B.Qd},function(){this.F=Ai.call(this,this.F)},function(){this.H=Ai.call(this,this.H)},function(){this.L=Ai.call(this,this.L)},function(){this.G=Ai.call(this,
this.G)},function(){A(this,Ai.call(this,B(this)))},function(){this.M=Ai.call(this,this.M)},function(){this.J=Ai.call(this,this.J)},function(){this.I=Ai.call(this,this.I)},function(){this.F=yi.call(this,this.F)},function(){this.H=yi.call(this,this.H)},function(){this.L=yi.call(this,this.L)},function(){this.G=yi.call(this,this.G)},function(){A(this,yi.call(this,B(this)))},function(){this.M=yi.call(this,this.M)},function(){this.J=yi.call(this,this.J)},function(){this.I=yi.call(this,this.I)},function(){C(this,
this.F&this.O);this.A-=this.B.tc},function(){C(this,this.H&this.O);this.A-=this.B.tc},function(){C(this,this.L&this.O);this.A-=this.B.tc},function(){C(this,this.G&this.O);this.A-=this.B.tc},function(){C(this,B(this)-2&65535);this.A-=this.B.tc},function(){C(this,this.M&this.O);this.A-=this.B.tc},function(){C(this,this.J&this.O);this.A-=this.B.tc},function(){C(this,this.I&this.O);this.A-=this.B.tc},function(){this.F=this.F&~this.O|y(this);this.A-=this.B.$b},function(){this.H=this.H&~this.O|y(this);
this.A-=this.B.$b},function(){this.L=this.L&~this.O|y(this);this.A-=this.B.$b},function(){this.G=this.G&~this.O|y(this);this.A-=this.B.$b},function(){A(this,B(this)&~this.O|y(this));this.A-=this.B.$b},function(){this.M=this.M&~this.O|y(this);this.A-=this.B.$b},function(){this.J=this.J&~this.O|y(this);this.A-=this.B.$b},function(){this.I=this.I&~this.O|y(this);this.A-=this.B.$b},Ni,Oi,Pi,Qi,Ri,Si,Ti,Ui,Vi,Wi,Xi,Yi,Zi,$i,aj,bj,Ni,Oi,Pi,Qi,Ri,Si,Ti,Ui,Vi,Wi,Xi,Yi,Zi,$i,aj,bj,cj,function(){this.eb.call(this,
rj,this.ya);this.A-=-1===this.D?1:this.B.Nf},cj,function(){this.eb.call(this,rj,this.P);this.A-=-1===this.D?1:this.B.Nf},function(){this.ec.call(this,pi)},function(){this.za.call(this,qi)},function(){this.Xb.call(this,ti)},function(){this.ia.call(this,ui)},ej,fj,gj,hj,function(){this.K|=1;this.za.call(this,Fh)},function(){this.K|=1;this.Ca=this.Gb=this.fg;this.ia.call(this,vh)},function(){this.ia.call(this,Eh);switch(this.aa>>3&7){case 0:var a=this.F;this.F=this.ua;Dd(this,a);break;case 1:a=this.H;
this.H=this.ua;Xe(this,a);break;case 2:a=this.L;this.L=this.ua;wd(this,a);break;case 3:a=this.G;this.G=this.ua;Cd(this,a);break;case 4:a=B(this);A(this,this.ua);80386<=this.ca?this.sb.load(a):Dd(this,a);break;case 5:a=this.M;this.M=this.ua;80386<=this.ca?this.wb.load(a):Xe(this,a);break;case 6:a=this.J;this.J=this.ua;wd(this,a);break;case 7:a=this.I,this.I=this.ua,Cd(this,a)}},function(){this.K|=1;this.ma=this.Aa;this.ua=y(this);this.eb.call(this,sj,Gi);this.ma=-1},function(){this.A-=3},function(){var a=
this.F;this.F=this.F&~this.O|this.H&this.O;this.H=this.H&~this.O|a&this.O;this.A-=3},function(){var a=this.F;this.F=this.F&~this.O|this.L&this.O;this.L=this.L&~this.O|a&this.O;this.A-=3},function(){var a=this.F;this.F=this.F&~this.O|this.G&this.O;this.G=this.G&~this.O|a&this.O;this.A-=3},function(){var a=this.F,b=B(this);this.F=this.F&~this.O|b&this.O;A(this,b&~this.O|a&this.O);this.A-=3},function(){var a=this.F;this.F=this.F&~this.O|this.M&this.O;this.M=this.M&~this.O|a&this.O;this.A-=3},function(){var a=
this.F;this.F=this.F&~this.O|this.J&this.O;this.J=this.J&~this.O|a&this.O;this.A-=3},function(){var a=this.F;this.F=this.F&~this.O|this.I&this.O;this.I=this.I&~this.O|a&this.O;this.A-=3},function(){this.F=2==this.T?this.F&-65536|this.F<<24>>24&65535:this.F<<16>>16;this.A-=2},function(){this.L=2==this.T?this.L&-65536|(this.F&32768?65535:0):this.F&-2147483648?-1:0;this.A-=this.B.Hi},function(){Hi.call(this,this.ya(),Cf(this));this.A-=this.B.Ki},function(){this.A-=3},function(){var a=Fd(this);a&131072&&
3>this.Yb?w.call(this,13,0):(C(this,a&-196609),this.A-=this.B.tc)},function(){if(this.N&131072&&3>this.Yb)w.call(this,13,0);else{var a=y(this);a=a&65535|this.N&-65536;Gd(this,a);this.A-=this.B.$b}},function(){var a=this.F>>8&255;a&1?jf(this):kf(this);a&4?(this.resultType&=-3,this.N|=4):(this.resultType&=-3,this.N&=-5);a&16?rf(this):pf(this);a&64?sf(this):qf(this);a&128?(this.resultType&=-17,this.N|=128):(this.resultType&=-17,this.N&=-129);this.A-=this.B.Ob},function(){this.F=this.F&-65281|(Fd(this)&
213)<<8;this.A-=this.B.Ob},function(){var a=this.F&-256;var b=P(this);b=this.Ia(this.Ca.tb(b,1));this.F=a|b;this.A-=this.B.Ng},function(){this.F=this.F&~this.O|Ad(this,this.Ca,P(this));this.A-=this.B.Ng},function(){var a=P(this),b=this.F;this.Cb(this.Ca.Kb(a,1),b);this.A-=this.B.Og},function(){Bf(this,this.Ca,P(this),this.F);this.A-=this.B.Og},function(){var a=1,b=0,c=this.ta,d=this.B.Pg;this.ba&192&&(a=this.H&c,b=1,d=this.B.Rg,this.ba&256||(this.A-=this.B.Qg));if(a--){var e=this.Ia(this.Ca.tb(this.J&
c,1));this.Cb(this.xa.Kb(this.I&c,1),e);e=this.N&1024?-1:1;this.J=this.J&~c|this.J+e&c;this.I=this.I&~c|this.I+e&c;this.A-=d;this.H=this.H&~c|this.H-b&c;a&&($e(this),this.K|=256)}},function(){var a=1,b=0,c=this.ta,d=this.B.Pg;this.ba&192&&(a=this.H&c,b=1,d=this.B.Rg,this.ba&256||(this.A-=this.B.Qg));if(a--){Bf(this,this.xa,this.I&c,Ad(this,this.Ca,this.J&c));var e=this.N&1024?-this.T:this.T;this.J=this.J&~c|this.J+e&c;this.I=this.I&~c|this.I+e&c;this.A-=d;this.H=this.H&~c|this.H-b&c;a&&($e(this),
this.K|=256)}},function(){var a=1,b=0,c=this.ta,d=this.B.Ag;this.ba&192&&(a=this.H&c,b=1,d=this.B.Cg,this.ba&256||(this.A-=this.B.Bg));if(a--){var e=wf(this,this.Ca,this.J),f=wf(this,this.xa,this.I);this.D=this.C;jh.call(this,e,f);e=this.N&1024?-1:1;this.J=this.J&~c|this.J+e&c;this.I=this.I&~c|this.I+e&c;this.H=this.H&~c|this.H-b&c;this.A-=d-this.B.Ab;a&&ef(this)==(this.ba&64)&&($e(this),this.K|=256)}},function(){var a=1,b=0,c=this.ta,d=this.B.Ag;this.ba&192&&(a=this.H&c,b=1,d=this.B.Cg,this.ba&256||
(this.A-=this.B.Bg));if(a--){var e=xf(this,this.Ca,this.J&c),f=xf(this,this.xa,this.I&c);this.D=this.C;kh.call(this,e,f);e=this.N&1024?-this.T:this.T;this.J=this.J&~c|this.J+e&c;this.I=this.I&~c|this.I+e&c;this.H=this.H&~c|this.H-b&c;this.A-=d-this.B.Ab;a&&ef(this)==(this.ba&64)&&($e(this),this.K|=256)}},function(){hf(this,this.F&this.la(),128);this.A-=this.B.Qd},function(){hf(this,this.F&this.ya(),this.xb);this.A-=this.B.Qd},function(){var a=1,b=0,c=this.ta,d=this.B.$g;this.ba&192&&(a=this.H&c,b=
1,d=this.B.bh,this.ba&256||(this.A-=this.B.ah));if(a--){var e=this.F;this.Cb(this.xa.Kb(this.I&c,1),e);this.H=this.H&~c|this.H-b&c;80546<=this.qd&&80564>=this.qd&&!(this.ba&2048)!=(103!=this.Ia(this.da))&&(c^=-65536);this.I=this.I&~c|this.I+(this.N&1024?-1:1)&c;this.A-=d;a&&($e(this),this.K|=256)}},function(){var a=1,b=0,c=this.ta,d=this.B.$g;this.ba&192&&(a=this.H&c,b=1,d=this.B.bh,this.ba&256||(this.A-=this.B.ah));a--&&(Bf(this,this.xa,this.I&c,this.F),this.I=this.I&~c|this.I+(this.N&1024?-this.T:
this.T)&c,this.H=this.H&~c|this.H-b&c,this.A-=d,a&&($e(this),this.K|=256))},function(){var a=1,b=0,c=this.ta,d=this.B.Hg;this.ba&192&&(a=this.H&c,b=1,d=this.B.Jg,this.ba&256||(this.A-=this.B.Ig));if(a--){var e=this.Ia(this.Ca.tb(this.J&c,1));this.F=this.F&-256|e;this.J=this.J&~c|this.J+(this.N&1024?-1:1)&c;this.H=this.H&~c|this.H-b&c;this.A-=d;a&&($e(this),this.K|=256)}},function(){var a=1,b=0,c=this.ta,d=this.B.Hg;this.ba&192&&(a=this.H&c,b=1,d=this.B.Jg,this.ba&256||(this.A-=this.B.Ig));if(a--){var e=
Ad(this,this.Ca,this.J&c);this.F=this.F&~this.O|e;this.J=this.J&~c|this.J+(this.N&1024?-this.T:this.T)&c;this.H=this.H&~c|this.H-b&c;this.A-=d;a&&($e(this),this.K|=256)}},function(){var a=1,b=0,c=this.ta,d=this.B.Ug;this.ba&192&&(a=this.H&c,b=1,d=this.B.Wg,this.ba&256||(this.A-=this.B.Vg));if(a--){var e=this.F&255,f=wf(this,this.xa,this.I);this.D=this.C;jh.call(this,e,f);this.I=this.I&~c|this.I+(this.N&1024?-1:1)&c;this.H=this.H&~c|this.H-b&c;this.A-=d-this.B.Ab;a&&ef(this)==(this.ba&64)&&($e(this),
this.K|=256)}},function(){var a=1,b=0,c=this.ta,d=this.B.Ug;this.ba&192&&(a=this.H&c,b=1,d=this.B.Wg,this.ba&256||(this.A-=this.B.Vg));if(a--){var e=this.F&this.O,f=xf(this,this.xa,this.I&c);this.D=this.C;kh.call(this,e,f);this.I=this.I&~c|this.I+(this.N&1024?-this.T:this.T)&c;this.H=this.H&~c|this.H-b&c;this.A-=d-this.B.Ab;a&&ef(this)==(this.ba&64)&&($e(this),this.K|=256)}},function(){this.F=this.F&-256|this.la();this.A-=this.B.Ob},function(){this.H=this.H&-256|this.la();this.A-=this.B.Ob},function(){this.L=
this.L&-256|this.la();this.A-=this.B.Ob},function(){this.G=this.G&-256|this.la();this.A-=this.B.Ob},function(){this.F=this.F&-65281|this.la()<<8;this.A-=this.B.Ob},function(){this.H=this.H&-65281|this.la()<<8;this.A-=this.B.Ob},function(){this.L=this.L&-65281|this.la()<<8;this.A-=this.B.Ob},function(){this.G=this.G&-65281|this.la()<<8;this.A-=this.B.Ob},function(){this.F=this.F&~this.O|this.ya();this.A-=this.B.Ob},function(){this.H=this.H&~this.O|this.ya();this.A-=this.B.Ob},function(){this.L=this.L&
~this.O|this.ya();this.A-=this.B.Ob},function(){this.G=this.G&~this.O|this.ya();this.A-=this.B.Ob},function(){A(this,B(this)&~this.O|this.ya());this.A-=this.B.Ob},function(){this.M=this.M&~this.O|this.ya();this.A-=this.B.Ob},function(){this.J=this.J&~this.O|this.ya();this.A-=this.B.Ob},function(){this.I=this.I&~this.O|this.ya();this.A-=this.B.Ob},lj,mj,lj,mj,function(){this.ia.call(this,wh)},function(){this.ia.call(this,uh)},function(){this.K|=1;this.Sc.call(this,tj,this.la)},function(){this.K|=1;
this.eb.call(this,tj,this.ya)},nj,oj,nj,oj,function(){if(this.N&131072&&3>this.Yb)w.call(this,13,0);else{var a=this.B.aj;this.sc=-1;Ii.call(this,3,null,a)}},function(){var a=this.la();if(this.N&131072&&3>this.Yb)w.call(this,13,0);else{a:{var b=this.lf[a];if(void 0!==b)for(var c=0;c<b.length;c++)if(!b[c](this.da)){b=!1;break a}b=!0}b?(this.sc=-1,Ii.call(this,a,null,0)):this.A--}},function(){if(gf(this))if(this.N&131072&&3>this.Yb)w.call(this,13,0);else{var a=this.B.bj;this.sc=-1;Ii.call(this,4,null,
a)}else this.A-=this.B.cj},function(){if(this.N&131072&&3>this.Yb)w.call(this,13,0);else{this.uc=this.W.ha;this.ma=this.Aa;this.A-=this.B.Zi;if(this.ra&1&&this.N&16384){var a=this.ga(this.ka.va+0);xd(this.fa,a,!1)}else{a=this.La;var b=y(this),c=y(this),d=y(this);if(this.N&131072)d=d&131071|this.N&-131072;else if(d&131072){var e=y(this),f=y(this),g=y(this),h=y(this),k=y(this),m=y(this);yd(this,!0,!0);wd(this,f);A(this,e);Dd(this,g);Cd(this,h);this.sb.load(k);this.wb.load(m)}null!=Hd(this,b,c,!1)&&
(Gd(this,d,a),this.dg&&Se(this,this.da))}this.uc=this.ma=-1}},function(){this.Sc.call(this,ij,Ci)},function(){this.eb.call(this,2==this.T?jj:kj,Ci)},function(){this.Sc.call(this,ij,Di)},function(){this.eb.call(this,2==this.T?jj:kj,Di)},function(){var a=this.la();if(a){var b=this.F&255;this.F=this.F&-65536|b/a<<8|b%a;hf(this,this.F,128);this.A-=this.B.Ei}else Li.call(this)},function(){var a=this.F&255,b=(this.F>>8&255)*this.la()|0,c=a+b|0;this.F=this.F&-65536|c&255;af(this,a,b,c,191);this.A-=this.B.Di},
function(){this.F=this.F&-256|(bf(this)?255:0);this.A-=2},function(){this.F=this.F&-256|wf(this,this.Ca,this.G+(this.F&255));this.A-=this.B.Cj},function(){pj.call(this,216)},function(){pj.call(this,217)},function(){pj.call(this,218)},function(){pj.call(this,219)},function(){pj.call(this,220)},function(){pj.call(this,221)},function(){pj.call(this,222)},function(){pj.call(this,223)},function(){var a=this.P(),b=this.H-1&this.ta;this.H=this.H&~this.ta|b;b&&!ef(this)?(G(this,D(this)+a),this.A-=this.B.jj):
this.A-=this.B.Kg},function(){var a=this.P(),b=this.H-1&this.ta;this.H=this.H&~this.ta|b;b&&ef(this)?(G(this,D(this)+a),this.A-=this.B.Lg):this.A-=this.B.Mg},function(){var a=this.P(),b=this.H-1&this.ta;this.H=this.H&~this.ta|b;b?(G(this,D(this)+a),this.A-=this.B.ij):this.A-=this.B.Kg},function(){var a=this.P();this.H&this.ta?this.A-=this.B.Mg:(G(this,D(this)+a),this.A-=this.B.Lg)},function(){var a=this.la();uf(this,a,1)&&(this.F=this.F&-256|pc(this.oa,a,1,this.da-2)&255,this.A-=this.B.Fg)},function(){var a=
this.la();uf(this,a,this.T)&&(this.F=this.F&~this.O|pc(this.oa,a,this.T,this.da-2)&this.O,this.A-=this.B.Fg)},function(){var a=this.la();uf(this,a,1)&&(rc(this.oa,a,1,this.F&255,this.da-2),this.A-=this.B.Tg)},function(){var a=this.la();uf(this,a,this.T)&&(rc(this.oa,a,this.T,this.F&this.O,this.da-2),this.A-=this.B.Tg)},function(){var a=this.ya(),b=D(this);a=b+a;C(this,b);G(this,a);this.A-=this.B.Ii},function(){var a=this.ya();G(this,D(this)+a);this.A-=this.B.Gg},function(){Hd(this,this.ya(),Cf(this));
this.A-=this.B.ej},function(){var a=this.P();G(this,D(this)+a);this.A-=this.B.Gg},function(){var a=this.L&65535;uf(this,a,1)&&(this.F=this.F&-256|pc(this.oa,a,1,this.da-1)&255,this.A-=this.B.Eg)},function(){var a=this.L&65535;uf(this,a,this.T)&&(this.F=this.F&~this.O|pc(this.oa,a,this.T,this.da-1)&this.O,this.A-=this.B.Eg)},function(){var a=this.L&65535;uf(this,a,1)&&(rc(this.oa,a,1,this.F&255,this.da-1),this.A-=this.B.Sg)},function(){var a=this.L&65535;uf(this,a,2)&&(rc(this.oa,a,this.T,this.F&this.O,
this.da-1),this.A-=this.B.Sg)},qj,qj,function(){this.K|=132;this.A-=this.B.Ic},function(){this.K|=68;this.A-=this.B.Ic},function(){this.N&131072?w.call(this,13,0):(this.Qa|=4,this.A-=2,this.N&512||Vc(this))},function(){bf(this)?kf(this):jf(this);this.A-=2},function(){this.fc=!1;this.Sc.call(this,uj,Fi);this.fc&&(this.F=this.F&~this.O|this.Ba&this.O)},function(){this.fc=!1;this.eb.call(this,vj,Fi);this.fc&&(this.F=this.F&~this.O|this.Ba&this.O,this.L=this.L&~this.O|this.Sa&this.O)},function(){kf(this);
this.A-=2},function(){jf(this);this.A-=2},function(){this.La>this.Yb?w.call(this,13,0):(this.N&=-513,this.A-=this.B.Gi)},function(){this.La>this.Yb?w.call(this,13,0):(this.N|=512,this.K|=4,this.A-=2)},function(){this.N&=-1025;this.A-=2},function(){this.N|=1024;this.A-=2},function(){this.Sc.call(this,Kd,Fi)},function(){this.eb.call(this,Ld,Fi)}],dj=[Ug,Gh,Sg,Ih,Wg,ni,vi,jh],rj=[Vg,Hh,Tg,Jh,Xg,oi,wi,kh],sj=[function(a,b){this.A-=-1===this.D?this.B.$b:this.B.uj;return b},mh,mh,mh,mh,mh,mh,mh],tj=[function(a,
b){this.A-=-1===this.D?this.B.mj:this.B.kj;return b},S,S,S,S,S,S,S],ij=[function(a,b){var c=a;if(b&=this.Ma){if(b&=7){var d=a<<b-1;c=(a<<b|a>>8-b)&255}else d=a<<7;nf(this,c,d,128)}return c},function(a,b){var c=a;if(b&=this.Ma){if(b&=7){var d=a<<8-b;c=(a>>>b|d)&255}else d=a;nf(this,c,d,128)}return c},function(a,b){var c=a;if(b&=this.Ma){var d=of(this);(b%=9)?(c=(a<<b|d<<b-1|a>>9-b)&255,d=a<<b-1):d<<=7;nf(this,c,d,128)}return c},function(a,b){var c=a;if(b&=this.Ma){var d=of(this);(b%=9)?(c=(a>>b|d<<
8-b|a<<9-b)&255,d=a<<8-b):d<<=7;nf(this,c,d,128)}return c},function(a,b){var c=a;if(b&=this.Ma){var d=0;8<b?c=0:(d=a<<b-1,c=d<<1&255);hf(this,c,128,d&128,(c^d)&128)}return c},function(a,b){if(b&=this.Ma)b=8<b?0:a>>>b-1,a=b>>>1&255,hf(this,a,128,b&1,a&128);return a},S,function(a,b){if(b&=this.Ma)9<b&&(b=9),b=a<<24>>24>>b-1,a=b>>1&255,hf(this,a,128,b&1);return a}],jj=[function(a,b){var c=a;if(b&=this.Ma){if(b&=15){var d=a<<b-1;c=(a<<b|a>>16-b)&65535}else d=a<<15;nf(this,c,d,32768)}return c},function(a,
b){var c=a;if(b&=this.Ma){if(b&=15){var d=a<<16-b;c=(a>>>b|d)&65535}else d=a;nf(this,c,d,32768)}return c},function(a,b){var c=a;if(b&=this.Ma){var d=of(this);(b%=17)?(c=(a<<b|d<<b-1|a>>17-b)&65535,d=a<<b-1):d<<=15;nf(this,c,d,32768)}return c},function(a,b){var c=a;if(b&=this.Ma){var d=of(this);(b%=17)?(c=(a>>b|d<<16-b|a<<17-b)&65535,d=a<<16-b):d<<=15;nf(this,c,d,32768)}return c},function(a,b){var c=a;if(b&=this.Ma){var d=0;16<b?c=0:(d=a<<b-1,c=d<<1&65535);hf(this,c,32768,d&32768,(c^d)&32768)}return c},
function(a,b){if(b&=this.Ma)b=16<b?0:a>>>b-1,a=b>>>1&65535,hf(this,a,32768,b&1,a&32768);return a},S,function(a,b){if(b&=this.Ma)17<b&&(b=17),b=a<<16>>16>>b-1,a=b>>1&65535,hf(this,a,32768,b&1);return a}],kj=[function(a,b){var c=a;if(b&=this.Ma)c=a<<b|a>>>32-b,nf(this,c,a<<b-1,-2147483648);return c},function(a,b){var c=a;if(b&=this.Ma){var d=a<<32-b;c=a>>>b|d;nf(this,c,d,-2147483648)}return c},function(a,b){var c=a;if(b&=this.Ma)c=of(this),c=a<<b|c<<b-1|a>>>32-b>>>1,nf(this,c,a<<b-1,-2147483648);return c},
function(a,b){var c=a;if(b&=this.Ma)c=of(this),c=a>>>b|c<<32-b|a<<32-b<<1,nf(this,c,a<<32-b,-2147483648);return c},function(a,b){var c=a;if(b&=this.Ma)a<<=b-1,c=a<<1,hf(this,c,-2147483648,a&-2147483648,(c^a)&-2147483648);return c},function(a,b){if(b&=this.Ma)b=a>>>b-1,a=b>>>1,hf(this,a,-2147483648,b&1,a&-2147483648);return a},S,function(a,b){if(b&=this.Ma)b=a>>b-1,a=b>>1,hf(this,a,-2147483648,b&1);return a}],uj=[function(a,b){b=this.la();hf(this,a&b,128);this.A-=-1===this.C?this.B.eh:this.B.dh;this.K|=
2;return a},S,function(a){this.A-=-1===this.C?this.B.Ue:this.B.Te;return a^255},function(a){var b=-a|0;af(this,0,a,b,191,!0);this.A-=-1===this.C?this.B.Ue:this.B.Te;return b&255},function(a){this.Ba=(this.F&255)*a&65535;this.Ba&65280?(jf(this),lf(this)):(kf(this),mf(this));this.fc=!0;this.A-=-1===this.C?this.B.qj:this.B.pj;this.K|=2;return a},function(a){var b=(this.F<<24>>24)*(a<<24>>24)|0;this.Ba=b&65535;127<b||-128>b?(jf(this),lf(this)):(kf(this),mf(this));this.fc=!0;this.A-=-1===this.C?this.B.Wi:
this.B.Vi;this.K|=2;return a},function(a,b){if(!a)return Li.call(this),a;var c=(b=this.F&65535)/a;if(255<c)return Li.call(this),a;this.Ba=c&255|(b%a&255)<<8;this.fc=!0;this.A-=-1===this.C?this.B.Oi:this.B.Ni;this.K|=2;return a},function(a,b){if(!a)return Li.call(this),a;var c=a<<24>>24,d=(b=this.F<<16>>16)/c|0;if(d!=d<<24>>24||8086==this.ca&&-128==d)return Li.call(this),a;this.Ba=d&255|(b%c&255)<<8;this.fc=!0;this.A-=-1===this.C?this.B.Si:this.B.Ri;this.K|=2;return a}],vj=[function(a,b){b=this.ya();
hf(this,a&b,this.xb);this.A-=-1===this.C?this.B.eh:this.B.dh;this.K|=2;return a},S,function(a){this.A-=-1===this.C?this.B.Ue:this.B.Te;return a^this.O},function(a){var b=-a|0;af(this,0,a,b,this.xb|63,!0);this.A-=-1===this.C?this.B.Ue:this.B.Te;return b&this.O},function(a,b){2==this.T?(b=this.F&65535,b=b*a|0,this.Ba=b&65535,this.Sa=b>>16&65535):(sh.call(this,a,this.F),80563==this.qd&&68657152==this.F&&129==a&&(this.Sa=0));this.Sa?(jf(this),lf(this)):(kf(this),mf(this));this.fc=!0;this.A-=-1===this.C?
this.B.sj:this.B.rj;this.K|=2;return a},function(a,b){2==this.T?(b=this.F&65535,b=(b<<16>>16)*(a<<16>>16)|0,this.Ba=b&65535,this.Sa=b>>16&65535,b=32767<b||-32768>b):(rh.call(this,a,this.F),b=this.Sa!=this.Ba>>31);b?(jf(this),lf(this)):(kf(this),mf(this));this.fc=!0;this.A-=-1===this.C?this.B.Yi:this.B.Xi;this.K|=2;return a},function(a,b){if(2==this.T){if(!a)return Li.call(this),a;b=65536*(this.L&65535)+(this.F&65535);var c=b/a;if(65536<=c)return Li.call(this),a;this.Ba=c&65535;this.Sa=b%a&65535}else{if(!zi.call(this,
this.F,this.L,a))return Li.call(this),a;this.Ba|=0;this.Sa|=0}this.fc=!0;this.A-=-1===this.C?this.B.Qi:this.B.Pi;this.K|=2;return a},function(a,b){if(2==this.T){if(!a)return Li.call(this),a;var c=a<<16>>16,d=(b=this.L<<16|this.F&65535)/c|0;if(d!=d<<16>>16||8086==this.ca&&-32768==d)return Li.call(this),a;this.Ba=d&65535;this.Sa=b%c&65535}else{b=this.F;c=this.L;d=a;var e=0,f=0;0>d&&(d=-d|0,e=1-e);0>c&&(b=-b|0,c=~c+(b?0:1)|0,f=1,e=1-e);!zi.call(this,b,c,d)||this.Ba>2147483647+e||this.Sa>2147483647+f?
b=!1:(e&&(this.Ba=-this.Ba),f&&(this.Sa=-this.Sa),b=!0);if(!b)return Li.call(this),a;this.Ba|=0;this.Sa|=0}this.fc=!0;this.A-=-1===this.C?this.B.Ui:this.B.Ti;this.K|=2;return a}],Kd=[function(a){var b=a+1|0;af(this,a,1,b,190);this.A-=-1===this.C?this.B.Se:this.B.Re;return b&255},function(a){var b=a-1|0;af(this,a,1,b,190,!0);this.A-=-1===this.C?this.B.Se:this.B.Re;return b&255},S,S,S,S,S,S],Ld=[function(a){var b=a+1|0;af(this,a,1,b,this.xb|62);this.A-=-1===this.C?this.B.Se:this.B.Re;return b&this.O},
function(a){var b=a-1|0;af(this,a,1,b,this.xb|62,!0);this.A-=-1===this.C?this.B.Se:this.B.Re;return b&this.O},function(a){C(this,D(this));G(this,a);this.A-=-1===this.C?this.B.Mi:this.B.Li;this.K|=2;return a},function(a){if(-1===this.C)return S.call(this,a);this.ma=this.Aa;Hi.call(this,a,this.ga(this.C+this.T));this.A-=this.B.Ji;this.K|=2;this.ma=-1;return a},function(a){G(this,a);this.A-=-1===this.C?this.B.gj:this.B.fj;this.K|=2;return a},function(a){if(-1===this.C)return S.call(this,a);Hd(this,a,
this.ga(this.C+this.T));this.A-=this.B.dj;this.K|=2;return a},function(a){var b=a;this.K&512&&(a=a-2&65535,80286>this.ca&&(b=a));C(this,b);this.A-=-1===this.C?this.B.tc:this.B.wj;this.K|=2;return a},S];function ne(){this.ia.call(this,si);this.A-=-1===this.C?6:13}function oe(){this.za.call(this,ri);this.A-=-1===this.C?12:19}var fe=Array(256);fe[0]=function(){16>(this.Ia(this.da)&56)&&(this.K|=1);this.eb.call(this,this.ji,Fi)};fe[1]=function(){this.Ia(this.da)&16||(this.K|=1);this.eb.call(this,wj,Fi)};
fe[2]=function(){!(this.ra&1)||this.N&131072?w.call(this,6):this.ia.call(this,th)};fe[3]=function(){!(this.ra&1)||this.N&131072?w.call(this,6):this.ia.call(this,zh)};
fe[5]=function(){this.La?w.call(this,13,0,0,!0):(tf(this,this.ga(2054)),this.I=this.ga(2086),this.J=this.ga(2088),this.M=this.ga(2090),this.G=this.ga(2094),this.L=this.ga(2096),this.H=this.ga(2098),this.F=this.ga(2100),td(this.xa,2102,this.ga(2084)),td(this.fa,2108,this.ga(2082)),td(this.W,2114,this.ga(2080)),td(this.Ga,2120,this.ga(2078)),Gd(this,this.ga(2072)),G(this,this.ga(2074)),A(this,this.ga(2092)),this.Jb=this.ga(2126)|this.Ia(2128)<<16,this.Pc=this.Jb+this.ga(2130),this.Wb=this.ga(2138)|
this.Ia(2140)<<16,this.Rc=this.Wb+this.ga(2142),td(this.lc,2132,this.ga(2076)),td(this.ka,2144,this.ga(2070)),this.A-=195)};fe[6]=function(){this.La?w.call(this,13,0):(this.ra&=-9,this.A-=2)};fe[11]=Nd;fe[166]=Nd;fe[255]=Nd;var F=[];F[5]=Nd;
F[7]=function(){if(this.La)w.call(this,13,0,0,!0);else{var a=this.xa.tb(this.I&this.ta,204);if(-1!==a){this.ra=this.ea(a);yd(this);this.ra&-2147483648?qe(this):te(this);var b=this.ea(a+168),c=(b&24576)>>13;Gd(this,this.ea(a+4),c);this.Jb=this.ea(a+112);this.Pc=this.Jb+this.ea(a+116);this.Wb=this.ea(a+100);this.Rc=this.Wb+this.ea(a+104);rd(this.lc,this.ea(a+56),this.ea(a+120),this.ea(a+124),this.ea(a+128));rd(this.ka,this.ea(a+52),this.ea(a+84),this.ea(a+88),this.ea(a+92));this.I=this.ea(a+12);this.J=
this.ea(a+16);this.M=this.ea(a+20);this.G=this.ea(a+28);this.L=this.ea(a+32);this.H=this.ea(a+36);this.F=this.ea(a+40);rd(this.wb,this.ea(a+60),this.ea(a+132),this.ea(a+136),this.ea(a+140));rd(this.sb,this.ea(a+64),this.ea(a+144),this.ea(a+148),this.ea(a+152));rd(this.Ga,this.ea(a+68),this.ea(a+156),this.ea(a+160),this.ea(a+164));rd(this.W,this.ea(a+72),b,this.ea(a+172),this.ea(a+176));rd(this.fa,this.ea(a+76),this.ea(a+180),this.ea(a+184),this.ea(a+188));rd(this.xa,this.ea(a+80),this.ea(a+192),this.ea(a+
196),this.ea(a+200));G(this,this.ea(a+8));A(this,this.ea(a+24))}this.A-=122<<(a&3?1:0)}};F[16]=ej;F[17]=fj;F[18]=gj;F[19]=hj;F[32]=function(){if(this.La)w.call(this,13,0);else{var a=this.la();switch((a&56)>>3){case 0:var b=this.ra;break;case 2:b=this.td;break;case 3:b=this.Wc;break;default:ge.call(this);return}ve(this,a&7,b);this.A-=6}};F[33]=function(){if(this.La)w.call(this,13,0);else{var a=this.la(),b=(a&56)>>3;4==b||5==b?ge.call(this):(ve(this,a&7,this.Db[b]),this.A-=22)}};
F[34]=function(){if(this.La)w.call(this,13,0);else{var a=this.la(),b=ue(this,a&7);switch((a&56)>>3){case 0:this.ra=b;yd(this);this.ra&-2147483648?qe(this):te(this);this.A-=10;break;case 2:this.td=b;this.A-=4;break;case 3:this.Wc=b;Xb(this);this.A-=5;break;default:ge.call(this)}}};F[35]=function(){if(this.La)w.call(this,13,0);else{var a=this.la(),b=(a&56)>>3;4==b||5==b?ge.call(this):(a=ue(this,a&7),a!=this.Db[b]&&(Te(this,!1),this.Db[b]=a,Te(this,!0)),this.A-=4>b?22:14)}};
F[36]=function(){if(this.La)w.call(this,13,0);else{var a=this.la(),b=(a&56)>>3;6>b?ge.call(this):(ve(this,a&7,this.pf[b]),this.A-=12)}};F[38]=function(){if(this.La)w.call(this,13,0);else{var a=this.la(),b=(a&56)>>3;6>b?ge.call(this):(this.pf[b]=ue(this,a&7),this.A-=12)}};F[128]=function(){var a=this.ya();gf(this)?(G(this,D(this)+a),this.A-=this.B.Ja):this.A-=this.B.Ka};F[129]=function(){var a=this.ya();gf(this)?this.A-=this.B.Ka:(G(this,D(this)+a),this.A-=this.B.Ja)};
F[130]=function(){var a=this.ya();bf(this)?(G(this,D(this)+a),this.A-=this.B.Ja):this.A-=this.B.Ka};F[131]=function(){var a=this.ya();bf(this)?this.A-=this.B.Ka:(G(this,D(this)+a),this.A-=this.B.Ja)};F[132]=function(){var a=this.ya();ef(this)?(G(this,D(this)+a),this.A-=this.B.Ja):this.A-=this.B.Ka};F[133]=function(){var a=this.ya();ef(this)?this.A-=this.B.Ka:(G(this,D(this)+a),this.A-=this.B.Ja)};F[134]=function(){var a=this.ya();bf(this)||ef(this)?(G(this,D(this)+a),this.A-=this.B.Ja):this.A-=this.B.Ka};
F[135]=function(){var a=this.ya();bf(this)||ef(this)?this.A-=this.B.Ka:(G(this,D(this)+a),this.A-=this.B.Ja)};F[136]=function(){var a=this.ya();ff(this)?(G(this,D(this)+a),this.A-=this.B.Ja):this.A-=this.B.Ka};F[137]=function(){var a=this.ya();ff(this)?this.A-=this.B.Ka:(G(this,D(this)+a),this.A-=this.B.Ja)};F[138]=function(){var a=this.ya();cf(this)?(G(this,D(this)+a),this.A-=this.B.Ja):this.A-=this.B.Ka};F[139]=function(){var a=this.ya();cf(this)?this.A-=this.B.Ka:(G(this,D(this)+a),this.A-=this.B.Ja)};
F[140]=function(){var a=this.ya();!ff(this)!=!gf(this)?(G(this,D(this)+a),this.A-=this.B.Ja):this.A-=this.B.Ka};F[141]=function(){var a=this.ya();!ff(this)==!gf(this)?(G(this,D(this)+a),this.A-=this.B.Ja):this.A-=this.B.Ka};F[142]=function(){var a=this.ya();ef(this)||!ff(this)!=!gf(this)?(G(this,D(this)+a),this.A-=this.B.Ja):this.A-=this.B.Ka};F[143]=function(){var a=this.ya();ef(this)||!ff(this)!=!gf(this)?this.A-=this.B.Ka:(G(this,D(this)+a),this.A-=this.B.Ja)};F[144]=function(){Bi.call(this,Kh)};
F[145]=function(){Bi.call(this,Kh)};F[146]=function(){Bi.call(this,Lh)};F[147]=function(){Bi.call(this,Mh)};F[148]=function(){Bi.call(this,Nh)};F[149]=function(){Bi.call(this,Oh)};F[150]=function(){Bi.call(this,Ph)};F[151]=function(){Bi.call(this,Qh)};F[152]=function(){Bi.call(this,Rh)};F[153]=function(){Bi.call(this,Sh)};F[154]=function(){Bi.call(this,Th)};F[155]=function(){Bi.call(this,Uh)};F[156]=function(){Bi.call(this,Vh)};F[157]=function(){Bi.call(this,Wh)};F[158]=function(){Bi.call(this,Xh)};
F[159]=function(){Bi.call(this,Yh)};F[160]=function(){Bd(this,this.sb.ha,this.T,2);this.A-=this.B.Rd};F[161]=function(){this.ma=this.Aa;var a=y(this);this.sb.load(a);this.A-=this.B.$b;this.ma=-1};F[163]=function(){this.za.call(this,fh);-1!==this.C&&(this.A-=6)};F[164]=function(){this.za.call(this,2==this.T?Zh:di);this.A-=-1===this.C?3:7};F[165]=function(){this.za.call(this,2==this.T?fi:gi);this.A-=-1===this.C?3:7};F[168]=function(){Bd(this,this.wb.ha,this.T,2);this.A-=this.B.Rd};
F[169]=function(){this.ma=this.Aa;var a=y(this);this.wb.load(a);this.A-=this.B.$b;this.ma=-1};F[171]=function(){this.za.call(this,ih);-1!==this.C&&(this.A-=5)};F[172]=function(){this.za.call(this,2==this.T?hi:ji);this.A-=-1===this.C?3:7};F[173]=function(){this.za.call(this,2==this.T?li:mi);this.A-=-1===this.C?3:7};F[175]=function(){this.ia.call(this,2==this.T?oh:qh)};F[178]=function(){this.ia.call(this,Ah)};F[179]=function(){this.za.call(this,hh);-1!==this.C&&(this.A-=5)};
F[180]=function(){this.ia.call(this,xh)};F[181]=function(){this.ia.call(this,yh)};
F[182]=function(){this.Xb.call(this,Ch);switch(this.aa>>3&7){case 0:this.F=this.F&~this.O|this.F&255;break;case 1:this.H=this.H&~this.O|this.H&255;break;case 2:this.L=this.L&~this.O|this.L&255;break;case 3:this.G=this.G&~this.O|this.G&255;break;case 4:this.kc=this.kc&~this.O|this.F>>8&255;this.F=this.ua;break;case 5:this.M=this.M&~this.O|this.H>>8&255;this.H=this.ua;break;case 6:this.J=this.J&~this.O|this.L>>8&255;this.L=this.ua;break;case 7:this.I=this.I&~this.O|this.G>>8&255,this.G=this.ua}this.A-=
-1===this.C?3:6};F[183]=function(){zd(this,2);this.ia.call(this,Dh);switch(this.aa>>3&7){case 0:this.F=this.F&65535;break;case 1:this.H=this.H&65535;break;case 2:this.L=this.L&65535;break;case 3:this.G=this.G&65535;break;case 4:this.kc=this.kc&65535;break;case 5:this.M=this.M&65535;break;case 6:this.J=this.J&65535;break;case 7:this.I=this.I&65535}this.A-=-1===this.C?3:6};F[186]=function(){this.eb.call(this,xj,this.la)};F[187]=function(){this.za.call(this,gh);-1!==this.C&&(this.A-=5)};
F[188]=function(){this.ia.call(this,$g)};F[189]=function(){this.ia.call(this,ah)};
F[190]=function(){this.Xb.call(this,Ch);switch(this.aa>>3&7){case 0:this.F=this.F&~this.O|(this.F&255)<<24>>24&this.O;break;case 1:this.H=this.H&~this.O|(this.H&255)<<24>>24&this.O;break;case 2:this.L=this.L&~this.O|(this.L&255)<<24>>24&this.O;break;case 3:this.G=this.G&~this.O|(this.G&255)<<24>>24&this.O;break;case 4:this.kc=this.kc&~this.O|this.F<<16>>24&this.O;this.F=this.ua;break;case 5:this.M=this.M&~this.O|this.H<<16>>24&this.O;this.H=this.ua;break;case 6:this.J=this.J&~this.O|this.L<<16>>24&
this.O;this.L=this.ua;break;case 7:this.I=this.I&~this.O|this.G<<16>>24&this.O,this.G=this.ua}this.A-=-1===this.C?3:6};F[191]=function(){zd(this,2);this.ia.call(this,Dh);switch(this.aa>>3&7){case 0:this.F=this.F<<16>>16;break;case 1:this.H=this.H<<16>>16;break;case 2:this.L=this.L<<16>>16;break;case 3:this.G=this.G<<16>>16;break;case 4:this.kc=this.kc<<16>>16;break;case 5:this.M=this.M<<16>>16;break;case 6:this.J=this.J<<16>>16;break;case 7:this.I=this.I<<16>>16}this.A-=-1===this.C?3:6};
var Ue=[function(){this.A-=2+(-1===this.C?0:1);return this.lc.ha},function(){this.A-=2+(-1===this.C?0:1);return this.ka.ha},function(a){this.K|=2;this.lc.load(a);this.A-=17+(-1===this.C?0:2);return a},function(a){this.K|=2;-1!==this.ka.load(a)&&(this.Za(this.ka.bc+4,this.ka.nb|=512),this.ka.type|=512);this.A-=17+(-1===this.C?0:2);return a},function(a){this.K|=2;this.A-=14+(-1===this.C?0:2);if(-1!==this.gb.load(a)&&2048!=(this.gb.nb&2560)&&(this.gb.ic>=this.La&&this.gb.ic>=(a&3)||7168==(this.gb.nb&
7168)))return sf(this),a;qf(this);return a},function(a){this.K|=2;this.A-=14+(-1===this.C?0:2);if(-1!==this.gb.load(a)&&512==(this.gb.nb&2560)&&this.gb.ic>=this.La&&this.gb.ic>=(a&3))return sf(this),a;qf(this);return a},S,S],Md=[de,de,de,de,de,de,S,S],wj=[function(a){if(-1===this.C)w.call(this,6);else{a=this.Pc-this.Jb;var b=this.Jb;80286==this.ca?b|=-16777216:80386<=this.ca&&2!=this.T&&(a|=b<<16);this.Ta(this.C+2,b);this.A-=11}return a},function(a){if(-1===this.C)w.call(this,6);else{a=this.Rc-this.Wb;
var b=this.Wb;80286==this.ca?b|=-16777216:80386<=this.ca&&2!=this.T&&(a|=b<<16);this.Ta(this.C+2,b);this.A-=12}return a},function(a){-1===this.C||this.N&131072?w.call(this,6):(this.Jb=this.ea(this.C+2)&(this.O|this.O<<8),a&=65535,this.Pc=this.Jb+a,this.K|=2,this.A-=11);return a},function(a){-1===this.C||this.N&131072?w.call(this,6):(this.Wb=this.ea(this.C+2)&(this.O|this.O<<8),a&=65535,this.Rc=this.Wb+a,this.K|=2,this.A-=12);return a},function(){this.A-=2+(-1===this.C?0:1);return this.ra},S,function(a){this.N&
131072?w.call(this,6):(tf(this,a),this.A-=-1===this.C?3:6,this.K|=2);return a},S],xj=[S,S,S,S,bh,eh,dh,ch];
function T(a){u.call(this,"ChipSet",a);var b=a.model;b&&!yj[b]&&q("Unrecognized ChipSet model: "+b);this.ca=yj[b]||zj;this.B=[];b=Aj(a[Bj]);this.B[0]=[b,b];null==b&&(this.L=[360,360],(b=a.floppies)&&b.length&&(this.L=b),Cj(this,Dj,this.L.length),Cj(this,Ej,a.monitor||(this.ca<Lf?"mono":"ega")));b=Aj(a[Fj]);this.B[1]=[b,b];this.za=this.ka=1;this.ca>=Lf&&(this.za=this.ka=2);this.M=a.scaleTimers||!1;this.Sa=a.dateRTC;this.La=this.Ma=!1;this.Ga=0;if(a=a.sound)this.Ga="number"!=typeof a||0>a||1<a?.5:a,
this.Da=this.N=null,window&&(this.Da=window.AudioContext||window.webkitAudioContext),this.Da&&(this.N=new this.Da);this.reset(!0)}ja(T,u);l=T.prototype;
l.jc=function(a,b,c,d){this.oa=b;this.R=c;this.Ea=d;this.na=a;this.rd=Eb(a,"FPU");Cj(this,Gj,this.rd?1:0,!0);this.C=Eb(a,"Keyboard");a=Qc(a,"sound");null!=a&&(d=+a||0,this.Ga="true"==a||0>d||1<d?.5:d);this.Ba=c.U.zd/Hj;oc(b,this,Ij);qc(b,this,Jj);this.ca<Lf?this.ca!=Kj?(oc(b,this,Lj),qc(b,this,Mj)):(oc(b,this,Nj),qc(b,this,Oj)):(oc(b,this,Pj),qc(b,this,Qj),(this.ca|0)==Rj&&(oc(b,this,Sj),qc(b,this,Tj)));zb(this)};
l.Bb=function(a,b,c){switch(b){case Bj:return this.ja[b]=c,Uj(this,0,b),!0;case Fj:if((this.ca|0)==Vj||this.ca==Kj)return this.ja[b]=c,Uj(this,1,b),!0;break;case Wj:return this.ja[b]=c,!0}return!1};l.Rb=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};l.Qb=function(a){return a?this.save():!0};
l.reset=function(a){var b;Xj(this);this.D=Array(this.za);for(b=0;b<this.za;b++)Yj(this,b);this.ac=Array(this.ka);Zj(this,ak,bk);1<this.ka&&Zj(this,ck,dk);this.fa=this.ua=null;this.pa=Array((this.ca|0)==Rj?6:3);for(b=0;b<this.pa.length;b++)ek(this,b);this.ia=this.Ca=this.H=this.xa=null;this.da=Pf;this.ca==Kj&&(this.ba=0);if(this.ca>=Lf){this.F=fk;this.J=0;this.I=gk;this.qa=0;this.K=hk|ik;512<=jk(this)&&(this.K|=kk);+lk(this,Ej,void 0)==mk&&(this.K|=nk);(this.ca|0)==Rj&&(this.K=this.K|ok|pk);this.ra=
qk|rk;this.G=Array(8);this.W=0;a&&(this.A=Array(sk));tk(this,this.Sa);for(a=uk;a<=vk;a++)this.A[a]=0;for(a=wk;a<xk;a++)void 0===this.A[a]&&(this.A[a]=0);a=0|+lk(this,Ej,void 0)<<yk.cg&yk.hc;a|=+lk(this,Gj,void 0)?zk:0;b=+lk(this,Dj,void 0);a|=b?b-1<<Ak.cg&Ak.hc|Ak.yk:0;this.A[Bk]=a;this.A[Ck]=Dk(this,0)<<4|Dk(this,1);Ek(this)}};
function tk(a,b){var c=b?new Date(b):new Date;"[object Date]"!==Object.prototype.toString.call(c)||isNaN(c.getTime())?(c=new Date,a.rb("CMOS date invalid ("+b+"), using "+c)):b&&a.rb("CMOS date: "+c);a.A[Fk]=c.getSeconds();a.A[Gk]=0;a.A[Hk]=c.getMinutes();a.A[Ik]=0;a.A[Jk]=c.getHours();a.A[Kk]=0;a.A[Lk]=c.getDay()+1;a.A[Mk]=c.getDate();a.A[Nk]=c.getMonth()+1;b=c.getFullYear();a.A[Ok]=b%100;b/=100;a.A[Pk]=b%10|b/10<<4;a.A[Qk]=38;a.A[id]=Rk;a.A[Sk]=0;a.A[Tk]=Uk;a.ma=a.X=0;a.Qa=a.Aa=null}
function Vk(a){var b=a.Aa;a.X=ad(a.R,a.M)+b;a.A[id]&jd&&Zc(a.R,b)}function Ek(a){for(var b=0,c=Ck;c<xk;c++)b+=a.A[c];a.A[Wk]=b&255;a.A[xk]=b>>8}
l.save=function(){var a=new Ve(this);a.set(0,[this.B]);for(var b=[],c=0;c<this.D;c++){for(var d=this.D[c],e=d,f=[],g=0;g<e.Tb.length;g++){var h=e.Tb[g];f[g]=[h.Nd,h.rf,h.cc,h.hb,h.ib,h.mode,h.tf,h.Tn,h.Un]}b[c]=[d.ob,d.hg,d.ai,d.Ib,f,d.jg]}a.set(1,[b]);b=[];for(c=0;c<this.ac.length;c++)d=this.ac[c],b[c]=[d.Oe,d.Lc,d.ld,d.Yc,d.Ub,d.xc,d.Hd,d.He];a.set(2,[b]);b=[];for(c=0;c<this.pa.length;c++)d=this.pa[c],b[c]=[d.cc,d.zc,d.ib,d.Id,d.kg,d.mode,d.df,d.$c,d.hd,d.Mc,d.ke,d.Ld,d.kd,d.ob,d.pe];a.set(3,[this.ua,
b,this.fa]);a.set(4,[this.xa,this.H,this.Ca,this.ia,this.da]);this.ca>=Lf&&(a.set(5,[this.F,this.J,this.I,this.qa,this.K,this.ra]),a.set(6,[this.G[7],this.G,this.W,this.A,this.ma,this.X]));return a.data()};
l.restore=function(a){var b;var c=a[0];Array.isArray(c[0])?this.B=c[0]:(this.B[0][0]=c[0],this.B[1][0]=c[1]&15,this.B[0][1]=c[2],this.B[1][1]=c[3]&15);Xj(this);c=a[1];for(b=0;b<this.za;b++)Yj(this,b,1==c.length?c[0][b]:c);c=a[2];for(b=0;b<this.ka;b++)Zj(this,b,0===b?bk:dk,c[0][b]);c=a[3];this.ua=c[0];this.fa=c[2];for(b=0;b<this.pa.length;b++)ek(this,b,c[1][b]);c=a[4];this.xa=c[0];this.H=c[1];this.Ca=c[2];this.ia=c[3];this.da=c[4];if(c=a[5])this.F=c[0],this.J=c[1],this.I=c[2],this.qa=c[3],this.K=c[4],
this.ra=c[5];if(c=a[6])this.G=c[1],this.G[7]=c[0],this.W=c[2],this.A=c[3],this.ma=c[4],this.X=c[5],tk(this);return!0};l.start=function(){Xk(this)};l.stop=function(){Xk(this)};function Yj(a,b,c){var d=a.D[b];d||(d={Tb:Array(4)});c=c&&5<=c.length?c:Yk;d.ob=c[0];d.hg=c[1];d.ai=c[2];d.Ib=c[3];d.lm=b<<2;for(var e=0;e<d.Tb.length;e++)Zk(d,e,c[4][e]);d.jg=c[5]||0;a.D[b]=d}
function Zk(a,b,c){var d=a.Tb[b];d||(d={rf:[0,0],cc:[0,0],hb:[0,0],ib:[0,0]});c=c&&8==c.length?c:$k;d.Nd=c[0];d.rf[0]=c[1][0];d.rf[1]=c[1][1];d.cc[0]=c[2][0];d.cc[1]=c[2][1];d.hb[0]=c[3][0];d.hb[1]=c[3][1];d.ib[0]=c[4][0];d.ib[1]=c[4][1];d.mode=c[5];d.tf=c[6];d.controller=a;d.si=b;al(d,c[8],c[9]);a.Tb[b]=d}function al(a,b,c,d){"string"==typeof b&&(b=pb(b));b&&(a.done=null,a.Tn=b.id,a.Un=c,a.Af=b,a.ng=b[c],a.Pf=d)}
function Zj(a,b,c,d){var e=a.ac[b];e||(e={Lc:[null,null,null,null]});d=d&&8==d.length?d:bl;e.port=c;e.To=b<<3;e.Oe=d[0];e.Lc[0]=d[1][0];e.Lc[1]=d[1][1];e.Lc[2]=d[1][2];e.Lc[3]=d[1][3];e.ld=d[2];e.Yc=d[3];e.Ub=d[4];e.xc=d[5];e.Hd=d[6];e.He=d[7];a.ac[b]=e}
function ek(a,b,c){var d=a.pa[b];d||(d={cc:[0,0],zc:[0,0],ib:[0,0],Id:[0,0]});c=c&&13<=c.length?c:cl;d.cc[0]=c[0][0];d.cc[1]=c[0][1];d.zc[0]=c[1][0];d.zc[1]=c[1][1];d.ib[0]=c[2][0];d.ib[1]=c[2][1];d.Id[0]=c[3][0];d.Id[1]=c[3][1];d.kg=c[4];d.mode=c[5];d.df=c[6];d.$c=c[7];d.hd=c[8];d.Mc=c[9];d.ke=c[10];d.Ld=c[11];d.kd=c[12];d.ob=c[13]||0;d.pe=c[14]||!1;a.pa[b]=d}
function Uj(a,b,c){for(var d="",e=a.ja[c],f=1;8>=f;f++){var g="pcjs-bitCell";f||(g+=" pcjs-bitCellLeft");d+='<div id="'+(c+"-"+f)+'" class="'+g+'" data-value="0">'+f+"</div>\n"}e.innerHTML=d;dl(a,b,c,!0)}function el(a,b,c){if(b=(a=U[a.ca|0])&&a[b])for(var d in b)if(a=b[d],a.hc&1<<c)return a;return null}
function lk(a,b,c){for(var d=null,e=U[a.ca]||U[a.ca|0]||U[Vj],f=0;f<e.length;f++){var g=e[f];if(g&&(g=g[b])){a=a.B[f][c?0:1]&g.hc;for(var h in g.Fc)if(g.Fc[h]==a&&(d=h,"number"==typeof+d))break;break}}return d}function Dk(a,b){if(b<+lk(a,Dj,void 0)){if(!a.L)return fl;if(b<a.L.length)switch(a.L[b]){case 160:case 180:case 320:case 360:return fl;case 720:return gl;case 1200:return hl;case 1440:return il}}return jl}function jk(a,b){return+lk(a,kl,b)+ +lk(a,ll,b)}
function Aj(a,b){if(a){b=0;for(var c=1,d=0;d<a.length;d++)"0"==a.charAt(d)&&(b|=c),c<<=1}return b}function Cj(a,b,c,d){for(var e=U[a.ca]||U[a.ca|0]||U[Vj],f=0;f<e.length;f++){var g=e[f];if(g&&(g=g[b]))for(var h in g.Fc)if(h==c){a.B[f][d?0:1]&=~g.hc;a.B[f][d?0:1]|=g.Fc[h];return}}}function ml(a,b){a.setAttribute("data-value",b?"1":"0");a.style.color=b?"#ffffff":"#000000";a.style.backgroundColor=b?"#000000":"#ffffff"}function Xj(a){dl(a,0,Bj);dl(a,1,Fj);nl(a)}
function dl(a,b,c,d){if(c=a.ja[c]){d=d?a.B[b][0]:a.B[b][1]=a.B[b][0];c=mb(c,"pcjs-bitCell");for(var e=0;e<c.length;e++){var f=el(a,b,e);c[e].setAttribute("title",f&&f.ed||"Reserved");ml(c[e],!(d&1<<e));c[e].onclick=function(a,b){return function(){var c="1"!=b.getAttribute("data-value");ml(b,c);var d=b.getAttribute("id").split("-"),e=1<<+d[1]-1;switch(d[0]){case Bj:a.B[0][0]=a.B[0][0]&~e|(c?0:e);break;case Fj:a.B[1][0]=a.B[1][0]&~e|(c?0:e)}nl(a)}}(a,c[e])}}}
function nl(a){var b=a.ja[Wj];if(null!=b){var c=""+(jk(a,!0)+"Kb");c+=", "+(+ +lk(a,Gj,!0)?"":"No ")+"FPU";c+=", "+{0:"Enhanced Color",1:"TV",2:"Color",3:"Monochrome"}[+lk(a,Ej,!0)]+" Monitor";c+=", "+ +lk(a,Dj,!0)+" Floppy Drives";if(null!=a.B[0][1]&&a.B[0][1]!=a.B[0][0]||null!=a.B[1][1]&&a.B[1][1]!=a.B[1][0])c+=" (Reset required)";b.textContent=c}}
function ol(a,b,c){a=a.D[b];var d=a.Tb[c],e=d.hb[a.Ib];a.Ib^=1;b||c!=pl||a.Ib||(d.hb[0]++,255<d.hb[0]&&(d.hb[0]=0,d.hb[1]++,255<d.hb[1]&&(d.hb[1]=0)));return e}function ql(a,b,c,d){a=a.D[b];c=a.Tb[c];c.hb[a.Ib]=c.rf[a.Ib]=d;a.Ib^=1}function rl(a,b,c){a=a.D[b];var d=a.Tb[c],e=d.ib[a.Ib];a.Ib^=1;b||c!=pl||a.Ib||(d.ib[0]--,0>d.ib[0]&&(d.ib[0]=255,d.ib[1]--,0>d.ib[1]&&(d.ib[1]=255)));return e}function sl(a,b,c,d){a=a.D[b];c=a.Tb[c];c.ib[a.Ib]=c.cc[a.Ib]=d;a.Ib^=1}
function tl(a,b){a=a.D[b];b=a.ob|ul;a.ob&=~vl;return b}function wl(a,b,c){a=a.D[b];b=c&3;a.ob=a.ob&~(16<<b)|(c&4)<<b+2;a.ai=c}function xl(a,b,c){b=a.D[b];var d=c&yl,e=b.Tb[d];e.Nd=!!(c&zl);e.Nd||Al(a,b.lm+d)}function Bl(a,b){a=a.D[b];for(b=0;b<a.Tb.length;b++)Zk(a,b)}function Cl(a,b,c){return a.D[b].Tb[c].tf}function Dl(a,b,c,d){a.D[b].Tb[c].tf=d}function El(a,b,c,d,e){al(a.D[b>>2].Tb[b&3],c,d,e)}function Al(a,b,c){b=a.D[b>>2].Tb[b&3];b.Af&&b.ng&&b.Pf?(c&&(b.done=c),b.Nd||Fl(a,b,!0)):c&&c(!0)}
function Fl(a,b,c){c&&(b.count=b.ib[1]<<8|b.ib[0],b.type=b.mode&Gl,b.li=b.Bf=!1);for(var d=!1;0<=b.count&&(c=b.tf<<16|b.hb[1]<<8|b.hb[0],b.type==Hl?(d=!0,function(c){b.ng.call(b.Af,b.Pf,-1,function(e,g){0>e&&(b.li||(b.li=!0),e=255);b.Nd||a.oa.Cb(c,e);(d=g)&&setTimeout(function(){Il(b)||Fl(a,b)},0)})}(c)):b.type==Jl?(c=a.oa.Ia(c),0>b.ng.call(b.Af,b.Pf,c)&&(b.Bf=!0)):b.type!=Kl&&(b.Bf=!0)),!d&&!Il(b););}
function Il(a){if(!a.Bf&&0<=--a.count&&(a.mode&Ll?(a.hb[0]--,0>a.hb[0]&&(a.hb[0]=255,a.hb[1]--,0>a.hb[1]&&(a.hb[1]=255))):(a.hb[0]++,255<a.hb[0]&&(a.hb[0]=0,a.hb[1]++,255<a.hb[1]&&(a.hb[1]=0))),!a.Nd))return!1;var b=a.controller;b.ob=b.ob&~(16<<a.si)|1<<a.si;a.mode&Ml||(a.Nd=!0,a.Af=a.Pf=null);a.done&&(a.done(!a.Bf),a.done=null);return!0}function Nl(a,b){var c=0;a=a.ac[b];if(null!=a.He)switch(a.He&Ol){case Pl:c=a.Ub;break;case Ql:c=a.xc}return c}
function Rl(a,b,c){b=a.ac[b];if(c&Sl)b.ld=0,b.Lc[b.ld++]=c,b.Yc=0,b.Hd=7,b.Ub=b.xc=0,b.He=Tl|Pl;else if(c&Tl)b.He=c;else{var d=c&Ul;if(d&Vl){var e=0;if((d&Wl)==Wl)c&=Xl,e=1<<c;else for(c=b.Hd+1;;){c&=7;d=1<<c;if(b.xc&d){e=d;break}if(c++==b.Hd)break}b.xc&e&&(b.xc&=~e,Yl(a))}else d==Zl&&(b.Hd=c&Xl)}}function $l(a,b,c){var d=a.ac[b];d.ld<d.Lc.length?(d.Lc[d.ld++]=c,2==d.ld&&d.Lc[0]&am&&d.ld++,3!=d.ld||d.Lc[0]&bm||d.ld++):(d.Yc=c,d=a.R,d.K|=4,Yl(a,b||253!=c?0:6))}
function Of(a,b,c){var d=a.ac[b>>3];b=1<<(b&7);d.Ub&b||(d.Ub|=b,d.Oe=c||0,Yl(a))}function Mf(a,b){var c=a.ac[b>>3];b=1<<(b&7);c.Ub&b&&(c.Ub&=~b,Yl(a))}function Yl(a,b){var c=-1;if(1<a.ka){var d=a.ac[1];c=~(d.xc|d.Yc)&d.Ub}d=a.ac[0];0<=c&&(d.Ub=c?d.Ub|1<<cm:d.Ub&~(1<<cm));c=~(d.xc|d.Yc)&d.Ub;a=a.R;a.V&&(a.Qa=c?a.Qa|1:a.Qa&-2);c&&b&&(d.Oe=b)}
function Ef(a,b){void 0===b&&(b=0);var c=-1,d=a.ac[b];if(d.Oe)c=-2,d.Oe--;else for(var e=d.Ub&((d.xc|d.Yc)^255),f=d.Hd+1;;){f&=7;var g=1<<f;if(d.xc&g)break;if(e&g){b||f!=cm?c=d.Lc[1]+f:c=Ef(a,1);0<=c&&(d.xc|=g,d.Ub&=~g);break}if(f++==d.Hd)break}return c}function dm(a,b,c){var d=b?3:0;b=a.pa[d+c];b.pe?(a=b.ob,b.pe=!1):(b.$c==b.hd&&em(a,d+c),b.ke?(a=b.Id[b.$c++],b.$c==b.hd&&(b.ke=!1)):(fm(a,d+c),a=b.ib[b.$c++]));return a}
function gm(a,b,c,d){var e=b?3:0,f=a.pa[e+c];f.$c==f.hd&&em(a,e+c);f.cc[f.$c++]=d;f.$c==f.hd&&(f.Ld&&f.mode!=hm&&f.mode!=im||(f.ke=!1,f.ib[0]=f.zc[0]=f.cc[0],f.ib[1]=f.zc[1]=f.cc[1],f.kd=ad(a.R,a.M),f.Ld=!0,f.Mc=f.mode!=hm,b==jm&&c==km&&(Mf(a,lm),d=mm(a,km)*a.Ba|0,f.mode==hd&&(d>>=1),Zc(a.R,d))),b==jm&&c==nm&&Xk(a))}
function om(a,b,c){var d=0,e=c±b?(d=3,a.fa=c):a.ua=c;if(e==qm){if(!(c&rm))for(e=0;2>=e;e++)if(c&sm<<e){b=d+e;var f=a.pa[b];f.pe||(fm(a,b),f.ob=f.kg|f.mode|f.df|(f.$c<f.hd?tm:0)|(f.Mc?um:0),f.pe=!0)}if(!(c&vm))for(e=0;2>=e;e++)c&sm<<e&&wm(a,d+e)}else{e>>=xm;f=c&ym;var g=c&zm;c&=Am;if(c==Bm)wm(a,d+e);else{d+=e;var h=a.pa[d];h.df=c;h.mode=g;h.kg=f;h.cc=[0,0];h.ib=[0,0];h.Id=[0,0];h.Mc=!1;h.ke=!1;h.Ld=!1;h.pe=!1;em(a,d);b==jm&&e==km&&Mf(a,lm);b==jm&&e==nm&&255==a.ac[0].Yc&&a.H==(Cm|Dm|Em|Fm)&&(e=a.pa[0],
e.zc[0]=e.cc[0],e.zc[1]=e.cc[1],e.kd=ad(a.R,a.M))}}}function mm(a,b){a=a.pa[b];(b=a.cc[1]<<8|a.cc[0])||(b=1==a.hd?256:65536);return b}function gd(a,b){a=a.pa[b];(b=a.zc[1]<<8|a.zc[0])||(b=1==a.hd?256:65536);return b}function wm(a,b){fm(a,b);var c=a.pa[b];c.Id[0]=c.ib[0];c.Id[1]=c.ib[1];c.ke=!0;em(a,b)}function em(a,b){a=a.pa[b];a.$c=a.df==Gm?1:0;a.hd=a.df==Hm?2:1}
function fm(a,b,c){var d=a.pa[b];if(d.Ld&&(b!=nm||a.H&Cm)){var e=ad(a.R,a.M),f=(e-d.kd)/a.Ba|0;0>f&&(d.kd=e,f=0);var g=mm(a,b),h=gd(a,b)-f;d.mode==hm?(0>=h&&(h=0),h||(d.Mc=!0,d.Ld=!1,b||Of(a,lm))):d.mode==Im?(d.Mc=1!=h,0>=h&&(h=g+h,0>=h&&(h=g),d.zc[0]=h&255,d.zc[1]=h>>8&255,d.kd=e,!b&&d.Mc&&Of(a,lm))):d.mode==hd&&(h-=f,0>=h&&(d.Mc=!d.Mc,h=g+h,0>=h&&(h=g),d.zc[0]=h&255,d.zc[1]=h>>8&255,d.kd=e,!b&&d.Mc&&Of(a,lm)));d.ib[0]=h&255;d.ib[1]=h>>8&255;c&&(a.kd=0)}return d}
function fd(a,b){for(var c=0;c<a.pa.length;c++)fm(a,c,b);if(a.ca>=Lf){b=a.R.U.zd;c=ad(a.R,a.M);null==a.Aa&&(a.ma=ad(a.R,a.M),a.Qa=1024,a.Aa=Math.floor(a.R.U.zd/a.Qa),Vk(a));c>=a.X&&(a.A[Sk]|=Jm,a.A[id]&jd&&(a.A[Sk]|=Km,Of(a,Lm)),a.X=c+a.Aa);a.A[Fk]==a.A[Gk]&&a.A[Hk]==a.A[Ik]&&a.A[Jk]==a.A[Kk]&&(a.A[Sk]|=Mm,a.A[id]&Nm&&(a.A[Sk]|=Km,Of(a,Lm)));var d=c-a.ma,e=Math.floor(d/b);if(e&&!(a.A[id]&Om)){for(;e--;)if(60<=++a.A[Fk]&&(a.A[Fk]=0,60<=++a.A[Hk]&&(a.A[Hk]=0,24<=++a.A[Jk]))){a.A[Jk]=0;a.A[Lk]=a.A[Lk]%
7+1;var f=a.A[Ok];var g=Fa[a.A[Nk]-1];28==g&&0===f%4&&(f%100||0===f%400)&&g++;f=g;++a.A[Mk]>f&&(a.A[Mk]=1,12<++a.A[Nk]&&(a.A[Nk]=1,a.A[Ok]=(a.A[Ok]+1)%100))}a.A[Qk]|=Pm;a.A[Sk]|=Qm;a.A[id]&Rm&&(a.A[Sk]|=Km,Of(a,Lm))}a.ma=c-d%b}}l.Ml=function(){var a=this.xa;this.ia&Wm&&(this.H&Xm?a=this.B[0][1]:this.C&&(a=Ym(this.C)));return a};l.nn=function(a,b){this.xa=b};l.Nl=function(){return this.H};l.on=function(a,b){Zm(this,b)};
function Zm(a,b){var c=!!(b&$m),d=!!(a.H&$m);a.H=b;a.C&&an(a.C,!(b&Xm),!!(b&Fm));c!=d&&Xk(a,c)}l.Ol=function(){var a=0;a=(this.ca|0)==Vj?this.H&Dm?a|this.B[1][1]&bn:a|this.B[1][1]>>4&1:this.H&cn?a|this.B[0][1]>>4:a|this.B[0][1]&15;this.H&Cm&&fm(this,nm).Mc&&(a=this.H&$m?a|dn:a|en);return a};l.pn=function(a,b){this.Ca=b};l.Pl=function(){return this.ia};l.qn=function(a,b){this.ia=b};l.Uk=function(){var a=this.C?Ym(this.C):0;this.ba&=~fn;return a};l.um=function(){};l.Tk=function(){return this.H};
l.tm=function(a,b){Zm(this,b)};l.Vk=function(){return this.ba};l.Wk=function(){var a=this.qa;this.F&=~(fn|gn);this.C&&hn(this.C);return a};l.wm=function(a,b){if(this.F&jn)switch(this.J){case kn:ln(this,b);break;case mn:nn(this,b);break;default:if(ln(this,this.I&~gk),this.C){a=this.C;var c=b,d=-1;switch(a.F||c){case on:d=pn;a.Pb=[];qn(a,rn);break;case sn:a.F&&(c=0);qn(a,pn);a.F=c;break;case tn:a.F&&(c=0),qn(a,pn),a.F=c}un(this,d)}}this.J=b;this.F&=~jn};
l.Xk=function(){return this.H&~(vn|wn)|(ad(this.R)&64?wn:0)};l.xm=function(a,b){Zm(this,b)};l.Yk=function(){var a=this.F&255;this.F&gn&&(this.F|=fn,this.F&=~gn);return a};
l.vm=function(a,b){this.J=b;this.F|=jn;a=0;this.J>=xn&&(a=this.J^15,this.J=xn);switch(this.J){case yn:un(this,this.I);break;case zn:ln(this,this.I|gk);break;case An:ln(this,this.I&~gk);this.C&&hn(this.C);break;case Bn:this.C&&(this.C.Pb=[]);ln(this,this.I|gk);un(this,Cn);nn(this,qk|rk);break;case Dn:un(this,En);break;case Fn:un(this,this.K);break;case Gn:un(this,this.ra);break;case Hn:un(this,this.I&gk?0:In);break;case xn:a&1&&pe(this.R)}};
function ln(a,b){a.I=b;a.F=a.F&~Jn|b&Kn;a.C&&an(a.C,!!(b&Ln),!(b&gk))}function un(a,b,c){0<=b&&(a.qa=b,c?a.F|=fn:(a.F&=~fn,a.F|=gn))}function nn(a,b){a.ra=b;Tb(a.oa,!!(b&rk));b&qk||pe(a.R)}function Mn(a,b){a.ca<Lf?(Of(a,Nn,4),a.ba|=fn):a.I&gk||a.F&(fn|gn)||(un(a,b,!0),On(a.C),Of(a,Nn,120))}l.pl=function(){return this.W};l.Pm=function(a,b){this.W=b;this.da=b&Pn?Pf:Qn};
l.ql=function(a,b){a=this.W&Rn;if(a<=Tk){var c=this.A[a];if(a<Qk){var d=!1;a!=Jk&&a!=Kk||this.A[id]&Rk||(12>c?c=c?c:12:c=(c-=12)?c+128:140,d=!0);this.A[id]&Sn||(d&&128<c&&(c-=48),c=c%10|c/10<<4)}else a==Qk&&(this.A[a]&=~Pm)}else c=this.A[a];null!=b&&a==Sk&&(this.A[a]&=Tn,c&Km&&Mf(this,Lm),c&Jm&&this.A[id]&jd&&Vk(this));return c};
l.Qm=function(a,b){a=this.W&Rn;var c=b^this.A[a];if(a<=Tk){var d=b;if(a<Qk){var e=!1;this.A[id]&Sn||(d=10*(d>>4)+(d&15),e=!0);if(a==Jk||a==Kk)e&&23<d&&(d+=48),this.A[id]&Rk||(12>=d?d=12==d?0:d:(d-=116,d=24==d?12:d))}}else d=b;this.A[a]=d;a==id&&c&jd&&b&jd&&Vk(this)};l.Fj=function(a,b){this.da=b};l.$m=function(){};l.an=function(){this.rd&&Hf(this.rd)};
function Xk(a,b){if(a.N){void 0!==b?a.La=b:b=!!(a.La&&a.R&&a.R.Y.cb);var c=Math.round(Hj/mm(a,nm));if(20>c||2E4<c)b=!1;b&&Un(a)?(a.V.frequency.setValueAtTime(c,0),a.aa.gain.value=a.Ga):a.aa&&(a.aa.gain.value=0)}}
function Un(a,b){if(a.N){if(b){if(a.Ma)return!0;a.V=null;a.Ma=!0}if(a.V)return!0;try{if(a.V=a.N.createOscillator(),"start"in a.V)return a.aa=a.N.createGain(),a.V.connect(a.aa),a.aa.connect(a.N.destination),a.aa.gain.value=0,a.V.type="square",a.V.start(0),!0}catch(c){a.wa("AudioContext exception: "+c.message),a.N=null}}return!1}var Vj=5150,zj=5150.9,Lf=5170,Kj=5160.101,Rj=5180,yj={5150:Vj,5160:5160,5170:Lf,att6300:Kj,mpc1600:5150.101,z150:5160.15,compaq:5150.102,other:zj};yj.deskpro386=Rj;
var Bj="sw1",Fj="sw2",Wj="swdesc",mk=3,ul=1,vl=15,yl=3,zl=4,Gl=12,Kl=0,Hl=4,Jl=8,Ml=16,Ll=32,pl=0,ak=0,bk=32,ck=1,dk=160,Sl=16,bm=1,am=2,Xl=7,Ul=224,Vl=32,Wl=96,Zl=192,Tl=8,Pl=2,Ql=3,Ol=3,lm=0,Nn=1,cm=2,Lm=8,Nf=13,jm=0,km=0,nm=2,ym=1,zm=14,hm=0,Im=4,hd=6,im=8,Am=48,Bm=0,Gm=32,Hm=48,pm=192,qm=192,xm=6,sm=2,rm=16,vm=32,tm=64,um=128,Hj=1193181,Cm=1,$m=2,Dm=4,Em=8,cn=8,Fm=64,Xm=128,bn=15,en=16,dn=32,Wm=16,Ak={yk:1,ONE:0,Jo:64,Ho:128,yo:192,hc:192,cg:6},zk=2,yk={Io:16,uo:32,zo:48,hc:48,cg:4},Dj=1,Gj=3,
Ej=4,kl=5,ll=6,U={};U[Vj]=[{},{}];U[Vj][0][Dj]={hc:192,Fc:{1:0,2:64,3:128,4:192},ed:"Number of Floppy Drives"};U[Vj][0][Gj]={hc:2,Fc:{0:0,1:2},ed:"FPU"};U[Vj][0][Ej]={hc:48,Fc:{0:0,1:16,2:32,3:48,none:0,tv:16,color:32,cga:32,mda:48,mono:48,ega:0,vga:0},ed:"Monitor Type"};U[Vj][0][kl]={hc:12,Fc:{16:0,32:4,48:8,64:12},ed:"Base Memory (16Kb Increments)"};U[Vj][1][ll]={hc:31,Fc:{0:0,32:1,64:2,96:3,128:4,160:5,192:6,224:7,256:8,288:9,320:10,352:11,384:12,416:13,448:14,480:15,512:16,544:17,576:18},ed:"Expansion Memory (32Kb Increments)"};
U[5160]=[{},{}];U[5160][0][Dj]=U[Vj][0][Dj];U[5160][0][Gj]=U[Vj][0][Gj];U[5160][0][Ej]=U[Vj][0][Ej];U[5160][0][kl]={hc:12,Fc:{64:0,128:4,192:8,256:12},ed:"Base Memory (64Kb Increments)"};U[5160][1][ll]=U[Vj][1][ll];U[Kj]=[{},{}];U[Kj][0][kl]={hc:143,Fc:{128:1,256:130,512:8,640:141},ed:"Base Memory (128Kb Increments)"};U[Kj][0][Gj]={hc:16,Fc:{0:0,1:16},ed:"FPU"};U[Kj][1][2]={hc:1,Fc:{0:0,1:1},ed:"Floppy Type"};U[Kj][1][Dj]=U[Vj][0][Dj];U[Kj][1][Ej]=U[Vj][0][Ej];
var Kn=4,Ln=8,gk=16,Cn=85,En=0,ok=4,pk=8,kk=16,hk=32,nk=64,ik=128,qk=1,rk=2,In=1,wn=16,vn=192,yn=32,kn=96,Bn=170,Dn=171,zn=173,An=174,Fn=192,Gn=208,mn=209,Hn=224,xn=240,fn=1,Jn=4,jn=8,fk=16,gn=256,Fk=0,Gk=1,Hk=2,Ik=3,Jk=4,Kk=5,Lk=6,Mk=7,Nk=8,Ok=9,Qk=10,id=11,Sk=12,Tk=13,wk=14,Ck=16,Bk=20,uk=21,vk=24,xk=46,Wk=47,Pk=50,Rn=63,sk=64,Pn=128,Pm=128,Om=128,jd=64,Nm=32,Rm=16,Sn=4,Rk=2,Km=128,Jm=64,Mm=32,Qm=16,Tn=15,Uk=128,jl=0,fl=1,hl=2,gl=3,il=4,Qn=128,Pf=0,Yk=[0,null,null,0,Array(4),0],$k=[!0,[0,0],[0,
0],[0,0],[0,0]],bl=[0,Array(4)],cl=[[0,0],[0,0],[0,0],[0,0]],Ij={0:function(){return ol(this,0,0)},1:function(){return rl(this,0,0)},2:function(){return ol(this,0,1)},3:function(){return rl(this,0,1)},4:function(){return ol(this,0,2)},5:function(){return rl(this,0,2)},6:function(){return ol(this,0,3)},7:function(){return rl(this,0,3)},8:function(){return tl(this,0)},13:function(){return this.D[0].jg},32:function(){return Nl(this,ak)},33:function(){return this.ac[ak].Yc},64:function(){return dm(this,
jm,km)},65:function(){return dm(this,jm,1)},66:function(){return dm(this,jm,nm)},67:function(){return jm?this.fa:this.ua},129:function(){return Cl(this,0,2)},130:function(){return Cl(this,0,3)},131:function(){return Cl(this,0,1)},135:function(){return Cl(this,0,0)}},Lj={96:T.prototype.Ml,97:T.prototype.Nl,98:T.prototype.Ol,99:T.prototype.Pl},Pj={96:T.prototype.Wk,97:T.prototype.Xk,100:T.prototype.Yk,112:T.prototype.pl,113:T.prototype.ql,128:function(){return this.G[7]},132:function(){return this.G[0]},
133:function(){return this.G[1]},134:function(){return this.G[2]},136:function(){return this.G[3]},137:function(){return Cl(this,1,2)},138:function(){return Cl(this,1,3)},139:function(){return Cl(this,1,1)},140:function(){return this.G[4]},141:function(){return this.G[5]},142:function(){return this.G[6]},143:function(){return Cl(this,1,0)},160:function(){return Nl(this,ck)},161:function(){return this.ac[ck].Yc},192:function(){return ol(this,1,0)},194:function(){return rl(this,1,0)},196:function(){return ol(this,
1,1)},198:function(){return rl(this,1,1)},200:function(){return ol(this,1,2)},202:function(){return rl(this,1,2)},204:function(){return ol(this,1,3)},206:function(){return rl(this,1,3)},208:function(){return tl(this,1)},218:function(){return this.D[1].jg}},Nj={96:T.prototype.Uk,97:T.prototype.Tk,100:T.prototype.Vk,102:function(){return this.B[0][1]},103:function(){return this.B[1][1]}},Sj={72:function(){return dm(this,1,0)},73:function(){return dm(this,1,1)},74:function(){return dm(this,1,2)},75:function(){return this.fa}},
Jj={0:function(a,b){ql(this,0,0,b)},1:function(a,b){sl(this,0,0,b)},2:function(a,b){ql(this,0,1,b)},3:function(a,b){sl(this,0,1,b)},4:function(a,b){ql(this,0,2,b)},5:function(a,b){sl(this,0,2,b)},6:function(a,b){ql(this,0,3,b)},7:function(a,b){sl(this,0,3,b)},8:function(a,b){this.D[0].hg=b},9:function(a,b){wl(this,0,b)},10:function(a,b){xl(this,0,b)},11:function(a,b){this.D[0].Tb[b&3].mode=b},12:function(){this.D[0].Ib=0},13:function(){Bl(this,0)},32:function(a,b){Rl(this,ak,b)},33:function(a,b){$l(this,
ak,b)},64:function(a,b){gm(this,jm,km,b)},65:function(a,b){gm(this,jm,1,b)},66:function(a,b){gm(this,jm,nm,b)},67:function(a,b){om(this,jm,b)},129:function(a,b){Dl(this,0,2,b)},130:function(a,b){Dl(this,0,3,b)},131:function(a,b){Dl(this,0,1,b)},135:function(a,b){Dl(this,0,0,b)}},Mj={96:T.prototype.nn,97:T.prototype.on,98:T.prototype.pn,99:T.prototype.qn,160:T.prototype.Fj},Qj={96:T.prototype.wm,97:T.prototype.xm,100:T.prototype.vm,112:T.prototype.Pm,113:T.prototype.Qm,128:function(a,b){this.G[7]=
b},132:function(a,b){this.G[0]=b},133:function(a,b){this.G[1]=b},134:function(a,b){this.G[2]=b},136:function(a,b){this.G[3]=b},137:function(a,b){Dl(this,1,2,b)},138:function(a,b){Dl(this,1,3,b)},139:function(a,b){Dl(this,1,1,b)},140:function(a,b){this.G[4]=b},141:function(a,b){this.G[5]=b},142:function(a,b){this.G[6]=b},143:function(a,b){Dl(this,1,0,b)},160:function(a,b){Rl(this,ck,b)},161:function(a,b){$l(this,ck,b)},192:function(a,b){ql(this,1,0,b)},194:function(a,b){sl(this,1,0,b)},196:function(a,
b){ql(this,1,1,b)},198:function(a,b){sl(this,1,1,b)},200:function(a,b){ql(this,1,2,b)},202:function(a,b){sl(this,1,2,b)},204:function(a,b){ql(this,1,3,b)},206:function(a,b){sl(this,1,3,b)},208:function(a,b){this.D[1].hg=b},210:function(a,b){wl(this,1,b)},212:function(a,b){xl(this,1,b)},214:function(a,b){this.D[1].Tb[b&3].mode=b},216:function(){this.D[1].Ib=0},218:function(){Bl(this,1)},240:T.prototype.$m,241:T.prototype.an},Oj={96:T.prototype.um,97:T.prototype.tm,160:T.prototype.Fj},Tj={72:function(a,
b){gm(this,1,0,b)},73:function(a,b){gm(this,1,1,b)},74:function(a,b){gm(this,1,2,b)},75:function(a,b){om(this,1,b)}};Va(function(){for(var a=mb(document,"pcx86","chipset"),b=0;b<a.length;b++){var c=a[b],d=nb(c);d=new T(d);lb(d,c);nl(d)}});
function Vn(a){u.call(this,"ROM",a);this.A=null;this.G=a.addr;this.C=a.size;this.F=a.alias;this.B=a.notify;this.I=null;if(this.B){var b=this.B.indexOf("[");if(0<b){try{this.I=eval(this.B.substr(b))}catch(c){}this.B=this.B.substr(0,b)}}if(this.D=this.J=a.file)a=ta(sa(this.D)),"json"!=a&&"hex"!=a&&(this.D=Ia()+"/api/v1/dump?file="+this.J+"&format=bytes&decimal=true")}ja(Vn,u);
Vn.prototype.jc=function(a,b,c,d){this.na=a;this.oa=b;this.R=c;this.Ea=d;if(this.D){var e=this,f="Loading "+this.D+"...";Ha(this.D,null,!0,function(a,b,c){Wn(e,a,b,c)},function(){e.rb(f,wb)})}};Vn.prototype.Rb=function(){this.H&&(this.Ea&&this.Ea.A(this.id,0,this.G>>>4,0,this.G,this.C,this.H),delete this.H);return!0};Vn.prototype.Qb=function(){return!0};
function Wn(a,b,c,d){if(d)a.wa("Unable to load system ROM (error "+d+": "+b+")",0>d);else{db(a.Dd,b,c);if("["==c.charAt(0)||"{"==c.charAt(0))try{var e=eval("("+c+")"),f=e.bytes,g=e.longs||e.data;if(f)a.A=f;else if(g)for(a.A=Array(4*g.length),d=c=0;c<g.length;c++)a.A[d++]=g[c]&255,a.A[d++]=g[c]>>8&255,a.A[d++]=g[c]>>16&255,a.A[d++]=g[c]>>24&255;else a.A=e;a.H=e.symbols;if(!a.A.length){q("Empty ROM: "+b);return}if(1==a.A.length){q(a.A[0]);return}}catch(h){a.wa("ROM data error: "+h.message);return}else for(b=
c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.A=Array(b.length),e=0;e<b.length;e++)a.A[e]=qa(b[e],16);Xn(a)}}
function Xn(a){if(!yb(a))if(!a.J)zb(a);else if(a.A&&a.oa){a.C||(a.C=a.A.length);if(a.A.length!=a.C)xb(a,"ROM size ("+ra(a.A.length,8,!0)+") does not match specified size ("+ra(a.C,8,!0)+")");else{var b=a.G;if(Ub(a.oa,b,a.C,gc)){for(var c=0;c<a.A.length;c++){var d=a.oa,e=b+c;d.X[(e&d.D)>>>d.B].ef(e&d.C,a.A[c]&255,e)}b=!0}else b=!1;if(b){b=[];"number"==typeof a.F?b.push(a.F):null!=a.F&&a.F.length&&(b=a.F);for(c=0;c<b.length;c++){d=a;e=b[c];var f=ac(d.oa,d.G,d.C);$b(d.oa,e,d.C,f)}a.B&&((b=pb(a.B,a.id))?
(c=a.A,d=a.I,b.Oa==Yn?Zn(b,c,d||[12640,8752],8):b.Oa==$n&&Zn(b,c,d||[14221,16269],8),zb(b)):a.wa("Unable to find component: "+a.B));delete a.A}}zb(a)}}Va(function(){for(var a=mb(document,"pcx86","rom"),b=0;b<a.length;b++){var c=a[b],d=nb(c);d=new Vn(d);lb(d,c)}});function ao(a){u.call(this,"RAM",a);this.B=a.addr;this.A=a.size;this.F=a.test;this.D=!!this.A;this.C=!1}ja(ao,u);l=ao.prototype;l.jc=function(a,b,c,d){this.oa=b;this.R=c;this.Ea=d;this.V=Eb(a,"ChipSet");zb(this)};
l.Rb=function(a,b){return!b&&(this.reset(),a&&this.controller&&!this.restore(a))?!1:!0};l.Qb=function(a){return a&&this.controller?this.save():!0};
l.reset=function(){if(!this.B&&!this.D&&this.V){var a=1024*jk(this.V);this.A&&a!=this.A&&(ec(this.oa,this.B,this.A),this.C=!1);this.A=a}!this.C&&this.A&&Ub(this.oa,this.B,this.A,1)&&(this.C=!0,"ramCPQ"==this.Ce&&(this.controller=new bo(this),Ub(this.oa,co,4,4,this.controller)));if(this.C){if(this.F||mc(this.oa,1138,4660),"ramCPQ"!=this.Ce&&this.V&&(a=this.V,a.A)){var b=1048576>this.B?uk:23,c=a.A[b]|a.A[b+1]<<8;c+=this.A>>10;a.A[b]=c&255;a.A[b+1]=c>>8;Ek(a)}}else q("No RAM allocated")};
l.save=function(){var a=new Ve(this);this.controller&&a.set(0,this.controller.save());return a.data()};l.restore=function(a){return this.controller?this.controller.restore(a[0]):!0};function bo(a){this.F=a;this.C=eo;this.D=fo;this.B=go;this.A=null}l=bo.prototype;l.save=function(){return[this.C,this.B]};l.restore=function(a){this.Cb(0,a[0]&255);this.Cb(2,a[1]&255);return!0};l.Ia=function(a){var b=255;2>a?b=a&1?this.D>>8:this.D&255:4>a&&(b=a&1?this.B>>8:this.B&255);return b};
l.Cb=function(a,b){if(a)2==a&&(this.B=this.B&-256|b);else if(b!=(this.C&255)){a=this.F.oa;if(b&ho)this.A&&($b(a,io,jo,this.A),this.A=null);else{this.A||(this.A=ac(a,io,jo));var c=ac(a,ko,jo);$b(a,io,jo,c,b&lo?1:gc)}this.C=this.C&-256|b}};l.pi=function(){return mo};l.og=function(){return no};var co=-2134900736,ko=16646144,io=917504,jo=131072,ho=1,lo=2,eo=65535,fo=2575,go=2,mo=[null,0],no=[function(a){return this.controller.Ia(a)},null,null,function(a,b){this.controller.Cb(a,b)},null,null];
Va(function(){for(var a=mb(document,"pcx86","ram"),b=0;b<a.length;b++){var c=a[b],d=nb(c);d=new ao(d);lb(d,c)}});function oo(a){u.call(this,"Keyboard",a);po(this,a.model);this.da=Oa("Mobi");this.ba=Oa("MSIE");this.X=0;this.aa=this.mg=!1;this.A=[];this.ia=50;this.W=0;this.D=null;this.G=a.autoType;this.M=!1;this.J=this.K=null;this.exports={type:this.pg,wait:this.Zn};zb(this)}ja(oo,u);l=oo.prototype;
l.Bb=function(a,b,c,d){var e=this,f=a+"-"+b;if(void 0===this.ja[f])switch(b){case "kbd":case "screen":return c.onkeydown=function(a){return qo(e,a,!0)},c.onkeypress=function(a){a=a||window.event;a=a.which||a.keyCode;if(ro(e.na)){e.B="";var b=!V[a]||!!(e.Vb&so);b||to(e,a,!0);a=b}else a=!1;return a},c.onkeyup=function(a){return qo(e,a,!1)},!0;case "caps-lock":return this.ja[f]=c,c.onclick=function(a){a.preventDefault();e.na&&bd(e.na);to(e,uo,!0)},!0;case "num-lock":return this.ja[f]=c,c.onclick=function(a){a.preventDefault();
e.na&&bd(e.na);to(e,vo,!0)},!0;case "scroll-lock":return this.ja[f]=c,c.onclick=function(a){a.preventDefault();e.na&&bd(e.na);to(e,wo,!0)},!0;default:var g=b.toUpperCase().replace(/-/g,"_");if(void 0!==xo[g]&&"button"==a)return this.ja[f]=c,c.onclick=function(a,b,c){return function(b){b.preventDefault();a.na&&bd(a.na);a.B="";yo(a,c,!0);to(a,c,!0)}}(this,g,xo[g]),!0;if(void 0!==zo[b])return this.X++,this.ja[f]=c,a=function(a,b,c){return function(b){b.preventDefault();a.na&&bd(a.na);a.B="";to(a,c)}}(this,
b,zo[b]),b=function(a,b,c){return function(){Ao(a,c)}}(this,b,zo[b]),"ontouchstart"in window?(c.ontouchstart=a,c.ontouchend=b):(c.onmousedown=a,c.onmouseup=c.onmouseout=b),!0;if(d)return this.ja[f]=c,c.onclick=function(a){a.preventDefault();e.na&&bd(e.na);return e.pg(d)},!0}return!1};
function Bo(a,b,c){if(a.X){for(var d in p)if(b==p[d]){b=+d;(d=pa[d])&&(b=+d);break}for(var e in zo)if((d=zo[e]==b)||(d=b,d>=n.fd&&d<=n.z&&(d-=n.fd-n.Fd),d=zo[e]==d),d){(a=a.ja["key-"+e])&&void 0!==c&&(a.style.color=c?"#ffffff":"#000000",a.style.backgroundColor=c?"#000000":"#ffffff");break}}}l.jc=function(a,b,c,d){this.na=a;this.oa=b;this.R=c;this.Ea=d;var e=this;this.ka=Rc(this.R,this.id+".inject",function(){Co(e)});this.V=Eb(a,"ChipSet");this.G=Qc(a,"autoType")||this.G;Re(c,33,this.dm.bind(this))};
l.dm=function(){if(10==(this.R.F>>8&255))if(this.M=!0,this.J)this.J(),this.J=null,this.M=!1;else{var a=this.G;!this.D&&a&&(this.D=a,this.pg(this.D))}return!0};function po(a,b){var c=0;a.ca=null;"string"==typeof b&&(a.ca=b.toUpperCase(),c=Do.indexOf(a.ca),0>c&&(c=0));if(b=Do[c])a.fa=parseInt(b.substr(2),10)}function an(a,b,c){a.L!==c&&(a.L=a.N=c)&&(a.H=!0);a.I!==b&&(a.I=b)&&!a.N&&On(a,!0);a.I&&a.N&&(a.Pb=[],qn(a,rn),a.N=!1)}function qn(a,b){a.V&&(a.Pb.unshift(b),a.H=!0,Mn(a.V,b))}
function hn(a){if(a.Pb.length&&a.H){var b=a.Pb[0];a.V&&Mn(a.V,b)}}function Ym(a){var b=0;a.Pb.length&&(b=a.Pb[0]);return b}function On(a,b){0<a.Pb.length&&(a.Pb.shift(),(a.H=b)&&a.Pb.length&&a.V&&Mn(a.V,a.Pb[0]))}l.Rb=function(a,b){return!b&&(this.reset(),a&&this.restore&&!this.restore(a))?!1:!0};l.Qb=function(a){return a?this.save():!0};l.reset=function(){if(!this.ca&&this.V)switch(this.V.ca){case Vj:case 5160:po(this,Do[0]);break;default:po(this,Do[1])}Eo(this)};
l.save=function(){var a=new Ve(this),b=[];b[0]=this.L;b[1]=this.I;a.set(0,b);return a.data()};l.restore=function(a){return Eo(this,a[0])};function Eo(a,b){var c=0;b?a.D=a.G:(b=[],a.D=null);a.L=b[c++];a.I=b[c];a.F=0;a.Vb=a.C=0;a.Pb=[];a.H=!0;a.B="";return!0}
l.pg=function(a,b){if(a&&!this.B){if(a){for(var c,d=/(?:^|[^$])\$([a-z]+)/g;c=d.exec(a);){switch(c[1]){case "date":var e=Ca("n-j-Y");break;case "time":e=Ca("h:i:s");break;default:continue}a=a.replace("$"+c[1],e)}a=a.replace(/\$\$/g,"$$")}this.B=a;this.W=b||150;Co(this);return!0}return!1};
function Co(a){for(var b=0;0<a.B.length&&!b;)if(b=a.B.charAt(0),a.B=a.B.substr(1),b=b.charCodeAt(0),b<=n.yh)b!=n.$f&&b!=n.ag&&b!=n.bg&&(b+=4E3);else if(28==b)b=n.$f+4E3;else if(29==b)b=n.ag+4E3;else if(30==b)b=n.bg+4E3;else if(240<=b){a.W=100*(b-240)||150;b=0;break}b&&(10==b&&(b=13),to(a,b,!0));a.B.length?cd(a.R,a.ka,a.W):a.K&&(a.K(),a.K=null)}l.Zn=function(a,b){var c=!1;switch(b){case "DOS":this.M?c=!0:this.J=a;break;default:this.B.length?this.K=a:c=!0}return c};
function yo(a,b,c,d){if(V[b]){var e=Math.floor(b/1E3)&2;if(b=Fo[b]||0){!e||b&Go||(b>>=1);if(b&Ho){if(!1===d)return!0;d=null}null==d?d=!((c?a.C:a.Vb)&b):d||b&Io&&(b=Io);if(c){a.C&=~b;d&&(a.C|=b);c=b;var f,g;for(g in Jo)d="led-"+g,e=Jo[g],c&&c!=e||!(f=a.ja[d])||(f.style.backgroundColor=a.C&e?"#00ff00":"#000000")}else a.Vb&=~b,d&&(a.Vb|=b);return!0}}return!1}
function to(a,b,c){if((V[b]||V[b+=1E3])&&a.R&&a.R.Y.cb){Fo[b]&&a.A.length&&0<a.A[0].bd&&(a.A[0].bd=0);for(var d,e=0;e<a.A.length;e++)if(d=a.A[e],d.Yd==b){if(!c||0<=d.bd){e=-1;break}0<e&&(0<a.A[0].bd&&(a.A[0].bd=0),a.A.splice(e,1));break}0>e||(e==a.A.length&&(d={},d.Yd=b,d.Vb=a.Vb,Bo(a,b,!0),e++),0<e&&a.A.splice(0,0,d),d.Je=!0,d.bd=c?-1:Fo[b]?0:1,Ko(a,d))}}
function Ao(a,b,c){if(!V[b]||!(c||a.R&&a.R.Y.cb))return!1;for(var d=!1,e=0;e<a.A.length;e++){var f=a.A[e];if(f.Yd==b||f.Yd==p[b]){a.A.splice(e,1);f.qh&&clearTimeout(f.qh);f.Je&&!c&&Lo(a,f.Yd,!1);Bo(a,b,!1);d=!0;break}}!a.A.length&&a.aa&&(yo(a,uo),a.aa=!1);return d}function Ko(a,b){if(!a.R||!a.R.Y.cb)Ao(a,b.Yd,!0);else if(Lo(a,b.Yd,b.Je)&&b.bd){if(0>b.bd){if(!b.Je){Ao(a,b.Yd);return}b.Je=!1;var c=a.ia}else c=1==b.bd++?500:100;b.qh=setTimeout(function(a){return function(){Ko(a,b)}}(a),c)}}
function Mo(a,b,c){var d=b;if(b>=n.Fd&&b<=n.qf)!(a.Vb&(No|Oo|Po))==c&&(d=b+(n.fd-n.Fd));else if(b>=n.fd&&b<=n.z)!!(a.Vb&(No|Oo|Po))==c&&(d=b-(n.fd-n.Fd));else if(!!(a.Vb&(No|Oo))==c){if(a=p[b])d=a}else if(a=pa[b])d=a;return d}l.Qf=function(a){a||(this.Vb&=~Io)};
function qo(a,b,c){var d=!0,e=!1,f=!1,g=b.keyCode;if(!ro(a.na))return!1;a.B="";qb(a.Dd);var h=Mo(a,g,!0);a.mg&&h==n["`"]&&(g=h=27);if(V[g+1E3])if(h+=1E3,2==b.location&&(h+=2E3),yo(a,h,!1,c)){if(20==g||144==g||145==g)a.ba||(c=e=!0);if(!(c||91!=g&&93!=g))for(var k=0;k<a.A.length;k++){var m=a.A[k];m.Je=!1;0<m.bd&&(m.bd=0)}}else 8==g&&(a.Vb&(Qo|Ro))==Qo&&(h=So),d=!1;else if(V[h]&&a.Vb&(To|Uo)&&(d=!1),d&&c||a.Vb&Vo)f=!0;d||b.preventDefault();f||a.da&&d||(c?to(a,h,e):Ao(a,h)||(b=Mo(a,g,!1),b!=h&&Ao(a,b)));
return d}
function Lo(a,b,c){var d=!1;yo(a,b,!0,c);var e=V[b]||V[b+1E3];if(void 0!==e){e==Wo&&(a.Vb&(Qo|Ro))==(Qo|Ro)&&(e=Xo);d=[];var f=e&255;if(83<f&&83==a.fa)return!1;d.push(f|(c?0:Yo));for(b=b>=n.Fd&&b<=n.qf||b>=n.fd&&b<=n.z;e>>>=8;){var g=0,h=e&255;f==Zo||f==$o?d.push(f|(c?0:Yo)):(h==W?a.C&(No|Oo)||a.C&Po&&b||(g=h):h==X?a.C&(Qo|ap)||(g=h):h==bp?a.C&(Ro|cp)||(g=h):d.push(f|(c?0:Yo)),g&&(c?d.unshift(g):d.push(g|Yo)))}for(c=0;c<d.length;c++)e=a,f=d[c],e.Pb&&(e.Pb.length<dp?(e.Pb.push(f),1==e.Pb.length&&e.V&&
Mn(e.V,f)):e.Pb.length==dp&&e.Pb.push(ep));d=!0}return d}
var Do=["US83","US84","US101"],uo=1020,vo=1144,wo=1145,fp=n.Xj+4E3,gp=n.Yj+4E3,hp=n.Zj+4E3,ip=n.$j+4E3,jp=n.ak+4E3,kp=n.bk+4E3,lp=n.ck+4E3,mp=n.dk+4E3,np=n.$f+4E3,op=n.ag+4E3,pp=n.ek+4E3,qp=n.fk+4E3,rp=n.bg+4E3,sp=n.gk+4E3,tp=n.hk+4E3,up=n.ik+4E3,vp=n.jk+4E3,wp=n.kk+4E3,xp=n.lk+4E3,yp=n.mk+4E3,zp=n.nk+4E3,Ap=n.pk+4E3,Bp=n.qk+4E3,Cp=n.rk+4E3,Dp=n.sk+4E3,Ep=n.yh+4E3,So=4145,Wo=14,X=29,W=42,bp=56,Xo=83,Yo=128,Zo=224,$o=225,Oo=1,No=2,ap=4,Qo=8,To=12,cp=16,Ro=32,Uo=48,so=128,Vo=192,Go=85,Io=255,Po=512,
Ho=3584,Fo={};Fo[3016]=Oo;Fo[1016]=No;Fo[1017]=Qo;Fo[1018]=Ro;Fo[1091]=so;Fo[1093]=64;Fo[1224]=so;Fo[uo]=Po;Fo[vo]=1024;Fo[wo]=2048;
var xo={TAB:1009,ESC:1027,F1:1112,F2:1113,F3:1114,F4:1115,F5:1116,F6:1117,F7:1118,F8:1119,F9:1120,F10:1121,LEFT:1037,UP:1038,RIGHT:1039,DOWN:1040,SYSREQ:4027,CTRL_C:hp,CTRL_BREAK:So,CTRL_ALT_DEL:4046,CTRL_ALT_INS:4045,CTRL_ALT_ENTER:6013},zo={esc:1027,1:n["1"],2:n["2"],3:n["3"],4:n["4"],5:n["5"],6:n["6"],7:n["7"],8:n["8"],9:n["9"],0:n["0"],"-":n["-"],"=":n["="],bs:1008,tab:1009,q:n.Q,w:n.Qh,e:n.E,r:n.Lh,t:n.Nh,y:n.Sh,u:n.Oh,i:n.Dh,o:n.Jh,p:n.Kh,"[":n["["],"]":n["]"],enter:13,ctrl:1017,a:n.Fd,s:n.Mh,
d:n.zh,f:n.Ah,g:n.Bh,h:n.Ch,j:n.Eh,k:n.Fh,l:n.Gh,";":n[";"],quote:n["'"],"`":n["`"],shift:1016,"\\":n["\\"],z:n.qf,x:n.Rh,c:n.xh,v:n.Ph,b:n.wh,n:n.Ih,m:n.Hh,",":n[","],".":n["."],"/":n["/"],"right-shift":3016,prtsc:1044,alt:1018,space:1032,"caps-lock":uo,f1:1112,f2:1113,f3:1114,f4:1115,f5:1116,f6:1117,f7:1118,f8:1119,f9:1120,f10:1121,"num-lock":vo,"scroll-lock":wo,"num-home":1036,"num-up":1038,"num-pgup":1033,"num-sub":1109,"num-left":1037,"num-center":1101,"num-right":1039,"num-add":1107,"num-end":1035,
"num-down":1040,"num-pgdn":1034,"num-ins":1045,"num-del":1046,sysreq:84},Jo={"caps-lock":Po,"num-lock":1024,"scroll-lock":2048},V={1027:1};V[n["1"]]=2;V[n["!"]]=2|W<<8;V[n["2"]]=3;V[n["@"]]=3|W<<8;V[n["3"]]=4;V[n["#"]]=4|W<<8;V[n["4"]]=5;V[n.$]=5|W<<8;V[n["5"]]=6;V[n["%"]]=6|W<<8;V[n["6"]]=7;V[n["^"]]=7|W<<8;V[n["7"]]=8;V[n["&"]]=8|W<<8;V[n["8"]]=9;V[n["*"]]=9|W<<8;V[n["9"]]=10;V[n["("]]=10|W<<8;V[n["0"]]=11;V[n[")"]]=11|W<<8;V[n["-"]]=12;V[n._]=12|W<<8;V[n["="]]=13;V[n["+"]]=13|W<<8;V[1008]=Wo;
V[1009]=15;V[n.q]=16;V[n.Q]=16|W<<8;V[n.Xn]=17;V[n.Qh]=17|W<<8;V[n.e]=18;V[n.E]=18|W<<8;V[n.r]=19;V[n.Lh]=19|W<<8;V[n.t]=20;V[n.Nh]=20|W<<8;V[n.y]=21;V[n.Sh]=21|W<<8;V[n.Vn]=22;V[n.Oh]=22|W<<8;V[n.Qk]=23;V[n.Dh]=23|W<<8;V[n.rm]=24;V[n.Jh]=24|W<<8;V[n.p]=25;V[n.Kh]=25|W<<8;V[n["["]]=26;V[n["{"]]=26|W<<8;V[n["]"]]=27;V[n["}"]]=27|W<<8;V[13]=28;V[1017]=X;V[n.fd]=30;V[n.Fd]=30|W<<8;V[n.Sn]=31;V[n.Mh]=31|W<<8;V[n.d]=32;V[n.zh]=32|W<<8;V[n.Nk]=33;V[n.Ah]=33|W<<8;V[n.Ok]=34;V[n.Bh]=34|W<<8;V[n.Pk]=35;
V[n.Ch]=35|W<<8;V[n.em]=36;V[n.Eh]=36|W<<8;V[n.k]=37;V[n.Fh]=37|W<<8;V[n.fm]=38;V[n.Gh]=38|W<<8;V[n[";"]]=39;V[n[":"]]=39|W<<8;V[n["'"]]=40;V[n['"']]=40|W<<8;V[n["`"]]=41;V[n["~"]]=41|W<<8;V[1016]=W;V[n["\\"]]=43;V[n["|"]]=43|W<<8;V[n.z]=44;V[n.qf]=44|W<<8;V[n.x]=45;V[n.Rh]=45|W<<8;V[n.Ek]=46;V[n.xh]=46|W<<8;V[n.Wn]=47;V[n.Ph]=47|W<<8;V[n.Dk]=48;V[n.wh]=48|W<<8;V[n.n]=49;V[n.Ih]=49|W<<8;V[n.jm]=50;V[n.Hh]=50|W<<8;V[n[","]]=51;V[n["<"]]=51|W<<8;V[n["."]]=52;V[n[">"]]=52|W<<8;V[n["/"]]=53;
V[n["?"]]=53|W<<8;V[3016]=54;V[1044]=55;V[1018]=bp;V[1032]=57;V[uo]=58;V[1112]=59;V[1113]=60;V[1114]=61;V[1115]=62;V[1116]=63;V[1117]=64;V[1118]=65;V[1119]=66;V[1120]=67;V[1121]=68;V[vo]=69;V[wo]=70;V[1036]=71;V[1038]=72;V[1033]=73;V[1109]=74;V[1037]=75;V[1101]=76;V[1039]=77;V[1107]=78;V[1035]=79;V[1040]=80;V[1034]=81;V[1045]=82;V[1046]=Xo;V[4027]=84;V[1122]=87;V[1123]=88;V[1091]=91;V[1093]=93;V[1224]=91;V[fp]=30|X<<8;V[gp]=48|X<<8;V[hp]=46|X<<8;V[ip]=32|X<<8;V[jp]=18|X<<8;V[kp]=33|X<<8;
V[lp]=34|X<<8;V[mp]=35|X<<8;V[np]=23|X<<8;V[op]=36|X<<8;V[pp]=37|X<<8;V[qp]=38|X<<8;V[rp]=50|X<<8;V[sp]=49|X<<8;V[tp]=24|X<<8;V[up]=25|X<<8;V[vp]=16|X<<8;V[wp]=19|X<<8;V[xp]=31|X<<8;V[yp]=20|X<<8;V[zp]=22|X<<8;V[Ap]=47|X<<8;V[Bp]=17|X<<8;V[Cp]=45|X<<8;V[Dp]=21|X<<8;V[Ep]=44|X<<8;V[So]=70|X<<8;V[4046]=Xo|X<<8|bp<<16;V[4045]=82|X<<8|bp<<16;V[6013]=28|X<<8|bp<<16;var on=255,sn=243,tn=237,rn=170,pn=250,ep=255,dp=20;
Va(function(){for(var a=mb(document,"pcx86","keyboard"),b=0;b<a.length;b++){var c=a[b],d=nb(c);d=new oo(d);lb(d,c)}});
function Fp(a,b,c,d){if(void 0!==b&&(!c||c.length)){this.video=a;var e=Gp[b],f=a.da||e[5];if(!c||6>c.length)c=[!1,0,null,null,0,Array(b<Yn?Hp:Ip)];this.Oa=b;this.ab=e[2];this.Hb=e[3];this.Zc=d||e[4];65536<=this.Zc&&720896<=this.ab&&(this.Hb=Math.min(this.Zc>>2,32768));this.dc=c[0];this.Ec=c[1];this.bf=c[2];this.Z=c[3];this.oc=c[4]&255;this.Tf=c[4]>>8&255;this.Ua=c[5];this.tg=Hp;this.Bd=this.Ua[Jp]|this.Ua[Kp]<<8;this.sf=63;if(b>=Yn){this.sf=255;this.tg=Ip;b=c[6];void 0===b&&(b=[!1,0,Array(Lp),0,f==
mk?0:Mp,0,0,Array(Np),0,0,0,Array(Op),0,[this.ab,this.Hb,this.Zc],Array(this.Zc>>2),Pp|Qp|Rp|Sp|Tp,0,-1,0,-1,0,-1,0,0,0,0,Up,Vp,0,0,Wp,Array(Xp)]);this.Ie=b[0];this.Td=b[1];this.vc=b[2];this.mh=b[3];this.cf=b[4];this.Wf=b[5];this.Wd=b[6];this.Vd=b[7];this.Nj=b[8];this.Oj=b[9];this.Ud=b[10];this.od=b[11];this.qb=b[12];d=b[13];"number"==typeof d&&(d=[this.ab,this.Hb,d]);this.ab=d[0];this.Hb=d[1];d=this.Zc>>2;if((this.ud=b[14])&&this.ud.length<d){e=this.ud;for(var g=0,h=Array(d),k=0;k<e.length-1;){for(var m=
e[k++],r=e[k++];m--;)h[g]=r,g+=2;g==d&&(g=1)}this.ud=h}(d=b[15])&&(d&Tp?d&=~Tp:d=Yp[d&65280]|Yp[d&255]);this.Yf(d);this.ih=b[16];this.Ya=b[17];this.Ac=b[18];this.vb=b[19];this.We=b[20];this.md=b[21];this.Ad=b[22];this.ug=b[23];this.vg=b[24];this.Bd=b[25];this.jh=this.Xe=0;this.Oa==$n&&(this.nh=b[26],this.Uf=b[27],this.cd=b[28],this.wc=b[29],this.Vf=b[30],this.xe=b[31])}f=Zp[f]||Zp[mk];this.xg=a.R.U.zd/f.Mf|0;this.mm=this.xg*f.Rf/100|0;this.yg=this.xg*f.Lf|0;this.om=this.yg*f.Sf/100|0;this.zg=c[7]||
0}}
function $p(a){var b=[];if(void 0!==a.Oa){b[0]=a.dc;b[1]=a.Ec;b[2]=a.bf;b[3]=a.Z;b[4]=a.oc|a.Tf<<8;b[5]=a.Ua;if(a.Oa>=Yn){var c=[];c[0]=a.Ie;c[1]=a.Td;c[2]=a.vc;c[3]=a.mh;c[4]=a.cf;c[5]=a.Wf;c[6]=a.Wd;c[7]=a.Vd;c[8]=a.Nj;c[9]=a.Oj;c[10]=a.Ud;c[11]=a.od;c[12]=a.qb;c[13]=[a.ab,a.Hb,a.Zc];var d;if(d=a.ud){var e=0,f=[];if(void 0!==d[0])for(var g=0;2>g;g++)for(var h=g;h<d.length;){for(var k=d[h],m=h+2;m<d.length&&d[m]===k;)m+=2;f[e++]=m-h>>1;f[e++]=k;h=m}f.length<d.length&&(d=f)}c[14]=d;c[15]=a.sg|Tp;
c[16]=a.ih;c[17]=a.Ya;c[18]=a.Ac;c[19]=a.vb;c[20]=a.We;c[21]=a.md;c[22]=a.Ad;c[23]=a.ug;c[24]=a.vg;c[25]=a.Bd;a.Oa==$n&&(c[26]=a.nh,c[27]=a.Uf,c[28]=a.cd,c[29]=a.wc,c[30]=a.Vf,c[31]=a.xe);b[6]=c}b[7]=a.zg}return b}Fp.prototype.pi=function(a){return[this.ud,a-this.ab]};Fp.prototype.og=function(){return this.A};Fp.prototype.Yf=function(a){if(null!=a&&a!=this.sg){var b=a&aq,c=bq[b];c||b&Qp&&(c=bq[Qp]);b=a&cq;var d=bq[b];d||b&Sp&&(d=bq[Sp]);this.A||(this.A=Array(6));this.A[0]=c;this.A[1]=d;this.sg=a}};
function dq(a,b){var c=a.Ua[b];if(null!=c&&a.Oa>=Yn){var d=0,e=0,f=0;switch(b){case eq:d=fq;a.Oa==$n&&(e=gq);break;case hq:a.Oa==Yn&&(d=iq);break;case jq:d=kq;a.Oa==$n&&(e=lq);break;case mq:d=nq;a.Oa==$n&&(e=oq);break;case pq:d=qq;a.Oa==$n&&(f=rq);break;case sq:d=tq,a.Oa==$n&&(f=uq)}d&&(c|=a.Ua[vq]&d?256:0,c|=a.Ua[vq]&e?512:0,c|=a.Ua[wq]&f?512:0)}return c}
var Kp=12,Jp=13,Hp=18,eq=6,vq=7,fq=1,nq=2,kq=4,qq=8,tq=16,iq=32,gq=32,oq=64,lq=128,wq=9,rq=32,uq=64,hq=10,jq=16,mq=18,pq=21,sq=24,Ip=25,xq={},yq=(xq[0]=255,xq[1]=255,xq[2]=255,xq[3]=15,xq[4]=127,xq[5]=31,xq[6]=127,xq[7]=127,xq[8]=3,xq[9]=31,xq[10]=127,xq[11]=31,xq[Kp]=63,xq[Jp]=255,xq[14]=63,xq[15]=255,xq[16]=63,xq[17]=255,xq),Lp=20,Mp=1,Up=1,Np=5,Vp=255,Wp=0,Xp=256,Op=9,Pp=1024,Qp=4096,aq=65280,Rp=0,Sp=16,cq=255,Tp=-2147483648,Yp=[];Yp[2]=Pp;Yp[3]=Pp|Qp;Yp[16]=1280;Yp[512]=Rp;Yp[1024]=Rp|32;
Yp[1536]=Rp|96;Yp[2560]=Rp|160;Yp[3584]=Rp|224;Yp[768]=Rp|Sp;Yp[4096]=1;Yp[8192]=2;Yp[24576]=98;Yp[40960]=162;Yp[57344]=226;var bq=[];bq[Pp]=function(a){a+=this.G;return(this.controller.qb=this.S[a])>>this.controller.ih&255};bq[Pp|16384]=function(a){return(this.controller.qb=this.S[(a&-4)+this.G])>>((a&3)<<3)&255};bq[Pp|Qp]=function(a){a+=this.G;var b=this.controller.qb=this.S[a&-2];return(a&1?b>>8:b)&255};
bq[1280]=function(a){a+=this.G;a=this.controller.qb=this.S[a];for(var b=this.controller.vg,c=this.controller.ug&b,d=0,e=128;e;)(a&b)==c&&(d|=e),c>>>=1,b>>>=1,e>>=1;return d};bq[Rp]=function(a,b){a+=this.G;b=(b|b<<8|b<<16|b<<24)&this.controller.md|this.controller.Ad;b=b&this.controller.vb|this.controller.qb&~this.controller.vb;b=b&this.controller.Ya|this.S[a]&~this.controller.Ya;this.S[a]!=b&&(this.S[a]=b,this.Fa=!0)};
bq[Rp|32]=function(a,b){a+=this.G;b=b>>this.controller.Ac|b<<8-this.controller.Ac&255;b=(b|b<<8|b<<16|b<<24)&this.controller.md|this.controller.Ad;b=b&this.controller.vb|this.controller.qb&~this.controller.vb;b=b&this.controller.Ya|this.S[a]&~this.controller.Ya;this.S[a]!=b&&(this.S[a]=b,this.Fa=!0)};
bq[Rp|96]=function(a,b){a+=this.G;b=b>>this.controller.Ac|b<<8-this.controller.Ac&255;b=(b|b<<8|b<<16|b<<24)&this.controller.md|this.controller.Ad;b&=this.controller.qb;b=b&this.controller.vb|this.controller.qb&~this.controller.vb;b=b&this.controller.Ya|this.S[a]&~this.controller.Ya;this.S[a]!=b&&(this.S[a]=b,this.Fa=!0)};
bq[Rp|160]=function(a,b){a+=this.G;b=b>>this.controller.Ac|b<<8-this.controller.Ac&255;b=(b|b<<8|b<<16|b<<24)&this.controller.md|this.controller.Ad;b|=this.controller.qb;b=b&this.controller.vb|this.controller.qb&~this.controller.vb;b=b&this.controller.Ya|this.S[a]&~this.controller.Ya;this.S[a]!=b&&(this.S[a]=b,this.Fa=!0)};
bq[Rp|224]=function(a,b){a+=this.G;b=b>>this.controller.Ac|b<<8-this.controller.Ac&255;b=(b|b<<8|b<<16|b<<24)&this.controller.md|this.controller.Ad;b^=this.controller.qb;b=b&this.controller.vb|this.controller.qb&~this.controller.vb;b=b&this.controller.Ya|this.S[a]&~this.controller.Ya;this.S[a]!=b&&(this.S[a]=b,this.Fa=!0)};bq[Rp|4]=function(a,b){var c=(a&-4)+this.G;a=(a&3)<<3;b=b<<a&this.controller.Ya|this.S[c]&~(255<<a&this.controller.Ya);this.S[c]!=b&&(this.S[c]=b,this.Fa=!0)};
bq[Rp|Sp]=function(a,b){a+=this.G;var c=a&-2;b=(b|b<<8|b<<16|b<<24)&this.controller.vb|this.controller.qb&~this.controller.vb;a=this.controller.Ya&(c==a?16711935:-16711936);b=b&a|this.S[c]&~a;this.S[c]!=b&&(this.S[c]=b,this.Fa=!0)};bq[1]=function(a){a+=this.G;var b=this.S[a]&~this.controller.Ya|this.controller.qb&this.controller.Ya;this.S[a]!=b&&(this.S[a]=b,this.Fa=!0)};
bq[1|Sp]=function(a){a+=this.G;var b=a&-2;a=this.controller.Ya&(b==a?16711935:-16711936);a=this.S[b]&~a|this.controller.qb&a;this.S[b]!=a&&(this.S[b]=a,this.Fa=!0)};bq[2]=function(a,b){a+=this.G;b=zq[b&15];b=b&this.controller.vb|this.controller.qb&~this.controller.vb;b=b&this.controller.Ya|this.S[a]&~this.controller.Ya;this.S[a]!=b&&(this.S[a]=b,this.Fa=!0)};
bq[98]=function(a,b){a+=this.G;b=zq[b&15];b&=this.controller.qb;b=b&this.controller.vb|this.controller.qb&~this.controller.vb;b=b&this.controller.Ya|this.S[a]&~this.controller.Ya;this.S[a]!=b&&(this.S[a]=b,this.Fa=!0)};bq[162]=function(a,b){a+=this.G;b=zq[b&15];b|=this.controller.qb;b=b&this.controller.vb|this.controller.qb&~this.controller.vb;b=b&this.controller.Ya|this.S[a]&~this.controller.Ya;this.S[a]!=b&&(this.S[a]=b,this.Fa=!0)};
bq[226]=function(a,b){a+=this.G;b=zq[b&15];b^=this.controller.qb;b=b&this.controller.vb|this.controller.qb&~this.controller.vb;b=b&this.controller.Ya|this.S[a]&~this.controller.Ya;this.S[a]!=b&&(this.S[a]=b,this.Fa=!0)};bq[3]=function(a,b){a+=this.G;b=b>>this.controller.Ac|b<<8-this.controller.Ac&255;b=(b|b<<8|b<<16|b<<24)&this.controller.vb;b=this.controller.We&b|this.controller.qb&~b;b=b&this.controller.Ya|this.S[a]&~this.controller.Ya;this.S[a]!=b&&(this.S[a]=b,this.Fa=!0)};
function Y(a,b,c,d,e){u.call(this,"Video",a);var f=this,g;this.Pc=Oa("Gecko/");this.ca=a.model;var h=Aq[this.ca]||Aq.mda;this.Oa=h[0];this.Zc=a.memory||0;this.Vc=a.switches;this.Lb=a.randomize;null==this.Lb&&(this.Lb=1);this.ba=a.mode;if(null==this.ba||null==Bq[this.ba])this.ba=h[1];this.Jb=a.charCols;this.sc=a.charRows;if(void 0===this.Jb||void 0===this.sc)this.Jb=Bq[this.ba][0],this.sc=Bq[this.ba][1];this.X=a.screenWidth;this.ia=a.screenHeight;this.Rc=a.scale;this.rd=12<=Math.round(this.X/this.Jb);
this.M=b;this.J=c;this.F=(this.Ef=d)||b||null;this.Yb=a.screenColor||"black";this.Uc=(1-(Ra("flicker")||a.flicker||0)).toString();this.Fb=!1;b&&(b.style.backgroundColor=this.Yb);e&&(e.style.backgroundColor=this.Yb);b=a.smoothing;(c=Ra("smoothing"))&&(b="true"==c);null!=b&&(g=Pa(this.J,"imageSmoothingEnabled"))&&(this.J[g]=b);this.Wc=a.touchScreen;this.gb=Cq;this.K=null;this.qd=a.autoLock;this.ab=this.Hb=0;this.qa=[];this.fa=Array(this.Oa==$n?256:16);this.Ga=!1;if(this.N=e)if(g=Pa(e,"requestFullscreen")||
Pa(e,"requestFullScreen")){this.N.A=e[g];if(e=Pa(document,"on","fullscreenchange")){var k=Pa(document,"fullscreenElement")||Pa(document,"fullScreenElement");document.addEventListener(e,function(){Dq(f,!!k)},!1)}(e=Pa(document,"on","fullscreenerror"))&&document.addEventListener(e,function(){Dq(f,null)},!1)}if(this.F&&(this.F.onfocus=function(){return f.Qf(!0)},this.F.onblur=function(){return f.Qf(!1)},this.F.Md=(g=Pa(this.F,"requestPointerLock"))&&this.F[g],this.F.B=(g=Pa(this.F,"exitPointerLock"))&&
this.F[g],this.F.Md&&(e=Pa(document,"on","pointerlockchange")))){var m=Pa(document,"pointerLockElement");document.addEventListener(e,function(){f.Ye(!(!m||document[m]!==f.F))},!1)}(this.xa=a.fontROM)&&"json"!=ta(this.xa)&&(this.xa=Ia()+"/api/v1/dump?file="+this.xa+"&format=bytes")}ja(Y,u);l=Y.prototype;
l.jc=function(a,b,c,d){var e=this;this.oa=b;this.R=c;this.Ea=d;c=+Qc(a,"randomize");0<=c&&1>=c&&(this.Lb=c);c=(c=Aq[this.ca])&&c[0];c!==Eq&&(oc(b,this,Fq),qc(b,this,Gq));c!==Hq&&(oc(b,this,Iq),qc(b,this,Jq));this.Oa>=Yn&&(oc(b,this,Kq),qc(b,this,Lq));this.Oa==$n&&(oc(b,this,Mq),qc(b,this,Nq));if((this.C=Eb(a,"Keyboard"))&&this.M){for(var f in this.ja)0<f.indexOf("lock")&&this.C.Bb("led",f,this.ja[f]);this.C.Bb(this.Ef?"textarea":"canvas","screen",this.F)}this.xb=9;(this.V=Eb(a,"ChipSet"))&&this.Vc&&
this.Oa==Yn&&(this.xb=Aj(this.Vc,this.xb));"mouse"==this.Wc?(this.K=Eb(a,"Mouse"))&&Oq(this,Pq):"keygrid"==this.Wc&&this.C&&Oq(this,Qq);this.gb||Oq(this,Rq);if(this.xa){var g="Loading "+this.xa+"...";Ha(this.xa,null,!0,function(a,b,c){Sq(e,a,b,c)},function(){e.rb(g,wb)})}Rc(this.R,this.id,function(){Tq(e)},1E3/Uq)};
l.Bb=function(a,b,c){var d=this;if(!this.ja[b])switch(this.ja[b]=c,b){case "fullScreen":return this.N&&this.N.A?c.onclick=function(){if(d.N){if(d.N.A){var a="100%";if(screen&&screen.width&&screen.height){var b=screen.width/screen.height,c=d.X/d.ia;b>c&&(a=Math.round(c/b*100)+"%")}d.Pc?(d.M.style.width=a,d.M.style.width=a,d.M.style.display="block",d.M.style.margin="auto"):(d.N.style.width=a,d.N.style.height="auto");d.N.style.backgroundColor=d.Yb;d.N.A()}d.F&&d.F.focus()}}:c.parentNode.removeChild(c),
!0;case "lockPointer":return this.td=c.textContent,this.F&&this.F.Md?c.onclick=function(){d.Md(!0)}:c.parentNode.removeChild(c),!0;case "refresh":return c.onclick=function(){Tq(d,!0)},!0}return!1};function Dq(a,b){!b&&a.N&&(a.Pc?a.M.style.width=a.M.style.height="":a.N.style.width=a.N.style.height="");a.C&&(a.C.mg=b)}l.Md=function(a){var b=!1;this.F&&(a?this.F.Md&&(this.F.Md(),this.K&&this.K.Ye(!0),b=!0):this.F.B&&(this.F.B(),this.K&&this.K.Ye(!1),b=!0),this.F&&this.F.focus());return b};
l.Ye=function(a){this.K&&(this.K.Ye(a),this.C&&(this.C.mg=a));var b=this.ja.lockPointer;b&&(b.textContent=a?"Press Esc to Unlock Pointer":this.td)};function Oq(a,b){var c=a.F;c&&!a.gb&&(a.gb=b,c.addEventListener("touchstart",function(b){Un(a.V,b);a.gb!=Rq&&Vq(a,b,!0)},!1),b!=Rq&&(c.addEventListener("touchmove",function(b){Vq(a,b)},!0),c.addEventListener("touchend",function(b){Vq(a,b,!1)},!1),a.mb=a.sb=a.dd=-1,a.lc=!1,a.Db=null,a.kc=!1,a.sd=function(){a.kc=!0;a.K.je(Wq,!0)}))}
l.Qf=function(a){this.C&&this.C.Qf(a)};
function Vq(a,b,c){var d=0,e=0;var f=a.M;do isNaN(f.offsetLeft)||(d+=f.offsetLeft,e+=f.offsetTop);while(f=f.offsetParent);var g=a.X/a.M.offsetWidth,h=a.ia/a.M.offsetHeight;if(b.targetTouches&&b.targetTouches.length){f=b.targetTouches[0].pageX;var k=b.targetTouches[0].pageY}else f=b.pageX,k=b.pageY;f=(f-d)*g;k=(k-e)*h;if(a.gb==Qq)c&&to(a.C,Xq[k/(a.ia/3)|0][f/(a.X/3)|0],!0);else if(a.K){e=a.lc;d=b.timeStamp-a.dd;!0===c?(a.lc=500<d,a.dd=b.timeStamp,a.Db=setTimeout(a.sd,500)):null!=a.Db&&(clearTimeout(a.Db),
a.Db=null);void 0===c&&(a.lc=!1);e||b.preventDefault();if(!1===c){a.kc?(a.K.je(Wq,!1),a.kc=!1,b=!0):b=!1;if(b)return;if(200>d){a.K.je(Wq,!0);a.K.je(Wq,!1);return}}if(c||0>a.mb||0>a.sb)a.mb=f,a.sb=k;c=Math.round(f-a.mb);b=Math.round(k-a.sb);a.mb=f;a.sb=k;a.K.qg(c,b,a.mb,a.sb)}}l.Rb=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.Qb=function(a){return a?this.save():!0};
l.reset=function(){var a=0;this.V&&(a=+lk(this.V,Ej,void 0));this.ca||(this.Oa=a==mk?Hq:Eq);this.ba=Yq;switch(this.Oa){case $n:a=7;break;case Yn:var b=Zq[this.xb];b&&(a=b[0]);a||(a=4);break;case Hq:a=mk;this.ba=$q;break;default:a=2}this.da!==a&&(this.da=a);this.B=null;this.W=this.Wb=new Fp(this,Hq);this.I=this.Eb=new Fp(this,Eq);this.Oa<Yn?this.A=new Fp:(this.A=new Fp(this,this.Oa,null,this.Zc),ar(this));br(this);this.ma=null;cr(this,this.ba);if(this.B.ab&&this.Lb){a=this.B.ab+this.Sa;for(b=this.B.ab;b<
a;b+=2){var c=65536*Math.random()|0;if(4==this.da||7==this.da){var d=b>>1&255;c=c>>8&~dr;c>>4==(c&15)&&(c^=15)}else d=c&255,c=(c&256?er|fr:gr|hr)|ir&c>>8;mc(this.oa,b,d|c<<8)}Tq(this,!0)}};function ar(a){a.A.cf&Mp?(a.W=a.Wb,a.I=a.A):(a.W=a.A,a.I=a.Eb)}l.save=function(){var a=new Ve(this);a.set(0,$p(this.Wb));a.set(1,$p(this.Eb));a.set(2,[this.da,this.ba,this.ma]);a.set(3,$p(this.A));return a.data()};
l.restore=function(a){var b=a[2];this.da=b[0];this.ba=b[1];this.ma=b[2];this.B=null;this.W=this.Wb=new Fp(this,Hq,a[0]);this.I=this.Eb=new Fp(this,Eq,a[1]);this.A=new Fp(this,this.Oa,a[3],this.Zc);this.A.dc&&ar(this);br(this);if(!jr(this))return!1;kr(this);return!0};
function Sq(a,b,c,d){if(d)a.wa("Unable to load font ROM (error "+d+": "+b+")",0>d);else{db(a.Dd,b,c);try{var e=eval("("+c+")"),f=e.bytes||e;if(!f.length){q("Empty font ROM: "+b);return}if(1==f.length){q(f[0]);return}if(8192==f.length)Zn(a,f,[6144,0]);else if(2048==f.length)Zn(a,f,[0]);else{a.wa("Unrecognized font data length ("+f.length+")");return}}catch(g){a.wa("Font ROM data error: "+g.message);return}(a.J||a.Ea)&&zb(a)}}
function lr(a,b){if(1==b)return a.fa[0]=mr[gr],a.fa[1]=mr[er],a.fa;if(2==b){var c=a.B.bf;if(a.B===a.A){var d=a.A.vc[0];c=d&7;d&16&&(c|=8);18!=a.A.vc[1]&&(c|=32)}a.fa[0]=mr[c&15];c=c&32?nr:or;for(d=0;d<c.length;d++)a.fa[d+1]=mr[c[d]];return a.fa}if(a.I===a.Eb)return mr;a.Ga&&b&&!a.fa[16]&&(a.Ga=!1);if(!a.Ga){c=a.A;d=c.xe;var e;if(8==b)for(e=0;256>e;e++){var f=d[e]||0;var g=f<<2&252;var h=f>>4&252;f=f>>10&252;a.fa[e]=[g,h,f,255]}else{var k=d&&d[255];b=null!=c.vc[15]?c.vc:pr;for(e=0;16>e;e++)f=b[e]&
63,k?(f|=(c.vc[20]&12)<<4,c.vc[16]&128&&(f&=-49,f|=(c.vc[20]&3)<<4),f=d[f],g=f<<2&252,h=f>>4&252,f=f>>10&252):(g=(f&4?170:0)|(f&32?85:0),h=(f&2?170:0)|(f&16?85:0),f=(f&1?170:0)|(f&8?85:0)),a.fa[e]=[g,h,f,255]}a.Ga=!0}return a.fa}function Zn(a,b,c,d){a.wb=b;a.Qa=c;a.Ca=d}
function br(a,b){var c=!1;if(window&&a.wb&&(!b||a.G)){var d=0,e=a.Ca?a.Ca:8,f=lr(a);null!=a.Qa[0]&&qr(a,rr,a.Qa[0],d,e,8,a.wb,f)&&(c=!0);d=a.Ca?0:2048;e=a.Ca?a.Ca:9;null!=a.Qa[1]&&(qr(a,sr,a.Qa[1],d,e,14,a.wb,tr,ur)&&(c=!0),a.Ca&&qr(a,a.Oa,a.Qa[1],0,a.Ca,14,a.wb,f)&&(c=!0))}b||(a.aa=-1,a.za=-1,a.ra=0);return c}function qr(a,b,c,d,e,f,g,h,k){var m=!1;null!=c&&(vr(a,b,c,d,e,f,g,h,k)&&(m=!0),a.rd&&vr(a,b<<1,c,d,e,f,g,h,k)&&(m=!0));return m}
function vr(a,b,c,d,e,f,g,h,k){var m=!1,r=b&1?0:1,x=a.qa[b],t=16>h.length?h.length:16;x||(x={qc:e<<r,rc:f<<r,ce:Array(t),Vh:h.slice(0,t),Fe:k,gg:Array(t)});for(k=0;k<t;k++){var z=h[k],E=x.ce[k]?x.Vh[k]:[];if(z[0]!==E[0]||z[1]!==E[1]||z[2]!==E[2]){var O,K;m=x;E=k;var da=z,oa=r,eb=c,tc=d,ai=e,Uf=f,Du=g,Eu=[0,0,0,0],Vf=document.createElement("canvas");Vf.width=m.qc<<4;Vf.height=m.rc<<4;var Sm=Vf.getContext("2d"),Wf=8>Uf||!tc?Uf:8,bi=Sm.createImageData(m.qc,m.rc);for(K=0;256>K;K++){for(z=0;z<Uf;z++)for(var Fu=
m.Fe&&E&1&&z>=Uf-2,Gu=Du[z<Wf?eb+K*Wf+z:tc+K*Wf+z-Wf],ci=0;ci<=oa;ci++)for(O=0;O<ai;O++){var Tm=O<<oa,Um=(z<<oa)+ci,Vm=Fu||Gu&128>>(8<=O&&192<=K&&223>=K?7:O)?da:Eu;wr(bi,Tm,Um,Vm);oa&&wr(bi,Tm+1,Um,Vm)}Sm.putImageData(bi,(K&15)*m.qc,(K>>4)*m.rc)}m.ce[E]="#"+ra(da[0],2)+ra(da[1],2)+ra(da[2],2);m.Vh[E]=da;m.gg[E]=Vf;m=!0}}a.qa[b]=x;return m}function xr(a){0<a.ra||0<=a.aa?0>a.za&&(a.za=0):a.za=-1}
function kr(a){if(a.G){for(var b=10;15>=b;b++)if(null==a.B.Ua[b])return;var c=a.B.Ua[10];b=c&31;var d=a.B.Ua[11]&yq[11],e=a.B.Ua[9]&yq[9],f=!1;a.B===a.A&&(f=!0,7!=e||4!=b||d||(d=7));if(c&32||b>d&&!f||b>e)yr(a);else{c=a.B.Ua[15];c|=(a.B.Ua[14]&a.B.sf)<<8;a.aa!=c&&(yr(a),a.aa=c);d=d-b+1;if(a.Xc!=b||a.Jc!=d)a.Xc=b,a.Jc=d;a.ua=e+1;xr(a)}}}
function yr(a){if(0<=a.aa){if(void 0!==a.L){var b=zr<<8,c=a.L[a.aa];if(c&b){c&=~b;b=a.aa%a.D;var d=a.aa/a.D|0;a.G&&a.qa[a.G]&&(a.Ba&&Ar(a,b,d,c,a.Ba),Ar(a,b,d,c));a.L[a.aa]=c}}a.aa=-1}}
function Br(a){var b=a.B;a.Oc=!1;var c=b.od[5];if(null!=c){var d=Pp;var e=Rp,f=b.od[3]&31;switch(c&3){case 0:if(f){e=Rp|32;switch(f&24){case 8:e=Rp|96;break;case 16:e=Rp|160;break;case 24:e=Rp|224}b.Ac=f&7}break;case 1:e=1;break;case 2:switch(f&24){default:e=2;break;case 8:e=98;break;case 16:e=162;break;case 24:e=226}break;case 3:a.Oa==$n&&(e=3,b.Ac=f&7)}c&8&&(d=1280);b=b.Vd[4];null!=b&&(b&4||(d|=Qp,e|=Sp),c&64&&(b&8&&(d|=16384,e|=4),a.Oc=!0));d|=e}return d}
function Cr(a,b){var c=a.B;return c&&null!=b&&b!=c.sg?(c.Yf(b),a.oa.Yf(c.ab,c.Hb,c.og(),!0),!0):!1}
function jr(a,b){var c=a.ma,d=a.B;if(d)if(d.Oa==Hq)c=$q;else if(d.Oa>=Yn){c=null;var e=d.Zc>>2,f=32768<e?32768:e,g=d.od[6];if(null!=g){switch(g&12){case 0:d.ab=655360;d.Hb=e;c=Dr;break;case 4:d.ab=655360;d.Hb=e;c=a.da==mk?Er:Fr;break;case 8:d.ab=720896;d.Hb=f;c=$q;break;case 12:d.ab=753664,d.Hb=f,c=a.da==mk?Gr:Yq}var h=80==(d.od[5]&80);!h||d.ab==a.ab&&d.Hb==a.Hb||(b=!0);e=dq(d,eq);f=d.Ua[wq];var k=d.Ua[23],m=d.Vd[1]&8;c!=Dr&&(g&1?655360==d.ab||h||k&1?d.od[5]&64?c=f&31?143>=d.Ua[mq]?Hr:Ir:Jr:f&128||
350>e?c=m?Kr:Lr:480<=e&&(c=a.da==mk?Mr:Nr):c=m?7-c:Or:c-=m?2:0);h=Br(a)}}else d.Ec&8?(d.Ec&2?(c=d.Ec&16?Or:Pr,d.Ec&4||--c):(c=d.Ec&1?Yq:Qr,d.Ec&4&&--c),a.Fb&&(a.M.style.opacity="1",a.Fb=!1)):!a.Fb&&1>+a.Uc&&(a.Fb=!0,a.M.style.opacity=a.Uc,d=a.R,d.Y.Zf=!0,Uc(d));else a.ma=null,null==c&&(c=a.ba);if(!cr(a,c,b))return!1;Cr(a,h);return!0}
function cr(a,b,c){if(null!=b&&(b!=a.ma||c)){a.pd=0;a.ma=b;a.Ga=!1;b=a.B||(b==$q?a.W:a.I);if(b!=a.B||b.ab!=a.ab||b.Hb!=a.Hb){yr(a);if(a.ab){if(!ec(a.oa,a.ab,a.Hb))return!1;a.B&&(a.B.dc=!1)}a.B=b;b.dc=!0;a.ab=b.ab;a.Hb=b.Hb;if(!Ub(a.oa,b.ab,b.Hb,3,b===a.A?b:null))return!1}a:{a.G=0;a.D=a.Jb;a.H=a.sc;a.Ma=a.D;a.Gb=Bq[$q][2];b=0;if(c=Bq[a.ma])a.D=c[0],a.H=c[1],a.Gb=c[2],b=c[3],a.G=c[4],4!=a.da&&7!=a.da||a.B!==a.A||a.G!=rr||(7==(a.A.Ua[wq]&31)?a.H=350>dq(a.A,mq)?43:50:a.G=a.Oa);a.Tc=a.D*a.H|0;a.Sc=a.Tc/
a.Gb|0;a.Sa=a.Sc;a.Xb=0;void 0!==b&&(a.Sa=(a.Sa<<1)+b|0,a.Xb=a.Sa+b>>1);if(a.qa.length){a.ka=a.X/a.D|0;a.pa=a.ia/a.H|0;if(a.G){b=a.qa[a.G];if(!b)break a;c=a.qa[a.G<<1];a.Rc&&80==a.D?c&&a.ka>=3*c.qc>>2&&(a.G<<=1,b=c):(c&&a.ka>=c.qc&&(a.G<<=1,b=c),a.Rc||(a.ka=b.qc,a.pa=b.rc));a.eb=a.fb=0;b&&(a.eb=a.D*b.qc,a.fb=a.H*b.rc)}else a.ka=a.pa=1,a.eb=a.D,a.fb=a.H;a.La=a.J.createImageData(a.eb,a.fb);a.Aa=document.createElement("canvas");a.Aa.width=a.eb;a.Aa.height=a.fb;a.Ba=a.Aa.getContext("2d");a.uc=a.Dc=0;
a.ec=a.X;a.fc=a.ia;b=a.X-a.D*a.ka;c=a.ia-a.H*a.pa;0<b&&(a.uc=b>>1,a.ec-=b);0<c&&(a.Dc=c>>1,a.fc-=c);if(b||c)a.J.fillStyle=a.M.style.backgroundColor,a.J.fillRect(0,0,a.X,a.ia)}}Rr(a,!0);Tq(a)}return!0}function wr(a,b,c,d){b=(b+c*a.width)*d.length;a.data[b]=d[0];a.data[b+1]=d[1];a.data[b+2]=d[2];a.data[b+3]=d[3]}function Sr(a){a.ra=-1;a.Da=!1;var b=a.Sc;if(void 0===a.L||a.L.length!=b)a.L=Array(b)}function Rr(a,b){b||(a.Ga=!1);Sr(a)}
function Ar(a,b,c,d,e){var f=d&255,g=d>>8;d=g&15;var h=a.qa[a.G];h.Fe&&(d=h.Fe[d]);var k=g>>4&15;h.Fe&&(k=h.Fe[k]);e?(b*=h.qc,c*=h.rc,e.fillStyle=h.ce[k],e.fillRect(b,c,h.qc,h.rc)):(b=b*a.ka+a.uc,c=c*a.pa+a.Dc,a.J.fillStyle=h.ce[k],a.J.fillRect(b,c,a.ka,a.pa));g&Tr&&(k=(f&15)*h.qc,f=(f>>4)*h.rc,e?e.drawImage(h.gg[d],k,f,h.qc,h.rc,b,c,h.qc,h.rc):a.J.drawImage(h.gg[d],k,f,h.qc,h.rc,b,c,a.ka,a.pa));g&zr&&(f=a.Xc,g=a.Jc,e?(a.ua&&a.ua!==h.rc&&(f=f*h.rc/a.ua|0,g=g*h.rc/a.ua|0),e.fillStyle=h.ce[d],e.fillRect(b,
c+f,h.qc,g)):(a.ua&&a.ua!==a.pa&&(f=f*a.pa/a.ua|0,g=g*a.pa/a.ua|0),a.J.fillStyle=h.ce[d],a.J.fillRect(b,c+f,a.ka,g)))}
function Tq(a,b){b=void 0===b?!1:b;if(a.Y.Sb){var c=!1,d=a.B;d&&(d!==a.A?d.Ec&8&&(c=!0):d.Td&32&&(c=!0));if(c||b){if(b)Sr(a);else if(void 0===a.L)return;c=!1;!(b||++a.pd&15)&&0<=a.za&&(a.za++,c=!0);var e=a.Tc,f=a.ab,g=f,h=g+a.Hb;a.ma>=Hr&&(f=g=655360,h=g+65536);if(Ur(a,d)&8||d.Xe&&d.Xe<d.jh){var k=d.Ua[Jp];k|=(d.Ua[Kp]&d.sf)<<8;d.Bd!==k&&(d.Bd=k,Rr(a));d.Xe=0}var m=d.Bd<<(a.G?1:0);g+=m;k=a.Sa;a.Oa>=Yn&&d.Ua[19]&&d.Ua[19]<<1!=d.Ua[1]+1&&(a.Ma=d.Ua[19]<<(a.G?1:d.Ua[20]&64?3:4),k=(a.Ma*(a.H-1)+a.D)/
a.Gb|0,a.ma<=$q&&(k<<=1));var r=d=0;g+k>h&&(r=k,g>=h?(d=f+(g-h),k=0):(d=f,k=h-g,r-=k));h=a.aa-(m>>1);g=Vr(a,f,g,k,0,h,e,b,c);r&&(g+=Vr(a,f,d,r,0+g,h,e,b,c));g&&(a.Da=!0)}}}
function Vr(a,b,c,d,e,f,g,h,k){var m=d>>1;m>g&&(m=g);var r=c+d;if(h=!h&&a.Da){h=a.oa;for(var x=!0,t=c>>>h.B,z=h.A-(c&h.C);0<d&&t<h.X.length;)h.X[t].Fa&&(h.X[t].Fa=x=!1,h.X[t].ki=!0),d-=z,z=h.A,t++;h=x}if(h){if(!k)return m;if(!a.ra){f-=e;if(0>f)return m;c+=f<<1;e+=f;g=e+1}}if(a.G){if(a.qa[a.G]){b=c;c=e;k=f=e=0;h=Tr<<8;d=1048575;t=a.B.Ec&32;a.Oa>=Yn&&(t=a.B.vc[16]&8);x=a.aa-a.B.Bd;t&&(k=dr<<8,d&=~k,a.za&2||(d&=~h));for(a.ra=0;b<r&&c<g;)t=lc(a.oa,b),t|=h,t&k&&(a.ra++,t&=d),c==x&&(t|=a.za&1?zr<<8:0),
a.Da&&t===a.L[c]||(Ar(a,c%a.D,c/a.D|0,t,a.Ba),a.L[c]=t,f++),b+=2,e++,c++;f&&a.Ba&&a.J.drawImage(a.Aa,0,0,a.eb,a.fb,a.uc,a.Dc,a.ec,a.fc);xr(a)}}else{if(a.Xb){b=c;m=r-b>>1;g=0;c=a.Gb;e=b;f=16==c?65536:196608;k=16==c?1:2;h=lr(a,k);x=d=0;t=a.D;z=0;var E=a.H,O=0;for(a.ra=0;e<r;){var K=lc(a.oa,e);if(a.Da&&K===a.L[g])d+=c;else{a.L[g]=K;K=K>>8|(K&255)<<8;var da=f,oa=16;d<t&&(t=d);for(var eb=0;eb<c;eb++){var tc=(K&(da>>=k))>>(oa-=k);wr(a.La,d++,x,h[tc])}d>z&&(z=d);x<E&&(E=x);x>=O&&(O=x+1)}e+=2;g++;if(d>=a.D){d=
0;x+=2;if(x>a.H)break;x==a.H&&(x=1,e=b+a.Xb)}}t<a.D&&(a.Ba.putImageData(a.La,0,0,t,E,z-t,O-E),a.J.drawImage(a.Aa,0,0,a.D,a.H,0,0,a.X,a.ia));a=m}else{if(a.Oc){m=0;g=r-c;e=lr(a,8);f=a.B.ud;h=k=0;d=a.D;x=0;t=a.H;z=0;E=a.B.Vd[4]&8?4:1;O=a.B.vc[19]&15;K=a.Ma>a.D?a.Ma-a.D-O>>3:0;for(a.ra=0;c<r;){da=f[c-b];eb=4;O||(a.Da&&da===a.L[m]?(k+=eb,eb=0):a.L[m]=da,m++);if(eb){k<d&&(d=k);for(oa=0;oa<eb;oa++)wr(a.La,k++,h,e[da&255]),da>>=8;k>x&&(x=k);h<t&&(t=h);h>=z&&(z=h+1)}c+=E;if(k>=a.D){k=0;if(++h>a.H)break;c+=
K}}O&&(g=0)}else{m=0;g=r-c;e=lr(a);f=a.B.ud;h=k=0;d=a.D;x=0;t=a.H;z=0;E=a.B.vc[19]&15;O=a.Ma>a.D?a.Ma-a.D-E>>3:0;for(a.ra=0;c<r;){K=c++-b;K=f[K];oa=8;E?k?(da=a.D-k,oa>da&&(oa=da)):(K<<=E,oa-=E,a.Da=!1):(a.Da&&K===a.L[m]?(k+=oa,oa=0):a.L[m]=K,m++);if(oa){k<d&&(d=k);for(da=0;da<oa;da++)eb=Wr[K&2155905152]||0,wr(a.La,k++,h,e[eb]),K<<=1;k>x&&(x=k);h<t&&(t=h);h>=z&&(z=h+1)}if(k>=a.D){k=0;if(++h>a.H)break;c+=O}}E&&(g=0)}d<a.D&&(a.Ba.putImageData(a.La,0,0,d,t,x-d,z-t),a.J.drawImage(a.Aa,0,0,a.D,a.H,0,0,
a.X,a.ia));a=g}m=a}return m}function Ur(a,b){var c=0;a=ad(a.R)-b.zg;0>a&&(b.zg=a,a=-a|0);a%b.xg>b.mm&&(c|=1);a%b.yg>b.om&&(c|=9);b.jh=a/b.yg|0;return c}l.Il=function(){return Xr(this.W)};l.kn=function(a,b){a=this.W;a.Tf=a.oc;a.oc=b&31};l.Hl=function(){return Yr(this.W)};l.jn=function(a,b){Zr(this,this.W,b)};l.Jl=function(){return this.W.Ec};l.ln=function(a,b){this.W.Ec=b;jr(this,!1)};l.Kl=function(){return $r(this,this.W)};l.Ej=function(a,b){this.A.Wf=this.A.Wf&-4|b&3};l.cl=function(){return this.A.Td};
l.Bk=function(){return this.A.vc[this.A.Td&31]};l.Dj=function(a,b){a=this.A;var c=a.Td&32;if(a.Ie){a.Ie=!1;var d=a.Td&31;if(16<=d||!c)if(as||a.vc[d]!==b)a.vc[d]=b,Rr(this,!1)}else a.Td=b,a.Ie=!0,b&32&&!c&&br(this,!0)&&Tq(this,!0),b=a.Ua[Jp],b|=(a.Ua[Kp]&a.sf)<<8,a.Bd!=b&&(a.Bd=b,Rr(this)),a.Xe=0};l.Ul=function(){var a=0;if(this.Oa==Yn)a=3-((this.A.cf&12)>>2),a=(this.xb&1<<a)<<4-a;else{var b=this.A.xe[0];45!=(b&63)&&2880!=(b&4032)&&184320!=(b&258048)&&(a|=16)}a|=this.A.mh&-17;return this.A.mh=a};
l.mn=function(a,b){this.A.cf=b;ar(this)};l.Vl=function(){return this.A.nh};l.un=function(a,b){this.A.nh=b};l.Sl=function(){return this.A.Wd};l.sn=function(a,b){this.A.Wd=b};l.Rl=function(){return this.A.Vd[this.A.Wd]};l.rn=function(a,b){if(as||this.A.Vd[this.A.Wd]!==b)this.A.Vd[this.A.Wd]=b;switch(this.A.Wd){case 2:this.A.Ya=zq[b&15];break;case 4:Cr(this,Br(this))&&Tq(this,!0)}};l.tl=function(){return this.A.Uf};l.Tm=function(a,b){if(as||this.A.Uf!==b)this.A.Uf=b};l.ul=function(){return this.A.Vf};
l.Um=function(a,b){this.A.cd=b;this.A.Vf=3;this.A.wc=0};l.Vm=function(a,b){this.A.cd=b;this.A.Vf=Wp;this.A.wc=0};l.sl=function(){var a=this.A.xe[this.A.cd]>>this.A.wc&63;this.A.wc+=6;12<this.A.wc&&(this.A.wc=0,this.A.cd=this.A.cd+1&Xp-1);return a};l.Sm=function(a,b){a=this.A.xe[this.A.cd];b=a&~(63<<this.A.wc)|(b&63)<<this.A.wc;a!==b&&(this.A.xe[this.A.cd]=b,Rr(this,!1));this.A.wc+=6;12<this.A.wc&&(this.A.wc=0,this.A.cd=this.A.cd+1&Xp-1)};l.Wl=function(){return this.A.Wf};
l.en=function(a,b){this.A.Oj=b};l.Xl=function(){return this.A.cf};l.dn=function(a,b){this.A.Nj=b};l.Bl=function(){return this.A.Ud};l.cn=function(a,b){this.A.Ud=b};l.Al=function(){return this.A.od[this.A.Ud]};
l.bn=function(a,b){if(as||this.A.od[this.A.Ud]!==b)this.A.od[this.A.Ud]=b;switch(this.A.Ud){case 0:this.A.We=zq[b&15];this.A.Ad=this.A.We&~this.A.md;break;case 1:this.A.md=~zq[b&15];this.A.Ad=this.A.We&~this.A.md;break;case 2:this.A.ug=zq[b&15]&-2139062144;break;case 3:case 5:Cr(this,Br(this));break;case 4:this.A.ih=(b&3)<<3;break;case 6:jr(this,!1);break;case 7:this.A.vg=zq[b&15]&-2139062144;break;case 8:this.A.vb=b|b<<8|b<<16|b<<24}};l.ml=function(){return Xr(this.I)};
l.Nm=function(a,b){a=this.I;a.Tf=a.oc;a.oc=b&31};l.ll=function(){return Yr(this.I)};l.Mm=function(a,b){Zr(this,this.I,b)};l.nl=function(){return this.I.Ec};l.Om=function(a,b){this.I.Ec=b;jr(this,!1)};l.kl=function(){return this.I.bf};l.Lm=function(a,b){this.I.bf!==b&&(this.I.bf=b,Rr(this,!1))};l.ol=function(){return $r(this,this.I)};function Xr(a){if(a.dc)var b=a.oc;return b}function Yr(a){var b;a.dc&&a.oc<a.tg&&(b=a.Ua[a.oc]);return b}
function Zr(a,b,c){if(b.oc<b.tg){if(as||b.Ua[b.oc]!==c)b.Ua[b.oc]=c;if(b.oc==Kp||b.oc==Jp)Ur(a,b),b.Xe=b.jh;(9==b.oc&&8!=b.Tf||b.oc==mq&&223==c)&&jr(a,!0);kr(a)}}function $r(a,b){var c=Ur(a,b);b===a.A?(c|=b.Z&48^48,b.Ie=!1):c=(b.Z^=9)|240;return b.Z=c}var as=!0,Qr=1,Gr=2,Yq=3,Pr=5,Or=6,$q=7,Kr=13,Lr=14,Er=15,Fr=16,Mr=17,Nr=18,Hr=19,Ir=20,Jr=21,Dr=255,Uq=60,sr=1,rr=3,Hq=sr,Eq=rr,Yn=5,$n=7,Aq={mda:[Hq,$q],cga:[Eq,Yq],ega:[Yn,Yq],vga:[$n,Yq]},Zp={2:{Mf:15700,Lf:208,Rf:85,Sf:96}};
Zp[mk]={Mf:18432,Lf:364,Rf:85,Sf:96};Zp[4]={Mf:21850,Lf:364,Rf:85,Sf:96};Zp[7]={Mf:16700,Lf:480,Rf:85,Sf:83};var Zq={6:[1,mk,!0],7:[2,mk,!0],8:[6,mk,!0],9:[4,mk,!0],10:[mk,1,!0],11:[mk,2,!0],0:[1,mk,!1],1:[2,mk,!1],2:[6,mk,!1],3:[4,mk,!1],4:[mk,1,!1],5:[mk,2,!1]},Bq=[];Bq[Qr]=[40,25,1,0,rr];Bq[Yq]=[80,25,1,0,rr];Bq[4]=[320,200,8,192];Bq[Or]=[640,200,16,192];Bq[$q]=[80,25,1,0,sr];Bq[Kr]=[320,200,8];Bq[Lr]=[640,200,8];Bq[Er]=[640,350,8];Bq[Fr]=[640,350,8];Bq[Mr]=[640,480,8];Bq[Nr]=[640,480,8];
Bq[Hr]=[320,200,1];Bq[Ir]=[320,240,4];Bq[Jr]=[320,400,4];Bq[0]=Bq[Qr];Bq[Gr]=Bq[Yq];Bq[Pr]=Bq[4];
var gr=0,er=7,ir=8,fr=0,hr=112,dr=128,Tr=256,zr=512,tr=[[0,0,0,255],[127,192,127,255],[127,192,127,255],[127,255,127,255],[127,255,127,255]],ur=[0,1,2,2,2,2,2,2,0,3,4,4,4,4,4,4],mr=[[0,0,0,255],[0,0,170,255],[0,170,0,255],[0,170,170,255],[170,0,0,255],[170,0,170,255],[170,85,0,255],[170,170,170,255],[85,85,85,255],[85,85,255,255],[85,255,85,255],[85,255,255,255],[255,85,85,255],[255,85,255,255],[255,255,85,255],[255,255,255,255]],or=[2,4,6],nr=[3,5,er],pr=[0,1,2,3,4,5,20,7,56,57,58,59,60,61,62,63],
zq=[0,255,65280,65535,16711680,16711935,16776960,16777215,-16777216,-16776961,-16711936,-16711681,-65536,-65281,-256,-1],Wr=[0];Wr[128]=1;Wr[32768]=2;Wr[32896]=3;Wr[8388608]=4;Wr[8388736]=5;Wr[8421376]=6;Wr[8421504]=7;Wr[-2147483648]=8;Wr[-2147483520]=9;Wr[-2147450880]=10;Wr[-2147450752]=11;Wr[-2139095040]=12;Wr[-2139094912]=13;Wr[-2139062272]=14;Wr[-2139062144]=15;var Gp=[];Gp[Hq]=["MDA",948,720896,4096,0,mk];Gp[Eq]=["CGA",980,753664,16384,0,2];Gp[Yn]=["EGA",980,753664,16384,65536,4];
Gp[$n]=["VGA",980,753664,16384,262144,7];
var Cq=0,Rq=1,Qq=2,Pq=3,Xq=[[1036,1038,1033],[1037,1032,1039],[1035,1040,1034]],Fq={948:Y.prototype.Il,949:Y.prototype.Hl,952:Y.prototype.Jl,954:Y.prototype.Kl},Gq={948:Y.prototype.kn,949:Y.prototype.jn,952:Y.prototype.ln},Iq={980:Y.prototype.ml,981:Y.prototype.ll,984:Y.prototype.nl,985:Y.prototype.kl,986:Y.prototype.ol},Jq={980:Y.prototype.Nm,981:Y.prototype.Mm,984:Y.prototype.Om,985:Y.prototype.Lm},Kq={960:Y.prototype.cl,961:Y.prototype.Bk,962:Y.prototype.Ul,964:Y.prototype.Sl,965:Y.prototype.Rl,
974:Y.prototype.Bl,975:Y.prototype.Al},Lq={954:Y.prototype.Ej,960:Y.prototype.Dj,961:Y.prototype.Dj,962:Y.prototype.mn,964:Y.prototype.sn,965:Y.prototype.rn,970:Y.prototype.en,972:Y.prototype.dn,974:Y.prototype.cn,975:Y.prototype.bn,986:Y.prototype.Ej},Mq={963:Y.prototype.Vl,966:Y.prototype.tl,967:Y.prototype.ul,969:Y.prototype.sl,970:Y.prototype.Wl,972:Y.prototype.Xl},Nq={963:Y.prototype.un,966:Y.prototype.Tm,967:Y.prototype.Um,968:Y.prototype.Vm,969:Y.prototype.Sm};
Va(function(){for(var a=mb(document,"pcx86","video"),b=0;b<a.length;b++){var c=a[b],d=nb(c),e=document.createElement("canvas");if(void 0===e||!e.getContext){c.innerHTML="<br/>Missing <canvas> support. Please try a newer web browser.";break}e.setAttribute("class","pcjs-canvas");e.setAttribute("width",d.screenWidth);e.setAttribute("height",d.screenHeight);e.style.height="auto";0<=Ja().indexOf("MSIE")&&(c.onresize=function(a,b,c,d){return function(){b.style.height=(a.clientWidth*d/c|0)+"px"}}(c,
e,d.screenWidth,d.screenHeight),c.onresize(null));var f=+(Ra("aspect")||d.aspect);f&&.3<=f&&3.33>=f&&(Ua("onresize",function(a,b,c){return function(){b.style.height=(a.clientWidth/c|0)+"px"}}(c,e,f)),window.onresize());c.appendChild(e);f=document.createElement("textarea");Oa("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"),f.style.fontSize="16px");c.appendChild(f);var g=e.getContext("2d");d=new Y(d,e,g,f,c);lb(d,c)}});
function bs(a){u.call(this,"ParallelPort",a);this.G=a.adapter;switch(this.G){case 1:this.D=956;this.C=7;break;case 2:this.D=888;this.C=7;break;case 3:this.D=632;this.C=5;break;default:q("Unrecognized parallel adapter #"+this.G);return}this.A=this.B=null;a=a.binding;"console"==a?this.B="":jb(this,a,cs)}ja(bs,u);l=bs.prototype;l.Bb=function(a,b,c){switch(b){case cs:return this.ja[b]=this.A=c,!0}return!1};
l.jc=function(a,b,c,d){this.oa=b;this.R=c;this.Ea=d;this.V=Eb(a,"ChipSet");oc(b,this,ds,this.D);qc(b,this,es,this.D);zb(this)};l.Rb=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.Qb=function(a){return a?this.save():!0};l.reset=function(){fs(this)};l.save=function(){var a=new Ve(this),b=0,c=[];c[b++]=this.F;c[b++]=this.ob;c[b]=this.Ge;a.set(0,c);return a.data()};l.restore=function(a){return fs(this,a[0])};
function fs(a,b){var c=0;void 0===b&&(b=[0,gs,0]);a.F=b[c++];a.ob=b[c++];a.Ge=b[c];return!0}l.vl=function(){return this.F};l.Tl=function(){var a=this.ob;this.ob|=hs;this.ob&=~is;js(this);return a};l.rl=function(){return this.Ge};
l.Wm=function(a,b){var c=this;this.F=b;ld(this.R,function(){var a=b,e=!1;if(c.A)13!=a&&(8==a?c.A.value=c.A.value.slice(0,-1):(128<=a&&(a=160>a?a-128:224>a?42:32),c.A.value+=ya(a),c.A.scrollTop=c.A.scrollHeight)),e=!0;else if(null!=c.B){if(10==a||1024<=c.B.length)c.rb(c.B),c.B="";10!=a&&(c.B+=String.fromCharCode(a));e=!0}return e?(c.ob=c.ob|is|gs,c.ob&=~hs,!0):!1});js(this)};l.Rm=function(a,b){this.Ge=b;js(this)};function js(a){a.V&&a.C&&(a.Ge&ks&&!(a.ob&hs)?Of(a.V,a.C):Mf(a.V,a.C))}
var cs="buffer",gs=8,hs=64,is=128,ks=16,ds={0:bs.prototype.vl,1:bs.prototype.Tl,2:bs.prototype.rl},es={0:bs.prototype.Wm,2:bs.prototype.Rm};Va(function(){for(var a=mb(document,"pcx86","parallel"),b=0;b<a.length;b++){var c=a[b],d=nb(c);d=new bs(d);lb(d,c)}});
function ls(a){u.call(this,"SerialPort",a);this.fa=a.adapter;switch(this.fa){case 1:this.ba=1016;this.M=4;break;case 2:this.ba=760;this.M=3;break;default:q("Unrecognized serial adapter #"+this.fa);return}this.C=this.I=null;this.ma=a.tabSize||0;this.ka=a.charBOL||0;this.K=this.pa=0;this.qa=ms|ns;this.N=!0;a=a.binding;"console"==a?this.I="":jb(this,a,os);this.F=this.aa=this.W=null;this.exports={connect:this.ui,receiveData:this.we,receiveStatus:this.Ak}}ja(ls,u);l=ls.prototype;
l.Zh=function(a,b,c){var d=null;a!=this.Ce||this.F||(this.F=b,this.W=c,this.N=!1,d=this);return d};l.Bb=function(a,b,c){var d=this;switch(b){case os:return this.ja[b]=this.C=c,this.C.onkeydown=function(a){a=a||window.event;var b=a.keyCode;if(8===b||a.ctrlKey&&65<=b&&90>=b)a.preventDefault&&a.preventDefault(),64<b&&(b-=64),d.we(b);return!0},this.C.onkeypress=function(a){a=a||window.event;d.we(a.which||a.keyCode);a.preventDefault&&a.preventDefault();return!0},this.C.removeAttribute("readonly"),!0}return!1};
l.jc=function(a,b,c,d){this.na=a;this.oa=b;this.R=c;this.Ea=d;var e=this;this.ra=Rc(this.R,this.id+".receive",function(){e.we()});this.ua=Rc(this.R,this.id+".transmit",function(){e.A=e.A|ps|qs});this.V=Eb(a,"ChipSet");oc(b,this,rs,this.ba);qc(b,this,ss,this.ba);zb(this)};
l.ui=function(a){if(!this.F){var b=Qc(this.na,"connection");if(b){var c=b.split("->");if(2==c.length){var d=xa(c[0]);if(d!=this.Ce)return;c=xa(c[1]);if(this.F=pb(c)){var e=this.F.exports;if(e){var f=e.connect;f&&f.call(this.F,this.N);if(this.aa=e.receiveData){this.N=a;this.W=e.receiveStatus;this.status("Connected "+this.Dd+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};
l.Rb=function(a,b){if(!b)if(this.ui(this.N),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.Qb=function(a){return a?this.save():!0};l.reset=function(){ts(this)};l.save=function(){var a=new Ve(this),b=0,c=[];c[b++]=this.da;c[b++]=this.ia;c[b++]=this.G;c[b++]=this.L;c[b++]=this.D;c[b++]=this.J;c[b++]=this.X;c[b++]=this.A;c[b++]=this.B;c[b]=this.H;a.set(0,c);return a.data()};l.restore=function(a){return ts(this,a[0])};
function ts(a,b){var c=0;void 0===b&&(b=[0,0,us,0,vs,0,0,ps|qs,a.qa,[]]);a.da=b[c++];a.ia=b[c++];a.G=b[c++];a.L=b[c++];a.D=b[c++];a.J=b[c++];a.X=b[c++];a.A=b[c++];a.B=b[c++];a.H=b[c];return!0}l.we=function(a){if(null!=a)if("number"==typeof a)this.H.push(a);else if("string"==typeof a)for(var b=0;b<a.length;b++)this.H.push(a.charCodeAt(b));else this.H=this.H.concat(a);ws(this);return!0};
l.Ak=function(a){var b=this.B;this.B&=~(ms|ns);a&32&&(this.B=this.B|ms|xs);a&64&&(this.B=this.B|ns|ys);b!=this.B&&zs(this)};function ws(a){0<a.H.length&&!(a.A&As)&&(a.da=a.H.shift(),a.A|=As,a.H.length&&a.R&&cd(a.R,a.ra,1E3/(1843200/((a.G||1)<<7))|0));zs(a)}l.Ql=function(){var a=this.J&Bs?this.G&255:this.da;this.A&=~As;ws(this);return a};l.Cl=function(){return this.J&Bs?this.G>>8:this.L};l.Dl=function(){var a=this.D;this.D|=vs;return a};l.El=function(){return this.J};l.Gl=function(){return this.X};
l.Fl=function(){return this.A};l.Ll=function(){var a=this.B;this.B&=~(xs|ys);return a};
l.tn=function(a,b){var c=this;this.J&Bs?this.G=this.G&-256|b:(this.ia=b,this.A&=~(ps|qs),ld(this.R,function(){var a=!1;c.aa&&c.aa.call(c.F,b)&&(a=!0);if(c.C){if(13==b)c.K=0;else if(8==b)c.C.value=c.C.value.slice(0,-1),0<c.K&&c.K--;else{a=ya(b);var e=a.length;32>b&&1==e&&(e=0);9==b&&(e=c.ma||8,e-=c.K%e,c.ma&&(a=" ".slice(0,e)));!c.K&&e&&(10!=c.pa&&(a="\n"+a),c.ka&&(a=String.fromCharCode(c.ka)+a));c.C.value+=a;c.C.scrollTop=c.C.scrollHeight;c.K+=e}c.pa=b;a=!0}else if(null!=
c.I){if(10==b||1024<=c.I.length)c.rb(c.I),c.I="";10!=b&&(c.I+=String.fromCharCode(b));a=!0}return a}),cd(this.R,this.ua,1E3/(1843200/((this.G||1)<<7))|0),zs(this))};l.fn=function(a,b){this.J&Bs?this.G=this.G&255|b<<8:this.L=b};l.gn=function(a,b){this.J=b};l.hn=function(a,b){a=b^this.X;this.X=b;a&(Cs|Ds)&&this.W&&(a=0,this.N?(a|=b&Ds?32:0,a|=b&Cs?320:0):(a|=b&Ds?16:0,a|=b&Cs?1048576:0),this.W.call(this.F,a))};
function zs(a){var b=-1;a.A&As&&a.L&Es?b=Fs:a.A&ps&&a.L&Gs?b=Hs:a.B&(xs|ys)&&a.L&Is&&(b=Js);0<=b?(a.D&=~(vs|Ks),a.D|=b,a.V&&a.M&&Of(a.V,a.M,100)):(a.D|=vs,a.V&&a.M&&Mf(a.V,a.M))}var os="buffer",us=384,Es=1,Gs=2,Is=8,vs=1,Fs=4,Hs=2,Js=0,Ks=6,Bs=128,Cs=1,Ds=2,As=1,ps=32,qs=64,xs=1,ys=2,ms=16,ns=32,rs={0:ls.prototype.Ql,1:ls.prototype.Cl,2:ls.prototype.Dl,3:ls.prototype.El,4:ls.prototype.Gl,5:ls.prototype.Fl,6:ls.prototype.Ll},ss={0:ls.prototype.tn,1:ls.prototype.fn,3:ls.prototype.gn,4:ls.prototype.hn};
Va(function(){for(var a=mb(document,"pcx86","serial"),b=0;b<a.length;b++){var c=a[b],d=nb(c);d=new ls(d);lb(d,c)}});function Ls(a){u.call(this,"Mouse",a);this.V=a.serial||a.binding;this.X=a.type||(this.V?Ms:Ns);this.W=this.X==Ms?"SerialPort":null;this.F=null;this.J=a.scaleMouse;this.dc=this.N=this.M=!1;this.G=[];this.D=[]}ja(Ls,u);l=Ls.prototype;
l.jc=function(a,b,c,d){this.na=a;this.oa=b;this.R=c;this.Ea=d;this.J=Qc(a,"scaleMouse")||this.J;for(c=null;c=Eb(a,"Video",c);)this.G.push(c);this.X==Ns&&(oc(b,this,Os,Ps),qc(b,this,Qs,Ps));zb(this)};
l.Rb=function(a,b){if(!b){if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;if(this.W&&!this.F){for(a=null;(a=Eb(this.na,this.W,a))&&(!a.Zh||!(this.F=a.Zh(this.V,this,this.zk))););if(this.F)for(this.D=[],a=0;a<this.G.length;a++)b=this.G[a],b.K=this,(b=b.F)&&this.D.push(b);else q(this.id+": "+this.W+" "+this.V+" unavailable")}this.dc?Rs(this):Ss(this)}return!0};l.Qb=function(a){return a?this.save():!0};l.reset=function(){Ts(this)};
l.save=function(){var a=new Ve(this),b=0,c=[];c[b++]=this.dc;c[b++]=this.A;c[b++]=this.B;c[b++]=this.H;c[b++]=this.I;c[b++]=this.K;c[b++]=this.L;c[b]=this.C;a.set(0,c);return a.data()};l.restore=function(a){return Ts(this,a[0])};function Ts(a,b){var c=0;void 0===b&&(b=[!1,-1,-1,0,0,!1,!1,0]);var d=b[c++];a.dc=d;a.A=b[c++];a.B=b[c++];a.H=b[c++];a.I=b[c++];a.K=b[c++];a.L=b[c++];a.C=b[c];a.C&(Cs|Ds)&&(a.C=(a.C&Cs?1048576:0)|(a.C&Ds?16:0));return!0}l.Ye=function(a){this.M=a};
function Rs(a){if(!a.N)for(var b=0;b<a.D.length;b++)Us(a,a.D[b])&&(a.N=!0)}function Ss(a){if(a.N)for(var b=0;b<a.D.length;b++){var c=a.D[b];c&&(c.style.cursor="auto")}}function Us(a,b){return b?(b.addEventListener("mousemove",function(b){Vs(a,b)},!1),b.addEventListener("mousedown",function(b){Vs(a,b,!0)},!1),b.addEventListener("mouseup",function(b){Vs(a,b,!1)},!1),b.style.cursor="none",!0):!1}
function Vs(a,b,c){if(void 0!==c){var d;!(d=!1!==a.M)&&(d=a.G.length)&&(d=a.G[0],d=d.qd?d.Md(!0):!1);d||(a.M=null);a.je(b.button,c)}else{if(0>a.A||0>a.B)a.A=b.screenX,a.B=b.screenY;a.M?(c=b.movementX||b.mozMovementX||b.webkitMovementX||0,d=b.movementY||b.mozMovementY||b.webkitMovementY||0):(c=b.screenX-a.A,d=b.screenY-a.B);a.A=b.screenX;a.B=b.screenY;a.qg(c,d,a.A,a.B)}}
l.je=function(a,b){if(this.dc&&this.R&&this.R.Y.cb)switch(a){case Wq:this.K!=b&&(this.K=b,Ws(this));break;case Xs:this.L!=b&&(this.L=b,Ws(this))}};l.qg=function(a,b){this.dc&&this.R&&this.R.Y.cb&&(a=Math.round(Math.abs(a)*this.J)*Math.sign(a)||Math.sign(a),b=Math.round(Math.abs(b)*this.J)*Math.sign(b)||Math.sign(b),a||b)&&(this.H=a,this.I=b,Ws(this))};function Ws(a){a.F.we([64|(a.K?32:0)|(a.L?16:0)|(a.I&192)>>4|(a.H&192)>>6,a.H&63,a.I&63]);a.H=a.I=0}
l.zk=function(a){var b=1048592==(a&1048592);if(b){if(!this.dc){var c=!1;this.C&16||(this.reset(),c=!0);this.C&1048576||(c=!0);c&&this.F.we([Ys,Ys]);Rs(this);this.dc=b}}else this.dc&&(Ss(this),this.dc=b);this.C=a};l.il=function(){return 0};l.jl=function(){return 0};l.hl=function(){return 0};l.gl=function(){return 0};l.Jm=function(){};l.Km=function(){};l.Im=function(){};l.Hm=function(){};
var Ns="bus",Ms="serial",Wq=0,Xs=2,Ps=572,Os={0:Ls.prototype.il,1:Ls.prototype.jl,2:Ls.prototype.hl,3:Ls.prototype.gl},Qs={0:Ls.prototype.Jm,1:Ls.prototype.Km,2:Ls.prototype.Im,3:Ls.prototype.Hm},Ys=77;Va(function(){for(var a=mb(document,"pcx86","mouse"),b=0;b<a.length;b++){var c=a[b],d=nb(c);d=new Ls(d);lb(d,c)}});
function Zs(a,b,c){u.call(this,"Disk",{id:a.Dd+".disk"+ra(++$s,4)});this.controller=a;this.wa=a.wa;this.rb=a.rb;this.na=a.na;this.Ea=a.Ea;this.B=b;this.Qc=b.name;this.ne=b.ne;this.Cf=this.C=!1;this.create(c,b.kb,b.$a,b.Xa,b.pb);this.G=[];this.J=[];this.D=null;this.L=0;this.K=!1;zb(this)}ja(Zs,u);l=Zs.prototype;l.jc=function(a,b,c,d){this.Ea=d};l.Rb=function(a,b){b||!this.Cf||this.C||(zb(this,!1),this.load(this.Qc,this.F,null,this.Mk,this));return!0};l.Mk=function(){zb(this,!0)};
l.Qb=function(a,b){if(this.C){var c,d=0;if(this.K&&!gb("Disk writes are still in progress, shut down anyway?"))return!1;for(;c=at(this,!1);)if(d=c[0]){this.wa('Unable to save "'+this.Qc+'" (error '+d+")");break}b&&this.C&&(b="action=close&volume="+this.F,b+="&machine="+bt(this.controller),b+="&user="+ct(this.controller),Ha(Ia()+"/api/v1/disk?"+b,null,!0),this.C=!1);!d&&a&&this.wa(this.Qc+" saved")}return!0};
l.create=function(a,b,c,d,e){this.mode=a;this.kb=b;this.$a=c;this.Xa=d;this.pb=e;this.A=[];if("preload"!=this.mode){a=Array(this.kb);for(b=0;b<a.length;b++){c=Array(this.$a);for(d=0;d<c.length;d++){e=Array(this.Xa);for(var f=1;f<=e.length;f++)e[f-1]=dt(null,b,d,f,this.pb,"local"==this.mode?0:null);c[d]=e}a[b]=c}this.A=a}this.I=null};
l.load=function(a,b,c,d,e){var f=b;if(this.H)return!0;this.Qc=a;this.F=b;this.oh=sa(b);var g=this;this.H=d;this.M=e||this.controller;if(c){var h=new FileReader;h.onload=function(){var a=h.result,b=a?a.byteLength:0,c=na[b];if(c){g.kb=c[0];g.$a=c[1];g.Xa=c[2];g.pb=c[3]||512;var d=g.pb>>2;var e=c=0;a=new DataView(a,0,b);g.A=Array(g.kb);for(b=0;b<g.A.length;b++)for(var f=g.A[b]=Array(g.$a),k=0;k<f.length;k++)for(var K=f[k]=Array(g.Xa),da=0;da<K.length;da++){for(var oa=dt(null,b,k,da+1,g.pb,0),eb=oa.data,
tc=0;tc<d;tc++,e+=4){var ai=eb[tc]=a.getInt32(e,!0);c=c+ai&-1}oa.yc=d;K[da]=oa}g.I=c;d=g}else g.wa("Unrecognized disk format ("+b+" bytes)");g.H&&(g.H.call(g.controller,g.B,d,g.Qc,g.F),g.H=null)};h.readAsArrayBuffer(c);return!0}0>b.indexOf("/api/v1/dump")&&(a=ta(b),"json"==a||"gz"==a?f=encodeURI(b):"demandrw"==this.mode||"demandro"==this.mode?(f=et(this,b),this.Cf=!0):(c="path",d="&mbhd=10",!b.indexOf("http:")||!b.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(a)?(c="disk",d=
"&mbhd=0"):ua(b,"/")&&(c="dir"),f=Ia()+"/api/v1/dump?"+c+"="+encodeURIComponent(b)+(this.ne?"":d)+"&format=json"));var k="Loading "+f+"...";return!!Ha(f,null,!0,function(a,b,c){ft(g,a,b,c)},function(){g.rb(k,wb)})};
function ft(a,b,c,d){var e=null;a.qe=!1;var f=!(!(0>d&&a.na)||a.na.Y.Sb);if(a.Cf)d?a.wa('Unable to connect to disk "'+a.F+'" (error '+d+": "+c+")",f):(a.C=!0,e=a);else if(d)a.wa('Unable to load disk "'+a.Qc+'" (error '+d+": "+b+")",f);else{db(a.controller.Dd,b,c);try{if(0<sa(a.oh,!0).toLowerCase().indexOf("-readonly"))a.qe=!0;else{var g=c.indexOf("\n");0<g&&1024>g&&0<c.substring(0,g).indexOf("write-protected")&&(a.qe=!0)}var h;"<"==c.charAt(0)?h=["Missing disk image: "+a.Qc]:h=0>c.indexOf("0x")&&
'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+c+")");if(h.length)if(1==h.length)q(h[0]);else{a.kb=h.length;a.$a=h[0].length;a.Xa=h[0][0].length;var k=h[0][0][0];a.pb=k&&k.length||512;for(d=c=0;d<a.kb;d++)for(f=0;f<a.$a;f++)for(g=0;g<a.Xa;g++)if(k=h[d][f][g]){var m=k.length;void 0===m&&(m=k.length=512);m>>=2;var r=k.pattern;void 0===r&&(r=k.pattern=0);var x=k.data;if(void 0===x){var t=k.bytes;if(void 0!==t&&t.length){for(var z=m<<2,E=t.length;E<
z;E++)t[E]=r;gt(k,t,0)}else k.data=x=[],t&&(k.pattern=r|r<<8|r<<16|r<<24);delete k.bytes}dt(k,d,f);for(z=0;z<x.length;z++)c=c+x[z]&-1}a.A=h;a.I=c;e=a}else q("Empty disk image: "+a.Qc)}catch(O){q("Disk image error ("+b+"): "+O.message)}}a.H&&(a.H.call(a.M,a.B,e,a.Qc,a.F),a.H=null)}function ht(a,b){var c=a.$a*a.Xa,d=b/c|0;return d<a.kb?(b%=c,a.seek(d,b/a.Xa|0,b%a.Xa+1)):null}function it(a,b,c){for(var d=1,e=0,f=0;d--;){var g=a.read(b,c++);if(0>g)break;e|=g<<f;f+=8}return e}
function dt(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.Rk=b;a.Sk=c;a.Nc=a.yc=0;a.Fa=!1;return a}function et(a,b){b="action=open&volume="+b+("&mode="+a.mode);b+="&chs="+a.kb+":"+a.$a+":"+a.Xa+":"+a.pb;b+="&machine="+bt(a.controller);b+="&user="+ct(a.controller);return Ia()+"/api/v1/disk?"+b}
function jt(a,b,c,d,e,f,g){if(a.C){var h="action=read&volume="+a.F;h+="&chs="+a.kb+":"+a.$a+":"+a.Xa+":"+a.pb;h=h+("&addr="+b+":"+c+":"+d+":"+e)+("&machine="+bt(a.controller));h+="&user="+ct(a.controller);Ha(Ia()+"/api/v1/disk?"+h,null,f,function(h,m,r){h=[b,c,d,e,f,g];var k=!1,t=h[0],z=h[1],E=h[2],O=h[3];if(!r){m=JSON.parse(m);for(k=0;O--;){var K=a.seek(t,z,E,!0);if(!K)break;gt(K,m,k);k+=K.length;E++}k=h[4]}(h=h[5])&&h(r,k)})}else g&&g(-1,!1)}
function kt(a,b,c,d,e,f,g){if(a.C){var h={};a.K=!0;h.action="write";h.volume=a.F;h.chs=a.kb+":"+a.$a+":"+a.Xa+":"+a.pb;h.addr=b+":"+c+":"+d+":"+e;h.machine=bt(a.controller);h.user=ct(a.controller);h.data=JSON.stringify(f);Ha(Ia()+"/api/v1/disk",h,g,function(f,h,r){var k=[b,c,d,e,g];f=k[0];h=k[1];var m=k[2],z=k[3];k=k[4];a.K=!1;if(0<=f&&f<a.A.length&&0<=h&&h<a.A[f].length)for(--m;0<z--&&0<=m&&m<a.A[f][h].length;m++){var E=a.A[f][h][m];r?lt(a,E,!1):E.Fa||(E.Nc=E.yc=0)}k&&mt(a)})}return!1}
function lt(a,b,c){b.Fa=!0;var d=a.G.indexOf(b);0<=d&&(a.G.splice(d,1),a.J.splice(d,1));a.G.push(b);a.J.push(Ga());c&&mt(a)}function mt(a){if(a.G.length){var b=a.J[0]+2E3;a.D&&a.L<b&&(clearTimeout(a.D),a.D=null);if(!a.D){var c=Ga();b-=c;0>b&&(b=0);2E3<b&&(b=2E3);a.D=setTimeout(function(){at(a,!0)},b);a.L=c+b}}else a.D&&(clearTimeout(a.D),a.D=null)}
function at(a,b){b&&(a.D=null);var c=a.G[0];if(c){var d=c.Rk,e=c.Sk;c=c.sector;for(var f=0,g=[],h=c-1;h<a.A[d][e].length;h++){var k=a.A[d][e][h];if(!k.Fa)break;var m=a.G.indexOf(k);a.G.splice(m,1);a.J.splice(m,1);g=g.concat(nt(k));k.Fa=!1;f++}a=kt(a,d,e,c,f,g,b);return b||a}return!1}l.info=function(){return this.A.length?[this.A.length,this.A[0].length,this.A[0][0].length,this.A[0][0][0].length]:[0,0,0,0]};
l.seek=function(a,b,c,d,e){var f=null,g=this.B,h=this.A[a];if(h){var k=h[b];if(!k&&g.ig&&b<g.$a){k=h[b]=Array(g.xd);for(h=0;h<k.length;h++)k[h]=dt(null,a,b,h+1,g.yb,0);this.$a<=b&&(this.$a=b+1)}if(k){for(h=0;h<k.length;h++)if(k[h]&&k[h].sector==c){f=k[h];if(null===f.pattern)if(d)f.pattern=0;else{for(d=1;++h<k.length;)null===k[h].pattern&&d++;jt(this,a,b,c,d,!!e,function(a,b){a&&(f=null);e&&e(f,b)});return e?null:f}break}!f&&g.ig&&9==g.bb&&(f=k[h]=dt(null,a,b,g.bb,g.yb,0),this.Xa<g.bb&&(this.Xa=g.bb))}}e&&
e(f,!1);return f};function gt(a,b,c){for(var d=a.length>>2,e=Array(d),f=0;f<d;f++)e[f]=b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24,c+=4;a.data=e}function nt(a){var b=a.length,c=Array(b),d=0;b>>=2;var e=a.data;a=a.pattern;for(var f=0;f<b;f++){var g=f<e.length?e[f]:a;c[d++]=g&255;c[d++]=g>>8&255;c[d++]=g>>16&255;c[d++]=g>>24&255}return c}l.read=function(a,b){var c=-1;if(a&&b<a.length){c=a.data;var d=b>>2;c=(d<c.length?c[d]:a.pattern)>>((b&3)<<3)&255}return c};
l.write=function(a,b,c){if(this.qe)return!1;if(b<a.length){if(c!=this.read(a,b,!0)){var d=a.data,e=a.pattern,f=b>>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.yc?f<a.Nc?(a.yc+=a.Nc-f,a.Nc=f):f>=a.Nc+a.yc&&(a.yc+=f-(a.Nc+a.yc)+1):(a.Nc=f,a.yc=1);d[f]=d[f]&~(255<<b)|c<<b;this.C&<(this,a,!0)}return!0}return null};function ot(a){for(var b="",c=0,d;d=ht(a,c++);)for(var e=0,f=d.length;e<f;e++)b+=String.fromCharCode(it(a,d,e));return btoa(b)}
l.save=function(){var a=0,b=[];b[a++]=[this.F,this.I,this.kb,this.$a,this.Xa,this.pb];if(!this.C&&!this.qe)for(var c=this.A,d=0;d<c.length;d++)for(var e=0;e<c[d].length;e++)for(var f=0;f<c[d][e].length;f++){var g=c[d][e][f];if(g&&g.yc){for(var h=[],k=0,m=g.Nc,r=g.Nc+g.yc;m<r;)h[k++]=g.data[m++];b[a++]=[d,e,f,g.Nc,h]}}return b};
l.restore=function(a){var b=0,c="unsupported restore format";if(a&&0<a.length){var d=0,e=a[d++];e&&2<=e.length&&(!this.A.length&&6<=e.length?this.create("local",e[2],e[3],e[4],e[5]):null!=e[0]&&null!=e[1]&&null!=this.I&&e[1]!=this.I&&(c="original checksum ("+e[1]+") differs from current checksum ("+this.I+")",b=-2));for(this.A.length||(b=-1);d<a.length&&0<=b;){var f=0,g=a[d++],h=g[f++],k=g[f++],m=g[f++];if(h>=this.A.length||k>=this.A[h].length||m>=this.A[h][k].length){c="sector (CHS="+h+":"+k+":"+
m+") out of range ("+b+" changes applied)";b=-1;break}if(this.qe){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.A[h][k][m]){for(k=h.data.length;k<e;)h.data[k++]=h.pattern;k=0;h.Nc=e;for(h.yc=f.length;e<g;)h.data[e++]=f[k++];b++}}}0>b&&-2!=b&&this.wa("Unable to restore disk '"+this.Qc+": "+c);return b};var $s=0;
function pt(a){u.call(this,"FDC",a);this.dmaRead=pt.prototype.tk;this.dmaWrite=pt.prototype.uk;this.dmaFormat=pt.prototype.Ik;this.M=qt(a.autoMount);this.K=a.sortBy||"name";"none"==this.K&&(this.K=null);this.B=[];this.L=!Oa("Mobi")&&window&&"FileReader"in window;this.exports={loadDisk:this.Ai,wait:this.Yn}}ja(pt,u);l=pt.prototype;
l.Bb=function(a,b,c){var d=this;switch(b){case "listDisks":this.ja[b]=c;if(this.K){b=[];for(a=0;a<c.options.length;a++)b.push(c.options[a]);b.sort(function(a,b){return"path"!=d.K?a.text.localeCompare(b.text):a.value.localeCompare(b.value)});for(a=0;a<b.length;a++)try{c.options[a]=b[a]}catch(e){break}}c.onchange=function(){rt(d)};return!0;case "descDisk":case "listDrives":return this.ja[b]=c,c.onchange=function(){var a=qa(c.value,10);null!=a&&st(d,a)},!0;case "loadDisk":return this.ja[b]=c,c.onclick=
function(){d.Ai()},!0;case "saveDisk":if(!this.L){c.parentNode.removeChild(c);break}this.ja[b]=c;c.onclick=function(){var a=d.ja.listDrives;a&&a.options&&d.A&&((a=d.A[qa(a.value,10)||0])?(a=a.sa)?(a=Ta(ot(a),"octet-stream",!0,a.oh.replace(".json",".img")),q(a)):d.wa("No diskette loaded in drive."):d.wa("No diskette drive selected."))};return!0;case "mountDisk":if(this.L)return this.ja[b]=c,c.onchange=function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length},c.onsubmit=function(a){if(a=
a.currentTarget[1].files[0]){var b=a.name;tt(d,sa(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};l.jc=function(a,b,c,d){this.oa=b;this.R=c;this.Ea=d;this.na=a;this.V=Eb(a,"ChipSet");qt(Qc(this.na,"autoMount"),this.M);ut(this);oc(b,this,vt);qc(b,this,wt);xt(this,"None","",!0);this.L&&xt(this,"Local Disk","?");xt(this,"Remote Disk","??");yt(this)||zb(this)};
function qt(a,b){if(a){if("string"==typeof a)try{a=eval("("+a+")")}catch(d){q("FDC auto-mount error: "+d.message+" ("+a+")"),a={}}}else a={};for(var c in a)b&&(b[c]=a[c]);return a}
l.Rb=function(a,b){if(!b){if(!a){if(this.reset(),this.na.W){this.B=[];for(a=0;a<this.A.length;a++)zt(this,a,!0);yt(this,!0)}}else if(!this.restore(a))return!1;if(a=this.ja.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;b<this.N;b++){var c=document.createElement("option");c.value=b;c.text=String.fromCharCode(65+b)+":";a.appendChild(c)}0<this.N&&(a.value="0",st(this,0))}}return!0};l.Qb=function(a){return a?this.save():!0};l.reset=function(){ut(this)};
l.save=function(){var a=new Ve(this);a.set(0,At(this));return a.data()};l.restore=function(a){return ut(this,a[0])};
function ut(a,b){var c=0,d=!0;b||(b=[0,0,Bt,Array(9),0,0,0,[]]);a.Na=b[c++];c++;a.Z=b[c++];a.G=b[c++];a.D=b[c++];a.C=b[c++];a.I=b[c++];var e=b[c++];var f=b[c++];null!=f&&(a.B=f);void 0===a.A&&(a.N=4,a.V&&(a.N=+lk(a.V,Dj,void 0)),a.A=Array(4));for(f=0;f<a.A.length;f++){var g=a.A[f];if(void 0===g){g=a.A[f]={};if(a.V)a:{var h=a.V;if(f<+lk(h,Dj,void 0)){if(!h.L){h=360;break a}if(f<h.L.length){h=h.L[f];break a}}h=0}else h=0;switch(h){case 160:case 180:g.$a=1;default:g.kb=40;g.Xa=9;break;case 720:g.kb=
80;g.Xa=9;break;case 1200:g.kb=80;g.Xa=15;break;case 1440:g.kb=80,g.Xa=18}}var k=a,m=f,r=e[f],x=0;h=!0;g.Na=m;g.Kd=g.me=!1;g.re=null;void 0===r&&(r=[Ct,!0,0,2,0]);"boolean"==typeof r[1]&&(r[1]=[Dt,g.kb||40,g.$a||r[3],g.Xa||9,g.pb||512,r[1],g.Kf,g.Pe,g.Qe]);g.lb=r[x++];var t=r[x++];g.name=t[0];g.kb=t[1];g.$a=t[2];g.Xa=t[3];g.pb=t[4];g.ne=t[5];(g.Kf=t[6])?(g.Pe=t[7],g.Qe=t[8]):(g.Kf=g.kb,g.Pe=g.$a,g.Qe=g.Xa);g.Wa=r[x++];g.wd=r[x++];g.zb=r[x++];g.wd=100<=g.wd?g.wd-100:g.wd-g.zb;g.bb=r[x++];g.xd=r[x++];
g.yb=r[x++];g.Ra=r[x++];g.Va=null;g.sa||(g.Xd="");var z=r[x++];102==z&&(z=!1);"boolean"==typeof z?(t=r[x++],r=r[x],z?(x=k.A[m],zt(k,m,!0,!0),x.me=!0,m=new Zs(k,x,"preload"),k.ii(x,m,t,r,!0)):Et(k,m,t,r,!0)?g.sa&&r&&Ft(k,t,r,g.sa):zb(k,!1)):void 0!==z&&g.sa&&0>g.sa.restore(z)&&(h=!1);h&&g.sa&&void 0!==g.Ra&&(g.Va=g.sa.seek(g.zb,g.Wa,g.bb));h||(d=!1)}a.H=b[c++]||0;a.F=b[c]||Gt;return d}
function At(a){var b=0,c=[];c[b++]=a.Na;c[b++]=0;c[b++]=a.Z;c[b++]=a.G;c[b++]=a.D;c[b++]=a.C;c[b++]=a.I;for(var d=b++,e=0,f=[],g=0;g<a.A.length;g++){var h=e++,k=a.A[g],m=0,r=[];r[m++]=k.lb;r[m++]=[k.name,k.kb,k.$a,k.Xa,k.pb,k.ne,k.Kf,k.Pe,k.Qe];r[m++]=k.Wa;r[m++]=k.wd+100;r[m++]=k.zb;r[m++]=k.bb;r[m++]=k.xd;r[m++]=k.yb;r[m++]=k.Ra;r[m++]=k.me;r[m++]=k.Pj;r[m]=k.Xd;f[h]=r}c[d]=f;d=b++;for(e=0;e<a.A.length;e++)f=a.A[e],f.sa&&Ht(a,f.Xd,f.sa);c[d]=a.B;c[b++]=a.H;c[b]=a.F;return c}
function yt(a,b){b||(a.J=0);for(var c in a.M){var d=a.M[c],e;if(!(e=d.path))a:{if(e=d.name){var f=a.ja.listDisks;if(f&&f.options)for(var g=0;g<f.options.length;g++){var h=f.options[g];if(h.text==e){e=h.value;break a}}}e=""}e&&(f=c.charCodeAt(0)-65,0<=f&&f<a.A.length?!Et(a,f,d.name||It(a,e)||sa(e,!0),e,!0)&&b&&zb(a,!1):a.wa("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")"))}return!!a.J}
l.Ai=function(){var a=this.ja.listDisks;return a?tt(this,a.options[a.selectedIndex].text,a.value):!1};
function tt(a,b,c,d){var e,f=a.ja.listDrives;if(f&&!isNaN(e=qa(f.value,10))&&0<=e&&e<a.A.length){if(!c)return zt(a,e),!0;if("?"==c)return a.wa('Use "Choose File" and "Mount" to select and load a local disk.'),!1;if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return!1;b=sa(c)}for(;0>Et(a,e,b,c,!1,d);){if(!window.confirm("Click OK to reload the original disk and discard any changes."))return!1;var g=a,h=c;for(f=0;f<g.B.length;f++)if(g.B[f][1]==h){g.B.splice(f,1);break}zt(a,
e,!1,!0)}return!0}a.wa("Unable to load the selected drive");return!1}function Et(a,b,c,d,e,f){var g=a.A[b];if(d&&(d=d.replace("/disks/pc/","/disks/pcx86/"),g.Xd.toLowerCase()!=d.toLowerCase())){zt(a,b,e,!0);if(g.Kd)return a.wa("Drive "+b+" busy"),0;g.Kd=!0;e&&(g.Jd=!0,a.J++);g.me=!!f;return(new Zs(a,g,"preload")).load(c,d,f,a.ii)?1:0}return-1}
l.ii=function(a,b,c,d,e){a.Kd=!1;if(b){var f=b.info();if(b&&f[0]>a.kb||f[1]>a.$a)this.wa('Diskette "'+c+'" too large for drive '+String.fromCharCode(65+a.Na)),b=null}b?(a.sa=b,a.Pj=c,a.Xd=d,It(this,d)||xt(this,c,d),Ft(this,c,d,b),f=b.info(),this.H|=Jt,a.re||this.wa('Mounted diskette "'+c+'" in drive '+String.fromCharCode(65+a.Na),a.Jd||e),a.Kf=f[0],a.Pe=f[1],a.Qe=f[2],this.na&&bd(this.na)):a.me=!1;a.Jd&&(a.Jd=!1,--this.J||zb(this));st(this,a.Na);a.re&&(a.re(),a.re=null)};
function xt(a,b,c,d){if((a=a.ja.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}function It(a,b){if((a=a.ja.listDisks)&&a.options)for(var c=0;c<a.options.length;c++){var d=a.options[c];if(d.value==b)return d.text}return null}
function st(a,b){if(0<=b&&b<a.A.length){var c=a.A[b],d=a.ja.listDisks;a=a.ja.listDrives;if(d&&a&&d.options&&a.options&&(a=qa(a.value,10),c=c.me?"?":c.Xd,!isNaN(a)&&a==b)){for(b=0;b<d.options.length;b++)if(d.options[b].value==c){d.selectedIndex!=b&&(d.selectedIndex=b);break}b==d.options.length&&(d.selectedIndex=0)}}}
function rt(a){var b=a.ja.listDisks,c=a.ja.descDisk,d=b.options[b.selectedIndex];if(c&&d){b={};if(d=d.getAttribute("data-value"))try{b=eval("("+d+")")}catch(e){q(a.type+" option error: "+e.message)}a=b.desc;void 0===a&&(a="");b=b.href;void 0!==b&&(a='<a href="'+b+'" target="_blank">'+a+"</a>");c.innerHTML=a}}l.Yn=function(a){for(var b=0;b<this.A.length;b++){var c=this.A[b];if(c&&c.Kd)return c.re||(c.re=a),!1}return!0};
function zt(a,b,c,d){var e=a.A[b];e.sa&&(Ht(a,e.Xd,e.sa),e.Pj="",e.Xd="",e.sa=null,e.me=!1,a.H|=Jt,d||a.wa("Drive "+String.fromCharCode(65+b)+" unloaded",c),c||d||st(a,b))}function Ft(a,b,c,d){var e;for(e=0;e<a.B.length;e++)if(a.B[e][1]==c){d.restore(a.B[e][2]);return}a.B[e]=[b,c,[]]}function Ht(a,b,c){var d;for(d=0;d<a.B.length;d++)if(a.B[d][1]==b){a.B[d][2]=c.save();break}}l.Zm=function(a,b){b&Kt?this.I&Kt||this.I&Lt&&this.V&&Of(this.V,6):ut(this);this.I=b};l.xl=function(){return 80};l.zl=function(){return this.Z};
l.wl=function(){var a=0;this.D<this.C&&(a=this.G[this.D]);this.I&Lt&&this.V&&Mf(this.V,6);++this.D>=this.C&&(this.Z&=~(Mt|Nt),this.D=this.C=0);return a};
l.Ym=function(a,b){this.C<this.G.length&&(this.G[this.C++]=b);a=this.G[0]&Ot;if(void 0!==Pt[a]&&this.C>=Pt[a].gd){b=!1;this.D=0;a=Qt(this);var c=a&Ot;switch(c){case Rt:Qt(this);Qt(this);St(this);break;case Tt:var d=Qt(this);this.Na=d&3;var e=this.A[this.Na];St(this);Ut(this,(e.lb&Vt)>>>24);break;case Wt:case Xt:d=Qt(this);b=d>>2&1;this.Na=d&3;e=this.A[this.Na];e.Wa=b;d=e.zb=Qt(this);var f=Qt(this);var g=e.bb=Qt(this);var h=Qt(this);e.yb=128<<h;e.xd=Qt(this);Qt(this);Qt(this);c==Xt?(c=e,c.lb=Yt|Zt,
c.sa&&(c.Va=null,c.lb=$t,this.V&&(El(this.V,2,this,"dmaRead",c),Al(this.V,2)))):(c=e,c.lb=Yt|Zt,c.sa&&(c.sa.qe?c.lb=au|Zt:(c.Va=null,c.lb=$t,this.V&&(El(this.V,2,this,"dmaWrite",c),Al(this.V,2)))));bu(this,e,a,b,d,f,g,h);b=!0;break;case cu:d=Qt(this);this.Na=d&3;e=this.A[this.Na];e.zb=e.wd=0;e.lb=du|eu;St(this);b=!0;break;case fu:e=this.A[this.Na];e.Wa=0;St(this);Ut(this,e.Na|e.Wa<<2|e.lb&gu);Ut(this,e.zb);this.Na=this.Na+1&3;break;case hu:d=Qt(this);b=d>>2&1;this.Na=d&3;e=this.A[this.Na];d=e.zb;
f=e.Wa=b;g=e.bb=1;h=0;e.lb=$t;e.sa&&(e.Va=e.sa.seek(e.zb,e.Wa,e.bb))?h=e.Va.length>>8:e.lb=Yt|Zt;bu(this,e,a,b,d,f,g,h);b=!0;break;case iu:d=Qt(this);b=d>>2&1;this.Na=d&3;e=this.A[this.Na];d=e.zb;f=e.Wa=b;g=1;h=Qt(this);e.yb=128<<h;e.xd=Qt(this);Qt(this);e.$h=Qt(this);c=e;c.lb=Yt|Zt;c.sa&&(c.Va=null,c.lb=$t,this.V&&(c.ie=0,c.Gc=Array(4),c.ig=!0,c.vf=0,El(this.V,2,this,"dmaFormat",c),Al(this.V,2),c.ig=!1));bu(this,e,a,b,d,f,g,h);b=!0;break;case ju:d=Qt(this),this.Na=d&3,e=this.A[this.Na],e.Wa=d>>2&
1,d=Qt(this),e.zb+=d-e.wd,0>e.zb&&(e.zb=0),e.zb>=e.kb&&(e.zb=e.kb-1),e.wd=d,e.lb=du,e.zb||(e.lb|=eu),St(this),b=!0}0<this.C&&(this.Z=this.Z|Mt|Nt);this.I&Lt&&(!e||e.lb&Yt||!b||this.V&&Of(this.V,6))}};l.yl=function(){var a=this.H;this.H&=~Jt;return a};l.Xm=function(a,b){this.F=b};function bu(a,b,c,d,e,f,g,h){St(a);Ut(a,b.Na|b.Wa<<2|b.lb&gu);Ut(a,(b.lb&ku)>>>8);Ut(a,(b.lb&lu)>>>16);var k=0;if(e!=b.zb||f!=b.Wa)k=g=1;c&mu&&(f^=k,d||(k=0));Ut(a,e+k);Ut(a,f);Ut(a,g);Ut(a,h)}
function Qt(a){var b=a.G[a.D];a.D++;return b}function St(a){a.D=a.C=0}function Ut(a,b){a.G[a.C++]=b}l.tk=function(a,b,c){if(void 0===b||0>b){b=-1;var d=null,e=0;if(!a.lb&&a.sa){do{if(a.Va&&(e=a.Ra,0<=(b=a.sa.read(a.Va,a.Ra++)))){d=a.Va;break}a.Va=a.sa.seek(a.zb,a.Wa,a.bb);if(!a.Va){a.lb=nu|Zt;break}a.Ra=0;ou(a)}while(1)}c(b,!1,d,e)}else c(-1,!1)};l.uk=function(a,b){return void 0!==b&&0<=b?pu(a,b):-1};
l.Ik=function(a,b){if(void 0!==b&&0<=b)a:if(a.lb)a=-1;else{a.Gc[a.ie++]=b;if(a.ie==a.Gc.length){a.zb=a.Gc[0];a.Wa=a.Gc[1];a.bb=a.Gc[2];a.yb=128<<a.Gc[3];for(var c=a.ie=0;c<a.yb;c++)if(0>pu(a,a.$h)){a=-1;break a}a.vf++}a.vf>=a.xd&&(b=-1);a=b}else a=-1;return a};function pu(a,b){if(a.lb||!a.sa)return-1;do{if(a.Va&&a.sa.write(a.Va,a.Ra++,b))break;a.Va=a.sa.seek(a.zb,a.Wa,a.bb);if(!a.Va){a.lb=qu|Zt;b=-1;break}a.Ra=0;ou(a)}while(1);return b}
function ou(a){a.bb++;a.bb>=a.Qe+1&&(a.bb=1,a.Wa++,a.Wa>=a.Pe&&(a.Wa=0,a.zb++))}var Dt="Floppy Drive",Kt=4,Lt=8,Nt=16,Mt=64,Bt=128,Rt=3,Tt=4,Wt=5,Xt=6,cu=7,fu=8,hu=10,iu=13,ju=15,Ot=31,mu=128,$t=0,Yt=8,du=32,Zt=64,Ct=192,gu=255,au=512,nu=1024,qu=8192,ku=65280,lu=16711680,eu=268435456,Vt=-16777216,Jt=128,Gt=0;aa={};
var Pt={3:{gd:3,yd:0,name:aa.Go},4:{gd:2,yd:1,name:aa.Eo},5:{gd:9,yd:7,name:aa.Ko},6:{gd:9,yd:7,name:aa.Ao},7:{gd:2,yd:0,name:aa.Co},8:{gd:1,yd:2,name:aa.Fo},10:{gd:2,yd:7,name:aa.Bo},13:{gd:6,yd:7,name:aa.xo},15:{gd:3,yd:0,name:aa.Do}},vt={1009:pt.prototype.xl,1012:pt.prototype.zl,1013:pt.prototype.wl,1015:pt.prototype.yl},wt={1010:pt.prototype.Zm,1013:pt.prototype.Ym,1015:pt.prototype.Xm};
Va(function(){for(var a=mb(document,"pcx86","fdc"),b=0;b<a.length;b++){var c=a[b],d=nb(c);d=new pt(d);lb(d,c)}});function Z(a){u.call(this,"HDC",a);this.dmaRead=Z.prototype.vk;this.dmaWrite=Z.prototype.wk;this.dmaWriteBuffer=Z.prototype.Jk;this.dmaWriteFormat=Z.prototype.Kk;this.X=[];this.ia=a.drives;this.L=(a=a.type)&&"AT"==a.toUpperCase()||!1;this.ua=!Oa("Mobi")&&window&&"FileReader"in window}ja(Z,u);l=Z.prototype;
l.Bb=function(a,b,c){var d=this;switch(b){case "saveHD0":case "saveHD1":if(this.ua)return this.ja[b]=c,c.onclick=function(a){return function(){var b=d.A&&d.A[a];if(b&&b.sa){b=b.sa;var c=b.oh||b.Qc,e=c.lastIndexOf(".");0<=e&&(c=c.substr(0,e));c+=".img";b=Ta(ot(b),"octet-stream",!0,c);q(b)}else d.wa("Hard drive "+a+" is not available.")}}(+b.slice(-1)),!0;c.parentNode.removeChild(c)}return!1};
l.jc=function(a,b,c,d){this.oa=b;this.R=c;this.Ea=d;this.na=a;if(d=Qc(a,"drives"))this.X=d;else if(this.ia)try{this.X=eval("("+this.ia+")")}catch(e){q("HDC drive configuration error: "+e.message+" ("+this.ia+")")}this.V=Eb(a,"ChipSet");this.F=0;this.ka=3;oc(b,this,this.L?ru:su);qc(b,this,this.L?tu:uu);this.L&&(this.F++,this.V&&this.V.ca==Rj&&this.F++,this.ka=2,b.L[vu]=2,b.M[vu]=2);Re(c,19,this.bm.bind(this));Re(c,64,this.cm.bind(this));this.reset();wu(this)||zb(this)};
l.Rb=function(a,b){if(!b)if(!a)xu(this),this.na.W&&wu(this,!0);else if(!this.restore(a))return!1;return!0};l.Qb=function(a){return a?this.save():!0};function bt(a){return a.na?a.na.ra:""}function ct(a){return a.na?a.na.B||"":""}l.reset=function(){xu(this,null,!0)};l.save=function(){var a=new Ve(this);a.set(0,yu(this));return a.data()};l.restore=function(a){return xu(this,a[0])};
function xu(a,b,c){var d=0,e=!0;a.Na=-1;if(a.L){if(b||(b=[0,0,0,0,0,0,0,zu,0,[0,-1]]),a.H=b[d++],a.ra=b[d++],a.I=b[d++],a.da=b[d++],a.ba=b[d++],a.aa=b[d++],a.N=b[d++],a.Z=b[d++],a.fa=b[d++],a.K=b[d++],"object"==typeof a.K){var f=a.K;a.K=f[0];a.Na=f[1]}}else b||(b=[0,Au,Array(14),0,0]),a.W=b[d++],a.Z=b[d++],a.G=b[d++],a.D=b[d++],a.C=b[d++],a.qa=b[d++],a.ma=b[d++],a.pa=b[d++],f=b[d++],void 0!==f?a.M=f:void 0===a.M&&(a.M=-1);void 0===a.A&&(a.A=Array(a.X.length));b=b[d];void 0===b&&(b=[]);for(d=0;d<a.A.length;d++){void 0===
a.A[d]&&(a.A[d]={});f=a.A[d];var g=a,h=d,k=f,m=a.X[d],r=b[d],x=c,t=0,z=!0;void 0===r&&(r=[Bu,0,!1,Array(8)]);k.Na=h;k.errorCode=r[t++];k.Qj=r[t++];k.ne=r[t++];k.de=r[t++];k.ee=r[t++];k.Wa=r[t++];k.$a=r[t++];k.Ed=r[t++];k.bb=r[t++];k.xd=r[t++];k.yb=r[t++];k.uf=g.L?0:1;k.name=m.name;void 0===k.name&&(k.name=Cu);k.path=m.path;k.mode=m.mode||(k.path?"preload":"local");"demandro"!=k.mode&&"demandrw"!=k.mode||ct(g)||(k.mode="local");k.type=m.type;if(void 0===k.type||void 0===Hu[g.F][k.type])k.type=g.ka;
m=Hu[g.F][k.type];k.Xa=m[2]||17;k.pb=m[3]||512;if(x&&g.V){var E=g.V;m=k.type;if(E.A){x=null;var O=E.A[18];15<m&&(x=m,m=15);h?(O=O&240|m,m=26):(O=O&15|m<<4,m=25);var K=E;K.A&&(K.A[18]=O,Ek(K));null!=x&&E.A&&(E.A[m]=x,Ek(E))}}void 0===k.sa&&(k.sa=null,g.wa("Type "+k.type+' "'+k.name+'" is fixed disk '+h,!0));Iu(g,k);k.Ra=r[t++];k.Va=null;k.sa&&(g=r[t],void 0!==g&&0>k.sa.restore(g)&&(z=!1),z&&void 0!==k.Ra&&(k.Va=k.sa.seek(k.Ed,k.Wa,k.bb+k.uf)));z||(e=!1);null!=a.W&&1>=d&&(a.W|=(f.type&3)<<(1-d<<1))}0<=
a.Na&&(a.B=a.A[a.Na]);return e}
function yu(a){var b=0,c=[];a.L?(c[b++]=a.H,c[b++]=a.ra,c[b++]=a.I,c[b++]=a.da,c[b++]=a.ba,c[b++]=a.aa,c[b++]=a.N,c[b++]=a.Z,c[b++]=a.fa,c[b++]=[a.K,a.Na]):(c[b++]=a.W,c[b++]=a.Z,c[b++]=a.G,c[b++]=a.D,c[b++]=a.C,c[b++]=a.qa,c[b++]=a.ma,c[b++]=a.pa,c[b++]=a.M);for(var d=0,e=[],f=0;f<a.A.length;f++){var g=d++,h=a.A[f],k=0,m=[];m[k++]=h.errorCode;m[k++]=h.Qj;m[k++]=h.ne;m[k++]=h.de;m[k++]=h.ee;m[k++]=h.Wa;m[k++]=h.$a;m[k++]=h.Ed;m[k++]=h.bb;m[k++]=h.xd;m[k++]=h.yb;m[k++]=h.Ra;m[k]=h.sa?h.sa.save():null;
e[g]=m}c[b]=e;return c}function Iu(a,b,c){if(b){var d=0,e=0;null==c&&((d=b.de[2])?e=b.de[0]<<8|b.de[1]:c=b.type);null==c||d||(d=Hu[a.F][c][1],e=Hu[a.F][c][0]);d&&((c=Hu[a.F][b.type])&&e!=c[0]&&d!=c[1]&&a.wa("Warning: drive parameters ("+e+","+d+") do not match drive type "+b.type+" ("+c[0]+","+c[1]+")"),b.kb=e,b.$a=d,null==b.sa&&(b.sa=new Zs(a,b,b.mode)))}}
function wu(a,b){b||(a.J=0);for(var c=0;c<a.A.length;c++){var d=a.A[c];d.name&&d.path?b&&d.sa&&d.sa.Cf||!a.gm(c,d.name,d.path,!0)&&b&&zb(a,!1):b&&void 0!==d.type&&(d.sa=null,Iu(a,d,d.type))}return!!a.J}l.gm=function(a,b,c,d){var e=this.A[a];if(e.Kd)return this.wa("Drive "+a+" busy"),!0;e.Kd=!0;d&&(e.Jd=!0,this.J++);(e.sa||new Zs(this,e,e.mode)).load(b,c,null,this.Lk);return!1};
l.Lk=function(a,b,c){a.Kd=!1;if(a.sa=b)this.wa('Mounted disk "'+c+'" in drive '+String.fromCharCode(67+a.Na),a.Jd),b=b.info(),b[0]==a.kb&&b[1]==a.$a&&b[2]==a.Xa&&b[3]==a.pb||this.wa("Warning: disk geometry ("+b[0]+":"+b[1]+":"+b[2]+") does not match "+Ju[this.F]+" drive type "+a.type+" ("+a.kb+":"+a.$a+":"+a.Xa+")");a.Jd&&(a.Jd=!1,--this.J||zb(this))};
l.Zl=function(){var a=0;this.D<this.C&&(a=this.G[this.D]);this.V&&Mf(this.V,5);this.Z&=~Ku;++this.D>=this.C&&(this.D=this.C=0,this.Z&=~(Lu|Mu|Nu));return a};l.vn=function(a,b){this.C<this.G.length&&(this.G[this.C++]=b);a=this.G[0]!=Ou?6:this.G.length;6==this.C&&(this.Z&=~Pu);this.C>=a&&(this.Z|=Lu,this.Z&=~Pu,Qu(this))};l.$l=function(){var a=this.Z;this.D<this.C&&(this.Z|=Pu);return a};l.yn=function(a,b){this.qa=b;this.V&&Mf(this.V,5);xu(this)};l.Yl=function(){return this.W};
l.xn=function(a,b){this.ma=b;this.Z=Pu|Mu|Nu};l.wn=function(a,b){this.pa=b};l.kh=function(){};function Ru(a){var b=-1;a.B&&(b=Su(a.B,function(){}),(1==a.B.Ra||a.B.Ra==a.B.pb)&&1<a.B.Ra&&(a.B.yb-=a.B.pb,a.I=a.I-1&255,a.B.yb>=a.B.pb?(a.Z=Tu,Su(a.B,function(b){0<=b?(Uu(a),a.V&&a.V.ca==Rj&&(a.Z=0),a.Z=a.Z|zu|Vu|Wu):(a.Z=Xu,a.H=Yu)},!1)):a.Z=zu|Vu));return b}l.xk=function(){return Ru(this)|Ru(this)<<8};
function Zu(a,b){a.B&&a.B.yb>=a.B.pb&&(0>$u(a.B,b)?(a.Z=Xu,a.H=Yu):(1==a.B.Ra||a.B.Ra==a.B.pb)&&1<a.B.Ra&&(a.B.yb-=a.B.pb,a.I=a.I-1&255,Uu(a),a.Z=zu|Vu,a.B.yb>=a.B.pb&&(a.Z|=Wu)))}l.Bm=function(a,b){Zu(this,b&255);Zu(this,b>>8&255)};l.bl=function(){return this.H};l.Gm=function(a,b){this.ra=b};l.dl=function(){return this.I};l.Em=function(a,b){this.I=b};l.el=function(){return this.da};l.Fm=function(a,b){this.da=b};l.$k=function(){return this.ba};l.Am=function(a,b){this.ba=b};l.Zk=function(){return this.aa};
l.zm=function(a,b){this.aa=b};l.al=function(){return this.N};l.Cm=function(a,b){this.N=b;this.Z=this.A[this.N&av?1:0]?this.Z|zu|Vu:this.Z&~zu};l.fl=function(){var a=this.Z;this.Z&zu&&(this.Z&=~Tu);return a};l.ym=function(a,b){this.fa=b;this.V&&Mf(this.V,14);bv(this)};l.Dm=function(a,b){this.K&cv&&!(b&cv)&&(this.H=dv);this.K=b};
function bv(a){var b=!1,c=a.fa,d=a.N&av?1:0,e=a.N&ev,f=a.ba|(a.aa&fv)<<8,g=a.da,h=a.I||256;a.Na=-1;a.B=null;a.H=gv;a.Z=zu|Vu;var k=a.A[d];k?(k.Ed=f,k.Wa=e,k.bb=g,k.yb=h*k.pb,c=c>=hv?c:c&iv,k.Va=null,k.Ra=0,k.errorCode=0,a.Na=d,a.B=k):c=-1;switch(c&iv){case jv:b=!0;break;case kv:a.Z=Tu;Su(k,function(b){0<=b&&a.V?(Uu(a),a.Z=zu|Vu|Wu):(a.Z=Xu,a.H=Yu)},!1);break;case lv:a.Z=Wu;break;case mv:b=!0;break;case nv:b=!0;break;case hv:a.H=dv;b=!0;break;case ov:k.$a=e+1,k.Xa=h,b=!0}b&&Uu(a)}
function Uu(a){a.V&&(a.K&pv||Of(a.V,14,120))}
function Qu(a){a.D=0;var b=qv(a),c=qv(a),d=c&32,e=d>>5,f=c&31,g=qv(a),h=qv(a),k=g<<2&768|h,m=g&63,r=qv(a),x=qv(a),t=a.A[e];t&&(t.Ed=k,t.Wa=f,t.bb=m,t.yb=r*t.pb);switch(b){case rv:sv(a,t?t.errorCode:tv);uv(a,c);uv(a,g);uv(a,h);uv(a,vv|d);b=-1;break;case Ou:for(c=0;0<=(b=qv(a));)t&&c<t.de.length&&(t.de[c++]=b);t&&Iu(a,t);b=vv;t||a.M!=e||(a.M=-1,b=wv);sv(a,b|d);b=-1;break;case xv:case yv:sv(a,vv|d),b=-1}if(0<=b)switch(void 0===t?b=-1:(t.errorCode=Bu,t.Qj=0),b){case zv:sv(a,vv|d);break;case Av:t.Ge=x;
sv(a,vv|d);break;case Bv:sv(a,vv|d);break;case Cv:Dv(a,t,function(b){sv(a,b|d)});break;case Ev:Fv(a,t,function(b){sv(a,b|d)});break;case Gv:Hv(a,t,function(b){sv(a,b|d)});break;default:sv(a,wv|d)}}function qv(a){var b=-1;a.D<a.C&&(b=a.G[a.D++]);return b}function sv(a,b){a.D=a.C=0;void 0!==b&&uv(a,b);a.V&&Of(a.V,5);a.Z|=Ku}function uv(a,b){a.G[a.C++]=b}l.vk=function(a,b,c){void 0===b||0>b?Su(a,c):c(-1,!1)};l.wk=function(a,b){return void 0!==b&&0<=b?$u(a,b):-1};
l.Jk=function(a,b){void 0!==b&&0<=b?(a.Ra<a.ee.length?a.ee[a.Ra++]=b:(a.errorCode=Iv,b=-1),a=b):a=-1;return a};l.Kk=function(a,b){if(void 0!==b&&0<=b)a:if(a.errorCode)a=-1;else{a.Gc[a.ie++]=b;if(a.ie==a.Gc.length){a.Ed=a.Gc[0];a.Wa=a.Gc[1];a.bb=a.Gc[2];a.yb=128<<a.Gc[3];for(var c=a.ie=0;c<a.yb;c++)if(0>$u(a,a.$h)){a=-1;break a}a.vf++}a.vf>=a.xd&&(b=-1);a=b}else a=-1;return a};
function Dv(a,b,c){b.errorCode=tv;if(b.sa&&(b.Va=null,a.V)){b.errorCode=Bu;El(a.V,3,a,"dmaRead",b);Al(a.V,3,function(a){a||b.errorCode!=Bu||(b.errorCode=tv);c(b.errorCode?wv:vv)});return}c(b.errorCode?wv:vv)}function Fv(a,b,c){b.errorCode=tv;if(b.sa&&(b.Va=null,a.V)){b.errorCode=Bu;El(a.V,3,a,"dmaWrite",b);Al(a.V,3,function(a){a||(b.errorCode==Bu&&(b.errorCode=tv),b.errorCode==Iv&&(b.errorCode=Bu));c(b.errorCode?wv:vv)});return}c(b.errorCode?wv:vv)}
function Hv(a,b,c){b.errorCode=tv;b.ee&&b.ee.length==b.yb||(b.ee=Array(b.yb));b.Ra=0;a.V?(b.errorCode=Bu,El(a.V,3,a,"dmaWriteBuffer",b),Al(a.V,3,function(a){a||b.errorCode!=Bu||(b.errorCode=tv);c(b.errorCode?wv:vv)})):c(b.errorCode?wv:vv)}
function Su(a,b,c){var d=-1,e=null,f=0;if(a.errorCode)return b&&b(d,!1,e,f),d;var g=!1!==c?1:0;if(a.Va&&(f=a.Ra,d=a.sa.read(a.Va,a.Ra),a.Ra+=g,0<=d))return e=a.Va,b&&b(d,!1,e,f),d;if(b){if(a.sa)return a.sa.seek(a.Ed,a.Wa,a.bb+a.uf,!1,function(c,k){(a.Va=c)?(e=c,f=a.Ra=0,Jv(a),d=a.sa.read(a.Va,a.Ra),a.Ra+=g):a.errorCode=Iv;b(d,k,e,f)}),d;a.errorCode=Iv;b(d,!1,e,f)}return d}
function $u(a,b){if(a.errorCode)return-1;do{if(a.Va&&a.sa.write(a.Va,a.Ra++,b))break;a.sa&&a.sa.seek(a.Ed,a.Wa,a.bb+a.uf,!0,function(b){a.Va=b});if(!a.Va){a.errorCode=Iv;b=-1;break}a.Ra=0;Jv(a)}while(1);return b}function Jv(a){a.bb++;var b=1-a.uf;a.bb>=a.Xa+b&&(a.bb=b,a.Wa++,a.Wa>=a.$a&&(a.Wa=0,a.Ed++))}l.bm=function(){var a=this.R.L&255;!(this.R.F>>8)&&128<a&&(this.M=a-128);return!0};l.cm=function(){var a;(a=this.R.F>>8||!this.V)||(a=!(this.V.ac[0].Yc&64));return a?!0:!1};
var Cu="Hard Drive",Ju=["XTC","ATC","COMPAQ"],Hu=[{0:[306,2],1:[375,8],2:[306,6],3:[306,4]},{1:[306,4],2:[615,4],3:[615,6],4:[940,8],5:[940,6],6:[615,4],7:[462,8],8:[733,5],9:[900,15],10:[820,3],11:[855,5],12:[855,7],13:[306,8],14:[733,7],16:[612,4],17:[977,5],18:[977,7],19:[1024,7],20:[733,5],21:[733,7],22:[733,5],23:[306,4]},{1:[306,4],2:[615,4],3:[615,6],4:[1023,8],5:[940,6],6:[697,5],7:[462,8],8:[925,5],9:[900,15],10:[980,5],11:[925,7],12:[925,9],13:[612,8],14:[980,4],16:[612,4],17:[980,5],18:[966,
6],19:[1023,8],20:[733,5],21:[733,7],22:[524,4,40],23:[924,8],24:[966,14],25:[966,16],26:[1023,14],27:[832,6,33],28:[1222,15,34],29:[1240,7,34],30:[615,4,25],31:[615,8,25],32:[905,9,25],33:[832,8,33],34:[966,7,34],35:[966,8,34],36:[966,9,34],37:[966,5,34],38:[612,16,63],39:[1023,11,33],40:[1023,15,34],41:[1630,15,52],42:[1023,16,63],43:[805,4,26],44:[805,2,26],45:[748,8,33],46:[748,6,33],47:[966,5,25]}],vu=496,dv=1,gv=0,Yu=16,fv=3,ev=15,av=16,Xu=1,Wu=8,Vu=16,zu=64,Tu=128,jv=16,kv=32,lv=48,mv=64,nv=
112,hv=144,ov=145,iv=240,pv=2,cv=4,vv=0,wv=2,zv=0,Av=1,rv=3,Bv=5,Cv=8,Ev=10,Ou=12,Gv=15,xv=224,yv=228,Bu=0,tv=4,Iv=20,Au=0,Pu=1,Lu=2,Mu=4,Nu=8,Ku=32,su={800:Z.prototype.Zl,801:Z.prototype.$l,802:Z.prototype.Yl},ru={496:Z.prototype.xk,497:Z.prototype.bl,498:Z.prototype.dl,499:Z.prototype.el,500:Z.prototype.$k,501:Z.prototype.Zk,502:Z.prototype.al,503:Z.prototype.fl},uu={800:Z.prototype.vn,801:Z.prototype.yn,802:Z.prototype.xn,803:Z.prototype.wn,807:Z.prototype.kh,811:Z.prototype.kh,815:Z.prototype.kh},
tu={496:Z.prototype.Bm,497:Z.prototype.Gm,498:Z.prototype.Em,499:Z.prototype.Fm,500:Z.prototype.Am,501:Z.prototype.zm,502:Z.prototype.Cm,503:Z.prototype.ym,1014:Z.prototype.Dm};Va(function(){for(var a=mb(document,"pcx86","hdc"),b=0;b<a.length;b++){var c=a[b],d=nb(c);d=new Z(d);lb(d,c)}});
function Kv(a,b,c){u.call(this,"Computer",a);var d=this;Lv(this,b);this.V=Qc(this,"autoPower",a);this.D=+Qc(this,"diagnostics",a);0<=this.D&&2>=this.D||(this.D=1);this.F=0;this.ma=a.busWidth||a.buswidth;this.A=Mv;this.M=null;this.J=this.fa=!1;this.qa=Qc(this,"url")||"";this.ra=(Math.random()+.1).toString(36).substr(2,12);this.B=Nv(this);if(this.R=kb("CPU",this.id)){this.Ea=kb("Debugger",this.id);this.C=[];for(b=null;b=Eb(this,"Video",b);)this.C.push(b);this.oa=new Rb({id:this.Dd+".bus",busWidth:this.ma},
this.R,this.Ea);var e=ob(this.id);this.ba=(this.I=kb("Panel",this.id))&&this.I.ja.print;this.ia=this.wa;this.ka=this.print;this.pa=this.rb;this.ba&&(this.ia=this.I.wa,this.ka=this.I.print,this.pa=this.I.rb);for(b=0;b<e.length;b++){var f=e[b];f.wa=function(a,b,c){Ov(d,a);return d.ia.call(this,a,b,c)}.bind(f);f.print=function(a){return d.ka.call(this,a)}.bind(f);f.rb=function(a,b,c){Ov(d,a,b);return d.pa.call(this,a,b,c)}.bind(f)}this.H=0;!this.ba&&this.D&&Pv(this);this.rb("PCx86 v1.40.0\nCopyright \u00a9 2012-2017 Jeff Parsons <[email protected]>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");
for(b=0;b<e.length;b++)f=e[b],f.jc&&f.jc(this,this.oa,this.R,this.Ea);Rc(this.R,this.id,function(){kd(d,!1)},1E3/Qv);b=null;f=Qc(this,"resume");void 0!==f&&(1<f.length?b=this.L=f:this.A=parseInt(f,10));f=!1;e=Ra("state");e||(f=!0,e=Qc(this,"state",a));e&&(b=this.X=e,f||(this.J=!0,this.A=Mv),this.A&&(this.N=new Ve(this,"1.40.0"),this.N.load()?b=null:delete this.N));!b&&this.A&&(b=Rv(this))&&(this.J=!0);if(this.aa=b){var g="Loading "+this.aa+"...";Ha(this.aa,null,!0,function(a,b,c){c?(d.L=null,d.J=
!1,d.wa("Unable to load machine state from server (error "+c+(b?": "+xa(b):"")+")")):(d.M=b,d.fa=!0);zb(d)},function(){d.rb(g,wb)})}else zb(this);this.ja.power||(this.V=!0);!c&&this.V&&this.ze(this.ve)}else q("Unable to find CPU component")}ja(Kv,u);function Pv(a){if(!a.H)for(var b=0;b<a.C.length;b++){var c=a.C[b];c&&(c=c.Ef)&&(c.style.opacity="1",c.style.lineHeight="1",a.H++)}}
function Ov(a,b,c){if(a.H)for(var d=0;d<a.C.length;d++){var e=a.C[d];e&&(e=e.Ef)&&(c!=wb||"..."!=b.slice(-3)?hb(e,b+"\n"):ib(e,b,b+"."))}}function ro(a){var b=a.D;3==a.D&&(a.D++,zb(a));return!b}function Lv(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){q(d.message+" ("+c+")")}}a.K=b}
function Qc(a,b,c){var d=Ra(b);if(d)try{var e=0<=d.indexOf("'")?'"':"'";d=eval(e+d+e)}catch(f){q(f.message+" ("+d+")"),d=void 0}void 0===d&&a.K&&(d=a.K[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}l=Kv.prototype;l.ze=function(a,b){for(var c=this,d=ob(this.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:this;if(!yb(f)){yb(f,function(){c.ze(a,b)});return}}a.call(this,b)};
function Sv(a,b){var c=new Ve(a,"1.40.0",Tv);if(c.load()&&Uv(c)){var d=c.get(Vv),e=b?b.get(Vv):"unknown";d!=e&&(a.wa("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}
l.ve=function(a){void 0===a&&(a=this.A||(this.M?Wv:Mv));if(!this.F){this.F++;var b=!1,c=!1;this.da=!1;var d=this.N||new Ve(this,"1.40.0");if(a==Xc)b=!0;else if(a>Mv){if(d.load(this.M)){this.G=new Ve(this,"1.40.0",Xv);this.G.load()&&(a!=Wv&&Yv(this,d)&&(a=Zv),$v(this.G));this.G.set(Vv,Ca("Y-m-d H:i:s"));aw(this.G);var e=this.A&&!this.J;if(a==Wv||gb("Click OK to restore the previous PCx86 machine state.")){if(c=Uv(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g):("error"==f&&"no machine state"!=
g?(this.wa("Error: "+g),"unable to verify user"==g&&(Na(bw,""),this.B=null)):this.rb(f+": "+g),$v(d),d.load()?(c=Uv(d),e=!0):c=!1))}e&&Sv(this,c?d:null)}else a==Zv&&d.clear()}else Sv(this);delete this.M;delete this.N}e=ob(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.R&&(c=cw(this,g,d,b,c));b=[d,a,c];a!=Xc?this.ze(this.lg,b):this.lg(b)}};
function cw(a,b,c,d,e){if(!b.Y.Sb){b.Y.Sb=!0;if(b.Rb){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/-[0-9]+\./i,"."))));"string"===typeof f&&(f=null);!b.Rb(f,d)&&f&&(b.wa("Unable to restore hardware state")&&(a.X&&!a.fa?(c.clear(),a.A=Mv,window&&window.location.reload()):a.da=!0),b.Rb(null),e=!1)}b.Y.Ke=!0;if(!d&&b.ri)for(a=b.ri.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
l.lg=function(a){if(!this.Y.Ke){a:{if(this.H){if(2==this.D){this.D++;this.rb("Press any key to continue...");var b=!1;break a}for(b=0;b<this.C.length;b++){var c=this.C[b];if(c&&(c=c.Ef)){var d=Ja();c.style.opacity="0";c.style.lineHeight="0";if(0<=d.indexOf("MSIE")||0<=d.indexOf("Trident"))c.style.fontSize="0";c.value=""}}this.H=0}this.D=0;b=!0}if(!b){zb(this,!1);this.ze(this.lg,a);return}this.Y.Ke=!0}b=a[0];c=0>a[1];a=a[2];if(d=this.ja.power)d.textContent="Shutdown";this.Y.Sb=!0;this.R&&(cw(this,
this.R,b,c,a),this.R.Gd());this.da&&(Yv(this,b),b.clear());!c&&this.G&&(this.G.clear(),delete this.G);this.F=0;qb(this.Dd,Qc(this,"autoScript"))};function Yv(a,b){if(!a.Y.Zd){if(gb("There may be a problem with your PCx86 machine.\n\nTo help us diagnose it, click OK to send this PCx86 machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PCx86",ver:"1.40.0"};d.url=a.qa;d.user=c;d.type="bug";d.data=b;Ha("http://www.pcjs.org/api/v1/report",d,!0)}return!0}return!1}
function dw(a,b,c){var d="none";if(a.F)return null;a.F--;var e=new Ve(a,"1.40.0"),f=new Ve(a,"1.40.0",Tv),g=Ca("Y-m-d H:i:s");f.set(Vv,g);e.set(Vv,g);e.set(ew,"1.40.0");e.set(fw,window?window.location.href:null);e.set(gw,Ja());if(a.R&&a.R.Qb){var h=a.R.Qb(b,c);"object"===typeof h&&e.set(a.R.id,h);c&&(a.R.Y.Sb=!1,!1===h&&(d=null))}g=ob(a.id);for(var k=0;k<g.length;k++){var m=g[k];m.Y.Sb&&(m.Qb&&(h=m.Qb(b,c),"object"===typeof h&&e.set(m.id,h)),c&&(m.Y.Sb=!1,!1===h&&(d=null)))}d&&(c?(g=h=!1,b?(a.B&&
hw(a,a.B,e.toString()),aw(f)&&aw(e)||(d=null,h=g=!0)):a.A&&(h=!0,g=a.A==iw),h&&e.clear(g)):d=e.toString());c&&(a.Y.Sb=!1,b=a.ja.power)&&(b.textContent="Power");a.F=0;return d}l.reset=function(){this.oa&&this.oa.reset&&this.oa.reset();for(var a=ob(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.oa&&c.reset&&c.reset()}};l.start=function(a,b){for(var c=ob(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}};
l.stop=function(a,b){for(var c=ob(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}};
l.Bb=function(a,b,c){var d=this;switch(b){case "power":return this.ja[b]=c,c.onclick=function(){d.F||(d.Y.Sb?dw(d,!1,!0):d.ze(d.ve))},!0;case "reset":return this.ja[b]=c,c.onclick=function(){if(d.Y.Sb&&!d.F)if(d.R&&(d.R.Y.Gd=d.R.Y.cb),d.A&&!d.L){var a=d.Y.Zd||!gb("Click OK to reset this PCx86 machine and discard all disk modifications.");dw(d,a,!0);!a&&d.X?window&&window.location.reload():(a||(d.W=!0),d.ve(Mv),d.W=!1)}else d.reset(),d.R&&d.R.Gd()},!0;case "save":if(ua(Ia(),"pcjs.org"))c.parentNode.removeChild(c);
else return this.ja[b]=c,c.onclick=function(){var a=Nv(d,!0);if(a){var b=!!(d.A&&!d.L||d.X),c=dw(d,b);b?hw(d,a,c):d.wa("Resume disabled, machine state not saved")}},!0}return!1};
function Nv(a,b){var c=a.B;c||((c=Ma(bw),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=jw(a,c))||a.wa("The user ID is invalid.")):b&&a.wa("Browser local storage is not available"));return c}
function jw(a,b){a.B=null;b=Ha(Ia()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Na(bw,b.data),a.B=b.data)}catch(d){q(d.message+" ("+c+")")}return a.B}function Rv(a){var b=null;a.B&&(b=Ia()+"/api/v1/user?req=load&user="+a.B+"&state="+kw(a,"1.40.0"));return b}
function hw(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=kw(a,"1.40.0");d.data=c;b=Ha(Ia()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.wa("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.wa(c),Na(bw,""),a.B=null)}}
function Eb(a,b,c){a=ob(a.id);for(var d=0;d<a.length;d++){var e=a[d];if(c)c==e&&(c=null);else if(e.type==b)return e}return null}function bd(a,b){if(a.C.length){var c=0,d=0;!b&&window&&(c=window.scrollX,d=window.scrollY);a=a.C[0];a.F&&a.F.focus();!b&&window&&window.scrollTo(c,d)}}
function kd(a,b){if(a.R){var c=a.R;if(c.ni&&(b||!c.Y.cb||c.Y.hi)){Df(c,"EAX",c.F);Df(c,"EBX",c.G);Df(c,"ECX",c.H);Df(c,"EDX",c.L);Df(c,"ESP",B(c));Df(c,"EBP",c.M);Df(c,"ESI",c.J);Df(c,"EDI",c.I);Df(c,"CS",c.fa.ha);Df(c,"DS",c.Ga.ha);Df(c,"SS",c.W.ha);Df(c,"ES",c.xa.ha);Df(c,"EIP",D(c));var d=Fd(c);Df(c,"PS",d);Df(c,"V",d&2048);Df(c,"D",d&1024);Df(c,"I",d&512);Df(c,"T",d&256);Df(c,"S",d&128);Df(c,"Z",d&64);Df(c,"A",d&16);Df(c,"P",d&4);Df(c,"C",d&1);80386==c.ca&&(Df(c,"FS",c.sb.ha),Df(c,"GS",c.wb.ha),
Df(c,"CR0",c.ra),Df(c,"CR2",c.td),Df(c,"CR3",c.Wc))}if(d=c.ja.speed)d.textContent=c.Y.cb&&c.U.jd?c.U.jd.toFixed(2)+"Mhz":"Stopped"}if(!1!==b)for(c=0;c<a.C.length;c++)Tq(a.C[c],b)}var Xv="failsafe",Tv="validate",Vv="timestamp",ew="version",fw="url",gw="browser",bw="user",Xc=-1,Mv=0,Wv=1,Zv=2,iw=3,Qv=2;Va(function(){for(var a=mb(document,"pcx86-machine"),b=0;b<a.length;b++){var c=a[b],d=nb(c);c=mb(c,"pcx86","computer");for(var e=0;e<c.length;e++){var f=c[e],g=nb(f);g=new Kv(g,d,!0);lb(g,f);g.V&&g.ze(g.ve)}}});
Wa.show.push(function(){for(var a=mb(document,"pcx86","computer"),b=0;b<a.length;b++){var c=nb(a[b]);if(c=kb("Computer",c.id))c.Y.Zd=!1,c.Y.Ke&&!c.Y.Sb&&c.ve(Xc)}});Wa.exit.push(function(){for(var a=mb(document,"pcx86","computer"),b=0;b<a.length;b++){var c=nb(a[b]);if(c=kb("Computer",c.id))c.Y.Zd=!0,c.Y.Sb&&dw(c,!(!c.A||c.L),!0)}});function Ve(a,b,c){this.id=a.id;this.Ea=a.Ea;this.A="";this.state={};this.B=this.C=!1;this.key=kw(a,b,c);$v(this,a.Gj)}l=Ve.prototype;
l.set=function(a,b){try{this.state[a]=b}catch(c){}};l.get=function(a){return this.state[a]||null};l.data=function(){return this.state};l.load=function(a){return a?(this.A=a,this.B=!0,this.C=!1,!0):this.B?!0:Ka()&&(a=Ma(this.key))?(this.A=a,this.B=!0):!1};function Uv(a){var b=!0;if(!a.C)try{a.state=JSON.parse(a.A),a.C=!0}catch(c){q(c.message||c),b=!1}return b}
function aw(a){var b=!0;if(Ka()){var c=JSON.stringify(a.state);Na(a.key,c)||(q("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}l.toString=function(){return this.state?JSON.stringify(this.state):this.A};function $v(a,b){a.A="";a.state={};a.B=a.C=!1;b&&a.set("parms",b)}
l.clear=function(a){$v(this);var b=[];try{for(var c=0,d=window.localStorage.length;c<d;c++)b.push(window.localStorage.key(c))}catch(e){}for(c=0;c<b.length;c++)if((d=b[c])&&(a||d.substr(0,this.key.length)==this.key)){try{window.localStorage.removeItem(d)}catch(e){}b.splice(c,1);c=0}};function kw(a,b,c){a=a.id;if(b){var d=b.indexOf(".");0<d&&(a+=".v"+b.substr(0,d))}c&&(a+="."+c);return a}var lw=0;
function mw(a,b,c,d,e,f){e("Loading "+a+"...");Ha(a,null,!0,function(g,h,k){k?(h||(h="unable to load "+a+" ("+k+")"),f(h,null)):nw(h,a,b,c,d,e,f)})}
function nw(a,b,c,d,e,f,g){function h(a,f){if(f)g(f,null);else{c&&(db(c,b,a),(f=b)&&0>f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1<d.length&&(d+=",")):d='{state:"'+d+'",':d="{",d+='url:"'+f+'"}',"object"==typeof resources&&(f=null),d=d.replace(/\$/g,"$$$$"),a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/(<xsl:variable name="APPNAME">).*?(<\/xsl:variable>)/,
"$1PCx86$2"),a=a.replace(/(<xsl:variable name="APPCLASS">).*?(<\/xsl:variable>)/,"$1pcx86$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(r){f=null,a=r.message}else a="unrecognized XML: "+(255<a.length?a.substr(0,255)+"...":a);g(a,f)}}a?e?ow(a,f,h):h(a,null):g("no data"+(b?" for file: "+
b:""),null)}
function ow(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ha(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=h[0],m,r=/( [a-z]+=)(['"])(.*?)\2/gi;m=r.exec(f);)k=0>k.toLowerCase().indexOf(m[1].toLowerCase())?k.replace(">",m[0]+">"):k.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=k&&(g=g.replace(h[0],k))}else{c(a,"missing <"+d[1]+
"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/,"");a=a.replace(d[0],g);ow(a,b,c)}})}else c(a,null)}
function pw(a,b,c,d){function e(a){if(void 0===h){var b=g&&mb(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=va(a))}function f(a){e("Error: "+a);k&&(--lw||Za(!0));k=!1}var g,h,k=!0;lw++;fb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var r=document.head||document.getElementsByTagName("head")[0],x=document.createElement("style");x.type="text/css";x.styleSheet?x.styleSheet.cssText=m:x.appendChild(document.createTextNode(m));r.appendChild(x)}c||
(c="/versions/pcx86/1.40.0/components.xsl");m=function(d,h){h?mw(c,null,null,!1,e,function(d,k){k?(db(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--lw||Za(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(k),(k=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(k,g),--lw||Za(!0)):f("invalid machine element: "+
a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?mw(b,a,d,!0,e,m):nw(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return k}function qw(a,b,c,d){Za(!1);return pw(a,b,c,d)}window.embedPC=qw;window.embedPCx86=qw;
window.commandMachine=function(a,b,c,d,e,f){if("script"==e)return qb(c,f)?(b&&(a.disabled=!0),!0):!1;if(d){var g=kb(d,c+".machine");if(g){var h=g.exports;if(h&&(h=h[e]))return h.call(g,f)?(b&&(a.disabled=!0),!0):!1}}console.log("unimplemented: commandMachine('"+c+"','"+d+"','"+e+"','"+f+"')");return!1};window.enableEvents=Za;window.sendEvent=ab;
function rw(a,b,c,d){if(!c&&b){d.push(b);a=fb[d[0]];b=null;for(var e in a)if(ua(e,"components.xsl")){b=e.replace(".xsl",".css");break}b?Ha(b,null,!0,function(a,b){sw(b,d)}):sw(null,d)}else q("Error ("+c+") requesting "+a)}
function sw(a,b){var c,d,e=b[0],f=b[1];var g=b[4];if(g=g.match(/^(\s*\(function\(\)\{)([\s\S]*)(}\)\(\);)/)){var h=fb[e],k={},m;for(m in h){var r=h[m],x=ta(m);if("xml"==x){for(x=/[ \t]*<disk [^>]*path=(['"])(.*?)\1.*?<\/disk>\n?/g;c=x.exec(h[m]);){var t=c[2];t&&!h[t]&&(r=r.replace(c[0],""))}c=m=sa(m)}else"xsl"==x&&(d=m=sa(m));k[m]=r}a&&(k[m="css"]=a);b[2]&&(k[m="parms"]=b[2]);b[3]&&(k[m="state"]=b[3]);c&&d?(a=JSON.stringify(k),f+=".js",g=g[1]+"var resources="+a+";"+g[2]+g[3],g=g.replace(/\u00A9/g,
"©"),a=Ta(g,"javascript",!1,f),a=a+(', copy it to your web server as "'+f+'", and then add the following to your web page:\n\n')+('<div id="'+e+'"></div>\n')+"...\n",a=a+('<script type="text/javascript" src="'+f+'">\x3c/script>\n')+('<script type="text/javascript">embedPC("'+e+'","'+c+'","'+d+'");\x3c/script>\n\n')+"The machine should appear where the <div> is located.",q(a)):q("Missing XML/XSL resources")}else q("Unsupported script")}
window.savePC=function(a,b,c){var d=kb("Computer",a),e=kb("Debugger",a);if(d){var f=dw(d,!0),g=d.K?JSON.stringify(d.K):null;b||(b="/versions/pcx86/1.40.0/pcx86"+(e?"-dbg":"")+".js");if(c&&c({state:f,Gj:g}))return!0;Ha(b,null,!0,function(c,d,e){rw(c,d,e,[a,sa(b,!0),g,f])});return!0}q("Unable to identify machine '"+a+"'");return!1};})();//# sourceMappingURL=/versions/pcx86/1.40.0/pcx86.map