pcjs/docs/pcx86/examples/pcx86.js

1635 lines
322 KiB
JavaScript

(function(){/*
Jeff Parsons 2012-2016
This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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.
FPU instruction description excerpts from the PC Magazine "Programmer's Technical Reference:
The Processor and Coprocessor," Copyright 1992 by Ziff-Davis Press (ISBN 1-56276-016-5).
Jeff Parsons 2012-2016
This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 <http://pcjs.org/>.
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 <http://www.gnu.org/licenses/gpl.html>.
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 l,ba,ca={163840:[40,1,8],184320:[40,1,9],327680:[40,2,8],368640:[40,2,9],737280:[80,2,9],1228800:[80,2,15],1474560:[80,2,18],2949120:[80,2,36],21368320:[615,4,17]},n={Tm:1,Sj:3,Um:26," ":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,Jd:65,wh:66,xh:67,yh:68,E:69,zh:70,Ah:71,Bh:72,Ch:73,Dh:74,Eh:75,Fh:76,Gh:77,Ih:78,Kh:79,Mh:80,Q:81,Ph:82,
Rh:83,Th:84,Vh:85,Xh:86,Zh:87,ai:88,ci:89,vf:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Ld:97,bk:98,ck:99,d:100,e:101,mk:102,nk:103,pk:104,qk:105,Bl:106,k:107,Cl:108,Fl:109,n:110,Kl:111,p:112,q:113,r:114,Mm:115,t:116,Pm:117,Qm:118,Rm:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126},da={};da[186]=n[";"];da[187]=n["="];da[188]=n[","];da[189]=n["-"];da[190]=n["."];da[191]=n["/"];da[192]=n["`"];da[219]=n["["];da[220]=n["\\"];da[221]=n["]"];da[222]=n["'"];da[173]=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 ea(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0<a.indexOf(",");e&&(a=a.replace(/,/g,""));"#"==d?(b=8,d=null):"$"==d&&(b=16,d=null);null==d?a=a.substr(1):("0"==d&&(d=a.charAt(1),"b"==d&&e&&(b=2,d=null),"o"==d?(b=8,d=null):"x"==d&&(b=16,d=null)),null==d?a=a.substr(2):(d=a.charAt(a.length-1).toLowerCase(),"y"==d?(b=2,d=null):"."==d?(b=10,d=null):"h"==d&&(b=16,d=null),null==d&&(a=a.substr(0,a.length-1))));var f,d=a;((e=b)&&10!=e?16==e?d.match(/^[0-9a-f]+$/i):8==e?d.match(/^[0-7]+$/):2==e&&
d.match(/^[01]+$/):d.match(/^[0-9]+$/))&&!isNaN(f=parseInt(a,b))&&(c=f|0)}return c}function fa(a,b,c){var d="";b?8<b&&(b=8):b=a&-65536?8:4;if(null==a||isNaN(a))for(;0<b--;)d="?"+d;else for(;0<b--;){var e=a&15,e=e+(0<=e&&9>=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function ga(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 ha(a){var b="",c=a.lastIndexOf(".");0<=c&&(b=a.substr(c+1).toLowerCase());return b}function ia(a,b){return-1!==a.indexOf(b,a.length-b.length)}var ja={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};function ka(a){return a.replace(/[&<>"']/g,function(a){return ja[a]})}function la(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}
var ma={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",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"},na=Date.now||function(){return+new Date};
function oa(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())}var pa=[31,28,31,30,31,30,31,31,30,31,30,31];function qa(a,b){var c=0,d=1,e;for(e in a){if(d>=arguments.length)break;var f=a[e],g=arguments[d++],c=c&~f.sg|g<<f.shift&f.sg}return c}function ra(a,b){return(b&a.sg)>>a.shift}
function sa(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"==
typeof b){var k="",m;for(m in b)b.hasOwnProperty(m)&&(k&&(k+="&"),k+=m+"="+encodeURIComponent(b[m]));k=k.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(k)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g}function ta(){return"http://"+(window?window.location.host:"www.pcjs.org")}
function r(a){window&&window.alert(a)}function ua(a){var b=!1;window&&(b=window.confirm(a));return b}var va=null;function wa(){if(null==va){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}va=a}return va}function xa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}
function ya(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function za(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}
function Aa(a,b,c,d){var e=null;b="data:application/"+b+(c?";base64":"")+",";b=za("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}
var Ba={init:[],show:[],exit:[]},Ca=!1,Da=!1,Ea=!0;function Fa(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function Ga(a){Ba.init.push(a)}function Ha(a){if(Ea)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){r(""+("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks."))}}function Ia(a){!Ea&&a?(Ea=!0,Ca&&Ja("init"),Da&&Ja("show")):Ea=a}function Ja(a){Ba[a]&&Ha(Ba[a])}
Fa("onload",function(){Ca=!0;Ha(Ba.init)});Fa("onpageshow",function(){Da=!0;Ha(Ba.show)});Fa(za("Opera")||za("iOS")?"onunload":"onbeforeunload",function(){Ha(Ba.exit)});
function Ka(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Yh=b.comment;this.Gj=b;b=this.id.indexOf(".");0>b?this.Sd=this.id:(this.Fe=this.id.substr(0,b),this.Sd=this.id.substr(b+1));this[a]=c;this.ea={ready:!1,zf:!1,lg:!1,Vb:!1,error:!1};this.Hf=null;this.ea.error=!1;this.la={};this.Ia=null;La.push(this)}var Ma=void 0,Na={};
if(window){Ma||(Ma=window.location.search.substr(1));for(var Oa,Pa=/\+/g,Qa=/([^&=]+)=?([^&]*)/g;Oa=Qa.exec(Ma);)Na[decodeURIComponent(Oa[1].replace(Pa," "))]=decodeURIComponent(Oa[2].replace(Pa," "))}function Ra(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 Ta(a,b){b||(b=Ka);a.prototype=Ra(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ua=window.PCjs.Machines||(window.PCjs.Machines={}),La=window.PCjs.Components||(window.PCjs.Components=[])}else Ua={},La=[];function Va(a,b,c){Ua[a]&&b&&(Ua[a][b]=c)}function Wa(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b<La.length;b++){var d=La[b];a&&d.id.indexOf(a)||c.push(d)}return c}
function Xa(a,b){if(void 0!==a){var c;b&&0<(c=b.indexOf("."))&&(a=b.substr(0,c+1)+a);for(c=0;c<La.length;c++)if(La[c].id===a)return La[c]}return null}function Ya(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<La.length;d++)if(c)c==La[d]&&(c=null);else if(!(a!=La[d].type||b&&La[d].id.indexOf(b)))return La[d]}return null}function Za(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")}catch(c){r(c.message+" ("+a+")")}return b}
function $a(a,b,c){var d;b&&(void 0===d&&(d="Panel"),(d=Ya(d,a.id))&&(b=d.la[b])&&a.zb(null,c,b))}function ab(a,b){b=bb(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=Za(f))&&g.binding&&a.zb(g.type,g.binding,f,g.value),k=h.length}}}}
function bb(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}
Ka.prototype={constructor:Ka,parent:null,toString:function(){return this.name?this.name:this.id||this.type},zb:function(a,b,c){switch(b){case "clear":return this.la[b]||(this.la[b]=c,c.onclick=function(a){return function(){a.la.print&&(a.la.print.value="")}}(this)),!0;case "print":return this.la[b]||(this.ng=this.la[b]=c,c.value="",this.rc=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),
this.Ba=function(a){this.rc(a,this.Sd)}),!0;default:return!1}},log:function(){},rc:function(){},status:function(a){this.rc(this.Sd+": "+a)},Ba:function(a,b,c){c=c||this.type;b||r((c?c+": ":"")+a)},Ub:function(){return this.ea.Vb=!0},Tb:function(a,b){b&&(this.ea.Vb=!1);return!0}};function cb(a,b){if(a.ea.lg)return a.ea.zf=!1,a.ea.lg=!1;if(a.ea.error)return a.rc(a.toString()+" error"),!1;a.ea.zf=b;return a.ea.zf}function t(a,b){a.ea.error||(a.ea.ready=!1!==b,a.ea.ready&&(b=a.Hf,a.Hf=null,b&&b()))}
function db(a,b){b&&(a.ea.ready?b():a.Hf=b);return a.ea.ready}function eb(a,b){a.ea.error=!0;a.Ba(b)}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});
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 fb="undefined"!==typeof ArrayBuffer,gb={Rf:4,kc:5,Zc:6,Ic:7,Jc:8,Sa:9,Kb:11,Lb:12,Ud:4,Ci:60,Di:83,dc:3,yb:9,qc:16,Qf:1,Hi:19,Ji:28,Li:16,Ki:21,Ii:37,Fi:2,Gg:9,Gi:5,Ei:33,Ig:10,Hg:8,$e:3,Ze:15,Zi:51,$i:1,aj:2,bj:4,Yi:32,Jg:15,dj:15,Ma:16,Na:4,fj:11,ej:18,cj:24,Mb:4,gj:2,xe:16,hj:17,Og:18,ij:19,Ng:5,Pg:6,nj:2,mj:8,kj:9,lj:10,jj:10,Qg:10,Rg:10,Ni:80,Pi:144,Mi:86,Oi:154,Ri:101,Ti:165,Qi:107,Si:171,pj:70,rj:113,oj:76,qj:124,Vi:80,Xi:128,Ui:86,Wi:134,bf:3,af:16,Wg:10,Vg:8,sj:51,ec:8,tj:17,uj:36,Ac:11,
vj:16,Vd:10,Pc:2,Dg:18,Eg:7,Fg:15,Kg:12,Lg:7,Mg:11,Sg:18,Tg:7,Ug:15,Xg:15,Yg:7,Zg:13,dh:11,eh:7,fh:8,wj:8,zj:12,xj:18,yj:17,Aj:15,ah:8,$g:20,bh:2,ih:3,cf:9,hh:5,gh:11,kh:4,jh:17,Bj:11},hb={Rf:0,kc:0,Zc:0,Ic:0,Jc:0,Sa:0,Kb:1,Lb:1,Ud:3,Ci:14,Di:16,dc:2,yb:7,qc:7,Qf:0,Hi:7,Ji:13,Li:7,Ki:11,Ii:16,Fi:3,Gg:6,Gi:2,Ei:13,Ig:5,Hg:5,$e:2,Ze:7,Zi:23,$i:0,aj:1,bj:3,Yi:17,Jg:7,dj:11,Ma:7,Na:3,fj:7,ej:11,cj:15,Mb:2,gj:3,xe:7,hj:8,Og:8,ij:8,Ng:4,Pg:4,nj:2,mj:3,kj:5,lj:2,jj:3,Qg:5,Rg:3,Ni:14,Pi:22,Mi:17,Oi:25,Ri:17,
Ti:25,Qi:20,Si:28,pj:13,rj:21,oj:16,qj:24,Vi:13,Xi:21,Ui:16,Wi:24,bf:2,af:7,Wg:5,Vg:5,sj:19,ec:5,tj:5,uj:17,Ac:3,vj:5,Vd:3,Pc:0,Dg:8,Eg:5,Fg:9,Kg:5,Lg:5,Mg:4,Sg:5,Tg:5,Ug:4,Xg:7,Yg:5,Zg:8,dh:3,eh:4,fh:3,wj:11,zj:11,xj:15,yj:15,Aj:7,ah:5,$g:8,bh:0,ih:2,cf:6,hh:3,gh:6,kh:3,jh:5,Bj:5};function ib(a){Ka.call(this,"Panel",a,ib);this.H=this.I=this.R=-1}Ta(ib);
function jb(a,b,c,d){this.A=[a,b,c,d];this.B=null;void 0===a&&(this.A[0]=256*Math.random()|0,this.A[1]=256*Math.random()|0,this.A[2]=256*Math.random()|0,this.A[3]=255,this.B=null)}jb.prototype.toString=function(){this.B||(this.B="#"+fa(this.A[0],2)+fa(this.A[1],2)+fa(this.A[2],2));return this.B};function kb(a,b,c,d){this.x=a;this.y=b;this.Fc=c;this.A=d}kb.prototype.contains=function(a,b){return a>=this.x&&a<this.x+this.Fc&&b>=this.y&&b<this.y+this.A};
function lb(a,b,c,d){void 0===d&&(d=b>=c>>2);d?(b=new kb(a.x,a.y,a.Fc,a.A*b/c|0),a.y+=b.A,a.A-=b.A):(b=new kb(a.x,a.y,a.Fc*b/c|0,a.A),a.x+=b.Fc,a.Fc-=b.Fc);return b}l=ib.prototype;l.zb=function(a,b,c,d){return this.ba&&this.ba.zb(a,b,c,d)||this.A&&this.A.zb(a,b,c,d)||this.C&&this.C.zb(a,b,c,d)?!0:this.parent.zb.call(this,a,b,c,d)};l.pc=function(a,b,c,d){this.ba=a;this.ia=b;this.A=c;this.Ia=d;this.C=mb(a,"Keyboard")};l.Ub=function(a,b){b||ob();return!0};l.Tb=function(){return!0};
l.le=function(a,b){a.button||(this.R=b?0:-1,pb(this,a,b))};l.tg=function(a){pb(this,a)};
function pb(a,b,c){var d=1280/null.offsetWidth,e=720/null.offsetHeight,f=null.getBoundingClientRect(),d=(b.clientX-f.left)*d|0;b=(b.clientY-f.top)*e|0;null==c&&(a.R||(a.R=Math.abs(a.H-d)>Math.abs(a.I-b)?1:2),1==a.R?b=a.I:2==a.R&&(d=a.H));a.H=d;a.I=b;if(0<=d&&1280>d&&0<=b&&720>b){a:{c=d;if(960>c&&a.B&&a.B.ee)for(f=0;f<a.B.ee.length;f++)if(e=a.B.ee[f],e.contains(c,b)){c-=e.x;b-=e.y;var d=a.B.Ke[f],g=ra(qb.Cj,a.B.fg[d.rk]),f=g*a.ia.xb,d=(g+d.fd)*a.ia.xb-1;0<b&&(f+=e.Fc*(b-1)*a.ma);f+=c*a.ma;f|=0;f>d&&
(f=d);c=f;break a}c=-1}if(-1!==c&&(c&=-16,c!=a.oa)){b=c;if(a.context&&a.W&&a.Y){e=a.W.width;a.Y.fillStyle="black";a.Y.fillRect(0,360,e,360);rb(a,378,a.W,a.Y);a.Z=a.pa.width/24|0;if(null==b)sb(a,"Mouse over memory to dump");else for(sb(a,fa(b,8,!0),null,0,1),f=1;16>=f;f++){d="";for(g=1;8>=g;g++){var h;h=a.ia;var k=b++;h=h.R[(k&h.Fa)>>>h.da].Ed(k&h.B,k);sb(a,fa(h,2),null,1);d+=32<=h&&128>h?String.fromCharCode(h):"."}sb(a,d,null,0,1)}a.context.drawImage(a.W,0,360,e,360,a.La,a.Ta,a.za,a.Ea)}a.oa=c}}}
l.Zd=function(){};function tb(a,b,c,d){a.B.Ke[a.B.ii++]={rk:b,fd:c,type:d};return qa(qb,b,c,0,d)}function rb(a,b,c,d){var e,f=null.style.color,g=a.xa=10;a.D=g;a.K=b;a.L=a.ka=18;e||(e=a.ha||a.ka+"px Monaco, Lucida Console, Courier New");a.P=a.ha=e;c&&(a.pa=c);d&&(a.G=d,a.qa=f||"white")}
function sb(a,b,c,d,e){a.G.font=a.P;a.G.fillStyle=a.qa;a.G.fillText(b,a.D,a.K);a.D+=a.Z;null!=c&&(16!=a.Ja?b=c.toString():(b=8>a.va?"0x":"",b+=fa(c,a.va)),a.G.fillText(b,a.D,a.K),a.D+=a.Z);d&&(a.D+=a.Z*d);e&&(a.D=a.xa,a.K+=(a.L+2)*(e||1))}function ob(){for(var a=!1,b=bb(document,"pcx86","panel"),c=0;c<b.length;c++){var d=b[c],e=Za(d),f=Xa(e.id);f||(a=!0,f=new ib(e));ab(f,d);a&&t(f)}}Ga(ob);
function ub(a,b,c){Ka.call(this,"Bus",a,ub);this.A=b;this.Ia=c;this.D=a.busWidth||20;this.L=Math.pow(2,this.D);this.ba=this.Fa=this.L-1|0;this.da=32==this.D||20>=this.D?12:24>=this.D?14:15;this.xb=1<<this.da;this.ia=this.xb>>2;this.B=this.xb-1;this.H=this.L/this.xb|0;this.C=this.H-1;this.I=[];this.K=[];this.S=[];this.P=[];a=new u;vb(a,this.Ia);this.R=Array(this.H);for(b=0;b<this.H;b++)this.R[b]=a;a=this.A;b=this.R;c=this.da;a.vc=a.R=b;a.da=c;a.xb=1<<a.da;a.pb=a.xb-1;a.pf=b.length;a.$d=a.pf-1;a=this.A;
a.Fa=a.oc=this.Fa;t(this)}Ta(ub);ub.prototype.reset=function(){wb(this,!0)};ub.prototype.Ub=function(a,b){b||this.reset();return!0};
function xb(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.da;0<g&&h<a.R.length;){var k=a.R[h],m=h*a.xb,q=a.xb-(f-m);q>g&&(q=g);if(k&&k.size){if(k.type==d&&k.controller==e){if(f+g<=k.he)return k.Ge+=k.he-f,k.he=f,!0;if(f>=k.he+k.Ge){q=k.size-(f-m);q>g&&(q=g);k.Ge=f-k.he+q;f=m+a.xb;g-=q;h++;continue}}return zb(a,1,f,g)}f=new u(f,q,a.xb,d,e);vb(f,a.Ia,k);a.R[h++]=f;f=m+a.xb;g-=q}return 0>=g?(e=a.A,e.Pa&-2147483648&&Ab(e),a.A.ea.Nb||a.status(Math.floor(c/1024)+"Kb "+Bb[d]+" at "+fa(b)),!0):zb(a,2,b,c)}
var qb,Cb={Cj:20,count:8,jn:1,type:3},Db=0,Eb;for(Eb in Cb){var Fb=Cb[Eb];Cb[Eb]={sg:(1<<Fb)-1<<Db,shift:Db};Db+=Fb}qb=Cb;function wb(a,b){32==a.D?b?a.G&&(Gb(a,1048576,1048576,a.G),a.G=null):a.G||(a.G=Hb(a,1048576,1048576),Gb(a,1048576,1048576,Hb(a,0,1048576))):20<a.D&&(b=a.Fa&-1048577|(b?1048576:0),b!=a.Fa&&(a.Fa=b,a.A&&(a=a.A,a.Fa=a.oc=b)))}l=ub.prototype;
l.$f=function(a,b,c,d){if(!(a&this.B||!b||b&this.B)){for(var e=a>>>this.da;0<b;){var f=this.R[e];if(!f.controller)return zb(this,3,a,b,d);Ib(f,c,!0);b-=this.xb;e++}return!0}return zb(this,4,a,b)};function Jb(a,b,c){if(!(b&a.B||!c||c&a.B)){for(var d=b>>>a.da;0<c;){var e=a.R[d];b=new u(b);vb(b,a.Ia,e);a.R[d++]=b;b=d*a.xb;c-=a.xb}a=a.A;a.Pa&-2147483648&&Ab(a);return!0}return zb(a,5,b,c)}function Hb(a,b,c){var d=[];for(b>>>=a.da;0<c&&b<a.R.length;)d.push(a.R[b++]),c-=a.xb;return d}
function Gb(a,b,c,d,e){for(var f=0,g=b>>>a.da;0<c&&g<a.R.length;){var h=d[f++];if(!h)break;if(void 0!==e){var k=new u(b),m=k,q=e,y=a.Ia;m.id=h.id|1;m.Ge=h.Ge;m.size=h.size;q&&(m.type=q,m.I=q==Kb);fb?(m.R=h.R,m.S=h.S,m.Ka=h.Ka,m.td=h.td,m.V=h.V,Ib(m,Lb?Mb:Nb)):(m.V=h.V,Ib(m,Ob));vb(m,y,h);h=k}a.R[g++]=h;c-=a.xb}}l.Jb=function(a){return this.R[(a&this.Fa)>>>this.da].Wb(a&this.B,a)};
l.ga=function(a){var b=a&this.B,c=(a&this.Fa)>>>this.da;return b!=this.B?this.R[c].Ae(b,a):this.R[c++].Wb(b,a)|this.R[c&this.C].Wb(0,a+1)<<8};function Pb(a,b){var c=b&a.B,d=(b&a.Fa)>>>a.da;return c!=a.B?a.R[d].hf(c,b):a.R[d++].Ed(c,b)|a.R[d&a.C].Ed(0,b+1)<<8}l.fa=function(a){var b=a&this.B,c=(a&this.Fa)>>>this.da;if(b<this.B-2)return this.R[c].Fd(b,a);for(var d=0,e=4,f=0,g=4-(b&3);e--;)d|=this.R[c].Wb(b++,a++)<<f,--g||(c=c+1&this.C,b=0),f+=8;return d};
l.Mc=function(a,b){this.R[(a&this.Fa)>>>this.da].Yb(a&this.B,b&255,a)};l.bb=function(a,b){var c=a&this.B,d=(a&this.Fa)>>>this.da;c!=this.B?this.R[d].Ie(c,b&65535,a):(this.R[d++].Yb(c,b&255,a),this.R[d&this.C].Yb(0,b>>8&255,a+1))};function Qb(a,b,c){var d=b&a.B,e=(b&a.Fa)>>>a.da;d!=a.B?a.R[e].vh(d,c&65535,b):(a.R[e++].nf(d,c&255,b),a.R[e&a.C].nf(0,c>>8&255,b+1))}
l.Va=function(a,b){var c=a&this.B,d=(a&this.Fa)>>>this.da;if(c<this.B-2)this.R[d].He(c,b);else for(var e=4,f=4-(c&3);e--;)this.R[d].Yb(c++,b&255,a++),--f||(d=d+1&this.C,c=0),b>>>=8};
function Rb(a,b){var c=0,d=[],e=!a.G&&a.ba==a.Fa;e||wb(a,!0);for(var f=0;f<a.H;f++){var g=a.R[f];if(b&&g.type!=Kb||g.Ha||g.ri){d[c++]=f;var h=c++;if(g=g.save()){for(var k=0,m=0,q=[];k<g.length;){for(var y=g[k],w=k+1;w<g.length&&g[w]===y;)w++;q[m++]=w-k;q[m++]=y;k=w}q.length<g.length&&(g=q)}d[h]=g}}e||wb(a,!1);d[c]=e;return d}
function Sb(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]?r("Input port "+fa(k,4,!0)+" already registered"):f.I[k]=[h,!1]}}function Tb(a,b,c,d){for(var e=0,f=0;0<c;){var g=a.I[b],h=a.S[b]||1,k=1==h?255:2==h?65535:-1,m=k;void 0!==g&&g[0]&&(m=g[0](b,d),void 0===m?m=k:m&=k);e|=m<<f;f+=h<<3;b+=h;c-=h}return e}
function Ub(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.K[k]?r("Output port "+fa(k,4,!0)+" already registered"):f.K[k]=[h,!1]}}function Vb(a,b,c,d,e){for(var f=0;0<c;){var g=a.K[b],h=a.P[b]||1,k=1==h?255:2==h?65535:-1,k=(d>>>=f)&k;if(void 0!==g&&g[0])g[0](b,k,e);f+=h<<3;b+=h;c-=h}}function zb(a,b,c,d,e){b="Memory block error ("+b+": "+fa(c)+","+fa(d)+")";e?a.Ia?a.Ia.message(b):a.log(b):r(b);return!1}var Wb;
if(fb){var Xb=new ArrayBuffer(2);(new DataView(Xb)).setUint16(0,256,!0);Wb=256===(new Uint16Array(Xb))[0]}else Wb=!1;var Lb=Wb;
function u(a,b,c,d,e,f){this.id=Yb+=2;this.V=null;this.H=0;this.he=a;this.Ge=b;this.size=c||0;this.type=d||$b;this.I=d==Kb;this.controller=null;this.A=f;vb(this);this.Ha=this.ri=!1;if(c)if(e)this.controller=e,a=e.ui(a),this.V=a[0],this.H=a[1],Ib(this,e.rg());else if(fb)this.R=new ArrayBuffer(c),this.S=new DataView(this.R,0,c),this.Ka=new Uint8Array(this.R,0,c),this.td=new Uint16Array(this.R,0,c>>1),this.V=new Int32Array(this.R,0,c>>2),Ib(this,Lb?Mb:Nb);else{this.V=Array(c>>2);for(e=0;e<this.V.length;e++)this.V[e]=
0;Ib(this,Ob)}else Ib(this)}var $b=0,Kb=2,ac=["black","blue","green","cyan"],Bb="NONE RAM ROM VIDEO H/W UNPAGED PAGED".split(" "),Yb=0;function bc(a){fb&&!Lb&&(a=a<<24|a<<8&16711680|a>>8&65280|a>>>24);return a}
u.prototype={constructor:u,parent:null,yl:function(a){this.he=a},save:function(){var a,b;if(this.controller)a=null;else if(fb)for(a=Array(this.size>>2),b=0;b<a.length;b++)a[b]=this.S.getInt32(b<<2,!0);else a=this.V;return a},restore:function(a){if(this.controller)return!a;if(a&&this.size==a.length<<2){var b;if(fb)for(b=0;b<a.length;b++)this.S.setInt32(b<<2,a[b],!0);else this.V=a;return this.Ha=!0}return!1},da:function(){return 255},ia:function(){},ha:function(a,b){return this.Wb(a++,b++)|this.Wb(a,
b)<<8},Y:function(a,b){return this.Wb(a++,b++)|this.Wb(a++,b++)<<8|this.Wb(a++,b++)<<16|this.Wb(a,b)<<24},ba:function(a,b,c){this.Yb(a++,b&255,c++);this.Yb(a,b>>8,c)},la:function(a,b,c){this.Yb(a++,b&255,c++);this.Yb(a++,b>>8&255,c++);this.Yb(a++,b>>16&255,c++);this.Yb(a,b>>>24,c)},va:function(a){return this.V[a>>2]>>>((a&3)<<3)&255},fb:function(a){var b=a>>2;a=(a&3)<<3;var c=this.V[b]>>a;return 24>a?c&65535:c&255|(this.V[b+1]&255)<<8},Ga:function(a){var b=a>>2;a=(a&3)<<3;var c=this.V[b];a&&(c=c>>>
a|this.V[b+1]<<32-a);return c},Bb:function(a,b){var c=a>>2;a=(a&3)<<3;this.V[c]=this.V[c]&~(255<<a)|b<<a;this.Ha=!0},xc:function(a,b){var c=a>>2;a=(a&3)<<3;24>a?this.V[c]=this.V[c]&~(65535<<a)|b<<a:(this.V[c]=this.V[c]&16777215|b<<24,c++,this.V[c]=this.V[c]&-256|b>>8);this.Ha=!0},fc:function(a,b){var c=a>>2;if(a=(a&3)<<3){var d=-1<<a;this.V[c]=this.V[c]&~d|b<<a;c++;this.V[c]=this.V[c]&d|b>>>32-a}else this.V[c]=b;this.Ha=!0},ua:function(a,b){this.A&&cc(this.A,b,1,!1);return this.Ed(a,b)},Xa:function(a,
b){this.A&&cc(this.A,b,2,!1);return this.hf(a,b)},Fa:function(a,b){this.A&&cc(this.A,b,4,!1);return this.oh(a,b)},Ab:function(a,b,c){this.A&&cc(this.A,c,1,!0);this.I||this.nf(a,b,c)},wc:function(a,b,c){this.A&&cc(this.A,c,2,!0);this.I||this.vh(a,b,c)},Zb:function(a,b,c){this.A&&cc(this.A,c,4,!0);this.I||this.oa(a,b,c)},za:function(a,b){this.B.V[this.D]|=this.K;this.C.V[this.G]|=this.K;return this.L.Wb(a,b)},qb:function(a,b){this.B.V[this.D]|=this.K;this.C.V[this.G]|=this.K;return this.L.Ae(a,b)},
La:function(a,b){this.B.V[this.D]|=this.K;this.C.V[this.G]|=this.K;return this.L.Fd(a,b)},Gb:function(a,b,c){this.B.V[this.D]|=this.K;this.C.V[this.G]|=this.P;this.L.Yb(a,b,c)},zc:function(a,b,c){this.B.V[this.D]|=this.K;this.C.V[this.G]|=this.P;this.L.Ie(a,b,c)},mc:function(a,b,c){this.B.V[this.D]|=this.K;this.C.V[this.G]|=this.P;this.L.He(a,b,c)},Da:function(a,b){return dc(this.A,b,!1).Wb(a,b)},rb:function(a,b){return dc(this.A,b,!1).Ae(a,b)},Oa:function(a,b){return dc(this.A,b,!1).Fd(a,b)},Hb:function(a,
b,c){dc(this.A,c,!0).Yb(a,b,c)},Gc:function(a,b,c){dc(this.A,c,!0).Ie(a,b,c)},oc:function(a,b,c){dc(this.A,c,!0).He(a,b,c)},ra:function(a){return this.Ka[a]},W:function(a){return this.Ka[a]},xa:function(a){this.B.V[this.D]|=32;this.C.V[this.G]|=32;this.Wb=this.W;return this.Ka[a]},Ta:function(a){return this.S.getUint16(a,!0)},ka:function(a){return a&1?this.Ka[a]|this.Ka[a+1]<<8:this.td[a>>1]},pb:function(a){this.B.V[this.D]|=32;this.C.V[this.G]|=32;this.Ae=this.ka;return a&1?this.Ka[a]|this.Ka[a+
1]<<8:this.td[a>>1]},Ea:function(a){return this.S.getInt32(a,!0)},Z:function(a){return a&3?this.Ka[a]|this.Ka[a+1]<<8|this.Ka[a+2]<<16|this.Ka[a+3]<<24:this.V[a>>2]},Ja:function(a){this.B.V[this.D]|=32;this.C.V[this.G]|=32;this.Fd=this.Z;return a&3?this.Ka[a]|this.Ka[a+1]<<8|this.Ka[a+2]<<16|this.Ka[a+3]<<24:this.V[a>>2]},ub:function(a,b){this.Ka[a]=b;this.Ha=!0},ma:function(a,b){this.Ka[a]=b;this.Ha=!0},Cb:function(a,b){this.Ka[a]=b;this.B.V[this.D]|=32;this.C.V[this.G]|=96;this.Yb=this.ma;this.L.Ha=
!0},vc:function(a,b){this.S.setUint16(a,b,!0);this.Ha=!0},qa:function(a,b){a&1?(this.Ka[a]=b,this.Ka[a+1]=b>>8):this.td[a>>1]=b;this.Ha=!0},yc:function(a,b){a&1?(this.Ka[a]=b,this.Ka[a+1]=b>>8):this.td[a>>1]=b;this.B.V[this.D]|=32;this.C.V[this.G]|=96;this.Ie=this.qa;this.L.Ha=!0},Ob:function(a,b){this.S.setInt32(a,b,!0);this.Ha=!0},pa:function(a,b){a&3?(this.Ka[a]=b,this.Ka[a+1]=b>>8,this.Ka[a+2]=b>>16,this.Ka[a+3]=b>>24):this.V[a>>2]=b;this.Ha=!0},ic:function(a,b){a&3?(this.Ka[a]=b,this.Ka[a+1]=
b>>8,this.Ka[a+2]=b>>16,this.Ka[a+3]=b>>24):this.V[a>>2]=b;this.B.V[this.D]|=32;this.C.V[this.G]|=96;this.He=this.pa;this.L.Ha=!0}};function vb(a,b,c){a.Ia=b;a.ie=a.je=0;c&&(c.A&&(a.A=c.A),(a.ie=c.ie)&&ec(a,fc,!1),(a.je=c.je)&&gc(a,fc,!1))}function gc(a,b,c){c&&a.je||(a.Yb=!a.I&&b[1]||a.ia,a.Ie=!a.I&&b[3]||a.ba,a.He=!a.I&&b[5]||a.la);if(c||void 0===c)a.nf=b[1]||a.ia,a.vh=b[3]||a.ba,a.oa=b[5]||a.la}
function ec(a,b,c){c&&a.ie||(a.Wb=b[0]||a.da,a.Ae=b[2]||a.ha,a.Fd=b[4]||a.Y);if(c||void 0===c)a.Ed=b[0]||a.da,a.hf=b[2]||a.ha,a.oh=b[4]||a.Y}function Ib(a,b,c){b||(b=5==a.type?hc:6==a.type?ic:jc);ec(a,b,c);gc(a,b,c)}
var jc=[],Ob=[u.prototype.va,u.prototype.Bb,u.prototype.fb,u.prototype.xc,u.prototype.Ga,u.prototype.fc],fc=[u.prototype.ua,u.prototype.Ab,u.prototype.Xa,u.prototype.wc,u.prototype.Fa,u.prototype.Zb],ic=[u.prototype.za,u.prototype.Gb,u.prototype.qb,u.prototype.zc,u.prototype.La,u.prototype.mc],hc=[u.prototype.Da,u.prototype.Hb,u.prototype.rb,u.prototype.Gc,u.prototype.Oa,u.prototype.oc];
if(fb)var Nb=[u.prototype.ra,u.prototype.ub,u.prototype.Ta,u.prototype.vc,u.prototype.Ea,u.prototype.Ob],Mb=[u.prototype.W,u.prototype.ma,u.prototype.ka,u.prototype.qa,u.prototype.Z,u.prototype.pa],kc=[u.prototype.xa,u.prototype.Cb,u.prototype.pb,u.prototype.yc,u.prototype.Ja,u.prototype.ic];
function lc(a,b){Ka.call(this,"CPU",a,lc);b=a.cycles||b;var c=a.multiplier||1;this.T={};this.T.Yc=b;this.T.Bd=c;this.T.Jf=Math.round(this.T.Yc/1E4)/100;this.T.ve=this.T.Jf*this.T.Bd;this.ea.Nb=!1;this.ea.Oj=!1;this.ea.Le=a.autoStart;this.ea.ni=!1;this.ea.Df=!1;this.T.Lf=this.T.we=0;this.T.Mf=a.csStart;this.T.Qe=a.csInterval;this.T.Re=a.csStop;this.$j=this.sh.bind(this);t(this)}Ta(lc);var mc=["power","reset"];l=lc.prototype;
l.pc=function(a,b,c,d){this.ba=a;this.ia=b;this.Ia=d;for(b=0;b<mc.length;b++)(c=this.la[mc[b]])&&this.ba.zb(null,mc[b],c);this.od=mb(a,"FPU");this.S=mb(a,"ChipSet");a=nc(a,"autoStart");null!=a&&(this.ea.Le="true"==a?!0:"false"==a?!1:!!a);t(this)};l.reset=function(){};l.save=function(){return null};l.restore=function(){return!1};l.Ub=function(a,b){if(!b){if(a&&this.restore){oc(this);if(!this.restore(a))return!1;pc(this)}else this.reset();this.rc("No debugger detected")}qc(this);return!0};
l.Tb=function(a){return a?this.save():!0};l.Le=function(){return this.ea.Le||void 0===this.la.run?(this.sh(!0),!0):!1};l.ti=function(){return 0};function pc(a){void 0===a.T.Mf&&(a.T.Mf=0);void 0===a.T.Qe&&(a.T.Qe=-1);void 0===a.T.Re&&(a.T.Re=-1);a.ea.Df=0<=a.T.Mf&&0<a.T.Qe;a.ea.Df&&(a.T.Lf=0,a.T.we=a.T.Mf-a.ad)}
l.zb=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.la[b]=c;a=!0;break;case "run":this.la[b]=c;c.onclick=function(){var a;if(a=d.ba)if(a=d.ba,a.ea.Vb)a=!0;else{var b=null,c,h=Wa(a.id);for(c=0;c<h.length&&(b=h[c],b===a||b.ea.ready);c++);if(c==h.length)for(c=0;c<h.length&&(b=h[c],b===a||b.ea.Vb);c++);c==h.length&&(b=a);r("The "+b.type+" component ("+b.id+") is not "+(b.ea.ready?"powered yet":"ready yet"+(b.Hf?" (waiting for notification)":""))+".");a=!1}a&&(d.ea.Nb?rc(d,!0):
d.sh(!0))};a=!0;break;case "speed":this.la[b]=c;a=!0;break;case "setSpeed":this.la[b]=c,c.onclick=function(){sc(d,d.T.Bd<<1,!0)},c.textContent=this.T.ve.toFixed(2)+"Mhz",a=!0}return a};function tc(a,b){a.ea.Nb&&(b=a.A-b,a.A-=b,a.mc-=b)}function uc(a,b,c){a.ad+=b;c&&(a.mc=a.A=0)}
function vc(a,b){var c=30;60>c&&(c=60);2>c&&(c=2);var d=1;b&&1<a.T.Bd&&a.T.zd&&(d=a.T.zd/a.T.Jf);a.T.zi=Math.round(1E3/30);a.T.Il=Math.floor(a.T.Yc/c*d);a.T.zg=Math.floor(a.T.Yc/30*d);a.T.Bi=Math.floor(a.T.Yc/60*d);a.T.Ai=Math.floor(a.T.Yc/2*d);b||(a.T.Ue=a.T.zg,a.T.Te=a.T.Bi,a.T.Se=a.T.Ai);a.T.Ag=0}function wc(a,b){var c=a.ad+a.zc+a.mc-a.A;b&&1<a.T.Bd&&a.T.zd>a.T.Jf&&(c=Math.round(c/a.T.Bd));return c}function oc(a){a.T.zd=0;a.ad=a.zc=a.mc=a.A=0;pc(a);sc(a,1)}
function sc(a,b,c){if(void 0!==b){.8>a.T.zd/a.T.ve&&(b=1);a.T.Bd=b;b=a.T.Jf*a.T.Bd;if(a.T.ve!=b){a.T.ve=b;b=a.T.ve.toFixed(2)+"Mhz";var d=a.la.setSpeed;d&&(d.textContent=b);a.rc("target speed: "+b)}c&&a.ba&&xc(a.ba)}uc(a,a.zc);a.zc=0;a.T.Ad=na();a.T.Td=0;vc(a)}
l.sh=function(a){if(cb(this,!0)){if(!this.ea.Nb){sc(this);this.ba&&this.ba.start(this.T.Ad,wc(this));this.ea.Nb=!0;this.ea.Oj=!0;this.S&&this.S.start();var b=this.la.run;b&&(b.textContent="Halt");this.ba&&(this.ba.Zd(!0),a&&xc(this.ba,!0))}this.T.Ag>=this.T.Yc&&vc(this,!0);this.T.Ve=0;this.T.Kf=na();this.T.Td&&(a=this.T.Kf-this.T.Td,a>this.T.zi&&(this.T.Ad+=a,this.T.Ad>this.T.Kf&&(this.T.Ad=this.T.Kf)));try{do{var c=this.ea.Df?1:this.T.Il;if(this.S){yc(this.S);var d=this.S;a=c;var e=d.K[0];if(e.Pd){var f=
(wc(d.A,d.Z)-e.jd)/d.Ga|0,g=zc(d,0)-f;6==e.mode&&(g-=f);var h=g*d.Ga|0;6==e.mode&&(h>>=1);a>h&&(a=h)}var c=a,k=this.S;a=c;if(k.B&&k.B[11]&64){var m=k.ha-wc(k.A,k.Z);0<m&&a>m&&(a=m)}c=a}try{this.Pj(c)}catch(y){if("number"!=typeof y)throw y;}var q=this.mc-this.A;this.zc+=q;this.T.Ve+=q;uc(this,0,!0);a=q;this.ea.Df&&(b=!1,this.T.Lf=this.T.Lf+this.ti()|0,this.T.we-=a,0>=this.T.we&&(this.T.we+=this.T.Qe,b=!0),0<=this.T.Re&&this.T.Re<=wc(this)&&(this.T.Qe=this.T.Re=-1,pc(this),rc(this),b=!0),b&&this.rc(wc(this)+
" cycles: checksum="+fa(this.T.Lf)));this.T.Te-=q;0>=this.T.Te&&(this.T.Te+=this.T.Bi,this.ba&&Ac(this.ba));this.T.Se-=q;0>=this.T.Se&&(this.T.Se+=this.T.Ai,this.ba&&this.ba.Zd());this.T.Ue-=q;if(0>=this.T.Ue){this.T.Ue+=this.T.zg;break}}while(this.ea.Nb)}catch(y){rc(this);qc(this);this.ba&&this.ba.stop(na(),wc(this));cb(this,!1);eb(this,y.stack||y.message);return}c=setTimeout;d=this.$j;this.T.Td=na();e=this.T.zi;this.T.Ve&&(e=Math.round(e*this.T.Ve/this.T.zg));e-=this.T.Td-this.T.Kf;if(f=this.T.Td-
this.T.Ad)this.T.zd=Math.round(this.zc/(10*f))/100,864E5<=f&&(this.ad=0,this.S&&yc(this.S,!0),sc(this));if(0>e||this.T.zd<this.T.ve)-1E3>e&&(this.T.Ad-=e),e=0;this.T.Ag+=this.T.Ve;this.T.Td+=e;c(d,e)}else qc(this),this.ba&&this.ba.stop(na(),wc(this))};l.Pj=function(){return 0};function rc(a,b){a.ea.zf&&(a.ea.lg=!0);a.mc-=a.A;a.A=0;uc(a,a.zc);a.zc=0;if(a.ea.Nb){a.ea.Nb=!1;a.S&&a.S.stop();var c=a.la.run;c&&(c.textContent="Run")}a.ea.complete=b}
function qc(a){a.ba&&(Ac(a.ba,void 0),a.ba.Zd(void 0))}function Bc(a,b,c,d){this.A=a;this.Ia=a.Ia;this.id=b;this.Zf=c||"";this.ja=0;this.Za=65535;this.C=this.Za+1;this.sb=this.nc=this.ext=this.lb=this.type=this.ya=0;this.hc=-1;this.U=this.Qc=2;this.N=this.sa=65535;this.L=this.yi;this.I=this.ki;this.K=this.mi;this.B={ja:-1,ya:0,Za:0,lb:0,type:0,ext:0,hc:-1};1==this.id&&(this.ff=0,this.D=null,this.re=!1,this.H=Array(32),this.G=[]);Cc(this,!0,d)}l=Bc.prototype;
l.yi=function(a){this.ja=a&65535;return this.ya=this.ja<<4};l.If=function(a,b){var c,d,e=this.A;a&=65535;a&4?(c=e.Zb.ya,d=c+e.Zb.Za|0):(c=e.ub,d=e.wc);if(c){c=c+(a&65528)|0;if(d-c|0)return e.A-=15,Dc(this,c,a,b);6>this.id&&v.call(e,b&&3==this.id?10:13,a&65532)}return-1};l.El=function(a){var b=this.A;a=b.Ab+(a<<2);var c=b.ga(a);b.X&=-769;return this.load(b.ga(a+2))+c|0};
l.Dl=function(a){var b=this.A;a<<=3;var c=b.Ab+a|0;if(7<=(b.xc-c|0))return this.D=!0,a=Dc(this,c,a),-1!==a&&(a+=this.ff),a;v.call(b,13,a|2);return-1};l.ki=function(a){return this.ya+a|0};l.mi=function(a){return this.ya+a|0};l.ji=function(a,b){return(a>>>0)+b<=this.C?this.ya+a|0:this.Bf()};l.dk=function(a,b){return(a>>>0)+b>this.C?this.ya+a|0:this.Bf()};l.Bf=function(){v.call(this.A,13,0);return-1};l.li=function(a,b){return(a>>>0)+b<=this.C?this.ya+a|0:this.Cf()};
l.ek=function(a,b){return(a>>>0)+b>this.C?this.ya+a|0:this.Cf()};l.Cf=function(){v.call(this.A,13,0);return-1};function Ec(a,b,c,d,e){a.ja=b;a.ya=d;a.Za=e;a.C=(e>>>0)+1;a.lb=c;a.type=c&7936;a.ext=c>>16&192;a.hc=(b&4?a.A.Zb.ya:a.A.ub)+(b&65528)|0;4>a.id&&Cc(a,!0)}function Fc(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.ja=c;a.ya=f;a.Za=d;a.C=(d>>>0)+1;a.lb=e;a.type=e&7936;a.ext=0;a.hc=b;4>a.id&&Cc(a,!0)}
function Dc(a,b,c,d){var e=a.A;if(!d&&c===a.B.ja)return a.ja=c,a.ya=a.B.ya,a.Za=a.B.Za,a.C=(a.B.Za>>>0)+1,a.lb=a.B.lb,a.type=a.B.type,a.ext=a.B.ext,a.hc=a.B.hc,a.B.ja=-1,Cc(a,!0,!0,!1),a.ya;a.B.ja=-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),q=c&65528;if(80386<=e.ca){var y=f,k=k|(m&65280)<<16,f=f|(m&15)<<16;m&128&&(f=f<<12|4095)}switch(a.id){case 1:var w=a.D;a.re=!1;if(w&&1==c&&a.G.length){var z=a.G[a.ff-1];if(z&&!z())return-1}var B=c&3,Q=(g&24576)>>13,z=-1,V,aa;q||
b>=e.ub&&b<e.wc&&(h=0);if(6144<=h)null!=d?z=0:!1!==w?(h&1024?Q<=a.sb&&(z=0):B<=a.sb&&Q==a.sb&&(z=0),z||(c=c&-4|a.sb&3)):B>=a.sb&&(B>a.sb&&(z=x(e),Gc(e,x(e),!0),A(e,z),a.re=!0),z=0);else{if(256==h||2304==h)return Hc(a,c,w)?a.ya:-1;if(1024==h)z=2,aa=0,B<a.sb&&(B=a.sb);else if(3072==h)z=4,aa=0,B<a.sb&&(B=a.sb);else if(1536==h)z=2,aa=148224;else if(3584==h)z=4,aa=148224;else if(1792==h)z=2,aa=147712;else if(3840==h)z=4,aa=147712;else if(1280==h)return Hc(a,k&65535,w)?a.ya:-1}0<z&&!(g&32768)&&(z=0);if(0<
z&&(q=a.sb,V=b==e.Ab+c,B<=Q&&(!V||0<=e.fc||q<=Q))){b=k&65535;h&2048&&(f=y|m<<16);m=h=0;d=b&3;if(d<q){if(-1===a.If(b,!0))return-1;m=e.ha.ya;e.ha.type&2048?(c=(d<<3)+4,k=4):(c=(d<<2)+2,k=2);h=e.ga(m+c+k);if(!h)return v.call(e,10,h),-1;if(-1===e.P.If(h,!0))return-1;m=2==k?e.ga(m+c):e.fa(m+c)}c=e.X;e.X&=~aa;c&131072&&Ic(e,!0,!1);if(-1===a.If(b,!1))return-1;Jc(e,z);a.ff=f;if(d<q){if(!0!==w)return-1;z=C(e);f=0;for(g&=31;g--;)a.H[f++]=Kc(e,e.P,z),z+=2;w=e.P.ja;g=C(e);Gc(e,h,!0);A(e,m);c&131072&&(Jc(e,4),
Lc(e,e.Xa.ja,4,2),e.Xa.load(0),Lc(e,e.Ta.ja,4,2),e.Ta.load(0),Lc(e,e.xa.ja,4,2),Mc(e,0),Lc(e,e.pa.ja,4,2),Nc(e,0));Lc(e,w,e.U,2);for(D(e,g);f;)D(e,a.H[--f]);a.re=!0}return a.ya}if(z)return v.call(e,13,c&65532|(V?2:0)),-1;if(!(g&32768))return v.call(e,11,c&65532|(V?2:0)),-1;break;case 2:if(q){if(4096>h||2048==(h&2560))return v.call(e,13,c&65532),-1;if(!(g&32768))return v.call(e,11,c&65532),-1}break;case 3:if(!q||4096>h||512!=(h&2560))return v.call(e,13,c&65532),-1;if(!(g&32768))return v.call(e,12,
c&65532),-1;break;case 4:w=h&-513;if(!q||256!=w&&2304!=w)return v.call(e,13,c&65532),-1;2304==w&&(a.ei=k+e.ga(k+102)|0,a.ak=k+a.Za|0);break;case 6:if(!(h&4096)&&768<h&&2304!=h&&2816!=h)return-1}d?(a.B.ja=c,a.B.ya=k,a.B.Za=f,a.B.lb=g,a.B.type=h,a.B.ext=m,a.B.hc=b):(a.ja=c,a.ya=k,a.Za=f,a.C=(f>>>0)+1,a.lb=g,a.type=h,a.ext=m,a.hc=b,Cc(a,!0,!0,!1));return k}
function Hc(a,b,c){var d=a.A,e=a.sb,f=d.ha.ja,g=d.ha.ya;if(!c){if(!(d.ha.type&512))return v.call(d,13,b&65532),!1;d.bb(d.ha.hc+4,d.ha.lb&=-513)}if(-1===d.ha.load(b))return!1;var h=d.ha.ya;if(!1!==c){if(d.ha.type&512)return v.call(d,13,b&65532),!1;d.bb(d.ha.hc+4,d.ha.lb|=512)}d.ha.type=d.ha.type&-513|d.ha.lb&512;256==d.ha.type||768==d.ha.type?(d.bb(g+14,E(d)),d.bb(g+16,Pc(d)),d.bb(g+18,d.J),d.bb(g+20,d.G),d.bb(g+22,d.M),d.bb(g+24,d.D),d.bb(g+26,C(d)),d.bb(g+28,d.K),d.bb(g+30,d.I),d.bb(g+32,d.H),d.bb(g+
34,d.pa.ja),d.bb(g+36,d.Ca.ja),d.bb(g+38,d.P.ja),d.bb(g+40,d.xa.ja),d.Zb.load(d.ga(h+42)),Qc(d,d.ga(h+16)|(c?16384:0)),d.J=d.ga(h+18),d.G=d.ga(h+20),d.M=d.ga(h+22),d.D=d.ga(h+24),d.K=d.ga(h+28),d.I=d.ga(h+30),d.H=d.ga(h+32),d.pa.load(d.ga(h+34)),d.xa.load(d.ga(h+40)),Rc(d,d.ga(h+14),d.ga(h+36)),b=38,g=26,a.sb<e&&(g=(a.sb<<2)+2,b=g+2),Gc(d,d.ga(h+b),!0),A(d,d.ga(h+g))):(d.Va(g+28,d.bd),d.Va(g+32,E(d)),d.Va(g+36,Pc(d)),d.Va(g+40,d.J),d.Va(g+44,d.G),d.Va(g+48,d.M),d.Va(g+52,d.D),d.Va(g+56,C(d)),d.Va(g+
60,d.K),d.Va(g+64,d.I),d.Va(g+68,d.H),d.Va(g+72,d.pa.ja),d.Va(g+76,d.Ca.ja),d.Va(g+80,d.P.ja),d.Va(g+84,d.xa.ja),d.Va(g+88,d.Ta.ja),d.Va(g+92,d.Xa.ja),Sc.call(d,d.fa(h+28)),d.Zb.load(d.ga(h+96)),Qc(d,d.fa(h+36)|(c?16384:0)),d.J=d.fa(h+40),d.G=d.fa(h+44),d.M=d.fa(h+48),d.D=d.fa(h+52),d.K=d.fa(h+60),d.I=d.fa(h+64),d.H=d.fa(h+68),d.pa.load(d.ga(h+72)),d.xa.load(d.ga(h+84)),d.Ta.load(d.ga(h+88)),d.Xa.load(d.ga(h+92)),Rc(d,d.fa(h+32),d.ga(h+76)),b=80,g=56,a.sb<e&&(g=(a.sb<<3)+4,b=g+4),Gc(d,d.ga(h+b),!0),
A(d,d.fa(h+g)));c&&d.bb(h+0,f);d.Pa|=8;return!0}l.save=function(){return[this.ja,this.ya,this.Za,this.lb,this.id,this.Zf,this.sb,this.nc,this.hc,this.Qc,this.sa,this.U,this.N,this.type,this.C]};l.restore=function(a){"number"==typeof a?this.load(a):(this.ja=a[0],this.ya=a[1],this.Za=a[2],this.lb=a[3],this.id=a[4],this.Zf=a[5],this.sb=a[6],this.nc=a[7],this.hc=a[8],this.Qc=a[9]||2,this.sa=a[10]||65535,this.U=a[11]||2,this.N=a[12]||65535,this.type=a[13]||this.lb&7936,this.C=a[14]||(this.Za>>>0)+1)};
function Cc(a,b,c,d){void 0===c&&(c=!!(a.A.Pa&1));a.xd=!1;if(c)if(a.load=a.If,a.xi=a.Dl,a.Qb=a.ji,a.Rb=a.li,void 0===d&&(d=!!(a.A.X&131072)),d)a.load=a.L,a.Qb=a.I,a.Rb=a.K,a.sb=a.nc=3,a.U=2,a.N=a.sa=65535,a.Za=65535,a.C=a.Za+1,a.Qc=a.U,a.hc=-1,a.re=!1;else{if(!(a.ja&-4))a.Qb=a.Bf,a.Rb=a.Cf;else if(a.type&4096){6144==(a.type&6656)&&(a.Qb=a.Bf);if(a.type&2048||!(a.type&512))a.Rb=a.Cf;1024==(a.type&3072)&&(a.Qb==a.ji&&(a.Qb=a.dk),a.Rb==a.li&&(a.Rb=a.ek),a.xd=!0);b&&6>a.id&&a.ja&-4&&-1!==a.hc&&(c=a.hc+
5,d=a.A.Jb(c),d&1||a.A.Mc(c,d|1))}b&&(a.sb=a.ja&3,a.nc=(a.lb&24576)>>13,80386>a.A.ca||!(a.ext&64)?(a.U=2,a.N=65535):(a.U=4,a.N=-1),a.Qc=a.U,a.sa=a.N)}else a.load=a.yi,a.xi=a.El,a.Qb=a.ki,a.Rb=a.mi,a.sb=a.nc=0,a.hc=-1,a.re=!1}
function Tc(a){this.ca=+a.model||8088;var b=a.stepping;this.nd=this.ca+(b?ea(b,16):0);switch(this.ca){default:b=4772727;break;case 80286:b=6E6;break;case 80386:b=16E6}lc.call(this,a,b);this.Jh=61442;this.md=1792;this.Hh=28672;this.ce=4;this.Da=255;this.B=80286<=this.ca?hb:gb;this.ma=Uc;this.Oh=Vc;this.Qh=Wc;this.Sh=Xc;if(80186<=this.ca&&(this.ma=Uc.slice(),this.Oh=Vc.slice(),this.Qh=Wc.slice(),this.Da=31,this.ma[15]=Yc,this.ma[96]=Zc,this.ma[97]=$c,this.ma[98]=ad,this.ma[99]=Yc,this.ma[100]=Yc,this.ma[101]=
Yc,this.ma[102]=Yc,this.ma[103]=Yc,this.ma[104]=bd,this.ma[105]=cd,this.ma[106]=dd,this.ma[107]=ed,this.ma[108]=fd,this.ma[109]=gd,this.ma[110]=hd,this.ma[111]=id,this.ma[192]=jd,this.ma[193]=kd,this.ma[200]=ld,this.ma[201]=md,this.ma[241]=nd,this.Oh[7]=od,this.Qh[7]=od,80286<=this.ca)){this.Jh=2;this.md|=28672;this.ce=0;this.ma[15]=pd;this.Xc=qd.slice();for(a=0;a<this.Xc.length;a++)this.Xc[a]||(this.Xc[a]=rd);this.ma[84]=sd;this.ma[99]=td;if(80386<=this.ca){var c;this.Hh=0;this.md|=196608;this.ma[100]=
ud;this.ma[101]=vd;this.ma[102]=wd;this.ma[103]=xd;for(c in F)this.Xc[+c]=F[+c];80546<=this.nd&&80562>=this.nd&&(this.Xc[166]=yd,this.Xc[167]=zd)}}this.rf=[];this.Nh=[];this.ag=0;oc(this);this.ea.complete=this.ea.gk=!1;this.Wh=0;this.vc=this.R=[];this.da=this.xb=this.pb=this.pf=this.$d=this.Fa=this.oc=0;Ad(this)}Ta(Tc,lc);
function Ab(a){var b;if(a.R===a.vc){a.R=Array(a.pf);a.sf=new u(null,0,0,5,null,a);vb(a.sf,a.Ia);for(b=0;b<a.pf;b++)a.R[b]=a.sf;a.ae=new u;a.Lh=Array(512);a.tf=0}else for(var c=0;c<a.qf.length;c++){b=a.qf[c];var d=a.R[b];512>a.tf&&(a.Lh[a.tf++]=d);a.R[b]=a.sf}a.qf=[]}
function dc(a,b,c,d){var e=(b&-4194304)>>>20,f=a.vc[(a.bd+e&a.Fa)>>>a.da],g=f.Fd(e);if(!(g&1))return d||Bd.call(a,b,!1,c),a.ae;if(!(g&4)&&3==a.za)return d||Bd.call(a,b,!0,c),a.ae;var h=(b&4190208)>>>10,g=a.vc[((g&-4096)+h&a.Fa)>>>a.da],k=g.Fd(h);if(!(k&1))return d||Bd.call(a,b,!1,c),a.ae;if(!(k&4)&&3==a.za)return d||Bd.call(a,b,!0,c),a.ae;c=a.vc[((k&-4096)+(b&4095)&a.Fa)>>>a.da];if(d)return c;d=b>>>a.da;k=a.R[d];b&=-4096;var m;0<a.tf?(m=a.Lh[--a.tf],m.yl(b)):m=new u(b,0,0,6);b=m;b.L=c;b.B=f;b.D=e>>
2;b.C=g;b.G=h>>2;fb&&Lb&&c.V&&!c.controller&&!c.ie&&!c.je?(b.Ka=c.Ka,b.td=c.td,b.V=c.V,Ib(b,kc)):(b.K=c?bc(32):0,b.P=c?bc(96):0,Ib(b,ic));vb(b,a.Ia,k);a.R[d]=b;a.qf.push(d);return b}function Cd(a){a.R!==a.vc&&(a.R=a.vc,a.sf=null,a.qf=null,a.ae=null)}l=Tc.prototype;l.reset=function(){this.ea.Nb&&rc(this);Ad(this);oc(this);this.ea.error=!1};
function Dd(a,b){var c;switch(b){case 0:c=a.J;break;case 1:c=a.G;break;case 2:c=a.M;break;case 3:c=a.D;break;case 4:c=C(a);break;case 5:c=a.K;break;case 6:c=a.I;break;case 7:c=a.H}return c}function Ed(a,b,c){switch(b){case 0:a.J=c;break;case 1:a.G=c;break;case 2:a.M=c;break;case 3:a.D=c;break;case 4:A(a,c);break;case 5:a.K=c;break;case 6:a.I=c;break;case 7:a.H=c}}
function Ad(a){a.J=0;a.D=0;a.G=0;a.M=0;a.Ob=0;a.K=0;a.I=0;a.H=0;a.Hb=!1;a.ua=a.Ga=0;a.oa=0;a.Uh=0;a.W=0;a.Pa=65520;a.Ab=0;a.xc=1023;a.X=a.Cb=0;a.rd=a.Kd=a.qd=a.Id=0;a.fc=-1;a.Gc=a.ic=-1;a.Dd=a.ka=-1;a.Ca=new Bc(a,1,"CS");a.xa=new Bc(a,2,"DS");a.pa=new Bc(a,2,"ES");a.P=new Bc(a,3,"SS");A(a,0);Gc(a,0);if(80386<=a.ca){switch(a.nd){case 80562:case 80563:a.M=771;break;case 80578:a.M=772;break;case 80594:a.M=773;break;case 80595:case 80596:a.M=776}a.Pa=16;a.bi=0;a.pd=0;a.bd=0;a.qb=[0,0,0,0,null,null,0,
0];a.uf=[null,null,null,null,null,null,0,0];a.Ta=new Bc(a,2,"FS");a.Xa=new Bc(a,2,"GS");Cd(a)}a.dg=new Bc(a,0,"NULL");a.va=a.xa;a.rb=a.P;a.L=a.wa=0;a.F=a.C=-1;a.Eb=a.dg;a.Ea=0;if(80286>a.ca)Rc(a,0,65535);else{a.ub=0;a.wc=65535;a.Zb=new Bc(a,5,"LDT",!0);a.ha=new Bc(a,4,"TSS",!0);a.Oa=new Bc(a,6,"VER",!0);Rc(a,65520,61440);var b,c=E(a);b=a.Ca;var d=-65536;80386>b.A.ca&&(d&=16777215);b=b.ya=d;a.Y=b+c|0;a.bg=(b>>>0)+(a.Ca.Za>>>0)+1}Qc(a,0);Ic(a)}
function Fd(a){2==a.Qc?(a.$h=a.ga,a.Bb=Gd,a.Gb=Hd,a.yc=Id,2==a.U?(a.Z=Jd,a.qa=Kd,a.Ja=Ld):(a.Z=Md,a.qa=Nd,a.Ja=Od)):(a.$h=a.fa,a.Bb=Pd,a.Gb=Qd,a.yc=Rd,2==a.U?(a.Z=Sd,a.qa=Td,a.Ja=Ud):(a.Z=Vd,a.qa=Wd,a.Ja=Xd))}function Jc(a,b){a.U!=b&&(a.wa|=1024,a.U=b,a.N=2==b?65535:-1,Yd(a))}function Yd(a){2==a.U?(a.fb=32768,a.Sb=a.ga,a.Xb=a.bb,2==a.Qc?(a.Z=Jd,a.qa=Kd,a.Ja=Ld):(a.Z=Sd,a.qa=Td,a.Ja=Ud)):(a.fb=-2147483648,a.Sb=a.fa,a.Xb=a.Va,2==a.Qc?(a.Z=Md,a.qa=Nd,a.Ja=Od):(a.Z=Vd,a.qa=Wd,a.Ja=Xd))}
function Zd(a){a.Qc=a.Ca.Qc;a.sa=a.Ca.sa;Fd(a);a.U=a.Ca.U;a.N=a.Ca.N;Yd(a);a.wa&=-3073}l.ti=function(){var a=this.J+this.D+this.G+this.M+C(this)+this.K+this.I+this.H|0;return a=a+E(this)+this.Ca.ja+this.xa.ja+this.P.ja+this.pa.ja+Pc(this)|0};function $d(a,b,c){void 0===a.rf[b]&&(a.rf[b]=[]);a.rf[b].push(c)}function ae(a,b){var c=a.Nh[b];null!=c&&(c(--a.ag),delete a.Nh[b])}
function be(a,b){for(var c=a.qb[7],d=c>>16,e=0;4>e;e++){if(c&3){var f=!!(d&1),g=a.qb[e],g=g&~(d>>2&3);if(b){var g=a.R[g>>>a.da],h=a;f?g.je++||(h&&(g.A=h),gc(g,fc,!1)):g.ie++||(h&&(g.A=h),ec(g,fc,!1))}else g=a.R[g>>>a.da],f?--g.je||(f=g,f.Yb=f.I?f.ia:f.nf,f.Ie=f.I?f.ba:f.vh,f.He=f.I?f.la:f.oa):--g.ie||(f=g,f.Wb=f.Ed,f.Ae=f.hf,f.Fd=f.oh)}c>>=2;d>>=4}}
function cc(a,b,c,d){if(!(a.L&8192)&&a.qb[7]&255){c--;var e=a.qb[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.qb[g]&&b<=a.qb[g]+h){a.qb[6]|=1<<g;a.Ea|=2;break}}e>>=2;f>>=4}}}function Ic(a,b,c){void 0===b&&(b=!!(a.Pa&1));void 0===c&&(c=!!(a.X&131072));a.Sh=b&&!c?ce:Xc;Cc(a.Ca,!1,b,c);Cc(a.xa,!1,b,c);Cc(a.P,!1,b,c);Cc(a.pa,!1,b,c);80386<=a.ca&&(Cc(a.Ta,!1,b,c),Cc(a.Xa,!1,b,c));Zd(a)}
l.save=function(){var a=new de(this);a.set(0,[this.J,this.D,this.G,this.M,C(this),this.K,this.I,this.H]);var b=E(this),c=this.Ca.save(),d=this.xa.save(),e=this.P.save(),f=this.pa.save(),g;null!=this.ub?(g=[this.Pa,this.ub,this.wc,this.Ab,this.xc,this.Zb.save(),this.ha.save(),this.Cb],80386<=this.ca&&(g.push(this.bi),g.push(this.pd),g.push(this.bd),g.push(this.qb),g.push(this.uf))):g=null;b=[b,c,d,e,f,g,Pc(this)];80386<=this.ca&&(b.push(this.Ta.save()),b.push(this.Xa.save()));a.set(1,b);a.set(2,[this.va.Zf,
this.rb.Zf,this.L,this.wa,this.Ea,this.F,this.C]);a.set(3,[0,this.ad,this.T.Bd]);a.set(4,Rb(this.ia,!!(this.Pa&-2147483648)));return a.data()};
l.restore=function(a){var b=a[0];this.J=b[0];this.D=b[1];this.G=b[2];this.M=b[3];var c=b[4];this.K=b[5];this.I=b[6];this.H=b[7];b=a[1];this.Ca.restore(b[1]);this.xa.restore(b[2]);this.P.restore(b[3]);this.pa.restore(b[4]);var d=b[5];d&&d.length&&(this.Pa=d[0],this.ub=d[1],this.wc=d[2],this.Ab=d[3],this.xc=d[4],this.Zb.restore(d[5]),this.ha.restore(d[6]),this.Cb=d[7],80386<=this.ca&&(this.bi=d[8],this.pd=d[9],this.bd=d[10],this.qb=d[11],this.uf=d[12]),Ic(this));Qc(this,b[6]);var d=!1,e;a:{e=this.ia;
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.ia){for(var m=0,q=Array(e.ia),y=0;y<k.length-1;)for(var w=k[y++],z=k[y++];w--;)q[m++]=z;k=q}m=e.R[h];if(!m||!m.restore(k)){r("Unable to restore memory block "+h);e=!1;break a}}void 0!==f[g]&&wb(e,f[g]);e=!0}e&&(Rc(this,b[0],this.Ca.ja),A(this,c),Gc(this,this.P.ja),80386<=this.ca&&(this.Ta.restore(b[7]),this.Xa.restore(b[8])),d=!0);b=a[2];this.va=null!=b[0]&&ee(this,b[0])||this.xa;this.rb=null!=b[1]&&ee(this,b[1])||this.P;
this.L=b[2];this.wa=b[3];this.Ea=b[4];this.F=b[5];this.C=b[6];b=a[3];this.ad=b[1];sc(this,b[2]);return d};function ee(a,b){switch(b){case "CS":return a.Ca;case "DS":return a.xa;case "SS":return a.P;case "ES":return a.pa;case "NULL":return a.dg;default:return[0,b,0,0,""]}}function fe(a,b){null!=Rc(a,E(a),b)&&(a.L|=a.ce)}function Mc(a,b){-1!==a.xa.load(b)&&(a.L|=a.ce)}
function Gc(a,b,c){var d=C(a);-1!==a.P.load(b)&&(A(a,d),a.P.xd?(a.cg=a.P.ya+a.P.sa|0,a.be=a.P.ya+a.P.Za|0):(a.cg=a.P.ya+a.P.Za|0,a.be=a.P.ya),c||(a.L|=4))}function Nc(a,b){-1!==a.pa.load(b)&&(a.L|=a.ce)}function E(a){return a.Y-a.Ca.ya|0}function G(a,b){a.Y=a.Ca.ya+(b&a.N)|0}function ge(a,b){a.Y=b;a.bg=(a.Ca.ya>>>0)+(a.Ca.Za>>>0)+1;a.za=a.Ca.sb;Zd(a)}function Rc(a,b,c,d){var e=a.Ca;e.ff=b;e.D=d;b=e.load(c);return-1!==b?(ge(a,b+(a.Ca.ff&a.Ca.N)),a.Ca.re):null}
function he(a,b){b=(a.Y>>>0)+b;b>a.bg&&(8088>=a.ca||a.Ca.Za==a.Ca.sa?b=a.Ca.ya+(b-a.bg&a.N):v.call(a,13,0));return b|0}function ie(a){a.Y=a.Dd}function C(a){return a.Ob&~a.P.sa|a.ra-a.P.ya}function A(a,b){a.Ob=b;a.ra=a.P.ya+(b&a.P.sa)|0}function je(a,b,c,d,e,f){if(63!=(e&63)&&e!=a.resultType){var g=(e^a.resultType)&a.resultType;g&&(g&1&&ke(a),g&2&&le(a),g&4&&me(a),g&8&&ne(a),g&16&&oe(a),g&32&&pe(a))}f?(a.rd=d,a.qd=b):(a.rd=b,a.qd=d);a.Kd=c;a.Id=d;a.resultType=e}
function H(a,b,c,d,e){a.resultType=c|26;a.Id=b;d?se(a):te(a);e?ue(a):ve(a);return b}function we(a,b,c,d){c&d?se(a):te(a);(b^c)&d?ue(a):ve(a)}function xe(a){return ke(a)?1:0}function ke(a){a.resultType&1&&(a.X&=-2,(a.rd^(a.rd^a.Kd)&(a.Kd^a.qd))&a.resultType&-2147450752&&(a.X|=1),a.resultType&=-2);return a.X&1}function le(a){a.resultType&2&&(a.X&=-5,38505>>((a.Id^a.Id>>4)&15)&1&&(a.X|=4),a.resultType&=-3);return a.X&4}
function me(a){a.resultType&4&&(a.X&=-17,(a.qd^a.rd^a.Kd)&16&&(a.X|=16),a.resultType&=-5);return a.X&16}function ne(a){a.resultType&8&&(a.X&=-65,a.Id&((a.resultType&-2147450752)-1|a.resultType&-2147450752)||(a.X|=64),a.resultType&=-9);return a.X&64}function oe(a){a.resultType&16&&(a.X&=-129,a.Id&a.resultType&-2147450752&&(a.X|=128),a.resultType&=-17);return a.X&128}
function pe(a){a.resultType&32&&(a.X&=-2049,(a.rd^a.qd)&(a.Kd^a.qd)&a.resultType&-2147450752&&(a.X|=2048),a.resultType&=-33);return a.X&2048}function te(a){a.resultType&=-2;a.X&=-2}function ye(a){a.resultType&=-5;a.X&=-17}function ze(a){a.resultType&=-9;a.X&=-65}function ve(a){a.resultType&=-33;a.X&=-2049}function se(a){a.resultType&=-2;a.X|=1}function Ae(a){a.resultType&=-5;a.X|=16}function Be(a){a.resultType&=-9;a.X|=64}function ue(a){a.resultType&=-33;a.X|=2048}
function Pc(a){return a.X&-2262|ke(a)|le(a)|me(a)|ne(a)|oe(a)|pe(a)}function Ce(a,b){b|=a.Pa&1|65520;a.Pa=a.Pa&-65536|b&65535;a.Pa&1&&Ic(a,!0)}function Qc(a,b,c){a.Pa&1||(b&=~a.Hh);void 0===c&&(c=a.za);c?b=b&-12289|a.X&12288:a.Cb=(b&12288)>>12;c>a.Cb&&(b=b&-513|a.X&512);a.resultType=128;a.X=a.X&~(a.md|2261)|b&(a.md|2261)|a.Jh;a.X&256&&(a.Ea|=2,a.L|=4)}
function De(a,b,c){var d=0;if(a.Pa&1&&(a.za>a.Cb||a.X&131072)&&a.ha.ei)for(var e=a.ha.ei+(b>>>3),d=(1<<c)-1<<(b&7);d&&e<=a.ha.ak&&!(a.Jb(e)&d);)d>>>=8,e++;return d?(v.call(a,13,0),!1):!0}
l.zb=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.la[b]=c;this.Wh++;a=!0;break;default:a=this.parent.zb.call(this,a,b,c)}return a};
function Ee(a,b,c,d){var e=(d?a.vc:a.R)[(b&a.oc)>>>a.da];e&&5==e.type&&(e=dc(a,b,!1,!0));if(e){var f=b&a.pb;if(!c||1==c)return e.Ed(f,b);if(2==c)return f<a.pb?e.hf(f,b):e.Ed(f,b)|Ee(a,b+1,1,d)<<8;if(4==c)return f<a.pb-2?e.oh(f,b):f==a.pb-1?e.hf(f,b)|Ee(a,b+2,2,d)<<16:e.Ed(f,b)|Ee(a,b+1,1,d)<<8|Ee(a,b+2,1,d)<<16|Ee(a,b+3,1,d)<<24}return null}l.Jb=function(a){return this.R[(a&this.oc)>>>this.da].Wb(a&this.pb,a)};
l.ga=function(a){var b=a&this.pb,c=(a&this.oc)>>>this.da;this.A-=this.B.Rf;if(b<this.pb)return this.R[c].Ae(b,a);b=this.R[c].Wb(b,a);this.L&4096||(b|=this.R[c+1&this.$d].Wb(0,a+1)<<8);return b};l.fa=function(a){var b=a&this.pb,c=(a&this.oc)>>>this.da;if(b<this.pb-2)return this.R[c].Fd(b,a);for(var d=0,e=4,f=0,g=4-(b&3);e--;){d|=this.R[c].Wb(b++,a++)<<f;if(this.L&4096)break;--g||(c=c+1&this.$d,b=0);f+=8}return d};l.Mc=function(a,b){this.R[(a&this.oc)>>>this.da].Yb(a&this.pb,b&255,a)};
l.bb=function(a,b){var c=a&this.pb,d=(a&this.oc)>>>this.da;this.A-=this.B.Rf;c<this.pb?this.R[d].Ie(c,b&65535,a):(this.R[d++].Yb(c,b&255,a),this.L&4096||this.R[d&this.$d].Yb(0,b>>8&255,a+1))};l.Va=function(a,b){var c=a&this.pb,d=(a&this.oc)>>>this.da;this.A-=this.B.Rf;if(c<this.pb-2)this.R[d].He(c,b,a);else for(var e=4,f=4-(c&3);e--;){this.R[d].Yb(c++,b&255,a++);if(this.L&4096)break;--f||(d=d+1&this.$d,c=0);b>>>=8}};function Fe(a,b,c){a.Eb=b;a.La=c&a.sa;a.F=b.Qb(a.La,1);return a.L&1?0:a.Jb(a.F)}
function I(a,b){return Fe(a,a.va,b)}function J(a,b){return Fe(a,a.rb,b)}function Ge(a,b,c){a.Eb=b;a.La=c&a.sa;a.F=b.Qb(a.La,a.U);return a.L&1?0:a.Sb(a.F)}function K(a,b){a.Eb=a.va;a.La=b&a.sa;a.F=a.Eb.Qb(a.La,2);return a.L&1?0:a.ga(a.F)}function L(a,b){a.Eb=a.rb;a.La=b&a.sa;a.F=a.Eb.Qb(a.La,2);return a.L&1?0:a.ga(a.F)}function M(a,b){a.Eb=a.va;a.La=b&a.sa;a.F=a.Eb.Qb(a.La,4);return a.L&1?0:a.fa(a.F)}function N(a,b){a.Eb=a.rb;a.La=b&a.sa;a.F=a.Eb.Qb(a.La,4);return a.L&1?0:a.fa(a.F)}
function He(a,b){a.L&2||a.Mc(a.Eb.Rb(a.La,1),b)}function Ie(a,b){a.L&2||a.bb(a.Eb.Rb(a.La,2),b)}function Je(a,b){a.L&2||a.Va(a.Eb.Rb(a.La,4),b)}function Kc(a,b,c){return a.Sb(b.Qb(c,a.U))}l.na=function(){var a=he(this,1),b=this.Jb(this.Y);this.Y=a;return b};function Ke(a){var b=he(a,2),c=a.ga(a.Y);a.Y=b;return c}function O(a){var b=he(a,a.Qc),c=a.$h(a.Y);a.Y=b;return c}l.Aa=function(){var a=he(this,this.U),b=this.Sb(this.Y);this.Y=a;return b};
l.O=function(){var a=he(this,1),b=this.Jb(this.Y)<<24>>24;this.Y=a;return b};function x(a){var b=a.Sb(a.ra);a.ra=a.ra+a.U|0;var c=a.cg-a.ra|0;0>c&&0<=(a.cg^a.ra)&&(8088>=a.ca||!a.P.xd&&a.P.Za==a.P.sa||a.P.xd&&!a.P.Za?A(a,a.ra-a.P.ya&a.P.sa):-1>c&&v.call(a,12,0));return b}
function Lc(a,b,c,d){c=a.ra-c|0;0>(c-a.be|0)&&0<=(a.be^c)&&(8088>=a.ca||!a.P.xd&&a.P.Za==a.P.sa||a.P.xd&&!a.P.Za?(A(a,c-a.P.ya&a.P.sa),c=a.ra):v.call(a,12,0));switch(d){case 1:a.Mc(c,b);break;case 2:a.bb(c,b);break;case 4:a.Va(c,b)}a.ra=c}function D(a,b){var c=a.ra-a.U|0;0>(c-a.be|0)&&0<=(a.be^c)&&(8088>=a.ca||!a.P.xd&&a.P.Za==a.P.sa||a.P.xd&&!a.P.Za?(A(a,c-a.P.ya&a.P.sa),c=a.ra):v.call(a,12,0));a.Xb(c,b);a.ra=c}
function P(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.la[b]&&(void 0===c&&(eb(a,"Value for "+b+" is invalid"),rc(a)),d=!a.ea.Nb||a.ea.ni?fa(c,d):"--------".substr(0,d),a.la[b].textContent!=d&&(a.la[b].textContent=d))}
l.Zd=function(a){this.Wh&&(a||!this.ea.Nb||this.ea.ni)&&(P(this,"EAX",this.J),P(this,"EBX",this.D),P(this,"ECX",this.G),P(this,"EDX",this.M),P(this,"ESP",C(this)),P(this,"EBP",this.K),P(this,"ESI",this.I),P(this,"EDI",this.H),P(this,"CS",this.Ca.ja),P(this,"DS",this.xa.ja),P(this,"SS",this.P.ja),P(this,"ES",this.pa.ja),P(this,"EIP",E(this)),a=Pc(this),P(this,"PS",a),P(this,"V",a&2048),P(this,"D",a&1024),P(this,"I",a&512),P(this,"T",a&256),P(this,"S",a&128),P(this,"Z",a&64),P(this,"A",a&16),P(this,
"P",a&4),P(this,"C",a&1),80386==this.ca&&(P(this,"FS",this.Ta.ja),P(this,"GS",this.Xa.ja),P(this,"CR0",this.Pa),P(this,"CR2",this.pd),P(this,"CR3",this.bd)));if(a=this.la.speed)a.textContent=this.ea.Nb&&this.T.zd?this.T.zd.toFixed(2)+"Mhz":"Stopped"};
l.Pj=function(a){this.ea.complete=!0;this.ea.gk=!1;this.ea.Oj=!1;this.mc=this.A=a;this.S&&!a&&yc(this.S);a||(this.L|=4);do{if(a=this.L&3312)this.wa|=a;else if(this.Dd=this.Y,this.va=this.xa,this.rb=this.P,this.F=this.C=-1,this.wa&3072&&Zd(this),this.wa=this.L&256,this.Ea){a:if(!(this.L&4)){a=80286>this.ca?0:1;for(var b=0;2>b;b++){switch(a){case 0:if(this.Ea&1&&this.X&512){var c=Le(this.S);if(-1<=c&&(this.Ea&=-2,0<=c)){this.Ea&=-5;Me.call(this,c);break a}}break;case 1:if(this.Ea&2){this.Ea&=-3;80386<=
this.ca&&(this.qb[6]|=16384);Me.call(this,1);break a}}a=1-a}}if(this.Ea&4){this.L=this.A=0;break}}this.L=0;this.ma[this.na()].call(this)}while(0<this.A);return this.ea.complete?this.mc-this.A:void 0===this.ea.complete?0:-1};Ga(function(){for(var a=bb(document,"pcx86","cpu"),b=0;b<a.length;b++){var c=a[b],d=Za(c),d=new Tc(d);ab(d,c)}});
function Ne(a){Ka.call(this,"FPU",a,Ne);this.ca=a.model||8087;this.K=new Float64Array(8);this.da=new Int32Array(this.K.buffer);this.Z=new Float32Array(1);this.ka=new Int32Array(this.Z.buffer);this.P=new Float64Array(1);this.I=new Int32Array(this.P.buffer);this.G=Array(3);this.ia=this.ba=-1;this.L=this.R=this.W=this.B=0;this.Y=new Float64Array(1);this.ha=new Int32Array(this.Y.buffer);this.ha[0]=0;this.ha[1]=268402688;Oe(this)}Ta(Ne);l=Ne.prototype;
l.pc=function(a,b,c){this.A=c;this.S=mb(a,"ChipSet");t(this)};l.Ub=function(a,b){if(!b)if(!a||!this.restore)Oe(this);else if(!this.restore(a))return!1;return!0};l.Tb=function(a){return a?this.save():!0};l.save=function(){var a=new de(this),b=[],c=0;b[c++]=this.H;b[c++]=this.aa|this.C<<11;b[c++]=Pe(this);for(var d=0;d<this.K.length;d++)b[c++]=this.K[d];a.set(0,b);return a.data()};
l.restore=function(a){a=a[0];var b=0;this.H=a[b++]&-57409;var c=a[b++];this.aa=c&-14337;this.C=(c&14336)>>11;Qe(this);Re(this,a[b++]);for(c=0;c<this.K.length;c++)this.K[c]=a[b++];return!0};function Oe(a){a.D=0;a.H=959;a.aa=0;a.C=0;a.S&&(a=a.S,a.ca>=Se&&Te(a,13))}function Qe(a){a.aa&=-129;a.aa&~a.H&63&&(a.aa|=128);if(a.aa&128&&!(a.H&128))return a=a.S,a.ca>=Se?Ue(a,13):a.ma&0||Me.call(a.A,2),!0;a=a.S;a.ca>=Se&&Te(a,13);return!1}function Ve(a,b){80387<=a.ca||(b&=-65);a.aa|=b;return Qe(a)}
function We(a,b){return isFinite(b)?!0:!Ve(a,Infinity===b?8:16)}function Xe(a,b,c){var d=null;null!=b&&null!=c&&(d=b+c,We(a,d)||(d=null));return d}function Ye(a,b,c){var d=null;null!=b&&null!=c&&(d=b-c,We(a,d)||(d=null));return d}function Ze(a,b,c){var d=null;null!=b&&null!=c&&(d=b*c,We(a,d)||(d=null));return d}function $e(a,b,c){var d=null;null==b||null==c||!c&&Ve(a,2)||(d=b/c,We(a,d)||(d=null));return d}
function af(a,b,c){if(null!=b&&null!=c){var d=0;isNaN(b)||isNaN(c)?d=17664:(b-=c,0>b?d=256:b||(d=16384));a.aa=a.aa&-18177|d;return!0}return!1}function bf(a,b,c){if(null==b)return null;var d=a.H&3072;d?d=1024==d||3072==d&&0<b?Math.floor(b):Math.ceil(b):(d=Math.round(b),.5===d-b&&d%2&&d--);if(c){if(d>=c){if(Ve(a,1))return null;d=-c}else if(d<-c){if(Ve(a,1))return null;d=-c}a.I[0]=d|0;2147483648<c&&(a.I[1]=d/4294967296|0,!a.I[1]&&0>d&&(a.I[1]=-1))}return d}
function cf(a,b){var c=3;a.D&1<<b&&(a=a.K[b],c=0,a?isFinite(a)||(c=2):c=1);return c}function Pe(a){for(var b=0,c=a.K.length-1;0<=c;c--)b<<=2,b|=cf(a,c);return b}function Re(a,b){a.D=0;for(var c=1;128>=c;c<<=1)3!=(b&3)&&(a.D|=c),b>>=2}function df(a){var b=a.C+0&7;return a.D&1<<b?(a.Z[0]=a.K[b],!0):Ve(a,1)?!1:(a.Z[0]=a.Y[0],!0)}function ef(a){var b=a.C+0&7;return a.D&1<<b?(a.P[0]=a.K[b],!0):Ve(a,1)?!1:(a.P[0]=a.Y[0],!0)}
function R(a,b){var c=null;b=a.C+b&7;a.D&1<<b?c=a.K[b]:Ve(a,1)||(c=a.Y[0]);return c}function S(a,b,c){return null!=c&&(isNaN(c)?!Ve(a,1):1)?(b=a.C+b&7,a.K[b]=c,a.D|=1<<b,!0):!1}function ff(a,b,c){var d=null;b=a.C+b&7;if(c||a.D&1<<b||!Ve(a,1)){d=b<<1;c=a.da[d];d=a.da[d+1];b=d>>20&2047;var e=2147483648|(d&1048575)<<11|c>>>21;2047==b?b=32767:b?b+=15360:e&=2147483647;a.G[0]=c<<11;a.G[1]=e;a.G[2]=d>>16&32768|b;d=a.G}return d}function gf(a){return a.A.ga(a.A.F)<<16>>16}
function hf(a){return a.A.fa(a.A.F)}function jf(a){a.ka[0]=a.A.fa(a.A.F);return a.Z[0]}function kf(a){a.I[0]=a.A.fa(a.A.F);a.I[1]=a.A.fa(a.A.F+4);return a.P[0]}function lf(a){a.G[0]=a.A.fa(a.A.F);a.G[1]=a.A.fa(a.A.F+4);a.G[2]=a.A.ga(a.A.F+8);return a.G}l.uh=function(){this.A.Va(this.A.F,this.I[0])};l.Lj=function(){this.A.Va(this.A.F,this.I[0]);this.A.Va(this.A.F+4,this.I[1])};l.Nj=Ne.prototype.uh;l.Mj=Ne.prototype.Lj;
function mf(a){a.A.Va(a.A.F,a.G[0]);a.A.Va(a.A.F+4,a.G[1]);a.A.bb(a.A.F+8,a.G[2])}function nf(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.I[0]=b;a.I[1]=c|(d|e)<<20;return a.P[0]}function of(a,b){for(var c=0,d=1;b--;)c+=(a&15)*d,d*=10,a>>=4;return c}function pf(a,b){for(var c=0,d=0;b--;)c|=a%10<<d,a/=10,d+=4;return c}
function qf(a){var b=null,c=1<<a.C;if(!(a.D&c)&&(a.aa&=-513,Ve(a,65)))return b;a.D&=~c;b=a.K[a.C];a.C=a.C+1&7;return b}function rf(a,b){if(null!=b){var c=a.C-1&7,d=1<<c;if(a.D&d&&(a.aa|=512,Ve(a,65)))return;if(isNaN(b)&&Ve(a,1)){if(Ve(a,1))return;b=NaN}a.K[a.C=c]=b;a.D|=d}}
function sf(a,b){var c,d=a.A;c=d.Sb(b);a.H=c&-57409;c=d.Sb(b+=d.U);a.aa=c&-14337;a.C=(c&14336)>>11;Qe(a);Re(a,d.Sb(b+=d.U));!(d.Pa&1)||d.X&131072?(a.L=d.Sb(b+=d.U),c=d.Sb(b+=d.U),a.W=c&2047,a.L|=(c&-4096)<<4,a.ia=-1,a.R=d.Sb(b+=d.U),a.R|=(d.Sb(b+=d.U)&-4096)<<4,a.ba=-1):(a.L=d.Sb(b+=d.U),c=d.Sb(b+=d.U),a.ia=c&65535,a.W=c>>16&2047,a.R=d.Sb(b+=d.U),a.ba=d.Sb(b+=d.U)&65535);return b+d.U}
function tf(a,b){var c=a.A;c.Xb(b,a.H);c.Xb(b+=c.U,a.aa|a.C<<11);c.Xb(b+=c.U,Pe(a));if(!(c.Pa&1)||c.X&131072){var d=(a.ia<<4)+a.L;c.Xb(b+=c.U,d);c.Xb(b+=c.U,d>>4&-4096|a.W);d=(a.ba<<4)+a.R;c.Xb(b+=c.U,d);c.Xb(b+=c.U,d>>4&-4096)}else c.Xb(b+=c.U,a.L),c.Xb(b+=c.U,a.ia|a.W<<16),c.Xb(b+=c.U,a.R),c.Xb(b+=c.U,a.ba);return b+c.U}var uf=Math.log(10)/Math.LN2,vf=Math.LOG2E,wf=Math.PI,xf=Math.log(2)/Math.LN10,yf=Math.LN2,zf=Math.pow(2,63);function Af(){this.aa&=-32896;Qe(this)}
function Bf(){af(this,R(this,0),R(this,this.B))}function Cf(){af(this,R(this,0),R(this,this.B))&&qf(this)}function Gf(){Cf.call(this)}function Hf(){S(this,0,$e(this,R(this,0),jf(this)))}function If(){this.D&=~(1<<this.C)}function Jf(){Oe(this)}function Kf(){this.H=this.A.ga(this.A.F)&-57409}function Lf(){sf(this,this.A.F)}function Mf(){for(var a=this.A,b=sf(this,a.F),c=this.G,d=0;d<this.K.length;d++)c[0]=a.fa(b),c[1]=a.fa(b+=4),c[2]=a.ga(b+=4),c&&S(this,d,nf(this,c)),b+=2}
function Nf(){for(var a=this.A,b=tf(this,a.F),c=0;c<this.K.length;c++){var d=ff(this,c,!0);a.Va(b,d[0]);a.Va(b+=4,d[1]);a.bb(b+=4,d[2]);b+=2}Oe(this)}function Of(){tf(this,this.A.F);this.H|=63}function Pf(){S(this,this.B,R(this,0))&&qf(this)}function Qf(){Pf.call(this)}function Rf(){this.A.bb(this.A.F,this.H)}function Sf(){this.A.bb(this.A.F,this.aa|this.C<<11)}function Tf(){80287<=this.ca&&(this.A.J=this.A.J&-65536|this.aa|this.C<<11)}
function Uf(){var a=R(this,0);S(this,0,R(this,this.B));S(this,this.B,a)}function Vf(){Uf.call(this)}
var Wf={216:{0:function(){S(this,0,Xe(this,R(this,0),jf(this)))},1:function(){S(this,0,Ze(this,R(this,0),jf(this)))},2:function(){af(this,R(this,0),jf(this))},3:function(){af(this,R(this,0),jf(this))&&qf(this)},4:function(){S(this,0,Ye(this,R(this,0),jf(this)))},5:function(){S(this,0,Ye(this,jf(this),R(this,0)))},6:Hf,7:Hf,48:function(){S(this,0,Xe(this,R(this,0),R(this,this.B)))},49:function(){S(this,0,Ze(this,R(this,0),R(this,this.B)))},50:Bf,51:Cf,52:function(){S(this,0,Ye(this,R(this,0),R(this,
this.B)))},53:function(){S(this,0,Ye(this,R(this,this.B),R(this,0)))},54:function(){S(this,0,$e(this,R(this,0),R(this,this.B)))},55:function(){S(this,0,$e(this,R(this,this.B),R(this,0)))}},217:{0:function(){rf(this,jf(this))},2:function(){df(this)&&this.Nj()},3:function(){df(this)&&(this.Nj(),qf(this))},4:Lf,5:Kf,6:Of,7:Rf,48:function(){rf(this,R(this,this.B))},49:Uf,50:function(){},51:Qf,64:function(){S(this,0,-R(this,0))},65:function(){S(this,0,Math.abs(R(this,0)))},68:function(){af(this,R(this,
0),0)},69:function(){this.aa&=-18177;this.da[((this.C+0&7)<<1)+1]&-2147483648&&(this.aa|=512);if(3==cf(this,this.C))this.aa|=16640;else{var a=R(this,0);this.aa=isNaN(a)?this.aa|256:0===a?this.aa|16384:Infinity===a||-Infinity===a?this.aa|1280:this.aa|1024}},80:function(){rf(this,1)},81:function(){rf(this,uf)},82:function(){rf(this,vf)},83:function(){rf(this,wf)},84:function(){rf(this,xf)},85:function(){rf(this,yf)},86:function(){rf(this,0)},96:function(){S(this,0,Math.pow(2,R(this,0))-1)},97:function(){S(this,
1,R(this,1)*Math.log(R(this,0))/Math.LN2)&&qf(this)},98:function(){S(this,0,Math.tan(R(this,0)))&&rf(this,1)},99:function(){S(this,1,Math.atan2(R(this,1),R(this,0)))&&qf(this)},100:function(){var a=R(this,0);null!=a&&(this.P[0]=a,S(this,0,(this.I[1]>>20&2047)-1023),this.I[1]=(this.I[1]|1072693248)&-1073741825,rf(this,this.P[0]))},102:function(){this.C=this.C-1&7;this.aa&=-513},103:function(){this.C=this.C+1&7;this.aa&=-513},112:function(){S(this,0,R(this,0)%R(this,1))},113:function(){S(this,1,R(this,
1)*Math.log(R(this,0)+1)/Math.LN2)&&qf(this)},114:function(){var a=R(this,0),b=null;if(0<=a||!Ve(this,1))b=Math.sqrt(a),We(this,b)||(b=null);S(this,0,b)},116:function(){S(this,0,bf(this,R(this,0),zf))},117:function(){var a=R(this,0),b=R(this,1);null!=a&&null!=b&&S(this,0,a*Math.pow(2,0<b?Math.floor(b):Math.ceil(b)))}},218:{0:function(){S(this,0,Xe(this,R(this,0),hf(this)))},1:function(){S(this,0,Ze(this,R(this,0),hf(this)))},2:function(){af(this,R(this,0),hf(this))},3:function(){af(this,R(this,0),
hf(this))&&qf(this)},4:function(){S(this,0,Ye(this,R(this,0),hf(this)))},5:function(){S(this,0,Ye(this,hf(this),R(this,0)))},6:function(){S(this,0,$e(this,R(this,0),hf(this)))},7:function(){S(this,0,$e(this,hf(this),R(this,0)))}},219:{0:function(){rf(this,hf(this))},2:function(){null!=bf(this,R(this,0),2147483648)&&this.uh()},3:function(){null!=bf(this,R(this,0),2147483648)&&(this.uh(),qf(this))},5:function(){rf(this,nf(this,lf(this)))},7:function(){ff(this,0)&&(mf(this),qf(this))},64:function(){8087==
this.ca&&(this.H&=-129)},65:function(){8087==this.ca&&(this.H|=128)},66:Af,67:Jf,68:function(){},115:function(){}},220:{0:function(){S(this,0,Xe(this,R(this,0),kf(this)))},1:function(){S(this,0,Ze(this,R(this,0),kf(this)))},2:function(){af(this,R(this,0),kf(this))},3:function(){af(this,R(this,0),kf(this))&&qf(this)},4:function(){S(this,0,Ye(this,R(this,0),kf(this)))},5:function(){S(this,0,Ye(this,kf(this),R(this,0)))},6:function(){S(this,0,$e(this,R(this,0),kf(this)))},7:function(){S(this,0,$e(this,
kf(this),R(this,0)))},48:function(){S(this,this.B,Xe(this,R(this,this.B),R(this,0)))},49:function(){S(this,this.B,Ze(this,R(this,this.B),R(this,0)))},50:function(){Bf.call(this)},51:Gf,52:function(){S(this,this.B,Ye(this,R(this,0),R(this,this.B)))},53:function(){S(this,this.B,Ye(this,R(this,this.B),R(this,0)))},54:function(){S(this,this.B,$e(this,R(this,0),R(this,this.B)))},55:function(){S(this,this.B,$e(this,R(this,this.B),R(this,0)))}},221:{0:function(){rf(this,kf(this))},2:function(){ef(this)&&
this.Mj()},3:function(){ef(this)&&(this.Mj(),qf(this))},4:Mf,6:Nf,7:Sf,48:If,49:Vf,50:function(){S(this,this.B,R(this,0))},51:Pf},222:{0:function(){S(this,0,Xe(this,R(this,0),gf(this)))},1:function(){S(this,0,Ze(this,R(this,0),gf(this)))},2:function(){af(this,R(this,0),gf(this))},3:function(){af(this,R(this,0),gf(this))&&qf(this)},4:function(){S(this,0,Ye(this,R(this,0),gf(this)))},5:function(){S(this,0,Ye(this,gf(this),R(this,0)))},6:function(){S(this,0,$e(this,R(this,0),gf(this)))},7:function(){S(this,
0,$e(this,gf(this),R(this,0)))},48:function(){S(this,this.B,Xe(this,R(this,this.B),R(this,0)))&&qf(this)},49:function(){S(this,this.B,Ze(this,R(this,this.B),R(this,0)))&&qf(this)},50:Gf,51:function(){af(this,R(this,0),R(this,1))&&null!=qf(this)&&qf(this)},52:function(){S(this,this.B,Ye(this,R(this,0),R(this,this.B)))&&qf(this)},53:function(){S(this,this.B,Ye(this,R(this,this.B),R(this,0)))&&qf(this)},54:function(){S(this,this.B,$e(this,R(this,0),R(this,this.B)))&&qf(this)},55:function(){S(this,this.B,
$e(this,R(this,this.B),R(this,0)))&&qf(this)}},223:{0:function(){rf(this,gf(this))},2:function(){null!=bf(this,R(this,0),32768)&&this.A.bb(this.A.F,this.I[0])},3:function(){null!=bf(this,R(this,0),32768)&&(this.A.bb(this.A.F,this.I[0]),qf(this))},4:function(){var a=lf(this),b=of(a[0],8)+1E8*of(a[1],8)+1E16*of(a[2],2);a[2]&32768&&(b=-b);rf(this,b)},5:function(){var a;a=this.A.fa(this.A.F);a=4294967296*this.A.fa(this.A.F+4)+(a>>>0);rf(this,a)},6:function(){var a=bf(this,qf(this));null!=a&&(this.G[0]=
pf(a,8),this.G[1]=pf(a/1E8,8),this.G[2]=pf(a/1E16,2),0>a&&(this.G[2]|=32768),mf(this))},7:function(){null!=bf(this,R(this,0),zf)&&(this.Lj(),qf(this))},48:function(){If.call(this);qf(this)},49:Vf,50:Qf,51:Qf,52:Tf}},Xf=[Af,Jf,Kf,Lf,Mf,Nf,Rf,Of,Sf,Tf];Ga(function(){for(var a=bb(document,"pcx86","fpu"),b=0;b<a.length;b++){var c=a[b],d=Za(c),d=new Ne(d);ab(d,c)}});function Yf(a,b){var c=a+b+xe(this)|0;je(this,a,b,c,191);this.A-=-1===this.C?-1===this.F?this.B.dc:this.B.yb:this.B.qc;return c&255}
function Zf(a,b){var c=a+b+xe(this)|0;je(this,a,b,c,this.fb|63);this.A-=-1===this.C?-1===this.F?this.B.dc:this.B.yb:this.B.qc;return c&this.N}function $f(a,b){var c=a+b|0;je(this,a,b,c,191);this.A-=-1===this.C?-1===this.F?this.B.dc:this.B.yb:this.B.qc;return c&255}function ag(a,b){var c=a+b|0;je(this,a,b,c,this.fb|63);this.A-=-1===this.C?-1===this.F?this.B.dc:this.B.yb:this.B.qc;return c&this.N}
function bg(a,b){a&=b;H(this,a,128);this.A-=-1===this.C?-1===this.F?this.B.dc:this.B.yb:this.B.qc;return a}function cg(a,b){this.A-=-1===this.C?-1===this.F?this.B.dc:this.B.yb:this.B.qc;return H(this,a&b,this.fb)&this.N}function dg(a,b){this.A-=10+(-1===this.F?0:1);if((a&3)<(b&3))return a=a&-4|b&3,Be(this),a;ze(this);return a}
function eg(a){if(-1===this.F)return v.call(this,6),a;var b=a,c=this.Sb(this.F),d=this.Sb(this.F+this.U);2==this.U&&(b=a<<16>>16,c=c<<16>>16,d=d<<16>>16);this.A-=this.B.Ei;(b<c||b>d)&&v.call(this,5);this.L|=2;return a}function fg(a,b){var c=0;if(b){ze(this);for(var d=1;d&this.N;){if(b&d){a=c;break}d<<=1;c++}}else Be(this);this.A-=11+3*c;return a}function gg(a,b){var c=0;if(b){ze(this);for(var d=2==this.U?15:31,e=1<<d;e;){if(b&e){a=d;break}e>>>=1;c++;d--}}else Be(this);this.A-=11+3*c;return a}
function hg(a,b){a&1<<(b&(2==this.U?15:31))?se(this):te(this);this.A-=-1===this.F?3:6;this.L|=2;return a}function ig(a,b){b=1<<(b&(2==this.U?15:31));a&b?se(this):te(this);this.A-=-1===this.F?6:8;return a^b}function jg(a,b){b=1<<(b&(2==this.U?15:31));a&b?se(this):te(this);this.A-=-1===this.F?6:8;return a&~b}function kg(a,b){b=1<<(b&(2==this.U?15:31));a&b?se(this):te(this);this.A-=-1===this.F?6:8;return a|b}
function lg(a,b){if(-1===this.F)return hg.call(this,a,b);var c=this.U<<3;if(b>=c||b<-c)a=Ge(this,this.Eb,this.La+(b>>(2==this.U?4:5))*this.U);b=1<<(b&(2==this.U?15:31));a&b?se(this):te(this);this.A-=6;this.L|=2;return a}function mg(a,b){if(-1===this.F)return ig.call(this,a,b);var c=this.U<<3;if(b>=c||b<-c)a=Ge(this,this.Eb,this.La+(b>>(2==this.U?4:5))*this.U);b=1<<(b&(2==this.U?15:31));a&b?se(this):te(this);this.A-=8;return a^b}
function ng(a,b){if(-1===this.F)return jg.call(this,a,b);var c=this.U<<3;if(b>=c||b<-c)a=Ge(this,this.Eb,this.La+(b>>(2==this.U?4:5))*this.U);b=1<<(b&(2==this.U?15:31));a&b?se(this):te(this);this.A-=8;return a&~b}function og(a,b){if(-1===this.F)return kg.call(this,a,b);var c=this.U<<3;if(b>=c||b<-c)a=Ge(this,this.Eb,this.La+(b>>(2==this.U?4:5))*this.U);b=1<<(b&(2==this.U?15:31));a&b?se(this):te(this);this.A-=8;return a|b}
function pg(a,b){je(this,a,b,a-b|0,191,!0);this.A-=-1===this.C?-1===this.F?this.B.dc:this.B.Gg:this.B.yb;this.L|=2;return a}function qg(a,b){je(this,a,b,a-b|0,this.fb|63,!0);this.A-=-1===this.C?-1===this.F?this.B.dc:this.B.Gg:this.B.yb;this.L|=2;return a}
function rg(a){if(this.od){var b=this.od,c=this.Uh,d=this.W,e=d>>3&7;b.B=d&7;var f=(3>(d>>6&3)?0:48)+e;(217==c||219==c)&&52<=f&&(f=e<<4|b.B);if(e=Wf[c][f]){if(0>Xf.indexOf(e)){var f=b.A,g=f.Dd;8087==b.ca&&(f.wa&16&&g++,f.wa&32&&g++);b.ia=f.Ca.ja;b.L=g-f.Ca.ya;-1!==f.F&&(b.ba=f.Eb.ja,b.R=f.F-f.Eb.ya);b.W=(c&7)<<8|d}e.call(b)}}this.A-=-1===this.F?2:8;return a}function sg(a){if(80186>this.ca)return T.call(this,a);v.call(this,13,0);return a}function od(a){v.call(this,6);return a}
function T(a){rd.call(this);return a}function tg(a,b){a=ug.call(this,this.O(),b);80386>this.ca&&(this.A-=12);return a}function vg(a,b){a=this.Aa();a=2==this.U?ug.call(this,a,b):wg.call(this,a,b);80386>this.ca&&(this.A-=12);return a}function xg(a,b){var c=!1;0>b&&(b=-b|0,c=!c);0>a&&(a=-a|0,c=!c);yg.call(this,a,b);c&&(this.ua=~this.ua+1|0,this.Ga=~this.Ga+(this.ua?0:1)|0)}
function ug(a,b){a=(a<<16>>16)*(b<<16>>16)|0;32767<a||-32768>a?(se(this),ue(this)):(te(this),ve(this));this.A-=-1===this.F?9:12;return a&65535}function wg(a,b){xg.call(this,a,b);this.Ga!=this.ua>>31?(se(this),ue(this)):(te(this),ve(this));this.A-=-1===this.F?9:12;return this.ua}function zg(a,b){this.A-=14+(-1===this.F?0:2);ze(this);-1!==this.Oa.load(b)&&this.Oa.nc>=this.za&&this.Oa.nc>=(b&3)&&(Be(this),a=this.Oa.lb&-256,2<this.U&&(a|=(this.Oa.ext&-65281)<<16));return a}
function Ag(a,b){if(-1===this.F)return rd.call(this),a;Mc(this,this.ga(this.F+this.U));this.A-=this.B.xe;return b}function Bg(){this.A-=this.B.gj;return this.F}function Cg(a,b){if(-1===this.F)return rd.call(this),a;Nc(this,this.ga(this.F+this.U));this.A-=this.B.xe;return b}function Dg(a,b){if(-1===this.F)return rd.call(this),a;a=this.ga(this.F+this.U);this.Ta.load(a);this.A-=this.B.xe;return b}
function Eg(a,b){if(-1===this.F)return rd.call(this),a;a=this.ga(this.F+this.U);this.Xa.load(a);this.A-=this.B.xe;return b}function Fg(a,b){this.A-=14+(-1===this.F?0:2);if(b&65528&&-1!==this.Oa.load(b)&&(7168==(this.Oa.lb&7168)||this.Oa.nc>=this.za)&&this.Oa.nc>=(b&3))return Be(this),this.Oa.Za;ze(this);return a}function Gg(a,b){if(-1===this.F)return rd.call(this),a;Gc(this,this.ga(this.F+this.U));this.A-=this.B.xe;return b}
function Hg(a,b){this.A-=-1===this.C?-1===this.F?this.B.nj:this.B.mj:this.B.kj;return b}function Ig(a,b){switch(this.W>>3&7){case 4:this.oa=this.J;break;case 5:this.oa=this.G;break;case 6:this.oa=this.M;break;case 7:this.oa=this.D}return b}function Jg(a,b){return b}
function Kg(a,b){a=this.W>>3&7;switch(a){case 0:this.oa=this.J;break;case 2:this.oa=this.M;break;case 3:this.oa=this.D;break;default:if(80286==this.ca||80386==this.ca&&4!=a&&5!=a)v.call(this,6);else switch(a){case 1:this.oa=this.G;break;case 4:this.oa=C(this);break;case 5:this.oa=this.K;break;case 6:this.oa=this.I;break;case 7:this.oa=this.H}}return Hg.call(this,0,b)}
function Lg(a,b){switch(this.W>>3&7){case 0:b=this.pa.ja;break;case 1:b=this.Ca.ja;break;case 2:b=this.P.ja;break;case 3:b=this.xa.ja;break;case 4:if(80386<=this.ca){b=this.Ta.ja;break}v.call(this,6);b=a;break;case 5:if(80386<=this.ca){b=this.Xa.ja;break}default:v.call(this,6),b=a}-1!==this.C&&Jc(this,2);return Hg.call(this,0,b)}
function yg(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,f=d>>>16,d=(d&65535)+c*a;this.ua=d<<16|e&65535;this.Ga=f+((d>>>16)+b*a)|0}else this.ua=a*b|0,this.Ga=0}function Mg(a,b){this.A-=-1===this.C?-1===this.F?this.B.dc:this.B.yb:this.B.qc;return H(this,a|b,128)}function Ng(a,b){this.A-=-1===this.C?-1===this.F?this.B.dc:this.B.yb:this.B.qc;return H(this,a|b,this.fb)&this.N}
function Og(a,b){var c=a-b-xe(this)|0;je(this,a,b,c,191,!0);this.A-=-1===this.C?-1===this.F?this.B.dc:this.B.yb:this.B.qc;return c&255}function Pg(a,b){var c=a-b-xe(this)|0;je(this,a,b,c,this.fb|63,!0);this.A-=-1===this.C?-1===this.F?this.B.dc:this.B.yb:this.B.qc;return c&this.N}function Qg(){return pe(this)?1:0}function Rg(){return ke(this)?1:0}function Sg(){return ke(this)?0:1}function Tg(){return ne(this)?1:0}function Ug(){return ne(this)?0:1}function Vg(){return ke(this)||ne(this)?1:0}
function Wg(){return ke(this)||ne(this)?0:1}function Xg(){return oe(this)?1:0}function Yg(){return oe(this)?0:1}function Zg(){return le(this)?1:0}function $g(){return le(this)?0:1}function ah(){return!oe(this)!=!pe(this)?1:0}function bh(){return!oe(this)!=!pe(this)?0:1}function ch(){return ne(this)||!oe(this)!=!pe(this)?1:0}function dh(){return ne(this)||!oe(this)!=!pe(this)?0:1}function eh(a,b){return fh.call(this,a,b,this.na())}function gh(a,b){return hh.call(this,a,b,this.na())}
function ih(a,b){return fh.call(this,a,b,this.G&31)}function jh(a,b){return hh.call(this,a,b,this.G&31)}function kh(a,b){return lh.call(this,a,b,this.na())}function mh(a,b){return nh.call(this,a,b,this.na())}function oh(a,b){return lh.call(this,a,b,this.G&31)}function ph(a,b){return nh.call(this,a,b,this.G&31)}function qh(a,b){var c=a-b|0;je(this,a,b,c,191,!0);this.A-=-1===this.C?-1===this.F?this.B.dc:this.B.yb:this.B.qc;return c&255}
function rh(a,b){var c=a-b|0;je(this,a,b,c,this.fb|63,!0);this.A-=-1===this.C?-1===this.F?this.B.dc:this.B.yb:this.B.qc;return c&this.N}function sh(a,b){H(this,a&b,128);this.A-=-1===this.C?-1===this.F?this.B.ih:this.B.cf:this.B.cf;this.L|=2;return a}function th(a,b){H(this,a&b,this.fb);this.A-=-1===this.C?-1===this.F?this.B.ih:this.B.cf:this.B.cf;this.L|=2;return a}function uh(a,b){var c=this.J&this.N,d=(1<<(this.G&31))-1;return a&~(d<<c)|(b&d)<<c}
function vh(a,b){return b>>(this.J&this.N)&(1<<(this.G&31))-1&this.N}function wh(a,b){if(-1===this.F){switch(this.W&7){case 0:this.J=this.J&-256|a;break;case 1:this.G=this.G&-256|a;break;case 2:this.M=this.M&-256|a;break;case 3:this.D=this.D&-256|a;break;case 4:this.J=this.J&-65281|a<<8;break;case 5:this.G=this.G&-65281|a<<8;break;case 6:this.M=this.M&-65281|a<<8;break;case 7:this.D=this.D&-65281|a<<8}this.A-=this.B.kh}else this.C=this.F,He(this,a),this.A-=this.B.jh;return b}
function xh(a,b){if(-1===this.F){switch(this.W&7){case 0:this.J=this.J&~this.N|a;break;case 1:this.G=this.G&~this.N|a;break;case 2:this.M=this.M&~this.N|a;break;case 3:this.D=this.D&~this.N|a;break;case 4:A(this,C(this)&~this.N|a);break;case 5:this.K=this.D&~this.N|a;break;case 6:this.I=this.I&~this.N|a;break;case 7:this.H=this.H&~this.N|a}this.A-=this.B.kh}else this.C=this.F,this.L&2||this.Xb(this.Eb.Rb(this.La,this.U),a),this.A-=this.B.jh;return b}
function yh(a,b){a^=b;H(this,a,128);this.A-=-1===this.C?-1===this.F?this.B.dc:this.B.yb:this.B.qc;return a}function zh(a,b){this.A-=-1===this.C?-1===this.F?this.B.dc:this.B.yb:this.B.qc;return H(this,a^b,this.fb)&this.N}function Ah(a,b){var c=a[1]-b[1];c||(c=a[0]-b[0]);return c}function Bh(a){var b=a-1|0;je(this,a,1,b,this.fb|62,!0);this.A-=2;return a&~this.N|b&this.N}
function Ch(a,b,c){c>>>=0;if(!c||c<=b>>>0)return!1;var d=0,e=1;c=[c>>>0,0];for(a=[a>>>0,b>>>0];0<Ah(a,c);){var f=b=c;b[0]+=f[0];b[1]+=f[1];4294967295<b[0]&&(b[0]>>>=0,b[1]++);e+=e}do 0<=Ah(a,c)&&(b=a,f=c,b[0]-=f[0],b[1]-=f[1],0>b[0]&&(b[0]>>>=0,b[1]--),d+=e),b=c,b[0]>>>=1,b[1]&1&&(b[0]=(b[0]|2147483648)>>>0),b[1]>>>=1,e/=2;while(1<=e);this.ua=d;this.Ga=a[0];return!0}function Dh(a){var b=a+1|0;je(this,a,1,b,this.fb|62);this.A-=2;return a&~this.N|b&this.N}
function Sc(a){this.bd=a;this.Pa&-2147483648&&Ab(this)}function Eh(a){this.L|=1;this.Gb.call(this,a);this.A-=-1===this.F?4:5}function fh(a,b,c){if(c){16<c&&(a=b,c-=16);var d=a<<c-1;a=(d<<1|b>>>16-c)&65535;H(this,a,32768,d&32768)}return a}function hh(a,b,c){if(c){var d=a<<c-1;a=d<<1|b>>>32-c;H(this,a,-2147483648,d&-2147483648)}return a}function lh(a,b,c){if(c){16<c&&(a=b,c-=16);var d=a>>>c-1;a=(d>>>1|b<<16-c)&65535;H(this,a,32768,d&1)}return a}
function nh(a,b,c){if(c){var d=a>>>c-1;a=d>>>1|b<<32-c;H(this,a,-2147483648,d&1)}return a}function Fh(){this.A-=-1===this.F?2:this.B.Aj;return 1}function Gh(){var a=this.G&255;this.A-=(-1===this.F?this.B.ah:this.B.$g)+(a<<this.B.bh);return a}function Hh(){var a=this.na();this.A-=(-1===this.F?this.B.ah:this.B.$g)+(a<<this.B.bh);return a}function Ih(){return null}function Jh(){return this.oa}
function Kh(a,b){this.Gc=this.Ca.ja;this.ic=this.P.ja;this.ka=this.ra;var c=E(this),d=this.U;null!=Rc(this,a,b,!0)&&(Lc(this,this.Gc,d,2),Lc(this,c,d,d));this.Gc=this.ic=this.ka=-1}function Lh(a,b,c){this.A-=this.B.Zi+(c||0);c=Pc(this);var d=this.Ca.ja,e=E(this);a=this.Ca.xi(a);-1!==a&&(D(this,c),D(this,d),D(this,e),null!=b&&D(this,b),this.fc=-1,ge(this,a))}
function Mh(a){this.ic=this.P.ja;this.ka=this.ra;var b=x(this),c=x(this);a&&A(this,C(this)+a);Rc(this,b,c,!1)&&(a&&A(this,C(this)+a),Nh.call(this,this.xa),Nh.call(this,this.pa),80386<=this.ca&&(Nh.call(this,this.Ta),Nh.call(this,this.Xa)));2==a&&this.ag&&ae(this,this.Y);this.ic=this.ka=-1}function Oh(){8086==this.ca?(this.fc=-1,Lh.call(this,0,null,2)):v.call(this,0,null,2)}function Me(a,b){this.fc=a;void 0===b&&(b=11);Lh.call(this,a,null,b)}
function v(a,b,c,d){var e=!1;this.ea.complete?80186<=this.ca&&(e=!0,0>this.fc?(-1!=this.Gc&&(this.Gc!==this.Ca.ja&&(this.Ca.sb=this.Gc&3,fe(this,this.Gc)),this.Gc=-1),this.Dd!==this.Y&&ge(this,this.Dd),-1!=this.ic&&(this.ic!==this.P.ja&&Gc(this,this.ic),this.ic=-1),-1!==this.ka&&(this.ka!==this.ra&&A(this,this.Ob&~this.P.sa|this.ka-this.P.ya),this.ka=-1)):8!=this.fc?(b=0,a=8):(b=0,a=-1,Ad(this),e=d=!1)):ge(this,this.Dd);var f=a,g=b,h=Ee(this,this.Y);204!=h||this.xc||(d=!1);this.X&131072&&(6==f&&99==
h||13==f&&205==h)&&(d=!1);983040<=this.Y&&1048575>=this.Y&&(d=!1);if(d){var k=this.ea.Nb,f="Fault "+fa(f,2,!0)+(null!=g?" ("+fa(g,4,!0)+")":"")+" on opcode "+fa(h,2,!0);d&&k&&(f+=" (blocked)");this.Ba(f);rc(this)}if(d&&e)throw-1;if(e)throw this.fc=a,Lh.call(this,a,b,c),this.Dd=this.Y,this.L=1==a?this.L|8192:this.L|4096,a;}function Bd(a,b,c){this.pd=a;a=0;b&&(a|=1);c&&(a|=2);3==this.za&&(a|=4);v.call(this,14,a)}
function Nh(a){var b=a.lb&7680;a.ja&65528&&(6144==b||7168==b||7168>b&&a.nc<this.za&&a.nc<(a.ja&3))&&a.load(0)}
function Gd(a){var b,c;switch((this.W=this.na())&199){case 0:c=I(this,this.D+this.I);this.A-=this.B.Ic;break;case 1:c=I(this,this.D+this.H);this.A-=this.B.Jc;break;case 2:c=J(this,this.K+this.I);this.A-=this.B.Jc;break;case 3:c=J(this,this.K+this.H);this.A-=this.B.Ic;break;case 4:c=I(this,this.I);this.A-=this.B.kc;break;case 5:c=I(this,this.H);this.A-=this.B.kc;break;case 6:c=I(this,O(this));this.A-=this.B.Zc;break;case 7:c=I(this,this.D);this.A-=this.B.kc;break;case 64:c=I(this,this.D+this.I+this.O());
this.A-=this.B.Kb;break;case 65:c=I(this,this.D+this.H+this.O());this.A-=this.B.Lb;break;case 66:c=J(this,this.K+this.I+this.O());this.A-=this.B.Lb;break;case 67:c=J(this,this.K+this.H+this.O());this.A-=this.B.Kb;break;case 68:c=I(this,this.I+this.O());this.A-=this.B.Sa;break;case 69:c=I(this,this.H+this.O());this.A-=this.B.Sa;break;case 70:c=J(this,this.K+this.O());this.A-=this.B.Sa;break;case 71:c=I(this,this.D+this.O());this.A-=this.B.Sa;break;case 128:c=I(this,this.D+this.I+O(this));this.A-=this.B.Kb;
break;case 129:c=I(this,this.D+this.H+O(this));this.A-=this.B.Lb;break;case 130:c=J(this,this.K+this.I+O(this));this.A-=this.B.Lb;break;case 131:c=J(this,this.K+this.H+O(this));this.A-=this.B.Kb;break;case 132:c=I(this,this.I+O(this));this.A-=this.B.Sa;break;case 133:c=I(this,this.H+O(this));this.A-=this.B.Sa;break;case 134:c=J(this,this.K+O(this));this.A-=this.B.Sa;break;case 135:c=I(this,this.D+O(this));this.A-=this.B.Sa;break;case 192:c=this.J&255;break;case 193:c=this.G&255;break;case 194:c=this.M&
255;break;case 195:c=this.D&255;break;case 196:c=this.J>>8&255;break;case 197:c=this.G>>8&255;break;case 198:c=this.M>>8&255;break;case 199:c=this.D>>8&255;break;default:c=0}var d=this.W>>3&7;switch(d){case 0:b=this.J&255;break;case 1:b=this.G&255;break;case 2:b=this.M&255;break;case 3:b=this.D&255;break;case 4:b=this.J>>8&255;break;case 5:b=this.G>>8&255;break;case 6:b=this.M>>8&255;break;case 7:b=this.D>>8&255;break;default:b=0}a=a.call(this,b,c);switch(d){case 0:this.J=this.J&-256|a;break;case 1:this.G=
this.G&-256|a;break;case 2:this.M=this.M&-256|a;break;case 3:this.D=this.D&-256|a;break;case 4:this.J=this.J&-65281|a<<8;break;case 5:this.G=this.G&-65281|a<<8;break;case 6:this.M=this.M&-65281|a<<8;break;case 7:this.D=this.D&-65281|a<<8}}
function Hd(a){var b,c,d=(this.W=this.na())&199;switch(d){case 0:b=I(this,this.D+this.I);this.C=this.F;break;case 1:b=I(this,this.D+this.H);this.C=this.F;break;case 2:b=J(this,this.K+this.I);this.C=this.F;break;case 3:b=J(this,this.K+this.H);this.C=this.F;break;case 4:b=I(this,this.I);this.C=this.F;break;case 5:b=I(this,this.H);this.C=this.F;break;case 6:b=I(this,O(this));this.C=this.F;break;case 7:b=I(this,this.D);this.C=this.F;break;case 64:b=I(this,this.D+this.I+this.O());this.C=this.F;break;case 65:b=
I(this,this.D+this.H+this.O());this.C=this.F;break;case 66:b=J(this,this.K+this.I+this.O());this.C=this.F;break;case 67:b=J(this,this.K+this.H+this.O());this.C=this.F;break;case 68:b=I(this,this.I+this.O());this.C=this.F;break;case 69:b=I(this,this.H+this.O());this.C=this.F;break;case 70:b=J(this,this.K+this.O());this.C=this.F;break;case 71:b=I(this,this.D+this.O());this.C=this.F;break;case 128:b=I(this,this.D+this.I+O(this));this.C=this.F;break;case 129:b=I(this,this.D+this.H+O(this));this.C=this.F;
break;case 130:b=J(this,this.K+this.I+O(this));this.C=this.F;break;case 131:b=J(this,this.K+this.H+O(this));this.C=this.F;break;case 132:b=I(this,this.I+O(this));this.C=this.F;break;case 133:b=I(this,this.H+O(this));this.C=this.F;break;case 134:b=J(this,this.K+O(this));this.C=this.F;break;case 135:b=I(this,this.D+O(this));this.C=this.F;break;case 192:b=this.J&255;break;case 193:b=this.G&255;break;case 194:b=this.M&255;break;case 195:b=this.D&255;break;case 196:b=this.J>>8&255;break;case 197:b=this.G>>
8&255;break;case 198:b=this.M>>8&255;break;case 199:b=this.D>>8&255;break;default:b=0}switch(this.W>>3&7){case 0:c=this.J&255;break;case 1:c=this.G&255;break;case 2:c=this.M&255;break;case 3:c=this.D&255;break;case 4:c=this.J>>8&255;break;case 5:c=this.G>>8&255;break;case 6:c=this.M>>8&255;break;case 7:c=this.D>>8&255;break;default:c=0}a=a.call(this,b,c);switch(d){case 0:case 3:He(this,a);this.A-=this.B.Ic;break;case 1:case 2:He(this,a);this.A-=this.B.Jc;break;case 4:case 5:case 7:He(this,a);this.A-=
this.B.kc;break;case 6:He(this,a);this.A-=this.B.Zc;break;case 64:case 67:case 128:case 131:He(this,a);this.A-=this.B.Kb;break;case 65:case 66:case 129:case 130:He(this,a);this.A-=this.B.Lb;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:He(this,a);this.A-=this.B.Sa;break;case 192:this.J=this.J&-256|a;break;case 193:this.G=this.G&-256|a;break;case 194:this.M=this.M&-256|a;break;case 195:this.D=this.D&-256|a;break;case 196:this.J=this.J&-65281|a<<8;break;case 197:this.G=this.G&
-65281|a<<8;break;case 198:this.M=this.M&-65281|a<<8;break;case 199:this.D=this.D&-65281|a<<8}}
function Id(a,b){var c,d=(this.W=this.na())&199;switch(d){case 0:c=I(this,this.D+this.I);this.C=this.F;break;case 1:c=I(this,this.D+this.H);this.C=this.F;break;case 2:c=J(this,this.K+this.I);this.C=this.F;break;case 3:c=J(this,this.K+this.H);this.C=this.F;break;case 4:c=I(this,this.I);this.C=this.F;break;case 5:c=I(this,this.H);this.C=this.F;break;case 6:c=I(this,O(this));this.C=this.F;break;case 7:c=I(this,this.D);this.C=this.F;break;case 64:c=I(this,this.D+this.I+this.O());this.C=this.F;break;case 65:c=
I(this,this.D+this.H+this.O());this.C=this.F;break;case 66:c=J(this,this.K+this.I+this.O());this.C=this.F;break;case 67:c=J(this,this.K+this.H+this.O());this.C=this.F;break;case 68:c=I(this,this.I+this.O());this.C=this.F;break;case 69:c=I(this,this.H+this.O());this.C=this.F;break;case 70:c=J(this,this.K+this.O());this.C=this.F;break;case 71:c=I(this,this.D+this.O());this.C=this.F;break;case 128:c=I(this,this.D+this.I+O(this));this.C=this.F;break;case 129:c=I(this,this.D+this.H+O(this));this.C=this.F;
break;case 130:c=J(this,this.K+this.I+O(this));this.C=this.F;break;case 131:c=J(this,this.K+this.H+O(this));this.C=this.F;break;case 132:c=I(this,this.I+O(this));this.C=this.F;break;case 133:c=I(this,this.H+O(this));this.C=this.F;break;case 134:c=J(this,this.K+O(this));this.C=this.F;break;case 135:c=I(this,this.D+O(this));this.C=this.F;break;case 192:c=this.J&255;break;case 193:c=this.G&255;break;case 194:c=this.M&255;break;case 195:c=this.D&255;break;case 196:c=this.J>>8&255;break;case 197:c=this.G>>
8&255;break;case 198:c=this.M>>8&255;break;case 199:c=this.D>>8&255;break;default:c=0}a=a[this.W>>3&7].call(this,c,b.call(this));switch(d){case 0:case 3:He(this,a);this.A-=this.B.Ic;break;case 1:case 2:He(this,a);this.A-=this.B.Jc;break;case 4:case 5:case 7:He(this,a);this.A-=this.B.kc;break;case 6:He(this,a);this.A-=this.B.Zc;break;case 64:case 67:case 128:case 131:He(this,a);this.A-=this.B.Kb;break;case 65:case 66:case 129:case 130:He(this,a);this.A-=this.B.Lb;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:He(this,
a);this.A-=this.B.Sa;break;case 192:this.J=this.J&-256|a;break;case 193:this.G=this.G&-256|a;break;case 194:this.M=this.M&-256|a;break;case 195:this.D=this.D&-256|a;break;case 196:this.J=this.J&-65281|a<<8;break;case 197:this.G=this.G&-65281|a<<8;break;case 198:this.M=this.M&-65281|a<<8;break;case 199:this.D=this.D&-65281|a<<8}}
function Jd(a){var b,c;switch((this.W=this.na())&199){case 0:c=K(this,this.D+this.I);this.A-=this.B.Ic;break;case 1:c=K(this,this.D+this.H);this.A-=this.B.Jc;break;case 2:c=L(this,this.K+this.I);this.A-=this.B.Jc;break;case 3:c=L(this,this.K+this.H);this.A-=this.B.Ic;break;case 4:c=K(this,this.I);this.A-=this.B.kc;break;case 5:c=K(this,this.H);this.A-=this.B.kc;break;case 6:c=K(this,O(this));this.A-=this.B.Zc;break;case 7:c=K(this,this.D);this.A-=this.B.kc;break;case 64:c=K(this,this.D+this.I+this.O());
this.A-=this.B.Kb;break;case 65:c=K(this,this.D+this.H+this.O());this.A-=this.B.Lb;break;case 66:c=L(this,this.K+this.I+this.O());this.A-=this.B.Lb;break;case 67:c=L(this,this.K+this.H+this.O());this.A-=this.B.Kb;break;case 68:c=K(this,this.I+this.O());this.A-=this.B.Sa;break;case 69:c=K(this,this.H+this.O());this.A-=this.B.Sa;break;case 70:c=L(this,this.K+this.O());this.A-=this.B.Sa;break;case 71:c=K(this,this.D+this.O());this.A-=this.B.Sa;break;case 128:c=K(this,this.D+this.I+O(this));this.A-=this.B.Kb;
break;case 129:c=K(this,this.D+this.H+O(this));this.A-=this.B.Lb;break;case 130:c=L(this,this.K+this.I+O(this));this.A-=this.B.Lb;break;case 131:c=L(this,this.K+this.H+O(this));this.A-=this.B.Kb;break;case 132:c=K(this,this.I+O(this));this.A-=this.B.Sa;break;case 133:c=K(this,this.H+O(this));this.A-=this.B.Sa;break;case 134:c=L(this,this.K+O(this));this.A-=this.B.Sa;break;case 135:c=K(this,this.D+O(this));this.A-=this.B.Sa;break;case 192:c=this.J&65535;break;case 193:c=this.G&65535;break;case 194:c=
this.M&65535;break;case 195:c=this.D&65535;break;case 196:c=C(this)&65535;break;case 197:c=this.K&65535;break;case 198:c=this.I&65535;break;case 199:c=this.H&65535;break;default:c=0}var d=this.W>>3&7;switch(d){case 0:b=this.J&65535;break;case 1:b=this.G&65535;break;case 2:b=this.M&65535;break;case 3:b=this.D&65535;break;case 4:b=C(this)&65535;break;case 5:b=this.K&65535;break;case 6:b=this.I&65535;break;case 7:b=this.H&65535;break;default:b=0}a=a.call(this,b,c);switch(d){case 0:this.J=this.J&-65536|
a;break;case 1:this.G=this.G&-65536|a;break;case 2:this.M=this.M&-65536|a;break;case 3:this.D=this.D&-65536|a;break;case 4:A(this,C(this)&-65536|a);break;case 5:this.K=this.K&-65536|a;break;case 6:this.I=this.I&-65536|a;break;case 7:this.H=this.H&-65536|a}}
function Kd(a){var b,c,d=(this.W=this.na())&199;switch(d){case 0:b=K(this,this.D+this.I);this.C=this.F;break;case 1:b=K(this,this.D+this.H);this.C=this.F;break;case 2:b=L(this,this.K+this.I);this.C=this.F;break;case 3:b=L(this,this.K+this.H);this.C=this.F;break;case 4:b=K(this,this.I);this.C=this.F;break;case 5:b=K(this,this.H);this.C=this.F;break;case 6:b=K(this,O(this));this.C=this.F;break;case 7:b=K(this,this.D);this.C=this.F;break;case 64:b=K(this,this.D+this.I+this.O());this.C=this.F;break;case 65:b=
K(this,this.D+this.H+this.O());this.C=this.F;break;case 66:b=L(this,this.K+this.I+this.O());this.C=this.F;break;case 67:b=L(this,this.K+this.H+this.O());this.C=this.F;break;case 68:b=K(this,this.I+this.O());this.C=this.F;break;case 69:b=K(this,this.H+this.O());this.C=this.F;break;case 70:b=L(this,this.K+this.O());this.C=this.F;break;case 71:b=K(this,this.D+this.O());this.C=this.F;break;case 128:b=K(this,this.D+this.I+O(this));this.C=this.F;break;case 129:b=K(this,this.D+this.H+O(this));this.C=this.F;
break;case 130:b=L(this,this.K+this.I+O(this));this.C=this.F;break;case 131:b=L(this,this.K+this.H+O(this));this.C=this.F;break;case 132:b=K(this,this.I+O(this));this.C=this.F;break;case 133:b=K(this,this.H+O(this));this.C=this.F;break;case 134:b=L(this,this.K+O(this));this.C=this.F;break;case 135:b=K(this,this.D+O(this));this.C=this.F;break;case 192:b=this.J&65535;break;case 193:b=this.G&65535;break;case 194:b=this.M&65535;break;case 195:b=this.D&65535;break;case 196:b=C(this)&65535;break;case 197:b=
this.K&65535;break;case 198:b=this.I&65535;break;case 199:b=this.H&65535;break;default:b=0}switch(this.W>>3&7){case 0:c=this.J&65535;break;case 1:c=this.G&65535;break;case 2:c=this.M&65535;break;case 3:c=this.D&65535;break;case 4:c=C(this)&65535;break;case 5:c=this.K&65535;break;case 6:c=this.I&65535;break;case 7:c=this.H&65535;break;default:c=0}a=a.call(this,b,c);switch(d){case 0:case 3:Ie(this,a);this.A-=this.B.Ic;break;case 1:case 2:Ie(this,a);this.A-=this.B.Jc;break;case 4:case 5:case 7:Ie(this,
a);this.A-=this.B.kc;break;case 6:Ie(this,a);this.A-=this.B.Zc;break;case 64:case 67:case 128:case 131:Ie(this,a);this.A-=this.B.Kb;break;case 65:case 66:case 129:case 130:Ie(this,a);this.A-=this.B.Lb;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Ie(this,a);this.A-=this.B.Sa;break;case 192:this.J=this.J&-65536|a;break;case 193:this.G=this.G&-65536|a;break;case 194:this.M=this.M&-65536|a;break;case 195:this.D=this.D&-65536|a;break;case 196:A(this,C(this)&-65536|a);break;
case 197:this.K=this.K&-65536|a;break;case 198:this.I=this.I&-65536|a;break;case 199:this.H=this.H&-65536|a}}
function Ld(a,b){var c,d=(this.W=this.na())&199;switch(d){case 0:c=K(this,this.D+this.I);this.C=this.F;break;case 1:c=K(this,this.D+this.H);this.C=this.F;break;case 2:c=L(this,this.K+this.I);this.C=this.F;break;case 3:c=L(this,this.K+this.H);this.C=this.F;break;case 4:c=K(this,this.I);this.C=this.F;break;case 5:c=K(this,this.H);this.C=this.F;break;case 6:c=K(this,O(this));this.C=this.F;break;case 7:c=K(this,this.D);this.C=this.F;break;case 64:c=K(this,this.D+this.I+this.O());this.C=this.F;break;case 65:c=
K(this,this.D+this.H+this.O());this.C=this.F;break;case 66:c=L(this,this.K+this.I+this.O());this.C=this.F;break;case 67:c=L(this,this.K+this.H+this.O());this.C=this.F;break;case 68:c=K(this,this.I+this.O());this.C=this.F;break;case 69:c=K(this,this.H+this.O());this.C=this.F;break;case 70:c=L(this,this.K+this.O());this.C=this.F;break;case 71:c=K(this,this.D+this.O());this.C=this.F;break;case 128:c=K(this,this.D+this.I+O(this));this.C=this.F;break;case 129:c=K(this,this.D+this.H+O(this));this.C=this.F;
break;case 130:c=L(this,this.K+this.I+O(this));this.C=this.F;break;case 131:c=L(this,this.K+this.H+O(this));this.C=this.F;break;case 132:c=K(this,this.I+O(this));this.C=this.F;break;case 133:c=K(this,this.H+O(this));this.C=this.F;break;case 134:c=L(this,this.K+O(this));this.C=this.F;break;case 135:c=K(this,this.D+O(this));this.C=this.F;break;case 192:c=this.J&65535;break;case 193:c=this.G&65535;break;case 194:c=this.M&65535;break;case 195:c=this.D&65535;break;case 196:c=C(this)&65535;break;case 197:c=
this.K&65535;break;case 198:c=this.I&65535;break;case 199:c=this.H&65535;break;default:c=0}a=a[this.W>>3&7].call(this,c,b.call(this));switch(d){case 0:case 3:Ie(this,a);this.A-=this.B.Ic;break;case 1:case 2:Ie(this,a);this.A-=this.B.Jc;break;case 4:case 5:case 7:Ie(this,a);this.A-=this.B.kc;break;case 6:Ie(this,a);this.A-=this.B.Zc;break;case 64:case 67:case 128:case 131:Ie(this,a);this.A-=this.B.Kb;break;case 65:case 66:case 129:case 130:Ie(this,a);this.A-=this.B.Lb;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Ie(this,
a);this.A-=this.B.Sa;break;case 192:this.J=this.J&-65536|a;break;case 193:this.G=this.G&-65536|a;break;case 194:this.M=this.M&-65536|a;break;case 195:this.D=this.D&-65536|a;break;case 196:A(this,C(this)&-65536|a);break;case 197:this.K=this.K&-65536|a;break;case 198:this.I=this.I&-65536|a;break;case 199:this.H=this.H&-65536|a}}
function Md(a){var b,c;switch((this.W=this.na())&199){case 0:c=M(this,this.D+this.I);this.A-=this.B.Ic;break;case 1:c=M(this,this.D+this.H);this.A-=this.B.Jc;break;case 2:c=N(this,this.K+this.I);this.A-=this.B.Jc;break;case 3:c=N(this,this.K+this.H);this.A-=this.B.Ic;break;case 4:c=M(this,this.I);this.A-=this.B.kc;break;case 5:c=M(this,this.H);this.A-=this.B.kc;break;case 6:c=M(this,O(this));this.A-=this.B.Zc;break;case 7:c=M(this,this.D);this.A-=this.B.kc;break;case 64:c=M(this,this.D+this.I+this.O());
this.A-=this.B.Kb;break;case 65:c=M(this,this.D+this.H+this.O());this.A-=this.B.Lb;break;case 66:c=N(this,this.K+this.I+this.O());this.A-=this.B.Lb;break;case 67:c=N(this,this.K+this.H+this.O());this.A-=this.B.Kb;break;case 68:c=M(this,this.I+this.O());this.A-=this.B.Sa;break;case 69:c=M(this,this.H+this.O());this.A-=this.B.Sa;break;case 70:c=N(this,this.K+this.O());this.A-=this.B.Sa;break;case 71:c=M(this,this.D+this.O());this.A-=this.B.Sa;break;case 128:c=M(this,this.D+this.I+O(this));this.A-=this.B.Kb;
break;case 129:c=M(this,this.D+this.H+O(this));this.A-=this.B.Lb;break;case 130:c=N(this,this.K+this.I+O(this));this.A-=this.B.Lb;break;case 131:c=N(this,this.K+this.H+O(this));this.A-=this.B.Kb;break;case 132:c=M(this,this.I+O(this));this.A-=this.B.Sa;break;case 133:c=M(this,this.H+O(this));this.A-=this.B.Sa;break;case 134:c=N(this,this.K+O(this));this.A-=this.B.Sa;break;case 135:c=M(this,this.D+O(this));this.A-=this.B.Sa;break;case 192:c=this.J;break;case 193:c=this.G;break;case 194:c=this.M;break;
case 195:c=this.D;break;case 196:c=C(this);break;case 197:c=this.K;break;case 198:c=this.I;break;case 199:c=this.H;break;default:c=0}var d=this.W>>3&7;switch(d){case 0:b=this.J;break;case 1:b=this.G;break;case 2:b=this.M;break;case 3:b=this.D;break;case 4:b=C(this);break;case 5:b=this.K;break;case 6:b=this.I;break;case 7:b=this.H;break;default:b=0}a=a.call(this,b,c);switch(d){case 0:this.J=a;break;case 1:this.G=a;break;case 2:this.M=a;break;case 3:this.D=a;break;case 4:A(this,a);break;case 5:this.K=
a;break;case 6:this.I=a;break;case 7:this.H=a}}
function Nd(a){var b,c,d=(this.W=this.na())&199;switch(d){case 0:b=M(this,this.D+this.I);this.C=this.F;break;case 1:b=M(this,this.D+this.H);this.C=this.F;break;case 2:b=N(this,this.K+this.I);this.C=this.F;break;case 3:b=N(this,this.K+this.H);this.C=this.F;break;case 4:b=M(this,this.I);this.C=this.F;break;case 5:b=M(this,this.H);this.C=this.F;break;case 6:b=M(this,O(this));this.C=this.F;break;case 7:b=M(this,this.D);this.C=this.F;break;case 64:b=M(this,this.D+this.I+this.O());this.C=this.F;break;case 65:b=
M(this,this.D+this.H+this.O());this.C=this.F;break;case 66:b=N(this,this.K+this.I+this.O());this.C=this.F;break;case 67:b=N(this,this.K+this.H+this.O());this.C=this.F;break;case 68:b=M(this,this.I+this.O());this.C=this.F;break;case 69:b=M(this,this.H+this.O());this.C=this.F;break;case 70:b=N(this,this.K+this.O());this.C=this.F;break;case 71:b=M(this,this.D+this.O());this.C=this.F;break;case 128:b=M(this,this.D+this.I+O(this));this.C=this.F;break;case 129:b=M(this,this.D+this.H+O(this));this.C=this.F;
break;case 130:b=N(this,this.K+this.I+O(this));this.C=this.F;break;case 131:b=N(this,this.K+this.H+O(this));this.C=this.F;break;case 132:b=M(this,this.I+O(this));this.C=this.F;break;case 133:b=M(this,this.H+O(this));this.C=this.F;break;case 134:b=N(this,this.K+O(this));this.C=this.F;break;case 135:b=M(this,this.D+O(this));this.C=this.F;break;case 192:b=this.J;break;case 193:b=this.G;break;case 194:b=this.M;break;case 195:b=this.D;break;case 196:b=C(this);break;case 197:b=this.K;break;case 198:b=this.I;
break;case 199:b=this.H;break;default:b=0}switch(this.W>>3&7){case 0:c=this.J;break;case 1:c=this.G;break;case 2:c=this.M;break;case 3:c=this.D;break;case 4:c=C(this);break;case 5:c=this.K;break;case 6:c=this.I;break;case 7:c=this.H;break;default:c=0}a=a.call(this,b,c);switch(d){case 0:case 3:Je(this,a);this.A-=this.B.Ic;break;case 1:case 2:Je(this,a);this.A-=this.B.Jc;break;case 4:case 5:case 7:Je(this,a);this.A-=this.B.kc;break;case 6:Je(this,a);this.A-=this.B.Zc;break;case 64:case 67:case 128:case 131:Je(this,
a);this.A-=this.B.Kb;break;case 65:case 66:case 129:case 130:Je(this,a);this.A-=this.B.Lb;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Je(this,a);this.A-=this.B.Sa;break;case 192:this.J=a;break;case 193:this.G=a;break;case 194:this.M=a;break;case 195:this.D=a;break;case 196:A(this,a);break;case 197:this.K=a;break;case 198:this.I=a;break;case 199:this.H=a}}
function Od(a,b){var c,d=(this.W=this.na())&199;switch(d){case 0:c=M(this,this.D+this.I);this.C=this.F;break;case 1:c=M(this,this.D+this.H);this.C=this.F;break;case 2:c=N(this,this.K+this.I);this.C=this.F;break;case 3:c=N(this,this.K+this.H);this.C=this.F;break;case 4:c=M(this,this.I);this.C=this.F;break;case 5:c=M(this,this.H);this.C=this.F;break;case 6:c=M(this,O(this));this.C=this.F;break;case 7:c=M(this,this.D);this.C=this.F;break;case 64:c=M(this,this.D+this.I+this.O());this.C=this.F;break;case 65:c=
M(this,this.D+this.H+this.O());this.C=this.F;break;case 66:c=N(this,this.K+this.I+this.O());this.C=this.F;break;case 67:c=N(this,this.K+this.H+this.O());this.C=this.F;break;case 68:c=M(this,this.I+this.O());this.C=this.F;break;case 69:c=M(this,this.H+this.O());this.C=this.F;break;case 70:c=N(this,this.K+this.O());this.C=this.F;break;case 71:c=M(this,this.D+this.O());this.C=this.F;break;case 128:c=M(this,this.D+this.I+O(this));this.C=this.F;break;case 129:c=M(this,this.D+this.H+O(this));this.C=this.F;
break;case 130:c=N(this,this.K+this.I+O(this));this.C=this.F;break;case 131:c=N(this,this.K+this.H+O(this));this.C=this.F;break;case 132:c=M(this,this.I+O(this));this.C=this.F;break;case 133:c=M(this,this.H+O(this));this.C=this.F;break;case 134:c=N(this,this.K+O(this));this.C=this.F;break;case 135:c=M(this,this.D+O(this));this.C=this.F;break;case 192:c=this.J;break;case 193:c=this.G;break;case 194:c=this.M;break;case 195:c=this.D;break;case 196:c=C(this);break;case 197:c=this.K;break;case 198:c=this.I;
break;case 199:c=this.H}a=a[this.W>>3&7].call(this,c,b.call(this));switch(d){case 0:case 3:Je(this,a);this.A-=this.B.Ic;break;case 1:case 2:Je(this,a);this.A-=this.B.Jc;break;case 4:case 5:case 7:Je(this,a);this.A-=this.B.kc;break;case 6:Je(this,a);this.A-=this.B.Zc;break;case 64:case 67:case 128:case 131:Je(this,a);this.A-=this.B.Kb;break;case 65:case 66:case 129:case 130:Je(this,a);this.A-=this.B.Lb;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Je(this,a);this.A-=this.B.Sa;
break;case 192:this.J=a;break;case 193:this.G=a;break;case 194:this.M=a;break;case 195:this.D=a;break;case 196:A(this,a);break;case 197:this.K=a;break;case 198:this.I=a;break;case 199:this.H=a}}
function Pd(a){var b,c;switch((this.W=this.na())&199){case 0:c=I(this,this.J);break;case 1:c=I(this,this.G);break;case 2:c=I(this,this.M);break;case 3:c=I(this,this.D);break;case 4:c=I(this,Ph.call(this,0));break;case 5:c=I(this,O(this));break;case 6:c=I(this,this.I);break;case 7:c=I(this,this.H);break;case 64:c=I(this,this.J+this.O());break;case 65:c=I(this,this.G+this.O());break;case 66:c=I(this,this.M+this.O());break;case 67:c=I(this,this.D+this.O());break;case 68:c=I(this,Ph.call(this,1)+this.O());
break;case 69:c=J(this,this.K+this.O());break;case 70:c=I(this,this.I+this.O());break;case 71:c=I(this,this.H+this.O());break;case 128:c=I(this,this.J+O(this));break;case 129:c=I(this,this.G+O(this));break;case 130:c=I(this,this.M+O(this));break;case 131:c=I(this,this.D+O(this));break;case 132:c=I(this,Ph.call(this,2)+O(this));break;case 133:c=J(this,this.K+O(this));break;case 134:c=I(this,this.I+O(this));break;case 135:c=I(this,this.H+O(this));break;case 192:c=this.J&255;break;case 193:c=this.G&
255;break;case 194:c=this.M&255;break;case 195:c=this.D&255;break;case 196:c=this.J>>8&255;break;case 197:c=this.G>>8&255;break;case 198:c=this.M>>8&255;break;case 199:c=this.D>>8&255;break;default:c=0}var d=this.W>>3&7;switch(d){case 0:b=this.J&255;break;case 1:b=this.G&255;break;case 2:b=this.M&255;break;case 3:b=this.D&255;break;case 4:b=this.J>>8&255;break;case 5:b=this.G>>8&255;break;case 6:b=this.M>>8&255;break;case 7:b=this.D>>8&255;break;default:b=0}a=a.call(this,b,c);switch(d){case 0:this.J=
this.J&-256|a;break;case 1:this.G=this.G&-256|a;break;case 2:this.M=this.M&-256|a;break;case 3:this.D=this.D&-256|a;break;case 4:this.J=this.J&-65281|a<<8;break;case 5:this.G=this.G&-65281|a<<8;break;case 6:this.M=this.M&-65281|a<<8;break;case 7:this.D=this.D&-65281|a<<8}}
function Qd(a){var b,c,d=(this.W=this.na())&199;switch(d){case 0:b=I(this,this.J);this.C=this.F;break;case 1:b=I(this,this.G);this.C=this.F;break;case 2:b=I(this,this.M);this.C=this.F;break;case 3:b=I(this,this.D);this.C=this.F;break;case 4:b=I(this,Ph.call(this,0));this.C=this.F;break;case 5:b=I(this,O(this));this.C=this.F;break;case 6:b=I(this,this.I);this.C=this.F;break;case 7:b=I(this,this.H);this.C=this.F;break;case 64:b=I(this,this.J+this.O());this.C=this.F;break;case 65:b=I(this,this.G+this.O());
this.C=this.F;break;case 66:b=I(this,this.M+this.O());this.C=this.F;break;case 67:b=I(this,this.D+this.O());this.C=this.F;break;case 68:b=I(this,Ph.call(this,1)+this.O());this.C=this.F;break;case 69:b=J(this,this.K+this.O());this.C=this.F;break;case 70:b=I(this,this.I+this.O());this.C=this.F;break;case 71:b=I(this,this.H+this.O());this.C=this.F;break;case 128:b=I(this,this.J+O(this));this.C=this.F;break;case 129:b=I(this,this.G+O(this));this.C=this.F;break;case 130:b=I(this,this.M+O(this));this.C=
this.F;break;case 131:b=I(this,this.D+O(this));this.C=this.F;break;case 132:b=I(this,Ph.call(this,2)+O(this));this.C=this.F;break;case 133:b=J(this,this.K+O(this));this.C=this.F;break;case 134:b=I(this,this.I+O(this));this.C=this.F;break;case 135:b=I(this,this.H+O(this));this.C=this.F;break;case 192:b=this.J&255;break;case 193:b=this.G&255;break;case 194:b=this.M&255;break;case 195:b=this.D&255;break;case 196:b=this.J>>8&255;break;case 197:b=this.G>>8&255;break;case 198:b=this.M>>8&255;break;case 199:b=
this.D>>8&255;break;default:b=0}switch(this.W>>3&7){case 0:c=this.J&255;break;case 1:c=this.G&255;break;case 2:c=this.M&255;break;case 3:c=this.D&255;break;case 4:c=this.J>>8&255;break;case 5:c=this.G>>8&255;break;case 6:c=this.M>>8&255;break;case 7:c=this.D>>8&255;break;default:c=0}a=a.call(this,b,c);switch(d){case 192:this.J=this.J&-256|a;break;case 193:this.G=this.G&-256|a;break;case 194:this.M=this.M&-256|a;break;case 195:this.D=this.D&-256|a;break;case 196:this.J=this.J&-65281|a<<8;break;case 197:this.G=
this.G&-65281|a<<8;break;case 198:this.M=this.M&-65281|a<<8;break;case 199:this.D=this.D&-65281|a<<8;break;default:He(this,a)}}
function Rd(a,b){var c,d=(this.W=this.na())&199;switch(d){case 0:c=I(this,this.J);this.C=this.F;break;case 1:c=I(this,this.G);this.C=this.F;break;case 2:c=I(this,this.M);this.C=this.F;break;case 3:c=I(this,this.D);this.C=this.F;break;case 4:c=I(this,Ph.call(this,0));this.C=this.F;break;case 5:c=I(this,O(this));this.C=this.F;break;case 6:c=I(this,this.I);this.C=this.F;break;case 7:c=I(this,this.H);this.C=this.F;break;case 64:c=I(this,this.J+this.O());this.C=this.F;break;case 65:c=I(this,this.G+this.O());
this.C=this.F;break;case 66:c=I(this,this.M+this.O());this.C=this.F;break;case 67:c=I(this,this.D+this.O());this.C=this.F;break;case 68:c=I(this,Ph.call(this,1)+this.O());this.C=this.F;break;case 69:c=J(this,this.K+this.O());this.C=this.F;break;case 70:c=I(this,this.I+this.O());this.C=this.F;break;case 71:c=I(this,this.H+this.O());this.C=this.F;break;case 128:c=I(this,this.J+O(this));this.C=this.F;break;case 129:c=I(this,this.G+O(this));this.C=this.F;break;case 130:c=I(this,this.M+O(this));this.C=
this.F;break;case 131:c=I(this,this.D+O(this));this.C=this.F;break;case 132:c=I(this,Ph.call(this,2)+O(this));this.C=this.F;break;case 133:c=J(this,this.K+O(this));this.C=this.F;break;case 134:c=I(this,this.I+O(this));this.C=this.F;break;case 135:c=I(this,this.H+O(this));this.C=this.F;break;case 192:c=this.J&255;break;case 193:c=this.G&255;break;case 194:c=this.M&255;break;case 195:c=this.D&255;break;case 196:c=this.J>>8&255;break;case 197:c=this.G>>8&255;break;case 198:c=this.M>>8&255;break;case 199:c=
this.D>>8&255;break;default:c=0}a=a[this.W>>3&7].call(this,c,b.call(this));switch(d){case 192:this.J=this.J&-256|a;break;case 193:this.G=this.G&-256|a;break;case 194:this.M=this.M&-256|a;break;case 195:this.D=this.D&-256|a;break;case 196:this.J=this.J&-65281|a<<8;break;case 197:this.G=this.G&-65281|a<<8;break;case 198:this.M=this.M&-65281|a<<8;break;case 199:this.D=this.D&-65281|a<<8;break;default:He(this,a)}}
function Sd(a){var b,c;switch((this.W=this.na())&199){case 0:c=K(this,this.J);break;case 1:c=K(this,this.G);break;case 2:c=K(this,this.M);break;case 3:c=K(this,this.D);break;case 4:c=K(this,Ph.call(this,0));break;case 5:c=K(this,O(this));break;case 6:c=K(this,this.I);break;case 7:c=K(this,this.H);break;case 64:c=K(this,this.J+this.O());break;case 65:c=K(this,this.G+this.O());break;case 66:c=K(this,this.M+this.O());break;case 67:c=K(this,this.D+this.O());break;case 68:c=K(this,Ph.call(this,1)+this.O());
break;case 69:c=L(this,this.K+this.O());break;case 70:c=K(this,this.I+this.O());break;case 71:c=K(this,this.H+this.O());break;case 128:c=K(this,this.J+O(this));break;case 129:c=K(this,this.G+O(this));break;case 130:c=K(this,this.M+O(this));break;case 131:c=K(this,this.D+O(this));break;case 132:c=K(this,Ph.call(this,2)+O(this));break;case 133:c=L(this,this.K+O(this));break;case 134:c=K(this,this.I+O(this));break;case 135:c=K(this,this.H+O(this));break;case 192:c=this.J&65535;break;case 193:c=this.G&
65535;break;case 194:c=this.M&65535;break;case 195:c=this.D&65535;break;case 196:c=C(this)&65535;break;case 197:c=this.K&65535;break;case 198:c=this.I&65535;break;case 199:c=this.H&65535;break;default:c=0}var d=this.W>>3&7;switch(d){case 0:b=this.J&65535;break;case 1:b=this.G&65535;break;case 2:b=this.M&65535;break;case 3:b=this.D&65535;break;case 4:b=C(this)&65535;break;case 5:b=this.K&65535;break;case 6:b=this.I&65535;break;case 7:b=this.H&65535;break;default:b=0}a=a.call(this,b,c);switch(d){case 0:this.J=
this.J&-65536|a;break;case 1:this.G=this.G&-65536|a;break;case 2:this.M=this.M&-65536|a;break;case 3:this.D=this.D&-65536|a;break;case 4:A(this,C(this)&-65536|a);break;case 5:this.K=this.K&-65536|a;break;case 6:this.I=this.I&-65536|a;break;case 7:this.H=this.H&-65536|a}}
function Td(a){var b,c,d=(this.W=this.na())&199;switch(d){case 0:b=K(this,this.J);this.C=this.F;break;case 1:b=K(this,this.G);this.C=this.F;break;case 2:b=K(this,this.M);this.C=this.F;break;case 3:b=K(this,this.D);this.C=this.F;break;case 4:b=K(this,Ph.call(this,0));this.C=this.F;break;case 5:b=K(this,O(this));this.C=this.F;break;case 6:b=K(this,this.I);this.C=this.F;break;case 7:b=K(this,this.H);this.C=this.F;break;case 64:b=K(this,this.J+this.O());this.C=this.F;break;case 65:b=K(this,this.G+this.O());
this.C=this.F;break;case 66:b=K(this,this.M+this.O());this.C=this.F;break;case 67:b=K(this,this.D+this.O());this.C=this.F;break;case 68:b=K(this,Ph.call(this,1)+this.O());this.C=this.F;break;case 69:b=L(this,this.K+this.O());this.C=this.F;break;case 70:b=K(this,this.I+this.O());this.C=this.F;break;case 71:b=K(this,this.H+this.O());this.C=this.F;break;case 128:b=K(this,this.J+O(this));this.C=this.F;break;case 129:b=K(this,this.G+O(this));this.C=this.F;break;case 130:b=K(this,this.M+O(this));this.C=
this.F;break;case 131:b=K(this,this.D+O(this));this.C=this.F;break;case 132:b=K(this,Ph.call(this,2)+O(this));this.C=this.F;break;case 133:b=L(this,this.K+O(this));this.C=this.F;break;case 134:b=K(this,this.I+O(this));this.C=this.F;break;case 135:b=K(this,this.H+O(this));this.C=this.F;break;case 192:b=this.J&65535;break;case 193:b=this.G&65535;break;case 194:b=this.M&65535;break;case 195:b=this.D&65535;break;case 196:b=C(this)&65535;break;case 197:b=this.K&65535;break;case 198:b=this.I&65535;break;
case 199:b=this.H&65535;break;default:b=0}switch(this.W>>3&7){case 0:c=this.J&65535;break;case 1:c=this.G&65535;break;case 2:c=this.M&65535;break;case 3:c=this.D&65535;break;case 4:c=C(this)&65535;break;case 5:c=this.K&65535;break;case 6:c=this.I&65535;break;case 7:c=this.H&65535;break;default:c=0}a=a.call(this,b,c);switch(d){case 192:this.J=this.J&-65536|a;break;case 193:this.G=this.G&-65536|a;break;case 194:this.M=this.M&-65536|a;break;case 195:this.D=this.D&-65536|a;break;case 196:A(this,C(this)&
-65536|a);break;case 197:this.K=this.K&-65536|a;break;case 198:this.I=this.I&-65536|a;break;case 199:this.H=this.H&-65536|a;break;default:Ie(this,a)}}
function Ud(a,b){var c,d=(this.W=this.na())&199;switch(d){case 0:c=K(this,this.J);this.C=this.F;break;case 1:c=K(this,this.G);this.C=this.F;break;case 2:c=K(this,this.M);this.C=this.F;break;case 3:c=K(this,this.D);this.C=this.F;break;case 4:c=K(this,Ph.call(this,0));this.C=this.F;break;case 5:c=K(this,O(this));this.C=this.F;break;case 6:c=K(this,this.I);this.C=this.F;break;case 7:c=K(this,this.H);this.C=this.F;break;case 64:c=K(this,this.J+this.O());this.C=this.F;break;case 65:c=K(this,this.G+this.O());
this.C=this.F;break;case 66:c=K(this,this.M+this.O());this.C=this.F;break;case 67:c=K(this,this.D+this.O());this.C=this.F;break;case 68:c=K(this,Ph.call(this,1)+this.O());this.C=this.F;break;case 69:c=L(this,this.K+this.O());this.C=this.F;break;case 70:c=K(this,this.I+this.O());this.C=this.F;break;case 71:c=K(this,this.H+this.O());this.C=this.F;break;case 128:c=K(this,this.J+O(this));this.C=this.F;break;case 129:c=K(this,this.G+O(this));this.C=this.F;break;case 130:c=K(this,this.M+O(this));this.C=
this.F;break;case 131:c=K(this,this.D+O(this));this.C=this.F;break;case 132:c=K(this,Ph.call(this,2)+O(this));this.C=this.F;break;case 133:c=L(this,this.K+O(this));this.C=this.F;break;case 134:c=K(this,this.I+O(this));this.C=this.F;break;case 135:c=K(this,this.H+O(this));this.C=this.F;break;case 192:c=this.J&65535;break;case 193:c=this.G&65535;break;case 194:c=this.M&65535;break;case 195:c=this.D&65535;break;case 196:c=C(this)&65535;break;case 197:c=this.K&65535;break;case 198:c=this.I&65535;break;
case 199:c=this.H&65535;break;default:c=0}a=a[this.W>>3&7].call(this,c,b.call(this));switch(d){case 192:this.J=this.J&-65536|a;break;case 193:this.G=this.G&-65536|a;break;case 194:this.M=this.M&-65536|a;break;case 195:this.D=this.D&-65536|a;break;case 196:A(this,C(this)&-65536|a);break;case 197:this.K=this.K&-65536|a;break;case 198:this.I=this.I&-65536|a;break;case 199:this.H=this.H&-65536|a;break;default:Ie(this,a)}}
function Vd(a){var b,c;switch((this.W=this.na())&199){case 0:c=M(this,this.J);break;case 1:c=M(this,this.G);break;case 2:c=M(this,this.M);break;case 3:c=M(this,this.D);break;case 4:c=M(this,Ph.call(this,0));break;case 5:c=M(this,O(this));break;case 6:c=M(this,this.I);break;case 7:c=M(this,this.H);break;case 64:c=M(this,this.J+this.O());break;case 65:c=M(this,this.G+this.O());break;case 66:c=M(this,this.M+this.O());break;case 67:c=M(this,this.D+this.O());break;case 68:c=M(this,Ph.call(this,1)+this.O());
break;case 69:c=N(this,this.K+this.O());break;case 70:c=M(this,this.I+this.O());break;case 71:c=M(this,this.H+this.O());break;case 128:c=M(this,this.J+O(this));break;case 129:c=M(this,this.G+O(this));break;case 130:c=M(this,this.M+O(this));break;case 131:c=M(this,this.D+O(this));break;case 132:c=M(this,Ph.call(this,2)+O(this));break;case 133:c=N(this,this.K+O(this));break;case 134:c=M(this,this.I+O(this));break;case 135:c=M(this,this.H+O(this));break;case 192:c=this.J;break;case 193:c=this.G;break;
case 194:c=this.M;break;case 195:c=this.D;break;case 196:c=C(this);break;case 197:c=this.K;break;case 198:c=this.I;break;case 199:c=this.H;break;default:c=0}var d=this.W>>3&7;switch(d){case 0:b=this.J;break;case 1:b=this.G;break;case 2:b=this.M;break;case 3:b=this.D;break;case 4:b=C(this);break;case 5:b=this.K;break;case 6:b=this.I;break;case 7:b=this.H;break;default:b=0}a=a.call(this,b,c);switch(d){case 0:this.J=a;break;case 1:this.G=a;break;case 2:this.M=a;break;case 3:this.D=a;break;case 4:A(this,
a);break;case 5:this.K=a;break;case 6:this.I=a;break;case 7:this.H=a}}
function Wd(a){var b,c,d=(this.W=this.na())&199;switch(d){case 0:b=M(this,this.J);this.C=this.F;break;case 1:b=M(this,this.G);this.C=this.F;break;case 2:b=M(this,this.M);this.C=this.F;break;case 3:b=M(this,this.D);this.C=this.F;break;case 4:b=M(this,Ph.call(this,0));this.C=this.F;break;case 5:b=M(this,O(this));this.C=this.F;break;case 6:b=M(this,this.I);this.C=this.F;break;case 7:b=M(this,this.H);this.C=this.F;break;case 64:b=M(this,this.J+this.O());this.C=this.F;break;case 65:b=M(this,this.G+this.O());
this.C=this.F;break;case 66:b=M(this,this.M+this.O());this.C=this.F;break;case 67:b=M(this,this.D+this.O());this.C=this.F;break;case 68:b=M(this,Ph.call(this,1)+this.O());this.C=this.F;break;case 69:b=N(this,this.K+this.O());this.C=this.F;break;case 70:b=M(this,this.I+this.O());this.C=this.F;break;case 71:b=M(this,this.H+this.O());this.C=this.F;break;case 128:b=M(this,this.J+O(this));this.C=this.F;break;case 129:b=M(this,this.G+O(this));this.C=this.F;break;case 130:b=M(this,this.M+O(this));this.C=
this.F;break;case 131:b=M(this,this.D+O(this));this.C=this.F;break;case 132:b=M(this,Ph.call(this,2)+O(this));this.C=this.F;break;case 133:b=N(this,this.K+O(this));this.C=this.F;break;case 134:b=M(this,this.I+O(this));this.C=this.F;break;case 135:b=M(this,this.H+O(this));this.C=this.F;break;case 192:b=this.J;break;case 193:b=this.G;break;case 194:b=this.M;break;case 195:b=this.D;break;case 196:b=C(this);break;case 197:b=this.K;break;case 198:b=this.I;break;case 199:b=this.H;break;default:b=0}switch(this.W>>
3&7){case 0:c=this.J;break;case 1:c=this.G;break;case 2:c=this.M;break;case 3:c=this.D;break;case 4:c=C(this);break;case 5:c=this.K;break;case 6:c=this.I;break;case 7:c=this.H;break;default:c=0}a=a.call(this,b,c);switch(d){case 192:this.J=a;break;case 193:this.G=a;break;case 194:this.M=a;break;case 195:this.D=a;break;case 196:A(this,a);break;case 197:this.K=a;break;case 198:this.I=a;break;case 199:this.H=a;break;default:Je(this,a)}}
function Xd(a,b){var c,d=(this.W=this.na())&199;switch(d){case 0:c=M(this,this.J);this.C=this.F;break;case 1:c=M(this,this.G);this.C=this.F;break;case 2:c=M(this,this.M);this.C=this.F;break;case 3:c=M(this,this.D);this.C=this.F;break;case 4:c=M(this,Ph.call(this,0));this.C=this.F;break;case 5:c=M(this,O(this));this.C=this.F;break;case 6:c=M(this,this.I);this.C=this.F;break;case 7:c=M(this,this.H);this.C=this.F;break;case 64:c=M(this,this.J+this.O());this.C=this.F;break;case 65:c=M(this,this.G+this.O());
this.C=this.F;break;case 66:c=M(this,this.M+this.O());this.C=this.F;break;case 67:c=M(this,this.D+this.O());this.C=this.F;break;case 68:c=M(this,Ph.call(this,1)+this.O());this.C=this.F;break;case 69:c=N(this,this.K+this.O());this.C=this.F;break;case 70:c=M(this,this.I+this.O());this.C=this.F;break;case 71:c=M(this,this.H+this.O());this.C=this.F;break;case 128:c=M(this,this.J+O(this));this.C=this.F;break;case 129:c=M(this,this.G+O(this));this.C=this.F;break;case 130:c=M(this,this.M+O(this));this.C=
this.F;break;case 131:c=M(this,this.D+O(this));this.C=this.F;break;case 132:c=M(this,Ph.call(this,2)+O(this));this.C=this.F;break;case 133:c=N(this,this.K+O(this));this.C=this.F;break;case 134:c=M(this,this.I+O(this));this.C=this.F;break;case 135:c=M(this,this.H+O(this));this.C=this.F;break;case 192:c=this.J;break;case 193:c=this.G;break;case 194:c=this.M;break;case 195:c=this.D;break;case 196:c=C(this);break;case 197:c=this.K;break;case 198:c=this.I;break;case 199:c=this.H;break;default:c=0}a=a[this.W>>
3&7].call(this,c,b.call(this));switch(d){case 192:this.J=a;break;case 193:this.G=a;break;case 194:this.M=a;break;case 195:this.D=a;break;case 196:A(this,a);break;case 197:this.K=a;break;case 198:this.I=a;break;case 199:this.H=a;break;default:Je(this,a)}}
function Ph(a){var b=this.na(),c=b>>6,d,e;switch(b>>3&7){case 0:d=this.J;break;case 1:d=this.G;break;case 2:d=this.M;break;case 3:d=this.D;break;case 4:d=0;break;case 5:d=this.K;break;case 6:d=this.I;break;case 7:d=this.H}switch(b&7){case 0:e=this.J;break;case 1:e=this.G;break;case 2:e=this.M;break;case 3:e=this.D;break;case 4:e=C(this);this.va=this.rb;break;case 5:a?(e=this.K,this.va=this.rb):e=O(this);break;case 6:e=this.I;break;case 7:e=this.H}return(d<<c)+e|0}
function pd(){this.Xc[this.na()].call(this)}function sd(){D(this,C(this)&this.N);this.A-=this.B.Ac}function Zc(){this.ka=this.ra;var a=C(this)&this.N;D(this,this.J&this.N);D(this,this.G&this.N);D(this,this.M&this.N);D(this,this.D&this.N);D(this,a);D(this,this.K&this.N);D(this,this.I&this.N);D(this,this.H&this.N);this.A-=this.B.uj;this.ka=-1}
function $c(){this.ka=this.ra;this.H=this.H&~this.N|x(this);this.I=this.I&~this.N|x(this);this.K=this.K&~this.N|x(this);A(this,C(this)+this.U);this.D=this.D&~this.N|x(this);this.M=this.M&~this.N|x(this);this.G=this.G&~this.N|x(this);this.J=this.J&~this.N|x(this);this.A-=this.B.sj;this.ka=-1}function ad(){this.Z.call(this,eg)}function td(){!(this.Pa&1)||this.X&131072?v.call(this,6):this.qa.call(this,dg)}function ud(){this.L|=20;this.va=this.rb=this.Ta;this.A-=this.B.Pc}
function vd(){this.L|=20;this.va=this.rb=this.Xa;this.A-=this.B.Pc}function wd(){this.L|=1024;this.wa&1024||(this.U^=6,this.N^=-65536,Yd(this));this.A-=this.B.Pc}function xd(){this.L|=2048;this.wa&2048||(this.Qc^=6,this.sa^=-65536,Fd(this));this.A-=this.B.Pc}function bd(){D(this,this.Aa());this.A-=this.B.Ac}function cd(){this.Z.call(this,vg)}function dd(){D(this,this.O());this.A-=this.B.Ac}function ed(){this.Z.call(this,tg)}
function fd(){var a=1,b=0,c=this.sa,d=5;this.wa&192&&(a=this.G&c,b=1,this.wa&256&&(d=4));if(a--){var e=this.M&65535;De(this,e,1)&&(e=Tb(this.ia,e,1,this.Y-b-1),this.Mc(this.pa.Rb(this.H&c,1),e),this.H=this.H&~c|this.H+(this.X&1024?-1:1)&c,this.G=this.G&~c|this.G-b&c,this.A-=d,a&&(ie(this),this.L|=256))}}
function gd(){var a=1,b=0,c=this.sa,d=5;this.wa&192&&(a=this.G&c,b=1,this.wa&256&&(d=4));if(a--){var e=this.M&65535;De(this,e,this.U)&&(e=Tb(this.ia,e,this.U,this.Y-b-1),this.Xb(this.pa.Rb(this.H&c,this.U),e),this.H=this.H&~c|this.H+(this.X&1024?-this.U:this.U)&c,this.G=this.G&~c|this.G-b&c,this.A-=d,a&&(ie(this),this.L|=256))}}
function hd(){var a=1,b=0,c=this.sa,d=5;this.wa&192&&(a=this.G&c,b=1,this.wa&256&&(d=4));if(a--){var e=this.M&65535;if(De(this,e,1)){var f=this.Jb(this.xa.Qb(this.I&c,1));Vb(this.ia,e,1,f,this.Y-b-1);this.I=this.I&~c|this.I+(this.X&1024?-1:1)&c;this.G=this.G&~c|this.G-b&c;this.A-=d;a&&(ie(this),this.L|=256)}}}
function id(){var a=1,b=0,c=this.sa,d=5;this.wa&192&&(a=this.G&c,b=1,this.wa&256&&(d=4));if(a--){var e=Kc(this,this.xa,this.I&c),f=this.M&65535;De(this,f,this.U)&&(Vb(this.ia,f,this.U,e,this.Y-b-1),this.I=this.I&~c|this.I+(this.X&1024?-this.U:this.U)&c,this.G=this.G&~c|this.G-b&c,this.A-=d,a&&(ie(this),this.L|=256))}}function Qh(){var a=this.O();pe(this)?(G(this,E(this)+a),this.A-=this.B.Ma):this.A-=this.B.Na}
function Rh(){var a=this.O();pe(this)?this.A-=this.B.Na:(G(this,E(this)+a),this.A-=this.B.Ma)}function Sh(){var a=this.O();ke(this)?(G(this,E(this)+a),this.A-=this.B.Ma):this.A-=this.B.Na}function Th(){var a=this.O();ke(this)?this.A-=this.B.Na:(G(this,E(this)+a),this.A-=this.B.Ma)}function Uh(){var a=this.O();ne(this)?(G(this,E(this)+a),this.A-=this.B.Ma):this.A-=this.B.Na}function Vh(){var a=this.O();ne(this)?this.A-=this.B.Na:(G(this,E(this)+a),this.A-=this.B.Ma)}
function Wh(){var a=this.O();ke(this)||ne(this)?(G(this,E(this)+a),this.A-=this.B.Ma):this.A-=this.B.Na}function Xh(){var a=this.O();ke(this)||ne(this)?this.A-=this.B.Na:(G(this,E(this)+a),this.A-=this.B.Ma)}function Yh(){var a=this.O();oe(this)?(G(this,E(this)+a),this.A-=this.B.Ma):this.A-=this.B.Na}function Zh(){var a=this.O();oe(this)?this.A-=this.B.Na:(G(this,E(this)+a),this.A-=this.B.Ma)}function $h(){var a=this.O();le(this)?(G(this,E(this)+a),this.A-=this.B.Ma):this.A-=this.B.Na}
function ai(){var a=this.O();le(this)?this.A-=this.B.Na:(G(this,E(this)+a),this.A-=this.B.Ma)}function bi(){var a=this.O();!oe(this)!=!pe(this)?(G(this,E(this)+a),this.A-=this.B.Ma):this.A-=this.B.Na}function ci(){var a=this.O();!oe(this)==!pe(this)?(G(this,E(this)+a),this.A-=this.B.Ma):this.A-=this.B.Na}function di(){var a=this.O();ne(this)||!oe(this)!=!pe(this)?(G(this,E(this)+a),this.A-=this.B.Ma):this.A-=this.B.Na}
function ei(){var a=this.O();ne(this)||!oe(this)!=!pe(this)?this.A-=this.B.Na:(G(this,E(this)+a),this.A-=this.B.Ma)}function fi(){this.yc.call(this,gi,this.na);this.A-=-1===this.C?1:this.B.Qf}function hi(){this.L|=1;this.Gb.call(this,Hg)}function ii(){this.L|=1;this.qa.call(this,Hg)}function ji(){this.Bb.call(this,Hg)}function ki(){this.Z.call(this,Hg)}function jd(){this.yc.call(this,li,Hh)}function kd(){this.Ja.call(this,2==this.U?mi:ni,Hh)}
function oi(){var a=Ke(this),b=x(this);G(this,b);a&&A(this,C(this)+a);this.A-=this.B.zj}function pi(){var a=x(this);G(this,a);this.A-=this.B.wj}function ld(){this.ka=this.ra;var a=Ke(this),b=this.na()&31;this.A-=11;D(this,this.K);var c=C(this)&this.N;if(0<b){for(this.A-=(b<<2)+(1<b?1:0);--b;)this.K=this.K&~this.N|this.K-this.U&this.N,D(this,Kc(this,this.P,this.K&this.N));D(this,c)}this.K=this.K&~this.N|c;A(this,C(this)&~this.P.sa|C(this)-a&this.P.sa);this.ka=-1}
function md(){this.ka=this.ra;A(this,C(this)&~this.P.sa|this.K&this.P.sa);this.K=this.K&~this.N|x(this)&this.N;this.A-=5;this.ka=-1}function qi(){Mh.call(this,Ke(this));this.A-=this.B.yj}function ri(){Mh.call(this,0);this.A-=this.B.xj}function si(a){this.Uh=a;this.Z.call(this,rg)}function ti(){this.L|=36;this.A-=this.B.Pc}function nd(){rd.call(this)}function Yc(){v.call(this,6)}
function rd(){G(this,this.Dd-this.Ca.ya);eb(this,"Undefined opcode "+fa(this.Jb(this.Y),2,!0)+" at "+fa(this.Y,8,!0));rc(this)}
var Uc=[function(){this.Gb.call(this,$f)},function(){this.qa.call(this,ag)},function(){this.Bb.call(this,$f)},function(){this.Z.call(this,ag)},function(){this.J=this.J&-256|$f.call(this,this.J&255,this.na());this.A--},function(){this.J=this.J&~this.N|ag.call(this,this.J&this.N,this.Aa());this.A--},function(){Lc(this,this.pa.ja,this.U,2);this.A-=this.B.Vd},function(){this.ka=this.ra;Nc(this,x(this));this.A-=this.B.ec;this.ka=-1},function(){this.Gb.call(this,Mg)},function(){this.qa.call(this,Ng)},function(){this.Bb.call(this,
Mg)},function(){this.Z.call(this,Ng)},function(){this.J=this.J&-256|Mg.call(this,this.J&255,this.na());this.A--},function(){this.J=this.J&~this.N|Ng.call(this,this.J&this.N,this.Aa());this.A--},function(){Lc(this,this.Ca.ja,this.U,2);this.A-=this.B.Vd},function(){fe(this,x(this));this.A-=this.B.ec},function(){this.Gb.call(this,Yf)},function(){this.qa.call(this,Zf)},function(){this.Bb.call(this,Yf)},function(){this.Z.call(this,Zf)},function(){this.J=this.J&-256|Yf.call(this,this.J&255,this.na());this.A--},
function(){this.J=this.J&~this.N|Zf.call(this,this.J&this.N,this.Aa());this.A--},function(){Lc(this,this.P.ja,this.U,2);this.A-=this.B.Vd},function(){this.ka=this.ra;Gc(this,x(this));this.A-=this.B.ec;this.ka=-1},function(){this.Gb.call(this,Og)},function(){this.qa.call(this,Pg)},function(){this.Bb.call(this,Og)},function(){this.Z.call(this,Pg)},function(){this.J=this.J&-256|Og.call(this,this.J&255,this.na());this.A--},function(){this.J=this.J&~this.N|Pg.call(this,this.J&this.N,this.Aa());this.A--},
function(){Lc(this,this.xa.ja,this.U,2);this.A-=this.B.Vd},function(){this.ka=this.ra;Mc(this,x(this));this.A-=this.B.ec;this.ka=-1},function(){this.Gb.call(this,bg)},function(){this.qa.call(this,cg)},function(){this.Bb.call(this,bg)},function(){this.Z.call(this,cg)},function(){this.J=this.J&-256|bg.call(this,this.J&255,this.na());this.A--},function(){this.J=this.J&~this.N|cg.call(this,this.J&this.N,this.Aa());this.A--},function(){this.L|=20;this.va=this.rb=this.pa;this.A-=this.B.Pc},function(){var a=
this.J&255,b=me(this),c=ke(this);9<(a&15)||b?(a+=6,b=16):b=0;159<a||c?(a+=96,c=1):c=0;a&=255;this.J=this.J&-256|a;H(this,a,128);c?se(this):te(this);b?Ae(this):ye(this);this.A-=this.B.Ud},function(){this.Gb.call(this,qh)},function(){this.qa.call(this,rh)},function(){this.Bb.call(this,qh)},function(){this.Z.call(this,rh)},function(){this.J=this.J&-256|qh.call(this,this.J&255,this.na());this.A--},function(){this.J=this.J&~this.N|rh.call(this,this.J&this.N,this.Aa());this.A--},function(){this.L|=20;this.va=
this.rb=this.Ca;this.A-=this.B.Pc},function(){var a=this.J&255,b=me(this),c=ke(this);9<(a&15)||b?(a-=6,b=16):b=0;159<a||c?(a-=96,c=1):c=0;a&=255;this.J=this.J&-256|a;H(this,a,128);c?se(this):te(this);b?Ae(this):ye(this);this.A-=this.B.Ud},function(){this.Gb.call(this,yh)},function(){this.qa.call(this,zh)},function(){this.Bb.call(this,yh)},function(){this.Z.call(this,zh)},function(){this.J=this.J&-256|yh.call(this,this.J&255,this.na());this.A--},function(){this.J=this.J&~this.N|zh.call(this,this.J&
this.N,this.Aa());this.A--},function(){this.L|=20;this.va=this.rb=this.P;this.A-=this.B.Pc},function(){var a,b,c=this.J&255,d=this.J>>8&255;9<(c&15)||me(this)?(c+=6,80286<=this.ca&&255<c&&d++,d++,a=b=1):a=b=0;this.J=this.J&-65536|(d<<8|c)&65295;a?se(this):te(this);b?Ae(this):ye(this);this.A-=this.B.Ud},function(){this.Gb.call(this,pg)},function(){this.qa.call(this,qg)},function(){this.Bb.call(this,pg)},function(){this.Z.call(this,qg)},function(){pg.call(this,this.J&255,this.na());this.A--},function(){qg.call(this,
this.J&this.N,this.Aa());this.A--},function(){this.L|=20;this.va=this.rb=this.xa;this.A-=this.B.Pc},function(){var a,b,c=this.J&255,d=this.J>>8&255;9<(c&15)||me(this)?(c=c-6&15,d=d-1&255,a=b=1):a=b=0;this.J=this.J&-65536|d<<8|c;a?se(this):te(this);b?Ae(this):ye(this);this.A-=this.B.Ud},function(){this.J=Dh.call(this,this.J)},function(){this.G=Dh.call(this,this.G)},function(){this.M=Dh.call(this,this.M)},function(){this.D=Dh.call(this,this.D)},function(){A(this,Dh.call(this,C(this)))},function(){this.K=
Dh.call(this,this.K)},function(){this.I=Dh.call(this,this.I)},function(){this.H=Dh.call(this,this.H)},function(){this.J=Bh.call(this,this.J)},function(){this.G=Bh.call(this,this.G)},function(){this.M=Bh.call(this,this.M)},function(){this.D=Bh.call(this,this.D)},function(){A(this,Bh.call(this,C(this)))},function(){this.K=Bh.call(this,this.K)},function(){this.I=Bh.call(this,this.I)},function(){this.H=Bh.call(this,this.H)},function(){D(this,this.J&this.N);this.A-=this.B.Ac},function(){D(this,this.G&
this.N);this.A-=this.B.Ac},function(){D(this,this.M&this.N);this.A-=this.B.Ac},function(){D(this,this.D&this.N);this.A-=this.B.Ac},function(){D(this,C(this)-2&65535);this.A-=this.B.Ac},function(){D(this,this.K&this.N);this.A-=this.B.Ac},function(){D(this,this.I&this.N);this.A-=this.B.Ac},function(){D(this,this.H&this.N);this.A-=this.B.Ac},function(){this.J=this.J&~this.N|x(this);this.A-=this.B.ec},function(){this.G=this.G&~this.N|x(this);this.A-=this.B.ec},function(){this.M=this.M&~this.N|x(this);
this.A-=this.B.ec},function(){this.D=this.D&~this.N|x(this);this.A-=this.B.ec},function(){A(this,C(this)&~this.N|x(this));this.A-=this.B.ec},function(){this.K=this.K&~this.N|x(this);this.A-=this.B.ec},function(){this.I=this.I&~this.N|x(this);this.A-=this.B.ec},function(){this.H=this.H&~this.N|x(this);this.A-=this.B.ec},Qh,Rh,Sh,Th,Uh,Vh,Wh,Xh,Yh,Zh,$h,ai,bi,ci,di,ei,Qh,Rh,Sh,Th,Uh,Vh,Wh,Xh,Yh,Zh,$h,ai,bi,ci,di,ei,fi,function(){this.Ja.call(this,ui,this.Aa);this.A-=-1===this.C?1:this.B.Qf},fi,function(){this.Ja.call(this,
ui,this.O);this.A-=-1===this.C?1:this.B.Qf},function(){this.Gb.call(this,sh)},function(){this.qa.call(this,th)},function(){this.Bb.call(this,wh)},function(){this.Z.call(this,xh)},hi,ii,ji,ki,function(){this.L|=1;this.qa.call(this,Lg)},function(){this.L|=1;this.va=this.rb=this.dg;this.Z.call(this,Bg)},function(){var a;this.Z.call(this,Kg);switch(this.W>>3&7){case 0:a=this.J;this.J=this.oa;Nc(this,a);break;case 1:a=this.G;this.G=this.oa;fe(this,a);break;case 2:a=this.M;this.M=this.oa;Gc(this,a);break;
case 3:a=this.D;this.D=this.oa;Mc(this,a);break;case 4:a=C(this);A(this,this.oa);80386<=this.ca?this.Ta.load(a):Nc(this,a);break;case 5:a=this.K;this.K=this.oa;80386<=this.ca?this.Xa.load(a):fe(this,a);break;case 6:a=this.I;this.I=this.oa;Gc(this,a);break;case 7:a=this.H,this.H=this.oa,Mc(this,a)}},function(){this.L|=1;this.ka=this.ra;this.oa=x(this);this.Ja.call(this,vi,Jh);this.ka=-1},function(){this.A-=3},function(){var a=this.J;this.J=this.J&~this.N|this.G&this.N;this.G=this.G&~this.N|a&this.N;
this.A-=3},function(){var a=this.J;this.J=this.J&~this.N|this.M&this.N;this.M=this.M&~this.N|a&this.N;this.A-=3},function(){var a=this.J;this.J=this.J&~this.N|this.D&this.N;this.D=this.D&~this.N|a&this.N;this.A-=3},function(){var a=this.J,b=C(this);this.J=this.J&~this.N|b&this.N;A(this,b&~this.N|a&this.N);this.A-=3},function(){var a=this.J;this.J=this.J&~this.N|this.K&this.N;this.K=this.K&~this.N|a&this.N;this.A-=3},function(){var a=this.J;this.J=this.J&~this.N|this.I&this.N;this.I=this.I&~this.N|
a&this.N;this.A-=3},function(){var a=this.J;this.J=this.J&~this.N|this.H&this.N;this.H=this.H&~this.N|a&this.N;this.A-=3},function(){this.J=2==this.U?this.J&-65536|this.J<<24>>24&65535:this.J<<16>>16;this.A-=2},function(){this.M=2==this.U?this.M&-65536|(this.J&32768?65535:0):this.J&-2147483648?-1:0;this.A-=this.B.Gi},function(){Kh.call(this,this.Aa(),Ke(this));this.A-=this.B.Ji},function(){this.A-=3},function(){var a=Pc(this);a&131072&&3>this.Cb?v.call(this,13,0):(D(this,a&-196609),this.A-=this.B.Ac)},
function(){if(this.X&131072&&3>this.Cb)v.call(this,13,0);else{var a=x(this),a=a&65535|this.X&-65536;Qc(this,a);this.A-=this.B.ec}},function(){var a=this.J>>8&255;a&1?se(this):te(this);a&4?(this.resultType&=-3,this.X|=4):(this.resultType&=-3,this.X&=-5);a&16?Ae(this):ye(this);a&64?Be(this):ze(this);a&128?(this.resultType&=-17,this.X|=128):(this.resultType&=-17,this.X&=-129);this.A-=this.B.Mb},function(){this.J=this.J&-65281|(Pc(this)&213)<<8;this.A-=this.B.Mb},function(){var a=this.J&-256,b;b=O(this);
b=this.Jb(this.va.Qb(b,1));this.J=a|b;this.A-=this.B.Qg},function(){this.J=this.J&~this.N|Kc(this,this.va,O(this));this.A-=this.B.Qg},function(){var a=O(this),b=this.J;this.Mc(this.va.Rb(a,1),b);this.A-=this.B.Rg},function(){var a=O(this),b=this.J;this.Xb(this.va.Rb(a,this.U),b);this.A-=this.B.Rg},function(){var a=1,b=0,c=this.sa,d=this.B.Sg;this.wa&192&&(a=this.G&c,b=1,d=this.B.Ug,this.wa&256||(this.A-=this.B.Tg));if(a--){var e=this.Jb(this.va.Qb(this.I&c,1));this.Mc(this.pa.Rb(this.H&c,1),e);e=
this.X&1024?-1:1;this.I=this.I&~c|this.I+e&c;this.H=this.H&~c|this.H+e&c;this.A-=d;this.G=this.G&~c|this.G-b&c;a&&(ie(this),this.L|=256)}},function(){var a=1,b=0,c=this.sa,d=this.B.Sg;this.wa&192&&(a=this.G&c,b=1,d=this.B.Ug,this.wa&256||(this.A-=this.B.Tg));if(a--){var e=Kc(this,this.va,this.I&c);this.Xb(this.pa.Rb(this.H&c,this.U),e);e=this.X&1024?-this.U:this.U;this.I=this.I&~c|this.I+e&c;this.H=this.H&~c|this.H+e&c;this.A-=d;this.G=this.G&~c|this.G-b&c;a&&(ie(this),this.L|=256)}},function(){var a=
1,b=0,c=this.sa,d=this.B.Dg;this.wa&192&&(a=this.G&c,b=1,d=this.B.Fg,this.wa&256||(this.A-=this.B.Eg));if(a--){var e=Fe(this,this.va,this.I),f=Fe(this,this.pa,this.H);this.C=this.F;pg.call(this,e,f);e=this.X&1024?-1:1;this.I=this.I&~c|this.I+e&c;this.H=this.H&~c|this.H+e&c;this.G=this.G&~c|this.G-b&c;this.A-=d-this.B.yb;a&&ne(this)==(this.wa&64)&&(ie(this),this.L|=256)}},function(){var a=1,b=0,c=this.sa,d=this.B.Dg;this.wa&192&&(a=this.G&c,b=1,d=this.B.Fg,this.wa&256||(this.A-=this.B.Eg));if(a--){var e=
Ge(this,this.va,this.I&c),f=Ge(this,this.pa,this.H&c);this.C=this.F;qg.call(this,e,f);e=this.X&1024?-this.U:this.U;this.I=this.I&~c|this.I+e&c;this.H=this.H&~c|this.H+e&c;this.G=this.G&~c|this.G-b&c;this.A-=d-this.B.yb;a&&ne(this)==(this.wa&64)&&(ie(this),this.L|=256)}},function(){H(this,this.J&this.na(),128);this.A-=this.B.Ud},function(){H(this,this.J&this.Aa(),this.fb);this.A-=this.B.Ud},function(){var a=1,b=0,c=this.sa,d=this.B.dh;this.wa&192&&(a=this.G&c,b=1,d=this.B.fh,this.wa&256||(this.A-=
this.B.eh));if(a--){var e=this.J;this.Mc(this.pa.Rb(this.H&c,1),e);this.G=this.G&~c|this.G-b&c;80546<=this.nd&&80564>=this.nd&&!(this.wa&2048)!=(103!=this.Jb(this.Y))&&(c^=-65536);this.H=this.H&~c|this.H+(this.X&1024?-1:1)&c;this.A-=d;a&&(ie(this),this.L|=256)}},function(){var a=1,b=0,c=this.sa,d=this.B.dh;this.wa&192&&(a=this.G&c,b=1,d=this.B.fh,this.wa&256||(this.A-=this.B.eh));if(a--){var e=this.J;this.Xb(this.pa.Rb(this.H&c,this.U),e);this.H=this.H&~c|this.H+(this.X&1024?-this.U:this.U)&c;this.G=
this.G&~c|this.G-b&c;this.A-=d;a&&(ie(this),this.L|=256)}},function(){var a=1,b=0,c=this.sa,d=this.B.Kg;this.wa&192&&(a=this.G&c,b=1,d=this.B.Mg,this.wa&256||(this.A-=this.B.Lg));if(a--){var e=this.Jb(this.va.Qb(this.I&c,1));this.J=this.J&-256|e;this.I=this.I&~c|this.I+(this.X&1024?-1:1)&c;this.G=this.G&~c|this.G-b&c;this.A-=d;a&&(ie(this),this.L|=256)}},function(){var a=1,b=0,c=this.sa,d=this.B.Kg;this.wa&192&&(a=this.G&c,b=1,d=this.B.Mg,this.wa&256||(this.A-=this.B.Lg));if(a--){var e=Kc(this,this.va,
this.I&c);this.J=this.J&~this.N|e;this.I=this.I&~c|this.I+(this.X&1024?-this.U:this.U)&c;this.G=this.G&~c|this.G-b&c;this.A-=d;a&&(ie(this),this.L|=256)}},function(){var a=1,b=0,c=this.sa,d=this.B.Xg;this.wa&192&&(a=this.G&c,b=1,d=this.B.Zg,this.wa&256||(this.A-=this.B.Yg));if(a--){var e=this.J&255,f=Fe(this,this.pa,this.H);this.C=this.F;pg.call(this,e,f);this.H=this.H&~c|this.H+(this.X&1024?-1:1)&c;this.G=this.G&~c|this.G-b&c;this.A-=d-this.B.yb;a&&ne(this)==(this.wa&64)&&(ie(this),this.L|=256)}},
function(){var a=1,b=0,c=this.sa,d=this.B.Xg;this.wa&192&&(a=this.G&c,b=1,d=this.B.Zg,this.wa&256||(this.A-=this.B.Yg));if(a--){var e=this.J&this.N,f=Ge(this,this.pa,this.H&c);this.C=this.F;qg.call(this,e,f);this.H=this.H&~c|this.H+(this.X&1024?-this.U:this.U)&c;this.G=this.G&~c|this.G-b&c;this.A-=d-this.B.yb;a&&ne(this)==(this.wa&64)&&(ie(this),this.L|=256)}},function(){this.J=this.J&-256|this.na();this.A-=this.B.Mb},function(){this.G=this.G&-256|this.na();this.A-=this.B.Mb},function(){this.M=this.M&
-256|this.na();this.A-=this.B.Mb},function(){this.D=this.D&-256|this.na();this.A-=this.B.Mb},function(){this.J=this.J&-65281|this.na()<<8;this.A-=this.B.Mb},function(){this.G=this.G&-65281|this.na()<<8;this.A-=this.B.Mb},function(){this.M=this.M&-65281|this.na()<<8;this.A-=this.B.Mb},function(){this.D=this.D&-65281|this.na()<<8;this.A-=this.B.Mb},function(){this.J=this.J&~this.N|this.Aa();this.A-=this.B.Mb},function(){this.G=this.G&~this.N|this.Aa();this.A-=this.B.Mb},function(){this.M=this.M&~this.N|
this.Aa();this.A-=this.B.Mb},function(){this.D=this.D&~this.N|this.Aa();this.A-=this.B.Mb},function(){A(this,C(this)&~this.N|this.Aa());this.A-=this.B.Mb},function(){this.K=this.K&~this.N|this.Aa();this.A-=this.B.Mb},function(){this.I=this.I&~this.N|this.Aa();this.A-=this.B.Mb},function(){this.H=this.H&~this.N|this.Aa();this.A-=this.B.Mb},oi,pi,oi,pi,function(){this.Z.call(this,Cg)},function(){this.Z.call(this,Ag)},function(){this.L|=1;this.yc.call(this,wi,this.na)},function(){this.L|=1;this.Ja.call(this,
wi,this.Aa)},qi,ri,qi,ri,function(){if(this.X&131072&&3>this.Cb)v.call(this,13,0);else{var a=this.B.$i;this.fc=-1;Lh.call(this,3,null,a)}},function(){var a=this.na();if(this.X&131072&&3>this.Cb)v.call(this,13,0);else{var b;a:{b=this.rf[a];if(void 0!==b)for(var c=0;c<b.length;c++)if(!b[c](this.Y)){b=!1;break a}b=!0}b?(this.fc=-1,Lh.call(this,a,null,0)):this.A--}},function(){if(pe(this))if(this.X&131072&&3>this.Cb)v.call(this,13,0);else{var a=this.B.aj;this.fc=-1;Lh.call(this,4,null,a)}else this.A-=
this.B.bj},function(){if(this.X&131072&&3>this.Cb)v.call(this,13,0);else{this.ic=this.P.ja;this.ka=this.ra;this.A-=this.B.Yi;if(this.Pa&1&&this.X&16384){var a=this.ga(this.ha.ya+0);Hc(this.Ca,a,!1)}else{var a=this.za,b=x(this),c=x(this),d=x(this);if(this.X&131072)d=d&131071|this.X&-131072;else if(d&131072){var e=x(this),f=x(this),g=x(this),h=x(this),k=x(this),m=x(this);Ic(this,!0,!0);Gc(this,f);A(this,e);Nc(this,g);Mc(this,h);this.Ta.load(k);this.Xa.load(m)}null!=Rc(this,b,c,!1)&&(Qc(this,d,a),this.ag&&
ae(this,this.Y))}this.ic=this.ka=-1}},function(){this.yc.call(this,li,Fh)},function(){this.Ja.call(this,2==this.U?mi:ni,Fh)},function(){this.yc.call(this,li,Gh)},function(){this.Ja.call(this,2==this.U?mi:ni,Gh)},function(){var a=this.na();if(a){var b=this.J&255;this.J=this.J&-65536|b/a<<8|b%a;H(this,this.J,128);this.A-=this.B.Di}else Oh.call(this)},function(){var a=this.J&255,b=(this.J>>8&255)*this.na()|0,c=a+b|0;this.J=this.J&-65536|c&255;je(this,a,b,c,191);this.A-=this.B.Ci},function(){this.J=this.J&
-256|(ke(this)?255:0);this.A-=2},function(){this.J=this.J&-256|Fe(this,this.va,this.D+(this.J&255));this.A-=this.B.Bj},function(){si.call(this,216)},function(){si.call(this,217)},function(){si.call(this,218)},function(){si.call(this,219)},function(){si.call(this,220)},function(){si.call(this,221)},function(){si.call(this,222)},function(){si.call(this,223)},function(){var a=this.O(),b=this.G-1&this.sa;this.G=this.G&~this.sa|b;b&&!ne(this)?(G(this,E(this)+a),this.A-=this.B.ij):this.A-=this.B.Ng},function(){var a=
this.O(),b=this.G-1&this.sa;this.G=this.G&~this.sa|b;b&&ne(this)?(G(this,E(this)+a),this.A-=this.B.Og):this.A-=this.B.Pg},function(){var a=this.O(),b=this.G-1&this.sa;this.G=this.G&~this.sa|b;b?(G(this,E(this)+a),this.A-=this.B.hj):this.A-=this.B.Ng},function(){var a=this.O();this.G&this.sa?this.A-=this.B.Pg:(G(this,E(this)+a),this.A-=this.B.Og)},function(){var a=this.na();De(this,a,1)&&(this.J=this.J&-256|Tb(this.ia,a,1,this.Y-2)&255,this.A-=this.B.Ig)},function(){var a=this.na();De(this,a,this.U)&&
(this.J=this.J&~this.N|Tb(this.ia,a,this.U,this.Y-2)&this.N,this.A-=this.B.Ig)},function(){var a=this.na();De(this,a,1)&&(Vb(this.ia,a,1,this.J&255,this.Y-2),this.A-=this.B.Wg)},function(){var a=this.na();De(this,a,this.U)&&(Vb(this.ia,a,this.U,this.J&this.N,this.Y-2),this.A-=this.B.Wg)},function(){var a=this.Aa(),b=E(this),a=b+a;D(this,b);G(this,a);this.A-=this.B.Hi},function(){var a=this.Aa();G(this,E(this)+a);this.A-=this.B.Jg},function(){Rc(this,this.Aa(),Ke(this));this.A-=this.B.dj},function(){var a=
this.O();G(this,E(this)+a);this.A-=this.B.Jg},function(){var a=this.M&65535;De(this,a,1)&&(this.J=this.J&-256|Tb(this.ia,a,1,this.Y-1)&255,this.A-=this.B.Hg)},function(){var a=this.M&65535;De(this,a,this.U)&&(this.J=this.J&~this.N|Tb(this.ia,a,this.U,this.Y-1)&this.N,this.A-=this.B.Hg)},function(){var a=this.M&65535;De(this,a,1)&&(Vb(this.ia,a,1,this.J&255,this.Y-1),this.A-=this.B.Vg)},function(){var a=this.M&65535;De(this,a,2)&&(Vb(this.ia,a,this.U,this.J&this.N,this.Y-1),this.A-=this.B.Vg)},ti,
ti,function(){this.L|=132;this.A-=this.B.Pc},function(){this.L|=68;this.A-=this.B.Pc},function(){this.X&131072?v.call(this,13,0):(this.Ea|=4,this.A-=2,this.X&512||rc(this))},function(){ke(this)?te(this):se(this);this.A-=2},function(){this.Hb=!1;this.yc.call(this,xi,Ih);this.Hb&&(this.J=this.J&~this.N|this.ua&this.N)},function(){this.Hb=!1;this.Ja.call(this,yi,Ih);this.Hb&&(this.J=this.J&~this.N|this.ua&this.N,this.M=this.M&~this.N|this.Ga&this.N)},function(){te(this);this.A-=2},function(){se(this);
this.A-=2},function(){this.za>this.Cb?v.call(this,13,0):(this.X&=-513,this.A-=this.B.Fi)},function(){this.za>this.Cb?v.call(this,13,0):(this.X|=512,this.L|=4,this.A-=2)},function(){this.X&=-1025;this.A-=2},function(){this.X|=1024;this.A-=2},function(){this.yc.call(this,Vc,Ih)},function(){this.Ja.call(this,Wc,Ih)}],gi=[$f,Mg,Yf,Og,bg,qh,yh,pg],ui=[ag,Ng,Zf,Pg,cg,rh,zh,qg],vi=[function(a,b){this.A-=-1===this.C?this.B.ec:this.B.tj;return b},sg,sg,sg,sg,sg,sg,sg],wi=[function(a,b){this.A-=-1===this.C?
this.B.lj:this.B.jj;return b},T,T,T,T,T,T,T],li=[function(a,b){var c=a;if(b&=this.Da){var d;(b&=7)?(d=a<<b-1,c=(a<<b|a>>8-b)&255):d=a<<7;we(this,c,d,128)}return c},function(a,b){var c=a;if(b&=this.Da){var d;(b&=7)?(d=a<<8-b,c=(a>>>b|d)&255):d=a;we(this,c,d,128)}return c},function(a,b){var c=a;if(b&=this.Da){var d=xe(this);(b%=9)?(c=(a<<b|d<<b-1|a>>9-b)&255,d=a<<b-1):d<<=7;we(this,c,d,128)}return c},function(a,b){var c=a;if(b&=this.Da){var d=xe(this);(b%=9)?(c=(a>>b|d<<8-b|a<<9-b)&255,d=a<<8-b):d<<=
7;we(this,c,d,128)}return c},function(a,b){var c=a;if(b&=this.Da){var d=0;8<b?c=0:(d=a<<b-1,c=d<<1&255);H(this,c,128,d&128,(c^d)&128)}return c},function(a,b){if(b&=this.Da)b=8<b?0:a>>>b-1,a=b>>>1&255,H(this,a,128,b&1,a&128);return a},T,function(a,b){if(b&=this.Da)9<b&&(b=9),b=a<<24>>24>>b-1,a=b>>1&255,H(this,a,128,b&1);return a}],mi=[function(a,b){var c=a;if(b&=this.Da){var d;(b&=15)?(d=a<<b-1,c=(a<<b|a>>16-b)&65535):d=a<<15;we(this,c,d,32768)}return c},function(a,b){var c=a;if(b&=this.Da){var d;
(b&=15)?(d=a<<16-b,c=(a>>>b|d)&65535):d=a;we(this,c,d,32768)}return c},function(a,b){var c=a;if(b&=this.Da){var d=xe(this);(b%=17)?(c=(a<<b|d<<b-1|a>>17-b)&65535,d=a<<b-1):d<<=15;we(this,c,d,32768)}return c},function(a,b){var c=a;if(b&=this.Da){var d=xe(this);(b%=17)?(c=(a>>b|d<<16-b|a<<17-b)&65535,d=a<<16-b):d<<=15;we(this,c,d,32768)}return c},function(a,b){var c=a;if(b&=this.Da){var d=0;16<b?c=0:(d=a<<b-1,c=d<<1&65535);H(this,c,32768,d&32768,(c^d)&32768)}return c},function(a,b){if(b&=this.Da)b=
16<b?0:a>>>b-1,a=b>>>1&65535,H(this,a,32768,b&1,a&32768);return a},T,function(a,b){if(b&=this.Da)17<b&&(b=17),b=a<<16>>16>>b-1,a=b>>1&65535,H(this,a,32768,b&1);return a}],ni=[function(a,b){var c=a;if(b&=this.Da)c=a<<b|a>>>32-b,we(this,c,a<<b-1,-2147483648);return c},function(a,b){var c=a;if(b&=this.Da){var d=a<<32-b,c=a>>>b|d;we(this,c,d,-2147483648)}return c},function(a,b){var c=a;if(b&=this.Da)c=xe(this),c=a<<b|c<<b-1|a>>>32-b>>>1,we(this,c,a<<b-1,-2147483648);return c},function(a,b){var c=a;if(b&=
this.Da)c=xe(this),c=a>>>b|c<<32-b|a<<32-b<<1,we(this,c,a<<32-b,-2147483648);return c},function(a,b){var c=a;if(b&=this.Da)a<<=b-1,c=a<<1,H(this,c,-2147483648,a&-2147483648,(c^a)&-2147483648);return c},function(a,b){if(b&=this.Da)b=a>>>b-1,a=b>>>1,H(this,a,-2147483648,b&1,a&-2147483648);return a},T,function(a,b){if(b&=this.Da)b=a>>b-1,a=b>>1,H(this,a,-2147483648,b&1);return a}],xi=[function(a,b){b=this.na();H(this,a&b,128);this.A-=-1===this.F?this.B.hh:this.B.gh;this.L|=2;return a},T,function(a){this.A-=
-1===this.F?this.B.bf:this.B.af;return a^255},function(a){var b=-a|0;je(this,0,a,b,191,!0);this.A-=-1===this.F?this.B.bf:this.B.af;return b&255},function(a){this.ua=(this.J&255)*a&65535;this.ua&65280?(se(this),ue(this)):(te(this),ve(this));this.Hb=!0;this.A-=-1===this.F?this.B.pj:this.B.oj;this.L|=2;return a},function(a){var b=(this.J<<24>>24)*(a<<24>>24)|0;this.ua=b&65535;127<b||-128>b?(se(this),ue(this)):(te(this),ve(this));this.Hb=!0;this.A-=-1===this.F?this.B.Vi:this.B.Ui;this.L|=2;return a},
function(a,b){if(!a)return Oh.call(this),a;var c=(b=this.J&65535)/a;if(255<c)return Oh.call(this),a;this.ua=c&255|(b%a&255)<<8;this.Hb=!0;this.A-=-1===this.F?this.B.Ni:this.B.Mi;this.L|=2;return a},function(a,b){if(!a)return Oh.call(this),a;var c=a<<24>>24,d=(b=this.J<<16>>16)/c|0;if(d!=d<<24>>24||8086==this.ca&&-128==d)return Oh.call(this),a;this.ua=d&255|(b%c&255)<<8;this.Hb=!0;this.A-=-1===this.F?this.B.Ri:this.B.Qi;this.L|=2;return a}],yi=[function(a,b){b=this.Aa();H(this,a&b,this.fb);this.A-=
-1===this.F?this.B.hh:this.B.gh;this.L|=2;return a},T,function(a){this.A-=-1===this.F?this.B.bf:this.B.af;return a^this.N},function(a){var b=-a|0;je(this,0,a,b,this.fb|63,!0);this.A-=-1===this.F?this.B.bf:this.B.af;return b&this.N},function(a,b){2==this.U?(b=this.J&65535,b=b*a|0,this.ua=b&65535,this.Ga=b>>16&65535):(yg.call(this,a,this.J),80563==this.nd&&68657152==this.J&&129==a&&(this.Ga=0));this.Ga?(se(this),ue(this)):(te(this),ve(this));this.Hb=!0;this.A-=-1===this.F?this.B.rj:this.B.qj;this.L|=
2;return a},function(a,b){2==this.U?(b=this.J&65535,b=(b<<16>>16)*(a<<16>>16)|0,this.ua=b&65535,this.Ga=b>>16&65535,b=32767<b||-32768>b):(xg.call(this,a,this.J),b=this.Ga!=this.ua>>31);b?(se(this),ue(this)):(te(this),ve(this));this.Hb=!0;this.A-=-1===this.F?this.B.Xi:this.B.Wi;this.L|=2;return a},function(a,b){if(2==this.U){if(!a)return Oh.call(this),a;b=65536*(this.M&65535)+(this.J&65535);var c=b/a;if(65536<=c)return Oh.call(this),a;this.ua=c&65535;this.Ga=b%a&65535}else{if(!Ch.call(this,this.J,
this.M,a))return Oh.call(this),a;this.ua|=0;this.Ga|=0}this.Hb=!0;this.A-=-1===this.F?this.B.Pi:this.B.Oi;this.L|=2;return a},function(a,b){if(2==this.U){if(!a)return Oh.call(this),a;var c=a<<16>>16,d=(b=this.M<<16|this.J&65535)/c|0;if(d!=d<<16>>16||8086==this.ca&&-32768==d)return Oh.call(this),a;this.ua=d&65535;this.Ga=b%c&65535}else{b=this.J;var c=this.M,d=a,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);!Ch.call(this,b,c,d)||this.ua>2147483647+e||this.Ga>2147483647+f?b=!1:(e&&
(this.ua=-this.ua),f&&(this.Ga=-this.Ga),b=!0);if(!b)return Oh.call(this),a;this.ua|=0;this.Ga|=0}this.Hb=!0;this.A-=-1===this.F?this.B.Ti:this.B.Si;this.L|=2;return a}],Vc=[function(a){var b=a+1|0;je(this,a,1,b,190);this.A-=-1===this.F?this.B.$e:this.B.Ze;return b&255},function(a){var b=a-1|0;je(this,a,1,b,190,!0);this.A-=-1===this.F?this.B.$e:this.B.Ze;return b&255},T,T,T,T,T,T],Wc=[function(a){var b=a+1|0;je(this,a,1,b,this.fb|62);this.A-=-1===this.F?this.B.$e:this.B.Ze;return b&this.N},function(a){var b=
a-1|0;je(this,a,1,b,this.fb|62,!0);this.A-=-1===this.F?this.B.$e:this.B.Ze;return b&this.N},function(a){D(this,E(this));G(this,a);this.A-=-1===this.F?this.B.Li:this.B.Ki;this.L|=2;return a},function(a){if(-1===this.F)return T.call(this,a);this.ka=this.ra;Kh.call(this,a,this.ga(this.F+this.U));this.A-=this.B.Ii;this.L|=2;this.ka=-1;return a},function(a){G(this,a);this.A-=-1===this.F?this.B.fj:this.B.ej;this.L|=2;return a},function(a){if(-1===this.F)return T.call(this,a);Rc(this,a,this.ga(this.F+this.U));
this.A-=this.B.cj;this.L|=2;return a},function(a){var b=a;this.L&512&&(a=a-2&65535,80286>this.ca&&(b=a));D(this,b);this.A-=-1===this.F?this.B.Ac:this.B.vj;this.L|=2;return a},T];function yd(){this.Z.call(this,vh);this.A-=-1===this.F?6:13}function zd(){this.qa.call(this,uh);this.A-=-1===this.F?12:19}var qd=Array(256);qd[0]=function(){16>(this.Jb(this.Y)&56)&&(this.L|=1);this.Ja.call(this,this.Sh,Ih)};qd[1]=function(){this.Jb(this.Y)&16||(this.L|=1);this.Ja.call(this,zi,Ih)};
qd[2]=function(){!(this.Pa&1)||this.X&131072?v.call(this,6):this.Z.call(this,zg)};qd[3]=function(){!(this.Pa&1)||this.X&131072?v.call(this,6):this.Z.call(this,Fg)};
qd[5]=function(){this.za?v.call(this,13,0,0,!0):(Ce(this,this.ga(2054)),this.H=this.ga(2086),this.I=this.ga(2088),this.K=this.ga(2090),this.D=this.ga(2094),this.M=this.ga(2096),this.G=this.ga(2098),this.J=this.ga(2100),Fc(this.pa,2102,this.ga(2084)),Fc(this.Ca,2108,this.ga(2082)),Fc(this.P,2114,this.ga(2080)),Fc(this.xa,2120,this.ga(2078)),Qc(this,this.ga(2072)),G(this,this.ga(2074)),A(this,this.ga(2092)),this.ub=this.ga(2126)|this.Jb(2128)<<16,this.wc=this.ub+this.ga(2130),this.Ab=this.ga(2138)|
this.Jb(2140)<<16,this.xc=this.Ab+this.ga(2142),Fc(this.Zb,2132,this.ga(2076)),Fc(this.ha,2144,this.ga(2070)),this.A-=195)};qd[6]=function(){this.za?v.call(this,13,0):(this.Pa&=-9,this.A-=2)};qd[11]=Yc;qd[166]=Yc;qd[255]=Yc;var F=[];F[5]=Yc;
F[7]=function(){if(this.za)v.call(this,13,0,0,!0);else{var a=this.pa.Qb(this.H&this.sa,204);if(-1!==a){this.Pa=this.fa(a);Ic(this);this.Pa&-2147483648?Ab(this):Cd(this);var b=this.fa(a+168),c=(b&24576)>>13;Qc(this,this.fa(a+4),c);this.ub=this.fa(a+112);this.wc=this.ub+this.fa(a+116);this.Ab=this.fa(a+100);this.xc=this.Ab+this.fa(a+104);Ec(this.Zb,this.fa(a+56),this.fa(a+120),this.fa(a+124),this.fa(a+128));Ec(this.ha,this.fa(a+52),this.fa(a+84),this.fa(a+88),this.fa(a+92));this.H=this.fa(a+12);this.I=
this.fa(a+16);this.K=this.fa(a+20);this.D=this.fa(a+28);this.M=this.fa(a+32);this.G=this.fa(a+36);this.J=this.fa(a+40);Ec(this.Xa,this.fa(a+60),this.fa(a+132),this.fa(a+136),this.fa(a+140));Ec(this.Ta,this.fa(a+64),this.fa(a+144),this.fa(a+148),this.fa(a+152));Ec(this.xa,this.fa(a+68),this.fa(a+156),this.fa(a+160),this.fa(a+164));Ec(this.P,this.fa(a+72),b,this.fa(a+172),this.fa(a+176));Ec(this.Ca,this.fa(a+76),this.fa(a+180),this.fa(a+184),this.fa(a+188));Ec(this.pa,this.fa(a+80),this.fa(a+192),this.fa(a+
196),this.fa(a+200));G(this,this.fa(a+8));A(this,this.fa(a+24))}this.A-=122<<(a&3?1:0)}};F[16]=hi;F[17]=ii;F[18]=ji;F[19]=ki;F[32]=function(){if(this.za)v.call(this,13,0);else{var a,b=this.na();switch((b&56)>>3){case 0:a=this.Pa;break;case 2:a=this.pd;break;case 3:a=this.bd;break;default:rd.call(this);return}Ed(this,b&7,a);this.A-=6}};F[33]=function(){if(this.za)v.call(this,13,0);else{var a=this.na(),b=(a&56)>>3;4==b||5==b?rd.call(this):(Ed(this,a&7,this.qb[b]),this.A-=22)}};
F[34]=function(){if(this.za)v.call(this,13,0);else{var a=this.na(),b=Dd(this,a&7);switch((a&56)>>3){case 0:this.Pa=b;Ic(this);this.Pa&-2147483648?Ab(this):Cd(this);this.A-=10;break;case 2:this.pd=b;this.A-=4;break;case 3:Sc.call(this,b);this.A-=5;break;default:rd.call(this)}}};F[35]=function(){if(this.za)v.call(this,13,0);else{var a=this.na(),b=(a&56)>>3;4==b||5==b?rd.call(this):(a=Dd(this,a&7),a!=this.qb[b]&&(be(this,!1),this.qb[b]=a,be(this,!0)),this.A-=4>b?22:14)}};
F[36]=function(){if(this.za)v.call(this,13,0);else{var a=this.na(),b=(a&56)>>3;6>b?rd.call(this):(Ed(this,a&7,this.uf[b]),this.A-=12)}};F[38]=function(){if(this.za)v.call(this,13,0);else{var a=this.na(),b=(a&56)>>3;6>b?rd.call(this):(this.uf[b]=Dd(this,a&7),this.A-=12)}};F[128]=function(){var a=this.Aa();pe(this)?(G(this,E(this)+a),this.A-=this.B.Ma):this.A-=this.B.Na};F[129]=function(){var a=this.Aa();pe(this)?this.A-=this.B.Na:(G(this,E(this)+a),this.A-=this.B.Ma)};
F[130]=function(){var a=this.Aa();ke(this)?(G(this,E(this)+a),this.A-=this.B.Ma):this.A-=this.B.Na};F[131]=function(){var a=this.Aa();ke(this)?this.A-=this.B.Na:(G(this,E(this)+a),this.A-=this.B.Ma)};F[132]=function(){var a=this.Aa();ne(this)?(G(this,E(this)+a),this.A-=this.B.Ma):this.A-=this.B.Na};F[133]=function(){var a=this.Aa();ne(this)?this.A-=this.B.Na:(G(this,E(this)+a),this.A-=this.B.Ma)};F[134]=function(){var a=this.Aa();ke(this)||ne(this)?(G(this,E(this)+a),this.A-=this.B.Ma):this.A-=this.B.Na};
F[135]=function(){var a=this.Aa();ke(this)||ne(this)?this.A-=this.B.Na:(G(this,E(this)+a),this.A-=this.B.Ma)};F[136]=function(){var a=this.Aa();oe(this)?(G(this,E(this)+a),this.A-=this.B.Ma):this.A-=this.B.Na};F[137]=function(){var a=this.Aa();oe(this)?this.A-=this.B.Na:(G(this,E(this)+a),this.A-=this.B.Ma)};F[138]=function(){var a=this.Aa();le(this)?(G(this,E(this)+a),this.A-=this.B.Ma):this.A-=this.B.Na};F[139]=function(){var a=this.Aa();le(this)?this.A-=this.B.Na:(G(this,E(this)+a),this.A-=this.B.Ma)};
F[140]=function(){var a=this.Aa();!oe(this)!=!pe(this)?(G(this,E(this)+a),this.A-=this.B.Ma):this.A-=this.B.Na};F[141]=function(){var a=this.Aa();!oe(this)==!pe(this)?(G(this,E(this)+a),this.A-=this.B.Ma):this.A-=this.B.Na};F[142]=function(){var a=this.Aa();ne(this)||!oe(this)!=!pe(this)?(G(this,E(this)+a),this.A-=this.B.Ma):this.A-=this.B.Na};F[143]=function(){var a=this.Aa();ne(this)||!oe(this)!=!pe(this)?this.A-=this.B.Na:(G(this,E(this)+a),this.A-=this.B.Ma)};F[144]=function(){Eh.call(this,Qg)};
F[145]=function(){Eh.call(this,Qg)};F[146]=function(){Eh.call(this,Rg)};F[147]=function(){Eh.call(this,Sg)};F[148]=function(){Eh.call(this,Tg)};F[149]=function(){Eh.call(this,Ug)};F[150]=function(){Eh.call(this,Vg)};F[151]=function(){Eh.call(this,Wg)};F[152]=function(){Eh.call(this,Xg)};F[153]=function(){Eh.call(this,Yg)};F[154]=function(){Eh.call(this,Zg)};F[155]=function(){Eh.call(this,$g)};F[156]=function(){Eh.call(this,ah)};F[157]=function(){Eh.call(this,bh)};F[158]=function(){Eh.call(this,ch)};
F[159]=function(){Eh.call(this,dh)};F[160]=function(){Lc(this,this.Ta.ja,this.U,2);this.A-=this.B.Vd};F[161]=function(){this.ka=this.ra;var a=x(this);this.Ta.load(a);this.A-=this.B.ec;this.ka=-1};F[163]=function(){this.qa.call(this,lg);-1!==this.F&&(this.A-=6)};F[164]=function(){this.qa.call(this,2==this.U?eh:gh);this.A-=-1===this.F?3:7};F[165]=function(){this.qa.call(this,2==this.U?ih:jh);this.A-=-1===this.F?3:7};F[168]=function(){Lc(this,this.Xa.ja,this.U,2);this.A-=this.B.Vd};
F[169]=function(){this.ka=this.ra;var a=x(this);this.Xa.load(a);this.A-=this.B.ec;this.ka=-1};F[171]=function(){this.qa.call(this,og);-1!==this.F&&(this.A-=5)};F[172]=function(){this.qa.call(this,2==this.U?kh:mh);this.A-=-1===this.F?3:7};F[173]=function(){this.qa.call(this,2==this.U?oh:ph);this.A-=-1===this.F?3:7};F[175]=function(){this.Z.call(this,2==this.U?ug:wg)};F[178]=function(){this.Z.call(this,Gg)};F[179]=function(){this.qa.call(this,ng);-1!==this.F&&(this.A-=5)};
F[180]=function(){this.Z.call(this,Dg)};F[181]=function(){this.Z.call(this,Eg)};
F[182]=function(){this.Bb.call(this,Ig);switch(this.W>>3&7){case 0:this.J=this.J&~this.N|this.J&255;break;case 1:this.G=this.G&~this.N|this.G&255;break;case 2:this.M=this.M&~this.N|this.M&255;break;case 3:this.D=this.D&~this.N|this.D&255;break;case 4:this.Ob=this.Ob&~this.N|this.J>>8&255;this.J=this.oa;break;case 5:this.K=this.K&~this.N|this.G>>8&255;this.G=this.oa;break;case 6:this.I=this.I&~this.N|this.M>>8&255;this.M=this.oa;break;case 7:this.H=this.H&~this.N|this.D>>8&255,this.D=this.oa}this.A-=
-1===this.F?3:6};F[183]=function(){Jc(this,2);this.Z.call(this,Jg);switch(this.W>>3&7){case 0:this.J=this.J&65535;break;case 1:this.G=this.G&65535;break;case 2:this.M=this.M&65535;break;case 3:this.D=this.D&65535;break;case 4:this.Ob=this.Ob&65535;break;case 5:this.K=this.K&65535;break;case 6:this.I=this.I&65535;break;case 7:this.H=this.H&65535}this.A-=-1===this.F?3:6};F[186]=function(){this.Ja.call(this,Ai,this.na)};F[187]=function(){this.qa.call(this,mg);-1!==this.F&&(this.A-=5)};
F[188]=function(){this.Z.call(this,fg)};F[189]=function(){this.Z.call(this,gg)};
F[190]=function(){this.Bb.call(this,Ig);switch(this.W>>3&7){case 0:this.J=this.J&~this.N|(this.J&255)<<24>>24&this.N;break;case 1:this.G=this.G&~this.N|(this.G&255)<<24>>24&this.N;break;case 2:this.M=this.M&~this.N|(this.M&255)<<24>>24&this.N;break;case 3:this.D=this.D&~this.N|(this.D&255)<<24>>24&this.N;break;case 4:this.Ob=this.Ob&~this.N|this.J<<16>>24&this.N;this.J=this.oa;break;case 5:this.K=this.K&~this.N|this.G<<16>>24&this.N;this.G=this.oa;break;case 6:this.I=this.I&~this.N|this.M<<16>>24&
this.N;this.M=this.oa;break;case 7:this.H=this.H&~this.N|this.D<<16>>24&this.N,this.D=this.oa}this.A-=-1===this.F?3:6};F[191]=function(){Jc(this,2);this.Z.call(this,Jg);switch(this.W>>3&7){case 0:this.J=this.J<<16>>16;break;case 1:this.G=this.G<<16>>16;break;case 2:this.M=this.M<<16>>16;break;case 3:this.D=this.D<<16>>16;break;case 4:this.Ob=this.Ob<<16>>16;break;case 5:this.K=this.K<<16>>16;break;case 6:this.I=this.I<<16>>16;break;case 7:this.H=this.H<<16>>16}this.A-=-1===this.F?3:6};
var ce=[function(){this.A-=2+(-1===this.F?0:1);return this.Zb.ja},function(){this.A-=2+(-1===this.F?0:1);return this.ha.ja},function(a){this.L|=2;this.Zb.load(a);this.A-=17+(-1===this.F?0:2);return a},function(a){this.L|=2;-1!==this.ha.load(a)&&(this.bb(this.ha.hc+4,this.ha.lb|=512),this.ha.type|=512);this.A-=17+(-1===this.F?0:2);return a},function(a){this.L|=2;this.A-=14+(-1===this.F?0:2);if(-1!==this.Oa.load(a)&&2048!=(this.Oa.lb&2560)&&(this.Oa.nc>=this.za&&this.Oa.nc>=(a&3)||7168==(this.Oa.lb&
7168)))return Be(this),a;ze(this);return a},function(a){this.L|=2;this.A-=14+(-1===this.F?0:2);if(-1!==this.Oa.load(a)&&512==(this.Oa.lb&2560)&&this.Oa.nc>=this.za&&this.Oa.nc>=(a&3))return Be(this),a;ze(this);return a},T,T],Xc=[od,od,od,od,od,od,T,T],zi=[function(a){if(-1===this.F)v.call(this,6);else{a=this.wc-this.ub;var b=this.ub;80286==this.ca?b|=-16777216:80386<=this.ca&&2!=this.U&&(a|=b<<16);this.Va(this.F+2,b);this.A-=11}return a},function(a){if(-1===this.F)v.call(this,6);else{a=this.xc-this.Ab;
var b=this.Ab;80286==this.ca?b|=-16777216:80386<=this.ca&&2!=this.U&&(a|=b<<16);this.Va(this.F+2,b);this.A-=12}return a},function(a){-1===this.F||this.X&131072?v.call(this,6):(this.ub=this.fa(this.F+2)&(this.N|this.N<<8),a&=65535,this.wc=this.ub+a,this.L|=2,this.A-=11);return a},function(a){-1===this.F||this.X&131072?v.call(this,6):(this.Ab=this.fa(this.F+2)&(this.N|this.N<<8),a&=65535,this.xc=this.Ab+a,this.L|=2,this.A-=12);return a},function(){this.A-=2+(-1===this.F?0:1);return this.Pa},T,function(a){this.X&
131072?v.call(this,6):(Ce(this,a),this.A-=-1===this.F?3:6,this.L|=2);return a},T],Ai=[T,T,T,T,hg,kg,jg,ig];
function U(a){Ka.call(this,"ChipSet",a,U);var b=a.model;b&&!Bi[b]&&r("Unrecognized ChipSet model: "+b);this.ca=Bi[b]||Ci;this.D=[];b=Di(a[Ei]);this.D[0]=[b,b];null==b&&(this.Y=[360,360],(b=a.floppies)&&b.length&&(this.Y=b),Fi(this,Gi,this.Y.length),Fi(this,Hi,a.monitor||(this.ca<Se?"mono":"ega")));b=Di(a[Ii]);this.D[1]=[b,b];this.Ea=this.pa=1;this.ca>=Se&&(this.Ea=this.pa=2);this.Z=a.scaleTimers||!1;this.Xa=a.rtcDate;this.Oa=!1;a.sound&&(this.La=this.qa=null,window&&(this.La=window.AudioContext||
window.webkitAudioContext),this.La&&(this.qa=new this.La));this.reset(!0);t(this)}Ta(U);var Ci=5150.9,Se=5170,Bi={5150:5150,5160:5160,5170:Se,att6300:5160.101,mpc1600:5150.101,z150:5160.15,compaq:5150.102,other:Ci,deskpro386:5180},Ei="sw1",Ii="sw2",Ji={Yj:1,ONE:0,gn:64,en:128,Wm:192,lc:192,eg:6},Ki={fn:16,Sm:32,Xm:48,lc:48,eg:4},Gi=1,Hi=4,W={5150:[{},{}]};W[5150][0][Gi]={lc:192,Nc:{1:0,2:64,3:128,4:192},ed:"Number of Floppy Drives"};W[5150][0][3]={lc:2,Nc:{0:0,1:2},ed:"FPU"};
W[5150][0][Hi]={lc:48,Nc:{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"};W[5150][0][5]={lc:12,Nc:{16:0,32:4,48:8,64:12},ed:"Base Memory (16Kb Increments)"};W[5150][1][6]={lc:31,Nc:{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)"};W[5160]=[{},{}];W[5160][0][Gi]=W[5150][0][Gi];W[5160][0][3]=W[5150][0][3];W[5160][0][Hi]=W[5150][0][Hi];
W[5160][0][5]={lc:12,Nc:{64:0,128:4,192:8,256:12},ed:"Base Memory (64Kb Increments)"};W[5160][1][6]=W[5150][1][6];W[5160.101]=[{},{}];W[5160.101][0][5]={lc:143,Nc:{128:1,256:130,512:8,640:141},ed:"Base Memory (128Kb Increments)"};W[5160.101][0][3]={lc:16,Nc:{0:0,1:16},ed:"FPU"};W[5160.101][1][2]={lc:1,Nc:{0:0,1:1},ed:"Floppy Type"};W[5160.101][1][Gi]=W[5150][0][Gi];W[5160.101][1][Hi]=W[5150][0][Hi];l=U.prototype;
l.zb=function(a,b,c){switch(b){case Ei:return this.la[b]=c,Li(this,0,b),!0;case Ii:if(5150==(this.ca|0)||5160.101==this.ca)return this.la[b]=c,Li(this,1,b),!0;break;case "swdesc":return this.la[b]=c,!0}return!1};
l.pc=function(a,b,c,d){this.ia=b;this.A=c;this.Ia=d;this.ba=a;this.od=mb(a,"FPU");Fi(this,3,this.od?1:0,!0);this.C=mb(a,"Keyboard");this.Ga=c.T.Yc/1193181;Sb(b,this,Mi);Ub(b,this,Ni);this.ca<Se?5160.101!=this.ca?(Sb(b,this,Oi),Ub(b,this,Pi)):(Sb(b,this,Qi),Ub(b,this,Ri)):(Sb(b,this,Si),Ub(b,this,Ti),5180==(this.ca|0)&&(Sb(b,this,Ui),Ub(b,this,Vi)))};l.Ub=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};l.Tb=function(a){return a?this.save():!0};
l.reset=function(a){var b;Wi(this);this.G=Array(this.Ea);for(b=0;b<this.Ea;b++)Xi(this,b);this.gc=Array(this.pa);Yi(this,0,32);1<this.pa&&Yi(this,1,160);this.za=this.xa=null;this.K=Array(5180==(this.ca|0)?6:3);for(b=0;b<this.K.length;b++)Zi(this,b);this.oa=this.Ja=this.S=this.Da=null;this.ma=0;5160.101==this.ca&&(this.ka=0);if(this.ca>=Se){this.H=16;this.P=0;this.R=16;this.ua=0;this.W=160;512<=$i(this)&&(this.W|=16);3==+aj(this,Hi,void 0)&&(this.W|=64);5180==(this.ca|0)&&(this.W|=12);this.va=3;this.I=
Array(8);this.da=0;a&&(this.B=Array(64));bj(this,this.Xa);for(a=21;24>=a;a++)this.B[a]=0;for(a=14;46>a;a++)void 0===this.B[a]&&(this.B[a]=0);a=0|+aj(this,Hi,void 0)<<Ki.eg&Ki.lc;a|=+aj(this,3,void 0)?2:0;b=+aj(this,Gi,void 0);a|=b?b-1<<Ji.eg&Ji.lc|Ji.Yj:0;this.B[20]=a;this.B[16]=cj(this,0)<<4|cj(this,1);dj(this)}};
function bj(a,b){var c=b?new Date(b):new Date;"[object Date]"!==Object.prototype.toString.call(c)||isNaN(c.getTime())?(c=new Date,a.rc("CMOS date invalid ("+b+"), using "+c)):b&&a.rc("CMOS date: "+c);a.B[0]=c.getSeconds();a.B[1]=0;a.B[2]=c.getMinutes();a.B[3]=0;a.B[4]=c.getHours();a.B[5]=0;a.B[6]=c.getDay()+1;a.B[7]=c.getDate();a.B[8]=c.getMonth()+1;b=c.getFullYear();a.B[9]=b%100;b/=100;a.B[50]=b%10|b/10<<4;a.B[10]=38;a.B[11]=2;a.B[12]=0;a.B[13]=128;a.ra=a.ha=0;a.Ta=a.Fa=null}
function ej(a){var b;void 0===b&&(b=a.Fa);a.ha=wc(a.A,a.Z)+b;a.B[11]&64&&tc(a.A,b)}function dj(a){for(var b=0,c=16;46>c;c++)b+=a.B[c];a.B[47]=b&255;a.B[46]=b>>8}
l.save=function(){var a=new de(this);a.set(0,[this.D]);for(var b=[],c=0;c<this.G;c++){for(var d=this.G[c],e=d,f=[],g=0;g<e.$b.length;g++){var h=e.$b[g];f[g]=[h.Rd,h.wf,h.jc,h.gb,h.hb,h.mode,h.xf,h.Nm,h.Om]}b[c]=[d.Db,d.hg,d.hi,d.Ib,f,d.jg]}a.set(1,[b]);b=[];for(c=0;c<this.gc.length;c++)d=this.gc[c],b[c]=[d.We,d.Rc,d.kd,d.Uc,d.ac,d.Cc,d.Md,d.Ne];a.set(2,[b]);b=[];for(c=0;c<this.K.length;c++)d=this.K[c],b[c]=[d.jc,d.Ec,d.hb,d.Nd,d.kg,d.mode,d.mf,d.Wc,d.hd,d.Sc,d.oe,d.Pd,d.jd,d.Db,d.se];a.set(3,[this.xa,
b,this.za]);a.set(4,[this.Da,this.S,this.Ja,this.oa,this.ma]);this.ca>=Se&&(a.set(5,[this.H,this.P,this.R,this.ua,this.W,this.va]),a.set(6,[this.I[7],this.I,this.da,this.B,this.ra,this.ha]));return a.data()};
l.restore=function(a){var b,c;b=a[0];Array.isArray(b[0])?this.D=b[0]:(this.D[0][0]=b[0],this.D[1][0]=b[1]&15,this.D[0][1]=b[2],this.D[1][1]=b[3]&15);Wi(this);b=a[1];for(c=0;c<this.Ea;c++)Xi(this,c,1==b.length?b[0][c]:b);b=a[2];for(c=0;c<this.pa;c++)Yi(this,c,c?160:32,b[0][c]);b=a[3];this.xa=b[0];this.za=b[2];for(c=0;c<this.K.length;c++)Zi(this,c,b[1][c]);b=a[4];this.Da=b[0];this.S=b[1];this.Ja=b[2];this.oa=b[3];this.ma=b[4];if(b=a[5])this.H=b[0],this.P=b[1],this.R=b[2],this.ua=b[3],this.W=b[4],this.va=
b[5];if(b=a[6])this.I=b[1],this.I[7]=b[0],this.da=b[2],this.B=b[3],this.ra=b[4],this.ha=b[5],bj(this);return!0};l.start=function(){fj(this)};l.stop=function(){fj(this)};var gj=[0,null,null,0,Array(4),0];function Xi(a,b,c){var d=a.G[b];d||(d={$b:Array(4)});c=c&&5<=c.length?c:gj;d.Db=c[0];d.hg=c[1];d.hi=c[2];d.Ib=c[3];d.Gl=b<<2;for(var e=0;e<d.$b.length;e++)hj(d,e,c[4][e]);d.jg=c[5]||0;a.G[b]=d}var ij=[!0,[0,0],[0,0],[0,0],[0,0]];
function hj(a,b,c){var d=a.$b[b];d||(d={wf:[0,0],jc:[0,0],gb:[0,0],hb:[0,0]});c=c&&8==c.length?c:ij;d.Rd=c[0];d.wf[0]=c[1][0];d.wf[1]=c[1][1];d.jc[0]=c[2][0];d.jc[1]=c[2][1];d.gb[0]=c[3][0];d.gb[1]=c[3][1];d.hb[0]=c[4][0];d.hb[1]=c[4][1];d.mode=c[5];d.xf=c[6];d.controller=a;d.vi=b;jj(d,c[8],c[9]);a.$b[b]=d}function jj(a,b,c,d){"string"==typeof b&&(b=Xa(b));b&&(a.done=null,a.Nm=b.id,a.Om=c,a.Ef=b,a.qg=b[c],a.Sf=d)}var kj=[0,Array(4)];
function Yi(a,b,c,d){var e=a.gc[b];e||(e={Rc:[null,null,null,null]});d=d&&8==d.length?d:kj;e.port=c;e.kn=b<<3;e.We=d[0];e.Rc[0]=d[1][0];e.Rc[1]=d[1][1];e.Rc[2]=d[1][2];e.Rc[3]=d[1][3];e.kd=d[2];e.Uc=d[3];e.ac=d[4];e.Cc=d[5];e.Md=d[6];e.Ne=d[7];a.gc[b]=e}var lj=[[0,0],[0,0],[0,0],[0,0]];
function Zi(a,b,c){var d=a.K[b];d||(d={jc:[0,0],Ec:[0,0],hb:[0,0],Nd:[0,0]});c=c&&13<=c.length?c:lj;d.jc[0]=c[0][0];d.jc[1]=c[0][1];d.Ec[0]=c[1][0];d.Ec[1]=c[1][1];d.hb[0]=c[2][0];d.hb[1]=c[2][1];d.Nd[0]=c[3][0];d.Nd[1]=c[3][1];d.kg=c[4];d.mode=c[5];d.mf=c[6];d.Wc=c[7];d.hd=c[8];d.Sc=c[9];d.oe=c[10];d.Pd=c[11];d.jd=c[12];d.Db=c[13]||0;d.se=c[14]||!1;a.K[b]=d}
function Li(a,b,c){for(var d="",e=a.la[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;mj(a,b,c,!0)}function nj(a,b,c){if(b=(a=W[a.ca|0])&&a[b])for(var d in b)if(a=b[d],a.lc&1<<c)return a;return null}
function aj(a,b,c){for(var d=null,e=W[a.ca]||W[a.ca|0]||W[5150],f=0;f<e.length;f++){var g=e[f];if(g&&(g=g[b])){a=a.D[f][c?0:1]&g.lc;for(var h in g.Nc)if(g.Nc[h]==a&&(d=h,"number"==typeof+d))break;break}}return d}function cj(a,b){if(b<+aj(a,Gi,void 0)){if(!a.Y)return 1;if(b<a.Y.length)switch(a.Y[b]){case 160:case 180:case 320:case 360:return 1;case 720:return 3;case 1200:return 2;case 1440:return 4}}return 0}function $i(a,b){return+aj(a,5,b)+ +aj(a,6,b)}
function Di(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 Fi(a,b,c,d){for(var e=W[a.ca]||W[a.ca|0]||W[5150],f=0;f<e.length;f++){var g=e[f];if(g&&(g=g[b]))for(var h in g.Nc)if(h==c){a.D[f][d?0:1]&=~g.lc;a.D[f][d?0:1]|=g.Nc[h];return}}}function oj(a,b){a.setAttribute("data-value",b?"1":"0");a.style.color=b?"#ffffff":"#000000";a.style.backgroundColor=b?"#000000":"#ffffff"}function Wi(a){mj(a,0,Ei);mj(a,1,Ii);pj(a)}
function mj(a,b,c,d){if(c=a.la[c]){d=d?a.D[b][0]:a.D[b][1]=a.D[b][0];c=bb(c,"pcjs-bitCell");for(var e=0;e<c.length;e++){var f=nj(a,b,e);c[e].setAttribute("title",f&&f.ed||"Reserved");oj(c[e],d&1<<e?!1:!0);c[e].onclick=function(a,b){return function(){var c="1"!=b.getAttribute("data-value");oj(b,c);var d=b.getAttribute("id").split("-"),e=1<<+d[1]-1;switch(d[0]){case Ei:a.D[0][0]=a.D[0][0]&~e|(c?0:e);break;case Ii:a.D[1][0]=a.D[1][0]&~e|(c?0:e)}pj(a)}}(a,c[e])}}}
function pj(a){var b=a.la.swdesc;if(null!=b){var c;c=""+($i(a,!0)+"Kb");c+=", "+(+ +aj(a,3,!0)?"":"No ")+"FPU";c+=", "+{0:"Enhanced Color",1:"TV",2:"Color",3:"Monochrome"}[+aj(a,Hi,!0)]+" Monitor";c+=", "+ +aj(a,Gi,!0)+" Floppy Drives";if(null!=a.D[0][1]&&a.D[0][1]!=a.D[0][0]||null!=a.D[1][1]&&a.D[1][1]!=a.D[1][0])c+=" (Reset required)";b.textContent=c}}
function uj(a,b,c){a=a.G[b];var d=a.$b[c],e=d.gb[a.Ib];a.Ib^=1;b||c||a.Ib||(d.gb[0]++,255<d.gb[0]&&(d.gb[0]=0,d.gb[1]++,255<d.gb[1]&&(d.gb[1]=0)));return e}function vj(a,b,c,d){a=a.G[b];c=a.$b[c];c.gb[a.Ib]=c.wf[a.Ib]=d;a.Ib^=1}function wj(a,b,c){a=a.G[b];var d=a.$b[c],e=d.hb[a.Ib];a.Ib^=1;b||c||a.Ib||(d.hb[0]--,0>d.hb[0]&&(d.hb[0]=255,d.hb[1]--,0>d.hb[1]&&(d.hb[1]=255)));return e}function xj(a,b,c,d){a=a.G[b];c=a.$b[c];c.hb[a.Ib]=c.jc[a.Ib]=d;a.Ib^=1}
function yj(a,b){a=a.G[b];b=a.Db|1;a.Db&=-16;return b}function zj(a,b,c){a=a.G[b];b=c&3;a.Db=a.Db&~(16<<b)|(c&4)<<b+2;a.hi=c}function Aj(a,b,c){b=a.G[b];var d=c&3,e=b.$b[d];e.Rd=!!(c&4);e.Rd||Bj(a,b.Gl+d)}function Cj(a,b){a=a.G[b];for(b=0;b<a.$b.length;b++)hj(a,b)}function Dj(a,b,c){return a.G[b].$b[c].xf}function Ej(a,b,c,d){a.G[b].$b[c].xf=d}function Fj(a,b,c,d,e){jj(a.G[b>>2].$b[b&3],c,d,e)}function Bj(a,b,c){b=a.G[b>>2].$b[b&3];b.Ef&&b.qg&&b.Sf?(c&&(b.done=c),b.Rd||Gj(a,b,!0)):c&&c(!0)}
function Gj(a,b,c){c&&(b.count=b.hb[1]<<8|b.hb[0],b.type=b.mode&12,b.si=b.Ff=!1);for(var d=!1;0<=b.count&&(c=b.xf<<16|b.gb[1]<<8|b.gb[0],4==b.type?(d=!0,function(c){b.qg.call(b.Ef,b.Sf,-1,function(e,g){0>e&&(b.si||(b.si=!0),e=255);b.Rd||a.ia.Mc(c,e);(d=g)&&setTimeout(function(){Hj(b)||Gj(a,b)},0)})}(c)):8==b.type?(c=a.ia.Jb(c),0>b.qg.call(b.Ef,b.Sf,c)&&(b.Ff=!0)):0!=b.type&&(b.Ff=!0)),!d&&!Hj(b););}
function Hj(a){if(!a.Ff&&0<=--a.count&&(a.mode&32?(a.gb[0]--,0>a.gb[0]&&(a.gb[0]=255,a.gb[1]--,0>a.gb[1]&&(a.gb[1]=255))):(a.gb[0]++,255<a.gb[0]&&(a.gb[0]=0,a.gb[1]++,255<a.gb[1]&&(a.gb[1]=0))),!a.Rd))return!1;var b=a.controller;b.Db=b.Db&~(16<<a.vi)|1<<a.vi;a.mode&16||(a.Rd=!0,a.Ef=a.Sf=null);a.done&&(a.done(!a.Ff),a.done=null);return!0}function Ij(a,b){var c=0;a=a.gc[b];if(null!=a.Ne)switch(a.Ne&3){case 2:c=a.ac;break;case 3:c=a.Cc}return c}
function Jj(a,b,c){b=a.gc[b];if(c&16)b.kd=0,b.Rc[b.kd++]=c,b.Uc=0,b.Md=7,b.ac=b.Cc=0,b.Ne=10;else if(c&8)b.Ne=c;else{var d=c&224;if(d&32){var e=0;if(96==(d&96))e=1<<(c&7);else for(c=b.Md+1;;){c&=7;d=1<<c;if(b.Cc&d){e=d;break}if(c++==b.Md)break}b.Cc&e&&(b.Cc&=~e,Kj(a))}else 192==d&&(b.Md=c&7)}}function Lj(a,b,c){var d=a.gc[b];d.kd<d.Rc.length?(d.Rc[d.kd++]=c,2==d.kd&&d.Rc[0]&2&&d.kd++,3!=d.kd||d.Rc[0]&1||d.kd++):(d.Uc=c,d=a.A,d.L|=4,Kj(a,b||253!=c?0:6))}
function Ue(a,b,c){var d=a.gc[b>>3];b=1<<(b&7);d.ac&b||(d.ac|=b,d.We=c||0,Kj(a))}function Te(a,b){var c=a.gc[b>>3];b=1<<(b&7);c.ac&b&&(c.ac&=~b,Kj(a))}function Kj(a,b){var c,d=-1;1<a.pa&&(c=a.gc[1],d=~(c.Cc|c.Uc)&c.ac);c=a.gc[0];0<=d&&(c.ac=d?c.ac|4:c.ac&-5);d=~(c.Cc|c.Uc)&c.ac;a=a.A;a.S&&(a.Ea=d?a.Ea|1:a.Ea&-2);d&&b&&(c.We=b)}
function Le(a,b){void 0===b&&(b=0);var c=-1,d=a.gc[b];if(d.We)c=-2,d.We--;else for(var e=d.ac&((d.Cc|d.Uc)^255),f=d.Md+1;;){var f=f&7,g=1<<f;if(d.Cc&g)break;if(e&g){b||2!=f?c=d.Rc[1]+f:c=Le(a,1);0<=c&&(d.Cc|=g,d.ac&=~g);break}if(f++==d.Md)break}return c}function Mj(a,b,c){var d=b?3:0;b=a.K[d+c];b.se?(a=b.Db,b.se=!1):(b.Wc==b.hd&&Nj(a,d+c),b.oe?(a=b.Nd[b.Wc++],b.Wc==b.hd&&(b.oe=!1)):(Oj(a,d+c),a=b.hb[b.Wc++]));return a}
function Pj(a,b,c,d){var e=b?3:0,f=a.K[e+c];f.Wc==f.hd&&Nj(a,e+c);f.jc[f.Wc++]=d;f.Wc==f.hd&&(f.Pd&&0!=f.mode&&8!=f.mode||(f.oe=!1,f.hb[0]=f.Ec[0]=f.jc[0],f.hb[1]=f.Ec[1]=f.jc[1],f.jd=wc(a.A,a.Z),f.Pd=!0,f.Sc=0!=f.mode,b||c||(Te(a,0),d=Qj(a,0)*a.Ga|0,6==f.mode&&(d>>=1),tc(a.A,d))),b||2!=c||fj(a))}
function Rj(a,b,c){var d=0,e=c&192;b?(d=3,a.za=c):a.xa=c;if(192==e){if(!(c&16))for(e=0;2>=e;e++)if(c&2<<e){b=d+e;var f=a.K[b];f.se||(Oj(a,b),f.Db=f.kg|f.mode|f.mf|(f.Wc<f.hd?64:0)|(f.Sc?128:0),f.se=!0)}if(!(c&32))for(e=0;2>=e;e++)c&2<<e&&Sj(a,d+e)}else{var e=e>>6,f=c&1,g=c&14;if(c&=48){var d=d+e,h=a.K[d];h.mf=c;h.mode=g;h.kg=f;h.jc=[0,0];h.hb=[0,0];h.Nd=[0,0];h.Sc=!1;h.oe=!1;h.Pd=!1;h.se=!1;Nj(a,d);b||e||Te(a,0);b||2!=e||255!=a.gc[0].Uc||77!=a.S||(e=a.K[0],e.Ec[0]=e.jc[0],e.Ec[1]=e.jc[1],e.jd=wc(a.A,
a.Z))}else Sj(a,d+e)}}function Qj(a,b){a=a.K[b];(b=a.jc[1]<<8|a.jc[0])||(b=1==a.hd?256:65536);return b}function zc(a,b){a=a.K[b];(b=a.Ec[1]<<8|a.Ec[0])||(b=1==a.hd?256:65536);return b}function Sj(a,b){Oj(a,b);var c=a.K[b];c.Nd[0]=c.hb[0];c.Nd[1]=c.hb[1];c.oe=!0;Nj(a,b)}function Nj(a,b){a=a.K[b];a.Wc=32==a.mf?1:0;a.hd=48==a.mf?2:1}
function Oj(a,b,c){var d=a.K[b];if(d.Pd&&(2!=b||a.S&1)){var e=wc(a.A,a.Z),f=(e-d.jd)/a.Ga|0;0>f&&(d.jd=e,f=0);var g=Qj(a,b),h=zc(a,b)-f;0==d.mode?(0>=h&&(h=0),h||(d.Sc=!0,d.Pd=!1,b||Ue(a,0))):4==d.mode?(d.Sc=1!=h,0>=h&&(h=g+h,0>=h&&(h=g),d.Ec[0]=h&255,d.Ec[1]=h>>8&255,d.jd=e,!b&&d.Sc&&Ue(a,0))):6==d.mode&&(h-=f,0>=h&&(d.Sc=!d.Sc,h=g+h,0>=h&&(h=g),d.Ec[0]=h&255,d.Ec[1]=h>>8&255,d.jd=e,!b&&d.Sc&&Ue(a,0)));d.hb[0]=h&255;d.hb[1]=h>>8&255;c&&(a.jd=0)}return d}
function yc(a,b){for(var c=0;c<a.K.length;c++)Oj(a,c,b);if(a.ca>=Se){b=a.A.T.Yc;c=wc(a.A,a.Z);null==a.Fa&&(a.ra=wc(a.A,a.Z),a.Ta=1024,a.Fa=Math.floor(a.A.T.Yc/a.Ta),ej(a));c>=a.ha&&(a.B[12]|=64,a.B[11]&64&&(a.B[12]|=128,Ue(a,8)),a.ha=c+a.Fa);a.B[0]==a.B[1]&&a.B[2]==a.B[3]&&a.B[4]==a.B[5]&&(a.B[12]|=32,a.B[11]&32&&(a.B[12]|=128,Ue(a,8)));var d=c-a.ra,e=Math.floor(d/b);if(e&&!(a.B[11]&128)){for(;e--;)if(60<=++a.B[0]&&(a.B[0]=0,60<=++a.B[2]&&(a.B[2]=0,24<=++a.B[4]))){a.B[4]=0;a.B[6]=a.B[6]%7+1;var f;
f=a.B[9];var g=pa[a.B[8]-1];28==g&&(f%4||!(f%100)&&f%400||g++);f=g;++a.B[7]>f&&(a.B[7]=1,12<++a.B[8]&&(a.B[8]=1,a.B[9]=(a.B[9]+1)%100))}a.B[12]|=16;a.B[11]&16&&(a.B[12]|=128,Ue(a,8))}a.ra=c-d%b}}l=U.prototype;l.jl=function(){var a=this.Da;this.oa&16&&(this.S&128?a=this.D[0][1]:this.C&&(a=Tj(this.C)));return a};l.Am=function(a,b){this.Da=b};l.kl=function(){return this.S};l.Bm=function(a,b){Uj(this,b)};function Uj(a,b){var c=!!(b&2),d=!!(a.S&2);a.S=b;a.C&&Vj(a.C,!(b&128),!!(b&64));c!=d&&fj(a,c)}
l.ll=function(){var a=0,a=5150==(this.ca|0)?this.S&4?a|this.D[1][1]&15:a|this.D[1][1]>>4&1:this.S&8?a|this.D[0][1]>>4:a|this.D[0][1]&15;this.S&1&&Oj(this,2).Sc&&(a=this.S&2?a|32:a|16);return a};l.Cm=function(a,b){this.Ja=b};l.ml=function(){return this.oa};l.Dm=function(a,b){this.oa=b};l.vk=function(){var a=this.C?Tj(this.C):0;this.ka&=-2;return a};l.Ml=function(){};l.uk=function(){return this.S};l.Ll=function(a,b){Uj(this,b)};l.wk=function(){return this.ka};
l.xk=function(){var a=this.ua;this.H&=-258;this.C&&Wj(this.C);return a};l.Ol=function(a,b){if(this.H&8)switch(this.P){case 96:Xj(this,b);break;case 209:Yj(this,b);break;default:if(Xj(this,this.R&-17),this.C){a=this.C;var c=b,d=-1;switch(a.G||c){case 255:d=250;a.Pb=[];Zj(a,170);break;case 243:a.G&&(c=0);Zj(a,250);a.G=c;break;case 237:a.G&&(c=0),Zj(a,250),a.G=c}ak(this,d)}}this.P=b;this.H&=-9};l.yk=function(){return this.S&-209|(wc(this.A)&64?16:0)};l.Pl=function(a,b){Uj(this,b)};
l.zk=function(){var a=this.H&255;this.H&256&&(this.H|=1,this.H&=-257);return a};
l.Nl=function(a,b){this.P=b;this.H|=8;a=0;240<=this.P&&(a=this.P^15,this.P=240);switch(this.P){case 32:ak(this,this.R);break;case 173:Xj(this,this.R|16);break;case 174:Xj(this,this.R&-17);this.C&&Wj(this.C);break;case 170:this.C&&(this.C.Pb=[]);Xj(this,this.R|16);ak(this,85);Yj(this,3);break;case 171:ak(this,0);break;case 192:ak(this,this.W);break;case 208:ak(this,this.va);break;case 224:ak(this,this.R&16?0:1);break;case 240:a&1&&Ad(this.A)}};
function Xj(a,b){a.R=b;a.H=a.H&-5|b&4;a.C&&Vj(a.C,!!(b&8),!(b&16))}function ak(a,b,c){0<=b&&(a.ua=b,c?a.H|=1:(a.H&=-2,a.H|=256))}function Yj(a,b){a.va=b;wb(a.ia,!!(b&2));b&1||Ad(a.A)}function bk(a,b){a.ca<Se?(Ue(a,1,4),a.ka|=1):a.R&16||a.H&257||(ak(a,b,!0),ck(a.C),Ue(a,1,120))}l.Nk=function(){return this.da};l.cm=function(a,b){this.da=b;this.ma=b&128?0:128};
l.Ok=function(a,b){a=this.da&63;var c;if(13>=a)if(c=this.B[a],10>a){var d=!1;4!=a&&5!=a||this.B[11]&2||(12>c?c=c?c:12:c=(c-=12)?c+128:140,d=!0);this.B[11]&4||(d&&128<c&&(c-=48),c=c%10|c/10<<4)}else 10==a&&(this.B[a]^=128);else c=this.B[a];null!=b&&12==a&&(this.B[a]&=15,c&128&&Te(this,8),c&64&&this.B[11]&64&&ej(this));return c};
l.dm=function(a,b){a=this.da&63;var c=b^this.B[a],d;if(13>=a){if(d=b,10>a){var e=!1;this.B[11]&4||(d=10*(d>>4)+(d&15),e=!0);if(4==a||5==a)e&&23<d&&(d+=48),this.B[11]&2||(12>=d?d=12==d?0:d:(d-=116,d=24==d?12:d))}}else d=b;this.B[a]=d;11==a&&c&64&&b&64&&ej(this)};l.Fj=function(a,b){this.ma=b};l.nm=function(){};l.om=function(){this.od&&Oe(this.od)};
function fj(a,b){if(a.qa)try{void 0!==b?a.Oa=b:b=a.Oa&&a.A&&a.A.ea.Nb;var c=Math.round(1193181/Qj(a,2));if(20>c||2E4<c)b=!1;b?a.L?a.L.frequency.value=c:(a.L=a.qa.createOscillator(),a.L&&(a.L.type="number"==typeof a.L.type?1:"square",a.L.connect(a.qa.destination),a.L.frequency.value=c,"start"in a.L?a.L.start(0):a.L.noteOn(0))):a.L&&("stop"in a.L?a.L.stop(0):a.L.noteOff(0),a.L.disconnect(),delete a.L)}catch(d){a.Ba("AudioContext exception: "+d.message),a.qa=null}}
var Mi={0:function(){return uj(this,0,0)},1:function(){return wj(this,0,0)},2:function(){return uj(this,0,1)},3:function(){return wj(this,0,1)},4:function(){return uj(this,0,2)},5:function(){return wj(this,0,2)},6:function(){return uj(this,0,3)},7:function(){return wj(this,0,3)},8:function(){return yj(this,0)},13:function(){return this.G[0].jg},32:function(){return Ij(this,0)},33:function(){return this.gc[0].Uc},64:function(){return Mj(this,0,0)},65:function(){return Mj(this,0,1)},66:function(){return Mj(this,
0,2)},67:function(){return this.xa},129:function(){return Dj(this,0,2)},130:function(){return Dj(this,0,3)},131:function(){return Dj(this,0,1)},135:function(){return Dj(this,0,0)}},Oi={96:U.prototype.jl,97:U.prototype.kl,98:U.prototype.ll,99:U.prototype.ml},Si={96:U.prototype.xk,97:U.prototype.yk,100:U.prototype.zk,112:U.prototype.Nk,113:U.prototype.Ok,128:function(){return this.I[7]},132:function(){return this.I[0]},133:function(){return this.I[1]},134:function(){return this.I[2]},136:function(){return this.I[3]},
137:function(){return Dj(this,1,2)},138:function(){return Dj(this,1,3)},139:function(){return Dj(this,1,1)},140:function(){return this.I[4]},141:function(){return this.I[5]},142:function(){return this.I[6]},143:function(){return Dj(this,1,0)},160:function(){return Ij(this,1)},161:function(){return this.gc[1].Uc},192:function(){return uj(this,1,0)},194:function(){return wj(this,1,0)},196:function(){return uj(this,1,1)},198:function(){return wj(this,1,1)},200:function(){return uj(this,1,2)},202:function(){return wj(this,
1,2)},204:function(){return uj(this,1,3)},206:function(){return wj(this,1,3)},208:function(){return yj(this,1)},218:function(){return this.G[1].jg}},Qi={96:U.prototype.vk,97:U.prototype.uk,100:U.prototype.wk,102:function(){return this.D[0][1]},103:function(){return this.D[1][1]}},Ui={72:function(){return Mj(this,1,0)},73:function(){return Mj(this,1,1)},74:function(){return Mj(this,1,2)},75:function(){return this.za}},Ni={0:function(a,b){vj(this,0,0,b)},1:function(a,b){xj(this,0,0,b)},2:function(a,
b){vj(this,0,1,b)},3:function(a,b){xj(this,0,1,b)},4:function(a,b){vj(this,0,2,b)},5:function(a,b){xj(this,0,2,b)},6:function(a,b){vj(this,0,3,b)},7:function(a,b){xj(this,0,3,b)},8:function(a,b){this.G[0].hg=b},9:function(a,b){zj(this,0,b)},10:function(a,b){Aj(this,0,b)},11:function(a,b){this.G[0].$b[b&3].mode=b},12:function(){this.G[0].Ib=0},13:function(){Cj(this,0)},32:function(a,b){Jj(this,0,b)},33:function(a,b){Lj(this,0,b)},64:function(a,b){Pj(this,0,0,b)},65:function(a,b){Pj(this,0,1,b)},66:function(a,
b){Pj(this,0,2,b)},67:function(a,b){Rj(this,0,b)},129:function(a,b){Ej(this,0,2,b)},130:function(a,b){Ej(this,0,3,b)},131:function(a,b){Ej(this,0,1,b)},135:function(a,b){Ej(this,0,0,b)}},Pi={96:U.prototype.Am,97:U.prototype.Bm,98:U.prototype.Cm,99:U.prototype.Dm,160:U.prototype.Fj},Ti={96:U.prototype.Ol,97:U.prototype.Pl,100:U.prototype.Nl,112:U.prototype.cm,113:U.prototype.dm,128:function(a,b){this.I[7]=b},132:function(a,b){this.I[0]=b},133:function(a,b){this.I[1]=b},134:function(a,b){this.I[2]=
b},136:function(a,b){this.I[3]=b},137:function(a,b){Ej(this,1,2,b)},138:function(a,b){Ej(this,1,3,b)},139:function(a,b){Ej(this,1,1,b)},140:function(a,b){this.I[4]=b},141:function(a,b){this.I[5]=b},142:function(a,b){this.I[6]=b},143:function(a,b){Ej(this,1,0,b)},160:function(a,b){Jj(this,1,b)},161:function(a,b){Lj(this,1,b)},192:function(a,b){vj(this,1,0,b)},194:function(a,b){xj(this,1,0,b)},196:function(a,b){vj(this,1,1,b)},198:function(a,b){xj(this,1,1,b)},200:function(a,b){vj(this,1,2,b)},202:function(a,
b){xj(this,1,2,b)},204:function(a,b){vj(this,1,3,b)},206:function(a,b){xj(this,1,3,b)},208:function(a,b){this.G[1].hg=b},210:function(a,b){zj(this,1,b)},212:function(a,b){Aj(this,1,b)},214:function(a,b){this.G[1].$b[b&3].mode=b},216:function(){this.G[1].Ib=0},218:function(){Cj(this,1)},240:U.prototype.nm,241:U.prototype.om},Ri={96:U.prototype.Ml,97:U.prototype.Ll,160:U.prototype.Fj},Vi={72:function(a,b){Pj(this,1,0,b)},73:function(a,b){Pj(this,1,1,b)},74:function(a,b){Pj(this,1,2,b)},75:function(a,
b){Rj(this,1,b)}};Ga(function(){for(var a=bb(document,"pcx86","chipset"),b=0;b<a.length;b++){var c=a[b],d=Za(c),d=new U(d);ab(d,c);pj(d)}});
function dk(a){Ka.call(this,"ROM",a,dk);this.B=null;this.H=a.addr;this.D=a.size;this.G=a.alias;this.I=a.file;this.C=a.notify;this.L=null;if(this.C&&(a=this.C.indexOf("["),0<a)){try{this.L=eval(this.C.substr(a))}catch(d){}this.C=this.C.substr(0,a)}if(this.I){a=this.I;var b=ha(ga(a));"json"!=b&&"hex"!=b&&(a=ta()+"/api/v1/dump?file="+this.I+"&format=bytes&decimal=true");var c=this;sa(a,null,!0,function(a,b,f){ek(c,a,b,f)})}}Ta(dk);dk.prototype.pc=function(a,b,c,d){this.ia=b;this.A=c;this.Ia=d;fk(this)};
dk.prototype.Ub=function(){this.K&&(this.Ia&&this.Ia.A(this.id,0,this.H>>>4,0,this.H,this.D,this.K),delete this.K);return!0};dk.prototype.Tb=function(){return!0};
function ek(a,b,c,d){if(d)a.Ba("Unable to load system ROM (error "+d+": "+b+")");else{Va(a.Fe,b,c);if("["==c.charAt(0)||"{"==c.charAt(0))try{var e=eval("("+c+")"),f=e.bytes,g=e.data;if(f)a.B=f;else if(g)for(a.B=Array(4*g.length),d=c=0;c<g.length;c++)a.B[d++]=g[c]&255,a.B[d++]=g[c]>>8&255,a.B[d++]=g[c]>>16&255,a.B[d++]=g[c]>>24&255;else a.B=e;a.K=e.symbols;if(!a.B.length){r("Empty ROM: "+b);return}if(1==a.B.length){r(a.B[0]);return}}catch(h){a.Ba("ROM data error: "+h.message);return}else for(b=c.replace(/\n/gm,
" ").replace(/ +$/,"").split(" "),a.B=Array(b.length),e=0;e<b.length;e++)a.B[e]=ea(b[e],16);fk(a)}}
function fk(a){if(!db(a))if(!a.I)t(a);else if(a.B&&a.ia){a.D||(a.D=a.B.length);if(a.B.length!=a.D)eb(a,"ROM size ("+fa(a.B.length,8,!0)+") does not match specified size ("+fa(a.D,8,!0)+")");else{var b;b=a.H;if(xb(a.ia,b,a.D,Kb)){for(var c=0;c<a.B.length;c++){var d=a.ia,e=b+c;d.R[(e&d.Fa)>>>d.da].nf(e&d.B,a.B[c]&255,e)}b=!0}else b=!1;if(b){b=[];"number"==typeof a.G?b.push(a.G):null!=a.G&&a.G.length&&(b=a.G);for(c=0;c<b.length;c++){var d=a,e=b[c],f=Hb(d.ia,d.H,d.D);Gb(d.ia,e,d.D,f)}a.C&&((b=Xa(a.C,
a.id))?(c=a.B,d=a.L,5==b.Ra?gk(b,c,d||[12640,8752],8):b.Ra==hk&&gk(b,c,d||[14221,16269],8),t(b)):a.Ba("Unable to find component: "+a.C));delete a.B}}t(a)}}Ga(function(){for(var a=bb(document,"pcx86","rom"),b=0;b<a.length;b++){var c=a[b],d=Za(c),d=new dk(d);ab(d,c)}});function ik(a){Ka.call(this,"RAM",a,ik);this.C=a.addr;this.B=a.size;this.H=a.test;this.G=!!this.B;this.D=!1}Ta(ik);l=ik.prototype;l.pc=function(a,b,c,d){this.ia=b;this.A=c;this.Ia=d;this.S=mb(a,"ChipSet");t(this)};
l.Ub=function(a,b){return!b&&(this.reset(),a&&this.controller&&!this.restore(a))?!1:!0};l.Tb=function(a){return a&&this.controller?this.save():!0};
l.reset=function(){if(!this.C&&!this.G&&this.S){var a=1024*$i(this.S);this.B&&a!=this.B&&(Jb(this.ia,this.C,this.B),this.D=!1);this.B=a}!this.D&&this.B&&xb(this.ia,this.C,this.B,1)&&(this.D=!0,"ramCPQ"==this.Sd&&(this.controller=new jk(this),xb(this.ia,kk,4,4,this.controller)));if(this.D){if(this.H||Qb(this.ia,1138,4660),"ramCPQ"!=this.Sd&&this.S&&(a=this.S,a.B)){var b=1048576>this.C?21:23,c=a.B[b]|a.B[b+1]<<8,c=c+(this.B>>10);a.B[b]=c&255;a.B[b+1]=c>>8;dj(a)}}else r("No RAM allocated")};
l.save=function(){var a=new de(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 jk(a){this.G=a;this.C=lk;this.D=mk;this.B=nk;this.A=null}var kk=-2134900736,lk=65535,mk=2575,nk=2,ok=[null,0],pk=[function(a){return this.controller.Jb(a)},null,null,function(a,b){this.controller.Mc(a,b)},null,null];l=jk.prototype;l.save=function(){return[this.C,this.B]};
l.restore=function(a){this.Mc(0,a[0]&255);this.Mc(2,a[1]&255);return!0};l.Jb=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.Mc=function(a,b){if(a)2==a&&(this.B=this.B&-256|b);else if(b!=(this.C&255)){a=this.G.ia;if(b&1)this.A&&(Gb(a,917504,131072,this.A),this.A=null);else{this.A||(this.A=Hb(a,917504,131072));var c=Hb(a,16646144,131072);Gb(a,917504,131072,c,b&2?1:Kb)}this.C=this.C&-256|b}};l.ui=function(){return ok};l.rg=function(){return pk};
Ga(function(){for(var a=bb(document,"pcx86","ram"),b=0;b<a.length;b++){var c=a[b],d=Za(c),d=new ik(d);ab(d,c)}});function qk(a){Ka.call(this,"Keyboard",a,qk);rk(this,a.model);this.Y=za("Mobi");this.W=za("MSIE");this.R=0;this.P=this.og=!1;this.B=[];this.da=50;t(this)}Ta(qk);
var sk=["US83","US84","US101"],tk=n.Sj+4E3,uk={3016:1,1016:2,1017:8,1018:32,1091:128,1093:64,1224:128,1020:512,1144:1024,1145:2048},vk={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:tk,CTRL_BREAK:4008,CTRL_ALT_DEL:4046,CTRL_ALT_INS:4045,CTRL_ALT_ENTER:4013},wk={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.Zh,e:n.E,r:n.Ph,t:n.Th,y:n.ci,u:n.Vh,i:n.Ch,o:n.Kh,p:n.Mh,"[":n["["],"]":n["]"],enter:13,ctrl:1017,a:n.Jd,s:n.Rh,d:n.yh,f:n.zh,g:n.Ah,h:n.Bh,j:n.Dh,k:n.Eh,l:n.Fh,";":n[";"],quote:n["'"],"`":n["`"],shift:1016,"\\":n["\\"],z:n.vf,x:n.ai,c:n.xh,v:n.Xh,b:n.wh,n:n.Ih,m:n.Gh,",":n[","],".":n["."],"/":n["/"],"right-shift":3016,prtsc:1044,alt:1018,space:1032,"caps-lock":1020,f1:1112,f2:1113,f3:1114,f4:1115,f5:1116,f6:1117,f7:1118,f8:1119,f9:1120,f10:1121,"num-lock":1144,"scroll-lock":1145,
"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},xk={"caps-lock":512,"num-lock":1024,"scroll-lock":2048},X={1027:1};X[n["1"]]=2;X[n["!"]]=10754;X[n["2"]]=3;X[n["@"]]=10755;X[n["3"]]=4;X[n["#"]]=10756;X[n["4"]]=5;X[n.$]=10757;X[n["5"]]=6;X[n["%"]]=10758;X[n["6"]]=7;X[n["^"]]=10759;X[n["7"]]=8;X[n["&"]]=10760;X[n["8"]]=9;X[n["*"]]=10761;
X[n["9"]]=10;X[n["("]]=10762;X[n["0"]]=11;X[n[")"]]=10763;X[n["-"]]=12;X[n._]=10764;X[n["="]]=13;X[n["+"]]=10765;X[1008]=14;X[1009]=15;X[n.q]=16;X[n.Q]=10768;X[n.Rm]=17;X[n.Zh]=10769;X[n.e]=18;X[n.E]=10770;X[n.r]=19;X[n.Ph]=10771;X[n.t]=20;X[n.Th]=10772;X[n.y]=21;X[n.ci]=10773;X[n.Pm]=22;X[n.Vh]=10774;X[n.qk]=23;X[n.Ch]=10775;X[n.Kl]=24;X[n.Kh]=10776;X[n.p]=25;X[n.Mh]=10777;X[n["["]]=26;X[n["{"]]=10778;X[n["]"]]=27;X[n["}"]]=10779;X[13]=28;X[1017]=29;X[n.Ld]=30;X[n.Jd]=10782;X[n.Mm]=31;X[n.Rh]=10783;
X[n.d]=32;X[n.yh]=10784;X[n.mk]=33;X[n.zh]=10785;X[n.nk]=34;X[n.Ah]=10786;X[n.pk]=35;X[n.Bh]=10787;X[n.Bl]=36;X[n.Dh]=10788;X[n.k]=37;X[n.Eh]=10789;X[n.Cl]=38;X[n.Fh]=10790;X[n[";"]]=39;X[n[":"]]=10791;X[n["'"]]=40;X[n['"']]=10792;X[n["`"]]=41;X[n["~"]]=10793;X[1016]=42;X[n["\\"]]=43;X[n["|"]]=10795;X[n.z]=44;X[n.vf]=10796;X[n.x]=45;X[n.ai]=10797;X[n.ck]=46;X[n.xh]=10798;X[n.Qm]=47;X[n.Xh]=10799;X[n.bk]=48;X[n.wh]=10800;X[n.n]=49;X[n.Ih]=10801;X[n.Fl]=50;X[n.Gh]=10802;X[n[","]]=51;X[n["<"]]=10803;
X[n["."]]=52;X[n[">"]]=10804;X[n["/"]]=53;X[n["?"]]=10805;X[3016]=54;X[1044]=55;X[1018]=56;X[1032]=57;X[1020]=58;X[1112]=59;X[1113]=60;X[1114]=61;X[1115]=62;X[1116]=63;X[1117]=64;X[1118]=65;X[1119]=66;X[1120]=67;X[1121]=68;X[1144]=69;X[1145]=70;X[1036]=71;X[1038]=72;X[1033]=73;X[1109]=74;X[1037]=75;X[1101]=76;X[1039]=77;X[1107]=78;X[1035]=79;X[1040]=80;X[1034]=81;X[1045]=82;X[1046]=83;X[4027]=84;X[1122]=87;X[1123]=88;X[1091]=91;X[1093]=93;X[1224]=91;X[tk]=7470;X[4008]=7494;X[4046]=3677523;
X[4045]=3677522;X[4013]=3677468;l=qk.prototype;
l.zb=function(a,b,c,d){var e=this,f=a+"-"+b;if(void 0===this.la[f])switch(b){case "kbd":return c.onkeydown=function(a){return yk(e,a,!0)},c.onkeypress=function(a){a=a||window.event;a=a.which||a.keyCode;e.D="";var b=!X[a]||!!(e.bc&128);b||zk(e,a,!0);return b},c.onkeyup=function(a){return yk(e,a,!1)},!0;case "caps-lock":return this.la[f]=c,c.onclick=function(){e.ba&&xc(e.ba);zk(e,1020,!0)},!0;case "num-lock":return this.la[f]=c,c.onclick=function(){e.ba&&xc(e.ba);zk(e,1144,!0)},!0;case "scroll-lock":return this.la[f]=
c,c.onclick=function(){e.ba&&xc(e.ba);zk(e,1145,!0)},!0;default:var g=b.toUpperCase().replace(/-/g,"_");if(void 0!==vk[g]&&"button"==a)return this.la[f]=c,c.onclick=function(a,b,c){return function(){a.ba&&xc(a.ba);Ak(a,c,!0);zk(a,c,!0)}}(this,g,vk[g]),!0;if(void 0!==wk[b])return this.R++,this.la[f]=c,a=function(a,b,c){return function(){zk(a,c)}}(this,b,wk[b]),b=function(a,b,c){return function(){Bk(a,c)}}(this,b,wk[b]),"ontouchstart"in window?(c.ontouchstart=a,c.ontouchend=b):(c.onmousedown=a,c.onmouseup=
c.onmouseout=b),!0;if(d)return this.la[f]=c,c.onclick=function(){e.ba&&xc(e.ba);d&&!e.D&&(e.D=d,Ck(e,300))},!0}return!1};function Dk(a,b,c){if(a.R){for(var d in p)if(b==p[d]){b=+d;(d=da[d])&&(b=d);break}for(var e in wk)if((d=wk[e]==b)||(d=b,d>=n.Ld&&d<=n.z&&(d-=n.Ld-n.Jd),d=wk[e]==d),d){(a=a.la["key-"+e])&&void 0!==c&&(a.style.color=c?"#ffffff":"#000000",a.style.backgroundColor=c?"#000000":"#ffffff");break}}}l.pc=function(a,b,c,d){this.ba=a;this.ia=b;this.A=c;this.Ia=d;this.S=mb(a,"ChipSet")};
function rk(a,b){var c=0;a.ca=null;"string"==typeof b&&(a.ca=b.toUpperCase(),c=sk.indexOf(a.ca),0>c&&(c=0));if(b=sk[c])a.Z=parseInt(b.substr(2),10)}function Vj(a,b,c){a.K!==c&&(a.K=a.L=c)&&(a.H=!0);a.I!==b&&(a.I=b)&&!a.L&&ck(a,!0);a.I&&a.L&&(a.Pb=[],Zj(a,170),a.L=!1)}function Zj(a,b){a.S&&(a.Pb.unshift(b),a.H=!0,bk(a.S,b))}function Wj(a){var b;a.Pb.length&&a.H&&(b=a.Pb[0],a.S&&bk(a.S,b))}function Tj(a){var b=0;a.Pb.length&&(b=a.Pb[0]);return b}
function ck(a,b){0<a.Pb.length&&(a.Pb.shift(),(a.H=b)&&a.Pb.length&&a.S&&bk(a.S,a.Pb[0]))}l.Ub=function(a,b){return!b&&(this.reset(),a&&this.restore&&!this.restore(a))?!1:!0};l.Tb=function(a){return a?this.save():!0};l.reset=function(){if(!this.ca&&this.S)switch(this.S.ca){case 5150:case 5160:rk(this,sk[0]);break;default:rk(this,sk[1])}Ek(this);this.bc=this.C=0;this.Pb=[];this.H=!0;this.D=""};l.save=function(){var a=new de(this),b=[];b[0]=this.K;b[1]=this.I;a.set(0,b);return a.data()};
l.restore=function(a){return Ek(this,a[0])};function Ek(a,b){var c=0;b||(b=[]);a.K=a.H=b[c++];a.I=b[c];a.G=0;return!0}function Ck(a,b){if(0<a.D.length){var c=a.D.charCodeAt(0);10==c&&(c=13);a.D=a.D.substr(1);zk(a,c,!0)}0<a.D.length&&setTimeout(function(a){return function(){Ck(a,b)}}(a),b)}
function Ak(a,b,c,d){if(X[b]){var e=Math.floor(b/1E3)&2;if(b=uk[b]||0){!e||b&85||(b>>=1);if(b&3584){if(!1===d)return!0;d=null}null==d?d=!((c?a.C:a.bc)&b):d||b&255&&(b=255);if(c){a.C&=~b;d&&(a.C|=b);c=b;var f,g;for(g in xk)d="led-"+g,e=xk[g],c&&c!=e||!(f=a.la[d])||(f.style.backgroundColor=a.C&e?"#00ff00":"#000000")}else a.bc&=~b,d&&(a.bc|=b);return!0}}return!1}
function zk(a,b,c){if(X[b]&&a.A&&a.A.ea.Nb){uk[b]&&a.B.length&&0<a.B[0].$c&&(a.B[0].$c=0);for(var d,e=0;e<a.B.length;e++)if(d=a.B[e],d.Yd==b){if(!c||0<=d.$c){e=-1;break}0<e&&(0<a.B[0].$c&&(a.B[0].$c=0),a.B.splice(e,1));break}0>e||(e==a.B.length&&(d={},d.Yd=b,d.bc=a.bc,Dk(a,b,!0),e++),0<e&&a.B.splice(0,0,d),d.Pe=!0,d.$c=c?-1:uk[b]?0:1,Fk(a,d))}}
function Bk(a,b,c){if(!X[b]||!(c||a.A&&a.A.ea.Nb))return!1;for(var d=!1,e=0;e<a.B.length;e++){var f=a.B[e];if(f.Yd==b||f.Yd==p[b]){a.B.splice(e,1);f.Qj&&clearTimeout(f.Qj);f.Pe&&!c&&Gk(a,f.Yd,!1);Dk(a,b,!1);d=!0;break}}!a.B.length&&a.P&&(Ak(a,1020),a.P=!1);return d}function Fk(a,b){if(!a.A||!a.A.ea.Nb)Bk(a,b.Yd,!0);else if(Gk(a,b.Yd,b.Pe)&&b.$c){var c;if(0>b.$c){if(!b.Pe){Bk(a,b.Yd);return}b.Pe=!1;c=a.da}else c=1==b.$c++?500:100;b.Qj=setTimeout(function(a){return function(){Fk(a,b)}}(a),c)}}
function Hk(a,b,c){var d=b;if(b>=n.Jd&&b<=n.vf)!(a.bc&515)==c&&(d=b+(n.Ld-n.Jd));else if(b>=n.Ld&&b<=n.z)!!(a.bc&515)==c&&(d=b-(n.Ld-n.Jd));else if(!!(a.bc&3)==c){if(a=p[b])d=a}else if(a=da[b])d=a;return d}l.Tf=function(a){a||(this.bc&=-256)};
function yk(a,b,c){var d=!0,e=!1,f=!1,g=b.keyCode,h=Hk(a,g,!0);a.og&&h==n["`"]&&(g=h=27);if(X[g+1E3])if(h+=1E3,2==b.location&&(h+=2E3),Ak(a,h,!1,c)){if(20==g||144==g||145==g)a.W||(c=e=!0);if(!(c||91!=g&&93!=g))for(var k=0;k<a.B.length;k++){var m=a.B[k];m.Pe=!1;0<m.$c&&(m.$c=0)}}else 8==g&&8==(a.bc&40)&&(h=4008),d=!1;else if(X[h]&&a.bc&60&&(d=!1),d&&c||a.bc&192)f=!0;d||b.preventDefault();f||a.Y&&d||(c?zk(a,h,e):Bk(a,h)||(b=Hk(a,g,!1),b!=h&&Bk(a,b)));return d}
function Gk(a,b,c){var d=!1;Ak(a,b,!0,c);var e=X[b]||X[b+1E3];if(void 0!==e){14==e&&40==(a.bc&40)&&(e=83);var d=[],f=e&255;if(83<f&&83==a.Z)return!1;d.push(f|(c?0:128));for(b=b>=n.Jd&&b<=n.vf||b>=n.Ld&&b<=n.z;e>>>=8;){var g=0,h=e&255;224==f||225==f?d.push(f|(c?0:128)):(42==h?a.C&3||a.C&512&&b||(g=h):29==h?a.C&12||(g=h):56==h?a.C&48||(g=h):d.push(f|(c?0:128)),g&&(c?d.unshift(g):d.push(g|128)))}for(c=0;c<d.length;c++)e=a,f=d[c],e.Pb&&(20>e.Pb.length?(e.Pb.push(f),1==e.Pb.length&&e.S&&bk(e.S,f)):20==
e.Pb.length&&e.Pb.push(255));d=!0}return d}Ga(function(){for(var a=bb(document,"pcx86","keyboard"),b=0;b<a.length;b++){var c=a[b],d=Za(c),d=new qk(d);ab(d,c)}});
function Y(a,b,c,d,e){var f=this;this.ad=za("Gecko/");var g=["","moz","ms","webkit"];Ka.call(this,"Video",a,Y);this.ca=a.model;var h=Ik[this.ca]||Ik.mda;this.Ra=h[0];this.Vc=a.memory||0;this.od=a.switches;this.ka=a.mode;if(null==this.ka||null==Jk[this.ka])this.ka=h[1];this.Ob=a.charCols;this.wc=a.charRows;if(void 0===this.Ob||void 0===this.wc)this.Ob=Jk[this.ka][0],this.wc=Jk[this.ka][1];this.da=a.screenWidth;this.pa=a.screenHeight;this.bd=a.scale;this.ae=12<=Math.round(this.da/this.Ob);this.Y=b;
this.P=c;this.G=(this.ce=d)||b||null;b=a.smoothing;(c=Na.smoothing)&&(b="true"==c);if(null!=b)for(c=0;c<g.length;c++)if(d=(d=g[c])?d+"ImageSmoothingEnabled":"imageSmoothingEnabled",void 0!==this.P[d]){this.P[d]=b;break}this.pd=a.touchScreen;this.xc=Kk;this.K=null;this.$d=a.autoLock;this.cb=this.Fb=0;this.xa=[];this.oa=Array(this.Ra==hk?256:16);this.La=!1;if(this.W=e)if(this.W.me=e.requestFullscreen||e.msRequestFullscreen||e.mozRequestFullScreen||e.webkitRequestFullscreen,this.W.me){for(c=0;c<g.length;c++)if(d=
g[c]+"fullscreenchange","on"+d in document){document.addEventListener(d,function(){Lk(f,document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement?!0:!1)},!1);break}for(c=0;c<g.length;c++)if(d=g[c]+"fullscreenerror","on"+d in document){document.addEventListener(d,function(){Lk(f,null)},!1);break}}this.G&&(this.G.onfocus=function(){return f.Tf(!0)},this.G.onblur=function(){return f.Tf(!1)},this.G.Qd=this.G.requestPointerLock||this.G.mozRequestPointerLock||
this.G.webkitRequestPointerLock,this.G.Rj=this.G.exitPointerLock||this.G.mozExitPointerLock||this.G.webkitExitPointerLock,this.G.Qd&&(e=function(){f.ef(document.pointerLockElement===f.G||document.mozPointerLockElement===f.G||document.webkitPointerLockElement===f.G)},"onpointerlockchange"in document?document.addEventListener("pointerlockchange",e,!1):"onmozpointerlockchange"in document?document.addEventListener("mozpointerlockchange",e,!1):"onwebkitpointerlockchange"in document&&document.addEventListener("webkitpointerlockchange",
e,!1)));if(a=a.fontROM)"json"!=ha(a)&&(a=ta()+"/api/v1/dump?file="+a+"&format=bytes"),sa(a,null,!0,function(a,b,c){Mk(f,a,b,c)})}Ta(Y);
var hk=7,Ik={mda:[1,7],cga:[3,3],ega:[5,3],vga:[hk,3]},Nk={2:{Pf:15700,Of:208,Uf:85,Vf:96},3:{Pf:18432,Of:364,Uf:85,Vf:96},4:{Pf:21850,Of:364,Uf:85,Vf:96},7:{Pf:16700,Of:480,Uf:85,Vf:83}},Ok={6:[1,3,!0],7:[2,3,!0],8:[6,3,!0],9:[4,3,!0],10:[3,1,!0],11:[3,2,!0],0:[1,3,!1],1:[2,3,!1],2:[6,3,!1],3:[4,3,!1],4:[3,1,!1],5:[3,2,!1]},Jk=[,[40,25,1,0,3],,[80,25,1,0,3],[320,200,8,192],,[640,200,16,192],[80,25,1,0,1]];Jk[13]=[320,200,8];Jk[14]=[640,200,8];Jk[15]=[640,350,8];Jk[16]=[640,350,8];
Jk[17]=[640,480,8];Jk[18]=[640,480,8];Jk[19]=[320,200,1];Jk[20]=[320,240,4];Jk[21]=[320,400,4];Jk[0]=Jk[1];Jk[2]=Jk[3];Jk[5]=Jk[4];
var Pk=[[0,0,0,255],[127,192,127,255],[127,192,127,255],[127,255,127,255],[127,255,127,255]],Qk=[0,1,2,2,2,2,2,2,0,3,4,4,4,4,4,4],Rk=[[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]],Sk=[2,4,6],Tk=[3,5,7],Uk=[0,1,2,3,4,5,20,7,56,57,58,59,60,61,62,63],Vk=[0,255,65280,65535,16711680,16711935,16776960,
16777215,-16777216,-16776961,-16711936,-16711681,-65536,-65281,-256,-1],Wk=[0];Wk[128]=1;Wk[32768]=2;Wk[32896]=3;Wk[8388608]=4;Wk[8388736]=5;Wk[8421376]=6;Wk[8421504]=7;Wk[-2147483648]=8;Wk[-2147483520]=9;Wk[-2147450880]=10;Wk[-2147450752]=11;Wk[-2139095040]=12;Wk[-2139094912]=13;Wk[-2139062272]=14;Wk[-2139062144]=15;
function Xk(a,b,c,d){if(void 0!==b&&(!c||c.length)){this.video=a;var e=Yk[b],f=a.ma||e[5];if(!c||6>c.length)c=[!1,0,null,null,0,Array(5>b?Zk:$k)];this.Ra=b;this.cb=e[2];this.Fb=e[3];this.Vc=d||e[4];65536<=this.Vc&&720896<=this.cb&&(this.Fb=Math.min(this.Vc>>2,32768));this.cc=c[0];this.Lc=c[1];this.kf=c[2];this.aa=c[3];this.sc=c[4]&255;this.Wf=c[4]>>8&255;this.ab=c[5];this.vg=Zk;if(5<=b){this.vg=$k;(b=c[6])||(b=[!1,0,Array(20),0,3==f?0:1,0,0,Array(5),0,0,0,Array(9),0,[this.cb,this.Fb,this.Vc],Array(this.Vc>>
2),-2147478512,0,-1,0,-1,0,-1,0,0,0,0,1,255,0,0,0,Array(256)]);this.Oe=b[0];this.Wd=b[1];this.Kc=b[2];this.qh=b[3];this.lf=b[4];this.Yf=b[5];this.Ee=b[6];this.De=b[7];this.Hj=b[8];this.Ij=b[9];this.Ce=b[10];this.Gd=b[11];this.ob=b[12];d=b[13];"number"==typeof d&&(d=[this.cb,this.Fb,d]);this.cb=d[0];this.Fb=d[1];d=this.Vc>>2;if((this.sd=b[14])&&this.sd.length<d){for(var e=this.sd,g=0,h=Array(d),k=0;k<e.length-1;){for(var m=e[k++],q=e[k++];m--;)h[g]=q,g+=2;g==d&&(g=1)}this.sd=h}(d=b[15])&&(d&-2147483648?
d&=2147483647:d=al[d&65280]|al[d&255]);this.$f(d);this.lh=b[16];this.$a=b[17];this.Hc=b[18];this.tb=b[19];this.df=b[20];this.ld=b[21];this.Cd=b[22];this.wg=b[23];this.xg=b[24];this.cd=b[25];this.mh=this.ye=0;this.Ra==hk&&(this.rh=b[26],this.ph=b[27],this.dd=b[28],this.Bc=b[29],this.Xf=b[30],this.Be=b[31])}f=Nk[f]||Nk[3];this.yg=a.A.T.Yc/f.Pf|0;this.Hl=this.yg*f.Uf/100|0;this.Bg=this.yg*f.Of|0;this.Jl=this.Bg*f.Vf/100|0;this.Cg=c[7]||0}}var Zk=18,$k=25,al=[,,1024,5120];al[16]=1280;al[512]=0;
al[1024]=32;al[1536]=96;al[2560]=160;al[3584]=224;al[768]=16;al[4096]=1;al[8192]=2;al[24576]=98;al[40960]=162;al[57344]=226;var bl=[];bl[1024]=function(a){a+=this.H;return(this.controller.ob=this.V[a])>>this.controller.lh&255};bl[17408]=function(a){return(this.controller.ob=this.V[(a&-4)+this.H])>>((a&3)<<3)&255};bl[5120]=function(a){a+=this.H;var b=this.controller.ob=this.V[a&-2];return(a&1?b>>8:b)&255};
bl[1280]=function(a){a+=this.H;a=this.controller.ob=this.V[a];for(var b=this.controller.xg,c=this.controller.wg&b,d=0,e=128;e;)(a&b)==c&&(d|=e),c>>>=1,b>>>=1,e>>=1;return d};bl[0]=function(a,b){a+=this.H;b=(b|b<<8|b<<16|b<<24)&this.controller.ld|this.controller.Cd;b=b&this.controller.tb|this.controller.ob&~this.controller.tb;b=b&this.controller.$a|this.V[a]&~this.controller.$a;this.V[a]!=b&&(this.V[a]=b,this.Ha=!0)};
bl[32]=function(a,b){a+=this.H;b=b>>this.controller.Hc|b<<8-this.controller.Hc&255;b=(b|b<<8|b<<16|b<<24)&this.controller.ld|this.controller.Cd;b=b&this.controller.tb|this.controller.ob&~this.controller.tb;b=b&this.controller.$a|this.V[a]&~this.controller.$a;this.V[a]!=b&&(this.V[a]=b,this.Ha=!0)};
bl[96]=function(a,b){a+=this.H;b=b>>this.controller.Hc|b<<8-this.controller.Hc&255;b=(b|b<<8|b<<16|b<<24)&this.controller.ld|this.controller.Cd;b&=this.controller.ob;b=b&this.controller.tb|this.controller.ob&~this.controller.tb;b=b&this.controller.$a|this.V[a]&~this.controller.$a;this.V[a]!=b&&(this.V[a]=b,this.Ha=!0)};
bl[160]=function(a,b){a+=this.H;b=b>>this.controller.Hc|b<<8-this.controller.Hc&255;b=(b|b<<8|b<<16|b<<24)&this.controller.ld|this.controller.Cd;b|=this.controller.ob;b=b&this.controller.tb|this.controller.ob&~this.controller.tb;b=b&this.controller.$a|this.V[a]&~this.controller.$a;this.V[a]!=b&&(this.V[a]=b,this.Ha=!0)};
bl[224]=function(a,b){a+=this.H;b=b>>this.controller.Hc|b<<8-this.controller.Hc&255;b=(b|b<<8|b<<16|b<<24)&this.controller.ld|this.controller.Cd;b^=this.controller.ob;b=b&this.controller.tb|this.controller.ob&~this.controller.tb;b=b&this.controller.$a|this.V[a]&~this.controller.$a;this.V[a]!=b&&(this.V[a]=b,this.Ha=!0)};bl[4]=function(a,b){var c=(a&-4)+this.H;a=(a&3)<<3;b=b<<a&this.controller.$a|this.V[c]&~(255<<a&this.controller.$a);this.V[c]!=b&&(this.V[c]=b,this.Ha=!0)};
bl[16]=function(a,b){a+=this.H;var c=a&-2;b=(b|b<<8|b<<16|b<<24)&this.controller.tb|this.controller.ob&~this.controller.tb;a=this.controller.$a&(c==a?16711935:-16711936);b=b&a|this.V[c]&~a;this.V[c]!=b&&(this.V[c]=b,this.Ha=!0)};bl[1]=function(a){a+=this.H;var b=this.V[a]&~this.controller.$a|this.controller.ob&this.controller.$a;this.V[a]!=b&&(this.V[a]=b,this.Ha=!0)};
bl[17]=function(a){a+=this.H;var b=a&-2;a=this.controller.$a&(b==a?16711935:-16711936);a=this.V[b]&~a|this.controller.ob&a;this.V[b]!=a&&(this.V[b]=a,this.Ha=!0)};bl[2]=function(a,b){a+=this.H;b=Vk[b&15];b=b&this.controller.tb|this.controller.ob&~this.controller.tb;b=b&this.controller.$a|this.V[a]&~this.controller.$a;this.V[a]!=b&&(this.V[a]=b,this.Ha=!0)};
bl[98]=function(a,b){a+=this.H;b=Vk[b&15];b&=this.controller.ob;b=b&this.controller.tb|this.controller.ob&~this.controller.tb;b=b&this.controller.$a|this.V[a]&~this.controller.$a;this.V[a]!=b&&(this.V[a]=b,this.Ha=!0)};bl[162]=function(a,b){a+=this.H;b=Vk[b&15];b|=this.controller.ob;b=b&this.controller.tb|this.controller.ob&~this.controller.tb;b=b&this.controller.$a|this.V[a]&~this.controller.$a;this.V[a]!=b&&(this.V[a]=b,this.Ha=!0)};
bl[226]=function(a,b){a+=this.H;b=Vk[b&15];b^=this.controller.ob;b=b&this.controller.tb|this.controller.ob&~this.controller.tb;b=b&this.controller.$a|this.V[a]&~this.controller.$a;this.V[a]!=b&&(this.V[a]=b,this.Ha=!0)};bl[3]=function(a,b){a+=this.H;b=b>>this.controller.Hc|b<<8-this.controller.Hc&255;b=(b|b<<8|b<<16|b<<24)&this.controller.tb;b=this.controller.df&b|this.controller.ob&~b;b=b&this.controller.$a|this.V[a]&~this.controller.$a;this.V[a]!=b&&(this.V[a]=b,this.Ha=!0)};
function cl(a){var b=[];if(void 0!==a.Ra){b[0]=a.cc;b[1]=a.Lc;b[2]=a.kf;b[3]=a.aa;b[4]=a.sc|a.Wf<<8;b[5]=a.ab;if(5<=a.Ra){var c=[];c[0]=a.Oe;c[1]=a.Wd;c[2]=a.Kc;c[3]=a.qh;c[4]=a.lf;c[5]=a.Yf;c[6]=a.Ee;c[7]=a.De;c[8]=a.Hj;c[9]=a.Ij;c[10]=a.Ce;c[11]=a.Gd;c[12]=a.ob;c[13]=[a.cb,a.Fb,a.Vc];var d;if(d=a.sd){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.ug|-2147483648;
c[16]=a.lh;c[17]=a.$a;c[18]=a.Hc;c[19]=a.tb;c[20]=a.df;c[21]=a.ld;c[22]=a.Cd;c[23]=a.wg;c[24]=a.xg;c[25]=a.cd;a.Ra==hk&&(c[26]=a.rh,c[27]=a.ph,c[28]=a.dd,c[29]=a.Bc,c[30]=a.Xf,c[31]=a.Be);b[6]=c}b[7]=a.Cg}return b}Xk.prototype.ui=function(a){return[this.sd,a-this.cb]};Xk.prototype.rg=function(){return this.A};
Xk.prototype.$f=function(a){if(null!=a&&a!=this.ug){var b=a&65280,c=bl[b];c||b&4096&&(c=bl[4096]);var b=a&255,d=bl[b];d||b&16&&(d=bl[16]);this.A||(this.A=Array(6));this.A[0]=c;this.A[1]=d;this.ug=a}};
function dl(a,b){var c=a.ab[b];if(null!=c&&5<=a.Ra){var d=0,e=0,f=0;switch(b){case 6:d=1;a.Ra==hk&&(e=32);break;case 10:5==a.Ra&&(d=32);break;case 16:d=4;a.Ra==hk&&(e=128);break;case 18:d=2;a.Ra==hk&&(e=64);break;case 21:d=8;a.Ra==hk&&(f=32);break;case 24:d=16,a.Ra==hk&&(f=64)}d&&(c|=a.ab[7]&d?256:0,c|=a.ab[7]&e?512:0,c|=a.ab[9]&f?512:0)}return c}var Yk=[,["MDA",948,720896,4096,0,3],,["CGA",980,753664,16384,0,2],,["EGA",980,753664,16384,65536,4]];Yk[hk]=["VGA",980,753664,16384,262144,7];var Kk=0;
l=Y.prototype;
l.pc=function(a,b,c,d){this.ia=b;this.A=c;this.Ia=d;c=(c=Ik[this.ca])&&c[0];3!==c&&(Sb(b,this,el),Ub(b,this,fl));1!==c&&(Sb(b,this,gl),Ub(b,this,hl));5<=this.Ra&&(Sb(b,this,il),Ub(b,this,jl));this.Ra==hk&&(Sb(b,this,kl),Ub(b,this,ll));if((this.C=mb(a,"Keyboard"))&&this.Y){for(var e in this.la)0<e.indexOf("lock")&&this.C.zb("led",e,this.la[e]);this.C.zb(this.ce?"textarea":"canvas","kbd",this.G)}this.Bb=9;(this.S=mb(a,"ChipSet"))&&this.od&&5==this.Ra&&(this.Bb=Di(this.od,this.Bb));"mouse"==this.pd?
(this.K=mb(a,"Mouse"))&&ml(this,2):"keygrid"==this.pd&&this.C&&ml(this,1)};l.zb=function(a,b,c){var d=this;if(!this.la[b])switch(this.la[b]=c,b){case "fullScreen":return this.W&&this.W.me?c.onclick=function(){d.me()}:c.parentNode.removeChild(c),!0;case "lockPointer":return this.Kd=c.textContent,this.G&&this.G.Qd?c.onclick=function(){d.Qd(!0)}:c.parentNode.removeChild(c),!0;case "refresh":return c.onclick=function(){nl(d,!0)},!0}return!1};
l.me=function(){var a=!1;if(this.W){if(this.W.me){a="100%";if(screen&&screen.width&&screen.height){var b=screen.width/screen.height,c=this.da/this.pa;b>c&&(a=Math.round(c/b*100)+"%")}this.ad?(this.Y.style.width=a,this.Y.style.width=a,this.Y.style.display="block",this.Y.style.margin="auto"):(this.W.style.width=a,this.W.style.height="auto");this.W.style.backgroundColor="black";this.W.me();a=!0}this.G&&this.G.focus()}return a};
function Lk(a,b){!b&&a.W&&(a.ad?a.Y.style.width=a.Y.style.height="":a.W.style.width=a.W.style.height="");a.C&&(a.C.og=b)}l.Qd=function(a){var b=!1;this.G&&(a?this.G.Qd&&(this.G.Qd(),this.K&&this.K.ef(!0),b=!0):this.G.Rj&&(this.G.Rj(),this.K&&this.K.ef(!1),b=!0),this.G&&this.G.focus());return b};l.ef=function(a){this.K&&(this.K.ef(a),this.C&&(this.C.og=a));var b=this.la.lockPointer;b&&(b.textContent=a?"Press Esc to Unlock Pointer":this.Kd)};
function ml(a,b){var c=a.G;c&&!a.xc&&(c.addEventListener("touchstart",function(b){ol(a,b,!0)},!1),c.addEventListener("touchmove",function(b){ol(a,b)},!0),c.addEventListener("touchend",function(b){ol(a,b,!1)},!1),a.xc=b,a.rb=a.ub=a.qd=-1,a.vc=!1,a.Gb=null,a.oc=!1,a.be=function(){a.oc=!0;a.K.le(pl,!0)})}l.Tf=function(a){this.C&&this.C.Tf(a)};
function ol(a,b,c){var d,e,f=0,g=0;e=a.Y;do isNaN(e.offsetLeft)||(f+=e.offsetLeft,g+=e.offsetTop);while(e=e.offsetParent);var h=a.da/a.Y.offsetWidth,k=a.pa/a.Y.offsetHeight;b.targetTouches&&b.targetTouches.length?(d=b.targetTouches[0].pageX,e=b.targetTouches[0].pageY):(d=b.pageX,e=b.pageY);d=(d-f)*h;e=(e-g)*k;if(1==a.xc)d=d/(a.da/3)|0,e=e/(a.pa/3)|0,1!=e?e?zk(a.C,1040,!0):zk(a.C,1038,!0):1!=d&&(d?zk(a.C,1039,!0):zk(a.C,1037,!0));else if(a.K){g=a.vc;f=b.timeStamp-a.qd;!0===c?(a.vc=500<f,a.qd=b.timeStamp,
a.Gb=setTimeout(a.be,500)):null!=a.Gb&&(clearTimeout(a.Gb),a.Gb=null);void 0===c&&(a.vc=!1);g||b.preventDefault();if(!1===c){a.oc?(a.K.le(pl,!1),a.oc=!1,b=!0):b=!1;if(b)return;if(200>f){a.K.le(pl,!0);a.K.le(pl,!1);return}}if(c||0>a.rb||0>a.ub)a.rb=d,a.ub=e;c=Math.round(d-a.rb);b=Math.round(e-a.ub);a.rb=d;a.ub=e;a.K.tg(c,b,a.rb,a.ub)}}l.Ub=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.Tb=function(a){return a?this.save():!0};
l.reset=function(){var a=!0,b=0;this.S&&(b=+aj(this.S,Hi,void 0));this.ca||(this.Ra=3==b?1:3);this.ka=3;switch(this.Ra){case hk:b=7;break;case 5:var c=Ok[this.Bb];c&&(b=c[0]);b||(b=4);break;case 1:b=3;this.ka=7;break;default:b=2}this.ma!==b&&(this.ma=b,a=!0);this.D=null;this.Z=this.Zb=new Xk(this,1);this.R=this.Cb=new Xk(this,3);5>this.Ra?this.B=new Xk:(this.B=new Xk(this,this.Ra,null,this.Vc),ql(this));rl(this);this.va=null;this.Ea=this.ha=-1;this.za=0;sl(this,this.ka);if(this.D.cb&&a){a=this.D.cb+
this.fb;for(b=this.D.cb;b<a;b+=2){var d=65536*Math.random()|0;4==this.ma||7==this.ma?(c=b>>1&255,d=d>>8&-129,d>>4==(d&15)&&(d^=15)):(c=d&255,d=(d&256?7:112)|8&d>>8);Qb(this.ia,b,c|d<<8)}nl(this,!0)}};function ql(a){a.B.lf&1?(a.Z=a.Zb,a.R=a.B):(a.Z=a.B,a.R=a.Cb)}l.save=function(){var a=new de(this);a.set(0,cl(this.Zb));a.set(1,cl(this.Cb));a.set(2,[this.ma,this.ka,this.va]);a.set(3,cl(this.B));return a.data()};
l.restore=function(a){var b=a[2];this.ma=b[0];this.ka=b[1];this.va=b[2];this.D=null;this.Z=this.Zb=new Xk(this,1,a[0]);this.R=this.Cb=new Xk(this,3,a[1]);this.B=new Xk(this,this.Ra,a[3],this.Vc);this.B.cc&&ql(this);rl(this);if(!tl(this))return!1;ul(this);return!0};
function Mk(a,b,c,d){if(d)a.Ba("Unable to load font ROM (error "+d+": "+b+")");else{Va(a.Fe,b,c);try{var e=eval("("+c+")"),f=e.bytes||e;if(!f.length){r("Empty font ROM: "+b);return}if(1==f.length){r(f[0]);return}if(8192==f.length)gk(a,f,[6144,0]);else if(2048==f.length)gk(a,f,[0]);else{a.Ba("Unrecognized font data length ("+f.length+")");return}}catch(g){a.Ba("Font ROM data error: "+g.message);return}(a.P||a.Ia)&&t(a)}}
function vl(a,b){if(1==b)return a.oa[0]=Rk[0],a.oa[1]=Rk[7],a.oa;if(2==b){var c=a.D.kf;if(a.D===a.B){var d=a.B.Kc[0],c=d&7;d&16&&(c|=8);18!=a.B.Kc[1]&&(c|=32)}a.oa[0]=Rk[c&15];c=c&32?Tk:Sk;for(d=0;d<c.length;d++)a.oa[d+1]=Rk[c[d]];return a.oa}if(a.R===a.Cb)return Rk;a.La&&b&&!a.oa[16]&&(a.La=!1);if(!a.La){var c=a.B,d=c.Be,e,f,g,h;if(8==b)for(e=0;256>e;e++)f=d[e]||0,g=f<<2&252,h=f>>4&252,f=f>>10&252,a.oa[e]=[g,h,f,255];else{var k=d&&d[255];b=null!=c.Kc[15]?c.Kc:Uk;for(e=0;16>e;e++)f=b[e]&63,k?(f|=
(c.Kc[20]&12)<<4,c.Kc[16]&128&&(f&=-49,f|=(c.Kc[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.oa[e]=[g,h,f,255]}a.La=!0}return a.oa}function gk(a,b,c,d){a.Ab=b;a.Xa=c;a.Ja=d}
function rl(a,b){var c=!1;if(window&&a.Ab&&(!b||a.I)){b=0;var d=a.Ja?a.Ja:8,e=vl(a);null!=a.Xa[0]&&wl(a,3,a.Xa[0],b,d,8,a.Ab,e)&&(c=!0);b=a.Ja?0:2048;d=a.Ja?a.Ja:9;null!=a.Xa[1]&&(wl(a,1,a.Xa[1],b,d,14,a.Ab,Pk,Qk)&&(c=!0),a.Ja&&wl(a,a.Ra,a.Xa[1],0,a.Ja,14,a.Ab,e)&&(c=!0))}return c}function wl(a,b,c,d,e,f,g,h,k){var m=!1;null!=c&&(xl(a,b,c,d,e,f,g,h,k)&&(m=!0),a.ae&&xl(a,b<<1,c,d,e,f,g,h,k)&&(m=!0));return m}
function xl(a,b,c,d,e,f,g,h,k){var m=!1,q=b&1?0:1,y=a.xa[b],w=16>h.length?h.length:16;y||(y={tc:e<<q,uc:f<<q,de:Array(w),di:h.slice(0,w),Je:k,gg:Array(w)});for(k=0;k<w;k++){var z=h[k],B=y.de[k]?y.di[k]:[];if(z[0]!==B[0]||z[1]!==B[1]||z[2]!==B[2]){var m=y,B=k,Q=q,V=c,aa=d,Sa=e,nb=f,Df=g,bn=[0,0,0,0],qe=document.createElement("canvas");qe.width=m.tc<<4;qe.height=m.uc<<4;var qj=qe.getContext("2d"),yb,Oc,Zb,re=8>nb||!aa?nb:8,Ef=qj.createImageData(m.tc,m.uc);for(yb=0;256>yb;yb++){for(Zb=0;Zb<nb;Zb++)for(var cn=
m.Je&&B&1&&Zb>=nb-2,dn=Df[Zb<re?V+yb*re+Zb:aa+yb*re+Zb-re],Ff=0;Ff<=Q;Ff++)for(Oc=0;Oc<Sa;Oc++){var rj=Oc<<Q,sj=(Zb<<Q)+Ff,tj=cn||dn&128>>(8<=Oc&&192<=yb&&223>=yb?7:Oc)?z:bn;yl(Ef,rj,sj,tj);Q&&yl(Ef,rj+1,sj,tj)}qj.putImageData(Ef,(yb&15)*m.tc,(yb>>4)*m.uc)}m.de[B]="#"+fa(z[0],2)+fa(z[1],2)+fa(z[2],2);m.di[B]=z;m.gg[B]=qe;m=!0}}a.xa[b]=y;return m}function zl(a){0<a.za||0<=a.ha?0>a.Ea&&(a.Ea=0):a.Ea=-1}
function ul(a){if(a.I){for(var b=10;15>=b;b++)if(null==a.D.ab[b])return;var c=a.D.ab[10],b=c&31,d=a.D.ab[11]&31,e=a.D.ab[9]&31,f=!1;a.D===a.B&&(f=!0,7!=e||4!=b||d||(d=7));if(c&32||b>d&&!f||b>e)Al(a);else{c=a.D.ab[15]+((a.D.ab[14]&63)<<8);a.ha!=c&&(Al(a),a.ha=c);d=d-b+1;if(a.rd!=b||a.Gc!=d)a.rd=b,a.Gc=d;a.Da=e+1;zl(a)}}}
function Al(a){if(0<=a.ha){if(void 0!==a.ba){var b=a.ba[a.ha];if(b&131072){var b=b&-131073,c=a.ha%a.H,d=a.ha/a.H|0;a.I&&a.xa[a.I]&&(a.Ga&&Bl(a,c,d,b,a.Ga),Bl(a,c,d,b));a.ba[a.ha]=b}}a.ha=-1}}
function Cl(a){var b,c=a.D;a.Xc=!1;var d=c.Gd[5];if(null!=d){b=1024;var e=0,f=c.Gd[3]&31;switch(d&3){case 0:if(f){e=32;switch(f&24){case 8:e=96;break;case 16:e=160;break;case 24:e=224}c.Hc=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.Ra==hk&&(e=3,c.Hc=f&7)}d&8&&(b=1280);c=c.De[4];null!=c&&(c&4||(b|=4096,e|=16),d&64&&(c&8&&(b|=16384,e|=4),a.Xc=!0));b|=e}return b}
function Dl(a,b){var c=a.D;return c&&null!=b&&b!=c.ug?(c.$f(b),a.ia.$f(c.cb,c.Fb,c.rg(),!0),!0):!1}
function tl(a,b){var c,d=a.va,e=a.D;if(e)if(1==e.Ra)d=7;else if(5<=e.Ra){var d=null,f=e.Vc>>2,g=32768<f?32768:f,h=e.Gd[6];if(null!=h){switch(h&12){case 0:e.cb=655360;e.Fb=f;d=255;break;case 4:e.cb=655360;e.Fb=f;d=3==a.ma?15:16;break;case 8:e.cb=720896;e.Fb=g;d=7;break;case 12:e.cb=753664,e.Fb=g,d=3==a.ma?2:3}c=80==(e.Gd[5]&80);!c||e.cb==a.cb&&e.Fb==a.Fb||(b=!0);var f=dl(e,6),g=e.ab[9],k=e.ab[23],m=e.De[1]&8;255!=d&&(h&1?655360==e.cb||c||k&1?e.Gd[5]&64?d=g&31?143>=e.ab[18]?19:20:21:g&128||350>f?d=
m?13:14:480<=f&&(d=3==a.ma?17:18):d=m?7-d:6:d-=m?2:0);c=Cl(a)}}else e.Lc&8&&(e.Lc&2?(d=e.Lc&16?6:5,e.Lc&4||--d):(d=e.Lc&1?3:1,e.Lc&4&&--d));else a.va=null,null==d&&(d=a.ka);if(!sl(a,d,b))return!1;Dl(a,c);return!0}
function sl(a,b,c){if(null!=b&&(b!=a.va||c)){a.Id=0;a.va=b;a.La=!1;b=a.D||(7==b?a.Z:a.R);if(b!=a.D||b.cb!=a.cb||b.Fb!=a.Fb){Al(a);if(a.cb){if(!Jb(a.ia,a.cb,a.Fb))return!1;a.D&&(a.D.cc=!1)}a.D=b;b.cc=!0;a.cb=b.cb;a.Fb=b.Fb;if(!xb(a.ia,b.cb,b.Fb,3,b===a.B?b:null))return!1}a:{a.I=0;a.H=a.Ob;a.L=a.wc;a.Ta=a.H;a.Hb=Jk[7][2];b=0;if(c=Jk[a.va])a.H=c[0],a.L=c[1],a.Hb=c[2],b=c[3],a.I=c[4],4!=a.ma&&7!=a.ma||a.D!==a.B||3!=a.I||(7==(a.B.ab[9]&31)?a.L=350>dl(a.B,18)?43:50:a.I=a.Ra);a.nd=a.H*a.L|0;a.md=a.nd/a.Hb|
0;a.fb=a.md;a.fc=0;void 0!==b&&(a.fb=(a.fb<<1)+b|0,a.fc=a.fb+b>>1);if(a.xa.length){a.ra=a.da/a.H|0;a.ua=a.pa/a.L|0;if(a.I){b=a.xa[a.I];if(!b)break a;c=a.xa[a.I<<1];a.bd&&80==a.H?c&&a.ra>=3*c.tc>>2&&(a.I<<=1,b=c):(c&&a.ra>=c.tc&&(a.I<<=1,b=c),a.bd||(a.ra=b.tc,a.ua=b.uc));a.pb=a.qb=0;b&&(a.pb=a.H*b.tc,a.qb=a.L*b.uc)}else a.ra=a.ua=1,a.pb=a.H,a.qb=a.L;a.Oa=a.P.createImageData(a.pb,a.qb);a.Fa=document.createElement("canvas");a.Fa.width=a.pb;a.Fa.height=a.qb;a.Ga=a.Fa.getContext("2d");a.yc=a.zc=0;a.ic=
a.da;a.mc=a.pa;b=a.da-a.H*a.ra;c=a.pa-a.L*a.ua;0<b&&(a.yc=b>>1,a.ic-=b);0<c&&(a.zc=c>>1,a.mc-=c);if(b||c)a.P.fillStyle=a.Y.style.backgroundColor,a.P.fillRect(0,0,a.da,a.pa)}}El(a,!0);nl(a)}return!0}function yl(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 Fl(a){a.za=-1;a.qa=!1;var b=a.md;if(void 0===a.ba||a.ba.length!=b)a.ba=Array(b)}function El(a,b){b||(a.La=!1);Fl(a)}
function Bl(a,b,c,d,e){var f=d&255,g=d>>8;d=g&15;var h=a.xa[a.I];h.Je&&(d=h.Je[d]);var k=g>>4&15;h.Je&&(k=h.Je[k]);e?(b*=h.tc,c*=h.uc,e.fillStyle=h.de[k],e.fillRect(b,c,h.tc,h.uc)):(b=b*a.ra+a.yc,c=c*a.ua+a.zc,a.P.fillStyle=h.de[k],a.P.fillRect(b,c,a.ra,a.ua));g&256&&(k=(f&15)*h.tc,f=(f>>4)*h.uc,e?e.drawImage(h.gg[d],k,f,h.tc,h.uc,b,c,h.tc,h.uc):a.P.drawImage(h.gg[d],k,f,h.tc,h.uc,b,c,a.ra,a.ua));g&512&&(f=a.rd,g=a.Gc,e?(a.Da&&a.Da!==h.uc&&(f=f*h.uc/a.Da|0,g=g*h.uc/a.Da|0),e.fillStyle=h.de[d],e.fillRect(b,
c+f,h.tc,g)):(a.Da&&a.Da!==a.ua&&(f=f*a.ua/a.Da|0,g=g*a.ua/a.Da|0),a.P.fillStyle=h.de[d],a.P.fillRect(b,c+f,a.ra,g)))}
function nl(a,b){if(a.ea.Vb){var c=!1,d=a.D;d&&(d!==a.B?d.Lc&8&&(c=!0):d.Wd&32&&(c=!0));if(c||b){if(b)Fl(a);else if(void 0===a.ba)return;var e=!1;!(b||++a.Id&15)&&0<=a.Ea&&(a.Ea++,e=!0);var f=0,g=a.nd,h=a.cb,c=h,k=c+a.Fb;19<=a.va&&(h=c=655360,k=c+65536);if(Gl(a,d)&8||d.ye&&d.ye<d.mh){var m=(d.ab[12]<<8)+d.ab[13]|0;d.cd!==m&&(d.cd=m,El(a));d.ye=0}m=d.cd;a.I&&(m<<=1);c+=m;m=a.fb;5<=a.Ra&&d.ab[19]&&d.ab[19]<<1!=d.ab[1]+1&&(a.Ta=d.ab[19]<<(a.I?1:d.ab[20]&64?3:4),m=(a.Ta*(a.L-1)+a.H)/a.Hb|0,7>=a.va&&(m<<=
1));c+m>k&&(m=k-c,0>m&&(m=0));k=c+m;if(b=!b&&a.qa){b=a.ia;for(var q=!0,y=c>>>b.da;0<m&&y<b.R.length;)b.R[y].Ha&&(b.R[y].Ha=q=!1,b.R[y].ri=!0),m-=b.xb,y++;b=q}if(b){if(!e)return;if(!a.za){f=a.ha-d.cd;if(0>f)return;g=f+1}}if(a.I){if(a.xa[a.I]){d=f;f=0;e=a.za=0;h=1048575;m=a.D.Lc&32;5<=a.Ra&&(m=a.D.Kc[16]&8);b=a.ha-a.D.cd;m&&(e=32768,h&=~e,a.Ea&2||(h&=-65537));for(c+=d<<1;c<k&&d<g;)m=Pb(a.ia,c),m|=65536,m&e&&(a.za++,m&=h),d==b&&(m|=a.Ea&1?131072:0),a.qa&&m===a.ba[d]||(Bl(a,d%a.H,d/a.H|0,m,a.Ga),a.ba[d]=
m,f++),c+=2,d++;a.qa=!0;f&&a.Ga&&a.P.drawImage(a.Fa,0,0,a.pb,a.qb,a.yc,a.zc,a.ic,a.mc);zl(a)}}else if(a.fc){var g=k,w,k=c,d=a.za=0,f=a.Hb,e=16==f?65536:196608,h=16==f?1:2;b=vl(a,h);for(var q=m=0,y=a.H,z=0,B=a.L,Q=0;k<g;){w=Pb(a.ia,k);if(a.qa&&w===a.ba[d])m+=f;else{a.ba[d]=w;w=w>>8|(w&255)<<8;var V=e,aa=16;m<y&&(y=m);for(var Sa=0;Sa<f;Sa++){var nb=(w&(V>>=h))>>(aa-=h);yl(a.Oa,m++,q,b[nb])}m>z&&(z=m);q<B&&(B=q);q>=Q&&(Q=q+1)}k+=2;d++;if(m>=a.H){m=0;q+=2;if(q>a.L)break;q==a.L&&(q=1,k=c+a.fc)}}a.qa=!0;
y<a.H&&(a.Ga.putImageData(a.Oa,0,0,y,B,z-y,Q-B),a.P.drawImage(a.Fa,0,0,a.H,a.L,0,0,a.da,a.pa))}else if(a.Xc){g=h;f=a.za=0;e=vl(a,8);h=a.D.sd;m=b=0;q=a.H;y=0;z=a.L;B=0;Q=a.D.De[4]&8?4:1;w=a.D.Kc[19]&15;for(V=a.Ta>a.H?a.Ta-a.H-w>>3:0;c<k;){d=h[c-g];Sa=4;w||(a.qa&&d===a.ba[f]?(b+=Sa,Sa=0):a.ba[f]=d,f++);if(Sa){b<q&&(q=b);for(aa=0;aa<Sa;aa++)yl(a.Oa,b++,m,e[d&255]),d>>=8;b>y&&(y=b);m<z&&(z=m);m>=B&&(B=m+1)}c+=Q;if(b>=a.H){b=0;if(++m>a.L)break;c+=V}}w||(a.qa=!0);q<a.H&&(a.Ga.putImageData(a.Oa,0,0,q,z,
y-q,B-z),a.P.drawImage(a.Fa,0,0,a.H,a.L,0,0,a.da,a.pa))}else{g=h;d=a.za=0;f=vl(a);e=a.D.sd;b=h=0;m=a.H;q=0;y=a.L;z=0;B=a.D.Kc[19]&15;for(Q=a.Ta>a.H?a.Ta-a.H-B>>3:0;c<k;){w=c++-g;w=e[w];aa=8;B?h?(V=a.H-h,aa>V&&(aa=V)):(w<<=B,aa-=B,a.qa=!1):(a.qa&&w===a.ba[d]?(h+=aa,aa=0):a.ba[d]=w,d++);if(aa){h<m&&(m=h);for(V=0;V<aa;V++)Sa=Wk[w&2155905152]||0,yl(a.Oa,h++,b,f[Sa]),w<<=1;h>q&&(q=h);b<y&&(y=b);b>=z&&(z=b+1)}if(h>=a.H){h=0;if(++b>a.L)break;c+=Q}}B||(a.qa=!0);m<a.H&&(a.Ga.putImageData(a.Oa,0,0,m,y,q-m,
z-y),a.P.drawImage(a.Fa,0,0,a.H,a.L,0,0,a.da,a.pa))}}}}function Gl(a,b){var c=0;a=wc(a.A)-b.Cg;0>a&&(b.Cg=a,a=-a|0);a%b.yg>b.Hl&&(c|=1);a%b.Bg>b.Jl&&(c|=9);b.mh=a/b.Bg|0;return c}l.fl=function(){var a=this.Z,b;a.cc&&(b=a.sc);return b};l.xm=function(a,b){a=this.Z;a.Wf=a.sc;a.sc=b&31};l.el=function(){return Hl(this.Z)};l.wm=function(a,b){Il(this,this.Z,b)};l.gl=function(){return this.Z.Lc};l.ym=function(a,b){this.Z.Lc=b;tl(this,!1)};l.hl=function(){return Jl(this,this.Z)};
l.Ej=function(a,b){this.B.Yf=this.B.Yf&-4|b&3};l.Ek=function(){return this.B.Wd};l.Zj=function(){return this.B.Kc[this.B.Wd&31]};l.Dj=function(a,b){a=this.B;var c=a.Wd&32;if(a.Oe){a.Oe=!1;var d=a.Wd&31;if(16<=d||!c)a.Kc[d]=b,El(this,!1)}else a.Wd=b,a.Oe=!0,b&32&&!c&&rl(this,!0)&&nl(this,!0),b=(a.ab[12]<<8)+a.ab[13]|0,a.cd!=b&&(a.cd=b,El(this)),a.ye=0};
l.rl=function(){var a=0;if(5==this.Ra)a=3-((this.B.lf&12)>>2),a=(this.Bb&1<<a)<<4-a;else{var b=this.B.Be[0];45!=(b&63)&&2880!=(b&4032)&&184320!=(b&258048)&&(a|=16)}a|=this.B.qh&-17;return this.B.qh=a};l.zm=function(a,b){this.B.lf=b;ql(this)};l.sl=function(){return this.B.rh};l.Hm=function(a,b){this.B.rh=b};l.pl=function(){return this.B.Ee};l.Fm=function(a,b){this.B.Ee=b};l.ol=function(){return this.B.De[this.B.Ee]};
l.Em=function(a,b){this.B.De[this.B.Ee]=b;switch(this.B.Ee){case 2:this.B.$a=Vk[b&15];break;case 4:Dl(this,Cl(this))&&nl(this,!0)}};l.Rk=function(){return this.B.ph};l.gm=function(a,b){this.B.ph=b};l.Sk=function(){return this.B.Xf};l.hm=function(a,b){this.B.dd=b;this.B.Xf=3;this.B.Bc=0};l.im=function(a,b){this.B.dd=b;this.B.Xf=0;this.B.Bc=0};l.Qk=function(){var a=this.B.Be[this.B.dd]>>this.B.Bc&63;this.B.Bc+=6;12<this.B.Bc&&(this.B.Bc=0,this.B.dd=this.B.dd+1&255);return a};
l.fm=function(a,b){a=this.B.Be[this.B.dd];b=a&~(63<<this.B.Bc)|(b&63)<<this.B.Bc;a!==b&&(this.B.Be[this.B.dd]=b,El(this,!1));this.B.Bc+=6;12<this.B.Bc&&(this.B.Bc=0,this.B.dd=this.B.dd+1&255)};l.tl=function(){return this.B.Yf};l.sm=function(a,b){this.B.Ij=b};l.ul=function(){return this.B.lf};l.rm=function(a,b){this.B.Hj=b};l.Zk=function(){return this.B.Ce};l.qm=function(a,b){this.B.Ce=b};l.Yk=function(){return this.B.Gd[this.B.Ce]};
l.pm=function(a,b){this.B.Gd[this.B.Ce]=b;switch(this.B.Ce){case 0:this.B.df=Vk[b&15];this.B.Cd=this.B.df&~this.B.ld;break;case 1:this.B.ld=~Vk[b&15];this.B.Cd=this.B.df&~this.B.ld;break;case 2:this.B.wg=Vk[b&15]&-2139062144;break;case 3:case 5:Dl(this,Cl(this));break;case 4:this.B.lh=(b&3)<<3;break;case 6:tl(this,!1);break;case 7:this.B.xg=Vk[b&15]&-2139062144;break;case 8:this.B.tb=b|b<<8|b<<16|b<<24}};l.Kk=function(){var a=this.R,b;a.cc&&(b=a.sc);return b};
l.am=function(a,b){a=this.R;a.Wf=a.sc;a.sc=b&31};l.Jk=function(){return Hl(this.R)};l.$l=function(a,b){Il(this,this.R,b)};l.Lk=function(){return this.R.Lc};l.bm=function(a,b){this.R.Lc=b;tl(this,!1)};l.Ik=function(){return this.R.kf};l.Zl=function(a,b){this.R.kf!==b&&(this.R.kf=b,El(this,!1))};l.Mk=function(){return Jl(this,this.R)};function Hl(a){var b;a.cc&&a.sc<a.vg&&(b=a.ab[a.sc]);return b}
function Il(a,b,c){if(b.sc<b.vg){b.ab[b.sc]=c;if(12==b.sc||13==b.sc)if(Gl(a,b)&1){var d=(b.ab[12]<<8)+b.ab[13]|0;b.cd!==d&&(b.cd=d,El(a))}else b.ye||(b.ye=b.mh);(9==b.sc&&8!=b.Wf||18==b.sc&&223==c)&&tl(a,!0);ul(a)}}function Jl(a,b){var c=Gl(a,b);b===a.B?(c|=b.aa&48^48,b.Oe=!1):c=(b.aa^=9)|240;return b.aa=c}
var el={948:Y.prototype.fl,949:Y.prototype.el,952:Y.prototype.gl,954:Y.prototype.hl},fl={948:Y.prototype.xm,949:Y.prototype.wm,952:Y.prototype.ym},gl={980:Y.prototype.Kk,981:Y.prototype.Jk,984:Y.prototype.Lk,985:Y.prototype.Ik,986:Y.prototype.Mk},hl={980:Y.prototype.am,981:Y.prototype.$l,984:Y.prototype.bm,985:Y.prototype.Zl},il={960:Y.prototype.Ek,961:Y.prototype.Zj,962:Y.prototype.rl,964:Y.prototype.pl,965:Y.prototype.ol,974:Y.prototype.Zk,975:Y.prototype.Yk},jl={954:Y.prototype.Ej,960:Y.prototype.Dj,
961:Y.prototype.Dj,962:Y.prototype.zm,964:Y.prototype.Fm,965:Y.prototype.Em,970:Y.prototype.sm,972:Y.prototype.rm,974:Y.prototype.qm,975:Y.prototype.pm,986:Y.prototype.Ej},kl={963:Y.prototype.sl,966:Y.prototype.Rk,967:Y.prototype.Sk,969:Y.prototype.Qk,970:Y.prototype.tl,972:Y.prototype.ul},ll={963:Y.prototype.Hm,966:Y.prototype.gm,967:Y.prototype.hm,968:Y.prototype.im,969:Y.prototype.fm};
Ga(function(){for(var a=bb(document,"pcx86","video"),b=0;b<a.length;b++){var c=a[b],d=Za(c),e=document.createElement("canvas");if(!e||!e.getContext){c.innerHTML="<br/>Missing &lt;canvas&gt; 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.backgroundColor=d.screenColor;e.style.height="auto";0<=(window?window.navigator.userAgent:"").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());var f=+(d.aspect||Na.aspect);f&&.3<=f&&3.33>=f&&(Fa("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");za("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"));c.appendChild(f);var g=e.getContext("2d"),d=new Y(d,e,g,f,c);ab(d,c)}});
function Kl(a){this.I=a.adapter;switch(this.I){case 1:this.G=956;this.D=7;break;case 2:this.G=888;this.D=7;break;case 3:this.G=632;this.D=5;break;default:r("Unrecognized parallel adapter #"+this.I);return}this.B=this.C=null;Ka.call(this,"ParallelPort",a,Kl);a=a.binding;"console"==a?this.C="":$a(this,a,Ll)}Ta(Kl);var Ll="buffer";l=Kl.prototype;l.zb=function(a,b,c){switch(b){case Ll:return this.la[b]=this.B=c,!0}return!1};
l.pc=function(a,b,c,d){this.ia=b;this.A=c;this.Ia=d;this.S=mb(a,"ChipSet");Sb(b,this,Ml,this.G);Ub(b,this,Nl,this.G);t(this)};l.Ub=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.Tb=function(a){return a?this.save():!0};l.reset=function(){Ol(this)};l.save=function(){var a=new de(this),b=0,c=[];c[b++]=this.H;c[b++]=this.Db;c[b]=this.Me;a.set(0,c);return a.data()};l.restore=function(a){return Ol(this,a[0])};
function Ol(a,b){var c=0;b||(b=[0,0,0]);a.H=b[c++];a.Db=b[c++];a.Me=b[c];return!0}l.Tk=function(){return this.H};l.ql=function(){return this.Db};l.Pk=function(){return this.Me};l.jm=function(a,b){this.H=b;this.Db|=64;a=!1;this.B&&(8==b?this.B.value=this.B.value.slice(0,-1):(this.B.value+=String.fromCharCode(b),this.B.scrollTop=this.B.scrollHeight),a=!0);if(null!=this.C){if(10==b||1024<=this.C.length)this.rc(this.C),this.C="";10!=b&&(this.C+=String.fromCharCode(b));a=!0}a&&(this.Db&=-65);Pl(this)};
l.em=function(a,b){this.Me=b;Pl(this)};function Pl(a){a.S&&a.D&&(a.Me&16&&!(a.Db&64)?Ue(a.S,a.D):Te(a.S,a.D))}var Ml={0:Kl.prototype.Tk,1:Kl.prototype.ql,2:Kl.prototype.Pk},Nl={0:Kl.prototype.jm,2:Kl.prototype.em};Ga(function(){for(var a=bb(document,"pcx86","parallel"),b=0;b<a.length;b++){var c=a[b],d=Za(c),d=new Kl(d);ab(d,c)}});
function Ql(a){this.ma=a.adapter;switch(this.ma){case 1:this.ha=1016;this.Y=4;break;case 2:this.ha=760;this.Y=3;break;default:r("Unrecognized serial adapter #"+this.ma);return}this.D=this.H=null;this.ra=a.tabSize;this.qa=a.charBOL;this.R=0;Ka.call(this,"SerialPort",a,Ql);a=a.binding;"console"==a?this.H="":$a(this,a,Rl);this.W=this.da=null;this.exports={connect:this.wi,receiveData:this.jf}}Ta(Ql);var Rl="buffer";l=Ql.prototype;l.fi=function(a,b){return a==this.Sd?(this.K=b,this):null};
l.zb=function(a,b,c){var d=this;switch(b){case Rl:return this.la[b]=this.D=c,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.jf(b);return!0},c.onkeypress=function(a){a=a||window.event;d.jf(a.which||a.keyCode);a.preventDefault&&a.preventDefault();return!0},c.removeAttribute("readonly"),!0}return!1};
l.pc=function(a,b,c,d){this.ba=a;this.ia=b;this.A=c;this.Ia=d;this.S=mb(a,"ChipSet");Sb(b,this,Sl,this.ha);Ub(b,this,Tl,this.ha);t(this)};l.wi=function(){if(!this.W){var a=nc(this.ba,"connection");if(a){var b=a.split("->");if(2==b.length){var c=la(b[0]);if(c!=this.Sd)return;b=la(b[1]);if(this.W=Xa(b)){var d=this.W.exports;if(d){var e=d.connect;e&&e.call(this.W);if(this.da=d.receiveData){this.status(this.Fe+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};
l.Ub=function(a,b){if(!b)if(this.wi(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.Tb=function(a){return a?this.save():!0};l.reset=function(){Ul(this)};l.save=function(){var a=new de(this),b=0,c=[];c[b++]=this.ka;c[b++]=this.pa;c[b++]=this.P;c[b++]=this.Z;c[b++]=this.G;c[b++]=this.L;c[b++]=this.C;c[b++]=this.B;c[b++]=this.oa;c[b]=this.I;a.set(0,c);return a.data()};l.restore=function(a){return Ul(this,a[0])};
function Ul(a,b){var c=0;b||(b=[0,0,384,0,1,0,0,96,48,[]]);a.ka=b[c++];a.pa=b[c++];a.P=b[c++];a.Z=b[c++];a.G=b[c++];a.L=b[c++];a.C=b[c++];a.B=b[c++];a.oa=b[c++];a.I=b[c];return!0}l.jf=function(a){if("number"==typeof a)this.I.push(a);else if("string"==typeof a)for(var b=0;b<a.length;b++)this.I.push(a.charCodeAt(b));else this.I=this.I.concat(a);Vl(this);return!0};
function Vl(a){0<a.I.length&&!(a.B&1)&&(a.ka=a.I.shift(),a.B|=1);var b=-1;a.B&1&&a.Z&1&&(b=4);0<=b?(a.G&=-8,a.G|=b,a.S&&a.Y&&Ue(a.S,a.Y,100)):(a.G|=1,a.S&&a.Y&&Te(a.S,a.Y))}l.nl=function(){var a=this.L&128?this.P&255:this.ka;this.B&=-2;Vl(this);return a};l.$k=function(){return this.L&128?this.P>>8:this.Z};l.al=function(){return this.G};l.bl=function(){return this.L};l.dl=function(){return this.C};l.cl=function(){return this.B};l.il=function(){return this.oa};
l.Gm=function(a,b){if(this.L&128)this.P=this.P&-256|b;else{this.pa=b;this.B&=-97;a=!1;this.da&&this.da.call(this.W,b)&&(a=!0);if(this.D){if(13==b)this.R=0;else if(8==b)this.D.value=this.D.value.slice(0,-1),0<this.R&&this.R--;else{a=(a=ma[b])?"<"+a+">":String.fromCharCode(b);var c=a.length;32>b&&1==c&&(c=0);9==b&&(b=this.ra||8,c=b-this.R%b,this.ra&&(a=" ".slice(0,c)));this.qa&&!this.R&&c&&(a=String.fromCharCode(this.qa)+a);this.D.value+=a;this.D.scrollTop=this.D.scrollHeight;
this.R+=c}a=!0}else if(null!=this.H){if(10==b||1024<=this.H.length)this.rc(this.H),this.H="";10!=b&&(this.H+=String.fromCharCode(b));a=!0}a&&(this.B|=96)}};l.tm=function(a,b){this.L&128?this.P=this.P&255|b<<8:this.Z=b};l.um=function(a,b){this.L=b};l.vm=function(a,b){a=this.C;this.C=b;if(this.K&&(a^b)&3){b=this.K;a=this.C;var c=3==(a&3);if(c){if(!b.cc){var d=!1;b.C&2||(b.reset(),d=!0);b.C&1||(d=!0);d&&b.G.jf([77,77]);Wl(b);b.cc=c}}else b.cc&&(Xl(b),b.cc=c);b.C=a}};
var Sl={0:Ql.prototype.nl,1:Ql.prototype.$k,2:Ql.prototype.al,3:Ql.prototype.bl,4:Ql.prototype.dl,5:Ql.prototype.cl,6:Ql.prototype.il},Tl={0:Ql.prototype.Gm,1:Ql.prototype.tm,3:Ql.prototype.um,4:Ql.prototype.vm};Ga(function(){for(var a=bb(document,"pcx86","serial"),b=0;b<a.length;b++){var c=a[b],d=Za(c),d=new Ql(d);ab(d,c)}});function Yl(a){Ka.call(this,"Mouse",a,Yl);if(this.Y=a.serial)this.Z="SerialPort";this.W=this.P=this.cc=!1;this.D=[];this.B=[];t(this)}Ta(Yl);var pl=0;l=Yl.prototype;
l.pc=function(a,b,c,d){this.ba=a;this.ia=b;this.A=c;this.Ia=d;for(b=null;b=mb(a,"Video",b);)this.D.push(b)};l.Ub=function(a,b){if(!b){if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;if(this.Z&&!this.G){for(a=null;(a=mb(this.ba,this.Z,a))&&(!a.fi||!(this.G=a.fi(this.Y,this))););if(this.G)for(this.B=[],a=0;a<this.D.length;a++)b=this.D[a],b.K=this,(b=b.G)&&this.B.push(b);else r(this.id+": "+this.Z+" "+this.Y+" unavailable")}this.cc?Wl(this):Xl(this)}return!0};
l.Tb=function(a){return a?this.save():!0};l.reset=function(){Zl(this)};l.save=function(){var a=new de(this),b=0,c=[];c[b++]=this.cc;c[b++]=this.H;c[b++]=this.I;c[b++]=this.K;c[b++]=this.L;c[b++]=this.S;c[b++]=this.R;c[b]=this.C;a.set(0,c);return a.data()};l.restore=function(a){return Zl(this,a[0])};function Zl(a,b){var c=0;b||(b=[!1,-1,-1,0,0,!1,!1,0]);var d=b[c++];a.cc=d;a.H=b[c++];a.I=b[c++];a.K=b[c++];a.L=b[c++];a.S=b[c++];a.R=b[c++];a.C=b[c];return!0}l.ef=function(a){this.P=a};
function Wl(a){if(!a.W)for(var b=0;b<a.B.length;b++)$l(a,a.B[b])&&(a.W=!0)}function Xl(a){if(a.W)for(var b=0;b<a.B.length;b++){var c=a.B[b];c&&(c.style.cursor="auto")}}function $l(a,b){return b?(b.addEventListener("mousemove",function(b){am(a,b)},!1),b.addEventListener("mousedown",function(b){am(a,b,!0)},!1),b.addEventListener("mouseup",function(b){am(a,b,!1)},!1),b.style.cursor="none",!0):!1}
function am(a,b,c){if(void 0!==c){var d;!(d=!1!==a.P)&&(d=a.D.length)&&(d=a.D[0],d=d.$d?d.Qd(!0):!1);d||(a.P=null);a.le(b.button,c)}else{if(0>a.H||0>a.I)a.H=b.clientX,a.I=b.clientY;a.P?(c=b.movementX||b.mozMovementX||b.webkitMovementX||0,d=b.movementY||b.mozMovementY||b.webkitMovementY||0):(c=b.clientX-a.H,d=b.clientY-a.I);a.H=b.clientX;a.I=b.clientY;a.tg(c,d,a.H,a.I)}}
l.le=function(a,b){if(this.cc&&this.A&&this.A.ea.Nb)switch(a){case pl:this.S!=b&&(this.S=b,bm(this));break;case 2:this.R!=b&&(this.R=b,bm(this))}};l.tg=function(a,b){this.cc&&this.A&&this.A.ea.Nb&&(a||b)&&(this.K=a,this.L=b,bm(this))};function bm(a){a.G.jf([64|(a.S?32:0)|(a.R?16:0)|(a.L&192)>>4|(a.K&192)>>6,a.K&63,a.L&63]);a.K=a.L=0}Ga(function(){for(var a=bb(document,"pcx86","mouse"),b=0;b<a.length;b++){var c=a[b],d=Za(c),d=new Yl(d);ab(d,c)}});
function cm(a,b,c){Ka.call(this,"Disk",{id:a.Fe+".disk"+fa(++dm,4)},cm);this.controller=a;this.ba=a.ba;this.Ia=a.Ia;this.C=b;this.B=b.name;this.qe=b.qe;this.Gf=this.D=!1;em(this,c,b.ib,b.jb,b.eb,b.nb);this.I=[];this.S=[];this.G=null;this.P=0;this.R=!1;t(this)}var dm=0;Ta(cm);l=cm.prototype;l.pc=function(a,b,c,d){this.Ia=d};l.Ub=function(a,b){b||!this.Gf||this.D||(t(this,!1),this.load(this.B,this.H,null,this.lk,this));return!0};l.lk=function(){t(this,!0)};
l.Tb=function(a,b){if(this.D){var c,d=0;if(this.R&&!ua("Disk writes are still in progress, shut down anyway?"))return!1;for(;c=fm(this,!1);)if(d=c[0]){this.controller.Ba('Unable to save "'+this.B+'" (error '+d+")");break}b&&this.D&&(b="action=close&volume="+this.H,b+="&machine="+this.controller.ue(),b+="&user="+this.controller.yd(),sa(ta()+"/api/v1/disk?"+b,null,!0),this.D=!1);!d&&a&&this.controller.Ba(this.B+" saved")}return!0};
function em(a,b,c,d,e,f){a.mode=b;a.ib=c;a.jb=d;a.eb=e;a.nb=f;a.A=[];if("preload"!=a.mode){b=Array(a.ib);for(c=0;c<b.length;c++){d=Array(a.jb);for(e=0;e<d.length;e++){f=Array(a.eb);for(var g=1;g<=f.length;g++)f[g-1]=gm(null,c,e,g,a.nb,"local"==a.mode?0:null);d[e]=f}b[c]=d}a.A=b}a.L=null}
l.load=function(a,b,c,d,e){var f=b;if(this.K)return!0;this.B=a;this.H=b;this.th=ga(b);var g=this;this.K=d;this.ia=e||this.controller;if(c){var h=new FileReader;h.onload=function(){var a=h.result,b,c=a?a.byteLength:0,d=ca[c];if(d){g.ib=d[0];g.jb=d[1];g.eb=d[2];g.nb=512;b=g.nb>>2;var e=d=0,a=new DataView(a,0,c);g.A=Array(g.ib);for(c=0;c<g.A.length;c++)for(var f=g.A[c]=Array(g.jb),B=0;B<f.length;B++)for(var Q=f[B]=Array(g.eb),V=0;V<Q.length;V++){for(var aa=gm(null,c,B,V+1,g.nb,0),Sa=aa.data,nb=0;nb<
b;nb++,e+=4)var Df=Sa[nb]=a.getInt32(e,!0),d=d+Df&-1;aa.Dc=b;Q[V]=aa}g.L=d;b=g}else g.Ba("Unrecognized diskette format ("+c+" bytes)");g.K&&(g.K.call(g.controller,g.C,b,g.B,g.H),g.K=null)};h.readAsArrayBuffer(c);return!0}0>b.indexOf("/api/v1/dump")&&(a=ha(b),"json"==a||"gz"==a?f=encodeURI(b):"demandrw"==this.mode||"demandro"==this.mode?(f=hm(this,b),this.Gf=!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"):
ia(b,"/")&&(c="dir"),f=ta()+"/api/v1/dump?"+c+"="+encodeURIComponent(b)+(this.qe?"":d)+"&format=json"));return!!sa(f,null,!0,function(a,b,c){im(g,a,b,c)})};
function im(a,b,c,d){var e=null;a.te=!1;var f=0>d&&a.ba&&!a.ba.ea.Vb;if(a.Gf)d?a.controller.Ba('Unable to connect to disk "'+a.H+'" (error '+d+": "+c+")",f):(a.D=!0,e=a);else if(d)a.controller.Ba('Unable to load disk "'+a.B+'" (error '+d+": "+b+")",f);else{Va(a.controller.Fe,b,c);try{if(0<ga(a.th,!0).toLowerCase().indexOf("-readonly"))a.te=!0;else{var g=c.indexOf("\n");0<g&&1024>g&&0<c.substring(0,g).indexOf("write-protected")&&(a.te=!0)}var h;"<"==c.substr(0,1)?h=["Missing disk image: "+a.B]: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)r(h[0]);else{a.ib=h.length;a.jb=h[0].length;a.eb=h[0][0].length;var k=h[0][0][0];a.nb=k&&k.length||512;for(d=c=0;d<a.ib;d++)for(f=0;f<a.jb;f++)for(g=0;g<a.eb;g++)if(k=h[d][f][g]){var m=k.length;void 0===m&&(m=k.length=512);var m=m>>2,q=k.pattern;void 0===q&&(q=k.pattern=0);var y=k.data;if(void 0===y){var w=k.bytes;if(void 0!==w&&w.length){for(var z=
m<<2,B=w.length;B<z;B++)w[B]=q;jm(k,w,0)}else y=[],q=k.pattern=q|q<<8|q<<16|q<<24,k.data=y;delete k.bytes}gm(k,d,f);for(z=0;z<y.length;z++)c=c+y[z]&-1}a.A=h;a.L=c;e=a}else r("Empty disk image: "+a.B)}catch(Q){r("Disk image error ("+b+"): "+Q.message)}}a.K&&(a.K.call(a.ia,a.C,e,a.B,a.H),a.K=null)}function km(a,b){var c=a.jb*a.eb,d=b/c|0;return d<a.ib?(b%=c,a.seek(d,b/a.eb|0,b%a.eb+1)):null}function lm(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 gm(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.sk=b;a.tk=c;a.Tc=a.Dc=0;a.Ha=!1;return a}function hm(a,b){b="action=open&volume="+b+("&mode="+a.mode);b+="&chs="+a.ib+":"+a.jb+":"+a.eb+":"+a.nb;b+="&machine="+a.controller.ue();b+="&user="+a.controller.yd();return ta()+"/api/v1/disk?"+b}
function mm(a,b,c,d,e,f,g){if(a.D){var h;h="action=read&volume="+a.H;h+="&chs="+a.ib+":"+a.jb+":"+a.eb+":"+a.nb;h=h+("&addr="+b+":"+c+":"+d+":"+e)+("&machine="+a.controller.ue());h+="&user="+a.controller.yd();sa(ta()+"/api/v1/disk?"+h,null,f,function(h,m,q){h=[b,c,d,e,f,g];var k=!1,w=h[0],z=h[1],B=h[2],Q=h[3];if(!q){m=JSON.parse(m);for(k=0;Q--;){var V=a.seek(w,z,B,!0);if(!V)break;jm(V,m,k);k+=V.length;B++}k=h[4]}(h=h[5])&&h(q,k)})}else g&&g(-1,!1)}
function nm(a,b,c,d,e,f,g){if(a.D){var h={};a.R=!0;h.action="write";h.volume=a.H;h.chs=a.ib+":"+a.jb+":"+a.eb+":"+a.nb;h.addr=b+":"+c+":"+d+":"+e;h.machine=a.controller.ue();h.user=a.controller.yd();h.data=JSON.stringify(f);sa(ta()+"/api/v1/disk",h,g,function(f,h,q){var k=[b,c,d,e,g];f=k[0];h=k[1];var m=k[2],z=k[3],k=k[4];a.R=!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 B=a.A[f][h][m];q?om(a,B,!1):B.Ha||(B.Tc=B.Dc=0)}k&&pm(a)})}return!1}
function om(a,b,c){b.Ha=!0;var d=a.I.indexOf(b);0<=d&&(a.I.splice(d,1),a.S.splice(d,1));a.I.push(b);a.S.push(na());c&&pm(a)}function pm(a){if(a.I.length){var b=a.S[0]+2E3;a.G&&a.P<b&&(clearTimeout(a.G),a.G=null);if(!a.G){var c=na(),b=b-c;0>b&&(b=0);2E3<b&&(b=2E3);a.G=setTimeout(function(){fm(a,!0)},b);a.P=c+b}}else a.G&&(clearTimeout(a.G),a.G=null)}
function fm(a,b){b&&(a.G=null);var c=a.I[0];if(c){for(var d=c.sk,e=c.tk,c=c.sector,f=0,g=[],h=c-1;h<a.A[d][e].length;h++){var k=a.A[d][e][h];if(!k.Ha)break;var m=a.I.indexOf(k);a.I.splice(m,1);a.S.splice(m,1);g=g.concat(qm(k));k.Ha=!1;f++}a=nm(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.C,h=this.A[a];if(h){var k=h[b];if(!k&&g.ig&&b<g.jb)for(k=h[b]=Array(g.vd),h=0;h<k.length;h++)k[h]=gm(null,a,b,h+1,g.vb,0);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++;mm(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.mb&&(f=k[h]=gm(null,a,b,g.mb,g.vb,0))}}e&&e(f,!1);return f};
function jm(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 qm(a){var b=a.length,c=Array(b),d=0,b=b>>2,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)var c=a.data,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.te)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.Dc?f<a.Tc?(a.Dc+=a.Tc-f,a.Tc=f):f>=a.Tc+a.Dc&&(a.Dc+=f-(a.Tc+a.Dc)+1):(a.Tc=f,a.Dc=1);d[f]=d[f]&~(255<<b)|c<<b;this.D&&om(this,a,!0)}return!0}return null};function rm(a){for(var b="",c=0,d;d=km(a,c++);)for(var e=0,f=d.length;e<f;e++)b+=String.fromCharCode(lm(a,d,e));return btoa(b)}
l.save=function(){var a=0,b=[];b[a++]=[this.H,this.L,this.ib,this.jb,this.eb,this.nb];if(!this.D&&!this.te)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.Dc){for(var h=[],k=0,m=g.Tc,q=g.Tc+g.Dc;m<q;)h[k++]=g.data[m++];b[a++]=[d,e,f,g.Tc,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?em(this,"local",e[2],e[3],e[4],e[5]):null!=e[1]&&null!=this.L&&e[1]!=this.L&&(c="original checksum ("+e[1]+") differs from current checksum ("+this.L+")",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.te){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.Tc=e;for(h.Dc=f.length;e<g;)h.data[e++]=f[k++];b++}}}0>b&&-2!=b&&this.controller.Ba("Unable to restore disk '"+this.B+": "+c);return b};
l.toJSON=function(){var a;a=0;for(var b;b=km(this,a++);)sm(b);a=JSON.stringify(this.A,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")};
function sm(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function tm(a){Ka.call(this,"FDC",a,tm);this.dmaRead=this.Tj;this.dmaWrite=this.Uj;this.dmaFormat=this.hk;this.K=a.autoMount||null;this.W=a.sortBy||"name";"none"==this.W&&(this.W=null);this.C=[];this.Y=!za("Mobi")&&window&&"FileReader"in window}Ta(tm);ba={};
var um={3:{gd:3,wd:0,name:ba.dn},4:{gd:2,wd:1,name:ba.bn},5:{gd:9,wd:7,name:ba.hn},6:{gd:9,wd:7,name:ba.Ym},7:{gd:2,wd:0,name:ba.$m},8:{gd:1,wd:2,name:ba.cn},10:{gd:2,wd:7,name:ba.Zm},13:{gd:6,wd:7,name:ba.Vm},15:{gd:3,wd:0,name:ba.an}};l=tm.prototype;
l.zb=function(a,b,c){var d=this;switch(b){case "listDisks":this.la[b]=c;if(this.W){b=[];for(a=0;a<c.options.length;a++)b.push(c.options[a]);b.sort(function(a,b){return"path"!=d.W?a.text.localeCompare(b.text):a.value.localeCompare(b.value)});for(a=0;a<b.length;a++)c.options[a]=b[a]}c.onchange=function(){var a=d.la.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){r("FDC option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;
void 0!==g&&(b='<a href="'+g+'" target="_blank">'+b+"</a>");a.innerHTML=b}};return!0;case "descDisk":case "listDrives":return this.la[b]=c,c.onchange=function(){var a=ea(c.value,10);null!=a&&vm(d,a)},!0;case "loadDrive":return this.la[b]=c,c.onclick=function(){var a=d.la.listDisks;a&&wm(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.Y){c.parentNode.removeChild(c);break}this.la[b]=c;c.onclick=function(){var a=d.la.listDrives;a&&a.options&&d.B&&((a=d.B[ea(a.value,10)])?(a=
a.ta)?(a=Aa(rm(a),"octet-stream",!0,a.th.replace(".json",".img")),r(a)):d.Ba("No diskette loaded in drive."):d.Ba("No diskette drive selected."))};return!0;case "mountDrive":if(this.Y)return this.la[b]=c,c.addEventListener("change",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;wm(d,ga(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
l.pc=function(a,b,c,d){this.ia=b;this.A=c;this.Ia=d;this.ba=a;this.S=mb(a,"ChipSet");if((this.K=nc(this.ba,"autoMount")||this.K)&&"string"==typeof this.K)try{this.K=eval("("+this.K+")")}catch(e){r("FDC auto-mount error: "+e.message+" ("+this.K+")"),this.K=null}xm(this);Sb(b,this,ym);Ub(b,this,zm);Am(this,"None","",!0);this.Y&&Am(this,"Local Disk","?");Am(this,"Remote Disk","??");Bm(this)||t(this)};
l.Ub=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.ba.pg){this.C=[];for(a=0;a<this.B.length;a++)Cm(this,a,!0);Bm(this,!0)}}else if(!this.restore(a))return!1;if(a=this.la.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;b<this.Z;b++){var c=document.createElement("option");c.value=b;c.text=String.fromCharCode(65+b)+":";a.appendChild(c)}0<this.Z&&(a.value="0",vm(this,0))}}return!0};l.Tb=function(a){return a?this.save():!0};l.reset=function(){xm(this)};
l.save=function(){var a=new de(this);a.set(0,Dm(this));return a.data()};l.restore=function(a){return xm(this,a[0])};
function xm(a,b){var c=0,d,e=!0;b||(b=[0,0,128,Array(9),0,0,0,[]]);a.Qa=b[c++];c++;a.aa=b[c++];a.I=b[c++];a.G=b[c++];a.D=b[c++];a.P=b[c++];var f=b[c++];d=b[c++];null!=d&&(a.C=d);void 0===a.B&&(a.Z=4,a.S&&(a.Z=+aj(a.S,Gi,void 0)),a.B=Array(4));for(d=0;d<a.B.length;d++){var g=a.B[d];if(void 0===g){var g=a.B[d]={},h;if(a.S)a:{h=a.S;if(d<+aj(h,Gi,void 0)){if(!h.Y){h=360;break a}if(d<h.Y.length){h=h.Y[d];break a}}h=0}else h=0;switch(h){case 160:case 180:g.jb=1;default:g.ib=40;g.eb=9;break;case 720:g.ib=
80;g.eb=9;break;case 1200:g.ib=80;g.eb=15;break;case 1440:g.ib=80,g.eb=18}}var k=a,m=d,q=f[d],y=0;h=!0;g.Qa=m;g.ne=g.pe=!1;q||(q=[192,!0,0,2,0]);"boolean"==typeof q[1]&&(q[1]=["Floppy Drive",g.ib||40,g.jb||q[3],g.eb||9,g.nb||512,q[1],g.Nf,g.Xe,g.Ye]);g.kb=q[y++];var w=q[y++];g.name=w[0];g.ib=w[1];g.jb=w[2];g.eb=w[3];g.nb=w[4];g.qe=w[5];(g.Nf=w[6])?(g.Xe=w[7],g.Ye=w[8]):(g.Nf=g.ib,g.Xe=g.jb,g.Ye=g.eb);g.Ya=q[y++];g.ud=q[y++];g.wb=q[y++];g.ud=100<=g.ud?g.ud-100:g.ud-g.wb;g.mb=q[y++];g.vd=q[y++];g.vb=
q[y++];g.Ua=q[y++];g.Wa=null;g.ta||(g.Xd="");var z=q[y++];102==z&&(z=!1);"boolean"==typeof z?(w=q[y++],q=q[y],z?(y=k.B[m],Cm(k,m,!0,!0),y.pe=!0,m=new cm(k,y,"preload"),k.oi(y,m,w,q,!0)):Em(k,m,w,q,!0)?g.ta&&q&&Fm(k,w,q,g.ta):t(k,!1)):void 0!==z&&g.ta&&0>g.ta.restore(z)&&(h=!1);h&&g.ta&&void 0!==g.Ua&&(g.Wa=g.ta.seek(g.wb,g.Ya,g.mb));h||(e=!1)}a.L=b[c++]||0;a.H=b[c]||0;return e}
function Dm(a){var b=0,c=[];c[b++]=a.Qa;c[b++]=0;c[b++]=a.aa;c[b++]=a.I;c[b++]=a.G;c[b++]=a.D;c[b++]=a.P;for(var d=b++,e=0,f=[],g=0;g<a.B.length;g++){var h=e++,k=a.B[g],m=0,q=[];q[m++]=k.kb;q[m++]=[k.name,k.ib,k.jb,k.eb,k.nb,k.qe,k.Nf,k.Xe,k.Ye];q[m++]=k.Ya;q[m++]=k.ud+100;q[m++]=k.wb;q[m++]=k.mb;q[m++]=k.vd;q[m++]=k.vb;q[m++]=k.Ua;q[m++]=k.pe;q[m++]=k.Jj;q[m]=k.Xd;f[h]=q}c[d]=f;d=b++;for(e=0;e<a.B.length;e++)f=a.B[e],f.ta&&Gm(a,f.Xd,f.ta);c[d]=a.C;c[b++]=a.L;c[b]=a.H;return c}
function Bm(a,b){b||(a.R=0);if(a.K)for(var c in a.K){var d=a.K[c],e=d.path,f;if(!(f=d.name))a:{if((f=a.la.listDisks)&&f.options)for(var g=0;g<f.options.length;g++){var h=f.options[g];if(h.value==e){f=h.text;break a}}f=ga(e,!0)}if(e&&f&&(g=c.charCodeAt(0)-65,0<=g&&g<a.B.length)){!Em(a,g,f,e,!0)&&b&&t(a,!1);continue}a.Ba("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")")}return!!a.R}
function wm(a,b,c,d){var e,f=a.la.listDrives;if(f&&!isNaN(e=ea(f.value,10))&&0<=e&&e<a.B.length)if(c)if("?"==c)a.Ba('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=ga(c)}for(;0>Em(a,e,b,c,!1,d)&&window.confirm("Click OK to reload the original disk.\n(WARNING: All disk changes will be discarded)");){var f=a,g=c,h;for(h=0;h<f.C.length;h++)if(f.C[h][1]==g){f.C.splice(h,1);break}Cm(a,e,!1,
!0)}}else Cm(a,e);else a.Ba("Unable to load the selected drive")}function Em(a,b,c,d,e,f){var g=a.B[b];if(d&&(d=d.replace("/disks/pc/","/disks/pcx86/"),g.Xd.toLowerCase()!=d.toLowerCase())){Cm(a,b,e,!0);if(g.ne)return a.Ba("Drive "+b+" busy"),0;g.ne=!0;e&&(g.Od=!0,a.R++);g.pe=!!f;return(new cm(a,g,"preload")).load(c,d,f,a.oi)?1:0}return-1}
l.oi=function(a,b,c,d,e){var f;a.ne=!1;b&&(f=b.info(),b&&f[0]>a.ib||f[1]>a.jb)&&(this.Ba('Diskette "'+c+'" too large for drive '+String.fromCharCode(65+a.Qa)),b=null);b?(a.ta=b,a.Jj=c,a.Xd=d,Fm(this,c,d,b),f=b.info(),this.L|=128,this.Ba('Mounted diskette "'+c+'" in drive '+String.fromCharCode(65+a.Qa),a.Od||e),a.Nf=f[0],a.Xe=f[1],a.Ye=f[2],this.ba&&xc(this.ba)):a.pe=!1;a.Od&&(a.Od=!1,--this.R||t(this));vm(this,a.Qa)};
function Am(a,b,c,d){if((a=a.la.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 vm(a,b){if(0<=b&&b<a.B.length){var c=a.B[b],d=a.la.listDisks;a=a.la.listDrives;if(d&&a&&d.options&&a.options&&(a=ea(a.value,10),c=c.pe?"?":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 Cm(a,b,c,d){var e=a.B[b];e.ta&&(Gm(a,e.Xd,e.ta),e.Jj="",e.Xd="",e.ta=null,e.pe=!1,a.L|=128,d||a.Ba("Drive "+String.fromCharCode(65+b)+" unloaded",c),c||d||vm(a,b))}
function Fm(a,b,c,d){var e;for(e=0;e<a.C.length;e++)if(a.C[e][1]==c){d.restore(a.C[e][2]);return}a.C[e]=[b,c,[]]}function Gm(a,b,c){var d;for(d=0;d<a.C.length;d++)if(a.C[d][1]==b){a.C[d][2]=c.save();break}}l.mm=function(a,b){b&4?this.P&4||this.P&8&&this.S&&Ue(this.S,6):xm(this);this.P=b};l.Vk=function(){return 80};l.Xk=function(){return this.aa};l.Uk=function(){var a=0;this.G<this.D&&(a=this.I[this.G]);this.P&8&&this.S&&Te(this.S,6);++this.G>=this.D&&(this.aa&=-81,this.G=this.D=0);return a};
l.lm=function(a,b){this.D<this.I.length&&(this.I[this.D++]=b);a=this.I[0]&31;if(void 0!==um[a]&&this.D>=um[a].gd){b=!1;this.G=0;a=Hm(this);var c,d,e,f,g,h=a&31;switch(h){case 3:Hm(this);Hm(this);Im(this);break;case 4:d=Hm(this);this.Qa=d&3;c=this.B[this.Qa];Im(this);Jm(this,(c.kb&-16777216)>>>24);break;case 5:case 6:d=Hm(this);b=d>>2&1;this.Qa=d&3;c=this.B[this.Qa];c.Ya=b;d=c.wb=Hm(this);e=Hm(this);f=c.mb=Hm(this);g=Hm(this);c.vb=128<<g;c.vd=Hm(this);Hm(this);Hm(this);6==h?(h=c,h.kb=72,h.ta&&(h.Wa=
null,h.kb=0,this.S&&(Fj(this.S,2,this,"dmaRead",h),Bj(this.S,2)))):(h=c,h.kb=72,h.ta&&(h.ta.te?h.kb=576:(h.Wa=null,h.kb=0,this.S&&(Fj(this.S,2,this,"dmaWrite",h),Bj(this.S,2)))));Km(this,c,a,b,d,e,f,g);b=!0;break;case 7:d=Hm(this);this.Qa=d&3;c=this.B[this.Qa];c.wb=c.ud=0;c.kb=268435488;Im(this);b=!0;break;case 8:c=this.B[this.Qa];c.Ya=0;Im(this);Jm(this,c.Qa|c.Ya<<2|c.kb&255);Jm(this,c.wb);this.Qa=this.Qa+1&3;break;case 10:d=Hm(this);b=d>>2&1;this.Qa=d&3;c=this.B[this.Qa];d=c.wb;e=c.Ya=b;f=c.mb=
1;g=0;c.kb=0;c.ta&&(c.Wa=c.ta.seek(c.wb,c.Ya,c.mb))?g=c.Wa.length>>8:c.kb=72;Km(this,c,a,b,d,e,f,g);b=!0;break;case 13:d=Hm(this);b=d>>2&1;this.Qa=d&3;c=this.B[this.Qa];d=c.wb;e=c.Ya=b;f=1;g=Hm(this);c.vb=128<<g;c.vd=Hm(this);Hm(this);c.gi=Hm(this);h=c;h.kb=72;h.ta&&(h.Wa=null,h.kb=0,this.S&&(h.ke=0,h.Oc=Array(4),h.ig=!0,h.Af=0,Fj(this.S,2,this,"dmaFormat",h),Bj(this.S,2),h.ig=!1));Km(this,c,a,b,d,e,f,g);b=!0;break;case 15:d=Hm(this),this.Qa=d&3,c=this.B[this.Qa],c.Ya=d>>2&1,d=Hm(this),c.wb+=d-c.ud,
0>c.wb&&(c.wb=0),c.wb>=c.ib&&(c.wb=c.ib-1),c.ud=d,c.kb=32,c.wb||(c.kb|=268435456),Im(this),b=!0}0<this.D&&(this.aa|=80);this.P&8&&(!c||c.kb&8||!b||this.S&&Ue(this.S,6))}};l.Wk=function(){var a=this.L;this.L&=-129;return a};l.km=function(a,b){this.H=b};function Km(a,b,c,d,e,f,g,h){Im(a);Jm(a,b.Qa|b.Ya<<2|b.kb&255);Jm(a,(b.kb&65280)>>>8);Jm(a,(b.kb&16711680)>>>16);var k=0;if(e!=b.wb||f!=b.Ya)k=g=1;c&128&&(f^=k,d||(k=0));Jm(a,e+k);Jm(a,f);Jm(a,g);Jm(a,h)}
function Hm(a){var b=a.I[a.G];a.G++;return b}function Im(a){a.G=a.D=0}function Jm(a,b){a.I[a.D++]=b}l.Tj=function(a,b,c){void 0===b||0>b?this.ze(a,c):c(-1,!1)};l.Uj=function(a,b){return void 0!==b&&0<=b?Lm(a,b):-1};l.hk=function(a,b){if(void 0!==b&&0<=b)a:if(a.kb)a=-1;else{a.Oc[a.ke++]=b;if(a.ke==a.Oc.length){a.wb=a.Oc[0];a.Ya=a.Oc[1];a.mb=a.Oc[2];a.vb=128<<a.Oc[3];for(var c=a.ke=0;c<a.vb;c++)if(0>Lm(a,a.gi)){a=-1;break a}a.Af++}a.Af>=a.vd&&(b=-1);a=b}else a=-1;return a};
l.ze=function(a,b){var c=-1,d=null,e=0;if(!a.kb&&a.ta){do{if(a.Wa&&(e=a.Ua,0<=(c=a.ta.read(a.Wa,a.Ua++)))){d=a.Wa;break}a.Wa=a.ta.seek(a.wb,a.Ya,a.mb);if(!a.Wa){a.kb=1088;break}a.Ua=0;Mm(a)}while(1)}b(c,!1,d,e)};function Lm(a,b){if(a.kb||!a.ta)return-1;do{if(a.Wa&&a.ta.write(a.Wa,a.Ua++,b))break;a.Wa=a.ta.seek(a.wb,a.Ya,a.mb);if(!a.Wa){a.kb=8256;b=-1;break}a.Ua=0;Mm(a)}while(1);return b}function Mm(a){a.mb++;a.mb>=a.Ye+1&&(a.mb=1,a.Ya++,a.Ya>=a.Xe&&(a.Ya=0,a.wb++))}
var ym={1009:tm.prototype.Vk,1012:tm.prototype.Xk,1013:tm.prototype.Uk,1015:tm.prototype.Wk},zm={1010:tm.prototype.mm,1013:tm.prototype.lm,1015:tm.prototype.km};Ga(function(){for(var a=bb(document,"pcx86","fdc"),b=0;b<a.length;b++){var c=a[b],d=Za(c),d=new tm(d);ab(d,c)}});function Z(a){Ka.call(this,"HDC",a,Z);this.dmaRead=this.Vj;this.dmaWrite=this.Wj;this.dmaWriteBuffer=this.ik;this.dmaWriteFormat=this.jk;this.ha=[];this.qa=a.drives;this.W="at"==a.type}Ta(Z);
var Nm=["XTC","ATC","COMPAQ"],Om=[{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]}];l=Z.prototype;
l.zb=function(a,b,c){var d=this;switch(b){case "saveHD0":case "saveHD1":return this.la[b]=c,c.onclick=function(a){return function(){var b=d.B&&d.B[a];b&&b.ta?(b=b.ta,b=Aa(rm(b),"octet-stream",!0,b.th.replace(".json",".img")),r(b)):d.Ba("Hard drive "+a+" is not available.")}}(+b.slice(-1)),!0}return!1};
l.pc=function(a,b,c,d){this.ia=b;this.A=c;this.Ia=d;this.ba=a;if(d=nc(a,"drives"))this.ha=d;else if(this.qa)try{this.ha=eval("("+this.qa+")")}catch(e){r("HDC drive configuration error: "+e.message+" ("+this.qa+")")}this.S=mb(a,"ChipSet");this.H=0;this.ra=3;Sb(b,this,this.W?Pm:Qm);Ub(b,this,this.W?Rm:Sm);this.W&&(this.H++,this.S&&5180==this.S.ca&&this.H++,this.ra=2,b.S[496]=2,b.P[496]=2);$d(c,19,this.zl.bind(this));$d(c,64,this.Al.bind(this));this.reset();Tm(this)||t(this)};
l.Ub=function(a,b){if(!b)if(!a||!this.restore)Um(this),this.ba.pg&&Tm(this,!0);else if(!this.restore(a))return!1;return!0};l.Tb=function(a){return a?this.save():!0};l.ue=function(){return this.ba?this.ba.ue():""};l.yd=function(){return this.ba?this.ba.yd():""};l.reset=function(){Um(this,null,!0)};l.save=function(){var a=new de(this);a.set(0,Vm(this));return a.data()};l.restore=function(a){return Um(this,a[0])};
function Um(a,b,c){var d=0,e=!0;a.Qa=-1;if(a.W){if(b||(b=[0,0,0,0,0,0,0,64,0,[0,-1]]),a.K=b[d++],a.za=b[d++],a.L=b[d++],a.oa=b[d++],a.ma=b[d++],a.ka=b[d++],a.Z=b[d++],a.aa=b[d++],a.pa=b[d++],a.P=b[d++],"object"==typeof a.P){var f=a.P;a.P=f[0];a.Qa=f[1]}}else b||(b=[0,0,Array(14),0,0]),a.da=b[d++],a.aa=b[d++],a.I=b[d++],a.G=b[d++],a.D=b[d++],a.xa=b[d++],a.va=b[d++],a.ua=b[d++],f=b[d++],void 0!==f?a.Y=f:void 0===a.Y&&(a.Y=-1);void 0===a.B&&(a.B=Array(a.ha.length));b=b[d];void 0===b&&(b=[]);for(d=0;d<
a.B.length;d++){void 0===a.B[d]&&(a.B[d]={});var f=a.B[d],g=a,h=d,k=f,m=a.ha[d],q=b[d],y=c,w=0,z=!0;q||(q=[0,0,!1,Array(8)]);k.Qa=h;k.errorCode=q[w++];k.Kj=q[w++];k.qe=q[w++];k.fe=q[w++];k.ge=q[w++];k.Ya=q[w++];k.jb=q[w++];k.Hd=q[w++];k.mb=q[w++];k.vd=q[w++];k.vb=q[w++];k.yf=g.W?0:1;k.name=m.name;void 0===k.name&&(k.name="Hard Drive");k.path=m.path;k.mode=m.mode||(k.path?"preload":"local");"demandro"!=k.mode&&"demandrw"!=k.mode||g.yd()||(k.mode="local");k.type=m.type;if(void 0===k.type||void 0===
Om[g.H][k.type])k.type=g.ra;m=Om[g.H][k.type];k.eb=m[2]||17;k.nb=m[3]||512;if(y&&g.S){var m=g.S,B=k.type;if(m.B){var y=null,Q=m.B[18];15<B&&(y=B,B=15);h?(Q=Q&240|B,B=26):(Q=Q&15|B<<4,B=25);var V=m;V.B&&(V.B[18]=Q,dj(V));null!=y&&m.B&&(m.B[B]=y,dj(m))}}void 0===k.ta&&(k.ta=null,g.Ba("Type "+k.type+' "'+k.name+'" is fixed disk '+h,!0));Wm(g,k);k.Ua=q[w++];k.Wa=null;k.ta&&(g=q[w],void 0!==g&&0>k.ta.restore(g)&&(z=!1),z&&void 0!==k.Ua&&(k.Wa=k.ta.seek(k.Hd,k.Ya,k.mb+k.yf)));z||(e=!1);null!=a.da&&1>=d&&
(a.da|=(f.type&3)<<(1-d<<1))}0<=a.Qa&&(a.C=a.B[a.Qa]);return e}
function Vm(a){var b=0,c=[];a.W?(c[b++]=a.K,c[b++]=a.za,c[b++]=a.L,c[b++]=a.oa,c[b++]=a.ma,c[b++]=a.ka,c[b++]=a.Z,c[b++]=a.aa,c[b++]=a.pa,c[b++]=[a.P,a.Qa]):(c[b++]=a.da,c[b++]=a.aa,c[b++]=a.I,c[b++]=a.G,c[b++]=a.D,c[b++]=a.xa,c[b++]=a.va,c[b++]=a.ua,c[b++]=a.Y);for(var d=0,e=[],f=0;f<a.B.length;f++){var g=d++,h=a.B[f],k=0,m=[];m[k++]=h.errorCode;m[k++]=h.Kj;m[k++]=h.qe;m[k++]=h.fe;m[k++]=h.ge;m[k++]=h.Ya;m[k++]=h.jb;m[k++]=h.Hd;m[k++]=h.mb;m[k++]=h.vd;m[k++]=h.vb;m[k++]=h.Ua;m[k]=h.ta?h.ta.save():
null;e[g]=m}c[b]=e;return c}function Wm(a,b,c){if(b){var d=0,e=0;null==c&&((d=b.fe[2])?e=b.fe[0]<<8|b.fe[1]:c=b.type);null==c||d||(d=Om[a.H][c][1],e=Om[a.H][c][0]);d&&((c=Om[a.H][b.type])&&e!=c[0]&&d!=c[1]&&a.Ba("Warning: drive parameters ("+e+","+d+") do not match drive type "+b.type+" ("+c[0]+","+c[1]+")"),b.ib=e,b.jb=d,null==b.ta&&(b.ta=new cm(a,b,b.mode)))}}
function Tm(a,b){b||(a.R=0);for(var c=0;c<a.B.length;c++){var d=a.B[c];if(d.name&&d.path){if(!(b&&d.ta&&d.ta.Gf)){var e;e=a;var f=d.name,d=d.path,g=e.B[c];g.ne?(e.Ba("Drive "+c+" busy"),e=!0):(g.ne=!0,g.Od=!0,e.R++,(g.ta||new cm(e,g,g.mode)).load(f,d,null,e.kk),e=!1);!e&&b&&t(a,!1)}}else b&&void 0!==d.type&&(d.ta=null,Wm(a,d,d.type))}return!!a.R}
l.kk=function(a,b,c){a.ne=!1;if(a.ta=b)this.Ba('Mounted disk "'+c+'" in drive '+String.fromCharCode(67+a.Qa),a.Od),b=b.info(),b[0]==a.ib&&b[1]==a.jb&&b[2]==a.eb&&b[3]==a.nb||this.Ba("Warning: disk geometry ("+b[0]+":"+b[1]+":"+b[2]+") does not match "+Nm[this.H]+" drive type "+a.type+" ("+a.ib+":"+a.jb+":"+a.eb+")");a.Od&&(a.Od=!1,--this.R||t(this))};l.wl=function(){var a=0;this.G<this.D&&(a=this.I[this.G]);this.S&&Te(this.S,5);this.aa&=-33;++this.G>=this.D&&(this.G=this.D=0,this.aa&=-15);return a};
l.Im=function(a,b){this.D<this.I.length&&(this.I[this.D++]=b);a=12!=this.I[0]?6:this.I.length;6==this.D&&(this.aa&=-2);this.D>=a&&(this.aa|=2,this.aa&=-2,Xm(this))};l.xl=function(){var a=this.aa;this.G<this.D&&(this.aa|=1);return a};l.Lm=function(a,b){this.xa=b;this.S&&Te(this.S,5);Um(this)};l.vl=function(){return this.da};l.Km=function(a,b){this.va=b;this.aa=13};l.Jm=function(a,b){this.ua=b};l.nh=function(){};
function Ym(a){var b=-1;a.C&&(b=a.ze(a.C,function(){}),(1==a.C.Ua||a.C.Ua==a.C.nb)&&1<a.C.Ua&&(a.C.vb-=a.C.nb,a.L=a.L-1&255,a.C.vb>=a.C.nb?(a.aa=128,a.ze(a.C,function(b){0<=b?(Zm(a),a.S&&5180==a.S.ca&&(a.aa=0),a.aa|=88):(a.aa=1,a.K=16)},!1)):a.aa=80));return b}l.Xj=function(){return Ym(this)|Ym(this)<<8};function $m(a,b){a.C&&a.C.vb>=a.C.nb&&(0>an(a.C,b)?(a.aa=1,a.K=16):(1==a.C.Ua||a.C.Ua==a.C.nb)&&1<a.C.Ua&&(a.C.vb-=a.C.nb,a.L=a.L-1&255,Zm(a),a.aa=80,a.C.vb>=a.C.nb&&(a.aa|=8)))}
l.Tl=function(a,b){$m(this,b&255);$m(this,b>>8&255)};l.Dk=function(){return this.K};l.Yl=function(a,b){this.za=b};l.Fk=function(){return this.L};l.Wl=function(a,b){this.L=b};l.Gk=function(){return this.oa};l.Xl=function(a,b){this.oa=b};l.Bk=function(){return this.ma};l.Sl=function(a,b){this.ma=b};l.Ak=function(){return this.ka};l.Rl=function(a,b){this.ka=b};l.Ck=function(){return this.Z};l.Ul=function(a,b){this.Z=b;this.aa=this.B[this.Z&16?1:0]?this.aa|80:this.aa&-65};
l.Hk=function(){var a=this.aa;this.aa&64&&(this.aa&=-129);return a};l.Ql=function(a,b){this.pa=b;this.S&&Te(this.S,14);en(this)};l.Vl=function(a,b){this.P&4&&!(b&4)&&(this.K=1);this.P=b};
function en(a){var b=!1,c=a.pa,d=a.Z&16?1:0,e=a.Z&15,f=a.ma|(a.ka&3)<<8,g=a.oa,h=a.L||256;a.Qa=-1;a.C=null;a.K=0;a.aa=80;var k=a.B[d];k?(k.Hd=f,k.Ya=e,k.mb=g,k.vb=h*k.nb,c=144<=c?c:c&240,k.Wa=null,k.Ua=0,k.errorCode=0,a.Qa=d,a.C=k):c=-1;switch(c&240){case 16:b=!0;break;case 32:a.aa=128;a.ze(k,function(b){0<=b&&a.S?(Zm(a),a.aa=88):(a.aa=1,a.K=16)},!1);break;case 48:a.aa=8;break;case 64:b=!0;break;case 112:b=!0;break;case 144:a.K=1;b=!0;break;case 145:k.jb=e+1,k.eb=h,b=!0}b&&Zm(a)}
function Zm(a){!a.S||a.P&2||Ue(a.S,14,120)}
function Xm(a){a.G=0;var b=fn(a),c=fn(a),d=c&32,e=d>>5,f=c&31,g=fn(a),h=fn(a),k=g<<2&768|h,m=g&63,q=fn(a),y=fn(a),w=a.B[e];w&&(w.Hd=k,w.Ya=f,w.mb=m,w.vb=q*w.nb);switch(b){case 3:gn(a,w?w.errorCode:4);hn(a,c);hn(a,g);hn(a,h);hn(a,0|d);b=-1;break;case 12:for(c=0;0<=(b=fn(a));)w&&c<w.fe.length&&(w.fe[c++]=b);w&&Wm(a,w);b=0;w||a.Y!=e||(a.Y=-1,b=2);gn(a,b|d);b=-1;break;case 224:case 228:gn(a,0|d),b=-1}if(0<=b)switch(void 0===w?b=-1:(w.errorCode=0,w.Kj=0),b){case 0:gn(a,0|d);break;case 1:w.Me=y;gn(a,0|
d);break;case 5:gn(a,0|d);break;case 8:jn(a,w,function(b){gn(a,b|d)});break;case 10:kn(a,w,function(b){gn(a,b|d)});break;case 15:ln(a,w,function(b){gn(a,b|d)});break;default:gn(a,2|d)}}function fn(a){var b=-1;a.G<a.D&&(b=a.I[a.G++]);return b}function gn(a,b){a.G=a.D=0;void 0!==b&&hn(a,b);a.S&&Ue(a.S,5);a.aa|=32}function hn(a,b){a.I[a.D++]=b}l.Vj=function(a,b,c){void 0===b||0>b?this.ze(a,c):c(-1,!1)};l.Wj=function(a,b){return void 0!==b&&0<=b?an(a,b):-1};
l.ik=function(a,b){void 0!==b&&0<=b?(a.Ua<a.ge.length?a.ge[a.Ua++]=b:(a.errorCode=20,b=-1),a=b):a=-1;return a};l.jk=function(a,b){if(void 0!==b&&0<=b)a:if(a.errorCode)a=-1;else{a.Oc[a.ke++]=b;if(a.ke==a.Oc.length){a.Hd=a.Oc[0];a.Ya=a.Oc[1];a.mb=a.Oc[2];a.vb=128<<a.Oc[3];for(var c=a.ke=0;c<a.vb;c++)if(0>an(a,a.gi)){a=-1;break a}a.Af++}a.Af>=a.vd&&(b=-1);a=b}else a=-1;return a};
function jn(a,b,c){b.errorCode=4;if(b.ta&&(b.Wa=null,a.S)){b.errorCode=0;Fj(a.S,3,a,"dmaRead",b);Bj(a.S,3,function(a){a||0!=b.errorCode||(b.errorCode=4);c(b.errorCode?2:0)});return}c(b.errorCode?2:0)}function kn(a,b,c){b.errorCode=4;if(b.ta&&(b.Wa=null,a.S)){b.errorCode=0;Fj(a.S,3,a,"dmaWrite",b);Bj(a.S,3,function(a){a||(0==b.errorCode&&(b.errorCode=4),20==b.errorCode&&(b.errorCode=0));c(b.errorCode?2:0)});return}c(b.errorCode?2:0)}
function ln(a,b,c){b.errorCode=4;b.ge&&b.ge.length==b.vb||(b.ge=Array(b.vb));b.Ua=0;a.S?(b.errorCode=0,Fj(a.S,3,a,"dmaWriteBuffer",b),Bj(a.S,3,function(a){a||0!=b.errorCode||(b.errorCode=4);c(b.errorCode?2:0)})):c(b.errorCode?2:0)}
l.ze=function(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.Wa&&(f=a.Ua,d=a.ta.read(a.Wa,a.Ua),a.Ua+=g,0<=d))return e=a.Wa,b&&b(d,!1,e,f),d;if(b){if(a.ta)return a.ta.seek(a.Hd,a.Ya,a.mb+a.yf,!1,function(c,k){(a.Wa=c)?(e=c,f=a.Ua=0,mn(a),d=a.ta.read(a.Wa,a.Ua),a.Ua+=g):a.errorCode=20;b(d,k,e,f)}),d;a.errorCode=20;b(d,!1,e,f)}return d};
function an(a,b){if(a.errorCode)return-1;do{if(a.Wa&&a.ta.write(a.Wa,a.Ua++,b))break;a.ta&&a.ta.seek(a.Hd,a.Ya,a.mb+a.yf,!0,function(b){a.Wa=b});if(!a.Wa){a.errorCode=20;b=-1;break}a.Ua=0;mn(a)}while(1);return b}function mn(a){a.mb++;var b=1-a.yf;a.mb>=a.eb+b&&(a.mb=b,a.Ya++,a.Ya>=a.jb&&(a.Ya=0,a.Hd++))}l.zl=function(){var a=this.A.M&255;!(this.A.J>>8)&&128<a&&(this.Y=a-128);return!0};l.Al=function(){var a;(a=this.A.J>>8||!this.S)||(a=!(this.S.gc[0].Uc&64));return a?!0:!1};
var Qm={800:Z.prototype.wl,801:Z.prototype.xl,802:Z.prototype.vl},Pm={496:Z.prototype.Xj,497:Z.prototype.Dk,498:Z.prototype.Fk,499:Z.prototype.Gk,500:Z.prototype.Bk,501:Z.prototype.Ak,502:Z.prototype.Ck,503:Z.prototype.Hk},Sm={800:Z.prototype.Im,801:Z.prototype.Lm,802:Z.prototype.Km,803:Z.prototype.Jm,807:Z.prototype.nh,811:Z.prototype.nh,815:Z.prototype.nh},Rm={496:Z.prototype.Tl,497:Z.prototype.Yl,498:Z.prototype.Wl,499:Z.prototype.Xl,500:Z.prototype.Sl,501:Z.prototype.Rl,502:Z.prototype.Ul,503:Z.prototype.Ql,
1014:Z.prototype.Vl};Ga(function(){for(var a=bb(document,"pcx86","hdc"),b=0;b<a.length;b++){var c=a[b],d=Za(c),d=new Z(d);ab(d,c)}});
function nn(a,b,c){Ka.call(this,"Computer",a,nn);this.ea.Vb=!1;on(this,b);this.ba=nc(this,"autoPower",a);this.G=0;this.da=a.busWidth||a.buswidth;this.B=pn;this.R=null;this.K=this.Z=!1;this.ha=nc(this,"url")||"";this.ma=(Math.random()+.1).toString(36).substr(2,12);this.C=qn(this);if(this.A=Ya("CPU",this.id)){this.Ia=Ya("Debugger",this.id);this.I=[];for(b=null;b=mb(this,"Video",b);)this.I.push(b);this.ia=new ub({id:this.Fe+".bus",busWidth:this.da},this.A,this.Ia);var d,e=Wa(this.id);if((this.D=Ya("Panel",
this.id))&&this.D.ng)for(b=0;b<e.length;b++)d=e[b],d.Ba=this.D.Ba,d.rc=this.D.rc,d.ng=this.D.ng;this.rc("PCx86 v1.30.1\nCopyright \u00a9 2012-2016 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");for(b=0;b<e.length;b++)d=e[b],d.pc&&d.pc(this,this.ia,this.A,this.Ia);b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.S=d:this.B=parseInt(d,10));var f;if(a=nc(this,"state")||(f=!0,a.state))b=this.W=a,f||(this.K=!0,this.B=pn),this.B&&(this.P=new de(this,"1.30.1"),
this.P.load()?b=null:delete this.P);!b&&this.B&&(b=rn(this))&&(this.K=!0);if(b){var g=this;sa(b,null,!0,function(a,b,c){c?(g.S=null,g.K=!1,g.Ba("Unable to load machine state from server (error "+c+(b?": "+la(b):"")+")")):(g.R=b,g.Z=!0);t(g)})}else t(this);this.la.power||(this.ba=!0);!c&&this.ba&&sn(this,this.gf)}else r("Unable to find CPU component")}Ta(nn);var pn=0;l=nn.prototype;l.ue=function(){return this.ma};
function on(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){r(d.message+" ("+c+")")}}a.L=b}function nc(a,b,c){var d=b.toLowerCase(),d=Na[b]||Na[d];void 0===d&&a.L&&(d=a.L[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}l.yd=function(){return this.C||""};function sn(a,b,c){for(var d=Wa(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!db(f)){db(f,function(){sn(a,b,c)});return}}b.call(a,c)}
function tn(a,b){var c=new de(a,"1.30.1","validate");if(c.load()&&un(c)){var d=c.get("timestamp"),e=b?b.get("timestamp"):"unknown";d!=e&&(a.Ba("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}
l.gf=function(a){void 0===a&&(a=this.B||(this.R?1:pn));if(!this.G){this.G++;var b=!1,c=!1;this.Y=!1;var d=this.P||new de(this,"1.30.1");if(-1==a)b=!0;else if(a>pn){if(d.load(this.R)){this.H=new de(this,"1.30.1","failsafe");this.H.load()&&(vn(this,d),a=2,wn(this.H));this.H.set("timestamp",oa());xn(this.H);var e=this.B&&!this.K;if(1==a||ua("Click OK to restore the previous PCx86 machine state, or CANCEL to reset the machine.")){if(c=un(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g):("error"==
f&&"no machine state"!=g?(this.Ba("Error: "+g),"unable to verify user"==g&&(ya("user",""),this.C=null)):this.rc(f+": "+g),wn(d),d.load()?(c=un(d),e=!0):c=!1))}e&&tn(this,c?d:null)}else 2==a&&d.clear()}else tn(this);delete this.R;delete this.P}e=Wa(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.A&&(c=yn(this,g,d,b,c));b=[d,a,c];-1!=a?sn(this,this.pi,b):this.pi(b)}};
function yn(a,b,c,d,e){if(!b.ea.Vb){b.ea.Vb=!0;if(b.Ub){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/[a-z0-9]\./i,"."))));"string"===typeof f&&(f=null);!b.Ub(f,d)&&f&&(r("Unable to restore state for "+b.type),a.W&&!a.Z?(c.clear(),a.B=pn,window&&window.location.reload()):a.Y=!0,b.Ub(null),e=!1)}if(!d&&b.Yh)for(a=b.Yh.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
l.pi=function(a){var b=a[0],c=0>a[1];a=a[2];this.ka=!0;this.ea.Vb=!0;var d=this.la.power;d&&(d.textContent="Shutdown");this.A&&(yn(this,this.A,b,c,a),this.A.Le());this.Y&&(vn(this,b),b.clear());!c&&this.H&&(this.H.clear(),delete this.H);this.G=0};
function vn(a,b){if(ua("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.yd();b=b.toString();var d={app:"PCx86",ver:"1.30.1"};d.url=a.ha;d.user=c;d.type="bug";d.data=b;sa("http://www.pcjs.org/api/v1/report",d,!0)}}
function zn(a,b,c){var d,e="none";if(a.G)return null;a.G--;var f=new de(a,"1.30.1"),g=new de(a,"1.30.1","validate"),h=oa();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.A&&a.A.Tb&&(c&&rc(a.A),d=a.A.Tb(b,c),"object"===typeof d&&f.set(a.A.id,d),c&&(a.A.ea.Vb=!1,!1===d&&(e=null)));for(var h=Wa(a.id),k=0;k<h.length;k++){var m=h[k];m.ea.Vb&&(m.Tb&&(d=m.Tb(b,c),"object"===typeof d&&
f.set(m.id,d)),c&&(m.ea.Vb=!1,!1===d&&(e=null)))}e&&(c?(h=d=!1,b?(a.C&&An(a,a.C,f.toString()),xn(g)&&xn(f)||(e=null,d=h=!0)):a.B&&(d=!0,h=3==a.B),d&&f.clear(h)):e=f.toString());c&&(a.ea.Vb=!1,b=a.la.power)&&(b.textContent="Power");a.G=0;return e}l.reset=function(){this.ia&&this.ia.reset&&this.ia.reset();for(var a=Wa(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.ia&&c.reset&&c.reset()}};
l.start=function(a,b){for(var c=Wa(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=Wa(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}};
l.zb=function(a,b,c){var d=this;switch(b){case "power":return this.la[b]=c,c.onclick=function(){d.G||(d.ea.Vb?zn(d,!1,!0):sn(d,d.gf))},!0;case "reset":return this.la[b]=c,c.onclick=function(){if(d.ea.Vb&&!d.G)if(d.B&&!d.S){var a=ua("Click OK to save changes to this PCx86 machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");zn(d,a,!0);!a&&d.W?window&&window.location.reload():(a||(d.pg=!0),d.gf(pn),d.pg=!1)}else d.reset(),d.A&&d.A.Le()},!0;case "save":if(ia(ta(),"pcjs.org"))c.parentNode.removeChild(c);
else return this.la[b]=c,c.onclick=function(){var a=qn(d,!0);if(a){var b=!!(d.B&&!d.S||d.W),c=zn(d,b);b?An(d,a,c):d.Ba("Resume disabled, machine state not saved")}},!0}return!1};
function qn(a,b){var c=a.C;c||((c=xa("user"),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=Bn(a,c))||a.Ba("The user ID is invalid.")):b&&a.Ba("Browser local storage is not available"));return c}
function Bn(a,b){a.C=null;b=sa(ta()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(ya("user",b.data),a.C=b.data)}catch(d){r(d.message+" ("+c+")")}return a.C}function rn(a){var b=null;a.C&&(b=ta()+"/api/v1/user?req=load&user="+a.C+"&state="+Cn(a,"1.30.1"));return b}
function An(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=Cn(a,"1.30.1");d.data=c;b=sa(ta()+"/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.Ba("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.Ba(c),ya("user",""),a.C=null)}}
function mb(a,b,c){a=Wa(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 xc(a,b){if(a.I.length){var c=0,d=0;b&&window&&(c=window.scrollX,d=window.scrollY);a=a.I[0];a.G&&a.G.focus();b&&window&&window.scrollTo(c,d)}}l.Zd=function(a){this.A&&this.A.Zd(a);this.D&&this.D.Zd(a)};
function Ac(a,b){for(var c=0;c<a.I.length;c++)nl(a.I[c],b);if(a.D&&(a=a.D,a.ua)){rb(a,18,a.S,a.ra);if(a.Ga){b=a.ia;var c=a.B,d,e;null==d&&(d=0);null==e&&(e=b.L-d|0);c||(c={mg:0,fd:0,fg:[]});var f=d>>>b.da;d=d+e-1>>>b.da;c.mg=0;for(c.fd=0;f<=d;)e=b.R[f],c.mg+=e.size,e.size&&(c.fg.push(qa(qb,f,0,0,e.type)),c.fd++),f++;a.B=c;a.ma=a.B.fd*a.ia.xb/691200;d=0;a.B.ii=0;a.B.Ke||(a.B.Ke=[]);e=-1;b=0;for(var g=-1,c=0;c<a.B.fd;c++){var h=a.B.fg[c],f=ra(qb.type,h),h=ra(qb.Cj,h);if(f!=e||h!=g+1)(g=c-b)&&(d+=tb(a,
b,g,e)),e=f,b=c;g=h}d+=tb(a,b,c-b,e);e=a.B.fk!=d;a.B.fk=d;if(e){e=new kb(0,0,a.S.width,a.S.height);a.B.ee=[];b=a.B.fd;for(d=0;d<a.B.ii;d++)c=a.B.Ke[d].fd,a.B.ee.push(lb(e,c,b,!d)),b-=c;for(d=0;d<a.B.ee.length;d++)e=a.B.Ke[d],b=c=a.B.ee[d],f=a.ra,(g=ac[e.type])||(g=new jb),f.strokeStyle="black",f.strokeRect(b.x,b.y,b.Fc,b.A),f.fillStyle="string"==typeof g?g:g.toString(),f.fillRect(b.x,b.y,b.Fc,b.A),b=a,f=c,b.P=b.ha,b.L=b.ka,c=f.x+(f.Fc>>1),g=f.y+(f.A>>1),h=f.A,f.Fc<f.A&&(h=f.Fc,b.da=!0,b.G.save(),
b.G.translate(c,g),b.G.rotate(-Math.PI/2),c=g=0),h<b.L&&(b.L=h,b.P=b.L+"px Monaco, Lucida Console, Courier New"),f=g,b.D=c,b.K=f,b=a,e=Bb[e.type]+" ("+(e.fd*a.ia.xb/1024|0)+"Kb)",b.G.font=b.P,b.D-=b.G.measureText(e).width>>1,b.K+=(b.L>>1)-2,sb(b,e),b.da&&(b.G.restore(),b.da=!1)}}else sb(a,"This space intentionally left blank");a.context.drawImage(a.S,0,0,a.S.width,a.S.height,a.Oa,a.Xa,a.Da,a.Fa);a.ua=!1}}
Ga(function(){for(var a=bb(document,"pcx86-machine"),b=0;b<a.length;b++)for(var c=a[b],d=Za(c),c=bb(c,"pcx86","computer"),e=0;e<c.length;e++){var f=c[e],g=Za(f),g=new nn(g,d,!0);ab(g,f);g.ba&&sn(g,g.gf)}});Ba.show.push(function(){for(var a=bb(document,"pcx86","computer"),b=0;b<a.length;b++){var c=Za(a[b]);(c=Ya("Computer",c.id))&&c.ka&&!c.ea.Vb&&c.gf(-1)}});
Ba.exit.push(function(){for(var a=bb(document,"pcx86","computer"),b=0;b<a.length;b++){var c=Za(a[b]);(c=Ya("Computer",c.id))&&c.ea.Vb&&zn(c,!(!c.B||c.S),!0)}});function de(a,b,c){this.id=a.id;this.key=Cn(a,b,c);this.Ia=a.Ia;wn(this,a.Gj)}function Cn(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}
de.prototype={constructor:de,set:function(a,b){try{this[this.id][a]=b}catch(c){}},get:function(a){return this[this.id][a]||null},value:function(){return this[this.id]},data:function(){return this[this.id]},load:function(a){return a?(this[this.id]=a,this.A=!0):this.A?!0:wa()&&(a=xa(this.key))?(this[this.id]=a,this.A=!0):!1},toString:function(){var a=this[this.id];return"string"==typeof a?a:JSON.stringify(a)},clear:function(a){wn(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 wn(a,b){a[a.id]={};b&&a.set("parms",b);a.A=!1}function xn(a){var b=!0;if(wa()){var c=JSON.stringify(a[a.id]);ya(a.key,c)||(r("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}function un(a){var b=!0;try{a[a.id]=JSON.parse(a[a.id])}catch(c){r(c.message||c),b=!1}return b}var Dn=0;
function En(a,b,c,d,e,f){e("Loading "+a+"...");sa(a,null,!0,function(g,h,k){k?(h||(h="unable to load "+a+" ("+k+")"),f(h,null)):Fn(h,a,b,c,d,e,f)})}
function Fn(a,b,c,d,e,f,g){function h(a,f){if(f)g(f,null);else{c&&(Va(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),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(q){f=null,a=q.message}else a="unrecognized XML: "+(255<a.length?a.substr(0,255)+"...":a);g(a,f)}}a?e?Gn(a,f,h):h(a,null):g("no data"+(b?" for file: "+b:""),null)}
function Gn(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");sa(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,q=/( [a-z]+=)(['"])(.*?)\2/g;m=q.exec(f);)k=0>k.indexOf(m[1])?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);Gn(a,b,c)}})}else c(a,null)}
function Hn(a,b,c,d){function e(a){if(void 0===h){var b=g&&bb(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=ka(a))}function f(a){e("Error: "+a);k&&(--Dn||Ia(!0));k=!1}var g,h,k=!0;Dn++;Ua[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],y=document.createElement("style");y.type="text/css";y.styleSheet?y.styleSheet.cssText=m:y.appendChild(document.createTextNode(m));q.appendChild(y)}c||
(c="/versions/pcx86/1.30.1/components.xsl");m=function(d,h){h?En(c,null,null,!1,e,function(d,k){k?(Va(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--Dn||Ia(!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),--Dn||Ia(!0)):f("invalid machine element: "+
a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?En(b,a,d,!0,e,m):Fn(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(w){f(w.message)}return k}function In(a,b,c,d){Ia(!1);return Hn(a,b,c,d)}window.embedPC=In;window.embedPCx86=In;window.enableEvents=Ia;window.sendEvent=Ja;
function Jn(a,b,c,d){if(!c&&b){d.push(b);a=Ua[d[0]];b=null;for(var e in a)if(ia(e,"components.xsl")){b=e.replace(".xsl",".css");break}b?sa(b,null,!0,function(a,b){Kn(b,d)}):Kn(null,d)}else r("Error ("+c+") requesting "+a)}
function Kn(a,b){var c,d,e,f=b[0],g=b[1];c=b[4];c=c.match(/^(\s*\(function\(\)\{)([\s\S]*)(}\)\(\);\s*)$/);var h=Ua[f],k={},m;for(m in h){var q=h[m],y=ha(m);if("xml"==y){for(y=/[ \t]*<disk [^>]*path=(['"])(.*?)\1.*?<\/disk>\n?/g;d=y.exec(h[m]);){var w=d[2];w&&(h[w]||(q=q.replace(d[0],"")))}d=m=ga(m)}else"xsl"==y&&(e=m=ga(m));k[m]=q}a&&(k[m="css"]=a);b[2]&&(k[m="parms"]=b[2]);b[3]&&(k[m="state"]=b[3]);d&&e?(a=JSON.stringify(k),g+=".js",c=c[1]+"var resources="+a+";"+c[2]+c[3],c=c.replace(/\u00A9/g,
"&#xA9;"),a=Aa(c,"javascript",!1,g),a=a+(', copy it to your web server as "'+g+'", and then add the following to your web page:\n\n')+('<div id="'+f+'"></div>\n')+"...\n",a=a+('<script type="text/javascript" src="'+g+'">\x3c/script>\n')+('<script type="text/javascript">embedPC("'+f+'","'+d+'","'+e+'");\x3c/script>\n\n')+"The machine should appear where the <div> is located.",r(a)):r("Missing XML/XSL resources")}
window.savePC=function(a,b,c){var d=Ya("Computer",a),e=Ya("Debugger",a);if(d){var f=zn(d,!0),g=d.L?JSON.stringify(d.L):null;b||(b="/versions/pcjs/1.30.1/pc"+(e?"-dbg":"")+".js");if(c&&c({state:f,Gj:g}))return!0;sa(b,null,!0,function(c,d,e){Jn(c,d,e,[a,ga(b,!0),g,f])});return!0}r("Unable to identify machine '"+a+"'");return!1};})();