(function(B,C,D,E,F,G,q,r,s,t,u,n,H,v,I,w,x,K,y,z,A,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,aa,ba,ca,da,ea,fa,ga,ha,ia,ja,ka,la,ma,na,oa,pa,qa,ra,k,m){q("JV");y(JV,"JmolStateCreator",null);q("JV");s(["JV.JmolStateCreator","java.util.Hashtable"],"JV.StateCreator","java.util.Arrays $.Date JU.BS $.Lst $.P3 $.PT $.SB J.c.PAL $.STR $.VDW JM.AtomCollection $.Bond $.BondSet JS.T J.shape.Shape JU.BSUtil $.C $.ColorEncoder $.Edge $.Escape $.Font $.Logger JV.GlobalSettings $.JC $.StateManager $.Viewer".split(" "),
function(){var h=u(function(){this.undoWorking=!1;this.temp4=this.temp3=this.temp2=this.temp=this.vwr=this.actionStatesRedo=this.actionStates=null;t(this,arguments)},JV,"StateCreator",JV.JmolStateCreator);z(h,function(){this.temp=new java.util.Hashtable;this.temp2=new java.util.Hashtable;this.temp3=new java.util.Hashtable;this.temp4=new java.util.Hashtable});v(h,function(){A(this,JV.StateCreator,[]);this.actionStates=new JU.Lst;this.actionStatesRedo=new JU.Lst});m(h,"setViewer",function(a){this.vwr=
a},"JV.Viewer");m(h,"getStateScript",function(a,b,d){var c=null==a||a.equalsIgnoreCase("all"),e=new JU.SB,f=c?(new JU.SB).append("function _setState() {\n"):null;c&&(e.append("# Jmol state version "+JV.Viewer.getJmolVersion()+";\n"),this.vwr.isApplet&&(this.app(e,"# fullName = "+JU.PT.esc(this.vwr.fullName)),this.app(e,"# documentBase = "+JU.PT.esc(JV.Viewer.appletDocumentBase)),this.app(e,"# codeBase = "+JU.PT.esc(JV.Viewer.appletCodeBase)),e.append("\n")));var g=this.vwr.g;(c||a.equalsIgnoreCase("windowState"))&&
e.append(this.getWindowState(f,b,d));(c||a.equalsIgnoreCase("fileState"))&&e.append(this.getFileState(f));(c||a.equalsIgnoreCase("definedState"))&&e.append(this.getDefinedState(f,!0));(c||a.equalsIgnoreCase("variableState"))&&e.append(this.getParameterState(g,f));(c||a.equalsIgnoreCase("dataState"))&&e.append(this.getDataState(f));(c||a.equalsIgnoreCase("modelState"))&&e.append(this.getModelState(f,!0,this.vwr.getBooleanProperty("saveProteinStructureState")));(c||a.equalsIgnoreCase("colorState"))&&
e.append(this.getColorState(this.vwr.cm,f));(c||a.equalsIgnoreCase("frameState"))&&e.append(this.getAnimState(this.vwr.am,f));(c||a.equalsIgnoreCase("perspectiveState"))&&e.append(this.getViewState(this.vwr.tm,f));(c||a.equalsIgnoreCase("selectionState"))&&e.append(this.getSelectionState(this.vwr.slm,f));null!=f&&(this.app(f,"set refreshing true"),this.app(f,"set antialiasDisplay "+g.antialiasDisplay),this.app(f,"set antialiasTranslucent "+g.antialiasTranslucent),this.app(f,"set antialiasImages "+
g.antialiasImages),this.vwr.tm.spinOn&&!this.vwr.tm.vectorSpinOnly&&this.app(f,"spin on"),f.append("}\n\n_setState;\n"));c&&e.appendSB(f);return e.toString()},"~S,~N,~N");k(h,"getDataState",function(a){var b=new JU.SB,d=!1,c=this.getAtomicPropertyState(-1,null);0<c.length&&(d=!0,b.append(c));null!=this.vwr.userVdws&&(c=this.vwr.getDefaultVdwNameOrData(0,J.c.VDW.USER,this.vwr.bsUserVdws),0<c.length&&(d=!0,b.append(c)));null!=this.vwr.nmrCalculation&&(d=(new Boolean(d|this.vwr.nmrCalculation.getState(b))).valueOf());
null!=this.vwr.dm&&(d=(new Boolean(d|this.vwr.dm.getDataState(this,b))).valueOf());if(!d)return"";d="";null!=a&&(a.append("  _setDataState;\n"),d="function _setDataState() {\n",b.append("}\n\n"));return d+b.toString()},"JU.SB");k(h,"getDefinedState",function(a,b){var d=this.vwr.ms,c=d.stateScripts.size();if(0==c)return"";for(var e=!1,f=new JU.SB,g,l=0;l<c;l++){var p=d.stateScripts.get(l);if(p.inDefinedStateBlock&&0<(g=p.toString()).length)this.app(f,g),e=!0}if(!e)return"";g="";b&&null!=a&&(a.append("  _setDefinedState;\n"),
g="function _setDefinedState() {\n\n");null!=a&&f.append("\n}\n\n");return g+f.toString()},"JU.SB,~B");m(h,"getModelState",function(a,b,d){var c=new JU.SB;b&&null!=a&&(a.append("  _setModelState;\n"),c.append("function _setModelState() {\n"));var e,f=this.vwr.ms,g=f.bo,l=f.am,p=f.mc;if(b){for(var h=f.stateScripts.size(),j=0;j<h;j++){var k=f.stateScripts.get(j);!k.inDefinedStateBlock&&0<(e=k.toString()).length&&this.app(c,e)}e=new JU.SB;h=!1;if(null!=f.unitCells){k=!1;for(j=0;j<p;j++){var m=f.getUnitCell(j);
null!=m&&(e.setLength(0),m.getState(f,j,e)&&(h=!0,c.append("  frame ").append(f.getModelNumberDotted(j)).appendSB(e).append(";\n")),k=(new Boolean(k|0<=this.vwr.ms.getLastVibrationVector(j,1275072532))).valueOf())}h&&this.vwr.shm.loadShape(33);this.getShapeStatePriv(c,b,33);if(k){h=new java.util.Hashtable;for(j=p;0<=--j;)if(0<=(k=this.vwr.ms.getLastVibrationVector(j,1275072532)))for(m=l[j].firstAtomIndex;m<=k;m++){var n=f.getModulation(m);null!=n&&JU.BSUtil.setMapBitSet(h,m,m,n.getState())}c.append(this.getCommands(h,
null,"select"))}}e.setLength(0);for(j=0;j<f.bondCount;j++)if(null!=g[j]&&!l[g[j].atom1.mi].isModelKit&&(g[j].isHydrogen()||0!=(g[j].order&131072)))h=g[j],k=h.atom1.i,h.atom1.group.isAdded(k)&&(k=-1-k),e.appendI(k).appendC("\t").appendI(h.atom2.i).appendC("\t").appendI(h.order&131071).appendC("\t").appendD(h.mad/1E3).appendC("\t").appendD(h.getEnergy()).appendC("\t").append(JU.Edge.getBondOrderNameFromOrder(h.order)).append(";\n");0<e.length()&&c.append('data "connect_atoms"\n').appendSB(e).append('end "connect_atoms";\n');
c.append("\n")}if(f.haveHiddenBonds){e=new JM.BondSet;for(j=f.bondCount;0<=--j;)null!=g[j]&&(0!=g[j].mad&&0==(g[j].shapeVisibilityFlags&JM.Bond.myVisibilityFlag))&&e.set(j);e.isEmpty()?f.haveHiddenBonds=!1:c.append("  hide ").append(JU.Escape.eBond(e)).append(";\n")}this.vwr.setModelVisibility();d&&c.append(f.getProteinStructureState(null,b?1073742327:1073742158));for(j=0;j<p;j++)null!=l[j].mat4&&c.append("  frame orientation "+f.getModelNumberDotted(j)+JU.Escape.matrixToScript(l[j].mat4)+";\n");
this.getShapeStatePriv(c,b,2147483647);if(b){d=!1;for(j=0;j<p;j++)if(l[j].isJmolDataFrame){d=!0;break}e=new JU.SB;for(j=0;j<p;j++)g=l[j],e.setLength(0),h=f.getInfo(j,"modelID"),null!=h&&!h.equals(f.getInfo(j,"modelID0"))&&e.append("  frame ID ").append(JU.PT.esc(h)).append(";\n"),h=f.frameTitles[j],null!=h&&0<h.length&&e.append("  frame title ").append(JU.PT.esc(h)).append(";\n"),d&&(null!=g.orientation&&!f.isTrajectorySubFrame(j))&&e.append("  ").append(g.orientation.getMoveToText(!1)).append(";\n"),
0!=g.frameDelay&&!f.isTrajectorySubFrame(j)&&e.append("  frame delay ").appendF(g.frameDelay/1E3).append(";\n"),null!=g.simpleCage&&(e.append("  unitcell ").append(JU.Escape.eAP(g.simpleCage.getUnitCellVectors())).append(";\n"),this.getShapeStatePriv(e,b,33)),0<e.length()&&c.append("  frame "+f.getModelNumberDotted(j)+";\n").appendSB(e);c.append("  set fontScaling "+this.vwr.getBoolean(603979847)+";\n");this.vwr.is2D()&&c.append("  set mode2d TRUE;\n")}null!=a&&c.append("\n}\n\n");return c.toString()},
"JU.SB,~B,~B");k(h,"getWindowState",function(a,b,d){var c=this.vwr.g,e=new JU.SB;null!=a&&(a.append("  initialize;\n  set refreshing false;\n  _setWindowState;\n"),e.append("\nfunction _setWindowState() {\n"));0!=b&&e.append("# preferredWidthHeight ").appendI(b).append(" ").appendI(d).append(";\n");e.append("# width ").appendI(0==b?this.vwr.getScreenWidth():b).append(";\n# height ").appendI(0==d?this.vwr.getScreenHeight():d).append(";\n");this.app(e,"stateVersion = "+JV.JC.versionInt);this.app(e,
"background "+JU.Escape.escapeColor(c.objColors[0]));for(b=1;7>b;b++)0!=c.objColors[b]&&this.app(e,JV.StateManager.getObjectNameFromId(b)+'Color = "'+JU.Escape.escapeColor(c.objColors[b])+'"');null!=c.backgroundImageFileName&&this.app(e,"background IMAGE "+(c.backgroundImageFileName.startsWith(JV.JC.BASE64_TAG)?"":"/*file*/")+JU.PT.esc(c.backgroundImageFileName));e.append(this.getLightingState(!1));null!=a&&e.append("}\n\n");return e.toString()},"JU.SB,~N,~N");m(h,"getLightingState",function(a){var b=
new JU.SB,d=this.vwr.gdata;this.app(b,"set ambientPercent "+d.getAmbientPercent());this.app(b,"set diffusePercent "+d.getDiffusePercent());this.app(b,"set specular "+d.getSpecular());this.app(b,"set specularPercent "+d.getSpecularPercent());this.app(b,"set specularPower "+d.getSpecularPower());var c=d.getSpecularExponent(),e=d.getPhongExponent();this.app(b,Math.pow(2,c)==e?"set specularExponent "+c:"set phongExponent "+e);this.app(b,"set celShading "+d.getCel());this.app(b,"set celShadingPower "+
d.getCelPower());this.app(b,"set zShadePower "+this.vwr.g.zShadePower);a&&this.getZshadeState(b,this.vwr.tm,!0);return b.toString()},"~B");k(h,"getFileState",function(a){var b=new JU.SB;null!=a&&(a.append("  _setFileState;\n"),b.append("function _setFileState() {\n\n"));0>b.indexOf("append")&&this.vwr.getModelSetFileName().equals("zapped")&&b.append("  zap;\n");this.appendLoadStates(b);null!=a&&b.append("\n}\n\n");return b.toString()},"JU.SB");k(h,"appendLoadStates",function(a){var b=this.vwr.ligandModelSet;
if(null!=b)for(var d,b=b.keySet().iterator();b.hasNext()&&((d=b.next())||1);){var c=this.vwr.ligandModels.get(d+"_data");null!=c&&a.append("  ").append(JU.Escape.encapsulateData("ligand_"+d,c.trim()+"\n",0));c=this.vwr.ligandModels.get(d+"_file");null!=c&&a.append("  ").append(JU.Escape.encapsulateData("file_"+d,c.trim()+"\n",0))}var b=new JU.SB,c=this.vwr.ms,e=c.am,f=c.mc;for(d=0;d<f;d++)if(!c.isJmolDataFrame(d)&&!c.isTrajectorySubFrame(d)){var g=e[d],l=b.indexOf(g.loadState);(0>l||l!=b.lastIndexOf(g.loadState))&&
b.append(e[d].loadState);if(e[d].isModelKit)l=c.getModelAtomBitSetIncludingDeleted(d,!1),null!=c.tainted&&(null!=c.tainted[2]&&c.tainted[2].andNot(l),null!=c.tainted[3]&&c.tainted[3].andNot(l)),g.loadScript=new JU.SB,this.getInlineData(b,this.vwr.getModelExtract(l,!1,!0,"MOL"),0<d,null,null);else if(b.appendSB(g.loadScript),l=g.auxiliaryInfo.get("auxFiles"),null!=l)for(g=0;g<l.size();g++)b.append(";#FILE1="+JU.PT.esc(l.get(g))+";")}b=b.toString();if(0>b.indexOf('data "append ')){d=b.indexOf("load /*data*/");
g=b.indexOf("load /*file*/");0<=g&&g<d&&(d=g);if(0<=(g=b.indexOf('load "@'))&&g<d)d=g;0<=d&&(b=b.substring(0,d)+"zap;"+b.substring(d))}a.append(b)},"JU.SB");m(h,"getInlineData",function(a,b,d,c,e){d=(d?"append"+(null!=c&&c.intValue()!=this.vwr.ms.mc-1?" modelindex="+c:""):"model")+" inline";a.append('load /*data*/ data "').append(d).append('"\n').append(b).append('end "').append(d).append(null==e||0==e.length?"":" filter"+JU.PT.esc(e)).append('";')},"JU.SB,~S,~B,Integer,~S");k(h,"getColorState",function(a,
b){var d=new JU.SB,c=this.getCEState(a.ce,d);0<c&&null!=b&&b.append("\n  _setColorState\n");return 0<c&&null!=b?"function _setColorState() {\n"+d.append("}\n\n").toString():d.toString()},"JV.ColorManager,JU.SB");k(h,"getCEState",function(a,b){for(var d=0,c,e=a.schemes.entrySet().iterator();e.hasNext()&&((c=e.next())||1);){var f=c.getKey();0<f.length&&(!f.startsWith("=")&&0<=d++)&&b.append('color "'+f+"="+JU.ColorEncoder.getColorSchemeList(c.getValue())+'";\n')}return d},"JU.ColorEncoder,JU.SB");k(h,
"getAnimState",function(a,b){var d=this.vwr.ms.mc;if(2>d)return"";var c=new JU.SB;null!=b&&(b.append("  _setFrameState;\n"),c.append("function _setFrameState() {\n"));c.append("# frame state;\n");c.append("# modelCount ").appendI(d).append(";\n# first ").append(this.vwr.getModelNumberDotted(0)).append(";\n# last ").append(this.vwr.getModelNumberDotted(d-1)).append(";\n");0<=a.backgroundModelIndex&&this.app(c,"set backgroundModel "+this.vwr.getModelNumberDotted(a.backgroundModelIndex));if(null!=this.vwr.tm.bsFrameOffsets)this.app(c,
"frame align "+JU.Escape.eBS(this.vwr.tm.bsFrameOffsets));else if(null!=this.vwr.ms.translations)for(;0<=--d;){var e=this.vwr.ms.getTranslation(d);null!=e&&this.app(c,"frame "+this.vwr.ms.getModelNumberDotted(d)+" align "+e)}this.app(c,"frame RANGE "+a.getModelSpecial(-1)+" "+a.getModelSpecial(1));this.app(c,"animation DIRECTION "+(1==a.animationDirection?"+1":"-1"));this.app(c,"animation FPS "+a.animationFps);this.app(c,"animation MODE "+JS.T.nameOf(a.animationReplayMode)+" "+a.firstFrameDelay+" "+
a.lastFrameDelay);0<a.morphCount&&this.app(c,"animation MORPH "+a.morphCount);d=!0;null!=a.animationFrames&&(this.app(c,"anim frames "+JU.Escape.eAI(a.animationFrames)),d=a.caf,this.app(c,"frame "+(d+1)),d=a.cmi!=a.modelIndexForFrame(d));d&&(d=a.getModelSpecial(0),this.app(c,d.equals("0")?"frame *":"model "+d));this.app(c,"animation "+(!a.animationOn?"OFF":1==a.currentDirection?"PLAY":"PLAYREV"));a.animationOn&&a.animationPaused&&this.app(c,"animation PAUSE");a.splitFrame&&this.app(c,"frame "+this.vwr.getModelNumberDotted(a.getSplitFrameModelIndex(0))+
" "+this.vwr.getModelNumberDotted(a.getSplitFrameModelIndex(1))+" split");null!=b&&c.append("}\n\n");return c.toString()},"JV.AnimationManager,JU.SB");k(h,"getParameterState",function(a,b){var d=Array(a.htBooleanParameterFlags.size()+a.htNonbooleanParameterValues.size()),c=new JU.SB;null!=b&&(b.append("  _setParameterState;\n"),c.append("function _setParameterState() {\n\n"));for(var e=0,f,g=a.htBooleanParameterFlags.keySet().iterator();g.hasNext()&&((f=g.next())||1);)JV.GlobalSettings.doReportProperty(f)&&
(d[e++]="set "+f+" "+a.htBooleanParameterFlags.get(f));for(g=a.htNonbooleanParameterValues.keySet().iterator();g.hasNext()&&((f=g.next())||1);)if(JV.GlobalSettings.doReportProperty(f)){var l=a.htNonbooleanParameterValues.get(f);"="==f.charAt(0)?f=f.substring(1):(f=(0==f.indexOf("default")?" ":"")+"set "+f,l=JU.Escape.e(l));d[e++]=f+" "+l}switch(a.axesMode){case 603979808:d[e++]="set axes unitcell";break;case 603979804:d[e++]="set axes molecular";break;default:d[e++]="set axes window"}java.util.Arrays.sort(d,
0,e);for(f=0;f<e;f++)null!=d[f]&&this.app(c,d[f]);d=JV.StateManager.getVariableList(a.htUserVariables,0,!1,!0);0<d.length&&(c.append("\n#user-defined atom sets; \n"),c.append(d));null!=this.vwr.shm.getShape(5)&&c.append(this.getDefaultLabelState(this.vwr.shm.shapes[5]));a.haveSetStructureList&&(d=a.structureList,c.append("struture HELIX set "+JU.Escape.eAF(d.get(J.c.STR.HELIX))),c.append("struture SHEET set "+JU.Escape.eAF(d.get(J.c.STR.SHEET))),c.append("struture TURN set "+JU.Escape.eAF(d.get(J.c.STR.TURN))));
null!=b&&c.append("\n}\n\n");return c.toString()},"JV.GlobalSettings,JU.SB");k(h,"getDefaultLabelState",function(a){var b=(new JU.SB).append("\n# label defaults;\n");this.app(b,"select none");this.app(b,J.shape.Shape.getColorCommand("label",a.defaultPaletteID,a.defaultColix,a.translucentAllowed));this.app(b,"background label "+J.shape.Shape.encodeColor(a.defaultBgcolix));this.app(b,"set labelOffset "+JV.JC.getXOffset(a.defaultOffset)+" "+JV.JC.getYOffset(a.defaultOffset));var d=JV.JC.getHorizAlignmentName(a.defaultAlignment);
this.app(b,"set labelAlignment "+(5>d.length?"left":d));d=JV.JC.getPointerName(a.defaultPointer);this.app(b,"set labelPointer "+(0==d.length?"off":d));0!=(a.defaultZPos&32)?this.app(b,"set labelFront"):0!=(a.defaultZPos&16)&&this.app(b,"set labelGroup");this.app(b,J.shape.Shape.getFontCommand("label",JU.Font.getFont3D(a.defaultFontId)));return b.toString()},"J.shape.Labels");k(h,"getSelectionState",function(a,b){var d=new JU.SB;null!=b&&(b.append("  _setSelectionState;\n"),d.append("function _setSelectionState() {\n"));
null!=this.vwr.ms.trajectory&&this.app(d,this.vwr.ms.trajectory.getState());var c=new java.util.Hashtable,e=null;this.addBs(d,"hide ",a.bsHidden);this.addBs(d,"subset ",a.bsSubset);this.addBs(d,"delete ",a.bsDeleted);this.addBs(d,"fix ",a.bsFixed);c.put("-",this.vwr.slm.getSelectedAtomsNoSubset());e=this.getCommands(c,null,"select");null==e?this.app(d,"select none"):d.append(e);this.app(d,"set hideNotSelected "+a.hideNotSelected);d.append(this.vwr.getShapeProperty(1,"selectionState"));this.vwr.getSelectionHalosEnabled()&&
this.app(d,"SelectionHalos ON");null!=b&&d.append("}\n\n");return d.toString()},"JV.SelectionManager,JU.SB");k(h,"getViewState",function(a,b){var d=new JU.SB,c=a.getMoveToText(0,!1);null!=b&&(b.append("  _setPerspectiveState;\n"),d.append("function _setPerspectiveState() {\n"));this.app(d,"set perspectiveModel "+a.perspectiveModel);this.app(d,"set scaleAngstromsPerInch "+a.scale3DAngstromsPerInch);this.app(d,"set perspectiveDepth "+a.perspectiveDepth);this.app(d,"set visualRange "+a.visualRangeAngstroms);
a.isWindowCentered()||this.app(d,"set windowCentered false");this.app(d,"set cameraDepth "+a.cameraDepth);var e=1==a.mode;e&&this.app(d,"set navigationMode true");this.app(d,this.vwr.ms.getBoundBoxCommand(!1));this.app(d,"center "+JU.Escape.eP(a.fixedRotationCenter));d.append(this.vwr.getOrientation(1073742034,null,null,null).toString());this.app(d,c);!e&&!a.zoomEnabled&&this.app(d,"zoom off");d.append("  slab ").appendI(a.slabPercentSetting).append(";depth ").appendI(a.depthPercentSetting).append(a.slabEnabled&&
!e?";slab on":"").append(";\n");d.append("  set slabRange ").appendF(a.slabRange).append(";\n");null!=a.slabPlane&&d.append("  slab plane ").append(JU.Escape.eP4(a.slabPlane)).append(";\n");null!=a.depthPlane&&d.append("  depth plane ").append(JU.Escape.eP4(a.depthPlane)).append(";\n");this.getZshadeState(d,a,!1);d.append(this.getSpinState(!0)).append("\n");this.vwr.ms.modelSetHasVibrationVectors()&&a.vibrationOn&&this.app(d,"set vibrationPeriod "+a.vibrationPeriod+";vibration on");c=null!=a.depthPlane||
null!=a.slabPlane;e&&d.append(a.getNavigationState());!a.slabEnabled&&c&&d.append("  slab off;\n");null!=b&&d.append("}\n\n");return d.toString()},"JV.TransformManager,JU.SB");k(h,"getZshadeState",function(a,b,d){d&&(this.app(a,"set zDepth "+b.zDepthPercentSetting),this.app(a,"set zSlab "+b.zSlabPercentSetting),b.zShadeEnabled||this.app(a,"set zShade false"));b.zShadeEnabled&&this.app(a,"set zShade true");try{null!=b.zSlabPoint&&this.app(a,"set zSlab "+JU.Escape.eP(b.zSlabPoint))}catch(c){if(!w(c,
Exception))throw c;}},"JU.SB,JV.TransformManager,~B");m(h,"getSpinState",function(){var a=this.vwr.tm,b="  set spinX "+n(a.spinX)+"; set spinY "+n(a.spinY)+"; set spinZ "+n(a.spinZ)+"; set spinFps "+n(a.spinFps)+";";Float.isNaN(a.navFps)||(b+="  set navX "+n(a.navX)+"; set navY "+n(a.navY)+"; set navZ "+n(a.navZ)+"; set navFps "+n(a.navFps)+";");a.navOn&&(b+=" navigation on;");if(!a.spinOn||a.vectorSpinOnly)return b;var d=a.isSpinSelected?"\n  select "+JU.Escape.eBS(this.vwr.bsA())+";\n  rotateSelected":
"\n ";if(a.isSpinInternal){var c=JU.P3.newP(a.internalRotationCenter);c.sub(a.rotationAxis);b+=d+" spin "+a.rotationRate+" "+JU.Escape.eP(a.internalRotationCenter)+" "+JU.Escape.eP(c)}else b=a.isSpinFixed?b+(d+" spin axisangle "+JU.Escape.eP(a.rotationAxis)+" "+a.rotationRate):b+" spin on";return b+";"},"~B");m(h,"getCommands",function(a,b,d){var c=new JU.SB;a=this.getCommands2(a,c,null,d);null!=b&&this.getCommands2(b,c,a,"select");return c.toString()},"java.util.Map,java.util.Map,~S");k(h,"getCommands2",
function(a,b,d,c){if(null==a)return"";var e;for(a=a.entrySet().iterator();a.hasNext()&&((e=a.next())||1);){var f=e.getKey(),g=JU.Escape.eBS(e.getValue());5>g.length||(g=c+" "+g,g.equals(d)||this.app(b,g),d=g,0!=f.indexOf("-")&&this.app(b,f))}return d},"java.util.Map,JU.SB,~S,~S");k(h,"app",function(a,b){0!=b.length&&a.append("  ").append(b).append(";\n")},"JU.SB,~S");k(h,"addBs",function(a,b,d){null==d||0==d.length()||this.app(a,b+JU.Escape.eBS(d))},"JU.SB,~S,JU.BS");k(h,"getFontState",function(a,
b){var d=JV.StateManager.getObjectIdFromName(a.equalsIgnoreCase("axes")?"axis":a);if(0>d)return"";var c=this.vwr.getObjectMad10(d),d=(new JU.SB).append("\n");this.app(d,a+(0==c?" off":1==c?" on":-1==c?" dotted":20>c?" "+c:" "+c/2E4));if(3>d.length())return"";c=J.shape.Shape.getFontCommand(a,b);0<c.length&&(c="  "+c+";\n");return d+c},"~S,JU.Font");k(h,"appendTickInfo",function(a,b,d){b.append("  ");b.append(a);JV.StateCreator.addTickInfo(b,d,!1);b.append(";\n")},"~S,JU.SB,JM.TickInfo");h.addTickInfo=
k(h,"addTickInfo",function(a,b,d){a.append(" ticks ").appendC(b.type).append(" ").append(JU.Escape.eP(b.ticks));var c=null!=b.scale&&Float.isNaN(b.scale.x);c&&a.append(" UNITCELL");null!=b.tickLabelFormats&&a.append(" format ").append(JU.Escape.eAS(b.tickLabelFormats,!1));!c&&null!=b.scale&&a.append(" scale ").append(JU.Escape.eP(b.scale));d&&(!Float.isNaN(b.first)&&0!=b.first)&&a.append(" first ").appendF(b.first);null!=b.reference&&a.append(" point ").append(JU.Escape.eP(b.reference))},"JU.SB,JM.TickInfo,~B");
k(h,"getMeasurementState",function(a){var b=a.measurements,d=a.measurementCount,c=a.font3d,e=a.defaultTickInfo,f=new JU.SB;this.app(f,"measures delete");for(var g=0;g<d;g++){var l=b.get(g),h=null!=l.property;if(!h||!Float.isNaN(l.value)){var k=l.count,j=(new JU.SB).append("measure");null!=l.thisID&&j.append(" ID ").append(JU.PT.esc(l.thisID));0!=l.mad&&j.append(" radius ").appendF(null==l.thisID||0<l.mad?l.mad/2E3:0);0!=l.colix&&j.append(" color ").append(JU.Escape.escapeColor(JU.C.getArgb(l.colix)));
null!=l.text&&(null!=l.text.font&&j.append(" font ").append(l.text.font.getInfo()),0!=l.text.align&&j.append(" align ").append(JV.JC.getHorizAlignmentName(l.text.align)),null!=l.text.pymolOffset&&j.append(" offset ").append(JU.Escape.eAF(l.text.pymolOffset)));var m=l.tickInfo;null!=m&&JV.StateCreator.addTickInfo(j,m,!0);for(m=1;m<=k;m++)j.append(" ").append(l.getLabel(m,!0,!0));h?j.append(" "+l.property+" value "+(Float.isNaN(l.value)?0:l.value)).append(" "+JU.PT.esc(l.getString())):2==k&&(l=l.getDistanceFormatForState(),
null!=l&&j.append(" ").append(JU.PT.esc(l)));h||j.append("; # "+a.getInfoAsString(g));this.app(f,j.toString())}}this.app(f,J.shape.Shape.getFontCommand("measures",c));c=0;h=new java.util.Hashtable;j=JU.BS.newN(d);for(g=0;g<d;g++)l=b.get(g),l.isHidden&&(c++,j.set(g)),null!=a.bsColixSet&&a.bsColixSet.get(g)&&JU.BSUtil.setMapBitSet(h,g,g,J.shape.Shape.getColorCommandUnk("measure",l.colix,a.translucentAllowed));if(0<c)if(c==d)this.app(f,"measures off; # lines and numbers off");else for(g=0;g<d;g++)j.get(g)&&
JU.BSUtil.setMapBitSet(h,g,g,"measure off");null!=e&&(f.append(" measure "),JV.StateCreator.addTickInfo(f,e,!0),f.append(";\n"));0<=a.mad&&f.append(" set measurements ").appendF(a.mad/2E3).append(";\n");l=this.getCommands(h,null,"select measures");null!=l&&0!=l.length&&(f.append(l),this.app(f,"select measures ({null})"));return f.toString()},"J.shape.Measures");k(h,"getShapeStatePriv",function(a,b,d){var c=this.vwr.shm.shapes;if(null!=c){var e;2147483647==d?(d=0,e=37):e=d+1;for(;d<e;++d){var f=c[d];
if(null!=f&&(b||9<=d&&16>d))f=this.getShapeState(f),null!=f&&1<f.length&&a.append(f)}a.append("  select *;\n")}},"JU.SB,~B,~N");k(h,"getBondState",function(a){var b=a.bsOrderSet,d=a.reportAll;this.clearTemp();var c=this.vwr.ms,e=c.bo,f=c.bondCount,g;if(d||null!=a.bsSizeSet)for(c=d?f-1:a.bsSizeSet.nextSetBit(0);0<=c;c=d?c-1:a.bsSizeSet.nextSetBit(c+1))null!=e[c]&&JU.BSUtil.setMapBitSet(this.temp,c,c,"wireframe "+(1==(g=e[c].mad)?"on":""+JU.PT.escF(g/2E3)));if(d||null!=b)for(c=d?f-1:b.nextSetBit(0);0<=
c;c=d?c-1:b.nextSetBit(c+1))g=e[c],null!=g&&(d||0==(g.order&131072))&&JU.BSUtil.setMapBitSet(this.temp,c,c,"bondOrder "+JU.Edge.getBondOrderNameFromOrder(g.order));if(null!=a.bsColixSet)for(c=a.bsColixSet.nextSetBit(0);0<=c;c=a.bsColixSet.nextSetBit(c+1))null!=e[c]&&(b=e[c].colix,2==(b&-30721)?JU.BSUtil.setMapBitSet(this.temp,c,c,J.shape.Shape.getColorCommand("bonds",J.c.PAL.CPK.id,b,a.translucentAllowed)):JU.BSUtil.setMapBitSet(this.temp,c,c,J.shape.Shape.getColorCommandUnk("bonds",b,a.translucentAllowed)));
a=this.getCommands(this.temp,null,"select /*16.2*/ BONDS")+"\n";this.clearTemp();return a},"J.shape.Sticks");k(h,"clearTemp",function(){this.temp.clear();this.temp2.clear()});k(h,"getShapeState",function(a){var b;switch(a.shapeID){case 34:b=this.getAxesState(a);break;case 33:if(!this.vwr.ms.haveUnitCells)return"";a=b=this.getFontLineShapeState(a);var d=this.vwr.am.getUnitCellAtomIndex();0<=d&&(b+="  unitcell ({"+d+"});\n");d=this.vwr.getCurrentUnitCell();null!=d&&(b+=d.getUnitCellState(),b+=a);break;
case 32:b=this.getFontLineShapeState(a);break;case 36:b=this.getFontState(a.myType,a.baseFont3d);break;case 6:b=this.getMeasurementState(a);break;case 7:case 18:b=this.getAtomShapeState(a);break;case 1:b=this.getBondState(a);break;case 31:b=new JU.SB;b.append('\n  set echo off;set echo "%SCALE" off;\n');this.getEchoState(b,a.scaleObject);var d=!1,c;for(a=a.objects.values().iterator();a.hasNext()&&((c=a.next())||1);)d=(new Boolean(d|this.getEchoState(b,c))).valueOf();d&&b.append("  modelkit OFF;//to check for element keys\n");
b=b.toString();break;case 8:b=this.getAtomShapeState(a)+(2==a.colixSelection?"":0==a.colixSelection?"  color SelectionHalos NONE;\n":J.shape.Shape.getColorCommandUnk("selectionHalos",a.colixSelection,a.translucentAllowed)+";\n");null!=a.bsHighlight&&(b+="  set highlight "+JU.Escape.eBS(a.bsHighlight)+"; "+J.shape.Shape.getColorCommandUnk("highlight",a.colixHighlight,a.translucentAllowed)+";\n");break;case 35:this.clearTemp();if(null!=a.atomFormats){d=this.vwr.ms.at;for(b=this.vwr.ms.ac;0<=--b;)null==
d[b]&&(a.atomFormats[b]=null),null!=a.atomFormats[b]&&JU.BSUtil.setMapBitSet(this.temp,b,b,"set hoverLabel "+JU.PT.esc(a.atomFormats[b]))}b="\n  hover "+JU.PT.esc(null==a.labelFormat?"":a.labelFormat)+";\n"+this.getCommands(this.temp,null,"select");this.clearTemp();break;case 5:if(!a.isActive||null==a.bsSizeSet)return"";this.clearTemp();var e=this.vwr.getAllAtoms(),d=!1;for(b=a.bsSizeSet.nextSetBit(0);0<=b;b=a.bsSizeSet.nextSetBit(b+1))if(e.get(b)){c=a.getLabel(b);var f="label ";null==c?f+=JU.PT.esc(a.formats[b]):
(f+=JU.PT.esc(c.textUnformatted),null!=c.pymolOffset&&(f+=";set labelOffset "+JU.Escape.eAF(c.pymolOffset)));JU.BSUtil.setMapBitSet(this.temp,b,b,f);null!=a.bsColixSet&&a.bsColixSet.get(b)&&JU.BSUtil.setMapBitSet(this.temp2,b,b,J.shape.Shape.getColorCommand("label",a.paletteIDs[b],a.colixes[b],a.translucentAllowed));null!=a.bsBgColixSet&&a.bsBgColixSet.get(b)&&JU.BSUtil.setMapBitSet(this.temp2,b,b,"background label "+J.shape.Shape.encodeColor(a.bgcolixes[b]));c=a.getLabel(b);c=null!=c?c.scalePixelsPerMicron:
0;0<c&&JU.BSUtil.setMapBitSet(this.temp2,b,b,"set labelScaleReference "+1E4/c);if(null!=a.offsets&&a.offsets.length>b){c=a.offsets[b];JU.BSUtil.setMapBitSet(this.temp2,b,b,"set "+(JV.JC.isOffsetAbsolute(c)?"labelOffsetAbsolute ":"labelOffset ")+JV.JC.getXOffset(c)+" "+JV.JC.getYOffset(c));var f=JV.JC.getHorizAlignmentName(c>>2),g=JV.JC.getPointerName(c);0<g.length&&JU.BSUtil.setMapBitSet(this.temp2,b,b,"set labelPointer "+g);0!=(c&32)?JU.BSUtil.setMapBitSet(this.temp2,b,b,"set labelFront"):0!=(c&
16)&&JU.BSUtil.setMapBitSet(this.temp2,b,b,"set labelGroup");0<f.length&&JU.BSUtil.setMapBitSet(this.temp3,b,b,"set labelAlignment "+f)}null!=a.mads&&0>a.mads[b]&&JU.BSUtil.setMapBitSet(this.temp2,b,b,"set toggleLabel");null!=a.bsFontSet&&a.bsFontSet.get(b)&&(c=JU.Font.getFont3D(a.fids[b]),0<c.fontSizeAngstroms&&(d=!0),JU.BSUtil.setMapBitSet(this.temp4,b,b,J.shape.Shape.getFontCommand("label",c)))}a=this.getCommands(null,this.temp4,"select");d&&(a="  try{\n"+a+"  }catch{}\n");b=this.getCommands(this.temp,
this.temp2,"select")+a+this.getCommands(null,this.temp3,"select");this.temp4.clear();this.temp3.clear();this.clearTemp();break;case 0:this.clearTemp();d=this.vwr.ms.ac;e=this.vwr.ms.at;c=a.colixes;f=a.paletteIDs;for(b=g=0;b<d;b++)if(null!=e[b]&&(null!=a.bsSizeSet&&a.bsSizeSet.get(b)&&(0>(g=e[b].madAtom)?JU.BSUtil.setMapBitSet(this.temp,b,b,"Spacefill on"):JU.BSUtil.setMapBitSet(this.temp,b,b,"Spacefill "+JU.PT.escF(g/2E3))),null!=a.bsColixSet&&a.bsColixSet.get(b))){var l=e[b].paletteID;(l!=J.c.PAL.CPK.id||
JU.C.isColixTranslucent(e[b].colixAtom))&&JU.BSUtil.setMapBitSet(this.temp,b,b,J.shape.Shape.getColorCommand("atoms",l,e[b].colixAtom,a.translucentAllowed));null!=c&&b<c.length&&JU.BSUtil.setMapBitSet(this.temp2,b,b,J.shape.Shape.getColorCommand("balls",f[b],c[b],a.translucentAllowed))}b=this.getCommands(this.temp,this.temp2,"select");this.clearTemp();break;default:b=a.getShapeState()}return b},"J.shape.Shape");k(h,"getFontLineShapeState",function(a){var b=this.getFontState(a.myType,a.font3d);if(null==
a.tickInfos)return b;var d=0<=b.indexOf(" off"),c=new JU.SB;c.append(b);for(b=0;4>b;b++)null!=a.tickInfos[b]&&this.appendTickInfo(a.myType,c,a.tickInfos[b]);d&&c.append("  "+a.myType+" off;\n");return c.toString()},"J.shape.FontLineShape");k(h,"getAxesState",function(a){var b=new JU.SB;b.append(this.getFontLineShapeState(a));return a.getAxesState(b)},"J.shape.Axes");m(h,"getAtomShapeState",function(a){if(!a.isActive)return"";this.clearTemp();var b=JV.JC.shapeClassBases[a.shapeID],d=18==a.shapeID,
c,e=this.vwr.getAllAtoms();if(null!=a.bsSizeSet)for(var f=a.bsSizeSet.nextSetBit(0);0<=f;f=a.bsSizeSet.nextSetBit(f+1))e.get(f)&&JU.BSUtil.setMapBitSet(this.temp,f,f,b+" "+(0>(c=a.mads[f])?d&&-1>c?""+-c:"on":JU.PT.escF(c/2E3)));if(null!=a.bsColixSet)for(f=a.bsColixSet.nextSetBit(0);0<=f;f=a.bsColixSet.nextSetBit(f+1))JU.BSUtil.setMapBitSet(this.temp2,f,f,J.shape.Shape.getColorCommand(b,a.paletteIDs[f],a.colixes[f],a.translucentAllowed));a=this.getCommands(this.temp,this.temp2,"select");this.clearTemp();
return a},"J.shape.AtomShape");k(h,"getEchoState",function(a,b){var d=null!=b&&0<b.barPixels,c=null==b?null:d?b.textUnformatted:b.getStateText();if(null==c||!b.isEcho||b.target.equals("error"))return!1;var e=null!=b.image,f=null,g="set echo ID "+JU.PT.esc(d?"%SCALE":b.target);switch(b.valign){case 3:f=2147483647==b.movableXPercent||2147483647==b.movableYPercent?(2147483647==b.movableXPercent?b.movableX+" ":b.movableXPercent+"% ")+(2147483647==b.movableYPercent?b.movableY+"":b.movableYPercent+"%"):
"["+b.movableXPercent+" "+b.movableYPercent+"%]";case 4:null==f&&(f=JU.Escape.eP(b.xyz));a.append("  ").append(g).append(" ").append(f);4!=b.align&&a.append(";  ").append(g).append(" ").append(JV.JC.getHorizAlignmentName(b.align));break;default:a.append("  set echo ").append(JV.JC.getEchoName(b.valign)).append(" ").append(JV.JC.getHorizAlignmentName(b.align))}2147483647!=b.movableZPercent&&a.append(";  ").append(g).append(" depth ").appendI(b.movableZPercent);e?a.append("; ").append(g).append(" IMAGE /*file*/"):
a.append("; echo ");a.append(JU.PT.esc(c));a.append(";\n");e&&1!=b.imageScale&&a.append("  ").append(g).append(" scale ").appendF(b.imageScale).append(";\n");null!=b.script&&a.append("  ").append(g).append(" script ").append(JU.PT.esc(b.script)).append(";\n");0<=b.modelIndex&&a.append("  ").append(g).append(" model ").append(this.vwr.getModelNumberDotted(b.modelIndex)).append(";\n");null!=b.pointerPt&&a.append("  ").append(g).append(" point ").append(r(b.pointerPt,"JM.Atom")?"({"+b.pointerPt.i+"})":
JU.Escape.eP(b.pointerPt)).append(";\n");null!=b.pymolOffset&&a.append("  ").append(g).append(" offset ").append(JU.Escape.escapeFloatA(b.pymolOffset,!0)).append(";\n");b.appendFontCmd(a);a.append("; color echo");JU.C.isColixTranslucent(b.colix)&&a.append(" ").append(JU.C.getColixTranslucencyLabel(b.colix));a.append(" ").append(JU.C.getHexCode(b.colix));0!=b.bgcolix&&(a.append("; color echo background "),JU.C.isColixTranslucent(b.bgcolix)&&a.append(JU.C.getColixTranslucencyLabel(b.bgcolix)).append(" "),
a.append(JU.C.getHexCode(b.bgcolix)));a.append(";\n");b.hidden&&(d?a.append('  set echo "%SCALE" hidden;\n'):a.append("  set echo ID ").append(JU.PT.esc(b.target)).append(" hidden;\n"));return b.target.startsWith("_!_elkey_")},"JU.SB,JM.Text");m(h,"getAllSettings",function(a){for(var b=this.vwr.g,d=new JU.SB,c=Array(b.htBooleanParameterFlags.size()+b.htNonbooleanParameterValues.size()+b.htUserVariables.size()),e=0,f="_"+a,g,l=b.htBooleanParameterFlags.keySet().iterator();l.hasNext()&&((g=l.next())||
1);)if(null==a||0==g.indexOf(a)||0==g.indexOf(f))c[e++]=(0==g.indexOf("_")?g+" = ":"set "+g+" ")+b.htBooleanParameterFlags.get(g);for(l=b.htNonbooleanParameterValues.keySet().iterator();l.hasNext()&&((g=l.next())||1);)if("@"!=g.charAt(0)&&(null==a||0==g.indexOf(a)||0==g.indexOf(f))){var h=b.htNonbooleanParameterValues.get(g);"string"==typeof h&&(h=JV.StateCreator.chop(JU.PT.esc(h)));c[e++]=(0==g.indexOf("_")?g+" = ":"set "+g+" ")+h}for(l=b.htUserVariables.keySet().iterator();l.hasNext()&&((g=l.next())||
1);)if(null==a||0==g.indexOf(a))h=b.htUserVariables.get(g),f=h.escape(),c[e++]=g+" "+(g.startsWith("@")?"":"= ")+(4==h.tok?JV.StateCreator.chop(JU.PT.esc(f)):f);java.util.Arrays.sort(c,0,e);for(a=0;a<e;a++)null!=c[a]&&this.app(d,c[a]);d.append("\n");return d.toString()},"~S");h.chop=k(h,"chop",function(a){var b=a.length;if(512>b)return a;for(var d=new JU.SB,c=0,e=72;e<b;c=e,e+=72){for(;"\\"==a.charAt(e-1);)e++;d.append(0==c?"":'"\\\n    + "').append(a.substring(c,e))}d.append('"\\\n    + "').append(a.substring(c,
b));return d.toString()},"~S");m(h,"getFunctionCalls",function(a){null==a&&(a="");var b=new JU.SB,d=a.indexOf("*"),c=0<=d,e=JV.Viewer.isStaticFunction(a),f=a.equalsIgnoreCase("names")||a.equalsIgnoreCase("static_names");f&&(a="");c&&(a=a.substring(0,d));a=a.toLowerCase();(e||0==a.length)&&this.addFunctions(b,JV.Viewer.staticFunctions,a,c,f);(!e||0==a.length)&&this.addFunctions(b,this.vwr.localFunctions,a,c,f);return b.toString()},"~S");k(h,"addFunctions",function(a,b,d,c,e){for(var f=Array(b.size()),
g=0,h,k=b.keySet().iterator();k.hasNext()&&((h=k.next())||1);)if(0==d.length&&!h.startsWith("_")||h.equalsIgnoreCase(d)||c&&0==h.toLowerCase().indexOf(d))f[g++]=h;java.util.Arrays.sort(f,0,g);for(d=0;d<g;d++)c=b.get(f[d]),a.append(e?c.getSignature():c.toString()),a.appendC("\n")},"JU.SB,java.util.Map,~S,~B,~B");h.isTainted=k(h,"isTainted",function(a,b,d){return null!=a&&null!=a[d]&&a[d].get(b)},"~A,~N,~N");m(h,"getAtomicPropertyState",function(a,b){for(var d,c=new JU.SB,e=0;18>e;e++)if(0>a||e==a)null!=
(d=null!=b?b:this.vwr.ms.getTaintedAtoms(e))&&this.getAtomicPropertyStateBuffer(c,e,d,null,null);return c.toString()},"~N,JU.BS");m(h,"getAtomicPropertyStateBuffer",function(a,b,d,c,e){if(this.vwr.g.preserveState){var f=new JU.SB;c=(null==c?JM.AtomCollection.userSettableValues[b]:c)+" set";var g=0,h=2==b,k=this.vwr.ms.at,m=this.vwr.ms.tainted;if(null!=d)for(var j=d.nextSetBit(0);0<=j;j=d.nextSetBit(j+1))if(!(j>=k.length||JM.AtomCollection.isDeleted(k[j]))){f.appendI(j+1).append(" ").append(k[j].getElementSymbol()).append(" ").append(k[j].getInfo().$replace(" ",
"_")).append(" ");switch(b){case 18:j<e.length&&f.appendF(e[j]);break;case 13:f.appendI(k[j].getAtomNumber());break;case 16:f.append(k[j].getChainIDStr());break;case 15:f.appendI(k[j].group.getResno());break;case 14:f.appendI(k[j].getSeqID());break;case 0:f.append(k[j].getAtomName());break;case 1:f.append(k[j].getAtomType());break;case 2:JV.StateCreator.isTainted(m,j,2)&&(h=!1);f.appendF(k[j].x).append(" ").appendF(k[j].y).append(" ").appendF(k[j].z);break;case 12:var n=k[j].getVibrationVector();
if(null==n)f.append("0 0 0");else if(Float.isNaN(n.modScale)){switch(n.modDim){case -3:continue}f.appendF(n.x).append(" ").appendF(n.y).append(" ").appendD(n.z).append(" ").appendD(n.modDim).append(" ").appendF(n.magMoment)}else f.appendF(1.4E-45).append(" ").appendD(1.4E-45).append(" ").appendD(n.modScale);break;case 17:f.appendI(k[j].getAtomSite());break;case 3:f.appendI(k[j].getAtomicAndIsotopeNumber());break;case 4:f.appendI(k[j].getFormalCharge());break;case 6:f.appendF(k[j].getBondingRadius());
break;case 7:f.appendI(k[j].getOccupancy100());break;case 8:f.appendF(k[j].getPartialCharge());break;case 9:f.appendF(k[j].getBfactor100()/100);break;case 10:f.appendI(k[j].getValence());break;case 11:f.appendF(k[j].getVanderwaalsRadiusFloat(this.vwr,J.c.VDW.AUTO))}f.append(" ;\n");++g}0!=g&&(h&&(c+="(default)"),a.append('\n  DATA "'+c+'"\n').appendI(g).append(" ;\nJmol Property Data Format 1 -- Jmol ").append(JV.Viewer.getJmolVersion()).append(";\n"),a.appendSB(f),a.append('  end "'+c+'";\n'))}},
"JU.SB,~N,JU.BS,~S,~A");m(h,"undoMoveAction",function(a,b){switch(a){case 4165:case 4140:switch(b){case 1275068425:return(4165==a?this.actionStates:this.actionStatesRedo).size();case -2:this.actionStates.clear();this.actionStatesRedo.clear();break;case -1:(4165==a?this.actionStates:this.actionStatesRedo).clear();break;case 0:b=2147483647;default:100<b&&(b=(4165==a?this.actionStates:this.actionStatesRedo).size());for(var d=0;d<b;d++)this.undoMoveActionClear(0,a,!0)}}return 0},"~N,~N");m(h,"undoMoveActionClear",
function(a,b,d){if(this.vwr.g.preserveState){var c=0<=a&&null!=this.vwr.ms.at[a]?this.vwr.ms.at[a].mi:this.vwr.ms.mc-1;switch(b){case 4140:case 4165:this.vwr.stopMinimization();var e="";switch(b){default:case 4165:e=this.actionStates;a=this.actionStatesRedo;break;case 4140:if(e=this.actionStatesRedo,a=this.actionStates,1==this.actionStatesRedo.size())return}if(0==e.size()||this.undoWorking)return;this.undoWorking=!0;a.add(0,e.removeItemAt(0));e=this.actionStatesRedo.get(0);4165==b&&1==a.size()&&(a=
x(-1,[1]),b=JU.PT.parseIntNext(e,a),a=JU.PT.parseIntNext(e,a),this.undoMoveActionClear(a,b,!1));this.vwr.ms.am[c].isModelKit||0>e.indexOf("zap ")?(JU.Logger.debugging&&this.vwr.log(e),this.vwr.evalStringQuiet(e)):this.actionStates.clear();break;default:if(this.undoWorking&&d)return;this.undoWorking=!0;e=new JU.SB;e.append("#"+b+" "+a+" "+new java.util.Date+"\n");0<=a?(c=this.vwr.getModelUndeletedAtomsBitSet(c),this.vwr.ms.taintAtoms(c,b),e.append(this.getAtomicPropertyState(-1,null))):(c=this.vwr.getModelUndeletedAtomsBitSet(c),
e.append("zap "),e.append(JU.Escape.eBS(c)).append(";"),this.getInlineData(e,this.vwr.getModelExtract(c,!1,!0,"MOL"),!0,null,null),e.append("set refreshing false;").append(this.vwr.acm.getPickingState()).append(this.vwr.tm.getMoveToText(0,!1)).append("set refreshing true;"));d?(this.actionStates.add(0,e.toString()),this.actionStatesRedo.clear()):this.actionStatesRedo.add(1,e.toString());100==this.actionStates.size()&&this.actionStates.removeItemAt(99)}this.undoWorking=!d}},"~N,~N,~B")})})(Clazz,Clazz.getClassName,
Clazz.newLongArray,Clazz.doubleToByte,Clazz.doubleToInt,Clazz.doubleToLong,Clazz.declarePackage,Clazz.instanceOf,Clazz.load,Clazz.instantialize,Clazz.decorateAsClass,Clazz.floatToInt,Clazz.floatToLong,Clazz.makeConstructor,Clazz.defineEnumConstant,Clazz.exceptionOf,Clazz.newIntArray,Clazz.newFloatArray,Clazz.declareType,Clazz.prepareFields,Clazz.superConstructor,Clazz.newByteArray,Clazz.declareInterface,Clazz.newShortArray,Clazz.innerTypeInstance,Clazz.isClassDefined,Clazz.prepareCallback,Clazz.newArray,
Clazz.castNullAs,Clazz.floatToShort,Clazz.superCall,Clazz.decorateAsType,Clazz.newBooleanArray,Clazz.newCharArray,Clazz.implementOf,Clazz.newDoubleArray,Clazz.overrideConstructor,Clazz.clone,Clazz.doubleToShort,Clazz.getInheritedLevel,Clazz.getParamsType,Clazz.isAF,Clazz.isAB,Clazz.isAI,Clazz.isAS,Clazz.isASS,Clazz.isAP,Clazz.isAFloat,Clazz.isAII,Clazz.isAFF,Clazz.isAFFF,Clazz.tryToSearchAndExecute,Clazz.getStackTrace,Clazz.inheritArgs,Clazz.alert,Clazz.defineMethod,Clazz.overrideMethod,Clazz.declareAnonymous,
Clazz.cloneFinals);
