(function(){/*
Jeff Parsons 2012-2016
This file is part of PCjs, a computer emulation software project at .
PCjs is free software: you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.
PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with PCjs. If not,
see .
You are required to include the above copyright notice in every source code file of every
copy or modified version of this work, and to display that copyright notice on every screen
that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js).
Some PCjs files also attempt to load external resource files, such as character-image files,
ROM files, and disk image files. Those external resource files are not considered part of PCjs
for purposes of the GNU General Public License, and the author does not claim any copyright
as to their contents.
Jeff Parsons 2012-2016
This file is part of PCjs, a computer emulation software project at .
PCjs is free software: you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.
PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with PCjs. If not,
see .
You are required to include the above copyright notice in every source code file of every
copy or modified version of this work, and to display that copyright notice on every screen
that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js).
Some PCjs files also attempt to load external resource files, such as character-image files,
ROM files, and disk image files. Those external resource files are not considered part of PCjs
for purposes of the GNU General Public License, and the author does not claim any copyright
as to their contents.
Jeff Parsons 2012-2016
This file is part of PCjs, a computer emulation software project at .
PCjs is free software: you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.
PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with PCjs. If not,
see .
You are required to include the above copyright notice in every source code file of every
copy or modified version of this work, and to display that copyright notice on every screen
that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js).
Some PCjs files also attempt to load external resource files, such as character-image files,
ROM files, and disk image files. Those external resource files are not considered part of PCjs
for purposes of the GNU General Public License, and the author does not claim any copyright
as to their contents.
Jeff Parsons 2012-2016
This file is part of PCjs, a computer emulation software project at .
PCjs is free software: you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.
PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with PCjs. If not,
see .
You are required to include the above copyright notice in every source code file of every
copy or modified version of this work, and to display that copyright notice on every screen
that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js).
Some PCjs files also attempt to load external resource files, such as character-image files,
ROM files, and disk image files. Those external resource files are not considered part of PCjs
for purposes of the GNU General Public License, and the author does not claim any copyright
as to their contents.
Jeff Parsons 2012-2016
This file is part of PCjs, a computer emulation software project at .
PCjs is free software: you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.
PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with PCjs. If not,
see .
You are required to include the above copyright notice in every source code file of every
copy or modified version of this work, and to display that copyright notice on every screen
that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js).
Some PCjs files also attempt to load external resource files, such as character-image files,
ROM files, and disk image files. Those external resource files are not considered part of PCjs
for purposes of the GNU General Public License, and the author does not claim any copyright
as to their contents.
Jeff Parsons 2012-2016
This file is part of PCjs, a computer emulation software project at .
PCjs is free software: you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.
PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with PCjs. If not,
see .
You are required to include the above copyright notice in every source code file of every
copy or modified version of this work, and to display that copyright notice on every screen
that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js).
Some PCjs files also attempt to load external resource files, such as character-image files,
ROM files, and disk image files. Those external resource files are not considered part of PCjs
for purposes of the GNU General Public License, and the author does not claim any copyright
as to their contents.
Jeff Parsons 2012-2016
This file is part of PCjs, a computer emulation software project at .
PCjs is free software: you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.
PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with PCjs. If not,
see .
You are required to include the above copyright notice in every source code file of every
copy or modified version of this work, and to display that copyright notice on every screen
that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js).
Some PCjs files also attempt to load external resource files, such as character-image files,
ROM files, and disk image files. Those external resource files are not considered part of PCjs
for purposes of the GNU General Public License, and the author does not claim any copyright
as to their contents.
Jeff Parsons 2012-2016
This file is part of PCjs, a computer emulation software project at .
PCjs is free software: you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.
PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with PCjs. If not,
see .
You are required to include the above copyright notice in every source code file of every
copy or modified version of this work, and to display that copyright notice on every screen
that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js).
Some PCjs files also attempt to load external resource files, such as character-image files,
ROM files, and disk image files. Those external resource files are not considered part of PCjs
for purposes of the GNU General Public License, and the author does not claim any copyright
as to their contents.
Jeff Parsons 2012-2016
This file is part of PCjs, a computer emulation software project at .
PCjs is free software: you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.
PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with PCjs. If not,
see .
You are required to include the above copyright notice in every source code file of every
copy or modified version of this work, and to display that copyright notice on every screen
that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js).
Some PCjs files also attempt to load external resource files, such as character-image files,
ROM files, and disk image files. Those external resource files are not considered part of PCjs
for purposes of the GNU General Public License, and the author does not claim any copyright
as to their contents.
Jeff Parsons 2012-2016
This file is part of PCjs, a computer emulation software project at .
PCjs is free software: you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.
PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with PCjs. If not,
see .
You are required to include the above copyright notice in every source code file of every
copy or modified version of this work, and to display that copyright notice on every screen
that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js).
Some PCjs files also attempt to load external resource files, such as character-image files,
ROM files, and disk image files. Those external resource files are not considered part of PCjs
for purposes of the GNU General Public License, and the author does not claim any copyright
as to their contents.
Jeff Parsons 2012-2016
This file is part of PCjs, a computer emulation software project at .
PCjs is free software: you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.
PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with PCjs. If not,
see .
You are required to include the above copyright notice in every source code file of every
copy or modified version of this work, and to display that copyright notice on every screen
that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js).
Some PCjs files also attempt to load external resource files, such as character-image files,
ROM files, and disk image files. Those external resource files are not considered part of PCjs
for purposes of the GNU General Public License, and the author does not claim any copyright
as to their contents.
Jeff Parsons 2012-2016
This file is part of PCjs, a computer emulation software project at .
PCjs is free software: you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.
PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with PCjs. If not,
see .
You are required to include the above copyright notice in every source code file of every
copy or modified version of this work, and to display that copyright notice on every screen
that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js).
Some PCjs files also attempt to load external resource files, such as character-image files,
ROM files, and disk image files. Those external resource files are not considered part of PCjs
for purposes of the GNU General Public License, and the author does not claim any copyright
as to their contents.
Jeff Parsons 2012-2016
This file is part of PCjs, a computer emulation software project at .
PCjs is free software: you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.
PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with PCjs. If not,
see .
You are required to include the above copyright notice in every source code file of every
copy or modified version of this work, and to display that copyright notice on every screen
that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js).
Some PCjs files also attempt to load external resource files, such as character-image files,
ROM files, and disk image files. Those external resource files are not considered part of PCjs
for purposes of the GNU General Public License, and the author does not claim any copyright
as to their contents.
Jeff Parsons 2012-2016
This file is part of PCjs, a computer emulation software project at .
PCjs is free software: you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.
PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with PCjs. If not,
see .
You are required to include the above copyright notice in every source code file of every
copy or modified version of this work, and to display that copyright notice on every screen
that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js).
Some PCjs files also attempt to load external resource files, such as character-image files,
ROM files, and disk image files. Those external resource files are not considered part of PCjs
for purposes of the GNU General Public License, and the author does not claim any copyright
as to their contents.
Jeff Parsons 2012-2016
This file is part of PCjs, a computer emulation software project at .
PCjs is free software: you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.
PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with PCjs. If not,
see .
You are required to include the above copyright notice in every source code file of every
copy or modified version of this work, and to display that copyright notice on every screen
that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js).
Some PCjs files also attempt to load external resource files, such as character-image files,
ROM files, and disk image files. Those external resource files are not considered part of PCjs
for purposes of the GNU General Public License, and the author does not claim any copyright
as to their contents.
Jeff Parsons 2012-2016
This file is part of PCjs, a computer emulation software project at .
PCjs is free software: you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.
PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with PCjs. If not,
see .
You are required to include the above copyright notice in every source code file of every
copy or modified version of this work, and to display that copyright notice on every screen
that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js).
Some PCjs files also attempt to load external resource files, such as character-image files,
ROM files, and disk image files. Those external resource files are not considered part of PCjs
for purposes of the GNU General Public License, and the author does not claim any copyright
as to their contents.
Jeff Parsons 2012-2016
This file is part of PCjs, a computer emulation software project at .
PCjs is free software: you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.
PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with PCjs. If not,
see .
You are required to include the above copyright notice in every source code file of every
copy or modified version of this work, and to display that copyright notice on every screen
that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js).
Some PCjs files also attempt to load external resource files, such as character-image files,
ROM files, and disk image files. Those external resource files are not considered part of PCjs
for purposes of the GNU General Public License, and the author does not claim any copyright
as to their contents.
Jeff Parsons 2012-2016
This file is part of PCjs, a computer emulation software project at .
PCjs is free software: you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.
PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with PCjs. If not,
see .
You are required to include the above copyright notice in every source code file of every
copy or modified version of this work, and to display that copyright notice on every screen
that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js).
Some PCjs files also attempt to load external resource files, such as character-image files,
ROM files, and disk image files. Those external resource files are not considered part of PCjs
for purposes of the GNU General Public License, and the author does not claim any copyright
as to their contents.
Jeff Parsons 2012-2016
This file is part of PCjs, a computer emulation software project at .
PCjs is free software: you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.
PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with PCjs. If not,
see .
You are required to include the above copyright notice in every source code file of every
copy or modified version of this work, and to display that copyright notice on every screen
that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js).
Some PCjs files also attempt to load external resource files, such as character-image files,
ROM files, and disk image files. Those external resource files are not considered part of PCjs
for purposes of the GNU General Public License, and the author does not claim any copyright
as to their contents.
*/
var e;function p(a,b,c){var d="";b?8=f?48:55),d=String.fromCharCode(f)+d;a>>=4}return(c?"0x":"")+d}function aa(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};
function da(a){return a.replace(/[&<>"']/g,function(a){return ca[a]})}var q=Date.now||function(){return+new Date};
function r(a,b){var c=0,d=null;if("object"==typeof resources&&(d=resources[a]))b&&b(a,d,c);else if("function"==typeof resources)resources(a,function(c,d){b&&b(a,c,d)});else{var f=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");f.onreadystatechange=function(){4===f.readyState&&(d=f.responseText,200==f.status||!f.status&&d.length&&"file:"==(window?window.location.protocol:"file:")||(c=f.status||-1),b&&b(a,d,c))};f.open("GET",a,!0);f.send()}}
function t(a){window&&window.alert(a)}function u(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var v={init:[],show:[],exit:[]},ea=!1,fa=!1,w=!0;function ga(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function x(a){v.init.push(a)}
function z(a){if(w)try{for(var b=0;bb?this.wa=this.id:(this.Ba=this.id.substr(0,b),this.wa=this.id.substr(b+1));this[a]=c;this.u={ready:!1,ta:!1,xa:!1,H:!1,error:!1};this.va=null;this.u.error=!1;this.A={};C.push(this)}var ia=void 0,ja={};
if(window){ia||(ia=window.location.search.substr(1));for(var ka,la=/\+/g,ma=/([^&=]+)=?([^&]*)/g;ka=ma.exec(ia);)ja[decodeURIComponent(ka[1].replace(la," "))]=decodeURIComponent(ka[2].replace(la," "))}function na(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b}
function D(a){var b;b||(b=B);a.prototype=na(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var E=window.PCjs.Machines||(window.PCjs.Machines={}),C=window.PCjs.Components||(window.PCjs.Components=[])}else E={},C=[];function F(a,b){if(void 0!==a){var c;b&&0<(c=b.indexOf("."))&&(a=b.substr(0,c+1)+a);for(c=0;cwa(a.O,b,c,d,f)&&(a.ja>b&&(a.ja=b),a.kawa(a.K,b,c,d,f)&&(a.Y>b&&(a.Y=b),a.caa.ia&&a.ba&&(d=a.ba);d>a.ea&&2>a.speed&&(d=a.ea);a.bb=Math.round(1E3/30);a.fa=Math.floor(1E6/c*d);a.la=Math.floor(1E6/30*d);a.Ea=Math.floor(1E6/a.oa*d);a.Da=Math.floor(1E6/a.na*d);b||(a.P=a.la,a.U=a.Ea,a.T=a.Da);a.ma=0}function Aa(a){1E6<=a.ma&&xa(a,!0);a.V=0;a.cb=q()}
function Ba(a){var b=q(),c=a.bb;a.V&&(c=Math.round(c*a.V/a.la));c-=b-a.cb;if(b-=a.Ca)a.ba=Math.round(a.S/(100*b))/10,864E5<=b&&ta(a);0>c?c=0:1==a.speed?a.ba<=a.ea&&(c=0):2==a.speed&&(c=0);a.ma+=a.V;return c}
function N(a){if(oa(a,!0)){a.u.Z||(ta(a),a.I&&a.I.start(),a.u.Z=!0,a.A.run&&(a.A.run.innerHTML="Halt"),a.da());Aa(a);try{do{a.step(a.fa);var b=a.L-a.G;a.S+=b;a.V+=b;a.L=a.G=0;a.U-=a.fa;0>=a.U&&(a.U+=a.Ea,a.za());a.T-=a.fa;0>=a.T&&(a.T+=a.Da,ya(a));a.P-=a.fa;if(0>=a.P){a.P+=a.la;break}}while(a.u.Z)}catch(c){M(a);a.update();oa(a,!1);pa(a,c.stack||c.message);return}setTimeout(function(a){return function(){N(a)}}(a),Ba(a))}else a.update(),a.I&&a.I.stop(a.Ca,a.S)}
e.step=function(a){this.b=this.j=-1;this.L=this.G=a;do{a=this.a[this.c];this.c++;this.v[a].call(this);if(0<=this.b){if(this.b>=this.ja&&this.b<=this.ka)for(var b=this.b,c=this.c,d=0;d=this.O[d][0]&&b<=this.O[d][1]&&this.O[d][3].call(this.O[d][2],b,c);this.b=-1}else if(0<=this.j){if(this.j>=this.Y&&this.j<=this.ca)for(b=this.j,c=this.c,d=0;d=this.K[d][0]&&b<=this.K[d][1]&&this.K[d][3].call(this.K[d][2],b,c);this.j=-1}this.G-=this.$a[a]}while(0>1)&128?64:0),b=b|(a.h&128?128:0);return a.B&60|b}
function Q(a,b,c){var d=a.f&256?1:0,f=(b&15)+(c&15)+d;10<=f&&(f=f+6&15|16);f+=(b&240)+(c&240);a.C=b^c;a.w=f;a.h=f&255;160<=f&&(f+=96);512<=f&&(f-=256);a.f=f;a.i=b+c+d&255;a.G--;return f&255}function R(a,b,c){var d=a.f&256?0:1,f=(b&15)-(c&15)-d;0>f&&(f=(f-6&15)-16);f+=(b&240)-(c&240);0>f&&(f-=96);a.h=a.i=(a.f=b-c-d)&255;a.C=b^c;a.w=a.f;a.f^=256;a.G--;return f&255}function sa(a){a.g=0;a.m=0;a.o=0;a.s=256;a.B=0;a.h=0;a.i=0;a.C=0;a.w=0;a.f=0;a.c=0;a.b=-1;a.j=-1;a.ba=0;a.S=a.L=a.G=0}
e.Hb=function(){this.c++;this.a[this.s--]=this.c>>8;this.s|=256;this.a[this.s--]=this.c&255;this.s|=256;this.B|=16;this.B=za(this);this.a[this.s--]=this.B;this.s|=256;this.B&=239;this.b=65534;this.c=this.a[this.b]|this.a[this.b+1]<<8};e.$c=function(){this.b=this.a[this.c++]+this.m&255;this.b=this.a[this.b]|this.a[this.b+1]<<8;this.h=this.i=this.g|=this.a[this.b]};e.bd=function(){this.b=this.a[this.c++];this.h=this.i=this.g|=this.a[this.b]};
e.xb=function(){this.j=this.a[this.c++];this.f=this.a[this.j]<<1;this.h=this.i=this.a[this.j]=this.f&255};e.ed=function(){this.B=za(this);this.a[this.s--]=this.B;this.s|=256};e.Zc=function(){this.b=this.c++;this.h=this.i=this.g|=this.a[this.b]};e.wb=function(){this.f=this.g<<1;this.h=this.i=this.g=this.f&255};e.Wc=function(){this.b=this.a[this.c++]|this.a[this.c++]<<8;this.h=this.i=this.g|=this.a[this.b]};
e.ub=function(){this.j=this.a[this.c++]|this.a[this.c++]<<8;this.f=this.a[this.j]<<1;this.h=this.i=this.a[this.j]=this.f&255};e.Gb=function(){this.c+=(this.h&128?0:(this.G--,this.a[this.c]<<24>>24))+1};e.ad=function(){this.b=this.a[this.c++];this.b=(this.a[this.b]|this.a[this.b+1]<<8)+this.o;this.h=this.i=this.g|=this.a[this.b]};e.cd=function(){this.b=this.a[this.c++]+this.m&255;this.h=this.i=this.g|=this.a[this.b]};
e.yb=function(){this.j=this.a[this.c++]+this.m&255;this.f=this.a[this.j]<<1;this.h=this.i=this.a[this.j]=this.f&255};e.Kb=function(){this.f=0};e.Yc=function(){this.b=(this.a[this.c++]|this.a[this.c++]<<8)+this.o;this.h=this.i=this.g|=this.a[this.b]};e.Xc=function(){this.b=(this.a[this.c++]|this.a[this.c++]<<8)+this.m;this.h=this.i=this.g|=this.a[this.b]};e.vb=function(){this.j=(this.a[this.c++]|this.a[this.c++]<<8)+this.m;this.f=this.a[this.j]<<1;this.h=this.i=this.a[this.j]=this.f&255};
e.xc=function(){this.b=this.c++;this.a[this.s--]=this.c>>8;this.s|=256;this.a[this.s--]=this.c&255;this.s|=256;this.c=this.a[this.b]|this.a[this.b+1]<<8};e.qb=function(){this.b=this.a[this.c++]+this.m&255;this.b=this.a[this.b]|this.a[this.b+1]<<8;this.h=this.i=this.g&=this.a[this.b]};e.Db=function(){this.b=this.a[this.c++];this.i=this.g&this.a[this.b];this.h=this.h&127|this.a[this.b]&128;this.w=0;this.C=this.a[this.b]&64?128:0};e.sb=function(){this.b=this.a[this.c++];this.h=this.i=this.g&=this.a[this.b]};
e.ld=function(){this.j=this.a[this.c++];this.f=this.f&65280|this.a[this.j];this.f<<=1;this.f=this.f&65534|(this.f&512?1:0);this.h=this.i=this.a[this.j]=this.f&255};e.gd=function(){this.s=this.s+1&255|256;this.B=this.a[this.s];this.f=this.B&1?256:0;this.i=this.B&2?0:1;this.h=this.B&128;this.w=0;this.C=this.B&64?128:0};e.pb=function(){this.b=this.c++;this.h=this.i=this.g&=this.a[this.b]};
e.kd=function(){this.f=this.f&65280|this.g;this.f<<=1;this.f=this.f&65534|(this.f&512?1:0);this.h=this.i=this.g=this.f&255};e.Cb=function(){this.b=this.a[this.c++]|this.a[this.c++]<<8;this.i=this.g&this.a[this.b];this.h=this.h&127|this.a[this.b]&128;this.w=0;this.C=this.a[this.b]&64?128:0};e.mb=function(){this.b=this.a[this.c++]|this.a[this.c++]<<8;this.h=this.i=this.g&=this.a[this.b]};
e.hd=function(){this.j=this.a[this.c++]|this.a[this.c++]<<8;this.f=this.f&65280|this.a[this.j];this.f<<=1;this.f=this.f&65534|(this.f&512?1:0);this.h=this.i=this.a[this.j]=this.f&255};e.Eb=function(){this.c+=(this.h&128?(this.G--,this.a[this.c]<<24>>24):0)+1};e.rb=function(){this.b=this.a[this.c++];this.b=(this.a[this.b]|this.a[this.b+1]<<8)+this.o;this.h=this.i=this.g&=this.a[this.b]};e.tb=function(){this.b=this.a[this.c++]+this.m&255;this.h=this.i=this.g&=this.a[this.b]};
e.md=function(){this.j=this.a[this.c++]+this.m&255;this.f=this.f&65280|this.a[this.j];this.f<<=1;this.f=this.f&65534|(this.f&512?1:0);this.h=this.i=this.a[this.j]=this.f&255};e.Cd=function(){this.f=256};e.ob=function(){this.b=(this.a[this.c++]|this.a[this.c++]<<8)+this.o;this.h=this.i=this.g&=this.a[this.b]};e.nb=function(){this.b=(this.a[this.c++]|this.a[this.c++]<<8)+this.m;this.h=this.i=this.g&=this.a[this.b]};
e.jd=function(){this.j=(this.a[this.c++]|this.a[this.c++]<<8)+this.m;this.f=this.f&65280|this.a[this.j];this.f<<=1;this.f=this.f&65534|(this.f&512?1:0);this.h=this.i=this.a[this.j]=this.f&255};e.sd=function(){this.s=this.s+1&255|256;this.B=this.a[this.s];this.f=this.B&1?256:0;this.i=this.B&2?0:1;this.h=this.B&128;this.w=0;this.C=this.B&64?128:0;this.s=this.s+2&255|256;this.c=this.a[this.s-1|256]|this.a[this.s]<<8};
e.lc=function(){this.b=this.a[this.c++]+this.m&255;this.b=this.a[this.b]|this.a[this.b+1]<<8;this.h=this.i=this.g^=this.a[this.b]};e.nc=function(){this.b=this.a[this.c++];this.h=this.i=this.g^=this.a[this.b]};e.Tc=function(){this.j=this.a[this.c++];this.f=this.f&65279|(this.a[this.j]&1?256:0);this.a[this.j]=(this.f=this.f&65280|this.a[this.j]>>1)&255;this.h=this.i=this.f&255};e.dd=function(){this.a[this.s--]=this.g;this.s|=256};e.kc=function(){this.b=this.c++;this.h=this.i=this.g^=this.a[this.b]};
e.Sc=function(){this.f=this.f&65279|(this.g&1?256:0);this.g=(this.f=this.f&65280|this.g>>1)&255;this.h=this.i=this.f&255};e.wc=function(){this.b=this.c;this.c=this.a[this.b]|this.a[this.b+1]<<8};e.hc=function(){this.b=this.a[this.c++]|this.a[this.c++]<<8;this.h=this.i=this.g^=this.a[this.b]};e.Qc=function(){this.j=this.a[this.c++]|this.a[this.c++]<<8;this.f=this.f&65279|(this.a[this.j]&1?256:0);this.a[this.j]=(this.f=this.f&65280|this.a[this.j]>>1)&255;this.h=this.i=this.f&255};
e.Ib=function(){this.c+=((this.w&255^this.C^this.w>>1)&128?0:(this.G--,this.a[this.c]<<24>>24))+1};e.mc=function(){this.b=this.a[this.c++];this.b=(this.a[this.b]|this.a[this.b+1]<<8)+this.o;this.h=this.i=this.g^=this.a[this.b]};e.oc=function(){this.b=this.a[this.c++]+this.m&255;this.h=this.i=this.g^=this.a[this.b]};e.Uc=function(){this.j=this.a[this.c++]+this.m&255;this.f=this.f&65279|(this.a[this.j]&1?256:0);this.a[this.j]=(this.f=this.f&65280|this.a[this.j]>>1)&255;this.h=this.i=this.f&255};
e.Mb=function(){this.B&=251};e.jc=function(){this.b=(this.a[this.c++]|this.a[this.c++]<<8)+this.o;this.h=this.i=this.g^=this.a[this.b]};e.ic=function(){this.b=(this.a[this.c++]|this.a[this.c++]<<8)+this.m;this.h=this.i=this.g^=this.a[this.b]};e.Rc=function(){this.j=(this.a[this.c++]|this.a[this.c++]<<8)+this.m;this.f=this.f&65279|(this.a[this.j]&1?256:0);this.a[this.j]=(this.f=this.f&65280|this.a[this.j]>>1)&255;this.h=this.i=this.f&255};
e.td=function(){this.s=this.s+2&255|256;this.c=(this.a[this.s-1|256]|this.a[this.s]<<8)+1};e.La=function(){this.b=this.a[this.c++]+this.m&255;this.b=this.a[this.b]|this.a[this.b+1]<<8;this.f=this.g+this.a[this.b]+(this.f&256?1:0);this.C=this.g^this.a[this.b];this.w=this.f;this.h=this.i=this.g=this.f&255};e.ib=function(){this.b=this.a[this.c++]+this.m&255;this.b=this.a[this.b]|this.a[this.b+1]<<8;this.g=Q(this,this.g,this.a[this.b])};
e.Na=function(){this.b=this.a[this.c++];this.f=this.g+this.a[this.b]+(this.f&256?1:0);this.C=this.g^this.a[this.b];this.w=this.f;this.h=this.i=this.g=this.f&255};e.kb=function(){this.b=this.a[this.c++];this.g=Q(this,this.g,this.a[this.b])};e.qd=function(){this.j=this.a[this.c++];this.f=this.f&65280|this.a[this.j];this.f=this.f&65023|(this.f&1?512:0);this.f>>=1;this.h=this.i=this.a[this.j]=this.f&255};e.fd=function(){this.s=this.s+1&255|256;this.h=this.i=this.g=this.a[this.s]};
e.Ka=function(){this.b=this.c++;this.f=this.g+this.a[this.b]+(this.f&256?1:0);this.C=this.g^this.a[this.b];this.w=this.f;this.h=this.i=this.g=this.f&255};e.hb=function(){this.b=this.c++;this.g=Q(this,this.g,this.a[this.b])};e.pd=function(){this.f=this.f&65280|this.g;this.f=this.f&65023|(this.f&1?512:0);this.f>>=1;this.h=this.i=this.g=this.f&255};e.vc=function(){this.b=this.a[this.c++]|this.a[this.c++]<<8;this.c=this.a[this.b]|this.a[this.b+1]<<8};
e.Ha=function(){this.b=this.a[this.c++]|this.a[this.c++]<<8;this.f=this.g+this.a[this.b]+(this.f&256?1:0);this.C=this.g^this.a[this.b];this.w=this.f;this.h=this.i=this.g=this.f&255};e.eb=function(){this.b=this.a[this.c++]|this.a[this.c++]<<8;this.g=Q(this,this.g,this.a[this.b])};e.nd=function(){this.j=this.a[this.c++]|this.a[this.c++]<<8;this.f=this.f&65280|this.a[this.j];this.f=this.f&65023|(this.f&1?512:0);this.f>>=1;this.h=this.i=this.a[this.j]=this.f&255};
e.Jb=function(){this.c+=((this.w&255^this.C^this.w>>1)&128?(this.G--,this.a[this.c]<<24>>24):0)+1};e.Ma=function(){this.b=this.a[this.c++];this.b=(this.a[this.b]|this.a[this.b+1]<<8)+this.o;this.f=this.g+this.a[this.b]+(this.f&256?1:0);this.C=this.g^this.a[this.b];this.w=this.f;this.h=this.i=this.g=this.f&255};e.jb=function(){this.b=this.a[this.c++];this.b=(this.a[this.b]|this.a[this.b+1]<<8)+this.o;this.g=Q(this,this.g,this.a[this.b])};
e.Oa=function(){this.b=this.a[this.c++]+this.m&255;this.f=this.g+this.a[this.b]+(this.f&256?1:0);this.C=this.g^this.a[this.b];this.w=this.f;this.h=this.i=this.g=this.f&255};e.lb=function(){this.b=this.a[this.c++]+this.m&255;this.g=Q(this,this.g,this.a[this.b])};e.rd=function(){this.j=this.a[this.c++]+this.m&255;this.f=this.f&65280|this.a[this.j];this.f=this.f&65023|(this.f&1?512:0);this.f>>=1;this.h=this.i=this.a[this.j]=this.f&255};e.Ed=function(){this.B|=4};
e.Ja=function(){this.b=(this.a[this.c++]|this.a[this.c++]<<8)+this.o;this.f=this.g+this.a[this.b]+(this.f&256?1:0);this.C=this.g^this.a[this.b];this.w=this.f;this.h=this.i=this.g=this.f&255};e.gb=function(){this.b=(this.a[this.c++]|this.a[this.c++]<<8)+this.o;this.g=Q(this,this.g,this.a[this.b])};e.Ia=function(){this.b=(this.a[this.c++]|this.a[this.c++]<<8)+this.m;this.f=this.g+this.a[this.b]+(this.f&256?1:0);this.C=this.g^this.a[this.b];this.w=this.f;this.h=this.i=this.g=this.f&255};
e.fb=function(){this.b=(this.a[this.c++]|this.a[this.c++]<<8)+this.m;this.g=Q(this,this.g,this.a[this.b])};e.od=function(){this.j=(this.a[this.c++]|this.a[this.c++]<<8)+this.m;this.f=this.f&65280|this.a[this.j];this.f=this.f&65023|(this.f&1?512:0);this.f>>=1;this.h=this.i=this.a[this.j]=this.f&255};e.Id=function(){this.j=this.a[this.c++]+this.m&255;this.j=this.a[this.j]|this.a[this.j+1]<<8;this.a[this.j]=this.g};e.Qd=function(){this.j=this.a[this.c++];this.a[this.j]=this.o};
e.Kd=function(){this.j=this.a[this.c++];this.a[this.j]=this.g};e.Nd=function(){this.j=this.a[this.c++];this.a[this.j]=this.m};e.gc=function(){this.h=this.i=this.o=this.o-1&255};e.Wd=function(){this.h=this.i=this.g=this.m};e.Pd=function(){this.j=this.a[this.c++]|this.a[this.c++]<<8;this.a[this.j]=this.o};e.Fd=function(){this.j=this.a[this.c++]|this.a[this.c++]<<8;this.a[this.j]=this.g};e.Md=function(){this.j=this.a[this.c++]|this.a[this.c++]<<8;this.a[this.j]=this.m};
e.zb=function(){this.c+=(this.f&256?0:(this.G--,this.a[this.c]<<24>>24))+1};e.Jd=function(){this.j=this.a[this.c++];this.j=(this.a[this.j]|this.a[this.j+1]<<8)+this.o;this.a[this.j]=this.g};e.Rd=function(){this.j=this.a[this.c++]+this.m&255;this.a[this.j]=this.o};e.Ld=function(){this.j=this.a[this.c++]+this.m&255;this.a[this.j]=this.g};e.Od=function(){this.j=this.a[this.c++]+this.o&255;this.a[this.j]=this.m};e.Yd=function(){this.h=this.i=this.g=this.o};
e.Hd=function(){this.j=(this.a[this.c++]|this.a[this.c++]<<8)+this.o;this.a[this.j]=this.g};e.Xd=function(){this.s=this.m|256};e.Gd=function(){this.j=(this.a[this.c++]|this.a[this.c++]<<8)+this.m;this.a[this.j]=this.g};e.Nc=function(){this.b=this.c++;this.h=this.i=this.o=this.a[this.b]};e.Cc=function(){this.b=this.a[this.c++]+this.m&255;this.b=this.a[this.b]|this.a[this.b+1]<<8;this.h=this.i=this.g=this.a[this.b]};e.Ic=function(){this.b=this.c++;this.h=this.i=this.m=this.a[this.b]};
e.Oc=function(){this.b=this.a[this.c++];this.h=this.i=this.o=this.a[this.b]};e.Ec=function(){this.b=this.a[this.c++];this.h=this.i=this.g=this.a[this.b]};e.Jc=function(){this.b=this.a[this.c++];this.h=this.i=this.m=this.a[this.b]};e.Ud=function(){this.h=this.i=this.o=this.g};e.Bc=function(){this.b=this.c++;this.h=this.i=this.g=this.a[this.b]};e.Td=function(){this.h=this.i=this.m=this.g};e.Lc=function(){this.b=this.a[this.c++]|this.a[this.c++]<<8;this.h=this.i=this.o=this.a[this.b]};
e.yc=function(){this.b=this.a[this.c++]|this.a[this.c++]<<8;this.h=this.i=this.g=this.a[this.b]};e.Gc=function(){this.b=this.a[this.c++]|this.a[this.c++]<<8;this.h=this.i=this.m=this.a[this.b]};e.Ab=function(){this.c+=(this.f&256?(this.G--,this.a[this.c]<<24>>24):0)+1};e.Dc=function(){this.b=this.a[this.c++];this.b=(this.a[this.b]|this.a[this.b+1]<<8)+this.o;this.h=this.i=this.g=this.a[this.b]};e.Pc=function(){this.b=this.a[this.c++]+this.m&255;this.h=this.i=this.o=this.a[this.b]};
e.Fc=function(){this.b=this.a[this.c++]+this.m&255;this.h=this.i=this.g=this.a[this.b]};e.Kc=function(){this.b=this.a[this.c++]+this.o&255;this.h=this.i=this.m=this.a[this.b]};e.Nb=function(){this.C=this.w=0};e.Ac=function(){this.b=(this.a[this.c++]|this.a[this.c++]<<8)+this.o;this.h=this.i=this.g=this.a[this.b]};e.Vd=function(){this.h=this.i=this.m=this.s&255};e.Mc=function(){this.b=(this.a[this.c++]|this.a[this.c++]<<8)+this.m;this.h=this.i=this.o=this.a[this.b]};
e.zc=function(){this.b=(this.a[this.c++]|this.a[this.c++]<<8)+this.m;this.h=this.i=this.g=this.a[this.b]};e.Hc=function(){this.b=(this.a[this.c++]|this.a[this.c++]<<8)+this.o;this.h=this.i=this.m=this.a[this.b]};e.$b=function(){this.b=this.c++;this.h=this.i=this.f=this.o-this.a[this.b];this.f^=256};e.Sb=function(){this.b=this.a[this.c++]+this.m&255;this.b=this.a[this.b]|this.a[this.b+1]<<8;this.h=this.i=this.f=this.g-this.a[this.b];this.f^=256};
e.ac=function(){this.b=this.a[this.c++];this.h=this.i=this.f=this.o-this.a[this.b];this.f^=256};e.Ub=function(){this.b=this.a[this.c++];this.h=this.i=this.f=this.g-this.a[this.b];this.f^=256};e.dc=function(){this.j=this.a[this.c++];this.h=this.i=this.a[this.j]=this.a[this.j]-1&255};e.uc=function(){this.h=this.i=this.o=this.o+1&255};e.Rb=function(){this.b=this.c++;this.h=this.i=this.f=this.g-this.a[this.b];this.f^=256};e.fc=function(){this.h=this.i=this.m=this.m-1&255};
e.Zb=function(){this.b=this.a[this.c++]|this.a[this.c++]<<8;this.h=this.i=this.f=this.o-this.a[this.b];this.f^=256};e.Ob=function(){this.b=this.a[this.c++]|this.a[this.c++]<<8;this.h=this.i=this.f=this.g-this.a[this.b];this.f^=256};e.bc=function(){this.j=this.a[this.c++]|this.a[this.c++]<<8;this.h=this.i=this.a[this.j]=this.a[this.j]-1&255};e.Fb=function(){this.c+=(this.i&255?(this.G--,this.a[this.c]<<24>>24):0)+1};
e.Tb=function(){this.b=this.a[this.c++];this.b=(this.a[this.b]|this.a[this.b+1]<<8)+this.o;this.h=this.i=this.f=this.g-this.a[this.b];this.f^=256};e.Vb=function(){this.b=this.a[this.c++]+this.m&255;this.h=this.i=this.f=this.g-this.a[this.b];this.f^=256};e.ec=function(){this.j=this.a[this.c++]+this.m&255;this.h=this.i=this.a[this.j]=this.a[this.j]-1&255};
e.Lb=function(){this.B&=-9;this.v[97]=this.La;this.v[101]=this.Na;this.v[105]=this.Ka;this.v[109]=this.Ha;this.v[113]=this.Ma;this.v[117]=this.Oa;this.v[121]=this.Ja;this.v[125]=this.Ia;this.v[225]=this.Ta;this.v[229]=this.Va;this.v[233]=this.Sa;this.v[237]=this.Pa;this.v[241]=this.Ua;this.v[245]=this.Wa;this.v[249]=this.Ra;this.v[253]=this.Qa};e.Qb=function(){this.b=(this.a[this.c++]|this.a[this.c++]<<8)+this.o;this.h=this.i=this.f=this.g-this.a[this.b];this.f^=256};
e.Pb=function(){this.b=(this.a[this.c++]|this.a[this.c++]<<8)+this.m;this.h=this.i=this.f=this.g-this.a[this.b];this.f^=256};e.cc=function(){this.j=(this.a[this.c++]|this.a[this.c++]<<8)+this.m;this.h=this.i=this.a[this.j]=this.a[this.j]-1&255};e.Xb=function(){this.b=this.c++;this.h=this.i=this.f=this.m-this.a[this.b];this.f^=256};
e.Ta=function(){this.b=this.a[this.c++]+this.m&255;this.b=this.a[this.b]|this.a[this.b+1]<<8;this.f=this.g-this.a[this.b]-(this.f&256?0:1);this.C=this.g^this.a[this.b];this.w=this.f;this.h=this.i=this.g=this.f&255;this.f^=256};e.yd=function(){this.b=this.a[this.c++]+this.m&255;this.b=this.a[this.b]|this.a[this.b+1]<<8;this.g=R(this,this.g,this.a[this.b])};e.Yb=function(){this.b=this.a[this.c++];this.h=this.i=this.f=this.m-this.a[this.b];this.f^=256};
e.Va=function(){this.b=this.a[this.c++];this.f=this.g-this.a[this.b]-(this.f&256?0:1);this.C=this.g^this.a[this.b];this.w=this.f;this.h=this.i=this.g=this.f&255;this.f^=256};e.Ad=function(){this.b=this.a[this.c++];this.g=R(this,this.g,this.a[this.b])};e.rc=function(){this.j=this.a[this.c++];this.h=this.i=this.a[this.j]=this.a[this.j]+1&255};e.tc=function(){this.h=this.i=this.m=this.m+1&255};
e.Sa=function(){this.b=this.c++;this.f=this.g-this.a[this.b]-(this.f&256?0:1);this.C=this.g^this.a[this.b];this.w=this.f;this.h=this.i=this.g=this.f&255;this.f^=256};e.xd=function(){this.b=this.c++;this.g=R(this,this.g,this.a[this.b])};e.Vc=function(){};e.Wb=function(){this.b=this.a[this.c++]|this.a[this.c++]<<8;this.h=this.i=this.f=this.m-this.a[this.b];this.f^=256};
e.Pa=function(){this.b=this.a[this.c++]|this.a[this.c++]<<8;this.f=this.g-this.a[this.b]-(this.f&256?0:1);this.C=this.g^this.a[this.b];this.w=this.f;this.h=this.i=this.g=this.f&255;this.f^=256};e.ud=function(){this.b=this.a[this.c++]|this.a[this.c++]<<8;this.g=R(this,this.g,this.a[this.b])};e.pc=function(){this.j=this.a[this.c++]|this.a[this.c++]<<8;this.h=this.i=this.a[this.j]=this.a[this.j]+1&255};e.Bb=function(){this.c+=(this.i&255?0:(this.G--,this.a[this.c]<<24>>24))+1};
e.Ua=function(){this.b=this.a[this.c++];this.b=(this.a[this.b]|this.a[this.b+1]<<8)+this.o;this.f=this.g-this.a[this.b]-(this.f&256?0:1);this.C=this.g^this.a[this.b];this.w=this.f;this.h=this.i=this.g=this.f&255;this.f^=256};e.zd=function(){this.b=this.a[this.c++];this.b=(this.a[this.b]|this.a[this.b+1]<<8)+this.o;this.g=R(this,this.g,this.a[this.b])};
e.Wa=function(){this.b=this.a[this.c++]+this.m&255;this.f=this.g-this.a[this.b]-(this.f&256?0:1);this.C=this.g^this.a[this.b];this.w=this.f;this.h=this.i=this.g=this.f&255;this.f^=256};e.Bd=function(){this.b=this.a[this.c++]+this.m&255;this.g=R(this,this.g,this.a[this.b])};e.sc=function(){this.j=this.a[this.c++]+this.m&255;this.h=this.i=this.a[this.j]=this.a[this.j]+1&255};
e.Dd=function(){this.B|=8;this.v[97]=this.ib;this.v[101]=this.kb;this.v[105]=this.hb;this.v[109]=this.eb;this.v[113]=this.jb;this.v[117]=this.lb;this.v[121]=this.gb;this.v[125]=this.fb;this.v[225]=this.yd;this.v[229]=this.Ad;this.v[233]=this.xd;this.v[237]=this.ud;this.v[241]=this.zd;this.v[245]=this.Bd;this.v[249]=this.wd;this.v[253]=this.vd};
e.Ra=function(){this.b=(this.a[this.c++]|this.a[this.c++]<<8)+this.o;this.f=this.g-this.a[this.b]-(this.f&256?0:1);this.C=this.g^this.a[this.b];this.w=this.f;this.h=this.i=this.g=this.f&255;this.f^=256};e.wd=function(){this.b=(this.a[this.c++]|this.a[this.c++]<<8)+this.o;this.g=R(this,this.g,this.a[this.b])};
e.Qa=function(){this.b=(this.a[this.c++]|this.a[this.c++]<<8)+this.m;this.f=this.g-this.a[this.b]-(this.f&256?0:1);this.C=this.g^this.a[this.b];this.w=this.f;this.h=this.i=this.g=this.f&255;this.f^=256};e.vd=function(){this.b=(this.a[this.c++]|this.a[this.c++]<<8)+this.m;this.g=R(this,this.g,this.a[this.b])};e.qc=function(){this.j=(this.a[this.c++]|this.a[this.c++]<<8)+this.m;this.h=this.i=this.a[this.j]=this.a[this.j]+1&255};
e.Sd=function(){var a;a=this.a[this.c++];switch(a){case 0:this.F("HALT");M(this);break;case 1:a=this.c;for(var b="";a=c&&(c+=32);a.j=a.j.substr(1);T(a,c)}0=b&&(b+=32),Ja(a,b),U(a,b,!0,0)&&(a.f.speed==a.f.Aa?U(a,b,!1,1):(c=!1,a.h[b]&&(clearTimeout(a.h[b]),c=!0),c=Ia(a,c),a.h[a.i=b]=setTimeout(function(a){return function(){U(a,b,!1,3)}}(a),c)),c=!0));return c}
function U(a,b,c,d){var f=!1;c||(a.h[b]=null,a.i==b&&(a.i=0));var g=0,h=a.b[b];void 0===h&&(1<=b&&26>=b&&(b+=64,g=a.v),h=a.b[b]);void 0!==h&&(b=h>>12,f=h>>8&15,g||(g=h&255),c?(a.g[b]|=1<b||8192<=b));b&&(b=a.w.shift(),void 0!==b&&(a.P=b),a.C=0,a.V=d);for(b=d=0;8>b;b++)a.S&1<b[d][0]&&(f=b[d][0]),g=a.K&&(d-=a.K,dMissing <canvas> support. Please try a newer web browser.";break}f.setAttribute("class","c1pjs-canvas");f.setAttribute("width",d.screenWidth);f.setAttribute("height",d.screenHeight);f.setAttribute("contenteditable","true");f.setAttribute("autocapitalize","off");f.setAttribute("autocorrect","off");f.style.backgroundColor=d.screenColor;
f.style.height="auto";0<=(window?window.navigator.userAgent:"").indexOf("MSIE")&&(f.style.height=(c.clientWidth*d.screenHeight/d.screenWidth|0)+"px",c.onresize=function(a,b,c,d){return function(){b.style.height=(a.clientWidth*d/c|0)+"px"}}(c,f,d.screenWidth,d.screenHeight));c.appendChild(f);var g=new Image,h=f.getContext("2d"),f=new Ma(d,f,h,g);g.onload=function(a){return function(){a.N()}}(f,d.charSet);g.src=d.charSet;H(f,c)}});
function Pa(a){B.call(this,"C1PSerialPort",a);this.u.H=!1;this.m=a.demo;this.reset(!0)}D(Pa);e=Pa.prototype;e.reset=function(a){if(a||2!=this.g){this.h=-1;this.i=0;this.c="";if(this.m){a=1;if(this.Ba){var b=this.Ba.match(/\d+/);null!==b&&(a=parseInt(b[0],10))}this.c='10 PRINT "HELLO OSI #'+a+'"\n'}this.j=!0;this.g=0}};e.start=function(){this.b&&this.m&&(V(this.b," C\n\n",3E3),setTimeout(function(a){return function(){a.g=1;V(a.b,"LOAD\n")}}(this),12E3));this.m=!1};
e.J=function(a,b,c){var d=this;switch(b){case "listSerial":return this.A[b]=c,!0;case "loadSerial":return this.A[b]=c,c.onclick=function(){d.A.listSerial&&r(d.A.listSerial.value,function(a,b,c){Qa(d,a,b,c)})},!0;case "mountSerial":return!u("Mobi")&&window&&"FileReader"in window?(this.A[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length}),c.onsubmit=function(a){var b=a.currentTarget[1].files[0],c=new FileReader;c.onload=function(){Qa(d,
b.name,c.result.toString(),0)};c.readAsText(b);return!1}):c.parentNode.removeChild(c),!0}return!1};e.X=function(a,b,c,d){this.a=a;this.o=b;this.v=c-b+1;this.s=this.o+this.v;if(this.f=d)va(d,b,c,this,this.W),O(d,b,c,this,this.R);this.N()};e.$=function(a,b){a&&!this.u.H&&(this.u.H=!0,this.I=b,this.b=L(b,"keyboard"))};
function Qa(a,b,c,d){if(c){a.i=0;a.c=c;a.j=!0;a.g=0;if(-1!==b.indexOf(".json",b.length-5))try{d="";var f=eval("("+c+")").bytes;for(c=0;c=--c.ha&&(0=c.Ga&&(c.aa=c.Ga),0>c.aa&&(c.aa=0),c.ha=20,a.g.update(a.g.D|128),Va(a))}this.D=b;a.m.D&4&&W(a,2,this)}}(a)};a.m={D:0,read:function(){},
update:function(a){return function(b){void 0!==b&&(this.D=b&-193);W(a,3,this);a.i.update();a.w.update()}}(a)};a.B={D:0,read:function(){},update:function(a){return function(b){void 0!==b&&(3==(b&3)&&(a.h.D=14),this.D=b);a.h.update()}}(a)};a.h={D:14,read:function(){},update:function(a){return function(b){void 0===b&&(b=a.h.D);b&=-2;0<=a.b&&0<=a.c[a.b].ga&&(b|=1);this.D=b;W(a,16,this)}}(a)};a.s={D:0,read:function(a){return function(){Wa(a)}}(a),update:function(a){return function(b){void 0!==b&&(this.D=
b);W(a,17,this)}}(a)};a.C={D:0,read:function(){},update:function(){return function(){}}(a)}}e.J=function(a,b,c){switch(b){case "listDisk":return this.A[b]=c,!0;case "loadDisk":return this.A[b]=c,c.onclick=function(a){return function(){if(a.A.listDisk){var b=a.A.listDisk.value,c=b;".json"!=b.substr(b.length-5)&&(c="http://"+window.location.host+"/api/v1/dump?disk="+b);a.F("loading "+aa(b)+"...");r(c,function(b,c,d){Xa(a,b,c,d)})}}}(this),!0}return!1};
e.X=function(a,b,c,d){this.a=a;this.o=b;if(this.f=d)va(d,b,c,this,this.W),O(d,b,c,this,this.R);this.N()};e.$=function(a){a&&!this.u.H&&(this.u.H=!0)};
function Xa(a,b,c,d){if(d)a.F("disk load error ("+d+")");else{d=[];a.F("mounting "+b+"...");try{if(d=eval("("+c+")"),d.length)if(d[0].length){var f=d[0];if(void 0===f[0].trackNum)a.F("data error: "+f[0]);else if(a.c[0]){for(c=0;c>8&255);a.push(b&255)}function Ya(a,b,c){b=b[c];if(void 0===b)throw Error("missing signature: "+c);for(c=0;cb?b&=3:32>b&&(b&=17);switch(b){case 0:a=a.j.D&4?a.g:a.v;break;case 1:a=a.j;break;case 2:a=a.m.D&4?a.i:a.w;break;case 3:a=a.m;break;case 16:a=c?a.B:a.h;break;case 17:a=a.s;break;default:a=a.C}return a}e.W=function(a,b){void 0!==b&&$a(this,a-this.o,!1).read()};e.R=function(a,b){void 0!==b&&(b=this.f.W(a),$a(this,a-this.o,!0).update(b))};function Ua(a,b,c){var d=-1;void 0!==b&&void 0!==c&&(d=0,c&32||(d|=2),a.g.D&64||(d|=1));a.b!=d&&(a.b=d,a.h.update())}
function Va(a){0<=a.b&&(a.c[a.b].ga=-1,a.s.update(255),a.h.update())}function Wa(a){var b;if(0<=a.b){b=a.c[a.b];var c=b.ra[b.aa];void 0!==c&&(0<=b.ga&&b.ga");b&&b.$(!0,a)}
x(function(){for(var a=I(document,"c1pjs","computer"),b=0;b');return}}if(!h){t(' definition must appear first in the specification');
break}if(f=F("debugger",d.id))g["debugger"]=[f],f.X&&f.X(h,l,k,g.cpu[0]);l=new Y(d,g);if(k=F("panel",d.id))if(g.panel=[k],k.ya){f=d.id;d=void 0;g=[];f&&(f=0<(d=f.indexOf("."))?f.substr(0,d+1):"");for(d=0;dg.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(g=window.location.pathname+g),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(g?' url="'+g+'"':"")));f||(a=a.replace(/().*?(<\/xsl:variable>)/,
"$1C1Pjs$2"),a=a.replace(/().*?(<\/xsl:variable>)/,"$1c1pjs$2"));g=null;if("<"==a.charAt(0))try{f||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(g=new window.ActiveXObject("Microsoft.XMLDOM"),g.async=!1,g.loadXML(a)):g=(new window.DOMParser).parseFromString(a,"text/xml")}catch(m){g=null,a=m.message}else a="unrecognized XML: "+(255/g.exec(a)){var f=d[2];b("Loading "+f+"...");r(f,function(g,h,l){if(l||!h)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(g=d[3])if(l=h.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=l[0],n,m=/( [a-z]+=)(['"])(.*?)\2/g;n=m.exec(g);)k=0>k.indexOf(n[1])?k.replace(">",n[0]+">"):k.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);l[0]!=k&&(h=h.replace(l[0],k))}else{c(a,"missing <"+d[1]+"> in "+f);return}h=h.replace(/<\?xml[^>]*>[\r\n]*/,"");
a=a.replace(d[0],h);db(a,b,c)}})}else c(a,null)}
function fb(a,b,c){function d(a){if(void 0===h){var b=g&&I(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=da(a))}function f(a){d("Error: "+a);l&&(--Z||A(!0));l=!1}var g,h,l=!0;Z++;E[a]={};try{if(g=document.getElementById(a)){var k;if("object"==typeof resources&&(k=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],m=document.createElement("style");m.type="text/css";m.styleSheet?m.styleSheet.cssText=k:m.appendChild(document.createTextNode(k));n.appendChild(m)}c||(c="/versions/c1pjs/1.30.1/components.xsl");
k=function(h,k){k?bb(c,null,null,!1,d,function(h,l){l?(E[a]&&c&&(E[a][c]=h),d("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--Z||A(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(h=new XSLTProcessor,h.importStylesheet(l),(l=h.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--Z||A(!0)):f("invalid machine element: "+a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):
f(h)}):f(h)};"<"!=b.charAt(0)?bb(b,a,void 0,!0,d,k):cb(b,null,a,void 0,!1,d,k)}else f("missing machine element: "+a)}catch(y){f(y.message)}return l}window.embedC1P=function(a,b,c){A(!1);return fb(a,b,c)};window.enableEvents=A;window.sendEvent=ha;})();