(function(ra,tb,ub,vb,v,wb,n,C,z,q,w,F,xb,x,B,D,E,L,G,N,I,O,K,U,Y,W,fa,u,ha,sa,ia,ta,Ca,ba,Da,R,ua,Oa,cb,db,eb,Pa,fb,gb,hb,ib,jb,kb,lb,Qa,Ra,mb,Sa,nb,yb,c,g,qa,Ia){Jmol.___JmolDate="$Date: 2025-08-08 04:46:51 -0500 (Fri, 08 Aug 2025) $";Jmol.___fullJmolProperties="src/org/jmol/viewer/Jmol.properties";Jmol.___JmolVersion="16.3.33";(function(b){b._Loader.registerPackages("java",["io","lang","lang.reflect","util"]);var a=java.util;b._Loader.ignore("net.sf.j2s.ajax.HttpRequest java.util.MapEntry.Type java.net.UnknownServiceException java.lang.Runtime java.security.AccessController java.security.PrivilegedExceptionAction java.io.File java.io.FileInputStream java.io.FileWriter java.io.OutputStreamWriter java.util.concurrent.Executors".split(" "));
Math.rint=Math.round;Math.log10||(Math.log10=function(a){return Math.log(a)/2.302585092994046});Math.signum||(Math.signum=function(a){return 0==a||isNaN(a)?a:0>a?-1:1});if(b._supportsNativeObject)for(var d=0;d<b._extendedObjectMethods.length-2;d++){var h=b._extendedObjectMethods[d];Array.prototype[h]=b._O.prototype[h];Number.prototype[h]=b._O.prototype[h]}java.lang.Number=Number;Number.__CLASS_NAME__="Number";Da(Number,java.io.Serializable);Number.equals=b._innerFunctions.equals;Number.getName=b._innerFunctions.getName;
Number.prototype.compareTo=function(a){var d=this.value;a=a.value;return d<a?-1:d==a?0:1};c(Number,"shortValue",function(){var a=Math.round(this)&65535;return 0>this&&0<a?a-65536:a});c(Number,"byteValue",function(){var a=Math.round(this)&255;return 0>this&&0<a?a-256:a});c(Number,"intValue",function(){return Math.round(this)&4294967295});c(Number,"longValue",function(){return Math.round(this)});c(Number,"floatValue",function(){return this.valueOf()});c(Number,"doubleValue",function(){return parseFloat(this.valueOf())});
g(Number,"hashCode",function(){return this.valueOf()});java.lang.Integer=Integer=function(){q(this,arguments)};ta(Integer,"Integer",Number,Comparable,null,!0);Integer.prototype.valueOf=function(){return 0};Integer.toString=Integer.prototype.toString=function(){return 0!=arguments.length?""+arguments[0]:this===Integer?"class java.lang.Integer":""+this.valueOf()};ua(Integer,function(a){null==a&&(a=0);"number"!=typeof a&&(a=Integer.parseIntRadix(a,10));this.valueOf=function(){return a}});Integer.MIN_VALUE=
Integer.prototype.MIN_VALUE=-2147483648;Integer.MAX_VALUE=Integer.prototype.MAX_VALUE=2147483647;Integer.TYPE=Integer.prototype.TYPE=Integer;Integer.compare=c(Integer,"compare",function(a,d){return a<d?-1:a>d?1:0},"Number,Number");c(Integer,"bitCount",function(a){a-=a>>>1&1431655765;a=(a&858993459)+(a>>>2&858993459);a=a+(a>>>4)&252645135;a+=a>>>8;return a+(a>>>16)&63},"Number");Integer.bitCount=Integer.prototype.bitCount;c(Integer,"numberOfLeadingZeros",function(a){if(0==a)return 32;var d=1;0==a>>>
16&&(d+=16,a<<=16);0==a>>>24&&(d+=8,a<<=8);0==a>>>28&&(d+=4,a<<=4);0==a>>>30&&(d+=2,a<<=2);return d-(a>>>31)},"Number");Integer.numberOfLeadingZeros=Integer.prototype.numberOfLeadingZeros;c(Integer,"numberOfTrailingZeros",function(a){if(0==a)return 32;var d=31,h=a<<16;0!=h&&(d-=16,a=h);h=a<<8;0!=h&&(d-=8,a=h);h=a<<4;0!=h&&(d-=4,a=h);h=a<<2;0!=h&&(d-=2,a=h);return d-(a<<1>>>31)},"Number");Integer.numberOfTrailingZeros=Integer.prototype.numberOfTrailingZeros;c(Integer,"parseIntRadix",function(a,d){if(null==
a)throw new NumberFormatException("null");if(2>d)throw new NumberFormatException("radix "+d+" less than Character.MIN_RADIX");if(36<d)throw new NumberFormatException("radix "+d+" greater than Character.MAX_RADIX");if(10==d)for(var h=a.length;0<=--h;){var b=a.charCodeAt(h);if(!(48<=b&&57>=b)&&(0<h||43!=b&&45!=b))throw new NumberFormatException("Not a Number : "+a);}h=parseInt(a,d);if(isNaN(h))throw new NumberFormatException("Not a Number : "+a);return h},"String, Number");Integer.parseIntRadix=Integer.prototype.parseIntRadix;
c(Integer,"parseInt",function(a){return Integer.parseIntRadix(a,10)},"String");Integer.parseInt=Integer.prototype.parseInt;g(Integer,"$valueOf",function(a){return new Integer(a)});Integer.$valueOf=Integer.prototype.$valueOf;g(Integer,"equals",function(a){return null==a||!C(a,Integer)?!1:a.valueOf()==this.valueOf()},"Object");Integer.toHexString=Integer.prototype.toHexString=function(a){a.valueOf&&(a=a.valueOf());if(0>a){var d=a&16777215;return(a>>24&255)._numberToString(16)+(d="000000"+d._numberToString(16)).substring(d.length-
6)}return a._numberToString(16)};Integer.toOctalString=Integer.prototype.toOctalString=function(a){a.valueOf&&(a=a.valueOf());return a._numberToString(8)};Integer.toBinaryString=Integer.prototype.toBinaryString=function(a){a.valueOf&&(a=a.valueOf());return a._numberToString(2)};Integer.decodeRaw=c(Integer,"decodeRaw",function(a){0<=a.indexOf(".")&&(a="");var d=a.startsWith("-")?1:0;a=a.replace(/\#/,"0x").toLowerCase();d=a.startsWith("0x",d)?16:a.startsWith("0",d)?8:10;a=Number(a)&4294967295;return 8==
d?parseInt(a,8):a},"~S");Integer.decode=c(Integer,"decode",function(a){a=Integer.decodeRaw(a);if(isNaN(a)||a<Integer.MIN_VALUE||a>Integer.MAX_VALUE)throw new NumberFormatException("Invalid Integer");return new Integer(a)},"~S");g(Integer,"hashCode",function(){return this.valueOf()});java.lang.Long=Long=function(){q(this,arguments)};ta(Long,"Long",Number,Comparable,null,!0);Long.prototype.valueOf=function(){return 0};Long.toString=Long.prototype.toString=function(){return 0!=arguments.length?""+arguments[0]:
this===Long?"class java.lang.Long":""+this.valueOf()};ua(Long,function(a){null==a&&(a=0);a="number"==typeof a?Math.round(a):Integer.parseIntRadix(a,10);this.valueOf=function(){return a}});Long.TYPE=Long.prototype.TYPE=Long;c(Long,"parseLong",function(a,d){return Integer.parseInt(a,d||10)});Long.parseLong=Long.prototype.parseLong;g(Long,"$valueOf",function(a){return new Long(a)});Long.$valueOf=Long.prototype.$valueOf;g(Long,"equals",function(a){return null==a||!C(a,Long)?!1:a.valueOf()==this.valueOf()},
"Object");Long.toHexString=Long.prototype.toHexString=function(a){return a.toString(16)};Long.toOctalString=Long.prototype.toOctalString=function(a){return a.toString(8)};Long.toBinaryString=Long.prototype.toBinaryString=function(a){return a.toString(2)};Long.decode=c(Long,"decode",function(a){a=Integer.decodeRaw(a);if(isNaN(a))throw new NumberFormatException("Invalid Long");return new Long(a)},"~S");java.lang.Short=Short=function(){q(this,arguments)};ta(Short,"Short",Number,Comparable,null,!0);Short.prototype.valueOf=
function(){return 0};Short.toString=Short.prototype.toString=function(){return 0!=arguments.length?""+arguments[0]:this===Short?"class java.lang.Short":""+this.valueOf()};ua(Short,function(a){null==a&&(a=0);"number"!=typeof a&&(a=Integer.parseIntRadix(a,10));a=a.shortValue();this.valueOf=function(){return a}});Short.MIN_VALUE=Short.prototype.MIN_VALUE=-32768;Short.MAX_VALUE=Short.prototype.MAX_VALUE=32767;Short.TYPE=Short.prototype.TYPE=Short;c(Short,"parseShortRadix",function(a,d){return Integer.parseIntRadix(a,
d).shortValue()},"String, Number");Short.parseShortRadix=Short.prototype.parseShortRadix;c(Short,"parseShort",function(a){return Short.parseShortRadix(a,10)},"String");Short.parseShort=Short.prototype.parseShort;g(Short,"$valueOf",function(a){return new Short(a)});Short.$valueOf=Short.prototype.$valueOf;g(Short,"equals",function(a){return null==a||!C(a,Short)?!1:a.valueOf()==this.valueOf()},"Object");Short.toHexString=Short.prototype.toHexString=function(a){return a.toString(16)};Short.toOctalString=
Short.prototype.toOctalString=function(a){return a.toString(8)};Short.toBinaryString=Short.prototype.toBinaryString=function(a){return a.toString(2)};Short.decode=c(Short,"decode",function(a){a=Integer.decodeRaw(a);if(isNaN(a)||-32768>a||32767<a)throw new NumberFormatException("Invalid Short");return new Short(a)},"~S");java.lang.Byte=Byte=function(){q(this,arguments)};ta(Byte,"Byte",Number,Comparable,null,!0);Byte.prototype.valueOf=function(){return 0};Byte.toString=Byte.prototype.toString=function(){return 0!=
arguments.length?""+arguments[0]:this===Byte?"class java.lang.Byte":""+this.valueOf()};x(Byte,function(a){"number"!=typeof a&&(a=Integer.parseIntRadix(a,10));a=a.byteValue();this.valueOf=function(){return a}});Byte.serialVersionUID=Byte.prototype.serialVersionUID=-0x63b19f7b11af0c00;Byte.MIN_VALUE=Byte.prototype.MIN_VALUE=-128;Byte.MAX_VALUE=Byte.prototype.MAX_VALUE=127;Byte.SIZE=Byte.prototype.SIZE=8;Byte.TYPE=Byte.prototype.TYPE=Byte;c(Byte,"parseByteRadix",function(a,d){return Integer.parseIntRadix(a,
d).byteValue()},"String, Number");Byte.parseByteRadix=Byte.prototype.parseByteRadix;c(Byte,"parseByte",function(a){return Byte.parseByte(a,10)},"String");Byte.parseByte=Byte.prototype.parseByte;g(Byte,"$valueOf",function(a){return new Byte(a)});Byte.$valueOf=Byte.prototype.$valueOf;g(Byte,"equals",function(a){return null==a||!C(a,Byte)?!1:a.valueOf()==this.valueOf()},"Object");Byte.toHexString=Byte.prototype.toHexString=function(a){return a.toString(16)};Byte.toOctalString=Byte.prototype.toOctalString=
function(a){return a.toString(8)};Byte.toBinaryString=Byte.prototype.toBinaryString=function(a){return a.toString(2)};Byte.decode=c(Byte,"decode",function(a){a=Integer.decodeRaw(a);if(isNaN(a)||-128>a||127<a)throw new NumberFormatException("Invalid Byte");return new Byte(a)},"~S");b._floatToString=function(a){a=""+a;0>a.indexOf(".")&&(0>a.indexOf("e")&&"NaN"!=a)&&(a+=".0");return a};java.lang.Float=Float=function(){q(this,arguments)};ta(Float,"Float",Number,Comparable,null,!0);Float.prototype.valueOf=
function(){return 0};Float.toString=Float.prototype.toString=function(){return 0!=arguments.length?b._floatToString(arguments[0]):this===Float?"class java.lang.Float":b._floatToString(this.valueOf())};b._a32=null;Float.floatToIntBits=function(a){var d=b._a32||(b._a32=new Float32Array(1));d[0]=a;return(new Int32Array(d.buffer))[0]};ua(Float,function(a){null==a&&(a=0);"number"!=typeof a&&(a=Number(a));this.valueOf=function(){return a}});Float.serialVersionUID=Float.prototype.serialVersionUID=-0x2512365d24c31000;
Float.MIN_VALUE=Float.prototype.MIN_VALUE=1.4E-45;Float.MAX_VALUE=Float.prototype.MAX_VALUE=3.4028235E38;Float.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY;Float.POSITIVE_INFINITY=Number.POSITIVE_INFINITY;Float.NaN=Number.NaN;Float.TYPE=Float.prototype.TYPE=Float;c(Float,"parseFloat",function(a){if(null==a)throw new NumberFormatException("null");if("number"==typeof a)return a;var d=Number(a);if(isNaN(d))throw new NumberFormatException("Not a Number : "+a);return d},"String");Float.parseFloat=Float.prototype.parseFloat;
g(Float,"$valueOf",function(a){return new Float(a)});Float.$valueOf=Float.prototype.$valueOf;c(Float,"isNaN",function(a){return isNaN(1==arguments.length?a:this.valueOf())},"Number");Float.isNaN=Float.prototype.isNaN;c(Float,"isInfinite",function(a){return!isFinite(1==arguments.length?a:this.valueOf())},"Number");Float.isInfinite=Float.prototype.isInfinite;g(Float,"equals",function(a){return null==a||!C(a,Float)?!1:a.valueOf()==this.valueOf()},"Object");java.lang.Double=Double=function(){q(this,arguments)};
ta(Double,"Double",Number,Comparable,null,!0);Double.prototype.valueOf=function(){return 0};Double.toString=Double.prototype.toString=function(){return 0!=arguments.length?b._floatToString(arguments[0]):this===Double?"class java.lang.Double":b._floatToString(this.valueOf())};ua(Double,function(a){null==a&&(a=0);"number"!=typeof a&&(a=Double.parseDouble(a));this.valueOf=function(){return a}});Double.serialVersionUID=Double.prototype.serialVersionUID=-0x7f4c3db5d6940400;Double.MIN_VALUE=Double.prototype.MIN_VALUE=
4.9E-324;Double.MAX_VALUE=Double.prototype.MAX_VALUE=1.7976931348623157E308;Double.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY;Double.POSITIVE_INFINITY=Number.POSITIVE_INFINITY;Double.NaN=Number.NaN;Double.TYPE=Double.prototype.TYPE=Double;c(Double,"isNaN",function(a){return isNaN(1==arguments.length?a:this.valueOf())},"Number");Double.isNaN=Double.prototype.isNaN;c(Double,"isInfinite",function(a){return!isFinite(1==arguments.length?a:this.valueOf())},"Number");Double.isInfinite=Double.prototype.isInfinite;
c(Double,"parseDouble",function(a){if(null==a)throw new NumberFormatException("null");if("number"==typeof a)return a;var d=Number(a);if(isNaN(d))throw new NumberFormatException("Not a Number : "+a);return d},"String");Double.parseDouble=Double.prototype.parseDouble;c(Double,"$valueOf",function(a){return new Double(a)},"Number");Double.$valueOf=Double.prototype.$valueOf;g(Double,"equals",function(a){return null==a||!C(a,Double)?!1:a.valueOf()==this.valueOf()},"Object");Boolean=java.lang.Boolean=Boolean||
function(){q(this,arguments)};if(b._supportsNativeObject)for(d=0;d<b._extendedObjectMethods.length;d++)h=b._extendedObjectMethods[d],Boolean.prototype[h]=b._O.prototype[h];Boolean.__CLASS_NAME__="Boolean";Da(Boolean,[java.io.Serializable,java.lang.Comparable]);Boolean.equals=b._innerFunctions.equals;Boolean.getName=b._innerFunctions.getName;Boolean.serialVersionUID=Boolean.prototype.serialVersionUID=-0x32df8d7f2a630600;ua(Boolean,function(a){var d=("string"==typeof a?Boolean.toBoolean(a):a)?!0:!1;
this.valueOf=function(){return d}},"~O");Boolean.parseBoolean=c(Boolean,"parseBoolean",function(a){return Boolean.toBoolean(a)},"~S");c(Boolean,"booleanValue",function(){return this.valueOf()});Boolean.$valueOf=g(Boolean,"$valueOf",function(a){return("string"==typeof a?"true".equalsIgnoreCase(a):a)?Boolean.TRUE:Boolean.FALSE});g(Boolean,"toString",function(){return this.valueOf()?"true":"false"});g(Boolean,"hashCode",function(){return this.valueOf()?1231:1237});g(Boolean,"equals",function(a){return C(a,
Boolean)?this.booleanValue()==a.booleanValue():!1},"~O");Boolean.getBoolean=c(Boolean,"getBoolean",function(a){var d=!1;try{d=Boolean.toBoolean(System.getProperty(a))}catch(h){if(!C(h,IllegalArgumentException)&&!C(h,NullPointerException))throw h;}return d},"~S");g(Boolean,"compareTo",function(a){return a.value==this.value?0:this.value?1:-1},"Boolean");Boolean.toBoolean=c(Boolean,"toBoolean",($fz=function(a){return null!=a&&a.equalsIgnoreCase("true")},$fz.isPrivate=!0,$fz),"~S");Boolean.TRUE=Boolean.prototype.TRUE=
new Boolean(!0);Boolean.FALSE=Boolean.prototype.FALSE=new Boolean(!1);Boolean.TYPE=Boolean.prototype.TYPE=Boolean;b._Encoding={};(function(a){a.UTF8="utf-8";a.UTF16="utf-16";a.ASCII="ascii";a.guessEncoding=function(d){return 239==d.charCodeAt(0)&&187==d.charCodeAt(1)&&191==d.charCodeAt(2)?a.UTF8:255==d.charCodeAt(0)&&254==d.charCodeAt(1)?a.UTF16:a.ASCII};a.guessEncodingArray=function(d){return 239==d[0]&&187==d[1]&&191==d[2]?a.UTF8:255==d[0]&&254==d[1]?a.UTF16:a.ASCII};a.readUTF8=function(d){if("string"!=
typeof d)return a.readUTF8Array(d);var h=a.guessEncoding(d),b=0;h==a.UTF8?b=3:h==a.UTF16&&(b=2);for(h=[];b<d.length;b++){var e=d.charCodeAt(b);if(128>e)h[h.length]=d.charAt(b);else if(192<e&&224>e){e&=31;b++;var c=d.charCodeAt(b)&63,e=(e<<6)+c;h[h.length]=String.fromCharCode(e)}else if(224<=e){e&=15;b++;c=d.charCodeAt(b)&63;b++;var f=d.charCodeAt(b)&63,e=(e<<12)+(c<<6)+f;h[h.length]=String.fromCharCode(e)}}return h.join("")};a.readUTF8Array=function(d){var h=a.guessEncodingArray(d),b=0;h==a.UTF8?
b=3:h==a.UTF16&&(b=2);for(h=[];b<d.length;b++){var e=d[b];if(128>e)h[h.length]=String.fromCharCode(e);else if(192<e&&224>e){var e=e&31,c=d[++b]&63,e=(e<<6)+c;h[h.length]=String.fromCharCode(e)}else if(224<=e){var e=e&15,c=d[++b]&63,f=d[++b]&63,e=(e<<12)+(c<<6)+f;h[h.length]=String.fromCharCode(e)}}return h.join("")};a.convert2UTF8=function(d){var h=this.guessEncoding(d),b=0;if(h==a.UTF8)return d;h==a.UTF16&&(b=2);for(var h=Array(0+d.length-b),e=b;e<d.length;e++){var c=d.charCodeAt(e);if(128>c)h[0+
e-b]=d.charAt(e);else if(2047>=c){var f=192+((c&1984)>>6),j=128+(c&63);h[0+e-b]=String.fromCharCode(f)+String.fromCharCode(j)}else f=224+((c&61440)>>12),j=128+((c&4032)>>6),c=128+(c&63),h[0+e-b]=String.fromCharCode(f)+String.fromCharCode(j)+String.fromCharCode(c)}return h.join("")};a.base64Chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");a.encodeBase64=function(d){if(null==d||0==d.length)return d;for(var h=a.base64Chars,b=d.length,e=0,c=[],f,j;e<b;)f=d.charCodeAt(e++),
c[c.length]=h[f>>2],e<b?(j=d.charCodeAt(e++),c[c.length]=h[f<<4&48|j>>4],e<b?(f=d.charCodeAt(e++),c[c.length]=h[j<<2&60|f>>6],c[c.length]=h[f&63]):(c[c.length]=h[j<<2&60],c[c.length]="=")):(c[c.length]=h[f<<4&48],c[c.length]="=",c[c.length]="=");return c.join("")};a.decodeBase64=function(d){if(null==d||0==d.length)return d;var h=a.base64Chars,b=a.xBase64Chars;if(null==a.xBase64Chars){for(var b={},e=0;e<h.length;e++)b[h[e]]=e;a.xBase64Chars=b}for(var h=d.length,e=0,c=[],f,j,g,M,v=0;e<h&&6E4>v++;)f=
b[d.charAt(e++)],j=b[d.charAt(e++)],g=b[d.charAt(e++)],M=b[d.charAt(e++)],c[c.length]=String.fromCharCode(f<<2&255|j>>4),null!=g&&(c[c.length]=String.fromCharCode(j<<4&255|g>>2),null!=M&&(c[c.length]=String.fromCharCode(g<<6&255|M)));return c.join("")};if(null==String.prototype.$replace){java.lang.String=String;b._setDeclared("String",String);if(b._supportsNativeObject)for(var d=0;d<b._extendedObjectMethods.length;d++){var h=b._extendedObjectMethods[d];"to$tring"==h||("toString"==h||"equals"==h||
"hashCode"==h)||(String.prototype[h]=b._O.prototype[h])}Da(String,[java.io.Serializable,CharSequence,Comparable]);String.getName=b._innerFunctions.getName;String.serialVersionUID=String.prototype.serialVersionUID=-0x5f0f5bc785c44c00;(function(d){d.$replace=function(a,d){if(a==d||0>this.indexOf(a))return""+this;1==a.length?0<="\\$.*+|?^{}()[]".indexOf(a)&&(a="\\"+a):a=a.replace(/([\\\$\.\*\+\|\?\^\{\}\(\)\[\]])/g,function(a,d){return"\\"+d});return this.replace(RegExp(a,"gm"),d)};d.$generateExpFunction=
function(a){var d=[],h=[],b=0;d[0]="";for(var r=0;r<a.length;r++){var e=a.charAt(r);r!=a.length-1&&"\\"==e?(r++,e=a.charAt(r),"\\"==e&&(d[b]+="\\"),d[b]+=e):r!=a.length-1&&"$"==e?(r++,h[b]=parseInt(a.charAt(r)),b++,d[b]=""):d[b]="\r"==e?d[b]+"\\r":"\n"==e?d[b]+"\\n":"\t"==e?d[b]+"\\t":'"'==e?d[b]+'\\"':d[b]+e}a="f = function (";b=Math.max.apply({},h);for(r=0;r<=b;r++)a+="$"+r,r!=b&&(a+=", ");a+=") { return ";for(r=0;r<d.length-1;r++)a+='"'+d[r]+'" + $'+h[r]+" + ";a+='"'+d[r]+'"; }';return eval(a)};
d.replaceAll=function(a,d){return this.replace(RegExp(a,"gm"),this.$generateExpFunction(d))};d.replaceFirst=function(a,d){return this.replace(RegExp(a,"m"),this.$generateExpFunction(d))};d.matches=function(a){null!=a&&(a="^("+a+")$");a=this.match(RegExp(a,"gm"));return null!=a&&0!=a.length};d.regionMatches=function(a,d,h,b,r){if("number"==typeof a||!0!=a&&!1!=a)r=b,b=h,h=d,d=a,a=!1;if(0>b||0>d||d>this.length-r||b>h.length-r)return!1;d=this.substring(d,d+r);h=h.substring(b,b+r);a&&(d=d.toLowerCase(),
h=h.toLowerCase());return d==h};d.$plit=function(a,d){if(!d&&" "==a)return this.split(a);if(null!=d&&0<d){if(1==d)return this;var h=RegExp("("+a+")","gm"),b=1,r=this.replace(h,function(a){b++;return b==d?"@@_@@":a}),h=RegExp(a,"gm"),h=this.split(h);h.length>d&&(h[d-1]=r.substring(r.indexOf("@@_@@")+5),h.length=d);return h}h=RegExp(a,"gm");return this.split(h)};d.trim||(d.trim=function(){return this.replace(/^\s+/g,"").replace(/\s+$/g,"")});if(!d.startsWith||!d.endsWith){var h=function(a,d,h){var b=
h,r=0,e=d.length;if(0>h||h>a.length-e)return!1;for(;0<=--e;)if(a.charAt(b++)!=d.charAt(r++))return!1;return!0};d.startsWith=function(a){return 1==arguments.length?h(this,arguments[0],0):2==arguments.length?h(this,arguments[0],arguments[1]):!1};d.endsWith=function(a){return h(this,a,this.length-a.length)}}d.equals=function(a){return this.valueOf()==a};d.equalsIgnoreCase=function(a){return null==a?!1:this==a||this.toLowerCase()==a.toLowerCase()};d.hash=0;d.hashCode=function(){var a=this.hash;if(0==
a){for(var d=0,h=this.length,b=0;b<h;b++)a=31*a+this.charCodeAt(d++),a&=4294967295;this.hash=a}return a};d.getBytes=function(){if(4==arguments.length)return this.getChars(arguments[0],arguments[1],arguments[2],arguments[3]);var d=this;if(1==arguments.length){for(var h=arguments[0].toString().toLowerCase(),b="utf-8 UTF8 us-ascii iso-8859-1 8859_1 gb2312 gb18030 gbk".split(" "),e=!1,c=0;c<b.length;c++)if(b[c]==h){e=!0;break}if(!e)throw new java.io.UnsupportedEncodingException;if("utf-8"==h||"utf8"==
h)d=a.convert2UTF8(this)}h=Array(d.length);for(c=e=b=0;c<d.length;c++)b=d.charCodeAt(c),255<b?(h[e]=26,h[e+1]=b&255,h[e+2]=(b&65280)>>8,e+=2):h[e]=b,e++;return O(h)};d.contains=function(a){return 0<=this.indexOf(a)};d.compareTo=function(a){return this>a?1:this<a?-1:0};d.toCharArray=function(){for(var a=Array(this.length),d=0;d<this.length;d++)a[d]=this.charAt(d);return a};String.value0f=String.valueOf;String.valueOf=function(a){if("undefined"==a)return String.value0f();if(a instanceof Array){if(1==
arguments.length)return a.join("");for(var d=arguments[1],h=arguments[2],b=Array(h),r=0;r<h;r++)b[r]=a[d+r];return b.join("")}return""+a};d.subSequence=function(a,d){return this.substring(a,d)};d.compareToIgnoreCase=function(a){if(null==a)throw new NullPointerException;var d=this.toUpperCase(),h=a.toUpperCase();if(d==h)return 0;d=this.toLowerCase();h=a.toLowerCase();return d==h?0:d>h?1:-1};d.contentEquals=function(a){if(this.length!=a.length())return!1;a=a.getValue();for(var d=0,h=0,b=this.length;0!=
b--;)if(this.charCodeAt(d++)!=a[h++])return!1;return!0};d.getChars=function(a,d,h,b){if(0>a)throw new StringIndexOutOfBoundsException(a);if(d>this.length)throw new StringIndexOutOfBoundsException(d);if(a>d)throw new StringIndexOutOfBoundsException(d-a);if(null==h)throw new NullPointerException;for(var r=0;r<d-a;r++)h[b+r]=this.charAt(a+r)};d.$concat=d.concat;d.concat=function(a){if(null==a)throw new NullPointerException;return this.$concat(a)};d.$lastIndexOf=d.lastIndexOf;d.lastIndexOf=function(a,
d){return null!=d&&0>=d+this.length?-1:null!=d?this.$lastIndexOf(a,d):this.$lastIndexOf(a)};d.intern=function(){return this.valueOf()};String.copyValueOf=d.copyValueOf=function(){return 1==arguments.length?String.instantialize(arguments[0]):String.instantialize(arguments[0],arguments[1],arguments[2])};d.codePointAt||(d.codePointAt=d.charCodeAt)})(String.prototype);var c=new TextDecoder;String.instantialize=function(){switch(arguments.length){case 0:return new String;case 1:var a=arguments[0];return a.BYTES_PER_ELEMENT?
0==a.length?"":"number"==typeof a[0]?c.decode(a):a.join(""):a instanceof Array?0==a.length?"":"number"==typeof a[0]?c.decode(new Uint8Array(a)):a.join(""):"string"==typeof a||a instanceof String?new String(a):""+a;case 2:var a=arguments[0],d=arguments[1];return"string"==typeof d?String.instantialize(a,0,a.length,d):String.instantialize(a,d,0,a.length);case 3:var a=arguments[0],h=arguments[1],d=arguments[2];arguments[2]instanceof Array&&(a=arguments[2],h=arguments[0],d=arguments[1]);var b=Array(d);
if(0>h||d+h>a.length)throw new IndexOutOfBoundsException;if(0<d)if(null!=a[h].length)for(var r=0;r<d;r++)b[r]=a[h+r];else for(r=0;r<d;r++)b[r]=String.fromCharCode(a[h+r]);return b.join("");case 4:a=arguments[0];h=arguments[3];if("string"==typeof h||h instanceof String){h=arguments[1];d=arguments[2];b=new Uint8Array(d);for(r=0;r<d;r++)b[r]=a[h+r];return c.decode(b)}r=arguments[3];h=arguments[2];d=arguments[1];b=Array(r);if(0==d)for(;0<r--;)b[r]=String.fromCharCode(a[r+h]&255);else for(d<<=8;0<r--;)b[r]=
String.fromCharCode(d|a[r+h]&255);return b.join("");default:a="";for(r=0;r<arguments.length;r++)a+=arguments[r];return a}};-1!=navigator.userAgent.toLowerCase().indexOf("chrome")&&(String.prototype.toString=function(){return this.valueOf()})}})(b._Encoding);d=w(function(){this.value=0;q(this,arguments)},java.lang,"Character",null,[java.io.Serializable,Comparable]);x(d,function(a){this.value=a},"~N");c(d,"charValue",function(){return this.value});g(d,"hashCode",function(){return this.value.charCodeAt(0)});
g(d,"equals",function(a){return C(a,Character)?this.value.charCodeAt(0)==a.charValue().charCodeAt(0):!1},"~O");g(d,"compareTo",function(a){return this.value.charCodeAt(0)-a.value.charCodeAt(0)},"Character");d.toLowerCase=c(d,"toLowerCase",function(a){return(""+a).toLowerCase().charAt(0)},"~N");d.toUpperCase=c(d,"toUpperCase",function(a){return(""+a).toUpperCase().charAt(0)},"~N");d.isDigit=c(d,"isDigit",function(a){a=a.charCodeAt(0);return 48<=a&&57>=a},"~N");d.isUpperCase=c(d,"isUpperCase",function(a){a=
a.charCodeAt(0);return 65<=a&&90>=a},"~N");d.isLowerCase=c(d,"isLowerCase",function(a){a=a.charCodeAt(0);return 97<=a&&122>=a},"~N");d.isWhitespace=c(d,"isWhitespace",function(a){a=a.charCodeAt(0);return 28<=a&&32>=a||9<=a&&13>=a||5760==a||8192<=a&&8199!=a&&(8203>=a||8232==a||8233==a||12288==a)},"~N");d.isLetter=c(d,"isLetter",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a||97<=a&&122>=a},"~N");d.isLetterOrDigit=c(d,"isLetterOrDigit",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a||97<=a&&122>=
a||48<=a&&57>=a},"~N");d.isSpaceChar=c(d,"isSpaceChar",function(a){a=a.charCodeAt(0);return 32==a||160==a||5760==a?!0:8192>a?!1:8203>=a||8232==a||8233==a||8239==a||12288==a},"~N");d.digit=c(d,"digit",function(a,d){var h=a.charCodeAt(0);if(2<=d&&36>=d&&128>h){var b=-1;48<=h&&57>=h?b=h-48:97<=h&&122>=h?b=h-87:65<=h&&90>=h&&(b=h-55);return b<d?b:-1}return-1},"~N,~N");g(d,"toString",function(){return String.valueOf([this.value])});d.toString=g(d,"toString",function(a){return this===Character?"class java.lang.Character":
String.valueOf(a)},"~N");d.TYPE=d;b._ArrayWrapper=function(a,d){return{a:a,__CLASS_NAME__:"Array",superClazz:Array,getComponentType:function(){return d},instanceOf:function(a){return C(d,a)},getName:function(){return this.__CLASS_NAME__}}};d=G(java.lang.reflect,"Array");d.newInstance=c(d,"newInstance",function(a,d){var h=u(d);h.getClass=function(){return new b._ArrayWrapper(this,a)};return h},"Class,~N");d.getLength=function(a){return a.length};d.get=function(a,d){return a[d]};a.Date=Date;Date.TYPE=
"javautil.Date";Date.__CLASS_NAME__="Date";b._setDeclared("java.util.Date",Date);b._setDeclared("Date",Date);Da(Date,[java.io.Serializable,java.lang.Comparable]);c(a.Date,"clone",function(){return new Date(this.getTime())});c(a.Date,"before",function(a){return this.getTime()<a.getTime()},"javautil.Date");c(a.Date,"after",function(a){return this.getTime()>a.getTime()},"javautil.Date");c(a.Date,"equals",function(d){return C(d,a.Date)&&this.getTime()==d.getTime()},"Object");c(a.Date,"compareTo",function(a){if(null==
a)return 1;var d=this.getTime();a=a.getTime();return d<a?-1:d==a?0:1},"Object");g(a.Date,"hashCode",function(){var a=this.getTime();return parseInt(a)^parseInt(a>>32)});d=w(function(){this.source=null;q(this,arguments)},a,"EventObject",null,java.io.Serializable);x(d,function(a){if(null!=a)this.source=a;else throw new IllegalArgumentException;},"~O");c(d,"getSource",function(){return this.source});g(d,"toString",function(){return this.getClass().getName()+"[source="+String.valueOf(this.source)+"]"});
K(a,"EventListener");d=w(function(){this.listener=null;q(this,arguments)},a,"EventListenerProxy",null,a.EventListener);x(d,function(a){this.listener=a},"javautil.EventListener");c(d,"getListener",function(){return this.listener});K(a,"Iterator");K(a,"ListIterator",a.Iterator);K(a,"Enumeration");K(a,"Collection",Iterable);K(a,"Set",a.Collection);K(a,"Map");K(a.Map,"Entry");K(a,"List",a.Collection);K(a,"Queue",a.Collection);K(a,"RandomAccess");d=w(function(){this.stackTrace=this.cause=this.detailMessage=
null;q(this,arguments)},java.lang,"Throwable",null,java.io.Serializable);N(d,function(){this.cause=this});x(d,function(){this.fillInStackTrace()});x(d,function(a,d){this.fillInStackTrace();!d&&"object"==typeof a&&(d=a,a=d.toString());d&&(this.cause=d);this.detailMessage=a},"~S,Throwable");c(d,"getMessage",function(){return this.message||this.detailMessage||this.toString()});c(d,"getLocalizedMessage",function(){return this.getMessage()});c(d,"getCause",function(){return this.cause===this?null:this.cause});
c(d,"initCause",function(a){if(this.cause!==this)throw new IllegalStateException("Can't overwrite cause");if(a===this)throw new IllegalArgumentException("Self-causation not permitted");this.cause=a;return this},"Throwable");g(d,"toString",function(){var a=this.getClass().getName(),d=this.message||this.detailMessage;return d?a+": "+d:a});c(d,"printStackTrace",function(){System.err.println(this.getStackTrace?this.getStackTrace():this.message+" "+Sa())});c(d,"getStackTrace",function(){for(var a=""+this+
"\n",d=0;d<this.stackTrace.length;d++){var h=this.stackTrace[d],b=h.methodName.indexOf("(");if("construct"!=h.methodName.substring(0,b).replace(/\s+/g,"")||null==h.nativeClazz||0>db(h.nativeClazz,Throwable))a+=h+"\n"}return a});c(d,"printStackTrace",function(){this.printStackTrace()},"java.io.PrintStream");c(d,"printStackTrace",function(){this.printStackTrace()},"java.io.PrintWriter");c(d,"fillInStackTrace",function(){this.stackTrace=[];for(var a=arguments.callee.caller,d=null,h=[],c=b._callingStackTraces.length-
1,k=!0;-1<c||null!=a;){var l=null;if(!k||a==mb||a==ia||null==a){if(0>c)break;k=!0;d=b._callingStackTraces[c].caller;l=b._callingStackTraces[c].owner;c--}else d=a,null!=d.claxxOwner?l=d.claxxOwner:null!=d.exClazz&&(l=d.exClazz);a=new StackTraceElement(null!=l&&0!=l.__CLASS_NAME__.length?l.__CLASS_NAME__:"anonymous",(null==d.exName?"anonymous":d.exName)+" ("+eb(d.arguments)+")",null,-1);a.nativeClazz=l;this.stackTrace[this.stackTrace.length]=a;for(l=0;l<h.length;l++)h[l]==d&&(a=new StackTraceElement("lost",
"missing",null,-3),a.nativeClazz=null,this.stackTrace[this.stackTrace.length]=a,k=!1);null!=d&&(h[h.length]=d);a=d.arguments.callee.caller}b._initializingException=!1;return this});c(d,"setStackTrace",function(a){a=a.clone();for(var d=0;d<a.length;d++)if(null==a[d])throw new NullPointerException("stackTrace["+d+"]");this.stackTrace=a},"~A");d=w(function(){this.fileName=this.methodName=this.declaringClass=null;this.lineNumber=0;q(this,arguments)},java.lang,"StackTraceElement",null,java.io.Serializable);
x(d,function(a,d,h,b){if(null==a||null==d)throw new NullPointerException;this.declaringClass=a;this.methodName=d;this.fileName=h;this.lineNumber=b},"~S,~S,~S,~N");g(d,"equals",function(a){if(!C(a,StackTraceElement)||(null==this.methodName||null==a.methodName)||!this.getMethodName().equals(a.getMethodName())||!this.getClassName().equals(a.getClassName()))return!1;var d=this.getFileName();if(null==d){if(null!=a.getFileName())return!1}else if(!d.equals(a.getFileName()))return!1;return this.getLineNumber()!=
a.getLineNumber()?!1:!0},"~O");c(d,"getClassName",function(){return null==this.declaringClass?"<unknown class>":this.declaringClass});c(d,"getFileName",function(){return this.fileName});c(d,"getLineNumber",function(){return this.lineNumber});c(d,"getMethodName",function(){return null==this.methodName?"<unknown method>":this.methodName});g(d,"hashCode",function(){return null==this.methodName?0:this.methodName.hashCode()^this.declaringClass.hashCode()});c(d,"isNativeMethod",function(){return-2==this.lineNumber});
g(d,"toString",function(){var a=this.getClassName()+"."+this.getMethodName();if(this.isNativeMethod())a+="(Native Method)";else{var d=this.getFileName();if(null==d)a+="(Unknown Source)";else{var h=this.getLineNumber(),a=a+"("+d;0<=h&&(a+=":",a+=h);a+=")"}}return a});TypeError.prototype.getMessage||(TypeError.prototype.getMessage=function(){return(this.message||this.toString())+(this.getStackTrace?this.getStackTrace():Sa())});Clazz_Error=Error;Clazz_declareTypeError=function(a,d,h,b,c){return w(function(){q(this,
arguments);return Clazz_Error()},a,d,h,b,c)};b._Error||(b._Error=Error);w(function(){q(this,arguments);return b._Error()},java.lang,"Error",Throwable);d=G(java.lang,"LinkageError",Error);d=G(java.lang,"IncompatibleClassChangeError",LinkageError);d=G(java.lang,"AbstractMethodError",IncompatibleClassChangeError);d=G(java.lang,"AssertionError",Error);x(d,function(a){I(this,AssertionError,[""+a,C(a,Throwable)?a:null])},"~O");d=G(java.lang,"ClassCircularityError",LinkageError);d=G(java.lang,"ClassFormatError",
LinkageError);d=w(function(){this.exception=null;q(this,arguments)},java.lang,"ExceptionInInitializerError",LinkageError);x(d,function(){I(this,ExceptionInInitializerError);this.initCause(null)});x(d,function(a){I(this,ExceptionInInitializerError,[a]);this.initCause(null)},"~S");x(d,function(a){I(this,ExceptionInInitializerError);this.exception=a;this.initCause(a)},"Throwable");c(d,"getException",function(){return this.exception});g(d,"getCause",function(){return this.exception});d=G(java.lang,"IllegalAccessError",
IncompatibleClassChangeError);d=G(java.lang,"InstantiationError",IncompatibleClassChangeError);d=G(java.lang,"VirtualMachineError",Error);d=G(java.lang,"InternalError",VirtualMachineError);d=G(java.lang,"NoClassDefFoundError",LinkageError);d=G(java.lang,"NoSuchFieldError",IncompatibleClassChangeError);d=G(java.lang,"NoSuchMethodError",IncompatibleClassChangeError);d=G(java.lang,"OutOfMemoryError",VirtualMachineError);d=G(java.lang,"StackOverflowError",VirtualMachineError);d=G(java.lang,"UnknownError",
VirtualMachineError);d=G(java.lang,"UnsatisfiedLinkError",LinkageError);d=G(java.lang,"UnsupportedClassVersionError",ClassFormatError);d=G(java.lang,"VerifyError",LinkageError);d=G(java.lang,"ThreadDeath",Error);x(d,function(){I(this,ThreadDeath,[])});d=G(java.lang,"Exception",Throwable);d=G(java.lang,"RuntimeException",Exception);d=G(java.lang,"ArithmeticException",RuntimeException);d=G(java.lang,"IndexOutOfBoundsException",RuntimeException);d=G(java.lang,"ArrayIndexOutOfBoundsException",IndexOutOfBoundsException);
x(d,function(a){I(this,ArrayIndexOutOfBoundsException,["Array index out of range: "+a])},"~N");d=G(java.lang,"ArrayStoreException",RuntimeException);d=G(java.lang,"ClassCastException",RuntimeException);d=w(function(){this.ex=null;q(this,arguments)},java.lang,"ClassNotFoundException",Exception);x(d,function(){I(this,ClassNotFoundException,[ha("Throwable")])});x(d,function(a){I(this,ClassNotFoundException,[a,null])},"~S");x(d,function(a,d){I(this,ClassNotFoundException,[a]);this.ex=d},"~S,Throwable");
c(d,"getException",function(){return this.ex});g(d,"getCause",function(){return this.ex});d=G(java.lang,"CloneNotSupportedException",Exception);d=G(java.lang,"IllegalAccessException",Exception);d=G(java.lang,"IllegalArgumentException",RuntimeException);x(d,function(a){I(this,IllegalArgumentException,[null==a?null:a.toString(),a])},"Throwable");d=G(java.lang,"IllegalMonitorStateException",RuntimeException);d=G(java.lang,"IllegalStateException",RuntimeException);x(d,function(a){I(this,IllegalStateException,
[null==a?null:a.toString(),a])},"Throwable");d=G(java.lang,"IllegalThreadStateException",IllegalArgumentException);d=G(java.lang,"InstantiationException",Exception);d=G(java.lang,"InterruptedException",Exception);d=G(java.lang,"NegativeArraySizeException",RuntimeException);d=G(java.lang,"NoSuchFieldException",Exception);d=G(java.lang,"NoSuchMethodException",Exception);d=G(java.lang,"NullPointerException",RuntimeException);d=G(java.lang,"NumberFormatException",IllegalArgumentException);d=G(java.lang,
"SecurityException",RuntimeException);x(d,function(a){I(this,SecurityException,[null==a?null:a.toString(),a])},"Throwable");d=G(java.lang,"StringIndexOutOfBoundsException",IndexOutOfBoundsException);x(d,function(a){I(this,StringIndexOutOfBoundsException,["String index out of range: "+a])},"~N");d=G(java.lang,"UnsupportedOperationException",RuntimeException);x(d,function(){I(this,UnsupportedOperationException,[])});x(d,function(a){I(this,UnsupportedOperationException,[null==a?null:a.toString(),a])},
"Throwable");d=w(function(){this.target=null;q(this,arguments)},java.lang.reflect,"InvocationTargetException",Exception);x(d,function(){I(this,java.lang.reflect.InvocationTargetException,[ha("Throwable")])});x(d,function(a){I(this,java.lang.reflect.InvocationTargetException,[null,a]);this.target=a},"Throwable");x(d,function(a,d){I(this,java.lang.reflect.InvocationTargetException,[d,a]);this.target=a},"Throwable,~S");c(d,"getTargetException",function(){return this.target});g(d,"getCause",function(){return this.target});
d=w(function(){this.undeclaredThrowable=null;q(this,arguments)},java.lang.reflect,"UndeclaredThrowableException",RuntimeException);x(d,function(a){I(this,java.lang.reflect.UndeclaredThrowableException);this.undeclaredThrowable=a;this.initCause(a)},"Throwable");x(d,function(a,d){I(this,java.lang.reflect.UndeclaredThrowableException,[d]);this.undeclaredThrowable=a;this.initCause(a)},"Throwable,~S");c(d,"getUndeclaredThrowable",function(){return this.undeclaredThrowable});g(d,"getCause",function(){return this.undeclaredThrowable});
d=G(java.io,"IOException",Exception);d=G(java.io,"CharConversionException",java.io.IOException);d=G(java.io,"EOFException",java.io.IOException);d=G(java.io,"FileNotFoundException",java.io.IOException);d=w(function(){this.bytesTransferred=0;q(this,arguments)},java.io,"InterruptedIOException",java.io.IOException);d=G(java.io,"SyncFailedException",java.io.IOException);d=G(java.io,"UnsupportedEncodingException",java.io.IOException);d=G(java.io,"UTFDataFormatException",java.io.IOException);c(d,"getMessage",
function(){var a=ia(this,java.io.WriteAbortedException,"getMessage",[]);return this.detail?a+"; "+this.detail.toString():a});g(d,"getCause",function(){return this.detail});d=G(a,"ConcurrentModificationException",RuntimeException);x(d,function(){I(this,a.ConcurrentModificationException,[])});d=G(a,"EmptyStackException",RuntimeException);d=w(function(){this.key=this.className=null;q(this,arguments)},a,"MissingResourceException",RuntimeException);x(d,function(d,h,b){I(this,a.MissingResourceException,
[d]);this.className=h;this.key=b},"~S,~S,~S");c(d,"getClassName",function(){return this.className});c(d,"getKey",function(){return this.key});d=G(a,"NoSuchElementException",RuntimeException);d=G(a,"TooManyListenersException",Exception);d=G(java.lang,"Void");d.TYPE=d;K(java.lang.reflect,"GenericDeclaration");K(java.lang.reflect,"AnnotatedElement");d=G(java.lang.reflect,"AccessibleObject",null,java.lang.reflect.AnnotatedElement);x(d,function(){});c(d,"isAccessible",function(){return!1});d.setAccessible=
c(d,"setAccessible",function(){},"~A,~B");c(d,"setAccessible",function(){},"~B");g(d,"isAnnotationPresent",function(){return!1},"Class");g(d,"getDeclaredAnnotations",function(){return[]});g(d,"getAnnotations",function(){return[]});g(d,"getAnnotation",function(){return null},"Class");d.marshallArguments=c(d,"marshallArguments",function(){return null},"~A,~A");c(d,"invokeV",function(){},"~O,~A");c(d,"invokeL",function(){return null},"~O,~A");c(d,"invokeI",function(){return 0},"~O,~A");c(d,"invokeJ",
function(){return 0},"~O,~A");c(d,"invokeF",function(){return 0},"~O,~A");c(d,"invokeD",function(){return 0},"~O,~A");d.emptyArgs=d.prototype.emptyArgs=[];K(java.lang.reflect,"InvocationHandler");d=K(java.lang.reflect,"Member");d=G(java.lang.reflect,"Modifier");x(d,function(){});d.isAbstract=c(d,"isAbstract",function(a){return 0!=(a&1024)},"~N");d.isFinal=c(d,"isFinal",function(a){return 0!=(a&16)},"~N");d.isInterface=c(d,"isInterface",function(a){return 0!=(a&512)},"~N");d.isNative=c(d,"isNative",
function(a){return 0!=(a&256)},"~N");d.isPrivate=c(d,"isPrivate",function(a){return 0!=(a&2)},"~N");d.isProtected=c(d,"isProtected",function(a){return 0!=(a&4)},"~N");d.isPublic=c(d,"isPublic",function(a){return 0!=(a&1)},"~N");d.isStatic=c(d,"isStatic",function(a){return 0!=(a&8)},"~N");d.isStrict=c(d,"isStrict",function(a){return 0!=(a&2048)},"~N");d.isSynchronized=c(d,"isSynchronized",function(a){return 0!=(a&32)},"~N");d.isTransient=c(d,"isTransient",function(a){return 0!=(a&128)},"~N");d.isVolatile=
c(d,"isVolatile",function(a){return 0!=(a&64)},"~N");d.toString=c(d,"toString",function(a){var d=[];java.lang.reflect.Modifier.isPublic(a)&&(d[d.length]="public");java.lang.reflect.Modifier.isProtected(a)&&(d[d.length]="protected");java.lang.reflect.Modifier.isPrivate(a)&&(d[d.length]="private");java.lang.reflect.Modifier.isAbstract(a)&&(d[d.length]="abstract");java.lang.reflect.Modifier.isStatic(a)&&(d[d.length]="static");java.lang.reflect.Modifier.isFinal(a)&&(d[d.length]="final");java.lang.reflect.Modifier.isTransient(a)&&
(d[d.length]="transient");java.lang.reflect.Modifier.isVolatile(a)&&(d[d.length]="volatile");java.lang.reflect.Modifier.isSynchronized(a)&&(d[d.length]="synchronized");java.lang.reflect.Modifier.isNative(a)&&(d[d.length]="native");java.lang.reflect.Modifier.isStrict(a)&&(d[d.length]="strictfp");java.lang.reflect.Modifier.isInterface(a)&&(d[d.length]="interface");return 0<d.length?d.join(" "):""},"~N");d=w(function(){this.exceptionTypes=this.parameterTypes=this.clazz=null;this.modifiers=0;q(this,arguments)},
java.lang.reflect,"Constructor",java.lang.reflect.AccessibleObject,[java.lang.reflect.GenericDeclaration,java.lang.reflect.Member]);x(d,function(a,d,h,b){I(this,java.lang.reflect.Constructor,[]);this.clazz=a;this.parameterTypes=d;this.exceptionTypes=h;this.modifiers=b},"Class,~A,~A,~N");g(d,"getTypeParameters",function(){return null});c(d,"toGenericString",function(){return null});c(d,"getGenericParameterTypes",function(){return null});c(d,"getGenericExceptionTypes",function(){return null});c(d,"getParameterAnnotations",
function(){return null});c(d,"isVarArgs",function(){return!1});g(d,"isSynthetic",function(){return!1});g(d,"equals",function(a){if(null!=a&&C(a,java.lang.reflect.Constructor)&&this.getDeclaringClass()===a.getDeclaringClass()){var d=this.parameterTypes;a=a.parameterTypes;if(d.length==a.length){for(var h=0;h<d.length;h++)if(d[h]!==a[h])return!1;return!0}}return!1},"~O");g(d,"getDeclaringClass",function(){return this.clazz});c(d,"getExceptionTypes",function(){return this.exceptionTypes});g(d,"getModifiers",
function(){return this.modifiers});g(d,"getName",function(){return this.getDeclaringClass().getName()});c(d,"getParameterTypes",function(){return this.parameterTypes});g(d,"hashCode",function(){return this.getDeclaringClass().getName().hashCode()});c(d,"newInstance",function(a){var d=new this.clazz(nb);q(d,a);return d},"~A");g(d,"toString",function(){return null});d=G(java.lang.reflect,"Field",java.lang.reflect.AccessibleObject,java.lang.reflect.Member);g(d,"isSynthetic",function(){return!1});c(d,
"toGenericString",function(){return null});c(d,"isEnumConstant",function(){return!1});c(d,"getGenericType",function(){return null});g(d,"equals",function(){return!1},"~O");g(d,"getDeclaringClass",function(){return null});g(d,"getName",function(){return null});c(d,"getType",function(){return null});g(d,"hashCode",function(){return 0});g(d,"toString",function(){return null});d=w(function(){this.exceptionTypes=this.parameterTypes=this.returnType=this.name=this.clazz=null;this.modifiers=0;q(this,arguments)},
java.lang.reflect,"Method",java.lang.reflect.AccessibleObject,[java.lang.reflect.GenericDeclaration,java.lang.reflect.Member]);x(d,function(a,d,h,b,c,l){I(this,java.lang.reflect.Method,[]);this.clazz=a;this.name=d;this.parameterTypes=h;this.returnType=b;this.exceptionTypes=c;this.modifiers=l},"Class,~S,~A,Class,~A,~N");g(d,"getTypeParameters",function(){return null});c(d,"toGenericString",function(){return null});c(d,"getGenericParameterTypes",function(){return null});c(d,"getGenericExceptionTypes",
function(){return null});c(d,"getGenericReturnType",function(){return null});c(d,"getParameterAnnotations",function(){return null});c(d,"isVarArgs",function(){return!1});c(d,"isBridge",function(){return!1});g(d,"isSynthetic",function(){return!1});c(d,"getDefaultValue",function(){return null});g(d,"equals",function(a){if(null!=a&&C(a,java.lang.reflect.Method)&&this.getDeclaringClass()===a.getDeclaringClass()&&this.getName()===a.getName()){var d=this.parameterTypes;a=a.parameterTypes;if(d.length==a.length){for(var h=
0;h<d.length;h++)if(d[h]!==a[h])return!1;return!0}}return!1},"~O");g(d,"getDeclaringClass",function(){return this.clazz});c(d,"getExceptionTypes",function(){return this.exceptionTypes});g(d,"getModifiers",function(){return this.modifiers});g(d,"getName",function(){return this.name});c(d,"getParameterTypes",function(){return this.parameterTypes});c(d,"getReturnType",function(){return this.returnType});g(d,"hashCode",function(){return this.getDeclaringClass().getName().hashCode()^this.getName().hashCode()});
c(d,"invoke",function(a,d){var h=this.clazz.prototype[this.getName()];null==h&&(h=this.clazz[this.getName()]);null!=h&&h.apply(a,d)},"~O,~A");g(d,"toString",function(){return null})})(ra);if(!Jmol._debugCode){var ga=w(function(){this.$name=null;this.$ordinal=0;q(this,arguments)},java.lang,"Enum",null,[Comparable,java.io.Serializable]);x(ga,function(b,a){this.$name=b;this.$ordinal=a},"~S,~N");c(ga,"name",function(){return this.$name});c(ga,"ordinal",function(){return this.$ordinal});g(ga,"toString",
function(){return this.$name});g(ga,"equals",function(b){return this===b},"~O");g(ga,"clone",function(){throw new CloneNotSupportedException;});g(ga,"compareTo",function(b){if(this.getClass()!==b.getClass()&&this.getDeclaringClass()!==b.getDeclaringClass())throw new ClassCastException;return this.$ordinal-b.$ordinal},"~O");c(ga,"getDeclaringClass",function(){var b=this.getClass(),a=b.getSuperclass();return a===Enum?b:a});ga.$valueOf=c(ga,"$valueOf",function(b,a){var d=null,d=b.$clazz$[a];if(null!=
d)return d;if(null==a)throw new NullPointerException("Name is null");throw new IllegalArgumentException("No enum const "+b+"."+a);},"Class,~S");g(ga,"finalize",function(){});z(null,"java.lang.Thread",["java.util.Date"],function(){var b=w(function(){this.name=this.group=this.target=null;this.priority=0;q(this,arguments)},java.lang,"Thread",null,Runnable);x(b,function(a){this.init(null,a,"Thread-"+(new java.util.Date).getTime()+Math.random(),0)},"Runnable");x(b,function(a,d){this.init(a,d,"Thread-"+
(new java.util.Date).getTime()+Math.random(),0)},"ThreadGroup,Runnable");x(b,function(a){this.init(null,null,a,0)},"~S");x(b,function(a,d){this.init(a,null,d,0)},"ThreadGroup,~S");x(b,function(a,d){this.init(null,a,d,0)},"Runnable,~S");x(b,function(a,d,h){this.init(a,d,h,0)},"ThreadGroup,Runnable,~S");x(b,function(a,d,h,b){this.init(a,d,h,b)},"ThreadGroup,Runnable,~S,~N");b.currentThread=c(b,"currentThread",function(){null==Thread.J2S_THREAD&&(Thread.J2S_THREAD=new Thread);return Thread.J2S_THREAD});
b.sleep=c(b,"sleep",function(){alert("Thread.sleep is not implemented in Java2Script!")},"~N");c(b,"init",function(a,d,h){null==a&&(a=new ThreadGroup);this.group=a;this.target=d;this.name=h;this.priority=5},"ThreadGroup,Runnable,~S,~N");c(b,"start",function(){this.startT()});c(b,"startT",function(){window.setTimeout(function(a){return function(){a.run()}}(this),0)});c(b,"run",function(){null!=this.target&&this.target.run()});c(b,"setPriority",function(a){if(10<a||1>a)throw new IllegalArgumentException;
this.priority=a},"~N");c(b,"getPriority",function(){return this.priority});c(b,"setName",function(a){this.name=a},"~S");c(b,"getName",function(){return String.valueOf(this.name)});c(b,"getThreadGroup",function(){return this.group});g(b,"toString",function(){var a=this.getThreadGroup();return null!=a?"Thread["+this.getName()+","+this.getPriority()+","+a.getName()+"]":"Thread["+this.getName()+","+this.getPriority()+",]"});b.J2S_THREAD=null});var va=w(function(){this.name=this.parent=null;this.maxPriority=
0;q(this,arguments)},java.lang,"ThreadGroup",null);x(va,function(){this.name="system";this.maxPriority=10});x(va,function(b){this.construct(Thread.currentThread().getThreadGroup(),b)},"~S");x(va,function(b,a){if(null==b)throw new NullPointerException;this.name=a;this.parent=b;this.maxPriority=10},"ThreadGroup,~S");c(va,"getName",function(){return this.name});c(va,"getParent",function(){return this.parent});c(va,"getMaxPriority",function(){return this.maxPriority});z(["java.io.FilterInputStream"],
"java.io.BufferedInputStream",null,function(){var b=w(function(){this.buf=null;this.pos=this.count=0;this.markpos=-1;this.marklimit=0;q(this,arguments)},java.io,"BufferedInputStream",java.io.FilterInputStream);x(b,function(a){I(this,java.io.BufferedInputStream,[a]);this.buf=O(8192,0)},"java.io.InputStream");c(b,"getInIfOpen",function(){var a=this.$in;if(null==a)throw new java.io.IOException("Stream closed");return a});c(b,"getBufIfOpen",function(){var a=this.buf;if(null==a)throw new java.io.IOException("Stream closed");
return a});g(b,"resetStream",function(){});c(b,"fill",function(){var a=this.getBufIfOpen();if(0>this.markpos)this.pos=0;else if(this.pos>=a.length)if(0<this.markpos){var d=this.pos-this.markpos;System.arraycopy(a,this.markpos,a,0,d);this.pos=d;this.markpos=0}else a.length>=this.marklimit?(this.markpos=-1,this.pos=0):(d=2*this.pos,d>this.marklimit&&(d=this.marklimit),d=O(d,0),System.arraycopy(a,0,d,0,this.pos),a=this.buf=d);this.count=this.pos;a=this.isRead(a,this.pos,a.length-this.pos);0<a&&(this.count=
a+this.pos)});g(b,"readByteAsInt",function(){return this.pos>=this.count&&(this.fill(),this.pos>=this.count)?-1:this.getBufIfOpen()[this.pos++]&255});c(b,"read1",function(a,d,h){var b=this.count-this.pos;if(0>=b){if(h>=this.getBufIfOpen().length&&0>this.markpos)return this.isRead(a,d,h);this.fill();b=this.count-this.pos;if(0>=b)return-1}h=b<h?b:h;System.arraycopy(this.getBufIfOpen(),this.pos,a,d,h);this.pos+=h;return h},"~A,~N,~N");c(b,"isRead",function(a,d,h){var b=this.getInIfOpen();return b.readBAIS?
b.readBAIS(a,d,h):b.read(a,d,h)},"~A,~N,~N");g(b,"read",function(a,d,h){return this.readBIS(a,d,h)},"~A,~N,~N");c(b,"readBIS",function(a,d,h){this.getBufIfOpen();if(0>(d|h|d+h|a.length-(d+h)))throw new IndexOutOfBoundsException;if(0==h)return 0;for(var b=0;;){var c=this.read1(a,d+b,h-b);if(0>=c)return 0==b?c:b;b+=c;if(b>=h)return b;c=this.$in;if(null!=c&&0>=c.available())return b}},"~A,~N,~N");g(b,"skip",function(a){this.getBufIfOpen();if(0>=a)return 0;var d=this.count-this.pos;if(0>=d){if(0>this.markpos)return this.getInIfOpen().skip(a);
this.fill();d=this.count-this.pos;if(0>=d)return 0}a=d<a?d:a;this.pos+=a;return a},"~N");g(b,"available",function(){var a=this.count-this.pos,d=this.getInIfOpen().available();return a>2147483647-d?2147483647:a+d});g(b,"mark",function(a){this.marklimit=a;this.markpos=this.pos},"~N");g(b,"reset",function(){this.getBufIfOpen();if(0>this.markpos)throw new java.io.IOException("Resetting to invalid mark");this.pos=this.markpos});g(b,"markSupported",function(){return!0});g(b,"close",function(){var a=this.$in;
this.$in=null;null!=a&&a.close()})});z(["java.io.Reader"],"java.io.BufferedReader",null,function(){var b=w(function(){this.cb=this.$in=null;this.nextChar=this.nChars=0;this.markedChar=-1;this.readAheadLimit=0;this.markedSkipLF=this.skipLF=!1;q(this,arguments)},java.io,"BufferedReader",java.io.Reader);x(b,function(a){I(this,java.io.BufferedReader,[a]);this.$in=a;this.setSize(8192)},"java.io.Reader");c(b,"setSize",function(a){if(0>=a)throw new IllegalArgumentException("Buffer size <= 0");this.cb=ba(a,
"\x00");this.nextChar=this.nChars=0},"~N");c(b,"ensureOpen",function(){if(null==this.$in)throw new java.io.IOException("Stream closed");});c(b,"fill",function(){var a;if(-1>=this.markedChar)a=0;else{var d=this.nextChar-this.markedChar;d>=this.readAheadLimit?(this.markedChar=-2,a=this.readAheadLimit=0):(this.readAheadLimit<=this.cb.length?System.arraycopy(this.cb,this.markedChar,this.cb,0,d):(a=ba(this.readAheadLimit,"\x00"),System.arraycopy(this.cb,this.markedChar,a,0,d),this.cb=a),this.markedChar=
0,this.nextChar=this.nChars=a=d)}do d=this.$in.read(this.cb,a,this.cb.length-a);while(0==d);0<d&&(this.nChars=a+d,this.nextChar=a)});c(b,"read1",function(a,d,h){if(this.nextChar>=this.nChars){if(h>=this.cb.length&&-1>=this.markedChar&&!this.skipLF)return this.$in.read(a,d,h);this.fill()}if(this.nextChar>=this.nChars||this.skipLF&&(this.skipLF=!1,"\n"==this.cb[this.nextChar]&&(this.nextChar++,this.nextChar>=this.nChars&&this.fill(),this.nextChar>=this.nChars)))return-1;h=Math.min(h,this.nChars-this.nextChar);
System.arraycopy(this.cb,this.nextChar,a,d,h);this.nextChar+=h;return h},"~A,~N,~N");c(b,"read",function(a,d,h){this.ensureOpen();if(0>d||d>a.length||0>h||d+h>a.length||0>d+h)throw new IndexOutOfBoundsException;if(0==h)return 0;var b=this.read1(a,d,h);if(0>=b)return b;for(;b<h&&this.$in.ready();){var c=this.read1(a,d+b,h-b);if(0>=c)break;b+=c}return b},"~A,~N,~N");c(b,"readLine1",function(a){var d=null,h;this.ensureOpen();for(a=a||this.skipLF;;){this.nextChar>=this.nChars&&this.fill();if(this.nextChar>=
this.nChars)return null!=d&&0<d.length?d.toString():null;var b=!1,c=String.fromCharCode(0),f;a&&"\n"==this.cb[this.nextChar]&&this.nextChar++;a=this.skipLF=!1;f=this.nextChar;a:for(;f<this.nChars;f++)if(c=this.cb[f],"\n"==c||"\r"==c){b=!0;break a}h=this.nextChar;this.nextChar=f;h=String.instantialize(this.cb,h,f-h);if(b)return null!=d&&(h=d+=h),this.nextChar++,"\r"==c&&(this.skipLF=!0),h;null==d&&(d="");d+=h}},"~B");c(b,"readLine",function(){return this.readLine1(!1)});g(b,"skip",function(a){if(0>
a)throw new IllegalArgumentException("skip value is negative");this.ensureOpen();for(var d=a;0<d;){this.nextChar>=this.nChars&&this.fill();if(this.nextChar>=this.nChars)break;this.skipLF&&(this.skipLF=!1,"\n"==this.cb[this.nextChar]&&this.nextChar++);var h=this.nChars-this.nextChar;if(d<=h){this.nextChar+=d;d=0;break}d-=h;this.nextChar=this.nChars}return a-d},"~N");c(b,"ready",function(){this.ensureOpen();this.skipLF&&(this.nextChar>=this.nChars&&this.$in.ready()&&this.fill(),this.nextChar<this.nChars&&
("\n"==this.cb[this.nextChar]&&this.nextChar++,this.skipLF=!1));return this.nextChar<this.nChars||this.$in.ready()});g(b,"markSupported",function(){return!0});g(b,"mark",function(a){if(0>a)throw new IllegalArgumentException("Read-ahead limit < 0");this.ensureOpen();this.readAheadLimit=a;this.markedChar=this.nextChar;this.markedSkipLF=this.skipLF},"~N");g(b,"reset",function(){this.ensureOpen();if(0>this.markedChar)throw new java.io.IOException(-2==this.markedChar?"Mark invalid":"Stream not marked");
this.nextChar=this.markedChar;this.skipLF=this.markedSkipLF});c(b,"close",function(){null!=this.$in&&(this.$in.close(),this.cb=this.$in=null)})});z(["java.io.Writer"],"java.io.BufferedWriter",null,function(){var b=w(function(){this.buf=this.out=null;this.pos=0;this.lineSeparator="\r\n";q(this,arguments)},java.io,"BufferedWriter",java.io.Writer);x(b,function(a){I(this,java.io.BufferedWriter,[a]);this.out=a;this.buf=ba(8192,"\x00")},"java.io.Writer");x(b,function(a,d){I(this,java.io.BufferedWriter,
[a]);if(0<d)this.out=a,this.buf=ba(d,"\x00");else throw new IllegalArgumentException("K0058");},"java.io.Writer,~N");c(b,"close",function(){this.isOpen()&&(this.flush(),this.out.close(),this.out=this.buf=null)});c(b,"flush",function(){if(this.isOpen())0<this.pos&&this.out.write(this.buf,0,this.pos),this.pos=0,this.out.flush();else throw new java.io.IOException("K005d");});c(b,"isOpen",function(){return null!=this.out});c(b,"newLine",function(){this.write("\r\n",0,2)});c(b,"write",function(a,d,h){if(!this.isOpen())throw new java.io.IOException("K005d");
if(0>d||d>a.length-h||0>h)throw new IndexOutOfBoundsException;if(0==this.pos&&h>=this.buf.length)this.out.write(a,d,h);else{var b=this.buf.length-this.pos;h<b&&(b=h);0<b&&(System.arraycopy(a,d,this.buf,this.pos,b),this.pos+=b);this.pos==this.buf.length&&(this.out.write(this.buf,0,this.buf.length),this.pos=0,h>b&&(d+=b,b=h-b,b>=this.buf.length?this.out.write(a,d,b):(System.arraycopy(a,d,this.buf,this.pos,b),this.pos+=b)))}},"~A,~N,~N");c(b,"write",function(a){if(this.isOpen())this.pos>=this.buf.length&&
(this.out.write(this.buf,0,this.buf.length),this.pos=0),this.buf[this.pos++]=String.fromCharCode(a);else throw new java.io.IOException("K005d");},"~N");c(b,"write",function(a,d,h){if(!this.isOpen())throw new java.io.IOException("K005d");if(!(0>=h)){if(d>a.length-h||0>d)throw new StringIndexOutOfBoundsException;if(0==this.pos&&h>=this.buf.length){var b=ba(h,"\x00");a.getChars(d,d+h,b,0);this.out.write(b,0,h)}else{var c=this.buf.length-this.pos;h<c&&(c=h);0<c&&(a.getChars(d,d+c,this.buf,this.pos),this.pos+=
c);this.pos==this.buf.length&&(this.out.write(this.buf,0,this.buf.length),this.pos=0,h>c&&(d+=c,c=h-c,c>=this.buf.length?(b=ba(h,"\x00"),a.getChars(d,d+c,b,0),this.out.write(b,0,c)):(a.getChars(d,d+c,this.buf,this.pos),this.pos+=c)))}}},"~S,~N,~N")});z(["java.io.InputStream"],"java.io.ByteArrayInputStream",null,function(){var b=w(function(){this.buf=null;this.count=this.$mark=this.pos=0;q(this,arguments)},java.io,"ByteArrayInputStream",java.io.InputStream);x(b,function(a){I(this,java.io.ByteArrayInputStream,
[]);this.buf=a;this.pos=0;this.count=a.length},"~A");g(b,"readByteAsInt",function(){return this.pos<this.count?this.buf[this.pos++]&255:-1});g(b,"read",function(a,d,h){return this.readBAIS(a,d,h)},"~A,~N,~N");c(b,"readBAIS",function(a,d,h){if(null==a)throw new NullPointerException;if(0>d||0>h||h>a.length-d)throw new IndexOutOfBoundsException;if(this.pos>=this.count)return-1;var b=this.count-this.pos;h>b&&(h=b);if(0>=h)return 0;System.arraycopy(this.buf,this.pos,a,d,h);this.pos+=h;return h},"~A,~N,~N");
g(b,"skip",function(a){var d=this.count-this.pos;a<d&&(d=0>a?0:a);this.pos+=d;return d},"~N");g(b,"available",function(){return this.count-this.pos});g(b,"markSupported",function(){return!0});g(b,"mark",function(){this.$mark=this.pos},"~N");g(b,"resetStream",function(){});g(b,"reset",function(){this.pos=this.$mark});g(b,"close",function(){})});z(["java.io.OutputStream"],"java.io.ByteArrayOutputStream",null,function(){var b=w(function(){this.buf=null;this.count=0;q(this,arguments)},java.io,"ByteArrayOutputStream",
java.io.OutputStream);x(b,function(){this.construct(32)});x(b,function(a){I(this,java.io.ByteArrayOutputStream,[]);if(0>a)throw new IllegalArgumentException("Negative initial size: "+a);this.buf=O(a,0)},"~N");c(b,"ensureCapacity",function(a){0<a-this.buf.length&&this.grow(a)},"~N");c(b,"grow",function(a){var d=this.buf.length<<1;0>d-a&&(d=a);if(0>d){if(0>a)throw new OutOfMemoryError;d=a}this.buf=java.io.ByteArrayOutputStream.arrayCopyByte(this.buf,d)},"~N");b.arrayCopyByte=c(b,"arrayCopyByte",function(a,
d){var h=O(d,0);System.arraycopy(a,0,h,0,a.length<d?a.length:d);return h},"~A,~N");g(b,"writeByteAsInt",function(a){this.ensureCapacity(this.count+1);this.buf[this.count]=a;this.count+=1},"~N");c(b,"write",function(a,d,h){if(0>d||d>a.length||0>h||0<d+h-a.length)throw new IndexOutOfBoundsException;this.ensureCapacity(this.count+h);System.arraycopy(a,d,this.buf,this.count,h);this.count+=h},"~A,~N,~N");c(b,"writeTo",function(a){a.write(this.buf,0,this.count)},"java.io.OutputStream");c(b,"reset",function(){this.count=
0});c(b,"toByteArray",function(){return this.count==this.buf.length?this.buf:java.io.ByteArrayOutputStream.arrayCopyByte(this.buf,this.count)});c(b,"size",function(){return this.count});g(b,"toString",function(){return String.instantialize(this.buf,0,this.count)});g(b,"close",function(){})});z(["java.io.InputStream"],"java.io.FilterInputStream",null,function(){var b=w(function(){this.$in=null;q(this,arguments)},java.io,"FilterInputStream",java.io.InputStream);x(b,function(a){I(this,java.io.FilterInputStream,
[]);this.$in=a},"java.io.InputStream");c(b,"readByteAsInt",function(){return this.$in.readByteAsInt()});g(b,"read",function(a,d,h){return this.$in.read(a,d,h)},"~A,~N,~N");c(b,"skip",function(a){return this.$in.skip(a)},"~N");c(b,"available",function(){return this.$in.available()});c(b,"close",function(){this.$in.close()});c(b,"mark",function(a){this.$in.mark(a)},"~N");c(b,"reset",function(){this.$in.reset()});c(b,"markSupported",function(){return this.$in.markSupported()})});z(["java.io.Closeable"],
"java.io.InputStream",null,function(){var b=G(java.io,"InputStream",null,java.io.Closeable);c(b,"read",function(a,d,h){if(null==a)throw new NullPointerException;if(0>d||0>h||h>a.length-d)throw new IndexOutOfBoundsException;if(0==h)return 0;var b=this.readByteAsInt();if(-1==b)return-1;a[d]=b;var c=1;try{for(;c<h;c++){b=this.readByteAsInt();if(-1==b)break;a[d+c]=b}}catch(f){if(!D(f,"java.io.IOException"))throw f;}return c},"~A,~N,~N");c(b,"skip",function(a){var d=a,h;null==java.io.InputStream.skipBuffer&&
(java.io.InputStream.skipBuffer=O(2048,0));var b=java.io.InputStream.skipBuffer;if(0>=a)return 0;for(;0<d;){h=this.read(b,0,Math.min(2048,d));if(0>h)break;d-=h}return a-d},"~N");c(b,"available",function(){return 0});g(b,"close",function(){});c(b,"mark",function(){},"~N");c(b,"reset",function(){throw new java.io.IOException("mark/reset not supported");});c(b,"markSupported",function(){return!1});c(b,"resetStream",function(){});b.skipBuffer=null});z(["java.io.Reader"],"java.io.InputStreamReader",null,
function(){var b=w(function(){this.$in=null;this.isOpen=!0;this.charsetName=null;this.isUTF8=!1;this.bytearr=null;this.pos=0;q(this,arguments)},java.io,"InputStreamReader",java.io.Reader);x(b,function(a,d){I(this,java.io.InputStreamReader,[a]);this.$in=a;this.charsetName=d;if(!(this.isUTF8="UTF-8".equals(d))&&!"ISO-8859-1".equals(d))throw new NullPointerException("charsetName");},"java.io.InputStream,~S");c(b,"getEncoding",function(){return this.charsetName});g(b,"read",function(a,d,h){if(null==this.bytearr||
this.bytearr.length<h)this.bytearr=O(h,0);var b,c,f=0,j=d,k=this.$in.read(this.bytearr,this.pos,h-this.pos),l=this.$in.available();if(0>k)return-1;for(var g=k;f<g;){h=this.bytearr[f]&255;if(this.isUTF8)switch(h>>4){case 12:case 13:if(f+1>=k){if(1<=l){g=f;continue}}else if(128==((b=this.bytearr[f+1])&192)){a[j++]=String.fromCharCode((h&31)<<6|b&63);f+=2;continue}this.isUTF8=!1;break;case 14:if(f+2>=k){if(2<=l){g=f;continue}}else if(128==((b=this.bytearr[f+1])&192)&&128==((c=this.bytearr[f+2])&192)){a[j++]=
String.fromCharCode((h&15)<<12|(b&63)<<6|c&63);f+=3;continue}this.isUTF8=!1}f++;a[j++]=String.fromCharCode(h)}this.pos=k-f;for(a=0;a<this.pos;a++)this.bytearr[a]=this.bytearr[f++];return j-d},"~A,~N,~N");g(b,"ready",function(){return this.isOpen});g(b,"close",function(){this.$in.close();this.isOpen=!1})});z(["java.io.Closeable","$.Flushable"],"java.io.OutputStream",null,function(){var b=G(java.io,"OutputStream",null,[java.io.Closeable,java.io.Flushable]);c(b,"write",function(a,d,h){if(null==a)throw new NullPointerException;
if(0>d||d>a.length||0>h||d+h>a.length||0>d+h)throw new IndexOutOfBoundsException;if(0!=h)for(var b=0;b<h;b++)this.writeByteAsInt(a[d+b])},"~A,~N,~N");g(b,"flush",function(){});g(b,"close",function(){})});z(["java.io.Closeable"],"java.io.Reader",null,function(){var b=w(function(){this.lock=null;this.skipBuffer=String.fromCharCode(null);q(this,arguments)},java.io,"Reader",null,java.io.Closeable);x(b,function(a){if(null==a)throw new NullPointerException;this.lock=a},"~O");c(b,"skip",function(a){if(0>
a)throw new IllegalArgumentException("skip value is negative");var d=Math.min(a,8192);if(null==this.skipBuffer||this.skipBuffer.length<d)this.skipBuffer=ba(d,"\x00");for(var h=a;0<h;){var b=this.read(this.skipBuffer,0,Math.min(h,d));if(-1==b)break;h-=b}return a-h},"~N");c(b,"ready",function(){return!1});c(b,"markSupported",function(){return!1});c(b,"mark",function(){throw new java.io.IOException("mark() not supported");},"~N");c(b,"reset",function(){throw new java.io.IOException("reset() not supported");
})});z(["java.io.Reader"],"java.io.StringReader",null,function(){var b=w(function(){this.str=null;this.$mark=this.next=this.length=0;q(this,arguments)},java.io,"StringReader",java.io.Reader);x(b,function(a){I(this,java.io.StringReader,[a]);this.str=a;this.length=a.length},"~S");c(b,"ensureOpen",function(){if(null==this.str)throw new java.io.IOException("Stream closed");});g(b,"read",function(a,d,h){this.ensureOpen();if(0>d||d>a.length||0>h||d+h>a.length||0>d+h)throw new IndexOutOfBoundsException;
if(0==h)return 0;if(this.next>=this.length)return-1;h=Math.min(this.length-this.next,h);this.str.getChars(this.next,this.next+h,a,d);this.next+=h;return h},"~A,~N,~N");g(b,"skip",function(a){this.ensureOpen();if(this.next>=this.length)return 0;a=Math.min(this.length-this.next,a);a=Math.max(-this.next,a);this.next+=a;return a},"~N");g(b,"ready",function(){this.ensureOpen();return!0});g(b,"markSupported",function(){return!0});g(b,"mark",function(a){if(0>a)throw new IllegalArgumentException("Read-ahead limit < 0");
this.ensureOpen();this.$mark=this.next},"~N");g(b,"reset",function(){this.ensureOpen();this.next=this.$mark});g(b,"close",function(){this.str=null})});z(["java.io.Closeable","$.Flushable","java.lang.Appendable"],"java.io.Writer",null,function(){var b=w(function(){this.lock=null;q(this,arguments)},java.io,"Writer",null,[Appendable,java.io.Closeable,java.io.Flushable]);x(b,function(){this.lock=this});x(b,function(a){if(null!=a)this.lock=a;else throw new NullPointerException;},"~O");c(b,"write",function(a){this.write(a,
0,a.length)},"~A");c(b,"write",function(a){var d=ba(1,"\x00");d[0]=String.fromCharCode(a);this.write(d)},"~N");c(b,"write",function(a){var d=ba(a.length,"\x00");a.getChars(0,d.length,d,0);this.write(d)},"~S");c(b,"write",function(a,d,h){if(0<=h){var b=ba(h,"\x00");a.getChars(d,d+h,b,0);this.write(b)}else throw new StringIndexOutOfBoundsException;},"~S,~N,~N");c(b,"append",function(a){this.write(a.charCodeAt(0));return this},"~S");c(b,"append",function(a){null==a?this.write("null"):this.write(a.toString());
return this},"CharSequence");c(b,"append",function(a,d,h){null==a?this.write("null".substring(d,h)):this.write(a.subSequence(d,h).toString());return this},"CharSequence,~N,~N")});n("java.net");z(["java.io.IOException"],"java.net.MalformedURLException",null,function(){var b=G(java.net,"MalformedURLException",java.io.IOException);x(b,function(){I(this,java.net.MalformedURLException,[])})});n("java.net");z(["java.io.IOException"],"java.net.UnknownServiceException",null,function(){var b=G(java.net,"UnknownServiceException",
java.io.IOException);x(b,function(){I(this,java.net.UnknownServiceException,[])})});n("java.net");z(["java.util.Hashtable"],"java.net.URL",null,function(){var b=w(function(){this.host=this.protocol=null;this.port=-1;this.handler=this.ref=this.userInfo=this.path=this.authority=this.query=this.file=null;this.$hashCode=-1;q(this,arguments)},java.net,"URL",null);x(b,function(a,d,h){switch(arguments.length){case 1:d=a;a=h=null;break;case 2:h=null;break;case 3:if(null==a||C(a,java.net.URL))break;default:alert("java.net.URL constructor format not supported")}a&&
a.valueOf&&null==a.valueOf()&&(a=null);var b=d,c,f,j,k=0,l=null,g=!1,m=!1;try{for(f=d.length;0<f&&" ">=d.charAt(f-1);)f--;for(;k<f&&" ">=d.charAt(k);)k++;d.regionMatches(!0,k,"url:",0,4)&&(k+=4);k<d.length&&"#"==d.charAt(k)&&(g=!0);for(c=k;!g&&c<f&&47!=(j=d.charAt(c).charCodeAt(0));c++)if(58==j){var p=d.substring(k,c).toLowerCase();this.isValidProtocol(p)&&(l=p,k=c+1);break}this.protocol=l;if(null!=a&&(null==l||l.equalsIgnoreCase(a.protocol)))null==h&&(h=a.handler),null!=a.path&&a.path.startsWith("/")&&
(l=null),null==l&&(this.protocol=a.protocol,this.authority=a.authority,this.userInfo=a.userInfo,this.host=a.host,this.port=a.port,this.file=a.file,this.path=a.path,m=!0);if(null==this.protocol)throw new java.net.MalformedURLException("no protocol: "+b);if(null==h&&null==(h=java.net.URL.getURLStreamHandler(this.protocol)))throw new java.net.MalformedURLException("unknown protocol: "+this.protocol);this.handler=h;c=d.indexOf("#",k);0<=c&&(this.ref=d.substring(c+1,f),f=c);m&&k==f&&(this.query=a.query,
null==this.ref&&(this.ref=a.ref));h.parseURL(this,d,k,f)}catch(y){if(D(y,"java.net.MalformedURLException"))throw y;if(D(y,Exception))throw b=y,c=new java.net.MalformedURLException(b.getMessage()),c.initCause(b),c;throw y;}},"java.net.URL,~S,java.net.URLStreamHandler");c(b,"isValidProtocol",function(a){var d=a.length;if(1>d)return!1;var h=a.charAt(0);if(!Character.isLetter(h))return!1;for(var b=1;b<d;b++)if(h=a.charAt(b),!Character.isLetterOrDigit(h)&&"."!=h&&"+"!=h&&"-"!=h)return!1;return!0},"~S");
c(b,"set5",function(a,d,h,b,c){this.protocol=a;this.host=d;this.authority=-1==h?d:d+":"+h;this.port=h;this.file=b;this.ref=c;this.$hashCode=-1;a=b.lastIndexOf("?");-1!=a?(this.query=b.substring(a+1),this.path=b.substring(0,a)):this.path=b},"~S,~S,~N,~S,~S");c(b,"set",function(a,d,h,b,c,f,j,k){this.protocol=a;this.host=d;this.port=h;this.file=null==j?f:f+"?"+j;this.userInfo=c;this.path=f;this.ref=k;this.$hashCode=-1;this.query=j;this.authority=b},"~S,~S,~N,~S,~S,~S,~S,~S");c(b,"getQuery",function(){return this.query});
c(b,"getPath",function(){return this.path});c(b,"getUserInfo",function(){return this.userInfo});c(b,"getAuthority",function(){return this.authority});c(b,"getPort",function(){return this.port});c(b,"getDefaultPort",function(){return this.handler.getDefaultPort()});c(b,"getProtocol",function(){return this.protocol});c(b,"getHost",function(){return this.host});c(b,"getFile",function(){return this.file});c(b,"getRef",function(){return this.ref});g(b,"equals",function(a){return!C(a,"java.net.URL")?!1:
this.handler.equals2(this,a)},"~O");g(b,"hashCode",function(){return-1!=this.$hashCode?this.$hashCode:this.$hashCode=this.handler.hashCode(this)});c(b,"sameFile",function(a){return this.handler.sameFile(this,a)},"java.net.URL");g(b,"toString",function(){return this.toExternalForm()});c(b,"toExternalForm",function(){return this.handler.toExternalForm(this)});c(b,"openConnection",function(){return this.handler.openConnection(this)});c(b,"openStream",function(){return this.openConnection().getInputStream()});
c(b,"getContent",function(){return this.openConnection().getInputStream()});b.setURLStreamHandlerFactory=c(b,"setURLStreamHandlerFactory",function(a){if(null!=java.net.URL.factory)throw Error("factory already defined");var d=System.getSecurityManager();null!=d&&d.checkSetFactory();java.net.URL.handlers.clear();java.net.URL.factory=a},"java.net.URLStreamHandlerFactory");b.getURLStreamHandler=c(b,"getURLStreamHandler",function(a){var d=java.net.URL.handlers.get(a);null==d&&null!=java.net.URL.factory&&
(d=java.net.URL.factory.createURLStreamHandler(a));return d},"~S");b.factory=null;b.handlers=new java.util.Hashtable;b.streamHandlerLock=new ra._O});n("java.net");z(null,"java.net.URLConnection",["java.util.ArrayList"],function(){var b=w(function(){this.url=null;this.doInput=!0;this.connected=this.doOutput=!1;this.requests=null;q(this,arguments)},java.net,"URLConnection",null);x(b,function(a){this.url=a},"java.net.URL");c(b,"setDoInput",function(a){if(this.connected)throw new IllegalStateException("Already connected");
this.doInput=a},"~B");c(b,"getDoInput",function(){return this.doInput});c(b,"setDoOutput",function(a){if(this.connected)throw new IllegalStateException("Already connected");this.doOutput=a},"~B");c(b,"getDoOutput",function(){return this.doOutput});c(b,"getURL",function(){return this.url});c(b,"getInputStream",function(){throw new java.net.UnknownServiceException("protocol doesn't support input");});c(b,"getOutputStream",function(){throw new java.net.UnknownServiceException("protocol doesn't support output");
});c(b,"setRequestProperty",function(a,d){if(this.connected)throw new IllegalStateException("Already connected");if(null==a)throw new NullPointerException("key is null");null==this.requests&&(this.requests=new java.util.ArrayList);for(var h=this.requests.size();0<=--h;)if(this.requests.get(h)[0].equals(a)){this.requests.get(h)[1]=d;return}this.requests.add(u(-1,[a,d]))},"~S,~S")});n("java.net");var Ta=G(java.net,"URLEncoder",null);Ta.encode=c(Ta,"encode",function(b){return encodeURIComponent(b)},
"~S");n("java.net");var ja=G(java.net,"URLStreamHandler",null);c(ja,"openConnectionProxy",function(){throw new UnsupportedOperationException("Method not implemented.");},"java.net.URL,java.net.Proxy");c(ja,"parseURL",function(b,a,d,h){var r=b.getProtocol(),c=b.getAuthority(),f=b.getUserInfo(),j=b.getHost(),k=b.getPort(),l=b.getPath(),g=b.getQuery(),m=b.getRef(),p=!1,y=!1;if(d<h){var A=a.indexOf("?"),y=A==d;-1!=A&&A<h&&(g=a.substring(A+1,h),h>A&&(h=A),a=a.substring(0,A))}var H=0;if(!(d<=h-4&&"/"==
a.charAt(d)&&"/"==a.charAt(d+1)&&"/"==a.charAt(d+2)&&"/"==a.charAt(d+3))&&d<=h-2&&"/"==a.charAt(d)&&"/"==a.charAt(d+1)){d+=2;H=a.indexOf("/",d);0>H&&(H=a.indexOf("?",d),0>H&&(H=h));j=c=a.substring(d,H);A=c.indexOf("@");-1!=A?(f=c.substring(0,A),j=c.substring(A+1)):f=null;if(null!=j){if(0<j.length&&"["==j.charAt(0))throw new IllegalArgumentException("Invalid host: "+j);A=j.indexOf(":");k=-1;0<=A&&(j.length>A+1&&(k=Integer.parseInt(j.substring(A+1))),j=j.substring(0,A))}else j="";if(-1>k)throw new IllegalArgumentException("Invalid port number :"+
k);d=H;0<c.length&&(l="")}null==j&&(j="");d<h?"/"==a.charAt(d)?l=a.substring(d,h):null!=l&&0<l.length?(p=!0,A=l.lastIndexOf("/"),y="",-1==A&&null!=c&&(y="/"),l=l.substring(0,A+1)+y+a.substring(d,h)):l=(null!=c?"/":"")+a.substring(d,h):y&&null!=l&&(A=l.lastIndexOf("/"),0>A&&(A=0),l=l.substring(0,A)+"/");null==l&&(l="");if(p){for(;0<=(H=l.indexOf("/./"));)l=l.substring(0,H)+l.substring(H+2);for(H=0;0<=(H=l.indexOf("/../",H));)0<H&&0<=(h=l.lastIndexOf("/",H-1))&&0!=l.indexOf("/../",h)?(l=l.substring(0,
h)+l.substring(H+3),H=0):H+=3;for(;l.endsWith("/..");)if(H=l.indexOf("/.."),0<=(h=l.lastIndexOf("/",H-1)))l=l.substring(0,h+1);else break;l.startsWith("./")&&2<l.length&&(l=l.substring(2));l.endsWith("/.")&&(l=l.substring(0,l.length-1))}this.setURL(b,r,j,k,c,f,l,g,m)},"java.net.URL,~S,~N,~N");c(ja,"getDefaultPort",function(){return-1});c(ja,"equals2",function(b,a){var d=b.getRef(),h=a.getRef();return(d===h||null!=d&&d.equals(h))&&this.sameFile(b,a)},"java.net.URL,java.net.URL");c(ja,"hashCode",function(b){var a=
0,d=b.getProtocol();null!=d&&(a+=d.hashCode());a+=b.toString().hashCode();d=b.getFile();null!=d&&(a+=d.hashCode());a=-1==b.getPort()?a+this.getDefaultPort():a+b.getPort();b=b.getRef();null!=b&&(a+=b.hashCode());return a},"java.net.URL");c(ja,"sameFile",function(b,a){if(!(b.getProtocol()===a.getProtocol()||null!=b.getProtocol()&&b.getProtocol().equalsIgnoreCase(a.getProtocol()))||!(b.getFile()===a.getFile()||null!=b.getFile()&&b.getFile().equals(a.getFile())))return!1;var d,h;d=-1!=b.getPort()?b.getPort():
b.handler.getDefaultPort();h=-1!=a.getPort()?a.getPort():a.handler.getDefaultPort();return d!=h||!this.hostsEqual(b,a)?!1:!0},"java.net.URL,java.net.URL");c(ja,"hostsEqual",function(b,a){return null!=b.getHost()&&null!=a.getHost()?b.getHost().equalsIgnoreCase(a.getHost()):null==b.getHost()&&null==a.getHost()},"java.net.URL,java.net.URL");c(ja,"toExternalForm",function(){return""},"java.net.URL");c(ja,"setURL",function(b,a,d,h,r,c,f,j,k){if(this!==b.handler)throw new SecurityException("handler for url different from this handler");
b.set(b.getProtocol(),d,h,r,c,f,j,k)},"java.net.URL,~S,~S,~N,~S,~S,~S,~S,~S");c(ja,"setURLDeprecated",function(b,a,d,h,r,c){var f=null,j=null;if(null!=d&&0!=d.length){var f=-1==h?d:d+":"+h,k=d.lastIndexOf("@");-1!=k&&(j=d.substring(0,k),d=d.substring(k+1))}var l=null,k=null;null!=r&&(l=r.lastIndexOf("?"),-1!=l?(k=r.substring(l+1),l=r.substring(0,l)):l=r);this.setURL(b,a,d,h,f,j,l,k,c)},"java.net.URL,~S,~S,~N,~S,~S");n("java.net");K(java.net,"URLStreamHandlerFactory");n("java.text");var za=w(function(){this.pattern=
null;q(this,arguments)},java.text,"MessageFormat",null);x(za,function(b){this.pattern=b},"~S");x(za,function(b){this.pattern=b},"~S,java.util.Locale");za.format=c(za,"format",function(b,a){return b.replace(/\{(\d+)\}/g,function(d,h){var b=parseInt(h);return null==a?null:a[b]})},"~S,~A");c(za,"format",function(b){return java.text.MessageFormat.format(this.pattern,u(-1,[b]))},"~O");var ka=w(function(){this.haveNextNextGaussian=!1;this.nextNextGaussian=this.seed=0;q(this,arguments)},java.util,"Random",
null,java.io.Serializable);x(ka,function(){var b=-2147483648;1==arguments.length&&(b=arguments[0]);-2147483648==b&&(b=System.currentTimeMillis());this.setSeed(b)});c(ka,"next",function(b){this.seed=25214903917*this.seed+11&0xffffffffffff;return this.seed>>>48-b},"~N");c(ka,"nextBoolean",function(){return 0.5<Math.random()});c(ka,"nextBytes",function(b){for(var a=0,d=0,h=0;d<b.length;)0==h?(a=this.nextInt(),h=3):h--,b[d++]=a,a>>=8},"~A");c(ka,"nextDouble",function(){return Math.random()});c(ka,"nextFloat",
function(){return Math.random()});c(ka,"nextGaussian",function(){if(this.haveNextNextGaussian)return this.haveNextNextGaussian=!1,this.nextNextGaussian;var b,a,d;do b=2*this.nextDouble()-1,a=2*this.nextDouble()-1,d=b*b+a*a;while(1<=d);d=Math.sqrt(-2*Math.log(d)/d);this.nextNextGaussian=a*d;this.haveNextNextGaussian=!0;return b*d});c(ka,"nextInt",function(b){if(0==arguments.length)return 4294967296*Math.random()|0;if(0>=b)throw new IllegalArgumentException;return Math.random()*b|0},"~N");c(ka,"nextLong",
function(){return(this.next(32)<<32)+this.next(32)});c(ka,"setSeed",function(b){Math.seedrandom(b)},"~N");var Ea=[],Aa=Math,Fa=52,Ua=void 0,Va=void 0,ob=function(b){var a,d,h=this,r=b.length,c=0,f=h.i=h.j=h.m=0;h.S=[];h.c=[];for(r||(b=[r++]);256>c;)h.S[c]=c++;for(c=0;256>c;c++)a=h.S[c],f=f+a+b[c%r]&255,d=h.S[f],h.S[c]=d,h.S[f]=a;h.g=function(a){var d=h.S,b=h.i+1&255,r=d[b],c=h.j+r&255,e=d[c];d[b]=e;d[c]=r;for(var f=d[r+e&255];--a;)b=b+1&255,r=d[b],c=c+r&255,e=d[c],d[b]=e,d[c]=r,f=256*f+d[r+e&255];
h.i=b;h.j=c;return f};h.g(256)},Wa=function(b,a,d,h){d=[];if(a&&"object"==typeof b)for(h in b)if(5>h.indexOf("S"))try{d.push(Wa(b[h],a-1))}catch(r){}return d.length?d:""+b},Ja=function(b,a,d,h){b+="";for(h=d=0;h<b.length;h++){var r=a,c=h&255,f=(d^=19*a[h&255])+b.charCodeAt(h);r[c]=f&255}b="";for(h in a)b+=String.fromCharCode(a[h]);return b};Aa.seedrandom=function(b,a){var d=[],h;b=Ja(Wa(a?[b,Ea]:arguments.length?b:[(new Date).getTime(),Ea,window],3),d);h=new ob(d);Ja(h.S,Ea);Aa.random=function(){for(var a=
h.g(6),d=Va,b=0;a<Fa;)a=256*(a+b),d*=256,b=h.g(1);for(;a>=Ua;)a/=2,d/=2,b>>>=1;return(a+b)/d};return b};Va=Aa.pow(256,6);Fa=Aa.pow(2,Fa);Ua=2*Fa;Ja(Aa.random(),Ea);z(["java.util.Collection"],"java.util.AbstractCollection",["java.lang.reflect.Array"],function(){var b=G(java.util,"AbstractCollection",null,java.util.Collection);g(b,"add",function(){throw new UnsupportedOperationException;},"~O");g(b,"addAll",function(a){var d=!1;for(a=a.iterator();a.hasNext();)this.add(a.next())&&(d=!0);return d},"java.util.Collection");
g(b,"clear",function(){for(var a=this.iterator();a.hasNext();)a.next(),a.remove()});g(b,"contains",function(a){var d=this.iterator();if(null!=a)for(;d.hasNext();){if(a.equals(d.next()))return!0}else for(;d.hasNext();)if(null==d.next())return!0;return!1},"~O");g(b,"containsAll",function(a){for(a=a.iterator();a.hasNext();)if(!this.contains(a.next()))return!1;return!0},"java.util.Collection");g(b,"isEmpty",function(){return 0==this.size()});g(b,"remove",function(a){var d=this.iterator();if(null!=a)for(;d.hasNext();){if(a.equals(d.next()))return d.remove(),
!0}else for(;d.hasNext();)if(null==d.next())return d.remove(),!0;return!1},"~O");g(b,"removeAll",function(a){for(var d=!1,h=this.iterator();h.hasNext();)a.contains(h.next())&&(h.remove(),d=!0);return d},"java.util.Collection");g(b,"retainAll",function(a){for(var d=!1,h=this.iterator();h.hasNext();)a.contains(h.next())||(h.remove(),d=!0);return d},"java.util.Collection");c(b,"toArray",function(){for(var a=this.size(),d=0,h=this.iterator(),b=Array(a);d<a;)b[d++]=h.next();return b});c(b,"toArray",function(a){var d=
this.size(),h=0;d>a.length&&(a=a.getClass().getComponentType(),a=java.lang.reflect.Array.newInstance(a,d));for(var b,d=this.iterator();d.hasNext()&&((b=d.next())||1);)a[h++]=b;h<a.length&&(a[h]=null);return a},"~A");g(b,"toString",function(){if(this.isEmpty())return"[]";for(var a="[",d=this.iterator();d.hasNext();){var h=d.next(),a=h!==this?a+h:a+"(this Collection)";d.hasNext()&&(a+=", ")}return a+"]"})});z(["java.util.AbstractCollection","$.Iterator","$.List","$.ListIterator","$.RandomAccess"],"java.util.AbstractList",
null,function(){var b=w(function(){this.modCount=0;q(this,arguments)},java.util,"AbstractList",java.util.AbstractCollection,java.util.List);c(b,"add",function(){throw new UnsupportedOperationException;},"~N,~O");c(b,"add",function(a){this.add(this.size(),a);return!0},"~O");c(b,"addAll",function(a,d){for(var h=d.iterator();h.hasNext();)this.add(a++,h.next());return!d.isEmpty()},"~N,java.util.Collection");g(b,"clear",function(){this.removeRange(0,this.size())});g(b,"equals",function(a){if(this===a)return!0;
if(C(a,"java.util.List")){if(a.size()!=this.size())return!1;var d=this.iterator();for(a=a.iterator();d.hasNext();){var h=d.next(),b=a.next();if(!(null==h?null==b:h.equals(b)))return!1}return!0}return!1},"~O");g(b,"hashCode",function(){for(var a=1,d=this.iterator();d.hasNext();)var h=d.next(),a=31*a+(null==h?0:h.hashCode());return a});g(b,"indexOf",function(a){var d=this.listIterator();if(null!=a)for(;d.hasNext();){if(a.equals(d.next()))return d.previousIndex()}else for(;d.hasNext();)if(null==d.next())return d.previousIndex();
return-1},"~O");g(b,"iterator",function(){return new java.util.AbstractList.SimpleListIterator(this)});g(b,"lastIndexOf",function(a){var d=this.listIterator(this.size());if(null!=a)for(;d.hasPrevious();){if(a.equals(d.previous()))return d.nextIndex()}else for(;d.hasPrevious();)if(null==d.previous())return d.nextIndex();return-1},"~O");c(b,"listIterator",function(){return this.listIterator(0)});c(b,"listIterator",function(a){return new java.util.AbstractList.FullListIterator(this,a)},"~N");c(b,"remove",
function(){throw new UnsupportedOperationException;},"~N");c(b,"removeRange",function(a,d){for(var h=this.listIterator(a),b=a;b<d;b++)h.next(),h.remove()},"~N,~N");g(b,"set",function(){throw new UnsupportedOperationException;},"~N,~O");g(b,"subList",function(a,d){if(0<=a&&d<=this.size()){if(a<=d)return C(this,"java.util.RandomAccess")?new java.util.AbstractList.SubAbstractListRandomAccess(this,a,d):new java.util.AbstractList.SubAbstractList(this,a,d);throw new IllegalArgumentException;}throw new IndexOutOfBoundsException;
},"~N,~N");b=w(function(){this.pos=-1;this.expectedModCount=0;this.lastPosition=-1;this.list=null;q(this,arguments)},java.util.AbstractList,"SimpleListIterator",null,java.util.Iterator);x(b,function(a){this.list=a;this.expectedModCount=a.modCount},"java.util.AbstractList");g(b,"hasNext",function(){return this.pos+1<this.list.size()});g(b,"next",function(){if(this.expectedModCount==this.list.modCount)try{var a=this.list.get(this.pos+1);this.lastPosition=++this.pos;return a}catch(d){if(D(d,"IndexOutOfBoundsException"))throw new java.util.NoSuchElementException;
throw d;}throw new java.util.ConcurrentModificationException;});g(b,"remove",function(){if(this.expectedModCount==this.list.modCount){try{this.list.remove(this.lastPosition)}catch(a){if(D(a,"IndexOutOfBoundsException"))throw new IllegalStateException;throw a;}this.list.modCount!=this.expectedModCount&&this.expectedModCount++;this.pos==this.lastPosition&&this.pos--;this.lastPosition=-1}else throw new java.util.ConcurrentModificationException;});b=G(java.util.AbstractList,"FullListIterator",java.util.AbstractList.SimpleListIterator,
java.util.ListIterator);x(b,function(a,d){I(this,java.util.AbstractList.FullListIterator,[a]);if(0<=d&&d<=a.size())this.pos=d-1;else throw new IndexOutOfBoundsException;},"java.util.AbstractList,~N");g(b,"add",function(a){if(this.expectedModCount==this.list.modCount){try{this.list.add(this.pos+1,a)}catch(d){if(D(d,"IndexOutOfBoundsException"))throw new java.util.NoSuchElementException;throw d;}this.pos++;this.lastPosition=-1;this.list.modCount!=this.expectedModCount&&this.expectedModCount++}else throw new java.util.ConcurrentModificationException;
},"~O");g(b,"hasPrevious",function(){return 0<=this.pos});g(b,"nextIndex",function(){return this.pos+1});g(b,"previous",function(){if(this.expectedModCount==this.list.modCount)try{var a=this.list.get(this.pos);this.lastPosition=this.pos;this.pos--;return a}catch(d){if(D(d,"IndexOutOfBoundsException"))throw new java.util.NoSuchElementException;throw d;}throw new java.util.ConcurrentModificationException;});g(b,"previousIndex",function(){return this.pos});g(b,"set",function(a){if(this.expectedModCount==
this.list.modCount)try{this.list.set(this.lastPosition,a)}catch(d){if(D(d,"IndexOutOfBoundsException"))throw new IllegalStateException;throw d;}else throw new java.util.ConcurrentModificationException;},"~O");G(java.util.AbstractList,"SubAbstractListRandomAccess",java.util.AbstractList.SubAbstractList,java.util.RandomAccess);b=w(function(){this.fullList=null;this.$size=this.offset=0;q(this,arguments)},java.util.AbstractList,"SubAbstractList",java.util.AbstractList);x(b,function(a,d,h){I(this,java.util.AbstractList.SubAbstractList);
this.fullList=a;this.modCount=this.fullList.modCount;this.offset=d;this.$size=h-d},"java.util.AbstractList,~N,~N");c(b,"add",function(a,d){if(this.modCount==this.fullList.modCount)if(0<=a&&a<=this.$size)this.fullList.add(a+this.offset,d),this.$size++,this.modCount=this.fullList.modCount;else throw new IndexOutOfBoundsException;else throw new java.util.ConcurrentModificationException;},"~N,~O");c(b,"addAll",function(a,d){if(this.modCount==this.fullList.modCount){if(0<=a&&a<=this.$size){var h=this.fullList.addAll(a+
this.offset,d);h&&(this.$size+=d.size(),this.modCount=this.fullList.modCount);return h}throw new IndexOutOfBoundsException;}throw new java.util.ConcurrentModificationException;},"~N,java.util.Collection");c(b,"addAll",function(a){if(this.modCount==this.fullList.modCount){var d=this.fullList.addAll(this.offset+this.$size,a);d&&(this.$size+=a.size(),this.modCount=this.fullList.modCount);return d}throw new java.util.ConcurrentModificationException;},"java.util.Collection");c(b,"get",function(a){if(this.modCount==
this.fullList.modCount){if(0<=a&&a<this.$size)return this.fullList.get(a+this.offset);throw new IndexOutOfBoundsException;}throw new java.util.ConcurrentModificationException;},"~N");g(b,"iterator",function(){return this.listIterator(0)});c(b,"listIterator",function(a){if(this.modCount==this.fullList.modCount){if(0<=a&&a<=this.$size)return new java.util.AbstractList.SubAbstractList.SubAbstractListIterator(this.fullList.listIterator(a+this.offset),this,this.offset,this.$size);throw new IndexOutOfBoundsException;
}throw new java.util.ConcurrentModificationException;},"~N");c(b,"remove",function(a){if(this.modCount==this.fullList.modCount){if(0<=a&&a<this.$size)return a=this.fullList.remove(a+this.offset),this.$size--,this.modCount=this.fullList.modCount,a;throw new IndexOutOfBoundsException;}throw new java.util.ConcurrentModificationException;},"~N");c(b,"removeRange",function(a,d){if(a!=d)if(this.modCount==this.fullList.modCount)this.fullList.removeRange(a+this.offset,d+this.offset),this.$size-=d-a,this.modCount=
this.fullList.modCount;else throw new java.util.ConcurrentModificationException;},"~N,~N");c(b,"set",function(a,d){if(this.modCount==this.fullList.modCount){if(0<=a&&a<this.$size)return this.fullList.set(a+this.offset,d);throw new IndexOutOfBoundsException;}throw new java.util.ConcurrentModificationException;},"~N,~O");g(b,"size",function(){return this.$size});c(b,"sizeChanged",function(a){a?this.$size++:this.$size--;this.modCount=this.fullList.modCount},"~B");b=w(function(){this.iterator=this.subList=
null;this.end=this.start=0;q(this,arguments)},java.util.AbstractList.SubAbstractList,"SubAbstractListIterator",null,java.util.ListIterator);x(b,function(a,d,h,b){this.iterator=a;this.subList=d;this.start=h;this.end=this.start+b},"java.util.ListIterator,java.util.AbstractList.SubAbstractList,~N,~N");c(b,"add",function(a){this.iterator.add(a);this.subList.sizeChanged(!0);this.end++},"~O");g(b,"hasNext",function(){return this.iterator.nextIndex()<this.end});g(b,"hasPrevious",function(){return this.iterator.previousIndex()>=
this.start});c(b,"next",function(){if(this.iterator.nextIndex()<this.end)return this.iterator.next();throw new java.util.NoSuchElementException;});c(b,"nextIndex",function(){return this.iterator.nextIndex()-this.start});c(b,"previous",function(){if(this.iterator.previousIndex()>=this.start)return this.iterator.previous();throw new java.util.NoSuchElementException;});c(b,"previousIndex",function(){var a=this.iterator.previousIndex();return a>=this.start?a-this.start:-1});c(b,"remove",function(){this.iterator.remove();
this.subList.sizeChanged(!1);this.end--});c(b,"set",function(a){this.iterator.set(a)},"~O")});z(["java.util.Map"],"java.util.AbstractMap",["java.util.AbstractCollection","$.AbstractSet","$.Iterator"],function(){var b=w(function(){this.$values=this.$keySet=null;q(this,arguments)},java.util,"AbstractMap",null,java.util.Map);g(b,"clear",function(){this.entrySet().clear()});g(b,"containsKey",function(a){var d=this.entrySet().iterator();if(null!=a)for(;d.hasNext();){if(a.equals(d.next().getKey()))return!0}else for(;d.hasNext();)if(null==
d.next().getKey())return!0;return!1},"~O");g(b,"containsValue",function(a){var d=this.entrySet().iterator();if(null!=a)for(;d.hasNext();){if(a.equals(d.next().getValue()))return!0}else for(;d.hasNext();)if(null==d.next().getValue())return!0;return!1},"~O");g(b,"equals",function(a){if(this===a)return!0;if(C(a,"java.util.Map")){if(this.size()!=a.size())return!1;a=a.entrySet();for(var d=this.entrySet().iterator();d.hasNext();)if(!a.contains(d.next()))return!1;return!0}return!1},"~O");g(b,"get",function(a){var d=
this.entrySet().iterator();if(null!=a)for(;d.hasNext();){var h=d.next();if(a.equals(h.getKey()))return h.getValue()}else for(;d.hasNext();)if(h=d.next(),null==h.getKey())return h.getValue();return null},"~O");g(b,"hashCode",function(){for(var a=0,d=this.entrySet().iterator();d.hasNext();)a+=d.next().hashCode();return a});g(b,"isEmpty",function(){return 0==this.size()});g(b,"keySet",function(){null==this.$keySet&&(this.$keySet=(W("java.util.AbstractMap$1")?0:java.util.AbstractMap.$AbstractMap$1$(),
Y(java.util.AbstractMap$1,this,null)));return this.$keySet});g(b,"put",function(){throw new UnsupportedOperationException;},"~O,~O");g(b,"putAll",function(a){this.putAllAM(a)},"java.util.Map");c(b,"putAllAM",function(a){if(!a.isEmpty()){var d;for(a=a.entrySet().iterator();a.hasNext()&&((d=a.next())||1);)this.put(d.getKey(),d.getValue())}},"java.util.Map");g(b,"remove",function(a){var d=this.entrySet().iterator();if(null!=a)for(;d.hasNext();){var h=d.next();if(a.equals(h.getKey()))return d.remove(),
h.getValue()}else for(;d.hasNext();)if(h=d.next(),null==h.getKey())return d.remove(),h.getValue();return null},"~O");g(b,"size",function(){return this.entrySet().size()});g(b,"toString",function(){if(this.isEmpty())return"{}";for(var a="{",d=this.entrySet().iterator();d.hasNext();){var h=d.next(),b=h.getKey(),a=b!==this?a+b:a+"(this Map)",a=a+"=",h=h.getValue(),a=h!==this?a+h:a+"(this Map)";d.hasNext()&&(a+=", ")}return a+"}"});g(b,"values",function(){null==this.$values&&(this.$values=(W("java.util.AbstractMap$2")?
0:java.util.AbstractMap.$AbstractMap$2$(),Y(java.util.AbstractMap$2,this,null)));return this.$values});c(b,"clone",function(){return this.cloneAM()});c(b,"cloneAM",function(){var a;a=Oa(this);a.$keySet=null;a.$values=null;return a});b.$AbstractMap$1$=function(){var a=qa(java.util,"AbstractMap$1",java.util.AbstractSet);g(a,"contains",function(a){return this.b$["java.util.AbstractMap"].containsKey(a)},"~O");g(a,"size",function(){return this.b$["java.util.AbstractMap"].size()});g(a,"iterator",function(){return W("java.util.AbstractMap$1$1")?
0:java.util.AbstractMap.$AbstractMap$1$1$(),Y(java.util.AbstractMap$1$1,this,null)})};b.$AbstractMap$1$1$=function(){var a=w(function(){fa(this,arguments);this.setIterator=null;q(this,arguments)},java.util,"AbstractMap$1$1",null,java.util.Iterator);N(a,function(){this.setIterator=this.b$["java.util.AbstractMap"].entrySet().iterator()});g(a,"hasNext",function(){return this.setIterator.hasNext()});g(a,"next",function(){return this.setIterator.next().getKey()});g(a,"remove",function(){this.setIterator.remove()})};
b.$AbstractMap$2$=function(){var a=qa(java.util,"AbstractMap$2",java.util.AbstractCollection);g(a,"size",function(){return this.b$["java.util.AbstractMap"].size()});g(a,"contains",function(a){return this.b$["java.util.AbstractMap"].containsValue(a)},"~O");g(a,"iterator",function(){return W("java.util.AbstractMap$2$1")?0:java.util.AbstractMap.$AbstractMap$2$1$(),Y(java.util.AbstractMap$2$1,this,null)})};b.$AbstractMap$2$1$=function(){var a=w(function(){fa(this,arguments);this.setIterator=null;q(this,
arguments)},java.util,"AbstractMap$2$1",null,java.util.Iterator);N(a,function(){this.setIterator=this.b$["java.util.AbstractMap"].entrySet().iterator()});g(a,"hasNext",function(){return this.setIterator.hasNext()});g(a,"next",function(){return this.setIterator.next().getValue()});g(a,"remove",function(){this.setIterator.remove()})}});z(["java.util.AbstractCollection","$.Set"],"java.util.AbstractSet",null,function(){var b=G(java.util,"AbstractSet",java.util.AbstractCollection,java.util.Set);g(b,"equals",
function(a){return this===a?!0:C(a,"java.util.Set")?this.size()==a.size()&&this.containsAll(a):!1},"~O");g(b,"hashCode",function(){for(var a=0,d=this.iterator();d.hasNext();)var h=d.next(),a=a+(null==h?0:h.hashCode());return a});g(b,"removeAll",function(a){var d=!1;if(this.size()<=a.size())for(var h=this.iterator();h.hasNext();)a.contains(h.next())&&(h.remove(),d=!0);else for(h=a.iterator();h.hasNext();)d=this.remove(h.next())||d;return d},"java.util.Collection")});z(["java.util.AbstractList","$.List",
"$.RandomAccess"],"java.util.ArrayList",["java.util.Arrays"],function(){var b=w(function(){this.lastIndex=this.firstIndex=0;this.array=null;q(this,arguments)},java.util,"ArrayList",java.util.AbstractList,[java.util.List,Cloneable,java.io.Serializable,java.util.RandomAccess]);x(b,function(){I(this,java.util.ArrayList,[]);this.setCapacity(0)});x(b,function(a){I(this,java.util.ArrayList,[]);this.setCapacity(a)},"~N");x(b,function(a){this.firstIndex=this.lastIndex=0;var d=-1;a?"number"==typeof a&&(d=
a):d=0;0<=d?this.setCapacity(d):(d=a.size(),this.array=this.newElementArray(d+v(d/10)),this.addAll(a))},"java.util.Collection");c(b,"setCapacity",function(a){try{this.array=this.newElementArray(a)}catch(d){if(D(d,"NegativeArraySizeException"))throw new IllegalArgumentException;throw d;}},"~N");c(b,"newElementArray",function(a){return Array(a)},"~N");c(b,"add",function(a,d){this.add2(a,d)},"~N,~O");c(b,"add2",function(a,d){var h=this.size();if(0<a&&a<h){if(0==this.firstIndex&&this.lastIndex==this.array.length)this.growForInsert(a,
1);else if(a<v(h/2)&&0<this.firstIndex||this.lastIndex==this.array.length)System.arraycopy(this.array,this.firstIndex,this.array,--this.firstIndex,a);else{var b=a+this.firstIndex;System.arraycopy(this.array,b,this.array,b+1,h-a);this.lastIndex++}this.array[a+this.firstIndex]=d}else if(0==a)0==this.firstIndex&&this.growAtFront(1),this.array[--this.firstIndex]=d;else if(a==h)this.lastIndex==this.array.length&&this.growAtEnd(1),this.array[this.lastIndex++]=d;else throw new IndexOutOfBoundsException;
this.modCount++},"~N,~O");c(b,"add",function(a){return this.add1(a)},"~O");c(b,"add1",function(a){this.lastIndex==this.array.length&&this.growAtEnd(1);this.array[this.lastIndex++]=a;this.modCount++;return!0},"~O");c(b,"addAll",function(a,d){var h=this.size();if(0>a||a>h)throw new IndexOutOfBoundsException;var b=d.size();if(0<a&&a<h)if(this.array.length-h<b)this.growForInsert(a,b);else if(a<v(h/2)&&0<this.firstIndex||this.lastIndex>this.array.length-b){var c=this.firstIndex-b;if(0>c){var f=a+this.firstIndex;
System.arraycopy(this.array,f,this.array,f-c,h-a);this.lastIndex-=c;c=0}System.arraycopy(this.array,this.firstIndex,this.array,c,a);this.firstIndex=c}else f=a+this.firstIndex,System.arraycopy(this.array,f,this.array,f+b,h-a),this.lastIndex+=b;else 0==a?(this.growAtFront(b),this.firstIndex-=b):a==h&&(this.lastIndex>this.array.length-b&&this.growAtEnd(b),this.lastIndex+=b);if(0<b){h=d.iterator();f=a+this.firstIndex;for(b=f+b;f<b;)this.array[f++]=h.next();this.modCount++;return!0}return!1},"~N,java.util.Collection");
c(b,"addAll",function(a){var d=a.size();if(0<d){this.lastIndex>this.array.length-d&&this.growAtEnd(d);a=a.iterator();for(d=this.lastIndex+d;this.lastIndex<d;)this.array[this.lastIndex++]=a.next();this.modCount++;return!0}return!1},"java.util.Collection");g(b,"clear",function(){this.firstIndex!=this.lastIndex&&(java.util.Arrays.fill(this.array,this.firstIndex,this.lastIndex,null),this.firstIndex=this.lastIndex=0,this.modCount++)});c(b,"clone",function(){try{var a=ia(this,java.util.ArrayList,"clone",
[]);a.array=this.array.clone();return a}catch(d){if(D(d,"CloneNotSupportedException"))return null;throw d;}});g(b,"contains",function(a){if(null!=a)for(var d=this.firstIndex;d<this.lastIndex;d++){if(a.equals(this.array[d]))return!0}else for(d=this.firstIndex;d<this.lastIndex;d++)if(null==this.array[d])return!0;return!1},"~O");c(b,"ensureCapacity",function(a){this.array.length<a&&(0<this.firstIndex?this.growAtFront(a-this.array.length):this.growAtEnd(a-this.array.length))},"~N");g(b,"get",function(a){if(0<=
a&&a<this.size())return this.array[this.firstIndex+a];throw new IndexOutOfBoundsException;},"~N");c(b,"growAtEnd",function(a){var d=this.size();if(this.firstIndex>=a-(this.array.length-this.lastIndex))a=this.lastIndex-this.firstIndex,0<d&&(System.arraycopy(this.array,this.firstIndex,this.array,0,d),java.util.Arrays.fill(this.array,a<this.firstIndex?this.firstIndex:a,this.array.length,null)),this.firstIndex=0,this.lastIndex=a;else{var h=v(d/2);a>h&&(h=a);12>h&&(h=12);a=this.newElementArray(d+h);0<
d&&System.arraycopy(this.array,this.firstIndex,a,this.firstIndex,d);this.array=a}},"~N");c(b,"growAtFront",function(a){var d=this.size();if(this.array.length-this.lastIndex>=a)a=this.array.length-d,0<d&&(System.arraycopy(this.array,this.firstIndex,this.array,a,d),java.util.Arrays.fill(this.array,this.firstIndex,this.firstIndex+d>a?a:this.firstIndex+d,null)),this.firstIndex=a,this.lastIndex=this.array.length;else{var h=v(d/2);a>h&&(h=a);12>h&&(h=12);a=this.newElementArray(d+h);0<d&&System.arraycopy(this.array,
this.firstIndex,a,a.length-d,d);this.firstIndex=a.length-d;this.lastIndex=a.length;this.array=a}},"~N");c(b,"growForInsert",function(a,d){var h=this.size(),b=v(h/2);d>b&&(b=d);12>b&&(b=12);var c=this.newElementArray(h+b);if(a<v(h/2)){var f=c.length-(h+d);System.arraycopy(this.array,a,c,a+b,h-a);System.arraycopy(this.array,this.firstIndex,c,f,a);this.firstIndex=f;this.lastIndex=c.length}else System.arraycopy(this.array,this.firstIndex,c,0,a),System.arraycopy(this.array,a,c,a+d,h-a),this.firstIndex=
0,this.lastIndex+=d;this.array=c},"~N,~N");g(b,"indexOf",function(a){if(null!=a)for(var d=this.firstIndex;d<this.lastIndex;d++){if(a.equals(this.array[d]))return d-this.firstIndex}else for(d=this.firstIndex;d<this.lastIndex;d++)if(null==this.array[d])return d-this.firstIndex;return-1},"~O");g(b,"isEmpty",function(){return this.lastIndex==this.firstIndex});g(b,"lastIndexOf",function(a){if(null!=a)for(var d=this.lastIndex-1;d>=this.firstIndex;d--){if(a.equals(this.array[d]))return d-this.firstIndex}else for(d=
this.lastIndex-1;d>=this.firstIndex;d--)if(null==this.array[d])return d-this.firstIndex;return-1},"~O");c(b,"remove",function(a){return this._removeItemAt(a)},"~N");c(b,"_removeObject",function(a){a=this.indexOf(a);if(0>a)return!1;this._removeItemAt(a);return!0},"~O");c(b,"_removeItemAt",function(a){var d,h=this.size();if(0<=a&&a<h)if(a==h-1)d=this.array[--this.lastIndex],this.array[this.lastIndex]=null;else if(0==a)d=this.array[this.firstIndex],this.array[this.firstIndex++]=null;else{var b=this.firstIndex+
a;d=this.array[b];a<v(h/2)?(System.arraycopy(this.array,this.firstIndex,this.array,this.firstIndex+1,a),this.array[this.firstIndex++]=null):(System.arraycopy(this.array,b+1,this.array,b,h-a-1),this.array[--this.lastIndex]=null)}else throw new IndexOutOfBoundsException;this.modCount++;return d},"~N");g(b,"removeRange",function(a,d){if(0<=a&&a<=d&&d<=this.size()){if(a!=d){var h=this.size();d==h?(java.util.Arrays.fill(this.array,this.firstIndex+a,this.lastIndex,null),this.lastIndex=this.firstIndex+a):
0==a?(java.util.Arrays.fill(this.array,this.firstIndex,this.firstIndex+d,null),this.firstIndex+=d):(System.arraycopy(this.array,this.firstIndex+d,this.array,this.firstIndex+a,h-d),h=this.lastIndex+a-d,java.util.Arrays.fill(this.array,h,this.lastIndex,null),this.lastIndex=h);this.modCount++}}else throw new IndexOutOfBoundsException;},"~N,~N");g(b,"set",function(a,d){if(0<=a&&a<this.size()){var h=this.array[this.firstIndex+a];this.array[this.firstIndex+a]=d;return h}throw new IndexOutOfBoundsException;
},"~N,~O");g(b,"size",function(){return this.lastIndex-this.firstIndex});g(b,"toArray",function(a){var d=this.size();if(null==a||d>a.length)return this.array.slice(this.firstIndex,this.firstIndex+d);System.arraycopy(this.array,this.firstIndex,a,0,d);d<a.length&&(a[d]=null);return a},"~A");c(b,"trimToSize",function(){var a=this.size(),d=this.newElementArray(a);System.arraycopy(this.array,this.firstIndex,d,0,a);this.array=d;this.firstIndex=0;this.lastIndex=this.array.length})});z(["java.util.AbstractList",
"$.RandomAccess"],"java.util.Arrays",null,function(){var b=G(java.util,"Arrays",null);b.fill=c(b,"fill",function(a,h,b,c){2==arguments.length&&(c=arguments[1],h=0,b=a.length);java.util.Arrays.rangeCheck(a.length,h,b);for(var f=h;f<b;f++)a[f]=c},"~A,~N,~N,~O");b.asList=c(b,"asList",function(a){return new java.util.Arrays.ArrayList(a)},"~A");b.rangeCheck=c(b,"rangeCheck",function(a,h,b){if(h>b)throw new IllegalArgumentException("fromIndex("+h+") > toIndex("+b+")");if(0>h)throw new ArrayIndexOutOfBoundsException(h);
if(b>a)throw new ArrayIndexOutOfBoundsException(b);},"~N,~N,~N");b.binarySearch=c(b,"binarySearch",function(a,h){for(var b=0,c=a.length-1;b<=c;){var f=b+c>>1,j=a[f];if(j<h)b=f+1;else if(j>h)c=f-1;else return f}return-(b+1)},"~A,~N");b.binarySearch=c(b,"binarySearch",function(a,h){for(var b=0,c=a.length-1;b<=c;){var f=b+c>>1,j=a[f].compareTo(h);if(0>j)b=f+1;else if(0<j)c=f-1;else return f}return-(b+1)},"~A,~O");b.binarySearch=c(b,"binarySearch",function(a,h,b){if(null==b)return java.util.Arrays.binarySearch(a,
h);for(var c=0,f=a.length-1;c<=f;){var j=c+f>>1,k=b.compare(a[j],h);if(0>k)c=j+1;else if(0<k)f=j-1;else return j}return-(c+1)},"~A,~O,java.util.Comparator");b.equals=c(b,"equals",function(a,h){if(a===h)return!0;if(null==a||null==h)return!1;var b=a.length;if(h.length!=b)return!1;for(var c=0;c<b;c++){var f=a[c],j=h[c];if(!(null==f?null==j:null==f.equals?f==j:f.equals(j)))return!1}return!0},"~A,~A");b.sort=c(b,"sort",function(a,h,b,c){if(!(2>a.length)){var f=0,j=null,f=arguments.length,j=h,k=a,l=null;
switch(f){case 1:j=null;case 2:h=0;b=a.length;break;case 3:c=null;case 4:j=c,0==h&&b==a.length?k=a:(k=a.slice(h,b),l=a)}java.util.Arrays.rangeCheck(a.length,h,b);null==j&&(j=java.util.Arrays.comp);c=j;k.sort(function(a,d){return c.compare(a,d)});null!=l&&System.arraycopy(k,0,l,h,b)}},"~A,~N,~N,java.util.Comparator");var a=w(function(){this.a=null;q(this,arguments)},java.util.Arrays,"ArrayList",java.util.AbstractList,[java.util.RandomAccess,java.io.Serializable]);x(a,function(a){I(this,java.util.Arrays.ArrayList,
[]);if(null==a)throw new NullPointerException;this.a=a},"~A");g(a,"size",function(){return this.a.length});c(a,"toArray",function(){return this.a.clone()});g(a,"get",function(a){return this.a[a]},"~N");g(a,"set",function(a,h){var b=this.a[a];this.a[a]=h;return b},"~N,~O");g(a,"indexOf",function(a){if(null==a)for(var h=0;h<this.a.length;h++){if(null==this.a[h])return h}else for(h=0;h<this.a.length;h++)if(a.equals(this.a[h]))return h;return-1},"~O");g(a,"contains",function(a){return-1!=this.indexOf(a)},
"~O");b.comp=null;b.comp={compare:function(a,h){return null==a?null==h?0:-1:null==h?1:"number"==typeof a?a-h:a.compareTo(h)}}});z("java.util.AbstractList $.AbstractMap $.AbstractSet $.Collection $.Enumeration $.Iterator $.List $.ListIterator $.Map $.RandomAccess $.Set $.SortedMap $.SortedSet java.lang.reflect.Array".split(" "),"java.util.Collections",["java.util.ArrayList","$.Arrays","java.util.Map.Entry","java.util.Random"],function(){var b=G(java.util,"Collections",null);b.emptyEnumeration=c(b,
"emptyEnumeration",function(){null==java.util.Collections.EMPTY_ENUMERATION&&(java.util.Collections.EMPTY_ENUMERATION=new java.util.Collections.EmptyEnumeration);return java.util.Collections.EMPTY_ENUMERATION});b.emptyIterator=c(b,"emptyIterator",function(){null==java.util.Collections.EMPTY_ITERATOR&&(java.util.Collections.EMPTY_ITERATOR=new java.util.Collections.EmptyIterator);return java.util.Collections.EMPTY_ITERATOR});b.binarySearch=c(b,"binarySearch",function(a,h){if(null==a)throw new NullPointerException;
if(a.isEmpty())return-1;if(!C(a,"java.util.RandomAccess")){for(var b=a.listIterator();b.hasNext();){var c;if(0>=(c=h.compareTo(b.next())))return 0==c?b.previousIndex():-b.previousIndex()-1}return-a.size()-1}var b=0,f=a.size(),j=f-1;for(c=-1;b<=j;)if(f=b+j>>1,0<(c=h.compareTo(a.get(f))))b=f+1;else{if(0==c)return f;j=f-1}return-f-(0>c?1:2)},"java.util.List,~O");b.binarySearch=c(b,"binarySearch",function(a,h,b){if(null==b)return java.util.Collections.binarySearch(a,h);if(!C(a,"java.util.RandomAccess")){for(var c=
a.listIterator();c.hasNext();){var f;if(0>=(f=b.compare(h,c.next())))return 0==f?c.previousIndex():-c.previousIndex()-1}return-a.size()-1}var c=0,j=a.size(),k=j-1;for(f=-1;c<=k;)if(j=c+k>>1,0<(f=b.compare(h,a.get(j))))c=j+1;else{if(0==f)return j;k=j-1}return-j-(0>f?1:2)},"java.util.List,~O,java.util.Comparator");b.copy=c(b,"copy",function(a,h){if(a.size()<h.size())throw new ArrayIndexOutOfBoundsException;for(var b=h.iterator(),c=a.listIterator();b.hasNext();){try{c.next()}catch(f){if(D(f,"java.util.NoSuchElementException"))throw new ArrayIndexOutOfBoundsException;
throw f;}c.set(b.next())}},"java.util.List,java.util.List");b.enumeration=c(b,"enumeration",function(a){return W("java.util.Collections$1")?0:java.util.Collections.$Collections$1$(),Y(java.util.Collections$1,this,Ia("c",a))},"java.util.Collection");b.fill=c(b,"fill",function(a,h){for(var b=a.listIterator();b.hasNext();)b.next(),b.set(h)},"java.util.List,~O");b.max=c(b,"max",function(a){a=a.iterator();for(var h=a.next();a.hasNext();){var b=a.next();0>h.compareTo(b)&&(h=b)}return h},"java.util.Collection");
b.max=c(b,"max",function(a,h){for(var b=a.iterator(),c=b.next();b.hasNext();){var f=b.next();0>h.compare(c,f)&&(c=f)}return c},"java.util.Collection,java.util.Comparator");b.min=c(b,"min",function(a){a=a.iterator();for(var h=a.next();a.hasNext();){var b=a.next();0<h.compareTo(b)&&(h=b)}return h},"java.util.Collection");b.min=c(b,"min",function(a,h){for(var b=a.iterator(),c=b.next();b.hasNext();){var f=b.next();0<h.compare(c,f)&&(c=f)}return c},"java.util.Collection,java.util.Comparator");b.nCopies=
c(b,"nCopies",function(a,h){return new java.util.Collections.CopiesList(a,h)},"~N,~O");b.reverse=c(b,"reverse",function(a){var h=a.size(),b=a.listIterator();a=a.listIterator(h);for(var c=0;c<v(h/2);c++){var f=b.next(),j=a.previous();b.set(j);a.set(f)}},"java.util.List");b.reverseOrder=c(b,"reverseOrder",function(){return new java.util.Collections.ReverseComparator});b.reverseOrder=c(b,"reverseOrder",function(a){return null==a?java.util.Collections.reverseOrder():new java.util.Collections.ReverseComparatorWithComparator(a)},
"java.util.Comparator");b.shuffle=c(b,"shuffle",function(a){java.util.Collections.shuffle(a,new java.util.Random)},"java.util.List");b.shuffle=c(b,"shuffle",function(a,h){if(C(a,"java.util.RandomAccess"))for(c=a.size()-1;0<c;c--)f=h.nextInt()%(c+1),0>f&&(f=-f),a.set(f,a.set(c,a.get(f)));else{for(var b=a.toArray(),c=b.length-1;0<c;c--){var f=h.nextInt()%(c+1);0>f&&(f=-f);var j=b[c];b[c]=b[f];b[f]=j}c=0;for(f=a.listIterator();f.hasNext();)f.next(),f.set(b[c++])}},"java.util.List,java.util.Random");
b.singleton=c(b,"singleton",function(a){return new java.util.Collections.SingletonSet(a)},"~O");b.singletonList=c(b,"singletonList",function(a){return new java.util.Collections.SingletonList(a)},"~O");b.singletonMap=c(b,"singletonMap",function(a,h){return new java.util.Collections.SingletonMap(a,h)},"~O,~O");b.sort=c(b,"sort",function(a){var h=a.toArray();java.util.Arrays.sort(h);var b=0;for(a=a.listIterator();a.hasNext();)a.next(),a.set(h[b++])},"java.util.List");b.sort=c(b,"sort",function(a,h){var b=
a.toArray(Array(a.size()));java.util.Arrays.sort(b,h);for(var c=0,f=a.listIterator();f.hasNext();)f.next(),f.set(b[c++])},"java.util.List,java.util.Comparator");b.swap=c(b,"swap",function(a,h,b){if(null==a)throw new NullPointerException;h!=b&&a.set(b,a.set(h,a.get(b)))},"java.util.List,~N,~N");b.replaceAll=c(b,"replaceAll",function(a,h,b){for(var c,f=!1;-1<(c=a.indexOf(h));)f=!0,a.set(c,b);return f},"java.util.List,~O,~O");b.rotate=c(b,"rotate",function(a,h){var b=a.size();if(0!=b){var c;c=0<h?h%
b:b- -1*(h%b);if(!(0==c||c==b))if(C(a,"java.util.RandomAccess"))for(var f=a.get(0),j=0,k=0,l=0;l<b;l++)j=(j+c)%b,f=a.set(j,f),j==k&&(j=++k,f=a.get(k));else f=(b-c)%b,c=a.subList(0,f),b=a.subList(f,b),java.util.Collections.reverse(c),java.util.Collections.reverse(b),java.util.Collections.reverse(a)}},"java.util.List,~N");b.indexOfSubList=c(b,"indexOfSubList",function(a,h){var b=a.size(),c=h.size();if(c>b)return-1;if(0==c)return 0;var f=h.get(0),j=a.indexOf(f);if(-1==j)return-1;for(;j<b&&b-j>=c;){var k=
a.listIterator(j);if(null==f?null==k.next():f.equals(k.next())){for(var l=h.listIterator(1),g=!1;l.hasNext();){var m=l.next();if(!k.hasNext())return-1;if(null==m?null!=k.next():!m.equals(k.next())){g=!0;break}}if(!g)return j}j++}return-1},"java.util.List,java.util.List");b.lastIndexOfSubList=c(b,"lastIndexOfSubList",function(a,h){var b=h.size(),c=a.size();if(b>c)return-1;if(0==b)return c;for(var c=h.get(b-1),f=a.lastIndexOf(c);-1<f&&f+1>=b;){var j=a.listIterator(f+1);if(null==c?null==j.previous():
c.equals(j.previous())){for(var k=h.listIterator(b-1),l=!1;k.hasPrevious();){var g=k.previous();if(!j.hasPrevious())return-1;if(null==g?null!=j.previous():!g.equals(j.previous())){l=!0;break}}if(!l)return j.nextIndex()}f--}return-1},"java.util.List,java.util.List");b.list=c(b,"list",function(a){for(var h=new java.util.ArrayList;a.hasMoreElements();)h.add(a.nextElement());return h},"java.util.Enumeration");b.synchronizedCollection=c(b,"synchronizedCollection",function(a){if(null==a)throw new NullPointerException;
return new java.util.Collections.SynchronizedCollection(a)},"java.util.Collection");b.synchronizedList=c(b,"synchronizedList",function(a){if(null==a)throw new NullPointerException;return C(a,"java.util.RandomAccess")?new java.util.Collections.SynchronizedRandomAccessList(a):new java.util.Collections.SynchronizedList(a)},"java.util.List");b.synchronizedMap=c(b,"synchronizedMap",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedMap(a)},"java.util.Map");
b.synchronizedSet=c(b,"synchronizedSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedSet(a)},"java.util.Set");b.synchronizedSortedMap=c(b,"synchronizedSortedMap",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedSortedMap(a)},"java.util.SortedMap");b.synchronizedSortedSet=c(b,"synchronizedSortedSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedSortedSet(a)},
"java.util.SortedSet");b.unmodifiableCollection=c(b,"unmodifiableCollection",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableCollection(a)},"java.util.Collection");b.unmodifiableList=c(b,"unmodifiableList",function(a){if(null==a)throw new NullPointerException;return C(a,"java.util.RandomAccess")?new java.util.Collections.UnmodifiableRandomAccessList(a):new java.util.Collections.UnmodifiableList(a)},"java.util.List");b.unmodifiableMap=c(b,"unmodifiableMap",
function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableMap(a)},"java.util.Map");b.unmodifiableSet=c(b,"unmodifiableSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableSet(a)},"java.util.Set");b.unmodifiableSortedMap=c(b,"unmodifiableSortedMap",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableSortedMap(a)},"java.util.SortedMap");b.unmodifiableSortedSet=c(b,
"unmodifiableSortedSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableSortedSet(a)},"java.util.SortedSet");b.frequency=c(b,"frequency",function(a,h){if(null==a)throw new NullPointerException;if(a.isEmpty())return 0;for(var b=0,c=a.iterator();c.hasNext();){var f=c.next();(null==h?null==f:h.equals(f))&&b++}return b},"java.util.Collection,~O");b.emptyList=c(b,"emptyList",function(){return java.util.Collections.EMPTY_LIST});b.emptySet=c(b,"emptySet",
function(){return java.util.Collections.EMPTY_SET});b.emptyMap=c(b,"emptyMap",function(){return java.util.Collections.EMPTY_MAP});b.checkedCollection=c(b,"checkedCollection",function(a,h){return new java.util.Collections.CheckedCollection(a,h)},"java.util.Collection,Class");b.checkedMap=c(b,"checkedMap",function(a,h,b){return new java.util.Collections.CheckedMap(a,h,b)},"java.util.Map,Class,Class");b.checkedList=c(b,"checkedList",function(a,h){return C(a,"java.util.RandomAccess")?new java.util.Collections.CheckedRandomAccessList(a,
h):new java.util.Collections.CheckedList(a,h)},"java.util.List,Class");b.checkedSet=c(b,"checkedSet",function(a,h){return new java.util.Collections.CheckedSet(a,h)},"java.util.Set,Class");b.checkedSortedMap=c(b,"checkedSortedMap",function(a,h,b){return new java.util.Collections.CheckedSortedMap(a,h,b)},"java.util.SortedMap,Class,Class");b.checkedSortedSet=c(b,"checkedSortedSet",function(a,h){return new java.util.Collections.CheckedSortedSet(a,h)},"java.util.SortedSet,Class");b.addAll=c(b,"addAll",
function(a,h){for(var b=!1,c=0;c<h.length;c++)b=(new Boolean(b|a.add(h[c]))).valueOf();return b},"java.util.Collection,~A");b.disjoint=c(b,"disjoint",function(a,h){if(C(a,"java.util.Set")&&!C(h,"java.util.Set")||h.size()>a.size()){var b=a;a=h;h=b}for(b=a.iterator();b.hasNext();)if(h.contains(b.next()))return!1;return!0},"java.util.Collection,java.util.Collection");b.checkType=c(b,"checkType",function(a,h){if(!h.isInstance(a))throw new ClassCastException("Attempt to insert "+a.getClass()+" element into collection with element type "+
h);return a},"~O,Class");b.$Collections$1$=function(){var a=w(function(){fa(this,arguments);this.it=null;q(this,arguments)},java.util,"Collections$1",null,java.util.Enumeration);N(a,function(){this.it=this.f$.c.iterator()});c(a,"hasMoreElements",function(){return this.it.hasNext()});c(a,"nextElement",function(){return this.it.next()})};var a=G(java.util.Collections,"EmptyEnumeration",null,java.util.Enumeration);g(a,"hasMoreElements",function(){return!1});g(a,"nextElement",function(){throw new java.util.NoSuchElementException;
});a=G(java.util.Collections,"EmptyIterator",null,java.util.Iterator);g(a,"hasNext",function(){return!1});g(a,"next",function(){throw new java.util.NoSuchElementException;});g(a,"remove",function(){throw new IllegalStateException;});a=w(function(){this.n=0;this.element=null;q(this,arguments)},java.util.Collections,"CopiesList",java.util.AbstractList,java.io.Serializable);x(a,function(a,h){I(this,java.util.Collections.CopiesList,[]);if(0>a)throw new IllegalArgumentException;this.n=a;this.element=h},
"~N,~O");g(a,"contains",function(a){return null==this.element?null==a:this.element.equals(a)},"~O");g(a,"size",function(){return this.n});g(a,"get",function(a){if(0<=a&&a<this.n)return this.element;throw new IndexOutOfBoundsException;},"~N");a=G(java.util.Collections,"EmptyList",java.util.AbstractList,java.io.Serializable);g(a,"contains",function(){return!1},"~O");g(a,"size",function(){return 0});g(a,"get",function(){throw new IndexOutOfBoundsException;},"~N");a=G(java.util.Collections,"EmptySet",
java.util.AbstractSet,java.io.Serializable);g(a,"contains",function(){return!1},"~O");g(a,"size",function(){return 0});g(a,"iterator",function(){return W("java.util.Collections$EmptySet$1")?0:java.util.Collections.EmptySet.$Collections$EmptySet$1$(),Y(java.util.Collections$EmptySet$1,this,null)});a.$Collections$EmptySet$1$=function(){var a=qa(java.util,"Collections$EmptySet$1",null,java.util.Iterator);g(a,"hasNext",function(){return!1});g(a,"next",function(){throw new java.util.NoSuchElementException;
});g(a,"remove",function(){throw new UnsupportedOperationException;})};a=G(java.util.Collections,"EmptyMap",java.util.AbstractMap,java.io.Serializable);g(a,"containsKey",function(){return!1},"~O");g(a,"containsValue",function(){return!1},"~O");g(a,"entrySet",function(){return java.util.Collections.EMPTY_SET});g(a,"get",function(){return null},"~O");g(a,"keySet",function(){return java.util.Collections.EMPTY_SET});g(a,"values",function(){return java.util.Collections.EMPTY_LIST});a=G(java.util.Collections,
"ReverseComparator",null,[java.util.Comparator,java.io.Serializable]);g(a,"compare",function(a,h){return h.compareTo(a)},"~O,~O");a=w(function(){this.comparator=null;q(this,arguments)},java.util.Collections,"ReverseComparatorWithComparator",null,[java.util.Comparator,java.io.Serializable]);x(a,function(a){this.comparator=a},"java.util.Comparator");c(a,"compare",function(a,h){return this.comparator.compare(h,a)},"~O,~O");a=w(function(){this.element=null;q(this,arguments)},java.util.Collections,"SingletonSet",
java.util.AbstractSet,java.io.Serializable);x(a,function(a){I(this,java.util.Collections.SingletonSet,[]);this.element=a},"~O");g(a,"contains",function(a){return null==this.element?null==a:this.element.equals(a)},"~O");g(a,"size",function(){return 1});g(a,"iterator",function(){return W("java.util.Collections$SingletonSet$1")?0:java.util.Collections.SingletonSet.$Collections$SingletonSet$1$(),Y(java.util.Collections$SingletonSet$1,this,null)});a.$Collections$SingletonSet$1$=function(){var a=w(function(){fa(this,
arguments);this.$hasNext=!0;q(this,arguments)},java.util,"Collections$SingletonSet$1",null,java.util.Iterator);g(a,"hasNext",function(){return this.$hasNext});g(a,"next",function(){if(this.$hasNext)return this.$hasNext=!1,this.b$["java.util.Collections.SingletonSet"].element;throw new java.util.NoSuchElementException;});g(a,"remove",function(){throw new UnsupportedOperationException;})};a=w(function(){this.element=null;q(this,arguments)},java.util.Collections,"SingletonList",java.util.AbstractList,
java.io.Serializable);x(a,function(a){I(this,java.util.Collections.SingletonList,[]);this.element=a},"~O");g(a,"contains",function(a){return null==this.element?null==a:this.element.equals(a)},"~O");g(a,"get",function(a){if(0==a)return this.element;throw new IndexOutOfBoundsException;},"~N");g(a,"size",function(){return 1});a=w(function(){this.v=this.k=null;q(this,arguments)},java.util.Collections,"SingletonMap",java.util.AbstractMap,java.io.Serializable);x(a,function(a,h){I(this,java.util.Collections.SingletonMap,
[]);this.k=a;this.v=h},"~O,~O");g(a,"containsKey",function(a){return null==this.k?null==a:this.k.equals(a)},"~O");g(a,"containsValue",function(a){return null==this.v?null==a:this.v.equals(a)},"~O");g(a,"get",function(a){return this.containsKey(a)?this.v:null},"~O");g(a,"size",function(){return 1});g(a,"entrySet",function(){return W("java.util.Collections$SingletonMap$1")?0:java.util.Collections.SingletonMap.$Collections$SingletonMap$1$(),Y(java.util.Collections$SingletonMap$1,this,null)});a.$Collections$SingletonMap$1$=
function(){var a=qa(java.util,"Collections$SingletonMap$1",java.util.AbstractSet);g(a,"contains",function(a){return C(a,"java.util.Map.Entry")?this.b$["java.util.Collections.SingletonMap"].containsKey(a.getKey())&&this.b$["java.util.Collections.SingletonMap"].containsValue(a.getValue()):!1},"~O");g(a,"size",function(){return 1});g(a,"iterator",function(){return W("java.util.Collections$SingletonMap$1$1")?0:java.util.Collections.$Collections$SingletonMap$1$1$(),Y(java.util.Collections$SingletonMap$1$1,
this,null)})};a.$Collections$SingletonMap$1$1$=function(){var a=w(function(){fa(this,arguments);this.$hasNext=!0;q(this,arguments)},java.util,"Collections$SingletonMap$1$1",null,java.util.Iterator);g(a,"hasNext",function(){return this.$hasNext});g(a,"next",function(){if(this.$hasNext)return this.$hasNext=!1,W("java.util.Collections$SingletonMap$1$1$1")?0:java.util.Collections.$Collections$SingletonMap$1$1$1$(),Y(java.util.Collections$SingletonMap$1$1$1,this,null);throw new java.util.NoSuchElementException;
});g(a,"remove",function(){throw new UnsupportedOperationException;})};a.$Collections$SingletonMap$1$1$1$=function(){var a=qa(java.util,"Collections$SingletonMap$1$1$1",null,java.util.Map.Entry);g(a,"equals",function(a){return this.b$["java.util.Collections$SingletonMap$1"].contains(a)},"~O");g(a,"getKey",function(){return this.b$["java.util.Collections.SingletonMap"].k});g(a,"getValue",function(){return this.b$["java.util.Collections.SingletonMap"].v});g(a,"hashCode",function(){return(null==this.b$["java.util.Collections.SingletonMap"].k?
0:this.b$["java.util.Collections.SingletonMap"].k.hashCode())^(null==this.b$["java.util.Collections.SingletonMap"].v?0:this.b$["java.util.Collections.SingletonMap"].v.hashCode())});g(a,"setValue",function(){throw new UnsupportedOperationException;},"~O")};a=w(function(){this.mutex=this.c=null;q(this,arguments)},java.util.Collections,"SynchronizedCollection",null,[java.util.Collection,java.io.Serializable]);x(a,function(a){this.c=a;this.mutex=this},"java.util.Collection");x(a,function(a,h){this.c=
a;this.mutex=h},"java.util.Collection,~O");c(a,"add",function(a){return this.c.add(a)},"~O");c(a,"addAll",function(a){return this.c.addAll(a)},"java.util.Collection");c(a,"clear",function(){this.c.clear()});c(a,"contains",function(a){return this.c.contains(a)},"~O");c(a,"containsAll",function(a){return this.c.containsAll(a)},"java.util.Collection");c(a,"isEmpty",function(){return this.c.isEmpty()});c(a,"iterator",function(){return this.c.iterator()});c(a,"remove",function(a){return this.c.remove(a)},
"~O");c(a,"removeAll",function(a){return this.c.removeAll(a)},"java.util.Collection");c(a,"retainAll",function(a){return this.c.retainAll(a)},"java.util.Collection");c(a,"size",function(){return this.c.size()});c(a,"toArray",function(){return this.c.toArray()});c(a,"toString",function(){return this.c.toString()});c(a,"toArray",function(a){return this.c.toArray(a)},"~A");a=G(java.util.Collections,"SynchronizedRandomAccessList",java.util.Collections.SynchronizedList,java.util.RandomAccess);g(a,"subList",
function(a,h){return new java.util.Collections.SynchronizedRandomAccessList(this.list.subList(a,h),this.mutex)},"~N,~N");a=w(function(){this.list=null;q(this,arguments)},java.util.Collections,"SynchronizedList",java.util.Collections.SynchronizedCollection,java.util.List);x(a,function(a){I(this,java.util.Collections.SynchronizedList,[a]);this.list=a},"java.util.List");x(a,function(a,h){I(this,java.util.Collections.SynchronizedList,[a,h]);this.list=a},"java.util.List,~O");c(a,"add",function(a,h){this.list.add(a,
h)},"~N,~O");c(a,"addAll",function(a,h){return this.list.addAll(a,h)},"~N,java.util.Collection");c(a,"equals",function(a){return this.list.equals(a)},"~O");c(a,"get",function(a){return this.list.get(a)},"~N");c(a,"hashCode",function(){return this.list.hashCode()});c(a,"indexOf",function(a){return this.list.indexOf(a)},"~O");c(a,"lastIndexOf",function(a){return this.list.lastIndexOf(a)},"~O");c(a,"listIterator",function(){return this.list.listIterator()});c(a,"listIterator",function(a){return this.list.listIterator(a)},
"~N");c(a,"remove",function(a){return this.list.remove(a)},"~N");c(a,"set",function(a,h){return this.list.set(a,h)},"~N,~O");c(a,"subList",function(a,h){return new java.util.Collections.SynchronizedList(this.list.subList(a,h),this.mutex)},"~N,~N");a=w(function(){this.mutex=this.m=null;q(this,arguments)},java.util.Collections,"SynchronizedMap",null,[java.util.Map,java.io.Serializable]);x(a,function(a){this.m=a;this.mutex=this},"java.util.Map");x(a,function(a,h){this.m=a;this.mutex=h},"java.util.Map,~O");
c(a,"clear",function(){this.m.clear()});c(a,"containsKey",function(a){return this.m.containsKey(a)},"~O");c(a,"containsValue",function(a){return this.m.containsValue(a)},"~O");c(a,"entrySet",function(){return new java.util.Collections.SynchronizedSet(this.m.entrySet(),this.mutex)});c(a,"equals",function(a){return this.m.equals(a)},"~O");c(a,"get",function(a){return this.m.get(a)},"~O");c(a,"hashCode",function(){return this.m.hashCode()});c(a,"isEmpty",function(){return this.m.isEmpty()});c(a,"keySet",
function(){return new java.util.Collections.SynchronizedSet(this.m.keySet(),this.mutex)});c(a,"put",function(a,h){return this.m.put(a,h)},"~O,~O");c(a,"putAll",function(a){this.m.putAll(a)},"java.util.Map");c(a,"remove",function(a){return this.m.remove(a)},"~O");c(a,"size",function(){return this.m.size()});c(a,"values",function(){return new java.util.Collections.SynchronizedCollection(this.m.values(),this.mutex)});c(a,"toString",function(){return this.m.toString()});a=G(java.util.Collections,"SynchronizedSet",
java.util.Collections.SynchronizedCollection,java.util.Set);g(a,"equals",function(a){return this.c.equals(a)},"~O");g(a,"hashCode",function(){return this.c.hashCode()});a=w(function(){this.sm=null;q(this,arguments)},java.util.Collections,"SynchronizedSortedMap",java.util.Collections.SynchronizedMap,java.util.SortedMap);x(a,function(a){I(this,java.util.Collections.SynchronizedSortedMap,[a]);this.sm=a},"java.util.SortedMap");x(a,function(a,h){I(this,java.util.Collections.SynchronizedSortedMap,[a,h]);
this.sm=a},"java.util.SortedMap,~O");c(a,"comparator",function(){return this.sm.comparator()});c(a,"firstKey",function(){return this.sm.firstKey()});c(a,"headMap",function(a){return new java.util.Collections.SynchronizedSortedMap(this.sm.headMap(a),this.mutex)},"~O");c(a,"lastKey",function(){return this.sm.lastKey()});c(a,"subMap",function(a,h){return new java.util.Collections.SynchronizedSortedMap(this.sm.subMap(a,h),this.mutex)},"~O,~O");c(a,"tailMap",function(a){return new java.util.Collections.SynchronizedSortedMap(this.sm.tailMap(a),
this.mutex)},"~O");a=w(function(){this.ss=null;q(this,arguments)},java.util.Collections,"SynchronizedSortedSet",java.util.Collections.SynchronizedSet,java.util.SortedSet);x(a,function(a){I(this,java.util.Collections.SynchronizedSortedSet,[a]);this.ss=a},"java.util.SortedSet");x(a,function(a,h){I(this,java.util.Collections.SynchronizedSortedSet,[a,h]);this.ss=a},"java.util.SortedSet,~O");c(a,"comparator",function(){return this.ss.comparator()});c(a,"first",function(){return this.ss.first()});c(a,"headSet",
function(a){return new java.util.Collections.SynchronizedSortedSet(this.ss.headSet(a),this.mutex)},"~O");c(a,"last",function(){return this.ss.last()});c(a,"subSet",function(a,h){return new java.util.Collections.SynchronizedSortedSet(this.ss.subSet(a,h),this.mutex)},"~O,~O");c(a,"tailSet",function(a){return new java.util.Collections.SynchronizedSortedSet(this.ss.tailSet(a),this.mutex)},"~O");a=w(function(){this.c=null;q(this,arguments)},java.util.Collections,"UnmodifiableCollection",null,[java.util.Collection,
java.io.Serializable]);x(a,function(a){this.c=a},"java.util.Collection");g(a,"add",function(){throw new UnsupportedOperationException;},"~O");g(a,"addAll",function(){throw new UnsupportedOperationException;},"java.util.Collection");g(a,"clear",function(){throw new UnsupportedOperationException;});c(a,"contains",function(a){return this.c.contains(a)},"~O");c(a,"containsAll",function(a){return this.c.containsAll(a)},"java.util.Collection");c(a,"isEmpty",function(){return this.c.isEmpty()});c(a,"iterator",
function(){return W("java.util.Collections$UnmodifiableCollection$1")?0:java.util.Collections.UnmodifiableCollection.$Collections$UnmodifiableCollection$1$(),Y(java.util.Collections$UnmodifiableCollection$1,this,null)});g(a,"remove",function(){throw new UnsupportedOperationException;},"~O");g(a,"removeAll",function(){throw new UnsupportedOperationException;},"java.util.Collection");g(a,"retainAll",function(){throw new UnsupportedOperationException;},"java.util.Collection");c(a,"size",function(){return this.c.size()});
c(a,"toArray",function(){return this.c.toArray()});c(a,"toArray",function(a){return this.c.toArray(a)},"~A");c(a,"toString",function(){return this.c.toString()});a.$Collections$UnmodifiableCollection$1$=function(){var a=w(function(){fa(this,arguments);this.iterator=null;q(this,arguments)},java.util,"Collections$UnmodifiableCollection$1",null,java.util.Iterator);N(a,function(){this.iterator=this.b$["java.util.Collections.UnmodifiableCollection"].c.iterator()});c(a,"hasNext",function(){return this.iterator.hasNext()});
c(a,"next",function(){return this.iterator.next()});g(a,"remove",function(){throw new UnsupportedOperationException;})};a=G(java.util.Collections,"UnmodifiableRandomAccessList",java.util.Collections.UnmodifiableList,java.util.RandomAccess);g(a,"subList",function(a,h){return new java.util.Collections.UnmodifiableRandomAccessList(this.list.subList(a,h))},"~N,~N");a=w(function(){this.list=null;q(this,arguments)},java.util.Collections,"UnmodifiableList",java.util.Collections.UnmodifiableCollection,java.util.List);
x(a,function(a){I(this,java.util.Collections.UnmodifiableList,[a]);this.list=a},"java.util.List");c(a,"add",function(){throw new UnsupportedOperationException;},"~N,~O");c(a,"addAll",function(){throw new UnsupportedOperationException;},"~N,java.util.Collection");c(a,"equals",function(a){return this.list.equals(a)},"~O");c(a,"get",function(a){return this.list.get(a)},"~N");c(a,"hashCode",function(){return this.list.hashCode()});c(a,"indexOf",function(a){return this.list.indexOf(a)},"~O");c(a,"lastIndexOf",
function(a){return this.list.lastIndexOf(a)},"~O");c(a,"listIterator",function(){return this.listIterator(0)});c(a,"listIterator",function(a){return W("java.util.Collections$UnmodifiableList$1")?0:java.util.Collections.UnmodifiableList.$Collections$UnmodifiableList$1$(),Y(java.util.Collections$UnmodifiableList$1,this,Ia("location",a))},"~N");c(a,"remove",function(){throw new UnsupportedOperationException;},"~N");g(a,"set",function(){throw new UnsupportedOperationException;},"~N,~O");c(a,"subList",
function(a,h){return new java.util.Collections.UnmodifiableList(this.list.subList(a,h))},"~N,~N");a.$Collections$UnmodifiableList$1$=function(){var a=w(function(){fa(this,arguments);this.iterator=null;q(this,arguments)},java.util,"Collections$UnmodifiableList$1",null,java.util.ListIterator);N(a,function(){this.iterator=this.b$["java.util.Collections.UnmodifiableList"].list.listIterator(this.f$.location)});g(a,"add",function(){throw new UnsupportedOperationException;},"~O");c(a,"hasNext",function(){return this.iterator.hasNext()});
c(a,"hasPrevious",function(){return this.iterator.hasPrevious()});c(a,"next",function(){return this.iterator.next()});c(a,"nextIndex",function(){return this.iterator.nextIndex()});c(a,"previous",function(){return this.iterator.previous()});c(a,"previousIndex",function(){return this.iterator.previousIndex()});g(a,"remove",function(){throw new UnsupportedOperationException;});g(a,"set",function(){throw new UnsupportedOperationException;},"~O")};a=w(function(){this.m=null;q(this,arguments)},java.util.Collections,
"UnmodifiableMap",null,[java.util.Map,java.io.Serializable]);x(a,function(a){this.m=a},"java.util.Map");g(a,"clear",function(){throw new UnsupportedOperationException;});c(a,"containsKey",function(a){return this.m.containsKey(a)},"~O");c(a,"containsValue",function(a){return this.m.containsValue(a)},"~O");c(a,"entrySet",function(){return new java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet(this.m.entrySet())});c(a,"equals",function(a){return this.m.equals(a)},"~O");c(a,"get",function(a){return this.m.get(a)},
"~O");c(a,"hashCode",function(){return this.m.hashCode()});c(a,"isEmpty",function(){return this.m.isEmpty()});c(a,"keySet",function(){return new java.util.Collections.UnmodifiableSet(this.m.keySet())});g(a,"put",function(){throw new UnsupportedOperationException;},"~O,~O");g(a,"putAll",function(){throw new UnsupportedOperationException;},"java.util.Map");g(a,"remove",function(){throw new UnsupportedOperationException;},"~O");c(a,"size",function(){return this.m.size()});c(a,"values",function(){return new java.util.Collections.UnmodifiableCollection(this.m.values())});
c(a,"toString",function(){return this.m.toString()});a=G(java.util.Collections.UnmodifiableMap,"UnmodifiableEntrySet",java.util.Collections.UnmodifiableSet);g(a,"iterator",function(){return W("java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1")?0:java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet.$Collections$UnmodifiableMap$UnmodifiableEntrySet$1$(),Y(java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1,this,null)});c(a,"toArray",function(){for(var a=this.c.size(),h=Array(a),
b=this.iterator();0<=--a;)h[a]=b.next();return h});c(a,"toArray",function(a){var h=this.c.size(),b=0,c=this.iterator();h>a.length&&(a=a.getClass().getComponentType(),a=java.lang.reflect.Array.newInstance(a,h));for(;b<h;)a[b++]=c.next();b<a.length&&(a[b]=null);return a},"~A");a.$Collections$UnmodifiableMap$UnmodifiableEntrySet$1$=function(){var a=w(function(){fa(this,arguments);this.iterator=null;q(this,arguments)},java.util,"Collections$UnmodifiableMap$UnmodifiableEntrySet$1",null,java.util.Iterator);
N(a,function(){this.iterator=this.b$["java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet"].c.iterator()});c(a,"hasNext",function(){return this.iterator.hasNext()});c(a,"next",function(){return new java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableMapEntry(this.iterator.next())});g(a,"remove",function(){throw new UnsupportedOperationException;})};a=w(function(){this.mapEntry=null;q(this,arguments)},java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet,"UnmodifiableMapEntry",
null,java.util.Map.Entry);x(a,function(a){this.mapEntry=a},"java.util.Map.Entry");c(a,"equals",function(a){return this.mapEntry.equals(a)},"~O");c(a,"getKey",function(){return this.mapEntry.getKey()});c(a,"getValue",function(){return this.mapEntry.getValue()});c(a,"hashCode",function(){return this.mapEntry.hashCode()});g(a,"setValue",function(){throw new UnsupportedOperationException;},"~O");c(a,"toString",function(){return this.mapEntry.toString()});a=G(java.util.Collections,"UnmodifiableSet",java.util.Collections.UnmodifiableCollection,
java.util.Set);g(a,"equals",function(a){return this.c.equals(a)},"~O");g(a,"hashCode",function(){return this.c.hashCode()});a=w(function(){this.sm=null;q(this,arguments)},java.util.Collections,"UnmodifiableSortedMap",java.util.Collections.UnmodifiableMap,java.util.SortedMap);x(a,function(a){I(this,java.util.Collections.UnmodifiableSortedMap,[a]);this.sm=a},"java.util.SortedMap");c(a,"comparator",function(){return this.sm.comparator()});c(a,"firstKey",function(){return this.sm.firstKey()});c(a,"headMap",
function(a){return new java.util.Collections.UnmodifiableSortedMap(this.sm.headMap(a))},"~O");c(a,"lastKey",function(){return this.sm.lastKey()});c(a,"subMap",function(a,h){return new java.util.Collections.UnmodifiableSortedMap(this.sm.subMap(a,h))},"~O,~O");c(a,"tailMap",function(a){return new java.util.Collections.UnmodifiableSortedMap(this.sm.tailMap(a))},"~O");a=w(function(){this.ss=null;q(this,arguments)},java.util.Collections,"UnmodifiableSortedSet",java.util.Collections.UnmodifiableSet,java.util.SortedSet);
x(a,function(a){I(this,java.util.Collections.UnmodifiableSortedSet,[a]);this.ss=a},"java.util.SortedSet");c(a,"comparator",function(){return this.ss.comparator()});c(a,"first",function(){return this.ss.first()});c(a,"headSet",function(a){return new java.util.Collections.UnmodifiableSortedSet(this.ss.headSet(a))},"~O");c(a,"last",function(){return this.ss.last()});c(a,"subSet",function(a,h){return new java.util.Collections.UnmodifiableSortedSet(this.ss.subSet(a,h))},"~O,~O");c(a,"tailSet",function(a){return new java.util.Collections.UnmodifiableSortedSet(this.ss.tailSet(a))},
"~O");a=w(function(){this.type=this.c=null;q(this,arguments)},java.util.Collections,"CheckedCollection",null,[java.util.Collection,java.io.Serializable]);x(a,function(a,h){if(null==a||null==h)throw new NullPointerException;this.c=a;this.type=h},"java.util.Collection,Class");c(a,"size",function(){return this.c.size()});c(a,"isEmpty",function(){return this.c.isEmpty()});c(a,"contains",function(a){return this.c.contains(a)},"~O");c(a,"iterator",function(){var a=this.c.iterator();C(a,"java.util.ListIterator")&&
(a=new java.util.Collections.CheckedListIterator(a,this.type));return a});c(a,"toArray",function(){return this.c.toArray()});c(a,"toArray",function(a){return this.c.toArray(a)},"~A");c(a,"add",function(a){return this.c.add(java.util.Collections.checkType(a,this.type))},"~O");c(a,"remove",function(a){return this.c.remove(a)},"~O");c(a,"containsAll",function(a){return this.c.containsAll(a)},"java.util.Collection");g(a,"addAll",function(a){var h=a.size();if(0==h)return!1;var b=Array(h),c=a.iterator();
for(a=0;a<h;a++)b[a]=java.util.Collections.checkType(c.next(),this.type);c=!1;for(a=0;a<h;a++)c=(new Boolean(c|this.c.add(b[a]))).valueOf();return c},"java.util.Collection");c(a,"removeAll",function(a){return this.c.removeAll(a)},"java.util.Collection");c(a,"retainAll",function(a){return this.c.retainAll(a)},"java.util.Collection");c(a,"clear",function(){this.c.clear()});c(a,"toString",function(){return this.c.toString()});a=w(function(){this.type=this.i=null;q(this,arguments)},java.util.Collections,
"CheckedListIterator",null,java.util.ListIterator);x(a,function(a,h){this.i=a;this.type=h},"java.util.ListIterator,Class");c(a,"hasNext",function(){return this.i.hasNext()});c(a,"next",function(){return this.i.next()});c(a,"remove",function(){this.i.remove()});c(a,"hasPrevious",function(){return this.i.hasPrevious()});c(a,"previous",function(){return this.i.previous()});c(a,"nextIndex",function(){return this.i.nextIndex()});c(a,"previousIndex",function(){return this.i.previousIndex()});c(a,"set",
function(a){this.i.set(java.util.Collections.checkType(a,this.type))},"~O");c(a,"add",function(a){this.i.add(java.util.Collections.checkType(a,this.type))},"~O");a=w(function(){this.l=null;q(this,arguments)},java.util.Collections,"CheckedList",java.util.Collections.CheckedCollection,java.util.List);x(a,function(a,h){I(this,java.util.Collections.CheckedList,[a,h]);this.l=a},"java.util.List,Class");c(a,"addAll",function(a,h){var b=h.size();if(0==b)return!1;for(var c=Array(b),f=h.iterator(),j=0;j<b;j++)c[j]=
java.util.Collections.checkType(f.next(),this.type);return this.l.addAll(a,java.util.Arrays.asList(c))},"~N,java.util.Collection");c(a,"get",function(a){return this.l.get(a)},"~N");c(a,"set",function(a,h){return this.l.set(a,java.util.Collections.checkType(h,this.type))},"~N,~O");c(a,"add",function(a,h){this.l.add(a,java.util.Collections.checkType(h,this.type))},"~N,~O");c(a,"remove",function(a){return this.l.remove(a)},"~N");c(a,"indexOf",function(a){return this.l.indexOf(a)},"~O");c(a,"lastIndexOf",
function(a){return this.l.lastIndexOf(a)},"~O");c(a,"listIterator",function(){return new java.util.Collections.CheckedListIterator(this.l.listIterator(),this.type)});c(a,"listIterator",function(a){return new java.util.Collections.CheckedListIterator(this.l.listIterator(a),this.type)},"~N");c(a,"subList",function(a,h){return java.util.Collections.checkedList(this.l.subList(a,h),this.type)},"~N,~N");c(a,"equals",function(a){return this.l.equals(a)},"~O");c(a,"hashCode",function(){return this.l.hashCode()});
G(java.util.Collections,"CheckedRandomAccessList",java.util.Collections.CheckedList,java.util.RandomAccess);a=G(java.util.Collections,"CheckedSet",java.util.Collections.CheckedCollection,java.util.Set);g(a,"equals",function(a){return this.c.equals(a)},"~O");g(a,"hashCode",function(){return this.c.hashCode()});a=w(function(){this.valueType=this.keyType=this.m=null;q(this,arguments)},java.util.Collections,"CheckedMap",null,[java.util.Map,java.io.Serializable]);x(a,function(a,h,b){if(null==a||null==
h||null==b)throw new NullPointerException;this.m=a;this.keyType=h;this.valueType=b},"java.util.Map,Class,Class");c(a,"size",function(){return this.m.size()});c(a,"isEmpty",function(){return this.m.isEmpty()});c(a,"containsKey",function(a){return this.m.containsKey(a)},"~O");c(a,"containsValue",function(a){return this.m.containsValue(a)},"~O");c(a,"get",function(a){return this.m.get(a)},"~O");c(a,"put",function(a,h){return this.m.put(java.util.Collections.checkType(a,this.keyType),java.util.Collections.checkType(h,
this.valueType))},"~O,~O");c(a,"remove",function(a){return this.m.remove(a)},"~O");g(a,"putAll",function(a){var h=a.size();if(0!=h){var b=Array(h);a=a.entrySet().iterator();for(var c=0;c<h;c++){var f=a.next();java.util.Collections.checkType(f.getKey(),this.keyType);java.util.Collections.checkType(f.getValue(),this.valueType);b[c]=f}for(c=0;c<h;c++)this.m.put(b[c].getKey(),b[c].getValue())}},"java.util.Map");c(a,"clear",function(){this.m.clear()});c(a,"keySet",function(){return this.m.keySet()});c(a,
"values",function(){return this.m.values()});c(a,"entrySet",function(){return new java.util.Collections.CheckedMap.CheckedEntrySet(this.m.entrySet(),this.valueType)});c(a,"equals",function(a){return this.m.equals(a)},"~O");c(a,"hashCode",function(){return this.m.hashCode()});c(a,"toString",function(){return this.m.toString()});a=w(function(){this.valueType=this.e=null;q(this,arguments)},java.util.Collections.CheckedMap,"CheckedEntry",null,java.util.Map.Entry);x(a,function(a,h){if(null==a)throw new NullPointerException;
this.e=a;this.valueType=h},"java.util.Map.Entry,Class");c(a,"getKey",function(){return this.e.getKey()});c(a,"getValue",function(){return this.e.getValue()});c(a,"setValue",function(a){return this.e.setValue(java.util.Collections.checkType(a,this.valueType))},"~O");c(a,"equals",function(a){return this.e.equals(a)},"~O");c(a,"hashCode",function(){return this.e.hashCode()});a=w(function(){this.valueType=this.s=null;q(this,arguments)},java.util.Collections.CheckedMap,"CheckedEntrySet",null,java.util.Set);
x(a,function(a,h){this.s=a;this.valueType=h},"java.util.Set,Class");c(a,"iterator",function(){return new java.util.Collections.CheckedMap.CheckedEntrySet.CheckedEntryIterator(this.s.iterator(),this.valueType)});c(a,"toArray",function(){for(var a=this.size(),h=Array(a),b=this.iterator(),c=0;c<a;c++)h[c]=b.next();return h});c(a,"toArray",function(a){var h=this.size();a.length<h&&(a=a.getClass().getComponentType(),a=java.lang.reflect.Array.newInstance(a,h));for(var b=this.iterator(),c=0;c<h;c++)a[c]=
b.next();h<a.length&&(a[h]=null);return a},"~A");c(a,"retainAll",function(a){return this.s.retainAll(a)},"java.util.Collection");c(a,"removeAll",function(a){return this.s.removeAll(a)},"java.util.Collection");c(a,"containsAll",function(a){return this.s.containsAll(a)},"java.util.Collection");g(a,"addAll",function(){throw new UnsupportedOperationException;},"java.util.Collection");c(a,"remove",function(a){return this.s.remove(a)},"~O");c(a,"contains",function(a){return this.s.contains(a)},"~O");g(a,
"add",function(){throw new UnsupportedOperationException;},"java.util.Map.Entry");c(a,"isEmpty",function(){return this.s.isEmpty()});c(a,"clear",function(){this.s.clear()});c(a,"size",function(){return this.s.size()});c(a,"hashCode",function(){return this.s.hashCode()});c(a,"equals",function(a){return this.s.equals(a)},"~O");a=w(function(){this.valueType=this.i=null;q(this,arguments)},java.util.Collections.CheckedMap.CheckedEntrySet,"CheckedEntryIterator",null,java.util.Iterator);x(a,function(a,h){this.i=
a;this.valueType=h},"java.util.Iterator,Class");c(a,"hasNext",function(){return this.i.hasNext()});c(a,"remove",function(){this.i.remove()});c(a,"next",function(){return new java.util.Collections.CheckedMap.CheckedEntry(this.i.next(),this.valueType)});a=w(function(){this.ss=null;q(this,arguments)},java.util.Collections,"CheckedSortedSet",java.util.Collections.CheckedSet,java.util.SortedSet);x(a,function(a,h){I(this,java.util.Collections.CheckedSortedSet,[a,h]);this.ss=a},"java.util.SortedSet,Class");
c(a,"comparator",function(){return this.ss.comparator()});c(a,"subSet",function(a,h){return new java.util.Collections.CheckedSortedSet(this.ss.subSet(a,h),this.type)},"~O,~O");c(a,"headSet",function(a){return new java.util.Collections.CheckedSortedSet(this.ss.headSet(a),this.type)},"~O");c(a,"tailSet",function(a){return new java.util.Collections.CheckedSortedSet(this.ss.tailSet(a),this.type)},"~O");c(a,"first",function(){return this.ss.first()});c(a,"last",function(){return this.ss.last()});a=w(function(){this.sm=
null;q(this,arguments)},java.util.Collections,"CheckedSortedMap",java.util.Collections.CheckedMap,java.util.SortedMap);x(a,function(a,h,b){I(this,java.util.Collections.CheckedSortedMap,[a,h,b]);this.sm=a},"java.util.SortedMap,Class,Class");c(a,"comparator",function(){return this.sm.comparator()});c(a,"subMap",function(a,h){return new java.util.Collections.CheckedSortedMap(this.sm.subMap(a,h),this.keyType,this.valueType)},"~O,~O");c(a,"headMap",function(a){return new java.util.Collections.CheckedSortedMap(this.sm.headMap(a),
this.keyType,this.valueType)},"~O");c(a,"tailMap",function(a){return new java.util.Collections.CheckedSortedMap(this.sm.tailMap(a),this.keyType,this.valueType)},"~O");c(a,"firstKey",function(){return this.sm.firstKey()});c(a,"lastKey",function(){return this.sm.lastKey()});b.EMPTY_ENUMERATION=null;b.EMPTY_ITERATOR=null;b.EMPTY_LIST=new java.util.Collections.EmptyList;b.EMPTY_SET=new java.util.Collections.EmptySet;b.EMPTY_MAP=new java.util.Collections.EmptyMap});G(java.util,"Dictionary",null);z("java.util.AbstractCollection $.AbstractSet $.Dictionary $.Enumeration $.Iterator $.Map".split(" "),
"java.util.Hashtable",["java.util.Collections"],function(){var b=w(function(){this.table=null;this.modCount=this.loadFactor=this.threshold=this.count=0;this.__m=this.$values=this.$entrySet=this.$keySet=null;this.__allowJS=!1;q(this,arguments)},java.util,"Hashtable",java.util.Dictionary,[java.util.Map,Cloneable]);x(b,function(){this.initHT()});c(b,"initHT",function(a,h){var b=null,c=11,f=0.75,c=a,f=h;"object"==typeof c?(b=c,c=Math.max(2*t.size(),11),this.__allowJS=b.__allowJS):this.__allowJS=!0;c=
c||11;f=f||0.75;if(0>c)throw new IllegalArgumentException("Illegal Capacity: "+c);if(0>=f||Float.isNaN(f))throw new IllegalArgumentException("Illegal Load: "+f);0==c&&(c=1);this.loadFactor=f;this.table=Array(c);this.threshold=F(Math.min(c*f,2147483640));this.__setJS();null!=b&&this.putAll(b)});g(b,"size",function(){var a=this.count;return a=this.__m&&this.__m.size||a});g(b,"isEmpty",function(){return 0==this.size()});g(b,"keys",function(){return this.getEnumeration(0)});g(b,"elements",function(){return this.getEnumeration(1)});
c(b,"contains",function(a){if(null==a)throw new NullPointerException;if(0==this.size())return!1;if(java.util.Hashtable.__isSimple(this))for(var h=this.__m.values(),b=h.next();!b.done;b=h.next()){if(b.value==a||b.value.equals(a))return!0}else{h=this.table;for(b=h.length;0<b--;)for(var c=h[b];null!=c;c=c.next_)if(c.value.equals(a))return!0}return!1},"~O");g(b,"containsValue",function(a){return this.contains(a)},"~O");g(b,"containsKey",function(a){switch(java.util.Hashtable.__hasKey(this,a)){case 1:java.util.Hashtable.__ensureJavaMap(this);
break;case 2:return!1;case 3:return!0}for(var h=this.table,b=a.hashCode(),h=h[(b&2147483647)%h.length];null!=h;h=h.next_)if(h.hash==b&&h.key.equals(a))return!0;return!1},"~O");g(b,"get",function(a){if(null==a)return null;switch(java.util.Hashtable.__hasKey(this,a)){case 1:java.util.Hashtable.__ensureJavaMap(this);break;case 2:return null;case 3:var h=null;return h=this.__m.get(a)}for(var b=this.table,h=a.hashCode(),b=b[(h&2147483647)%b.length];null!=b;b=b.next_)if(b.hash==h&&b.key.equals(a))return b.value;
return null},"~O");c(b,"rehash",function(){var a=this.table.length,h=this.table,b=(a<<1)+1;if(0<b-2147483639){if(2147483639==a)return;b=2147483639}var c=Array(b);this.modCount++;this.threshold=F(Math.min(b*this.loadFactor,2147483640));for(this.table=c;0<a--;)for(var f=h[a];null!=f;){var j=f,f=f.next_,k=(j.hash&2147483647)%b;j.next_=c[k];c[k]=j}});c(b,"addEntry",function(a,h,b,c){this.modCount++;var f=this.table;this.count>=this.threshold&&(this.rehash(),f=this.table,a=h.hashCode(),c=(a&2147483647)%
f.length);f[c]=new java.util.Hashtable.Entry(a,h,b,f[c]);this.count++},"~N,~O,~O,~N");g(b,"put",function(a,h){if(null==h)throw new NullPointerException;switch(java.util.Hashtable.__hasKey(this,a)){case 1:java.util.Hashtable.__ensureJavaMap(this);break;case 2:return this.__m.set(a,h),++this.modCount,null;case 3:var b=null,b=this.__m.get(a);this.__m.set(a,h);++this.modCount;return b}for(var c=this.table,b=a.hashCode(),f=(b&2147483647)%c.length,c=c[f];null!=c;c=c.next_)if(c.hash==b&&c.key.equals(a))return b=
c.value,c.value=h,b;this.addEntry(b,a,h,f);return null},"~O,~O");g(b,"remove",function(a){if(null==a)throw new NullPointerException("Hashtable key may not be null");switch(java.util.Hashtable.__hasKey(this,a)){case 1:java.util.Hashtable.__ensureJavaMap(this);break;case 2:return null;case 3:var h=null,h=this.__m.get(a);this.__m["delete"](a);++this.modCount;return h}for(var b=this.table,c=a.hashCode(),f=(c&2147483647)%b.length,h=b[f],j=null;null!=h;j=h,h=h.next_)if(h.hash==c&&h.key.equals(a))return this.modCount++,
null!=j?j.next_=h.next_:b[f]=h.next_,this.count--,a=h.value,h.value=null,a;return null},"~O");g(b,"putAll",function(a){if(java.util.Hashtable.__isSimple(a)){var h=this;a.__m.forEach(function(a,d){h.put(d,a)})}else{var b;for(a=a.entrySet().iterator();a.hasNext()&&((b=a.next())||1);)this.put(b.getKey(),b.getValue())}},"java.util.Map");g(b,"clear",function(){var a=this.table;this.modCount++;java.util.Hashtable.__isSimple(this)&&this.__m.clear();this.__setJS();for(var h=a.length;0<=--h;)a[h]=null;this.count=
0});c(b,"clone",function(){try{var a=ia(this,java.util.Hashtable,"clone",[]);a.table=Array(this.table.length);for(var h=this.table.length;0<h--;)a.table[h]=null!=this.table[h]?this.table[h].clone():null;a.$keySet=null;a.$entrySet=null;a.$values=null;a.modCount=0;java.util.Hashtable.__isSimple(this)?(a.__setJS(),this.__m.forEach(function(h,b){a.__m.set(b,h);a.modCount++})):a.__m=null;return a}catch(b){if(D(b,"CloneNotSupportedException"))throw new InternalError(b);throw b;}});g(b,"toString",function(){var a=
this.size()-1;if(-1==a)return"{}";for(var h=this.entrySet().iterator(),b="{",c=0;;c++){var f=h.next(),j=f.getKey(),f=f.getValue(),b=b+(j===this?"(this Map)":j.toString()),b=b+"=",b=b+(f===this?"(this Map)":f.toString());if(c==a)return b+"}";b+=", "}});g(b,"equals",function(a){if(a===this)return!0;if(!C(a,"java.util.Map")||a.size()!=this.size())return!1;try{for(var h=this.entrySet().iterator();h.hasNext();){var b=h.next(),c=b.getKey(),f=b.getValue();if(null==f){if(!(null==a.get(c)&&a.containsKey(c)))return!1}else if(!f.equals(a.get(c)))return!1}}catch(j){if(D(j,
"ClassCastException")||D(j,NullPointerException))return!1;throw j;}return!0},"~O");g(b,"hashCode",function(){var a=0;if(0==this.count||0>this.loadFactor)return a;this.loadFactor=-this.loadFactor;for(var h,b=0,c=this.table;b<c.length&&((h=c[b])||1);b++)for(;null!=h;)a+=h.hashCode(),h=h.next_;this.loadFactor=-this.loadFactor;return a});c(b,"getEnumeration",function(a){return 0==this.size()?java.util.Collections.emptyEnumeration():new java.util.Hashtable.Enumerator(this,a,!1)},"~N");c(b,"getIterator",
function(a){return 0==this.size()?java.util.Collections.emptyIterator():new java.util.Hashtable.Enumerator(this,a,!0)},"~N");g(b,"keySet",function(){null==this.$keySet&&(this.$keySet=new java.util.Hashtable.KeySet(this));return this.$keySet});g(b,"entrySet",function(){null==this.$entrySet&&(this.$entrySet=new java.util.Hashtable.EntrySet(this));return this.$entrySet});g(b,"values",function(){null==this.$values&&(this.$values=new java.util.Hashtable.ValueCollection(this));return this.$values});c(b,
"__setJS",function(){if(this.__allowJS&&java.util.Hashtable.USE_SIMPLE){var a=null;this.__m=a=new Map}else this.__m=null});b.__get=c(b,"__get",function(a,h){return a.__m.get(null==h?null:h+"")},"~O,~O");b.__set=c(b,"__set",function(a,h,b){a.__m.set(null==h?null:h+"",b)},"java.util.Map,~O,~O");b.__hasKey=c(b,"__hasKey",function(a,h){return!a.__m?0:null!=h&&"string"!=typeof h?1:a.__m.has(h)?3:2},"java.util.Map,~O");b.__isSimple=c(b,"__isSimple",function(a){return!!a.__m},"java.util.Map");b.__ensureJavaMap=
c(b,"__ensureJavaMap",function(a){if(a.__m){var h=a.__m;a.__m=null;h.forEach(function(h,b){a.put(b,h)});h.clear()}},"java.util.Map");var a=w(function(){this.hash=0;this.next_=this.value=this.key=null;q(this,arguments)},java.util.Hashtable,"Entry",null,java.util.Map.Entry);x(a,function(a,h,b,c){this.hash=a;this.key=h;this.value=b;this.next_=c},"~N,~O,~O,java.util.Hashtable.Entry");g(a,"clone",function(){return new java.util.Hashtable.Entry(this.hash,this.key,this.value,null==this.next_?null:this.next_.clone())});
g(a,"getKey",function(){return this.key});g(a,"getValue",function(){return this.value});g(a,"setValue",function(a){if(null==a)throw new NullPointerException;var h=this.value;this.value=a;return h},"~O");g(a,"equals",function(a){return!C(a,"java.util.Map.Entry")?!1:(null==this.key?null==a.getKey():this.key.equals(a.getKey()))&&(null==this.value?null==a.getValue():this.value.equals(a.getValue()))},"~O");g(a,"hashCode",function(){return this.hash^(null==this.value?0:this.value.hashCode())});c(a,"toString",
function(){return this.key.toString()+"="+this.value.toString()});a=w(function(){this.ht=null;q(this,arguments)},java.util.Hashtable,"KeySet",java.util.AbstractSet);x(a,function(a){I(this,java.util.Hashtable.KeySet,[]);this.ht=a},"java.util.Hashtable");g(a,"iterator",function(){return this.ht.getIterator(0)});g(a,"size",function(){return this.ht.size()});g(a,"contains",function(a){return this.ht.containsKey(a)},"~O");g(a,"remove",function(a){return null!=this.ht.remove(a)},"~O");g(a,"clear",function(){this.ht.clear()});
a=w(function(){this.ht=null;q(this,arguments)},java.util.Hashtable,"EntrySet",java.util.AbstractSet);x(a,function(a){I(this,java.util.Hashtable.EntrySet,[]);this.ht=a},"java.util.Hashtable");g(a,"iterator",function(){return this.ht.getIterator(2)});g(a,"contains",function(a){if(!C(a,"java.util.Map.Entry"))return!1;var h=a.getKey();switch(java.util.Hashtable.__hasKey(this.ht,h)){case 1:java.util.Hashtable.__ensureJavaMap(this.ht);break;case 3:a=a.getValue();var b=this.ht.get(h);return a===b||null!=
a&&a.equals(h);case 2:return!1}b=this.ht.table;h=h.hashCode();for(b=b[(h&2147483647)%b.length];null!=b;b=b.next_)if(b.hash==h&&b.equals(a))return!0;return!1},"~O");g(a,"remove",function(a){if(!C(a,"java.util.Map.Entry"))return!1;var h=a.getKey();switch(java.util.Hashtable.__hasKey(this.ht,h)){case 1:java.util.Hashtable.__ensureJavaMap(this.ht);break;case 3:a=a.getValue();if(null==a)return!1;var b=this.ht.get(h);return b===a||b.equals(a)?(this.ht.remove(h),!0):!1;case 2:return!1}for(var b=this.ht.table,
h=h.hashCode(),c=(h&2147483647)%b.length,f=b[c],j=null;null!=f;j=f,f=f.next_)if(f.hash==h&&f.equals(a))return this.ht.modCount++,null!=j?j.next_=f.next_:b[c]=f.next_,this.ht.count--,f.value=null,!0;return!1},"~O");g(a,"size",function(){return this.ht.size()});g(a,"clear",function(){this.ht.clear()});a=w(function(){this.ht=null;q(this,arguments)},java.util.Hashtable,"ValueCollection",java.util.AbstractCollection);x(a,function(a){I(this,java.util.Hashtable.ValueCollection,[]);this.ht=a},"java.util.Hashtable");
g(a,"iterator",function(){return this.ht.getIterator(1)});g(a,"size",function(){return this.ht.size()});g(a,"contains",function(a){return this.ht.containsValue(a)},"~O");g(a,"clear",function(){this.ht.clear()});a=w(function(){this.table=null;this.index=0;this.current=this.next_=null;this.type=0;this.ht=this.jsMapIterator=null;this.isIterator=!1;this.expectedModCount=0;q(this,arguments)},java.util.Hashtable,"Enumerator",null,[java.util.Enumeration,java.util.Iterator]);x(a,function(a,h,b){this.ht=a;
this.table=a.table;this.index=a.table.length;this.type=h;this.isIterator=b;this.expectedModCount=a.modCount;java.util.Hashtable.__isSimple(a)&&(this.jsMapIterator=a.__m.entries(),this.next_=this.jsMapIterator.next())},"java.util.Hashtable,~N,~B");g(a,"hasMoreElements",function(){if(java.util.Hashtable.__isSimple(this.ht)){var a=!1;return a=this.next_&&!this.next_.done}for(var a=this.next_,h=this.index,b=this.table;null==a&&0<h;)a=b[--h];this.next_=a;this.index=h;return null!=a});g(a,"nextElement",
function(){var a=this.next_;if(java.util.Hashtable.__isSimple(this.ht)){var h=this.type;this.current=a;var b=null;this.next_=b=this.jsMapIterator.next()||null;if(null!=a){var c=b=null,f=!1,f=a.done;if(!f){if(2>h)return a.value[h];b=a.value[0];c=a.value[1]}if(!f)return W("java.util.Hashtable$Enumerator$1")?0:java.util.Hashtable.Enumerator.$Hashtable$Enumerator$1$(),Y(java.util.Hashtable$Enumerator$1,this,null,0,b,c,null)}}else{b=this.index;for(h=this.table;null==a&&0<b;)a=h[--b];this.next_=a;this.index=
b;if(null!=a)return a=this.current=this.next_,this.next_=a.next_,0==this.type?a.key:1==this.type?a.value:a}throw new java.util.NoSuchElementException("Hashtable Enumerator");});g(a,"hasNext",function(){return this.hasMoreElements()});g(a,"next",function(){if(this.ht.modCount!=this.expectedModCount)throw new java.util.ConcurrentModificationException;return this.nextElement()});g(a,"remove",function(){if(!this.isIterator)throw new UnsupportedOperationException;var a=this.current;if(null==a)throw new IllegalStateException("Hashtable Enumerator");
if(this.ht.modCount!=this.expectedModCount)throw new java.util.ConcurrentModificationException;if(java.util.Hashtable.__isSimple(this.ht)){var h=null,h=a.value[0];this.ht.remove(h);this.expectedModCount++}else{for(var a=this.ht.table,h=(this.current.hash&2147483647)%a.length,b=a[h],c=null;null!=b;c=b,b=b.next_)if(b===this.current){this.ht.modCount++;this.expectedModCount++;null==c?a[h]=b.next_:c.next_=b.next_;this.ht.count--;this.current=null;return}throw new java.util.ConcurrentModificationException;
}});a.$Hashtable$Enumerator$1$=function(){var a=qa(java.util,"Hashtable$Enumerator$1",java.util.Hashtable.Entry);g(a,"setValue",function(a){var d=this.b$["java.util.Hashtable.Enumerator"].ht.modCount;a=this.b$["java.util.Hashtable.Enumerator"].ht.put(this.getKey(),a);this.b$["java.util.Hashtable.Enumerator"].ht.modCount=d;return a},"~O")};b.USE_SIMPLE=!0});z(["java.util.Map"],"java.util.MapEntry",null,function(){var b=w(function(){this.value=this.key=null;q(this,arguments)},java.util,"MapEntry",null,
[java.util.Map.Entry,Cloneable]);x(b,function(a){this.key=a},"~O");x(b,function(a,d){this.key=a;this.value=d},"~O,~O");c(b,"clone",function(){try{return ia(this,java.util.MapEntry,"clone",[])}catch(a){if(D(a,"CloneNotSupportedException"))return null;throw a;}});g(b,"equals",function(a){return this===a?!0:C(a,"java.util.Map.Entry")?(null==this.key?null==a.getKey():this.key.equals(a.getKey()))&&(null==this.value?null==a.getValue():this.value.equals(a.getValue())):!1},"~O");g(b,"getKey",function(){return this.key});
g(b,"getValue",function(){return this.value});g(b,"hashCode",function(){return(null==this.key?0:this.key.hashCode())^(null==this.value?0:this.value.hashCode())});g(b,"setValue",function(a){var d=this.value;this.value=a;return d},"~O");g(b,"toString",function(){return this.key+"="+this.value});K(java.util.MapEntry,"Type")});z(["java.util.Hashtable"],"java.util.Properties",null,function(){var b=w(function(){this.defaults=this.builder=null;q(this,arguments)},java.util,"Properties",java.util.Hashtable);
x(b,function(){I(this,java.util.Properties,[])});x(b,function(a){this.initHT();this.defaults=null==a?null:a},"java.util.Properties");c(b,"dumpString",function(a,d,h){var b=0;!h&&(b<d.length&&" "==d.charAt(b))&&(a+="\\ ",b++);for(;b<d.length;b++){var c=d.charAt(b);switch(c.charCodeAt(0)){case 9:a+="\\t";break;case 10:a+="\\n";break;case 12:a+="\\f";break;case 13:a+="\\r";break;default:if(0<="\\#!=:".indexOf(c)||h&&" "==c)a+="\\";if(!(" "<=c&&"~">=c)){c=Integer.toHexString(c.charCodeAt(0));a+="\\u";
for(var f=0;f<4-c.length;f++)a+="0"}a+=c}}return a},"~S,~S,~B");c(b,"getProperty",function(a){var d=this.get(a),d="string"==typeof d?d:null;null==d&&null!=this.defaults&&(d=this.defaults.getProperty(a));return d},"~S");c(b,"getProperty",function(a,d){var h=this.get(a),h="string"==typeof h?h:null;null==h&&null!=this.defaults&&(h=this.defaults.getProperty(a));return null==h?d:h},"~S,~S");c(b,"list",function(a){if(null==a)throw new NullPointerException;for(var d="",h=this.propertyNames();h.hasMoreElements();){for(var b=
h.nextElement(),d=d+b,d=d+"=",c=this.get(b),f=this.defaults;null==c;)c=f.get(b),f=f.defaults;40<c.length?(d+=c.substring(0,37),d+="..."):d+=c;a.println(d.toString());d=""}},"java.io.PrintStream");c(b,"list",function(a){if(null==a)throw new NullPointerException;for(var d="",h=this.propertyNames();h.hasMoreElements();){for(var b=h.nextElement(),d=d+b,d=d+"=",c=this.get(b),f=this.defaults;null==c;)c=f.get(b),f=f.defaults;40<c.length?(d+=c.substring(0,37),d+="..."):d+=c;a.println(d.toString());d=""}},
"java.io.PrintWriter");c(b,"load",function(){},"java.io.InputStream");c(b,"propertyNames",function(){if(null==this.defaults)return this.keys();for(var a=new java.util.Hashtable(this.defaults.size()+this.size()),d=this.defaults.propertyNames();d.hasMoreElements();)a.put(d.nextElement(),a);for(d=this.keys();d.hasMoreElements();)a.put(d.nextElement(),a);return a.keys()});c(b,"save",function(a,d){try{this.store(a,d)}catch(h){if(!D(h,"java.io.IOException"))throw h;}},"java.io.OutputStream,~S");c(b,"setProperty",
function(a,d){return this.put(a,d)},"~S,~S");c(b,"store",function(){},"java.io.OutputStream,~S");c(b,"loadFromXML",function(){},"java.io.InputStream");c(b,"storeToXML",function(){},"java.io.OutputStream,~S");c(b,"storeToXML",function(){},"java.io.OutputStream,~S,~S");c(b,"substitutePredefinedEntries",function(a){return a.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll("'","&apos;").replaceAll('"',"&quot;")},"~S");b.lineSeparator=null});K(java.util,"SortedMap",java.util.Map);
K(java.util,"SortedSet",java.util.Set);z(["java.util.Enumeration"],"java.util.StringTokenizer",null,function(){var b=w(function(){this.delimiters=this.string=null;this.returnDelimiters=!1;this.position=0;q(this,arguments)},java.util,"StringTokenizer",null,java.util.Enumeration);x(b,function(a,d,h){switch(arguments.length){case 1:d=" \t\n\r\f";case 2:h=!1}if(null==a)throw new NullPointerException;this.string=a;this.delimiters=d;this.returnDelimiters=h;this.position=0},"~S,~S,~B");c(b,"countTokens",
function(){for(var a=0,d=!1,h=this.position,b=this.string.length;h<b;h++)0<=this.delimiters.indexOf(this.string.charAt(h),0)?(this.returnDelimiters&&a++,d&&(a++,d=!1)):d=!0;d&&a++;return a});g(b,"hasMoreElements",function(){return this.hasMoreTokens()});c(b,"hasMoreTokens",function(){var a=this.string.length;if(this.position<a){if(this.returnDelimiters)return!0;for(var d=this.position;d<a;d++)if(-1==this.delimiters.indexOf(this.string.charAt(d),0))return!0}return!1});g(b,"nextElement",function(){return this.nextToken()});
c(b,"nextToken",function(){1==arguments.length&&(this.delimiters=arguments[0]);var a=this.position,d=this.string.length;if(a<d){if(this.returnDelimiters){if(0<=this.delimiters.indexOf(this.string.charAt(this.position),0))return String.valueOf(this.string.charAt(this.position++));for(this.position++;this.position<d;this.position++)if(0<=this.delimiters.indexOf(this.string.charAt(this.position),0))return this.string.substring(a,this.position);return this.string.substring(a)}for(;a<d&&0<=this.delimiters.indexOf(this.string.charAt(a),
0);)a++;this.position=a;if(a<d){for(this.position++;this.position<d;this.position++)if(0<=this.delimiters.indexOf(this.string.charAt(this.position),0))return this.string.substring(a,this.position);return this.string.substring(a)}}throw new java.util.NoSuchElementException;})});n("javajs.api");K(javajs.api,"BytePoster");n("javajs.api");K(javajs.api,"GenericColor");n("J.api");K(J.api,"GenericFileInterface");n("javajs.api");K(javajs.api,"GenericOutputChannel");n("javajs.api");K(javajs.api,"JSInterface");
n("javajs.api");K(javajs.api,"JSONEncodable");n("javajs.api");K(javajs.api,"ZInputStream");n("javajs.api.js");K(javajs.api.js,"J2SObjectInterface");n("J.api");K(J.api,"GenericMouseInterface");n("J.api");z(["J.api.FontManager"],"J.api.GenericPlatform",null,function(){K(J.api,"GenericPlatform",J.api.FontManager)});n("J.api");K(J.api,"PlatformViewer");n("J.api");K(J.api,"EventManager");n("J.api");K(J.api,"FontManager");n("JU");z(null,"JU.Font",["JU.AU"],function(){var b=w(function(){this.fid=0;this.fontStyle=
this.fontFace=null;this.fontSize=this.idFontStyle=this.idFontFace=this.fontSizeNominal=0;this.manager=this.fontMetrics=this.font=null;this.descent=this.ascent=0;this.isItalic=this.isBold=!1;this.fontSizeAngstroms=0;q(this,arguments)},JU,"Font",null);x(b,function(a,d,h,b,c,f,j,k){this.manager=a;this.fid=d;this.fontFace=JU.Font.fontFaces[h];this.fontStyle=JU.Font.fontStyles[b];this.idFontFace=h;this.idFontStyle=b;this.fontSize=c;this.fontSizeAngstroms=j;this.isBold=1==(b&1);this.isItalic=2==(b&2);this.fontSizeNominal=
f;this.font=a.newFont(JU.Font.fontFaces[h],this.isBold,this.isItalic,c);this.fontMetrics=a.getFontMetrics(this,k);this.descent=a.getFontDescent(this.fontMetrics);this.ascent=a.getFontAscent(this.fontMetrics)},"J.api.FontManager,~N,~N,~N,~N,~N,~N,~O");b.getFont3D=c(b,"getFont3D",function(a){return JU.Font.font3ds[a]},"~N");b.createFont3D=c(b,"createFont3D",function(a,d,h,b,c,f,j){255<h&&(h=255);0>h&&(c=-h,b=h=10);for(var k=F(h)<<4,k=a&3|(d&3)<<2|k<<4,l=JU.Font.fontkeyCount;0<--l;)if(k==JU.Font.fontkeys[l]&&
JU.Font.font3ds[l].fontSizeNominal==b)return JU.Font.font3ds[l];l=JU.Font.fontkeyCount++;l==JU.Font.fontkeys.length&&(JU.Font.fontkeys=JU.AU.arrayCopyI(JU.Font.fontkeys,l+8),JU.Font.font3ds=JU.AU.arrayCopyObject(JU.Font.font3ds,l+8));a=new JU.Font(f,l,a,d,h,b,c,j);JU.Font.font3ds[l]=a;JU.Font.fontkeys[l]=k;return a},"~N,~N,~N,~N,~N,J.api.FontManager,~O");b.getFontFaceID=c(b,"getFontFaceID",function(a){return"Monospaced".equalsIgnoreCase(a)?2:"Serif".equalsIgnoreCase(a)?1:0},"~S");b.getFontStyleID=
c(b,"getFontStyleID",function(a){for(var d=4;0<=--d;)if(JU.Font.fontStyles[d].equalsIgnoreCase(a))return d;return-1},"~S");c(b,"getAscent",function(){return this.ascent});c(b,"getDescent",function(){return this.descent});c(b,"getHeight",function(){return this.getAscent()+this.getDescent()});c(b,"getFontMetrics",function(){return this.fontMetrics});c(b,"stringWidth",function(a){return this.manager.fontStringWidth(this,a)},"~S");c(b,"getInfo",function(){return(0<this.fontSizeAngstroms?-this.fontSizeAngstroms:
this.fontSizeNominal)+" "+this.fontFace+" "+this.fontStyle});g(b,"toString",function(){return"["+this.getInfo()+"]"});b.fontkeyCount=1;b.fontkeys=E(8,0);b.font3ds=Array(8);b.fontFaces=u(-1,["SansSerif","Serif","Monospaced",""]);b.fontStyles=u(-1,["Plain","Bold","Italic","BoldItalic"])});n("JS");z(["javajs.api.GenericColor"],"JS.Color",null,function(){var b=w(function(){this.argb=0;q(this,arguments)},JS,"Color",null,javajs.api.GenericColor);g(b,"getRGB",function(){return this.argb&16777215});g(b,"getOpacity255",
function(){return this.argb>>24&255});g(b,"setOpacity255",function(a){this.argb=this.argb&16777215|(a&255)<<24},"~N");b.get1=c(b,"get1",function(a){var d=new JS.Color;d.argb=a|4278190080;return d},"~N");b.get3=c(b,"get3",function(a,d,h){return(new JS.Color).set4(a,d,h,255)},"~N,~N,~N");b.get4=c(b,"get4",function(a,d,h,b){return(new JS.Color).set4(a,d,h,b)},"~N,~N,~N,~N");c(b,"set4",function(a,d,h,b){this.argb=(b<<24|a<<16|d<<8|h)&4294967295;return this},"~N,~N,~N,~N");g(b,"toString",function(){var a=
"00000000"+Integer.toHexString(this.argb);return"[0x"+a.substring(a.length-8,a.length)+"]"})});n("JS");var Xa=w(function(){this.height=this.width=0;q(this,arguments)},JS,"Dimension",null);x(Xa,function(b,a){this.set(b,a)},"~N,~N");c(Xa,"set",function(b,a){this.width=b;this.height=a;return this},"~N,~N");n("J.awtjs");G(J.awtjs,"Event",null);n("J.api");K(J.api,"GenericMenuInterface");n("JU");z(["JU.P3"],"JU.A4",["JU.T3"],function(){var b=w(function(){this.angle=0;q(this,arguments)},JU,"A4",JU.P3);x(b,
function(){I(this,JU.A4,[]);this.z=1});b.new4=c(b,"new4",function(a,d,h,b){var c=new JU.A4;c.set4(a,d,h,b);return c},"~N,~N,~N,~N");b.newAA=c(b,"newAA",function(a){var d=new JU.A4;d.set4(a.x,a.y,a.z,a.angle);return d},"JU.A4");b.newVA=c(b,"newVA",function(a,d){var h=new JU.A4;h.setVA(a,d);return h},"JU.V3,~N");c(b,"setVA",function(a,d){this.x=a.x;this.y=a.y;this.z=a.z;this.angle=d},"JU.V3,~N");c(b,"set4",function(a,d,h,b){this.x=a;this.y=d;this.z=h;this.angle=b},"~N,~N,~N,~N");c(b,"setAA",function(a){this.x=
a.x;this.y=a.y;this.z=a.z;this.angle=a.angle},"JU.A4");c(b,"setM",function(a){this.setFromMat(a.m00,a.m01,a.m02,a.m10,a.m11,a.m12,a.m20,a.m21,a.m22)},"JU.M3");c(b,"setFromMat",function(a,d,h,b,c,f,j,k,l){a=0.5*(a+c+l-1);this.x=k-f;this.y=h-j;this.z=b-d;d=0.5*Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z);0==d&&1==a?(this.x=this.y=0,this.z=1,this.angle=0):this.angle=Math.atan2(d,a)},"~N,~N,~N,~N,~N,~N,~N,~N,~N");g(b,"hashCode",function(){return JU.T3.floatToIntBits(this.x)^JU.T3.floatToIntBits(this.y)^
JU.T3.floatToIntBits(this.z)^JU.T3.floatToIntBits(this.angle)});g(b,"equals",function(a){return!C(a,"JU.A4")?!1:this.x==a.x&&this.y==a.y&&this.z==a.z&&this.angle==a.angle},"~O");g(b,"toString",function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.angle+")"});g(b,"toJSON",function(){return"["+this.x+","+this.y+","+this.z+","+180*this.angle/3.141592653589793+"]"})});n("JU");z(["java.net.URLConnection"],"JU.AjaxURLConnection",["JU.AU","$.Rdr"],function(){var b=w(function(){this.bytesOut=null;
this.postOut="";q(this,arguments)},JU,"AjaxURLConnection",java.net.URLConnection);c(b,"doAjax",function(){var a=null,a=Jmol;return a.doAjax(this.url,this.postOut,this.bytesOut,!1)});g(b,"connect",function(){});c(b,"outputBytes",function(a){this.bytesOut=a},"~A");c(b,"outputString",function(a){this.postOut=a},"~S");g(b,"getInputStream",function(){var a=null,d=this.doAjax();JU.AU.isAB(d)?a=JU.Rdr.getBIS(d):C(d,"JU.SB")?a=JU.Rdr.getBIS(JU.Rdr.getBytesFromSB(d)):"string"==typeof d&&(a=JU.Rdr.getBIS(d.getBytes()));
return a});c(b,"getContents",function(){return this.doAjax()})});n("JU");z(["java.net.URLStreamHandler"],"JU.AjaxURLStreamHandler",["JU.AjaxURLConnection","$.SB"],function(){var b=w(function(){this.protocol=null;q(this,arguments)},JU,"AjaxURLStreamHandler",java.net.URLStreamHandler);x(b,function(a){I(this,JU.AjaxURLStreamHandler,[]);this.protocol=a},"~S");c(b,"openConnection",function(a){return new JU.AjaxURLConnection(a)},"java.net.URL");g(b,"toExternalForm",function(a){var d=new JU.SB;d.append(a.getProtocol());
d.append(":");null!=a.getAuthority()&&0<a.getAuthority().length&&(d.append("//"),d.append(a.getAuthority()));null!=a.getPath()&&d.append(a.getPath());null!=a.getQuery()&&(d.append("?"),d.append(a.getQuery()));null!=a.getRef()&&(d.append("#"),d.append(a.getRef()));return d.toString()},"java.net.URL")});n("JU");z(["java.net.URLStreamHandlerFactory","java.util.Hashtable"],"JU.AjaxURLStreamHandlerFactory",["JU.AjaxURLStreamHandler"],function(){var b=w(function(){this.htFactories=null;q(this,arguments)},
JU,"AjaxURLStreamHandlerFactory",null,java.net.URLStreamHandlerFactory);N(b,function(){this.htFactories=new java.util.Hashtable});g(b,"createURLStreamHandler",function(a){var d=this.htFactories.get(a);null==d&&this.htFactories.put(a,d=new JU.AjaxURLStreamHandler(a));return null==d.protocol?null:d},"~S")});n("JU");z(null,"JU.AU",["java.lang.reflect.Array","java.util.Arrays","JU.Lst"],function(){var b=G(JU,"AU",null);b.ensureLength=c(b,"ensureLength",function(a,d){return null!=a&&JU.AU.getLength(a)>=
d?a:JU.AU.arrayCopyObject(a,d)},"~O,~N");b.ensureLengthS=c(b,"ensureLengthS",function(a,d){return null!=a&&a.length>=d?a:JU.AU.arrayCopyS(a,d)},"~A,~N");b.ensureLengthA=c(b,"ensureLengthA",function(a,d){return null!=a&&a.length>=d?a:JU.AU.arrayCopyF(a,d)},"~A,~N");b.ensureLengthI=c(b,"ensureLengthI",function(a,d){return null!=a&&a.length>=d?a:JU.AU.arrayCopyI(a,d)},"~A,~N");b.ensureLengthShort=c(b,"ensureLengthShort",function(a,d){return null!=a&&a.length>=d?a:JU.AU.arrayCopyShort(a,d)},"~A,~N");
b.ensureLengthByte=c(b,"ensureLengthByte",function(a,d){return null!=a&&a.length>=d?a:JU.AU.arrayCopyByte(a,d)},"~A,~N");b.doubleLength=c(b,"doubleLength",function(a){return JU.AU.arrayCopyObject(a,null==a?16:2*JU.AU.getLength(a))},"~O");b.doubleLengthS=c(b,"doubleLengthS",function(a){return JU.AU.arrayCopyS(a,null==a?16:2*a.length)},"~A");b.doubleLengthF=c(b,"doubleLengthF",function(a){return JU.AU.arrayCopyF(a,null==a?16:2*a.length)},"~A");b.doubleLengthI=c(b,"doubleLengthI",function(a){return JU.AU.arrayCopyI(a,
null==a?16:2*a.length)},"~A");b.doubleLengthShort=c(b,"doubleLengthShort",function(a){return JU.AU.arrayCopyShort(a,null==a?16:2*a.length)},"~A");b.doubleLengthByte=c(b,"doubleLengthByte",function(a){return JU.AU.arrayCopyByte(a,null==a?16:2*a.length)},"~A");b.doubleLengthBool=c(b,"doubleLengthBool",function(a){return JU.AU.arrayCopyBool(a,null==a?16:2*a.length)},"~A");b.deleteElements=c(b,"deleteElements",function(a,d,h){if(0==h||null==a)return a;var b=JU.AU.getLength(a);if(d>=b)return a;b-=d+h;
0>b&&(b=0);var c=JU.AU.newInstanceO(a,d+b);0<d&&System.arraycopy(a,0,c,0,d);0<b&&System.arraycopy(a,d+h,c,d,b);return c},"~O,~N,~N");b.arrayCopyObject=c(b,"arrayCopyObject",function(a,d){var h=null==a?-1:JU.AU.getLength(a);0>d&&(d=h);if(d==h)return a;if(d<h)return u(-1,a,0,d);var b=JU.AU.newInstanceO(a,d);0<h&&System.arraycopy(a,0,b,0,h<d?h:d);return b},"~O,~N");b.newInstanceO=c(b,"newInstanceO",function(a,d){return JU.AU.isAI(a)?E(d,0):!a.getClass||!a.getClass().getComponentType?Array(d):java.lang.reflect.Array.newInstance(a.getClass().getComponentType(),
d)},"~O,~N");b.getLength=c(b,"getLength",function(a){return a.length},"~O");b.arrayCopyS=c(b,"arrayCopyS",function(a,d){var h=null==a?-1:a.length;0>d&&(d=h);if(d<h)return u(-1,a,0,d);var b=Array(d);null!=a&&System.arraycopy(a,0,b,0,h<d?h:d);return b},"~A,~N");b.arrayCopyII=c(b,"arrayCopyII",function(a,d){var h=JU.AU.newInt2(d);if(null!=a){var b=a.length;System.arraycopy(a,0,h,0,b<d?b:d)}return h},"~A,~N");b.arrayCopyPt=c(b,"arrayCopyPt",function(a,d){0>d&&(d=a.length);var h=Array(d);if(null!=a){var b=
a.length;System.arraycopy(a,0,h,0,b<d?b:d)}return h},"~A,~N");b.arrayCopyF=c(b,"arrayCopyF",function(a,d){var h=null==a?-1:a.length;0>d&&(d=h);if(d<h)return u(-1,a,0,d);var b=L(d,0);null!=a&&System.arraycopy(a,0,b,0,h<d?h:d);return b},"~A,~N");b.arrayCopyI=c(b,"arrayCopyI",function(a,d){var h=null==a?-1:a.length;0>d&&(d=h);if(d<h)return u(-1,a,0,d);var b=E(d,0);null!=a&&System.arraycopy(a,0,b,0,h<d?h:d);return b},"~A,~N");b.arrayCopyRangeI=c(b,"arrayCopyRangeI",function(a,d,h){if(null==a)return null;
var b=a.length;-1==h&&(h=b);-2==h&&(h=v(b/2));return u(-1,a,d,h)},"~A,~N,~N");b.arrayCopyRangeRevI=c(b,"arrayCopyRangeRevI",function(a,d,h){return null==a?null:u(-1,a,d,h).reverse()},"~A,~N,~N");b.arrayCopyShort=c(b,"arrayCopyShort",function(a,d){var h=null==a?-1:a.length;0>d&&(d=h);if(d<h)return u(-1,a,0,d);var b=U(d,0);null!=a&&System.arraycopy(a,0,b,0,h<d?h:d);return b},"~A,~N");b.arrayCopyByte=c(b,"arrayCopyByte",function(a,d){var h=null==a?-1:a.length;0>d&&(d=h);if(d<h)return u(-1,a,0,d);var b=
O(d,0);null!=a&&System.arraycopy(a,0,b,0,h<d?h:d);return b},"~A,~N");b.arrayCopyBool=c(b,"arrayCopyBool",function(a,d){var h=null==a?-1:a.length;0>d&&(d=h);if(d<h)return u(-1,a,0,d);var b=Ca(d,!1);null!=a&&System.arraycopy(a,0,b,0,h<d?h:d);return b},"~A,~N");b.swapInt=c(b,"swapInt",function(a,d,h){var b=a[d];a[d]=a[h];a[h]=b},"~A,~N,~N");b.dumpArray=c(b,"dumpArray",function(a,d,h,b,c,f){a="dumpArray: "+a+"\n";for(var j=h;j<=b;j++)a+="\t*"+j+"*";for(;f>=c;f--){a+="\n*"+f+"*";for(j=h;j<=b;j++)a+="\t"+
(j<d.length&&f<d[j].length?d[j][f]:NaN)}return a},"~S,~A,~N,~N,~N,~N");b.dumpIntArray=c(b,"dumpIntArray",function(a,d){for(var h="",b=0;b<d;b++)h+=" "+a[b];return h},"~A,~N");b.sortedItem=c(b,"sortedItem",function(a,d){if(0==a.size())return null;if(1==a.size())return a.get(0);var h=a.toArray(Array(a.size()));java.util.Arrays.sort(h);return h[d%h.length]},"JU.Lst,~N");b.createArrayOfArrayList=c(b,"createArrayOfArrayList",function(a){return Array(a)},"~N");b.createArrayOfHashtable=c(b,"createArrayOfHashtable",
function(a){return Array(a)},"~N");b.swap=c(b,"swap",function(a,d,h){var b=a[d];a[d]=a[h];a[h]=b},"~A,~N,~N");b.newFloat2=c(b,"newFloat2",function(a){return u(a,null)},"~N");b.newInt2=c(b,"newInt2",function(a){return u(a,null)},"~N");b.newInt3=c(b,"newInt3",function(a){return u(a,null)},"~N,~N");b.newFloat3=c(b,"newFloat3",function(a){return u(a,null)},"~N,~N");b.newInt4=c(b,"newInt4",function(a){return u(a,null)},"~N");b.newShort2=c(b,"newShort2",function(a){return u(a,null)},"~N");b.newByte2=c(b,
"newByte2",function(a){return u(a,null)},"~N");b.newDouble2=c(b,"newDouble2",function(a){return u(a,null)},"~N");b.newDouble3n=c(b,"newDouble3n",function(a){return R(a,0)},"~N");b.removeMapKeys=c(b,"removeMapKeys",function(a,d){for(var h=new JU.Lst,b,c=a.keySet().iterator();c.hasNext()&&((b=c.next())||1);)b.startsWith(d)&&h.addLast(b);for(b=h.size();0<=--b;)a.remove(h.get(b));return h.size()},"java.util.Map,~S");b.isAS=c(b,"isAS",function(a){return hb(a)},"~O");b.isASS=c(b,"isASS",function(a){return ib(a)},
"~O");b.isAP=c(b,"isAP",function(a){return jb(a)},"~O");b.isAF=c(b,"isAF",function(a){return Pa(a)},"~O");b.isAFloat=c(b,"isAFloat",function(a){return kb(a)},"~O");b.isAD=c(b,"isAD",function(a){return Pa(a)},"~O");b.isADD=c(b,"isADD",function(a){return Qa(a)},"~O");b.isADDD=c(b,"isADDD",function(a){return Ra(a)},"~O");b.isAB=c(b,"isAB",function(a){return fb(a)},"~O");b.isAI=c(b,"isAI",function(a){return gb(a)},"~O");b.isAII=c(b,"isAII",function(a){return lb(a)},"~O");b.isAFF=c(b,"isAFF",function(a){return Qa(a)},
"~O");b.isAFFF=c(b,"isAFFF",function(a){return Ra(a)},"~O");b.ensureSignedBytes=c(b,"ensureSignedBytes",function(a){if(null!=a)for(var d=a.length;0<=--d;){var h=a[d]&255;128<=h&&(h-=256);a[d]=h}return a},"~A")});n("JU");z(null,"JU.Base64",["JU.SB"],function(){var b=G(JU,"Base64",null);b.getBytes64=c(b,"getBytes64",function(a){return JU.Base64.getBase64(a).toBytes(0,-1)},"~A");b.getBase64=c(b,"getBase64",function(a){var d=a.length,h=new JU.SB;if(0==d)return h;for(var b=0,c=0;b<d&&0==c;){0==b%75&&0!=
b&&h.append("\r\n");var c=b+2==d?1:b+1==d?2:0,f=a[b++]<<16&16711680|(2==c?0:a[b++]<<8)&65280|(1<=c?0:a[b++])&255;h.appendC(JU.Base64.base64.charAt(f>>18&63));h.appendC(JU.Base64.base64.charAt(f>>12&63));h.appendC(2==c?"=":JU.Base64.base64.charAt(f>>6&63));h.appendC(1<=c?"=":JU.Base64.base64.charAt(f&63))}return h},"~A");b.decodeBase64=c(b,"decodeBase64",function(a){var d=0,h,b=a.indexOf(";base64,")+1;0<b&&(b+=7);a=a.toCharArray();var c=a.length;if(0==c)return O(0,0);for(var f=c;--f>=b;)d+=65==(h=
a[f].charCodeAt(0)&127)||0<JU.Base64.decode64[h]?3:0;for(var d=d>>2,j=O(d,0),k=18,f=b,l=b=0;f<c;f++)if(0<JU.Base64.decode64[h=a[f].charCodeAt(0)&127]||65==h||61==h)l|=JU.Base64.decode64[h]<<k,k-=6,0>k&&(j[b++]=(l&16711680)>>16,b<d&&(j[b++]=(l&65280)>>8),b<d&&(j[b++]=l&255),k=18,l=0);return j},"~S");b.base64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";b.decode64=E(-1,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,0,62,0,63,52,53,54,
55,56,57,58,59,60,61,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,0,0,0,0,63,0,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,0,0,0,0,0])});n("JU");z(["javajs.api.JSONEncodable"],"JU.BS",["JU.PT","$.SB"],function(){var b=w(function(){this.words=null;this.wordsInUse=0;this.sizeIsSticky=!1;q(this,arguments)},JU,"BS",null,[Cloneable,javajs.api.JSONEncodable]);x(b,function(){this.initWords(32);this.sizeIsSticky=!1});b.wordIndex=c(b,"wordIndex",
function(a){return a>>5},"~N");c(b,"recalculateWordsInUse",function(){var a;for(a=this.wordsInUse-1;0<=a&&0==this.words[a];a--);this.wordsInUse=a+1});b.newN=c(b,"newN",function(a){var d=new JU.BS;d.init(a);return d},"~N");c(b,"init",function(a){if(0>a)throw new NegativeArraySizeException("nbits < 0: "+a);this.initWords(a);this.sizeIsSticky=!0},"~N");c(b,"initWords",function(a){this.words=E(JU.BS.wordIndex(a-1)+1,0)},"~N");c(b,"ensureCapacity",function(a){this.words.length<a&&(a=Math.max(2*this.words.length,
a),this.setLength(a),this.sizeIsSticky=!1)},"~N");c(b,"expandTo",function(a){a+=1;this.wordsInUse<a&&(this.ensureCapacity(a),this.wordsInUse=a)},"~N");c(b,"set",function(a){if(0>a)throw new IndexOutOfBoundsException("bitIndex < 0: "+a);var d=JU.BS.wordIndex(a);this.expandTo(d);this.words[d]|=1<<a},"~N");c(b,"setBitTo",function(a,d){d?this.set(a):this.clear(a)},"~N,~B");c(b,"setBits",function(a,d){if(a!=d){var h=JU.BS.wordIndex(a),b=JU.BS.wordIndex(d-1);this.expandTo(b);var c=-1<<a,f=-1>>>-d;if(h==
b)this.words[h]|=c&f;else{this.words[h]|=c;for(h+=1;h<b;h++)this.words[h]=-1;this.words[b]|=f}}},"~N,~N");c(b,"clear",function(a){if(0>a)throw new IndexOutOfBoundsException("bitIndex < 0: "+a);var d=JU.BS.wordIndex(a);d>=this.wordsInUse||(this.words[d]&=~(1<<a),this.recalculateWordsInUse())},"~N");c(b,"clearBits",function(a,d){if(a!=d){var h=JU.BS.wordIndex(a);if(!(h>=this.wordsInUse)){var b=JU.BS.wordIndex(d-1);b>=this.wordsInUse&&(d=this.length(),b=this.wordsInUse-1);var c=-1<<a,f=-1>>>-d;if(h==
b)this.words[h]&=~(c&f);else{this.words[h]&=~c;for(h+=1;h<b;h++)this.words[h]=0;this.words[b]&=~f}this.recalculateWordsInUse()}}},"~N,~N");c(b,"clearAll",function(){for(;0<this.wordsInUse;)this.words[--this.wordsInUse]=0});c(b,"get",function(a){if(0>a)throw new IndexOutOfBoundsException("bitIndex < 0: "+a);var d=JU.BS.wordIndex(a);return d<this.wordsInUse&&0!=(this.words[d]&1<<a)},"~N");c(b,"nextSetBit",function(a){if(0>a)throw new IndexOutOfBoundsException("fromIndex < 0: "+a);var d=JU.BS.wordIndex(a);
if(d>=this.wordsInUse)return-1;for(a=this.words[d]&-1<<a;;){if(0!=a)return 32*d+Integer.numberOfTrailingZeros(a);if(++d==this.wordsInUse)return-1;a=this.words[d]}},"~N");c(b,"nextClearBit",function(a){if(0>a)throw new IndexOutOfBoundsException("fromIndex < 0: "+a);var d=JU.BS.wordIndex(a);if(d>=this.wordsInUse)return a;for(a=~this.words[d]&-1<<a;;){if(0!=a)return 32*d+Integer.numberOfTrailingZeros(a);if(++d==this.wordsInUse)return 32*this.wordsInUse;a=~this.words[d]}},"~N");c(b,"length",function(){return 0==
this.wordsInUse?0:32*(this.wordsInUse-1)+(32-Integer.numberOfLeadingZeros(this.words[this.wordsInUse-1]))});c(b,"isEmpty",function(){return 0==this.wordsInUse});c(b,"intersects",function(a){for(var d=Math.min(this.wordsInUse,a.wordsInUse)-1;0<=d;d--)if(0!=(this.words[d]&a.words[d]))return!0;return!1},"JU.BS");c(b,"cardinality",function(){for(var a=0,d=0;d<this.wordsInUse;d++)a+=Integer.bitCount(this.words[d]);return a});c(b,"and",function(a){if(this!==a){for(;this.wordsInUse>a.wordsInUse;)this.words[--this.wordsInUse]=
0;for(var d=0;d<this.wordsInUse;d++)this.words[d]&=a.words[d];this.recalculateWordsInUse()}},"JU.BS");c(b,"or",function(a){if(this!==a){var d=Math.min(this.wordsInUse,a.wordsInUse);this.wordsInUse<a.wordsInUse&&(this.ensureCapacity(a.wordsInUse),this.wordsInUse=a.wordsInUse);for(var h=0;h<d;h++)this.words[h]|=a.words[h];d<a.wordsInUse&&System.arraycopy(a.words,d,this.words,d,this.wordsInUse-d)}},"JU.BS");c(b,"xor",function(a){var d=Math.min(this.wordsInUse,a.wordsInUse);this.wordsInUse<a.wordsInUse&&
(this.ensureCapacity(a.wordsInUse),this.wordsInUse=a.wordsInUse);for(var h=0;h<d;h++)this.words[h]^=a.words[h];d<a.wordsInUse&&System.arraycopy(a.words,d,this.words,d,a.wordsInUse-d);this.recalculateWordsInUse()},"JU.BS");c(b,"andNot",function(a){for(var d=Math.min(this.wordsInUse,a.wordsInUse)-1;0<=d;d--)this.words[d]&=~a.words[d];this.recalculateWordsInUse()},"JU.BS");g(b,"hashCode",function(){for(var a=1234,d=this.wordsInUse;0<=--d;)a^=this.words[d]*(d+1);return a>>32^a});c(b,"size",function(){return 32*
this.words.length});g(b,"equals",function(a){if(!C(a,"JU.BS"))return!1;if(this===a)return!0;if(this.wordsInUse!=a.wordsInUse)return!1;for(var d=0;d<this.wordsInUse;d++)if(this.words[d]!=a.words[d])return!1;return!0},"~O");g(b,"clone",function(){!this.sizeIsSticky&&this.wordsInUse!=this.words.length&&this.setLength(this.wordsInUse);return JU.BS.copy(this)});c(b,"setLength",function(a){a!=this.words.length&&(a==this.wordsInUse?this.words=u(-1,this.words,0,a):(a=E(a,0),System.arraycopy(this.words,0,
a,0,this.wordsInUse),this.words=a))},"~N");g(b,"toString",function(){return JU.BS.escape(this,"(",")")});b.copy=c(b,"copy",function(a){var d;d=Oa(a);var h=a.wordsInUse;d.words=0==h?JU.BS.emptyBitmap:u(-1,a.words,0,d.wordsInUse=h);return d},"JU.BS");c(b,"cardinalityN",function(a){for(var d=this.cardinality(),h=this.length();--h>=a;)this.get(h)&&d--;return d},"~N");g(b,"toJSON",function(){var a=128<this.wordsInUse?this.cardinality():32*this.wordsInUse,a=JU.SB.newN(6*a+2);a.appendC("[");var d=this.nextSetBit(0);
if(-1!=d){a.appendI(d);for(d=this.nextSetBit(d+1);0<=d;d=this.nextSetBit(d+1)){var h=this.nextClearBit(d);do a.append(", ").appendI(d);while(++d<h)}}a.appendC("]");return a.toString()});b.escape=c(b,"escape",function(a,d,h){if(null==a)return d+"{}"+h;var b=new JU.SB;b.append(d+"{");d=a.length();for(var c=-1,f=-2,j=-1;++j<=d;){var k=a.get(j);if(j==d||0<=c&&!k){0<=c&&f!=c&&b.append((f==c-1?" ":":")+c);if(j==d)break;c=-1}a.get(j)&&(0>c&&(b.append((-2==f?"":" ")+j),f=j),c=j)}b.append("}").appendC(h);
return b.toString()},"JU.BS,~S,~S");b.unescape=c(b,"unescape",function(a){var d,h;if(null==a||4>(h=(a=a.trim()).length)||a.equalsIgnoreCase("({null})")||"("!=(d=a.charAt(0))&&"["!=d||a.charAt(h-1)!=("("==d?")":"]")||"{"!=a.charAt(1)||a.indexOf("}")!=h-2)return null;for(var b=h-=2;2<=--b;)if(!JU.PT.isDigit(d=a.charAt(b))&&" "!=d&&"\t"!=d&&":"!=d)return null;for(var c=h;JU.PT.isDigit(a.charAt(--c)););if(++c==h)c=0;else try{c=Integer.parseInt(a.substring(c,h))}catch(f){if(D(f,"NumberFormatException"))return null;
throw f;}for(var j=JU.BS.newN(c),k=c=-1,l=-2,b=2;b<=h;b++)switch((d=a.charAt(b)).charCodeAt(0)){case 9:case 32:case 125:if(0>l)break;if(l<c)return null;c=l;0>k&&(k=l);j.setBits(k,l+1);k=-1;l=-2;break;case 58:k=c=l;l=-2;break;default:JU.PT.isDigit(d)&&(0>l&&(l=0),l=10*l+(d.charCodeAt(0)-48))}return 0<=k?null:j},"~S");b.emptyBitmap=E(0,0)});n("JU");z(["java.util.Hashtable"],"JU.CU",["JU.P3","$.PT"],function(){var b=G(JU,"CU",null);b.toRGBHexString=c(b,"toRGBHexString",function(a){var d=a.getRGB();if(0==
d)return"000000";a="00"+Integer.toHexString(d>>16&255);a=a.substring(a.length-2);var h="00"+Integer.toHexString(d>>8&255),h=h.substring(h.length-2),d="00"+Integer.toHexString(d&255),d=d.substring(d.length-2);return a+h+d},"javajs.api.GenericColor");b.toCSSString=c(b,"toCSSString",function(a){var d=a.getOpacity255();if(255==d)return"#"+JU.CU.toRGBHexString(a);a=a.getRGB();return"rgba("+(a>>16&255)+","+(a>>8&255)+","+(a&255)+","+d/255+")"},"javajs.api.GenericColor");b.getArgbFromString=c(b,"getArgbFromString",
function(a){var d=0;if(null==a||0==(d=a.length))return 0;a=a.toLowerCase();if("["==a.charAt(0)&&"]"==a.charAt(d-1)){var h;if(0<=a.indexOf(",")){h=JU.PT.split(a.substring(1,a.length-1),",");if(3!=h.length)return 0;a=JU.PT.parseFloat(h[0]);d=JU.PT.parseFloat(h[1]);h=JU.PT.parseFloat(h[2]);return JU.CU.colorTriadToFFRGB(a,d,h)}switch(d){case 9:h="x";break;case 10:h="0x";break;default:return 0}if(1!=a.indexOf(h))return 0;a="#"+a.substring(d-7,d-1);d=7}if(7==d&&"#"==a.charAt(0))try{return JU.PT.parseIntRadix(a.substring(1,
7),16)|4278190080}catch(b){if(D(b,Exception))return 0;throw b;}a=JU.CU.mapJavaScriptColors.get(a);return null==a?0:a.intValue()},"~S");b.colorTriadToFFRGB=c(b,"colorTriadToFFRGB",function(a,d,h){1>=a&&(1>=d&&1>=h)&&(0<a&&(a=256*a-1),0<d&&(d=256*d-1),0<h&&(h=256*h-1));return JU.CU.rgb(F(a),F(d),F(h))},"~N,~N,~N");b.rgb=c(b,"rgb",function(a,d,h){return 4278190080|a<<16|d<<8|h},"~N,~N,~N");b.colorPtFromString=c(b,"colorPtFromString",function(a){return JU.CU.colorPtFromInt(JU.CU.getArgbFromString(a),
null)},"~S");b.colorPtFromInt=c(b,"colorPtFromInt",function(a,d){null==d&&(d=new JU.P3);d.set(a>>16&255,a>>8&255,a&255);return d},"~N,JU.P3");b.colorPtToFFRGB=c(b,"colorPtToFFRGB",function(a){return JU.CU.colorTriadToFFRGB(a.x,a.y,a.z)},"JU.T3");b.toRGB3f=c(b,"toRGB3f",function(a,d){d[0]=(a>>16&255)/255;d[1]=(a>>8&255)/255;d[2]=(a&255)/255},"~N,~A");b.toFFGGGfromRGB=c(b,"toFFGGGfromRGB",function(a){a=v((2989*(a>>16&255)+5870*(a>>8&255)+1140*(a&255)+5E3)/1E4)&16777215;return JU.CU.rgb(a,a,a)},"~N");
b.rgbToHSL=c(b,"rgbToHSL",function(a,d){var h=a.x/255,b=a.y/255,c=a.z/255,f=Math.min(h,Math.min(b,c)),j=Math.max(h,Math.max(b,c)),k=j+f,f=j-f,h=60*(0==f?0:j==h?(b-c)/f+6:j==b?(c-h)/f+2:(h-b)/f+4)%360,b=f/(0==f?1:1>=k?k:2-k);return d?JU.P3.new3(Math.round(10*h)/10,Math.round(1E3*b)/10,Math.round(500*k)/10):JU.P3.new3(h,100*b,50*k)},"JU.P3,~B");b.hslToRGB=c(b,"hslToRGB",function(a){var d=Math.max(0,Math.min(360,a.x))/60,h=Math.max(0,Math.min(100,a.y))/100;a=Math.max(0,Math.min(100,a.z))/100;var h=a-
(0.5>a?a:1-a)*h,b=2*(a-h);a=JU.CU.toRGB(h,b,d+2);var c=JU.CU.toRGB(h,b,d),d=JU.CU.toRGB(h,b,d-2);return JU.P3.new3(Math.round(255*a),Math.round(255*c),Math.round(255*d))},"JU.P3");b.toRGB=c(b,"toRGB",function(a,d,h){return 1>(h+=0>h?6:6<h?-6:0)?a+d*h:3>h?a+d:4>h?a+d*(4-h):a},"~N,~N,~N");b.colorNames=u(-1,"contrast black pewhite pecyan pepurple pegreen peblue peviolet pebrown pepink peyellow pedarkgreen peorange pelightblue pedarkcyan pedarkgray aliceblue antiquewhite aqua aquamarine azure beige bisque blanchedalmond blue blueviolet brown burlywood cadetblue chartreuse chocolate coral cornflowerblue cornsilk crimson cyan darkblue darkcyan darkgoldenrod darkgray darkgreen darkkhaki darkmagenta darkolivegreen darkorange darkorchid darkred darksalmon darkseagreen darkslateblue darkslategray darkturquoise darkviolet deeppink deepskyblue dimgray dodgerblue firebrick floralwhite forestgreen fuchsia gainsboro ghostwhite gold goldenrod gray green greenyellow honeydew hotpink indianred indigo ivory khaki lavender lavenderblush lawngreen lemonchiffon lightblue lightcoral lightcyan lightgoldenrodyellow lightgreen lightgrey lightgray lightpink lightsalmon lightseagreen lightskyblue lightslategray lightsteelblue lightyellow lime limegreen linen magenta maroon mediumaquamarine mediumblue mediumorchid mediumpurple mediumseagreen mediumslateblue mediumspringgreen mediumturquoise mediumvioletred midnightblue mintcream mistyrose moccasin navajowhite navy oldlace olive olivedrab orange orangered orchid palegoldenrod palegreen paleturquoise palevioletred papayawhip peachpuff peru pink plum powderblue purple red rosybrown royalblue saddlebrown salmon sandybrown seagreen seashell sienna silver skyblue slateblue slategray snow springgreen steelblue tan teal thistle tomato turquoise violet wheat white whitesmoke yellow yellowgreen bluetint greenblue greentint grey gray pinktint redorange yellowtint".split(" "));
b.colorArgbs=E(-1,[4294892730,4278190080,4294967295,4278255615,4291830015,4278255360,4284506367,4294934720,4288946216,4294957272,4294967040,4278239232,4294946816,4289769727,4278231200,4284506208,4293982463,4294634455,4278255615,4286578644,4293984255,4294309340,4294960324,4294962125,4278190335,4287245282,4289014314,4292786311,4284456608,4286578432,4291979550,4294934352,4284782061,4294965468,4292613180,4278255615,4278190219,4278225803,4290283019,4289309097,4278215680,4290623339,4287299723,4283788079,
4294937600,4288230092,4287299584,4293498490,4287609999,4282924427,4281290575,4278243025,4287889619,4294907027,4278239231,4285098345,4280193279,4289864226,4294966E3,4280453922,4294902015,4292664540,4294506751,4294956800,4292519200,4286611584,4278222848,4289593135,4293984240,4294928820,4291648604,4283105410,4294967280,4293977740,4293322490,4294963445,4286381056,4294965965,4289583334,4293951616,4292935679,4294638290,4287688336,4292072403,4292072403,4294948545,4294942842,4280332970,4287090426,4286023833,
4289774814,4294967264,4278255360,4281519410,4294635750,4294902015,4286578688,4284927402,4278190285,4290401747,4287852763,4282168177,4286277870,4278254234,4282962380,4291237253,4279834992,4294311930,4294960353,4294960309,4294958765,4278190208,4294833638,4286611456,4285238819,4294944E3,4294919424,4292505814,4293847210,4288215960,4289720046,4292571283,4294963157,4294957753,4291659071,4294951115,4292714717,4289781990,4286578816,4294901760,4290547599,4282477025,4287317267,4294606962,4294222944,4281240407,
4294964718,4288696877,4290822336,4287090411,4285160141,4285563024,4294966010,4278255487,4282811060,4291998860,4278222976,4292394968,4294927175,4282441936,4293821166,4294303411,4294967295,4294309365,4294967040,4288335154,4289714175,4281240407,4288217011,4286611584,4286611584,4294945723,4294919424,4294375029]);b.mapJavaScriptColors=new java.util.Hashtable;for(b=JU.CU.colorNames.length;0<=--b;)JU.CU.mapJavaScriptColors.put(JU.CU.colorNames[b],Integer.$valueOf(JU.CU.colorArgbs[b]))});n("JU");z(null,"JU.DF",
["JU.PT","$.SB"],function(){var b=G(JU,"DF",null);b.setUseNumberLocalization=c(b,"setUseNumberLocalization",function(a){JU.DF.useNumberLocalization[0]=a?Boolean.TRUE:Boolean.FALSE},"~B");b.formatDecimalDbl=c(b,"formatDecimalDbl",function(a,d){return 2147483647==d||-Infinity==a||Infinity==a||Double.isNaN(a)?""+a:JU.DF.formatDecimal(a,d)},"~N,~N");b.formatDecimal=c(b,"formatDecimal",function(a,d){if(-Infinity==a||(Infinity==a||Double.isNaN(a))||2147483647==d)return""+a;var h=0>a;h&&(a=-a);var b;if(0>
d){d=-d;d>JU.DF.formattingStrings.length&&(d=JU.DF.formattingStrings.length);if(0==a)return JU.DF.formattingStrings[d-1]+"E+0";var c;1>Math.abs(a)?(b=100,c=1E-100*a):(b=-100,c=1E100*a);c=(""+c).toUpperCase();var f=c.indexOf("E");0>f?c=""+a:(b=JU.PT.parseInt(c.substring(f+(c.indexOf("E+")==f?2:1)))+b,c=JU.PT.parseFloat(c.substring(0,f)),c=JU.DF.formatDecimal(c,d-1),c.startsWith("10.")&&(c=JU.DF.formatDecimal(1,d-1),b++));return(h?"-":"")+c+"E"+(0<=b?"+":"")+b}d>=JU.DF.formattingStrings.length&&(d=
JU.DF.formattingStrings.length-1);c=(""+a).toUpperCase();b=c.indexOf(".");if(0>b)return(h?"-":"")+c+JU.DF.formattingStrings[d].substring(1);f=c.indexOf("E-");0<f&&(b=JU.PT.parseInt(c.substring(f+1)),c="0."+"0000000000000000000000000000000000000000".substring(0,-b-1)+c.substring(0,1)+c.substring(2,f),b=1);f=c.indexOf("E");0<f&&(b=JU.PT.parseInt(c.substring(f+1)),c=c.substring(0,1)+c.substring(2,f)+"0000000000000000000000000000000000000000",c=c.substring(0,b+1)+"."+c.substring(b+1),b=c.indexOf("."));
var f=c.length,j=d+b+1;if(j<f&&"5"<=c.charAt(j))return JU.DF.formatDecimal((h?-1:1)*(a+JU.DF.formatAdds[d]),d);var k=c.substring(0,0==d?b:++b),j=JU.SB.newS(k);h&&(k.equals("0.")&&d+2<=f&&c.substring(2,2+d).equals("0000000000000000000000000000000000000000".substring(0,d)))&&(h=!1);for(k=0;k<d;k++,b++)b<f?j.appendC(c.charAt(b)):j.appendC("0");c=(h?"-":"")+j;return Boolean.TRUE.equals(JU.DF.useNumberLocalization[0])?c:c.$replace(",",".")},"~N,~N");b.formatDecimalTrimmed=c(b,"formatDecimalTrimmed",function(a,
d){for(var h=JU.DF.formatDecimalDbl(a,d),b=h.length-1;0<=b&&"0"==h.charAt(b);)b--;return h.substring(0,b+1)},"~N,~N");b.formatDecimalTrimmed0=c(b,"formatDecimalTrimmed0",function(a,d){for(var h=JU.DF.formatDecimalDbl(a,d),b=h.length-1,c=h.indexOf(".")+1;b>c&&"0"==h.charAt(b);)b--;return h.substring(0,b+1)},"~N,~N");b.formattingStrings=u(-1,"0 0.0 0.00 0.000 0.0000 0.00000 0.000000 0.0000000 0.00000000 0.000000000 0.0000000000 0.00000000000 0.000000000000".split(" "));b.formatAdds=R(-1,[0.5,0.05,0.005,
5E-4,5E-5,5E-6,5E-7,5E-8,5E-9,5E-10,5E-11,5E-12,5E-13]);b.useNumberLocalization=u(-1,[Boolean.TRUE])});n("JU");z(["java.lang.Enum"],"JU.Encoding",null,function(){var b=G(JU,"Encoding",Enum);B(b,"NONE",0,[]);B(b,"UTF8",1,[]);B(b,"UTF_16BE",2,[]);B(b,"UTF_16LE",3,[]);B(b,"UTF_32BE",4,[]);B(b,"UTF_32LE",5,[])});n("JU");z(["java.util.ArrayList"],"JU.Lst",null,function(){var b=G(JU,"Lst",java.util.ArrayList);c(b,"addLast",function(a){return this.add1(a)},"~O");g(b,"add",function(a,d){return this.add2(a,
d)},"~N,~O");c(b,"removeItemAt",function(a){return this._removeItemAt(a)},"~N");c(b,"removeObj",function(a){return this._removeObject(a)},"~O")});n("JU");var P=w(function(){this.m22=this.m21=this.m20=this.m12=this.m11=this.m10=this.m02=this.m01=this.m00=0;q(this,arguments)},JU,"M34",null);c(P,"setAA33",function(b){var a=b.x,d=b.y,h=b.z;b=b.angle;var r=Math.sqrt(a*a+d*d+h*h),r=1/r,a=a*r,d=d*r,h=h*r,c=Math.cos(b);b=Math.sin(b);r=1-c;this.m00=c+a*a*r;this.m11=c+d*d*r;this.m22=c+h*h*r;var c=a*d*r,f=h*
b;this.m01=c-f;this.m10=c+f;c=a*h*r;f=d*b;this.m02=c+f;this.m20=c-f;c=d*h*r;f=a*b;this.m12=c-f;this.m21=c+f},"JU.A4");c(P,"rotate",function(b){this.rotate2(b,b)},"JU.T3");c(P,"rotate2",function(b,a){a.set(this.m00*b.x+this.m01*b.y+this.m02*b.z,this.m10*b.x+this.m11*b.y+this.m12*b.z,this.m20*b.x+this.m21*b.y+this.m22*b.z)},"JU.T3,JU.T3");c(P,"setM33",function(b){this.m00=b.m00;this.m01=b.m01;this.m02=b.m02;this.m10=b.m10;this.m11=b.m11;this.m12=b.m12;this.m20=b.m20;this.m21=b.m21;this.m22=b.m22},"JU.M34");
c(P,"clear33",function(){this.m00=this.m01=this.m02=this.m10=this.m11=this.m12=this.m20=this.m21=this.m22=0});c(P,"set33",function(b,a,d){switch(b){case 0:switch(a){case 0:this.m00=d;return;case 1:this.m01=d;return;case 2:this.m02=d;return}break;case 1:switch(a){case 0:this.m10=d;return;case 1:this.m11=d;return;case 2:this.m12=d;return}break;case 2:switch(a){case 0:this.m20=d;return;case 1:this.m21=d;return;case 2:this.m22=d;return}}this.err()},"~N,~N,~N");c(P,"get33",function(b,a){switch(b){case 0:switch(a){case 0:return this.m00;
case 1:return this.m01;case 2:return this.m02}break;case 1:switch(a){case 0:return this.m10;case 1:return this.m11;case 2:return this.m12}break;case 2:switch(a){case 0:return this.m20;case 1:return this.m21;case 2:return this.m22}}this.err();return 0},"~N,~N");c(P,"setRow33",function(b,a){switch(b){case 0:this.m00=a[0];this.m01=a[1];this.m02=a[2];break;case 1:this.m10=a[0];this.m11=a[1];this.m12=a[2];break;case 2:this.m20=a[0];this.m21=a[1];this.m22=a[2];break;default:this.err()}},"~N,~A");c(P,"getRow33",
function(b,a){switch(b){case 0:a[0]=this.m00;a[1]=this.m01;a[2]=this.m02;return;case 1:a[0]=this.m10;a[1]=this.m11;a[2]=this.m12;return;case 2:a[0]=this.m20;a[1]=this.m21;a[2]=this.m22;return}this.err()},"~N,~A");c(P,"setColumn33",function(b,a){switch(b){case 0:this.m00=a[0];this.m10=a[1];this.m20=a[2];break;case 1:this.m01=a[0];this.m11=a[1];this.m21=a[2];break;case 2:this.m02=a[0];this.m12=a[1];this.m22=a[2];break;default:this.err()}},"~N,~A");c(P,"getColumn33",function(b,a){switch(b){case 0:a[0]=
this.m00;a[1]=this.m10;a[2]=this.m20;break;case 1:a[0]=this.m01;a[1]=this.m11;a[2]=this.m21;break;case 2:a[0]=this.m02;a[1]=this.m12;a[2]=this.m22;break;default:this.err()}},"~N,~A");c(P,"add33",function(b){this.m00+=b.m00;this.m01+=b.m01;this.m02+=b.m02;this.m10+=b.m10;this.m11+=b.m11;this.m12+=b.m12;this.m20+=b.m20;this.m21+=b.m21;this.m22+=b.m22},"JU.M34");c(P,"sub33",function(b){this.m00-=b.m00;this.m01-=b.m01;this.m02-=b.m02;this.m10-=b.m10;this.m11-=b.m11;this.m12-=b.m12;this.m20-=b.m20;this.m21-=
b.m21;this.m22-=b.m22},"JU.M34");c(P,"mul33",function(b){this.m00*=b;this.m01*=b;this.m02*=b;this.m10*=b;this.m11*=b;this.m12*=b;this.m20*=b;this.m21*=b;this.m22*=b},"~N");c(P,"transpose33",function(){var b=this.m01;this.m01=this.m10;this.m10=b;b=this.m02;this.m02=this.m20;this.m20=b;b=this.m12;this.m12=this.m21;this.m21=b});c(P,"setXRot",function(b){var a=Math.cos(b);b=Math.sin(b);this.m00=1;this.m10=this.m02=this.m01=0;this.m11=a;this.m12=-b;this.m20=0;this.m21=b;this.m22=a},"~N");c(P,"setYRot",
function(b){var a=Math.cos(b);b=Math.sin(b);this.m00=a;this.m01=0;this.m02=b;this.m10=0;this.m11=1;this.m12=0;this.m20=-b;this.m21=0;this.m22=a},"~N");c(P,"setZRot",function(b){var a=Math.cos(b);b=Math.sin(b);this.m00=a;this.m01=-b;this.m02=0;this.m10=b;this.m11=a;this.m21=this.m20=this.m12=0;this.m22=1},"~N");c(P,"determinant3",function(){return this.m00*(this.m11*this.m22-this.m21*this.m12)-this.m01*(this.m10*this.m22-this.m20*this.m12)+this.m02*(this.m10*this.m21-this.m20*this.m11)});c(P,"err",
function(){throw new ArrayIndexOutOfBoundsException("matrix column/row out of bounds");});n("JU");z(["JU.M34"],"JU.M3",["JU.T3"],function(){var b=G(JU,"M3",JU.M34,java.io.Serializable);b.newA9=c(b,"newA9",function(a){var d=new JU.M3;d.setA(a);return d},"~A");b.newM3=c(b,"newM3",function(a){var d=new JU.M3;if(null==a)return d.setScale(1),d;d.m00=a.m00;d.m01=a.m01;d.m02=a.m02;d.m10=a.m10;d.m11=a.m11;d.m12=a.m12;d.m20=a.m20;d.m21=a.m21;d.m22=a.m22;return d},"JU.M3");c(b,"setScale",function(a){this.clear33();
this.m00=this.m11=this.m22=a},"~N");c(b,"setM3",function(a){this.setM33(a)},"JU.M34");c(b,"setA",function(a){this.m00=a[0];this.m01=a[1];this.m02=a[2];this.m10=a[3];this.m11=a[4];this.m12=a[5];this.m20=a[6];this.m21=a[7];this.m22=a[8]},"~A");c(b,"setElement",function(a,d,h){this.set33(a,d,h)},"~N,~N,~N");c(b,"getElement",function(a,d){return this.get33(a,d)},"~N,~N");c(b,"setRow",function(a,d,h,b){switch(a){case 0:this.m00=d;this.m01=h;this.m02=b;break;case 1:this.m10=d;this.m11=h;this.m12=b;break;
case 2:this.m20=d;this.m21=h;this.m22=b;break;default:this.err()}},"~N,~N,~N,~N");c(b,"setRowV",function(a,d){switch(a){case 0:this.m00=d.x;this.m01=d.y;this.m02=d.z;break;case 1:this.m10=d.x;this.m11=d.y;this.m12=d.z;break;case 2:this.m20=d.x;this.m21=d.y;this.m22=d.z;break;default:this.err()}},"~N,JU.T3");c(b,"setRowA",function(a,d){this.setRow33(a,d)},"~N,~A");g(b,"getRow",function(a,d){this.getRow33(a,d)},"~N,~A");c(b,"setColumn3",function(a,d,h,b){switch(a){case 0:this.m00=d;this.m10=h;this.m20=
b;break;case 1:this.m01=d;this.m11=h;this.m21=b;break;case 2:this.m02=d;this.m12=h;this.m22=b;break;default:this.err()}},"~N,~N,~N,~N");c(b,"setColumnV",function(a,d){switch(a){case 0:this.m00=d.x;this.m10=d.y;this.m20=d.z;break;case 1:this.m01=d.x;this.m11=d.y;this.m21=d.z;break;case 2:this.m02=d.x;this.m12=d.y;this.m22=d.z;break;default:this.err()}},"~N,JU.T3");c(b,"getColumnV",function(a,d){switch(a){case 0:d.x=this.m00;d.y=this.m10;d.z=this.m20;break;case 1:d.x=this.m01;d.y=this.m11;d.z=this.m21;
break;case 2:d.x=this.m02;d.y=this.m12;d.z=this.m22;break;default:this.err()}},"~N,JU.T3");c(b,"setColumnA",function(a,d){this.setColumn33(a,d)},"~N,~A");c(b,"getColumn",function(a,d){this.getColumn33(a,d)},"~N,~A");c(b,"add",function(a){this.add33(a)},"JU.M3");c(b,"sub",function(a){this.sub33(a)},"JU.M3");c(b,"transpose",function(){this.transpose33()});c(b,"transposeM",function(a){this.setM33(a);this.transpose33()},"JU.M3");c(b,"invertM",function(a){this.setM33(a);this.invert()},"JU.M3");c(b,"invert",
function(){var a=this.determinant3();0!=a&&(a=1/a,this.set9(this.m11*this.m22-this.m12*this.m21,this.m02*this.m21-this.m01*this.m22,this.m01*this.m12-this.m02*this.m11,this.m12*this.m20-this.m10*this.m22,this.m00*this.m22-this.m02*this.m20,this.m02*this.m10-this.m00*this.m12,this.m10*this.m21-this.m11*this.m20,this.m01*this.m20-this.m00*this.m21,this.m00*this.m11-this.m01*this.m10),this.scale(a))});c(b,"setAsXRotation",function(a){this.setXRot(a);return this},"~N");c(b,"setAsYRotation",function(a){this.setYRot(a);
return this},"~N");c(b,"setAsZRotation",function(a){this.setZRot(a);return this},"~N");c(b,"scale",function(a){this.mul33(a)},"~N");c(b,"mul",function(a){this.mul2(this,a)},"JU.M3");c(b,"mul2",function(a,d){this.set9(a.m00*d.m00+a.m01*d.m10+a.m02*d.m20,a.m00*d.m01+a.m01*d.m11+a.m02*d.m21,a.m00*d.m02+a.m01*d.m12+a.m02*d.m22,a.m10*d.m00+a.m11*d.m10+a.m12*d.m20,a.m10*d.m01+a.m11*d.m11+a.m12*d.m21,a.m10*d.m02+a.m11*d.m12+a.m12*d.m22,a.m20*d.m00+a.m21*d.m10+a.m22*d.m20,a.m20*d.m01+a.m21*d.m11+a.m22*d.m21,
a.m20*d.m02+a.m21*d.m12+a.m22*d.m22)},"JU.M3,JU.M3");g(b,"equals",function(a){return!C(a,"JU.M3")?!1:this.m00==a.m00&&this.m01==a.m01&&this.m02==a.m02&&this.m10==a.m10&&this.m11==a.m11&&this.m12==a.m12&&this.m20==a.m20&&this.m21==a.m21&&this.m22==a.m22},"~O");g(b,"hashCode",function(){return JU.T3.floatToIntBits(this.m00)^JU.T3.floatToIntBits(this.m01)^JU.T3.floatToIntBits(this.m02)^JU.T3.floatToIntBits(this.m10)^JU.T3.floatToIntBits(this.m11)^JU.T3.floatToIntBits(this.m12)^JU.T3.floatToIntBits(this.m20)^
JU.T3.floatToIntBits(this.m21)^JU.T3.floatToIntBits(this.m22)});c(b,"setZero",function(){this.clear33()});c(b,"set9",function(a,d,h,b,c,f,j,k,l){this.m00=a;this.m01=d;this.m02=h;this.m10=b;this.m11=c;this.m12=f;this.m20=j;this.m21=k;this.m22=l},"~N,~N,~N,~N,~N,~N,~N,~N,~N");g(b,"toString",function(){return"[["+this.m00+"\t"+this.m01+"\t"+this.m02+"]\n  ["+this.m10+"\t"+this.m11+"\t"+this.m12+"]\n  ["+this.m20+"\t"+this.m21+"\t"+this.m22+"]]"});c(b,"setAA",function(a){this.setAA33(a);return this},
"JU.A4");c(b,"setAsBallRotation",function(a,d,h){var b=Math.sqrt(d*d+h*h),c=b*a;if(0==c)return this.setScale(1),!1;a=Math.cos(c);c=Math.sin(c);h=-h/b;d/=b;b=a-1;this.m00=1+b*h*h;this.m01=this.m10=b*h*d;this.m20=-(this.m02=c*h);this.m11=1+b*d*d;this.m21=-(this.m12=c*d);this.m22=a;return!0},"~N,~N,~N");c(b,"isRotation",function(){return 0.001>Math.abs(this.determinant3()-1)})});n("JU");z(["JU.M34"],"JU.M4",["JU.T3"],function(){var b=w(function(){this.m33=this.m32=this.m31=this.m30=this.m23=this.m13=
this.m03=0;q(this,arguments)},JU,"M4",JU.M34);b.newA16=c(b,"newA16",function(a){var d=new JU.M4;d.m00=a[0];d.m01=a[1];d.m02=a[2];d.m03=a[3];d.m10=a[4];d.m11=a[5];d.m12=a[6];d.m13=a[7];d.m20=a[8];d.m21=a[9];d.m22=a[10];d.m23=a[11];d.m30=a[12];d.m31=a[13];d.m32=a[14];d.m33=a[15];return d},"~A");b.newM4=c(b,"newM4",function(a){var d=new JU.M4;if(null==a)return d.setIdentity(),d;d.setToM3(a);d.m03=a.m03;d.m13=a.m13;d.m23=a.m23;d.m30=a.m30;d.m31=a.m31;d.m32=a.m32;d.m33=a.m33;return d},"JU.M4");b.newMV=
c(b,"newMV",function(a,d){var h=new JU.M4;h.setMV(a,d);return h},"JU.M3,JU.T3");c(b,"setZero",function(){this.clear33();this.m03=this.m13=this.m23=this.m30=this.m31=this.m32=this.m33=0});c(b,"setIdentity",function(){this.setZero();this.m00=this.m11=this.m22=this.m33=1});c(b,"setM4",function(a){this.setM33(a);this.m03=a.m03;this.m13=a.m13;this.m23=a.m23;this.m30=a.m30;this.m31=a.m31;this.m32=a.m32;this.m33=a.m33;return this},"JU.M4");c(b,"setMV",function(a,d){this.setM33(a);this.setTranslation(d);
this.m33=1},"JU.M3,JU.T3");c(b,"setToM3",function(a){this.setM33(a);this.m03=this.m13=this.m23=this.m30=this.m31=this.m32=0;this.m33=1},"JU.M34");c(b,"setToAA",function(a){this.setIdentity();this.setAA33(a)},"JU.A4");c(b,"setA",function(a){this.m00=a[0];this.m01=a[1];this.m02=a[2];this.m03=a[3];this.m10=a[4];this.m11=a[5];this.m12=a[6];this.m13=a[7];this.m20=a[8];this.m21=a[9];this.m22=a[10];this.m23=a[11];this.m30=a[12];this.m31=a[13];this.m32=a[14];this.m33=a[15]},"~A");c(b,"setTranslation",function(a){this.m03=
a.x;this.m13=a.y;this.m23=a.z},"JU.T3");c(b,"setElement",function(a,d,h){if(3>a&&3>d)this.set33(a,d,h);else{(3<a||3<d)&&this.err();switch(a){case 0:this.m03=h;return;case 1:this.m13=h;return;case 2:this.m23=h;return}switch(d){case 0:this.m30=h;break;case 1:this.m31=h;break;case 2:this.m32=h;break;case 3:this.m33=h}}},"~N,~N,~N");c(b,"getElement",function(a,d){if(3>a&&3>d)return this.get33(a,d);if(3<a||3<d)return this.err(),0;switch(a){case 0:return this.m03;case 1:return this.m13;case 2:return this.m23;
default:switch(d){case 0:return this.m30;case 1:return this.m31;case 2:return this.m32;default:return this.m33}}},"~N,~N");c(b,"getTranslation",function(a){a.x=this.m03;a.y=this.m13;a.z=this.m23},"JU.T3");c(b,"getRotationScale",function(a){a.m00=this.m00;a.m01=this.m01;a.m02=this.m02;a.m10=this.m10;a.m11=this.m11;a.m12=this.m12;a.m20=this.m20;a.m21=this.m21;a.m22=this.m22},"JU.M3");c(b,"setRotationScale",function(a){this.m00=a.m00;this.m01=a.m01;this.m02=a.m02;this.m10=a.m10;this.m11=a.m11;this.m12=
a.m12;this.m20=a.m20;this.m21=a.m21;this.m22=a.m22},"JU.M3");c(b,"setRowA",function(a,d){3>a&&this.setRow33(a,d);switch(a){case 0:this.m03=d[3];return;case 1:this.m13=d[3];return;case 2:this.m23=d[3];return;case 3:this.m30=d[0];this.m31=d[1];this.m32=d[2];this.m33=d[3];return}this.err()},"~N,~A");g(b,"getRow",function(a,d){3>a&&this.getRow33(a,d);switch(a){case 0:d[3]=this.m03;return;case 1:d[3]=this.m13;return;case 2:d[3]=this.m23;return;case 3:d[0]=this.m30;d[1]=this.m31;d[2]=this.m32;d[3]=this.m33;
return}this.err()},"~N,~A");c(b,"setColumn4",function(a,d,h,b,c){0==a?(this.m00=d,this.m10=h,this.m20=b,this.m30=c):1==a?(this.m01=d,this.m11=h,this.m21=b,this.m31=c):2==a?(this.m02=d,this.m12=h,this.m22=b,this.m32=c):3==a?(this.m03=d,this.m13=h,this.m23=b,this.m33=c):this.err()},"~N,~N,~N,~N,~N");c(b,"setColumnA",function(a,d){3>a&&this.setColumn33(a,d);switch(a){case 0:this.m30=d[3];break;case 1:this.m31=d[3];break;case 2:this.m32=d[3];break;case 3:this.m03=d[0];this.m13=d[1];this.m23=d[2];this.m33=
d[3];break;default:this.err()}},"~N,~A");c(b,"getColumn",function(a,d){3>a&&this.getColumn33(a,d);switch(a){case 0:d[3]=this.m30;break;case 1:d[3]=this.m31;break;case 2:d[3]=this.m32;break;case 3:d[0]=this.m03;d[1]=this.m13;d[2]=this.m23;d[3]=this.m33;break;default:this.err()}},"~N,~A");c(b,"sub",function(a){this.sub33(a);this.m03-=a.m03;this.m13-=a.m13;this.m23-=a.m23;this.m30-=a.m30;this.m31-=a.m31;this.m32-=a.m32;this.m33-=a.m33},"JU.M4");c(b,"add",function(a){this.m03+=a.x;this.m13+=a.y;this.m23+=
a.z},"JU.T3");c(b,"transpose",function(){this.transpose33();var a=this.m03;this.m03=this.m30;this.m30=a;a=this.m13;this.m13=this.m31;this.m31=a;a=this.m23;this.m23=this.m32;this.m32=a});c(b,"invert",function(){var a=this.determinant4();if(0==a)return this;a=1/a;this.set(this.m11*(this.m22*this.m33-this.m23*this.m32)+this.m12*(this.m23*this.m31-this.m21*this.m33)+this.m13*(this.m21*this.m32-this.m22*this.m31),this.m21*(this.m02*this.m33-this.m03*this.m32)+this.m22*(this.m03*this.m31-this.m01*this.m33)+
this.m23*(this.m01*this.m32-this.m02*this.m31),this.m31*(this.m02*this.m13-this.m03*this.m12)+this.m32*(this.m03*this.m11-this.m01*this.m13)+this.m33*(this.m01*this.m12-this.m02*this.m11),this.m01*(this.m13*this.m22-this.m12*this.m23)+this.m02*(this.m11*this.m23-this.m13*this.m21)+this.m03*(this.m12*this.m21-this.m11*this.m22),this.m12*(this.m20*this.m33-this.m23*this.m30)+this.m13*(this.m22*this.m30-this.m20*this.m32)+this.m10*(this.m23*this.m32-this.m22*this.m33),this.m22*(this.m00*this.m33-this.m03*
this.m30)+this.m23*(this.m02*this.m30-this.m00*this.m32)+this.m20*(this.m03*this.m32-this.m02*this.m33),this.m32*(this.m00*this.m13-this.m03*this.m10)+this.m33*(this.m02*this.m10-this.m00*this.m12)+this.m30*(this.m03*this.m12-this.m02*this.m13),this.m02*(this.m13*this.m20-this.m10*this.m23)+this.m03*(this.m10*this.m22-this.m12*this.m20)+this.m00*(this.m12*this.m23-this.m13*this.m22),this.m13*(this.m20*this.m31-this.m21*this.m30)+this.m10*(this.m21*this.m33-this.m23*this.m31)+this.m11*(this.m23*this.m30-
this.m20*this.m33),this.m23*(this.m00*this.m31-this.m01*this.m30)+this.m20*(this.m01*this.m33-this.m03*this.m31)+this.m21*(this.m03*this.m30-this.m00*this.m33),this.m33*(this.m00*this.m11-this.m01*this.m10)+this.m30*(this.m01*this.m13-this.m03*this.m11)+this.m31*(this.m03*this.m10-this.m00*this.m13),this.m03*(this.m11*this.m20-this.m10*this.m21)+this.m00*(this.m13*this.m21-this.m11*this.m23)+this.m01*(this.m10*this.m23-this.m13*this.m20),this.m10*(this.m22*this.m31-this.m21*this.m32)+this.m11*(this.m20*
this.m32-this.m22*this.m30)+this.m12*(this.m21*this.m30-this.m20*this.m31),this.m20*(this.m02*this.m31-this.m01*this.m32)+this.m21*(this.m00*this.m32-this.m02*this.m30)+this.m22*(this.m01*this.m30-this.m00*this.m31),this.m30*(this.m02*this.m11-this.m01*this.m12)+this.m31*(this.m00*this.m12-this.m02*this.m10)+this.m32*(this.m01*this.m10-this.m00*this.m11),this.m00*(this.m11*this.m22-this.m12*this.m21)+this.m01*(this.m12*this.m20-this.m10*this.m22)+this.m02*(this.m10*this.m21-this.m11*this.m20));this.scale(a);
return this});c(b,"set",function(a,d,h,b,c,f,j,k,l,g,m,p,y,A,H,M){this.m00=a;this.m01=d;this.m02=h;this.m03=b;this.m10=c;this.m11=f;this.m12=j;this.m13=k;this.m20=l;this.m21=g;this.m22=m;this.m23=p;this.m30=y;this.m31=A;this.m32=H;this.m33=M},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");c(b,"determinant4",function(){return(this.m00*this.m11-this.m01*this.m10)*(this.m22*this.m33-this.m23*this.m32)-(this.m00*this.m12-this.m02*this.m10)*(this.m21*this.m33-this.m23*this.m31)+(this.m00*this.m13-
this.m03*this.m10)*(this.m21*this.m32-this.m22*this.m31)+(this.m01*this.m12-this.m02*this.m11)*(this.m20*this.m33-this.m23*this.m30)-(this.m01*this.m13-this.m03*this.m11)*(this.m20*this.m32-this.m22*this.m30)+(this.m02*this.m13-this.m03*this.m12)*(this.m20*this.m31-this.m21*this.m30)});c(b,"scale",function(a){this.mul33(a);this.m03*=a;this.m13*=a;this.m23*=a;this.m30*=a;this.m31*=a;this.m32*=a;this.m33*=a},"~N");c(b,"mul",function(a){this.mul2(this,a)},"JU.M4");c(b,"mul2",function(a,d){this.set(a.m00*
d.m00+a.m01*d.m10+a.m02*d.m20+a.m03*d.m30,a.m00*d.m01+a.m01*d.m11+a.m02*d.m21+a.m03*d.m31,a.m00*d.m02+a.m01*d.m12+a.m02*d.m22+a.m03*d.m32,a.m00*d.m03+a.m01*d.m13+a.m02*d.m23+a.m03*d.m33,a.m10*d.m00+a.m11*d.m10+a.m12*d.m20+a.m13*d.m30,a.m10*d.m01+a.m11*d.m11+a.m12*d.m21+a.m13*d.m31,a.m10*d.m02+a.m11*d.m12+a.m12*d.m22+a.m13*d.m32,a.m10*d.m03+a.m11*d.m13+a.m12*d.m23+a.m13*d.m33,a.m20*d.m00+a.m21*d.m10+a.m22*d.m20+a.m23*d.m30,a.m20*d.m01+a.m21*d.m11+a.m22*d.m21+a.m23*d.m31,a.m20*d.m02+a.m21*d.m12+a.m22*
d.m22+a.m23*d.m32,a.m20*d.m03+a.m21*d.m13+a.m22*d.m23+a.m23*d.m33,a.m30*d.m00+a.m31*d.m10+a.m32*d.m20+a.m33*d.m30,a.m30*d.m01+a.m31*d.m11+a.m32*d.m21+a.m33*d.m31,a.m30*d.m02+a.m31*d.m12+a.m32*d.m22+a.m33*d.m32,a.m30*d.m03+a.m31*d.m13+a.m32*d.m23+a.m33*d.m33)},"JU.M4,JU.M4");c(b,"transform",function(a){this.transform2(a,a)},"JU.T4");c(b,"transform2",function(a,d){d.set4(this.m00*a.x+this.m01*a.y+this.m02*a.z+this.m03*a.w,this.m10*a.x+this.m11*a.y+this.m12*a.z+this.m13*a.w,this.m20*a.x+this.m21*a.y+
this.m22*a.z+this.m23*a.w,this.m30*a.x+this.m31*a.y+this.m32*a.z+this.m33*a.w)},"JU.T4,JU.T4");c(b,"rotTrans",function(a){this.rotTrans2(a,a)},"JU.T3");c(b,"rotTrans2",function(a,d){d.set(this.m00*a.x+this.m01*a.y+this.m02*a.z+this.m03,this.m10*a.x+this.m11*a.y+this.m12*a.z+this.m13,this.m20*a.x+this.m21*a.y+this.m22*a.z+this.m23);return d},"JU.T3,JU.T3");c(b,"setAsXYRotation",function(a){this.setIdentity();var d=Math.cos(a);a=Math.sin(a);this.m22=d;this.m23=-a;this.m32=a;this.m33=d;return this},
"~N");c(b,"setAsYZRotation",function(a){this.setIdentity();var d=Math.cos(a);a=Math.sin(a);this.m00=d;this.m03=-a;this.m30=a;this.m33=d;return this},"~N");c(b,"setAsXZRotation",function(a){this.setIdentity();var d=Math.cos(a);a=Math.sin(a);this.m11=d;this.m13=-a;this.m31=a;this.m33=d;return this},"~N");g(b,"equals",function(a){return!C(a,"JU.M4")?!1:this.m00==a.m00&&this.m01==a.m01&&this.m02==a.m02&&this.m03==a.m03&&this.m10==a.m10&&this.m11==a.m11&&this.m12==a.m12&&this.m13==a.m13&&this.m20==a.m20&&
this.m21==a.m21&&this.m22==a.m22&&this.m23==a.m23&&this.m30==a.m30&&this.m31==a.m31&&this.m32==a.m32&&this.m33==a.m33},"~O");g(b,"hashCode",function(){return JU.T3.floatToIntBits(this.m00)^JU.T3.floatToIntBits(this.m01)^JU.T3.floatToIntBits(this.m02)^JU.T3.floatToIntBits(this.m03)^JU.T3.floatToIntBits(this.m10)^JU.T3.floatToIntBits(this.m11)^JU.T3.floatToIntBits(this.m12)^JU.T3.floatToIntBits(this.m13)^JU.T3.floatToIntBits(this.m20)^JU.T3.floatToIntBits(this.m21)^JU.T3.floatToIntBits(this.m22)^JU.T3.floatToIntBits(this.m23)^
JU.T3.floatToIntBits(this.m30)^JU.T3.floatToIntBits(this.m31)^JU.T3.floatToIntBits(this.m32)^JU.T3.floatToIntBits(this.m33)});g(b,"toString",function(){return"[["+this.m00+"\t"+this.m01+"\t"+this.m02+"\t"+this.m03+"]\n  ["+this.m10+"\t"+this.m11+"\t"+this.m12+"\t"+this.m13+"]\n  ["+this.m20+"\t"+this.m21+"\t"+this.m22+"\t"+this.m23+"]\n  ["+this.m30+"\t"+this.m31+"\t"+this.m32+"\t"+this.m33+"]]"});c(b,"round",function(a){this.m00=this.rnd(this.m00,a);this.m01=this.rnd(this.m01,a);this.m02=this.rnd(this.m02,
a);this.m03=this.rnd(this.m03,a);this.m10=this.rnd(this.m10,a);this.m11=this.rnd(this.m11,a);this.m12=this.rnd(this.m12,a);this.m13=this.rnd(this.m13,a);this.m20=this.rnd(this.m20,a);this.m21=this.rnd(this.m21,a);this.m22=this.rnd(this.m22,a);this.m23=this.rnd(this.m23,a);this.m30=this.rnd(this.m30,a);this.m31=this.rnd(this.m31,a);this.m32=this.rnd(this.m32,a);this.m33=this.rnd(this.m33,a);return this},"~N");c(b,"rnd",function(a,d){return Math.abs(a)<d?0:a},"~N,~N")});n("JU");z(["java.io.OutputStream",
"javajs.api.GenericOutputChannel"],"JU.OC",["java.io.BufferedWriter","$.ByteArrayOutputStream","$.OutputStreamWriter","JU.Base64","$.SB"],function(){var b=w(function(){this.bw=this.fileName=this.bytePoster=null;this.isLocalFile=!1;this.byteCount=0;this.closed=this.isCanceled=!1;this.type=this.sb=this.os=null;this.$isBase64=!1;this.bytes=this.os0=null;this.bigEndian=!0;q(this,arguments)},JU,"OC",java.io.OutputStream,javajs.api.GenericOutputChannel);x(b,function(){I(this,JU.OC,[])});x(b,function(a){I(this,
JU.OC,[]);this.setParams(null,a,!1,null)},"~S");c(b,"setParams",function(a,d,h,b){this.bytePoster=a;if(this.$isBase64=";base64,".equals(d))d=null,this.os0=b,b=null;this.fileName=d;this.os=b;this.isLocalFile=null!=d&&!JU.OC.isRemote(d);h&&(!this.$isBase64&&null!=b)&&(this.bw=new java.io.BufferedWriter(new java.io.OutputStreamWriter(b)));return this},"javajs.api.BytePoster,~S,~B,java.io.OutputStream");g(b,"isBigEndian",function(){return this.bigEndian});c(b,"setBigEndian",function(a){this.bigEndian=
a},"~B");c(b,"setBytes",function(a){this.bytes=a;return this},"~A");c(b,"getFileName",function(){return this.fileName});c(b,"getName",function(){return null==this.fileName?null:this.fileName.substring(this.fileName.lastIndexOf("/")+1)});c(b,"getByteCount",function(){return this.byteCount});c(b,"setType",function(a){this.type=a},"~S");c(b,"getType",function(){return this.type});c(b,"append",function(a){try{if(null!=this.bw)this.bw.write(a);else if(null==this.os)null==this.sb&&(this.sb=new JU.SB),this.sb.append(a);
else{var d=a.getBytes();this.os.write(d,0,d.length);this.byteCount+=d.length;return this}}catch(h){if(!D(h,"java.io.IOException"))throw h;}this.byteCount+=a.length;return this},"~S");g(b,"reset",function(){this.sb=null;this.initOS()});c(b,"initOS",function(){if(null!=this.sb){var a=this.sb.toString();this.reset();this.append(a)}else{try{this.os=null,null==this.os&&(this.os=new java.io.ByteArrayOutputStream),null!=this.bw&&(this.bw.close(),this.bw=new java.io.BufferedWriter(new java.io.OutputStreamWriter(this.os)))}catch(d){if(D(d,
Exception))System.out.println(d.toString());else throw d;}this.byteCount=0}});g(b,"writeByteAsInt",function(a){null==this.os&&this.initOS();this.os.writeByteAsInt(a);this.byteCount++},"~N");g(b,"write",function(a,d,h){null==this.os&&this.initOS();0>h&&(h=a.length-d);try{this.os.write(a,d,h)}catch(b){if(!D(b,"java.io.IOException"))throw b;}this.byteCount+=h},"~A,~N,~N");g(b,"writeShort",function(a){this.isBigEndian()?(this.writeByteAsInt(a>>8),this.writeByteAsInt(a)):(this.writeByteAsInt(a),this.writeByteAsInt(a>>
8))},"~N");g(b,"writeLong",function(a){this.isBigEndian()?(this.writeInt(a>>32&4294967295),this.writeInt(a&4294967295)):(this.writeByteAsInt(a>>56),this.writeByteAsInt(a>>48),this.writeByteAsInt(a>>40),this.writeByteAsInt(a>>32),this.writeByteAsInt(a>>24),this.writeByteAsInt(a>>16),this.writeByteAsInt(a>>8),this.writeByteAsInt(a))},"~N");c(b,"cancel",function(){this.isCanceled=!0;this.closeChannel()});g(b,"closeChannel",function(){if(this.closed)return null;try{null!=this.bw?(this.bw.flush(),this.bw.close()):
null!=this.os&&(this.os.flush(),this.os.close()),null!=this.os0&&this.isCanceled&&(this.os0.flush(),this.os0.close())}catch(a){if(!D(a,Exception))throw a;}if(this.isCanceled)return this.closed=!0,null;if(null==this.fileName){if(this.$isBase64){var d=this.getBase64();null!=this.os0&&(this.os=this.os0,this.append(d));this.sb=new JU.SB;this.sb.append(d);this.$isBase64=!1;return this.closeChannel()}return null==this.sb?null:this.sb.toString()}this.closed=!0;if(!this.isLocalFile){d=this.postByteArray();
if(null==d||d.startsWith("java.net"))this.byteCount=-1;return d}var h=d=null,d=self.J2S||Jmol,h="function"==typeof this.fileName?this.fileName:null;if(null!=d){var b=null==this.sb?this.toByteArray():this.sb.toString();null==h?d.doAjax(this.fileName,null,b,null==this.sb):d.applyFunc(this.fileName,b)}return null});c(b,"isBase64",function(){return this.$isBase64});c(b,"getBase64",function(){return JU.Base64.getBase64(this.toByteArray()).toString()});c(b,"toByteArray",function(){return null!=this.bytes?
this.bytes:C(this.os,"java.io.ByteArrayOutputStream")?this.os.toByteArray():null});c(b,"close",function(){this.closeChannel()});g(b,"toString",function(){if(null!=this.bw)try{this.bw.flush()}catch(a){if(!D(a,"java.io.IOException"))throw a;}return null!=this.sb?this.closeChannel():this.byteCount+" bytes"});c(b,"postByteArray",function(){var a=null==this.sb?this.toByteArray():this.sb.toString().getBytes();return this.bytePoster.postByteArray(this.fileName,a)});b.isRemote=c(b,"isRemote",function(a){if(null==
a)return!1;a=JU.OC.urlTypeIndex(a);return 0<=a&&4>a},"~S");b.isLocal=c(b,"isLocal",function(a){return null!=a&&!JU.OC.isRemote(a)},"~S");b.urlTypeIndex=c(b,"urlTypeIndex",function(a){if(null==a)return-2;for(var d=0;d<JU.OC.urlPrefixes.length;++d)if(a.startsWith(JU.OC.urlPrefixes[d]))return d;return-1},"~S");g(b,"writeInt",function(a){this.bigEndian?(this.writeByteAsInt(a>>24),this.writeByteAsInt(a>>16),this.writeByteAsInt(a>>8),this.writeByteAsInt(a)):(this.writeByteAsInt(a),this.writeByteAsInt(a>>
8),this.writeByteAsInt(a>>16),this.writeByteAsInt(a>>24))},"~N");c(b,"writeFloat",function(a){this.writeInt(0==a?0:Float.floatToIntBits(a))},"~N");b.urlPrefixes=u(-1,"http: https: sftp: ftp: file: cache:".split(" "))});n("JU");z(["JU.T3"],"JU.P3",null,function(){var b=G(JU,"P3",JU.T3);b.newP=c(b,"newP",function(a){var d=new JU.P3;d.x=a.x;d.y=a.y;d.z=a.z;return d},"JU.T3");b.getUnlikely=c(b,"getUnlikely",function(){return null==JU.P3.unlikely?JU.P3.unlikely=JU.P3.new3(3.141592653589793,2.718281828459045,
8.539734222673566):JU.P3.unlikely});b.new3=c(b,"new3",function(a,d,h){var b=new JU.P3;b.x=a;b.y=d;b.z=h;return b},"~N,~N,~N");b.newA=c(b,"newA",function(a){return JU.P3.new3(a[0],a[1],a[2])},"~A");b.unlikely=null});n("JU");z(["JU.T3i"],"JU.P3i",null,function(){var b=G(JU,"P3i",JU.T3i);b.new3=c(b,"new3",function(a,d,h){var b=new JU.P3i;b.x=a;b.y=d;b.z=h;return b},"~N,~N,~N")});n("JU");z(["JU.T4"],"JU.P4",null,function(){var b=G(JU,"P4",JU.T4);b.new4=c(b,"new4",function(a,d,h,b){var c=new JU.P4;c.set4(a,
d,h,b);return c},"~N,~N,~N,~N");b.newPt=c(b,"newPt",function(a){var d=new JU.P4;d.set4(a.x,a.y,a.z,a.w);return d},"JU.P4");c(b,"distance4",function(a){var d=this.x-a.x,h=this.y-a.y,b=this.z-a.z;a=this.w-a.w;return Math.sqrt(d*d+h*h+b*b+a*a)},"JU.P4")});n("JU");z(null,"JU.PT",["java.util.Arrays","JU.AU","$.DF","$.SB"],function(){var b=G(JU,"PT",null);b.parseInt=c(b,"parseInt",function(a){return JU.PT.parseIntNext(a,E(-1,[0]))},"~S");b.parseIntNext=c(b,"parseIntNext",function(a,d){var h=a.length;return 0>
d[0]||d[0]>=h?-2147483648:JU.PT.parseIntChecked(a,h,d)},"~S,~A");b.parseIntChecked=c(b,"parseIntChecked",function(a,d,h){var b=!1,c=0,f=h[0];if(0>f)return-2147483648;for(var j;f<d&&JU.PT.isWhiteSpace(a,f);)++f;var k=!1;f<d&&45==a.charAt(f).charCodeAt(0)&&(k=!0,++f);for(;f<d&&48<=(j=a.charAt(f).charCodeAt(0))&&57>=j;)c=10*c+(j-48),b=!0,++f;b?k&&(c=-c):c=-2147483648;h[0]=f;return c},"~S,~N,~A");b.isWhiteSpace=c(b,"isWhiteSpace",function(a,d){var h;return 0<=d&&(" "==(h=a.charAt(d))||"\t"==h||"\n"==
h)},"~S,~N");b.parseFloatChecked=c(b,"parseFloatChecked",function(a,d,h,b){var c=!1,f=h[0];if(b&&a.indexOf("\n")!=a.lastIndexOf("\n"))return NaN;for(;f<d&&JU.PT.isWhiteSpace(a,f);)++f;var j=!1;f<d&&"-"==a.charAt(f)&&(++f,j=!0);for(var k=0,l=0,g=0;f<d&&48<=(k=a.charAt(f).charCodeAt(0))&&57>=k;)l=10*l+1*(k-48),++f,c=!0;var m=!1,p=0,y=0==l?-1:0;if(46==k)for(m=!0;++f<d&&48<=(k=a.charAt(f).charCodeAt(0))&&57>=k;){c=!0;if(0>y){if(48==k){y--;continue}y=-y}p<JU.PT.decimalScale.length&&(g=10*g+1*(k-48),p++)}c?
0<g?(c=g*JU.PT.decimalScale[p-1],c=1<y?y-2<JU.PT.decimalScale.length?c*JU.PT.decimalScale[y-2]:c*Math.pow(10,1-y):c+l):c=l:c=NaN;l=!1;if(f<d&&(69==k||101==k||68==k)){l=!0;if(++f>=d)return NaN;k=a.charAt(f).charCodeAt(0);if(43==k&&++f>=d)return NaN;h[0]=f;f=JU.PT.parseIntChecked(a,d,h);if(-2147483648==f)return NaN;0<f&&f<=JU.PT.tensScale.length?c*=JU.PT.tensScale[f-1]:0>f&&-f<=JU.PT.decimalScale.length?c*=JU.PT.decimalScale[-f-1]:0!=f&&(c*=Math.pow(10,f))}else h[0]=f;j&&(c=-c);Infinity==c&&(c=3.4028235E38);
return!b||(!l||m)&&JU.PT.checkTrailingText(a,h[0],d)?c:NaN},"~S,~N,~A,~B");b.checkTrailingText=c(b,"checkTrailingText",function(a,d,h){for(var b;d<h&&(JU.PT.isWhitespace(b=a.charAt(d))||";"==b);)++d;return d==h},"~S,~N,~N");b.parseFloatArray=c(b,"parseFloatArray",function(a){return JU.PT.parseFloatArrayNext(a,E(1,0),null,null,null)},"~S");b.parseFloatArrayInfested=c(b,"parseFloatArrayInfested",function(a,d){for(var h=d.length,b=a.length,c=0,f=0,j=0;0<=j&&j<h&&c<b;j++){for(var k;Float.isNaN(k=JU.PT.parseFloat(a[c++]))&&
c<b;);Float.isNaN(k)||(d[f=j]=k);if(c==b)break}return f+1},"~A,~A");b.parseFloatArrayNext=c(b,"parseFloatArrayNext",function(a,d,h,b,c){var f=0,j=d[0];0<=j&&(null!=b&&(f=a.indexOf(b,j),0<=f&&(d[0]=f+b.length)),a=a.substring(d[0]),j=null==c?-1:a.indexOf(c),0>j?j=a.length:a=a.substring(0,j),d[0]+=j+1,a=JU.PT.getTokens(a),null==h&&(h=L(a.length,0)),f=JU.PT.parseFloatArrayInfested(a,h));if(null==h)return L(0,0);for(a=f;a<h.length;a++)h[a]=NaN;return h},"~S,~A,~A,~S,~S");b.parseFloatRange=c(b,"parseFloatRange",
function(a,d,h){var b=a.length;d>b&&(d=b);return 0>h[0]||h[0]>=d?NaN:JU.PT.parseFloatChecked(a,d,h,!1)},"~S,~N,~A");b.parseFloatNext=c(b,"parseFloatNext",function(a,d){var h=null==a?-1:a.length;return 0>d[0]||d[0]>=h?NaN:JU.PT.parseFloatChecked(a,h,d,!1)},"~S,~A");b.parseFloatStrict=c(b,"parseFloatStrict",function(a){var d=a.length;return 0==d?NaN:JU.PT.parseFloatChecked(a,d,E(-1,[0]),!0)},"~S");b.parseFloat=c(b,"parseFloat",function(a){return JU.PT.parseFloatNext(a,E(-1,[0]))},"~S");b.parseIntRadix=
c(b,"parseIntRadix",function(a,d){return Integer.parseIntRadix(a,d)},"~S,~N");b.getTokens=c(b,"getTokens",function(a){return JU.PT.getTokensAt(a,0)},"~S");b.parseToken=c(b,"parseToken",function(a){return JU.PT.parseTokenNext(a,E(-1,[0]))},"~S");b.parseTrimmed=c(b,"parseTrimmed",function(a){return JU.PT.parseTrimmedRange(a,0,a.length)},"~S");b.parseTrimmedAt=c(b,"parseTrimmedAt",function(a,d){return JU.PT.parseTrimmedRange(a,d,a.length)},"~S,~N");b.parseTrimmedRange=c(b,"parseTrimmedRange",function(a,
d,h){var b=a.length;h<b&&(b=h);return b<d?"":JU.PT.parseTrimmedChecked(a,d,b)},"~S,~N,~N");b.getTokensAt=c(b,"getTokensAt",function(a,d){if(null==a)return null;var h=a.length;if(0>d||d>h)return null;var b=JU.PT.countTokens(a,d),c=Array(b),f=E(1,0);f[0]=d;for(var j=0;j<b;++j)c[j]=JU.PT.parseTokenChecked(a,h,f);return c},"~S,~N");b.countChar=c(b,"countChar",function(a,d){for(var h=0,b=a.lastIndexOf(d)+1;0<=--b;)a.charAt(b)==d&&h++;return h},"~S,~S");b.countTokens=c(b,"countTokens",function(a,d){var h=
0;if(null!=a)for(var b=a.length;;){for(;d<b&&JU.PT.isWhiteSpace(a,d);)++d;if(d==b)break;++h;do++d;while(d<b&&!JU.PT.isWhiteSpace(a,d))}return h},"~S,~N");b.parseTokenNext=c(b,"parseTokenNext",function(a,d){var h=a.length;return 0>d[0]||d[0]>=h?null:JU.PT.parseTokenChecked(a,h,d)},"~S,~A");b.parseTokenRange=c(b,"parseTokenRange",function(a,d,h){var b=a.length;d>b&&(d=b);return 0>h[0]||h[0]>=d?null:JU.PT.parseTokenChecked(a,d,h)},"~S,~N,~A");b.parseTokenChecked=c(b,"parseTokenChecked",function(a,d,
h){for(var b=h[0];b<d&&JU.PT.isWhiteSpace(a,b);)++b;for(var c=b;b<d&&!JU.PT.isWhiteSpace(a,b);)++b;h[0]=b;return c==b?null:a.substring(c,b)},"~S,~N,~A");b.parseTrimmedChecked=c(b,"parseTrimmedChecked",function(a,d,h){for(;d<h&&JU.PT.isWhiteSpace(a,d);)++d;for(h-=1;h>=d&&JU.PT.isWhiteSpace(a,h);)--h;return h<d?"":a.substring(d,h+1)},"~S,~N,~N");b.dVal=c(b,"dVal",function(a){if(null==a)throw new NumberFormatException("null");var d=parseFloat(a);if(isNaN(d))throw new NumberFormatException("Not a Number : "+
a);return d},"~S");b.fVal=c(b,"fVal",function(a){return this.dVal(a)},"~S");b.parseIntRange=c(b,"parseIntRange",function(a,d,h){var b=a.length;d>b&&(d=b);return 0>h[0]||h[0]>=d?-2147483648:JU.PT.parseIntChecked(a,d,h)},"~S,~N,~A");b.parseFloatArrayData=c(b,"parseFloatArrayData",function(a,d){JU.PT.parseFloatArrayDataN(a,d,d.length)},"~A,~A");b.parseFloatArrayDataN=c(b,"parseFloatArrayDataN",function(a,d,h){for(;0<=--h;)d[h]=h>=a.length?NaN:JU.PT.parseFloat(a[h])},"~A,~A,~N");b.split=c(b,"split",function(a,
d){if(0==a.length)return[];var h=1,b=a.indexOf(d),c,f=d.length;if(0>b||0==f)return c=Array(1),c[0]=a,c;for(var j=a.length-f;0<=b&&b<j;h++)b=a.indexOf(d,b+f);c=Array(h);for(var k=b=0,l=0;0<=(k=a.indexOf(d,b))&&l+1<h;)c[l++]=a.substring(b,k),b=k+f;a.indexOf(d,j)!=j&&(j+=f);c[l]=a.substring(b,j);return c},"~S,~S");b.getQuotedStringAt=c(b,"getQuotedStringAt",function(a,d){var h=E(-1,[d]);return JU.PT.getQuotedStringNext(a,h)},"~S,~N");b.getQuotedStringNext=c(b,"getQuotedStringNext",function(a,d){var h=
d[0];if(0>h||0>(h=a.indexOf('"',h)))return"";for(var b=h+1,c=a.length;++h<c&&'"'!=a.charAt(h);)"\\"==a.charAt(h)&&h++;d[0]=h+1;return a.substring(b,h)},"~S,~A");b.getQuotedOrUnquotedAttribute=c(b,"getQuotedOrUnquotedAttribute",function(a,d){if(null==a||null==d)return null;var h=a.toLowerCase().indexOf(d.toLowerCase()+"=");if(0>h||(h=h+d.length+1)>=a.length)return"";var b=a.charAt(h);switch(b.charCodeAt(0)){case 39:case 34:h++;break;default:b=" ",a+=" "}b=a.indexOf(b,h);return 0>b?null:a.substring(h,
b)},"~S,~S");b.getCSVString=c(b,"getCSVString",function(a,d){var h=d[1];if(0>h||0>(h=a.indexOf('"',h)))return null;for(var b=d[0]=h,c=a.length,f=!1,j=!1;++h<c&&('"'!=a.charAt(h)||(f=h+1<c&&'"'==a.charAt(h+1)));)f&&(f=!1,j=!0,h++);if(h>=c)return d[1]=-1,null;d[1]=h+1;h=a.substring(b+1,h);return j?JU.PT.rep(JU.PT.rep(h,'""',"\x00"),"\x00",'"'):h},"~S,~A");b.isOneOf=c(b,"isOneOf",function(a,d){if(0==d.length||0<=a.indexOf(";"))return!1;";"!=d.charAt(0)&&(d=";"+d+";");return 0<=d.indexOf(";"+a+";")},
"~S,~S");b.getQuotedAttribute=c(b,"getQuotedAttribute",function(a,d){var h=a.indexOf(d+"=");return 0>h?null:JU.PT.getQuotedStringAt(a,h)},"~S,~S");b.approx=c(b,"approx",function(a,d){return Math.round(a*d)/d},"~N,~N");b.rep=c(b,"rep",function(a,d,h){if(null==a||0==d.length||0>a.indexOf(d))return a;var b=0<=h.indexOf(d);do a=a.$replace(d,h);while(!b&&0<=a.indexOf(d));return a},"~S,~S,~S");b.formatF=c(b,"formatF",function(a,d,h,b,c){return JU.PT.formatS(JU.DF.formatDecimal(a,h),d,0,b,c)},"~N,~N,~N,~B,~B");
b.formatD=c(b,"formatD",function(a,d,h,b,c){return JU.PT.formatS(JU.DF.formatDecimal(a,-1-h),d,0,b,c)},"~N,~N,~N,~B,~B");b.formatS=c(b,"formatS",function(a,d,h,b,c){if(null==a)return"";var f=a.length;2147483647!=h&&0<h&&h<f?a=a.substring(0,h):0>h&&0<=f+h&&(a=a.substring(f+h+1));h=d-a.length;if(0>=h)return a;d=c&&!b&&"-"==a.charAt(0);c=c?"0":" ";var j=d?"-":c,f=new JU.SB;b&&f.append(a);for(f.appendC(j);0<--h;)f.appendC(c);b||f.append(d?c+a.substring(1):a);return f.toString()},"~S,~N,~N,~B,~B");b.replaceWithCharacter=
c(b,"replaceWithCharacter",function(a,d,h){if(null==a)return null;for(var b=d.length;0<=--b;)a=a.$replace(d.charAt(b),h);return a},"~S,~S,~S");b.replaceAllCharacters=c(b,"replaceAllCharacters",function(a,d,h){for(var b=d.length;0<=--b;){var c=d.substring(b,b+1);a=JU.PT.rep(a,c,h)}return a},"~S,~S,~S");b.trim=c(b,"trim",function(a,d){if(null==a||0==a.length)return a;if(0==d.length)return a.trim();for(var h=a.length,b=0;b<h&&0<=d.indexOf(a.charAt(b));)b++;for(h=a.length-1;h>b&&0<=d.indexOf(a.charAt(h));)h--;
return a.substring(b,h+1)},"~S,~S");b.trimQuotes=c(b,"trimQuotes",function(a){return null!=a&&1<a.length&&a.startsWith('"')&&a.endsWith('"')?a.substring(1,a.length-1):a},"~S");b.isNonStringPrimitive=c(b,"isNonStringPrimitive",function(a){return"number"==typeof a||"boolean"==typeof a?!0:C(a,Number)||C(a,Boolean)},"~O");b.toJSON=c(b,"toJSON",function(a,d){if(null==d)return JU.PT.packageJSON(a,null);if(JU.PT.isNonStringPrimitive(d))return JU.PT.packageJSON(a,d.toString());for(var h=null,b=null;;){if("string"==
typeof d){h=d;"undefined"==typeof h&&(h="null");0!=h.indexOf('{"')&&(h=JU.PT.esc(h));break}if(C(d,"javajs.api.JSONEncodable")){if(null==(h=d.toJSON()))h="null";break}b=new JU.SB;if(C(d,"java.util.Map")){b.append("{ ");var c="",f=d.keySet(),j=f.toArray(Array(f.size()));java.util.Arrays.sort(j);for(var f=0,k=j.length;f<k;f++){var l=j[f];null==l&&(l="null");b.append(c).append(JU.PT.packageJSON(l,JU.PT.toJSON(null,d.get(l))));c=","}b.append(" }");break}if(C(d,"JU.Lst")){b.append("[ ");k=d.size();for(f=
0;f<k;f++)0<f&&b.appendC(","),b.append(JU.PT.toJSON(null,d.get(f)));b.append(" ]");break}if(C(d,"JU.M34")){c=C(d,"JU.M4")?4:3;k=L(c,0);j=d;b.appendC("[");for(f=0;f<c;f++)0<f&&b.appendC(","),j.getRow(f,k),b.append(JU.PT.toJSON(null,k));b.appendC("]");break}h=JU.PT.nonArrayString(d);if(null==h){b.append("[");k=JU.AU.getLength(d);f=null;f=d[0];"number"!=typeof f&&(f=null);if(null!=f)b.appendO(d);else for(f=0;f<k;f++)0<f&&b.appendC(","),b.append(JU.PT.toJSON(null,JU.PT.arrayGet(d,f)));b.append("]");break}d=
d.toString()}return JU.PT.packageJSON(a,null==h?b.toString():h)},"~S,~O");b.arrayGet=c(b,"arrayGet",function(a,d){return a[d]},"~O,~N");b.nonArrayString=c(b,"nonArrayString",function(a){return a.constructor==Array||a.BYTES_PER_ELEMENT?null:a.toString()},"~O");b.byteArrayToJSON=c(b,"byteArrayToJSON",function(a){var d=new JU.SB;d.append("[");for(var h=a.length,b=0;b<h;b++)0<b&&d.appendC(","),d.appendI(a[b]&255);d.append("]");return d.toString()},"~A");b.packageJSON=c(b,"packageJSON",function(a,d){return null==
a?d:'"'+a+'": '+d},"~S,~S");b.escapeUrl=c(b,"escapeUrl",function(a){a=JU.PT.rep(a,"\n","");a=JU.PT.rep(a,"%","%25");a=JU.PT.rep(a,"#","%23");a=JU.PT.rep(a,"[","%5B");a=JU.PT.rep(a,"\\","%5C");a=JU.PT.rep(a,"]","%5D");return a=JU.PT.rep(a," ","%20")},"~S");b.esc=c(b,"esc",function(a){if(null==a||0==a.length)return'""';for(var d=!1,h=0;10>h;h+=2)if(0<=a.indexOf('\\\\\tt\rr\nn""'.charAt(h))){d=!0;break}if(d)for(;10>h;){for(var d=-1,b='\\\\\tt\rr\nn""'.charAt(h++),c='\\\\\tt\rr\nn""'.charAt(h++),f=new JU.SB,
j=0;0<=(d=a.indexOf(b,d+1));)f.append(a.substring(j,d)).appendC("\\").appendC(c),j=d+1;f.append(a.substring(j,a.length));a=f.toString()}return'"'+JU.PT.escUnicode(a)+'"'},"~S");b.escUnicode=c(b,"escUnicode",function(a){for(var d=a.length;0<=--d;)if(127<a.charAt(d).charCodeAt(0)){var h="0000"+Integer.toHexString(a.charAt(d).charCodeAt(0));a=a.substring(0,d)+"\\u"+h.substring(h.length-4)+a.substring(d+1)}return a},"~S");b.escF=c(b,"escF",function(a){a=""+a;0>a.indexOf(".")&&(0>a.indexOf("e")&&0>a.indexOf("N")&&
0>a.indexOf("n"))&&(a+=".0");return a},"~N");b.join=c(b,"join",function(a,d,h){if(a.length<h)return null;var b=new JU.SB;for(b.append(a[h++]);h<a.length;h++)b.appendC(d).append(a[h]);return b.toString()},"~A,~S,~N");b.isLike=c(b,"isLike",function(a,d){var h=a.equals(d);if(h)return!0;var b=d.startsWith("*"),c=d.endsWith("*");return!b&&!c?h:b&&c?1==d.length||a.contains(d.substring(1,d.length-1)):b?a.endsWith(d.substring(1)):a.startsWith(d.substring(0,d.length-1))},"~S,~S");b.getMapValueNoCase=c(b,"getMapValueNoCase",
function(a,d){if("this".equals(d))return a;var h=a.get(d);if(null==h)for(var b,c=a.entrySet().iterator();c.hasNext()&&((b=c.next())||1);)if(b.getKey().equalsIgnoreCase(d))return b.getValue();return h},"java.util.Map,~S");b.clean=c(b,"clean",function(a){return JU.PT.rep(JU.PT.replaceAllCharacters(a," \t\n\r"," "),"  "," ").trim()},"~S");b.fdup=c(b,"fdup",function(a,d,h){for(var b,c=0,f=d;1<=--f;)if(!JU.PT.isDigit(b=a.charAt(f)))switch(b.charCodeAt(0)){case 46:if(0!=c++)return a;continue;case 45:if(1!=
f&&"."!=a.charAt(f-1))return a;continue;default:return a}b=a.substring(0,d+1);c=new JU.SB;for(f=0;f<h;f++)c.append(b);c.append(a.substring(d+1));return c.toString()},"~S,~N,~N");b.formatString=c(b,"formatString",function(a,d,h,b,c,f){if(null==a)return null;if("".equals(a))return"";var j=d.length;if(0>a.indexOf("%")||0==j||0>a.indexOf(d))return a;var k="",l,g,m;for(l=0;0<=(g=a.indexOf("%",l))&&0<=(m=a.indexOf(d,g+1));)if(l!=g&&(k+=a.substring(l,g)),l=g+1,m>g+6)k+="%";else try{var p=!1;"-"==a.charAt(l)&&
(p=!0,++l);var y=!1;"0"==a.charAt(l)&&(y=!0,++l);for(var A,H=0;"0"<=(A=a.charAt(l))&&"9">=A;)H=10*H+(A.charCodeAt(0)-48),++l;var M=2147483647,v=!1;if("."==a.charAt(l)){++l;if("-"==(A=a.charAt(l)))v=!0,++l;if("0"<=(A=a.charAt(l))&&"9">=A)if(M=A.charCodeAt(0)-48,++l,"0"<=(A=a.charAt(l))&&"9">=A)M=10*M+(A.charCodeAt(0)-48),++l;v&&(M=-M)}if(a.substring(l,l+j).equals(d)){if(l+=j,Float.isNaN(b)?null!=h?k+=JU.PT.formatS(h,H,0>M?M-1:M,p,y):Double.isNaN(c)||(k+=JU.PT.formatD(c,H,M-1,p,y)):k+=JU.PT.formatF(b,
H,M,p,y),f)break}else l=g+1,k+="%"}catch(n){if(D(n,"IndexOutOfBoundsException")){l=g;break}else throw n;}return k+=a.substring(l)},"~S,~S,~S,~N,~N,~B");b.formatStringS=c(b,"formatStringS",function(a,d,h){return JU.PT.formatString(a,d,h,NaN,NaN,!1)},"~S,~S,~S");b.formatStringF=c(b,"formatStringF",function(a,d,h){return JU.PT.formatString(a,d,null,h,NaN,!1)},"~S,~S,~N");b.formatStringI=c(b,"formatStringI",function(a,d,h){return JU.PT.formatString(a,d,""+h,NaN,NaN,!1)},"~S,~S,~N");b.sprintf=c(b,"sprintf",
function(a,d,h){if(null==h)return a;var b=d.length;if(b==h.length)try{for(var c=0;c<b;c++)if(null!=h[c])switch(d.charAt(c).charCodeAt(0)){case 115:a=JU.PT.formatString(a,"s",h[c],NaN,NaN,!0);break;case 102:a=JU.PT.formatString(a,"f",null,h[c].floatValue(),NaN,!0);break;case 105:a=JU.PT.formatString(a,"d",""+h[c],NaN,NaN,!0);a=JU.PT.formatString(a,"i",""+h[c],NaN,NaN,!0);break;case 100:a=JU.PT.formatString(a,"e",null,NaN,h[c].doubleValue(),!0);break;case 112:var f=h[c];a=JU.PT.formatString(a,"p",null,
f.x,NaN,!0);a=JU.PT.formatString(a,"p",null,f.y,NaN,!0);a=JU.PT.formatString(a,"p",null,f.z,NaN,!0);break;case 113:var j=h[c];a=JU.PT.formatString(a,"q",null,j.x,NaN,!0);a=JU.PT.formatString(a,"q",null,j.y,NaN,!0);a=JU.PT.formatString(a,"q",null,j.z,NaN,!0);a=JU.PT.formatString(a,"q",null,j.w,NaN,!0);break;case 83:for(var k=h[c],l=0;l<k.length;l++)a=JU.PT.formatString(a,"s",k[l],NaN,NaN,!0);break;case 70:for(var g=h[c],l=0;l<g.length;l++)a=JU.PT.formatString(a,"f",null,g[l],NaN,!0);break;case 73:for(var m=
h[c],l=0;l<m.length;l++)a=JU.PT.formatString(a,"d",""+m[l],NaN,NaN,!0);for(l=0;l<m.length;l++)a=JU.PT.formatString(a,"i",""+m[l],NaN,NaN,!0);break;case 68:for(var p=h[c],l=0;l<p.length;l++)a=JU.PT.formatString(a,"e",null,NaN,p[l],!0)}return JU.PT.rep(a,"%%","%")}catch(y){if(!D(y,Exception))throw y;}System.out.println("TextFormat.sprintf error "+d+" "+a);return JU.PT.rep(a,"%","?")},"~S,~S,~A");b.formatCheck=c(b,"formatCheck",function(a){if(null==a||0>a.indexOf("p")&&0>a.indexOf("q"))return a;a=JU.PT.rep(a,
"%%","\u0001");a=JU.PT.rep(a,"%p","%6.2p");a=JU.PT.rep(a,"%q","%6.2q");a=JU.PT.split(a,"%");var d=new JU.SB;d.append(a[0]);for(var h=1;h<a.length;h++){var b="%"+a[h],c;if(3<=b.length){if(0<=(c=b.indexOf("p")))b=JU.PT.fdup(b,c,3);if(0<=(c=b.indexOf("q")))b=JU.PT.fdup(b,c,4)}d.append(b)}return d.toString().$replace("\u0001","%")},"~S");b.leftJustify=c(b,"leftJustify",function(a,d,h){a.append(h);h=d.length-h.length;0<h&&a.append(d.substring(0,h))},"JU.SB,~S,~S");b.rightJustify=c(b,"rightJustify",function(a,
d,h){var b=d.length-h.length;0<b&&a.append(d.substring(0,b));a.append(h)},"JU.SB,~S,~S");b.safeTruncate=c(b,"safeTruncate",function(a,d){-0.001<a&&0.001>a&&(a=0);return(a+"         ").substring(0,d)},"~N,~N");b.isWild=c(b,"isWild",function(a){return null!=a&&(0<=a.indexOf("*")||0<=a.indexOf("?"))},"~S");b.isMatch=c(b,"isMatch",function(a,d,h,b){if(a.equals(d))return!0;var c=d.length;if(0==c)return!1;var f=h&&b?"*"==d.charAt(0):!1;if(1==c&&f)return!0;var j=h&&d.endsWith("*");if(!(0<=d.indexOf("?"))){if(f)return j?
3>c||0<=a.indexOf(d.substring(1,c-1)):a.endsWith(d.substring(1));if(j)return a.startsWith(d.substring(0,c-1))}for(var k=a.length,l="????",g=4;g<k;)l+=l,g*=2;h&&(f&&(d=l+d.substring(1),c+=g-1),j&&(d=d.substring(0,c-1)+l,c+=g-1));if(c<k)return!1;for(h=0;c>k;){if(b&&"?"==d.charAt(h))++h;else if("?"!=d.charAt(h+c-1))return!1;--c}for(b=k;0<=--b;)if(c=d.charAt(h+b),"?"!=c&&(k=a.charAt(b),c!=k&&("\u0001"!=c||"?"!=k)))return!1;return!0},"~S,~S,~B,~B");b.replaceQuotedStrings=c(b,"replaceQuotedStrings",function(a,
d,h){for(var b=d.size(),c=0;c<b;c++){var f=d.get(c),j=h.get(c);j.equals(f)||(a=JU.PT.rep(a,'"'+f+'"','"'+j+'"'))}return a},"~S,JU.Lst,JU.Lst");b.replaceStrings=c(b,"replaceStrings",function(a,d,h){for(var b=d.size(),c=0;c<b;c++){var f=d.get(c),j=h.get(c);j.equals(f)||(a=JU.PT.rep(a,f,j))}return a},"~S,JU.Lst,JU.Lst");b.isDigit=c(b,"isDigit",function(a){a=a.charCodeAt(0);return 48<=a&&57>=a},"~S");b.isUpperCase=c(b,"isUpperCase",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a},"~S");b.isLowerCase=
c(b,"isLowerCase",function(a){a=a.charCodeAt(0);return 97<=a&&122>=a},"~S");b.isLetter=c(b,"isLetter",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a||97<=a&&122>=a},"~S");b.isLetterOrDigit=c(b,"isLetterOrDigit",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a||97<=a&&122>=a||48<=a&&57>=a},"~S");b.isWhitespace=c(b,"isWhitespace",function(a){a=a.charCodeAt(0);return 28<=a&&32>=a||9<=a&&13>=a},"~S");b.fixPtFloats=c(b,"fixPtFloats",function(a,d){a.x=Math.round(a.x*d)/d;a.y=Math.round(a.y*d)/d;a.z=
Math.round(a.z*d)/d},"JU.T3,~N");b.fixFloat=c(b,"fixFloat",function(a,d){return Math.round(a*d)/d},"~N,~N");b.fixDouble=c(b,"fixDouble",function(a,d){return Math.round(a*d)/d},"~N,~N");b.parseFloatFraction=c(b,"parseFloatFraction",function(a){var d=a.indexOf("/");return 0>d?JU.PT.parseFloat(a):JU.PT.parseFloat(a.substring(0,d))/JU.PT.parseFloat(a.substring(d+1))},"~S");b.tensScale=L(-1,[10,100,1E3,1E4,1E5,1E6]);b.decimalScale=L(-1,[0.1,0.01,0.001,1E-4,1E-5,1E-6,1E-7,1E-8,1E-9,1E-10,1E-11,1E-12,1E-13,
1E-14,1E-15])});n("JU");var S=w(function(){this.s=this.sb=null;q(this,arguments)},JU,"SB",null);x(S,function(){this.s=""});S.newN=c(S,"newN",function(){return new JU.SB},"~N");S.newS=c(S,"newS",function(b){var a=new JU.SB;a.s=b;return a},"~S");c(S,"append",function(b){this.s+=b;return this},"~S");c(S,"appendC",function(b){this.s+=b;return this},"~S");c(S,"appendI",function(b){this.s+=b;return this},"~N");c(S,"appendB",function(b){this.s+=b;return this},"~B");c(S,"appendF",function(b){b=""+b;0>b.indexOf(".")&&
0>b.indexOf("e")&&(b+=".0");this.s+=b;return this},"~N");c(S,"appendD",function(b){b=""+b;0>b.indexOf(".")&&0>b.indexOf("e")&&(b+=".0");this.s+=b;return this},"~N");c(S,"appendSB",function(b){this.s+=b.s;return this},"JU.SB");c(S,"appendO",function(b){null!=b&&(this.s+=b.toString());return this},"~O");c(S,"appendCB",function(b,a,d){this.s+=b.slice(a,a+d).join("")},"~A,~N,~N");g(S,"toString",function(){return this.s});c(S,"length",function(){return this.s.length});c(S,"indexOf",function(b){return this.s.indexOf(b)},
"~S");c(S,"charAt",function(b){return this.s.charAt(b)},"~N");c(S,"charCodeAt",function(b){return this.s.charCodeAt(b)},"~N");c(S,"setLength",function(b){this.s=this.s.substring(0,b)},"~N");c(S,"lastIndexOf",function(b){return this.s.lastIndexOf(b)},"~S");c(S,"indexOf2",function(b,a){return this.s.indexOf(b,a)},"~S,~N");c(S,"substring",function(b){return this.s.substring(b)},"~N");c(S,"substring2",function(b,a){return this.s.substring(b,a)},"~N,~N");c(S,"toBytes",function(b,a){return 0==a?O(0,0):
(0<a?this.substring2(b,b+a):0==b?this.toString():this.substring2(b,this.length()-b)).getBytes("UTF-8")},"~N,~N");c(S,"replace",function(b,a,d){this.s=this.s.substring(0,b)+d+this.s.substring(a)},"~N,~N,~S");c(S,"insert",function(b,a){this.replace(b,b,a)},"~N,~S");n("JU");z(["javajs.api.JSONEncodable"],"JU.T3",null,function(){var b=w(function(){this.z=this.y=this.x=0;q(this,arguments)},JU,"T3",null,[javajs.api.JSONEncodable,java.io.Serializable]);c(b,"set",function(a,d,h){this.x=a;this.y=d;this.z=
h},"~N,~N,~N");c(b,"setA",function(a){this.x=a[0];this.y=a[1];this.z=a[2]},"~A");c(b,"setT",function(a){this.x=a.x;this.y=a.y;this.z=a.z},"JU.T3");c(b,"add2",function(a,d){this.x=a.x+d.x;this.y=a.y+d.y;this.z=a.z+d.z},"JU.T3,JU.T3");c(b,"add",function(a){this.x+=a.x;this.y+=a.y;this.z+=a.z},"JU.T3");c(b,"distanceSquared",function(a){var d=this.x-a.x,h=this.y-a.y;a=this.z-a.z;return d*d+h*h+a*a},"JU.T3");c(b,"distance",function(a){return Math.sqrt(this.distanceSquared(a))},"JU.T3");c(b,"sub2",function(a,
d){this.x=a.x-d.x;this.y=a.y-d.y;this.z=a.z-d.z},"JU.T3,JU.T3");c(b,"sub",function(a){this.x-=a.x;this.y-=a.y;this.z-=a.z},"JU.T3");c(b,"scale",function(a){this.x*=a;this.y*=a;this.z*=a},"~N");c(b,"add3",function(a,d,h){this.x+=a;this.y+=d;this.z+=h},"~N,~N,~N");c(b,"scaleT",function(a){this.x*=a.x;this.y*=a.y;this.z*=a.z},"JU.T3");c(b,"scaleAdd2",function(a,d,h){this.x=a*d.x+h.x;this.y=a*d.y+h.y;this.z=a*d.z+h.z},"~N,JU.T3,JU.T3");c(b,"ave",function(a,d){this.x=(a.x+d.x)/2;this.y=(a.y+d.y)/2;this.z=
(a.z+d.z)/2},"JU.T3,JU.T3");c(b,"dot",function(a){return this.x*a.x+this.y*a.y+this.z*a.z},"JU.T3");c(b,"lengthSquared",function(){return this.x*this.x+this.y*this.y+this.z*this.z});c(b,"length",function(){return Math.sqrt(this.lengthSquared())});c(b,"normalize",function(){var a=this.length();this.x/=a;this.y/=a;this.z/=a});c(b,"cross",function(a,d){this.set(a.y*d.z-a.z*d.y,a.z*d.x-a.x*d.z,a.x*d.y-a.y*d.x)},"JU.T3,JU.T3");g(b,"hashCode",function(){var a;a=31+JU.T3.floatToIntBits(this.x);a=31*a+JU.T3.floatToIntBits(this.y);
a=31*a+JU.T3.floatToIntBits(this.z);return a^a>>32});b.floatToIntBits=c(b,"floatToIntBits",function(a){return 0==a?0:Float.floatToIntBits(a)},"~N");g(b,"equals",function(a){return!C(a,"JU.T3")?!1:this.x==a.x&&this.y==a.y&&this.z==a.z},"~O");g(b,"toString",function(){return"{"+this.x+", "+this.y+", "+this.z+"}"});g(b,"toJSON",function(){return"["+this.x+","+this.y+","+this.z+"]"});c(b,"setP",function(a){this.set(a.x,a.y,a.z);return this},"JU.T3");c(b,"putP",function(a){a.set(this.x,this.y,this.z);
return a},"JU.T3")});n("JU");var pa=w(function(){this.z=this.y=this.x=0;q(this,arguments)},JU,"T3i",null,java.io.Serializable);c(pa,"set",function(b,a,d){this.x=b;this.y=a;this.z=d},"~N,~N,~N");c(pa,"setT",function(b){this.x=b.x;this.y=b.y;this.z=b.z},"JU.T3i");c(pa,"add",function(b){this.x+=b.x;this.y+=b.y;this.z+=b.z},"JU.T3i");c(pa,"scaleAdd",function(b,a,d){this.x=b*a.x+d.x;this.y=b*a.y+d.y;this.z=b*a.z+d.z},"~N,JU.T3i,JU.T3i");g(pa,"hashCode",function(){return this.x^this.y^this.z});g(pa,"equals",
function(b){return!C(b,"JU.T3i")?!1:this.x==b.x&&this.y==b.y&&this.z==b.z},"~O");c(pa,"asString",function(){return"("+this.x+", "+this.y+", "+this.z+")"});g(pa,"toString",function(){return this.asString()});n("JU");z(["JU.T3"],"JU.T4",null,function(){var b=w(function(){this.w=0;q(this,arguments)},JU,"T4",JU.T3);c(b,"set4",function(a,d,h,b){this.x=a;this.y=d;this.z=h;this.w=b},"~N,~N,~N,~N");c(b,"scale4",function(a){this.scale(a);this.w*=a},"~N");g(b,"hashCode",function(){return JU.T3.floatToIntBits(this.x)^
JU.T3.floatToIntBits(this.y)^JU.T3.floatToIntBits(this.z)^JU.T3.floatToIntBits(this.w)});g(b,"equals",function(a){return!C(a,"JU.T4")?!1:this.x==a.x&&this.y==a.y&&this.z==a.z&&this.w==a.w},"~O");g(b,"toString",function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"});g(b,"toJSON",function(){return"["+this.x+", "+this.y+", "+this.z+", "+this.w+"]"})});n("JU");z(["JU.T3"],"JU.V3",null,function(){var b=G(JU,"V3",JU.T3);b.newV=c(b,"newV",function(a){return JU.V3.new3(a.x,a.y,a.z)},"JU.T3");
b.newVsub=c(b,"newVsub",function(a,d){return JU.V3.new3(a.x-d.x,a.y-d.y,a.z-d.z)},"JU.T3,JU.T3");b.new3=c(b,"new3",function(a,d,h){var b=new JU.V3;b.x=a;b.y=d;b.z=h;return b},"~N,~N,~N");c(b,"angle",function(a){var d=this.y*a.z-this.z*a.y,h=this.z*a.x-this.x*a.z,b=this.x*a.y-this.y*a.x,d=Math.sqrt(d*d+h*h+b*b);return Math.abs(Math.atan2(d,this.dot(a)))},"JU.V3")});n("javajs.api");K(javajs.api,"GenericBinaryDocument",javajs.api.GenericBinaryDocumentReader);n("javajs.api");K(javajs.api,"GenericBinaryDocumentReader");
n("javajs.api");K(javajs.api,"GenericZipTools");n("javajs.api");K(javajs.api,"GenericLineReader");n("javajs.api");K(javajs.api,"GenericCifDataParser");n("javajs.api");var Ya=G(javajs.api,"Interface",null);Ya.getInterface=c(Ya,"getInterface",function(b){try{var a=ra._4Name(b);return null==a?null:a.newInstance()}catch(d){if(D(d,Exception))return System.out.println("Interface.java Error creating instance for "+b+": \n"+d),null;throw d;}},"~S");n("JU");var Ga=w(function(){this.data=null;q(this,arguments)},
JU,"BArray",null);x(Ga,function(b){this.data=b},"~A");g(Ga,"equals",function(b){if(C(b,"JU.BArray")&&(b=b.data,b.length==this.data.length)){for(var a=0;a<b.length;a++)if(b[a]!=this.data[a])return!1;return!0}return!1},"~O");c(Ga,"hashCode",function(){return this.data.hashCode()});g(Ga,"toString",function(){return String.instantialize(this.data)});n("JU");var Ka=w(function(){this.buf=null;this.ichCurrent=this.cchBuf=0;q(this,arguments)},JU,"LimitedLineReader",null);x(Ka,function(b,a){b.mark(a+1);this.buf=
ba(a,"\x00");this.cchBuf=Math.max(b.read(this.buf,0,a),0);this.ichCurrent=0;b.reset()},"java.io.BufferedReader,~N");c(Ka,"getHeader",function(b){return 0==b?String.instantialize(this.buf):String.instantialize(this.buf,0,Math.min(this.cchBuf,b))},"~N");c(Ka,"readLineWithNewline",function(){for(;this.ichCurrent<this.cchBuf;){for(var b=this.ichCurrent,a=String.fromCharCode(0);this.ichCurrent<this.cchBuf&&"\r"!=(a=this.buf[this.ichCurrent++])&&"\n"!=a;);"\r"==a&&(this.ichCurrent<this.cchBuf&&"\n"==this.buf[this.ichCurrent])&&
++this.ichCurrent;a=this.ichCurrent-b;if("#"!=this.buf[b])return String.instantialize(this.buf,b,a)}return""});n("JU");var V=w(function(){this.a=null;this.n=this.m=0;W("JU.Matrix.LUDecomp")||JU.Matrix.$Matrix$LUDecomp$();q(this,arguments)},JU,"Matrix",null,Cloneable);x(V,function(b,a,d){this.a=null==b?R(a,d,0):b;this.m=a;this.n=d},"~A,~N,~N");c(V,"getRowDimension",function(){return this.m});c(V,"getColumnDimension",function(){return this.n});c(V,"getArray",function(){return this.a});c(V,"getArrayCopy",
function(){for(var b=R(this.m,this.n,0),a=this.m;0<=--a;)for(var d=this.n;0<=--d;)b[a][d]=this.a[a][d];return b});c(V,"copy",function(){for(var b=new JU.Matrix(null,this.m,this.n),a=b.a,d=this.m;0<=--d;)for(var h=this.n;0<=--h;)a[d][h]=this.a[d][h];return b});g(V,"clone",function(){return this.copy()});c(V,"getSubmatrix",function(b,a,d,h){for(var r=new JU.Matrix(null,d,h),c=r.a;0<=--d;)for(var f=h;0<=--f;)c[d][f]=this.a[b+d][a+f];return r},"~N,~N,~N,~N");c(V,"getMatrixSelected",function(b,a){for(var d=
new JU.Matrix(null,b.length,a),h=d.a,r=b.length;0<=--r;)for(var c=this.a[b[r]],f=a;0<=--f;)h[r][f]=c[f];return d},"~A,~N");c(V,"transpose",function(){for(var b=new JU.Matrix(null,this.n,this.m),a=b.a,d=this.m;0<=--d;)for(var h=this.n;0<=--h;)a[h][d]=this.a[d][h];return b});c(V,"add",function(b){return this.scaleAdd(b,1)},"JU.Matrix");c(V,"sub",function(b){return this.scaleAdd(b,-1)},"JU.Matrix");c(V,"scaleAdd",function(b,a){for(var d=new JU.Matrix(null,this.m,this.n),h=d.a,r=b.a,c=this.m;0<=--c;)for(var f=
this.n;0<=--f;)h[c][f]=r[c][f]*a+this.a[c][f];return d},"JU.Matrix,~N");c(V,"mul",function(b){if(b.m!=this.n)return null;var a=new JU.Matrix(null,this.m,b.n),d=a.a,h=b.a;for(b=b.n;0<=--b;)for(var r=this.m;0<=--r;){for(var c=this.a[r],f=0,j=this.n;0<=--j;)f+=c[j]*h[j][b];d[r][b]=f}return a},"JU.Matrix");c(V,"inverse",function(){return Y(JU.Matrix.LUDecomp,this,null,this.m,this.n).solve(JU.Matrix.identity(this.m,this.m),this.n)});c(V,"trace",function(){for(var b=0,a=Math.min(this.m,this.n);0<=--a;)b+=
this.a[a][a];return b});V.identity=c(V,"identity",function(b,a){for(var d=new JU.Matrix(null,b,a),h=d.a,r=Math.min(b,a);0<=--r;)h[r][r]=1;return d},"~N,~N");c(V,"getRotation",function(){return this.getSubmatrix(0,0,this.m-1,this.n-1)});c(V,"getTranslation",function(){return this.getSubmatrix(0,this.n-1,this.m-1,1)});V.newT=c(V,"newT",function(b,a){return a?new JU.Matrix(u(-1,[R(-1,[b.x]),R(-1,[b.y]),R(-1,[b.z])]),3,1):new JU.Matrix(u(-1,[R(-1,[b.x,b.y,b.z])]),1,3)},"JU.T3,~B");g(V,"toString",function(){for(var b=
"[\n",a=0;a<this.m;a++){for(var b=b+"  [",d=0;d<this.n;d++)b+=" "+this.a[a][d];b+="]\n"}return b+"]"});V.$Matrix$LUDecomp$=function(){var b=w(function(){fa(this,arguments);this.piv=this.LU=null;this.pivsign=0;q(this,arguments)},JU.Matrix,"LUDecomp",null);x(b,function(a,d){this.LU=this.b$["JU.Matrix"].getArrayCopy();this.piv=E(a,0);for(var h=a;0<=--h;)this.piv[h]=h;this.pivsign=1;for(var b,c=R(a,0),f=0;f<d;f++){for(h=a;0<=--h;)c[h]=this.LU[h][f];for(h=a;0<=--h;){b=this.LU[h];for(var j=0,k=Math.min(h,
f);0<=--k;)j+=b[k]*c[k];b[f]=c[h]-=j}b=f;for(h=a;--h>f;)Math.abs(c[h])>Math.abs(c[b])&&(b=h);if(b!=f){for(k=d;0<=--k;)h=this.LU[b][k],this.LU[b][k]=this.LU[f][k],this.LU[f][k]=h;k=this.piv[b];this.piv[b]=this.piv[f];this.piv[f]=k;this.pivsign=-this.pivsign}if((new Boolean(f<a&0!=this.LU[f][f])).valueOf())for(h=a;--h>f;)this.LU[h][f]/=this.LU[f][f]}},"~N,~N");c(b,"solve",function(a,d){for(var h=0;h<d;h++)if(0==this.LU[h][h])return null;for(var b=a.n,c=a.getMatrixSelected(this.piv,b),f=c.a,j=0;j<d;j++)for(var k=
j+1;k<d;k++)for(h=0;h<b;h++)f[k][h]-=f[j][h]*this.LU[k][j];for(j=d;0<=--j;){for(h=b;0<=--h;)f[j][h]/=this.LU[j][j];for(k=j;0<=--k;)for(h=b;0<=--h;)f[k][h]-=f[j][h]*this.LU[k][j]}return c},"JU.Matrix,~N")};n("JU");z(["JU.P4"],"JU.Quat",["JU.A4","$.M3","$.V3"],function(){var b=w(function(){this.q3=this.q2=this.q1=this.q0=0;this.mat=null;q(this,arguments)},JU,"Quat",null);x(b,function(){this.q0=1});b.newQ=c(b,"newQ",function(a){var d=new JU.Quat;d.set(a);return d},"JU.Quat");b.newVA=c(b,"newVA",function(a,
d){var h=new JU.Quat;h.setTA(a,d);return h},"JU.T3,~N");b.newM=c(b,"newM",function(a){var d=new JU.Quat;d.setM(JU.M3.newM3(a));return d},"JU.M3");b.newAA=c(b,"newAA",function(a){var d=new JU.Quat;d.setAA(a);return d},"JU.A4");b.newP4=c(b,"newP4",function(a){var d=new JU.Quat;d.setP4(a);return d},"JU.P4");b.new4=c(b,"new4",function(a,d,h,b){var c=new JU.Quat;if(-1>b)return c.q0=-1,c;if(1<b)return c.q0=1,c;c.q0=b;c.q1=a;c.q2=d;c.q3=h;return c},"~N,~N,~N,~N");c(b,"set",function(a){this.q0=a.q0;this.q1=
a.q1;this.q2=a.q2;this.q3=a.q3},"JU.Quat");c(b,"setP4",function(a){var d=null==a?0:a.distance4(JU.Quat.qZero);0==d?this.q0=1:(this.q0=a.w/d,this.q1=a.x/d,this.q2=a.y/d,this.q3=a.z/d)},"JU.P4");c(b,"setTA",function(a,d){if(0==a.x&&0==a.y&&0==a.z)this.q0=1;else{var h=Math.sin(0.017453292519943295*(d/2))/Math.sqrt(a.x*a.x+a.y*a.y+a.z*a.z);this.q0=Math.cos(0.017453292519943295*(d/2));this.q1=a.x*h;this.q2=a.y*h;this.q3=a.z*h}},"JU.T3,~N");c(b,"setAA",function(a){a=JU.A4.newAA(a);0==a.angle&&(a.y=1);this.setM((new JU.M3).setAA(a))},
"JU.A4");c(b,"setM",function(a){this.mat=a;var d=a.m00+a.m11+a.m22,h,b,c;0.5<=d?(d=Math.sqrt(1+d),h=(a.m21-a.m12)/d,b=(a.m02-a.m20)/d,c=(a.m10-a.m01)/d):0.5<=(h=a.m00+a.m00-d)?(h=Math.sqrt(1+h),d=(a.m21-a.m12)/h,b=(a.m10+a.m01)/h,c=(a.m20+a.m02)/h):0.5<=(h=a.m11+a.m11-d)||a.m11>a.m22?(b=Math.sqrt(1+h),d=(a.m02-a.m20)/b,h=(a.m10+a.m01)/b,c=(a.m21+a.m12)/b):(c=Math.sqrt(1+a.m22+a.m22-d),d=(a.m10-a.m01)/c,h=(a.m20+a.m02)/c,b=(a.m21+a.m12)/c);this.q0=0.5*d;this.q1=0.5*h;this.q2=0.5*b;this.q3=0.5*c},"JU.M3");
c(b,"setRef",function(a){null==a?this.mul(this.getFixFactor()):0<=this.dot(a)||(this.q0*=-1,this.q1*=-1,this.q2*=-1,this.q3*=-1)},"JU.Quat");b.getQuaternionFrame=c(b,"getQuaternionFrame",function(a,d,h){d=JU.V3.newV(d);h=JU.V3.newV(h);null!=a&&(d.sub(a),h.sub(a));return JU.Quat.getQuaternionFrameV(d,h,null,!1)},"JU.P3,JU.T3,JU.T3");b.getQuaternionFrameV=c(b,"getQuaternionFrameV",function(a,d,h,b){null==h&&(h=new JU.V3,h.cross(a,d),b&&a.cross(d,h));d=new JU.V3;d.cross(h,a);a.normalize();d.normalize();
h.normalize();b=new JU.M3;b.setColumnV(0,a);b.setColumnV(1,d);b.setColumnV(2,h);return JU.Quat.newM(b)},"JU.V3,JU.V3,JU.V3,~B");c(b,"getMatrix",function(){null==this.mat&&this.setMatrix();return this.mat});c(b,"setMatrix",function(){this.mat=new JU.M3;this.mat.m00=this.q0*this.q0+this.q1*this.q1-this.q2*this.q2-this.q3*this.q3;this.mat.m01=2*this.q1*this.q2-2*this.q0*this.q3;this.mat.m02=2*this.q1*this.q3+2*this.q0*this.q2;this.mat.m10=2*this.q1*this.q2+2*this.q0*this.q3;this.mat.m11=this.q0*this.q0-
this.q1*this.q1+this.q2*this.q2-this.q3*this.q3;this.mat.m12=2*this.q2*this.q3-2*this.q0*this.q1;this.mat.m20=2*this.q1*this.q3-2*this.q0*this.q2;this.mat.m21=2*this.q2*this.q3+2*this.q0*this.q1;this.mat.m22=this.q0*this.q0-this.q1*this.q1-this.q2*this.q2+this.q3*this.q3});c(b,"add",function(a){return JU.Quat.newVA(this.getNormal(),this.getTheta()+a)},"~N");c(b,"mul",function(a){return 1==a?JU.Quat.new4(this.q1,this.q2,this.q3,this.q0):JU.Quat.newVA(this.getNormal(),this.getTheta()*a)},"~N");c(b,
"mulQ",function(a){return JU.Quat.new4(this.q0*a.q1+this.q1*a.q0+this.q2*a.q3-this.q3*a.q2,this.q0*a.q2+this.q2*a.q0+this.q3*a.q1-this.q1*a.q3,this.q0*a.q3+this.q3*a.q0+this.q1*a.q2-this.q2*a.q1,this.q0*a.q0-this.q1*a.q1-this.q2*a.q2-this.q3*a.q3)},"JU.Quat");c(b,"divLeft",function(a){return this.inv().mulQ(a)},"JU.Quat");c(b,"dot",function(a){return this.q0*a.q0+this.q1*a.q1+this.q2*a.q2+this.q3*a.q3},"JU.Quat");c(b,"inv",function(){return JU.Quat.new4(-this.q1,-this.q2,-this.q3,this.q0)});c(b,"negate",
function(){return JU.Quat.new4(-this.q1,-this.q2,-this.q3,-this.q0)});c(b,"getFixFactor",function(){return 0>this.q0||0==this.q0&&(0>this.q1||0==this.q1&&(0>this.q2||0==this.q2&&0>this.q3))?-1:1});c(b,"getVector",function(a){return this.getVectorScaled(a,1)},"~N");c(b,"getVectorScaled",function(a,d){if(-1==a)return d*=this.getFixFactor(),JU.V3.new3(this.q1*d,this.q2*d,this.q3*d);null==this.mat&&this.setMatrix();var h=new JU.V3;this.mat.getColumnV(a,h);1!=d&&h.scale(d);return h},"~N,~N");c(b,"getNormal",
function(){var a=JU.Quat.getRawNormal(this);a.scale(this.getFixFactor());return a});b.getRawNormal=c(b,"getRawNormal",function(a){a=JU.V3.new3(a.q1,a.q2,a.q3);if(0==a.length())return JU.V3.new3(0,0,1);a.normalize();return a},"JU.Quat");c(b,"getTheta",function(){return 360*Math.acos(Math.abs(this.q0))/3.141592653589793});c(b,"getThetaRadians",function(){return 2*Math.acos(Math.abs(this.q0))});c(b,"getNormalDirected",function(a){var d=this.getNormal();0>d.x*a.x+d.y*a.y+d.z*a.z&&d.scale(-1);return d},
"JU.V3");c(b,"get3dProjection",function(a){a.set(this.q1,this.q2,this.q3);return a},"JU.V3");c(b,"getThetaDirected",function(a){var d=this.getTheta(),h=this.getNormal();0>a.x*this.q1+a.y*this.q2+a.z*this.q3&&(h.scale(-1),d=-d);a.set4(h.x,h.y,h.z,d);return a},"JU.P4");c(b,"getThetaDirectedV",function(a){var d=this.getTheta(),h=this.getNormal();0>a.x*this.q1+a.y*this.q2+a.z*this.q3&&(h.scale(-1),d=-d);return d},"JU.V3");c(b,"toPoint4f",function(){return JU.P4.new4(this.q1,this.q2,this.q3,this.q0)});
c(b,"toAxisAngle4f",function(){var a=2*Math.acos(Math.abs(this.q0)),d=Math.sin(a/2),h=this.getNormal();0>d&&(h.scale(-1),a=3.141592653589793-a);return JU.A4.newVA(h,a)});c(b,"transform2",function(a,d){null==this.mat&&this.setMatrix();this.mat.rotate2(a,d);return d},"JU.T3,JU.T3");c(b,"leftDifference",function(a){a=0>this.dot(a)?a.negate():a;return this.inv().mulQ(a)},"JU.Quat");c(b,"rightDifference",function(a){a=0>this.dot(a)?a.negate():a;return this.mulQ(a.inv())},"JU.Quat");g(b,"toString",function(){return"{"+
this.q1+" "+this.q2+" "+this.q3+" "+this.q0+"}"});c(b,"div",function(a){return this.mulQ(a.inv())},"JU.Quat");b.arrayDiv=c(b,"arrayDiv",function(a,d,h,b){var c;if(null==a||null==d||0==(c=Math.min(a.length,d.length)))return null;0<h&&c>h&&(c=h);h=Array(c);for(var f=0;f<c;f++){if(null==a[f]||null==d[f])return null;h[f]=b?a[f].divLeft(d[f]):a[f].div(d[f])}return h},"~A,~A,~N,~B");b.sphereMean=c(b,"sphereMean",function(a,d,h){if(null==a||0==a.length)return new JU.Quat;null==d&&(d=L(1,0));if(1==a.length)return d[0]=
0,JU.Quat.newQ(a[0]);for(var b=3.4028235E38,c=3.4028235E38,f=JU.Quat.simpleAverage(a);b>h&&0!=c;)f=JU.Quat.newMean(a,f),d[0]=JU.Quat.stdDev(a,f),b=Math.abs(d[0]-c),c=d[0];return f},"~A,~A,~N");b.simpleAverage=c(b,"simpleAverage",function(a){var d=JU.V3.new3(0,0,1),h=a[0].getNormal();d.add(h);for(var b=a.length;0<=--b;)d.add(a[b].getNormalDirected(d));d.sub(h);d.normalize();for(var c=0,b=a.length;0<=--b;)c+=Math.abs(a[b].get3dProjection(h).dot(d));0!=c&&d.scale(c/a.length);c=Math.sqrt(1-d.lengthSquared());
Float.isNaN(c)&&(c=0);return JU.Quat.newP4(JU.P4.new4(d.x,d.y,d.z,c))},"~A");b.newMean=c(b,"newMean",function(a,d){for(var h=new JU.V3,b,c,f=a.length;0<=--f;)b=a[f],c=b.div(d),b=c.getNormal(),b.scale(c.getTheta()),h.add(b);h.scale(1/a.length);return JU.Quat.newVA(h,h.length()).mulQ(d)},"~A,JU.Quat");b.stdDev=c(b,"stdDev",function(a,d){for(var h=0,b=a.length,c=b;0<=--c;)var f=a[c].div(d).getTheta(),h=h+f*f;return Math.sqrt(h/b)},"~A,JU.Quat");c(b,"getEulerZYZ",function(){var a,d,h;if(0==this.q1&&0==
this.q2)return a=this.getTheta(),L(-1,[0>this.q3?-a:a,0,0]);a=Math.atan2(2*(this.q2*this.q3+this.q0*this.q1),2*(-this.q1*this.q3+this.q0*this.q2));d=Math.acos(this.q3*this.q3-this.q2*this.q2-this.q1*this.q1+this.q0*this.q0);h=Math.atan2(2*(this.q2*this.q3-this.q0*this.q1),2*(this.q0*this.q2+this.q1*this.q3));return L(-1,[a/0.017453292519943295,d/0.017453292519943295,h/0.017453292519943295])});c(b,"getEulerZXZ",function(){var a,d,h;if(0==this.q1&&0==this.q2)return a=this.getTheta(),L(-1,[0>this.q3?
-a:a,0,0]);a=Math.atan2(2*(this.q1*this.q3-this.q0*this.q2),2*(this.q0*this.q1+this.q2*this.q3));d=Math.acos(this.q3*this.q3-this.q2*this.q2-this.q1*this.q1+this.q0*this.q0);h=Math.atan2(2*(this.q1*this.q3+this.q0*this.q2),2*(-this.q2*this.q3+this.q0*this.q1));return L(-1,[a/0.017453292519943295,d/0.017453292519943295,h/0.017453292519943295])});b.qZero=new JU.P4});n("JU");z(["java.io.BufferedReader","javajs.api.GenericLineReader"],"JU.Rdr","java.io.BufferedInputStream $.ByteArrayInputStream $.InputStreamReader $.StringReader JU.AU $.Base64 $.Encoding $.SB".split(" "),
function(){var b=w(function(){this.reader=null;q(this,arguments)},JU,"Rdr",null,javajs.api.GenericLineReader);x(b,function(a){this.reader=a},"java.io.BufferedReader");g(b,"readNextLine",function(){return this.reader.readLine()});b.readCifData=c(b,"readCifData",function(a,h,b){a.set(null,h,!1);return null==b?a.getAllCifData():a.getAllCifDataType(b)},"javajs.api.GenericCifDataParser,java.io.BufferedReader,~A");b.fixUTF=c(b,"fixUTF",function(a){var h=JU.Rdr.getUTFEncoding(a);if(h!==JU.Encoding.NONE)try{var b=
String.instantialize(a,h.name().$replace("_","-"));switch(h){case JU.Encoding.UTF8:case JU.Encoding.UTF_16BE:case JU.Encoding.UTF_16LE:b=b.substring(1)}return b}catch(c){if(D(c,"java.io.UnsupportedEncodingException"))System.out.println(c);else throw c;}return String.instantialize(a)},"~A");b.getUTFEncoding=c(b,"getUTFEncoding",function(a){return 3<=a.length&&239==(a[0]&255)&&187==(a[1]&255)&&191==(a[2]&255)?JU.Encoding.UTF8:4<=a.length&&0==(a[0]&255)&&0==(a[1]&255)&&254==(a[2]&255)&&255==(a[3]&255)?
JU.Encoding.UTF_32BE:4<=a.length&&255==(a[0]&255)&&254==(a[1]&255)&&0==(a[2]&255)&&0==(a[3]&255)?JU.Encoding.UTF_32LE:2<=a.length&&255==(a[0]&255)&&254==(a[1]&255)?JU.Encoding.UTF_16LE:2<=a.length&&254==(a[0]&255)&&255==(a[1]&255)?JU.Encoding.UTF_16BE:JU.Encoding.NONE},"~A");b.getUTFEncodingForStream=c(b,"getUTFEncodingForStream",function(a){a.resetStream();var h=O(4,0);h[3]=1;try{a.mark(5)}catch(b){if(D(b,Exception))return JU.Encoding.NONE;throw b;}a.read(h,0,4);a.reset();return JU.Rdr.getUTFEncoding(h)},
"java.io.BufferedInputStream");b.isBase64=c(b,"isBase64",function(a){return 0==a.indexOf(";base64,")},"JU.SB");b.isCompoundDocumentS=c(b,"isCompoundDocumentS",function(a){return JU.Rdr.isCompoundDocumentB(JU.Rdr.getMagic(a,8))},"java.io.InputStream");b.isCompoundDocumentB=c(b,"isCompoundDocumentB",function(a){return 8<=a.length&&208==(a[0]&255)&&207==(a[1]&255)&&17==(a[2]&255)&&224==(a[3]&255)&&161==(a[4]&255)&&177==(a[5]&255)&&26==(a[6]&255)&&225==(a[7]&255)},"~A");b.isBZip2S=c(b,"isBZip2S",function(a){return JU.Rdr.isBZip2B(JU.Rdr.getMagic(a,
3))},"java.io.InputStream");b.isGzipS=c(b,"isGzipS",function(a){return JU.Rdr.isGzipB(JU.Rdr.getMagic(a,2))},"java.io.InputStream");b.isBZip2B=c(b,"isBZip2B",function(a){return null!=a&&3<=a.length&&66==(a[0]&255)&&90==(a[1]&255)&&104==(a[2]&255)},"~A");b.isGzipB=c(b,"isGzipB",function(a){return null!=a&&2<=a.length&&31==(a[0]&255)&&139==(a[1]&255)},"~A");b.isPickleS=c(b,"isPickleS",function(a){return JU.Rdr.isPickleB(JU.Rdr.getMagic(a,2))},"java.io.InputStream");b.isPickleB=c(b,"isPickleB",function(a){return null!=
a&&2<=a.length&&125==(a[0]&255)&&113==(a[1]&255)},"~A");b.isMessagePackS=c(b,"isMessagePackS",function(a){return JU.Rdr.isMessagePackB(JU.Rdr.getMagic(a,2))},"java.io.InputStream");b.isMessagePackB=c(b,"isMessagePackB",function(a){var h;return null!=a&&1<=a.length&&(222==(h=a[0]&255)||128==(h&224)&&80!=a[1])},"~A");b.isPngZipStream=c(b,"isPngZipStream",function(a){return JU.Rdr.isPngZipB(JU.Rdr.getMagic(a,55))},"java.io.InputStream");b.isPngZipB=c(b,"isPngZipB",function(a){return 0==a[50]&&80==a[51]&&
78==a[52]&&71==a[53]&&74==a[54]},"~A");b.isZipS=c(b,"isZipS",function(a){return JU.Rdr.isZipB(JU.Rdr.getMagic(a,4))},"java.io.InputStream");b.isZipB=c(b,"isZipB",function(a){return 4<=a.length&&80==a[0]&&75==a[1]&&3==a[2]&&4==a[3]},"~A");b.getMagic=c(b,"getMagic",function(a,h){var b=264<h?O(h,0):null==JU.Rdr.b264?JU.Rdr.b264=O(265,0):JU.Rdr.b264;a.resetStream();try{b[264]=-1,a.mark(h+1),a.read(b,0,h)<h&&(b[0]=b[264]=0)}catch(c){if(!D(c,"java.io.IOException"))throw c;}try{a.reset()}catch(f){if(!D(f,
"java.io.IOException"))throw f;}return b},"java.io.InputStream,~N");b.guessMimeTypeForBytes=c(b,"guessMimeTypeForBytes",function(a){switch(2>a.length?-1:a[1]){case 0:return"image/jpg";case 73:return"image/gif";case 77:return"image/BMP";case 80:return"image/png";default:return"image/unknown"}},"~A");b.getBIS=c(b,"getBIS",function(a){return new java.io.BufferedInputStream(new java.io.ByteArrayInputStream(a))},"~A");b.getBR=c(b,"getBR",function(a){return new java.io.BufferedReader(new java.io.StringReader(a))},
"~S");b.getUnzippedInputStream=c(b,"getUnzippedInputStream",function(a,h){for(;JU.Rdr.isGzipS(h);)h=new java.io.BufferedInputStream(a.newGZIPInputStream(h));return h},"javajs.api.GenericZipTools,java.io.BufferedInputStream");b.getUnzippedInputStreamBZip2=c(b,"getUnzippedInputStreamBZip2",function(a,h){for(;JU.Rdr.isBZip2S(h);)h=new java.io.BufferedInputStream(a.newBZip2InputStream(h));return h},"javajs.api.GenericZipTools,java.io.BufferedInputStream");b.getBytesFromSB=c(b,"getBytesFromSB",function(a){return JU.Rdr.isBase64(a)?
JU.Base64.decodeBase64(a.substring(8)):a.toBytes(0,-1)},"JU.SB");b.getStreamAsBytes=c(b,"getStreamAsBytes",function(a,h){for(var b=O(1024,0),c=null==h?O(4096,0):null,f=0,j=0;0<(f=a.read(b,0,1024));)j+=f,null==h?(j>=c.length&&(c=JU.AU.ensureLengthByte(c,2*j)),System.arraycopy(b,0,c,j-f,f)):h.write(b,0,f);a.close();return null==h?JU.AU.arrayCopyByte(c,j):j+" bytes"},"java.io.BufferedInputStream,JU.OC");b.getBufferedReader=c(b,"getBufferedReader",function(a,h){if(JU.Rdr.getUTFEncodingForStream(a)===
JU.Encoding.NONE)return new JU.Rdr.StreamReader(a,h);var b=JU.Rdr.getLimitedStreamBytes(a,-1);a.close();return JU.Rdr.getBR(null==h?JU.Rdr.fixUTF(b):String.instantialize(b,h))},"java.io.BufferedInputStream,~S");b.getLimitedStreamBytes=c(b,"getLimitedStreamBytes",function(a,h){var b=0<h&&1024>h?h:1024,c=O(b,0),f=O(0>h?4096:h,0),j=0,k=0;for(0>h&&(h=2147483647);k<h&&0<(j=a.read(c,0,b));)k+=j,k>f.length&&(f=JU.AU.ensureLengthByte(f,2*k)),System.arraycopy(c,0,f,k-j,j),2147483647!=h&&k+b>f.length&&(b=f.length-
k);if(k==f.length)return f;c=O(k,0);System.arraycopy(f,0,c,0,k);return c},"java.io.InputStream,~N");b.streamToUTF8String=c(b,"streamToUTF8String",function(a){var h=Array(1);try{JU.Rdr.readAllAsString(JU.Rdr.getBufferedReader(a,"UTF-8"),-1,!0,h,0)}catch(b){if(!D(b,"java.io.IOException"))throw b;}return h[0]},"java.io.BufferedInputStream");b.readAllAsString=c(b,"readAllAsString",function(a,h,b,c,f){try{var j=JU.SB.newN(8192),k;if(0>h){if(k=a.readLine(),b||null!=k&&0>k.indexOf("\x00")&&(4!=k.length||
65533!=k.charAt(0).charCodeAt(0)||1!=k.indexOf("PNG")))for(j.append(k).appendC("\n");null!=(k=a.readLine());)j.append(k).appendC("\n")}else{b=0;for(var l;b<h&&null!=(k=a.readLine());){if(h-b<(l=k.length)+1)k=k.substring(0,h-b-1);j.append(k).appendC("\n");b+=l+1}}a.close();c[f]=j.toString();return!0}catch(g){if(D(g,Exception))return c[f]=g.toString(),!1;throw g;}},"java.io.BufferedReader,~N,~B,~A,~N");b.getPngZipPointAndCount=c(b,"getPngZipPointAndCount",function(a,h){a.mark(75);try{var b=JU.Rdr.getLimitedStreamBytes(a,
74);a.reset();for(var c=0,f=64,j=1;54<--f;j*=10)c+=(b[f]-48)*j;for(var k=0,f=74,j=1;64<--f;j*=10)k+=(b[f]-48)*j;h[0]=c;h[1]=k}catch(l){h[1]=0}},"java.io.BufferedInputStream,~A");b.getPngZipStream=c(b,"getPngZipStream",function(a,h){if(!JU.Rdr.isPngZipStream(a))return a;var b=O(0,0);a.mark(75);try{var c=E(2,0);JU.Rdr.getPngZipPointAndCount(a,c);if(0!=c[1]){for(var f=c[0];0<f;)f-=a.skip(f);if(!h)return a;b=JU.Rdr.getLimitedStreamBytes(a,c[1])}}catch(j){}finally{try{h&&a.close()}catch(k){if(!D(k,Exception))throw k;
}}return JU.Rdr.getBIS(b)},"java.io.BufferedInputStream,~B");b.getZipRoot=c(b,"getZipRoot",function(a){var h=a.indexOf("|");return 0>h?a:a.substring(0,h)},"~S");b.isTar=c(b,"isTar",function(a){a=JU.Rdr.getMagic(a,264);return-1==a[264]&&117==(a[257]&255)&&115==(a[258]&255)&&116==(a[259]&255)&&97==(a[260]&255)&&114==(a[261]&255)},"java.io.BufferedInputStream");b.streamToBytes=c(b,"streamToBytes",function(a){var h=JU.Rdr.getLimitedStreamBytes(a,-1);a.close();return h},"java.io.InputStream");b.streamToString=
c(b,"streamToString",function(a){return String.instantialize(JU.Rdr.streamToBytes(a))},"java.io.InputStream");b.isBinary=c(b,"isBinary",function(a,h){var b=JU.Rdr.getMagic(a,h);if(-1==JU.Rdr.b264[264])for(var c=0;c<h;c++)if(9>b[c])return!0;return!1},"java.io.BufferedInputStream,~N");var a=w(function(){this.stream=null;q(this,arguments)},JU.Rdr,"StreamReader",java.io.BufferedReader);x(a,function(a,h){I(this,JU.Rdr.StreamReader,[new java.io.InputStreamReader(a,null==h?"UTF-8":h)]);this.stream=a},"java.io.BufferedInputStream,~S");
c(a,"getStream",function(){try{this.stream.reset()}catch(a){if(!D(a,"java.io.IOException"))throw a;}return this.stream});b.b264=null});n("JU");var ca=w(function(){this.z=this.y=this.x=0;q(this,arguments)},JU,"T3d",null,java.io.Serializable);c(ca,"set",function(b,a,d){this.x=b;this.y=a;this.z=d},"~N,~N,~N");c(ca,"setA",function(b){this.x=b[0];this.y=b[1];this.z=b[2]},"~A");c(ca,"setT",function(b){this.x=b.x;this.y=b.y;this.z=b.z},"JU.T3d");c(ca,"add2",function(b,a){this.x=b.x+a.x;this.y=b.y+a.y;this.z=
b.z+a.z},"JU.T3d,JU.T3d");c(ca,"add",function(b){this.x+=b.x;this.y+=b.y;this.z+=b.z},"JU.T3d");c(ca,"sub2",function(b,a){this.x=b.x-a.x;this.y=b.y-a.y;this.z=b.z-a.z},"JU.T3d,JU.T3d");c(ca,"sub",function(b){this.x-=b.x;this.y-=b.y;this.z-=b.z},"JU.T3d");c(ca,"scale",function(b){this.x*=b;this.y*=b;this.z*=b},"~N");c(ca,"scaleAdd",function(b,a,d){this.x=b*a.x+d.x;this.y=b*a.y+d.y;this.z=b*a.z+d.z},"~N,JU.T3d,JU.T3d");c(ca,"scaleAdd2",function(b,a,d){this.x=b*a.x+d.x;this.y=b*a.y+d.y;this.z=b*a.z+
d.z},"~N,JU.T3d,JU.T3d");g(ca,"hashCode",function(){var b=JU.T3d.doubleToLongBits0(this.x),a=JU.T3d.doubleToLongBits0(this.y),d=JU.T3d.doubleToLongBits0(this.z);return b^b>>32^a^a>>32^d^d>>32});ca.doubleToLongBits0=c(ca,"doubleToLongBits0",function(b){return 0==b?0:Double.doubleToLongBits(b)},"~N");g(ca,"equals",function(b){return!C(b,"JU.T3d")?!1:this.x==b.x&&this.y==b.y&&this.z==b.z},"~O");g(ca,"toString",function(){return"{"+this.x+", "+this.y+", "+this.z+"}"});n("JU");z(["JU.T3d"],"JU.V3d",null,
function(){var b=G(JU,"V3d",JU.T3d);c(b,"cross",function(a,d){this.set(a.y*d.z-a.z*d.y,a.z*d.x-a.x*d.z,a.x*d.y-a.y*d.x)},"JU.V3d,JU.V3d");c(b,"normalize",function(){var a=this.length();this.x/=a;this.y/=a;this.z/=a});c(b,"angle",function(a){var d=this.y*a.z-this.z*a.y,h=this.z*a.x-this.x*a.z,b=this.x*a.y-this.y*a.x,d=Math.sqrt(d*d+h*h+b*b);return Math.abs(Math.atan2(d,this.dot(a)))},"JU.V3d");c(b,"dot",function(a){return this.x*a.x+this.y*a.y+this.z*a.z},"JU.V3d");c(b,"lengthSquared",function(){return this.x*
this.x+this.y*this.y+this.z*this.z});c(b,"length",function(){return Math.sqrt(this.lengthSquared())})});n("J.adapter.readers.molxyz");z(["J.adapter.smarter.AtomSetCollectionReader"],"J.adapter.readers.molxyz.MolReader","java.util.Hashtable JU.BS $.Lst $.PT J.adapter.smarter.Atom J.api.JmolAdapter JU.Logger".split(" "),function(){var b=w(function(){this.haveAtomSerials=!1;this.allow2D=!0;this.iatom0=0;this.vr=null;this.atomCount=0;this.bsDeleted=this.atomData=null;this.is3D=this.fixN=this.haveNonzeroZ=
!1;this.nC=this.nH=this.nDouble=0;q(this,arguments)},J.adapter.readers.molxyz,"MolReader",J.adapter.smarter.AtomSetCollectionReader);g(b,"initializeReader",function(){this.fixN=this.checkFilterKey("FIXN")});g(b,"checkLine",function(){var a=this.line.startsWith("$MDL");if(a){if(this.discardLinesUntilStartsWith("$HDR"),this.rd(),null==this.line)return JU.Logger.warn("$HDR not found in MDL RG file"),this.continuing=!1}else if(this.line.equals("M  END"))return!0;if(this.doGetModel(++this.modelNumber,
null)&&(this.iatom0=this.asc.ac,this.processMolSdHeader(),this.processCtab(a),this.vr=null,this.isLastModel(this.modelNumber)))return this.continuing=!1;null!=this.line&&0>this.line.indexOf("$$$$")&&this.discardLinesUntilStartsWith("$$$$");return!0});g(b,"finalizeSubclassReader",function(){this.finalizeReaderMR()});c(b,"finalizeReaderMR",function(){this.fixN&&this.addJmolScript("{search('[Nv4+0,nv4+0]')}.formalCharge=1;{search('{[Ov1-0]}[Nv4+1,nv4+1]')}.formalCharge=-1;");this.check2D3D();null!=this.bsDeleted&&
this.asc.getBSAtoms(-1).andNot(this.bsDeleted);this.isTrajectory=!1;this.finalizeReaderASCR()});c(b,"check2D3D",function(){this.haveNonzeroZ?this.is2D&&(this.is2D=this.optimize2D=!1):!this.is2D&&!this.is3D&&(0<this.nC&&0==this.nH&&0!=this.nDouble)&&(this.is2D=!0);if(this.is2D){if(!this.allow2D)throw new Exception("File is 2D, not 3D");this.set2D()}});c(b,"processMolSdHeader",function(){var a=this.line.trim();this.asc.setCollectionName(a);var d=this.line+"\n";this.rd();if(null!=this.line){var d=d+
(this.line+"\n"),h=22<=this.line.length?this.line.substring(20,22):null;this.is3D="3D".equals(h);this.is2D=!this.is3D&&("2D".equals(h)||this.line.startsWith("JME "));this.rd();null!=this.line&&(this.line=this.line.trim(),d+=this.line+"\n",JU.Logger.info(d),this.checkCurrentLineForScript(),this.asc.setInfo("fileHeader",d),this.newAtomSet(a))}});c(b,"processCtab",function(a){a&&this.discardLinesUntilStartsWith("$CTAB");null!=this.rd()&&(0<=this.line.indexOf("V3000")?(this.optimize2D=this.is2D&&!this.noHydrogens,
this.vr=this.getInterface("J.adapter.readers.molxyz.V3000Rdr").set(this),this.discardLinesUntilContains("COUNTS"),this.vr.readAtomsAndBonds(this.getTokens())):this.readAtomsAndBonds(this.parseIntRange(this.line,0,3),this.parseIntRange(this.line,3,6)),this.applySymmetryAndSetTrajectory())},"~B");c(b,"readAtomsAndBonds",function(a,d){this.atomCount=a;for(var h=0;h<a;++h){this.rd();var b=this.line.length,c,f,j,k,l=0,g=0,m=-2147483648;f=this.parseFloatRange(this.line,0,10);j=this.parseFloatRange(this.line,
10,20);k=this.parseFloatRange(this.line,20,30);34>b?c=this.line.substring(31).trim():(c=this.line.substring(31,34).trim(),c.equals("H1")&&(c="H",g=1),39<=b&&(b=this.parseIntRange(this.line,36,39),1<=b&&7>=b&&(l=4-b),b=this.parseIntRange(this.line,34,36),0!=b&&(-3<=b&&4>=b)&&(g=J.api.JmolAdapter.getNaturalIsotope(J.api.JmolAdapter.getElementNumber(c))+b),-2147483648==m&&this.haveAtomSerials&&(m=h+1)));this.addMolAtom(m,g,c,l,f,j,k)}this.asc.setModelInfoForSet("dimension",this.is2D?"2D":"3D",this.asc.iSet);
this.rd();this.line.startsWith("V  ")&&this.readAtomValues();0==d&&this.asc.setNoAutoBond();for(h=0;h<d;++h)0<h&&this.rd(),j=0,c=this.line.substring(0,3).trim(),f=this.line.substring(3,6).trim(),k=this.parseIntRange(this.line,6,9),1==k&&12<=this.line.length&&(j=this.parseIntRange(this.line,9,12)),0!=j&&!this.is3D&&(this.is2D=!0),k=this.fixOrder(k,j),this.haveAtomSerials?this.asc.addNewBondFromNames(c,f,k):this.asc.addNewBondWithOrder(this.iatom0+this.parseIntStr(c)-1,this.iatom0+this.parseIntStr(f)-
1,k);h=new java.util.Hashtable;c=new JU.Lst;for(this.rd();null!=this.line&&0!=this.line.indexOf("$$$$");)0==this.line.indexOf(">")?this.readMolData(h,c):this.line.startsWith("M  ISO")?this.readIsotopes():this.line.startsWith("M  CHG")?this.readCharges():this.rd();null!=this.atomData&&(f=h.get("atom_value_name"),h.put(null==f?"atom_values":f.toString(),this.atomData));h.isEmpty()||(this.asc.setCurrentModelInfo("molDataKeys",c),this.asc.setCurrentModelInfo("molData",h))},"~N,~N");c(b,"readAtomValues",
function(){this.atomData=Array(this.atomCount);for(var a=this.atomData.length;0<=--a;)this.atomData[a]="";for(;0==this.line.indexOf("V  ");){a=this.parseIntAt(this.line,3);if(1>a||a>this.atomCount){JU.Logger.error("V  nnn does not evalute to a valid atom number: "+a);break}var d=this.line.substring(6).trim();this.atomData[a-1]=d;this.rd()}});c(b,"readIsotopes",function(){try{for(var a=this.parseIntAt(this.line,6),d=this.asc.getLastAtomSetAtomIndex(),h=0,b=9;h<a;h++){var c=this.parseIntAt(this.line,
b),f=this.asc.atoms[c+d-1],j=this.parseIntAt(this.line,b+4),b=b+8,k=JU.PT.replaceAllCharacters(f.elementSymbol,"0123456789","");17==j&&k.equals("C")?f.elementSymbol="N":5==j&&k.equals("H")?this.deleteAtom(f):f.elementSymbol=""+j+k}}catch(l){}this.rd()});c(b,"readCharges",function(){try{for(var a=this.parseIntAt(this.line,6),d=this.asc.getLastAtomSetAtomIndex(),h=this.asc.ac;--h>=d;)this.asc.atoms[h].formalCharge=0;for(var h=0,b=9;h<a;h++,b+=8)this.asc.atoms[this.parseIntAt(this.line,b)+d-1].formalCharge=
this.parseIntAt(this.line,b+4)}catch(c){}this.rd()});c(b,"deleteAtom",function(a){null==this.bsDeleted&&(this.bsDeleted=new JU.BS);this.bsDeleted.set(a.index)},"J.adapter.smarter.Atom");c(b,"readMolData",function(a,d){for(var h=this.asc.atoms,b=JU.PT.trim(this.line,"> <").toLowerCase(),c="",f=null;null!=this.rd()&&!this.line.equals("$$$$")&&0<this.line.length;)c+=81==this.line.length&&"+"==this.line.charAt(80)?this.line.substring(0,80):this.line+"\n";c=JU.PT.trim(c,"\n");JU.Logger.info(b+":"+JU.PT.esc(c));
a.put(b,c);d.addLast(b);var j=0;if(b.toUpperCase().contains("_PARTIAL_CHARGES")){try{for(var f=JU.PT.parseFloatArray(c),k=this.asc.getLastAtomSetAtomIndex(),l=this.asc.ac;k<l;k++)h[k].partialCharge=0;for(var g=0,k=F(f[g++]);0<=--k;){var m=F(f[g++])+this.iatom0-1,p=f[g++];h[m].partialCharge=p;j++}}catch(y){k=this.asc.getLastAtomSetAtomIndex();for(l=this.asc.ac;k<l;k++)h[k].partialCharge=0;JU.Logger.error("error reading "+b+" field -- partial charges cleared")}JU.Logger.info(j+" partial charges read")}else if(b.toUpperCase().contains("ATOM_NAMES")){j=
0;try{for(var A=JU.PT.getTokens(c),g=0,k=this.parseIntStr(A[g++]);0<=--k;){for(var H;-2147483648==(H=this.parseIntStr(A[g++])););var m=H+this.iatom0-1,M=A[g++];M.equals(".")||(h[m].atomName=M);j++}}catch(v){JU.Logger.error("error reading "+b+" field")}JU.Logger.info(j+" atom names read")}},"java.util.Map,JU.Lst");c(b,"addMolAtom",function(a,d,h,b,c,f,j){"H".equals(h)?this.nH++:"C".equals(h)&&this.nC++;this.haveNonzeroZ=(new Boolean(this.haveNonzeroZ|0.001<Math.abs(j))).valueOf();switch(d){case 0:break;
case 1:h="1H";break;case 2:h="2H";break;case 3:h="3H";break;default:h=d+h}d=new J.adapter.smarter.Atom;d.elementSymbol=h;d.formalCharge=b;this.setAtomCoordXYZ(d,c,f,j);-2147483648==a?this.asc.addAtom(d):(this.haveAtomSerials=!0,d.atomSerial=a,this.asc.addAtomWithMappedSerialNumber(d));return d},"~N,~N,~S,~N,~N,~N,~N");c(b,"fixOrder",function(a,d){switch(a){default:case 0:case -10:return 1;case 1:switch(d){case 1:return this.is2D=!0,1025;case 3:case 6:return this.is2D=!0,1041;case 2:case 4:return this.is2D=
!0,1057}break;case 2:case 3:this.nDouble++;break;case 4:return 515;case 5:return 66;case 6:return 513;case 7:return 514;case 8:case 9:return 33;case 14:return 4;case 15:return 5;case 16:return 6}return a},"~N,~N");c(b,"addMolBond",function(a,d,h,b){h=this.fixOrder(h,b);return this.haveAtomSerials?this.asc.addNewBondFromNames(a,d,h):this.asc.addNewBondWithOrder(this.iatom0+this.parseIntStr(a)-1,this.iatom0+this.parseIntStr(d)-1,h)},"~S,~S,~N,~N")});n("J.adapter.readers.molxyz");z(["J.adapter.smarter.AtomSetCollectionReader"],
"J.adapter.readers.molxyz.XyzReader",["JU.Logger"],function(){var b=G(J.adapter.readers.molxyz,"XyzReader",J.adapter.smarter.AtomSetCollectionReader);g(b,"checkLine",function(){var a=this.parseIntStr(this.line);if(-2147483648==a)return this.continuing=!1;this.vibrationNumber=++this.modelNumber;if(0>=this.desiredVibrationNumber?this.doGetModel(this.modelNumber,null):this.doGetVibration(this.vibrationNumber)){this.rd();this.checkCurrentLineForScript();this.asc.newAtomSet();var d=this.line.trim();this.readAtoms(a);
this.applySymmetryAndSetTrajectory();this.asc.setAtomSetName(d);if(this.isLastModel(this.modelNumber))return this.continuing=!1}else this.skipAtomSet(a);this.discardLinesUntilNonBlank();return!1});g(b,"finalizeSubclassReader",function(){this.isTrajectory=!1;this.finalizeReaderASCR()});c(b,"skipAtomSet",function(a){for(this.rd();0<=--a;)this.rd()},"~N");c(b,"readAtoms",function(a){for(var d=0;d<a;++d){this.rd();var h=this.getTokens();if(4>h.length)JU.Logger.warn("line cannot be read for XYZ atom data: "+
this.line);else{var b=this.addAtomXYZSymName(h,1,null,null);this.setElementAndIsotope(b,h[0]);var c=4;switch(h.length){case 4:continue;case 5:case 6:case 8:case 9:if(0<=h[4].indexOf("."))b.partialCharge=this.parseFloatStr(h[4]);else{var f=this.parseIntStr(h[4]);-2147483648!=f&&(b.formalCharge=f)}switch(h.length){case 5:continue;case 6:b.radius=this.parseFloatStr(h[5]);continue;case 9:b.atomSerial=this.parseIntStr(h[8])}c++;default:var f=this.parseFloatStr(h[c++]),j=this.parseFloatStr(h[c++]),h=this.parseFloatStr(h[c++]);
if(Float.isNaN(f)||Float.isNaN(j)||Float.isNaN(h))continue;this.asc.addVibrationVector(b.index,f,j,h)}}}},"~N")});n("J.adapter.smarter");z(["JU.P3"],"J.adapter.smarter.Atom",["JU.AU","$.Lst","$.V3"],function(){var b=w(function(){this.index=this.atomSetIndex=0;this.bsSymmetry=null;this.atomSite=0;this.elementSymbol=null;this.elementNumber=-1;this.atomName=null;this.formalCharge=-2147483648;this.partialCharge=NaN;this.vib=null;this.bfactor=NaN;this.foccupancy=1;this.radius=NaN;this.isHetero=!1;this.atomSerial=
-2147483648;this.chainID=0;this.bondingRadius=NaN;this.altLoc="\x00";this.group3=null;this.sequenceNumber=-2147483648;this.insertionCode="\x00";this.typeSymbol=this.tensors=this.anisoBorU=null;this.part=0;q(this,arguments)},J.adapter.smarter,"Atom",JU.P3,Cloneable);x(b,function(){I(this,J.adapter.smarter.Atom,[]);this.set(NaN,NaN,NaN)});c(b,"addTensor",function(a,d,h){if(null==a)return null;if(h||null==this.tensors)this.tensors=new JU.Lst;this.tensors.addLast(a);null!=d&&a.setType(d);return a},"JU.Tensor,~S,~B");
c(b,"getClone",function(){var a;try{a=this.clone()}catch(d){if(D(d,"CloneNotSupportedException"))return null;throw d;}null!=this.vib&&(a.vib=C(this.vib,"JU.Vibration")?this.vib.clone():JU.V3.newV(a.vib));null!=this.anisoBorU&&(a.anisoBorU=JU.AU.arrayCopyF(this.anisoBorU,-1));if(null!=this.tensors){a.tensors=new JU.Lst;for(var h=this.tensors.size();0<=--h;)a.tensors.addLast(this.tensors.get(h).copyTensor())}return a});c(b,"getElementSymbol",function(){if(null==this.elementSymbol&&null!=this.atomName){for(var a=
this.atomName.length,d=0,h=String.fromCharCode(0);d<a&&!J.adapter.smarter.Atom.isValidSymChar1(h=this.atomName.charAt(d));)++d;switch(a-d){case 0:break;default:if(a=this.atomName.charAt(d+1),J.adapter.smarter.Atom.isValidSymNoCase(h,a)){this.elementSymbol=""+h+a;break}case 1:J.adapter.smarter.Atom.isValidSym1(h)&&(this.elementSymbol=""+h)}}return this.elementSymbol});b.isValidSym1=c(b,"isValidSym1",function(a){return"A"<=a&&"Z">=a&&0>J.adapter.smarter.Atom.elementCharMasks[a.charCodeAt(0)-65]},"~S");
b.isValidSym2=c(b,"isValidSym2",function(a,d){return"A"<=a&&"Z">=a&&"a"<=d&&"z">=d&&0!=(J.adapter.smarter.Atom.elementCharMasks[a.charCodeAt(0)-65]>>d.charCodeAt(0)-97&1)},"~S,~S");b.isValidSymNoCase=c(b,"isValidSymNoCase",function(a,d){return J.adapter.smarter.Atom.isValidSym2(a,"a">d?String.fromCharCode(d.charCodeAt(0)+32):d)},"~S,~S");b.isValidSymChar1=c(b,"isValidSymChar1",function(a){return"A"<=a&&"Z">=a&&0!=J.adapter.smarter.Atom.elementCharMasks[a.charCodeAt(0)-65]},"~S");c(b,"copyTo",function(a,
d){var h=d.newCloneAtom(this);h.setT(a);return h},"JU.P3,J.adapter.smarter.AtomSetCollection");b.elementCharMasks=E(-1,[1972292,-2147351151,-2146019271,-2130706430,1441792,-2147348464,25,-2147205008,-2147344384,0,-2147352576,1179905,548936,-2147434213,-2147221504,-2145759221,0,1056947,-2147339946,-2147477097,-2147483648,-2147483648,-2147483648,8388624,-2147483646,139264])});n("J.adapter.smarter");z(["J.api.JmolAdapterAtomIterator"],"J.adapter.smarter.AtomIterator",["J.api.JmolAdapter"],function(){var b=
w(function(){this.iatom=0;this.atom=null;this.ac=0;this.bsAtoms=this.atoms=null;q(this,arguments)},J.adapter.smarter,"AtomIterator",null,J.api.JmolAdapterAtomIterator);x(b,function(a){this.ac=a.ac;this.atoms=a.atoms;this.bsAtoms=a.bsAtoms;this.iatom=0},"J.adapter.smarter.AtomSetCollection");g(b,"hasNext",function(){if(this.iatom==this.ac)return!1;for(;null==(this.atom=this.atoms[this.iatom++])||null!=this.bsAtoms&&!this.bsAtoms.get(this.atom.index);)if(this.iatom==this.ac)return!1;this.atoms[this.iatom-
1]=null;return!0});g(b,"getAtomSetIndex",function(){return this.atom.atomSetIndex});g(b,"getSymmetry",function(){return this.atom.bsSymmetry});g(b,"getAtomSite",function(){return this.atom.atomSite+1});g(b,"getUniqueID",function(){return Integer.$valueOf(this.atom.index)});g(b,"getElementNumber",function(){return 0<this.atom.elementNumber?this.atom.elementNumber:J.api.JmolAdapter.getElementNumber(this.atom.getElementSymbol())});g(b,"getAtomName",function(){return this.atom.atomName});g(b,"getFormalCharge",
function(){return-2147483648==this.atom.formalCharge?0:this.atom.formalCharge});g(b,"getPartialCharge",function(){return this.atom.partialCharge});g(b,"getTensors",function(){return this.atom.tensors});g(b,"getRadius",function(){return this.atom.radius});g(b,"getBondRadius",function(){return this.atom.bondingRadius});g(b,"getVib",function(){return null==this.atom.vib||Float.isNaN(this.atom.vib.z)?null:this.atom.vib});g(b,"getSeqID",function(){return null==this.atom.vib||!Float.isNaN(this.atom.vib.y)||
1094713365!=this.atom.vib.z?0:F(this.atom.vib.x)});g(b,"getBfactor",function(){return this.atom.bfactor});g(b,"getOccupancy",function(){return 100*this.atom.foccupancy});g(b,"getIsHetero",function(){return this.atom.isHetero});g(b,"getSerial",function(){return this.atom.atomSerial});g(b,"getChainID",function(){return this.atom.chainID});g(b,"getAltLoc",function(){return J.api.JmolAdapter.canonizeAlternateLocationID(this.atom.altLoc)});g(b,"getGroup3",function(){return this.atom.group3});g(b,"getSequenceNumber",
function(){return this.atom.sequenceNumber});g(b,"getInsertionCode",function(){return J.api.JmolAdapter.canonizeInsertionCode(this.atom.insertionCode)});g(b,"getXYZ",function(){return this.atom});g(b,"getElement",function(){return this.getElementNumber()&127});g(b,"getIsotope",function(){return this.getElementNumber()>>7});g(b,"getPart",function(){return this.atom.part})});n("J.adapter.smarter");z(["java.util.Hashtable"],"J.adapter.smarter.AtomSetCollection","java.util.Collections $.Properties JU.AU $.BS $.Lst $.P3 $.V3 J.adapter.smarter.Atom $.Bond $.SmarterJmolAdapter J.api.Interface JU.BSUtil $.Logger JV.JC".split(" "),
function(){var b=w(function(){this.atoms=this.atomSetInfo=this.collectionName=this.fileTypeName=this.bsAtoms=this.reader=null;this.ac=0;this.bonds=null;this.bondCount=0;this.structures=null;this.atomSetCount=this.structureCount=0;this.iSet=-1;this.errorMessage=this.atomSetAuxiliaryInfo=this.atomSetBondCounts=this.atomSetAtomCounts=this.atomSetAtomIndexes=this.atomSetNumbers=null;this.isTrajectory=this.coordinatesAreFractional=!1;this.trajectoryStepCount=0;this.trajectoryNames=this.vibrationSteps=
this.trajectorySteps=null;this.allowMultiple=this.doFixPeriodic=!1;this.readerList=null;this.atomMapAnyCase=!1;this.fixedSite=0;this.bsStructuredModels=null;this.haveAnisou=!1;this.baseSymmetryAtomCount=0;this.crystalReaderLatticeOpsOnly=!1;this.xtalSymmetry=null;this.bondIndex0=0;this.atomSymbolicMap=null;this.haveUnitCell=!1;this.vibScale=0;this.firstAtomToBond=-1;q(this,arguments)},J.adapter.smarter,"AtomSetCollection",null);N(b,function(){this.atomSetInfo=new java.util.Hashtable;this.atoms=Array(256);
this.bonds=Array(256);this.structures=Array(16);this.atomSetNumbers=E(16,0);this.atomSetAtomIndexes=E(16,0);this.atomSetAtomCounts=E(16,0);this.atomSetBondCounts=E(16,0);this.atomSetAuxiliaryInfo=Array(16);this.atomSymbolicMap=new java.util.Hashtable});x(b,function(a,d,h,b){this.fileTypeName=a;this.reader=d;this.allowMultiple=null==d||0>d.desiredVibrationNumber;a=new java.util.Properties;a.put("PATH_KEY",".PATH");a.put("PATH_SEPARATOR",J.adapter.smarter.SmarterJmolAdapter.PATH_SEPARATOR);this.setInfo("properties",
a);null!=d&&(a=d.htParams.get("appendToModelIndex"),null!=a&&this.setInfo("appendToModelIndex",a),a=d.htParams.get("fixedSite"),null!=a&&(this.fixedSite=a.intValue()));if(null!=h){d=0;this.readerList=new JU.Lst;for(b=0;b<h.length;b++)null!=h[b]&&(0<h[b].ac||null!=h[b].reader&&h[b].reader.mustFinalizeModelSet)&&this.appendAtomSetCollection(d++,h[b]);1<d&&this.setInfo("isMultiFile",Boolean.TRUE)}else null!=b&&(this.setInfo("isMultiFile",Boolean.TRUE),this.appendAtomSetCollectionList(b))},"~S,J.adapter.smarter.AtomSetCollectionReader,~A,JU.Lst");
c(b,"setCollectionName",function(a){if(null!=a&&0<(a=a.trim()).length)this.collectionName=a},"~S");c(b,"clearGlobalBoolean",function(a){this.atomSetInfo.remove(JV.JC.getBoolName(a))},"~N");c(b,"setGlobalBoolean",function(a){this.setInfo(JV.JC.getBoolName(a),Boolean.TRUE)},"~N");c(b,"getGlobalBoolean",function(a){return this.atomSetInfo.get(JV.JC.getBoolName(a))===Boolean.TRUE},"~N");c(b,"appendAtomSetCollectionList",function(a){var d=a.size();if(0==d)this.errorMessage="No file found!";else for(var h=
0;h<d;h++){var b=a.get(h);C(b,"JU.Lst")?this.appendAtomSetCollectionList(b):this.appendAtomSetCollection(h,b)}},"JU.Lst");c(b,"setTrajectory",function(){this.isTrajectory||(this.trajectorySteps=new JU.Lst);this.isTrajectory=!0;var a=null==this.bsAtoms?this.ac:this.bsAtoms.cardinality();if(!(1>=a)){for(var d=Array(a),h=0<a&&null!=this.atoms[0].vib&&!Float.isNaN(this.atoms[0].vib.z),a=h?Array(a):null,b=0==this.trajectoryStepCount?null:this.trajectorySteps.get(this.trajectoryStepCount-1),c=0,f=0;c<this.ac;c++)if(null==
this.bsAtoms||this.bsAtoms.get(c)){var j=JU.P3.newP(this.atoms[c]);this.doFixPeriodic&&null!=b&&(j=J.adapter.smarter.AtomSetCollection.fixPeriodic(j,b[c]));d[f]=j;h&&(a[f]=this.atoms[c].vib);f++}if(h){if(null==this.vibrationSteps){this.vibrationSteps=new JU.Lst;for(c=0;c<this.trajectoryStepCount;c++)this.vibrationSteps.addLast(null)}this.vibrationSteps.addLast(a)}this.trajectorySteps.addLast(d);this.trajectoryStepCount++}});c(b,"appendAtomSetCollection",function(a,d){null!=d.reader&&d.reader.mustFinalizeModelSet&&
this.readerList.addLast(d.reader);var h=this.ac;this.setInfo("loadState",d.atomSetInfo.get("loadState"));if(null!=d.bsAtoms){this.getBSAtoms(0);for(var b=d.bsAtoms.nextSetBit(0);0<=b;b=d.bsAtoms.nextSetBit(b+1))this.bsAtoms.set(h+b)}for(var b=0,c=this.atomSetCount,f=0;f<d.atomSetCount;f++){this.newAtomSet();var j=(this.atomSetAuxiliaryInfo[this.iSet]=d.atomSetAuxiliaryInfo[f]).get("PDB_CONECT_firstAtom_count_max");null!=j&&(j[0]+=h);this.setCurrentModelInfo("title",d.collectionName);this.setAtomSetName(d.getAtomSetName(f));
for(j=0;j<d.atomSetAtomCounts[f];j++)null!=this.bsAtoms&&this.bsAtoms.set(this.ac),this.newCloneAtom(d.atoms[b]),b++;this.atomSetNumbers[this.iSet]=0>a?this.iSet+1:1E6*(a+1)+d.atomSetNumbers[f]}for(b=0;b<d.bondCount;b++)f=d.bonds[b],this.addNewBondWithOrder(f.atomIndex1+h,f.atomIndex2+h,f.order);for(b=JV.JC.globalBooleans.length;0<=--b;)d.getGlobalBoolean(b)&&this.setGlobalBoolean(b);for(b=0;b<d.structureCount;b++)h=d.structures[b],this.addStructure(h),h.modelStartEnd[0]+=c,h.modelStartEnd[1]+=c},
"~N,J.adapter.smarter.AtomSetCollection");c(b,"setNoAutoBond",function(){this.setInfo("noAutoBond",Boolean.TRUE)});c(b,"freeze",function(a){1==this.atomSetCount&&null==this.collectionName&&(this.collectionName=this.getAtomSetAuxiliaryInfoValue(0,"name"));a&&this.reverseAtomSets();1<this.trajectoryStepCount&&this.finalizeTrajectory();this.getList(!0);this.getList(!1);for(a=0;a<this.atomSetCount;a++)this.setModelInfoForSet("initialAtomCount",Integer.$valueOf(this.atomSetAtomCounts[a]),a),this.setModelInfoForSet("initialBondCount",
Integer.$valueOf(this.atomSetBondCounts[a]),a)},"~B");c(b,"reverseAtomSets",function(){this.reverseArray(this.atomSetAtomIndexes);this.reverseArray(this.atomSetNumbers);this.reverseArray(this.atomSetAtomCounts);this.reverseArray(this.atomSetBondCounts);J.adapter.smarter.AtomSetCollection.reverseList(this.trajectorySteps);J.adapter.smarter.AtomSetCollection.reverseList(this.trajectoryNames);J.adapter.smarter.AtomSetCollection.reverseList(this.vibrationSteps);this.reverseObject(this.atomSetAuxiliaryInfo);
for(var a=0;a<this.ac;a++)this.atoms[a].atomSetIndex=this.atomSetCount-1-this.atoms[a].atomSetIndex;for(a=0;a<this.structureCount;a++){var d=this.structures[a].modelStartEnd[0];0<=d&&(this.structures[a].modelStartEnd[0]=this.atomSetCount-1-this.structures[a].modelStartEnd[1],this.structures[a].modelStartEnd[1]=this.atomSetCount-1-d)}for(a=0;a<this.bondCount;a++)this.bonds[a].atomSetIndex=this.atomSetCount-1-this.atoms[this.bonds[a].atomIndex1].atomSetIndex;this.reverseSets(this.bonds,this.bondCount);
for(var h=JU.AU.createArrayOfArrayList(this.atomSetCount),a=0;a<this.atomSetCount;a++)h[a]=new JU.Lst;for(a=0;a<this.ac;a++)h[this.atoms[a].atomSetIndex].addLast(this.atoms[a]);for(var d=E(this.ac,0),b=this.ac,a=this.atomSetCount;0<=--a;)for(var c=h[a].size();0<=--c;){var f=this.atoms[--b]=h[a].get(c);d[f.index]=b;f.index=b}for(a=0;a<this.bondCount;a++)this.bonds[a].atomIndex1=d[this.bonds[a].atomIndex1],this.bonds[a].atomIndex2=d[this.bonds[a].atomIndex2];for(a=0;a<this.atomSetCount;a++)h=this.getAtomSetAuxiliaryInfoValue(a,
"PDB_CONECT_firstAtom_count_max"),null!=h&&(h[0]=d[h[0]],h[1]=this.atomSetAtomCounts[a])});c(b,"reverseSets",function(a,d){for(var h=JU.AU.createArrayOfArrayList(this.atomSetCount),b=0;b<this.atomSetCount;b++)h[b]=new JU.Lst;for(b=0;b<d;b++){if(0>a[b].atomSetIndex)return;h[a[b].atomSetIndex].addLast(a[b])}for(b=this.atomSetCount;0<=--b;)for(var c=h[b].size();0<=--c;)a[--d]=h[b].get(c)},"~A,~N");c(b,"reverseObject",function(a){for(var d=this.atomSetCount,h=v(d/2);0<=--h;)JU.AU.swap(a,h,d-1-h)},"~A");
b.reverseList=c(b,"reverseList",function(a){null!=a&&java.util.Collections.reverse(a)},"JU.Lst");c(b,"reverseArray",function(a){for(var d=this.atomSetCount,h=v(d/2);0<=--h;)JU.AU.swapInt(a,h,d-1-h)},"~A");c(b,"getList",function(a){var d;for(d=this.ac;0<=--d&&!(null!=this.atoms[d]&&"\x00"!=(a?this.atoms[d].altLoc:this.atoms[d].insertionCode)););if(!(0>d)){var h=Array(this.atomSetCount);for(d=0;d<this.atomSetCount;d++)h[d]="";var b;for(d=0;d<this.ac;d++)if(null!=this.atoms[d]){var c=a?this.atoms[d].altLoc:
this.atoms[d].insertionCode;if("\x00"!=c&&0>h[b=this.atoms[d].atomSetIndex].indexOf(c))h[b]+=c}a=a?"altLocs":"insertionCodes";for(d=0;d<this.atomSetCount;d++)0<h[d].length&&this.setModelInfoForSet(a,h[d],d)}},"~B");c(b,"finish",function(){if(null!=this.reader)this.reader.finalizeModelSet();else if(null!=this.readerList)for(var a=0;a<this.readerList.size();a++)this.readerList.get(a).finalizeModelSet();this.atoms=null;this.atomSetAtomCounts=E(16,0);this.atomSetAuxiliaryInfo=Array(16);this.atomSetInfo=
new java.util.Hashtable;this.atomSetCount=0;this.atomSetNumbers=E(16,0);this.atomSymbolicMap=new java.util.Hashtable;this.bonds=null;this.iSet=-1;this.xtalSymmetry=this.readerList=null;this.structures=Array(16);this.structureCount=0;this.vibrationSteps=this.trajectorySteps=null});c(b,"discardPreviousAtoms",function(){for(var a=this.ac;0<=--a;)this.atoms[a]=null;this.ac=0;this.clearMap();this.atomSetCount=0;this.iSet=-1;for(a=this.atomSetAuxiliaryInfo.length;0<=--a;)this.atomSetAtomCounts[a]=0,this.atomSetBondCounts[a]=
0,this.atomSetAuxiliaryInfo[a]=null});c(b,"removeCurrentAtomSet",function(){if(!(0>this.iSet)){var a=this.atomSetAtomIndexes[this.iSet];null!=this.bsAtoms&&this.bsAtoms.clearBits(a,this.ac);this.ac=a;this.atomSetAtomCounts[this.iSet]=0;this.iSet--;this.atomSetCount--;this.reader.doCheckUnitCell=!1}});c(b,"getHydrogenAtomCount",function(){for(var a=0,d=0;d<this.ac;d++)(1==this.atoms[d].elementNumber||this.atoms[d].elementSymbol.equals("H"))&&a++;return a});c(b,"newCloneAtom",function(a){a=a.getClone();
this.addAtom(a);return a},"J.adapter.smarter.Atom");c(b,"cloneFirstAtomSet",function(a){if(!this.allowMultiple)return 0;this.newAtomSet();0==a&&(a=this.atomSetAtomCounts[0]);for(var d=0;d<a;++d)this.newCloneAtom(this.atoms[d]);return this.ac},"~N");c(b,"cloneAtomSetWithBonds",function(a){var d=this.atomSetBondCounts[a?this.iSet:0];a=a?this.cloneLastAtomSet():this.cloneFirstAtomSet(0);if(0<a)for(var h=0;h<d;h++){var b=this.bonds[this.bondCount-d];this.addNewBondWithOrder(b.atomIndex1+a,b.atomIndex2+
a,b.order)}},"~B");c(b,"cloneLastAtomSet",function(){return this.cloneLastAtomSetFromPoints(0,null)});c(b,"cloneLastAtomSetFromPoints",function(a,d){if(!this.allowMultiple)return 0;var h=0<a?a:this.getLastAtomSetAtomCount(),b=this.getLastAtomSetAtomIndex();this.newAtomSet();for(var c=0;c<h;++c){var f=this.newCloneAtom(this.atoms[b++]);null!=d&&f.setT(d[c])}return h},"~N,~A");c(b,"getLastAtomSetAtomCount",function(){return this.atomSetAtomCounts[this.iSet]});c(b,"getLastAtomSetAtomIndex",function(){return this.ac-
this.atomSetAtomCounts[this.iSet]});c(b,"addNewAtom",function(){return this.addAtom(new J.adapter.smarter.Atom)});c(b,"addAtom",function(a){this.ac==this.atoms.length&&(this.atoms=2E5<this.ac?JU.AU.ensureLength(this.atoms,this.ac+5E4):JU.AU.doubleLength(this.atoms));0==this.atomSetCount&&this.newAtomSet();a.index=this.ac;this.atoms[this.ac++]=a;a.atomSetIndex=this.iSet;a.atomSite=0<this.fixedSite?this.fixedSite-1:this.atomSetAtomCounts[this.iSet]++;return a},"J.adapter.smarter.Atom");c(b,"addAtomWithMappedName",
function(a){var d=this.addAtom(a).atomName;null!=d&&this.atomSymbolicMap.put(d,a)},"J.adapter.smarter.Atom");c(b,"addAtomWithMappedSerialNumber",function(a){var d=this.addAtom(a).atomSerial;-2147483648!=d&&this.atomSymbolicMap.put(""+d,a)},"J.adapter.smarter.Atom");c(b,"getAtomFromName",function(a){return this.atomSymbolicMap.get(a)},"~S");c(b,"setAtomMapAnyCase",function(){this.atomMapAnyCase=!0;var a=new java.util.Hashtable;a.putAll(this.atomSymbolicMap);for(var d,h=this.atomSymbolicMap.entrySet().iterator();h.hasNext()&&
((d=h.next())||1);){var b=d.getKey(),c=b.toUpperCase();c.equals(b)||a.put(c,d.getValue())}this.atomSymbolicMap=a});c(b,"getAtomIndex",function(a){var d=this.atomSymbolicMap.get(a);null==d&&this.atomMapAnyCase&&(d=this.atomSymbolicMap.get(a.toUpperCase()));return null==d?-1:d.index},"~S");c(b,"addNewBondWithOrder",function(a,d,h){var b=null;0<=a&&(a<this.ac&&0<=d&&d<this.ac&&a!=d)&&(b=new J.adapter.smarter.Bond(a,d,h),this.addBond(b));return b},"~N,~N,~N");c(b,"addNewBondFromNames",function(a,d,h){return this.addNewBondWithOrderA(this.getAtomFromName(a),
this.getAtomFromName(d),h)},"~S,~S,~N");c(b,"addNewBondWithOrderA",function(a,d,h){return null!=a&&null!=d?this.addNewBondWithOrder(a.index,d.index,h):null},"J.adapter.smarter.Atom,J.adapter.smarter.Atom,~N");c(b,"addBond",function(a){0<this.trajectoryStepCount||(0>a.atomIndex1||0>a.atomIndex2||0>a.order||a.atomIndex1==a.atomIndex2||this.atoms[a.atomIndex1].atomSetIndex!=this.atoms[a.atomIndex2].atomSetIndex?JU.Logger.debugging&&JU.Logger.debug(">>>>>>BAD BOND:"+a.atomIndex1+"-"+a.atomIndex2+" order="+
a.order):this.addBondNoCheck(a))},"J.adapter.smarter.Bond");c(b,"addBondNoCheck",function(a){this.bondCount==this.bonds.length&&(this.bonds=JU.AU.arrayCopyObject(this.bonds,this.bondCount+1024));this.bonds[this.bondCount++]=a;this.atomSetBondCounts[this.iSet]++},"J.adapter.smarter.Bond");c(b,"finalizeStructures",function(){if(0!=this.structureCount){this.bsStructuredModels=new JU.BS;for(var a=new java.util.Hashtable,d=0;d<this.structureCount;d++){var h=this.structures[d];-1==h.modelStartEnd[0]&&(h.modelStartEnd[0]=
0,h.modelStartEnd[1]=this.atomSetCount-1);this.bsStructuredModels.setBits(h.modelStartEnd[0],h.modelStartEnd[1]+1);if(0!=h.strandCount){var h=h.structureID+" "+h.modelStartEnd[0],b=a.get(h),b=(null==b?0:b.intValue())+1;a.put(h,Integer.$valueOf(b))}}for(d=0;d<this.structureCount;d++)h=this.structures[d],1==h.strandCount&&(h.strandCount=a.get(h.structureID+" "+h.modelStartEnd[0]).intValue())}});c(b,"addStructure",function(a){this.structureCount==this.structures.length&&(this.structures=JU.AU.arrayCopyObject(this.structures,
this.structureCount+32));this.structures[this.structureCount++]=a},"J.adapter.smarter.Structure");c(b,"addVibrationVectorWithSymmetry",function(a,d,h,b,c){if(c){c=this.atoms[a].atomSite;for(var f=this.atoms[a].atomSetIndex;a<this.ac&&this.atoms[a].atomSetIndex==f;a++)this.atoms[a].atomSite==c&&this.addVibrationVector(a,d,h,b)}else this.addVibrationVector(a,d,h,b)},"~N,~N,~N,~N,~B");c(b,"addVibrationVector",function(a,d,h,b){this.allowMultiple||(a%=this.ac);return this.atoms[a].vib=JU.V3.new3(d,h,
b)},"~N,~N,~N,~N");c(b,"setCoordinatesAreFractional",function(a){this.coordinatesAreFractional=a;this.setCurrentModelInfo("coordinatesAreFractional",Boolean.$valueOf(a));a&&this.setGlobalBoolean(0)},"~B");c(b,"setAnisoBorU",function(a,d,h){this.haveAnisou=!0;a.anisoBorU=d;d[6]=h},"J.adapter.smarter.Atom,~A,~N");c(b,"setU",function(a,d,h){var b=a.anisoBorU;null==b&&this.setAnisoBorU(a,b=L(8,0),8);b[d]=h},"J.adapter.smarter.Atom,~N,~N");c(b,"getXSymmetry",function(){null==this.xtalSymmetry&&(this.xtalSymmetry=
J.api.Interface.getOption("adapter.smarter.XtalSymmetry",this.reader.vwr,"file").set(this.reader));return this.xtalSymmetry});c(b,"getSymmetry",function(){return this.getXSymmetry().getSymmetry()});c(b,"setSymmetryFromAuditBlock",function(a){return null==a?null:this.getXSymmetry().setSymmetryFromAuditBlock(a)},"J.adapter.smarter.XtalSymmetry.FileSymmetry");c(b,"newFileSymmetry",function(){return this.getXSymmetry().newFileSymmetry()});c(b,"setTensors",function(){this.haveAnisou&&this.getXSymmetry().setTensors()});
c(b,"setInfo",function(a,d){null==d?this.atomSetInfo.remove(a):this.atomSetInfo.put(a,d)},"~S,~O");c(b,"setAtomSetCollectionPartialCharges",function(a){if(!this.atomSetInfo.containsKey(a))return!1;for(var d=this.atomSetInfo.get(a),h=d.size(),b=this.ac;0<=--b;)this.atoms[b].partialCharge=d.get(b%h).floatValue();JU.Logger.info("Setting partial charges type "+a);return!0},"~S");c(b,"mapPartialCharge",function(a,d){this.getAtomFromName(a).partialCharge=d},"~S,~N");b.fixPeriodic=c(b,"fixPeriodic",function(a,
d){a.x=J.adapter.smarter.AtomSetCollection.fixPoint(a.x,d.x);a.y=J.adapter.smarter.AtomSetCollection.fixPoint(a.y,d.y);a.z=J.adapter.smarter.AtomSetCollection.fixPoint(a.z,d.z);return a},"JU.P3,JU.P3");b.fixPoint=c(b,"fixPoint",function(a,d){for(;0.9<a-d;)a-=1;for(;-0.9>a-d;)a+=1;return a},"~N,~N");c(b,"finalizeTrajectoryAs",function(a,d){this.trajectorySteps=a;this.vibrationSteps=d;this.trajectoryStepCount=a.size();this.finalizeTrajectory()},"JU.Lst,JU.Lst");c(b,"finalizeTrajectory",function(){if(0!=
this.trajectoryStepCount){var a=this.trajectorySteps.get(0),d=null==this.vibrationSteps?null:this.vibrationSteps.get(0),h=null==this.bsAtoms?this.ac:this.bsAtoms.cardinality();if(null!=this.vibrationSteps&&null!=d&&d.length<h||a.length<h)this.errorMessage="File cannot be loaded as a trajectory";else{for(var h=new JU.V3,b=0,c=0;b<this.ac;b++)if(null==this.bsAtoms||this.bsAtoms.get(b))null!=this.vibrationSteps&&(this.atoms[b].vib=null==d?h:d[c]),null!=a[c]&&this.atoms[b].setT(a[c]),c++;this.setInfo("trajectorySteps",
this.trajectorySteps);null!=this.vibrationSteps&&this.setInfo("vibrationSteps",this.vibrationSteps);0==this.ac&&(this.ac=a.length)}}});c(b,"newAtomSet",function(){this.newAtomSetClear(!0)});c(b,"newAtomSetClear",function(a){!this.allowMultiple&&0<=this.iSet&&this.reader.discardPreviousAtoms();this.bondIndex0=this.bondCount;this.isTrajectory&&this.reader.discardPreviousAtoms();this.iSet=this.atomSetCount++;this.atomSetCount>this.atomSetNumbers.length&&(this.atomSetAtomIndexes=JU.AU.doubleLengthI(this.atomSetAtomIndexes),
this.atomSetAtomCounts=JU.AU.doubleLengthI(this.atomSetAtomCounts),this.atomSetBondCounts=JU.AU.doubleLengthI(this.atomSetBondCounts),this.atomSetAuxiliaryInfo=JU.AU.doubleLength(this.atomSetAuxiliaryInfo));this.atomSetAtomIndexes[this.iSet]=this.ac;this.atomSetCount+this.trajectoryStepCount>this.atomSetNumbers.length&&(this.atomSetNumbers=JU.AU.doubleLengthI(this.atomSetNumbers));this.isTrajectory?this.atomSetNumbers[this.iSet+this.trajectoryStepCount]=this.atomSetCount+this.trajectoryStepCount:
this.atomSetNumbers[this.iSet]=this.atomSetCount;a&&this.clearMap();this.setCurrentModelInfo("title",this.collectionName)},"~B");c(b,"clearMap",function(){this.atomSymbolicMap.clear();this.atomMapAnyCase=!1});c(b,"getAtomSetAtomIndex",function(a){return this.atomSetAtomIndexes[a]},"~N");c(b,"getAtomSetAtomCount",function(a){return this.atomSetAtomCounts[a]},"~N");c(b,"getAtomSetBondCount",function(a){return this.atomSetBondCounts[a]},"~N");c(b,"setAtomSetName",function(a){if(null!=a)if(this.isTrajectory)this.setTrajectoryName(a);
else{var d=0>this.iSet?null:this.getAtomSetName(this.iSet);this.setModelInfoForSet("name",a,this.iSet);null!=this.reader&&(0<a.length&&!a.equals(d))&&this.reader.appendLoadNote(a);this.allowMultiple||this.setCollectionName(a)}},"~S");c(b,"setTrajectoryName",function(a){if(0!=this.trajectoryStepCount){null==this.trajectoryNames&&(this.trajectoryNames=new JU.Lst);for(var d=this.trajectoryNames.size();d<this.trajectoryStepCount;d++)this.trajectoryNames.addLast(null);this.trajectoryNames.set(this.trajectoryStepCount-
1,a)}},"~S");c(b,"setCurrentAtomSetNumber",function(a){this.setAtomSetNumber(this.iSet+(this.isTrajectory?this.trajectoryStepCount:0),a)},"~N");c(b,"setAtomSetNumber",function(a,d){this.atomSetNumbers[a]=d},"~N,~N");c(b,"setAtomSetModelProperty",function(a,d){this.setAtomSetModelPropertyForSet(a,d,this.iSet)},"~S,~S");c(b,"setAtomSetModelPropertyForSet",function(a,d,h){var b=this.getAtomSetAuxiliaryInfoValue(h,"modelProperties");null==b&&this.setModelInfoForSet("modelProperties",b=new java.util.Properties,
h);b.put(a,d);a.startsWith(".")&&b.put(a.substring(1),d)},"~S,~S,~N");c(b,"setAtomProperties",function(a,d,h){"string"==typeof d&&!d.endsWith("\n")&&(d+="\n");0>h&&(h=this.iSet);var b=this.getAtomSetAuxiliaryInfoValue(h,"atomProperties");null==b&&this.setModelInfoForSet("atomProperties",b=new java.util.Hashtable,h);b.put(a,d)},"~S,~O,~N,~B");c(b,"setAtomSetPartialCharges",function(a){if(!this.atomSetAuxiliaryInfo[this.iSet].containsKey(a))return!1;a=this.getAtomSetAuxiliaryInfoValue(this.iSet,a);
for(var d=a.size();0<=--d;)this.atoms[d].partialCharge=a.get(d).floatValue();return!0},"~S");c(b,"getAtomSetAuxiliaryInfoValue",function(a,d){return this.atomSetAuxiliaryInfo[0<=a?a:this.iSet].get(d)},"~N,~S");c(b,"setCurrentModelInfo",function(a,d){this.setModelInfoForSet(a,d,this.iSet)},"~S,~O");c(b,"setModelInfoForSet",function(a,d,h){0>h||(null==this.atomSetAuxiliaryInfo[h]&&(this.atomSetAuxiliaryInfo[h]=new java.util.Hashtable),null==d?this.atomSetAuxiliaryInfo[h].remove(a):this.atomSetAuxiliaryInfo[h].put(a,
d))},"~S,~O,~N");c(b,"getAtomSetNumber",function(a){return this.atomSetNumbers[a>=this.atomSetCount?0:a]},"~N");c(b,"getAtomSetName",function(a){if(null!=this.trajectoryNames&&a<this.trajectoryNames.size())return this.trajectoryNames.get(a);a>=this.atomSetCount&&(a=this.atomSetCount-1);return this.getAtomSetAuxiliaryInfoValue(a,"name")},"~N");c(b,"getAtomSetAuxiliaryInfo",function(a){a=a>=this.atomSetCount?this.atomSetCount-1:a;return 0>a?null:this.atomSetAuxiliaryInfo[a]},"~N");c(b,"setAtomSetEnergy",
function(a,d){0>this.iSet||(JU.Logger.info("Energy for model "+(this.iSet+1)+" = "+a),this.setCurrentModelInfo("EnergyString",a),this.setCurrentModelInfo("Energy",Float.$valueOf(d)),this.setAtomSetModelProperty("Energy",""+d))},"~S,~N");c(b,"setAtomSetFrequency",function(a,d,h,b,c){this.setAtomSetModelProperty("FreqValue",b);b+=" "+(null==c?"cm^-1":c);c=(null==h?"":h+" ")+b;this.setAtomSetName(c);this.setAtomSetModelProperty("Frequency",b);this.setAtomSetModelProperty("Mode",""+a);this.setModelInfoForSet("vibrationalMode",
Integer.$valueOf(a),this.iSet);null!=h&&this.setAtomSetModelProperty("FrequencyLabel",h);this.setAtomSetModelProperty(".PATH",(null==d?"":d+J.adapter.smarter.SmarterJmolAdapter.PATH_SEPARATOR+"Frequencies")+"Frequencies");return c},"~N,~S,~S,~S,~S");c(b,"getBondList",function(){for(var a=Array(this.bondCount),d=0;d<this.bondCount;d++)a[d]=u(-1,[this.atoms[this.bonds[d].atomIndex1].atomName,this.atoms[this.bonds[d].atomIndex2].atomName,""+this.bonds[d].order]);return a});c(b,"centralize",function(){for(var a=
new JU.P3,d=0;d<this.atomSetCount;d++){var h=this.atomSetAtomCounts[d],b=this.atomSetAtomIndexes[d];a.set(0,0,0);for(var c=b+h;--c>=b;)a.add(this.atoms[c]);a.scale(1/h);for(c=b+h;--c>=b;)this.atoms[c].sub(a)}});c(b,"mergeTrajectories",function(a){if(this.isTrajectory&&a.isTrajectory&&null==this.vibrationSteps){for(var d=0;d<a.trajectoryStepCount;d++)this.trajectorySteps.add(this.trajectoryStepCount++,a.trajectorySteps.get(d));this.setInfo("trajectorySteps",this.trajectorySteps);this.setInfo("ignoreUnitCell",
a.atomSetInfo.get("ignoreUnitCell"))}},"J.adapter.smarter.AtomSetCollection");c(b,"removeAtomSet",function(a){null==this.bsAtoms&&(this.bsAtoms=JU.BSUtil.newBitSet2(0,this.ac));var d=this.atomSetAtomIndexes[a],h=d+this.atomSetAtomCounts[a];this.bsAtoms.clearBits(d,h);for(d=h;d<this.ac;d++)this.atoms[d].atomSetIndex--;for(d=a+1;d<this.atomSetCount;d++)this.atomSetAuxiliaryInfo[d-1]=this.atomSetAuxiliaryInfo[d],this.atomSetAtomIndexes[d-1]=this.atomSetAtomIndexes[d],this.atomSetBondCounts[d-1]=this.atomSetBondCounts[d],
this.atomSetAtomCounts[d-1]=this.atomSetAtomCounts[d],this.atomSetNumbers[d-1]=this.atomSetNumbers[d];for(d=0;d<this.bondCount;d++)this.bonds[d].atomSetIndex=this.atoms[this.bonds[d].atomIndex1].atomSetIndex;this.atomSetAuxiliaryInfo[--this.atomSetCount]=null;for(d=h=0;d<this.structureCount;d++){var b=this.structures[d];b.modelStartEnd[0]==a&&b.modelStartEnd[1]==a&&(this.structures[d]=null,h++)}if(0<h){a=Array(this.structureCount-h);for(h=d=0;d<this.structureCount;d++)null!=this.structures[d]&&(a[h++]=
this.structures[d]);this.structures=a}},"~N");c(b,"removeLastUnselectedAtoms",function(){for(var a=this.ac,d=0,h=this.getLastAtomSetAtomIndex(),b=0,c=h;c<a;c++)this.bsAtoms.get(c)?(0<d&&(this.atoms[this.atoms[c].index=c-d]=this.atoms[c],this.atoms[c]=null),b++):(d++,this.ac--,this.atoms[c]=null);this.atomSetAtomCounts[this.iSet]=b;0==b?(this.iSet--,this.atomSetCount--):this.bsAtoms.setBits(h,h+b)});c(b,"checkNoEmptyModel",function(){for(;0<this.atomSetCount&&0==this.atomSetAtomCounts[this.atomSetCount-
1];)this.atomSetCount--});c(b,"getBSAtoms",function(a){null==this.bsAtoms&&(this.bsAtoms=new JU.BS,0!=a&&this.bsAtoms.setBits(0,0>a?this.ac:a));return this.bsAtoms},"~N");c(b,"setBSAtomsForSet",function(a){if(null!=this.bsAtoms){0>a&&(a=this.iSet);var d=this.atomSetAtomIndexes[a];0>this.bsAtoms.nextSetBit(d)&&this.bsAtoms.setBits(d,d+this.atomSetAtomCounts[a])}},"~N");c(b,"fix2Stereo",function(){this.getBSAtoms(-1);for(var a=this.bondCount;0<=--a;){var d=this.bonds[a];this.atoms[d.atomIndex2].elementSymbol.equals("H")&&
1025!=d.order&&1041!=d.order&&this.atoms[d.atomIndex1].elementSymbol.equals("C")?this.bsAtoms.clear(d.atomIndex2):this.atoms[d.atomIndex1].elementSymbol.equals("H")&&this.atoms[d.atomIndex2].elementSymbol.equals("C")&&this.bsAtoms.clear(d.atomIndex1)}})});n("J.adapter.smarter");z(["javajs.api.GenericLineReader","JU.SB","JV.Viewer"],"J.adapter.smarter.AtomSetCollectionReader","JU.BS $.Lst $.M3 $.P3 $.PT $.Quat $.V3 J.adapter.smarter.Atom $.AtomSetCollection J.api.Interface $.JmolAdapter JU.BSUtil $.Logger $.SimpleUnitCell JV.FileManager $.JC".split(" "),
function(){var b=w(function(){this.requiresBSFilter=this.debugging=this.isBinary=!1;this.dssr=this.validation=this.domains=this.trajectorySteps=this.htParams=this.readerName=this.binaryDoc=this.reader=this.asc=this.primitiveToCrystal=null;this.isConcatenated=!1;this.lstNCS=this.thisBiomolecule=this.addedDataKey=this.addedData=null;this.floatifyJavaDouble=!0;this.next=this.prevline=this.line=null;this.ptLine=0;this.checkNearAtoms=!0;this.fillRange=this.latticeCells=this.latticeType=null;this.iHaveSymmetryOperators=
this.iHaveUnitCell=this.doProcessLines=!1;this.continuing=!0;this.vwr=null;this.isMolecular=this.is2D=this.noMinimize=this.noHydrogens=this.optimize2D=this.isSequential=this.getHeader=this.doCheckUnitCell=this.applySymmetryToBonds=this.isTrajectory=this.ignoreFileSymmetryOperators=this.doApplySymmetry=!1;this.vibrationNumber=this.modelNumber=this.templateAtomCount=0;this.desiredVibrationNumber=-2147483648;this.bsModels=null;this.havePartialChargeFilter=this.useFileModelNumbers=!1;this.calculationType=
"?";this.sgName=null;this.ignoreFileSpaceGroupName=this.ignoreFileUnitCell=!1;this.unitCellParams=null;this.desiredModelNumber=-2147483648;this.out=this.symmetry=null;this.doPackUnitCell=this.iHaveFractionalCoordinates=!1;this.ptSupercell=null;this.forcePacked=this.mustFinalizeModelSet=!1;this.packingRange=null;this.cellSlop=1E-4;this.isPrimitive=this.rotateHexCell=!1;this.modDim=0;this.highprecision0=this.lowPrecision=!1;this.loadNote=null;this.merging=this.fileCoordinatesAreFractional=this.doConvertToFractional=
!1;this.symmetryRange=0;this.firstLastStep=null;this.lastModelNumber=2147483647;this.desiredSpaceGroupIndex=-1;this.latticeScaling=NaN;this.unitCellOffset=null;this.unitCellOffsetFractional=!1;this.paramsLattice=this.moreUnitCellInfo=null;this.paramsPacked=this.paramsCentroid=!1;this.fileName=this.filePath=this.fileOffsetFractional=this.fileOffset=this.fileScaling=null;this.baseBondIndex=this.baseAtomIndex=0;this.stateScriptVersionInt=2147483647;this.isSUPERCELL=this.noPack=this.isFinalized=!1;this.precision=
0;this.haveModel=!1;this.previousUnitCell=this.previousSpaceGroup=null;this.nMatrixElements=0;this.filterCased=this.filter=this.bsFilter=this.matUnitCellOrientation=this.ucItems=null;this.filterAtomType=this.filterAtomName=this.filterChain=this.filterGroup3=this.filterAltLoc=this.haveAtomFilter=!1;this.filterAtomTypeStr=null;this.filterAtomNameTerminator=";";this.filterEveryNth=this.filterAllHetero=this.filterHetero=this.filterElement=!1;this.filterSymop=null;this.nFiltered=this.filterN=0;this.reverseModels=
this.doReadMolecularOrbitals=this.allowPDBFilter=this.isDSSP1=this.ignoreStructure=this.useAltNames=this.addVibrations=this.doCentralize=this.doSetOrientation=!1;this.nameRequired=null;this.centroidPacked=this.doCentroidUnitCell=!1;this.strSupercell=null;this.filteredPrecision=this.fixUnitCell=this.polymerX=this.slabXY=this.allow_a_len_1=!1;this.ms=this.matRot=this.filter2Cased=this.filter1Cased=this.filter2=this.filter1=null;this.vibsFractional=!1;this.siteScript=this.previousScript=null;q(this,
arguments)},J.adapter.smarter,"AtomSetCollectionReader",null,javajs.api.GenericLineReader);N(b,function(){this.next=E(1,0);this.highprecision0=JV.Viewer.isHighPrecision;this.loadNote=new JU.SB});c(b,"getPackingRangeValue",function(a){return null!=this.packingRange?this.packingRange.floatValue():0!=a?a:0.02},"~N");c(b,"setup",function(a,d,h){this.setupASCR(a,d,h)},"~S,java.util.Map,~O");c(b,"setupASCR",function(a,d,h){null!=a&&(this.debugging=JU.Logger.debugging,this.htParams=d,this.filePath=JV.FileManager.stripTypePrefix(""+
d.get("fullPathName")),a=this.filePath.lastIndexOf("/"),this.fileName=this.filePath.substring(a+1),C(h,"java.io.BufferedReader")?this.reader=h:C(h,"javajs.api.GenericBinaryDocument")&&(this.binaryDoc=h))},"~S,java.util.Map,~O");c(b,"readData",function(){this.initialize();this.asc=new J.adapter.smarter.AtomSetCollection(this.readerName,this,null,null);try{this.initializeReader();if(null==this.binaryDoc)for(null==this.line&&this.continuing&&this.rd();null!=this.line&&this.continuing;)this.checkLine()&&
this.rd();else this.binaryDoc.setOutputChannel(this.out),this.processBinaryDocument();this.finalizeSubclassReader();this.isFinalized||this.finalizeReaderASCR()}catch(a){JU.Logger.info("Reader error: "+a),a.printStackTrace(),this.setError(a)}null!=this.reader&&this.reader.close();null!=this.binaryDoc&&this.binaryDoc.close();return this.finish()});c(b,"fixBaseIndices",function(){try{var a=this.htParams.get("baseModelIndex");if(null!=a){var d=a.intValue();this.baseAtomIndex+=this.asc.ac;this.baseBondIndex+=
this.asc.bondCount;d+=this.asc.atomSetCount;this.htParams.put("baseAtomIndex",Integer.$valueOf(this.baseAtomIndex));this.htParams.put("baseBondIndex",Integer.$valueOf(this.baseBondIndex));this.htParams.put("baseModelIndex",Integer.$valueOf(d))}}catch(h){if(!D(h,Exception))throw h;}});c(b,"readDataObject",function(a){this.initialize();this.asc=new J.adapter.smarter.AtomSetCollection(this.readerName,this,null,null);this.initializeReader();this.processDOM(a);return this.finish()},"~O");c(b,"processDOM",
function(){},"~O");c(b,"processBinaryDocument",function(){});c(b,"initializeReader",function(){});c(b,"checkLine",function(){return!0});c(b,"checkLastModel",function(){if(this.isLastModel(this.modelNumber)&&this.doProcessLines)return this.continuing=this.doProcessLines=!1;this.doProcessLines=!1;return!0});c(b,"isLastModel",function(a){return 0<this.desiredModelNumber||a>=this.lastModelNumber},"~N");c(b,"appendLoadNote",function(a){null==a?this.loadNote=new JU.SB:(this.loadNote.append(a).append("\n"),
JU.Logger.info(a))},"~S");c(b,"initializeTrajectoryFile",function(){this.asc.addAtom(new J.adapter.smarter.Atom);this.trajectorySteps=this.htParams.get("trajectorySteps");null==this.trajectorySteps&&this.htParams.put("trajectorySteps",this.trajectorySteps=new JU.Lst)});c(b,"finalizeSubclassReader",function(){});c(b,"finalizeReaderASCR",function(){this.isFinalized=!0;if(0<this.asc.atomSetCount){1==this.asc.atomSetCount&&(this.asc.setCurrentModelInfo("dbName",this.htParams.get("dbName")),this.asc.setCurrentModelInfo("auxFiles",
this.htParams.get("auxFiles")));this.applySymmetryAndSetTrajectory();this.asc.finalizeStructures();this.doCentralize&&this.asc.centralize();null!=this.fillRange&&this.asc.setInfo("boundbox",this.fillRange);var a=this.asc.getAtomSetAuxiliaryInfo(0);if(null!=a){if(null!=this.domains){this.asc.setGlobalBoolean(5);var d=this.domains.getMapKeys(2,!0),h=d.indexOf("{ ",2);0<=h&&(d=d.substring(h+2));h=d.indexOf("_metadata");0>h&&(h=d.indexOf("metadata"));0<=h&&(d=d.substring(0,h));d=JU.PT.rep(JU.PT.replaceAllCharacters(d,
"{}","").trim(),"\n","\n  ")+"\n\nUse SHOW DOMAINS for details.";this.appendLoadNote("\nDomains loaded:\n   "+d);for(d=this.asc.atomSetCount;0<=--d;)a=this.asc.getAtomSetAuxiliaryInfo(d),a.put("domains",this.domains)}if(null!=this.validation)for(d=this.asc.atomSetCount;0<=--d;)a=this.asc.getAtomSetAuxiliaryInfo(d),a.put("validation",this.validation);if(null!=this.dssr){a.put("dssrJSON",Boolean.TRUE);for(d=this.asc.atomSetCount;0<=--d;)a=this.asc.getAtomSetAuxiliaryInfo(d),a.put("dssr",this.dssr)}}}this.floatifyJavaDouble||
this.asc.setInfo("highPrecision",Boolean.TRUE);this.setLoadNote()});c(b,"setLoadNote",function(){var a=this.loadNote.toString();0<this.loadNote.length()&&this.asc.setInfo("modelLoadNote",a);return a});c(b,"setIsPDB",function(){this.asc.setGlobalBoolean(4);null!=this.htParams.get("pdbNoHydrogens")&&this.asc.setInfo("pdbNoHydrogens",this.htParams.get("pdbNoHydrogens"));this.checkFilterKey("ADDHYDROGENS")&&this.asc.setInfo("pdbAddHydrogens",Boolean.TRUE)});c(b,"setModelPDB",function(a){a?this.asc.setGlobalBoolean(4):
this.asc.clearGlobalBoolean(4);this.asc.setCurrentModelInfo(JV.JC.getBoolName(4),a?Boolean.TRUE:null)},"~B");c(b,"finish",function(){!1!=this.highprecision0&&this.vwr.setBooleanPropertyTok("doubleprecision",603979831,this.highprecision0);var a=this.htParams.get("loadState");this.asc.setInfo("loadState",null==a?"":a);a=this.htParams.get("smilesString");null!=a&&this.asc.setInfo("smilesString",a);this.htParams.containsKey("templateAtomCount")||this.htParams.put("templateAtomCount",Integer.$valueOf(this.asc.ac));
null!=this.bsFilter&&(this.htParams.put("filteredAtomCount",Integer.$valueOf(JU.BSUtil.cardinalityOf(this.bsFilter))),this.htParams.put("bsFilter",this.bsFilter));this.calculationType.equals("?")||this.asc.setInfo("calculationType",this.calculationType);var d=a=this.asc.fileTypeName;0<=d.indexOf("(")&&(d=d.substring(0,d.indexOf("(")));for(var h=this.asc.atomSetCount;0<=--h;)this.asc.setModelInfoForSet("fileName",this.filePath,h),this.asc.setModelInfoForSet("fileType",d,h);this.asc.freeze(this.reverseModels);
if(null!=this.asc.errorMessage)return this.asc.errorMessage+"\nfor file "+this.filePath+"\ntype "+a;if(!this.merging&&(null==this.asc.bsAtoms?0==this.asc.ac:0>this.asc.bsAtoms.nextSetBit(0))&&0>d.indexOf("DataOnly")&&null==this.asc.atomSetInfo.get("dataOnly"))return"No atoms found\nfor file "+this.filePath+"\ntype "+a;this.fixBaseIndices();return this.asc});c(b,"setError",function(a){var d=a.getMessage();this.asc.errorMessage=null==this.line?"Error reading file at end of file \n"+d:"Error reading file at line "+
this.ptLine+":\n"+this.line+"\n"+d;a.printStackTrace()},"Throwable");c(b,"initialize",function(){this.htParams.containsKey("baseAtomIndex")&&(this.baseAtomIndex=this.htParams.get("baseAtomIndex").intValue());this.htParams.containsKey("baseBondIndex")&&(this.baseBondIndex=this.htParams.get("baseBondIndex").intValue());this.initializeSymmetry();this.vwr=this.htParams.remove("vwr");this.htParams.containsKey("stateScriptVersionInt")&&(this.stateScriptVersionInt=this.htParams.get("stateScriptVersionInt").intValue());
this.packingRange=this.htParams.get("packingRange");var a=null!=this.htParams.get("highPrecision");null==this.packingRange&&a&&(this.floatifyJavaDouble=!1,this.packingRange=Float.$valueOf(1E-4));this.merging=this.htParams.containsKey("merging");this.getHeader=this.htParams.containsKey("getHeader");this.isSequential=this.htParams.containsKey("isSequential");this.readerName=this.htParams.get("readerName");this.htParams.containsKey("outputChannel")&&(this.out=this.htParams.get("outputChannel"));this.htParams.containsKey("vibrationNumber")?
this.desiredVibrationNumber=this.htParams.get("vibrationNumber").intValue():this.htParams.containsKey("modelNumber")&&(this.desiredModelNumber=this.htParams.get("modelNumber").intValue());this.applySymmetryToBonds=this.htParams.containsKey("applySymmetryToBonds");this.bsFilter=this.requiresBSFilter?this.htParams.get("bsFilter"):null;this.setFilter(null);this.fillRange=this.htParams.get("fillRange");this.paramsLattice=this.htParams.get("lattice");a=this.htParams.get("supercell");this.noPack=this.checkFilterKey("NOPACK");
null!=this.strSupercell&&!this.noPack&&(this.forcePacked=!0);C(a,"JU.P3")?(a=this.ptSupercell=a,1!=a.length()&&(this.strSupercell=F(a.x)+"a,"+F(a.y)+"b,"+F(a.z)+"c",this.isSUPERCELL=!0)):"string"==typeof a&&(this.strSupercell=a,this.isSUPERCELL=!0);a=this.htParams.containsKey("ptFile")?this.htParams.get("ptFile").intValue():-1;this.isTrajectory=this.htParams.containsKey("isTrajectory");0<a&&this.htParams.containsKey("firstLastSteps")?(a=this.htParams.get("firstLastSteps").get(a-1),C(a,"JU.BS")?this.bsModels=
a:this.firstLastStep=a):this.htParams.containsKey("firstLastStep")?this.firstLastStep=this.htParams.get("firstLastStep"):this.htParams.containsKey("bsModels")&&(this.bsModels=this.htParams.get("bsModels"));this.useFileModelNumbers=this.htParams.containsKey("useFileModelNumbers")||this.checkFilterKey("USEFILEMODELNUMBERS");this.htParams.containsKey("templateAtomCount")&&(this.templateAtomCount=this.htParams.get("templateAtomCount").intValue());if(null!=this.bsModels||null!=this.firstLastStep)this.desiredModelNumber=
-2147483648;if(null==this.bsModels&&null!=this.firstLastStep){0>this.firstLastStep[0]&&(this.firstLastStep[0]=0);if(0==this.firstLastStep[2]||this.firstLastStep[1]<this.firstLastStep[0])this.firstLastStep[1]=-1;1>this.firstLastStep[2]&&(this.firstLastStep[2]=1);this.bsModels=JU.BSUtil.newAndSetBit(this.firstLastStep[0]);if(this.firstLastStep[1]>this.firstLastStep[0])for(a=this.firstLastStep[0];a<=this.firstLastStep[1];a+=this.firstLastStep[2])this.bsModels.set(a)}if(null!=this.bsModels&&(null==this.firstLastStep||
-1!=this.firstLastStep[1]))this.lastModelNumber=this.bsModels.length();this.symmetryRange=this.htParams.containsKey("symmetryRange")?this.htParams.get("symmetryRange").floatValue():0;this.paramsCentroid=this.htParams.containsKey("centroid");this.paramsPacked=this.htParams.containsKey("packed");this.initializeSymmetryOptions();this.htParams.containsKey("spaceGroupIndex")&&(this.desiredSpaceGroupIndex=this.htParams.get("spaceGroupIndex").intValue(),-2==this.desiredSpaceGroupIndex&&(this.sgName=this.htParams.get("spaceGroupName")),
this.ignoreFileSpaceGroupName=-2==this.desiredSpaceGroupIndex||0<=this.desiredSpaceGroupIndex,this.ignoreFileSymmetryOperators=-1!=this.desiredSpaceGroupIndex);this.htParams.containsKey("unitCellOffset")&&(this.fileScaling=JU.P3.new3(1,1,1),this.fileOffset=this.htParams.get("unitCellOffset"),this.fileOffsetFractional=JU.P3.newP(this.fileOffset),this.unitCellOffsetFractional=this.htParams.containsKey("unitCellOffsetFractional"));this.htParams.containsKey("unitcell")&&(a=this.htParams.get("unitcell"),
this.merging&&this.setFractionalCoordinates(!0),9==a.length?(this.addExplicitLatticeVector(0,a,0),this.addExplicitLatticeVector(1,a,3),this.addExplicitLatticeVector(2,a,6)):this.setUnitCell(a[0],a[1],a[2],a[3],a[4],a[5]),this.ignoreFileUnitCell=this.iHaveUnitCell,this.merging&&!this.iHaveUnitCell&&this.setFractionalCoordinates(!1));this.domains=this.htParams.get("domains");this.validation=this.htParams.get("validation");this.dssr=this.htParams.get("dssr");this.isConcatenated=this.htParams.containsKey("concatenate")});
c(b,"parsePrecision",function(a){if(!this.filteredPrecision){var d=a.indexOf(".")+1;if(0<=d){var h=a.indexOf("(");0>h?this.precision=Math.max(this.precision,a.length-d):(0==this.precision&&(this.precision=h),this.precision=Math.min(this.precision,h-1-d))}}return this.parseFloatStr(a)},"~S");c(b,"setLowPrecision",function(){this.lowPrecision=!0;this.cellSlop=1E-4;null==this.packingRange&&(this.packingRange=Double.$valueOf(1E-4))});c(b,"setPrecision",function(){var a;if(this.lowPrecision)a=!1,this.precision=
4;else if(this.precision=1E3<this.precision?this.precision-1E3:Math.min(12,Math.max(4,this.precision)),a=7<=this.precision)this.vwr.setBooleanProperty("doubleprecision",!0),JV.Viewer.isHighPrecision?(this.cellSlop=1E-12,this.paramsPacked||(this.packingRange=Double.$valueOf(this.cellSlop)),this.asc.setInfo("highPrecision",Boolean.TRUE)):(a=!1,this.precision=6,this.appendLoadNote("Structure read has high precision but this version of Jmol uses float precision.\nUse JmolD.jar or JavaScript for full precision."));
!a&&10>this.precision&&(this.cellSlop=Math.pow(10,-this.precision));this.symmetry.setPrecision(this.cellSlop);this.unitCellParams[26]=this.cellSlop;if(this.fileCoordinatesAreFractional){a=this.asc.ac;for(var d=this.asc.getLastAtomSetAtomIndex();--a>=d;)this.symmetry.twelfthify(this.asc.atoms[a])}this.appendLoadNote("Precision set to "+this.precision+"; packing set to "+(null==this.packingRange?0.02:this.packingRange.floatValue()))});c(b,"initializeSymmetryOptions",function(){this.latticeCells=E(4,
0);this.doApplySymmetry=!1;var a=this.paramsLattice;if(null==a||0==a.length()){if(!this.forcePacked&&null==this.strSupercell)return;a=JU.P3.new3(1,1,1)}this.latticeCells[0]=F(a.x);this.latticeCells[1]=F(a.y);this.latticeCells[2]=F(a.z);C(a,"JU.T4")&&(this.latticeCells[3]=F(a.w));if((this.doCentroidUnitCell=this.paramsCentroid)&&(-1==this.latticeCells[2]||0==this.latticeCells[2]))this.latticeCells[2]=1;a=this.forcePacked||this.paramsPacked;this.centroidPacked=this.doCentroidUnitCell&&a;this.doPackUnitCell=
!this.doCentroidUnitCell&&(a||0>this.latticeCells[2]);this.doApplySymmetry=0<this.latticeCells[0]&&0<this.latticeCells[1];this.doApplySymmetry||(this.latticeCells=E(3,0))});c(b,"doGetModel",function(a,d){if(null!=d&&null!=this.nameRequired&&0<this.nameRequired.length&&0>d.toUpperCase().indexOf(this.nameRequired))return!1;var h=null==this.bsModels?1>this.desiredModelNumber||a==this.desiredModelNumber:a>this.lastModelNumber?!1:0<a&&this.bsModels.get(a-1)||this.haveModel&&null!=this.firstLastStep&&0>
this.firstLastStep[1]&&(2>this.firstLastStep[2]||0==(a-1-this.firstLastStep[0])%this.firstLastStep[2]);h&&0==this.desiredModelNumber&&this.discardPreviousAtoms();this.haveModel=(new Boolean(this.haveModel|h)).valueOf();h&&(this.doProcessLines=!0);return h},"~N,~S");c(b,"discardPreviousAtoms",function(){this.asc.discardPreviousAtoms()});c(b,"initializeSymmetry",function(){this.previousSpaceGroup=this.sgName;this.previousUnitCell=this.unitCellParams;this.iHaveUnitCell=this.ignoreFileUnitCell;if(!this.ignoreFileUnitCell){this.unitCellParams=
L(27,0);for(var a=27;0<=--a;)this.unitCellParams[a]=NaN;this.unitCellParams[25]=this.latticeScaling;this.unitCellParams[26]=this.cellSlop;this.symmetry=null}this.ignoreFileSpaceGroupName||(this.sgName="unspecified!");this.doCheckUnitCell=!1});c(b,"newAtomSet",function(a){0<=this.asc.iSet?(this.asc.newAtomSet(),this.asc.setCollectionName("<collection of "+(this.asc.iSet+1)+" models>")):this.asc.setCollectionName(a);this.asc.setModelInfoForSet("name",a,Math.max(0,this.asc.iSet));this.asc.setAtomSetName(a)},
"~S");c(b,"cloneLastAtomSet",function(a,d){var h=this.asc.getLastAtomSetAtomCount();this.asc.cloneLastAtomSetFromPoints(a,d);this.asc.haveUnitCell&&(this.doCheckUnitCell=this.iHaveUnitCell=!0,this.sgName=this.previousSpaceGroup,this.unitCellParams=this.previousUnitCell);return h},"~N,~A");c(b,"setSpaceGroupName",function(a){this.ignoreFileSpaceGroupName||null==a||(a=a.trim(),0==a.length||(a.equals("HM:")||a.equals(this.sgName))||(a.equals("P1")||JU.Logger.info("Setting space group name to "+a),this.sgName=
a))},"~S");c(b,"setSymmetryOperator",function(a){if(this.ignoreFileSymmetryOperators)return-1;var d=this.asc.getXSymmetry().addSpaceGroupOperation(a,!0);0>d&&this.warnSkippingOperation(a);this.iHaveSymmetryOperators=!0;return d},"~S");c(b,"warnSkippingOperation",function(a){JU.Logger.warn("Skipping symmetry operation "+a)},"~S");c(b,"initializeCartesianToFractional",function(){for(var a=0;16>a;a++)if(!Float.isNaN(this.unitCellParams[6+a]))return;for(a=0;16>a;a++)this.unitCellParams[6+a]=0==a%5?1:
0;this.nMatrixElements=0});c(b,"clearUnitCell",function(){if(!this.ignoreFileUnitCell){for(var a=6;22>a;a++)this.unitCellParams[a]=NaN;this.checkUnitCell(6)}});c(b,"setUnitCellItem",function(a,d){this.ignoreFileUnitCell||(0==a&&1==d&&!this.allow_a_len_1||3==a&&0==d?(null==this.ucItems&&(this.ucItems=L(6,0)),this.ucItems[a]=d):(null!=this.ucItems&&6>a&&(this.ucItems[a]=d),!Float.isNaN(d)&&(6<=a&&Float.isNaN(this.unitCellParams[6]))&&this.initializeCartesianToFractional(),this.unitCellParams[a]=d,this.debugging&&
JU.Logger.debug("setunitcellitem "+a+" "+d),6>a||Float.isNaN(d)?this.iHaveUnitCell=this.checkUnitCell(6):12==++this.nMatrixElements&&(this.iHaveUnitCell=this.checkUnitCell(22))))},"~N,~N");c(b,"setUnitCell",function(a,d,h,b,c,f){this.ignoreFileUnitCell||(this.clearUnitCell(),this.unitCellParams[0]=a,this.unitCellParams[1]=d,this.unitCellParams[2]=h,0!=b&&(this.unitCellParams[3]=b),0!=c&&(this.unitCellParams[4]=c),0!=f&&(this.unitCellParams[5]=f),this.iHaveUnitCell=this.checkUnitCell(6))},"~N,~N,~N,~N,~N,~N");
c(b,"addExplicitLatticeVector",function(a,d,h){if(!this.ignoreFileUnitCell){if(0==a)for(var b=0;6>b;b++)this.unitCellParams[b]=0;a=6+3*a;this.unitCellParams[a++]=d[h++];this.unitCellParams[a++]=d[h++];this.unitCellParams[a]=d[h];if(Float.isNaN(this.unitCellParams[0]))for(a=0;6>a;a++)this.unitCellParams[a]=-1;if(this.iHaveUnitCell=this.checkUnitCell(15)){if(this.slabXY||this.polymerX)this.unitCellParams[2]=-1;this.polymerX&&(this.unitCellParams[1]=-1)}}},"~N,~A,~N");c(b,"checkUnitCell",function(a){for(var d=
0;d<a;d++)if(Float.isNaN(this.unitCellParams[d]))return!1;this.fixFloatA(this.unitCellParams);if(22==a&&1==this.unitCellParams[0]&&1==this.unitCellParams[1]&&1==this.unitCellParams[2]&&1==this.unitCellParams[6]&&1==this.unitCellParams[11]&&1==this.unitCellParams[16])return!1;6==a&&Float.isNaN(this.unitCellParams[6])&&(this.slabXY&&0<this.unitCellParams[2]?(JU.SimpleUnitCell.addVectors(this.unitCellParams),this.unitCellParams[2]=-1):this.polymerX&&0<this.unitCellParams[1]&&(JU.SimpleUnitCell.addVectors(this.unitCellParams),
this.unitCellParams[1]=this.unitCellParams[2]=-1));this.doApplySymmetry&&(this.getSymmetry(),this.doConvertToFractional=!this.fileCoordinatesAreFractional);return!0},"~N");c(b,"getSymmetry",function(){if(!this.iHaveUnitCell)return null;null==this.symmetry&&((this.symmetry=this.asc.newFileSymmetry()).setUnitCellFromParams(this.unitCellParams,!1,this.cellSlop),this.checkUnitCellOffset());null==this.symmetry?this.iHaveUnitCell=!1:this.symmetry.setSpaceGroupName(this.sgName);return this.symmetry});c(b,
"checkUnitCellOffset",function(){null==this.fileOffsetFractional||null==this.symmetry||(this.fileOffset.setT(this.fileOffsetFractional),this.unitCellOffsetFractional!=this.fileCoordinatesAreFractional&&(this.unitCellOffsetFractional?this.symmetry.toCartesian(this.fileOffset,!1):this.symmetry.toFractional(this.fileOffset,!1)))});c(b,"fractionalizeCoordinates",function(a){if(null!=this.getSymmetry()){var d=this.asc.atoms;if(a)for(var h=this.asc.ac;0<=--h;)this.symmetry.toFractional(d[h],!1);else for(h=
this.asc.ac;0<=--h;)this.symmetry.toCartesian(d[h],!1);this.setFractionalCoordinates(a)}},"~B");c(b,"setFractionalCoordinates",function(a){this.iHaveFractionalCoordinates=this.fileCoordinatesAreFractional=a;this.checkUnitCellOffset()},"~B");c(b,"setFilterAtomTypeStr",function(a){this.filterAtomTypeStr=a;this.filterAtomNameTerminator="\x00"},"~S");c(b,"setFilter",function(a){null==a?a=this.htParams.get("filter"):this.filterCased=this.bsFilter=null;null==this.filterCased&&(this.filterCased=null==a?
null:a+";");null!=a&&(a=a.toUpperCase());this.filter=a;this.doSetOrientation=!this.checkFilterKey("NOORIENT");this.doCentralize=!this.checkFilterKey("NOCENTER")&&this.checkFilterKey("CENTER");this.addVibrations=!this.checkFilterKey("NOVIB");this.ignoreStructure=this.checkFilterKey("DSSP");this.isDSSP1=this.checkFilterKey("DSSP1");this.doReadMolecularOrbitals=!this.checkFilterKey("NOMO");this.useAltNames=this.checkFilterKey("ALTNAME");this.reverseModels=this.checkFilterKey("REVERSEMODELS");this.allow_a_len_1=
this.checkFilterKey("TOPOS");this.slabXY=this.checkFilterKey("SLABXY");this.polymerX=!this.slabXY&&this.checkFilterKey("POLYMERX");this.noHydrogens=this.checkFilterKey("NOH");this.noMinimize=this.checkFilterKey("NOMIN");this.optimize2D=this.checkFilterKey("2D")&&!this.noHydrogens&&!this.noMinimize;if(null!=this.filter){this.fixUnitCell=this.checkFilterKey("FIXUNITCELL");this.checkFilterKey("LOWPRECISION")&&this.setLowPrecision();this.checkFilterKey("HETATM")&&(this.filterHetero=!0,this.filter=JU.PT.rep(this.filter,
"HETATM","HETATM-Y"),this.filterCased=JU.PT.rep(this.filterCased,"HETATM","HETATM-Y"));this.checkFilterKey("ATOM")&&(this.filterHetero=!0,this.filter=JU.PT.rep(this.filter,"ATOM","HETATM-N"),this.filterCased=JU.PT.rep(this.filterCased,"ATOM","HETATM-N"));this.checkFilterKey("CELL=")&&(this.strSupercell=this.filter.substring(this.filter.indexOf("CELL=")+5).toLowerCase());this.nameRequired=JU.PT.getQuotedAttribute(this.filter,"NAME");null!=this.nameRequired&&(this.nameRequired.startsWith("'")?this.nameRequired=
JU.PT.split(this.nameRequired,"'")[1]:this.nameRequired.startsWith('"')&&(this.nameRequired=JU.PT.split(this.nameRequired,'"')[1]),this.filter=JU.PT.rep(this.filter,this.nameRequired,""),this.filter=JU.PT.rep(this.filter,"NAME=",""));this.filterAtomName=this.checkFilterKey("*.")||this.checkFilterKey("!.");if(this.filter.startsWith("_")||this.filter.startsWith("!_")||0<=this.filter.indexOf(";_"))this.filterElement=this.checkFilterKey("_");this.filterGroup3=this.checkFilterKey("[");this.filterChain=
this.checkFilterKey(":");this.filterAltLoc=this.checkFilterKey("%");this.filterEveryNth=this.checkFilterKey("/=");this.filterAllHetero=this.checkFilterKey("ALLHET");if(this.filterEveryNth)this.filterN=this.parseIntAt(this.filter,this.filter.indexOf("/=")+2);else if(this.filter.startsWith("=")||0<=this.filter.indexOf(";="))this.filterAtomType=this.checkFilterKey("=");-2147483648==this.filterN&&(this.filterEveryNth=!1);this.haveAtomFilter=this.filterAtomName||this.filterAtomType||this.filterElement||
this.filterGroup3||this.filterChain||this.filterAltLoc||this.filterHetero||this.filterEveryNth||this.checkFilterKey("/=");if(null==this.bsFilter&&(this.bsFilter=new JU.BS,this.htParams.put("bsFilter",this.bsFilter),this.filter=(";"+this.filter+";").$replace(",",";"),a=this.getFilter("PRECISION="),null!=a&&(a=JU.PT.parseInt(a),0<a&&16>=a&&(this.precision=1E3+a,this.filteredPrecision=!0)),a=this.getFilter("LATTICESCALING="),null!=a&&25<this.unitCellParams.length&&(this.unitCellParams[25]=this.latticeScaling=
this.parseFloatStr(a)),a=this.getFilter("SYMOP="),null!=a&&(this.filterSymop=" "+a+" "),JU.Logger.info("filtering with "+this.filter),this.haveAtomFilter)){this.filter1Cased=this.filterCased;this.filter2Cased="";if(0<=(a=this.filter.indexOf("|")))this.filter1Cased=this.filter.substring(0,a).trim()+";",this.filter2Cased=";"+this.filter.substring(a).trim();this.filter1=this.filter1Cased.toUpperCase();this.filter2=0==this.filter2Cased.length?null:this.filter2Cased.toUpperCase()}}},"~S");c(b,"getFilterWithCase",
function(a){var d=null==this.filterCased?-1:this.filterCased.toUpperCase().indexOf(a.toUpperCase());return 0>d?null:this.filterCased.substring(d+a.length,this.filterCased.indexOf(";",d))},"~S");c(b,"getFilter",function(a){var d=null==this.filter?-1:this.filter.indexOf(a);return 0>d?null:this.filter.substring(d+a.length,this.filter.indexOf(";",d))},"~S");c(b,"checkFilterKey",function(a){return null!=this.filter&&0<=this.filter.indexOf(a)},"~S");c(b,"checkAndRemoveFilterKey",function(a){if(!this.checkFilterKey(a))return!1;
this.filter=JU.PT.rep(this.filter,a,"");3>this.filter.length&&(this.filter=null);return!0},"~S");c(b,"filterAtom",function(a,d){if(!this.haveAtomFilter)return!0;var h=this.checkFilter(a,this.filter1,this.filter1Cased);null!=this.filter2&&(h=(new Boolean(h|this.checkFilter(a,this.filter2,this.filter2Cased))).valueOf());if(h&&this.filterEveryNth&&(!a.isHetero||!this.filterAllHetero))h=0==this.nFiltered++%this.filterN;this.bsFilter.setBitTo(0<=d?d:this.asc.ac,h);return h},"J.adapter.smarter.Atom,~N");
c(b,"checkFilter",function(a,d,h){return a.isHetero&&this.filterAllHetero?!0:(!this.filterGroup3||null==a.group3||!this.filterReject(d,"[",a.group3.toUpperCase()+"]"))&&(!this.filterAtomName||this.allowAtomName(a.atomName,d))&&(null==this.filterAtomTypeStr||null==a.atomName||0<=a.atomName.toUpperCase().indexOf("\x00"+this.filterAtomTypeStr))&&(!this.filterElement||null==a.elementSymbol||!this.filterReject(d,"_",a.elementSymbol.toUpperCase()+";"))&&(!this.filterChain||0==a.chainID||!this.filterReject(h,
":",""+this.vwr.getChainIDStr(a.chainID)))&&(!this.filterAltLoc||"\x00"==a.altLoc||!this.filterReject(d,"%",""+a.altLoc))&&(!this.filterHetero||!this.allowPDBFilter||!this.filterReject(d,"HETATM",a.isHetero?"-Y":"-N"))},"J.adapter.smarter.Atom,~S,~S");c(b,"rejectAtomName",function(a){return this.filterAtomName&&!this.allowAtomName(a,this.filter)},"~S");c(b,"allowAtomName",function(a,d){return null==a||!this.filterReject(d,".",a.toUpperCase()+this.filterAtomNameTerminator)},"~S,~S");c(b,"filterReject",
function(a,d,h){return 0<=a.indexOf(d)&&0<=a.indexOf("!"+d)==0<=a.indexOf(d+h)},"~S,~S,~S");c(b,"set2D",function(){this.asc.setInfo("is2D",Boolean.TRUE);this.asc.getBSAtoms(-1);this.noHydrogens&&(this.asc.setInfo("noHydrogen",Boolean.TRUE),this.optimize2D=!1);this.optimize2D?(this.asc.fix2Stereo(),this.asc.setInfo("doMinimize",Boolean.TRUE),this.appendLoadNote("This model is 2D. Its 3D structure was generated.")):(this.appendLoadNote('This model is 2D. Its 3D structure has not been generated; use LOAD "" FILTER "2D" to optimize 3D.'),
this.addJmolScript("select thismodel;wireframe only"))});c(b,"doGetVibration",function(a){return this.addVibrations&&(0>=this.desiredVibrationNumber||a==this.desiredVibrationNumber)},"~N");c(b,"setTransform",function(a,d,h,b,c,f,j,k,l){null==this.matRot&&this.doSetOrientation&&(this.matRot=new JU.M3,a=JU.V3.new3(a,d,h),a.normalize(),this.matRot.setColumnV(0,a),a.set(b,c,f),a.normalize(),this.matRot.setColumnV(1,a),a.set(j,k,l),a.normalize(),this.matRot.setColumnV(2,a),this.asc.setInfo("defaultOrientationMatrix",
JU.M3.newM3(this.matRot)),b=JU.Quat.newM(this.matRot),this.asc.setInfo("defaultOrientationQuaternion",b),JU.Logger.info("defaultOrientationMatrix = "+this.matRot))},"~N,~N,~N,~N,~N,~N,~N,~N,~N");c(b,"setAtomCoordXYZ",function(a,d,h,b){a.set(d,h,b);this.setAtomCoord(a)},"J.adapter.smarter.Atom,~N,~N,~N");c(b,"setAtomCoordScaled",function(a,d,h,b){null==a&&(a=this.asc.addNewAtom());this.setAtomCoordXYZ(a,this.parsePrecision(d[h])*b,this.parsePrecision(d[h+1])*b,this.parsePrecision(d[h+2])*b);return a},
"J.adapter.smarter.Atom,~A,~N,~N");c(b,"setAtomCoordTokens",function(a,d,h){this.setAtomCoordXYZ(a,this.parsePrecision(d[h]),this.parsePrecision(d[h+1]),this.parsePrecision(d[h+2]))},"J.adapter.smarter.Atom,~A,~N");c(b,"addAtomXYZSymName",function(a,d,h,b){var c=this.asc.addNewAtom();null!=h&&(c.elementSymbol=h);null!=b&&(c.atomName=b);this.setAtomCoordTokens(c,a,d);return c},"~A,~N,~S,~S");c(b,"setAtomCoord",function(a){var d=this.doConvertToFractional&&!this.fileCoordinatesAreFractional&&null!=
this.getSymmetry();null!=this.fileScaling&&(a.x=a.x*this.fileScaling.x+this.fileOffset.x,a.y=a.y*this.fileScaling.y+this.fileOffset.y,a.z=a.z*this.fileScaling.z+this.fileOffset.z);d&&(this.symmetry.haveUnitCell()||this.symmetry.setUnitCellFromParams(this.unitCellParams,!1,NaN),this.symmetry.toFractional(a,!1),this.iHaveFractionalCoordinates=!0);this.floatifyJavaDouble&&this.fileCoordinatesAreFractional&&this.fixFloatPt(a,1E5);this.doCheckUnitCell=!0},"J.adapter.smarter.Atom");c(b,"addSites",function(a){this.asc.setCurrentModelInfo("pdbSites",
a);var d="",h;for(a=a.entrySet().iterator();a.hasNext()&&((h=a.next())||1);){for(var b=h.getKey(),c=h.getValue(),f,j=b.length;0<=--j;)if(!JU.PT.isLetterOrDigit(f=b.charAt(j))&&"'"!=f)b=b.substring(0,j)+"_"+b.substring(j+1);c=c.get("groups");0!=c.length&&(this.addSiteScript("@site_"+b+" "+c),this.addSiteScript("site_"+b+' = ["'+JU.PT.rep(c,",",'","')+'"]'),d+=',"site_'+b+'"')}0<d.length&&this.addSiteScript("site_list = ["+d.substring(1)+"]")},"java.util.Map");c(b,"applySymmetryAndSetTrajectory",function(){this.applySymTrajASCR()});
c(b,"applySymTrajASCR",function(){this.forcePacked&&this.initializeSymmetryOptions();var a=null;this.iHaveUnitCell&&this.doCheckUnitCell?(a=this.getSymmetry(),this.setPrecision(),a=this.asc.getXSymmetry().applySymmetryFromReader(a)):this.asc.setTensors();this.isTrajectory&&this.asc.setTrajectory();null!=this.moreUnitCellInfo&&(this.setMoreInfo(),this.moreUnitCellInfo=null);this.finalizeSubclassSymmetry(null!=a);this.merging&&(null!=a&&this.iHaveFractionalCoordinates&&this.iHaveUnitCell&&this.iHaveSymmetryOperators)&&
(this.fractionalizeCoordinates(!1),this.addJmolScript("modelkit spacegroup P1"));this.initializeSymmetry();return a});c(b,"setMoreInfo",function(){this.asc.setCurrentModelInfo("moreUnitCellInfo",this.moreUnitCellInfo);for(var a=this.moreUnitCellInfo.size();0<=--a;){var d=this.moreUnitCellInfo.get(a).$plit("=");this.asc.setCurrentModelInfo(d[0],d[1])}});c(b,"finalizeSubclassSymmetry",function(){},"~B");c(b,"doPreSymmetry",function(){},"~B");c(b,"finalizeMOData",function(a){this.asc.setCurrentModelInfo("moData",
a);null!=a&&(a=a.get("mos"),null!=a&&JU.Logger.info(a.size()+" molecular orbitals read in model "+this.asc.atomSetCount))},"java.util.Map");b.getElementSymbol=c(b,"getElementSymbol",function(a){return J.api.JmolAdapter.getElementSymbol(a)},"~N");c(b,"fillDataBlock",function(a,d){for(var h=a.length,b=0;b<h;b++)a[b]=JU.PT.getTokens(this.discardLinesUntilNonBlank()),a[b].length<d&&--b},"~A,~N");c(b,"fill3x3",function(a,d){for(var h=R(3,3,0),b=null==a,c=d,f=0;3>f;f++){if(b||d>=a.length){for(;3>(a=JU.PT.getTokens(this.rd())).length;);
d=0>c?a.length+c:c}for(var j=0;3>j;j++)h[f][j]=Double.$valueOf(a[d++]).doubleValue()}return h},"~A,~N");c(b,"fillFloatArray",function(a,d,h){for(var b=[],c=0,f=0;f<h.length;f++){for(;null!=b&&c>=b.length;){null==a&&(a=this.rd());if(0==d)b=JU.PT.getTokens(a);else{b=Array(v(a.length/d));for(c=0;c<b.length;c++)b[c]=a.substring(c*d,(c+1)*d)}a=null;c=0}if(null==b)break;h[f]=this.parseFloatStr(b[c++])}return h},"~S,~N,~A");c(b,"fillFrequencyData",function(a,d,h,b,c,f,j,k,l,g){var m=0!=d&&h!=d&&null==g;
0==d&&null!=k&&(d=k.length);d=c?d:3*d;var p=b.length;if(null==g)g=Array(d),this.fillDataBlockFixed(g,f,j,l);else if(!c){this.fillDataBlockFixed(g,f,j,-l);if(null==g[0])return;a+=this.parseIntAt(this.line,l-5)-1}for(j=f=0;f<d;f++,j++){l=g[f];for(var y=c?null:g[++f],A=c?null:g[++f],H=l.length-(c?3*p:p)-1,M=0,v=0;v<p;v++){++H;var n=l[H];")"==n.charAt(0)&&(n=n.substring(1));var n=this.parseFloatStr(n),q=this.parseFloatStr(c?l[++H]:y[H]),w=this.parseFloatStr(c?l[++H]:A[H]);if(!b[v]){var u=null==k?j:k[j];
0>u||(u+=a+h*M++,this.debugging&&JU.Logger.debug("atom "+u+" vib"+M+": "+n+" "+q+" "+w),this.asc.addVibrationVectorWithSymmetry(u,n,q,w,m))}}}},"~N,~N,~N,~A,~B,~N,~N,~A,~N,~A");c(b,"fillDataBlockFixed",function(a,d,h,b){if(0==h)this.fillDataBlock(a,b);else for(var c=a.length,f=0;f<c;f++){this.discardLinesUntilNonBlank();if(0>b&&" "==this.line.charAt(-b)){a[0]=null;break}var j=v((this.line.length-d+1)/h);a[f]=Array(j);for(var k=0,l=d;k<j;k++,l+=h)a[f][k]=this.line.substring(l,Math.min(this.line.length,
l+h))}},"~A,~N,~N,~N");c(b,"readLines",function(a){for(;0<=--a;)this.rd();return this.line},"~N");c(b,"discardLinesUntilStartsWith",function(a){for(;null!=this.rd()&&!this.line.startsWith(a););return this.line},"~S");c(b,"discardLinesUntilContains",function(a){for(;null!=this.rd()&&0>this.line.indexOf(a););return this.line},"~S");c(b,"discardLinesUntilContains2",function(a,d){for(;null!=this.rd()&&0>this.line.indexOf(a)&&0>this.line.indexOf(d););return this.line},"~S,~S");c(b,"discardLinesUntilBlank",
function(){for(;null!=this.rd()&&0!=this.line.trim().length;);return this.line});c(b,"discardLinesUntilNonBlank",function(){for(;null!=this.rd()&&0==this.line.trim().length;);return this.line});c(b,"checkLineForScript",function(a){this.line=a;this.checkCurrentLineForScript()},"~S");c(b,"checkCurrentLineForScript",function(){this.line.endsWith("#noautobond")&&(this.line=this.line.substring(0,this.line.lastIndexOf("#")).trim(),this.asc.setNoAutoBond());var a=this.line.indexOf("jmolscript:");if(0<=a){var d=
this.line.substring(a+11,this.line.length);0<=d.indexOf("#")&&(d=d.substring(0,d.indexOf("#")));this.addJmolScript(d);this.line=this.line.substring(0,a).trim()}});c(b,"addJmolScript",function(a){JU.Logger.info("#jmolScript: "+a);null==this.previousScript?this.previousScript="":this.previousScript.endsWith(";")||(this.previousScript+=";");this.previousScript+=a;this.asc.setInfo("jmolscript",this.previousScript)},"~S");c(b,"addSiteScript",function(a){null==this.siteScript?this.siteScript="":this.siteScript.endsWith(";")||
(this.siteScript+=";");this.siteScript+=a;this.asc.setInfo("sitescript",this.siteScript)},"~S");c(b,"rd",function(){return this.RL()});c(b,"RL",function(){this.prevline=this.line;this.line=this.reader.readLine();null!=this.out&&null!=this.line&&this.out.append(this.line).append("\n");this.ptLine++;this.debugging&&null!=this.line&&JU.Logger.info(this.line);return this.line});b.getStrings=c(b,"getStrings",function(a,d,h){for(var b=Array(d),c=0,f=0;c<d;c++,f+=h)b[c]=a.substring(f,f+h);return b},"~S,~N,~N");
c(b,"getTokens",function(){return JU.PT.getTokens(this.line)});b.getTokensFloat=c(b,"getTokensFloat",function(a,d,h){null==d&&(d=L(h,0));JU.PT.parseFloatArrayDataN(JU.PT.getTokens(a),d,h);return d},"~S,~A,~N");c(b,"parseFloat",function(){return JU.PT.parseFloatNext(this.line,this.next)});c(b,"parseFloatStr",function(a){this.next[0]=0;return JU.PT.parseFloatNext(a,this.next)},"~S");c(b,"parseFloatRange",function(a,d,h){this.next[0]=d;return JU.PT.parseFloatRange(a,h,this.next)},"~S,~N,~N");c(b,"parseInt",
function(){return JU.PT.parseIntNext(this.line,this.next)});c(b,"parseIntStr",function(a){this.next[0]=0;return JU.PT.parseIntNext(a,this.next)},"~S");c(b,"parseIntAt",function(a,d){this.next[0]=d;return JU.PT.parseIntNext(a,this.next)},"~S,~N");c(b,"parseIntRange",function(a,d,h){this.next[0]=d;return JU.PT.parseIntRange(a,h,this.next)},"~S,~N,~N");c(b,"parseToken",function(){return JU.PT.parseTokenNext(this.line,this.next)});c(b,"parseTokenStr",function(a){this.next[0]=0;return JU.PT.parseTokenNext(a,
this.next)},"~S");c(b,"parseTokenNext",function(a){return JU.PT.parseTokenNext(a,this.next)},"~S");c(b,"parseTokenRange",function(a,d,h){this.next[0]=d;return JU.PT.parseTokenRange(a,h,this.next)},"~S,~N,~N");b.getFortranFormatLengths=c(b,"getFortranFormatLengths",function(a){var d=new JU.Lst,h=0,b=0,c=1,f=!1,j=!0;a+=",";for(var k=0;k<a.length;k++){var l=a.charAt(k);switch(l.charCodeAt(0)){case 46:f=!1;continue;case 44:for(f=0;f<b;f++)d.addLast(Integer.$valueOf(h*c));f=!1;j=!0;b=0;continue;case 88:h=
b;b=1;c=-1;continue}JU.PT.isDigit(l)?f?h=10*h+l.charCodeAt(0)-48:j&&(b=10*b+l.charCodeAt(0)-48):JU.PT.isLetter(l)?(h=0,f=!0,j=!1,c=1):f=!1}return d},"~S");c(b,"read3Vectors",function(a){for(var d=Array(3),h=L(3,0),b=0;3>b;b++){if(0<b||Float.isNaN(this.parseFloatStr(this.line)))if(this.rd(),0==b&&null!=this.line){b=-1;continue}this.fillFloatArray(this.line,0,h);d[b]=new JU.V3;d[b].setA(h);a&&d[b].scale(0.5291772)}return d},"~B");c(b,"setElementAndIsotope",function(a,d){var h=this.parseIntStr(d);-2147483648==
h?a.elementSymbol=d:(d=d.substring((""+h).length),a.elementNumber=0==d.length?h:(h<<7)+J.api.JmolAdapter.getElementNumber(d))},"J.adapter.smarter.Atom,~S");c(b,"finalizeModelSet",function(){});c(b,"setChainID",function(a,d){a.chainID=this.vwr.getChainID(d,!0)},"J.adapter.smarter.Atom,~S");g(b,"readNextLine",function(){null!=this.rd()&&0<=this.line.indexOf("#jmolscript:")&&this.checkCurrentLineForScript();return this.line});c(b,"addMoreUnitCellInfo",function(a){null==this.moreUnitCellInfo&&(this.moreUnitCellInfo=
new JU.Lst);this.moreUnitCellInfo.addLast(a)},"~S");c(b,"getInterface",function(a){a=J.api.Interface.getInterface(a,this.vwr,"file");if(null==a)throw new NullPointerException("Interface");return a},"~S");c(b,"forceSymmetry",function(a){a&&(this.doPackUnitCell=a);this.doApplySymmetry||(this.doApplySymmetry=!0,this.latticeCells[0]=this.latticeCells[1]=this.latticeCells[2]=1)},"~B");c(b,"fixFloatA",function(a){if(this.floatifyJavaDouble)for(var d=a.length;0<=--d;)Float.isNaN(a[d])||(a[d]=JU.PT.fixFloat(a[d],
1E5))},"~A");c(b,"fixDoubleA",function(a){if(this.floatifyJavaDouble)for(var d=a.length;0<=--d;)Double.isNaN(a[d])||(a[d]=JU.PT.fixDouble(a[d],1E5))},"~A");c(b,"fixFloatPt",function(a,d){this.floatifyJavaDouble&&JU.PT.fixPtFloats(a,d)},"JU.P3,~N")});n("J.adapter.smarter");w(function(){this.atomSetIndex=0;q(this,arguments)},J.adapter.smarter,"AtomSetObject",null);n("J.adapter.smarter");z(["J.adapter.smarter.AtomSetObject"],"J.adapter.smarter.Bond",null,function(){var b=w(function(){this.order=this.atomIndex2=
this.atomIndex1=0;this.uniqueID=this.colix=this.pymolRadius=-1;this.distance=0;q(this,arguments)},J.adapter.smarter,"Bond",J.adapter.smarter.AtomSetObject);x(b,function(a,d,h){I(this,J.adapter.smarter.Bond,[]);this.atomIndex1=a;this.atomIndex2=d;this.order=h},"~N,~N,~N");g(b,"toString",function(){return"[Bond "+this.atomIndex1+" "+this.atomIndex2+" "+this.order+"]"})});n("J.adapter.smarter");z(["J.api.JmolAdapterBondIterator"],"J.adapter.smarter.BondIterator",null,function(){var b=w(function(){this.bonds=
this.bsAtoms=null;this.ibond=0;this.bond=null;this.bondCount=0;q(this,arguments)},J.adapter.smarter,"BondIterator",J.api.JmolAdapterBondIterator);x(b,function(a){I(this,J.adapter.smarter.BondIterator,[]);this.bsAtoms=a.bsAtoms;this.bonds=a.bonds;this.bondCount=a.bondCount;this.ibond=0},"J.adapter.smarter.AtomSetCollection");g(b,"hasNext",function(){if(this.ibond==this.bondCount)return!1;for(;null==(this.bond=this.bonds[this.ibond++])||null!=this.bsAtoms&&(!this.bsAtoms.get(this.bond.atomIndex1)||
!this.bsAtoms.get(this.bond.atomIndex2));)if(this.ibond==this.bondCount)return!1;return!0});g(b,"getAtomUniqueID1",function(){return Integer.$valueOf(this.bond.atomIndex1)});g(b,"getAtomUniqueID2",function(){return Integer.$valueOf(this.bond.atomIndex2)});g(b,"getEncodedOrder",function(){return this.bond.order});g(b,"getPymolRadius",function(){return this.bond.pymolRadius});g(b,"getColix",function(){return this.bond.colix})});n("J.adapter.smarter");z(null,"J.adapter.smarter.Resolver","java.io.BufferedInputStream java.util.StringTokenizer JU.LimitedLineReader $.PT $.Rdr J.adapter.smarter.AtomSetCollectionReader $.SmarterJmolAdapter J.api.Interface JU.Logger JV.JC".split(" "),
function(){var b=G(J.adapter.smarter,"Resolver",null);b.getReaderClassBase=c(b,"getReaderClassBase",function(a){var d=a+"Reader";if(a.startsWith("Xml"))return"J.adapter.readers.xml."+d;a=";"+a+";";for(var h=1;h<J.adapter.smarter.Resolver.readerSets.length;h+=2)if(0<=J.adapter.smarter.Resolver.readerSets[h].indexOf(a))return"J.adapter.readers."+J.adapter.smarter.Resolver.readerSets[h-1]+d;return"J.adapter.readers.???."+d},"~S");b.getFileType=c(b,"getFileType",function(a){try{return J.adapter.smarter.Resolver.determineAtomSetCollectionReader(a,
null)}catch(d){if(D(d,Exception))return null;throw d;}},"java.io.BufferedReader");b.getAtomCollectionReader=c(b,"getAtomCollectionReader",function(a,d,h,b,c){var f;a=J.adapter.smarter.Resolver.fixDOSName(a);var j=null;null==d&&(d=J.adapter.smarter.Resolver.getFileTypefromFilter(b.get("filter")));null!=d?(f=J.adapter.smarter.Resolver.getReaderFromType(d),null==f&&(f=J.adapter.smarter.Resolver.getReaderFromType("Xml"+d)),null==f?j="unrecognized file format type "+d+" file="+a:JU.Logger.info("The Resolver assumes "+
f+" file="+a)):(f=J.adapter.smarter.Resolver.determineAtomSetCollectionReader(h,b),"\n"==f.charAt(0)&&(d=null==b?null:b.get("defaultType"),null!=d&&(d=J.adapter.smarter.Resolver.getReaderFromType(d),null!=d&&(f=d))),"\n"==f.charAt(0)?j="unrecognized file format for file\n"+a+"\n"+J.adapter.smarter.Resolver.split(f,50):f.equals("spt")?j="NOTE: file recognized as a script file: "+a+"\n":a.equals("ligand")||JU.Logger.info("The Resolver thinks "+f));if(null!=j)return J.adapter.smarter.SmarterJmolAdapter.close(h),
JU.Logger.error(j),j;b.put("ptFile",Integer.$valueOf(c));0>=c&&b.put("readerName",f);return J.adapter.smarter.Resolver.getReader(f,b)},"~S,~S,~O,java.util.Map,~N");b.getReader=c(b,"getReader",function(a){var d=null,h=null,d=null,h=J.adapter.smarter.Resolver.getReaderClassBase(a);if(null==(d=J.api.Interface.getInterface(h,null,"reader")))d=JV.JC.READER_NOT_FOUND+h,JU.Logger.error(d);return d},"~S,java.util.Map");b.getReaderFromType=c(b,"getReaderFromType",function(a){a.endsWith("(XML)")&&(a="Xml"+
a.substring(0,a.length-5));a=";"+a.toLowerCase()+";";if(0<=";zmatrix;cfi;c;vfi;v;mnd;jag;gms;g;gau;mp;nw;orc;pqs;qc;".indexOf(a))return"Input";for(var d,h,b=J.adapter.smarter.Resolver.readerSets.length;0<=--b;)if(0<=(h=(d=J.adapter.smarter.Resolver.readerSets[b--]).toLowerCase().indexOf(a)))return d.substring(h+1,d.indexOf(";",h+2));return null},"~S");b.split=c(b,"split",function(a,d){for(var h="",b=a.length,c=0,f=0;c<b;c=f)h+=a.substring(c,f=Math.min(c+d,b))+"\n";return h},"~S,~N");b.DOMResolve=
c(b,"DOMResolve",function(a){var d=J.adapter.smarter.Resolver.getXmlType(a.get("nameSpaceInfo"));JU.Logger.debugging&&JU.Logger.debug("The Resolver thinks "+d);a.put("readerName",d);return J.adapter.smarter.Resolver.getReader("XmlReader",a)},"java.util.Map");b.determineAtomSetCollectionReader=c(b,"determineAtomSetCollectionReader",function(a,d){var h;if(C(a,"javajs.api.GenericBinaryDocument"))return h=J.adapter.smarter.Resolver.getBinaryType(a.getInputStream()),null==h?"binary file type not recognized":
h;if(C(a,"java.io.InputStream")){h=J.adapter.smarter.Resolver.getBinaryType(a);if(null!=h)return h;a=JU.Rdr.getBufferedReader(new java.io.BufferedInputStream(a),null)}var b=a,c=new JU.LimitedLineReader(b,16384),f=c.getHeader(64).trim();if(0==f.length)throw new java.io.EOFException("File contains no data.");if(1==f.indexOf("PNG")&&0<=f.indexOf("PNGJ"))return"pngj";if(1==f.indexOf("PNG")||1==f.indexOf("JPG")||6==f.indexOf("JFIF"))return"spt";if(0<=f.indexOf('"num_pairs"'))return"dssr";if(0<=f.indexOf("output.31\n"))return"GenNBO|output.31";
if(null!=(h=J.adapter.smarter.Resolver.checkFileStart(f)))return h.equals("Xml")?J.adapter.smarter.Resolver.getXmlType(c.getHeader(0)):h;var j="{"==f.charAt(0);if(j&&null!=(h=J.adapter.smarter.Resolver.checkJsonHeader(f)))return h;for(var k=Array(16),l=h=0;l<k.length;++l)k[l]=c.readLineWithNewline(),0<k[l].length&&h++;if(null!=(h=J.adapter.smarter.Resolver.checkSpecial1(h,k,f))||null!=(h=J.adapter.smarter.Resolver.checkLineStarts(k))||null!=(h=J.adapter.smarter.Resolver.checkHeaderContains(c.getHeader(0)))||
null!=(h=J.adapter.smarter.Resolver.checkSpecial2(k)))return h;if(j){b=b.readLine();if(null!=(h=J.adapter.smarter.Resolver.checkJSONContains(b)))return null!=d&&d.put("fileData",b),h;b=null==d?null:b.substring(0,Math.min(100,b.length))}else b=null==d?null:"\n"+k[0]+"\n"+k[1]+"\n"+k[2]+"\n";return b},"~O,java.util.Map");b.checkJsonHeader=c(b,"checkJsonHeader",function(a){return a.startsWith('{"SSG_international_symbol')?"FSGOutput":null},"~S");b.getBinaryType=c(b,"getBinaryType",function(a){a=JU.Rdr.getMagic(a,
100);var d=a[0]&255;return JU.Rdr.isPickleB(a)?"PyMOL":222==d?J.adapter.smarter.Resolver.bytesMatch(a,4,J.adapter.smarter.Resolver.mmtfMagic)?"MMTF":null:131==d?J.adapter.smarter.Resolver.checkBCIF(a,!0)?"BCIF":null:J.adapter.smarter.Resolver.bytesMatch(a,0,J.adapter.smarter.Resolver.cdxMagic)?"CDX":J.adapter.smarter.Resolver.bytesMatch(a,0,J.adapter.smarter.Resolver.cmdfMagic)?"Cmdf":J.adapter.smarter.Resolver.bytesMatch(a,0,J.adapter.smarter.Resolver.cmdxMagic)?"Cmdx":null},"java.io.InputStream");
b.checkBCIF=c(b,"checkBCIF",function(a,d){return J.adapter.smarter.Resolver.bytesMatch(a,10,J.adapter.smarter.Resolver.bcifMolstarMagic)||J.adapter.smarter.Resolver.bytesMatch(a,10,J.adapter.smarter.Resolver.bcifModelMagic)||J.adapter.smarter.Resolver.bytesMatch(a,10,J.adapter.smarter.Resolver.bcifModelMagic)||J.adapter.smarter.Resolver.bytesMatch(a,10,J.adapter.smarter.Resolver.bcifCoordMagic)?d:J.adapter.smarter.Resolver.bytesMatch(a,10,J.adapter.smarter.Resolver.bcifDensityMagic)||J.adapter.smarter.Resolver.bytesMatch(a,
10,J.adapter.smarter.Resolver.bcifVolumeMagic)?!d:0>J.adapter.smarter.Resolver.findBytes(a,J.adapter.smarter.Resolver.bcifServerMagic)==d},"~A,~B");b.findBytes=c(b,"findBytes",function(a,d){var h=a.length-d.length;a:for(;0<=--h;){for(var b=d.length;0<=--b;)if(a[h+b]!=d[b])continue a;return h}return-1},"~A,~A");b.bytesMatch=c(b,"bytesMatch",function(a,d,h){if(h.length>a.length-d)return!1;for(var b=h.length;0<=--b;)if(a[d+b]!=h[b])return!1;return!0},"~A,~N,~A");b.checkFileStart=c(b,"checkFileStart",
function(a){for(var d=0;d<J.adapter.smarter.Resolver.fileStartsWithRecords.length;++d)for(var h=J.adapter.smarter.Resolver.fileStartsWithRecords[d],b=1;b<h.length;++b)if(a.startsWith(h[b]))return h[0];return null},"~S");b.checkSpecial1=c(b,"checkSpecial1",function(a,d,h){if(1==a&&0<d[0].length&&JU.PT.isDigit(d[0].charAt(0)))return"Jme";if(J.adapter.smarter.Resolver.checkMopacGraphf(d))return"MopacGraphf";if(J.adapter.smarter.Resolver.checkOdyssey(d))return"Odyssey";switch(J.adapter.smarter.Resolver.checkMol(d)){case 1:case 3:case 2E3:case 3E3:return"Mol"}switch(J.adapter.smarter.Resolver.checkXyz(d)){case 1:return"Xyz";
case 2:return"Bilbao";case 3:return"PWmat"}return J.adapter.smarter.Resolver.checkAlchemy(d[0])?"Alchemy":J.adapter.smarter.Resolver.checkFoldingXyz(d)?"FoldingXyz":J.adapter.smarter.Resolver.checkXSF(d)?"Xcrysden":J.adapter.smarter.Resolver.checkCube(d)?"Cube":J.adapter.smarter.Resolver.checkWien2k(d)?"Wien2k":J.adapter.smarter.Resolver.checkAims(d)?"Aims":J.adapter.smarter.Resolver.checkGenNBO(d,h)?"GenNBO":null},"~N,~A,~S");b.checkXSF=c(b,"checkXSF",function(a){for(var d=0;0==a[d].length;)d++;
return a[d].startsWith("ANIMSTEPS ")||a[d].equals("ATOMS\n")&&0<JU.PT.parseInt(a[d+1])},"~A");b.checkAims=c(b,"checkAims",function(a){for(var d=0;d<a.length&&!a[d].startsWith("mol 1");d++){var h=JU.PT.getTokens(a[d]);if(0!=h.length&&(h[0].startsWith("atom")&&4<h.length&&Float.isNaN(JU.PT.parseFloat(h[4]))||h[0].startsWith("multipole")&&6<=h.length||h[0].startsWith("lattice_vector")&&4<=h.length))return!0}return!1},"~A");b.checkAlchemy=c(b,"checkAlchemy",function(a){var d;return 0<(d=a.indexOf("ATOMS"))&&
a.indexOf("BONDS")>d?0<JU.PT.parseInt(a.substring(0,d).trim()):!1},"~S");b.isInt=c(b,"isInt",function(a){J.adapter.smarter.Resolver.n[0]=0;a=a.trim();return 0<a.length&&-2147483648!=JU.PT.parseIntNext(a,J.adapter.smarter.Resolver.n)&&J.adapter.smarter.Resolver.n[0]==a.length},"~S");b.isFloat=c(b,"isFloat",function(a){return!Float.isNaN(JU.PT.parseFloat(a))},"~S");b.checkCube=c(b,"checkCube",function(a){for(var d=2;5>=d;d++){var h=new java.util.StringTokenizer(a[d]),b=h.countTokens();if(!(4==b||2==
d&&5==b)||!J.adapter.smarter.Resolver.isInt(h.nextToken()))return!1;for(var c=3;0<=--c;)if(!J.adapter.smarter.Resolver.isFloat(h.nextToken()))return!1;if(5==b&&!J.adapter.smarter.Resolver.isInt(h.nextToken()))return!1}return!0},"~A");b.checkFoldingXyz=c(b,"checkFoldingXyz",function(a){var d=new java.util.StringTokenizer(a[0].trim()," \t");if(2>d.countTokens()||!J.adapter.smarter.Resolver.isInt(d.nextToken().trim()))return!1;d=a[1].trim();0==d.length&&(d=a[2].trim());d=new java.util.StringTokenizer(d,
" \t");return 0<d.countTokens()&&J.adapter.smarter.Resolver.isInt(d.nextToken().trim())},"~A");b.checkGenNBO=c(b,"checkGenNBO",function(a,d){return 0<=d.indexOf("$GENNBO")||a[1].startsWith(" Basis set information needed for plotting orbitals")||0<=a[1].indexOf("s in the AO basis:")||0<=a[1].indexOf("***** NBO ")||0<=a[2].indexOf(" N A T U R A L   A T O M I C   O R B I T A L")},"~A,~S");b.checkMol=c(b,"checkMol",function(a){var d=("X"+a[3]).trim().toUpperCase();if(7>d.length||0<=d.indexOf(".")||a[0].startsWith("data_"))return 0;
if(d.endsWith("V2000"))return 2E3;if(d.endsWith("V3000"))return 3E3;var d=JU.PT.parseInt(a[3].substring(0,3).trim()),h=JU.PT.parseInt(a[3].substring(3,6).trim());return 0<d&&0<=h&&0!=a[0].indexOf("@<TRIPOS>")&&0!=a[1].indexOf("@<TRIPOS>")&&0!=a[2].indexOf("@<TRIPOS>")?3:0},"~A");b.checkMopacGraphf=c(b,"checkMopacGraphf",function(a){return 2<a[0].indexOf("MOPAC-Graphical data")},"~A");b.checkOdyssey=c(b,"checkOdyssey",function(a){var d;for(d=0;d<a.length&&(a[d].startsWith("C ")||0==a[d].length);d++);
if(d>=a.length||" "!=a[d].charAt(0)||(d+=2)+1>=a.length)return!1;var h=a[d];if(3>h.length)return!1;var b=JU.PT.parseInt(h.substring(2).trim()),c=JU.PT.parseInt(h.substring(0,2).trim());if(2>(h=a[d+1]).length)return!1;a=JU.PT.parseInt(h.substring(0,2).trim());if(0>b||5<b||0>=a||-2147483648==c||5<c)return!1;h=J.adapter.smarter.AtomSetCollectionReader.getTokensFloat(h,null,5);return!Float.isNaN(h[1])&&!Float.isNaN(h[2])&&!Float.isNaN(h[3])&&Float.isNaN(h[4])},"~A");b.checkWien2k=c(b,"checkWien2k",function(a){return a[2].startsWith("MODE OF CALC=")||
a[2].startsWith("             RELA")||a[2].startsWith("             NREL")},"~A");b.checkXyz=c(b,"checkXyz",function(a){var d=!1,h=JU.PT.parseInt(a[0]);if(0<=h&&a[0].trim().equals(""+h)){if(J.adapter.smarter.Resolver.isInt(a[2]))return 2;d=!0}if(0<=a[0].indexOf("Bilbao Crys"))return 2;var b;return(d||5<a.length&&0<h)&&((b=a[1].trim().toUpperCase()).startsWith("LATTICE VECTOR")||b.equals("LATTICE"))?3:d?1:0},"~A");b.checkLineStarts=c(b,"checkLineStarts",function(a){for(var d=0;d<J.adapter.smarter.Resolver.lineStartsWithRecords.length;++d)for(var h=
J.adapter.smarter.Resolver.lineStartsWithRecords[d],b=1;b<h.length;++b)for(var c=h[b],f=0;f<a.length;f++)if(a[f].startsWith(c))return h[0];return null},"~A");b.checkHeaderContains=c(b,"checkHeaderContains",function(a){for(var d=0;d<J.adapter.smarter.Resolver.headerContainsRecords.length;++d){var h=J.adapter.smarter.Resolver.checkHeaderRecords(a,J.adapter.smarter.Resolver.headerContainsRecords[d]);if(null!=h)return h}return null},"~S");b.checkJSONContains=c(b,"checkJSONContains",function(a){for(var d=
0;d<J.adapter.smarter.Resolver.jsonContainsRecords.length;++d){var h=J.adapter.smarter.Resolver.checkHeaderRecords(a,J.adapter.smarter.Resolver.jsonContainsRecords[d]);if(null!=h)return h}return null},"~S");b.checkHeaderRecords=c(b,"checkHeaderRecords",function(a,d){for(var h=1;h<d.length;++h)if(!(0>a.indexOf(d[h])))return h=d[0],!h.equals("Xml")?h:0<=a.indexOf("/AFLOWDATA/")||0<=a.indexOf("-- Structure PRE --")?"AFLOW":0>a.indexOf("<!DOCTYPE HTML PUBLIC")&&0>a.indexOf("XHTML")&&(0>a.indexOf("xhtml")||
0<=a.indexOf("<cml"))?J.adapter.smarter.Resolver.getXmlType(a):null;return null},"~S,~A");b.getXmlType=c(b,"getXmlType",function(a){return 0<=a.indexOf("http://www.molpro.net/")?"XmlMolpro":0<=a.indexOf("odyssey")?"XmlOdyssey":0<=a.indexOf("C3XML")?"XmlChem3d":0<=a.indexOf("CDXML")?"XmlCdx":0<=a.indexOf("arguslab")?"XmlArgus":0<=a.indexOf("jvxl")||0<=a.indexOf("http://www.xml-cml.org/schema")||0<=a.indexOf("cml:")||0<=a.indexOf("<cml>")?"XmlCml":0<=a.indexOf("<nmrML")?"XmlNmrml":0<=a.indexOf("XSD")?
"XmlXsd":0<=a.indexOf(">vasp")?"XmlVasp":0<=a.indexOf("<GEOMETRY_INFO>")?"XmlQE":"XmlCml(unidentified)"},"~S");b.checkSpecial2=c(b,"checkSpecial2",function(a){if(J.adapter.smarter.Resolver.checkGromacs(a))return"Gromacs";if(J.adapter.smarter.Resolver.checkCrystal(a))return"Crystal";if(J.adapter.smarter.Resolver.checkFAH(a))return"FAH";a=J.adapter.smarter.Resolver.checkCastepVaspSiesta(a);return null!=a?a:null},"~A");b.checkFAH=c(b,"checkFAH",function(a){return(a[0].trim()+a[2].trim()).equals('{"atoms": [')},
"~A");b.checkCrystal=c(b,"checkCrystal",function(a){var d=a[1].trim();if(d.equals("SLAB")||d.equals("MOLECULE")||d.equals("CRYSTAL")||d.equals("POLYMER")||(d=a[3]).equals("SLAB")||d.equals("MOLECULE")||d.equals("POLYMER"))return!0;for(d=0;d<a.length;d++)if(a[d].trim().equals("OPTGEOM")||a[d].trim().equals("FREQCALC")||a[d].contains("DOVESI")||a[d].contains("TORINO")||a[d].contains("http://www.crystal.unito.it")||a[d].contains("Pcrystal")||a[d].contains("MPPcrystal")||a[d].contains("crystal executable"))return!0;
return!1},"~A");b.checkGromacs=c(b,"checkGromacs",function(a){if(-2147483648==JU.PT.parseInt(a[1]))return!1;for(var d=-1,h=2;16>h&&0!=d;h++)if(69!=(d=a[h].length)&&45!=d&&0!=d)return!1;return!0},"~A");b.checkCastepVaspSiesta=c(b,"checkCastepVaspSiesta",function(a){for(var d=0;d<a.length;d++){var h=a[d].toUpperCase();if(1==h.indexOf("FREQUENCIES IN         CM-1")||h.contains("CASTEP")||h.startsWith("%BLOCK LATTICE_ABC")||h.startsWith("%BLOCK LATTICE_CART")||h.startsWith("%BLOCK POSITIONS_FRAC")||h.startsWith("%BLOCK POSITIONS_ABS")||
h.contains("<-- E"))return"Castep";if(h.contains("%BLOCK"))return"Siesta";if(6<=d&&10>d&&(h.startsWith("DIRECT")||h.startsWith("CARTESIAN")))return"VaspPoscar"}return null},"~A");b.getFileTypefromFilter=c(b,"getFileTypefromFilter",function(a){var d=null==a?-1:a.toLowerCase().indexOf("filetype");return 0>d?null:a.substring(d+8,(a+";").indexOf(";",d)).$replace("="," ").trim()},"~S");b.fixDOSName=c(b,"fixDOSName",function(a){return 0<=a.indexOf(":\\")?a.$replace("\\","/"):a},"~S");b.readerSets=u(-1,
"cif. ;Cif;Cif2;MMCif;MMTF;MagCif;BCIF; molxyz. ;Mol3D;Mol;Xyz; more. ;AFLOW;BinaryDcd;CDX;Gromacs;Jcampdx;MdCrd;MdTop;Mol2;TlsDataOnly; quantum. ;Adf;Csf;Dgrid;GamessUK;GamessUS;Gaussian;GaussianFchk;GaussianWfn;Jaguar;Molden;MopacGraphf;GenNBO;NWChem;Psi;Qchem;QCJSON;WebMO;Orca;MO;Ams; pdb. ;Pdb;Pqr;P2n;JmolData; pymol. ;PyMOL; simple. ;Alchemy;Ampac;Cube;FoldingXyz;GhemicalMM;HyperChem;Jme;JSON;Mopac;MopacArchive;Tinker;Input;FAH; spartan. ;Spartan;SpartanSmol;Odyssey; xtal. ;Abinit;Aims;Bilbao;Castep;Cgd;Crystal;Dmol;Espresso;Gulp;Jana;Magres;Shelx;Siesta;VaspOutcar;VaspPoscar;Wien2k;Xcrysden;PWmat;Optimade;Cmdf;Cmdx;FSGOutput; xml. ;XmlCdx;XmlArgus;XmlCml;XmlChem3d;XmlMolpro;XmlNmrml;XmlOdyssey;XmlXsd;XmlVasp;XmlQE;".split(" "));
b.cdxMagic=O(-1,[86,106,67,68]);b.cmdfMagic=O(-1,[67,77,68,70]);b.cmdxMagic=O(-1,[67,77,68,88]);b.mmtfMagic=O(-1,[109,109,116,102]);b.bcifMolstarMagic=O(-1,[109,111,108,42]);b.bcifDensityMagic=O(-1,[68,101,110,115]);b.bcifVolumeMagic=O(-1,[86,111,108,117]);b.bcifModelMagic=O(-1,[77,111,100,101]);b.bcifCoordMagic=O(-1,[67,111,111,114,100]);b.bcifServerMagic=O(-1,[83,69,82,86,69,82]);b.sptRecords=u(-1,["spt","# Jmol state","# Jmol script","JmolManifest"]);b.m3dStartRecords=u(-1,["Alchemy","STRUCTURE  1.00     1"]);
b.cubeFileStartRecords=u(-1,["Cube","JVXL","#JVXL"]);b.mol2Records=u(-1,["Mol2","mol2","@<TRIPOS>"]);b.webmoFileStartRecords=u(-1,["WebMO","[HEADER]"]);b.moldenFileStartRecords=u(-1,["Molden","[Molden","MOLDEN","[MOLDEN"]);b.dcdFileStartRecords=u(-1,["BinaryDcd","T\x00\x00\x00CORD","\x00\x00\x00TCORD"]);b.tlsDataOnlyFileStartRecords=u(-1,["TlsDataOnly","REFMAC\n\nTL","REFMAC\r\n\r\n","REFMAC\r\rTL"]);b.inputFileStartRecords=u(-1,["Input","#ZMATRIX","%mem=","AM1","$rungauss"]);b.magresFileStartRecords=
u(-1,["Magres","#$magres","# magres"]);b.pymolStartRecords=u(-1,["PyMOL","}q"]);b.janaStartRecords=u(-1,["Jana","Version Jana"]);b.jsonStartRecords=u(-1,["JSON",'{"mol":']);b.jcampdxStartRecords=u(-1,["Jcampdx","##TITLE"]);b.jmoldataStartRecords=u(-1,["JmolData","REMARK   6 Jmol"]);b.pqrStartRecords=u(-1,["Pqr","REMARK   1 PQR","REMARK    The B-factors"]);b.p2nStartRecords=u(-1,["P2n","REMARK   1 P2N"]);b.cif2StartRecords=u(-1,["Cif2","#\\#CIF_2","\u00ef\u00bb\u00bf#\\#CIF_2"]);b.xmlStartRecords=
u(-1,["Xml","<?xml"]);b.cfiStartRecords=u(-1,["Input","$CFI"]);b.fileStartsWithRecords=u(-1,[J.adapter.smarter.Resolver.xmlStartRecords,J.adapter.smarter.Resolver.sptRecords,J.adapter.smarter.Resolver.m3dStartRecords,J.adapter.smarter.Resolver.cubeFileStartRecords,J.adapter.smarter.Resolver.mol2Records,J.adapter.smarter.Resolver.webmoFileStartRecords,J.adapter.smarter.Resolver.moldenFileStartRecords,J.adapter.smarter.Resolver.dcdFileStartRecords,J.adapter.smarter.Resolver.tlsDataOnlyFileStartRecords,
J.adapter.smarter.Resolver.inputFileStartRecords,J.adapter.smarter.Resolver.magresFileStartRecords,J.adapter.smarter.Resolver.pymolStartRecords,J.adapter.smarter.Resolver.janaStartRecords,J.adapter.smarter.Resolver.jsonStartRecords,J.adapter.smarter.Resolver.jcampdxStartRecords,J.adapter.smarter.Resolver.jmoldataStartRecords,J.adapter.smarter.Resolver.pqrStartRecords,J.adapter.smarter.Resolver.p2nStartRecords,J.adapter.smarter.Resolver.cif2StartRecords,J.adapter.smarter.Resolver.cfiStartRecords]);
b.n=E(1,0);b.mmcifLineStartRecords=u(-1,"MMCif _entry.id _database_PDB_ _pdbx_ _chem_comp.pdbx_type _audit_author.name _atom_site.".split(" "));b.cifLineStartRecords=u(-1,["Cif","data_","_publ"]);b.pdbLineStartRecords=u(-1,"Pdb;HEADER;OBSLTE;TITLE ;CAVEAT;COMPND;SOURCE;KEYWDS;EXPDTA;AUTHOR;REVDAT;SPRSDE;JRNL  ;REMARK ;DBREF ;SEQADV;SEQRES;MODRES;HELIX ;SHEET ;TURN  ;CRYST1;ORIGX1;ORIGX2;ORIGX3;SCALE1;SCALE2;SCALE3;ATOM  ;HETATM;MODEL ;LINK  ;USER  MOD ".split(";"));b.cgdLineStartRecords=u(-1,["Cgd",
"EDGE ","edge "]);b.shelxLineStartRecords=u(-1,"Shelx;TITL ;ZERR ;LATT ;SYMM ;CELL ;TITL\t".split(";"));b.ghemicalMMLineStartRecords=u(-1,["GhemicalMM","!Header mm1gp","!Header gpr"]);b.jaguarLineStartRecords=u(-1,["Jaguar","  |  Jaguar version"]);b.mdlLineStartRecords=u(-1,["Mol","$MDL "]);b.spartanSmolLineStartRecords=u(-1,["SpartanSmol","INPUT="]);b.csfLineStartRecords=u(-1,["Csf","local_transform"]);b.mdTopLineStartRecords=u(-1,["MdTop","%FLAG TITLE"]);b.hyperChemLineStartRecords=u(-1,["HyperChem",
"mol 1"]);b.vaspOutcarLineStartRecords=u(-1,["VaspOutcar"," vasp."," INCAR:"]);b.orcaInputLineStartRecords=u(-1,["Orca","* xyz","*xyz"]);b.lineStartsWithRecords=u(-1,[J.adapter.smarter.Resolver.mmcifLineStartRecords,J.adapter.smarter.Resolver.cifLineStartRecords,J.adapter.smarter.Resolver.pdbLineStartRecords,J.adapter.smarter.Resolver.cgdLineStartRecords,J.adapter.smarter.Resolver.shelxLineStartRecords,J.adapter.smarter.Resolver.ghemicalMMLineStartRecords,J.adapter.smarter.Resolver.jaguarLineStartRecords,
J.adapter.smarter.Resolver.mdlLineStartRecords,J.adapter.smarter.Resolver.spartanSmolLineStartRecords,J.adapter.smarter.Resolver.csfLineStartRecords,J.adapter.smarter.Resolver.mol2Records,J.adapter.smarter.Resolver.mdTopLineStartRecords,J.adapter.smarter.Resolver.hyperChemLineStartRecords,J.adapter.smarter.Resolver.vaspOutcarLineStartRecords,J.adapter.smarter.Resolver.orcaInputLineStartRecords]);b.bilbaoContainsRecords=u(-1,["Bilbao",">Bilbao Crystallographic Server<"]);b.xmlContainsRecords=u(-1,
'Xml <?xml <atom <molecule <reaction <cml <bond .dtd" <list> <entry <identifier http://www.xml-cml.org/schema/cml2/core'.split(" "));b.gaussianContainsRecords=u(-1,["Gaussian","Entering Gaussian System","Entering Link 1","1998 Gaussian, Inc."]);b.ampacContainsRecords=u(-1,["Ampac","AMPAC Version"]);b.mopacContainsRecords=u(-1,"Mopac;MOPAC 93 (c) Fujitsu;MOPAC FOR LINUX (PUBLIC DOMAIN VERSION);MOPAC:  VERSION  6;MOPAC   7;MOPAC2;MOPAC (PUBLIC".split(";"));b.qchemContainsRecords=u(-1,["Qchem","Welcome to Q-Chem",
"A Quantum Leap Into The Future Of Chemistry"]);b.gamessUKContainsRecords=u(-1,["GamessUK","GAMESS-UK","G A M E S S - U K"]);b.gamessUSContainsRecords=u(-1,["GamessUS","GAMESS","$CONTRL"]);b.spartanBinaryContainsRecords=u(-1,["SpartanSmol","|PropertyArchive","_spartan","spardir","BEGIN Directory Entry Molecule"]);b.spartanContainsRecords=u(-1,["Spartan","Spartan","converted archive file"]);b.adfContainsRecords=u(-1,["Adf","Amsterdam Density Functional"]);b.amsContainsRecords=u(-1,["Ams","Amsterdam Modeling Suite"]);
b.psiContainsRecords=u(-1,["Psi","    PSI  3","PSI3:"]);b.nwchemContainsRecords=u(-1,["NWChem"," argument  1 = "]);b.uicrcifContainsRecords=u(-1,["Cif","Crystallographic Information File"]);b.dgridContainsRecords=u(-1,["Dgrid","BASISFILE   created by DGrid"]);b.crystalContainsRecords=u(-1,["Crystal","*                                CRYSTAL","TORINO","DOVESI"]);b.dmolContainsRecords=u(-1,["Dmol","DMol^3"]);b.gulpContainsRecords=u(-1,["Gulp","GENERAL UTILITY LATTICE PROGRAM"]);b.espressoContainsRecords=
u(-1,["Espresso","Program PWSCF","Program PHONON"]);b.siestaContainsRecords=u(-1,["Siesta","MD.TypeOfRun","SolutionMethod","MeshCutoff","WELCOME TO SIESTA"]);b.xcrysDenContainsRecords=u(-1,["Xcrysden","PRIMVEC","CONVVEC","PRIMCOORD","ANIMSTEP"]);b.mopacArchiveContainsRecords=u(-1,["MopacArchive","SUMMARY OF PM"]);b.abinitContainsRecords=u(-1,["Abinit","http://www.abinit.org","Catholique","Louvain"]);b.qcJsonContainsRecords=u(-1,["QCJSON",'"QCJSON']);b.optimadeContainsRecords=u(-1,["Optimade",'"cartesian_site_positions":',
'"api_version":',"optimade"]);b.jsonArrayContainsRecords=u(-1,["JSON",'"atomArray":[','"atomArray" : [']);b.orcaContainsRecords=u(-1,["Orca","* O   R   C   A *"]);b.gaussianFchkContainsRecords=u(-1,["GaussianFchk","Number of point charges in /Mol/"]);b.inputContainsRecords=u(-1,"Input; ATOMS cartesian;$molecule;&zmat;geometry={;$DATA;%coords;GEOM=PQS;geometry units angstroms".split(";"));b.aflowContainsRecords=u(-1,["AFLOW","/AFLOWDATA/"]);b.magCifContainsRecords=u(-1,["MagCif","_space_group_magn"]);
b.headerContainsRecords=u(-1,[J.adapter.smarter.Resolver.sptRecords,J.adapter.smarter.Resolver.bilbaoContainsRecords,J.adapter.smarter.Resolver.xmlContainsRecords,J.adapter.smarter.Resolver.gaussianContainsRecords,J.adapter.smarter.Resolver.ampacContainsRecords,J.adapter.smarter.Resolver.mopacContainsRecords,J.adapter.smarter.Resolver.gamessUKContainsRecords,J.adapter.smarter.Resolver.gamessUSContainsRecords,J.adapter.smarter.Resolver.qchemContainsRecords,J.adapter.smarter.Resolver.spartanBinaryContainsRecords,
J.adapter.smarter.Resolver.spartanContainsRecords,J.adapter.smarter.Resolver.mol2Records,J.adapter.smarter.Resolver.adfContainsRecords,J.adapter.smarter.Resolver.psiContainsRecords,J.adapter.smarter.Resolver.nwchemContainsRecords,J.adapter.smarter.Resolver.uicrcifContainsRecords,J.adapter.smarter.Resolver.dgridContainsRecords,J.adapter.smarter.Resolver.crystalContainsRecords,J.adapter.smarter.Resolver.dmolContainsRecords,J.adapter.smarter.Resolver.gulpContainsRecords,J.adapter.smarter.Resolver.espressoContainsRecords,
J.adapter.smarter.Resolver.siestaContainsRecords,J.adapter.smarter.Resolver.xcrysDenContainsRecords,J.adapter.smarter.Resolver.mopacArchiveContainsRecords,J.adapter.smarter.Resolver.abinitContainsRecords,J.adapter.smarter.Resolver.gaussianFchkContainsRecords,J.adapter.smarter.Resolver.inputContainsRecords,J.adapter.smarter.Resolver.aflowContainsRecords,J.adapter.smarter.Resolver.magCifContainsRecords,J.adapter.smarter.Resolver.qcJsonContainsRecords,J.adapter.smarter.Resolver.optimadeContainsRecords,
J.adapter.smarter.Resolver.orcaContainsRecords,J.adapter.smarter.Resolver.jsonArrayContainsRecords,J.adapter.smarter.Resolver.amsContainsRecords]);b.jsonContainsRecords=u(-1,[J.adapter.smarter.Resolver.optimadeContainsRecords])});n("J.adapter.smarter");z(["J.api.JmolAdapter"],"J.adapter.smarter.SmarterJmolAdapter","java.io.BufferedReader $.StringReader java.util.Hashtable JU.PT $.Rdr J.adapter.smarter.AtomIterator $.AtomSetCollection $.BondIterator $.Resolver $.StructureIterator J.api.Interface JS.SV JU.BSUtil $.Logger".split(" "),
function(){var b=G(J.adapter.smarter,"SmarterJmolAdapter",J.api.JmolAdapter);x(b,function(){I(this,J.adapter.smarter.SmarterJmolAdapter,[])});g(b,"getFileTypeName",function(a){if("string"==typeof a)return J.adapter.smarter.Resolver.getFileTypefromFilter(a);if(C(a,"J.adapter.smarter.AtomSetCollection"))return a.fileTypeName;if(C(a,"java.io.BufferedReader"))return J.adapter.smarter.Resolver.getFileType(a);if(C(a,"java.io.BufferedInputStream")){var d=J.adapter.smarter.Resolver.getBinaryType(a);if(null==
d)try{d=J.adapter.smarter.Resolver.getFileType(JU.Rdr.getBufferedReader(a,null))}catch(h){if(!D(h,Exception))throw h;}return d}return null},"~O");g(b,"getAtomSetCollectionReader",function(a,d,h,b){return J.adapter.smarter.SmarterJmolAdapter.staticGetAtomSetCollectionReader(a,d,h,b)},"~S,~S,~O,java.util.Map");b.staticGetAtomSetCollectionReader=c(b,"staticGetAtomSetCollectionReader",function(a,d,h,b){null==b&&(b=new java.util.Hashtable);try{var c=J.adapter.smarter.Resolver.getAtomCollectionReader(a,
d,h,b,-1);if("string"==typeof c)try{J.adapter.smarter.SmarterJmolAdapter.close(h)}catch(f){if(!D(f,Exception))throw f;}else c.setup(a,b,h);return c}catch(j){try{J.adapter.smarter.SmarterJmolAdapter.close(h)}catch(k){if(!D(k,Exception))throw k;}JU.Logger.error(""+j);return""+j}},"~S,~S,~O,java.util.Map");g(b,"getAtomSetCollectionFromReader",function(a,d,h){var b=J.adapter.smarter.Resolver.getAtomCollectionReader(a,null,d,h,-1);return C(b,"J.adapter.smarter.AtomSetCollectionReader")?(C(d,"java.io.BufferedInputStream")&&
(d=null!=J.adapter.smarter.Resolver.getBinaryType(d)?J.api.Interface.getInterface("JU.BinaryDocument",null,"JmolAdapter").setStream(d,!1):JU.Rdr.getBufferedReader(d,null)),b.setup(a,h,d),b.readData()):""+b},"~S,~O,java.util.Map");g(b,"getAtomSetCollection",function(a){return J.adapter.smarter.SmarterJmolAdapter.staticGetAtomSetCollection(a)},"~O");b.staticGetAtomSetCollection=c(b,"staticGetAtomSetCollection",function(a){var d=null;try{var d=a.reader,h=a.readData();return!C(h,"J.adapter.smarter.AtomSetCollection")?
h:null!=h.errorMessage?h.errorMessage:h}catch(b){try{JU.Logger.info(b.toString())}catch(c){if(D(c,Exception))JU.Logger.error(b.toString());else throw c;}try{d.close()}catch(f){if(!D(f,Exception))throw f;}JU.Logger.error(""+b);return""+b}},"J.adapter.smarter.AtomSetCollectionReader");g(b,"getAtomSetCollectionReaders",function(a,d,h,b,c){var f=b.get("vwr"),j=d.length,k=null;if(b.containsKey("concatenate")){for(var k="",l=0;l<j;l++){var g=d[l],m=f.getFileAsString3(g,!1,null);if(0<l&&3>=j&&m.startsWith("{"))g=
m.contains('version":"DSSR')?"dssr":m.contains("/outliers/")?"validation":"domains",m=f.parseJSONMap(m),null!=m&&b.put(g,g.equals("dssr")?m:JS.SV.getVariableMap(m));else{0<=g.indexOf("|")&&(g=JU.PT.rep(g,"_","/"));if(1==l){if(0<=g.indexOf("/rna3dhub/")){k+="\n_rna3d \n;"+m+"\n;\n";continue}if(0<=g.indexOf("/dssr/")){k+="\n_dssr \n;"+m+"\n;\n";continue}}k+=m;k.endsWith("\n")||(k+="\n")}}j=1;k=JU.Rdr.getBR(k)}for(var m=c?Array(j):null,g=c?null:Array(j),p=null,l=0;l<j;l++)try{b.put("vwr",f);null==k&&
(k=a.getBufferedReaderOrBinaryDocument(l,!1));if(!C(k,"java.io.BufferedReader")&&!C(k,"javajs.api.GenericBinaryDocument"))return k;b.put("fullPathName",d[l]);var y=J.adapter.smarter.Resolver.getAtomCollectionReader(d[l],null==h?null:h[l],k,b,l);if(!C(y,"J.adapter.smarter.AtomSetCollectionReader"))return y;p=y;p.setup(null,null,null);p.isBinary?p.setup(d[l],b,a.getBufferedReaderOrBinaryDocument(l,!0)):p.setup(d[l],b,k);k=null;if(c)m[l]=p;else{y=p.readData();if(!C(y,"J.adapter.smarter.AtomSetCollection"))return y;
g[l]=y;if(null!=g[l].errorMessage)return g[l].errorMessage}}catch(A){return JU.Logger.error(""+A),A.printStackTrace(),""+A}return c?m:this.getAtomSetCollectionFromSet(m,g,b)},"J.api.JmolFilesReaderInterface,~A,~A,java.util.Map,~B");g(b,"getAtomSetCollectionFromSet",function(a,d,h){var b=null==d?Array(a.length):d;if(null==d)for(d=0;d<a.length;d++)if(null!=a[d])try{var c=a[d].readData();if(!C(c,"J.adapter.smarter.AtomSetCollection"))return c;b[d]=c;if(null!=b[d].errorMessage)return b[d].errorMessage}catch(f){return JU.Logger.error(""+
f),""+f}if(h.containsKey("trajectorySteps")){a=b[0];try{1<b.length&&b[0].setInfo("ignoreUnitCell",b[1].atomSetInfo.get("ignoreUnitCell")),a.finalizeTrajectoryAs(h.get("trajectorySteps"),h.get("vibrationSteps"))}catch(j){if(D(j,Exception))null==a.errorMessage&&(a.errorMessage=""+j);else throw j;}}else if(b[0].isTrajectory){a=b[0];for(d=1;d<b.length;d++)b[0].mergeTrajectories(b[d])}else a=1==b.length?b[0]:new J.adapter.smarter.AtomSetCollection("Array",null,b,null);return null==a.errorMessage?a:a.errorMessage},
"~O,~O,java.util.Map");g(b,"getAtomSetCollectionFromDOM",function(){throw new UnsupportedOperationException;},"~O,java.util.Map");g(b,"finish",function(a){a.finish()},"~O");g(b,"getAtomSetCollectionName",function(a){return a.collectionName},"~O");g(b,"getAtomSetCollectionAuxiliaryInfo",function(a){return a.atomSetInfo},"~O");g(b,"getAtomSetCount",function(a){return a.atomSetCount},"~O");g(b,"getAtomSetNumber",function(a,d){return a.getAtomSetNumber(d)},"~O,~N");g(b,"getAtomSetName",function(a,d){return a.getAtomSetName(d)},
"~O,~N");g(b,"getAtomSetAuxiliaryInfo",function(a,d){return a.getAtomSetAuxiliaryInfo(d)},"~O,~N");g(b,"getHydrogenAtomCount",function(a){return a.getHydrogenAtomCount()},"~O");g(b,"getBondList",function(a){return a.getBondList()},"~O");g(b,"getAtomCount",function(a,d){if(0>d)return null==a.bsAtoms?a.ac:a.bsAtoms.cardinality();if(null==a.bsAtoms)return a.getAtomSetAtomCount(d);var h=JU.BSUtil.copy(a.bsAtoms),b=a.getAtomSetAtomIndex(d);h.and(JU.BSUtil.newBitSet2(b,b+a.getAtomSetAtomCount(d)));return h.cardinality()},
"~O,~N");g(b,"coordinatesAreFractional",function(a){return a.coordinatesAreFractional},"~O");g(b,"getAtomIterator",function(a){return new J.adapter.smarter.AtomIterator(a)},"~O");g(b,"getBondIterator",function(a){return 0==a.bondCount?null:new J.adapter.smarter.BondIterator(a)},"~O");g(b,"getStructureIterator",function(a){return 0==a.structureCount?null:new J.adapter.smarter.StructureIterator(a)},"~O");b.close=c(b,"close",function(a){C(a,"java.io.BufferedReader");a.close()},"~O");g(b,"getAtomSetCollectionInline",
function(a){var d=null;try{if("string"==typeof a)d=new java.io.BufferedReader(new java.io.StringReader(a));else if(C(a,"java.io.InputStream"))d=a;else return null;var h=this.getAtomSetCollectionReader("String",null,d,null);return"string"==typeof h?h:this.getAtomSetCollection(h)}finally{try{C(d,"java.io.BufferedReader"),d.close()}catch(b){if(!D(b,"java.io.IOException"))throw b;}}},"~O,java.util.Map");b.PATH_SEPARATOR=System.getProperty("path.separator","/")});n("J.adapter.smarter");z(["J.api.JmolAdapterStructureIterator"],
"J.adapter.smarter.StructureIterator",["J.api.JmolAdapter"],function(){var b=w(function(){this.structureCount=0;this.structure=this.structures=null;this.istructure=0;this.bsModelsDefined=null;q(this,arguments)},J.adapter.smarter,"StructureIterator",J.api.JmolAdapterStructureIterator);x(b,function(a){I(this,J.adapter.smarter.StructureIterator,[]);this.structureCount=a.structureCount;this.structures=a.structures;this.istructure=0;this.bsModelsDefined=a.bsStructuredModels},"J.adapter.smarter.AtomSetCollection");
g(b,"hasNext",function(){if(this.istructure==this.structureCount)return!1;this.structure=this.structures[this.istructure++];return!0});g(b,"getStructureType",function(){return this.structure.structureType});g(b,"getSubstructureType",function(){return this.structure.substructureType});g(b,"getStructureID",function(){return this.structure.structureID});g(b,"getStrandID",function(){return this.structure.strandID});g(b,"getStartChainID",function(){return this.structure.startChainID});g(b,"getStartSequenceNumber",
function(){return this.structure.startSequenceNumber});g(b,"getStartInsertionCode",function(){return J.api.JmolAdapter.canonizeInsertionCode(this.structure.startInsertionCode)});g(b,"getEndChainID",function(){return this.structure.endChainID});g(b,"getEndSequenceNumber",function(){return this.structure.endSequenceNumber});g(b,"getEndInsertionCode",function(){return this.structure.endInsertionCode});g(b,"getStrandCount",function(){return this.structure.strandCount});g(b,"getStructuredModels",function(){return this.bsModelsDefined});
g(b,"getAtomIndices",function(){return this.structure.atomStartEnd});g(b,"getModelIndices",function(){return this.structure.modelStartEnd});g(b,"getBSAll",function(){return this.structure.bsAll})});n("J.api");K(J.api,"AtomIndexIterator");n("J.api");z(null,"J.api.Interface",["JU.Logger"],function(){var b=G(J.api,"Interface",null);b.getInterface=c(b,"getInterface",function(a){try{var d=ra._4Name(a);return null==d?null:d.newInstance()}catch(h){if(D(h,Exception))return JU.Logger.error("Interface.java Error creating instance for "+
a+": \n"+h),null;throw h;}},"~S,JV.Viewer,~S");b.getOption=c(b,"getOption",function(a,d,h){return J.api.Interface.getInterface("J."+a,d,h)},"~S,JV.Viewer,~S");b.getUtil=c(b,"getUtil",function(a,d,h){return J.api.Interface.getInterface("JU."+a,d,h)},"~S,JV.Viewer,~S");b.getSymmetry=c(b,"getSymmetry",function(a,d){return J.api.Interface.getInterface("JS.Symmetry",a,d).setViewer(a,d)},"JV.Viewer,~S")});n("J.api");z(null,"J.api.JmolAdapter",["JU.PT","J.api.JmolViewer","JU.Elements"],function(){var b=
G(J.api,"JmolAdapter",null);b.getElementSymbol=c(b,"getElementSymbol",function(a){return JU.Elements.elementSymbolFromNumber(a)},"~N");b.getElementNumber=c(b,"getElementNumber",function(a){return JU.Elements.elementNumberFromSymbol(a,!1)},"~S");b.getNaturalIsotope=c(b,"getNaturalIsotope",function(a){return JU.Elements.getNaturalIsotope(a)},"~N");b.getBondingRadius=c(b,"getBondingRadius",function(a,d){return JU.Elements.getBondingRadius(a,d)},"~N,~N");c(b,"getAtomSetCollectionFromReaderType",function(a,
d,h,b){a=this.getAtomSetCollectionReader(a,d,h,J.api.JmolViewer.allocateViewer(null,this).setLoadParameters(b,!1));return"string"==typeof a?a:this.getAtomSetCollection(a)},"~S,~S,~O,java.util.Map");c(b,"openBufferedReader",function(a,d){return this.getAtomSetCollectionFromReaderType(a,null,d,null)},"~S,java.io.BufferedReader");c(b,"openBufferedReader",function(a,d,h){return this.getAtomSetCollectionFromReaderType(a,null,d,h)},"~S,java.io.BufferedReader,java.util.Map");c(b,"openBufferedReader",function(a,
d,h){return this.getAtomSetCollectionFromReaderType(a,d,h,null)},"~S,~S,java.io.BufferedReader");b.canonizeAlphaDigit=c(b,"canonizeAlphaDigit",function(a){return JU.PT.isLetterOrDigit(a)?a:"\x00"},"~S");b.canonizeInsertionCode=c(b,"canonizeInsertionCode",function(a){return J.api.JmolAdapter.canonizeAlphaDigit(a)},"~S");b.canonizeAlternateLocationID=c(b,"canonizeAlternateLocationID",function(a){return J.api.JmolAdapter.canonizeAlphaDigit(a)},"~S");b.cellParamNames=u(-1,"_cell_length_a _cell_length_b _cell_length_c _cell_angle_alpha _cell_angle_beta _cell_angle_gamma".split(" "))});
n("J.api");K(J.api,"JmolAdapterAtomIterator");n("J.api");G(J.api,"JmolAdapterBondIterator",null);n("J.api");G(J.api,"JmolAdapterStructureIterator",null);n("J.api");K(J.api,"JmolAppConsoleInterface");n("J.api");K(J.api,"JmolAppletInterface",J.api.JmolSyncInterface);n("J.api");K(J.api,"JmolCallbackListener");n("J.api");K(J.api,"JmolAnnotationParser");n("J.api");K(J.api,"JmolGraphicsInterface");n("J.api");K(J.api,"JmolMeasurementClient");n("J.api");K(J.api,"JmolModulationSet");n("J.api");K(J.api,"JmolNavigatorInterface",
Runnable);n("J.api");K(J.api,"JmolRendererInterface",J.api.JmolGraphicsInterface);n("J.api");K(J.api,"JmolRepaintManager");n("J.api");K(J.api,"JmolStatusListener",J.api.JmolCallbackListener);n("J.api");K(J.api,"JmolSyncInterface");n("J.api");z(null,"J.api.JmolViewer",["java.util.Hashtable","JV.JC"],function(){var b=w(function(){this.apiPlatform=this.menuStructure=null;q(this,arguments)},J.api,"JmolViewer",null);b.allocateViewer=c(b,"allocateViewer",function(a,d,h,b,c,f,j,k){var l=new java.util.Hashtable;
null!=a&&l.put("display",a);null!=d&&l.put("adapter",d);null!=j&&l.put("statuslistener",j);null!=k&&l.put("platform",k);null!=f&&l.put("options",f);null!=h&&l.put("fullname",h);null!=b&&l.put("documentbase",b);null!=c&&l.put("codebase",c);l.put("isApp",Boolean.TRUE);return new JV.Viewer(l)},"~O,J.api.JmolAdapter,~S,java.net.URL,java.net.URL,~S,J.api.JmolStatusListener,J.api.GenericPlatform");b.allocateViewer=c(b,"allocateViewer",function(a,d){return J.api.JmolViewer.allocateViewer(a,d,null,null,null,
null,null,null)},"~O,J.api.JmolAdapter");b.allocateViewer=c(b,"allocateViewer",function(a,d,h,b,c,f,j){return J.api.JmolViewer.allocateViewer(a,d,h,b,c,f,j,null)},"~O,J.api.JmolAdapter,~S,java.net.URL,java.net.URL,~S,J.api.JmolStatusListener");c(b,"setConsole",function(a){this.getProperty("DATA_API","getAppConsole",a)},"J.api.JmolAppConsoleInterface");b.getJmolVersion=c(b,"getJmolVersion",function(){return JV.Viewer.getJmolVersion()});b.getJmolVersionNoDate=c(b,"getJmolVersionNoDate",function(){return JV.JC.version});
c(b,"openReader",function(a,d){return this.openReader(null==a?"String":a,null,d)},"~S,~O");c(b,"openFileAsync",function(a){this.openFileAsyncSpecial(a,0)},"~S");c(b,"renderScreenImage",function(a,d){this.apiPlatform.renderScreenImage(a,d)},"~O,~O,~O");c(b,"runScriptCautiously",function(){return null},"~S");c(b,"dispose",function(){})});n("J.api");K(J.api,"SymmetryInterface");n("J.api");K(J.api,"Translator");n("J.appletjs");z(["JU.GenericApplet"],"J.appletjs.Jmol",["java.util.Hashtable"],function(){var b=
G(J.appletjs,"Jmol",JU.GenericApplet);x(b,function(a){I(this,J.appletjs.Jmol,[]);this.htParams=new java.util.Hashtable;null==a&&(a=new java.util.Hashtable);this.vwrOptions=a;for(var d,h=a.entrySet().iterator();h.hasNext()&&((d=h.next())||1);)this.htParams.put(d.getKey().toLowerCase(),d.getValue());this.documentBase=""+a.get("documentBase");this.codeBase=""+a.get("codePath");JU.GenericApplet.isJS=!0;this.init(this)},"java.util.Map")});n("J.atomdata");z(null,"J.atomdata.AtomData",["JU.P3","JU.BSUtil"],
function(){var b=w(function(){this.modelName=this.fileName=this.programInfo=null;this.modelIndex=0;this.radiusData=this.bsMolecules=this.bsIgnored=this.bsSelected=null;this.hAtomRadius=this.lastModelIndex=this.firstModelIndex=this.firstAtomIndex=0;this.hAtoms=this.atomMolecule=this.atomicNumber=this.atomRadius=this.xyz=this.atoms=this.atomIndex=null;this.adpMode=this.hydrogenAtomCount=this.ac=0;q(this,arguments)},J.atomdata,"AtomData",null);c(b,"transformXYZ",function(a,d){var h=Array(this.xyz.length);
null==d&&(d=JU.BSUtil.newBitSet2(0,this.xyz.length));for(var b=d.nextSetBit(0);0<=b;b=d.nextSetBit(b+1))null!=this.xyz[b]&&(h[b]=JU.P3.newP(this.xyz[b]),a.rotTrans(h[b]));this.xyz=h},"JU.M4,JU.BS")});n("J.atomdata");K(J.atomdata,"AtomDataServer");n("J.atomdata");z(["java.lang.Enum","J.c.VDW"],"J.atomdata.RadiusData",["JU.SB"],function(){var b=w(function(){this.vdwType=this.factorType=this.info=null;this.value=NaN;this.valueExtended=0;this.values=null;q(this,arguments)},J.atomdata,"RadiusData",null);
N(b,function(){this.factorType=J.atomdata.RadiusData.EnumType.ABSOLUTE;this.vdwType=J.c.VDW.AUTO});x(b,function(a,d,h,b){null!=a?(this.values=a,this.value=2147483647):null!=h&&(this.factorType=h,this.value=d,null!=b&&(this.vdwType=b))},"~A,~N,J.atomdata.RadiusData.EnumType,J.c.VDW");g(b,"toString",function(){if(Float.isNaN(this.value))return"";var a=new JU.SB;switch(this.factorType){case J.atomdata.RadiusData.EnumType.ABSOLUTE:a.appendF(this.value);break;case J.atomdata.RadiusData.EnumType.OFFSET:a.append(0<
this.value?"+":"").appendF(this.value);break;case J.atomdata.RadiusData.EnumType.FACTOR:a.appendI(F(100*this.value)).append("%");this.vdwType!==J.c.VDW.AUTO&&a.append(this.vdwType.getVdwLabel());break;case J.atomdata.RadiusData.EnumType.SCREEN:a.appendI(F(this.value))}return a.toString()});b=G(J.atomdata.RadiusData,"EnumType",Enum);B(b,"ABSOLUTE",0,[]);B(b,"OFFSET",1,[]);B(b,"FACTOR",2,[]);B(b,"SCREEN",3,[])});n("J.awtjs");z(["J.awtjs2d.Platform"],"J.awtjs.Platform",null,function(){var b=G(J.awtjs,
"Platform",J.awtjs2d.Platform);g(b,"drawImage",function(){},"~O,~O,~N,~N,~N,~N,~B");g(b,"getTextPixels",function(){return null},"~S,JU.Font,~O,~O,~N,~N,~N");g(b,"getGraphics",function(){return null},"~O");g(b,"getStaticGraphics",function(){return null},"~O,~B");g(b,"newBufferedImage",function(){return null},"~O,~N,~N");g(b,"newOffScreenImage",function(){return null},"~N,~N")});n("J.awtjs2d");var da=G(J.awtjs2d,"Display",null);da.getFullScreenDimensions=c(da,"getFullScreenDimensions",function(b,a){a[0]=
b.width;a[1]=b.height},"~O,~A");da.hasFocus=c(da,"hasFocus",function(){return!0},"~O");da.requestFocusInWindow=c(da,"requestFocusInWindow",function(){},"~O");da.renderScreenImage=c(da,"renderScreenImage",function(){},"J.api.PlatformViewer,~O,~O");da.prompt=c(da,"prompt",function(b,a){var d=null==a?alert(b):prompt(b,a);return null!=d?d:"null"},"~S,~S,~A,~B");da.convertPointFromScreen=c(da,"convertPointFromScreen",function(){},"~O,JU.P3");da.drawImage=c(da,"drawImage",function(b,a,d,h,r,c,f){h=a.buf8;
c=a.buf32;var j=a.width*a.height,k=1;if(f){var l=r%2;r=Math.floor(r/2);k=Math.floor(a.width/r)}f=4*(a.width-r||d);var g=0,m=0;for(d*=4;g<j;)h[d++]=c[g]>>16&255,h[d++]=c[g]>>8&255,h[d++]=c[g]&255,h[d++]=255,g+=k,0==++m%r&&(l&&(g+=1,h[d]=0,h[d+1]=0,h[d+2]=0,h[d+3]=0),d+=f);b.putImageData(a.imgdata,0,0)},"~O,~O,~N,~N,~N,~N,~B");n("J.awtjs2d");z(null,"J.awtjs2d.Image",["J.awtjs2d.Platform"],function(){var b=G(J.awtjs2d,"Image",null);b.getWidth=c(b,"getWidth",function(a){return a.imageWidth?a.imageWidth:
a.width},"~O");b.getHeight=c(b,"getHeight",function(a){return a.imageHeight?a.imageHeight:a.height},"~O");b.grabPixels=c(b,"grabPixels",function(a,d,h){var b=null,b=a.getImageData(0,0,d,h).data;return J.awtjs2d.Image.toIntARGB(b)},"~O,~N,~N");b.toIntARGB=c(b,"toIntARGB",function(a){for(var d=v(a.length/4),h=E(d,0),b=0,c=0;b<d;)h[b++]=a[c++]<<16|a[c++]<<8|a[c++]|a[c++]<<24;return h},"~A");b.getTextPixels=c(b,"getTextPixels",function(a,d,h,b,c,f){h.fillStyle="#000000";h.fillRect(0,0,b,c);h.fillStyle=
"#FFFFFF";h.font=d.font;h.fillText(a,0,f);return J.awtjs2d.Image.grabPixels(h,b,c)},"~S,JU.Font,~O,~N,~N,~N");b.allocateRgbImage=c(b,"allocateRgbImage",function(a,d,h,b,c,f){null==f&&(f={width:a,height:d});f.buf32=h;return f},"~N,~N,~A,~N,~B,~O");b.getImageDialog=c(b,"getImageDialog",function(a,d,h){return J.awtjs2d.Platform.Jmol().consoleGetImageDialog(a,d,h)},"JV.Viewer,~S,java.util.Map")});n("J.awtjs2d");z(["J.api.GenericFileInterface"],"J.awtjs2d.JSFile",["JU.OC","$.PT","JV.Viewer"],function(){var b=
w(function(){this.fullName=this.name=null;q(this,arguments)},J.awtjs2d,"JSFile",null,J.api.GenericFileInterface);x(b,function(a){this.name=a.$replace("\\","/");this.fullName=a;!this.fullName.startsWith("/")&&0>JU.OC.urlTypeIndex(a)&&(this.fullName=JV.Viewer.jsDocumentBase+"/"+this.fullName);this.fullName=JU.PT.rep(this.fullName,"/./","/");a.substring(a.lastIndexOf("/")+1)},"~S");b.newFile=c(b,"newFile",function(a){return new J.awtjs2d.JSFile(a)},"~S");g(b,"getParentAsFile",function(){var a=this.fullName.lastIndexOf("/");
return 0>a?null:new J.awtjs2d.JSFile(this.fullName.substring(0,a))});g(b,"getFullPath",function(){return this.fullName});g(b,"getName",function(){return this.name});g(b,"isDirectory",function(){return this.fullName.endsWith("/")});g(b,"length",function(){return 0});b.getURLContents=c(b,"getURLContents",function(a,d,h){try{var b=a.openConnection();null!=d?b.outputBytes(d):null!=h&&b.outputString(h);return b.getContents()}catch(c){if(D(c,Exception))return c.toString();throw c;}},"java.net.URL,~A,~S");
g(b,"toString",function(){return this.fullName})});n("J.awtjs2d");var la=G(J.awtjs2d,"JSFont",null);la.newFont=c(la,"newFont",function(b,a,d,h,r){b=b.equals("Monospaced")?"Courier":b.startsWith("Sans")?"Helvetica Neue, Sans-serif":"Serif";return(a?"bold ":"")+(d?"italic ":"")+h+r+" "+b},"~S,~B,~B,~N,~S");la.getFontMetrics=c(la,"getFontMetrics",function(b,a){a.font!=b.font&&(a.font=b.font,b.font=a.font,a._fontAscent=Math.ceil(b.fontSize),a._fontDescent=Math.ceil(0.25*b.fontSize));return a},"JU.Font,~O");
la.getAscent=c(la,"getAscent",function(b){return Math.ceil(b._fontAscent)},"~O");la.getDescent=c(la,"getDescent",function(b){return Math.ceil(b._fontDescent)},"~O");la.stringWidth=c(la,"stringWidth",function(b,a,d){a.font=b.font;return Math.ceil(a.measureText(d).width)},"JU.Font,~O,~S");n("J.awtjs2d");z(["J.api.GenericMouseInterface"],"J.awtjs2d.Mouse",["JU.PT","$.V3","JU.Logger"],function(){var b=w(function(){this.manager=this.vwr=null;this.keyBuffer="";this.wheeling=this.isMouseDown=!1;this.modifiersWhenPressed10=
this.yWhenPressed=this.xWhenPressed=this.modifiersDown=0;q(this,arguments)},J.awtjs2d,"Mouse",null,J.api.GenericMouseInterface);x(b,function(a,d){this.vwr=d;this.manager=this.vwr.acm},"~N,JV.Viewer,~O");g(b,"clear",function(){});g(b,"dispose",function(){});g(b,"processEvent",function(a,d,h,b,c){507!=a&&(b=J.awtjs2d.Mouse.applyLeftMouse(b));switch(a){case 507:this.wheeled(c,d,b);break;case 501:this.xWhenPressed=d;this.yWhenPressed=h;this.modifiersWhenPressed10=b;this.pressed(c,d,h,b,!1);break;case 506:this.dragged(c,
d,h);break;case 504:this.entry(c,d,h,!1);break;case 505:this.entry(c,d,h,!0);break;case 503:this.moved(c,d,h,b);break;case 502:this.released(c,d,h,b);d==this.xWhenPressed&&(h==this.yWhenPressed&&b==this.modifiersWhenPressed10)&&this.clicked(c,d,h,b,1);break;default:return!1}return!0},"~N,~N,~N,~N,~N");g(b,"processTwoPointGesture",function(a){if(!(2>a[0].length)){var d=a[0],h=a[1],b=d[0],c=d[h.length-1];a=b[0];var f=c[0],b=b[1],c=c[1],j=JU.V3.new3(f-a,c-b,0),k=j.length(),l=h[0],g=h[h.length-1],h=l[0],
m=g[0],l=l[1],g=g[1],p=JU.V3.new3(m-h,g-l,0),y=p.length();1>k||1>y||(j.normalize(),p.normalize(),j=j.dot(p),0.8<j?(a=F(f-d[d.length-2][0]),d=F(c-d[d.length-2][1]),this.vwr.translateXYBy(a,d)):-0.8>j&&(j=JU.V3.new3(h-a,l-b,0),p=JU.V3.new3(m-f,g-c,0),d=p.length()-j.length(),this.wheeled(System.currentTimeMillis(),0>d?-1:1,32)))}},"~A");c(b,"mouseClicked",function(a){this.clicked(a.getWhen(),a.getX(),a.getY(),a.getModifiers(),a.getClickCount())},"java.awt.event.MouseEvent");c(b,"mouseEntered",function(a){this.entry(a.getWhen(),
a.getX(),a.getY(),!1)},"java.awt.event.MouseEvent");c(b,"mouseExited",function(a){this.entry(a.getWhen(),a.getX(),a.getY(),!0)},"java.awt.event.MouseEvent");c(b,"mousePressed",function(a){this.pressed(a.getWhen(),a.getX(),a.getY(),a.getModifiers(),a.isPopupTrigger())},"java.awt.event.MouseEvent");c(b,"mouseReleased",function(a){this.released(a.getWhen(),a.getX(),a.getY(),a.getModifiers())},"java.awt.event.MouseEvent");c(b,"mouseDragged",function(a){a.getModifiers();this.dragged(a.getWhen(),a.getX(),
a.getY())},"java.awt.event.MouseEvent");c(b,"mouseMoved",function(a){this.moved(a.getWhen(),a.getX(),a.getY(),a.getModifiers())},"java.awt.event.MouseEvent");c(b,"mouseWheelMoved",function(a){a.consume();this.wheeled(a.getWhen(),a.getWheelRotation(),a.getModifiers())},"java.awt.event.MouseWheelEvent");c(b,"keyTyped",function(a){a.consume();if(this.vwr.menuEnabled()){var d=a.getKeyChar(),h=a.getModifiers();JU.Logger.debuggingHigh&&JU.Logger.debug("MouseManager keyTyped: "+d+" "+(0+d.charCodeAt(0))+
" "+h);if(0!=h&&1!=h)switch(d.charCodeAt(0)){case String.fromCharCode(11):case 107:a=!this.vwr.getBooleanProperty("allowKeyStrokes");switch(h){case 2:this.vwr.setBooleanProperty("allowKeyStrokes",a);this.vwr.setBooleanProperty("showKeyStrokes",!0);break;case 10:case 1:this.vwr.setBooleanProperty("allowKeyStrokes",a),this.vwr.setBooleanProperty("showKeyStrokes",!1)}this.clearKeyBuffer();this.vwr.refresh(3,"showkey");break;case 26:case 122:switch(h){case 2:this.vwr.undoMoveAction(4165,1);break;case 3:this.vwr.undoMoveAction(4140,
1)}break;case 25:case 121:switch(h){case 2:this.vwr.undoMoveAction(4140,1)}}else this.vwr.getBooleanProperty("allowKeyStrokes")&&this.addKeyBuffer(1==a.getModifiers()?Character.toUpperCase(d):d)}},"java.awt.event.KeyEvent");c(b,"keyPressed",function(a){this.vwr.isApplet&&a.consume();this.manager.keyPressed(a.getKeyCode(),a.getModifiers())},"java.awt.event.KeyEvent");c(b,"keyReleased",function(a){a.consume();this.manager.keyReleased(a.getKeyCode())},"java.awt.event.KeyEvent");c(b,"clearKeyBuffer",
function(){0!=this.keyBuffer.length&&(this.keyBuffer="",this.vwr.getBooleanProperty("showKeyStrokes")&&this.vwr.evalStringQuietSync('!set echo _KEYSTROKES; set echo bottom left;echo ""',!0,!0))});c(b,"addKeyBuffer",function(a){10==a.charCodeAt(0)?this.sendKeyBuffer():(8==a.charCodeAt(0)?0<this.keyBuffer.length&&(this.keyBuffer=this.keyBuffer.substring(0,this.keyBuffer.length-1)):this.keyBuffer+=a,this.vwr.getBooleanProperty("showKeyStrokes")&&this.vwr.evalStringQuietSync("!set echo _KEYSTROKES; set echo bottom left;echo "+
JU.PT.esc("\u0001"+this.keyBuffer),!0,!0))},"~S");c(b,"sendKeyBuffer",function(){var a=this.keyBuffer;this.vwr.getBooleanProperty("showKeyStrokes")&&this.vwr.evalStringQuietSync("!set echo _KEYSTROKES; set echo bottom left;echo "+JU.PT.esc(this.keyBuffer),!0,!0);this.clearKeyBuffer();this.vwr.evalStringQuietSync(a,!1,!0)});c(b,"entry",function(a,d,h,b){this.isMouseDown=this.wheeling=!1;this.modifiersDown=0;this.manager.mouseEnterExit(a,d,h,b)},"~N,~N,~N,~B");c(b,"clicked",function(a,d,h,b){this.clearKeyBuffer();
this.manager.mouseAction(2,a,d,h,1,b)},"~N,~N,~N,~N,~N");c(b,"moved",function(a,d,h,b){this.clearKeyBuffer();this.isMouseDown?this.manager.mouseAction(1,a,d,h,0,this.modifiersDown):this.manager.mouseAction(0,a,d,h,0,b)},"~N,~N,~N,~N");c(b,"wheeled",function(a,d,h){this.clearKeyBuffer();this.wheeling=!0;this.manager.mouseAction(3,a,0,d,0,h&-29|32)},"~N,~N,~N");c(b,"pressed",function(a,d,h,b){this.clearKeyBuffer();this.isMouseDown=!0;this.modifiersDown=b;this.wheeling=!1;this.manager.mouseAction(4,
a,d,h,0,b)},"~N,~N,~N,~N,~B");c(b,"released",function(a,d,h,b){this.isMouseDown=!1;this.modifiersDown=0;this.wheeling=!1;this.manager.mouseAction(5,a,d,h,0,b)},"~N,~N,~N,~N");c(b,"dragged",function(a,d,h){this.wheeling||(20==(this.modifiersDown&20)&&(this.modifiersDown=this.modifiersDown&-5|2),this.manager.mouseAction(1,a,d,h,0,this.modifiersDown))},"~N,~N,~N");b.applyLeftMouse=c(b,"applyLeftMouse",function(a){return 0==(a&28)?a|16:a},"~N");g(b,"processKeyEvent",function(a){switch(a.getID()){case 401:this.keyPressed(a);
break;case 402:this.keyReleased(a);break;case 400:this.keyTyped(a)}},"~O")});n("J.awtjs2d");z(["J.api.GenericPlatform"],"J.awtjs2d.Platform","java.net.URL JU.AjaxURLStreamHandlerFactory $.Rdr J.api.Interface J.awtjs2d.Display $.Image $.JSFile $.JSFont $.Mouse".split(" "),function(){var b=w(function(){this.context=this.vwr=this.canvas=null;q(this,arguments)},J.awtjs2d,"Platform",null,J.api.GenericPlatform);g(b,"setViewer",function(a,d){this.vwr=a;null==d?(d=document.createElement("canvas"),this.context=
d.getContext("2d")):(this.context=d.getContext("2d"),d.imgdata=this.context.getImageData(0,0,d.width,d.height),d.buf8=d.imgdata.data);this.canvas=d;try{java.net.URL.setURLStreamHandlerFactory(new JU.AjaxURLStreamHandlerFactory)}catch(h){}},"J.api.PlatformViewer,~O");g(b,"isSingleThreaded",function(){return!0});g(b,"getJsObjectInfo",function(a,d,h){return null==d?null:"localName"==d?a[0].nodeName:null==h?a[0][d]:a[0][d](h[0])},"~A,~S,~A");g(b,"isHeadless",function(){return!1});g(b,"getMouseManager",
function(a,d){return new J.awtjs2d.Mouse(a,this.vwr,d)},"~N,~O");g(b,"convertPointFromScreen",function(a,d){J.awtjs2d.Display.convertPointFromScreen(a,d)},"~O,JU.P3");g(b,"getFullScreenDimensions",function(a,d){J.awtjs2d.Display.getFullScreenDimensions(a,d)},"~O,~A");g(b,"getMenuPopup",function(a,d){var h="j"==d?"awtjs2d.JSJmolPopup":"awtjs2d.JSModelKitPopup",b=J.api.Interface.getOption(h,this.vwr,"popup");try{null!=b&&b.jpiInitialize(this.vwr,a)}catch(c){if(D(c,Exception))return System.out.println("Exception creating "+
h+":"+c),null;throw c;}return b},"~S,~S");g(b,"hasFocus",function(a){return J.awtjs2d.Display.hasFocus(a)},"~O");g(b,"prompt",function(a,d,h,b){return J.awtjs2d.Display.prompt(a,d,h,b)},"~S,~S,~A,~B");g(b,"renderScreenImage",function(a,d){J.awtjs2d.Display.renderScreenImage(this.vwr,a,d)},"~O,~O");g(b,"drawImage",function(a,d,h,b,c,f,j){J.awtjs2d.Display.drawImage(a,d,h,b,c,f,j)},"~O,~O,~N,~N,~N,~N,~B");g(b,"requestFocusInWindow",function(a){J.awtjs2d.Display.requestFocusInWindow(a)},"~O");g(b,"repaint",
function(){var a=null,a=self.Jmol&&Jmol.repaint?Jmol:null;null!=a&&a.repaint(this.vwr.html5Applet,!0)},"~O");g(b,"setTransparentCursor",function(){},"~O");g(b,"setCursor",function(a){J.awtjs2d.Platform.Jmol().setCursor(this.vwr.html5Applet,a)},"~N,~O");g(b,"allocateRgbImage",function(a,d,h,b,c,f){null==h&&(h=this.grabPixels(null,0,0,null),a=this.canvas.width,d=this.canvas.height);return J.awtjs2d.Image.allocateRgbImage(a,d,h,b,c,f?null:this.canvas)},"~N,~N,~A,~N,~B,~B");g(b,"notifyEndOfRendering",
function(){});g(b,"disposeGraphics",function(){},"~O");g(b,"grabPixels",function(a,d,h){var b=null,c=null==a;c&&(this.canvas=a=Jmol.loadImage(this,"webgl",""+System.currentTimeMillis(),this.vwr.html5Applet._canvas.toDataURL(),null,null),d=a.imageWidth,h=a.imageHeight,a.imageWidth=0);a.image&&(d!=a.width||h!=a.height)&&Jmol.setCanvasImage(a,d,h);if(a.buf32)return a.buf32;b=a.getContext("2d");d=J.awtjs2d.Image.grabPixels(b,d,h);a.buf32=d;if(c)for(a=d.length;0<=--a;)0==d[a]&&(d[a]=-1);return d},"~O,~N,~N,~A");
g(b,"drawImageToBuffer",function(a,d,h,b,c){return this.grabPixels(h,b,c,null)},"~O,~O,~O,~N,~N,~N");g(b,"getTextPixels",function(a,d,h,b,c,f,j){return J.awtjs2d.Image.getTextPixels(a,d,h,c,f,j)},"~S,JU.Font,~O,~O,~N,~N,~N");g(b,"flushImage",function(){},"~O");g(b,"getGraphics",function(a){return null==a?this.context:a.getContext("2d")},"~O");g(b,"getImageHeight",function(a){return null==a?-1:J.awtjs2d.Image.getHeight(a)},"~O");g(b,"getImageWidth",function(a){return null==a?-1:J.awtjs2d.Image.getWidth(a)},
"~O");g(b,"getStaticGraphics",function(a){return this.getGraphics(a)},"~O,~B");g(b,"newBufferedImage",function(a,d,h){return J.awtjs2d.Platform.Jmol().getHiddenCanvas(this.vwr.html5Applet,"stereoImage",d,h)},"~O,~N,~N");g(b,"newOffScreenImage",function(a,d){return J.awtjs2d.Platform.Jmol().getHiddenCanvas(this.vwr.html5Applet,"textImage",a,d)},"~N,~N");g(b,"waitForDisplay",function(){return!1},"~O,~O");g(b,"createImage",function(a){var d=a[0],h=a[1];a=a[2];var b=this.vwr,c=null==a?b.getEvalContextAndHoldQueue(b.eval):
null,f=null,f=function(a,h){b.loadImageData(a,h,d,c)};return J.awtjs2d.Platform.Jmol().loadImage(this,d,h,a,f)},"~O");g(b,"fontStringWidth",function(a,d){return J.awtjs2d.JSFont.stringWidth(a,this.context,d)},"JU.Font,~S");g(b,"getFontAscent",function(a){return J.awtjs2d.JSFont.getAscent(a)},"~O");g(b,"getFontDescent",function(a){return J.awtjs2d.JSFont.getDescent(a)},"~O");g(b,"getFontMetrics",function(a,d){return J.awtjs2d.JSFont.getFontMetrics(a,null==d?this.context:d)},"JU.Font,~O");g(b,"newFont",
function(a,d,h,b){return J.awtjs2d.JSFont.newFont(a,d,h,b,"px")},"~S,~B,~B,~N");g(b,"getDateFormat",function(a){if(null!=a){if(0<=a.indexOf("8824")){var d=new Date;a=d.toString().split(" ");var h="0"+(1+d.getMonth()),h=h.substring(h.length-2),d="0"+d.getDate(),d=d.substring(d.length-2);return a[3]+h+d+a[4].replace(/\:/g,"")+a[5].substring(3,6)+"'"+a[5].substring(6,8)+"'"}if(0<=a.indexOf("8601")){d=new Date;a=d.toString().split(" ");if(1==a.length)return a;h="0"+(1+d.getMonth());h=h.substring(h.length-
2);d="0"+d.getDate();d=d.substring(d.length-2);return a[3]+"-"+h+"-"+d+"T"+a[4]}}return(""+new Date).split(" (")[0]},"~S");g(b,"newFile",function(a){return new J.awtjs2d.JSFile(a)},"~S");g(b,"getBufferedFileInputStream",function(){return null},"~S");g(b,"getURLContents",function(a,d,h,b){return J.awtjs2d.Platform.getURLContentsStatic(a,d,h,b)},"java.net.URL,~A,~S,~B");b.getURLContentsStatic=c(b,"getURLContentsStatic",function(a,d,h,b){a=J.awtjs2d.JSFile.getURLContents(a,d,h);try{return!b?a:"string"==
typeof a?a:C(a,"JU.SB")?a.toString():C(a,Array)?String.instantialize(a):String.instantialize(JU.Rdr.getStreamAsBytes(a,null))}catch(c){if(D(c,Exception))return""+c;throw c;}},"java.net.URL,~A,~S,~B");g(b,"getLocalUrl",function(){return null},"~S");g(b,"getImageDialog",function(a,d){return J.awtjs2d.Image.getImageDialog(this.vwr,a,d)},"~S,java.util.Map");b.Jmol=c(b,"Jmol",function(){return Jmol});g(b,"forceAsyncLoad",function(a){return J.awtjs2d.Platform.Jmol().isBinaryUrl(a)},"~S");g(b,"getInChI",
function(){return null==J.awtjs2d.Platform.inchi?J.awtjs2d.Platform.inchi=J.api.Interface.getInterface("J.inchi.InChIJS",this.vwr,"platform"):J.awtjs2d.Platform.inchi});g(b,"confirm",function(a,d){var h=!1;null!=d&&(h=!1);return h?1:2},"~S,~S");b.inchi=null});n("J.bspt");z(null,"J.bspt.Bspf",["JU.AU","J.bspt.Bspt"],function(){var b=w(function(){this.dimMax=0;this.bspts=null;this.isValid=!1;this.cubeIterators=this.bsptsValid=null;q(this,arguments)},J.bspt,"Bspf",null);x(b,function(a){this.dimMax=a;
this.bspts=Array(1);this.bsptsValid=Ca(1,!1);this.cubeIterators=[]},"~N");c(b,"validateModel",function(a,d){this.bsptsValid[a]=d},"~N,~B");c(b,"isInitializedIndex",function(a){return this.bspts.length>a&&null!=this.bspts[a]&&this.bsptsValid[a]},"~N");c(b,"addTuple",function(a,d){a>=this.bspts.length&&(this.bspts=JU.AU.arrayCopyObject(this.bspts,a+1),this.bsptsValid=JU.AU.arrayCopyBool(this.bsptsValid,a+1));var h=this.bspts[a];null==h&&(h=this.bspts[a]=new J.bspt.Bspt(this.dimMax,a));h.addTuple(d)},
"~N,JU.P3");c(b,"stats",function(){for(var a=0;a<this.bspts.length;++a)null!=this.bspts[a]&&this.bspts[a].stats()});c(b,"getCubeIterator",function(a){if(0>a)return this.getNewCubeIterator(-1-a);a>=this.cubeIterators.length&&(this.cubeIterators=JU.AU.arrayCopyObject(this.cubeIterators,a+1));null==this.cubeIterators[a]&&null!=this.bspts[a]&&(this.cubeIterators[a]=this.getNewCubeIterator(a));this.cubeIterators[a].set(this.bspts[a]);return this.cubeIterators[a]},"~N");c(b,"getNewCubeIterator",function(a){return this.bspts[a].allocateCubeIterator()},
"~N");c(b,"initialize",function(a,d,h){null!=this.bspts[a]&&this.bspts[a].reset();for(var b=h.nextSetBit(0);0<=b;b=h.nextSetBit(b+1))this.addTuple(a,d[b]);this.bsptsValid[a]=!0},"~N,~A,JU.BS")});n("J.bspt");z(null,"J.bspt.Bspt",["J.bspt.CubeIterator","$.Leaf"],function(){var b=w(function(){this.index=this.dimMax=this.treeDepth=0;this.eleRoot=null;q(this,arguments)},J.bspt,"Bspt",null);x(b,function(a,d){this.dimMax=a;this.index=d;this.reset()},"~N,~N");c(b,"reset",function(){this.eleRoot=new J.bspt.Leaf(this,
null,0);this.treeDepth=1});c(b,"addTuple",function(a){this.eleRoot=this.eleRoot.addTuple(0,a)},"JU.T3");c(b,"stats",function(){});c(b,"allocateCubeIterator",function(){return new J.bspt.CubeIterator(this)})});n("J.bspt");var na=w(function(){this.stack=this.bspt=null;this.leafIndex=this.sp=0;this.leaf=null;this.dz=this.dy=this.dx=this.cz=this.cy=this.cx=this.radius=0;this.tHemisphere=!1;q(this,arguments)},J.bspt,"CubeIterator",null);x(na,function(b){this.set(b)},"J.bspt.Bspt");c(na,"set",function(b){this.bspt=
b;this.stack=Array(b.treeDepth)},"J.bspt.Bspt");c(na,"initialize",function(b,a,d){this.radius=a;this.tHemisphere=!1;this.cx=b.x;this.cy=b.y;this.cz=b.z;this.leaf=null;this.stack.length<this.bspt.treeDepth&&this.set(this.bspt);this.stack[0]=this.bspt.eleRoot;this.sp=1;this.findLeftLeaf();this.tHemisphere=d},"JU.T3,~N,~B");c(na,"release",function(){this.set(this.bspt)});c(na,"hasMoreElements",function(){for(;null!=this.leaf;){for(;this.leafIndex<this.leaf.count;++this.leafIndex)if(this.isWithinRadius(this.leaf.tuples[this.leafIndex]))return!0;
this.findLeftLeaf()}return!1});c(na,"nextElement",function(){return this.leaf.tuples[this.leafIndex++]});c(na,"foundDistance2",function(){return this.dx*this.dx+this.dy*this.dy+this.dz*this.dz});c(na,"findLeftLeaf",function(){this.leaf=null;if(0!=this.sp){for(var b=this.stack[--this.sp];C(b,"J.bspt.Node");){var a;switch(b.dim){case 0:a=this.cx;break;case 1:a=this.cy;break;default:a=this.cz}var d=a+this.radius;if(!this.tHemisphere||0!=b.dim)a-=this.radius;if(a<=b.maxLeft&&d>=b.minLeft)d>=b.minRight&&
a<=b.maxRight&&(this.stack[this.sp++]=b.eleRight),b=b.eleLeft;else if(d>=b.minRight&&a<=b.maxRight)b=b.eleRight;else{if(0==this.sp)return;b=this.stack[--this.sp]}}this.leaf=b;this.leafIndex=0}});c(na,"isWithinRadius",function(b){this.dx=b.x-this.cx;return(!this.tHemisphere||0<=this.dx)&&(this.dx=Math.abs(this.dx))<=this.radius&&(this.dy=Math.abs(b.y-this.cy))<=this.radius&&(this.dz=Math.abs(b.z-this.cz))<=this.radius},"JU.T3");n("J.bspt");w(function(){this.bspt=null;this.count=0;q(this,arguments)},
J.bspt,"Element",null);n("J.bspt");z(["J.bspt.Element"],"J.bspt.Leaf",["J.bspt.Node"],function(){var b=w(function(){this.tuples=null;q(this,arguments)},J.bspt,"Leaf",J.bspt.Element);x(b,function(a,d,h){this.bspt=a;this.count=0;this.tuples=Array(2);if(null!=d){for(a=h;2>a;++a)this.tuples[this.count++]=d.tuples[a],d.tuples[a]=null;d.count=h}},"J.bspt.Bspt,J.bspt.Leaf,~N");c(b,"sort",function(a){for(var d=this.count;0<--d;)for(var h=this.tuples[d],b=J.bspt.Node.getDimensionValue(h,a),c=d;0<=--c;){var f=
this.tuples[c],j=J.bspt.Node.getDimensionValue(f,a);j>b&&(this.tuples[d]=f,this.tuples[c]=h,h=f,b=j)}},"~N");g(b,"addTuple",function(a,d){return 2>this.count?(this.tuples[this.count++]=d,this):(new J.bspt.Node(this.bspt,a,this)).addTuple(a,d)},"~N,JU.T3")});n("J.bspt");z(["J.bspt.Element"],"J.bspt.Node",["J.bspt.Leaf"],function(){var b=w(function(){this.maxLeft=this.minLeft=this.dim=0;this.eleLeft=null;this.maxRight=this.minRight=0;this.eleRight=null;q(this,arguments)},J.bspt,"Node",J.bspt.Element);
x(b,function(a,d,h){this.bspt=a;d==a.treeDepth&&(a.treeDepth=d+1);if(2!=h.count)throw new NullPointerException;this.dim=d%a.dimMax;h.sort(this.dim);a=new J.bspt.Leaf(a,h,1);this.minLeft=J.bspt.Node.getDimensionValue(h.tuples[0],this.dim);this.maxLeft=J.bspt.Node.getDimensionValue(h.tuples[h.count-1],this.dim);this.minRight=J.bspt.Node.getDimensionValue(a.tuples[0],this.dim);this.maxRight=J.bspt.Node.getDimensionValue(a.tuples[a.count-1],this.dim);this.eleLeft=h;this.eleRight=a;this.count=2},"J.bspt.Bspt,~N,J.bspt.Leaf");
c(b,"addTuple",function(a,d){var h=J.bspt.Node.getDimensionValue(d,this.dim);++this.count;h<this.maxLeft||(h>this.minRight?0:h==this.maxLeft?h==this.minRight?this.eleLeft.count<this.eleRight.count:1:h==this.minRight?0:this.eleLeft.count<this.eleRight.count)?(h<this.minLeft?this.minLeft=h:h>this.maxLeft&&(this.maxLeft=h),this.eleLeft=this.eleLeft.addTuple(a+1,d)):(h<this.minRight?this.minRight=h:h>this.maxRight&&(this.maxRight=h),this.eleRight=this.eleRight.addTuple(a+1,d));return this},"~N,JU.T3");
b.getDimensionValue=c(b,"getDimensionValue",function(a,d){null==a&&System.out.println("bspt.Node ???");switch(d){case 0:return a.x;case 1:return a.y;default:return a.z}},"JU.T3,~N")});n("J.c");z(["java.lang.Enum"],"J.c.CBK",["JU.SB"],function(){var b=G(J.c,"CBK",Enum);b.getCallback=c(b,"getCallback",function(a){a=a.toUpperCase();var d=a.indexOf("CALLBACK");0<d&&(a=a.substring(0,d));for(var h,d=0,b=J.c.CBK.values();d<b.length&&((h=b[d])||1);d++)if(h.name().equalsIgnoreCase(a))return h;return null},
"~S");b.getNameList=c(b,"getNameList",function(){if(null==J.c.CBK.nameList){for(var a=new JU.SB,d,h=0,b=J.c.CBK.values();h<b.length&&((d=b[h])||1);h++)a.append(d.name().toLowerCase()).append("Callback;");J.c.CBK.nameList=a.toString()}return J.c.CBK.nameList});b.nameList=null;B(b,"ANIMFRAME",0,[]);B(b,"APPLETREADY",1,[]);B(b,"ATOMMOVED",2,[]);B(b,"AUDIO",3,[]);B(b,"CLICK",4,[]);B(b,"DRAGDROP",5,[]);B(b,"ECHO",6,[]);B(b,"ERROR",7,[]);B(b,"EVAL",8,[]);B(b,"HOVER",9,[]);B(b,"IMAGE",10,[]);B(b,"LOADSTRUCT",
11,[]);B(b,"MEASURE",12,[]);B(b,"MESSAGE",13,[]);B(b,"MINIMIZATION",14,[]);B(b,"MODELKIT",15,[]);B(b,"PICK",16,[]);B(b,"RESIZE",17,[]);B(b,"SCRIPT",18,[]);B(b,"SELECT",19,[]);B(b,"SERVICE",20,[]);B(b,"STRUCTUREMODIFIED",21,[]);B(b,"SYNC",22,[])});n("J.c");z(["java.lang.Enum"],"J.c.FIL",null,function(){var b=w(function(){this.code=0;q(this,arguments)},J.c,"FIL",Enum);c(b,"getCode",function(){return this.code});x(b,function(a){this.code=a},"~N");B(b,"DELETED",0,[5]);B(b,"CREATED",1,[3]);B(b,"CREATING_MODELSET",
2,[2]);B(b,"ZAPPED",3,[0]);B(b,"NOT_LOADED",4,[-1])});n("J.c");z(["java.lang.Enum"],"J.c.PAL",null,function(){var b=w(function(){this.$$name=null;this.id=0;q(this,arguments)},J.c,"PAL",Enum);x(b,function(a,d){this.$$name=a;this.id=d},"~S,~N");b.pidOf=c(b,"pidOf",function(a){return C(a,"J.c.PAL")?a.id:C(a,Byte)?a.byteValue():J.c.PAL.UNKNOWN.id},"~O");b.isPaletteVariable=c(b,"isPaletteVariable",function(a){return 0!=(a&64)},"~N");b.getPalette=c(b,"getPalette",function(a){if(0>a.indexOf("_"))for(var d,
h=0,b=J.c.PAL.values();h<b.length&&((d=b[h])||1);h++)if(a.equalsIgnoreCase(d.$$name))return d;return 0==a.indexOf("property_")?J.c.PAL.PROPERTY:J.c.PAL.UNKNOWN},"~S");b.getPaletteID=c(b,"getPaletteID",function(a){if(0>a.indexOf("_"))for(var d,h=0,b=J.c.PAL.values();h<b.length&&((d=b[h])||1);h++)if(a.equalsIgnoreCase(d.$$name))return d.id;return 0==a.indexOf("property_")?J.c.PAL.PROPERTY.id:J.c.PAL.UNKNOWN.id},"~S");b.getPaletteName=c(b,"getPaletteName",function(a){for(var d,h=0,b=J.c.PAL.values();h<
b.length&&((d=b[h])||1);h++)if(d.id==a)return d.$$name;return null},"~N");b.PALETTE_VOLATILE=64;b.PALETTE_NONE=0;b.PALETTE_CPK=1;b.PALETTE_PARTIAL_CHARGE=2;b.PALETTE_FORMAL_CHARGE=3;b.PALETTE_TEMP=68;b.PALETTE_FIXEDTEMP=5;b.PALETTE_SURFACE=70;b.PALETTE_STRUCTURE=7;b.PALETTE_AMINO=8;b.PALETTE_SHAPELY=9;b.PALETTE_CHAIN=10;b.PALETTE_GROUP=75;b.PALETTE_MONOMER=76;b.PALETTE_MOLECULE=77;b.PALETTE_ALTLOC=14;b.PALETTE_INSERTION=15;b.PALETTE_JMOL=16;b.PALETTE_RASMOL=17;b.PALETTE_TYPE=18;b.PALETTE_ENERGY=19;
b.PALETTE_PROPERTY=84;b.PALETTE_VARIABLE=85;b.PALETTE_STRAIGHTNESS=86;b.PALETTE_POLYMER=87;b.PALETTE_NUCLEIC=24;b.argbsCpkRasmol=E(-1,[16716947,33554431,50315467,62005794,83951360,113821896,126849023,149946368,165324064,184549631,203590434,226525328,249210144,268412160,285198386,285277952,343965840,377520272,411074704,427851920,452961536,480586282,497363498,514140714,598026794,796950672,899686640,956278016,1339729184]);b.argbsCpk=E(-1,[4294907027,4294967295,4292476927,4291592447,4290969344,4294948277,
4287664272,4281356536,4294905101,4287684688,4289979381,4289420530,4287299328,4290750118,4293970080,4294934528,4294967088,4280283167,4286632419,4287578324,4282253056,4293322470,4290757319,4289111723,4287273415,4288445127,4292896307,4293955744,4283486288,4291330099,4286415024,4290940815,4284911503,4290609379,4294942976,4289079593,4284266705,4285542064,4278255360,4287954943,4287946976,4285776585,4283741621,4282097310,4280586127,4278877580,4278217093,4290822336,4294957455,4289099123,4284907648,4288570293,
4292114944,4287889556,4282556080,4283897743,4278241536,4285584639,4294967239,4292476871,4291297223,4288937927,4287627207,4284612551,4282777543,4281401287,4280287175,4278255516,4278249077,4278244434,4278239032,4278233892,4283286271,4283279103,4280390870,4280712619,4280706710,4279719047,4291875040,4294955299,4290296016,4289090637,4283914593,4288565173,4289420288,4285878085,4282548886,4282515558,4278222080,4285574138,4278237951,4278231551,4278226943,4278223103,4278217727,4283718898,4286078179,4287254499,
4288755412,4289929172,4289929146,4289924518,4290579847,4291231846,4291559513,4291887183,4292411461,4292870200,4293263406,4293591078]);B(b,"UNKNOWN",0,[null,255]);B(b,"NONE",1,["none",0]);B(b,"CPK",2,["cpk",1]);B(b,"PARTIAL_CHARGE",3,["partialcharge",2]);B(b,"FORMAL_CHARGE",4,["formalcharge",3]);B(b,"TEMP",5,["temperature",68]);B(b,"FIXEDTEMP",6,["fixedtemperature",5]);B(b,"SURFACE",7,["surfacedistance",70]);B(b,"STRUCTURE",8,["structure",7]);B(b,"AMINO",9,["amino",8]);B(b,"SHAPELY",10,["shapely",
9]);B(b,"CHAIN",11,["chain",10]);B(b,"GROUP",12,["group",75]);B(b,"MONOMER",13,["monomer",76]);B(b,"MOLECULE",14,["molecule",77]);B(b,"ALTLOC",15,["altloc",14]);B(b,"INSERTION",16,["insertion",15]);B(b,"JMOL",17,["jmol",16]);B(b,"RASMOL",18,["rasmol",17]);B(b,"TYPE",19,["type",18]);B(b,"ENERGY",20,["energy",19]);B(b,"PROPERTY",21,["property",84]);B(b,"VARIABLE",22,["variable",85]);B(b,"STRAIGHTNESS",23,["straightness",86]);B(b,"POLYMER",24,["polymer",87]);B(b,"NUCLEIC",25,["nucleic",24])});n("J.c");
z(["java.lang.Enum"],"J.c.STER",null,function(){var b=w(function(){this.$$name=null;this.$isBiColor=!1;q(this,arguments)},J.c,"STER",Enum);x(b,function(a,d){this.$$name=a;this.$isBiColor=d},"~S,~B");c(b,"getName",function(){return this.$$name});c(b,"isBiColor",function(){return this.$isBiColor});b.getStereoMode=c(b,"getStereoMode",function(a){for(var d,h=0,b=J.c.STER.values();h<b.length&&((d=b[h])||1);h++)if(d.$$name.equalsIgnoreCase(a))return d;return null},"~S");B(b,"NONE",0,["OFF",!1]);B(b,"DOUBLE",
1,["",!1]);B(b,"REDCYAN",2,["REDCYAN",!0]);B(b,"REDBLUE",3,["REDBLUE",!0]);B(b,"REDGREEN",4,["REDGREEN",!0]);B(b,"DTI",5,["DTI",!1]);B(b,"CUSTOM",6,["",!0])});n("J.c");z(["java.lang.Enum"],"J.c.STR",null,function(){var b=w(function(){this.color=this.id=0;q(this,arguments)},J.c,"STR",Enum);x(b,function(a,d){this.id=a;this.color=d},"~N,~N");c(b,"getId",function(){return this.id});c(b,"getColor",function(){return this.color});b.getProteinStructureType=c(b,"getProteinStructureType",function(a){for(var d,
h=0,b=J.c.STR.values();h<b.length&&((d=b[h])||1);h++)if(a.equalsIgnoreCase(d.name()))return d.isProtein()?d:J.c.STR.NOT;return J.c.STR.NOT},"~S");c(b,"getBioStructureTypeName",function(a){return 0>this.id?"":a&&this.isProtein()?"protein":this.name()},"~B");c(b,"isProtein",function(){return 0<=this.id&&3>=this.id||7<=this.id});B(b,"NOT",0,[-1,4286611584]);B(b,"NONE",1,[0,4294967295]);B(b,"TURN",2,[1,4284514559]);B(b,"SHEET",3,[2,4294952960]);B(b,"HELIX",4,[3,4294901888]);B(b,"DNA",5,[4,4289593598]);
B(b,"RNA",6,[5,4294771042]);B(b,"CARBOHYDRATE",7,[6,4289111802]);B(b,"HELIX310",8,[7,4288675968]);B(b,"HELIXALPHA",9,[8,4294901888]);B(b,"HELIXPI",10,[9,4284481664]);B(b,"ANNOTATION",11,[-2,0])});n("J.c");z(["java.lang.Enum"],"J.c.VDW",null,function(){var b=w(function(){this.pt=0;this.type2=this.type=null;q(this,arguments)},J.c,"VDW",Enum);x(b,function(a,d,h){this.pt=a;this.type=d;this.type2=h},"~N,~S,~S");c(b,"getVdwLabel",function(){return null==this.type?this.type2:this.type});b.getVdwType=c(b,
"getVdwType",function(a){if(null!=a)for(var d,h=0,b=J.c.VDW.values();h<b.length&&((d=b[h])||1);h++)if(a.equalsIgnoreCase(d.type))return d;return null},"~S");b.getVdwType2=c(b,"getVdwType2",function(a){if(null!=a)for(var d,h=0,b=J.c.VDW.values();h<b.length&&((d=b[h])||1);h++)if(a.equalsIgnoreCase(d.type2))return d;return null},"~S");B(b,"JMOL",0,[0,"Jmol",null]);B(b,"BABEL",1,[1,"Babel",null]);B(b,"RASMOL",2,[2,"RasMol",null]);B(b,"BABEL21",3,[3,"Babel21",null]);B(b,"AUTO_JMOL",4,[0,null,"Jmol"]);
B(b,"AUTO_BABEL",5,[1,null,"Babel"]);B(b,"AUTO_RASMOL",6,[2,null,"RasMol"]);B(b,"AUTO",7,[0,"Auto",null]);B(b,"USER",8,[-1,"User",null]);B(b,"ADPMAX",9,[-1,null,"adpmax"]);B(b,"ADPMIN",10,[-1,null,"adpmin"]);B(b,"HYDRO",11,[-1,null,"hydrophobic"]);B(b,"BONDING",12,[-1,null,"bondingradius"]);B(b,"TEMP",13,[-1,null,"temperature"]);B(b,"NOJMOL",14,[-1,null,null]);B(b,"NADA",15,[-1,null,null])});n("J.g3d");z(["JU.P3i"],"J.g3d.CylinderRenderer",["JU.AU","$.P3"],function(){var b=w(function(){this.shader=
this.line3d=this.g3d=null;this.colixB=this.colixA=0;this.shadesB=this.shadesA=null;this.dzBf=this.dyBf=this.dxBf=this.zAf=this.yAf=this.xAf=this.dzB=this.dyB=this.dxB=this.zAend=this.yAend=this.xAend=this.zA=this.yA=this.xA=0;this.tEvenDiameter=!1;this.endcaps=this.diameter=0;this.endCapHidden=!1;this.sinPhi=this.cosPhi=this.cosTheta=this.radius2=this.radius=this.endcapShadeIndex=this.colixEndcap=this.argbEndcap=this.zEndcap=this.yEndcap=this.xEndcap=0;this.clipped=!1;this.rasterCount=0;this.ptB0i=
this.ptA0i=this.ptB0=this.ptA0=this.xyzfRaster=this.xyztRaster=null;this.zTip=this.yTip=this.xTip=0;q(this,arguments)},J.g3d,"CylinderRenderer",null);N(b,function(){this.xyztRaster=u(-1,[L(32,0),L(32,0),L(32,0),L(32,0)]);this.xyzfRaster=u(-1,[E(32,0),E(32,0),E(32,0),E(32,0)]);this.ptA0i=new JU.P3i;this.ptB0i=new JU.P3i});x(b,function(a){this.g3d=a;this.line3d=a.line3d;this.shader=a.shader},"J.g3d.Graphics3D");c(b,"renderOld",function(a,d,h,b,c,f,j,k,l,g,m){var p=v(c/2)+1,y=this.g3d,A=y.clipCode3(f-
p,j-p,k-p),H=y.clipCode3(f+p,j+p,k+p),M=y.clipCode3(l-p,g-p,m-p),p=y.clipCode3(l+p,g+p,m+p),n=A|H|M|p;this.clipped=0!=n;if(!(-1==n||0!=(A&p&H&M)))if(this.dxB=l-f,this.dyB=g-j,this.dzB=m-k,1>=c)this.line3d.plotLineDeltaOld(y.getColorArgbOrGray(a),y.getColorArgbOrGray(d),f,j,k,this.dxB,this.dyB,this.dzB,this.clipped);else{l=0==h&&(this.clipped||2==b||0==b);this.diameter=c;this.xA=f;this.yA=j;this.zA=k;this.endcaps=b;this.shadesA=y.getShades(this.colixA=a);this.shadesB=y.getShades(this.colixB=d);this.calcArgbEndcap(!0,
!1);this.calcCosSin(this.dxB,this.dyB,this.dzB);this.calcPoints(3,!1);this.interpolate(0,1,this.xyzfRaster,this.xyztRaster);this.interpolate(1,2,this.xyzfRaster,this.xyztRaster);k=this.xyzfRaster;2==b&&this.renderFlatEndcap(!0,!1,k);y.setZMargin(5);a=y.width;d=y.zbuf;c=k[0];f=k[1];j=k[2];k=k[3];g=y.pixel;for(m=this.rasterCount;0<=--m;)A=k[m]>>8,H=A>>1,M=c[m],p=f[m],n=j[m],this.endCapHidden&&0!=this.argbEndcap&&(this.clipped?(y.plotPixelClippedArgb(this.argbEndcap,this.xEndcap+M,this.yEndcap+p,this.zEndcap-
n-1,a,d,g),y.plotPixelClippedArgb(this.argbEndcap,this.xEndcap-M,this.yEndcap-p,this.zEndcap+n-1,a,d,g)):(y.plotPixelUnclipped(this.argbEndcap,this.xEndcap+M,this.yEndcap+p,this.zEndcap-n-1,a,d,g),y.plotPixelUnclipped(this.argbEndcap,this.xEndcap-M,this.yEndcap-p,this.zEndcap+n-1,a,d,g))),this.line3d.plotLineDeltaAOld(this.shadesA,this.shadesB,h,A,this.xA+M,this.yA+p,this.zA-n,this.dxB,this.dyB,this.dzB,this.clipped),l&&this.line3d.plotLineDeltaOld(this.shadesA[H],this.shadesB[H],this.xA-M,this.yA-
p,this.zA+n,this.dxB,this.dyB,this.dzB,this.clipped);y.setZMargin(0);3==b&&this.renderSphericalEndcaps()}},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");c(b,"renderBitsFloat",function(a,d,h,b,c,f,j){var k=this.g3d;null==this.ptA0&&(this.ptA0=new JU.P3,this.ptB0=new JU.P3);this.ptA0.setT(f);var l=v(c/2)+1,g=Math.round(f.x),m=Math.round(f.y),p=Math.round(f.z),y=Math.round(j.x),A=Math.round(j.y),H=Math.round(j.z),M=k.clipCode3(g-l,m-l,p-l),g=k.clipCode3(g+l,m+l,p+l),m=k.clipCode3(y-l,A-l,H-l),l=k.clipCode3(y+
l,A+l,H+l),y=M|g|m|l;this.clipped=0!=y;if(!(-1==y||0!=(M&l&g&m))){this.dxBf=j.x-f.x;this.dyBf=j.y-f.y;this.dzBf=j.z-f.z;0<c&&(this.diameter=c,this.xAf=f.x,this.yAf=f.y,this.zAf=f.z);f=0==h&&(this.clipped||2==b||0==b);this.xA=F(this.xAf);this.yA=F(this.yAf);this.zA=F(this.zAf);this.dxB=F(this.dxBf);this.dyB=F(this.dyBf);this.dzB=F(this.dzBf);this.shadesA=k.getShades(this.colixA=a);this.shadesB=k.getShades(this.colixB=d);this.endcaps=b;this.calcArgbEndcap(!0,!0);y=this.xyzfRaster;0<c&&this.generateBaseEllipsePrecisely(!1);
2==b&&this.renderFlatEndcap(!0,!0,y);this.line3d.setLineBits(this.dxBf,this.dyBf);k.setZMargin(5);c=k.pixel;a=k.width;d=k.zbuf;j=y[0];M=y[1];l=y[2];y=y[3];for(A=this.rasterCount;0<=--A;){var H=y[A]>>8,g=H>>1,m=j[A],p=M[A],n=l[A];this.endCapHidden&&0!=this.argbEndcap&&(this.clipped?(k.plotPixelClippedArgb(this.argbEndcap,this.xEndcap+m,this.yEndcap+p,this.zEndcap-n-1,a,d,c),k.plotPixelClippedArgb(this.argbEndcap,this.xEndcap-m,this.yEndcap-p,this.zEndcap+n-1,a,d,c)):(k.plotPixelUnclipped(this.argbEndcap,
this.xEndcap+m,this.yEndcap+p,this.zEndcap-n-1,a,d,c),k.plotPixelUnclipped(this.argbEndcap,this.xEndcap-m,this.yEndcap-p,this.zEndcap+n-1,a,d,c)));this.ptA0.set(this.xA+m,this.yA+p,this.zA-n);this.ptB0.setT(this.ptA0);this.ptB0.x+=this.dxB;this.ptB0.y+=this.dyB;this.ptB0.z+=this.dzB;this.line3d.plotLineDeltaABitsFloat(this.shadesA,this.shadesB,H,this.ptA0,this.ptB0,h,this.clipped);f&&(this.ptA0.set(this.xA-m,this.yA-p,this.zA+n),this.ptB0.setT(this.ptA0),this.ptB0.x+=this.dxB,this.ptB0.y+=this.dyB,
this.ptB0.z+=this.dzB,this.line3d.plotLineDeltaABitsFloat(this.shadesA,this.shadesB,g,this.ptA0,this.ptB0,h,this.clipped))}k.setZMargin(0);3==b&&this.renderSphericalEndcaps();this.xAf+=this.dxBf;this.yAf+=this.dyBf;this.zAf+=this.dzBf}},"~N,~N,~N,~N,~N,JU.P3,JU.P3");c(b,"renderBits",function(a,d,h,b,c,f,j){var k=this.g3d;if(0==c||1==c)this.line3d.plotLineBits(k.getColorArgbOrGray(a),k.getColorArgbOrGray(d),f,j,0,0,!1);else{this.ptA0i.setT(f);var l=v(c/2)+1,g=f.x,m=f.y,p=f.z,y=j.x,A=j.y,H=j.z,M=k.clipCode3(g-
l,m-l,p-l),g=k.clipCode3(g+l,m+l,p+l),m=k.clipCode3(y-l,A-l,H-l),l=k.clipCode3(y+l,A+l,H+l),y=M|g|m|l;this.clipped=0!=y;if(!(-1==y||0!=(M&l&g&m))){this.dxBf=j.x-f.x;this.dyBf=j.y-f.y;this.dzBf=j.z-f.z;0<c&&(this.diameter=c,this.xAf=f.x,this.yAf=f.y,this.zAf=f.z);f=0==h&&(this.clipped||2==b||0==b);this.xA=F(this.xAf);this.yA=F(this.yAf);this.zA=F(this.zAf);this.dxB=F(this.dxBf);this.dyB=F(this.dyBf);this.dzB=F(this.dzBf);this.shadesA=k.getShades(this.colixA=a);this.shadesB=k.getShades(this.colixB=
d);this.endcaps=b;this.calcArgbEndcap(!0,!0);y=this.xyzfRaster;0<c&&this.generateBaseEllipsePrecisely(!1);2==b&&this.renderFlatEndcap(!0,!0,y);this.line3d.setLineBits(this.dxBf,this.dyBf);k.setZMargin(5);c=k.pixel;a=k.width;d=k.zbuf;j=y[0];M=y[1];l=y[2];y=y[3];for(A=this.rasterCount;0<=--A;){var H=y[A]>>8,g=H>>1,m=j[A],p=M[A],n=l[A];this.endCapHidden&&0!=this.argbEndcap&&(this.clipped?(k.plotPixelClippedArgb(this.argbEndcap,this.xEndcap+m,this.yEndcap+p,this.zEndcap-n-1,a,d,c),k.plotPixelClippedArgb(this.argbEndcap,
this.xEndcap-m,this.yEndcap-p,this.zEndcap+n-1,a,d,c)):(k.plotPixelUnclipped(this.argbEndcap,this.xEndcap+m,this.yEndcap+p,this.zEndcap-n-1,a,d,c),k.plotPixelUnclipped(this.argbEndcap,this.xEndcap-m,this.yEndcap-p,this.zEndcap+n-1,a,d,c)));this.ptA0i.set(this.xA+m,this.yA+p,this.zA-n);this.ptB0i.setT(this.ptA0i);this.ptB0i.x+=this.dxB;this.ptB0i.y+=this.dyB;this.ptB0i.z+=this.dzB;this.line3d.plotLineDeltaABitsInt(this.shadesA,this.shadesB,H,this.ptA0i,this.ptB0i,h,this.clipped);f&&(this.ptA0i.set(this.xA-
m,this.yA-p,this.zA+n),this.ptB0i.setT(this.ptA0i),this.ptB0i.x+=this.dxB,this.ptB0i.y+=this.dyB,this.ptB0i.z+=this.dzB,this.line3d.plotLineDeltaABitsInt(this.shadesA,this.shadesB,g,this.ptA0i,this.ptB0i,h,this.clipped))}k.setZMargin(0);3==b&&this.renderSphericalEndcaps();this.xAf+=this.dxBf;this.yAf+=this.dyBf;this.zAf+=this.dzBf}}},"~N,~N,~N,~N,~N,JU.P3i,JU.P3i");c(b,"renderConeOld",function(a,d,h,b,c,f,j,k,l,g,m){this.dxBf=j-(this.xAf=b);this.dyBf=k-(this.yAf=c);this.dzBf=l-(this.zAf=f);this.xA=
v(Math.floor(this.xAf));this.yA=v(Math.floor(this.yAf));this.zA=v(Math.floor(this.zAf));this.dxB=v(Math.floor(this.dxBf));this.dyB=v(Math.floor(this.dyBf));this.dzB=v(Math.floor(this.dzBf));this.xTip=j;this.yTip=k;this.zTip=l;this.shadesA=this.g3d.getShades(this.colixA=a);var p=this.shader.getShadeIndex(this.dxB,this.dyB,-this.dzB);a=this.g3d;b=a.pixel;c=a.width;f=a.zbuf;a.plotPixelClippedArgb(this.shadesA[p],F(j),F(k),F(l),c,f,b);this.diameter=h;if(1>=h)1==h&&this.line3d.plotLineDeltaOld(this.colixA,
this.colixA,this.xA,this.yA,this.zA,this.dxB,this.dyB,this.dzB,this.clipped);else{this.endcaps=d;this.calcArgbEndcap(!1,!0);this.generateBaseEllipsePrecisely(m);!m&&2==this.endcaps&&this.renderFlatEndcap(!1,!0,this.xyzfRaster);a.setZMargin(5);d=this.xyztRaster[0];h=this.xyztRaster[1];j=this.xyztRaster[2];k=this.xyzfRaster[3];l=this.shadesA;for(var p=this.endCapHidden&&0!=this.argbEndcap,y=this.rasterCount;0<=--y;){var A=d[y],H=h[y],M=j[y],n=k[y]>>8,q=this.xAf+A,w=this.yAf+H,u=this.zAf-M,A=this.xAf-
A,H=this.yAf-H,M=this.zAf+M,B=l[0];p&&(a.plotPixelClippedArgb(this.argbEndcap,F(q),F(w),F(u),c,f,b),a.plotPixelClippedArgb(this.argbEndcap,F(A),F(H),F(M),c,f,b));0!=B&&(this.line3d.plotLineDeltaAOld(l,l,0,n,F(q),F(w),F(u),v(Math.ceil(this.xTip-q)),v(Math.ceil(this.yTip-w)),v(Math.ceil(this.zTip-u)),!0),g&&(this.line3d.plotLineDeltaAOld(l,l,0,n,F(q),F(w)+1,F(u),v(Math.ceil(this.xTip-q)),v(Math.ceil(this.yTip-w))+1,v(Math.ceil(this.zTip-u)),!0),this.line3d.plotLineDeltaAOld(l,l,0,n,F(q)+1,F(w),F(u),
v(Math.ceil(this.xTip-q))+1,v(Math.ceil(this.yTip-w)),v(Math.ceil(this.zTip-u)),!0)),!m&&!(2!=this.endcaps&&0<this.dzB)&&this.line3d.plotLineDeltaOld(B,B,F(A),F(H),F(M),v(Math.ceil(this.xTip-A)),v(Math.ceil(this.yTip-H)),v(Math.ceil(this.zTip-M)),!0))}a.setZMargin(0)}},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~B,~B");c(b,"generateBaseEllipsePrecisely",function(a){this.calcCosSin(this.dxBf,this.dyBf,this.dzBf);this.calcPoints(a?2:3,!0);this.interpolatePrecisely(0,1,this.xyzfRaster,this.xyztRaster);a||this.interpolatePrecisely(1,
2,this.xyzfRaster,this.xyztRaster);for(a=3;0<=--a;)for(var d=this.rasterCount;0<=--d;)this.xyzfRaster[a][d]=v(Math.floor(this.xyztRaster[a][d]))},"~B");c(b,"calcPoints",function(a,d){this.calcRotatedPoint(0,0,d,this.xyzfRaster,this.xyztRaster);this.calcRotatedPoint(0.5,1,d,this.xyzfRaster,this.xyztRaster);3==(this.rasterCount=a)&&this.calcRotatedPoint(1,2,d,this.xyzfRaster,this.xyztRaster)},"~N,~B");c(b,"calcCosSin",function(a,d,h){var b=a*a+d*d;if(0==b)this.cosPhi=this.cosTheta=1,this.sinPhi=0;else{var c=
Math.sqrt(b),b=Math.sqrt(b+h*h);this.cosTheta=h/b;this.cosPhi=a/c;this.sinPhi=d/c}},"~N,~N,~N");c(b,"calcRotatedPoint",function(a,d,h,b,c){c[3][d]=a;a*=3.141592653589793;var f=Math.sin(a)*this.cosTheta,j=Math.cos(a);a=this.radius*(f*this.cosPhi-j*this.sinPhi);f=this.radius*(f*this.sinPhi+j*this.cosPhi);j=this.radius2-(a*a+f*f);j=0<j?Math.sqrt(j):0;h?(c[0][d]=a,c[1][d]=f,c[2][d]=j):(this.tEvenDiameter?(b[0][d]=v(a-0.5),b[1][d]=v(f-0.5)):(b[0][d]=v(a),b[1][d]=v(f)),b[2][d]=v(j+0.5));b[3][d]=this.shader.getShadeFp8(a,
f,j)},"~N,~N,~B,~A,~A");c(b,"allocRaster",function(a,d,h){if(this.rasterCount>=d[0].length)for(;this.rasterCount>=d[0].length;){for(var b=4;0<=--b;)d[b]=JU.AU.doubleLengthI(d[b]);h[3]=JU.AU.doubleLengthF(h[3])}if(a)for(;this.rasterCount>=h[0].length;)for(b=3;0<=--b;)h[b]=JU.AU.doubleLengthF(h[b]);return this.rasterCount++},"~B,~A,~A");c(b,"interpolate",function(a,d,h,b){var c=h[0],f=h[1],c=c[d]-c[a];0>c&&(c=-c);f=f[d]-f[a];0>f&&(f=-f);if(!(1>=c+f)){for(var j=this.allocRaster(!1,h,b),c=h[0],f=h[1],
k=h[3],l=b[3][a],g=b[3][d],m=4;0<=--m;){var p=(l+g)/2;this.calcRotatedPoint(p,j,!1,h,b);if(c[j]==c[a]&&f[j]==f[a])k[a]=k[a]+k[j]>>>1,l=p;else if(c[j]==c[d]&&f[j]==f[d])k[d]=k[d]+k[j]>>>1,g=p;else{this.interpolate(a,j,h,b);this.interpolate(j,d,h,b);return}}c[j]=c[a];f[j]=f[d]}},"~N,~N,~A,~A");c(b,"interpolatePrecisely",function(a,d,h,b){var c=b[0],f=b[1],j=v(Math.floor(c[d]))-v(Math.floor(c[a]));0>j&&(j=-j);f=v(Math.floor(f[d]))-v(Math.floor(f[a]));0>f&&(f=-f);if(!(1>=j+f)){for(var f=b[3],j=f[a],k=
f[d],l=this.allocRaster(!0,h,b),c=b[0],f=b[1],g=h[3],m=4;0<=--m;){var p=(j+k)/2;this.calcRotatedPoint(p,l,!0,h,b);if(v(Math.floor(c[l]))==v(Math.floor(c[a]))&&v(Math.floor(f[l]))==v(Math.floor(f[a])))g[a]=g[a]+g[l]>>>1,j=p;else if(v(Math.floor(c[l]))==v(Math.floor(c[d]))&&v(Math.floor(f[l]))==v(Math.floor(f[d])))g[d]=g[d]+g[l]>>>1,k=p;else{this.interpolatePrecisely(a,l,h,b);this.interpolatePrecisely(l,d,h,b);return}}c[l]=c[a];f[l]=f[d]}},"~N,~N,~A,~A");c(b,"renderFlatEndcap",function(a,d,h){var b,
c;if(d){if(0==this.dzBf||0==this.colixEndcap||!this.g3d.setC(this.colixEndcap))return;d=this.xAf;b=this.yAf;c=this.zAf;a&&0>this.dzBf&&(d+=this.dxBf,b+=this.dyBf,c+=this.dzBf);d=F(d);b=F(b);c=F(c)}else{if(0==this.dzB||0==this.colixEndcap||!this.g3d.setC(this.colixEndcap))return;d=this.xAend;b=this.yAend;c=this.zAend;a&&0>this.dzB&&(d+=this.dxB,b+=this.dyB,c+=this.dzB)}var f=h[1][0];a=h[1][0];var j=0,k=0,l=h[0],g=h[1];h=h[2];for(var m=this.rasterCount;0<--m;){var p=g[m];p<f?f=p:p>a?a=p:(p=-p,p<f?f=
p:p>a&&(a=p))}for(p=f;p<=a;++p){for(var f=2147483647,y=-2147483648,m=this.rasterCount;0<=--m;){if(g[m]==p){var A=l[m];A<f&&(f=A,j=h[m]);A>y&&(y=A,k=h[m])}g[m]==-p&&(A=-l[m],A<f&&(f=A,j=-h[m]),A>y&&(y=A,k=-h[m]))}m=y-f+1;this.g3d.setColorNoisy(this.endcapShadeIndex);this.g3d.plotPixelsClippedRaster(m,d+f,b+p,c-j-1,c-k-1,null,null)}},"~B,~B,~A");c(b,"renderSphericalEndcaps",function(){0!=this.colixA&&this.g3d.setC(this.colixA)&&this.g3d.fillSphereXYZ(this.diameter,this.xA,this.yA,this.zA+1);0!=this.colixB&&
this.g3d.setC(this.colixB)&&this.g3d.fillSphereXYZ(this.diameter,this.xA+this.dxB,this.yA+this.dyB,this.zA+this.dzB+1)});c(b,"calcArgbEndcap",function(a,d){this.tEvenDiameter=0==(this.diameter&1);this.radius=this.diameter/2;this.radius2=this.radius*this.radius;this.endCapHidden=!1;var h=d?this.dzBf:this.dzB;if(!(3==this.endcaps||0==h)){this.xEndcap=this.xAend=this.xA;this.yEndcap=this.yAend=this.yA;this.zEndcap=this.zAend=this.zA;var b=d?this.dxBf:this.dxB,c=d?this.dyBf:this.dyB;0<=h||!a?(this.endcapShadeIndex=
this.shader.getShadeIndex(-b,-c,h),0==this.colixA?(this.xAend+=v(this.dxB/2),this.yAend+=v(this.dyB/2),this.zAend+=v(this.dzB/2),this.colixEndcap=this.colixB):this.colixEndcap=this.colixA):(this.endcapShadeIndex=this.shader.getShadeIndex(b,c,-h),0==this.colixB?(this.colixEndcap=this.colixA,this.xAend-=v(this.dxB/2),this.yAend-=v(this.dyB/2),this.zAend-=v(this.dzB/2)):(this.colixEndcap=this.colixB,this.xEndcap+=this.dxB,this.yEndcap+=this.dyB,this.zEndcap+=this.dzB));h=this.colixEndcap==this.colixA?
this.shadesA:this.shadesB;56<this.endcapShadeIndex&&(this.endcapShadeIndex=56);this.argbEndcap=h[this.endcapShadeIndex];this.endCapHidden=1==this.endcaps}},"~B,~B")});n("J.g3d");K(J.g3d,"G3DRenderer");n("J.g3d");z(["J.api.JmolRendererInterface","JU.GData","JU.P3i","$.V3"],"J.g3d.Graphics3D","java.util.Arrays JU.AU J.api.Interface J.c.STER J.g3d.CylinderRenderer $.LineRenderer $.Pixelator $.PixelatorScreened $.PixelatorShaded $.PixelatorT $.Platform3D $.SphereRenderer $.TextRenderer $.TextString JU.C $.Normix".split(" "),
function(){var b=w(function(){this.hermite3d=this.circle3d=this.triangle3d=this.cylinder3d=this.sphere3d=this.line3d=this.platform=null;this.antialias2=this.isFullSceneAntialiasingEnabled=!1;this.strings=null;this.stringCount=0;this.anaglyphChannelBytes=null;this.$haveTranslucentObjects=this.twoPass=!1;this.zbufT=this.zbuf=this.pbufT=this.pbuf=null;this.translucencyMask=0;this.renderLow=!1;this.shadesCurrent=null;this.anaglyphLength=0;this.pixelShaded=this.pixelScreened=this.pixelT0=this.pixel0=this.pixel=
null;this.zMargin=0;this.aobuf=null;this.translucencyLog=this.lastRawColor=this.currentShadeIndex=0;this.wasScreened=!1;this.saveDiffuse=this.saveAmbient=0;this.shadeIndexes2Sided=this.shadeIndexes=this.vectorNormal=this.vectorAC=this.vectorAB=this.sC=this.sB=this.sA=null;this.pass2Flag01=0;q(this,arguments)},J.g3d,"Graphics3D",JU.GData,J.api.JmolRendererInterface);N(b,function(){this.sA=new JU.P3i;this.sB=new JU.P3i;this.sC=new JU.P3i;this.vectorAB=new JU.V3;this.vectorAC=new JU.V3;this.vectorNormal=
new JU.V3;this.shadeIndexes=O(JU.GData.normixCount,0);this.shadeIndexes2Sided=O(JU.GData.normixCount,0)});x(b,function(){I(this,J.g3d.Graphics3D,[]);for(var a=JU.GData.normixCount;0<=--a;)this.transformedVectors[a]=new JU.V3});g(b,"isWebGL",function(){return!1});g(b,"clear",function(){this.stringCount=0;this.strings=null;J.g3d.TextRenderer.clearFontCache()});g(b,"destroy",function(){this.releaseBuffers();this.graphicsForMetrics=this.pixelScreened=this.pixelT0=this.pixel=this.pixel0=this.pixelShaded=
this.platform=null});c(b,"setZMargin",function(a){this.zMargin=a},"~N");g(b,"initialize",function(a,d){this.vwr=a;this.apiPlatform=d;this.platform=new J.g3d.Platform3D(d);this.pixel=this.pixel0=new J.g3d.Pixelator(this);this.graphicsForMetrics=this.platform.getGraphicsForMetrics();this.line3d=new J.g3d.LineRenderer(this);this.sphere3d=new J.g3d.SphereRenderer(this);this.cylinder3d=new J.g3d.CylinderRenderer(this)},"JV.Viewer,J.api.GenericPlatform");g(b,"addRenderer",function(a){switch(a){case 1073741880:null==
this.circle3d&&(this.circle3d=this.getRenderer("Circle"));break;case 553648143:null==this.hermite3d&&(this.hermite3d=this.getRenderer("Hermite"));case 1073742182:null==this.triangle3d&&(this.triangle3d=this.getRenderer("Triangle"),this.triangle3d.isOrthographic=!this.vwr.tm.perspectiveDepth)}},"~N");c(b,"getRenderer",function(a){a=J.api.Interface.getOption("g3d."+a+"Renderer",this.vwr,"render");if(null==a)throw new NullPointerException("Interface");a.set(this,this);return a},"~S");g(b,"setWindowParameters",
function(a,d,h){this.setWinParams(a,d,h);this.currentlyRendering&&this.endRendering()},"~N,~N,~B");g(b,"checkTranslucent",function(a){a&&(this.$haveTranslucentObjects=!0);return!this.twoPass||this.twoPass&&this.isPass2==a},"~B");g(b,"beginRendering",function(a,d,h,b){this.currentlyRendering&&this.endRendering();this.renderLow=b;if(this.windowWidth!=this.newWindowWidth||this.windowHeight!=this.newWindowHeight||this.newAntialiasing!=this.isFullSceneAntialiasingEnabled)this.windowWidth=this.newWindowWidth,
this.windowHeight=this.newWindowHeight,this.isFullSceneAntialiasingEnabled=this.newAntialiasing,this.releaseBuffers();this.setRotationMatrix(a);this.line3d.isOrthographic=!this.vwr.tm.perspectiveDepth;null!=this.triangle3d&&(this.triangle3d.isOrthographic=!this.vwr.tm.perspectiveDepth);this.antialiasEnabled=this.antialiasThisFrame=this.newAntialiasing;this.currentlyRendering=!0;if(null!=this.strings)for(a=Math.min(this.strings.length,this.stringCount);0<=--a;)this.strings[a]=null;this.stringCount=
0;this.twoPass=!0;this.isPass2=!1;this.colixCurrent=this.pass2Flag01=0;this.$haveTranslucentObjects=this.wasScreened=!1;this.pixel=this.pixel0;this.pixel.bgcolor=this.bgcolor;this.contrastColix=JU.C.getBgContrast(this.bgcolor);this.translucentCoverOnly=!d;null==this.pbuf&&(this.platform.allocateBuffers(this.windowWidth,this.windowHeight,this.antialiasThisFrame,h),this.pbuf=this.platform.pBuffer,this.zbuf=this.platform.zBuffer,this.aobuf=null,this.pixel0.setBuf(),null!=this.pixelT0&&this.pixelT0.setBuf(),
null!=this.pixelShaded&&this.pixelShaded.setBuf());this.setWidthHeight(this.antialiasThisFrame);null!=this.pixelScreened&&(this.pixelScreened.width=this.width);this.platform.clearBuffer();null!=this.backgroundImage&&this.plotImage(-2147483648,0,-2147483648,this.backgroundImage,null,0,0,0);this.textY=0},"JU.M3,~B,~B,~B");g(b,"setBackgroundTransparent",function(a){null!=this.platform&&this.platform.setBackgroundTransparent(a)},"~B");c(b,"releaseBuffers",function(){this.aobuf=this.zbufT=this.pbufT=this.zbuf=
this.pbuf=null;this.platform.releaseBuffers();this.line3d.clearLineCache()});g(b,"setPass2",function(a){if(!this.$haveTranslucentObjects||!this.currentlyRendering)return!1;this.isPass2=!0;this.pass2Flag01=1;this.colixCurrent=0;if(null==this.pbufT||this.antialias2!=a)this.platform.allocateTBuffers(a),this.pbufT=this.platform.pBufferT,this.zbufT=this.platform.zBufferT;this.antialias2=a;this.antialiasThisFrame&&!this.antialias2&&this.downsampleFullSceneAntialiasing(!0);this.platform.clearTBuffer();null==
this.pixelT0&&(this.pixelT0=new J.g3d.PixelatorT(this));null==this.pixel.p0?this.pixel=this.pixelT0:this.pixel.p0=this.pixelT0;return!0},"~B");g(b,"endRendering",function(){if(this.currentlyRendering){if(null!=this.pbuf){if(this.isPass2&&null!=this.pbufT)for(var a=this.pbufT.length;0<=--a;)this.pbuf[a]=J.g3d.Graphics3D.mergeBufferPixel(this.pbuf[a],this.pbufT[a],this.bgcolor);this.pixel===this.pixelShaded&&0==this.pixelShaded.zShadePower&&this.pixelShaded.showZBuffer();this.antialiasThisFrame&&this.downsampleFullSceneAntialiasing(!1)}this.platform.setBackgroundColor(this.bgcolor);
this.platform.notifyEndOfRendering();this.currentlyRendering=this.isPass2=!1}});b.mergeBufferPixel=c(b,"mergeBufferPixel",function(a,d,h){if(0==d||a==d)return a;0==a&&(a=h);h=a&16711935;a&=65280;var b=d&16711935,c=d&65280;switch(d>>24&15){case 0:h=b;a=c;break;case 1:h=(b<<2)+(b<<1)+b+h>>3&16711935;a=(c<<2)+ +(c<<1)+c+a>>3&65280;break;case 2:h=(b<<1)+b+h>>2&16711935;a=(c<<1)+c+a>>2&65280;break;case 3:h=(b<<2)+b+(h<<1)+h>>3&16711935;a=(c<<2)+c+(a<<1)+a>>3&65280;break;case 4:h=h+b>>1&16711935;a=a+c>>
1&65280;break;case 5:h=(b<<1)+b+(h<<2)+h>>3&16711935;a=(c<<1)+c+(a<<2)+a>>3&65280;break;case 6:h=(h<<1)+h+b>>2&16711935;a=(a<<1)+a+c>>2&65280;break;case 7:h=(h<<2)+(h<<1)+h+b>>3&16711935,a=(a<<2)+(a<<1)+a+c>>3&65280}return 4278190080|h|a},"~N,~N,~N");g(b,"getScreenImage",function(a){var d=this.platform.bufferedImage;a&&this.releaseBuffers();return d},"~B");g(b,"applyAnaglygh",function(a,d){switch(a){case J.c.STER.REDCYAN:for(var h=this.anaglyphLength;0<=--h;){var b=this.anaglyphChannelBytes[h]&255;
this.pbuf[h]=this.pbuf[h]&4294901760|b<<8|b}break;case J.c.STER.CUSTOM:for(var b=d[0],c=d[1]&16777215,h=this.anaglyphLength;0<=--h;){var f=this.anaglyphChannelBytes[h]&255,f=(f|(f|f<<8)<<8)&c;this.pbuf[h]=this.pbuf[h]&b|f}break;case J.c.STER.REDBLUE:for(h=this.anaglyphLength;0<=--h;)b=this.anaglyphChannelBytes[h]&255,this.pbuf[h]=this.pbuf[h]&4294901760|b;break;case J.c.STER.REDGREEN:for(h=this.anaglyphLength;0<=--h;)this.pbuf[h]=this.pbuf[h]&4294901760|(this.anaglyphChannelBytes[h]&255)<<8}},"J.c.STER,~A");
g(b,"snapshotAnaglyphChannelBytes",function(){if(this.currentlyRendering)throw new NullPointerException;this.anaglyphLength=this.windowWidth*this.windowHeight;if(null==this.anaglyphChannelBytes||this.anaglyphChannelBytes.length!=this.anaglyphLength)this.anaglyphChannelBytes=O(this.anaglyphLength,0);for(var a=this.anaglyphLength;0<=--a;)this.anaglyphChannelBytes[a]=this.pbuf[a]});g(b,"releaseScreenImage",function(){this.platform.clearScreenBufferThreaded()});g(b,"haveTranslucentObjects",function(){return this.$haveTranslucentObjects});
g(b,"setSlabAndZShade",function(a,d,h,b,c){this.setSlab(a);this.setDepth(d);h<b?(null==this.pixelShaded&&(this.pixelShaded=new J.g3d.PixelatorShaded(this)),this.pixel=this.pixelShaded.set(h,b,c)):this.pixel=this.pixel0},"~N,~N,~N,~N,~N");c(b,"downsampleFullSceneAntialiasing",function(a){var d=this.bgcolor;a&&(d+=255==(d&255)?-1:1);J.g3d.Graphics3D.downsample2d(this.pbuf,this.windowWidth,this.windowHeight,d);a&&(J.g3d.Graphics3D.downsample2dZ(this.pbuf,this.zbuf,this.windowWidth,this.windowHeight,
d),this.antialiasThisFrame=!1,this.setWidthHeight(!1))},"~B");b.downsample2d=c(b,"downsample2d",function(a,d,h,b){var c=d<<1;if(0!=b){b&=16777215;for(var f=a.length;0<=--f;)0==a[f]&&(a[f]=b)}for(var j=(b>>2&1061109567)<<2,j=j+((j&3233857728)>>6),k=0,l=0,f=h;0<=--f;l+=c)for(h=d;0<=--h;++k){var g=(a[l]>>2&1061109567)+(a[l++ +c]>>2&1061109567)+(a[l]>>2&1061109567)+(a[l++ +c]>>2&1061109567),g=g+((g&3233857728)>>6);g==j&&(g=b);a[k]=g&16777215|4278190080}},"~A,~N,~N,~N");b.downsample2dZ=c(b,"downsample2dZ",
function(a,d,h,b,c){for(var f=h<<1,j=0,k=0;0<=--b;k+=f)for(var l=h;0<=--l;++j,++k){var g=Math.min(d[k],d[k+f]),g=Math.min(g,d[++k]),g=Math.min(g,d[k+f]);2147483647!=g&&(g>>=1);d[j]=a[j]==c?2147483647:g}},"~A,~A,~N,~N,~N");c(b,"hasContent",function(){return this.platform.hasContent()});g(b,"setC",function(a){var d=JU.C.isColixLastAvailable(a);if(!d&&a==this.colixCurrent&&-1==this.currentShadeIndex)return!0;var h=a&30720;if(16384==h)return!1;this.renderLow&&(h=0);var b=0!=h,c=b&&30720==h;this.setScreened(c);
if(!this.checkTranslucent(b&&!c))return!1;this.isPass2?(this.translucencyMask=h<<13|16777215,this.translucencyLog=h>>11):this.translucencyLog=0;this.colixCurrent=a;d&&this.argbCurrent!=this.lastRawColor&&(0==this.argbCurrent&&(this.argbCurrent=4294967295),this.lastRawColor=this.argbCurrent,this.shader.setLastColix(this.argbCurrent,this.inGreyscaleMode));this.shadesCurrent=this.getShades(a);this.currentShadeIndex=-1;this.setColor(this.getColorArgbOrGray(a));return!0},"~N");c(b,"setScreened",function(a){this.wasScreened!=
a&&((this.wasScreened=a)?(null==this.pixelScreened&&(this.pixelScreened=new J.g3d.PixelatorScreened(this,this.pixel0)),null==this.pixel.p0?this.pixel=this.pixelScreened:this.pixel.p0=this.pixelScreened):null==this.pixel.p0||this.pixel===this.pixelScreened?this.pixel=this.isPass2?this.pixelT0:this.pixel0:this.pixel.p0=this.isPass2?this.pixelT0:this.pixel0);return this.pixel},"~B");g(b,"drawFilledCircle",function(a,d,h,b,c,f){if(!this.isClippedZ(f)){var j=v((h+1)/2),j=b<j||b+j>=this.width||c<j||c+j>=
this.height;if(!j||!this.isClippedXY(h,b,c))0!=a&&this.setC(a)&&(j?this.isClippedXY(h,b,c)||this.circle3d.plotCircleCenteredClipped(b,c,f,h):this.circle3d.plotCircleCenteredUnclipped(b,c,f,h)),0!=d&&this.setC(d)&&(j?this.circle3d.plotFilledCircleCenteredClipped(b,c,f,h):this.circle3d.plotFilledCircleCenteredUnclipped(b,c,f,h))}},"~N,~N,~N,~N,~N,~N");g(b,"volumeRender4",function(a,d,h,b){if(1==a)this.plotPixelClippedArgb(this.argbCurrent,d,h,b,this.width,this.zbuf,this.pixel);else if(!this.isClippedZ(b)){var c=
v((a+1)/2),c=d<c||d+c>=this.width||h<c||h+c>=this.height;if(!c||!this.isClippedXY(a,d,h))c?this.circle3d.plotFilledCircleCenteredClipped(d,h,b,a):this.circle3d.plotFilledCircleCenteredUnclipped(d,h,b,a)}},"~N,~N,~N,~N");g(b,"fillSphereXYZ",function(a,d,h,b){switch(a){case 1:this.plotPixelClippedArgb(this.argbCurrent,d,h,b,this.width,this.zbuf,this.pixel);return;case 0:return}a<=(this.antialiasThisFrame?2E3:1E3)&&this.sphere3d.render(this.shadesCurrent,a,d,h,b,null,null,null,-1,null)},"~N,~N,~N,~N");
g(b,"volumeRender",function(a){a?(this.saveAmbient=this.getAmbientPercent(),this.saveDiffuse=this.getDiffusePercent(),this.setAmbientPercent(100),this.setDiffusePercent(0),this.addRenderer(1073741880)):(this.setAmbientPercent(this.saveAmbient),this.setDiffusePercent(this.saveDiffuse))},"~B");g(b,"fillSphereI",function(a,d){this.fillSphereXYZ(a,d.x,d.y,d.z)},"~N,JU.P3i");g(b,"fillSphereBits",function(a,d){this.fillSphereXYZ(a,Math.round(d.x),Math.round(d.y),Math.round(d.z))},"~N,JU.P3");g(b,"fillEllipsoid",
function(a,d,h,b,c,f,j,k,l,g,m){switch(f){case 1:this.plotPixelClippedArgb(this.argbCurrent,h,b,c,this.width,this.zbuf,this.pixel);return;case 0:return}f<=(this.antialiasThisFrame?2E3:1E3)&&this.sphere3d.render(this.shadesCurrent,f,h,b,c,j,k,l,g,m)},"JU.P3,~A,~N,~N,~N,~N,JU.M3,~A,JU.M4,~N,~A");g(b,"drawRect",function(a,d,h,b,c,f){if(!(0!=b&&this.isClippedZ(b))){b=c-1;f-=1;c=a+b;var j=d+f;0<=d&&d<this.height&&this.drawHLine(a,d,h,b);0<=j&&j<this.height&&this.drawHLine(a,j,h,b);0<=a&&a<this.width&&
this.drawVLine(a,d,h,f);0<=c&&c<this.width&&this.drawVLine(c,d,h,f)}},"~N,~N,~N,~N,~N,~N");c(b,"drawHLine",function(a,d,h,b){0>b&&(a+=b,b=-b);0>a&&(b+=a,a=0);a+b>=this.width&&(b=this.width-1-a);var c=this.pixel,f=this.argbCurrent;a+=this.width*d;for(d=0;d<=b;d++)h<this.zbuf[a]&&c.addPixel(a,h,f),a++},"~N,~N,~N,~N");c(b,"drawVLine",function(a,d,h,b){0>b&&(d+=b,b=-b);0>d&&(b+=d,d=0);d+b>=this.height&&(b=this.height-1-d);a+=this.width*d;d=this.pixel;for(var c=this.argbCurrent,f=0;f<=b;f++)h<this.zbuf[a]&&
d.addPixel(a,h,c),a+=this.width},"~N,~N,~N,~N");g(b,"fillTextRect",function(a,d,h,b,c,f){if(!this.isClippedZ(b)){b=this.width;if(0>a){c+=a;if(0>=c)return;a=0}if(a+c>b&&(c=b-a,0>=c))return;if(0>d){f+=d;if(0>=f)return;d=0}d+f>this.height&&(f=this.height-d);var j=this.argbCurrent;this.isAntialiased()&&(j=J.g3d.Graphics3D.fixTextImageRGB(j));for(var k=this.zbuf,l=this.pixel;0<=--f;)this.plotPixelsUnclippedCount(j,c,a,d++,h,b,k,l)}},"~N,~N,~N,~N,~N,~N");g(b,"drawString",function(a,d,h,b,c,f,j){this.currentShadeIndex=
0;null!=a&&(this.isClippedZ(f)||this.drawStringNoSlab(a,d,h,b,c,j))},"~S,JU.Font,~N,~N,~N,~N,~N");g(b,"drawStringNoSlab",function(a,d,h,b,c,f){if(null!=a){null==this.strings&&(this.strings=Array(10));this.stringCount==this.strings.length&&(this.strings=JU.AU.doubleLength(this.strings));var j=new J.g3d.TextString;j.setText(a,null==d?this.currentFont:this.currentFont=d,this.argbCurrent,JU.C.isColixTranslucent(f)?this.getColorArgbOrGray(f)&16777215|(f&30720)<<13:0,h,b,c);this.strings[this.stringCount++]=
j}},"~S,JU.Font,~N,~N,~N,~N");g(b,"renderAllStrings",function(a){if(null!=this.strings){2<=this.stringCount&&(null==J.g3d.Graphics3D.sort&&(J.g3d.Graphics3D.sort=new J.g3d.TextString),java.util.Arrays.sort(this.strings,J.g3d.Graphics3D.sort));for(var d=0;d<this.stringCount;d++){var h=this.strings[d];this.plotText(h.x,h.y,h.z,h.argb,h.bgargb,h.text,h.font,a)}this.strings=null;this.stringCount=0}},"~O");g(b,"plotText",function(a,d,h,b,c,f,j,k){J.g3d.TextRenderer.plot(a,d,h,b,c,f,j,this,k,this.antialiasThisFrame)},
"~N,~N,~N,~N,~N,~S,JU.Font,J.api.JmolRendererInterface");g(b,"drawImage",function(a,d,h,b,c,f,j,k){null!=a&&(0<j&&0<k&&!this.isClippedZ(c))&&this.plotImage(d,h,b,a,null,f,j,k)},"~O,~N,~N,~N,~N,~N,~N,~N");g(b,"plotImage",function(a,d,h,b,c,f,j,k){this.setC(f);this.isPass2||(this.translucencyMask=-1);0==f&&(this.argbCurrent=0);var l=-2147483648==a;f=l?this.bgcolor:this.argbCurrent;l&&(a=0,h=2147483646,j=this.width,k=this.height);if(!(0>=a+j||a>=this.width||0>=d+k||d>=this.height))if(b=this.apiPlatform.drawImageToBuffer(null,
this.platform.offscreenImage,b,j,k,l?f:0),null!=b){var l=this.zbuf,g=this.width,m=this.pixel,p=this.height,y=this.translucencyLog;if(null==c&&0<=a&&a+j<=g&&0<=d&&d+k<=p){var A=0,H=0;for(a=d*g+a;A<k;A++,a+=g-j)for(var M=0;M<j;M++,H++,a++)if(h<l[a]){var n=b[H];-16777216==(n&4278190080)&&m.addPixel(a,h,n)}}else{null==c&&(c=this);for(H=A=0;A<k;A++)for(M=0;M<j;M++)n=b[H++],-16777216==(n&4278190080)&&c.plotImagePixel(n,a+M,d+A,h,8,f,g,p,l,m,y)}}},"~N,~N,~N,~O,J.api.JmolRendererInterface,~N,~N,~N");g(b,
"setFont",function(a){this.currentFont=a},"JU.Font");g(b,"drawPixel",function(a,d,h){this.plotPixelClippedArgb(this.argbCurrent,a,d,h,this.width,this.zbuf,this.pixel)},"~N,~N,~N");g(b,"drawPoints",function(a,d,h){if(1<h)for(var b=0.8*h*h,c=-h;c<h;c++)for(var f=-h;f<h;f++)c*c+f*f>b||(this.plotPoints(a,d,c,f),this.plotPoints(a,d,c,f));else this.plotPoints(a,d,0,0)},"~N,~A,~N");g(b,"drawDashedLineBits",function(a,d,h,b){this.isAntialiased()&&(a+=a,d+=d);this.setScreeni(h,this.sA);this.setScreeni(b,this.sB);
this.drawLineABBits(a,d,!0)},"~N,~N,JU.P3,JU.P3");c(b,"drawLineABBits",function(a,d,h){this.line3d.plotLineBits(this.argbCurrent,this.argbCurrent,this.sA,this.sB,a,d,h);Math.abs(this.sA.x-this.sB.x)<Math.abs(this.sA.y-this.sB.y)?(this.sA.x+=1,this.sB.x+=1):(this.sA.y+=1,this.sB.y+=1);this.line3d.plotLineBits(this.argbCurrent,this.argbCurrent,this.sA,this.sB,a,d,h)},"~N,~N,~B");c(b,"setScreeni",function(a,d){d.x=Math.round(a.x);d.y=Math.round(a.y);d.z=Math.round(a.z)},"JU.P3,JU.P3i");g(b,"drawLineXYZ",
function(a,d,h,b,c,f){this.line3d.plotLineOld(this.argbCurrent,this.argbCurrent,a,d,h,b,c,f)},"~N,~N,~N,~N,~N,~N");g(b,"drawLine",function(a,d,h,b,c,f,j,k){this.setC(a)||(a=0);var l=this.argbCurrent;this.setC(d)||(d=0);(0!=a||0!=d)&&this.line3d.plotLineOld(l,this.argbCurrent,h,b,c,f,j,k)},"~N,~N,~N,~N,~N,~N,~N,~N");g(b,"drawLineBits",function(a,d,h,b){this.setC(a)||(a=0);var c=this.argbCurrent;this.setC(d)||(d=0);if(0!=a||0!=d)this.setScreeni(h,this.sA),this.setScreeni(b,this.sB),this.line3d.plotLineBits(c,
this.argbCurrent,this.sA,this.sB,0,0,!1)},"~N,~N,JU.P3,JU.P3");g(b,"drawLinePixels",function(a,d,h,b){this.sA.setT(a);this.sB.setT(d);this.sA.z=this.sB.z=h;a=this.slab;-2147483648==b&&(this.slab=0);this.drawLineABBits(0,0,!1);this.slab=a},"JU.P3i,JU.P3i,~N,~N");g(b,"drawLineAB",function(a,d){this.setScreeni(a,this.sA);this.setScreeni(d,this.sB);this.line3d.plotLineBits(this.argbCurrent,this.argbCurrent,this.sA,this.sB,0,0,!1)},"JU.P3,JU.P3");g(b,"fillCylinderXYZ",function(a,d,h,b,c,f,j,k,l,g){if(!(b>
this.ht3)){var m=0;this.currentShadeIndex=0;this.setC(d)||(d=0);this.wasScreened&&(m=2);this.setC(a)||(a=0);this.wasScreened&&(m+=1);0==a&&0==d||this.cylinder3d.renderOld(a,d,m,h,b,c,f,j,k,l,g)}},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");g(b,"fillCylinderScreen3I",function(a,d,h,b){d<=this.ht3&&this.cylinder3d.renderOld(this.colixCurrent,this.colixCurrent,0,a,d,F(h.x),F(h.y),F(h.z),F(b.x),F(b.y),F(b.z))},"~N,~N,JU.P3,JU.P3,JU.P3,JU.P3,~N");g(b,"fillCylinder",function(a,d,h,b){d<=this.ht3&&this.cylinder3d.renderOld(this.colixCurrent,
this.colixCurrent,0,a,d,h.x,h.y,h.z,b.x,b.y,b.z)},"~N,~N,JU.P3i,JU.P3i");g(b,"fillCylinderBits",function(a,d,h,b){d<=this.ht3&&(1!=h.z&&1!=b.z)&&(0==d||1==d?(this.setScreeni(h,this.sA),this.setScreeni(b,this.sB),this.line3d.plotLineBits(this.getColorArgbOrGray(this.colixCurrent),this.getColorArgbOrGray(this.colixCurrent),this.sA,this.sB,0,0,!1)):this.cylinder3d.renderBitsFloat(this.colixCurrent,this.colixCurrent,0,a,d,h,b))},"~N,~N,JU.P3,JU.P3");g(b,"fillCylinderBits2",function(a,d,h,b,c,f){if(!(b>
this.ht3)){var j=0;this.currentShadeIndex=0;this.setC(d)||(d=0);this.wasScreened&&(j=2);this.setC(a)||(a=0);this.wasScreened&&(j+=1);0==a&&0==d||(this.setScreeni(c,this.sA),this.setScreeni(f,this.sB),this.cylinder3d.renderBits(a,d,j,h,b,this.sA,this.sB))}},"~N,~N,~N,~N,JU.P3,JU.P3");g(b,"fillConeScreen3f",function(a,d,h,b,c){d<=this.ht3&&this.cylinder3d.renderConeOld(this.colixCurrent,a,d,h.x,h.y,h.z,b.x,b.y,b.z,!0,c)},"~N,~N,JU.P3,JU.P3,~B");g(b,"drawHermite4",function(a,d,h,b,c){this.hermite3d.renderHermiteRope(!1,
a,0,0,0,d,h,b,c)},"~N,JU.P3,JU.P3,JU.P3,JU.P3");g(b,"drawHermite7",function(a,d,h,b,c,f,j,k,l,g,m,p,y){if(0==y)this.hermite3d.renderHermiteRibbon(a,d,h,b,c,f,j,k,l,g,m,p,0);else{this.hermite3d.renderHermiteRibbon(a,d,h,b,c,f,j,k,l,g,m,p,1);var A=this.colixCurrent;this.setC(y);this.hermite3d.renderHermiteRibbon(a,d,h,b,c,f,j,k,l,g,m,p,-1);this.setC(A)}},"~B,~B,~N,JU.P3,JU.P3,JU.P3,JU.P3,JU.P3,JU.P3,JU.P3,JU.P3,~N,~N");g(b,"fillHermite",function(a,d,h,b,c,f,j,k){this.hermite3d.renderHermiteRope(!0,
a,d,h,b,c,f,j,k)},"~N,~N,~N,~N,JU.P3,JU.P3,JU.P3,JU.P3");g(b,"drawTriangle3C",function(a,d,h,b,c,f,j){1==(j&1)&&this.drawLine(d,b,a.x,a.y,a.z,h.x,h.y,h.z);2==(j&2)&&this.drawLine(b,f,h.x,h.y,h.z,c.x,c.y,c.z);4==(j&4)&&this.drawLine(d,f,a.x,a.y,a.z,c.x,c.y,c.z)},"JU.P3i,~N,JU.P3i,~N,JU.P3i,~N,~N");g(b,"fillTriangleTwoSided",function(a,d,h,b){this.setColorNoisy(this.getShadeIndex(a));this.fillTriangleP3f(d,h,b,!1)},"~N,JU.P3,JU.P3,JU.P3");c(b,"fillTriangleP3f",function(a,d,h,b){this.setScreeni(a,this.sA);
this.setScreeni(d,this.sB);this.setScreeni(h,this.sC);this.triangle3d.fillTriangle(this.sA,this.sB,this.sC,b)},"JU.P3,JU.P3,JU.P3,~B");g(b,"fillTriangle3f",function(a,d,h,b){var c=this.getShadeIndexP3(a,d,h,b);0>c||(b?this.setColorNoisy(c):this.setColor(this.shadesCurrent[c]),this.fillTriangleP3f(a,d,h,!1))},"JU.P3,JU.P3,JU.P3,~B");g(b,"fillTriangle3i",function(a,d,h,b,c,f,j){j&&(b=this.vectorAB,b.set(d.x-a.x,d.y-a.y,d.z-a.z),null==h?b=this.shader.getShadeIndex(-b.x,-b.y,b.z):(this.vectorAC.set(h.x-
a.x,h.y-a.y,h.z-a.z),b.cross(b,this.vectorAC),b=0<=b.z?this.shader.getShadeIndex(-b.x,-b.y,b.z):this.shader.getShadeIndex(b.x,b.y,-b.z)),56<b&&(b=56),this.setColorNoisy(b));this.fillTriangleP3f(a,d,h,!1)},"JU.P3,JU.P3,JU.P3,JU.T3,JU.T3,JU.T3,~B");g(b,"fillTriangle3CN",function(a,d,h,b,c,f,j,k,l){this.triangle3d.fillTriangle(a,b,j,this.checkGouraud(d,c,k,h,f,l))},"JU.P3i,~N,~N,JU.P3i,~N,~N,JU.P3i,~N,~N");g(b,"fillTriangle3CNBits",function(a,d,h,b,c,f,j,k,l){this.fillTriangleP3f(a,b,j,this.checkGouraud(d,
c,k,h,f,l))},"JU.P3,~N,~N,JU.P3,~N,~N,JU.P3,~N,~N,~B");c(b,"checkGouraud",function(a,d,h,b,c,f){if(!this.isPass2&&b==c&&b==f&&a==d&&a==h){d=this.getShadeIndex(b);if(a!=this.colixCurrent||this.currentShadeIndex!=d)this.currentShadeIndex=-1,this.setC(a),this.setColorNoisy(d);return!1}this.setTriangleTranslucency(a,d,h);this.triangle3d.setGouraud(this.getShades(a)[this.getShadeIndex(b)],this.getShades(d)[this.getShadeIndex(c)],this.getShades(h)[this.getShadeIndex(f)]);return!0},"~N,~N,~N,~N,~N,~N");
c(b,"getShadeIndex",function(a){return-1E4==a||9999==a?J.g3d.Graphics3D.nullShadeIndex:0>a?this.shadeIndexes2Sided[~a]:this.shadeIndexes[a]},"~N");c(b,"setTriangleTranslucency",function(a,d,h){this.isPass2&&(a&=14336,d&=14336,h&=14336,this.translucencyMask=(JU.GData.roundInt(v((a+d+h)/3))&30720)<<13|16777215)},"~N,~N,~N");g(b,"fillQuadrilateral",function(a,d,h,b,c){c=this.getShadeIndexP3(a,d,h,c);0>c||(this.setColorNoisy(c),this.fillTriangleP3f(a,d,h,!1),this.fillTriangleP3f(a,h,b,!1))},"JU.P3,JU.P3,JU.P3,JU.P3,~B");
g(b,"drawSurface",function(){},"JU.MeshSurface,~N");g(b,"plotPixelClippedP3i",function(a){this.plotPixelClippedArgb(this.argbCurrent,a.x,a.y,a.z,this.width,this.zbuf,this.pixel)},"JU.P3i");c(b,"plotPixelClippedArgb",function(a,d,h,b,c,f,j){this.isClipped3(d,h,b)||(d=h*c+d,b<f[d]&&j.addPixel(d,b,a))},"~N,~N,~N,~N,~N,~A,J.g3d.Pixelator");c(b,"plotPixelUnclipped",function(a,d,h,b,c,f,j){d=h*c+d;b<f[d]&&j.addPixel(d,b,a)},"~N,~N,~N,~N,~N,~A,J.g3d.Pixelator");c(b,"plotImagePixel",function(a,d,h,b,c,f,
j,k,l,g,m){0>d||(d>=j||0>h||h>=k)||g.addImagePixel(c,m,h*j+d,b,a,f)},"~N,~N,~N,~N,~N,~N,~N,~N,~A,~O,~N");c(b,"plotPixelsClippedRaster",function(a,d,h,b,c,f,j){var k,l;if(!(0>=a||0>h||h>=this.height||d>=this.width||b<(l=this.slab)&&c<l||b>(k=this.depth)&&c>k)){var g=this.zbuf,m=(d<<16)+(h<<1)^858993459,p=(b<<10)+512;b=c-b;c=v(a/2);b=JU.GData.roundInt(v(((b<<10)+(0<=b?c:-c))/a));if(0>d){d=-d;p+=b*d;a-=d;if(0>=a)return;d=0}a+d>this.width&&(a=this.width-d);d=h*this.width+d;h=this.pixel;if(null==f){f=
this.argbNoisyDn;c=this.argbNoisyUp;for(var y=this.argbCurrent;0<=--a;){j=p>>10;if(j>=l&&j<=k&&j<g[d]){var m=(m<<16)+(m<<1)+m&2147483647,A=m>>16&7;h.addPixel(d,j,0==A?f:1==A?c:y)}++d;p+=b}}else{m=f.r<<8;c=v((j.r-f.r<<8)/a);y=f.g;A=v((j.g-y)/a);f=f.b;for(var H=v((j.b-f)/a);0<=--a;)j=p>>10,j>=l&&(j<=k&&j<g[d])&&h.addPixel(d,j,4278190080|m&16711680|y&65280|f>>8&255),++d,p+=b,m+=c,y+=A,f+=H}}},"~N,~N,~N,~N,~N,JU.Rgb16,JU.Rgb16");c(b,"plotPixelsUnclippedRaster",function(a,d,h,b,c,f,j){if(!(0>=a)){var k=
((d<<16)+(h<<1)^858993459)&2147483647,l=(b<<10)+512;b=c-b;c=v(a/2);b=JU.GData.roundInt(v(((b<<10)+(0<=b?c:-c))/a));d=h*this.width+d;h=this.zbuf;c=this.pixel;if(null==f){f=this.argbNoisyDn;for(var g=this.argbNoisyUp,m=this.argbCurrent;0<=--a;){j=l>>10;if(j<h[d]){var k=(k<<16)+(k<<1)+k&2147483647,p=k>>16&7;c.addPixel(d,j,0==p?f:1==p?g:m)}++d;l+=b}}else{k=f.r<<8;g=JU.GData.roundInt(v((j.r-f.r<<8)/a));m=f.g;p=JU.GData.roundInt(v((j.g-m)/a));f=f.b;for(var y=JU.GData.roundInt(v((j.b-f)/a));0<=--a;)j=l>>
10,j<h[d]&&c.addPixel(d,j,4278190080|k&16711680|m&65280|f>>8&255),++d,l+=b,k+=g,m+=p,f+=y}}},"~N,~N,~N,~N,~N,JU.Rgb16,JU.Rgb16");c(b,"plotPixelsClippedRasterBits",function(a,d,h,b,c,f,j,k,l){var g,m;if(!(0>=a||0>h||h>=this.height||d>=this.width||b<(m=this.slab)&&c<m||b>(g=this.depth)&&c>g)){b=this.zbuf;var p=(d<<16)+(h<<1)^858993459;if(0>d){a-=-d;if(0>=a)return;d=0}a+d>this.width&&(a=this.width-d);h=h*this.width+d;c=this.pixel;if(null==f){f=this.argbNoisyDn;for(var y=this.argbNoisyUp,A=this.argbCurrent;0<=
--a;){j=this.line3d.getZCurrent(k,l,d++);if(j>=m&&j<=g&&j<b[h]){var p=(p<<16)+(p<<1)+p&2147483647,H=p>>16&7;c.addPixel(h,j,2>H?f:6>H?y:A)}++h}}else{p=f.r<<8;y=v((j.r-f.r<<8)/a);A=f.g;H=v((j.g-A)/a);f=f.b;for(var M=v((j.b-f)/a);0<=--a;)j=this.line3d.getZCurrent(k,l,d++),j>=m&&(j<=g&&j<b[h])&&c.addPixel(h,j,4278190080|p&16711680|A&65280|f>>8&255),++h,p+=y,A+=H,f+=M}}},"~N,~N,~N,~N,~N,JU.Rgb16,JU.Rgb16,~N,~N");c(b,"plotPixelsUnclippedRasterBits",function(a,d,h,b,c,f,j){if(!(0>=a)){var k=((d<<16)+(h<<
1)^858993459)&2147483647;h=h*this.width+d;var l=this.zbuf,g=this.pixel;if(null==b)for(var m=this.argbNoisyDn,p=this.argbNoisyUp,y=this.argbCurrent;0<=--a;)c=this.line3d.getZCurrent(f,j,d++),c<l[h]&&(k=(k<<16)+(k<<1)+k&2147483647,b=k>>16&7,g.addPixel(h,c,0==b?m:1==b?p:y)),++h;else{k=b.r<<8;m=JU.GData.roundInt(v((c.r-b.r<<8)/a));p=b.g;y=JU.GData.roundInt(v((c.g-p)/a));b=b.b;for(var A=JU.GData.roundInt(v((c.b-b)/a));0<=--a;)c=this.line3d.getZCurrent(f,j,d++),c<l[h]&&g.addPixel(h,c,4278190080|k&16711680|
p&65280|b>>8&255),++h,k+=m,p+=y,b+=A}}},"~N,~N,~N,JU.Rgb16,JU.Rgb16,~N,~N");c(b,"plotPixelsUnclippedCount",function(a,d,h,b,c,f,j,k){for(h=b*f+h;0<=--d;)c<j[h]&&k.addPixel(h,c,a),++h},"~N,~N,~N,~N,~N,~N,~A,J.g3d.Pixelator");c(b,"plotPoints",function(a,d,h,b){var c=this.pixel,f=this.argbCurrent,j=this.zbuf,k=this.width,l=this.antialiasThisFrame;for(a*=3;0<a;){var g=d[--a],m=d[--a]+b,p=d[--a]+h;if(!this.isClipped3(p,m,g)){var y=m*k+p++;g<j[y]&&c.addPixel(y,g,f);l&&(y=m*k+p,!this.isClipped3(p,m,g)&&
g<j[y]&&c.addPixel(y,g,f),y=++m*k+p,!this.isClipped3(p,m,g)&&g<j[y]&&c.addPixel(y,g,f),y=m*k+--p,!this.isClipped3(p,m,g)&&g<j[y]&&c.addPixel(y,g,f))}}},"~N,~A,~N,~N");c(b,"setColorNoisy",function(a){this.currentShadeIndex=a;this.argbCurrent=this.shadesCurrent[a];this.argbNoisyUp=this.shadesCurrent[63>a?a+1:63];this.argbNoisyDn=this.shadesCurrent[0<a?a-1:0]},"~N");c(b,"getShadeIndexP3",function(a,d,h,b){this.vectorAB.sub2(d,a);this.vectorAC.sub2(h,a);a=this.vectorNormal;a.cross(this.vectorAB,this.vectorAC);
return 0>a.z?this.shader.getShadeIndex(a.x,a.y,-a.z):b?-1:this.shader.getShadeIndex(-a.x,-a.y,a.z)},"JU.P3,JU.P3,JU.P3,~B");g(b,"renderBackground",function(a){null!=this.backgroundImage&&this.plotImage(-2147483648,0,-2147483648,this.backgroundImage,a,0,0,0)},"J.api.JmolRendererInterface");g(b,"drawAtom",function(a){this.fillSphereXYZ(a.sD,a.sX,a.sY,a.sZ)},"JM.Atom,~N");g(b,"getExportType",function(){return 0});g(b,"getExportName",function(){return null});c(b,"canDoTriangles",function(){return!0});
c(b,"isCartesianExport",function(){return!1});g(b,"initializeExporter",function(){return null},"JV.Viewer,~N,JU.GData,java.util.Map");g(b,"finalizeOutput",function(){return null});g(b,"drawBond",function(){},"JU.P3,JU.P3,~N,~N,~N,~N,~N");g(b,"drawEllipse",function(){return!1},"JU.P3,JU.P3,JU.P3,~B,~B");c(b,"getPrivateKey",function(){return 0});g(b,"clearFontCache",function(){J.g3d.TextRenderer.clearFontCache()});c(b,"setRotationMatrix",function(a){for(var d=JU.Normix.getVertexVectors(),h=JU.GData.normixCount;0<=
--h;){var b=this.transformedVectors[h];a.rotate2(d[h],b);this.shadeIndexes[h]=this.shader.getShadeB(b.x,-b.y,b.z);this.shadeIndexes2Sided[h]=0<=b.z?this.shadeIndexes[h]:this.shader.getShadeB(-b.x,b.y,-b.z)}},"JU.M3");g(b,"renderCrossHairs",function(a,d,h,b,c){d=this.isAntialiased();this.setC(0>c?10:100<c?11:23);c=Math.max(Math.min(this.width,Math.round(b.x)),0);h=Math.max(Math.min(this.height,Math.round(b.y)),0);var f=Math.round(b.z)+1,j=d?8:4,k=d?20:10;d=d?2:1;this.drawRect(c-j,h,f,0,k,d);this.drawRect(c,
h-j,f,0,d,k);this.drawRect(c-j,h-j,f,0,k,k);j=k;k>>=1;this.setC(a[1]<b.x?21:11);this.drawRect(c-j,h,f,0,k,d);this.setC(a[0]>b.x?21:11);this.drawRect(c+k,h,f,0,k,d);this.setC(a[3]<b.y?21:11);this.drawRect(c,h-j,f,0,d,k);this.setC(a[2]>b.y?21:11);this.drawRect(c,h+k,f,0,d,k)},"~A,~N,~N,JU.P3,~N");g(b,"initializeOutput",function(){return!1},"JV.Viewer,~N,java.util.Map");b.fixTextImageRGB=c(b,"fixTextImageRGB",function(a){return 0==(a&12632256)?a|263172:a},"~N");b.sort=null;b.nullShadeIndex=50});n("J.g3d");
z(["J.g3d.PrecisionRenderer","java.util.Hashtable"],"J.g3d.LineRenderer",["JU.BS"],function(){var b=w(function(){this.lineBits=this.shader=this.g3d=null;this.slope=0;this.lineTypeX=!1;this.nBits=0;this.slopeKey=this.lineCache=null;this.z2t=this.y2t=this.x2t=this.z1t=this.y1t=this.x1t=0;q(this,arguments)},J.g3d,"LineRenderer",J.g3d.PrecisionRenderer);N(b,function(){this.lineCache=new java.util.Hashtable});x(b,function(a){I(this,J.g3d.LineRenderer,[]);this.g3d=a;this.shader=a.shader},"J.g3d.Graphics3D");
c(b,"setLineBits",function(a,d){this.slope=0!=a?d/a:0<=d?3.4028235E38:-3.4028235E38;this.nBits=(this.lineTypeX=1>=this.slope&&-1<=this.slope)?this.g3d.width:this.g3d.height;this.slopeKey=Float.$valueOf(this.slope);if(this.lineCache.containsKey(this.slopeKey))this.lineBits=this.lineCache.get(this.slopeKey);else{this.lineBits=JU.BS.newN(this.nBits);d=Math.abs(d);a=Math.abs(a);if(d>a){var h=a;a=d;d=h}for(var h=0,b=a+a,c=d+d,f=0;f<this.nBits;f++)h+=c,h>a&&(this.lineBits.set(f),h-=b);this.lineCache.put(this.slopeKey,
this.lineBits)}},"~N,~N");c(b,"clearLineCache",function(){this.lineCache.clear()});c(b,"plotLineOld",function(a,d,h,b,c,f,j,k){this.x1t=h;this.x2t=f;this.y1t=b;this.y2t=j;this.z1t=c;this.z2t=k;var l=!0;switch(this.getTrimmedLineImpl()){case 0:l=!1;break;case 2:return}this.plotLineClippedOld(a,d,h,b,c,f-h,j-b,k-c,l,0,0)},"~N,~N,~N,~N,~N,~N,~N,~N");c(b,"plotLineDeltaOld",function(a,d,h,b,c,f,j,k,l){this.x1t=h;this.x2t=h+f;this.y1t=b;this.y2t=b+j;this.z1t=c;this.z2t=c+k;if(l)switch(this.getTrimmedLineImpl()){case 2:return;
case 0:l=!1}this.plotLineClippedOld(a,d,h,b,c,f,j,k,l,0,0)},"~N,~N,~N,~N,~N,~N,~N,~N,~B");c(b,"plotLineDeltaAOld",function(a,d,h,b,c,f,j,k,l,g,m){this.x1t=c;this.x2t=c+k;this.y1t=f;this.y2t=f+l;this.z1t=j;this.z2t=j+g;if(m)switch(this.getTrimmedLineImpl()){case 2:return;case 0:m=!1}var p=this.g3d.zbuf,y=this.g3d.width,A=0,H=f*y+c,M=this.g3d.bufferSize,n=63>b?b+1:b,q=0<b?b-1:b,w=a[n],u=a[q],B=d[b],n=d[n];d=d[q];a=a[b];b=this.g3d.pixel;0!=h&&(b=this.g3d.setScreened(1==(h&1)),this.g3d.currentShadeIndex=
0);0!=a&&(!m&&0<=H&&H<M&&j<p[H])&&b.addPixel(H,j,a);if(!(0==k&&0==l)){m=1;q=y;c+=k;var x=f+l;0>k&&(k=-k,m=-1);0>l&&(l=-l,q=-y);y=k+k;f=l+l;j<<=10;if(l<=k){var z=k-1;0>g&&(z=-z);g=v(((g<<10)+z)/k);l=0;z=Math.abs(c-this.x2t)-1;c=Math.abs(c-this.x1t)-1;for(var x=k-1,C=v(x/2);--x>=z;){if(x==C){a=B;if(0==a)break;w=n;u=d;0!=h%3&&(b=this.g3d.setScreened(2==(h&2)),this.g3d.currentShadeIndex=0)}H+=m;j+=g;l+=f;l>k&&(H+=q,l-=y);if(0!=a&&x<c&&0<=H&&H<M&&2147483647>A){var E=j>>10;if(E<p[H]){var D=this.shader.nextRandom8Bit();
b.addPixel(H,E,85>D?u:170<D?w:a)}}A=(A+1)%1}}else{z=l-1;0>g&&(z=-z);g=v(((g<<10)+z)/l);k=0;z=Math.abs(x-this.y2t)-1;c=Math.abs(x-this.y1t)-1;x=l-1;for(C=v(x/2);--x>=z;){if(x==C){a=B;if(0==a)break;w=n;u=d;0!=h%3&&(b=this.g3d.setScreened(2==(h&2)),this.g3d.currentShadeIndex=0)}H+=q;j+=g;k+=y;k>l&&(H+=m,k-=f);0!=a&&(x<c&&0<=H&&H<M&&2147483647>A)&&(E=j>>10,E<p[H]&&(D=this.g3d.shader.nextRandom8Bit(),b.addPixel(H,E,85>D?u:170<D?w:a)));A=(A+1)%1}}}},"~A,~A,~N,~N,~N,~N,~N,~N,~N,~N,~B");c(b,"plotLineDeltaABitsFloat",
function(a,d,h,b,c,f,j){var k=Math.round(b.x),l=Math.round(b.y),g=Math.round(b.z),m=Math.round(c.x),p=Math.round(c.y),y=Math.round(c.z),A=m-k,H=p-l;this.x1t=k;this.x2t=m;this.y1t=l;this.y2t=p;this.z1t=g;this.z2t=y;if(!(j&&2==this.getTrimmedLineImpl())){j=this.g3d.zbuf;var M=this.g3d.width,m=0,y=63>h?h+1:h,p=0<h?h-1:h,n=a[h],q=a[y],w=a[p];h=d[h];a=d[y];d=d[p];var p=l*M+k,y=this.g3d.bufferSize,u,x,B,z;this.lineTypeX?(u=k,x=this.x1t,B=this.x2t,k+=v(A/2),z=l=0<=A?1:-1,A=0<=H?M:-M,this.setRastABFloat(b.x,
b.z,c.x,c.z)):(u=l,x=this.y1t,B=this.y2t,k=l+v(H/2),l=0<=H?1:-1,z=0<=H?M:-M,A=0<=A?1:-1,this.setRastABFloat(b.y,b.z,c.y,c.z));b=g;c=n;g=q;H=w;q=!1;w=this.g3d.pixel;0!=f&&(w=this.g3d.setScreened(1==(f&1)),this.g3d.currentShadeIndex=0);for(n=u;;n+=l,u+=l){n==x&&(q=!0);if(n==k){c=h;if(0==c)break;g=a;H=d;0!=f%3&&(w=this.g3d.setScreened(2==(f&2)),this.g3d.currentShadeIndex=0)}0!=c&&(q&&0<=p&&p<y&&2147483647>m)&&(b=this.getZCurrent(this.a,this.b,n),b<j[p]&&(M=this.shader.nextRandom8Bit(),w.addPixel(p,F(b),
85>M?H:170<M?g:c)));if(n==B)break;m=(m+1)%1;for(p+=z;0>u;)u+=this.nBits;this.lineBits.get(u%this.nBits)&&(p+=A)}}},"~A,~A,~N,JU.P3,JU.P3,~N,~B");c(b,"plotLineDeltaABitsInt",function(a,d,h,b,c,f,j){var k=b.x,l=b.y,g=b.z,m=c.x,p=c.y,y=c.z,A=m-k,H=p-l;this.x1t=k;this.x2t=m;this.y1t=l;this.y2t=p;this.z1t=g;this.z2t=y;if(!(j&&2==this.getTrimmedLineImpl())){j=this.g3d.zbuf;var M=this.g3d.width,m=0,y=63>h?h+1:h,p=0<h?h-1:h,n=a[h],q=a[y],w=a[p];h=d[h];a=d[y];d=d[p];var p=l*M+k,y=this.g3d.bufferSize,u,x,B,
z;this.lineTypeX?(u=k,x=this.x1t,B=this.x2t,k+=v(A/2),z=l=0<=A?1:-1,A=0<=H?M:-M,this.setRastAB(b.x,b.z,c.x,c.z)):(u=l,x=this.y1t,B=this.y2t,k=l+v(H/2),l=0<=H?1:-1,z=0<=H?M:-M,A=0<=A?1:-1,this.setRastAB(b.y,b.z,c.y,c.z));b=g;c=n;g=q;H=w;q=!1;w=this.g3d.pixel;0!=f&&(w=this.g3d.setScreened(1==(f&1)),this.g3d.currentShadeIndex=0);for(n=u;;n+=l,u+=l){n==x&&(q=!0);if(n==k){c=h;if(0==c)break;g=a;H=d;0!=f%3&&(w=this.g3d.setScreened(2==(f&2)),this.g3d.currentShadeIndex=0)}0!=c&&(q&&0<=p&&p<y&&2147483647>m)&&
(b=this.getZCurrent(this.a,this.b,n),b<j[p]&&(M=this.shader.nextRandom8Bit(),w.addPixel(p,F(b),85>M?H:170<M?g:c)));if(n==B)break;m=(m+1)%1;for(p+=z;0>u;)u+=this.nBits;this.lineBits.get(u%this.nBits)&&(p+=A)}}},"~A,~A,~N,JU.P3i,JU.P3i,~N,~B");c(b,"plotLineBits",function(a,d,h,b,c,f,j){if(!(1>=h.z||1>=b.z)){var k=!0;this.x1t=h.x;this.y1t=h.y;this.z1t=h.z;this.x2t=b.x;this.y2t=b.y;this.z2t=b.z;switch(this.getTrimmedLineImpl()){case 2:return;case 0:k=!1;break;default:j&&(h.set(this.x1t,this.y1t,this.z1t),
b.set(this.x2t,this.y2t,this.z2t))}j=this.g3d.zbuf;var l=this.g3d.width,g=0;0==c&&(f=2147483647,c=1);var m=h.x,p=h.y,y=h.z,A=b.x-m,H=m+A,M=b.y-p,n=p+M,q=p*l+m,w=this.g3d.bufferSize,u=this.g3d.pixel;0!=a&&(!k&&0<=q&&q<w&&y<j[q])&&u.addPixel(q,y,a);if(!(0==A&&0==M)){var x=k=1,y=l;0>A&&(A=-A,k=-1);0>M&&(M=-M,y=-l,x=-1);var l=A+A,B=M+M;if(M<=A){this.setRastAB(h.x,h.z,b.x,b.z);p=0;h=Math.abs(H-this.x2t)-1;H=Math.abs(H-this.x1t)-1;n=A-1;for(b=v(n/2);--n>=h&&!(n==b&&(a=d,0==a));){q+=k;m+=k;p+=B;p>A&&(q+=
y,p-=l);if(0!=a&&n<H&&0<=q&&q<w&&g<f){var z=this.getZCurrent(this.a,this.b,m);z<j[q]&&u.addPixel(q,z,a)}g=(g+1)%c}}else{this.setRastAB(h.y,h.z,b.y,b.z);m=0;h=Math.abs(n-this.y2t)-1;H=Math.abs(n-this.y1t)-1;n=M-1;for(b=v(n/2);--n>=h&&!(n==b&&(a=d,0==a));)q+=y,p+=x,m+=l,m>M&&(q+=k,m-=B),0!=a&&(n<H&&0<=q&&q<w&&g<f)&&(z=this.getZCurrent(this.a,this.b,p),z<j[q]&&u.addPixel(q,z,a)),g=(g+1)%c}}}},"~N,~N,JU.P3i,JU.P3i,~N,~N,~B");c(b,"getTrimmedLineImpl",function(){var a=this.g3d.clipCode3(this.x1t,this.y1t,
this.z1t),d=this.g3d.clipCode3(this.x2t,this.y2t,this.z2t);if(0==(a|d))return 0;if(-1==(a|d))return 2;var h=this.g3d.xLast,b=this.g3d.yLast,c=this.g3d.slab,f=this.g3d.depth;do{if(0!=(a&d))return 2;var j=this.x2t-this.x1t,k=this.y2t-this.y1t,l=this.z2t-this.z1t;0!=a?(0!=(a&8)?(this.y1t+=F(-this.x1t*k/j),this.z1t+=F(-this.x1t*l/j),this.x1t=0):0!=(a&4)?(this.y1t+=F((h-this.x1t)*k/j),this.z1t+=F((h-this.x1t)*l/j),this.x1t=h):0!=(a&2)?(this.x1t+=F(-this.y1t*j/k),this.z1t+=F(-this.y1t*l/k),this.y1t=0):
0!=(a&1)?(this.x1t+=F((b-this.y1t)*j/k),this.z1t+=F((b-this.y1t)*l/k),this.y1t=b):0!=(a&32)?(this.x1t+=F((c-this.z1t)*j/l),this.y1t+=F((c-this.z1t)*k/l),this.z1t=c):(this.x1t+=F((f-this.z1t)*j/l),this.y1t+=F((f-this.z1t)*k/l),this.z1t=f),a=this.g3d.clipCode3(this.x1t,this.y1t,this.z1t)):(0!=(d&8)?(this.y2t+=F(-this.x2t*k/j),this.z2t+=F(-this.x2t*l/j),this.x2t=0):0!=(d&4)?(this.y2t+=F((h-this.x2t)*k/j),this.z2t+=F((h-this.x2t)*l/j),this.x2t=h):0!=(d&2)?(this.x2t+=F(-this.y2t*j/k),this.z2t+=F(-this.y2t*
l/k),this.y2t=0):0!=(d&1)?(this.x2t+=F((b-this.y2t)*j/k),this.z2t+=F((b-this.y2t)*l/k),this.y2t=b):0!=(d&32)?(this.x2t+=F((c-this.z2t)*j/l),this.y2t+=F((c-this.z2t)*k/l),this.z2t=c):(this.x2t+=F((f-this.z2t)*j/l),this.y2t+=F((f-this.z2t)*k/l),this.z2t=f),d=this.g3d.clipCode3(this.x2t,this.y2t,this.z2t))}while(0!=(a|d));return 1});c(b,"plotLineClippedOld",function(a,d,h,b,c,f,j,k,l,g,m){var p=this.g3d.zbuf,y=this.g3d.width,A=0;0==g&&(m=2147483647,g=1);var H=b*y+h,n=this.g3d.bufferSize,q=this.g3d.pixel;
0!=a&&(!l&&0<=H&&H<n&&c<p[H])&&q.addPixel(H,c,a);if(!(0==f&&0==j)){l=1;var w=y;h+=f;var u=b+j;0>f&&(f=-f,l=-1);0>j&&(j=-j,w=-y);y=f+f;b=j+j;c<<=10;if(j<=f){var x=f-1;0>k&&(x=-x);k=v(((k<<10)+x)/f);j=0;x=Math.abs(h-this.x2t)-1;h=Math.abs(h-this.x1t)-1;for(var u=f-1,B=v(u/2);--u>=x&&!(u==B&&(a=d,0==a));){H+=l;c+=k;j+=b;j>f&&(H+=w,j-=y);if(0!=a&&u<h&&0<=H&&H<n&&A<m){var z=c>>10;z<p[H]&&q.addPixel(H,z,a)}A=(A+1)%g}}else{x=j-1;0>k&&(x=-x);k=v(((k<<10)+x)/j);f=0;x=Math.abs(u-this.y2t)-1;h=Math.abs(u-this.y1t)-
1;u=j-1;for(B=v(u/2);--u>=x&&!(u==B&&(a=d,0==a));)H+=w,c+=k,f+=y,f>j&&(H+=l,f-=b),0!=a&&(u<h&&0<=H&&H<n&&A<m)&&(z=c>>10,z<p[H]&&q.addPixel(H,z,a)),A=(A+1)%g}}},"~N,~N,~N,~N,~N,~N,~N,~N,~B,~N,~N")});n("J.g3d");z(null,"J.g3d.Pixelator",["J.g3d.Graphics3D"],function(){var b=w(function(){this.pb=this.zb=this.p0=this.g=null;this.bgcolor=this.width=0;q(this,arguments)},J.g3d,"Pixelator",null);x(b,function(a){this.g=a;this.bgcolor=this.g.bgcolor;this.setBuf()},"J.g3d.Graphics3D");c(b,"setBuf",function(){this.zb=
this.g.zbuf;this.pb=this.g.pbuf});c(b,"clearPixel",function(a,d){this.zb[a]>d&&(this.zb[a]=2147483647)},"~N,~N");c(b,"addPixel",function(a,d,h){this.zb[a]=d;this.pb[a]=h},"~N,~N,~N");c(b,"addImagePixel",function(a,d,h,b,c,f){if(b<this.zb[h])switch(a){case 0:break;case 8:this.addPixel(h,b,c);break;default:a+=d,7>=a&&(d=this.pb[h],0!=f&&(d=J.g3d.Graphics3D.mergeBufferPixel(d,f,f)),d=J.g3d.Graphics3D.mergeBufferPixel(d,c&16777215|a<<24,this.bgcolor),this.addPixel(h,b,d))}},"~N,~N,~N,~N,~N,~N")});n("J.g3d");
z(["J.g3d.Pixelator"],"J.g3d.PixelatorT",["J.g3d.Graphics3D"],function(){var b=G(J.g3d,"PixelatorT",J.g3d.Pixelator);g(b,"clearPixel",function(){},"~N,~N");g(b,"addPixel",function(a,d,h){var b=this.g.zbufT[a];if(d<b){var c=this.g.pbufT[a];!this.g.translucentCoverOnly&&(0!=c&&b-d>this.g.zMargin)&&(this.pb[a]=J.g3d.Graphics3D.mergeBufferPixel(this.pb[a],c,this.g.bgcolor));this.g.zbufT[a]=d;this.g.pbufT[a]=h&this.g.translucencyMask}else d!=b&&!this.g.translucentCoverOnly&&d-b>this.g.zMargin&&(this.pb[a]=
J.g3d.Graphics3D.mergeBufferPixel(this.pb[a],h&this.g.translucencyMask,this.g.bgcolor))},"~N,~N,~N")});n("J.g3d");z(["J.g3d.Pixelator"],"J.g3d.PixelatorShaded",null,function(){var b=w(function(){this.tmp=this.bgRGB=null;this.zShadePower=this.zDepth=this.zSlab=0;q(this,arguments)},J.g3d,"PixelatorShaded",J.g3d.Pixelator);x(b,function(a){I(this,J.g3d.PixelatorShaded,[a]);this.tmp=E(3,0)},"J.g3d.Graphics3D");c(b,"set",function(a,d,h){this.bgcolor=this.g.bgcolor;this.bgRGB=E(-1,[this.bgcolor&255,this.bgcolor>>
8&255,this.g.bgcolor>>16&255]);this.zSlab=0>a?0:a;this.zDepth=0>d?0:d;this.zShadePower=h;this.p0=this.g.pixel0;return this},"~N,~N,~N");g(b,"addPixel",function(a,d,h){if(!(d>this.zDepth)){if(d>=this.zSlab&&0<this.zShadePower){var b=this.tmp,c=this.bgRGB;b[0]=h;b[1]=h>>8;b[2]=h>>16;var f=(this.zDepth-d)/(this.zDepth-this.zSlab);if(1<this.zShadePower)for(var j=0;j<this.zShadePower;j++)f*=f;for(j=0;3>j;j++)b[j]=c[j]+F(f*((b[j]&255)-c[j]));h=b[2]<<16|b[1]<<8|b[0]|h&4278190080}this.p0.addPixel(a,d,h)}},
"~N,~N,~N");c(b,"showZBuffer",function(){for(var a=this.p0.zb.length;0<=--a;)if(0!=this.p0.pb[a]){var d=F(Math.min(255,Math.max(0,255*(this.zDepth-this.p0.zb[a])/(this.zDepth-this.zSlab))));this.p0.pb[a]=4278190080|d|d<<8|d<<16}})});n("J.g3d");z(["J.g3d.Pixelator"],"J.g3d.PixelatorScreened",null,function(){var b=G(J.g3d,"PixelatorScreened",J.g3d.Pixelator);x(b,function(a,d){I(this,J.g3d.PixelatorScreened,[a]);this.width=a.width;this.p0=d},"J.g3d.Graphics3D,J.g3d.Pixelator");g(b,"addPixel",function(a,
d,h){a%this.width%2==v(a/this.width)%2&&this.p0.addPixel(a,d,h)},"~N,~N,~N")});n("J.g3d");var Z=w(function(){this.bufferSizeT=this.bufferSize=this.bufferHeight=this.bufferWidth=this.windowSize=this.windowHeight=this.windowWidth=0;this.zBufferT=this.zBuffer=this.pBufferT=this.pBuffer=this.bufferedImage=null;this.heightOffscreen=this.widthOffscreen=0;this.apiPlatform=this.graphicsForTextOrImage=this.offscreenImage=null;q(this,arguments)},J.g3d,"Platform3D",null);x(Z,function(b){this.apiPlatform=b},
"J.api.GenericPlatform");c(Z,"getGraphicsForMetrics",function(){return this.apiPlatform.getGraphics(this.allocateOffscreenImage(1,1))});c(Z,"allocateTBuffers",function(b){this.bufferSizeT=b?this.bufferSize:this.windowSize;this.zBufferT=E(this.bufferSizeT,0);this.pBufferT=E(this.bufferSizeT,0)},"~B");c(Z,"allocateBuffers",function(b,a,d,h){this.windowWidth=b;this.windowHeight=a;this.windowSize=b*a;d&&(b*=2,a*=2);this.bufferWidth=b;this.bufferHeight=a;this.bufferSize=this.bufferWidth*this.bufferHeight;
this.zBuffer=E(this.bufferSize,0);this.pBuffer=E(this.bufferSize,0);this.bufferedImage=this.apiPlatform.allocateRgbImage(this.windowWidth,this.windowHeight,this.pBuffer,this.windowSize,J.g3d.Platform3D.backgroundTransparent,h)},"~N,~N,~B,~B");c(Z,"releaseBuffers",function(){this.windowWidth=this.windowHeight=this.bufferWidth=this.bufferHeight=this.bufferSize=-1;null!=this.bufferedImage&&(this.apiPlatform.flushImage(this.bufferedImage),this.bufferedImage=null);this.zBufferT=this.pBufferT=this.zBuffer=
this.pBuffer=null});c(Z,"hasContent",function(){for(var b=this.bufferSize;0<=--b;)if(2147483647!=this.zBuffer[b])return!0;return!1});c(Z,"clearScreenBuffer",function(){for(var b=this.bufferSize;0<=--b;)this.zBuffer[b]=2147483647,this.pBuffer[b]=0});c(Z,"setBackgroundColor",function(b){if(null!=this.pBuffer)for(var a=this.bufferSize;0<=--a;)0==this.pBuffer[a]&&(this.pBuffer[a]=b)},"~N");c(Z,"clearTBuffer",function(){for(var b=this.bufferSizeT;0<=--b;)this.zBufferT[b]=2147483647,this.pBufferT[b]=0});
c(Z,"clearBuffer",function(){this.clearScreenBuffer()});c(Z,"clearScreenBufferThreaded",function(){});c(Z,"notifyEndOfRendering",function(){this.apiPlatform.notifyEndOfRendering()});c(Z,"getGraphicsForTextOrImage",function(b,a){if(b>this.widthOffscreen||a>this.heightOffscreen)null!=this.offscreenImage&&(this.apiPlatform.disposeGraphics(this.graphicsForTextOrImage),this.apiPlatform.flushImage(this.offscreenImage)),b>this.widthOffscreen&&(this.widthOffscreen=b),a>this.heightOffscreen&&(this.heightOffscreen=
a),this.offscreenImage=this.allocateOffscreenImage(this.widthOffscreen,this.heightOffscreen),this.graphicsForTextOrImage=this.apiPlatform.getStaticGraphics(this.offscreenImage,J.g3d.Platform3D.backgroundTransparent);return this.graphicsForTextOrImage},"~N,~N");c(Z,"allocateOffscreenImage",function(b,a){return this.apiPlatform.newOffScreenImage(b,a)},"~N,~N");c(Z,"setBackgroundTransparent",function(b){J.g3d.Platform3D.backgroundTransparent=b},"~B");Z.backgroundTransparent=!1;n("J.g3d");var La=w(function(){this.b=
this.a=0;this.isOrthographic=!1;q(this,arguments)},J.g3d,"PrecisionRenderer",null);c(La,"getZCurrent",function(b,a,d){return Math.round(1.4E-45==b?a:this.isOrthographic?b*d+a:b/(a-d))},"~N,~N,~N");c(La,"setRastABFloat",function(b,a,d,h){var c=h-a,e=d-b;0==c||0==e?(this.a=1.4E-45,this.b=a):this.isOrthographic?(this.a=c/e,this.b=a-this.a*b):(this.a=e*a*(h/c),this.b=(d*h-b*a)/c)},"~N,~N,~N,~N");c(La,"setRastAB",function(b,a,d,h){var c=h-a,e=d-b;1.4E-45==b||0==c||0==e?(this.a=1.4E-45,this.b=h):this.isOrthographic?
(this.a=c/e,this.b=a-this.a*b):(this.a=e*a*(h/c),this.b=(d*h-b*a)/c)},"~N,~N,~N,~N");n("J.g3d");z(["JU.P3"],"J.g3d.SphereRenderer",null,function(){var b=w(function(){this.mDeriv=this.coef=this.mat=this.zroot=this.shader=this.g3d=null;this.planeShade=this.selectedOctant=0;this.zbuf=null;this.offsetPbufBeginLine=this.slab=this.depth=this.height=this.width=0;this.dxyz=this.planeShades=this.ptTemp=null;q(this,arguments)},J.g3d,"SphereRenderer",null);N(b,function(){this.zroot=R(2,0);this.ptTemp=new JU.P3;
this.planeShades=E(3,0);this.dxyz=L(3,3,0)});x(b,function(a){this.g3d=a;this.shader=a.shader},"J.g3d.Graphics3D");c(b,"render",function(a,d,h,b,c,f,j,k,l,g){if(1!=c&&(49<d&&(d&=-2),!this.g3d.isClippedXY(d,h,b))){this.slab=this.g3d.slab;this.depth=this.g3d.depth;var m=d+1>>1,p=c-m;if(!(c+m<this.slab||p>this.depth)){var y=h-m,A=h+m,H=b-m,n=b+m;this.shader.nOut=this.shader.nIn=0;this.zbuf=this.g3d.zbuf;this.height=this.g3d.height;this.width=this.g3d.width;this.offsetPbufBeginLine=this.width*b+h;var q=
this.shader;this.mat=f;if(null!=f&&(this.coef=j,this.mDeriv=k,this.selectedOctant=l,null==q.ellipsoidShades&&q.createEllipsoidShades(),null!=g)){this.planeShade=-1;for(j=0;3>j;j++)if(m=this.dxyz[j][0]=g[j].x-h,k=this.dxyz[j][1]=g[j].y-b,l=this.dxyz[j][2]=g[j].z-c,this.planeShades[j]=q.getShadeIndex(m,k,-l),0==m&&0==k){this.planeShade=this.planeShades[j];break}}if(null!=f||128<d)this.renderQuadrant(-1,-1,h,b,c,d,a),this.renderQuadrant(-1,1,h,b,c,d,a),this.renderQuadrant(1,-1,h,b,c,d,a),this.renderQuadrant(1,
1,h,b,c,d,a),null!=f&&(this.mDeriv=this.coef=this.mat=null);else{var u=q.sphereShapeCache[d-1];if(null==u){u=0;f=0!=(d&1);g=d/2;k=g*g;m=v((d+1)/2);l=f?0:0.5;for(j=0;j<m;++j,++l)for(var w=l*l,x=f?0:0.5,B=0;B<m;++B,++x){var z=x*x,z=k-w-z;0<=z&&++u}var u=E(u,0),C=0;l=f?0:0.5;for(j=0;j<m;++j,++l){w=l*l;x=f?0:0.5;for(B=0;B<m;++B,++x)if(z=x*x,z=k-w-z,0<=z){var D=Math.sqrt(z),z=F(D),G=q.getShadeN(x,l,D,g),I=q.getShadeN(-x,l,D,g),L=q.getShadeN(x,-l,D,g),D=q.getShadeN(-x,-l,D,g),z=z|G<<7|I<<13|L<<19|D<<25;
u[C++]=z}u[C-1]|=2147483648}q.sphereShapeCache[d-1]=u}0>y||A>=this.width||0>H||n>=this.height||p<this.slab||c>this.depth?this.renderSphereClipped(u,h,b,c,d,a):this.renderSphereUnclipped(u,c,d,a)}this.zbuf=null}}},"~A,~N,~N,~N,~N,JU.M3,~A,JU.M4,~N,~A");c(b,"renderSphereUnclipped",function(a,d,h,b){var c=0,f=1-(h&1),j=this.offsetPbufBeginLine,k=j-f*this.width;h=v((h+1)/2);var l=this.zbuf,g=this.width,m=this.g3d.pixel;do{var p=j,y=j-f,A=k,H=k-f,n;do{n=a[c++];var q=d-(n&127);q<l[p]&&m.addPixel(p,q,b[n>>
7&63]);q<l[y]&&m.addPixel(y,q,b[n>>13&63]);q<l[A]&&m.addPixel(A,q,b[n>>19&63]);q<l[H]&&m.addPixel(H,q,b[n>>25&63]);++p;--y;++A;--H}while(0<=n);j+=g;k-=g}while(0<--h)},"~A,~N,~N,~A");c(b,"renderSphereClipped",function(a,d,h,b,c,f){var j=this.width,k=this.height,l=0,g=1-(c&1),m=this.offsetPbufBeginLine,p=m-g*j;c=v((c+1)/2);var y=h,A=h-g;h=(d<<16)+(h<<1)^858993459;var H=this.zbuf,n=this.g3d.pixel,q=this.slab,u=this.depth;do{var w=0<=y&&y<k,x=0<=A&&A<k,B=m,z=m-g,C=p,D=p-g,E,F=d,G=d-g;do{var I=0<=G&&G<
j,L=0<=F&&F<j;E=a[l++];var K;K=E&127;var N;b<q?(N=b+K,K=N>=q):(N=b-K,K=N<q);K&&(N=q);if(N>=q&&N<=u){if(w){if(L&&N<H[B]){var O=K?44+(h>>7&7):E>>7&63;n.addPixel(B,N,f[O])}I&&N<H[z]&&(O=K?44+(h>>13&7):E>>13&63,n.addPixel(z,N,f[O]))}x&&(L&&N<H[C]&&(O=K?44+(h>>19&7):E>>19&63,n.addPixel(C,N,f[O])),I&&N<H[D]&&(O=K?44+(h>>25&7):E>>25&63,n.addPixel(D,N,f[O])))}++B;--z;++C;--D;++F;--G;K&&(h=(h<<16)+(h<<1)+h&2147483647)}while(0<=E);m+=j;p-=j;++y;--A}while(0<--c)},"~A,~N,~N,~N,~N,~A");c(b,"renderQuadrant",function(a,
d,h,b,c,f,j){f=v(f/2);var k=h+f*a,l=(0>h?-1:h<this.width?0:1)+(0>k?-2:k<this.width?0:2);-3==l||3==l||(k=b+f*d,k=(0>b?-1:b<this.height?0:1)+(0>k?-2:k<this.height?0:2),-3==k||3==k||(null==this.mat&&0==l&&0==k&&c-f>=this.slab&&c<=this.depth?this.renderQuadrantUnclipped(f,a,d,c,j):this.renderQuadrantClipped(f,a,d,h,b,c,j)))},"~N,~N,~N,~N,~N,~N,~A");c(b,"renderQuadrantUnclipped",function(a,d,h,b,c){for(var f=a*a,j=2*a+1,k=0>h?-this.width:this.width,l=this.offsetPbufBeginLine,g=this.zbuf,m=this.g3d.pixel,
p=this.shader.sphereShadeIndexes,y=0,A=0;A<=f;A+=y+ ++y,l+=k)for(var H=l,n=f-A,q=b-a,u=v((y*h+a<<8)/j),w=0,x=0;x<=n;x+=w+ ++w,H+=d)if(!(g[H]<=q)&&(q=v(Math.sqrt(n-x)),q=b-q,!(g[H]<=q))){var B=v((w*d+a<<8)/j);m.addPixel(H,q,c[p[(u<<8)+B]])}},"~N,~N,~N,~N,~A");c(b,"renderQuadrantClipped",function(a,d,h,b,c,f,j){for(var k=null!=this.mat,l=0<=this.selectedOctant,g=a*a,m=2*a+1,p=0>h?-this.width:this.width,y=this.offsetPbufBeginLine,A=(b<<16)+(c<<1)^858993459,H=0,n=0,q=this.g3d.pixel,u=0,w=this.height,
x=this.width,B=this.zbuf,z=this.dxyz,C=this.slab,D=this.depth,E=this.ptTemp,F=this.coef,G=this.zroot,I=this.selectedOctant,K=this.shader,L=this.planeShades,N=K.sphereShadeIndexes,O=this.planeShade,R=this.mat,S=0,V=0,Q=c;V<=g;V+=S+ ++S,y+=p,Q+=h)if(0>Q){if(0>h)break}else if(Q>=w){if(0<h)break}else{var Y=g-(k?0:V);k||(H=v((S*h+a<<8)/m));for(var A=(A<<16)+(A<<1)+A&2147483647,P=b,X=0,W=0,$=-1,U=1,Z=y;W<=Y;W+=X+ ++X,Z+=d,P+=d)if(0>P){if(0>d)break}else if(P>=x){if(0<d)break}else{var T;if(k){T=(F[4]*P+F[5]*
Q+F[8])/F[2]/2;var aa=T*T-(F[0]*P*P+F[1]*Q*Q+F[3]*P*Q+F[6]*P+F[7]*Q-1)/F[2];if(0>aa){if(0<=$)break;continue}aa=Math.sqrt(aa);G[0]=-T-aa;G[1]=-T+aa;$=f<C?1:0;if(0==(T=v(G[$])))T=f;U=2;u=T;if(l){E.set(P-b,Q-c,T-f);R.rotate(E);aa=0;0>E.x&&(aa|=1);0>E.y&&(aa|=2);0>E.z&&(aa|=4);if(aa==I){if(0<=O)n=O;else{U=3;n=3.4028235E38;for(T=0;3>T;T++)if(0!=(aa=z[T][2]))aa=f+(-z[T][0]*(P-b)-z[T][1]*(Q-c))/aa,aa<n&&(n=aa,U=T);3==U&&(U=0,n=f);G[0]=n;n=L[U]}T=v(G[0]);U=3}if(aa=f<C?T>=C:T<C)u=T=C,U=0}if(T<C||T>D||B[Z]<=
u)continue}else{T=v(Math.sqrt(Y-W));T=f+(f<C?T:-T);if(aa=f<C?T>=C:T<C)T=C,U=0;if(T<C||T>D||B[Z]<=T)continue}switch(U){case 0:n=44+(A>>8&7);A=(A<<16)+(A<<1)+A&2147483647;U=1;break;case 2:n=K.getEllipsoidShade(P,Q,G[$],a,this.mDeriv);break;case 3:q.clearPixel(Z,u);break;default:n=v((X*d+a<<8)/m),n=N[(H<<8)+n]}q.addPixel(Z,T,j[n])}A=(A+P+Q|1)&2147483647}},"~N,~N,~N,~N,~N,~N,~A")});n("J.g3d");z(["java.util.Hashtable"],"J.g3d.TextRenderer",["JU.CU","J.g3d.Graphics3D"],function(){var b=w(function(){this.size=
this.mapWidth=this.width=this.ascent=this.height=0;this.tmap=null;this.isInvalid=!1;q(this,arguments)},J.g3d,"TextRenderer",null);x(b,function(a,d){this.ascent=d.getAscent();this.height=d.getHeight();this.width=d.stringWidth(a);0!=this.width&&(this.mapWidth=this.width,this.size=this.mapWidth*this.height)},"~S,JU.Font");b.clearFontCache=c(b,"clearFontCache",function(){J.g3d.TextRenderer.working||(J.g3d.TextRenderer.htFont3d.clear(),J.g3d.TextRenderer.htFont3dAntialias.clear())});b.plot=c(b,"plot",
function(a,d,h,b,c,f,j,k,l,g){if(0==f.length)return 0;if(0<=f.indexOf("<su")||0<=f.indexOf("<color"))return J.g3d.TextRenderer.plotByCharacter(a,d,h,b,c,f,j,k,l,g);var m=j.getAscent();d-=m;f=J.g3d.TextRenderer.getPlotText3D(a,d,k,f,j,g);if(f.isInvalid)return f.width;g&&(b=J.g3d.Graphics3D.fixTextImageRGB(b));g=f.height;j=f.width;var m=f.tmap,p=k.width,y=k.height,A=k.zbuf,H=k.pixel,n=k.translucencyLog;if(null!=l||(0>a||a+f.width>p||0>d||d+f.height>y)&&null!=(l=k))for(var q=k=0;q<g;q++)for(var u=0;u<
j;u++){var v=m[k++];0!=v&&l.plotImagePixel(b,a+u,d+q,h,v,c,p,y,A,H,n)}else{k=q=0;for(a=d*p+a;q<g;q++,a+=p-j)for(u=0;u<j;u++)H.addImagePixel(m[k++],n,a++,h,b,c)}return f.width},"~N,~N,~N,~N,~N,~S,JU.Font,J.g3d.Graphics3D,J.api.JmolRendererInterface,~B");b.plotByCharacter=c(b,"plotByCharacter",function(a,d,h,b,c,f,j,k,l,g){for(var m=0,p=f.length,y=Math.round(0.25*j.getHeight()),A=-Math.round(0.3*j.getHeight()),n=0,q=0;q<p;q++){if("<"==f.charAt(q)){if(q+5<p&&f.substring(q,q+6).equals("<color")){var n=
b,u=f.indexOf(">",q);if(0>u)continue;b=JU.CU.getArgbFromString(f.substring(q+7,u).trim());q=u;continue}if(q+7<p&&f.substring(q,q+8).equals("</color>")){q+=7;b=n;continue}if(q+4<p&&f.substring(q,q+5).equals("<sub>")){q+=4;d+=y;continue}if(q+4<p&&f.substring(q,q+5).equals("<sup>")){q+=4;d+=A;continue}if(q+5<p&&f.substring(q,q+6).equals("</sub>")){q+=5;d-=y;continue}if(q+5<p&&f.substring(q,q+6).equals("</sup>")){q+=5;d-=A;continue}}u=J.g3d.TextRenderer.plot(a+m,d,h,b,c,f.substring(q,q+1),j,k,l,g);m+=
u}return m},"~N,~N,~N,~N,~N,~S,JU.Font,J.g3d.Graphics3D,J.api.JmolRendererInterface,~B");b.getPlotText3D=c(b,"getPlotText3D",function(a,d,h,b,c,f){J.g3d.TextRenderer.working=!0;f=f?J.g3d.TextRenderer.htFont3dAntialias:J.g3d.TextRenderer.htFont3d;var j=f.get(c),k=null,l=!1,g=!1;null!=j?k=j.get(b):(j=new java.util.Hashtable,l=!0);null==k&&(k=new J.g3d.TextRenderer(b,c),g=!0);k.isInvalid=0==k.width||0>=a+k.width||a>=h.width||0>=d+k.height||d>=h.height;if(k.isInvalid)return k;l&&f.put(c,j);g&&(k.setTranslucency(b,
c,h),j.put(b,k));J.g3d.TextRenderer.working=!1;return k},"~N,~N,J.g3d.Graphics3D,~S,JU.Font,~B");c(b,"setTranslucency",function(a,d,h){a=h.apiPlatform.getTextPixels(a,d,h.platform.getGraphicsForTextOrImage(this.mapWidth,this.height),h.platform.offscreenImage,this.mapWidth,this.height,this.ascent);if(null!=a){this.tmap=O(this.size,0);for(d=a.length;0<=--d;)h=a[d]&255,0!=h&&(this.tmap[d]=J.g3d.TextRenderer.translucency[h>>5])}},"~S,JU.Font,J.g3d.Graphics3D");b.translucency=O(-1,[7,6,5,4,3,2,1,8]);b.working=
!1;b.htFont3d=new java.util.Hashtable;b.htFont3dAntialias=new java.util.Hashtable});n("J.g3d");z(["JU.P3i"],"J.g3d.TextString",null,function(){var b=w(function(){this.font=this.text=null;this.bgargb=this.argb=0;q(this,arguments)},J.g3d,"TextString",JU.P3i,java.util.Comparator);c(b,"setText",function(a,d,h,b,c,f,j){this.text=a;this.font=d;this.argb=h;this.bgargb=b;this.x=c;this.y=f;this.z=j},"~S,JU.Font,~N,~N,~N,~N,~N");g(b,"compare",function(a,d){return null==a||null==d?0:a.z>d.z?-1:a.z<d.z?1:0},
"J.g3d.TextString,J.g3d.TextString");g(b,"toString",function(){return this.asString()+" "+this.text})});n("J.g3d");z(["J.g3d.G3DRenderer","$.PrecisionRenderer","JU.Rgb16"],"J.g3d.TriangleRenderer",["JU.GData"],function(){var b=w(function(){this.rgb16t2=this.rgb16t1=this.rgb16sGouraud=this.rgb16sE=this.rgb16sW=this.azE=this.axE=this.azW=this.axW=this.bb=this.aa=this.az=this.ay=this.ax=this.g3d=null;q(this,arguments)},J.g3d,"TriangleRenderer",J.g3d.PrecisionRenderer,J.g3d.G3DRenderer);N(b,function(){this.ax=
E(3,0);this.ay=E(3,0);this.az=E(3,0);this.aa=L(64,0);this.bb=L(64,0);this.axW=E(64,0);this.azW=E(64,0);this.axE=E(64,0);this.azE=E(64,0);this.rgb16t1=new JU.Rgb16;this.rgb16t2=new JU.Rgb16});x(b,function(){I(this,J.g3d.TriangleRenderer,[])});g(b,"set",function(a){try{this.rgb16sW=Array(64);this.rgb16sE=Array(64);for(var d=64;0<=--d;)this.rgb16sW[d]=new JU.Rgb16,this.rgb16sE[d]=new JU.Rgb16;this.g3d=a;this.rgb16sGouraud=Array(3);for(d=3;0<=--d;)this.rgb16sGouraud[d]=new JU.Rgb16}catch(h){if(!D(h,Exception))throw h;
}return this},"J.api.JmolRendererInterface,JU.GData");c(b,"reallocRgb16s",function(a,d){var h=Array(d);System.arraycopy(a,0,h,0,a.length);for(var b=a.length;b<d;++b)h[b]=new JU.Rgb16;return h},"~A,~N");c(b,"setGouraud",function(a,d,h){this.rgb16sGouraud[0].setInt(a);this.rgb16sGouraud[1].setInt(d);this.rgb16sGouraud[2].setInt(h)},"~N,~N,~N");c(b,"fillTriangle",function(a,d,h,b){this.ax[0]=a.x;this.ax[1]=d.x;this.ax[2]=h.x;this.ay[0]=a.y;this.ay[1]=d.y;this.ay[2]=h.y;this.az[0]=a.z;this.az[1]=d.z;
this.az[2]=h.z;if(!(1>=this.az[0]||1>=this.az[1]||1>=this.az[2])){d=this.g3d.clipCode3(this.ax[0],this.ay[0],this.az[0]);h=this.g3d.clipCode3(this.ax[1],this.ay[1],this.az[1]);var c=this.g3d.clipCode3(this.ax[2],this.ay[2],this.az[2]),f=d|h|c;a=0!=f;if(!a||!(-1==f||0!=(d&h&c))){c=0;this.ay[1]<this.ay[c]&&(c=1);this.ay[2]<this.ay[c]&&(c=2);var f=(c+1)%3,j=(c+2)%3;if(this.ay[f]>this.ay[j])var k=f,f=j,j=k;d=this.ay[c];var l=this.ay[f],g=this.ay[j];h=g-d+1;if(!(h>3*this.g3d.height)){if(h>this.axW.length){var m=
h+31&-32;this.axW=E(m,0);this.azW=E(m,0);this.axE=E(m,0);this.azE=E(m,0);this.aa=L(m,0);this.bb=L(m,0);this.rgb16sW=this.reallocRgb16s(this.rgb16sW,m);this.rgb16sE=this.reallocRgb16s(this.rgb16sE,m)}var p;b?(m=this.rgb16sW,p=this.rgb16sE):m=p=null;k=l-d;0==k?(this.ax[f]<this.ax[c]&&(k=f,f=c,c=k),this.generateRaster(h,c,j,this.axW,this.azW,0,m),this.generateRaster(h,f,j,this.axE,this.azE,0,p)):l==g?(this.ax[j]<this.ax[f]&&(k=f,f=j,j=k),this.generateRaster(h,c,f,this.axW,this.azW,0,m),this.generateRaster(h,
c,j,this.axE,this.azE,0,p)):(l=this.ax[j]-this.ax[c],g=JU.GData.roundInt(v(h/2)),0>l&&(g=-g),this.ax[c]+v((l*k+g)/h)<this.ax[f]?(this.generateRaster(h,c,j,this.axW,this.azW,0,m),this.generateRaster(k+1,c,f,this.axE,this.azE,0,p),this.generateRaster(h-k,f,j,this.axE,this.azE,k,p)):(this.generateRaster(k+1,c,f,this.axW,this.azW,0,m),this.generateRaster(h-k,f,j,this.axW,this.azW,k,m),this.generateRaster(h,c,j,this.axE,this.azE,0,p)));this.g3d.setZMargin(5);c=this.g3d.pass2Flag01;f=1-c;j=0;0>d&&(h+=d,
j-=d,d=0);d+h>this.g3d.height&&(h=this.g3d.height-d);if(b)if(a)for(;--h>=c;++d,++j)a=this.axE[j]-(b=this.axW[j])+f,0<a&&this.g3d.plotPixelsClippedRaster(a,b,d,this.azW[j],this.azE[j],this.rgb16sW[j],this.rgb16sE[j]);else for(;--h>=c;++d,++j)a=this.axE[j]-(b=this.axW[j])+f,1==c&&0>a&&(a=1,b--),0<a&&this.g3d.plotPixelsUnclippedRaster(a,b,d,this.azW[j],this.azE[j],this.rgb16sW[j],this.rgb16sE[j]);else if(a)for(;--h>=c;++d,++j)a=this.axE[j]-(b=this.axW[j])+f,0<a&&this.g3d.plotPixelsClippedRasterBits(a,
b,d,this.azW[j],this.azE[j],null,null,this.aa[j],this.bb[j]);else for(;--h>=c;++d,++j)a=this.axE[j]-(b=this.axW[j])+f,1==c&&0>a&&(a=1,b--),0<a&&this.g3d.plotPixelsUnclippedRasterBits(a,b,d,null,null,this.aa[j],this.bb[j]);this.g3d.setZMargin(0)}}}},"JU.P3i,JU.P3i,JU.P3i,~B");c(b,"generateRaster",function(a,d,h,b,c,f,j){var k=this.ax[d],l=this.ax[h]-k,g,m,p;0<=l?(g=1,m=l,p=0):(g=-1,m=-l,p=1-a);var y;m<=a?y=0:(y=JU.GData.roundInt(v(l/a)),m%=a);this.setRastAB(this.ay[d],this.az[d],this.ay[h],this.az[h]);
for(var A=this.a,n=this.b,q=b===this.axE,u=0,w=this.ay[d],x=a-1,l=f;u<=x;++l,++u,++w){if(0==l||l>f)b[l]=u==x?this.ax[h]:k,c[l]=this.getZCurrent(A,n,w),q&&(this.setRastAB(this.axW[l],this.azW[l],b[l],c[l]),this.aa[l]=this.a,this.bb[l]=this.b);k+=y;p+=m;0<p&&(k+=g,p-=a)}if(null!=j){b=this.rgb16t1;b.setRgb(this.rgb16sGouraud[d]);d=this.rgb16t2;d.diffDiv(this.rgb16sGouraud[h],b,a);l=f;for(a=f+a;l<a;++l)j[l].setAndIncrement(b,d)}},"~N,~N,~N,~A,~A,~N,~A")});n("J.i18n");z("J.api.Translator java.text.MessageFormat java.util.Hashtable JU.PT J.i18n.Language $.Resource".split(" "),
"J.i18n.GT",["JU.Logger"],function(){var b=w(function(){this.resources=null;this.resourceCount=0;this.doTranslate=!0;this.language=null;q(this,arguments)},J.i18n,"GT",null,J.api.Translator);x(b,function(a,d){this.resources=null;this.resourceCount=0;J.i18n.GT.$getTextWrapper=this;null!=d&&0==d.length&&(d="none");null!=d&&(this.language=d);"none".equals(this.language)&&(this.language=null);null==this.language&&(this.language=J.i18n.Resource.getLanguage());null==this.language&&(this.language="en");var h=
this.language,b=null,c=null,f=this.language.indexOf("_");if(0<=f&&(h=h.substring(0,f),b=this.language,0<=(f=b.indexOf("_",++f))))b=b.substring(0,f),c=this.language;if(null==(this.language=this.getSupported(c))&&null==(this.language=this.getSupported(b))&&null==(this.language=this.getSupported(h)))this.language="en",System.out.println(this.language+" not supported -- using en");else{b=c=null;switch(this.language.length){default:c=this.language;b=this.language.substring(0,5);h=this.language.substring(0,
2);break;case 5:b=this.language;h=this.language.substring(0,2);break;case 2:h=this.language}b=this.getSupported(b);h=this.getSupported(h);if(h===b||"en_US".equals(h))h=null;b===c&&(b=null);"en_US".equals(b)||(J.i18n.GT.allowDebug&&JU.Logger.debugging&&JU.Logger.debug("Instantiating gettext wrapper for "+this.language+" using files for language:"+h+" country:"+b+" variant:"+c),J.i18n.GT.$ignoreApplicationBundle||this.addBundles(a,"Jmol",c,null,null),this.addBundles(a,"JmolApplet",c,null,null),J.i18n.GT.$ignoreApplicationBundle||
this.addBundles(a,"Jmol",null,b,null),this.addBundles(a,"JmolApplet",null,b,null),J.i18n.GT.$ignoreApplicationBundle||this.addBundles(a,"Jmol",null,null,h),this.addBundles(a,"JmolApplet",null,null,h))}},"JV.Viewer,~S");g(b,"translate",function(a){return J.i18n.GT.$(a)},"~S");b.getLanguageList=c(b,"getLanguageList",function(a){null==J.i18n.GT.languageList&&(null==a&&(a=J.i18n.GT.getTextWrapper()),a.createLanguageList());return J.i18n.GT.languageList},"J.i18n.GT");b.getLanguage=c(b,"getLanguage",function(){return J.i18n.GT.getTextWrapper().language});
b.ignoreApplicationBundle=c(b,"ignoreApplicationBundle",function(){J.i18n.GT.$ignoreApplicationBundle=!0});b.setDoTranslate=c(b,"setDoTranslate",function(a){var d=J.i18n.GT.getDoTranslate();J.i18n.GT.getTextWrapper().doTranslate=a;return d},"~B");b.getDoTranslate=c(b,"getDoTranslate",function(){return J.i18n.GT.getTextWrapper().doTranslate});b.$=c(b,"$",function(a){return J.i18n.GT.getTextWrapper().getString(a)},"~S");b.o=c(b,"o",function(a,d){if(C(d,Array)){if(1!=d.length)return java.text.MessageFormat.format(a,
d);d=d[0]}return JU.PT.rep(a,"{0}",d.toString())},"~S,~O");b.i=c(b,"i",function(a,d){return JU.PT.rep(a,"{0}",""+d)},"~S,~N");b.escapeHTML=c(b,"escapeHTML",function(a){for(var d,b=a.length;0<=--b;)if(127<(d=a.charAt(b)).charCodeAt(0))a=a.substring(0,b)+"&#"+d.charCodeAt(0)+";"+a.substring(b+1);return a},"~S");b.getTextWrapper=c(b,"getTextWrapper",function(){return null==J.i18n.GT.$getTextWrapper?J.i18n.GT.$getTextWrapper=new J.i18n.GT(null,null):J.i18n.GT.$getTextWrapper});c(b,"createLanguageList",
function(){var a=this.doTranslate;this.doTranslate=!1;J.i18n.GT.languageList=J.i18n.Language.getLanguageList();this.doTranslate=a});c(b,"getSupported",function(a){if(null==a)return null;var d=J.i18n.GT.htLanguages.get(a);if(null!=d)return 0==d.length?null:d;d=J.i18n.Language.getSupported(J.i18n.GT.getLanguageList(this),a);J.i18n.GT.htLanguages.put(a,null==d?"":d);return d},"~S");c(b,"addBundles",function(a,d,b,c,e){try{d="J.translation."+d+".",null!=b&&this.addBundle(a,d,b),null!=c&&this.addBundle(a,
d,c),null!=e&&this.addBundle(a,d,e)}catch(f){if(D(f,Exception))J.i18n.GT.allowDebug&&JU.Logger.errorEx("Some exception occurred!",f),this.resources=null,this.resourceCount=0;else throw f;}},"JV.Viewer,~S,~S,~S,~S");c(b,"addBundle",function(a,d,b){a=J.i18n.Resource.getResource(a,d,b);null!=a&&(null==this.resources&&(this.resources=Array(8),this.resourceCount=0),this.resources[this.resourceCount]=a,this.resourceCount++,J.i18n.GT.allowDebug&&JU.Logger.debug("GT adding "+d))},"JV.Viewer,~S,~S");c(b,"getString",
function(a){var d=null;if(this.doTranslate){for(var b=0;b<this.resourceCount;b++)if(d=this.resources[b].getString(a),null!=d){a=d;break}0<this.resourceCount&&(null==d&&J.i18n.GT.allowDebug&&JU.Logger.debugging)&&JU.Logger.debug("No trans, using default: "+a)}null==d&&(a.startsWith("[")?a=a.substring(a.indexOf("]")+1):a.endsWith("]")&&(a=a.substring(0,a.indexOf("["))));return a},"~S");b.$ignoreApplicationBundle=!1;b.$getTextWrapper=null;b.languageList=null;b.allowDebug=!1;b.vwr=null;b.htLanguages=
new java.util.Hashtable});n("J.i18n");z(null,"J.i18n.Language",["J.i18n.GT"],function(){var b=w(function(){this.nativeLanguage=this.language=this.code=null;this.display=!1;q(this,arguments)},J.i18n,"Language",null);x(b,function(a,d,b,c){this.code=a;this.language=d;this.nativeLanguage=b;this.display=c},"~S,~S,~S,~B");b.getLanguageList=c(b,"getLanguageList",function(){return u(-1,[new J.i18n.Language("ar",J.i18n.GT.$("Arabic"),"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",!1),new J.i18n.Language("ast",
J.i18n.GT.$("Asturian"),"Asturian",!1),new J.i18n.Language("az",J.i18n.GT.$("Azerbaijani"),"az\u0259rbaycan dili",!1),new J.i18n.Language("bs",J.i18n.GT.$("Bosnian"),"bosanski jezik",!1),new J.i18n.Language("ca",J.i18n.GT.$("Catalan"),"Catal\u00e0",!0),new J.i18n.Language("cs",J.i18n.GT.$("Czech"),"\u010ce\u0161tina",!0),new J.i18n.Language("da",J.i18n.GT.$("Danish"),"Dansk",!0),new J.i18n.Language("de",J.i18n.GT.$("German"),"Deutsch",!0),new J.i18n.Language("el",J.i18n.GT.$("Greek"),"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",
!1),new J.i18n.Language("en_AU",J.i18n.GT.$("Australian English"),"Australian English",!1),new J.i18n.Language("en_GB",J.i18n.GT.$("British English"),"British English",!0),new J.i18n.Language("en_US",J.i18n.GT.$("American English"),"American English",!0),new J.i18n.Language("es",J.i18n.GT.$("Spanish"),"Espa\u00f1ol",!0),new J.i18n.Language("et",J.i18n.GT.$("Estonian"),"Eesti",!1),new J.i18n.Language("eu",J.i18n.GT.$("Basque"),"Euskara",!0),new J.i18n.Language("fi",J.i18n.GT.$("Finnish"),"Suomi",!0),
new J.i18n.Language("fo",J.i18n.GT.$("Faroese"),"F\u00f8royskt",!1),new J.i18n.Language("fr",J.i18n.GT.$("French"),"Fran\u00e7ais",!0),new J.i18n.Language("fy",J.i18n.GT.$("Frisian"),"Frysk",!1),new J.i18n.Language("gl",J.i18n.GT.$("Galician"),"Galego",!1),new J.i18n.Language("hr",J.i18n.GT.$("Croatian"),"Hrvatski",!1),new J.i18n.Language("hu",J.i18n.GT.$("Hungarian"),"Magyar",!0),new J.i18n.Language("hy",J.i18n.GT.$("Armenian"),"\u0540\u0561\u0575\u0565\u0580\u0565\u0576",!1),new J.i18n.Language("id",
J.i18n.GT.$("Indonesian"),"Indonesia",!0),new J.i18n.Language("it",J.i18n.GT.$("Italian"),"Italiano",!0),new J.i18n.Language("ja",J.i18n.GT.$("Japanese"),"\u65e5\u672c\u8a9e",!0),new J.i18n.Language("jv",J.i18n.GT.$("Javanese"),"Basa Jawa",!1),new J.i18n.Language("ko",J.i18n.GT.$("Korean"),"\ud55c\uad6d\uc5b4",!0),new J.i18n.Language("ms",J.i18n.GT.$("Malay"),"Bahasa Melayu",!0),new J.i18n.Language("nb",J.i18n.GT.$("Norwegian Bokmal"),"Norsk Bokm\u00e5l",!1),new J.i18n.Language("nl",J.i18n.GT.$("Dutch"),
"Nederlands",!0),new J.i18n.Language("oc",J.i18n.GT.$("Occitan"),"Occitan",!1),new J.i18n.Language("pl",J.i18n.GT.$("Polish"),"Polski",!1),new J.i18n.Language("pt",J.i18n.GT.$("Portuguese"),"Portugu\u00eas",!1),new J.i18n.Language("pt_BR",J.i18n.GT.$("Brazilian Portuguese"),"Portugu\u00eas brasileiro",!0),new J.i18n.Language("ru",J.i18n.GT.$("Russian"),"\u0420\u0443\u0441\u0441\u043a\u0438\u0439",!0),new J.i18n.Language("sl",J.i18n.GT.$("Slovenian"),"Sloven\u0161\u010dina",!1),new J.i18n.Language("sr",
J.i18n.GT.$("Serbian"),"\u0441\u0440\u043f\u0441\u043a\u0438 \u0458\u0435\u0437\u0438\u043a",!1),new J.i18n.Language("sv",J.i18n.GT.$("Swedish"),"Svenska",!0),new J.i18n.Language("ta",J.i18n.GT.$("Tamil"),"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",!1),new J.i18n.Language("te",J.i18n.GT.$("Telugu"),"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",!1),new J.i18n.Language("tr",J.i18n.GT.$("Turkish"),"T\u00fcrk\u00e7e",!0),new J.i18n.Language("ug",J.i18n.GT.$("Uyghur"),"Uy\u01a3urq\u0259",!1),new J.i18n.Language("uk",J.i18n.GT.$("Ukrainian"),
"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",!0),new J.i18n.Language("uz",J.i18n.GT.$("Uzbek"),"O'zbek",!1),new J.i18n.Language("zh_CN",J.i18n.GT.$("Simplified Chinese"),"\u7b80\u4f53\u4e2d\u6587",!0),new J.i18n.Language("zh_TW",J.i18n.GT.$("Traditional Chinese"),"\u7e41\u9ad4\u4e2d\u6587",!0)])});b.getSupported=c(b,"getSupported",function(a,d){for(var b=a.length;0<=--b;)if(a[b].code.equalsIgnoreCase(d))return a[b].code;for(b=a.length;0<=--b;)if(a[b].code.startsWith(d))return a[b].code;
return null},"~A,~S")});n("J.i18n");z(null,"J.i18n.Resource","java.util.Hashtable JU.PT $.Rdr J.translation.PO JU.Logger JV.FileManager".split(" "),function(){var b=w(function(){this.resourceMap=this.resource=null;q(this,arguments)},J.i18n,"Resource",null);x(b,function(a,d){null==d?this.resourceMap=a:this.resource=a},"~O,~S");b.getResource=c(b,"getResource",function(a,d,b){try{var c=JV.FileManager.getBufferedReaderForResource(a,J.translation.PO,"J/translation/",(0<=d.indexOf("Applet")?"JmolApplet/":
"Jmol/")+b+".po"),e=Array(1);JU.Rdr.readAllAsString(c,2147483647,!1,e,0);return J.i18n.Resource.getResourceFromPO(e[0])}catch(f){if(D(f,"java.io.IOException"))return null;throw f;}},"JV.Viewer,~S,~S");c(b,"getString",function(a){try{return null==this.resource?this.resourceMap.get(a):this.resource.getString(a)}catch(d){if(D(d,Exception))return null;throw d;}},"~S");b.getLanguage=c(b,"getLanguage",function(){var a=null;return a=Jmol.featureDetection.getDefaultLanguage().replace(/-/g,"_")});b.getResourceFromPO=
c(b,"getResourceFromPO",function(a){if(null==a||0==a.length)return null;var d=new java.util.Hashtable;try{var b=JU.PT.split(a,"\n");a=0;for(var c="",e="",f=0;f<b.length;f++){var j=b[f];2>=j.length?(2==a&&(0!=c.length&&0!=e.length)&&d.put(e,c),a=0):0==j.indexOf("msgid")?(a=1,e=J.i18n.Resource.fix(j)):0==j.indexOf("msgstr")?(a=2,c=J.i18n.Resource.fix(j)):1==a?e+=J.i18n.Resource.fix(j):2==a&&(c+=J.i18n.Resource.fix(j))}}catch(k){if(!D(k,Exception))throw k;}JU.Logger.info(d.size()+" translations loaded");
return 0==d.size()?null:new J.i18n.Resource(d,null)},"~S");b.fix=c(b,"fix",function(a){0<=a.indexOf('\\"')&&(a=JU.PT.rep(a,'\\"','"'));return JU.PT.rep(a.substring(a.indexOf('"')+1,a.lastIndexOf('"')),"\\n","\n")},"~S")});n("J.io");z(null,"J.io.FileReader","java.io.BufferedReader JU.AU $.PT $.Rdr J.api.Interface JU.Logger".split(" "),function(){var b=w(function(){this.htParams=this.readerOrDocument=this.atomSetCollection=this.fileTypeIn=this.nameAsGivenIn=this.fullPathNameIn=this.fileNameIn=this.vwr=
null;this.isAppend=!1;this.bytesOrStream=null;q(this,arguments)},J.io,"FileReader",null);x(b,function(a,d,b,c,e,f,j,k){this.vwr=a;this.fileNameIn=null==d?b:d;this.fullPathNameIn=null==b?this.fileNameIn:b;this.nameAsGivenIn=null==c?this.fileNameIn:c;this.fileTypeIn=e;null!=f&&(JU.AU.isAB(f)||C(f,"java.io.BufferedInputStream")?(this.bytesOrStream=f,f=null):C(f,"java.io.Reader")&&!C(f,"java.io.BufferedReader")&&(f=new java.io.BufferedReader(f)));this.readerOrDocument=f;this.htParams=j;this.isAppend=
k},"JV.Viewer,~S,~S,~S,~S,~O,java.util.Map,~B");c(b,"run",function(){!this.isAppend&&this.vwr.displayLoadErrors&&this.vwr.zap(!1,!0,!1);var a=null,d=null;this.fullPathNameIn.contains("#_DOCACHE_")&&(this.readerOrDocument=J.io.FileReader.getChangeableReader(this.vwr,this.nameAsGivenIn,this.fullPathNameIn));if(null==this.readerOrDocument){d=this.vwr.fm.getUnzippedReaderOrStreamFromName(this.fullPathNameIn,this.bytesOrStream,!0,!1,!1,!0,this.htParams);if(null==d||"string"==typeof d){a=null==d?"error opening:"+
this.nameAsGivenIn:d;a.startsWith("NOTE:")||JU.Logger.error("file ERROR: "+this.fullPathNameIn+"\n"+a);this.atomSetCollection=a;return}if(C(d,"java.io.BufferedReader"))this.readerOrDocument=d;else if(C(d,"javajs.api.ZInputStream")){var a=this.fullPathNameIn,b=null,a=a.$replace("\\","/");0<=a.indexOf("|")&&!a.endsWith(".zip")&&(b=JU.PT.split(a,"|"),a=b[0]);null!=b&&this.htParams.put("subFileList",b);b=d;d=this.vwr.fm.getZipDirectory(a,!0,!0);this.atomSetCollection=d=this.vwr.fm.getJzu().getAtomSetCollectionOrBufferedReaderFromZip(this.vwr,
b,a,d,this.htParams,1,!1);try{b.close()}catch(c){if(!D(c,Exception))throw c;}}}C(d,"java.io.BufferedInputStream")&&(this.readerOrDocument=J.api.Interface.getInterface("JU.BinaryDocument",this.vwr,"file").setStream(d,!this.htParams.containsKey("isLittleEndian")));if(null!=this.readerOrDocument){this.atomSetCollection=this.vwr.getModelAdapter().getAtomSetCollectionReader(this.fullPathNameIn,this.fileTypeIn,this.readerOrDocument,this.htParams);"string"!=typeof this.atomSetCollection&&(this.atomSetCollection=
this.vwr.getModelAdapter().getAtomSetCollection(this.atomSetCollection));try{C(this.readerOrDocument,"java.io.BufferedReader")?this.readerOrDocument.close():C(this.readerOrDocument,"javajs.api.GenericBinaryDocument")&&this.readerOrDocument.close()}catch(e){if(!D(e,"java.io.IOException"))throw e;}}"string"!=typeof this.atomSetCollection&&(!this.isAppend&&!this.vwr.displayLoadErrors&&this.vwr.zap(!1,!0,!1),this.vwr.fm.setFileInfo(u(-1,[this.fullPathNameIn,this.fileNameIn,this.nameAsGivenIn])))});b.getChangeableReader=
c(b,"getChangeableReader",function(a,d,b){return JU.Rdr.getBR(a.getLigandModel(d,b,"_file",null))},"JV.Viewer,~S,~S");c(b,"getAtomSetCollection",function(){return this.atomSetCollection})});n("J.render");z(["J.render.ShapeRenderer"],"J.render.BallsRenderer",["J.shape.Shape"],function(){var b=G(J.render,"BallsRenderer",J.render.ShapeRenderer);g(b,"render",function(){var a=!1;if(this.isExport||this.vwr.checkMotionRendering(1153433601))for(var d=this.ms.at,b=this.shape.colixes,c=this.vwr.shm.bsRenderableAtoms,
e=c.nextSetBit(0);0<=e;e=c.nextSetBit(e+1)){var f=d[e];0<f.sD&&0!=(f.shapeVisibilityFlags&this.myVisibilityFlag)&&(this.g3d.setC(null==b?f.colixAtom:J.shape.Shape.getColix(b,e,f))?this.g3d.drawAtom(f,0):a=!0)}return a})});n("J.render");z(["J.render.ShapeRenderer","JU.P3","$.P3i","$.V3"],"J.render.FontLineShapeRenderer",["JU.PT"],function(){var b=w(function(){this.colixB=this.colixA=0;this.dotsOrDashes=!1;this.dashDots=null;this.asLineOnly=!1;this.imageFontScaling=0;this.tickInfo=this.vectorT3=this.vectorT2=
this.vectorT=this.pointT3=this.pointT2=this.pointT=this.s2=this.s1=this.pt2i=this.pt0i=this.font3d=this.tickBs=this.tickAs=this.tickB=this.tickA=null;this.draw000=!0;this.width=0;this.endcap=3;this.pt1=this.pt0=null;q(this,arguments)},J.render,"FontLineShapeRenderer",J.render.ShapeRenderer);N(b,function(){this.pt0i=new JU.P3i;this.pt2i=new JU.P3i;this.s1=new JU.P3i;this.s2=new JU.P3i;this.pointT=new JU.P3;this.pointT2=new JU.P3;this.pointT3=new JU.P3;this.vectorT=new JU.V3;this.vectorT2=new JU.V3;
this.vectorT3=new JU.V3;this.pt0=new JU.P3;this.pt1=new JU.P3});c(b,"getDiameter",function(a,d){var b;b=20<d;switch(this.exportType){case 1:b=b?d:v(Math.floor(1E3*this.vwr.tm.unscaleToScreen(a,2*d/10)));break;default:b?b=F(this.vwr.tm.scaleToScreen(a,v(d/10))):(this.g3d.isAntialiased()&&(d+=d),b=d)}return b},"~N,~N");c(b,"renderLine",function(a,d,b,c){0>b?this.g3d.drawDashedLineBits(8,4,a,d):this.g3d.fillCylinderBits(this.endcap,1==this.exportType?-b:b,a,d);c&&null!=this.tickInfo&&(this.checkTickTemps(),
this.tickAs.setT(a),this.tickBs.setT(d),this.drawTicks(b,!0))},"JU.P3,JU.P3,~N,~B");c(b,"checkTickTemps",function(){null==this.tickA&&(this.tickA=new JU.P3,this.tickB=new JU.P3,this.tickAs=new JU.P3,this.tickBs=new JU.P3)});c(b,"drawTicks",function(a,d){Float.isNaN(this.tickInfo.first)&&(this.tickInfo.first=0);this.drawTicks2(this.tickInfo.ticks.x,8,a,!d?null:null==this.tickInfo.tickLabelFormats?u(-1,["%0.2f"]):this.tickInfo.tickLabelFormats);this.drawTicks2(this.tickInfo.ticks.y,4,a,null);this.drawTicks2(this.tickInfo.ticks.z,
2,a,null)},"~N,~B");c(b,"drawTicks2",function(a,d,b,c){if(0!=a&&(this.g3d.isAntialiased()&&(d*=2),this.vectorT2.set(this.tickBs.x,this.tickBs.y,0),this.vectorT.set(this.tickAs.x,this.tickAs.y,0),this.vectorT2.sub(this.vectorT),!(50>this.vectorT2.length()))){var e=this.tickInfo.signFactor;this.vectorT.sub2(this.tickB,this.tickA);var f=this.vectorT.length();if(null!=this.tickInfo.scale)if(Float.isNaN(this.tickInfo.scale.x)){var j=this.vwr.getUnitCellInfo(0);Float.isNaN(j)||this.vectorT.set(this.vectorT.x/
j,this.vectorT.y/this.vwr.getUnitCellInfo(1),this.vectorT.z/this.vwr.getUnitCellInfo(2))}else this.vectorT.set(this.vectorT.x*this.tickInfo.scale.x,this.vectorT.y*this.tickInfo.scale.y,this.vectorT.z*this.tickInfo.scale.z);j=this.vectorT.length()+1E-4*a;if(!(j<a)){this.vectorT.scale(a/j*f/j);var f=(this.tickBs.z-this.tickAs.z)/(j/a),j=j+this.tickInfo.first,k=v(Math.floor(this.tickInfo.first/a))*a-this.tickInfo.first;this.pointT.scaleAdd2(k/a,this.vectorT,this.tickA);var k=k+this.tickInfo.first,l=
this.tickAs.z;0>b&&(b=1);this.vectorT2.set(-this.vectorT2.y,this.vectorT2.x,0);this.vectorT2.scale(d/this.vectorT2.length());d=this.tickInfo.reference;null==d?(this.pointT3.setT(this.vwr.getBoundBoxCenter()),603979809==this.vwr.g.axesMode&&this.pointT3.add3(1,1,1)):this.pointT3.setT(d);this.tm.transformPtScr(this.pointT3,this.pt2i);d=0.2>Math.abs(this.vectorT2.x/this.vectorT2.y);for(var g=!d,m=!d&&0>this.vectorT2.x,p=null!=c&&0<c.length,y,A,n=Array(1),q=this.draw000?0:-1;k<j;){if(k>=this.tickInfo.first&&
(this.pointT2.setT(this.pointT),this.tm.transformPt3f(this.pointT2,this.pointT2),this.drawLine(v(Math.floor(this.pointT2.x)),v(Math.floor(this.pointT2.y)),F(l),y=v(Math.floor(this.pointT2.x+this.vectorT2.x)),A=v(Math.floor(this.pointT2.y+this.vectorT2.y)),F(l),b),p&&(this.draw000||0!=k))){n[0]=Float.$valueOf(0==k?0:k*e);var u=JU.PT.sprintf(c[q%c.length],"f",n);this.drawString(y,A,F(l),4,m,d,g,v(Math.floor(this.pointT2.y)),u)}this.pointT.add(this.vectorT);k+=a;l+=f;q++}}}},"~N,~N,~N,~A");c(b,"drawLine",
function(a,d,b,c,e,f,j){return this.drawLine2(this.g3d,a,d,b,c,e,f,j)},"~N,~N,~N,~N,~N,~N,~N");c(b,"drawLine2",function(a,d,b,c,e,f,j,k){this.pt0.set(d,b,c);this.pt1.set(e,f,j);if(this.dotsOrDashes)null!=this.dashDots&&J.render.FontLineShapeRenderer.drawDashedCylinder(a,d,b,c,e,f,j,this.dashDots,this.width,this.colixA,this.colixB,!this.isExport||1==this.mad?this.width:this.mad,this.asLineOnly,this.s1);else{if(0>k)return a.drawDashedLineBits(8,4,this.pt0,this.pt1),1;a.fillCylinderBits(2,k,this.pt0,
this.pt1)}return v((k+1)/2)},"J.api.JmolRendererInterface,~N,~N,~N,~N,~N,~N,~N");c(b,"drawString",function(a,d,b,c,e,f,j,k,l){if(null!=l){var g=this.font3d.stringWidth(l),m=this.font3d.getAscent();a=e?a-(v(c/2)+2+g):f?a-(v(c/2)+2+v(g/2)):a+(v(c/2)+2);e=d;e=j?e+v(m/2):0==k||k<d?e+m:e-v(c/2);d=b-c-2;1>d&&(d=1);this.g3d.drawString(l,this.font3d,a,e,d,d,0)}},"~N,~N,~N,~N,~B,~B,~B,~N,~S");b.drawDashedCylinder=c(b,"drawDashedCylinder",function(a,d,b,c,e,f,j,k,l,g,m,p,y,A){if(!(null==k||0>l)){var n=k[0];
e-=d;f-=b;j-=c;var q=0,u=k===J.render.FontLineShapeRenderer.ndots,w=u||k===J.render.FontLineShapeRenderer.sixdots;if(w){null==A&&(A=new JU.P3i);var x=(e*e+f*f)/(l*l);u?(n=Math.sqrt(x)/1.5,q=F(n)+2):8>x?k=J.render.FontLineShapeRenderer.twodots:32>x&&(k=J.render.FontLineShapeRenderer.fourdots)}var x=k[1],B=k[2],z=g,C=0==B?m:g;0==q&&(q=k.length);for(var D=0,E=3;E<q;E++){var D=u?D+1:k[E],G=v(Math.floor(d+e*D/n)),I=v(Math.floor(b+f*D/n)),K=v(Math.floor(c+j*D/n));if(w)A.set(G,I,K),E==x?a.setC(g):E==B&&
a.setC(m),a.fillSphereI(l,A);else{E==x&&(z=m);D=k[++E];E==B&&(C=m);var L=v(Math.floor(d+e*D/n)),N=v(Math.floor(b+f*D/n)),O=v(Math.floor(c+j*D/n));J.render.FontLineShapeRenderer.fillCylinder(a,z,C,2,G,I,K,L,N,O,p,y)}}}},"J.api.JmolRendererInterface,~N,~N,~N,~N,~N,~N,~A,~N,~N,~N,~N,~B,JU.P3i");b.fillCylinder=c(b,"fillCylinder",function(a,d,b,c,e,f,j,k,l,g,m,p){p?a.drawLine(d,b,e,f,j,k,l,g):a.fillCylinderXYZ(d,b,c,m,e,f,j,k,l,g)},"J.api.JmolRendererInterface,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~B");b.dashes=
E(-1,[12,0,0,2,5,7,10]);b.hDashes=E(-1,[10,7,6,1,3,4,6,7,9]);b.pymoldashes=E(-1,[30,0,0,2,4,7,9,12,14,17,19,22,24,27,30]);b.ndots=E(-1,[0,3,1E3]);b.sixdots=E(-1,[12,3,6,1,3,5,7,9,11]);b.fourdots=E(-1,[13,3,5,2,5,8,11]);b.twodots=E(-1,[12,3,4,3,9])});n("J.render");z(["J.render.ShapeRenderer"],"J.render.FrankRenderer",["J.shape.Frank","JV.Viewer"],function(){var b=G(J.render,"FrankRenderer",J.render.ShapeRenderer);g(b,"render",function(){var a=this.shape,d=this.vwr.getBooleanProperty("allowKeyStrokes"),
b=this.vwr.getBoolean(603983903);this.colix=b?20:this.vwr.isSignedApplet?d||(JV.Viewer.isJS||JV.Viewer.isSwingJS)&&!this.vwr.isWebGL?5:10:d?7:12;if(this.isExport||!this.vwr.getShowFrank()||!this.g3d.setC(this.colix))return!1;if(this.vwr.frankOn&&!this.vwr.noFrankEcho)return this.vwr.noFrankEcho;this.vwr.noFrankEcho=!0;d=this.vwr.imageFontScaling;a.getFont(d);d=F(a.frankWidth+4*d);this.g3d.drawStringNoSlab(J.shape.Frank.frankString,a.font3d,this.vwr.gdata.width-d,this.vwr.gdata.height-a.frankDescent,
0,0);a=b?this.vwr.getModelkit(!1):null;b&&!a.isHidden()&&(this.g3d.setC(12),this.g3d.fillTextRect(0,0,1,0,10,104),b=a.getActiveMenu(),null!=b&&("atomMenu".equals(b)?(this.g3d.setC(21),this.g3d.fillTextRect(0,0,0,0,10,26)):"bondMenu".equals(b)?(this.g3d.setC(7),this.g3d.fillTextRect(0,26,0,0,10,26)):"xtalMenu".equals(b)&&(this.g3d.setC(8),this.g3d.fillTextRect(0,52,0,0,10,26))));return!1})});n("J.render");z(["J.api.JmolRepaintManager","JU.BS"],"J.render.RepaintManager",["J.api.Interface","JU.Logger",
"JV.JC","$.Viewer"],function(){var b=w(function(){this.bsTranslucent=this.renderers=this.shapeManager=this.vwr=null;this.holdRepaint=0;this.repaintPending=!1;q(this,arguments)},J.render,"RepaintManager",null,J.api.JmolRepaintManager);N(b,function(){this.bsTranslucent=JU.BS.newN(37)});x(b,function(){});g(b,"set",function(a,d){this.vwr=a;this.shapeManager=d},"JV.Viewer,JV.ShapeManager");g(b,"isRepaintPending",function(){return this.repaintPending});g(b,"pushHoldRepaint",function(){++this.holdRepaint},
"~S");g(b,"popHoldRepaint",function(a,d){null!=d&&d.startsWith("CLEAR HOLD")&&(this.holdRepaint=0,a=!0);--this.holdRepaint;0>=this.holdRepaint&&(this.holdRepaint=0,a&&(this.repaintPending=!0,this.repaintNow(d)))},"~B,~S");g(b,"requestRepaintAndWait",function(a){var d=null;JV.Viewer.isJS&&!JV.Viewer.isSwingJS&&(d=self.Jmol&&Jmol.repaint?Jmol:null);if(null==d)try{this.repaintNow(a),JV.Viewer.isJS||this.wait(this.vwr.g.repaintWaitMs),this.repaintPending&&(JU.Logger.error("repaintManager requestRepaintAndWait timeout"),
this.repaintDone())}catch(b){if(D(b,"InterruptedException"))System.out.println("repaintManager requestRepaintAndWait interrupted thread="+Thread.currentThread().getName());else throw b;}else d.repaint(this.vwr.html5Applet,!1),this.repaintDone()},"~S");g(b,"repaintIfReady",function(a){if(this.repaintPending)return!1;this.repaintPending=!0;0==this.holdRepaint&&this.repaintNow(a);return!0},"~S");c(b,"repaintNow",function(){this.vwr.haveDisplay&&this.vwr.apiPlatform.repaint(this.vwr.display)},"~S");g(b,
"repaintDone",function(){this.repaintPending=!1});g(b,"clear",function(a){if(null!=this.renderers)if(0<=a)this.renderers[a]=null;else for(a=0;37>a;++a)this.renderers[a]=null},"~N");c(b,"getRenderer",function(a){if(null!=this.renderers[a])return this.renderers[a];var d=JV.JC.getShapeClassName(a,!0)+"Renderer";if(null==(d=J.api.Interface.getInterface(d,this.vwr,"render")))return null;d.setViewerG3dShapeID(this.vwr,a);return this.renderers[a]=d},"~N");g(b,"render",function(a,d,b,c){null==this.renderers&&
(this.renderers=Array(37));this.getAllRenderers();try{var e=this.vwr.getBoolean(603979934);a.renderBackground(null);if(b){this.bsTranslucent.clearAll();null!=c&&a.renderCrossHairs(c,this.vwr.getScreenWidth(),this.vwr.getScreenHeight(),this.vwr.tm.getNavigationOffset(),this.vwr.tm.navigationDepthPercent);var f=this.vwr.getRubberBandSelection();null!=f&&a.setC(this.vwr.cm.colixRubberband)&&a.drawRect(f.x,f.y,0,0,f.width,f.height);this.vwr.noFrankEcho=!0}c=null;var j=this.shapeManager.getShape(1);j.haveStrutPoints=
!1;for(f=0;37>f&&a.currentlyRendering;++f){var k=this.shapeManager.getShape(f);null!=k&&(e&&(c="rendering "+JV.JC.getShapeClassName(f,!1),JU.Logger.startTimer(c)),(b||this.bsTranslucent.get(f))&&this.getRenderer(f).renderShape(a,d,k,0)&&this.bsTranslucent.set(f),e&&JU.Logger.checkTimer(c,!1))}j.haveStrutPoints&&this.getRenderer(1).renderShape(a,d,j,1);a.renderAllStrings(null)}catch(l){if(D(l,Exception)){l.printStackTrace();if(this.vwr.async&&"Interface".equals(l.getMessage()))throw new NullPointerException;
JU.Logger.error("rendering error? "+l)}else throw l;}},"JU.GData,JM.ModelSet,~B,~A");c(b,"getAllRenderers",function(){for(var a=!0,d=0;37>d;++d)null==this.shapeManager.getShape(d)||null!=this.getRenderer(d)||(a=this.repaintPending=!this.vwr.async);if(!a)throw new NullPointerException;});g(b,"renderExport",function(a,d,b){this.shapeManager.finalizeAtoms(null,!0);a=this.vwr.initializeExporter(b);if(null==a)return JU.Logger.error("Cannot export "+b.get("type")),null;null==this.renderers&&(this.renderers=
Array(37));this.getAllRenderers();b=null;try{var c=this.vwr.getBoolean(603979934);a.renderBackground(a);var e=this.shapeManager.getShape(1);e.haveStrutPoints=!1;for(var f=0;37>f;++f){var j=this.shapeManager.getShape(f);null!=j&&(c&&(b="rendering "+JV.JC.getShapeClassName(f,!1),JU.Logger.startTimer(b)),this.getRenderer(f).renderShape(a,d,j,0),c&&JU.Logger.checkTimer(b,!1))}e.haveStrutPoints&&this.getRenderer(1).renderShape(a,d,e,1);a.renderAllStrings(a);b=a.finalizeOutput()}catch(k){if(D(k,Exception))k.printStackTrace(),
JU.Logger.error("rendering error? "+k);else throw k;}return b},"JU.GData,JM.ModelSet,java.util.Map")});n("J.render");z(null,"J.render.ShapeRenderer",["JV.JC"],function(){var b=w(function(){this.shape=this.ms=this.g3d=this.tm=this.vwr=null;this.exportType=this.mad=this.colix=this.shapeID=this.myVisibilityFlag=0;this.isExport=!1;this.flags=0;q(this,arguments)},J.render,"ShapeRenderer",null);c(b,"initRenderer",function(){});c(b,"setViewerG3dShapeID",function(a,d){this.vwr=a;this.tm=a.tm;this.shapeID=
d;this.myVisibilityFlag=JV.JC.getShapeVisibilityFlag(d);this.initRenderer()},"JV.Viewer,~N");c(b,"renderShape",function(a,d,b,c){this.setup(a,d,b);this.flags=c;a=this.render();this.exportType=0;this.isExport=!1;return a},"J.api.JmolRendererInterface,JM.ModelSet,J.shape.Shape,~N");c(b,"setup",function(a,d,b){this.g3d=a;this.ms=d;this.shape=b;this.exportType=a.getExportType();this.isExport=0!=this.exportType},"J.api.JmolRendererInterface,JM.ModelSet,J.shape.Shape");c(b,"isVisibleForMe",function(a){return null!=
a&&a.isVisible(this.myVisibilityFlag|9)},"JM.Atom")});n("J.render");z(["J.render.FontLineShapeRenderer","JU.BS","$.P3","$.V3"],"J.render.SticksRenderer",["JU.A4","$.M3","J.c.PAL","JU.C","$.Edge"],function(){var b=w(function(){this.showMultipleBonds=!1;this.multipleBondRadiusFactor=this.multipleBondSpacing=0;this.useBananas=this.bondsPerp=!1;this.modeMultipleBond=0;this.isCartesian=!1;this.endcaps=0;this.hbondsSolid=this.bondsBackbone=this.hbondsBackbone=this.ssbondsBackbone=!1;this.bond=this.pb=this.pa=
this.b=this.a=null;this.bondOrder=this.mag2d=this.dy=this.dx=this.zB=this.yB=this.xB=this.zA=this.yA=this.xA=0;this.slabByAtom=this.slabbing=this.isAntialiased=this.wireframeOnly=!1;this.bsForPass2=this.p2=this.p1=this.z=this.y=this.x=null;this.strutsOnly=this.isPymol=this.isPass2=!1;this.dyStep=this.dxStep=this.yAxis2=this.xAxis2=this.yAxis1=this.xAxis1=0;this.a4=this.rot=null;q(this,arguments)},J.render,"SticksRenderer",J.render.FontLineShapeRenderer);N(b,function(){this.x=new JU.V3;this.y=new JU.V3;
this.z=new JU.V3;this.p1=new JU.P3;this.p2=new JU.P3;this.bsForPass2=JU.BS.newN(64)});g(b,"render",function(){var a=this.ms.bo;if(null==a)return!1;(this.isPass2=this.vwr.gdata.isPass2)||this.bsForPass2.clearAll();this.slabbing=this.tm.slabEnabled;this.slabByAtom=this.vwr.getBoolean(603979939);this.endcaps=3;this.dashDots=this.vwr.getBoolean(603979893)?J.render.FontLineShapeRenderer.sixdots:J.render.FontLineShapeRenderer.dashes;this.isCartesian=1==this.exportType;this.getMultipleBondSettings(0);this.wireframeOnly=
!this.vwr.checkMotionRendering(1677721602);this.ssbondsBackbone=this.vwr.getBoolean(603979952);this.hbondsBackbone=this.vwr.getBoolean(603979852);this.bondsBackbone=(new Boolean(this.hbondsBackbone|this.ssbondsBackbone)).valueOf();this.hbondsSolid=this.vwr.getBoolean(603979854);this.isAntialiased=this.g3d.isAntialiased();this.strutsOnly=0!=(this.flags&1);var d=!1;if(this.isPass2)for(var b=this.bsForPass2.nextSetBit(0);0<=b;b=this.bsForPass2.nextSetBit(b+1))this.bond=a[b],null!=this.bond&&this.renderBond(b);
else for(b=this.ms.bondCount;0<=--b;)this.bond=a[b],null!=this.bond&&(0!=(this.bond.shapeVisibilityFlags&this.myVisibilityFlag)&&this.renderBond(b))&&(d=!0,this.bsForPass2.set(b));return d});c(b,"renderBond",function(){var a,d;this.a=a=this.bond.atom1;this.b=d=this.bond.atom2;var b=this.bond.order&131071;this.bondsBackbone&&(this.ssbondsBackbone&&0!=(b&256)?(this.a=this.a.group.getLeadAtomOr(this.a),this.b=this.b.group.getLeadAtomOr(this.b)):this.hbondsBackbone&&JU.Edge.isOrderH(b)&&(this.a=this.a.group.getLeadAtomOr(this.a),
this.b=this.b.group.getLeadAtomOr(this.b)));if(!this.isPass2&&(!this.a.isVisible(9)||!this.b.isVisible(9)||!this.g3d.isInDisplayRange(this.a.sX,this.a.sY)||!this.g3d.isInDisplayRange(this.b.sX,this.b.sY)))return!1;if(this.slabbing){var c=this.vwr.gdata.isClippedZ(this.a.sZ);if(c&&this.vwr.gdata.isClippedZ(this.b.sZ)||this.slabByAtom&&(c||this.vwr.gdata.isClippedZ(this.b.sZ)))return!1}this.zA=this.a.sZ;this.zB=this.b.sZ;if(1==this.zA||1==this.zB)return!1;this.colixA=a.colixAtom;this.colixB=d.colixAtom;
2==((this.colix=this.bond.colix)&-30721)?(this.colix&=30720,this.colixA=JU.C.getColixInherited(this.colix|this.vwr.cm.getColixAtomPalette(a,J.c.PAL.CPK.id),this.colixA),this.colixB=JU.C.getColixInherited(this.colix|this.vwr.cm.getColixAtomPalette(d,J.c.PAL.CPK.id),this.colixB)):(this.colixA=JU.C.getColixInherited(this.colix,this.colixA),this.colixB=JU.C.getColixInherited(this.colix,this.colixB));d=a=!1;this.bondOrder=b&131071;c=32768==this.bondOrder;this.strutsOnly!=c&&(c&&(this.shape.haveStrutPoints=
!0,this.isPass2||(this.a.group.unsetStrutPoint(),this.b.group.unsetStrutPoint())),d=!0);if(!this.isExport&&!this.isPass2){var e=!JU.C.renderPass2(this.colixA),f=!JU.C.renderPass2(this.colixB);if(!e||!f){if(c||!e&&!f)d=!0;this.g3d.setC(!e?this.colixB:this.colixA);a=!0}}if(d)return a;e=this.bond.isPartial();if(!e&&(0!=(this.bondOrder&256)&&(this.bondOrder&=-257),0!=(this.bondOrder&1023)&&(!this.showMultipleBonds||2==this.modeMultipleBond&&1E3<this.mad||65536==(this.bondOrder&98304))))this.bondOrder=
1;this.pa=this.a;this.pb=this.b;d=0;switch(this.bondOrder){case 1025:case 1041:case 1057:this.bondOrder=1;case 1:case 2:case 3:case 4:case 5:case 6:break;case 17:case 513:this.bondOrder=1;d=513==b?0:1;break;case 515:case 514:this.bondOrder=2;d=515==b?this.getAromaticDottedBondMask():0;break;default:98304==(this.bondOrder&98304)?(this.getMultipleBondSettings(this.bondOrder),this.bondOrder&=3,d=-2):e?(this.bondOrder=JU.Edge.getPartialBondOrder(b),d=JU.Edge.getPartialBondDotted(b)):JU.Edge.isOrderH(this.bondOrder)?
(this.bondOrder=1,this.hbondsSolid||(d=-1)):c&&(this.bondOrder=1,b=this.b.group.strutPoint,this.pa=this.setStrutPoint(this.a.group.strutPoint,this.pa),this.pb=this.setStrutPoint(b,this.pb),this.zA=this.pa.sZ,this.zB=this.pb.sZ)}this.xA=this.pa.sX;this.yA=this.pa.sY;this.xB=this.pb.sX;this.yB=this.pb.sY;this.mad=this.bond.mad;0<this.multipleBondRadiusFactor&&1<this.bondOrder&&(this.mad*=this.multipleBondRadiusFactor);this.dx=this.xB-this.xA;this.dy=this.yB-this.yA;this.width=F(this.vwr.tm.scaleToScreen(v((this.zA+
this.zB)/2),this.mad));this.wireframeOnly&&0<this.width&&(this.width=1);if(!this.isCartesian&&(this.asLineOnly=1>=this.width)&&this.isAntialiased)this.width=3,this.asLineOnly=!1;b=!this.isExport||1==this.mad?this.width:this.mad;switch(d){case -2:this.drawBond(0);this.getMultipleBondSettings(0);break;case -1:J.render.FontLineShapeRenderer.drawDashedCylinder(this.g3d,this.xA,this.yA,this.zA,this.xB,this.yB,this.zB,J.render.FontLineShapeRenderer.hDashes,this.width,this.colixA,this.colixB,b,this.asLineOnly,
this.s1);break;default:switch(this.bondOrder){case 4:this.bondOrder=2;b=this.multipleBondRadiusFactor;0==b&&1<this.width&&(this.width=v(0.5*this.width));b=this.multipleBondSpacing;0>b&&(this.multipleBondSpacing=0.3);this.drawBond(d);this.bondsPerp=!this.bondsPerp;this.bondOrder=2;this.drawBond(d>>2);this.bondsPerp=!this.bondsPerp;this.multipleBondSpacing=b;this.isPymol=!1;break;case 5:this.bondOrder=3;b=this.multipleBondRadiusFactor;0==b&&1<this.width&&(this.width=v(0.5*this.width));b=this.multipleBondSpacing;
0>b&&(this.multipleBondSpacing=0.2);this.drawBond(d);this.bondsPerp=!this.bondsPerp;this.bondOrder=2;this.multipleBondSpacing*=1.5;this.drawBond(d>>3);this.bondsPerp=!this.bondsPerp;this.multipleBondSpacing=b;this.isPymol=!1;break;case 6:this.bondOrder=4;b=this.multipleBondRadiusFactor;0==b&&1<this.width&&(this.width=v(0.5*this.width));b=this.multipleBondSpacing;0>b&&(this.multipleBondSpacing=0.15);this.drawBond(d);this.bondsPerp=!this.bondsPerp;this.bondOrder=2;this.multipleBondSpacing*=1.5;this.drawBond(d>>
4);this.bondsPerp=!this.bondsPerp;this.multipleBondSpacing=b;this.isPymol=!1;break;default:this.drawBond(d)}}return a},"~N");c(b,"setStrutPoint",function(a,d){if(-2147483648==a.sX)return d;var b=this.vwr.tm.transformPt(a);a.sX=b.x;a.sY=b.y;a.sZ=b.z;return a},"JU.Point3fi,JU.Point3fi");c(b,"getMultipleBondSettings",function(a){if(this.isPymol=0!=a){this.bondsPerp=!1;var d=(a>>2&63)/50;this.showMultipleBonds=0!=d;this.multipleBondRadiusFactor=2*d/(3*(a&3)-1);this.multipleBondSpacing=3*this.multipleBondRadiusFactor/
2*v(this.bond.mad/1E3)}else this.useBananas=this.vwr.getBoolean(603979886)&&!this.isPymol,this.multipleBondSpacing=this.vwr.getFloat(570425370),this.multipleBondRadiusFactor=this.vwr.getFloat(570425369),this.bondsPerp=this.useBananas||0<this.multipleBondSpacing&&0>this.multipleBondRadiusFactor,this.useBananas&&(this.multipleBondSpacing=0>this.multipleBondSpacing?0.4*-this.multipleBondSpacing:this.multipleBondSpacing),this.multipleBondRadiusFactor=Math.abs(this.multipleBondRadiusFactor),0==this.multipleBondSpacing&&
this.isCartesian&&(this.multipleBondSpacing=0.2);this.modeMultipleBond=this.vwr.g.modeMultipleBond;this.showMultipleBonds=0!=this.multipleBondSpacing&&0!=this.modeMultipleBond&&this.vwr.getBoolean(603979928)},"~N");c(b,"drawBond",function(a){var d=0!=(a&1),b=16384==(this.colixA&30720)||16384==(this.colixB&30720)?2:this.endcaps;if(this.isCartesian&&1==this.bondOrder&&!d)this.g3d.drawBond(this.pa,this.pb,this.colixA,this.colixB,b,this.mad,-1);else{var c=0==this.dx&&0==this.dy;if(!c||!this.asLineOnly||
this.isCartesian){var e=!this.isExport||1==this.mad?this.width:this.mad,f=1<this.bondOrder&&(this.isPymol||0<this.multipleBondSpacing),j=f&&(null!=this.vwr.getHybridizationAndAxes(this.a.i,this.z,this.x,"pz")||null!=this.vwr.getHybridizationAndAxes(this.b.i,this.z,this.x,"pz"))&&!Float.isNaN(this.x.x);if(c&&!f){a=v(this.width/8)+3;a=this.width+a;d=this.yA-v((this.bondOrder-1)*a/2);do J.render.FontLineShapeRenderer.fillCylinder(this.g3d,this.colixA,this.colixB,b,this.xA,d,this.zA,this.xB,d,this.zB,
e,this.asLineOnly),d+=a;while(0<--this.bondOrder)}else if(1==this.bondOrder)d?J.render.FontLineShapeRenderer.drawDashedCylinder(this.g3d,this.xA,this.yA,this.zA,this.xB,this.yB,this.zB,this.dashDots,this.width,this.colixA,this.colixB,e,this.asLineOnly,this.s1):J.render.FontLineShapeRenderer.fillCylinder(this.g3d,this.colixA,this.colixB,b,this.xA,this.yA,this.zA,this.xB,this.yB,this.zB,e,this.asLineOnly);else if(f)if(j||this.z.setT(JU.P3.getUnlikely()),this.x.sub2(this.b,this.a),this.y.cross(this.x,
this.z),this.y.normalize(),Float.isNaN(this.y.x)&&(this.z.setT(JU.P3.getUnlikely()),this.y.cross(this.x,this.z),this.y.cross(this.y,this.x),this.y.normalize()),this.bondsPerp&&this.y.cross(this.y,this.x),this.y.scale(this.multipleBondSpacing),this.x.setT(this.y),this.x.scale((this.bondOrder-1)/2),this.useBananas)switch(this.drawBanana(this.a,this.b,this.x,0),this.bondOrder){case 4:this.drawBanana(this.a,this.b,this.x,90),this.drawBanana(this.a,this.b,this.x,-90);default:this.drawBanana(this.a,this.b,
this.x,180);break;case 3:this.drawBanana(this.a,this.b,this.x,120),this.drawBanana(this.a,this.b,this.x,-120)}else{this.p1.sub2(this.a,this.x);for(this.p2.sub2(this.b,this.x);;){this.isCartesian?this.g3d.drawBond(this.p1,this.p2,this.colixA,this.colixB,b,this.mad,-2):(this.tm.transformPtScr(this.p1,this.s1),this.tm.transformPtScr(this.p2,this.s2),d?J.render.FontLineShapeRenderer.drawDashedCylinder(this.g3d,this.s1.x,this.s1.y,this.s1.z,this.s2.x,this.s2.y,this.s2.z,this.dashDots,this.width,this.colixA,
this.colixB,e,this.asLineOnly,this.s1):J.render.FontLineShapeRenderer.fillCylinder(this.g3d,this.colixA,this.colixB,b,this.s1.x,this.s1.y,this.s1.z,this.s2.x,this.s2.y,this.s2.z,e,this.asLineOnly));a>>=1;d=0!=(a&1);if(0>=--this.bondOrder)break;this.p1.add(this.y);this.p2.add(this.y);this.stepAxisCoordinates()}}else if(this.mag2d=Math.round(Math.sqrt(this.dx*this.dx+this.dy*this.dy)),this.resetAxisCoordinates(),this.isCartesian&&3==this.bondOrder)J.render.FontLineShapeRenderer.fillCylinder(this.g3d,
this.colixA,this.colixB,b,this.xAxis1,this.yAxis1,this.zA,this.xAxis2,this.yAxis2,this.zB,e,this.asLineOnly),this.stepAxisCoordinates(),this.x.sub2(this.b,this.a),this.x.scale(0.05),this.p1.sub2(this.a,this.x),this.p2.add2(this.b,this.x),this.g3d.drawBond(this.p1,this.p2,this.colixA,this.colixB,b,this.mad,-2),this.stepAxisCoordinates(),J.render.FontLineShapeRenderer.fillCylinder(this.g3d,this.colixA,this.colixB,b,this.xAxis1,this.yAxis1,this.zA,this.xAxis2,this.yAxis2,this.zB,e,this.asLineOnly);else for(;;){0!=
(a&1)?J.render.FontLineShapeRenderer.drawDashedCylinder(this.g3d,this.xAxis1,this.yAxis1,this.zA,this.xAxis2,this.yAxis2,this.zB,this.dashDots,this.width,this.colixA,this.colixB,e,this.asLineOnly,this.s1):J.render.FontLineShapeRenderer.fillCylinder(this.g3d,this.colixA,this.colixB,b,this.xAxis1,this.yAxis1,this.zA,this.xAxis2,this.yAxis2,this.zB,e,this.asLineOnly);a>>=1;if(0>=--this.bondOrder)break;this.stepAxisCoordinates()}}}},"~N");c(b,"resetAxisCoordinates",function(){var a=this.mag2d>>3;-1!=
this.multipleBondSpacing&&0>this.multipleBondSpacing&&(a*=-this.multipleBondSpacing);a=this.width+a;this.dxStep=v(a*this.dy/this.mag2d);this.dyStep=v(a*-this.dx/this.mag2d);this.xAxis1=this.xA;this.yAxis1=this.yA;this.xAxis2=this.xB;this.yAxis2=this.yB;a=this.bondOrder-1;this.xAxis1-=v(this.dxStep*a/2);this.yAxis1-=v(this.dyStep*a/2);this.xAxis2-=v(this.dxStep*a/2);this.yAxis2-=v(this.dyStep*a/2)});c(b,"stepAxisCoordinates",function(){this.xAxis1+=this.dxStep;this.yAxis1+=this.dyStep;this.xAxis2+=
this.dxStep;this.yAxis2+=this.dyStep});c(b,"getAromaticDottedBondMask",function(){var a=this.b.findAromaticNeighbor(this.a.i);return null==a?1:0>this.dx*(a.sY-this.yA)-this.dy*(a.sX-this.xA)?2:1});c(b,"drawBanana",function(a,d,b,c){this.g3d.addRenderer(553648143);this.vectorT.sub2(d,a);null==this.rot&&(this.rot=new JU.M3,this.a4=new JU.A4);this.a4.setVA(this.vectorT,3.141592653589793*c/180);this.rot.setAA(this.a4);this.pointT.setT(a);this.pointT3.setT(d);this.pointT2.ave(a,d);this.rot.rotate2(b,this.vectorT);
this.pointT2.add(this.vectorT);this.tm.transformPtScrT3(a,this.pointT);this.tm.transformPtScrT3(this.pointT2,this.pointT2);this.tm.transformPtScrT3(d,this.pointT3);a=Math.max(this.width,1);this.g3d.setC(this.colixA);this.g3d.fillHermite(5,a,a,a,this.pointT,this.pointT,this.pointT2,this.pointT3);this.g3d.setC(this.colixB);this.g3d.fillHermite(5,a,a,a,this.pointT,this.pointT2,this.pointT3,this.pointT3)},"JM.Atom,JM.Atom,JU.V3,~N")});n("JS");z(["JS.T"],"JS.ContextToken",["java.util.Hashtable","JS.SV"],
function(){var b=w(function(){this.name0=this.forVars=this.contextVariables=null;q(this,arguments)},JS,"ContextToken",JS.T);b.newContext=c(b,"newContext",function(a){a=a?JS.ContextToken.newCmd(1275335685,"{"):JS.ContextToken.newCmd(1275334681,"}");a.intValue=0;return a},"~B");b.newCmd=c(b,"newCmd",function(a,d){var b=new JS.ContextToken;b.tok=a;b.value=d;return b},"~N,~O");c(b,"addName",function(a){null==this.contextVariables&&(this.contextVariables=new java.util.Hashtable);this.contextVariables.put(a,
JS.SV.newS("").setName(a))},"~S")});n("JS");z(null,"JS.ScriptContext",["java.util.Hashtable","JS.SV"],function(){var b=w(function(){this.aatoken=null;this.chk=this.allowJSThreads=!1;this.contextPath=" >> ";this.vars=null;this.displayLoadErrorsSave=!1;this.errorType=this.errorMessageUntranslated=this.errorMessage=null;this.isEditorScript=this.isEditor=this.executionStepping=this.executionPaused=!1;this.functionName=null;this.iCommandError=-1;this.id=0;this.isComplete=!0;this.isTryCatch=this.isStateScript=
this.isJSThread=this.isFunction=!1;this.forVars=null;this.iToken=0;this.lineEnd=2147483647;this.lineNumbers=this.lineIndices=null;this.mustResumeEval=!1;this.parentContext=this.parallelProcessor=this.outputBuffer=null;this.pc0=this.pc=0;this.pcEnd=2147483647;this.scriptFileName=this.scriptExtensions=this.script=null;this.scriptLevel=0;this.htFileCache=this.statement=null;this.statementLength=0;this.token=null;this.tryPt=0;this.theToken=null;this.theTok=0;this.privateFuncs=this.why=this.pointers=null;
q(this,arguments)},JS,"ScriptContext",null);x(b,function(){this.id=++JS.ScriptContext.contextCount});c(b,"setMustResume",function(){for(var a=this;null!=a;)a.mustResumeEval=!0,a.pc=a.pc0,a=a.parentContext});c(b,"getVariable",function(a){for(var d=this,b;null!=d&&!d.isFunction;){if(null!=d.vars&&null!=(b=d.vars.get(a)))return b;d=d.parentContext}return null},"~S");c(b,"getFullMap",function(){var a=new java.util.Hashtable,d=this;for(null!=this.contextPath&&a.put("_path",JS.SV.newS(this.contextPath));null!=
d&&!d.isFunction;){if(null!=d.vars)for(var b,c=d.vars.keySet().iterator();c.hasNext()&&((b=c.next())||1);)if(!a.containsKey(b)){var e=d.vars.get(b);(2!=e.tok||2147483647!=e.intValue)&&a.put(b,e)}d=d.parentContext}return a});c(b,"saveTokens",function(a){this.aatoken=a;if(null==a)this.pointers=null;else{this.pointers=E(a.length,0);for(var d=this.pointers.length;0<=--d;)this.pointers[d]=null==a[d]?-1:a[d][0].intValue}},"~A");c(b,"restoreTokens",function(){if(null!=this.pointers)for(var a=this.pointers.length;0<=
--a;)null!=this.aatoken[a]&&(this.aatoken[a][0].intValue=this.pointers[a]);return this.aatoken});c(b,"getTokenCount",function(){return null==this.aatoken?-1:this.aatoken.length});c(b,"getToken",function(a){return this.aatoken[a]},"~N");b.contextCount=0});n("JS");z(["java.lang.Exception"],"JS.ScriptException",null,function(){var b=w(function(){this.untranslated=this.message=this.eval=null;this.isError=!1;q(this,arguments)},JS,"ScriptException",Exception);x(b,function(a,d,b,c){this.eval=a;this.message=
d;(this.isError=c)&&this.eval.setException(this,d,b)},"JS.ScriptError,~S,~S,~B");c(b,"getErrorMessageUntranslated",function(){return this.untranslated});g(b,"getMessage",function(){return this.message});g(b,"toString",function(){return this.message})});n("JS");z(["javajs.api.JSONEncodable","JS.T","JU.P3"],"JS.SV","java.util.Arrays $.Collections $.Hashtable JU.AU $.BArray $.BS $.Base64 $.Lst $.Measure $.PT $.SB JM.BondSet JU.BSUtil $.Escape JV.JC $.Viewer".split(" "),function(){var b=w(function(){this.index=
2147483647;this.myName=null;W("JS.SV.Sort")||JS.SV.$SV$Sort$();q(this,arguments)},JS,"SV",JS.T,javajs.api.JSONEncodable);b.newV=c(b,"newV",function(a,d){var b=new JS.SV;b.tok=a;b.value=d;return b},"~N,~O");b.newI=c(b,"newI",function(a){var d=new JS.SV;d.tok=2;d.intValue=a;return d},"~N");b.newF=c(b,"newF",function(a){if(a!=a)return JS.SV.vNaN;var d=new JS.SV;d.tok=3;d.value=Float.$valueOf(a);return d},"~N");b.newS=c(b,"newS",function(a){return JS.SV.newV(4,a)},"~S");b.newT=c(b,"newT",function(a){return JS.SV.newSV(a.tok,
a.intValue,a.value)},"JS.T");b.newSV=c(b,"newSV",function(a,d,b){a=JS.SV.newV(a,b);a.intValue=d;return a},"~N,~N,~O");c(b,"setv",function(a){this.index=a.index;this.intValue=a.intValue;this.tok=a.tok;this.value=a.value;return this},"JS.SV");b.copySafely=c(b,"copySafely",function(a){return null==a.myName?a:(new JS.SV).setv(a)},"JS.SV");b.sizeOf=c(b,"sizeOf",function(a){switch(null==a?0:a.tok){case 10:return JS.SV.bsSelectToken(a).cardinality();case 15:return a.value.data.length;case 4:return a.value.length;
case 7:return 2147483647==a.intValue?a.getList().size():JS.SV.sizeOf(JS.SV.selectItemTok(a,-2147483648));case 6:return a.value.size();case 14:return a.value.getFullMap().size();case 1073742335:case 1073742334:return-1;case 2:return-2;case 3:return-4;case 8:return-8;case 9:return-16;case 11:return-32;case 12:return-64;default:return 0}},"JS.T");b.isVariableType=c(b,"isVariableType",function(a){return C(a,"JS.SV")||C(a,Boolean)||C(a,Integer)||C(a,Float)||"string"==typeof a||C(a,"JU.T3")||C(a,"JU.BS")||
C(a,"JU.P4")||C(a,"JU.Quat")||C(a,"JU.M34")||C(a,"java.util.Map")||C(a,"JU.Lst")||C(a,"JU.BArray")||C(a,"JS.ScriptContext")||JS.SV.isArray(a)},"~O");b.isArray=c(b,"isArray",function(a){return C(a,Array)},"~O");b.getVariable=c(b,"getVariable",function(a){return null==a?JS.SV.newS(""):C(a,"JS.SV")?a:C(a,Boolean)?JS.SV.getBoolean(a.booleanValue()):C(a,Integer)?JS.SV.newI(a.intValue()):C(a,Float)?JS.SV.newV(3,a):"string"==typeof a?(a=JS.SV.unescapePointOrBitsetAsVariable(a),C(a,"JS.SV")?a:JS.SV.newV(4,
a)):C(a,"JU.P3")?JS.SV.newV(8,a):C(a,"JU.V3")?JS.SV.newV(8,JU.P3.newP(a)):C(a,"JU.BS")?JS.SV.newV(10,a):C(a,"JU.P4")?JS.SV.newV(9,a):C(a,"JU.Quat")?JS.SV.newV(9,a.toPoint4f()):C(a,"JU.M34")?JS.SV.newV(C(a,"JU.M4")?12:11,a):C(a,"java.util.Map")?JS.SV.getVariableMap(a):C(a,"JU.Lst")?JS.SV.getVariableList(a):C(a,"JU.BArray")?JS.SV.newV(15,a):C(a,"JS.ScriptContext")?JS.SV.newV(14,a):JS.SV.isASV(a)?JS.SV.getVariableAV(a):JU.AU.isAI(a)?JS.SV.getVariableAI(a):JU.AU.isAB(a)?JS.SV.getVariableAB(a):JU.AU.isAF(a)?
JS.SV.getVariableAF(a):JU.AU.isAD(a)?JS.SV.getVariableAD(a):JU.AU.isAS(a)?JS.SV.getVariableAS(a):JU.AU.isAP(a)?JS.SV.getVariableAP(a):JU.AU.isAII(a)?JS.SV.getVariableAII(a):JU.AU.isAFF(a)?JS.SV.getVariableAFF(a):JU.AU.isASS(a)?JS.SV.getVariableASS(a):JU.AU.isADD(a)?JS.SV.getVariableADD(a):JU.AU.isAFloat(a)?JS.SV.newV(13,a):JS.SV.newJSVar(a)},"~O");b.isASV=c(b,"isASV",function(a){return!JV.Viewer.isSwingJS?a&&a[0]&&"JS.SV"==a[0].__CLASS_NAME__:C(a,Array)},"~O");b.newJSVar=c(b,"newJSVar",function(a){var d,
b,c,e,f;switch(a.BYTES_PER_ELEMENT?Array:a.constructor){case Boolean:d=0;b=a;break;case Number:d=1;c=a;break;case Array:d=2;e=a;break;case Object:d=3,e=a,f=Object.keys(a)}switch(d){case 0:return b?JS.SV.vT:JS.SV.vF;case 1:return 2147483647<c||c!=Math.floor(c)?JS.SV.newF(c):JS.SV.newI(F(c));case 2:f=new JU.Lst;a=0;for(d=e.length;a<d;a++)f.addLast(JS.SV.newJSVar(e[a]));return JS.SV.getVariableList(f);case 3:d=new java.util.Hashtable;for(a=f.length;0<=--a;)b=null,b=e[f[a]],d.put(f[a],JS.SV.newJSVar(b));
return JS.SV.getVariableMap(d)}return JS.SV.newS(a.toString())},"~O");b.getVariableMap=c(b,"getVariableMap",function(a){for(var d=a,b=null,c,e=d.values().iterator();e.hasNext()&&((c=e.next())||1);){b=c;break}if(!C(b,"JS.SV")){a=new java.util.Hashtable;for(var f,d=d.entrySet().iterator();d.hasNext()&&((f=d.next())||1);)a.put(f.getKey(),JS.SV.getVariable(f.getValue()))}return JS.SV.newV(6,a)},"java.util.Map");b.getVariableList=c(b,"getVariableList",function(a){var d=a.size();if(0<d&&C(a.get(0),"JS.SV"))return JS.SV.newV(7,
a);for(var b=new JU.Lst,c=0;c<d;c++)b.addLast(JS.SV.getVariable(a.get(c)));return JS.SV.newV(7,b)},"JU.Lst");b.getVariableAV=c(b,"getVariableAV",function(a){for(var d=new JU.Lst,b=0;b<a.length;b++)d.addLast(a[b]);return JS.SV.newV(7,d)},"~A");b.getVariableAD=c(b,"getVariableAD",function(a){for(var d=new JU.Lst,b=0;b<a.length;b++)d.addLast(JS.SV.newV(3,Float.$valueOf(a[b])));return JS.SV.newV(7,d)},"~A");b.getVariableAO=c(b,"getVariableAO",function(a){for(var d=new JU.Lst,b=0;b<a.length;b++)d.addLast(JS.SV.getVariable(a[b]));
return JS.SV.newV(7,d)},"~A");b.getVariableAS=c(b,"getVariableAS",function(a){for(var d=new JU.Lst,b=0;b<a.length;b++)d.addLast(JS.SV.newV(4,a[b]));return JS.SV.newV(7,d)},"~A");b.getVariableAP=c(b,"getVariableAP",function(a){for(var d=new JU.Lst,b=0;b<a.length;b++)d.addLast(JS.SV.newV(8,a[b]));return JS.SV.newV(7,d)},"~A");b.getVariableAFF=c(b,"getVariableAFF",function(a){for(var d=new JU.Lst,b=0;b<a.length;b++)d.addLast(JS.SV.getVariableAF(a[b]));return JS.SV.newV(7,d)},"~A");b.getVariableADD=c(b,
"getVariableADD",function(a){for(var d=new JU.Lst,b=0;b<a.length;b++)d.addLast(JS.SV.getVariableAD(a[b]));return JS.SV.newV(7,d)},"~A");b.getVariableASS=c(b,"getVariableASS",function(a){for(var d=new JU.Lst,b=0;b<a.length;b++)d.addLast(JS.SV.getVariableAS(a[b]));return JS.SV.newV(7,d)},"~A");b.getVariableAII=c(b,"getVariableAII",function(a){for(var d=new JU.Lst,b=0;b<a.length;b++)d.addLast(JS.SV.getVariableAI(a[b]));return JS.SV.newV(7,d)},"~A");b.getVariableAF=c(b,"getVariableAF",function(a){for(var d=
new JU.Lst,b=0;b<a.length;b++)d.addLast(JS.SV.newV(3,Float.$valueOf(a[b])));return JS.SV.newV(7,d)},"~A");b.getVariableAI=c(b,"getVariableAI",function(a){for(var d=new JU.Lst,b=0;b<a.length;b++)d.addLast(JS.SV.newI(a[b]));return JS.SV.newV(7,d)},"~A");b.getVariableAB=c(b,"getVariableAB",function(a){for(var d=new JU.Lst,b=0;b<a.length;b++)d.addLast(JS.SV.newI(a[b]));return JS.SV.newV(7,d)},"~A");c(b,"setName",function(a){this.myName=a;return this},"~S");c(b,"increment",function(a){switch(this.tok){case 2:return this.intValue+=
a,!0;case 3:return this.value=Float.$valueOf(this.value.floatValue()+a),!0;default:return!1}},"~N");c(b,"asBoolean",function(){return JS.SV.bValue(this)});c(b,"asInt",function(){return JS.SV.iValue(this)});c(b,"asFloat",function(){return JS.SV.fValue(this)});c(b,"asString",function(){return JS.SV.sValue(this)});b.oValue=c(b,"oValue",function(a){if(!C(a,"JS.SV"))return a;switch(a.tok){case 1073742335:return Boolean.TRUE;case 0:case 1073742334:return Boolean.FALSE;case 2:return Integer.$valueOf(a.intValue);
case 10:case 1275068418:return JS.SV.selectItemVar(a).value;default:return a.value}},"~O");b.nValue=c(b,"nValue",function(a){switch(null==a?0:a.tok){case 3:return a.value;case 2:a=a.intValue;break;case 4:if(0<=a.value.indexOf("."))return Float.$valueOf(JS.SV.toFloat(a.value));a=F(JS.SV.toFloat(a.value));break;case 8:return Float.$valueOf(a.value.length());default:a=0}return Integer.$valueOf(a)},"JS.T");b.bValue=c(b,"bValue",function(a){switch(null==a?0:a.tok){case 1073742335:case 14:return!0;case 1073742334:return!1;
case 2:return 0!=a.intValue;case 3:case 4:case 7:return 0!=JS.SV.fValue(a);case 10:case 15:return 0!=JS.SV.iValue(a);case 8:case 9:case 11:case 12:return 1E-4<Math.abs(JS.SV.fValue(a));case 6:return!a.getMap().isEmpty();default:return!1}},"JS.T");b.iValue=c(b,"iValue",function(a){switch(null==a?0:a.tok){case 1073742335:return 1;case 1073742334:return 0;case 2:return a.intValue;case 3:case 7:case 4:case 8:case 9:case 11:case 12:case 134221850:return F(JS.SV.fValue(a));case 10:return JS.SV.bsSelectToken(a).cardinality();
case 15:return a.value.data.length;default:return 0}},"JS.T");b.fValue=c(b,"fValue",function(a){switch(null==a?0:a.tok){case 1073742335:return 1;case 1073742334:return 0;case 2:return a.intValue;case 3:return a.value.floatValue();case 7:if(2147483647==a.intValue)return a.getList().size();case 4:return JS.SV.toFloat(JS.SV.sValue(a));case 10:case 15:return JS.SV.iValue(a);case 8:return a.value.length();case 9:return JU.Measure.distanceToPlane(a.value,JS.SV.pt0);case 11:var d=new JU.P3;a.value.rotate(d);
return d.length();case 12:return d=new JU.P3,a.value.rotTrans(d),d.length();default:return 0}},"JS.T");b.sValue=c(b,"sValue",function(a){if(null==a)return"";var d;switch(a.tok){case 1073742335:return"true";case 1073742334:return"false";case 2:return""+a.intValue;case 10:return d=JS.SV.bsSelectToken(a),C(a.value,"JM.BondSet")?JU.Escape.eBond(d):JU.Escape.eBS(d);case 7:var b=a.getList();d=a.intValue;0>=d&&(d=b.size()-d);if(2147483647!=d)return 1>d||d>b.size()?"":JS.SV.sValue(b.get(d-1));case 6:case 14:if("string"==
typeof a.value)return a.value;d=new JU.SB;JS.SV.sValueArray(d,a,"","",!1,!0,!0,2147483647,!1);return JU.PT.rep(d.toString(),"\n\x00"," ");case 4:return b=a.value,d=a.intValue,0>=d&&(d=b.length-d),2147483647==d?b:1>d||d>b.length?"":""+b.charAt(d-1);case 8:return JU.Escape.eP(a.value);case 9:return JU.Escape.eP4(a.value);case 11:case 12:return JU.Escape.e(a.value);default:return a.value.toString()}},"JS.T");b.sValueArray=c(b,"sValueArray",function(a,d,b,c,e,f,j,k,l){switch(d.tok){case 6:case 14:case 7:var g=
";"+d.hashCode()+";";if(0<=b.indexOf(g)){a.append(e?7==d.tok?"[ ]":"{ }":(7==d.tok?"":"\x00")+'"<'+(null==d.myName?"circular reference":d.myName)+'>"');break}b+=g;if(7==d.tok){if(!j)break;f||a.append(e?"[ ":c+"[\n");d=d.getList();for(g=0;g<d.size();g++){e&&0<g&&a.append(",");var m=d.get(g);JS.SV.sValueArray(a,m,b,c+"  ",e,0==c.length&&!e&&JS.SV.isRawType(m.tok),j,k,l);e||a.append("\n")}f||a.append(e?" ]":c+"]")}else 0<=--k&&(f=14==d.tok?d.value.getFullMap():d.getMap(),JS.SV.sValueAddKeys(a,b,f,c,
e,j,k,l));break;default:if(!j)break;!f&&!e&&a.append(c);a.append(e?d.escape():JS.SV.sValue(d))}},"JU.SB,JS.SV,~S,~S,~B,~B,~B,~N,~B");b.sValueAddKeys=c(b,"sValueAddKeys",function(a,d,b,c,e,f,j,k){if(!(0>j)){var l=b.keySet(),l=b.keySet().toArray(Array(l.size()));java.util.Arrays.sort(l);if(e){a.append("{ ");for(var g="",m=0;m<l.length;m++){e=l[m];var p=b.get(e);if(!k||!(7==p.tok&&0==p.getList().size()||6==p.tok&&p.getMap().isEmpty()))f?a.append(g).append(JU.PT.esc(e)).append(":"):a.appendC(" ").append(e),
JS.SV.sValueArray(a,p,d,c+"  ",!0,!1,f,j,k),g=","}a.append(" }");f||a.append("\n")}else{a.append(c).append("{\n");c+="  ";for(m=0;m<l.length;m++)a.append(c),e=l[m],a.append(JU.PT.esc(e)).append("  :"),g=new JU.SB,C(b.get(e),"JS.SV")||b.put(e,JS.SV.getVariable(b.get(e))),p=b.get(e),e=JS.SV.isRawType(p.tok),JS.SV.sValueArray(g,p,d,c,e,!1,f,j,k),g=g.toString(),e&&f?a.append("  "):a.append("\n"),a.append(g).append("\n");a.append(c.substring(1)).append("}")}}},"JU.SB,~S,java.util.Map,~S,~B,~B,~N,~B");
b.isRawType=c(b,"isRawType",function(a){switch(a){case 4:case 3:case 2:case 8:case 9:case 10:case 15:case 1073742335:case 1073742334:return!0}return!1},"~N");b.ptValue=c(b,"ptValue",function(a){switch(a.tok){case 8:return a.value;case 4:if(a=JU.Escape.uP(a.value),C(a,"JU.P3"))return a}return null},"JS.SV");b.pt4Value=c(b,"pt4Value",function(a){switch(a.tok){case 9:return a.value;case 4:a=JU.Escape.uP(a.value);if(!C(a,"JU.P4"))break;return a}return null},"JS.SV");b.toFloat=c(b,"toFloat",function(a){return a.equalsIgnoreCase("true")?
1:0==a.length||a.equalsIgnoreCase("false")?0:JU.PT.parseFloatStrict(JU.PT.trim(a," \t\n"))},"~S");b.concatList=c(b,"concatList",function(a,d,b){var c=a.getList(),e=d.getList();if(!b){if(null==e)c.addLast(JS.SV.newT(d));else for(b=0;b<e.size();b++)c.addLast(e.get(b));return a}var f=new JU.Lst;if(null==c)f.addLast(a);else for(b=0;b<c.size();b++)f.addLast(c.get(b));if(null==e)f.addLast(d);else for(b=0;b<e.size();b++)f.addLast(e.get(b));return JS.SV.getVariableList(f)},"JS.SV,JS.SV,~B");b.bsSelectToken=
c(b,"bsSelectToken",function(a){return JS.SV.selectItemTok(a,-2147483648).value},"JS.T");b.bsSelectRange=c(b,"bsSelectRange",function(a,d){a=JS.SV.selectItemTok(a,-2147483648);a=JS.SV.selectItemTok(a,0>=d?d:1);a=JS.SV.selectItemTok(a,0>=d?2147483646:d);return a.value},"JS.T,~N");b.selectItemVar=c(b,"selectItemVar",function(a){return 2147483647!=a.index||(7==a.tok||15==a.tok)&&2147483647==a.intValue?a:JS.SV.selectItemTok(a,-2147483648)},"JS.SV");b.selectItemTok=c(b,"selectItemTok",function(a,d){switch(a.tok){case 11:case 12:case 10:case 7:case 15:case 4:break;
default:return C(a,"JS.SV")&&null!=a.myName?JS.SV.copySafely(a):a}var b=null,c=null,e=a.intValue,f=-2147483648==d;if(2147483647==e)return f&&4==a.tok?a:JS.SV.newSV(a.tok,f?e:d,a.value);var j=0,k=C(a,"JS.SV")&&2147483647!=a.index,l=JS.SV.newSV(a.tok,2147483647,null);switch(a.tok){case 10:C(a.value,"JM.BondSet")?(b=JM.BondSet.newBS(a.value),j=b.cardinality()):(b=JU.BSUtil.copy(a.value),j=k?1:b.cardinality());break;case 15:j=a.value.data.length;break;case 7:j=a.getList().size();break;case 4:c=a.value;
j=c.length;break;case 11:j=-3;break;case 12:j=-4}if(0>j){j=-j;if(0<e&&Math.abs(e)>j)return l=e%10,e=v((e-l)/10),0<l&&l<=j&&e<=j?JS.SV.newV(3,Float.$valueOf(a.value.getElement(e-1,l-1))):JS.SV.newV(4,"");if(Math.abs(e)>j)return JS.SV.newV(4,"");b=L(j,0);0>e?a.value.getColumn(-1-e,b):a.value.getRow(e-1,b);return f?JS.SV.getVariableAF(b):1>d||d>j?JS.SV.newV(4,""):JS.SV.newV(3,Float.$valueOf(b[d-1]))}0>=e&&(e=j+e);f||(1>e&&(e=1),0==d?d=j:0>d&&(d=j+d),d<e&&(d=e));switch(a.tok){case 10:l.value=b;if(k){1<
e&&b.clearAll();break}if(f){e==j?d=b.length()-1:1==e&&(d=b.nextSetBit(0));if(-1<=d){b.clearAll();0<=d&&b.set(d);break}d=e}j=0;for(f=b.nextSetBit(0);0<=f;f=b.nextSetBit(f+1))(++j<e||j>d)&&b.clear(f);break;case 4:l.value=0>--e||e>=j?"":f?c.substring(e,e+1):c.substring(e,Math.min(d,j));break;case 7:if(0>--e||e>=j)return JS.SV.newV(4,"");if(f)return a.getList().get(e);b=new JU.Lst;f=a.getList();c=Math.min(d,j)-e;for(j=0;j<c;j++)b.addLast(JS.SV.newT(f.get(j+e)));l.value=b;break;case 15:if(0>--e||e>=j)return JS.SV.newV(4,
"");b=a.value.data;if(f)return JS.SV.newI(b[e]);f=O(Math.min(d,j)-e,0);for(j=f.length;0<=--j;)f[j]=b[e+j];l.value=new JU.BArray(f)}return l},"JS.T,~N");c(b,"setSelectedValue",function(a,d,b){if(2147483647!=a){var c;switch(this.tok){case 11:case 12:c=11==this.tok?3:4;if(2147483647!=d){var e=a;if(0<d&&d<=c&&e<=c){this.value.setElement(e-1,d-1,JS.SV.fValue(b));break}}if(0!=a&&Math.abs(a)<=c&&(11==this.tok&&8==b.tok||12==this.tok&&9==b.tok||7==b.tok)){switch(b.tok){default:case 7:e=b.getList();if(e.size()!=
c)return;b=L(c,0);for(d=0;d<c;d++)b[d]=JS.SV.fValue(e.get(d));break;case 8:b=b.value;b=L(-1,[b.x,b.y,b.z]);break;case 9:b=b.value,b=L(-1,[b.x,b.y,b.z,b.w])}0<a?this.value.setRowA(a-1,b):this.value.setColumnA(-1-a,b);break}break;case 4:c=this.value;e=c.length;0>=a&&(a=e+a);for(0>--a&&(a=0);a>=c.length;)c+=" ";if(2147483647==d)d=a;else for(0>--d&&(d=e+d);d>=c.length;)c+=" ";d>=a&&(this.value=c.substring(0,a)+JS.SV.sValue(b)+c.substring(++d));this.intValue=this.index=2147483647;break;case 7:e=this.value;
c=e.size();0>=a&&(a=c+a);0>--a&&(a=0);if(c<=a)for(d=c;d<=a;d++)e.addLast(JS.SV.newV(4,""));e.set(a,b)}}},"~N,~N,JS.SV");c(b,"escape",function(){switch(this.tok){case 4:return JU.PT.esc(this.value);case 11:case 12:return JU.PT.toJSON(null,this.value);case 7:case 6:case 14:var a=new JU.SB;JS.SV.sValueArray(a,this,"","",!0,!1,!0,2147483647,!1);return a.toString();default:return JS.SV.sValue(this)}});b.unescapePointOrBitsetAsVariable=c(b,"unescapePointOrBitsetAsVariable",function(a){if(null==a)return a;
var d=null,b=null;if(C(a,"JS.SV"))switch(a.tok){case 8:case 9:case 11:case 12:case 10:d=a.value;break;case 4:b=a.value;break;default:b=JS.SV.sValue(a)}else"string"==typeof a&&(b=a);if(null!=b&&0==b.length)return b;null==d&&(d=JU.Escape.uABsM(b));return C(d,"JU.P3")?JS.SV.newV(8,d):C(d,"JU.P4")?JS.SV.newV(9,d):C(d,"JU.BS")?(null!=b&&0==b.indexOf("[{")&&(d=JM.BondSet.newBS(d)),JS.SV.newV(10,d)):C(d,"JU.M34")?JS.SV.newV(C(d,"JU.M3")?11:12,d):a},"~O");b.getBoolean=c(b,"getBoolean",function(a){return JS.SV.newT(a?
JS.SV.vT:JS.SV.vF)},"~B");b.sprintf=c(b,"sprintf",function(a,d){if(null==d)return a;var b=7==d.tok,c=0<=a.indexOf("d")||0<=a.indexOf("i")?E(1,0):null,e=0<=a.indexOf("f")?L(1,0):null,f=0<=a.indexOf("e")?R(1,0):null,j=0<=a.indexOf("s"),k=0<=a.indexOf("p")&&(b||8==d.tok),l=0<=a.indexOf("q")&&(b||9==d.tok),g=u(-1,[c,e,f,null,null,null]);if(!b)return JS.SV.sprintf(a,d,g,c,e,f,j,k,l);for(var b=d.getList(),m=Array(b.size()),p=0;p<m.length;p++)m[p]=JS.SV.sprintf(a,b.get(p),g,c,e,f,j,k,l);return m},"~S,JS.SV");
b.sprintf=c(b,"sprintf",function(a,d,b,c,e,f,j,k,l){if(6==d.tok){var g=a.indexOf("[");if(0<=g){var m;d=d.getMap().get(a.substring(g+1,m=a.indexOf("]")));a=a.substring(0,g)+a.substring(m+1)}}null!=c&&(c[0]=JS.SV.iValue(d));null!=e&&(e[0]=JS.SV.fValue(d));null!=f&&(f[0]=JS.SV.fValue(d));j&&(b[3]=JS.SV.sValue(d));k&&(b[4]=d.value);l&&(b[5]=d.value);return JU.PT.sprintf(a,"IFDspq",b)},"~S,JS.SV,~A,~A,~A,~A,~B,~B,~B");b.getFormatType=c(b,"getFormatType",function(a){return 0<=a.indexOf(";")?-1:";json;base64;bytearray;array;xyz;abc;uvw;string;".indexOf(";"+
a.toLowerCase()+";")},"~S");b.format=c(b,"format",function(a,d){switch(a.length){case 0:return"";case 1:return JS.SV.sValue(a[0]);case 2:if(2147483647==d&&(d=JS.SV.getFormatType(a[0].asString())),0<=d)return JS.SV.getFormat(a[1],d)}var b=JU.PT.split(JU.PT.rep(JS.SV.sValue(a[0]),"%%","\u0001"),"%");if(0==b.length)return"";var c=new JU.SB;c.append(b[0]);for(var e=1;e<b.length;e++){var f=JS.SV.sprintf(JU.PT.formatCheck("%"+b[e]),6==a[1].tok?a[1]:7==a[1].tok?a[1].getList().get(e-1):e<a.length?a[e]:null);
if(JU.AU.isAS(f))for(var j=0;j<f.length;j++)c.append(f[j]).append("\n");else c.append(f)}return c.toString()},"~A,~N");b.getFormat=c(b,"getFormat",function(a,d){switch(d){case 0:var b=a.myName;a.myName=null;var c=a.toJSON();a.myName=b;return c;case 5:case 12:case 22:case 40:var e;switch(a.tok){case 15:e=JU.AU.arrayCopyByte(a.value.data,-1);break;case 7:b=a.getList();if(22==d){e=new JU.Lst;for(c=b.size();0<=--c;)e.addLast(b.get(c));return e}e=O(b.size(),0);for(c=e.length;0<=--c;)e[c]=b.get(c).asInt();
break;default:if(b=a.asString(),b.startsWith(JV.JC.BASE64_TAG)){if(5==d)return b;e=JU.Base64.decodeBase64(b)}else e=b.getBytes()}switch(d){case 12:return new JU.BArray(e);case 5:return JV.JC.BASE64_TAG+JU.Base64.getBase64(e).toString();case 22:return JS.SV.getVariable(e);case 40:return String.instantialize(e)}}return null},"JS.SV,~N");b.getBitSet=c(b,"getBitSet",function(a,d){switch(a.tok){case 10:return(2147483647==a.index?JS.SV.selectItemTok(a,-2147483648):a).value;case 7:return JS.SV.unEscapeBitSetArray(a.getList(),
d);default:return d?null:new JU.BS}},"JS.SV,~B");b.unEscapeBitSetArray=c(b,"unEscapeBitSetArray",function(a,d){for(var b=new JU.BS,c=0;c<a.size();c++){var e=a.get(c);if(2==e.tok&&0<=e.intValue)b.set(e.intValue);else if(7==e.tok){e=JS.SV.unEscapeBitSetArray(e.getList(),!0);if(null==e)return d?null:new JU.BS;b.or(e)}else if(!JS.SV.unEscapeBitSet(e,b))return d?null:new JU.BS}return b},"JU.Lst,~B");b.areEqual=c(b,"areEqual",function(a,d){if(null==a||null==d)return!1;if(null!=a.value&&a.value===d.value)return!0;
if(a.tok==d.tok)switch(a.tok){case 2:if(2==d.tok)return a.intValue==d.intValue;break;case 4:return a.value.equalsIgnoreCase(d.value);case 10:case 15:case 6:case 7:case 14:return a.equals(d);case 8:return 1E-6>a.value.distance(d.value);case 9:return 1E-6>a.value.distance4(d.value);case 11:return a.value.equals(d.value);case 12:return a.value.equals(d.value)}return a.isNaN()?d.isNaN():1E-6>Math.abs(JS.SV.fValue(a)-JS.SV.fValue(d))},"JS.SV,JS.SV");b.isLike=c(b,"isLike",function(a,d){return null!=a&&
null!=d&&4==a.tok&&4==d.tok&&JU.PT.isLike(a.value,d.value)},"JS.SV,JS.SV");c(b,"sortOrReverse",function(a){var d=this.getList();if(null!=d&&1<d.size())if(-2147483648==a){a=d.size();for(var b=0;b<a;b++){var c=d.get(b);d.set(b,d.get(--a));d.set(a,c)}}else java.util.Collections.sort(this.getList(),Y(JS.SV.Sort,this,null,--a,null));return this},"~N");c(b,"pushPop",function(a,d){if(null==a){if(4==this.tok){if(null==d){var b=this.value,c=b.length-1;if(0>c)return JS.SV.newS("");var e=b.substring(c);this.value=
b.substring(0,c);return JS.SV.newS(e)}this.value+=JS.SV.sValue(d);return this}c=this.getMap();if(null==c){b=this.getList();if(null==d||null==b)return null==b||0==b.size()?JS.SV.newS(""):b.removeItemAt(b.size()-1);b.addLast(JS.SV.copySafely(d))}else null==d?c.clear():(b=d.getMap(),null!=b&&c.putAll(b))}else{c=this.getMap();if(null==d){b=null;if(null==c){var c=this.getList(),e=c.size(),f=JS.SV.iValue(a)-1;0>f&&(f+=e);0<=f&&f<e&&(b=c.removeItemAt(f))}else b=c.remove(a.asString());return null==b?JS.SV.newS(""):
b}null!=c&&this.addToMap(c,a,d)}return this},"JS.SV,JS.SV");c(b,"addToMap",function(a,d,b){a.put(d.asString(),JS.SV.copySafely(b))},"java.util.Map,JS.SV,JS.SV");b.unEscapeBitSet=c(b,"unEscapeBitSet",function(a,d){switch(a.tok){case 4:var b=JU.BS.unescape(a.value);if(null==b)break;d.or(b);return!0;case 10:return d.or(a.value),!0}return!1},"JS.SV,JU.BS");b.strListValue=c(b,"strListValue",function(a){if(7!=a.tok)return u(-1,[JS.SV.sValue(a)]);a=a.getList();for(var d=Array(a.size()),b=a.size();0<=--b;)d[b]=
JS.SV.sValue(a.get(b));return d},"JS.T");b.getArrayDepth=c(b,"getArrayDepth",function(a){for(var d=0,b;7==a.tok&&0<(b=a.getList()).size();)d++,a=b.get(0);return d},"JS.T");b.fflistValue=c(b,"fflistValue",function(a){if(7!=a.tok)return u(-1,[L(-1,[JS.SV.fValue(a)])]);a=a.getList();var d=a.size(),b;b=JU.AU.newFloat2(d);for(var c=b.length;0<=--c;)b[c]=JS.SV.flistValue(c>=d?null:a.get(c),0);return b},"JS.T,~N");b.flistValue=c(b,"flistValue",function(a,d){if(null==a||7!=a.tok)return L(-1,[JS.SV.fValue(a)]);
var b=a.getList(),c;c=L(Math.max(d,b.size()),0);0==d&&(d=c.length);for(var e=Math.min(b.size(),d);0<=--e;)c[e]=JS.SV.fValue(b.get(e));return c},"JS.T,~N");c(b,"toArray",function(){var a,d,b=null,c=null;switch(this.tok){case 10:d=new JU.Lst;a=JS.SV.getBitSet(this,!0);for(var e=a.nextSetBit(0);0<=e;e=a.nextSetBit(e+1))d.addLast(JS.SV.newI(e));return JS.SV.newV(7,d);case 11:b=this.value;a=3;break;case 12:c=this.value;a=4;break;case 7:return this;case 1275068418:return this.arrayToList(new JS.SV);default:return d=
new JU.Lst,d.addLast(this),JS.SV.newV(7,d)}d=new JU.Lst;for(e=0;e<a;e++){var f=L(a,0);null==b?c.getRow(e,f):b.getRow(e,f);d.addLast(JS.SV.getVariableAF(f))}return JS.SV.newV(7,d)});c(b,"arrayToList",function(a){if(1275068418!=this.tok||null==a)return null;for(var d=this.value,b=new JU.Lst,c=0,e=d.length;c<e;c++)b.addLast(JS.SV.getVariable(d[c]));a.tok=7;a.value=b;return a},"JS.SV");c(b,"mapValue",function(a){switch(this.tok){case 6:return this.value.get(a);case 14:var d=this.value;return a.equals("_path")?
JS.SV.newS(d.contextPath):d.getVariable(a)}return null},"~S");c(b,"getList",function(){switch(this.tok){case 7:return this.value;case 1275068418:return this.tok=7,this.value=this.toArray().value;default:return null}});b.isScalar=c(b,"isScalar",function(a){switch(a.tok){case 7:return!1;case 4:return 0>a.value.indexOf("\n");default:return!0}},"JS.SV");g(b,"toJSON",function(){switch(this.tok){case 1073742335:case 1073742334:case 2:case 3:return JS.SV.sValue(this);case 15:return JU.PT.byteArrayToJSON(this.value.data);
case 14:return JU.PT.toJSON(null,this.value.getFullMap());case 7:case 6:if(null!=this.myName)return this.myName=null,6==this.tok?"{  }":"[  ]";this.myName="x";var a=JU.PT.toJSON(null,this.value);this.myName=null;return a;default:return JU.PT.toJSON(null,this.value)}});c(b,"mapGet",function(a){return this.getMap().get(a)},"~S");c(b,"mapPut",function(a,d){switch(this.tok){case 6:case 14:this.getMap().put(a,JS.SV.copySafely(d))}},"~S,JS.SV");c(b,"getMap",function(){switch(this.tok){case 6:return this.value;
case 14:return this.value.vars}return null});c(b,"getMapKeys",function(a,d){if(6!=this.tok)return"";var b=new JU.SB;JS.SV.sValueArray(b,this,"","",!0,!1,!1,a+1,d);return b.toString()},"~N,~B");g(b,"toString",function(){return this.toString2()+"["+this.myName+" index ="+this.index+" intValue="+this.intValue+"]"});c(b,"getKeys",function(a){switch(this.tok){case 6:case 14:case 7:break;default:return null}var d=new JU.Lst;this.getKeyList(a,d,"");a=d.toArray(Array(d.size()));java.util.Arrays.sort(a);return a},
"~B");c(b,"getKeyList",function(a,d,b){var c=this.getMap();if(null==c){if(a){var e,f;null!=(e=this.getList())&&0<(f=e.size())&&e.get(f-1).getKeyList(!0,d,b+"."+f+".")}}else for(var j,c=c.entrySet().iterator();c.hasNext()&&((j=c.next())||1);){e=j.getKey();if(a&&(0==e.length||!JU.PT.isLetter(e.charAt(0))))b.endsWith(".")&&(b=b.substring(0,b.length-1)),e="["+JU.PT.esc(e)+"]";d.addLast(b+e);a&&j.getValue().getKeyList(!0,d,b+e+".")}},"~B,JU.Lst,~S");b.deepCopy=c(b,"deepCopy",function(a,d,b){if(d){d=new java.util.Hashtable;
var c;for(a=a.entrySet().iterator();a.hasNext()&&((c=a.next())||1);){var e=c.getValue();d.put(c.getKey(),b?JS.SV.deepCopySV(e):e)}return d}c=new JU.Lst;d=0;for(e=a.size();d<e;d++){var f=a.get(d);c.addLast(b?JS.SV.deepCopySV(f):f)}return c},"~O,~B,~B");b.deepCopySV=c(b,"deepCopySV",function(a){switch(a.tok){case 6:case 7:if("\r".equals(a.myName))a.myName=null,a=JS.SV.newV(a.tok,6==a.tok?new java.util.Hashtable:new JU.Lst);else{var d=a.myName;a.myName="\r";var b=a;a=JS.SV.newV(a.tok,JS.SV.deepCopy(a.value,
6==a.tok,!0));b.myName=d}}return a},"JS.SV");c(b,"sortMapArray",function(a){null!=this.getList()&&java.util.Collections.sort(this.getList(),Y(JS.SV.Sort,this,null,0,a));return this},"~S");b.safeJSON=c(b,"safeJSON",function(a,d){return"{"+(C(d,"JS.SV")?JU.PT.esc(a)+" : "+JS.SV.format(u(-1,[null,d]),0):JU.PT.toJSON(a,d))+"}"},"~S,~O");c(b,"isNaN",function(){return"NaN"===this.value||this===JS.SV.vNaN});b.$SV$Sort$=function(){var a=w(function(){fa(this,arguments);this.arrayPt=0;this.myKey=null;q(this,
arguments)},JS.SV,"Sort",null,java.util.Comparator);x(a,function(a,b){this.arrayPt=a;this.myKey=b},"~N,~S");g(a,"compare",function(a,b){if(a.tok!=b.tok){if(3==a.tok||2==a.tok||3==b.tok||2==b.tok){var c=JS.SV.fValue(a),e=JS.SV.fValue(b);return c<e?-1:c>e?1:0}if(4==a.tok||4==b.tok)return JS.SV.sValue(a).compareTo(JS.SV.sValue(b))}switch(a.tok){case 2:return a.intValue<b.intValue?-1:a.intValue>b.intValue?1:0;case 4:return JS.SV.sValue(a).compareTo(JS.SV.sValue(b));case 7:c=a.getList();e=b.getList();
if(c.size()!=e.size())return c.size()<e.size()?-1:1;var f=this.arrayPt;0>f&&(f+=c.size());return 0>f||f>=c.size()?0:this.compare(c.get(f),e.get(f));case 6:if(null!=this.myKey)return this.compare(a.getMap().get(this.myKey),b.getMap().get(this.myKey));default:return c=JS.SV.fValue(a),e=JS.SV.fValue(b),c<e?-1:c>e?1:0}},"JS.SV,JS.SV")};b.vT=JS.SV.newSV(1073742335,1,"true");b.vF=JS.SV.newSV(1073742334,0,"false");b.vNaN=JS.SV.newSV(3,2147483647,Float.$valueOf(NaN));b.pt0=new JU.P3});n("JS");z(["java.util.Hashtable"],
"JS.T",["java.util.Arrays","JU.AU","$.Lst","JU.Logger"],function(){var b=w(function(){this.tok=0;this.value=null;this.intValue=2147483647;q(this,arguments)},JS,"T",null);b.t=c(b,"t",function(a){var d=new JS.T;d.tok=a;return d},"~N");b.tv=c(b,"tv",function(a,d,b){a=JS.T.t(a);a.intValue=d;a.value=b;return a},"~N,~N,~O");b.o=c(b,"o",function(a,d){var b=JS.T.t(a);b.value=d;return b},"~N,~O");b.n=c(b,"n",function(a,d){var b=JS.T.t(a);b.intValue=d;return b},"~N,~N");b.i=c(b,"i",function(a){var d=JS.T.t(2);
d.intValue=a;return d},"~N");b.tokAttr=c(b,"tokAttr",function(a,d){return(a&d)==(d&d)},"~N,~N");b.tokAttrOr=c(b,"tokAttrOr",function(a,d,b){return(a&d)==(d&d)||(a&b)==(b&b)},"~N,~N,~N");b.getPrecedence=c(b,"getPrecedence",function(a){return a>>9&15},"~N");b.getMaxMathParams=c(b,"getMaxMathParams",function(a){return a>>9&3},"~N");b.addToken=c(b,"addToken",function(a,d){JS.T.tokenMap.put(a,d)},"~S,JS.T");b.getTokenFromName=c(b,"getTokenFromName",function(a){return JS.T.tokenMap.get(a)},"~S");b.getTokFromName=
c(b,"getTokFromName",function(a){a=JS.T.getTokenFromName(a.toLowerCase());return null==a?0:a.tok},"~S");b.nameOf=c(b,"nameOf",function(a){for(var d,b=JS.T.tokenMap.values().iterator();b.hasNext()&&((d=b.next())||1);)if(d.tok==a)return""+d.value;return"0x"+Integer.toHexString(a)},"~N");g(b,"toString",function(){return this.toString2()});c(b,"toString2",function(){return"Token["+JS.T.astrType[16>this.tok?this.tok:16]+"("+this.tok%1E3+"/0x"+Integer.toHexString(this.tok)+")"+(2147483647==this.intValue?
"":" intValue="+this.intValue+"(0x"+Integer.toHexString(this.intValue)+")")+(null==this.value?"":"string"==typeof this.value?' value="'+this.value+'"':" value="+this.value)+"]"});b.getCommandSet=c(b,"getCommandSet",function(a){var d="",b=new java.util.Hashtable,h=0;a=null==a||0==a.length?null:a.toLowerCase();for(var c=null!=a&&1<a.length,r,e=JS.T.tokenMap.entrySet().iterator();e.hasNext()&&((r=e.next())||1);){var f=r.getKey(),j=r.getValue();0!=(j.tok&4096)&&((null==a||0==f.indexOf(a))&&(c||j.value.equals(f)))&&
b.put(f,Boolean.TRUE)}for(e=b.entrySet().iterator();e.hasNext()&&((r=e.next())||1);)if(f=r.getKey(),"s"!=f.charAt(f.length-1)||!b.containsKey(f.substring(0,f.length-1)))d+=(0==h++?"":";")+f;return d},"~S");b.getAtomPropertiesLike=c(b,"getAtomPropertiesLike",function(a){a=a.toLowerCase();for(var d=new JU.Lst,b=0==a.length,h,c=JS.T.tokenMap.entrySet().iterator();c.hasNext()&&((h=c.next())||1);){var r=h.getKey();if("_"!=r.charAt(0)){var e=h.getValue();if(JS.T.tokAttr(e.tok,1077936128)&&(b||r.toLowerCase().startsWith(a))){if(b||
!e.value.toLowerCase().startsWith(a))e=JS.T.o(e.tok,r);d.addLast(e)}}}return 0==d.size()?null:d},"~S");b.getTokensLike=c(b,"getTokensLike",function(a){a=a.equals("setparam")?536870912:a.equals("misc")?1073741824:a.equals("mathfunc")?134217728:4096;for(var d=536870912==a?1610612736:0,b=new JU.Lst,h,c=JS.T.tokenMap.entrySet().iterator();c.hasNext()&&((h=c.next())||1);){var r=h.getKey(),e=h.getValue();JS.T.tokAttr(e.tok,a)&&(0==d||!JS.T.tokAttr(e.tok,d))&&b.addLast(r)}h=b.toArray(Array(b.size()));java.util.Arrays.sort(h);
return h},"~S");b.getSettableTokFromString=c(b,"getSettableTokFromString",function(a){a=JS.T.getTokFromName(a);return 0!=a&&JS.T.tokAttr(a,2048)&&!JS.T.tokAttr(a,1140850688)?a:0},"~S");b.completeCommand=c(b,"completeCommand",function(a,d,b,h,c){null==a?a=JS.T.tokenMap:b=!1;var r=new JU.Lst;h=h.toLowerCase();var e;for(a=a.keySet().iterator();a.hasNext()&&((e=a.next())||1);)if(e.startsWith(h)){var f=JS.T.getTokFromName(e);(b?JS.T.tokAttr(f,4096):d?JS.T.tokAttr(f,536870912)&&!JS.T.tokAttr(f,1610612736):
1)&&r.addLast(e)}return JU.AU.sortedItem(r,c)},"java.util.Map,~B,~B,~S,~N");b.getParamType=c(b,"getParamType",function(a){return!JS.T.tokAttr(a,536870912)?0:a&662700032},"~N");b.getTokensType=c(b,"getTokensType",function(a,d){for(var b,h=JS.T.tokenMap.entrySet().iterator();h.hasNext()&&((b=h.next())||1);){var c=b.getValue();JS.T.tokAttr(c.tok,d)&&a.put(b.getKey(),b.getValue())}},"java.util.Map,~N");b.isIDcmd=c(b,"isIDcmd",function(a){switch(a){case 135180:case 135176:case 135174:case 135188:case 134353926:return!0;
default:return!1}},"~N");c(b,"equals",function(a){if(!C(a,"JS.T"))return!1;if(this.tok==a.tok)return a.intValue==this.intValue&&(2==this.tok||1073742335==this.tok||1073742334==this.tok||a.value.equals(this.value));switch(this.tok){case 2:return 3==a.tok&&a.value.floatValue()==this.intValue;case 3:return 2==a.tok&&this.value.floatValue()==a.intValue;default:return!1}},"~O");JS.T.astrType="nada identifier integer decimal string inscode hash array point point4 bitset matrix3f matrix4f array hash bytearray keyword".$plit(" ");
b.tokenSpaceBeforeSquare=JS.T.o(1073742195," ");b.tokenOn=JS.T.tv(1073742335,1,"on");b.tokenOff=JS.T.tv(1073742334,0,"off");b.tokenAll=JS.T.o(1073742327,"all");b.tokenIf=JS.T.o(134320649,"if");b.tokenAnd=JS.T.o(268438528,"and");b.tokenAndSpec=JS.T.o(268439552,"");b.tokenOr=JS.T.o(268438016,"or");b.tokenAndFALSE=JS.T.o(268438528,"and");b.tokenOrTRUE=JS.T.o(268438016,"or");b.tokenOpIf=JS.T.o(805307393,"?");b.tokenComma=JS.T.o(268436992,",");b.tokenDefineString=JS.T.tv(12290,4,"@");b.tokenPlus=JS.T.o(268440577,
"+");b.tokenMinus=JS.T.o(268440576,"-");b.tokenMul3=JS.T.o(1275068930,"mul3");b.tokenTimes=JS.T.o(268441089,"*");b.tokenDivide=JS.T.o(268441088,"/");b.tokenLeftParen=JS.T.o(268435968,"(");b.tokenRightParen=JS.T.o(268435969,")");b.tokenArraySquare=JS.T.o(1275068418,"[");b.tokenArrayOpen=JS.T.o(268437504,"[");b.tokenArrayClose=JS.T.o(268437505,"]");b.tokenLeftBrace=JS.T.o(1073742332,"{");b.tokenExpressionBegin=JS.T.o(1073742325,"expressionBegin");b.tokenExpressionEnd=JS.T.o(1073742326,"expressionEnd");
b.tokenConnected=JS.T.o(134217736,"connected");b.tokenCoordinateBegin=JS.T.o(1073742332,"{");b.tokenRightBrace=JS.T.o(1073742338,"}");b.tokenCoordinateEnd=JS.T.tokenRightBrace;b.tokenColon=JS.T.o(268436482,":");b.tokenSetCmd=JS.T.o(36867,"set");b.tokenSet=JS.T.tv(36867,61,"");b.tokenSetArray=JS.T.tv(36867,91,"");b.tokenSetProperty=JS.T.tv(36867,46,"");b.tokenSetVar=JS.T.tv(36868,61,"var");b.tokenEquals=JS.T.o(268440324,"=");b.tokenScript=JS.T.o(134222850,"script");b.tokenSwitch=JS.T.o(102410,"switch");
b.tokenMap=new java.util.Hashtable;for(var a=u(-1,["(",JS.T.tokenLeftParen,")",JS.T.tokenRightParen,"and",JS.T.tokenAnd,"&",null,"&&",null,"or",JS.T.tokenOr,"|",null,"||",null,"?",JS.T.tokenOpIf,",",JS.T.tokenComma,"=",JS.T.tokenEquals,"==",null,":",JS.T.tokenColon,"+",JS.T.tokenPlus,"-",JS.T.tokenMinus,"*",JS.T.tokenTimes,"/",JS.T.tokenDivide,"script",JS.T.tokenScript,"source",null,"set",JS.T.tokenSetCmd,"switch",JS.T.tokenSwitch,"all",JS.T.tokenAll,"off",JS.T.tokenOff,"false",null,"on",JS.T.tokenOn,
"true",null]),d,b=null,h,r,e=a.length-1,f=0;f<e;f+=2)h=a[f],r=h.toLowerCase(),d=a[f+1],null==d?d=b:null==d.value&&(d.value=h),JS.T.tokenMap.put(r,d),b=d;var a=null,a=u(-1,"+= -= *= /= \\= &= |= not ! xor tog < <= >= > != <> LIKE within . .. [ ] { } $ % ; ++ -- ** \\ animation anim assign axes backbone background bind bondorder boundbox boundingBox break calculate capture cartoon cartoons case catch cd center centre centerat cgo color colour compare configuration conformation config connect console contact contacts continue data default define @ delay delete density depth dipole dipoles display dot dots draw echo ellipsoid ellipsoids else elseif end endif exit eval file files font for format frame frames frank function functions geosurface getProperty goto halo halos helix helixalpha helix310 helixpi hbond hbonds help hide history hover if in initialize invertSelected isosurface javascript label labels lcaoCartoon lcaoCartoons load log loop matrix measure measures monitor monitors meshribbon meshribbons message minimize minimization mo mode2d model models modulation move moveTo mutate navigate navigation nbo origin out parallel pause wait plot private plot3d pmesh polygon polyhedra polyhedron print process prompt quaternion quaternions quit ramachandran rama refresh reset unset restore restrict return ribbon ribbons rocket rockets rotate rotateSelected save select selectionHalos selectionHalo showSelections sheet show slab spacefill cpk spin ssbond ssbonds star stars step steps stereo strand strands structure _structure strucNo struts strut subset subsystem synchronize sync this trace translate translateSelected try unbind unitcell var vector vectors vibration while wireframe write zap zoom zoomTo atom atoms axisangle basepair basepairs orientation orientations pdbheader polymer polymers residue residues rotation row sequence seqcode shape state symbol symmetry symmetryHM spaceGroup transform translation url _ abs absolute _args acos add adpmax adpmin align altloc altlocs ambientOcclusion amino angle array as _a atomID _atomID atomIndex atomName atomno atomType atomX atomY atomZ average babel babel21 back backlit backshell balls baseModel best beta bin bondCount bonded bottom branch brillouin bzone cache carbohydrate cell chain chains chainNo chemicalShift cs clash clear clickable clipboard connected context constraint contourLines coord coordinates coords cos cross covalentRadius covalent direction displacement displayed distance div DNA domains dotted DSSP DSSR element elemno _e error exportScale fill find fixedTemperature forcefield formalCharge charge eta front frontlit frontOnly fullylit fx fy fz fxyz fux fuy fuz fuxyz group groups group1 _g groupID _groupID groupIndex hidden highlight hkl hydrophobicity hydrophobic hydro id identify ident image info infoFontSize inline insertion insertions intramolecular intra intermolecular inter bondingRadius ionicRadius ionic isAromatic Jmol JSON join keys last left length lines list magneticShielding ms mass max mep mesh middle min mlp mode modify modifyOrCreate modt modt1 modt2 modt3 modx mody modz modo modxyz molecule molecules modelIndex monomer morph movie mouse mul mul3 nboCharges nci next noDelay noDots noFill noMesh none null inherit normal noBackshell noContourLines notFrontOnly noTriangles now nucleic occupancy omega only opaque options partialCharge pattern phi pivot plane planar play playRev point points pointGroup polymerLength pop previous prev probe property properties protein psi purine push PyMOL pyrimidine random range rasmol replace resno resume rewind reverse right rmsd RNA rna3d rock rubberband rxyz saSurface saved scale scene search smarts selected seqid shapely sidechain sin site size smiles substructure solid sort specialPosition sqrt split starWidth starScale stddev straightness structureId supercell sub sum sum2 surface surfaceDistance symop symops sx sy sz sxyz tan temperature relativeTemperature tensor theta thisModel ticks top torsion trajectory trajectories translucent transparent triangles trim type ux uy uz uxyz user valence vanderWaals vdw vdwRadius visible volume vx vy vz vxyz xyz w wyckoff wyckoffm x y z addHydrogens allConnected angstroms anisotropy append arc area aromatic arrow async audio auto axis barb binary blockData cancel cap cavity centroid check checkCIR chemical circle collapsed col colorScheme command commands contour contours corners count criterion create crossed curve cutoff cylinder diameter discrete distanceFactor downsample drawing dynamicMeasurements eccentricity ed edges edgesOnly energy exitJmol faceCenterOffset filter first fixed fix flat fps from frontEdges full fullPlane functionXY functionXYZ gridPoints hiddenLinesDashed homo ignore InChI InChIKey increment insideout interior intersection intersect internal lattice line lineData link lobe lonePair lp lumo macro macros manifest mapProperty maxSet menu minSet modelBased molecular mrc msms name nmr noCross noDebug noEdges noHead noLoad noPlane object obj offset offsetSide once orbital atomicOrbital packed palindrome parameters path pdb period periodic perpendicular perp phase planarParam pocket pointsPerAngstrom radical rad reference remove resolution reverseColor rotate45 selection sigma sign silent sphere squared stdInChI stdInChIKey stop title titleFormat to validation value variable variables vertices width wigner wignerSeitz backgroundModel celShading celShadingPower debug debugHigh defaultLattice measurements measurement scale3D toggleLabel userColorScheme throw timeout timeouts window animationMode appletProxy atomTypes axesColor axis1Color axis2Color axis3Color backgroundColor bondmode boundBoxColor boundingBoxColor chirality cipRule currentLocalPath dataSeparator defaultAngleLabel defaultColorScheme defaultColors defaultDirectory defaultDistanceLabel defaultDropScript defaultLabelPDB defaultLabelXYZ defaultLoadFilter defaultLoadScript defaults defaultTorsionLabel defaultVDW drawFontSize eds edsDiff energyUnits fileCacheDirectory fontsize helpPath hoverLabel language loadFormat loadLigandFormat logFile measurementUnits nihResolverFormat nmrPredictFormat nmrUrlFormat pathForAllFiles picking pickingStyle pickLabel platformSpeed propertyColorScheme quaternionFrame smilesUrlFormat smiles2dImageFormat unitCellColor axesOffset axisOffset axesScale axisScale bondTolerance cameraDepth defaultDrawArrowScale defaultTranslucent dipoleScale ellipsoidAxisDiameter gestureSwipeFactor hbondsAngleMinimum hbondHXDistanceMaximum hbondsDistanceMaximum hbondNODistanceMaximum hoverDelay loadAtomDataTolerance minBondDistance minimizationCriterion minimizationMaxAtoms modulationScale mouseDragFactor mouseWheelFactor navFPS navigationDepth navigationSlab navigationSpeed navX navY navZ particleRadius pointGroupDistanceTolerance pointGroupLinearTolerance radius rotationRadius scaleAngstromsPerInch sheetSmoothing slabRange solventProbeRadius spinFPS spinX spinY spinZ stereoDegrees strutDefaultRadius strutLengthMaximum vectorScale vectorsCentered vectorSymmetry vectorTrail vibrationPeriod vibrationScale visualRange ambientPercent ambient animationFps axesMode bondRadiusMilliAngstroms bondingVersion delayMaximumMs diffusePercent diffuse dotDensity dotScale ellipsoidDotCount helixStep hermiteLevel historyLevel labelpointerwidth lighting logLevel meshScale minimizationReportSteps minimizationSteps minPixelSelRadius percentVdwAtom perspectiveModel phongExponent pickingSpinRate propertyAtomNumberField propertyAtomNumberColumnCount propertyDataColumnCount propertyDataField repaintWaitMs ribbonAspectRatio contextDepthMax scriptReportingLevel showScript smallMoleculeMaxAtoms specular specularExponent specularPercent specPercent specularPower specpower strandCount strandCountForMeshRibbon strandCountForStrands strutSpacing zDepth zSlab zshadePower allowEmbeddedScripts allowGestures allowKeyStrokes allowModelKit allowMoveAtoms allowMultiTouch allowRotateSelected antialiasDisplay antialiasImages antialiasTranslucent appendNew applySymmetryToBonds atomPicking allowAudio autobond autoFPS autoplayMovie axesMolecular axesOrientationRasmol axesUnitCell axesWindow bondModeOr bondPicking bonds bond cartoonBaseEdges cartoonBlocks cartoonBlockHeight cartoonsFancy cartoonFancy cartoonLadders cartoonRibose cartoonRockets cartoonSteps chainCaseSensitive cipRule6Full colorRasmol debugScript defaultStructureDssp disablePopupMenu displayCellParameters showUnitcellInfo dotsSelectedOnly dotSurface doublePrecision dragSelected drawHover drawPicking dsspCalculateHydrogenAlways elementKey ellipsoidArcs ellipsoidArrows ellipsoidAxes ellipsoidBall ellipsoidDots ellipsoidFill fileCaching fontCaching fontScaling forceAutoBond fractionalRelative greyscaleRendering hbondsBackbone hbondsRasmol hbondsSolid hetero hideNameInPopup hideNavigationPoint hideNotSelected highResolution hydrogen hydrogens imageState isKiosk isosurfaceKey isosurfacePropertySmoothing isosurfacePropertySmoothingPower jmolInJSpecView justifyMeasurements labelKey languageTranslation leadAtom leadAtoms legacyAutoBonding legacyHAddition legacyJavaFloat logCommands logGestures macroDirectory measureAllModels measurementLabels measurementNumbers messageStyleChime minimizationRefresh minimizationSilent modelkit modelkitMode modulateOccupancy monitorEnergy multiplebondbananas multipleBondRadiusFactor multipleBondSpacing multiProcessor navigateSurface navigationMode navigationPeriodic partialDots pdbAddHydrogens pdbGetHeader pdbSequential perspectiveDepth preserveState rangeSelected redo redoMove refreshing ribbonBorder rocketBarrels saveProteinStructureState scriptQueue selectAllModels selectHetero selectHydrogen showAxes showBoundBox showBoundingBox showFrank showHiddenSelectionHalos showHydrogens showKeyStrokes showMeasurements showModulationVectors showMultipleBonds showNavigationPointAlways showTiming showUnitcell showUnitcellDetails slabByAtom slabByMolecule slabEnabled smartAromatic solvent solventProbe ssBondsBackbone statusReporting strutsMultiple syncMouse syncScript testFlag1 testFlag2 testFlag3 testFlag4 traceAlpha twistedSheets undoAuto undo undoMax undoMove useMinimizationThread useNumberLocalization waitForMoveTo windowCentered wireframeRotation zeroBasedXyzRasmol zoomEnabled zoomHeight zoomLarge zShade".split(" ")),
j=E(-1,[268442114,-1,-1,-1,-1,-1,-1,268439040,-1,268438017,268438018,268440323,268440322,268440321,268440320,268440325,-1,268440326,134217759,1073742336,1073742337,268437504,268437505,1073742332,1073742338,1073742330,268441090,1073742339,268441602,268441601,268441603,268441091,4097,-1,4098,1611272194,1114249217,1610616835,4100,4101,1812599299,-1,102407,4102,4103,1112152066,-1,102411,102412,20488,12289,-1,4105,135174,1765808134,-1,134221831,1094717448,-1,-1,4106,528395,134353926,-1,102408,134221834,
102413,12290,-1,528397,12291,1073741914,554176526,135175,-1,1610625028,1275069444,1112150019,135176,537022465,1112150020,-1,364547,102402,102409,364548,266255,134218759,1228935687,-1,4114,134320648,1287653388,4115,-1,1611272202,134320141,-1,1112150021,1275072526,20500,1112152070,-1,136314895,2097159,2097160,2097162,1613238294,-1,20482,12294,1610616855,544771,134320649,1275068432,4121,4122,135180,134238732,1825200146,-1,135182,-1,134223363,36869,528411,134217766,1745489939,-1,-1,-1,1112152071,-1,20485,
4126,-1,1073877010,603979882,1094717454,-1,1275072532,4128,4129,4130,4131,-1,1073877011,1073742078,1073742079,102436,20487,-1,4133,4134,135190,135188,1073742106,1275203608,-1,36865,102439,134256129,134221850,-1,266281,4138,-1,266284,4141,-1,4142,12295,36866,1112152073,-1,1112152074,-1,528432,4145,4146,1275082241,1611141172,-1,-1,2097184,134222350,554176565,1112152075,-1,1095241729,1611141176,-1,1112152076,-1,266298,-1,528443,1649022989,-1,1639976963,-1,1094713367,659482,-1,2109448,1094713368,4156,
-1,1073742340,1112152078,4160,4162,364558,4163,1814695966,36868,135198,-1,4166,102406,659488,134221856,12297,4168,4170,1153433601,-1,134217731,1073741863,-1,1073742077,-1,1073742088,1094713362,-1,1073742120,-1,1073742132,1275068935,1086324744,1086324747,1086324748,1073742158,1086326798,1088421903,603979956,134217764,1073742176,1073742178,1073742184,1275068446,134218250,1073741826,134217765,134218241,1275069441,1111490561,1111490562,1073741832,1086324739,-1,553648129,2097154,134217729,1275068418,1073741848,
1094713346,-1,-1,1094713347,1086326786,1094715393,1086326785,1111492609,1111492610,1111492611,96,1073741856,1073741857,1073741858,1073741861,1073741862,1073741859,2097200,1073741864,1073741865,1275068420,1228931586,2097155,1073741871,1073742328,1073741872,-1,134221829,2097188,1094713349,1086326788,-1,1094713351,1111490563,-1,1073741881,1073741882,2097190,1073741884,134217736,14,1073741894,1073741898,1073742329,-1,-1,134218245,1275069442,1111490564,-1,1073741918,1073741922,2097192,1275069443,1275068928,
2097156,1073741925,1073741926,1073741915,1111490587,1086326789,1094715402,1094713353,1073741936,570425357,1073741938,1275068427,1073741946,545259560,1631586315,-1,1111490565,1073741954,1073741958,1073741960,1073741964,1111492612,1111492613,1111492614,1145047050,1111492615,1111492616,1111492617,1145047053,1086324742,-1,1086324743,1094713356,-1,-1,1094713357,2097194,536870920,134219777,1113589786,-1,-1,1073741974,1086324745,-1,4120,1073741982,553648145,1073741984,1086324746,-1,1073741989,-1,1073741990,
-1,1111492618,-1,-1,1073742331,1073741991,1073741992,1275069446,1140850706,1073741993,1073741996,1140850691,1140850692,1073742001,1111490566,-1,1111490567,64,1073742016,1073742018,1073742019,32,1073742022,1073742024,1073742025,1073742026,1111490580,-1,1111490581,1111490582,1111490583,1111490584,1111490585,1111490586,1145045008,1094713360,-1,1094713359,1094713361,1073742029,1073742031,1073742030,1275068929,1275068930,603979891,1073742036,1073742037,603979892,1073742042,1073742046,1073742052,1073742333,
-1,-1,1073742056,1073742057,1073742039,1073742058,1073742060,134218760,2097166,1128269825,1111490568,1073742072,1073742074,1073742075,1111492619,134218753,1111490569,1275068725,134217750,-1,1073742096,1073742098,134217751,-1,1275068447,1094713363,1275334681,1073742108,-1,1073742109,1715472409,-1,2097168,1111490570,2097170,1275335685,1073742110,2097172,134219266,1073742114,1073742116,1275068443,1094715412,4143,1073742125,1140850693,1073742126,1073742127,2097174,1073742128,1073742129,1073742134,1145045003,
1073742135,1073742136,536875059,1073742139,134218756,-1,1113589787,1094713365,1073742144,2097178,134218244,1094713366,1140850694,134218757,1237320707,1073742150,1275068444,2097196,134218246,1275069447,570425403,-1,192,1111490574,1086324749,1073742163,1275068931,128,160,2097180,1111490575,1296041985,-1,1111490571,1111490572,1111490573,1145047052,134218255,1111492620,-1,1275068445,1111490576,2097182,1073742164,1073742172,1073742174,536870926,-1,1111490588,-1,1073742182,1275068932,1140850696,1111490577,
1111490578,1111490579,1145045006,1073742186,1094715418,1648363544,-1,-1,2097198,1312817669,1111492626,1111492627,1111492628,1145047055,1145047049,1140850705,1086324754,1086324755,1111492629,1111492630,1111492631,1073741828,1073741834,1073741836,1073741837,1073741839,1073741840,1073741842,1075838996,1073741846,1073741849,4108,1073741852,1073741854,1073741860,1073741866,1073741868,1073741874,1073741875,1073741876,1094713350,1073741877,603979821,1073741879,1073741880,1073741886,1275068934,1073741888,
1073741890,1073741892,1073741896,1073741900,1073741902,1275068425,1073741905,1073741904,1073741906,1073741908,1073741910,1073741912,1073741917,1073741920,1073741924,1073741928,1073741929,603979836,1073741931,1073741932,1073741933,1073741934,1073741935,266256,1073741937,1073741940,1073741942,12293,-1,1073741948,1073741950,1073741952,1073741956,1073741961,1073741962,1073741966,1073741968,1073741970,603979856,1073741973,1073741976,1275068433,1073741978,1073741981,1073741985,1073741986,134217763,-1,1073741988,
1073741994,1073741998,1073742E3,1073741999,1073742002,1073742004,1073742006,1073742008,4124,-1,1073742010,4125,1073742014,1073742015,1073742020,1073742027,1073742028,1073742032,1073742033,1073742034,1073742038,1073742040,1073742041,1073742044,1073742048,1073742050,1073742054,1073742064,1073742062,1073742066,1073742068,1073742070,1073742076,1073741850,1073742080,1073742082,1073742083,1073742084,1073742086,1073742090,-1,1073742092,-1,1073742094,1073742099,1073742100,1073742104,1073742112,1073742111,
1073742118,1073742119,1073742122,1073742124,1073742130,1073742140,1073742146,1073742147,1073742148,1073742154,1073742156,1073742159,1073742160,1073742162,1073742166,1073742168,1073742170,1073742189,1073742188,1073742190,1073742192,1073742194,1073742196,1073742197,-1,536870914,603979820,553648135,536870916,536870917,536870918,537006096,-1,1610612740,1610612741,536870930,36870,536875070,-1,536870932,545259521,545259522,545259524,545259526,545259528,545259530,545259532,545259534,1610612737,545259536,
-1,1086324752,1086324753,545259538,545259540,545259542,545259545,-1,545259546,545259547,545259548,545259543,545259544,545259549,545259550,545259552,545259554,545259555,570425355,545259556,545259557,545259558,545259559,1610612738,545259561,545259562,545259563,545259564,545259565,545259566,545259568,545259570,545259569,545259571,545259572,545259573,545259574,545259576,553648158,545259578,545259580,545259582,545259584,545259586,570425345,-1,570425346,-1,570425348,570425350,570425352,570425353,570425354,
570425356,570425358,570425359,570425361,570425360,-1,570425362,570425363,570425364,570425365,553648152,570425366,570425367,570425368,570425371,570425372,570425373,570425374,570425376,570425378,570425380,570425381,570425382,570425384,1665140738,570425388,570425390,570425392,570425393,570425394,570425396,570425398,570425400,570425402,570425404,570425406,570425408,1648361473,603979972,603979973,553648185,570425412,570425414,570425416,553648130,-1,553648132,553648133,553648134,553648136,553648137,553648138,
-1,553648139,553648140,553648141,553648142,553648143,553648144,553648147,1073741995,553648148,553648149,553648150,553648151,553648153,553648154,553648155,553648156,553648157,553648160,553648161,553648162,553648164,553648165,553648166,553648167,553648168,536870922,553648170,536870924,553648172,553648174,-1,553648176,-1,553648178,553648180,553648182,553648183,553648186,553648188,553648190,603979778,603979780,603979781,603979782,603979783,603979784,603979785,603979786,603979788,603979790,603979792,603979794,
603979796,603979797,603979798,603979800,603979802,603979804,603979806,603979808,603979809,603979812,603979814,1677721602,-1,603979815,603979810,570425347,603979816,-1,603979817,603979818,603979819,603979811,603979822,603979823,603979824,603979825,603979826,603979827,603979828,-1,603979829,603979830,603979831,603979832,603979833,603979834,603979835,603979838,603979839,603979840,603979841,603979842,603979843,603979844,603979845,603979846,603979847,603979848,603979849,603979850,603979852,603979853,603979854,
1612709894,603979858,603979860,603979862,603979863,1612709900,-1,603979864,603979865,603979866,603979867,553648146,603979868,603979869,603979870,603979871,2097165,-1,603979872,603979873,603979874,603979875,603979876,545259567,603979877,603979878,1610612739,603979879,603979880,603979881,603983903,-1,603979884,603979885,603979886,570425369,570425370,603979887,603979888,603979889,603979890,603979893,603979894,603979895,603979896,603979897,603979898,603979899,4139,4140,603979900,603979901,603979902,603979903,
603979904,603979906,603979908,603979910,603979914,603979916,-1,603979918,603979920,603979922,603979924,603979926,603979927,603979928,603979930,603979934,603979936,603979937,603979939,603979940,603979942,603979944,1612709912,603979948,603979952,603979954,603979955,603979957,603979958,603979960,603979962,603979964,603979965,603979966,603979968,603979969,603984065,553648184,4165,603979970,603979971,603979975,603979976,603979977,603979978,603979980,603979982,603979983,603979984]);a.length!=j.length&&
(JU.Logger.error("sTokens.length ("+a.length+") != iTokens.length! ("+j.length+")"),System.exit(1));e=a.length;for(f=0;f<e;f++)h=a[f],r=h.toLowerCase(),d=j[f],d=b=-1==d?b:JS.T.o(d,h),null!=JS.T.tokenMap.get(r)&&JU.Logger.error("duplicate token definition:"+r),JS.T.tokenMap.put(r,d);j=a=null});n("J.shape");z(["J.shape.Shape"],"J.shape.AtomShape","JU.AU $.BS J.atomdata.RadiusData J.c.PAL $.VDW JU.BSUtil $.C".split(" "),function(){var b=w(function(){this.mad=-1;this.paletteIDs=this.colixes=this.mads=
null;this.isActive=!1;this.rd=null;this.isSet=!1;this.monomerCount=0;this.bsSizeDefault=null;q(this,arguments)},J.shape,"AtomShape",J.shape.Shape);g(b,"initShape",function(){});g(b,"initModelSet",function(){this.isSet=!0;var a=this.ms.ac;null!=this.mads&&(this.mads=JU.AU.arrayCopyShort(this.mads,a));null!=this.colixes&&(this.colixes=JU.AU.arrayCopyShort(this.colixes,a));null!=this.paletteIDs&&(this.paletteIDs=JU.AU.arrayCopyByte(this.paletteIDs,a))});g(b,"getSize",function(a){return null==this.mads?
0:this.mads[a]},"~N");g(b,"setSize",function(a,d){this.setSize2(a,d)},"~N,JU.BS");c(b,"setSize2",function(a,d){0==a?this.setSizeRD(null,d):(null==this.rd?this.rd=new J.atomdata.RadiusData(null,a,J.atomdata.RadiusData.EnumType.SCREEN,null):this.rd.value=a,this.setSizeRD(this.rd,d))},"~N,JU.BS");g(b,"setSizeRD",function(a,d){if(this.isSet){this.isActive=!0;var b=null!=a&&0!=a.value,c=null==d,e=this.ms.ac,f=c?e-1:d.nextSetBit(0);null==this.bsSizeSet&&(this.bsSizeSet=JU.BS.newN(e));null==this.mads&&0<=
f&&(this.mads=U(e,0));for(e=f;0<=e;e=c?e-1:d.nextSetBit(e+1))this.setSizeRD2(e,a,b)}},"J.atomdata.RadiusData,JU.BS");c(b,"setSizeRD2",function(a,d,b){var c=this.ms.at[a];this.mads[a]=c.calculateMad(this.vwr,d);this.bsSizeSet.setBitTo(a,b);c.setShapeVisibility(this.vf,b)},"~N,J.atomdata.RadiusData,~B");c(b,"setPropAS",function(a,d,b){if("color"===a){this.isActive=!0;var c=JU.C.getColixO(d),e=J.c.PAL.pidOf(d);d=this.checkColixLength(c,b.length());for(a=b.nextSetBit(0);0<=a&&a<d;a=b.nextSetBit(a+1))this.setColixAndPalette(c,
e,a)}else if("params"===a){this.isActive=!0;var e=d[0],f=d[1],j=d[2],k=new J.atomdata.RadiusData(null,0,J.atomdata.RadiusData.EnumType.FACTOR,J.c.VDW.AUTO);null==this.bsColixSet&&(this.bsColixSet=new JU.BS);null==this.bsSizeSet&&(this.bsSizeSet=new JU.BS);a=b.nextSetBit(0);null==this.mads&&0<=a&&(this.mads=U(this.ms.ac,0));d=this.checkColixLength(null==e?0:4,b.length());for(var l=0;0<=a&&a<d;a=b.nextSetBit(a+1),l++){var c=null==e?0:e[l],g=null==f?0:f[l];0.01<g&&(c=JU.C.getColixTranslucent3(c,!0,g));
this.setColixAndPalette(c,J.c.PAL.UNKNOWN.id,a);null!=j&&(c=0<(k.value=j[l]),this.setSizeRD2(a,k,c))}}else if("translucency"===a){this.isActive=!0;d=d.equals("translucent");this.checkColixLength(4,this.ms.ac);for(a=b.nextSetBit(0);0<=a;a=b.nextSetBit(a+1))this.colixes[a]=JU.C.getColixTranslucent3(this.colixes[a],d,this.translucentLevel),d&&this.bsColixSet.set(a)}else"deleteModelAtoms"===a?(a=d[2],d=a[1],a=a[2],this.mads=JU.AU.deleteElements(this.mads,d,a),this.colixes=JU.AU.deleteElements(this.colixes,
d,a),this.paletteIDs=JU.AU.deleteElements(this.paletteIDs,d,a),JU.BSUtil.deleteBits(this.bsSizeSet,b),JU.BSUtil.deleteBits(this.bsColixSet,b)):this.setPropS(a,d,b)},"~S,~O,JU.BS");c(b,"checkColixLength",function(a,d){d=Math.min(this.ms.ac,d);if(0==a)return null==this.colixes?0:this.colixes.length;if(null==this.colixes||d>this.colixes.length)this.colixes=JU.AU.ensureLengthShort(this.colixes,d),this.paletteIDs=JU.AU.ensureLengthByte(this.paletteIDs,d);null==this.bsColixSet&&(this.bsColixSet=JU.BS.newN(this.ms.ac));
return d},"~N,~N");c(b,"setColixAndPalette",function(a,d,b){null==this.colixes&&this.checkColixLength(-1,this.ms.ac);this.colixes[b]=a=this.getColixI(a,d,b);this.bsColixSet.setBitTo(b,0!=a||0==this.shapeID);this.paletteIDs[b]=d},"~N,~N,~N");g(b,"setAtomClickability",function(){if(this.isActive)for(var a=this.ms.at,d=this.ms.ac;0<=--d;){var b=a[d];null==b||(0==(b.shapeVisibilityFlags&this.vf)||this.ms.isAtomHidden(d))||b.setClickable(this.vf)}});g(b,"getShapeState",function(){return null})});n("J.shape");
z(["J.shape.AtomShape"],"J.shape.Balls",["JU.BS","J.c.PAL","JU.C"],function(){var b=G(J.shape,"Balls",J.shape.AtomShape);g(b,"setSize",function(a,d){2147483647==a?(this.isActive=!0,null==this.bsSizeSet&&(this.bsSizeSet=new JU.BS),this.bsSizeSet.or(d)):this.setSize2(a,d)},"~N,JU.BS");g(b,"setSizeRD",function(a,d){this.isActive=!0;null==this.bsSizeSet&&(this.bsSizeSet=new JU.BS);for(var b=Math.min(this.ms.at.length,d.length()),c=d.nextSetBit(0);0<=c&&c<b;c=d.nextSetBit(c+1))this.ms.at[c].setMadAtom(this.vwr,
a),this.bsSizeSet.set(c)},"J.atomdata.RadiusData,JU.BS");g(b,"setProperty",function(a,d,b){if("color"===a){var c=JU.C.getColixO(d);0==c&&(c=2);null==this.bsColixSet&&(this.bsColixSet=new JU.BS);var e=J.c.PAL.pidOf(d);for(a=b.nextSetBit(0);0<=a;a=b.nextSetBit(a+1)){var f=this.ms.at[a];f.colixAtom=this.getColixA(c,e,f);this.bsColixSet.setBitTo(a,2!=c||e!=J.c.PAL.NONE.id);f.paletteID=e}this.vwr.setModelkitPropertySafely("updateatomkeys",b)}else if("colorValues"===a){if(0!=d.length){null==this.bsColixSet&&
(this.bsColixSet=new JU.BS);var j=0,e=null;for(a=b.nextSetBit(0);0<=a&&!(j>=d.length);a=b.nextSetBit(a+1))e=Integer.$valueOf(d[j++]),c=JU.C.getColixO(e),0==c&&(c=2),e=J.c.PAL.pidOf(e),f=this.ms.at[a],f.colixAtom=this.getColixA(c,e,f),this.bsColixSet.setBitTo(a,2!=c||e!=J.c.PAL.NONE.id),f.paletteID=e}}else if("colors"===a){j=d[0];null==this.bsColixSet&&(this.bsColixSet=new JU.BS);d=this.ms.at;for(a=b.nextSetBit(0);0<=a;a=b.nextSetBit(a+1))if(!(a>=j.length||0==(c=j[a])))d[a].colixAtom=c,d[a].paletteID=
J.c.PAL.UNKNOWN.id,this.bsColixSet.set(a)}else if("translucency"===a){c=d.equals("translucent");null==this.bsColixSet&&(this.bsColixSet=new JU.BS);d=this.ms.at;for(a=b.nextSetBit(0);0<=a;a=b.nextSetBit(a+1))d[a].setTranslucent(c,this.translucentLevel),c&&this.bsColixSet.set(a)}else a.startsWith("ball")&&(a=a.substring(4).intern()),this.setPropAS(a,d,b)},"~S,~O,JU.BS");g(b,"setAtomClickability",function(){for(var a=this.vwr.slm.bsDeleted,d=this.ms.ac;0<=--d;){var b=this.ms.at[d];null!=b&&(b.setClickable(0),
null!=a&&a.get(d)||(0==(b.shapeVisibilityFlags&this.vf)||this.ms.isAtomHidden(d))||b.setClickable(this.vf))}})});n("J.shape");z(["J.shape.Shape"],"J.shape.FontLineShape",null,function(){var b=w(function(){this.font3d=this.tickInfos=null;q(this,arguments)},J.shape,"FontLineShape",J.shape.Shape);g(b,"initShape",function(){this.translucentAllowed=!1});c(b,"setPropFLS",function(a,d){if("tickInfo"===a){var b=d.type;if(null==d.ticks)if(" "==d.type)this.tickInfos=null;else{if(null!=this.tickInfos){for(var b=
!1,c=0;4>c;c++)null!=this.tickInfos[c]&&this.tickInfos[c].type==d.type?this.tickInfos[c]=null:b=!0;b||(this.tickInfos=null)}}else null==this.tickInfos&&(this.tickInfos=Array(4)),this.tickInfos["xyz".indexOf(b)+1]=d}else"font"===a&&(this.font3d=d)},"~S,~O");g(b,"getShapeState",function(){return null})});n("J.shape");z(["J.shape.Shape"],"J.shape.Frank",["J.i18n.GT","JV.Viewer"],function(){var b=w(function(){this.baseFont3d=this.currentMetricsFont3d=null;this.scaling=this.dy=this.dx=this.y=this.x=this.frankDescent=
this.frankAscent=this.frankWidth=0;this.font3d=null;q(this,arguments)},J.shape,"Frank",J.shape.Shape);g(b,"initShape",function(){this.myType="frank";this.baseFont3d=this.font3d=this.vwr.gdata.getFont3DFSS("SansSerif","Plain",16);if(JV.Viewer.isJS||JV.Viewer.isSwingJS)J.shape.Frank.frankString="JSmol";this.calcMetrics()});g(b,"setProperty",function(a,d){"font"===a&&10<=d.fontSize&&(this.baseFont3d=d,this.scaling=0)},"~S,~O,JU.BS");g(b,"wasClicked",function(a,d){var b=this.vwr.getScreenWidth(),c=this.vwr.getScreenHeight();
return 0<b&&0<c&&a>b-this.frankWidth-4&&d>c-this.frankAscent-4},"~N,~N");g(b,"checkObjectHovered",function(a,d){if(!this.vwr.getShowFrank()||!this.wasClicked(a,d)||!this.vwr.menuEnabled())return!1;this.vwr.hoverOnPt(a,d,J.i18n.GT.$("Click for menu..."),null,null);return!0},"~N,~N,JU.BS");c(b,"calcMetrics",function(){this.font3d!==this.currentMetricsFont3d&&(this.currentMetricsFont3d=this.font3d,this.frankWidth=this.font3d.stringWidth(J.shape.Frank.frankString),this.frankDescent=this.font3d.getDescent(),
this.frankAscent=this.font3d.getAscent())});c(b,"getFont",function(a){a!=this.scaling&&(this.scaling=a,this.font3d=this.vwr.gdata.getFont3DScaled(this.baseFont3d,a),this.calcMetrics())},"~N");g(b,"getShapeState",function(){return null});b.frankString="Jmol"});n("J.shape");z(null,"J.shape.Shape",["J.c.PAL","JU.C","$.Logger","JV.JC"],function(){var b=w(function(){this.ms=this.vwr=this.myType=null;this.translucentLevel=this.vf=this.shapeID=0;this.translucentAllowed=!0;this.isBioShape=!1;this.bsColixSet=
this.bsSizeSet=null;q(this,arguments)},J.shape,"Shape",null);c(b,"initializeShape",function(a,d,b){this.vwr=a;this.shapeID=b;this.vf=JV.JC.getShapeVisibilityFlag(b);this.setModelSet(d);this.initShape()},"JV.Viewer,JM.ModelSet,~N");c(b,"setModelVisibilityFlags",function(){},"JU.BS");c(b,"getSize",function(){return 0},"~N");c(b,"getSizeG",function(){return 0},"JM.Group");c(b,"replaceGroup",function(){},"JM.Group,JM.Group");c(b,"setModelSet",function(a){this.ms=a;this.initModelSet()},"JM.ModelSet");
c(b,"initModelSet",function(){});c(b,"setShapeSizeRD",function(a,d,b){null==d?this.setSize(a,b):this.setSizeRD(d,b)},"~N,J.atomdata.RadiusData,JU.BS");c(b,"setSize",function(){},"~N,JU.BS");c(b,"setSizeRD",function(){},"J.atomdata.RadiusData,JU.BS");c(b,"setPropS",function(a,d){"setProperties"===a?this.setProperties(d):"translucentLevel"===a?this.translucentLevel=d.floatValue():"refreshTrajectories"!==a&&JU.Logger.warn("unassigned "+JV.JC.shapeClassBases[this.shapeID]+" + shape setProperty:"+a+":"+
d)},"~S,~O,JU.BS");c(b,"getPropertyData",function(a,d){return this.getPropShape(a,d)},"~S,~A");c(b,"getPropShape",function(a,d){if(C(d[1],Integer)){var b=d[1].intValue();d[1]=this.getProperty(a,b);return null!=d[1]}return!1},"~S,~A");c(b,"getProperty",function(){return null},"~S,~N");c(b,"getIndexFromName",function(){return-1},"~S");c(b,"wasClicked",function(){return!1},"~N,~N");c(b,"findNearestAtomIndex",function(){},"~N,~N,~A,JU.BS");c(b,"checkBoundsMinMax",function(){},"JU.P3,JU.P3");c(b,"setAtomClickability",
function(){});c(b,"checkObjectClicked",function(){return null},"~N,~N,~N,JU.BS,~B");c(b,"checkObjectHovered",function(){return!1},"~N,~N,JU.BS");c(b,"checkObjectDragged",function(){return!1},"~N,~N,~N,~N,~N,JU.BS");c(b,"coordinateInRange",function(a,d,b,c,e){this.vwr.tm.transformPtScr(b,e);a=(a-e.x)*(a-e.x)+(d-e.y)*(d-e.y);return a<=c?a:-1},"~N,~N,JU.T3,~N,JU.P3i");c(b,"getColixI",function(a,d,b){return this.getColixA(a,d,this.ms.at[b])},"~N,~N,~N");c(b,"getColixA",function(a,d,b){return 2==a?this.vwr.cm.getColixAtomPalette(b,
d):a},"~N,~N,JM.Atom");c(b,"getColixB",function(a,d,b){return 2==a?this.vwr.cm.getColixBondPalette(b,d):a},"~N,~N,JM.Bond");c(b,"getShapeDetail",function(){return null});b.getColix=c(b,"getColix",function(a,d,b){return JU.C.getColixInherited(null==a||d>=a.length?0:a[d],b.colixAtom)},"~A,~N,JM.Atom");b.getFontCommand=c(b,"getFontCommand",function(a,d){return null==d?"":"font "+a+" "+d.getInfo()},"~S,JU.Font");b.getColorCommandUnk=c(b,"getColorCommandUnk",function(a,d,b){return J.shape.Shape.getColorCommand(a,
J.c.PAL.UNKNOWN.id,d,b)},"~S,~N,~B");b.getColorCommand=c(b,"getColorCommand",function(a,d,b,c){if(d==J.c.PAL.UNKNOWN.id&&0==b)return"";d=d==J.c.PAL.UNKNOWN.id&&0==b?"":(c?J.shape.Shape.getTranslucentLabel(b)+" ":"")+(d!=J.c.PAL.UNKNOWN.id&&!J.c.PAL.isPaletteVariable(d)?J.c.PAL.getPaletteName(d):J.shape.Shape.encodeColor(b));return"color "+a+" "+d},"~S,~N,~N,~B");b.encodeColor=c(b,"encodeColor",function(a){return JU.C.isColixColorInherited(a)?"none":JU.C.getHexCode(a)},"~N");b.getTranslucentLabel=
c(b,"getTranslucentLabel",function(a){return JU.C.isColixTranslucent(a)?JU.C.getColixTranslucencyLabel(a):"opaque"},"~N");b.appendCmd=c(b,"appendCmd",function(a,d){0!=d.length&&a.append("  ").append(d).append(";\n")},"JU.SB,~S");c(b,"setProperties",function(a){var d=this.vwr.bsA();if(C(a,"JU.Lst"))for(;0<a.size();){var b=a.removeItemAt(0);this.setProperty(b[0].intern(),b[1],d)}else{b=a;a=0;for(var c=b.length;a<c;a++)this.setProperty(b[a][0].intern(),b[a][1],d)}},"~O")});n("J.shape");z(["J.shape.Shape",
"JU.P3i"],"J.shape.Sticks","java.util.Hashtable JU.BS $.P3 J.c.PAL JU.BSUtil $.C $.Edge $.Escape".split(" "),function(){var b=w(function(){this.myMask=0;this.haveStrutPoints=this.reportAll=!1;this.ptXY=this.closestAtom=this.selectedBonds=this.bsOrderSet=null;q(this,arguments)},J.shape,"Sticks",J.shape.Shape);N(b,function(){this.closestAtom=E(1,0);this.ptXY=new JU.P3i});g(b,"initShape",function(){this.myMask=1023;this.reportAll=!1});g(b,"setSize",function(a,d){if(2147483647==a)this.selectedBonds=JU.BSUtil.copy(d);
else if(-2147483648==a)null==this.bsOrderSet&&(this.bsOrderSet=new JU.BS),this.bsOrderSet.or(d);else{null==this.bsSizeSet&&(this.bsSizeSet=new JU.BS);for(var b=null!=this.selectedBonds?this.ms.getBondIterator(this.selectedBonds):this.ms.getBondIteratorForType(this.myMask,d);b.hasNext();){this.bsSizeSet.set(b.nextIndex());var c=b.next();null!=c&&c.setMad(a)}}},"~N,JU.BS");g(b,"setProperty",function(a,d,b){if("type"===a)this.myMask=d.intValue();else if("reportAll"===a)this.reportAll=!0;else if("reset"===
a)this.selectedBonds=this.bsColixSet=this.bsSizeSet=this.bsOrderSet=null;else if("bondOrder"===a){null==this.bsOrderSet&&(this.bsOrderSet=new JU.BS);a=d.intValue();for(b=null!=this.selectedBonds?this.ms.getBondIterator(this.selectedBonds):this.ms.getBondIteratorForType(65535,b);b.hasNext();)this.bsOrderSet.set(b.nextIndex()),b.next().setOrder(a)}else if("color"===a)if(null==this.bsColixSet&&(this.bsColixSet=new JU.BS),a=JU.C.getColixO(d),d=C(d,"J.c.PAL")?d:null,d===J.c.PAL.TYPE||d===J.c.PAL.ENERGY){var c=
d===J.c.PAL.ENERGY;for(b=null!=this.selectedBonds?this.ms.getBondIterator(this.selectedBonds):this.ms.getBondIteratorForType(this.myMask,b);b.hasNext();){this.bsColixSet.set(b.nextIndex());var e=b.next();e.colix=c?this.getColixB(a,d.id,e):JU.C.getColix(JU.Edge.getArgbHbondType(e.order))}}else{if(!(2==a&&d!==J.c.PAL.CPK))for(b=null!=this.selectedBonds?this.ms.getBondIterator(this.selectedBonds):this.ms.getBondIteratorForType(this.myMask,b);b.hasNext();)d=b.nextIndex(),b.next().colix=a,this.bsColixSet.setBitTo(d,
0!=a&&2!=a)}else if("translucency"===a){null==this.bsColixSet&&(this.bsColixSet=new JU.BS);a=d.equals("translucent");for(b=null!=this.selectedBonds?this.ms.getBondIterator(this.selectedBonds):this.ms.getBondIteratorForType(this.myMask,b);b.hasNext();)this.bsColixSet.set(b.nextIndex()),b.next().setTranslucent(a,this.translucentLevel)}else"deleteModelAtoms"!==a&&this.setPropS(a,d,b)},"~S,~O,JU.BS");g(b,"getProperty",function(a){return a.equals("selectionState")?null!=this.selectedBonds?"select BONDS "+
JU.Escape.eBS(this.selectedBonds)+"\n":"":a.equals("sets")?u(-1,[this.bsOrderSet,this.bsSizeSet,this.bsColixSet]):null},"~S,~N");g(b,"setAtomClickability",function(){for(var a=this.ms.bo,d=this.ms.bondCount;0<=--d;){var b=a[d];null==b||(0==(b.shapeVisibilityFlags&this.vf)||this.ms.isAtomHidden(b.atom1.i)||this.ms.isAtomHidden(b.atom2.i))||(b.atom1.setClickable(this.vf),b.atom2.setClickable(this.vf))}});g(b,"getShapeState",function(){return null});g(b,"checkObjectHovered",function(a,d,b){var c=new JU.P3;
b=this.findPickedBond(a,d,b,c,this.closestAtom);if(null==b)return!1;this.vwr.highlightBond(b.index,this.closestAtom[0],a,d);return!0},"~N,~N,JU.BS");g(b,"checkObjectClicked",function(a,d,b,c){b=new JU.P3;a=this.findPickedBond(a,d,c,b,this.closestAtom);if(null==a)return null;d=a.atom1.mi;c=a.getIdentity();var e=new java.util.Hashtable;e.put("pt",b);e.put("index",Integer.$valueOf(a.index));e.put("modelIndex",Integer.$valueOf(d));e.put("model",this.vwr.getModelNumberDotted(d));e.put("type","bond");e.put("info",
c);this.vwr.setStatusAtomPicked(-3,'["bond","'+a.getIdentity()+'",'+b.x+","+b.y+","+b.z+"]",e,!1);return e},"~N,~N,~N,JU.BS,~B");c(b,"findPickedBond",function(a,d,b,c,e){b=100;this.vwr.gdata.isAntialiased()&&(a<<=1,d<<=1,b<<=1);for(var f=null,j=new JU.P3,k=this.ms.bo,l=this.ms.bondCount;0<=--l;){var g=k[l];if(!(null==g||0==g.shapeVisibilityFlags)){var m=g.atom1,p=g.atom2;if(m.checkVisible()&&p.checkVisible()){j.ave(m,p);var y=this.coordinateInRange(a,d,j,b,this.ptXY);if(0<=y&&40<Math.abs(m.sY-p.sY)+
Math.abs(m.sX-p.sX)){var A=1*(this.ptXY.x-m.sX)/(p.sX-m.sX);0.4>A||0.6<A||(b=y,f=g,null!=e&&(e[0]=0.5>A?m.i:p.i),c.setT(j))}}}}return f},"~N,~N,JU.BS,JU.P3,~A")});n("J.thread");z(["J.thread.JmolThread"],"J.thread.HoverWatcherThread",null,function(){var b=w(function(){this.moved=this.current=this.actionManager=null;this.hoverDelay=0;q(this,arguments)},J.thread,"HoverWatcherThread",J.thread.JmolThread);x(b,function(a,d,b,c){this.setViewer(c,"HoverWatcher");this.actionManager=a;this.current=d;this.moved=
b;this.start()},"JV.ActionManager,JV.MouseState,JV.MouseState,JV.Viewer");g(b,"run1",function(a){for(;;)switch(a){case -1:this.isJS||Thread.currentThread().setPriority(1);a=0;break;case 0:this.hoverDelay=this.vwr.getHoverDelay();if(this.stopped||0>=this.hoverDelay||!this.runSleep(this.hoverDelay,1))return;a=1;break;case 1:this.moved.is(this.current)&&(this.currentTime=System.currentTimeMillis(),this.currentTime-this.moved.time>(this.vwr.acm.zoomTrigger?100:this.hoverDelay)&&!this.stopped&&this.actionManager.checkHover()),
a=0}},"~N")});n("J.thread");z(["java.lang.Thread"],"J.thread.JmolThread",["JU.Logger","JV.Viewer"],function(){var b=w(function(){this.$name="JmolThread";this.sc=this.eval=this.vwr=null;this.hoverEnabled=this.haveReference=!1;this.sleepTime=this.currentTime=this.lastRepaintTime=this.targetTime=this.startTime=0;this.isReset=this.stopped=this.isJS=!1;this.useTimeout=!0;this.junk=0;q(this,arguments)},J.thread,"JmolThread",Thread);c(b,"setManager",function(){return 0},"~O,JV.Viewer,~O");c(b,"setViewer",
function(a,d){this.setName(d);this.$name=d+"_"+ ++J.thread.JmolThread.threadIndex;this.vwr=a;this.isJS=a.isSingleThreaded},"JV.Viewer,~S");c(b,"setEval",function(a){this.eval=a;this.sc=this.vwr.getEvalContextAndHoldQueue(a);null!=this.sc&&(this.useTimeout=a.getAllowJSThreads())},"J.api.JmolScriptEvaluator");c(b,"resumeEval",function(){if(!(null==this.eval||!this.isJS&&!this.vwr.testAsync||!this.useTimeout)){this.sc.mustResumeEval=!this.stopped;var a=this.eval,d=this.sc;this.sc=this.eval=null;setTimeout(function(){a.resumeEval(d)},
1)}});g(b,"start",function(){this.run()});g(b,"run",function(){this.startTime=System.currentTimeMillis();try{this.run1(-1)}catch(a){if(D(a,"InterruptedException")){var d=a;JU.Logger.debugging&&!C(this,"J.thread.HoverWatcherThread")&&this.oops(d)}else if(D(a,Exception))this.oops(a);else throw a;}});c(b,"oops",function(a){JU.Logger.debug(this.$name+" exception "+a);(!JV.Viewer.isJS||JV.Viewer.isSwingJS)&&a.printStackTrace();this.vwr.queueOnHold=!1},"Exception");c(b,"runSleep",function(a,d){if(this.isJS&&
!this.useTimeout)return!0;var b=this;setTimeout(function(){b.run1(d)},Math.max(a,0));return!1},"~N,~N");c(b,"interrupt",function(){this.stopped=!0;this.vwr.startHoverWatcher(!0);this.isJS||ia(this,J.thread.JmolThread,"interrupt",[])});c(b,"checkInterrupted",function(a){return this.haveReference&&(null==a||!a.$name.equals(this.$name))?!0:this.stopped},"J.thread.JmolThread");c(b,"reset",function(){this.isReset=!0;this.interrupt()});c(b,"toString",function(){return ia(this,J.thread.JmolThread,"toString",
[])+"["+this.$name+"]"});b.threadIndex=0});n("J.thread");z(["J.thread.JmolThread"],"J.thread.TimeoutThread",["JU.SB"],function(){var b=w(function(){this.script=null;this.status=0;this.triggered=!0;q(this,arguments)},J.thread,"TimeoutThread",J.thread.JmolThread);x(b,function(a,d,b,c){this.setViewer(a,d);this.$name=d;this.set(b,c)},"JV.Viewer,~S,~N,~S");c(b,"set",function(a,d){this.sleepTime=a;null!=d&&(this.script=d)},"~N,~S");g(b,"toString",function(){return"timeout name="+this.$name+" executions="+
this.status+" mSec="+this.sleepTime+" secRemaining="+(this.targetTime-System.currentTimeMillis())/1E3+" script="+this.script});g(b,"run1",function(a){for(;;)switch(a){case -1:this.isJS||Thread.currentThread().setPriority(1);this.targetTime=System.currentTimeMillis()+Math.abs(this.sleepTime);a=0;break;case 0:if(this.checkInterrupted(null)||(null==this.script||0==this.script.length)||!this.runSleep(26,1))return;a=1;break;case 1:a=System.currentTimeMillis()<this.targetTime?0:2;break;case 2:this.currentTime=
System.currentTimeMillis();if(null==this.vwr.timeouts.get(this.$name))return;this.status++;(a=0>this.sleepTime)?this.targetTime=System.currentTimeMillis()+Math.abs(this.sleepTime):this.vwr.timeouts.remove(this.$name);this.triggered&&(this.triggered=!1,this.$name.equals("_SET_IN_MOTION_")?this.vwr.checkInMotion(2):this.vwr.evalStringQuiet(a?this.script+';\ntimeout ID "'+this.$name+'";':this.script));a=a?0:-2;break;case -2:this.vwr.timeouts.remove(this.$name);return}},"~N");b.clear=c(b,"clear",function(a){for(var d,
b=a.values().iterator();b.hasNext()&&((d=b.next())||1);){var c=d;c.script.equals("exitJmol")||c.interrupt()}a.clear()},"java.util.Map");b.setTimeout=c(b,"setTimeout",function(a,d,b,c,e){var f=d.get(b);0==c?null!=f&&(f.interrupt(),d.remove(b)):null!=f?f.set(c,e):(f=new J.thread.TimeoutThread(a,b,c,e),d.put(b,f),f.start())},"JV.Viewer,java.util.Map,~S,~N,~S");b.trigger=c(b,"trigger",function(a,d){var b=a.get(d);null!=b&&(b.triggered=0>b.sleepTime)},"java.util.Map,~S");b.showTimeout=c(b,"showTimeout",
function(a,d){var b=new JU.SB;if(null!=a)for(var c,e=a.values().iterator();e.hasNext()&&((c=e.next())||1);){var f=c;(null==d||f.$name.equalsIgnoreCase(d))&&b.append(f.toString()).append("\n")}return 0<b.length()?b.toString():"<no timeouts set>"},"java.util.Map,~S")});n("JM");z(["JU.Node","$.Point3fi","J.c.PAL"],"JM.Atom","JU.BS $.CU $.P3 $.PT $.SB J.atomdata.RadiusData J.c.VDW JM.Group JU.C $.Elements JV.JC".split(" "),function(){var b=w(function(){this.altloc="\x00";this.atomSite=this.atomID=0;this.group=
null;this.atomNumberFlags=this.valence=this.userDefinedVanDerWaalRadius=0;this.atomSymmetry=null;this.paletteID=this.colixAtom=this.madAtom=this.formalChargeAndFlags=0;this.bonds=null;this.shapeVisibilityFlags=this.clickabilityFlags=this.nBackbonesDisplayed=this.nBondsDisplayed=0;q(this,arguments)},JM,"Atom",JU.Point3fi,JU.Node);N(b,function(){this.paletteID=J.c.PAL.CPK.id});g(b,"setAtom",function(a,d,b,c,e,f,j,k,l){this.mi=a;this.atomSymmetry=e;this.atomSite=f;this.i=d;this.atomNumberFlags=j;l&&
(this.formalChargeAndFlags=2);0!=k&&-2147483648!=k&&this.setFormalCharge(k);this.userDefinedVanDerWaalRadius=c;null!=b&&this.setT(b);return this},"~N,~N,JU.P3,~N,JU.BS,~N,~N,~N,~B,~B");c(b,"setShapeVisibility",function(a,d){this.shapeVisibilityFlags=d?this.shapeVisibilityFlags|a:this.shapeVisibilityFlags&~a},"~N,~B");c(b,"isCovalentlyBonded",function(a){if(null!=this.bonds)for(var d=this.bonds.length;0<=--d;)if(this.bonds[d].isCovalent()&&this.bonds[d].getOtherAtom(this)===a)return!0;return!1},"JM.Atom");
c(b,"isBonded",function(a){if(null!=this.bonds)for(var d=this.bonds.length;0<=--d;)if(this.bonds[d].getOtherAtom(this)===a)return!0;return!1},"JM.Atom");c(b,"getBond",function(a){if(null!=this.bonds)for(var d=this.bonds.length;0<=--d;)if(null!=this.bonds[d].getOtherAtom(a))return this.bonds[d];return null},"JM.Atom");c(b,"addDisplayedBond",function(a,d){this.nBondsDisplayed+=d?1:-1;this.setShapeVisibility(a,0<this.nBondsDisplayed)},"~N,~B");c(b,"deleteBond",function(a){if(null!=this.bonds)for(var d=
this.bonds.length;0<=--d;)if(this.bonds[d]===a){this.deleteBondAt(d);break}},"JM.Bond");c(b,"deleteBondAt",function(a){this.setCIPChirality(0);var d=this.bonds.length-1;if(0==d)this.bonds=null;else{for(var b=Array(d),c=0;c<a;++c)b[c]=this.bonds[c];for(;c<d;++c)b[c]=this.bonds[c+1];this.bonds=b}},"~N");g(b,"getBondedAtomIndex",function(a){return this.bonds[a].getOtherAtom(this).i},"~N");c(b,"setMadAtom",function(a,d){this.madAtom=this.calculateMad(a,d)},"JV.Viewer,J.atomdata.RadiusData");c(b,"calculateMad",
function(a,d){if(null==d)return 0;var b=d.value;if(0==b)return 0;switch(d.factorType){case J.atomdata.RadiusData.EnumType.SCREEN:return sa(b);case J.atomdata.RadiusData.EnumType.FACTOR:case J.atomdata.RadiusData.EnumType.OFFSET:var c=0;switch(d.vdwType){case J.c.VDW.TEMP:c=a.ms.getBfactor100Hi();c=0<c?this.getBfactor100()/c:0;break;case J.c.VDW.HYDRO:c=Math.abs(this.getHydrophobicity());break;case J.c.VDW.BONDING:c=this.getBondingRadius();break;case J.c.VDW.ADPMIN:case J.c.VDW.ADPMAX:c=this.getADPMinMax(d.vdwType===
J.c.VDW.ADPMAX);break;default:c=this.getVanderwaalsRadiusFloat(a,d.vdwType)}b=d.factorType===J.atomdata.RadiusData.EnumType.FACTOR?b*c:b+c;break;case J.atomdata.RadiusData.EnumType.ABSOLUTE:if(16.1==b)return JM.Atom.MAD_GLOBAL}c=sa(0>b?b:2E3*b);0>c&&0<b&&(c=0);return c},"JV.Viewer,J.atomdata.RadiusData");c(b,"getADPMinMax",function(a){var d=this.getTensors();if(null==d)return 0;var b=d[0];if(null==b||1!=b.iType)return 0;this.group.chain.model.ms.isModulated(this.i)&&b.isUnmodulated&&(b=d[1]);return b.getFactoredValue(a?
2:1)},"~B");c(b,"getTensors",function(){return this.group.chain.model.ms.getAtomTensorList(this.i)});c(b,"getRasMolRadius",function(){return Math.abs(v(this.madAtom/8))});g(b,"getEdges",function(){return null==this.bonds?[]:this.bonds});g(b,"getBondCount",function(){return null==this.bonds?0:this.bonds.length});c(b,"setTranslucent",function(a,d){this.colixAtom=JU.C.getColixTranslucent3(this.colixAtom,a,d)},"~B,~N");g(b,"getElementNumber",function(){return JU.Elements.getElementNumber(this.atomNumberFlags)});
g(b,"getIsotopeNumber",function(){return JU.Elements.getIsotopeNumber(this.atomNumberFlags)});g(b,"getAtomicAndIsotopeNumber",function(){return this.atomNumberFlags});c(b,"setAtomicAndIsotopeNumber",function(a){if(0>a||(a&127)>=JU.Elements.elementNumberMax||32767<a)a=0;this.atomNumberFlags=a},"~N");c(b,"getElementSymbolIso",function(a){return JU.Elements.elementSymbolFromNumber(a?this.atomNumberFlags:this.atomNumberFlags&127)},"~B");c(b,"getElementSymbol",function(){return this.getElementSymbolIso(!0)});
c(b,"isHetero",function(){return 0!=(this.formalChargeAndFlags&2)});c(b,"hasVibration",function(){return 0!=(this.formalChargeAndFlags&1)});c(b,"setFormalCharge",function(a){this.formalChargeAndFlags=this.formalChargeAndFlags&15|(-2147483648==a?0:7<a?7:-3>a?-3:a)<<24},"~N");c(b,"setVibrationVector",function(){this.formalChargeAndFlags|=1});c(b,"setNegativeDisorder",function(){this.formalChargeAndFlags|=4});c(b,"isNegativeDisorder",function(){return 0!=(this.formalChargeAndFlags&4)});g(b,"getFormalCharge",
function(){return this.formalChargeAndFlags>>24});c(b,"getOccupancy100",function(){var a=this.group.chain.model.ms.occupancies;return null==a?100:Math.round(a[this.i])});c(b,"isOccupied",function(){var a=this.group.chain.model.ms.occupancies;return null==a||50<=a[this.i]});c(b,"getBfactor100",function(){var a=this.group.chain.model.ms.bfactor100s;return null==a?0:a[this.i]});c(b,"getHydrophobicity",function(){var a=this.group.chain.model.ms.hydrophobicities;return null==a?JU.Elements.getHydrophobicity(this.group.groupID):
a[this.i]});c(b,"setRadius",function(a){return!Float.isNaN(this.userDefinedVanDerWaalRadius=0<a?a:NaN)},"~N");c(b,"$delete",function(a){this.valence=-1;if(null!=this.bonds)for(var d=this.bonds.length;0<=--d;){var b=this.bonds[d];b.getOtherAtom(this).deleteBond(b);a.set(b.index)}this.bonds=null},"JU.BS");g(b,"isDeleted",function(){return 0>this.valence});c(b,"setValence",function(a){this.isDeleted()||(this.valence=0>a?0:127>=a?a:127)},"~N");g(b,"getValence",function(){return this.isDeleted()?-1:0<
this.valence?this.valence:this.getValenceAromatic(!0)});c(b,"getValenceAromatic",function(a){if(this.isDeleted())return-1;var d=this.valence;if(0==d&&null!=this.bonds){for(var b=0,c=this.bonds.length;0<=--c;)d+=this.bonds[c].getValence(),a&&this.bonds[c].is(515)&&b++;0<d&&(3>d&&0!=b)&&d++}return d},"~B");g(b,"getCovalentBondCount",function(){if(null==this.bonds)return 0;for(var a=0,d=this.bonds.length;0<=--d;){var b=this.bonds[d];b.isCovalentNotPartial0()&&!b.getOtherAtom(this).isDeleted()&&++a}return a});
c(b,"getCovalentOrPartialBondCount",function(){if(null==this.bonds)return 0;for(var a=0,d=this.bonds.length;0<=--d;){var b=this.bonds[d];b.isCovalent()&&!b.getOtherAtom(this).isDeleted()&&++a}return a});g(b,"getCovalentHydrogenCount",function(){if(null==this.bonds)return 0;for(var a=0,d=this.bonds.length;0<=--d;)if(this.bonds[d].isCovalentNotPartial0()){var b=this.bonds[d].getOtherAtom(this);0<=b.valence&&1==b.getElementNumber()&&++a}return a});g(b,"getImplicitHydrogenCount",function(){return this.group.chain.model.ms.getMissingHydrogenCount(this,
!1)});g(b,"getTotalHydrogenCount",function(){return this.getCovalentHydrogenCount()+this.getImplicitHydrogenCount()});g(b,"getTotalValence",function(){var a=this.getValence();if(0>a)return a;var d=this.getImplicitHydrogenCount();return a+d+this.group.chain.model.ms.aaRet[4]});g(b,"getCovalentBondCountPlusMissingH",function(){return this.getCovalentBondCount()+this.getImplicitHydrogenCount()});c(b,"getTargetValence",function(){switch(this.getElementNumber()){case 6:case 14:case 32:return 4;case 5:case 7:case 15:return 3;
case 8:case 16:return 2;case 1:case 9:case 17:case 35:case 53:return 1}return-1});c(b,"getDimensionValue",function(a){return 0==a?this.x:1==a?this.y:this.z},"~N");c(b,"getVanderwaalsRadiusFloat",function(a,d){return Float.isNaN(this.userDefinedVanDerWaalRadius)?a.getVanderwaalsMarType(this.atomNumberFlags,this.getVdwType(d))/1E3:this.userDefinedVanDerWaalRadius},"JV.Viewer,J.c.VDW");c(b,"getVdwType",function(a){switch(a){case J.c.VDW.AUTO:a=this.group.chain.model.ms.getDefaultVdwType(this.mi);break;
case J.c.VDW.NOJMOL:a=this.group.chain.model.ms.getDefaultVdwType(this.mi),a===J.c.VDW.AUTO_JMOL&&(a=J.c.VDW.AUTO_BABEL)}return a},"J.c.VDW");c(b,"getBondingRadius",function(){var a=this.group.chain.model.ms.bondingRadii,a=null==a||this.i>=a.length?0:a[this.i];return 0==a?JU.Elements.getBondingRadius(this.atomNumberFlags,this.getFormalCharge()):a});c(b,"getVolume",function(a,d){var b=null==d?this.userDefinedVanDerWaalRadius:NaN;Float.isNaN(b)&&(b=a.getVanderwaalsMarType(this.getElementNumber(),this.getVdwType(d))/
1E3);var c=0;if(null!=this.bonds)for(var e=0;e<this.bonds.length;e++)if(this.bonds[e].isCovalent()){var f=this.bonds[e].getOtherAtom(this),j=null==d?f.userDefinedVanDerWaalRadius:NaN;Float.isNaN(j)&&(j=a.getVanderwaalsMarType(f.getElementNumber(),f.getVdwType(d))/1E3);f=this.distance(f);if(!(f>b+j)){if(f+b<=j)return 0;j=b-(b*b+f*f-j*j)/(2*f);c-=1.0471975511965976*j*j*(3*b-j)}}return c+4.1887902047863905*b*b*b},"JV.Viewer,J.c.VDW");c(b,"getCurrentBondCount",function(){return null==this.bonds?0:this.bonds.length});
c(b,"getRadius",function(){return Math.abs(this.madAtom/2E3)});g(b,"getIndex",function(){return this.i});g(b,"getAtomSite",function(){return this.atomSite});g(b,"getGroupBits",function(a){this.group.setAtomBits(a)},"JU.BS");g(b,"getAtomName",function(){return 0<this.atomID?JM.Group.specialAtomNames[this.atomID]:null==this.group.chain.model.ms.atomNames?"":this.group.chain.model.ms.atomNames[this.i]});g(b,"getAtomType",function(){var a=this.group.chain.model.ms.atomTypes,a=null==a?null:a[this.i];return null==
a?this.getAtomName():a});g(b,"getAtomNumber",function(){var a=this.group.chain.model.ms.atomSerials;return null==a?this.i:a[this.i]});c(b,"getSeqID",function(){var a=this.group.chain.model.ms.atomSeqIDs;return null==a?0:a[this.i]});c(b,"isVisible",function(a){return(this.shapeVisibilityFlags&a)==a},"~N");c(b,"getPartialCharge",function(){var a=this.group.chain.model.ms.partialCharges;return null==a?0:a[this.i]});c(b,"getSymmetryTranslation",function(a,d,b){for(var c=0;c<d.length;c++)if(this.atomSymmetry.get(a+=
b))return d[c];return 0},"~N,~A,~N");c(b,"getCellTranslation",function(a,d,b){for(var c=b,e=0;e<d.length;e++)for(var f=0;f<b;f++,c++)if(this.atomSymmetry.get(c)&&d[e]==a)return d[e];return 0},"~N,~A,~N");c(b,"getSymmetryOperatorList",function(a){var d="",b=this.group.chain.model.ms,c=b.getModelSymmetryCount(this.mi);if(0==c||null==this.atomSymmetry)return"";for(var b=b.getModelCellRange(this.mi),e=c,f=null==b?1:b.length,j=a?null:new JU.BS,k=0;k<f;k++)for(var l=0;l<c;l++)this.atomSymmetry.get(e++)&&
(a?d+=","+(l+1)+(null==b?555:b[k]):j.set(l+1));if(!a)for(k=j.nextSetBit(0);0<=k;k=j.nextSetBit(k+1))d+=","+k;return 0==d.length?"":d.substring(1)},"~B");g(b,"getModelIndex",function(){return this.mi});g(b,"getMoleculeNumber",function(a){return this.group.chain.model.ms.getMoleculeIndex(this.i,a)+1},"~B");c(b,"getFractionalCoord",function(a,d,b,c){c=this.getFractionalCoordPt(a,b,c);return"X"==d?c.x:"Y"==d?c.y:c.z},"~B,~S,~B,JU.P3");g(b,"getXYZ",function(){return this});c(b,"getFractionalCoordPt",function(a,
d,b){var c=this.getUnitCell();null==b?b=JU.P3.newP(this):b.setT(this);null!=c&&(c=c.getUnitCellMultiplied(),c.toFractional(b,d),a&&JU.PT.fixPtFloats(b,1E5));return b},"~B,~B,JU.P3");c(b,"getUnitCell",function(){return this.group.chain.model.ms.getUnitCellForAtom(this.i)});c(b,"getFractionalUnitCoord",function(a,d,b){b=this.getFractionalUnitCoordPt(a,!1,b);return"X"==d?b.x:"Y"==d?b.y:b.z},"~B,~S,JU.P3");c(b,"getFractionalUnitCoordPt",function(a,d,b){var c=this.getUnitCell();null==b?b=JU.P3.newP(this):
b.setT(this);if(null==c)return b;c=c.getUnitCellMultiplied();this.group.chain.model.isJmolDataFrame?(c.toFractional(b,!1),d&&c.toCartesian(b,!1)):(c.toUnitCell(b,null),d||c.toFractional(b,!1));a&&JU.PT.fixPtFloats(b,d?1E4:1E5);return b},"~B,~B,JU.P3");c(b,"getFractionalUnitDistance",function(a,d,b){var c=this.getUnitCell();if(null==c)return this.distance(a);d.setT(this);b.setT(a);this.group.chain.model.isJmolDataFrame?(c.toFractional(d,!0),c.toFractional(b,!0)):(c.toUnitCell(d,null),c.toUnitCell(b,
null));return d.distance(b)},"JU.T3,JU.T3,JU.T3");c(b,"setFractionalCoord",function(a,d,b){var c=this.getUnitCell();null!=c&&c.toFractional(this,b);switch(a){case 1111492615:case 1111492612:this.x=d;break;case 1111492616:case 1111492613:this.y=d;break;case 1111492617:case 1111492614:this.z=d}null!=c&&c.toCartesian(this,b)},"~N,~N,~B");c(b,"setFractionalCoordTo",function(a,d){this.setFractionalCoordPt(this,a,d)},"JU.P3,~B");c(b,"setFractionalCoordPt",function(a,d,b){a.setT(d);d=this.getUnitCell();
null!=d&&d.toCartesian(a,b&&!this.group.chain.model.isJmolDataFrame)},"JU.P3,JU.P3,~B");c(b,"isCursorOnTopOf",function(a,d,b,c){var e=v(this.sD/2);e<b&&(e=b);b=e*e;e=this.sX-a;e*=e;if(e>b)return!1;var f=this.sY-d;b-=e+f*f;if(0>b)return!1;if(null==c)return!0;var e=this.sZ,f=c.sZ,j=v(c.sD/2);if(e<f-j)return!0;a=c.sX-a;d=c.sY-d;d=j*j-(a*a+d*d);return e-Math.sqrt(b)<f-Math.sqrt(d)},"~N,~N,~N,JM.Atom");c(b,"getInfo",function(){return this.getIdentity(2)});c(b,"getIdentityXYZ",function(a,d){a=3==d||this.group.chain.model.isJmolDataFrame?
this.getFractionalCoordPt(!this.group.chain.model.ms.vwr.g.legacyJavaFloat,!1,a):this;return(3==d?"":this.getIdentity(d)+" ")+JU.PT.formatF(a.x,0,3,!0,!0)+" "+JU.PT.formatF(a.y,0,3,!0,!0)+" "+JU.PT.formatF(a.z,0,3,!0,!0)},"JU.P3,~N");c(b,"getIdentity",function(a){var d=new JU.SB,b=this.getGroup3(!0);if(null!=b&&0<b.length&&(!b.equals("UNK")||this.group.chain.model.isBioModel)){d.append("[");d.append(b);d.append("]");b=this.group.getSeqcodeString();null!=b&&d.append(b);b=this.group.chain.chainID;if(0!=
b&&32!=b){d.append(":");var c=this.getChainIDStr();256<=b&&(c=JU.PT.esc(c));d.append(c)}if(2!=a&&5!=a)return d.toString();d.append(".")}d.append(this.getAtomName());0==d.length()&&(d.append(this.getElementSymbolIso(!1)),d.append(" "),d.appendI(this.getAtomNumber()));2==a&&("\x00"!=this.altloc&&(d.append("%"),d.appendC(this.altloc)),1<this.group.chain.model.ms.mc&&!this.group.chain.model.isJmolDataFrame&&(d.append("/"),d.append(this.getModelNumberForLabel())),d.append(" #"),d.appendI(this.getAtomNumber()));
return d.toString()},"~N");g(b,"getGroup3",function(a){var d=this.group.getGroup3();return a||null!=d&&0<d.length?d:"UNK"},"~B");g(b,"getGroup1",function(a){var d=this.group.getGroup1();return"\x00"!=d?""+d:"\x00"!=a?""+a:""},"~S");g(b,"getBioSmilesType",function(){return this.group.isProtein()?"p":this.group.isDna()?"d":this.group.isRna()?"r":this.group.isCarbohydrate()?"c":" "});g(b,"isPurine",function(){return this.group.isPurine()});g(b,"isPyrimidine",function(){return this.group.isPyrimidine()});
g(b,"getResno",function(){return this.group.getResno()});c(b,"isClickable",function(){return this.checkVisible()&&0!=this.clickabilityFlags&&0!=((this.shapeVisibilityFlags|this.group.shapeVisibilityFlags)&this.clickabilityFlags)});c(b,"setClickable",function(a){0==a?this.clickabilityFlags=0:(this.clickabilityFlags|=a,1040384!=a&&(this.shapeVisibilityFlags|=a))},"~N");c(b,"checkVisible",function(){if(this.isVisible(2))return this.isVisible(4);var a=this.isVisible(9);if(a){a=this.shapeVisibilityFlags;
if(0!=this.group.shapeVisibilityFlags&&(8192!=this.group.shapeVisibilityFlags||this.isLeadAtom()))a|=this.group.shapeVisibilityFlags;a&=-10;32==a&&0==this.clickabilityFlags&&(a=0);if(a=0!=a)this.shapeVisibilityFlags|=4}this.shapeVisibilityFlags|=2;return a});g(b,"isLeadAtom",function(){return this.group.isLeadAtom(this.i)});g(b,"getChainID",function(){return this.group.chain.chainID});g(b,"getChainIDStr",function(){return this.group.chain.getIDStr()});c(b,"getSurfaceDistance100",function(){return this.group.chain.model.ms.getSurfaceDistance100(this.i)});
c(b,"getVibrationVector",function(){return this.group.chain.model.ms.getVibration(this.i,!1)});c(b,"getModulation",function(){return this.group.chain.model.ms.getModulation(this.i)});c(b,"getModelNumberForLabel",function(){return this.group.chain.model.ms.getModelNumberForAtomLabel(this.mi)});c(b,"getModelNumber",function(){return this.group.chain.model.ms.getModelNumber(this.mi)%1E6});g(b,"getBioStructureTypeName",function(){return this.group.getProteinStructureType().getBioStructureTypeName(!0)});
g(b,"equals",function(a){return this===a},"~O");g(b,"hashCode",function(){return this.i});c(b,"findAromaticNeighbor",function(a){if(null==this.bonds)return null;for(var d=this.bonds.length;0<=--d;){var b=this.bonds[d],c=b.getOtherAtom(this);if(b.isAromatic()&&c.i!=a)return c}return null},"~N");c(b,"atomPropertyInt",function(a){switch(a){case 1094715393:return this.getAtomNumber();case 1094713365:return this.getSeqID();case 1094713346:return this.atomID;case 1094713368:return Math.max(0,this.altloc.charCodeAt(0)-
32);case 1094713347:return this.i;case 1228931586:return this.getCovalentBondCount();case 1094713351:return this.group.chain.chainNo;case 1765808134:return this.group.chain.model.ms.vwr.gdata.getColorArgbOrGray(this.colixAtom);case 1086326789:case 1094715402:return this.getElementNumber();case 1094713353:return this.atomNumberFlags;case 1228935687:return this.group.chain.model.fileIndex+1;case 1631586315:return this.getFormalCharge();case 1094713356:return this.group.groupID;case 1094713357:return this.group.groupIndex;
case 1094717454:return this.getModelNumber();case -1094717454:return this.group.chain.model.ms.modelFileNumbers[this.mi];case 1094713359:return this.mi;case 1094713360:return this.getMoleculeNumber(!0);case 1094713361:return this.group.getMonomerIndex()+1;case 1128269825:return this.getOccupancy100();case 1094713362:return this.group.getBioPolymerIndexInModel()+1;case 1094713363:return this.group.getBioPolymerLength();case 1665140738:return this.getRasMolRadius();case 1094715412:return this.getResno();
case 1094713366:return this.getAtomSite();case 1095241729:return this.getSpin();case 1639976963:return this.group.getProteinStructureType().getId();case 1237320707:return this.group.getProteinStructureSubType().getId();case 1094713367:return this.group.getStrucNo();case 1296041985:return this.getSymOp();case 1094715418:return this.getValence()}return 0},"~N");c(b,"getSpin",function(){return this.group.chain.model.ms.getSpin(this.i)});c(b,"getSymOp",function(){return null==this.atomSymmetry?0:this.atomSymmetry.nextSetBit(0)+
1});c(b,"atomPropertyFloat",function(a,d,b){switch(d){case 1111490561:return this.getADPMinMax(!0);case 1111490562:return this.getADPMinMax(!1);case 1111492609:case 1111492629:return this.x;case 1111492610:case 1111492630:return this.y;case 1111492611:case 1111492631:return this.z;case 1111490587:return this.group.chain.model.ms.getAtomicDSSRData(this.i);case 1114249217:case 1112152066:case 1112150019:case 1112150020:case 1112150021:case 1112152070:case 1112152071:case 1112152073:case 1112152074:case 1112152076:case 1649022989:case 1112152078:return a.shm.getAtomShapeValue(d,
this.group,this.i);case 1111492618:return this.getBondingRadius();case 1111490563:return a.getNMRCalculation().getChemicalShift(this);case 1111490564:return JU.Elements.getCovalentRadius(this.atomNumberFlags);case 1111490565:case 1111490576:case 1111490574:return this.group.getGroupParameter(d);case 1111492615:case 1111492612:return this.getFractionalCoord(!a.g.legacyJavaFloat,"X",!1,b);case 1111492616:case 1111492613:return this.getFractionalCoord(!a.g.legacyJavaFloat,"Y",!1,b);case 1111492617:case 1111492614:return this.getFractionalCoord(!a.g.legacyJavaFloat,
"Z",!1,b);case 1113589786:return this.getHydrophobicity();case 1111490566:return a.getNMRCalculation().getMagneticShielding(this);case 1111490567:return this.getMass();case 1128269825:return this.getOccupancy100()/100;case 1111492619:return this.getPartialCharge();case 1111490569:case 1111490570:case 1111490568:if(this.group.chain.model.isJmolDataFrame&&this.group.chain.model.jmolFrameType.startsWith("plot ramachandran"))switch(d){case 1111490569:return this.getFractionalCoord(!a.g.legacyJavaFloat,
"X",!1,b);case 1111490570:return this.getFractionalCoord(!a.g.legacyJavaFloat,"Y",!1,b);case 1111490568:return a=this.getFractionalCoord(!a.g.legacyJavaFloat,"Z",!1,b)-180,-180>a?360+a:a}return this.group.getGroupParameter(d);case 1665140738:case 1112152075:return this.getRadius();case 1111490571:return a.antialiased?v(this.sX/2):this.sX;case 1111490572:return a.getScreenHeight()-(a.antialiased?v(this.sY/2):this.sY);case 1111490573:return a.antialiased?v(this.sZ/2):this.sZ;case 1113589787:return a.slm.isAtomSelected(this.i)?
1:0;case 1111490575:return a.ms.getSurfaceDistanceMax(),this.getSurfaceDistance100()/100;case 1111492620:return this.getBfactor100()/100;case 1111490588:return JU.C.getColixTranslucencyFractional(this.colixAtom);case 1312817669:return this.getVolume(a,J.c.VDW.AUTO);case 1111490577:return this.getFractionalUnitCoord(!a.g.legacyJavaFloat,"X",b);case 1111490578:return this.getFractionalUnitCoord(!a.g.legacyJavaFloat,"Y",b);case 1111490579:return this.getFractionalUnitCoord(!a.g.legacyJavaFloat,"Z",b);
case 1648363544:return this.getVanderwaalsRadiusFloat(a,J.c.VDW.AUTO);case 1648361473:return d=this.getVibrationVector(),null==d?0:d.length()*a.getFloat(1648361473);case 1111492626:return this.getVib("x");case 1111492627:return this.getVib("y");case 1111492628:return this.getVib("z");case 1111490583:return this.getVib("X");case 1111490584:return this.getVib("Y");case 1111490585:return this.getVib("Z");case 1111490586:return this.getVib("O");case 1111490580:return this.getVib("1");case 1111490581:return this.getVib("2");
case 1111490582:return this.getVib("3");case 1145047050:case 1145047053:case 1145045006:case 1145047052:case 1145047055:case 1145045008:case 1145047049:return a=this.atomPropertyTuple(a,d,b),null==a?-1:a.length()}return this.atomPropertyInt(d)},"JV.Viewer,~N,JU.P3");c(b,"getVib",function(a){return this.group.chain.model.ms.getVibCoord(this.i,a)},"~S");c(b,"getNominalMass",function(){var a=this.getIsotopeNumber();return 0<a?a:JU.Elements.getNaturalIsotope(this.getElementNumber())});g(b,"getMass",function(){var a=
this.getIsotopeNumber();return 0<a?a:JU.Elements.getAtomicMass(this.getElementNumber())});c(b,"atomPropertyString",function(a,d){var b;switch(d){case 1153433601:return this.getIdentity(5);case 1086324739:return b=this.altloc,"\x00"==b?"":""+b;case 1086326786:return this.getAtomName();case 1086326785:return this.getAtomType();case 1086326788:return this.getChainIDStr();case 1086324752:return this.getCIPChirality(!0);case 1086324753:return this.getCIPChiralityRule();case 1140850705:case 1086324754:return this.getWyckoffPosition(!1);
case 1086324755:return this.getWyckoffPosition(!0);case 1086324744:return this.getGroup1("?");case 1086324747:return b=this.group.getSeqcodeString(),null==b?"":b;case 1086324743:return this.getGroup1("\x00");case 1086324742:return this.getGroup3(!1);case 1086326789:return this.getElementSymbolIso(!0);case 1086324745:return this.getIdentity(2);case 1086324746:return b=this.group.getInsertionCode(),"\x00"==b?"":""+b;case 1825200146:case 1287653388:return b=a.shm.getShapePropertyIndex(5,"label",this.i),
null==b&&(b=""),b;case 1145045003:return a.getSymStatic().staticToRationalXYZ(this.getFractionalCoordPt(!a.g.legacyJavaFloat,!1,null)," ");case 1639976963:return this.group.getProteinStructureType().getBioStructureTypeName(!1);case 1237320707:return this.group.getProteinStructureSubType().getBioStructureTypeName(!1);case 1086324749:return this.group.getStructureId();case 1086324748:return a.getHybridizationAndAxes(this.i,null,null,"d");case 1086326798:return this.getElementSymbolIso(!1);case 1088421903:return this.getSymmetryOperatorList(!0)}return""},
"JV.Viewer,~N");c(b,"getWyckoffPosition",function(a){var d=this.group.chain.model.ms,b=d.getBasisAtom(this.i,!0).getSeqID();if(0!=b)return d=b>>16,b=String.fromCharCode(b&255),(a?""+d:"")+b;var b=this.getUnitCell(),c;if(null==b||null==(c=b.getWyckoffPosition(d.vwr,this,"M")))c="0?";d.setAtomSeqID(this.i,(JU.PT.parseInt(c)<<16)+c.charAt(c.length-1).charCodeAt(0));return a?c:c.substring(c.length-1)},"~B");g(b,"getCIPChirality",function(a){var d=(this.formalChargeAndFlags&496)>>4;0==d&&(1<this.atomNumberFlags&&
a)&&(d=this.group.chain.model.ms.getAtomCIPChiralityCode(this),this.formalChargeAndFlags|=(0==d?3:d)<<4);return JV.JC.getCIPChiralityName(d)},"~B");c(b,"getCIPChiralityRule",function(){var a=0==this.getCIPChirality(!0).length?-1:(this.formalChargeAndFlags&3584)>>9;return JV.JC.getCIPRuleName(a+1)});g(b,"setCIPChirality",function(a){this.formalChargeAndFlags=this.formalChargeAndFlags&-4081|a<<4},"~N");g(b,"getCIPChiralityCode",function(){return(this.formalChargeAndFlags&496)>>4});g(b,"getInsertionCode",
function(){return this.group.getInsertionCode()});c(b,"atomPropertyTuple",function(a,d,b){switch(d){case 1073742329:return JU.P3.newP(this);case 1145047050:return this.getFractionalCoordPt(!a.g.legacyJavaFloat,!1,b);case 1145047053:return this.getFractionalCoordPt(!a.g.legacyJavaFloat,!1,b);case 1145045006:return this.group.chain.model.isJmolDataFrame?this.getFractionalCoordPt(!a.g.legacyJavaFloat,!1,b):this.getFractionalUnitCoordPt(!a.g.legacyJavaFloat,!1,b);case 1145047052:return JU.P3.new3(a.antialiased?
v(this.sX/2):this.sX,a.getScreenHeight()-(a.antialiased?v(this.sY/2):this.sY),a.antialiased?v(this.sZ/2):this.sZ);case 1145047055:return this.getVibrationVector();case 1145045008:return a=this.getModulation(),null==a?null:a.getV3();case 1145047049:return this;case 1765808134:return JU.CU.colorPtFromInt(this.group.chain.model.ms.vwr.gdata.getColorArgbOrGray(this.colixAtom),b)}return null},"JV.Viewer,~N,JU.P3");g(b,"getOffsetResidueAtom",function(a,d){return this.group.getAtomIndex(a,d)},"~S,~N");g(b,
"isCrossLinked",function(a){return this.group.isCrossLinked(a.group)},"JU.Node");g(b,"getCrossLinkVector",function(a,d,b){return this.group.getCrossLinkVector(a,d,b)},"JU.Lst,~B,~B");g(b,"toString",function(){return this.getInfo()});g(b,"findAtomsLike",function(a){return this.group.chain.model.ms.vwr.getAtomBitSet(a)},"~S");c(b,"getUnitID",function(a){var d=this.group.chain.model;return d.isBioModel?d.getUnitID(this,a):""},"~N");g(b,"getFloatProperty",function(a){a=this.group.chain.model.ms.vwr.getDataObj(a,
null,1);var d=NaN;if(null!=a)try{d=a[this.i]}catch(b){if(!D(b,Exception))throw b;}return d},"~S");g(b,"modelIsRawPDB",function(){var a=this.group.chain.model;return a.isBioModel&&!a.isPdbWithMultipleBonds&&0==a.hydrogenCount});c(b,"setSymop",function(a,d){null==this.atomSymmetry&&(this.atomSymmetry=new JU.BS);d&&this.atomSymmetry.clearAll();0<a&&this.atomSymmetry.set(a-1)},"~N,~B");g(b,"getExplicitHydrogenCount",function(){return 0});b.MAD_GLOBAL=32200});n("JM");z(["JU.V3"],"JM.AtomCollection","java.util.Arrays $.Hashtable JU.A4 $.AU $.BS $.Lst $.M3 $.Measure $.P3 $.PT J.api.Interface J.atomdata.RadiusData J.c.PAL $.VDW JM.Group JS.T JU.BSUtil $.Elements $.Logger $.Parser $.Vibration".split(" "),
function(){var b=w(function(){this.at=this.bioModelset=this.g3d=this.vwr=null;this.ac=0;this.labeler=this.pointGroup=this.trajectory=null;this.maxVanderwaalsRadius=this.maxBondingRadius=1.4E-45;this.hasBfactorRange=!1;this.bfactor100Hi=this.bfactor100Lo=0;this.haveBSClickable=this.haveBSVisible=!1;this.bsSurface=null;this.surfaceDistanceMax=this.nSurfaceAtoms=0;this.haveChirality=!1;this.bspf=null;this.canSkipLoad=this.preserveState=!0;this.haveStraightness=!1;this.aaRet=this.bsPartialCharges=this.hydrophobicities=
this.bondingRadii=this.partialCharges=this.bfactor100s=this.occupancies=this.vibrations=this.dssrData=this.atomSeqIDs=this.atomResnos=this.atomSerials=this.atomTypes=this.atomNames=this.tainted=this.surfaceDistance100s=this.atomTensors=this.atomTensorList=this.bsModulated=this.bsClickable=this.bsVisible=this.bsHidden=null;W("JM.AtomCollection.AtomSorter")||JM.AtomCollection.$AtomCollection$AtomSorter$();this.atomCapacity=0;q(this,arguments)},JM,"AtomCollection",null);c(b,"getAtom",function(a){return 0<=
a&&a<this.at.length?this.at[a]:null},"~N");c(b,"setupAC",function(){this.bsHidden=new JU.BS;this.bsVisible=new JU.BS;this.bsClickable=new JU.BS;null==JM.AtomCollection.userSettableValues&&(JM.AtomCollection.userSettableValues="atomName atomType coord element formalCharge hydrophobicity ionic occupancy partialCharge temperature valence vanderWaals vibrationVector atomNo seqID resNo chain site".$plit(" "))});c(b,"releaseModelSetAC",function(){this.ac=0;this.bfactor100s=this.occupancies=this.vibrations=
this.atomSeqIDs=this.atomSerials=this.dssrData=this.atomResnos=this.atomTypes=this.atomNames=this.tainted=this.bsSurface=this.surfaceDistance100s=this.bspf=this.g3d=this.vwr=this.at=null;this.resetPartialCharges();this.atomTensors=this.bondingRadii=null});c(b,"mergeAtomArrays",function(a){this.tainted=a.tainted;this.atomNames=a.atomNames;this.atomTypes=a.atomTypes;this.atomResnos=a.atomResnos;this.dssrData=a.dssrData;this.atomSerials=a.atomSerials;this.atomSeqIDs=a.atomSeqIDs;this.vibrations=a.vibrations;
this.occupancies=a.occupancies;this.bfactor100s=a.bfactor100s;this.bondingRadii=a.bondingRadii;this.partialCharges=a.partialCharges;this.bsPartialCharges=a.bsPartialCharges;this.atomTensors=a.atomTensors;this.atomTensorList=a.atomTensorList;this.bsModulated=a.bsModulated;this.haveStraightness=!1;this.surfaceDistance100s=null},"JM.AtomCollection");c(b,"getAtomPointVector",function(a){var d=new JU.Lst,b=this.ac;if(null!=a)for(var c=a.nextSetBit(0);0<=c&&c<b;c=a.nextSetBit(c+1))d.addLast(this.at[c]);
return d},"JU.BS");c(b,"modelSetHasVibrationVectors",function(){return null!=this.vibrations});c(b,"getAtomTypes",function(){return this.atomTypes});c(b,"getPartialCharges",function(){return this.partialCharges});c(b,"getBondingRadii",function(){return this.bondingRadii});c(b,"getBFactors",function(){return this.bfactor100s});c(b,"getHydrophobicity",function(){return this.hydrophobicities});c(b,"setBsHidden",function(a){this.bsHidden=a},"JU.BS");c(b,"isAtomHidden",function(a){return this.bsHidden.get(a)},
"~N");c(b,"getLabeler",function(){return null==this.labeler?this.labeler=J.api.Interface.getInterface("JM.LabelToken",this.vwr,"ms"):this.labeler});c(b,"getAtomInfo",function(a,d,b){return null==d?this.at[a].getInfo():this.getLabeler().formatLabel(this.vwr,this.at[a],d,b)},"~N,~S,JU.P3");c(b,"getElementName",function(a){return JU.Elements.elementNameFromNumber(this.at[a].getAtomicAndIsotopeNumber())},"~N");c(b,"getQuaternion",function(a,d){return 0>a?null:this.at[a].group.getQuaternion(d)},"~N,~S");
c(b,"getFirstAtomIndexFromAtomNumber",function(a,d){for(var b=0;b<this.ac;b++){var c=this.at[b];if(!JM.AtomCollection.isDeleted(c)&&c.getAtomNumber()==a&&d.get(c.mi))return b}return-1},"~N,JU.BS");c(b,"setFormalCharges",function(a,d){if(null!=a){this.resetPartialCharges();for(var b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1))this.at[b].setFormalCharge(d),this.taintAtom(b,4)}},"JU.BS,~N");c(b,"getAtomicCharges",function(){for(var a=L(this.ac,0),d=this.ac;0<=--d;)a[d]=JM.AtomCollection.isDeleted(this.at[d])?
0:this.at[d].getElementNumber();return a});c(b,"getRadiusVdwJmol",function(a){return JU.Elements.getVanderwaalsMar(a.getElementNumber(),J.c.VDW.JMOL)/1E3},"JM.Atom");c(b,"getMaxVanderwaalsRadius",function(){1.4E-45==this.maxVanderwaalsRadius&&this.findMaxRadii();return this.maxVanderwaalsRadius});c(b,"findMaxRadii",function(){for(var a,d=this.ac;0<=--d;){var b=this.at[d];if(!JM.AtomCollection.isDeleted(b)){if((a=b.getBondingRadius())>this.maxBondingRadius)this.maxBondingRadius=a;if((a=b.getVanderwaalsRadiusFloat(this.vwr,
J.c.VDW.AUTO))>this.maxVanderwaalsRadius)this.maxVanderwaalsRadius=a}}});c(b,"clearBfactorRange",function(){this.hasBfactorRange=!1});c(b,"calcBfactorRange",function(a){if(!this.hasBfactorRange){this.bfactor100Lo=2147483647;this.bfactor100Hi=-2147483648;if(null==a)for(var d=0;d<this.ac;d++)this.setBf(d);else for(d=a.nextSetBit(0);0<=d;d=a.nextSetBit(d+1))this.setBf(d);this.hasBfactorRange=!0}},"JU.BS");c(b,"setBf",function(a){JM.AtomCollection.isDeleted(this.at[a])||(a=this.at[a].getBfactor100(),
a<this.bfactor100Lo?this.bfactor100Lo=a:a>this.bfactor100Hi&&(this.bfactor100Hi=a))},"~N");c(b,"getBfactor100Lo",function(){this.hasBfactorRange||(this.vwr.g.rangeSelected?this.calcBfactorRange(this.vwr.bsA()):this.calcBfactorRange(null));return this.bfactor100Lo});c(b,"getBfactor100Hi",function(){this.getBfactor100Lo();return this.bfactor100Hi});c(b,"getSurfaceDistanceMax",function(){null==this.surfaceDistance100s&&this.calcSurfaceDistances();return this.surfaceDistanceMax});c(b,"calculateVolume",
function(a,d){var b=0;if(null!=a)for(var c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1))b+=this.at[c].getVolume(this.vwr,d);return b},"JU.BS,J.c.VDW");c(b,"getSurfaceDistance100",function(a){if(0==this.nSurfaceAtoms)return-1;null==this.surfaceDistance100s&&this.calcSurfaceDistances();return this.surfaceDistance100s[a]},"~N");c(b,"calcSurfaceDistances",function(){this.calculateSurface(null,-1)});c(b,"calculateSurface",function(a,d){0>d&&(d=3);var b=J.api.Interface.getOption("geodesic.EnvelopeCalculation",
this.vwr,"ms").set(this.vwr,this.ac,null);b.calculate(new J.atomdata.RadiusData(null,d,J.atomdata.RadiusData.EnumType.ABSOLUTE,null),3.4028235E38,a,JU.BSUtil.copyInvert(a,this.ac),!1,!1,!1,!0);var c=b.getPoints();this.surfaceDistanceMax=0;this.bsSurface=b.getBsSurfaceClone();this.surfaceDistance100s=E(this.ac,0);this.nSurfaceAtoms=JU.BSUtil.cardinalityOf(this.bsSurface);if(0==this.nSurfaceAtoms||null==c||0==c.length)return c;for(var b=3.4028235E38==d?0:d,e=0;e<this.ac;e++)if(this.bsSurface.get(e)||
JM.AtomCollection.isDeleted(this.at[e]))this.surfaceDistance100s[e]=0;else{for(var f=3.4028235E38,j=this.at[e],k=c.length;0<=--k;)f=Math.min(Math.abs(c[k].distance(j)-b),f);f=this.surfaceDistance100s[e]=v(Math.floor(100*f));this.surfaceDistanceMax=Math.max(this.surfaceDistanceMax,f)}return c},"JU.BS,~N");c(b,"setAtomCoord2",function(a,d,b){var c=null,e=null,f=null,j=0,k=1;if(C(b,"JU.P3"))c=b;else if(C(b,"JU.Lst")){f=b;if(0==(k=f.size()))return;j=1}else if(JU.AU.isAP(b)){e=b;if(0==(k=e.length))return;
j=2}else return;b=0;if(null!=a)for(var l=a.nextSetBit(0);0<=l;l=a.nextSetBit(l+1)){switch(j){case 1:if(b>=k)return;c=f.get(b++);break;case 2:if(b>=k)return;c=e[b++]}if(null!=c)switch(d){case 1145047049:this.setAtomCoord(l,c.x,c.y,c.z);break;case 1145047050:case 1145047053:this.at[l].setFractionalCoordTo(c,!1);this.taintAtom(l,2);break;case 1145047055:this.setAtomVibrationVector(l,c)}}},"JU.BS,~N,~O");c(b,"setAtomVibrationVector",function(a,d){this.setVibrationVector(a,d);this.taintAtom(a,12)},"~N,JU.T3");
c(b,"setAtomCoord",function(a,d,b,c){if(!(0>a||a>=this.ac)){var e=this.at[a];e.set(d,b,c);this.fixTrajectory(e);this.taintAtom(a,2)}},"~N,~N,~N,~N");c(b,"fixTrajectory",function(a){this.isTrajectory(a.mi)&&this.trajectory.fixAtom(a)},"JM.Atom");c(b,"setAtomCoordRelative",function(a,d,b,c){if(!(0>a||a>=this.ac)){var e=this.at[a];e.add3(d,b,c);this.fixTrajectory(e);this.taintAtom(a,2)}},"~N,~N,~N,~N");c(b,"setAtomsCoordRelative",function(a,d,b,c){if(null!=a)for(var e=a.nextSetBit(0);0<=e;e=a.nextSetBit(e+
1))this.setAtomCoordRelative(e,d,b,c)},"JU.BS,~N,~N,~N");c(b,"setAPa",function(a,d,b,c,e,f,j){var k=0;if(!(null!=f&&0==f.length||null==a)){for(var l=null!=f&&f.length==this.ac||null!=j&&j.length==this.ac,g=a.nextSetBit(0);0<=g;g=a.nextSetBit(g+1)){l&&(k=g);if(null!=f){if(k>=f.length)return;c=f[k++];if(Float.isNaN(c))continue;b=F(c)}else if(null!=j){if(k>=j.length)return;e=j[k++]}var m=this.at[g],p;switch(d){case 1086326786:this.setAtomName(g,e,!0);break;case 1086326785:this.setAtomType(g,e);break;
case 1086326788:this.setChainID(g,e);break;case 1094715393:this.setAtomNumber(g,b,!0);break;case 1094713365:this.setAtomSeqID(g,b);break;case 1111492609:case 1111492629:this.setAtomCoord(g,c,m.y,m.z);break;case 1111492610:case 1111492630:this.setAtomCoord(g,m.x,c,m.z);break;case 1111492611:case 1111492631:this.setAtomCoord(g,m.x,m.y,c);break;case 1111492626:case 1111492627:case 1111492628:this.setVibrationVector2(g,d,c);break;case 1111492612:case 1111492613:case 1111492614:case 1111492615:case 1111492616:case 1111492617:m.setFractionalCoord(d,
c,!1);this.taintAtom(g,2);break;case 1094715402:case 1086326789:this.setElement(m,b,!0);break;case 1631586315:this.resetPartialCharges();m.setFormalCharge(b);this.taintAtom(g,4);break;case 1113589786:this.setHydrophobicity(g,c);break;case 1128269825:p=2>c&&0.01<=c?100*c:c;this.setOccupancy(g,p,!0);break;case 1111492619:this.setPartialCharge(g,c,!0);break;case 1111492618:this.setBondingRadius(g,c);break;case 1111492620:this.setBFactor(g,c,!0);break;case 1094715412:this.setAtomResno(g,b);break;case 1825200146:case 1287653388:this.vwr.shm.setAtomLabel(e,
g);break;case 1665140738:case 1112152075:p=c;0>p?p=0:16<p&&(p=16.1);m.madAtom=sa(2E3*p);break;case 1113589787:this.vwr.slm.setSelectedAtom(m.i,0!=c);break;case 1094715418:m.setValence(b);this.taintAtom(g,10);break;case 1648363544:m.setRadius(c)?this.taintAtom(g,11):this.untaint(g,11);break;default:JU.Logger.error("unsettable atom property: "+JS.T.nameOf(d));return}}switch(d){case 1113589787:this.vwr.slm.setSelectedAtom(-1,!1);break;case 1665140738:case 1112152075:this.vwr.setShapeSize(0,2147483647,
a)}}},"JU.BS,~N,~N,~N,~S,~A,~A");c(b,"getVibCoord",function(a,d){var b=null,c=null;switch(d.charCodeAt(0)){case 120:case 121:case 122:c=this.getVibration(a,!1);break;default:b=this.getModulation(a),null!=b&&(c=b.getVibration(!1),null==c&&(c=b))}if(null==c&&null==b)return NaN;switch(d.charCodeAt(0)){case 120:case 88:return c.x;case 121:case 89:return c.y;case 122:case 90:return c.z;case 79:return b.getModulation("O",null,!0).floatValue();case 49:case 50:case 51:return b=b.getModulation("T",null,!0),
b="1"==d?b.x:"2"==d?b.y:b.z,b-Math.floor(b);default:return NaN}},"~N,~S");c(b,"getVibration",function(a,d){var b=null==this.vibrations?null:this.vibrations[a];return C(b,"J.api.JmolModulationSet")?b.getVibration(d):null==b&&d?new JU.Vibration:b},"~N,~B");c(b,"getModulation",function(a){a=null==this.vibrations?null:this.vibrations[a];return null!=a&&0<a.modDim?a:null},"~N");c(b,"setVibrationVector",function(a,d){if(null==d)null!=this.vibrations&&this.vibrations.length>a&&(this.vibrations[a]=null);
else if(!Double.isNaN(d.x)&&!Double.isNaN(d.y)&&!Double.isNaN(d.z)){if(null==this.vibrations||this.vibrations.length<=a)this.vibrations=Array(this.at.length);C(d,"JU.Vibration")?this.vibrations[a]=d:(null==this.vibrations[a]&&(this.vibrations[a]=new JU.Vibration),this.vibrations[a].setXYZ(d));this.at[a].setVibrationVector()}},"~N,JU.T3");c(b,"setVibrationVector2",function(a,d,b){var c=this.getVibration(a,!0);if(null!=c){switch(d){case 1111492626:c.x=b;break;case 1111492627:c.y=b;break;case 1111492628:c.z=
b}this.setAtomVibrationVector(a,c)}},"~N,~N,~N");c(b,"setAtomName",function(a,d,b){if(!b||!d.equals(this.at[a].getAtomName())){var c=this.am[this.at[a].mi].isBioModel?this.vwr.getJBR().lookupSpecialAtomID(d):0;this.at[a].atomID=c;0>=c&&(null==this.atomNames&&(this.atomNames=Array(this.at.length)),this.atomNames[a]=d);b&&this.taintAtom(a,0)}},"~N,~S,~B");c(b,"setAtomType",function(a,d){d.equals(this.at[a].getAtomType())||(null==this.atomTypes&&(this.atomTypes=Array(this.at.length)),this.atomTypes[a]=
d)},"~N,~S");c(b,"setChainID",function(a,d){if(!d.equals(this.at[a].getChainIDStr())){var b=this.at[a].getChainID(),b=this.getChainBits(b);this.at[a].group.chain.chainID=this.vwr.getChainID(d,!0);for(var c=b.nextSetBit(0);0<=c;c=b.nextSetBit(c+1))this.taintAtom(c,16)}},"~N,~S");c(b,"setAtomNumber",function(a,d,b){b&&d==this.at[a].getAtomNumber()||(null==this.atomSerials&&(this.atomSerials=E(this.at.length,0)),this.atomSerials[a]=d,b&&this.taintAtom(a,13))},"~N,~N,~B");c(b,"setElement",function(a,
d,b){b&&a.getElementNumber()==d||(a.setAtomicAndIsotopeNumber(d),a.paletteID=J.c.PAL.CPK.id,a.colixAtom=this.vwr.cm.getColixAtomPalette(a,J.c.PAL.CPK.id),this.resetPartialCharges(),b&&this.taintAtom(a.i,3))},"JM.Atom,~N,~B");c(b,"setSite",function(a,d,b){a.atomSite!=d&&(a.atomSite=d,b&&this.taintAtom(a.i,17))},"JM.Atom,~N,~B");c(b,"resetPartialCharges",function(){this.bsPartialCharges=this.partialCharges=null});c(b,"setAtomResno",function(a,d){d!=this.at[a].getResno()&&(this.at[a].group.setResno(d),
null==this.atomResnos&&(this.atomResnos=E(this.at.length,0)),this.atomResnos[a]=d,this.taintAtom(a,15))},"~N,~N");c(b,"setAtomSeqID",function(a,d){d!=this.at[a].getSeqID()&&(null==this.atomSeqIDs&&(this.atomSeqIDs=E(this.at.length,0)),this.atomSeqIDs[a]=d,this.taintAtom(a,14))},"~N,~N");c(b,"setOccupancy",function(a,d,b){if(!(b&&d==this.at[a].getOccupancy100())){if(null==this.occupancies){if(100==d)return;this.occupancies=L(this.at.length,0);for(var c=this.at.length;0<=--c;)this.occupancies[c]=100}this.occupancies[a]=
d;b&&this.taintAtom(a,7)}},"~N,~N,~B");c(b,"getOccupancyFloat",function(a){return null==this.occupancies||a>=this.occupancies.length?100:this.occupancies[a]},"~N");c(b,"setPartialCharge",function(a,d,b){if(!Float.isNaN(d)){if(null==this.partialCharges){this.bsPartialCharges=new JU.BS;if(0==d)return;this.partialCharges=L(this.at.length,0)}this.bsPartialCharges.set(a);this.partialCharges[a]=d;b&&this.taintAtom(a,8)}},"~N,~N,~B");c(b,"setBondingRadius",function(a,d){Float.isNaN(d)||d==this.at[a].getBondingRadius()||
(null==this.bondingRadii?this.bondingRadii=L(this.at.length,0):this.bondingRadii.length<this.at.length&&(this.bondingRadii=JU.AU.ensureLengthA(this.bondingRadii,this.at.length)),this.bondingRadii[a]=d,this.taintAtom(a,6))},"~N,~N");c(b,"setBFactor",function(a,d,b){if(!(Float.isNaN(d)||b&&d==this.at[a].getBfactor100())){if(null==this.bfactor100s){if(0==d)return;this.bfactor100s=U(this.at.length,0)}this.bfactor100s[a]=cb(100*(-327.68>d?-327.68:327.67<d?327.67:d)+(0>d?-0.5:0.5));b&&this.taintAtom(a,
9)}},"~N,~N,~B");c(b,"setHydrophobicity",function(a,d){if(!(Float.isNaN(d)||d==this.at[a].getHydrophobicity())){if(null==this.hydrophobicities){this.hydrophobicities=L(this.at.length,0);for(var b=0;b<this.at.length;b++)this.hydrophobicities[b]=JU.Elements.getHydrophobicity(this.at[b].group.groupID)}this.hydrophobicities[a]=d;this.taintAtom(a,5)}},"~N,~N");c(b,"setAtomData",function(a,d,b,c){var e=null,f=null;switch(a){case 2:this.loadCoordinates(b,!1,!c);return;case 12:this.loadCoordinates(b,!0,!0);
return;case 18:e=L(this.ac,0),f=JU.BS.newN(this.ac)}c=JU.Parser.markLines(b,";");var j=0;try{for(var k=JU.PT.parseInt(b.substring(0,c[0]-1)),l=1;l<=k;l++){var g=JU.PT.getTokens(JU.PT.parseTrimmed(b.substring(c[l],c[l+1]-1))),m=JU.PT.parseInt(g[0])-1;if(!(0>m||m>=this.ac)){var p=this.at[m];j++;var y=g.length-1,A=JU.PT.parseFloat(g[y]);switch(a){case 18:e[m]=A;f.set(m);continue;case 0:this.setAtomName(m,g[y],!0);break;case 13:this.setAtomNumber(m,F(A),!0);break;case 15:this.setAtomResno(m,F(A));break;
case 14:this.setAtomSeqID(m,F(A));break;case 1:this.setAtomType(m,g[y]);break;case 16:this.setChainID(m,g[y]);break;case 17:p.atomSite=F(A);break;case 3:p.setAtomicAndIsotopeNumber(F(A));p.paletteID=J.c.PAL.CPK.id;p.colixAtom=this.vwr.cm.getColixAtomPalette(p,J.c.PAL.CPK.id);break;case 4:p.setFormalCharge(F(A));break;case 5:this.setHydrophobicity(m,A);break;case 6:this.setBondingRadius(m,A);break;case 8:this.setPartialCharge(m,A,!0);break;case 9:this.setBFactor(m,A,!0);break;case 10:p.setValence(F(A));
break;case 11:p.setRadius(A)}this.taintAtom(m,a)}}18==a&&0<j&&this.vwr.setData(d,u(-1,[d,e,f,Integer.$valueOf(1)]),0,0,0,0,0)}catch(n){if(D(n,Exception))JU.Logger.error("loadData error: "+n);else throw n;}},"~N,~S,~S,~B");c(b,"loadCoordinates",function(a,d,b){var c=JU.Parser.markLines(a,";"),e=d?new JU.V3:null;try{for(var f=JU.PT.parseInt(a.substring(0,c[0]-1)),j=1;j<=f;j++){var k=JU.PT.getTokens(JU.PT.parseTrimmed(a.substring(c[j],c[j+1]))),l=JU.PT.parseInt(k[0])-1,g=k[3].equalsIgnoreCase("1.4E-45")?
1.4E-45:JU.PT.parseFloat(k[3]),m=k[4].equalsIgnoreCase("1.4E-45")?1.4E-45:JU.PT.parseFloat(k[4]),p=JU.PT.parseFloat(k[5]);d?(e.set(g,m,p),this.setAtomVibrationVector(l,e)):(this.setAtomCoord(l,g,m,p),b||this.untaint(l,2))}}catch(y){if(D(y,Exception))JU.Logger.error("Frame.loadCoordinate error: "+y);else throw y;}},"~S,~B,~B");c(b,"validateBspf",function(a){null!=this.bspf&&(this.bspf.isValid=a)},"~B");c(b,"validateBspfForModel",function(a,d){null!=this.bspf&&this.bspf.validateModel(a,d)},"~N,~B");
c(b,"setPreserveState",function(a){this.preserveState=a},"~B");b.getUserSettableType=c(b,"getUserSettableType",function(a){var d=0==a.indexOf("property_");a=d?a.substring(9):a;for(var b=0;18>b;b++)if(JM.AtomCollection.userSettableValues[b].equalsIgnoreCase(a))return b;return d?18:-1},"~S");c(b,"getTaintedAtoms",function(a){return null==this.tainted?null:this.tainted[a]},"~N");c(b,"taintAtoms",function(a,d){this.canSkipLoad=!1;if(this.preserveState)for(var b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1))this.taintAtom(b,
d)},"JU.BS,~N");c(b,"taintAtom",function(a,d){this.preserveState&&(null==this.tainted&&(this.tainted=Array(18)),null==this.tainted[d]&&(this.tainted[d]=JU.BS.newN(this.ac)),this.tainted[d].set(a));2==d&&this.taintModelCoord(a)},"~N,~N");c(b,"taintModelCoord",function(a){a=this.am[this.at[a].mi];this.validateBspfForModel(a.trajectoryBaseIndex,!1);a.isBioModel&&a.resetDSSR(!0);this.pointGroup=null},"~N");c(b,"untaint",function(a,d){this.preserveState&&(null==this.tainted||null==this.tainted[d]||this.tainted[d].clear(a))},
"~N,~N");c(b,"setTaintedAtoms",function(a,d){if(this.preserveState){if(null==a){if(null==this.tainted)return;this.tainted[d]=null;return}null==this.tainted&&(this.tainted=Array(18));null==this.tainted[d]&&(this.tainted[d]=JU.BS.newN(this.ac));JU.BSUtil.copy2(a,this.tainted[d])}if(2==d){var b=a.nextSetBit(0);0<=b&&this.taintModelCoord(b)}},"JU.BS,~N");c(b,"unTaintAtoms",function(a,d){if(!(null==this.tainted||null==this.tainted[d])){for(var b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1))this.tainted[d].clear(b);
0>this.tainted[d].nextSetBit(0)&&(this.tainted[d]=null)}},"JU.BS,~N");c(b,"findNearest2",function(a,d,b,c,e){for(var f=null,j,k=this.ac;0<=--k;)if(!(null!=c&&c.get(k)||null==(j=this.at[k])))j.isClickable()&&this.isCursorOnTopOf(j,a,d,e,f)&&(f=j);b[0]=f},"~N,~N,~A,JU.BS,~N");c(b,"isCursorOnTopOf",function(a,d,b,c,e){return 1<a.sZ&&!this.g3d.isClippedZ(a.sZ)&&this.g3d.isInDisplayRange(a.sX,a.sY)&&a.isCursorOnTopOf(d,b,c,e)},"JM.Atom,~N,~N,~N,JM.Atom");c(b,"fillADa",function(a,d){a.xyz=a.atoms=this.at;
a.ac=this.ac;a.atomicNumber=E(this.ac,0);var b=0!=(d&2);b&&(a.atomRadius=L(this.ac,0));for(var c=0!=(d&16),e=0;e<this.ac;e++){var f=this.at[e];JM.AtomCollection.isDeleted(f)||!c&&0<=a.modelIndex&&f.mi!=a.firstModelIndex?(null==a.bsIgnored&&(a.bsIgnored=new JU.BS),a.bsIgnored.set(e)):(a.atomicNumber[e]=f.getElementNumber(),a.lastModelIndex=f.mi,b&&(a.atomRadius[e]=this.getWorkingRadius(f,a)))}},"J.atomdata.AtomData,~N");c(b,"getWorkingRadius",function(a,d){var b=0,c=d.radiusData;switch(c.factorType){case J.atomdata.RadiusData.EnumType.ABSOLUTE:b=
c.value;break;case J.atomdata.RadiusData.EnumType.FACTOR:case J.atomdata.RadiusData.EnumType.OFFSET:switch(c.vdwType){case J.c.VDW.BONDING:b=a.getBondingRadius();break;case J.c.VDW.ADPMAX:b=a.getADPMinMax(!0);break;case J.c.VDW.ADPMIN:b=a.getADPMinMax(!1);break;default:b=a.getVanderwaalsRadiusFloat(this.vwr,d.radiusData.vdwType)}b=c.factorType===J.atomdata.RadiusData.EnumType.FACTOR?b*c.value:b+c.value}return b+c.valueExtended},"JM.Atom,J.atomdata.AtomData");c(b,"calculateHydrogens",function(a,d,
b,c){var e=256==(c&256),f=512==(c&512),j=8==(c&8),k=2048==(c&2048);c=4096==(c&4096);var l=new JU.V3,g=new JU.V3,m=Array(this.ac),p=this.vwr.slm.bsDeleted,y,A=d[0]=0;if(null==a)return m;var n=this.vwr.getOperativeSymmetry();null!=n&&0==this.vwr.getObjectMad10(5)&&(n=null);for(var q=null==n?null:new JU.P3,u=a.nextSetBit(0);0<=u;u=a.nextSetBit(u+1))if(!(null!=p&&p.get(u))){var v=this.at[u],w=v.getElementNumber();if(!(f&&6!=w)){var x=6>=w?1.1:10>=w?1:1.3;switch(w){case 7:case 8:x=1}var B=e||k||c?v.getCovalentHydrogenCount():
0;if(!(e&&0<B||k&&0==B)){var z=this.getMissingHydrogenCount(v,!1);if(!(e&&0==z)){k||(B=z);var C=this.aaRet[0];y=this.aaRet[2];var D=this.aaRet[3]-(k?B:0);if(!(0==D&&v.isHetero())){m[u]=Array(B);z=0;if(0==D)switch(B){case 4:l.set(0.635,0.635,0.635),y=JU.P3.newP(l),y.add(v),z=JM.AtomCollection.addH(m[u],z,y,v,b,n,q);case 3:l.set(-0.635,-0.635,0.635),y=JU.P3.newP(l),y.add(v),z=JM.AtomCollection.addH(m[u],z,y,v,b,n,q);case 2:l.set(-0.635,0.635,-0.635),y=JU.P3.newP(l),y.add(v),z=JM.AtomCollection.addH(m[u],
z,y,v,b,n,q);case 1:l.set(0.635,-0.635,-0.635),y=JU.P3.newP(l),y.add(v),z=JM.AtomCollection.addH(m[u],z,y,v,b,n,q)}else switch(B){case 3:this.getHybridizationAndAxes(u,w,l,g,"sp3b",!1,!0,j,null);y=new JU.P3;y.scaleAdd2(x,l,v);z=JM.AtomCollection.addH(m[u],z,y,v,b,n,q);this.getHybridizationAndAxes(u,w,l,g,"sp3c",!1,!0,j,null);y=new JU.P3;y.scaleAdd2(x,l,v);z=JM.AtomCollection.addH(m[u],z,y,v,b,n,q);this.getHybridizationAndAxes(u,w,l,g,"sp3d",!1,!0,j,null);y=new JU.P3;y.scaleAdd2(x,l,v);z=JM.AtomCollection.addH(m[u],
z,y,v,b,n,q);break;case 2:D=2==y||5==w||1==D&&4==C||7==w&&this.isAdjacentSp2(v);this.getHybridizationAndAxes(u,w,l,g,D?"sp2b":3==C?"sp3c":"lpa",!1,!0,j,null);y=JU.P3.newP(l);y.scaleAdd2(x,l,v);z=JM.AtomCollection.addH(m[u],z,y,v,b,n,q);this.getHybridizationAndAxes(u,w,l,g,D?"sp2c":3==C?"sp3d":"lpb",!1,!0,j,null);y=JU.P3.newP(l);y.scaleAdd2(x,l,v);z=JM.AtomCollection.addH(m[u],z,y,v,b,n,q);break;case 1:switch(C-D){case 1:if(8==w&&v===v.group.getCarbonylOxygenAtom()){m[u]=null;continue}if(null!=this.getHybridizationAndAxes(u,
w,l,g,2==y||5==w||6==w&&1==this.aaRet[1]||7==w&&(new Boolean((new Boolean(v.group.getNitrogenAtom()===v&0==v.getFormalCharge())).valueOf()||this.isAdjacentSp2(v))).valueOf()?"sp2c":"sp3d",!0,!1,j,null))y=JU.P3.newP(l),y.scaleAdd2(x,l,v),z=JM.AtomCollection.addH(m[u],z,y,v,b,n,q);break;case 2:this.getHybridizationAndAxes(u,w,l,g,4==C?"sp2c":"sp2b",!1,!1,j,null);y=JU.P3.newP(l);y.scaleAdd2(x,l,v);z=JM.AtomCollection.addH(m[u],z,y,v,b,n,q);break;case 3:this.getHybridizationAndAxes(u,w,l,g,"spb",!1,!0,
j,null),y=JU.P3.newP(l),y.scaleAdd2(x,l,v),z=JM.AtomCollection.addH(m[u],z,y,v,b,n,q)}}if(z<B){v=Array(z);for(w=0;w<z;w++)v[w]=m[u][w];m[u]=v}A+=z}}}}}d[0]=A;return m},"JU.BS,~A,JU.Lst,~N");b.addH=c(b,"addH",function(a,d,b,c,e,f,j){if(null!=f&&(j.setT(b),f.toFractional(j,!1),!f.isWithinUnitCell(j,1,1,1)))return d;a[d++]=b;null!=e&&e.addLast(c);return d},"~A,~N,JU.P3,JM.Atom,JU.Lst,J.api.SymmetryInterface,JU.P3");c(b,"isAdjacentSp2",function(a){for(var d=a.bonds,b=0;b<d.length;b++)for(var c=d[b].getOtherAtom(a).bonds,
e=0;e<c.length;e++)switch(c[e].getCovalentOrder()){case 2:case 3:return!0}return!1},"JM.Atom");c(b,"getMissingHydrogenCount",function(a,d){null==this.aaRet&&(this.aaRet=E(5,0));var b=a.getTargetValence();if(0>b)return 0;var c=a.getFormalCharge(),e=a.getValence(),f=this.am[a.mi],f=f.isBioModel&&!f.isPdbWithMultipleBonds?a.group.getGroup3():null;this.aaRet[0]=b;this.aaRet[1]=c;this.aaRet[2]=0;this.aaRet[3]=a.getCovalentBondCount();this.aaRet[4]=null==f?0:e;null!=f&&0==c&&this.bioModelset.getAminoAcidValenceAndCharge(f,
a.getAtomName(),this.aaRet)&&(b=this.aaRet[0],c=this.aaRet[1]);0!=c&&(b+=4==b?-Math.abs(c):c,this.aaRet[0]=b);b-=e;return 0>b&&!d?0:b},"JM.Atom,~B");c(b,"fixFormalCharges",function(a){for(var d=0,b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1)){var c=this.at[b],e=this.getMissingHydrogenCount(c,!0);if(0!=e){var f=c.getFormalCharge(),e=f-e;c.setFormalCharge(e);this.taintAtom(b,4);JU.Logger.debugging&&JU.Logger.debug("atom "+c+" formal charge "+f+" -> "+e);d++}}return d},"JU.BS");c(b,"getHybridizationAndAxes",
function(a,d,b,c,e,f,j,k,l){var g=0<e.length&&"-"==e.charAt(0)?e.substring(1):e;if(0<=e.indexOf("d")&&!e.endsWith("sp3d"))return this.getHybridizationAndAxesD(a,b,c,g);e=this.at[a];0==d&&(d=e.getElementNumber());var m=this.getAttached(e,4,f,k),p=m.length,y=g.charAt(g.length-1).charCodeAt(0)-97;if(0>y||6<y)y=0;b.set(0,0,0);c.set(0,0,0);for(var A=Array(4),n=0;n<p;n++){var q=m[n];if(null==q){p=n;break}A[n]=JU.V3.newVsub(e,q);A[n].normalize();b.add(A[n])}0<p&&c.setT(A[0]);n=!1;a=new JU.V3;if(3<=p){2.9845130209103035>
c.angle(A[1])?a.cross(c,A[1]):a.cross(c,A[2]);a.normalize();var u=new JU.V3;2.9845130209103035>A[1].angle(A[2])?u.cross(A[1],A[2]):u.cross(c,A[2]);u.normalize();n=0.95<=Math.abs(u.dot(a))}var v=0==g.indexOf("sp3"),q=!v&&0==g.indexOf("sp2"),w=!v&&!q&&0==g.indexOf("sp"),x=0==g.indexOf("p"),z=0==g.indexOf("lp"),u=null;if(f){if(0==p)return null;if(v){if(3<y||4<p)return null}else if(q){if(2<y||3<p)return null}else if(w&&(1<y||2<p))return null;switch(p){case 1:if(1==d&&!v)return null;if(v){u="sp3";break}switch(m[0].getCovalentBondCount()){case 1:if(2!=
m[0].getValence()){u="sp";break}case 2:u=w?"sp":"sp2";break;case 3:if(!q&&!x)return null;u="sp2"}break;case 2:if(0.1>b.length()){if(0<=g.indexOf("2")||0<=g.indexOf("3"))return null;u="sp";break}u=v?"sp3":"sp2";if(0==g.indexOf("sp"))break;if(z){u="lp";break}u=g;break;default:if(n&&!k)u="sp2";else{n&&b.setT(a);if(z&&3==p){u="lp";break}u="sp3"}}if(null==u)return null;if(0==g.indexOf("p")){if("sp3"===u)return null}else if(0>g.indexOf(u))return null}if(y<p&&!g.startsWith("p")&&!g.startsWith("l"))return b.sub2(m[y],
e),b.normalize(),u;switch(p){case 0:g.equals("sp3c")||g.equals("sp2d")||g.equals("lpa")?b.set(-0.5,-0.7,1):g.equals("sp3b")||g.equals("lpb")?b.set(0.5,-0.7,-1):g.equals("sp3a")?b.set(0,1,0):b.set(0,0,1);c.set(1,0,0);break;case 1:a.setT(JM.AtomCollection.vRef);c.cross(a,b);if(v){for(n=m[0].getBondCount();0<=--n;)if(m[0].bonds[n].isCovalentNotPartial0()&&m[0].getBondedAtomIndex(n)!=e.i&&(c.sub2(m[0],m[0].bonds[n].getOtherAtom(m[0])),c.cross(b,c),0!=c.length())){c.cross(c,b);break}c.normalize();Float.isNaN(c.x)&&
(c.setT(JM.AtomCollection.vRef),c.cross(c,b));a.cross(b,c);a.normalize();b.normalize();c.scaleAdd2(2.828,c,b);3!=y&&(c.normalize(),(new JU.M3).setAA(JU.A4.new4(b.x,b.y,b.z,2.09439507*(2==y?1:-1))).rotate(c));b.setT(c);c.cross(a,b);break}a.cross(c,b);g=m[0].getCovalentBondCount();switch(g){case 3:if(l!==m[0]){this.getHybridizationAndAxes(m[0].i,0,c,a,"pz",!1,j,k,e);a.setT(c);q?(c.cross(c,b),1==y&&c.scale(-1),c.scale(JM.AtomCollection.sqrt3_2),b.scaleAdd2(0.5,b,c)):w||(a.setT(b),b.setT(c));c.cross(a,
b);break}g=2;case 1:if(1==g&&2!=m[0].getValence())break;case 2:j=m[0];c.setT(b);for(a.setT(JM.AtomCollection.vRef);null!=j&&2==j.getCovalentBondCount();){k=j.bonds;q=null;for(n=0;n<k.length;n++)if(k[n].isCovalentNotPartial0()&&(q=k[n].getOtherAtom(j),q!==e)){a.sub2(q,j);break}a.cross(a,c);if(0.1<a.length()||2!=q.getCovalentBondCount())break;e=j;j=q}w||(0.1<a.length()?(b.cross(a,c),b.normalize(),1==y&&b.scale(-1),b.scale(JM.AtomCollection.sqrt3_2),b.scaleAdd2(0.5,c,b),x&&(a.cross(b,c),b.setT(a),a.setT(c)),
c.cross(a,b)):(b.setT(c),c.cross(JM.AtomCollection.vRef,c)))}break;case 2:if(0.1>b.length()){if(!g.equals("pz")){q=m[0];(l=3==q.getCovalentBondCount())||(l=3==(q=m[1]).getCovalentBondCount());if(l){this.getHybridizationAndAxes(q.i,0,c,b,"pz",!1,j,k,null);g.equals("px")&&c.scale(-1);b.setT(A[0]);break}a.setT(JM.AtomCollection.vRef);b.cross(a,c);a.cross(b,c)}b.setT(c);c.cross(a,b);break}a.cross(b,c);if(q){c.cross(b,a);break}if(v||z){a.normalize();b.normalize();g.equals("lp")||(0==y||2==y?b.scaleAdd2(-1.2,
a,b):b.scaleAdd2(1.2,a,b));c.cross(b,a);break}c.cross(b,a);b.setT(a);0>b.z&&(b.scale(-1),c.scale(-1));break;default:if(v)break;if(!n){c.cross(b,c);break}b.setT(a);0>b.z&&j&&(b.scale(-1),c.scale(-1))}c.normalize();b.normalize();return u},"~N,~N,JU.V3,JU.V3,~S,~B,~B,~B,JU.T3");c(b,"getHybridizationAndAxesD",function(a,d,b,c){c.startsWith("sp3d2")&&(c="d2sp3"+(5==c.length?"a":c.substring(5)));c.startsWith("sp3d")&&(c="dsp3"+(4==c.length?"a":c.substring(4)));if(c.equals("d2sp3")||c.equals("dsp3"))c+=
"a";var e=c.startsWith("dsp3"),f=c.charAt(c.length-1).charCodeAt(0)-97;if(null!=d&&(!e&&(5<f||!c.startsWith("d2sp3"))||e&&4<f))return null;a=this.at[a];c=this.getAttached(a,6,!0,!1);if(null==c)return null==d?null:"?";var j=c.length;if(3>j&&null!=d)return null;for(var k=f>=j,g=v(j*(j-1)/2),s=JU.AU.newInt2(g),m=E(3,0),g=E(3,g,0),p=0,y=0,A=0;A<j-1;A++)for(var n=A+1;n<j;n++){var q=JU.Measure.computeAngleABC(c[A],a,c[n],!0),q=105>q?0:150<=q?2:1;g[q][m[q]]=p;m[q]++;s[p++]=E(-1,[A,n]);0==A&&1==q&&y++}p=
100*m[0]+10*m[1]+m[2];if(null==d)switch(p){default:return"";case 0:return"";case 1:return"linear";case 100:case 10:return"bent";case 111:case 201:return"T-shaped";case 30:case 120:case 210:case 300:return 162<Math.abs(JU.Measure.computeTorsion(c[0],a,c[1],c[2],!0))?"trigonal planar":"trigonal pyramidal";case 330:return 1==y%2?"tetrahedral":"uncapped trigonal pyramid";case 60:case 150:case 240:return"tetrahedral";case 402:return"square planar";case 411:case 501:return"see-saw";case 631:return"trigonal bipyramidal";
case 802:return"uncapped square pyramid";case 1203:return"octahedral"}switch(p){default:return null;case 201:break;case 210:case 330:case 411:case 631:if(!e)return null;break;case 300:case 402:case 501:case 802:case 1203:if(e)return null}if(k)if(e)switch(m[1]){case 0:d.sub2(c[s[g[0][0]][0]],a);b.sub2(c[s[g[0][0]][1]],a);d.cross(d,b);d.normalize();4==f&&d.scale(-1);m=this.findNotAttached(j,s,g[2],m[2]);A=m.nextSetBit(0);b.sub2(c[A],a);b.normalize();b.scale(0.5);d.scaleAdd2(JM.AtomCollection.sqrt3_2,
d,b);f=-1;break;case 1:4==f?(b=s[g[1][0]],d.add2(c[b[0]],c[b[1]]),d.scaleAdd2(-2,a,d),f=-1):(m=this.findNotAttached(j,s,g[1],m[1]),f=m.nextSetBit(0));break;default:m=this.findNotAttached(j,s,g[1],m[1]),f=m.nextSetBit(0)}else{p=!1;if(4==j)switch(m[2]){case 1:m=this.findNotAttached(j,s,g[2],m[2]);A=m.nextSetBit(0);f=4==f?A:m.nextSetBit(A+1);break;default:p=!0}else{m=this.findNotAttached(j,s,g[2],m[2]);A=m.nextSetBit(0);for(n=j;n<f&&0<=A;n++)A=m.nextSetBit(A+1);-1==A?p=!0:f=A}p&&(d.sub2(c[s[g[0][0]][0]],
a),b.sub2(c[s[g[0][0]][1]],a),d.cross(d,b),4==f&&d.scale(-1),f=-1)}0<=f&&d.sub2(c[f],a);k&&d.scale(-1);d.normalize();return e?"dsp3":"d2sp3"},"~N,JU.V3,JU.V3,~S");c(b,"getAttached",function(a,d,b,c){var e=a.getCovalentBondCount();if(e>d)return null;d=Array(e);if(0<e){for(var e=a.bonds,f=0,j=0;j<e.length;j++)if(e[j].isCovalentNotPartial0()){var k=e[j].getOtherAtom(a);if(!c||1!=k.getAtomicAndIsotopeNumber())d[f++]=k}b&&!c&&java.util.Arrays.sort(d,Y(JM.AtomCollection.AtomSorter,this,null))}return d},
"JM.Atom,~N,~B,~B");c(b,"findNotAttached",function(a,d,b,c){var e=JU.BS.newN(a);e.setBits(0,a);for(var f=0;f<a;f++)for(var j=0;j<c;j++){var k=d[b[j]];(k[0]==f||k[1]==f)&&e.clear(f)}return e},"~N,~A,~A,~N");c(b,"getAtomBitsMDa",function(a,d,b){var c=C(d,Integer)?d.intValue():0;switch(a){case 1086326786:case 1086326785:var e=1086326785==a,f=","+d+",";for(a=this.ac;0<=--a;)JM.AtomCollection.isDeleted(this.at[a])||(d=e?this.at[a].getAtomType():this.at[a].getAtomName(),0<=f.indexOf(","+d+",")&&b.set(a));
return b;case 1094715393:for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.at[a].getAtomNumber()==c&&b.set(a);return b;case 2097155:for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&0<this.at[a].getCovalentBondCount()&&b.set(a);return b;case 2097188:case 2097156:case 136314895:case 2097166:case 2097168:case 2097170:case 2097172:case 2097174:case 2097184:return this.haveBioModels?this.bioModelset.getAtomBitsBS(a,null,b):b;case 1612709900:c=1;case 1094715402:for(a=this.ac;0<=
--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.at[a].getElementNumber()==c&&b.set(a);return b;case 1612709894:for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.at[a].isHetero()&&b.set(a);return b;case 1073741824:return this.getIdentifierOrNull(d);case 2097165:for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.at[a].isLeadAtom()&&b.set(a);return b;case 1094713362:case 1639976963:return this.haveBioModels?this.bioModelset.getAtomBitsBS(a,d,b):b;case 1094715412:for(a=
this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.at[a].getResno()==c&&b.set(a);return b;case 1612709912:d=E(2,0);for(a=this.ac;0<=--a;)if(!JM.AtomCollection.isDeleted(this.at[a]))if(c=this.at[a].group.groupID,42<=c&&45>c)b.set(a);else if(8==(e=this.at[a]).getElementNumber()&&2==e.getCovalentBondCount()){for(var c=e.bonds,j=0,k=c.length;0<=--k&&3>j;)if(c[k].isCovalentNotPartial0()&&1==(f=c[k].getOtherAtom(e)).getElementNumber())d[j++%2]=f.i;2==j&&(b.set(d[1]),b.set(d[0]),b.set(a))}return b;
case 1073742355:for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.isAltLoc(this.at[a].altloc,d)&&b.set(a);return b;case 1073742356:e=d.toUpperCase();0<=e.indexOf("\\?")&&(e=JU.PT.rep(e,"\\?","\u0001"));(f=e.startsWith("?*"))&&(e=e.substring(1));for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.isAtomNameMatch(this.at[a],e,f,f)&&b.set(a);return b;case 1073742357:return JU.BSUtil.copy(this.getChainBits(c));case 1073742360:return this.getSpecName(d);case 1073742361:for(a=
this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.at[a].group.groupID==c&&b.set(a);return b;case 1073742362:return JU.BSUtil.copy(this.getSeqcodeBits(c,!0));case 5:for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.at[a].group.getInsCode()==c&&b.set(a);return b;case 1296041985:for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.at[a].getSymOp()==c&&b.set(a);return b}f=d.nextSetBit(0);if(0>f)return b;switch(a){case 1094717454:e=JU.BSUtil.copy(d);for(a=
f;0<=a;a=e.nextSetBit(a+1))b.or(this.am[this.at[a].mi].bsAtoms),e.andNot(b);return b;case 1086326788:e=JU.BSUtil.copy(d);for(a=f;0<=a;a=e.nextSetBit(a+1))this.at[a].group.chain.setAtomBits(b),e.andNot(b);return b;case 1086326789:e=new JU.BS;for(a=f;0<=a;a=d.nextSetBit(a+1))e.set(this.at[a].getElementNumber());for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&e.get(this.at[a].getElementNumber())&&b.set(a);return b;case 1086324742:e=JU.BSUtil.copy(d);for(a=f;0<=a;a=e.nextSetBit(a+1))this.at[a].group.setAtomBits(b),
e.andNot(b);return b;case 1094713366:e=new JU.BS;for(a=f;0<=a;a=d.nextSetBit(a+1))e.set(this.at[a].atomSite);for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&e.get(this.at[a].atomSite)&&b.set(a);return b}JU.Logger.error("MISSING getAtomBits entry for "+JS.T.nameOf(a));return b},"~N,~O,JU.BS");c(b,"getChainBits",function(a){var d=this.vwr.getBoolean(603979822);d?97<=a&&122>=a&&(a+=159):0<=a&&300>a&&(a=this.chainToUpper(a));for(var b=new JU.BS,c=JU.BS.newN(this.ac),e,f=c.nextClearBit(0);f<
this.ac;f=c.nextClearBit(f+1))if(!JM.AtomCollection.isDeleted(this.at[f])){var j=this.at[f].group.chain;a==(e=j.chainID)||!d&&0<=e&&300>e&&a==this.chainToUpper(e)?(j.setAtomBits(b),c.or(b)):j.setAtomBits(c)}return b},"~N");c(b,"chainToUpper",function(a){return 97<=a&&122>=a?a-32:256<=a&&300>a?a-191:a},"~N");c(b,"isAltLoc",function(a,d){if(null==d)return"\x00"==a;if(1!=d.length)return!1;var b=d.charAt(0);return"*"==b||"?"==b&&"\x00"!=a||a==b},"~S,~S");c(b,"getSeqcodeBits",function(a,d){var b=new JU.BS,
c=JM.Group.getSeqNumberFor(a),e=2147483647!=c,f=!0,j=JM.Group.getInsertionCodeChar(a);switch(j.charCodeAt(0)){case 63:for(var k=this.ac;0<=--k;)if(!JM.AtomCollection.isDeleted(this.at[k])){var g=this.at[k].group.seqcode;if((!e||c==JM.Group.getSeqNumberFor(g))&&0!=JM.Group.getInsertionCodeFor(g))b.set(k),f=!1}break;default:for(k=this.ac;0<=--k;)if(!JM.AtomCollection.isDeleted(this.at[k])&&(g=this.at[k].group.seqcode,a==g||!e&&a==JM.Group.getInsertionCodeFor(g)||"*"==j&&c==JM.Group.getSeqNumberFor(g)))b.set(k),
f=!1}return!f||d?b:null},"~N,~B");c(b,"getIdentifierOrNull",function(a){var d=this.getSpecNameOrNull(a,!1);0<=a.indexOf("\\?")&&(a=JU.PT.rep(a,"\\?","\u0001"));return null!=d||0<a.indexOf("?")?d:0<a.indexOf("*")?this.getSpecNameOrNull(a,!0):this.haveBioModels?this.bioModelset.getIdentifierOrNull(a):null},"~S");c(b,"getSpecName",function(a){var d=this.getSpecNameOrNull(a,!1);if(null!=d)return d;0<a.indexOf("*")&&(d=this.getSpecNameOrNull(a,!0));return null==d?new JU.BS:d},"~S");c(b,"getSpecNameOrNull",
function(a,d){var b=null;a=a.toUpperCase();0<=a.indexOf("\\?")&&(a=JU.PT.rep(a,"\\?","\u0001"));var c=a.startsWith("?*");c&&(a=a.substring(1));for(var e=this.ac;0<=--e;)if(!JM.AtomCollection.isDeleted(this.at[e])){var f=this.at[e].getGroup3(!0);if(null!=f&&0<f.length){if(JU.PT.isMatch(f,a,d,!0)){null==b&&(b=JU.BS.newN(e+1));for(b.set(e);0<=--e;)!JM.AtomCollection.isDeleted(this.at[e])&&this.at[e].getGroup3(!0).equals(f)&&b.set(e);e++}}else this.isAtomNameMatch(this.at[e],a,d,c)&&(null==b&&(b=JU.BS.newN(e+
1)),b.set(e))}return b},"~S,~B");c(b,"isAtomNameMatch",function(a,d,b,c){return JU.PT.isMatch(a.getAtomName().toUpperCase(),d,b,c)},"JM.Atom,~S,~B,~B");c(b,"getAtomIndices",function(a){for(var d=0,b=E(this.ac,0),c=a.nextSetBit(0);0<=c&&c<this.ac;c=a.nextSetBit(c+1))b[c]=++d;return b},"JU.BS");c(b,"getAtomsNearPlane",function(a,d){for(var b=new JU.BS,c=this.ac;0<=--c;){var e=this.at[c];if(!JM.AtomCollection.isDeleted(e)){var f=JU.Measure.distanceToPlane(d,e);(0<a&&-0.1<=f&&f<=a||0>a&&0.1>=f&&f>=a||
0==a&&0.01>Math.abs(f))&&b.set(e.i)}}return b},"~N,JU.P4");c(b,"clearVisibleSets",function(){this.haveBSClickable=this.haveBSVisible=!1});c(b,"getAtomsInFrame",function(a){this.clearVisibleSets();a.clearAll();for(var d=this.ac;0<=--d;)!JM.AtomCollection.isDeleted(this.at[d])&&this.at[d].isVisible(1)&&a.set(d)},"JU.BS");c(b,"getVisibleSet",function(a){if(a)this.vwr.setModelVisibility(),this.vwr.shm.finalizeAtoms(null,!0);else if(this.haveBSVisible)return this.bsVisible;this.bsVisible.clearAll();for(a=
this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.at[a].checkVisible()&&this.bsVisible.set(a);null!=this.vwr.shm.bsSlabbedInternal&&this.bsVisible.andNot(this.vwr.shm.bsSlabbedInternal);this.haveBSVisible=!0;return this.bsVisible},"~B");c(b,"getClickableSet",function(a){if(a)this.vwr.setModelVisibility();else if(this.haveBSClickable)return this.bsClickable;this.bsClickable.clearAll();for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.at[a].isClickable()&&this.bsClickable.set(a);
this.haveBSClickable=!0;return this.bsClickable},"~B");c(b,"isModulated",function(a){return null!=this.bsModulated&&this.bsModulated.get(a)},"~N");c(b,"deleteModelAtoms",function(a,d,b){this.at=JU.AU.deleteElements(this.at,a,d);this.ac=this.at.length;for(var c=a;c<this.ac;c++)this.at[c].i=c,this.at[c].mi--;null!=this.bsModulated&&JU.BSUtil.deleteBits(this.bsModulated,b);this.deleteAtomTensors(b);this.atomNames=JU.AU.deleteElements(this.atomNames,a,d);this.atomTypes=JU.AU.deleteElements(this.atomTypes,
a,d);this.atomResnos=JU.AU.deleteElements(this.atomResnos,a,d);this.atomSerials=JU.AU.deleteElements(this.atomSerials,a,d);this.atomSeqIDs=JU.AU.deleteElements(this.atomSeqIDs,a,d);this.dssrData=JU.AU.deleteElements(this.dssrData,a,d);this.bfactor100s=JU.AU.deleteElements(this.bfactor100s,a,d);this.hasBfactorRange=!1;this.occupancies=JU.AU.deleteElements(this.occupancies,a,d);this.resetPartialCharges();this.atomTensorList=JU.AU.deleteElements(this.atomTensorList,a,d);this.vibrations=JU.AU.deleteElements(this.vibrations,
a,d);this.nSurfaceAtoms=0;this.surfaceDistance100s=this.bsSurface=null;if(null!=this.tainted)for(a=0;18>a;a++)JU.BSUtil.deleteBits(this.tainted[a],b)},"~N,~N,JU.BS");c(b,"getAtomIdentityInfo",function(a,d,b){d.put("_ipt",Integer.$valueOf(a));d.put("atomIndex",Integer.$valueOf(a));d.put("atomno",Integer.$valueOf(this.at[a].getAtomNumber()));d.put("info",this.getAtomInfo(a,null,b));d.put("sym",this.at[a].getElementSymbol())},"~N,java.util.Map,JU.P3");c(b,"getAtomTensorList",function(a){return 0>a||
null==this.atomTensorList||a>=this.atomTensorList.length?null:this.atomTensorList[a]},"~N");c(b,"deleteAtomTensors",function(a){if(null!=this.atomTensors){for(var d=new JU.Lst,b,c=this.atomTensors.keySet().iterator();c.hasNext()&&((b=c.next())||1);){for(var e=this.atomTensors.get(b),f=e.size();0<=--f;){var j=e.get(f);(a.get(j.atomIndex1)||0<=j.atomIndex2&&a.get(j.atomIndex2))&&e.removeItemAt(f)}0==e.size()&&d.addLast(b)}for(f=d.size();0<=--f;)this.atomTensors.remove(d.get(f))}},"JU.BS");c(b,"setCapacity",
function(a){this.atomCapacity+=a},"~N");c(b,"setAtomTensors",function(a,d){if(!(null==d||0==d.size())){null==this.atomTensors&&(this.atomTensors=new java.util.Hashtable);null==this.atomTensorList&&(this.atomTensorList=Array(this.at.length));this.atomTensorList=JU.AU.ensureLength(this.atomTensorList,this.at.length);this.atomTensorList[a]=JM.AtomCollection.getTensorList(d);for(var b=d.size();0<=--b;){var c=d.get(b);c.atomIndex1=a;c.atomIndex2=-1;c.modelIndex=this.at[a].mi;this.addTensor(c,c.type);null!=
c.altType&&this.addTensor(c,c.altType)}}},"~N,JU.Lst");c(b,"addTensor",function(a,d){d=d.toLowerCase();var b=this.atomTensors.get(d);null==b&&(this.atomTensors.put(d,b=new JU.Lst),b.ensureCapacity(this.atomCapacity));b.addLast(a)},"JU.Tensor,~S");b.getTensorList=c(b,"getTensorList",function(a){for(var d=-1,b=!1,c=a.size(),e=c;0<=--e;){var f=a.get(e);f.forThermalEllipsoid?d=e:2==f.iType&&(b=!0)}var j=Array((0<=d||!b?0:1)+c);if(0<=d&&(j[0]=a.get(d),1==a.size()))return j;if(b){d=0;for(e=c;0<=--e;)f=
a.get(e),f.forThermalEllipsoid||(j[++d]=f)}else for(e=0;e<c;e++)j[e]=a.get(e);return j},"JU.Lst");c(b,"getAtomTensor",function(a,d){var b=this.getAtomTensorList(a);if(null!=b&&null!=d){d=d.toLowerCase();for(var c=0;c<b.length;c++){var e=b[c];if(null!=e&&(d.equals(e.type)||d.equals(e.altType)))return e}}return null},"~N,~S");c(b,"getAllAtomTensors",function(a){if(null==this.atomTensors)return null;if(null!=a)return this.atomTensors.get(a.toLowerCase());a=new JU.Lst;for(var d,b=this.atomTensors.entrySet().iterator();b.hasNext()&&
((d=b.next())||1);)a.addAll(d.getValue());return a},"~S");c(b,"scaleVectorsToMax",function(a){if(null!=this.vibrations){for(var d=0,b=JU.BS.newN(this.ac),c=this.vibrations.length;0<=--c;){var e=this.getVibration(c,!1);if(null!=e&&(-1==e.modDim||-2==e.modDim))d=Math.max(d,e.length()),b.set(c)}if(!(d==a||0==d)){d=a/d;a=!1;for(c=b.nextSetBit(0);0<=c;c=b.nextSetBit(c+1)){var e=this.getVibration(c,!1),f=this.getModulation(c);if(null==f){if(0==d)return;e.scale(d)}else f.scaleVibration(d);a||(this.taintAtom(c,
12),a=!0)}this.tainted[12].or(b)}}},"~N");c(b,"getAtomsFromAtomNumberInFrame",function(a){for(var d=this.vwr.getFrameAtoms(),b=d.nextSetBit(0);0<=b;b=d.nextSetBit(b+1))this.at[b].getAtomNumber()!=a&&d.clear(b);return d},"~N");c(b,"generateCrystalClass",function(a,d){var b=0>a||a>=this.ac?this.vwr.getOperativeSymmetry():this.at[a].getUnitCell(),c=null!=d&&Float.isNaN(d.x),b=null==b?null:b.generateCrystalClass(c?null:null!=d?d:this.at[a]);return null==b?new JU.Lst:b},"~N,JU.P3");b.isDeleted=c(b,"isDeleted",
function(a){return null==a||a.isDeleted()},"JM.Atom");b.$AtomCollection$AtomSorter$=function(){var a=w(function(){fa(this,arguments);q(this,arguments)},JM.AtomCollection,"AtomSorter",null,java.util.Comparator);g(a,"compare",function(a,b){return a.i>b.i?1:a.i<b.i?-1:0},"JM.Atom,JM.Atom")};b.sqrt3_2=Math.sqrt(3)/2;b.vRef=JU.V3.new3(3.14159,2.71828,1.41421);b.userSettableValues=null});n("JM");z(["J.api.AtomIndexIterator"],"JM.AtomIteratorWithinModel",["J.atomdata.RadiusData"],function(){var b=w(function(){this.bspf=
this.cubeIterator=null;this.isZeroBased=this.hemisphereOnly=this.threadSafe=!1;this.modelIndex=2147483647;this.atomIndex=-1;this.distanceSquared=this.zeroBase=0;this.bsSelected=null;this.checkGreater=this.isGreaterOnly=!1;this.radiusData=null;this.vdw1=0;this.isVdw=!1;this.vwr=this.atoms=null;this.iNext=0;q(this,arguments)},JM,"AtomIteratorWithinModel",null,J.api.AtomIndexIterator);c(b,"initialize",function(a,d,b,c,e,f){this.bspf=a;this.bsSelected=d;this.isGreaterOnly=b;this.isZeroBased=c;this.hemisphereOnly=
e;this.threadSafe=f;this.cubeIterator=null},"J.bspt.Bspf,JU.BS,~B,~B,~B,~B");g(b,"setModel",function(a,d,b,c,e,f,j){this.threadSafe&&(d=-1-d);if(d!=this.modelIndex||null==this.cubeIterator)this.cubeIterator=this.bspf.getCubeIterator(d),this.modelIndex=d;this.zeroBase=this.isZeroBased?b:0;if(-2147483648!=f){this.atomIndex=0>f?-1:c;if(this.isVdw=null!=j)this.radiusData=j,this.atoms=a.at,this.vwr=a.vwr,f=j.factorType===J.atomdata.RadiusData.EnumType.OFFSET?5+j.value:5*j.value,this.vdw1=this.atoms[c].getVanderwaalsRadiusFloat(this.vwr,
j.vdwType);this.checkGreater=this.isGreaterOnly&&2147483647!=c;this.setCenter(e,f)}},"JM.ModelSet,~N,~N,~N,JU.T3,~N,J.atomdata.RadiusData");g(b,"setCenter",function(a,d){this.setCenter2(a,d)},"JU.T3,~N");c(b,"setCenter2",function(a,d){null!=this.cubeIterator&&(this.cubeIterator.initialize(a,d,this.hemisphereOnly),this.distanceSquared=d*d)},"JU.T3,~N");g(b,"hasNext",function(){return this.hasNext2()});c(b,"hasNext2",function(){if(0<=this.atomIndex)for(;this.cubeIterator.hasMoreElements();){var a=this.cubeIterator.nextElement();
if((this.iNext=a.i)!=this.atomIndex&&(!this.checkGreater||this.iNext>this.atomIndex)&&(null==this.bsSelected||this.bsSelected.get(this.iNext)))return!0}else if(this.cubeIterator.hasMoreElements())return a=this.cubeIterator.nextElement(),this.iNext=a.i,!0;this.iNext=-1;return!1});g(b,"next",function(){return this.iNext-this.zeroBase});g(b,"foundDistance2",function(){return null==this.cubeIterator?-1:this.cubeIterator.foundDistance2()});g(b,"addAtoms",function(a){for(var d;this.hasNext();)if(0<=(d=
this.next())){var b;if(this.isVdw){b=this.atoms[d].getVanderwaalsRadiusFloat(this.vwr,this.radiusData.vdwType)+this.vdw1;switch(this.radiusData.factorType){case J.atomdata.RadiusData.EnumType.OFFSET:b+=2*this.radiusData.value;break;case J.atomdata.RadiusData.EnumType.FACTOR:b*=this.radiusData.value}b*=b}else b=this.distanceSquared;this.foundDistance2()<=b&&a.set(d)}},"JU.BS");g(b,"release",function(){null!=this.cubeIterator&&(this.cubeIterator.release(),this.cubeIterator=null)});g(b,"getPosition",
function(){return null})});n("JM");z(["JM.AtomIteratorWithinModel"],"JM.AtomIteratorWithinModelSet",null,function(){var b=w(function(){this.center=this.bsModels=null;this.distance=0;q(this,arguments)},JM,"AtomIteratorWithinModelSet",JM.AtomIteratorWithinModel);x(b,function(a){I(this,JM.AtomIteratorWithinModelSet,[]);this.bsModels=a},"JU.BS");g(b,"setCenter",function(a,d){this.center=a;this.distance=d;this.set(0)},"JU.T3,~N");c(b,"set",function(a){if(0>(this.modelIndex=this.bsModels.nextSetBit(a))||
null==(this.cubeIterator=this.bspf.getCubeIterator(this.modelIndex)))return!1;this.setCenter2(this.center,this.distance);return!0},"~N");g(b,"hasNext",function(){return this.hasNext2()?!0:!this.set(this.modelIndex+1)?!1:this.hasNext()})});n("JM");z(["JU.Edge","JV.JC"],"JM.Bond",["JU.C"],function(){var b=w(function(){this.atom2=this.atom1=null;this.shapeVisibilityFlags=this.colix=this.mad=0;q(this,arguments)},JM,"Bond",JU.Edge);x(b,function(a,d,b,c,e){I(this,JM.Bond,[]);this.atom1=a;this.atom2=d;this.colix=
e;this.setOrder(b);this.setMad(c)},"JM.Atom,JM.Atom,~N,~N,~N");c(b,"setMad",function(a){this.mad=a;this.setShapeVisibility(0!=a)},"~N");c(b,"setShapeVisibility",function(a){0!=(this.shapeVisibilityFlags&JM.Bond.myVisibilityFlag)!=a&&(this.atom1.addDisplayedBond(JM.Bond.myVisibilityFlag,a),this.atom2.addDisplayedBond(JM.Bond.myVisibilityFlag,a),this.shapeVisibilityFlags=a?this.shapeVisibilityFlags|JM.Bond.myVisibilityFlag:this.shapeVisibilityFlags&~JM.Bond.myVisibilityFlag)},"~B");c(b,"getIdentity",
function(){return this.index+1+" "+JU.Edge.getBondOrderNumberFromOrder(this.order)+" "+this.atom1.getInfo()+" -- "+this.atom2.getInfo()+" "+this.atom1.distance(this.atom2)});g(b,"isCovalent",function(){return 0!=(this.order&1023)});g(b,"isHydrogen",function(){return JU.Edge.isOrderH(this.order)});c(b,"isAromatic",function(){return 0!=(this.order&512)});c(b,"getEnergy",function(){return 0});c(b,"getValence",function(){return!this.isCovalent()||33==this.order?0:this.is(515)?1:this.order&7});c(b,"deleteAtomReferences",
function(){null!=this.atom1&&this.atom1.deleteBond(this);null!=this.atom2&&this.atom2.deleteBond(this);this.atom1=this.atom2=null});c(b,"setTranslucent",function(a,d){this.colix=JU.C.getColixTranslucent3(this.colix,a,d)},"~B,~N");c(b,"setOrder",function(a){16==this.atom1.getElementNumber()&&16==this.atom2.getElementNumber()&&(a|=256);512==a&&(a=515);this.order=a|this.order&131072},"~N");g(b,"getAtomIndex1",function(){return this.atom1.i});g(b,"getAtomIndex2",function(){return this.atom2.i});g(b,"getCovalentOrder",
function(){return JU.Edge.getCovalentBondOrder(this.order)});c(b,"getOtherAtom",function(a){return this.atom1===a?this.atom2:this.atom2===a?this.atom1:null},"JM.Atom");c(b,"is",function(a){return(this.order&131071)==a},"~N");g(b,"getOtherNode",function(a){return this.atom1===a?this.atom2:this.atom2===a||null==a?this.atom1:null},"JU.SimpleNode");c(b,"setAtropisomerOptions",function(){if(1<this.getCovalentOrder())return!1;var a,d=2147483647,b=this.atom1.bonds;for(a=0;a<b.length;a++){var c=b[a].getOtherAtom(this.atom1);
if(c!==this.atom2)break}if(a<b.length){b=this.atom2.bonds;for(d=0;d<b.length&&!(c=b[d].getOtherAtom(this.atom2),c!==this.atom1);d++);}if(2<a||d>=b.length||2<d)return!1;this.order=JU.Edge.getAtropismOrder(a+1,d+1);return!0});g(b,"getCIPChirality",function(){return""},"~B");g(b,"setCIPChirality",function(){},"~N");g(b,"toString",function(){return this.atom1+" - "+this.atom2});g(b,"getAtom",function(a){return 1==a?this.atom2:this.atom1},"~N");c(b,"isCovalentNotPartial0",function(){return 0!=(this.order&
1023)&&33!=this.order});b.myVisibilityFlag=JV.JC.getShapeVisibilityFlag(1)});n("JM");z(["JM.AtomCollection","JU.V3"],"JM.BondCollection","JU.AU $.BS $.Measure JM.Bond $.BondIteratorSelected $.BondSet $.HBond JU.C $.Edge".split(" "),function(){var b=w(function(){this.bo=null;this.bondCount=0;this.molecules=this.freeBonds=this.numCached=null;this.defaultCovalentMad=this.moleculeCount=0;this.bsAromatic=this.bsAromaticDouble=this.bsAromaticSingle=null;this.haveHiddenBonds=!1;this.v2=this.v1=null;this.haveAtropicBonds=
!1;q(this,arguments)},JM,"BondCollection",JM.AtomCollection);N(b,function(){this.v1=new JU.V3;this.v2=new JU.V3});c(b,"setupBC",function(){this.bsAromatic=new JU.BS;this.numCached=E(5,0);this.freeBonds=Array(5);for(var a=5;0<--a;)this.freeBonds[a]=Array(200);this.setupAC()});c(b,"releaseModelSetBC",function(){this.freeBonds=this.bo=null;this.releaseModelSetAC()});c(b,"getBondIteratorForType",function(a,d){return new JM.BondIteratorSelected(this.bo,this.bondCount,a,d,this.vwr.getBoolean(603979812))},
"~N,JU.BS");c(b,"getBondIterator",function(a){return new JM.BondIteratorSelected(this.bo,this.bondCount,131071,a,!1)},"JU.BS");c(b,"getBondColix1",function(a){return JU.C.getColixInherited(this.bo[a].colix,this.bo[a].atom1.colixAtom)},"~N");c(b,"getBondColix2",function(a){return JU.C.getColixInherited(this.bo[a].colix,this.bo[a].atom2.colixAtom)},"~N");c(b,"getBondCountInModel",function(a){for(var d=0,b=this.bondCount;0<=--b;)null!=this.bo[b]&&this.bo[b].atom1.mi==a&&d++;return d},"~N");c(b,"getBondsForSelectedAtoms",
function(a,d){var b=new JU.BS,c=a.cardinality();switch(c){case 0:return b;case 1:case 2:var e=this.at[a.nextSetBit(0)],f=2==c?this.at[a.nextSetBit(e.i+1)]:null;if(1==c||d){for(c=e.getBondCount();0<=--c;)b.set(e.bonds[c].index);if(null!=f)for(c=f.getBondCount();0<=--c;)b.set(f.bonds[c].index)}else c=e.getBond(f),null!=c&&b.set(c.index);return b}for(e=0;e<this.bondCount;++e)c=this.bo[e],null!=c&&(f=a.get(c.atom1.i),c=a.get(c.atom2.i),(d?f||c:f&&c)&&b.set(e));return b},"JU.BS,~B");c(b,"bondAtoms",function(a,
d,b,c,e,f,j,k){b=this.getOrAddBond(a,d,b,c,e,f,!0);k&&(b.order|=131072,j&&(a.group=d.group,a.group.addAtoms(a.i)));return b},"JM.Atom,JM.Atom,~N,~N,JU.BS,~N,~B,~B");c(b,"getOrAddBond",function(a,d,b,c,e,f,j){if(131071==b||65535==b)b=1;a.isBonded(d)?(a=a.getBond(d).index,j&&(this.bo[a].setOrder(b),this.bo[a].setMad(c),C(this.bo[a],"JM.HBond")&&(this.bo[a].energy=f))):(this.bondCount==this.bo.length&&(this.bo=JU.AU.arrayCopyObject(this.bo,this.bondCount+250)),a=this.setBond(this.bondCount++,this.bondMutually(a,
d,b,c,f)).index);null!=e&&e.set(a);return this.bo[a]},"JM.Atom,JM.Atom,~N,~N,JU.BS,~N,~B");c(b,"setBond",function(a,d){return this.bo[d.index=a]=d},"~N,JM.Bond");c(b,"bondMutually",function(a,d,b,c,e){b=JU.Edge.isOrderH(b)?new JM.HBond(a,d,b,c,0,e):new JM.Bond(a,d,b,c,0);this.addBondToAtom(a,b);this.addBondToAtom(d,b);return b},"JM.Atom,JM.Atom,~N,~N,~N");c(b,"addBondToAtom",function(a,d){null==a.bonds?(a.bonds=Array(1),a.bonds[0]=d):a.bonds=this.addToBonds(d,a.bonds)},"JM.Atom,JM.Bond");c(b,"addToBonds",
function(a,d){var b;if(null==d)b=0<this.numCached[1]?this.freeBonds[1][--this.numCached[1]]:Array(1),b[0]=a;else{var c=d.length;b=c+1;b=5>b&&0<this.numCached[b]?this.freeBonds[b][--this.numCached[b]]:Array(b);b[c]=a;for(var e=c;0<=--e;)b[e]=d[e];5>c&&200>this.numCached[c]&&(this.freeBonds[c][this.numCached[c]++]=d)}return b},"JM.Bond,~A");c(b,"addHBond",function(a,d,b,c){this.bondCount==this.bo.length&&(this.bo=JU.AU.arrayCopyObject(this.bo,this.bondCount+250));return this.setBond(this.bondCount++,
this.bondMutually(a,d,b,1,c)).index},"JM.Atom,JM.Atom,~N,~N");c(b,"deleteAllBonds2",function(){this.vwr.setShapeProperty(1,"reset",null);for(var a=this.bondCount;0<=--a;)null!=this.bo[a]&&(this.bo[a].deleteAtomReferences(),this.bo[a]=null);this.bondCount=0});c(b,"getDefaultMadFromOrder",function(a){return JU.Edge.isOrderH(a)?1:32768==a?v(Math.floor(2E3*this.vwr.getFloat(570425406))):this.defaultCovalentMad},"~N");c(b,"deleteConnections",function(a,d,b,c,e,f,j){var k=0>a,g=0>d,s=k||g;a=this.fixD(a,
k);d=this.fixD(d,g);var m=new JU.BS,p=0,y=b|=131072;!j&&JU.Edge.isOrderH(b)&&(b=30720);if(f)f=c;else{f=new JU.BS;for(var A=c.nextSetBit(0);0<=A;A=c.nextSetBit(A+1)){var n=this.at[A];if(null!=n.bonds)for(var q=n.bonds.length;0<=--q;)e.get(n.getBondedAtomIndex(q))&&f.set(n.bonds[q].index)}}for(A=f.nextSetBit(0);A<this.bondCount&&0<=A;A=f.nextSetBit(A+1))if(c=this.bo[A],null!=c&&this.isInRange(c.atom1,c.atom2,a,d,k,g,s)&&(j||y==(c.order&-257|131072)||0!=(b&c.order&30720)))m.set(A),p++;0<p&&this.deleteBonds(m,
!1);return E(-1,[0,p])},"~N,~N,~N,JU.BS,JU.BS,~B,~B");c(b,"fixD",function(a,d){return d?-a:a*a},"~N,~B");c(b,"isInRange",function(a,d,b,c,e,f,j){var k=a.distanceSquared(d);return j?(j=Math.sqrt(k),a=a.getBondingRadius()+d.getBondingRadius(),(e?j>=a*b:k>=b)&&(f?j<=a*c:k<=c)):k>=b&&k<=c},"JM.Atom,JM.Atom,~N,~N,~B,~B,~B");c(b,"dBb",function(a,d){if(0!=a.cardinality()){this.resetMolecules();for(var b=-1,c=a.nextSetBit(0);0<=c&&c<this.bondCount;c=a.nextSetBit(c+1)){var e=this.bo[c];if(null!=e&&a.get(c)){if(!d){var f=
e.atom1.mi;f!=b&&this.am[b=f].resetBoundCount()}e.deleteAtomReferences();this.bo[c]=null}}b=this.vwr.getShapeProperty(1,"sets");if(null!=b)for(c=0;c<b.length;c++)null!=b[c]&&b[c].andNot(a);this.bsAromatic.andNot(a)}},"JU.BS,~B");c(b,"resetAromatic",function(){for(var a=this.bondCount;0<=--a;){var d=this.bo[a];null!=d&&d.isAromatic()&&d.setOrder(515)}});c(b,"assignAromaticBondsBs",function(a,d){a||(this.bsAromatic=new JU.BS);this.bsAromaticSingle=new JU.BS;this.bsAromaticDouble=new JU.BS;for(var b=
null==d,c=b?this.bondCount-1:d.nextSetBit(0),e=c;0<=e;e=b?e-1:d.nextSetBit(e+1)){var f=this.bo[e];if(null!=f)switch(this.bsAromatic.get(e)&&f.setOrder(515),f.order&131071){case 515:if(!this.assignAromaticMustBeSingle(f.atom1)&&!this.assignAromaticMustBeSingle(f.atom2)){this.bsAromatic.set(e);break}f.order=513;case 513:this.bsAromaticSingle.set(e);break;case 514:this.bsAromaticDouble.set(e)}}for(var c=(b=null==d)?this.bondCount-1:d.nextSetBit(0),j=new JU.BS,e=c;0<=e;e=b?e-1:d.nextSetBit(e+1))if(f=
this.bo[e],!(null==f||!f.is(515)||this.bsAromaticDouble.get(e)||this.bsAromaticSingle.get(e)))if(j.set(e),8==f.atom1.getElementNumber()||8==f.atom2.getElementNumber())this.assignAromaticDouble(f)||this.assignAromaticSingle(f);for(e=j.nextSetBit(0);0<=e;e=j.nextSetBit(e+1))this.assignAromaticDouble(f=this.bo[e])||this.assignAromaticSingle(f);j=new JU.BS;for(e=c;0<=e;e=b?e-1:d.nextSetBit(e+1))if(f=this.bo[e],null!=f)if(this.bsAromaticDouble.get(e))f.is(514)||(this.bsAromatic.set(e),j.set(f.atom1.mi),
f.setOrder(this.isLinear(f,this.v1,this.v2)?3:514));else if((this.bsAromaticSingle.get(e)||f.isAromatic())&&!f.is(513))this.bsAromatic.set(e),f.setOrder(513);b=this.am;for(e=j.nextSetBit(0);0<=e;e=j.nextSetBit(e+1))b[e].isBioModel&&(b[e].isPdbWithMultipleBonds=!0);this.assignAromaticNandO(d);this.bsAromaticDouble=this.bsAromaticSingle=null},"~B,JU.BS");c(b,"isLinear",function(a,d,b){if(3==a.order)return!0;if(2!=a.atom1.getCovalentBondCount()||2!=a.atom2.getCovalentBondCount())return!1;for(var c=a.atom1.getEdges(),
e=c.length;0<=-e;)if(c[e]!==a&&c[e].isCovalent()){if(175>JU.Measure.computeAngle(c[e].getOtherNode(a.atom1),a.atom1,a.atom2,d,b,!0))return!1;break}c=a.atom2.getEdges();for(e=c.length;0<=-e;)if(c[e]!==a&&c[e].isCovalent()){if(175>JU.Measure.computeAngle(c[e].getOtherNode(a.atom2),a.atom2,a.atom1,d,b,!0))return!1;break}return!0},"JM.Bond,JU.V3,JU.V3");c(b,"assignAromaticDouble",function(a){var d=a.index;if(this.bsAromaticSingle.get(d))return!1;if(this.bsAromaticDouble.get(d))return!0;this.bsAromaticDouble.set(d);
return!this.assignAromaticSingleForAtom(a.atom1,d)||!this.assignAromaticSingleForAtom(a.atom2,d)?(this.bsAromaticDouble.clear(d),!1):!0},"JM.Bond");c(b,"assignAromaticSingle",function(a){var d=a.index;if(this.bsAromaticDouble.get(d))return!1;if(this.bsAromaticSingle.get(d))return!0;this.bsAromaticSingle.set(d);return!this.assignAromaticDoubleForAtom(a.atom1)||!this.assignAromaticDoubleForAtom(a.atom2)?(this.bsAromaticSingle.clear(d),!1):!0},"JM.Bond");c(b,"assignAromaticSingleForAtom",function(a,
d){var b=a.bonds;if(null==b)return!1;for(var c=b.length;0<=--c;){var e=b[c],f=e.index;if(!(f==d||!e.isAromatic()||this.bsAromaticSingle.get(f)))if(this.bsAromaticDouble.get(f)||!this.assignAromaticSingle(e))return!1}return!0},"JM.Atom,~N");c(b,"assignAromaticDoubleForAtom",function(a){a=a.bonds;if(null==a)return!1;for(var d=!1,b=-1,c=a.length;0<=--c;)this.bsAromaticDouble.get(a[c].index)&&(d=!0),a[c].isAromatic()&&(b=c);for(c=a.length;0<=--c;){var e=a[c],f=e.index;if(e.isAromatic()&&!this.bsAromaticDouble.get(f)&&
!this.bsAromaticSingle.get(f))if(!d&&this.assignAromaticDouble(e))d=!0;else if((d||c<b)&&!this.assignAromaticSingle(e))return!1}return d},"JM.Atom");c(b,"allowAromaticBond",function(a){if(this.assignAromaticMustBeSingle(a.atom1)||this.assignAromaticMustBeSingle(a.atom2))return!1;switch(a.getCovalentOrder()){case 1:case 2:return 3>=a.atom1.getCovalentBondCount()&&3>=a.atom2.getCovalentBondCount();default:return!1}},"JM.Bond");c(b,"assignAromaticMustBeSingle",function(a){var d=a.getElementNumber();
switch(d){case 6:case 7:case 8:case 16:break;default:return!0}var b=a.getValenceAromatic(!1);switch(d){case 6:return 4==b;case 7:return a.group.getNitrogenAtom()===a||3==b&&1>a.getFormalCharge();case 8:return a.group.getCarbonylOxygenAtom()!==a&&2==b&&1>a.getFormalCharge();case 16:return 5==a.group.groupID||2==b&&1>a.getFormalCharge()}return!1},"JM.Atom");c(b,"assignAromaticNandO",function(a){for(var d,b=null==a,c=b?this.bondCount-1:a.nextSetBit(0);0<=c;c=b?c-1:a.nextSetBit(c+1))if(d=this.bo[c],null!=
d&&d.is(513)){var e,f=d.atom2,j,k=f.getElementNumber();7==k||8==k?(j=k,e=f,f=d.atom1,k=f.getElementNumber()):(e=d.atom1,j=e.getElementNumber());if(!(7!=j&&8!=j)){var g=e.getValence();if(!(0>g)){var s=e.getCovalentBondCount();e=e.getFormalCharge();switch(j){case 7:3==g&&(3==s&&1>e&&6==k&&3==f.getValence())&&d.setOrder(514);break;case 8:1==g&&(0==e&&(14==k||16==k))&&d.setOrder(514)}}}}},"JU.BS");c(b,"getAtomBitsMDb",function(a,d){var b=new JU.BS;switch(a){default:return this.getAtomBitsMDa(a,d,b);case 1677721602:for(var c=
d.nextSetBit(0);0<=c;c=d.nextSetBit(c+1))c<this.bondCount&&null!=this.bo[c]?(b.set(this.bo[c].atom1.i),b.set(this.bo[c].atom2.i)):d.clear(c);return b;case 1073742331:for(c=this.bondCount;0<=--c;)null!=this.bo[c]&&this.bo[c].isAromatic()&&(b.set(this.bo[c].atom1.i),b.set(this.bo[c].atom2.i));return b}},"~N,~O");c(b,"removeUnnecessaryBonds",function(a,d){var b=new JU.BS,c=new JU.BS,e=a.bonds;if(null!=e){for(var f=0;f<e.length;f++)e[f].isCovalent()?1==e[f].getOtherAtom(a).getElementNumber()&&b.set(e[f].getOtherAtom(a).i):
c.set(e[f].index);0<=c.nextSetBit(0)&&this.deleteBonds(c,!1);d&&b.set(a.i);0<=b.nextSetBit(0)&&this.vwr.deleteAtoms(b,!1)}},"JM.Atom,~B");c(b,"displayBonds",function(a,d){d||(this.haveHiddenBonds=!0);for(var b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1))b<this.bondCount&&(null!=this.bo[b]&&0!=this.bo[b].mad)&&this.bo[b].setShapeVisibility(d)},"JM.BondSet,~B");c(b,"getAtomsConnected",function(a,d,b,c){for(var e=C(c,"JM.BondSet"),f=e?new JM.BondSet:new JU.BS,j=E(this.ac,0),k,g=30720==b,s=65535==b,m=0;m<
this.bondCount;m++){var p=this.bo[m];if(null!=p&&(s||p.is(b)||g&&p.isHydrogen()))e?f.set(m):(c.get(p.atom1.i)&&(j[k=p.atom2.i]++,f.set(k)),c.get(p.atom2.i)&&(j[k=p.atom1.i]++,f.set(k)))}if(e)return f;b=0==a;for(k=this.ac;0<=--k;)c=j[k],null==this.at[k]||c<a||c>d?f.clear(k):b&&0==c&&f.set(k);return f},"~N,~N,~N,JU.BS");c(b,"addConnectedHAtoms",function(a,d){if(null!=a.bonds)for(var b=a.bonds.length;0<=--b;){var c=a.bonds[b].getOtherAtom(a);1==c.getElementNumber()&&d.set(c.i)}},"JM.Atom,JU.BS")});n("JM");
K(JM,"BondIterator");n("JM");z(["JM.BondIterator"],"JM.BondIteratorSelected",null,function(){var b=w(function(){this.bonds=null;this.iBond=this.bondType=this.bondCount=0;this.bsSelected=null;this.bondSelectionModeOr=!1;q(this,arguments)},JM,"BondIteratorSelected",null,JM.BondIterator);x(b,function(a,d,b,c,e){this.bonds=a;this.bondCount=d;this.bondType=b;this.bsSelected=c;this.bondSelectionModeOr=e},"~A,~N,~N,JU.BS,~B");g(b,"hasNext",function(){if(131071==this.bondType)return this.iBond=this.bsSelected.nextSetBit(this.iBond),
0<=this.iBond&&this.iBond<this.bondCount;for(;this.iBond<this.bondCount;++this.iBond){var a=this.bonds[this.iBond];if(!(null==a||65535!=this.bondType&&0==(a.order&this.bondType))&&!(65535==this.bondType&&32768==a.order)){var d=this.bsSelected.get(a.atom1.i),a=this.bsSelected.get(a.atom2.i);if(!this.bondSelectionModeOr&&d&&a||this.bondSelectionModeOr&&(d||a))return!0}}return!1});g(b,"nextIndex",function(){return this.iBond});g(b,"next",function(){return this.bonds[this.iBond++]})});n("JM");z(["JU.BS"],
"JM.BondSet",["JU.BSUtil"],function(){var b=w(function(){this.associatedAtoms=null;q(this,arguments)},JM,"BondSet",JU.BS);x(b,function(){I(this,JM.BondSet,[])});b.newBS=c(b,"newBS",function(a){var d=new JM.BondSet;JU.BSUtil.copy2(a,d);return d},"JU.BS");c(b,"getAssociatedAtoms",function(a){null==this.associatedAtoms&&(this.associatedAtoms=a.getAtomIndices(a.getAtoms(1677721602,this)));return this.associatedAtoms},"JM.ModelSet")});n("JM");z(["JM.Structure"],"JM.Chain",null,function(){var b=w(function(){this.model=
null;this.chainNo=this.chainID=0;this.groups=null;this.selectedGroupCount=this.groupCount=0;q(this,arguments)},JM,"Chain",null,JM.Structure);x(b,function(a,d,b){this.model=a;this.chainID=d;this.chainNo=b;this.groups=Array(16)},"JM.Model,~N,~N");c(b,"getIDStr",function(){return 0==this.chainID?"":256>this.chainID?""+String.fromCharCode(this.chainID):this.model.ms.vwr.getChainIDStr(this.chainID)});c(b,"calcSelectedGroupsCount",function(a){for(var d=this.selectedGroupCount=0;d<this.groupCount;d++)this.groups[d].selectedIndex=
this.groups[d].isSelected(a)?this.selectedGroupCount++:-1},"JU.BS");c(b,"fixIndices",function(a,d){for(var b=0;b<this.groupCount;b++)this.groups[b].fixIndices(a,d)},"~N,JU.BS");g(b,"setAtomBits",function(a){for(var d=0;d<this.groupCount;d++)this.groups[d].setAtomBits(a)},"JU.BS");g(b,"setAtomBitsAndClear",function(a,d){for(var b=0;b<this.groupCount;b++)this.groups[b].setAtomBitsAndClear(a,d)},"JU.BS,JU.BS")});n("JM");z(["JM.Structure","java.lang.Short","JV.JC"],"JM.Group","java.util.Hashtable JU.BS $.Quat J.c.STR JU.BSUtil $.Escape $.Logger $.Point3fi".split(" "),
function(){var b=w(function(){this.chain=null;this.groupIndex=0;this.group1="\x00";this.leadAtomIndex=this.firstAtomIndex=-1;this.lastAtomIndex=0;this.bsAdded=null;this.shapeVisibilityFlags=this.selectedIndex=this.groupID=this.seqcode=0;this.strutPoint=this.dssrNT=null;q(this,arguments)},JM,"Group",null,JM.Structure);c(b,"setGroup",function(a,d,b,c,e){this.chain=a;this.seqcode=b;this.firstAtomIndex=c;this.lastAtomIndex=e;null!=d&&0<d.length&&this.setGroupID(d);return this},"JM.Chain,~S,~N,~N,~N");
c(b,"setGroupID",function(){},"~S");c(b,"isAdded",function(a){return null!=this.bsAdded&&this.bsAdded.get(a)},"~N");c(b,"addAtoms",function(a){null==this.bsAdded&&(this.bsAdded=new JU.BS);this.bsAdded.set(a)},"~N");g(b,"setAtomBits",function(a){a.setBits(this.firstAtomIndex,this.lastAtomIndex+1);null!=this.bsAdded&&a.or(this.bsAdded)},"JU.BS");g(b,"setAtomBitsAndClear",function(a,d){a.setBits(this.firstAtomIndex,this.lastAtomIndex+1);d.clearBits(this.firstAtomIndex,this.lastAtomIndex+1);null!=this.bsAdded&&
(a.or(this.bsAdded),d.andNot(this.bsAdded))},"JU.BS,JU.BS");c(b,"isSelected",function(a){var d=a.nextSetBit(this.firstAtomIndex);return 0<=d&&d<=this.lastAtomIndex||null!=this.bsAdded&&this.bsAdded.intersects(a)},"JU.BS");c(b,"setShapeVisibility",function(a,d){this.shapeVisibilityFlags=d?this.shapeVisibilityFlags|a:this.shapeVisibilityFlags&~a},"~N,~B");c(b,"getGroup3",function(){return 1>this.groupID?"":JM.Group.group3Names[this.groupID]});c(b,"getGroup1",function(){return"\x00"==this.group1?"?":
this.group1});c(b,"getBioPolymerLength",function(){return 0});c(b,"getMonomerIndex",function(){return-1});c(b,"getStructure",function(){return null});c(b,"getStrucNo",function(){return 0});c(b,"getProteinStructureType",function(){return J.c.STR.NOT});c(b,"getProteinStructureSubType",function(){return this.getProteinStructureType()});c(b,"setProteinStructureType",function(){return-1},"J.c.STR,~N");c(b,"isProtein",function(){return 1<=this.groupID&&24>this.groupID});c(b,"isNucleic",function(){return 24<=
this.groupID&&42>this.groupID});c(b,"isDna",function(){return this.isDnaByID()});c(b,"isRna",function(){return this.isRnaByID()});c(b,"isPurine",function(){return this.isPurineByID()});c(b,"isPurineByID",function(){return this.isNucleic()&&0!=(153957&1<<this.groupID-24)||0<="AGag".indexOf(this.getGroup1())});c(b,"isPyrimidine",function(){return this.isPyrimidineByID()});c(b,"isPyrimidineByID",function(){return this.isNucleic()&&0!=(108186&1<<this.groupID-24)});c(b,"isRnaByID",function(){return this.isNucleic()&&
0!=(196663&1<<this.groupID-24)});c(b,"isDnaByID",function(){return this.isNucleic()&&0!=(65480&1<<this.groupID-24)});c(b,"isCarbohydrate",function(){return!1});c(b,"getResno",function(){return-2147483648==this.seqcode?0:this.seqcode>>8});c(b,"setResno",function(a){this.seqcode=JM.Group.getSeqcodeFor(a,this.getInsertionCode())},"~N");b.getSeqNumberFor=c(b,"getSeqNumberFor",function(a){return JM.Group.haveSequenceNumber(a)?a>>8:2147483647},"~N");b.haveSequenceNumber=c(b,"haveSequenceNumber",function(a){return 0!=
(a&128)},"~N");c(b,"getSeqcodeString",function(){return JM.Group.getSeqcodeStringFor(this.seqcode)});b.getSeqcodeFor=c(b,"getSeqcodeFor",function(a,d){if(-2147483648==a)return a;"A"<=d&&"Z">=d||("a"<=d&&"z">=d||"0"<=d&&"9">=d||"?"==d||"*"==d)||(" "!=d&&"\x00"!=d&&JU.Logger.warn("unrecognized insertionCode:"+d),d="\x00");return(2147483647==a?0:a<<8|128)+d.charCodeAt(0)},"~N,~S");b.getSeqcodeStringFor=c(b,"getSeqcodeStringFor",function(a){if(-2147483648==a)return null;var d=""+(a>>8);0!=(a&127)&&(d+=
"^"+String.fromCharCode(a&127));return d},"~N");c(b,"getInsertionCode",function(){return-2147483648==this.seqcode?"\x00":String.fromCharCode(this.seqcode&127)});c(b,"getInsCode",function(){return this.seqcode&127});b.getInsertionCodeFor=c(b,"getInsertionCodeFor",function(a){return a&127},"~N");b.getInsertionCodeChar=c(b,"getInsertionCodeChar",function(a){return-2147483648==a?"\x00":String.fromCharCode(a&127)},"~N");c(b,"scaleToScreen",function(a,d){return this.chain.model.ms.vwr.tm.scaleToScreen(a,
d)},"~N,~N");c(b,"isCursorOnTopOf",function(a,d,b,c,e){return this.chain.model.ms.isCursorOnTopOf(a,d,b,c,e)},"JM.Atom,~N,~N,~N,JM.Atom");c(b,"getModel",function(){return this.chain.model});c(b,"getSelectedMonomerCount",function(){return 0});c(b,"getSelectedMonomerIndex",function(){return-1});c(b,"isLeadAtom",function(){return!1},"~N");c(b,"getLeadAtomOr",function(a){var d=this.getLeadAtom();return null==d?a:d},"JM.Atom");c(b,"getLeadAtom",function(){return null});c(b,"getQuaternion",function(){return null},
"~S");c(b,"getQuaternionFrame",function(a){if(3>this.lastAtomIndex-this.firstAtomIndex)return null;var d=this.firstAtomIndex;return JU.Quat.getQuaternionFrame(a[d],a[++d],a[++d])},"~A");c(b,"setStrucNo",function(){},"~N");c(b,"getHelixData",function(a){return JU.Escape.escapeHelical(null,a,null,null,null)},"~N,~S,~N");c(b,"isWithinStructure",function(){return!1},"J.c.STR");c(b,"getProteinStructureTag",function(){return null});c(b,"getStructureId",function(){return""});c(b,"getBioPolymerIndexInModel",
function(){return-1});c(b,"isCrossLinked",function(){return!1},"JM.Group");c(b,"getCrossLinkVector",function(){return!1},"JU.Lst,~B,~B");c(b,"getNitrogenAtom",function(){return null});c(b,"getCarbonylOxygenAtom",function(){return null});c(b,"fixIndices",function(a,d){this.firstAtomIndex-=a;this.leadAtomIndex-=a;this.lastAtomIndex-=a;null!=this.bsAdded&&JU.BSUtil.deleteBits(this.bsAdded,d)},"~N,JU.BS");c(b,"getGroupInfo",function(a,d){var b=new java.util.Hashtable;b.put("groupIndex",Integer.$valueOf(a));
b.put("groupID",Short.$valueOf(this.groupID));var c=this.getSeqcodeString();null!=c&&b.put("seqCode",c);b.put("_apt1",Integer.$valueOf(this.firstAtomIndex));b.put("_apt2",Integer.$valueOf(this.lastAtomIndex));null!=this.bsAdded&&b.put("addedAtoms",this.bsAdded);b.put("atomInfo1",this.chain.model.ms.getAtomInfo(this.firstAtomIndex,null,d));b.put("atomInfo2",this.chain.model.ms.getAtomInfo(this.lastAtomIndex,null,d));b.put("visibilityFlags",Integer.$valueOf(this.shapeVisibilityFlags));return b},"~N,JU.P3");
c(b,"getMinZ",function(a,d){d[0]=2147483647;for(var b=this.firstAtomIndex;b<=this.lastAtomIndex;b++)this.checkMinZ(a[b],d);if(null!=this.bsAdded)for(b=this.bsAdded.nextSetBit(0);0<=b;b=this.bsAdded.nextSetBit(b+1))this.checkMinZ(a[b],d)},"~A,~A");c(b,"checkMinZ",function(a,d){var b=a.sZ-v(a.sD/2)-2;b<d[0]&&(d[0]=Math.max(1,b))},"JM.Atom,~A");c(b,"getGroupParameter",function(){return NaN},"~N");c(b,"getAtomIndex",function(){return-1},"~S,~N");c(b,"getBSSideChain",function(){return new JU.BS});g(b,
"toString",function(){return"["+this.getGroup3()+"-"+this.getSeqcodeString()+"]"});c(b,"isNucleicMonomer",function(){return!1});c(b,"unsetStrutPoint",function(){null==this.strutPoint&&(this.strutPoint=new JU.Point3fi);this.strutPoint.sX=-2147483648});b.standardGroupList=null;b.group3Names=Array(128);b.specialAtomNames=null});n("JM");z(["JM.Bond"],"JM.HBond",["JU.Logger"],function(){var b=w(function(){this.energy=0;q(this,arguments)},JM,"HBond",JM.Bond);x(b,function(a,d,b,c,e,f){I(this,JM.HBond,[a,
d,b,c,e]);this.energy=f;JU.Logger.debugging&&JU.Logger.debug("HBond energy = "+f+" #"+this.getIdentity())},"JM.Atom,JM.Atom,~N,~N,~N,~N");g(b,"getEnergy",function(){return this.energy});b.calcEnergy=c(b,"calcEnergy",function(a,d,b,c){return Math.round(-27888/a- -27888/c+-27888/b- -27888/d)},"~N,~N,~N,~N")});n("JM");z(null,"JM.LabelToken","java.util.Hashtable JU.AU $.PT $.SB JS.SV $.T JU.Edge JV.JC".split(" "),function(){var b=w(function(){this.data=this.key=this.text=null;this.tok=0;this.pt=-1;this.ch1=
"\x00";this.width=0;this.precision=2147483647;this.intAsFloat=this.zeroPad=this.alignLeft=!1;q(this,arguments)},JM,"LabelToken",null);c(b,"set",function(a,d){this.text=a;this.pt=d;return this},"~S,~N");b.isLabelPropertyTok=c(b,"isLabelPropertyTok",function(a){for(var d=JM.LabelToken.labelTokenIds.length;0<=--d;)if(JM.LabelToken.labelTokenIds[d]==a)return!0;return!1},"~N");b.compile=c(b,"compile",function(a,d,b,c){if(null==d||0==d.length)return null;if(0>d.indexOf("%")||2>d.length)return u(-1,[(new JM.LabelToken).set(d,
-1)]);for(var e=0,f=-1,j=d.length;++f<j&&0<=(f=d.indexOf("%",f));)e++;for(var e=Array(2*e+1),k,g=0,f=0;0<=(k=d.indexOf("%",f));)f!=k&&(e[g++]=(new JM.LabelToken).set(d.substring(f,k),-1)),f=e[g++]=(new JM.LabelToken).set(null,k),a.autoCalculate(f.tok,null),f=JM.LabelToken.setToken(a,d,f,j,b.charCodeAt(0),c);f<j&&(e[g++]=(new JM.LabelToken).set(d.substring(f),-1));return e},"JV.Viewer,~S,~S,java.util.Map");c(b,"formatLabel",function(a,d,b,c){return null==b||0==b.length?null:JM.LabelToken.formatLabelAtomArray(a,
d,JM.LabelToken.compile(a,b,"\x00",null),"\x00",null,c)},"JV.Viewer,JM.Atom,~S,JU.P3");b.formatLabelAtomArray=c(b,"formatLabelAtomArray",function(a,d,b,c,e,f){if(null==d)return null;var j="0"<c?null:new JU.SB;if(null!=b)for(var k=0;k<b.length;k++){var g=b[k];if(null==g)break;"0"<c&&g.ch1!=c||(0>=g.tok||null!=g.key?null!=j&&(j.append(g.text),"\x00"!=g.ch1&&j.appendC(g.ch1)):JM.LabelToken.appendAtomTokenValue(a,d,g,j,e,f))}return null==j?null:j.toString().intern()},"JV.Viewer,JM.Atom,~A,~S,~A,JU.P3");
b.getBondLabelValues=c(b,"getBondLabelValues",function(){var a=new java.util.Hashtable;a.put("#","");a.put("ORDER","");a.put("TYPE","");a.put("LENGTH",Float.$valueOf(0));a.put("ENERGY",Float.$valueOf(0));return a});b.formatLabelBond=c(b,"formatLabelBond",function(a,d,b,c,e,f){c.put("#",""+(d.index+1));c.put("ORDER",""+JU.Edge.getBondOrderNumberFromOrder(d.order));c.put("TYPE",JU.Edge.getBondOrderNameFromOrder(d.order));c.put("LENGTH",Float.$valueOf(d.atom1.distance(d.atom2)));c.put("ENERGY",Float.$valueOf(d.getEnergy()));
JM.LabelToken.setValues(b,c);JM.LabelToken.formatLabelAtomArray(a,d.atom1,b,"1",e,f);JM.LabelToken.formatLabelAtomArray(a,d.atom2,b,"2",e,f);return JM.LabelToken.getLabel(b)},"JV.Viewer,JM.Bond,~A,java.util.Map,~A,JU.P3");b.formatLabelMeasure=c(b,"formatLabelMeasure",function(a,d,b,c,e){var f=new java.util.Hashtable;f.put("#",""+(d.index+1));f.put("VALUE",Float.$valueOf(c));f.put("UNITS",e);b=JM.LabelToken.compile(a,b,"\u0001",f);if(null==b)return"";JM.LabelToken.setValues(b,f);f=d.ms.at;d=d.countPlusIndices;
for(c=d[0];1<=c;--c)0<=d[c]&&JM.LabelToken.formatLabelAtomArray(a,f[d[c]],b,String.fromCharCode(48+c),null,null);b=JM.LabelToken.getLabel(b);return null==b?"":b},"JV.Viewer,JM.Measurement,~S,~N,~S");b.setValues=c(b,"setValues",function(a,d){for(var b=0;b<a.length;b++){var c=a[b];if(null==c)break;if(null!=c.key){var e=d.get(c.key);c.text=C(e,Float)?c.format(e.floatValue(),null,null):c.format(NaN,e,null)}}},"~A,java.util.Map");b.getLabel=c(b,"getLabel",function(a){for(var d=new JU.SB,b=0;b<a.length;b++){var c=
a[b];if(null==c)break;d.append(c.text)}return d.toString()},"~A");b.setToken=c(b,"setToken",function(a,d,b,c,e,f){var j=b.pt+1;if(j>=c)return b.text="%",j;var k;"-"==d.charAt(j)&&(b.alignLeft=!0,++j);j<c&&"0"==d.charAt(j)&&(b.zeroPad=!0,++j);for(;j<c&&JU.PT.isDigit(k=d.charAt(j));)b.width=10*b.width+(k.charCodeAt(0)-48),++j;b.precision=2147483647;var g=!1;if(j<c&&"."==d.charAt(j)){++j;if(j<c&&"-"==(k=d.charAt(j)))g=!0,++j;if(j<c&&JU.PT.isDigit(k=d.charAt(j))){++j;b.precision=k.charCodeAt(0)-48;if(j<
c&&JU.PT.isDigit(k=d.charAt(j)))++j,b.precision=10*b.precision+(k.charCodeAt(0)-48);g&&(b.precision=-1-b.precision)}}if(j<c&&null!=f){var s;for(f=f.keySet().iterator();f.hasNext()&&((s=f.next())||1);)if(d.indexOf(s,j)==j)return j+(b.key=s).length}if(j<c)switch((k=d.charAt(j++)).charCodeAt(0)){case 37:return b.text="%",j;case 91:s=d.indexOf("]",j);if(s<j){j=c;break}j=d.substring(j,s).toLowerCase();j.startsWith("property_")?(b.tok=134221834,b.data=a.getDataObj(j,null,1)):j.startsWith("validation.")?
(b.tok=1073742189,b.data=a.getDataObj("property_"+j.substring(11),null,1)):j.startsWith("unitid")?(b.tok=1073741974,b.data=Integer.$valueOf(JV.JC.getUnitIDFlags(j.substring(6)))):(a=JS.T.getTokenFromName(j),null!=a&&JM.LabelToken.isLabelPropertyTok(a.tok)&&(b.tok=a.tok));j=s+1;break;case 123:s=d.indexOf("}",j);if(s<j){j=c;break}j=d.substring(j,s);b.data=a.getDataObj(j,null,1);null==b.data?(b.data=a.getDataObj(j,null,-1),null!=b.data&&(b.data=b.data[1],"string"==typeof b.data&&(b.data=JU.PT.split(b.data,
"\n")),JU.AU.isAS(b.data)||(b.data=null)),null==b.data?(b.tok=1715472409,b.data=j):b.tok=1275068418):b.tok=134221834;j=s+1;break;default:var m,p;if(j<c&&0<=(m="fuv".indexOf(k))&&0<=(p="xyz".indexOf(d.charAt(j))))b.tok=JM.LabelToken.twoCharLabelTokenIds[3*m+p],j++;else if(0<=(m="AaBbCcDEefGgIiLlMmNnOoPpQqRrSsTtUuVvWwXxxYyyZzz%%%gqW".indexOf(k)))b.tok=JM.LabelToken.labelTokenIds[m]}b.text=d.substring(b.pt,j);if(j<c&&0!=e&&JU.PT.isDigit(k=d.charAt(j)))j++,b.ch1=k,k.charCodeAt(0)!=e&&1!=e&&(b.tok=0);
return j},"JV.Viewer,~S,JM.LabelToken,~N,~N,java.util.Map");b.appendAtomTokenValue=c(b,"appendAtomTokenValue",function(a,d,b,c,e,f){var j=null,k=NaN,g=null;try{switch(b.tok){case 1153433601:j=d.atomPropertyString(a,1153433601);break;case 1094713347:j=""+(null==e?d.i:e[d.i]);break;case 1765808134:g=d.atomPropertyTuple(a,b.tok,f);break;case 1073741974:j=d.getUnitID(b.data.intValue());break;case 134221834:case 1073742189:if(null!=b.data&&(k=b.data[d.i],1073742189==b.tok&&1!=k&&0!=k)){var s=a.getAtomValidation(b.text.substring(13,
b.text.length-1),d);if(null==s)System.out.println("?? o is null ??");else if(1==s.size())k=s.get(0).floatValue();else{k=NaN;j="";a=0;for(var m=s.size();a<m;a++)j+=","+s.get(a);1<j.length&&(j=j.substring(1))}}break;case 1715472409:var p=a.ms.getInfo(d.mi,b.data),y=d.i-a.ms.am[d.mi].firstAtomIndex,s=null;if(0<=y)if(C(p,Array))var A=p,s=y<A.length?A[y]:null;else C(p,"JU.Lst")&&(s=y<p.size()?JS.SV.oValue(p.get(y)):null);null==s?j="":C(s,Float)?k=s.floatValue():C(s,Integer)?k=s.intValue():C(s,"JU.T3")?
g=s:j=s.toString();break;case 1275068418:null!=b.data&&(A=b.data,j=d.i<A.length?A[d.i]:"");break;case 1631586315:var n=d.getFormalCharge(),j=0<n?""+n+"+":0>n?""+-n+"-":"";break;case 1094717454:j=d.getModelNumberForLabel();break;case 1128269825:j=""+d.atomPropertyInt(b.tok);break;case 1665140738:k=d.atomPropertyFloat(a,b.tok,f);break;case 1086324749:j=d.group.getStructureId();break;case 1094713367:var q=d.group.getStrucNo(),j=0>=q?"":""+q;break;case 1111490574:if(Float.isNaN(k=d.group.getGroupParameter(1111490574)))j=
"null";break;case 1111492626:case 1111492627:case 1111492628:case 1111490583:case 1111490584:case 1111490585:case 1111490586:k=d.atomPropertyFloat(a,b.tok,f);Float.isNaN(k)&&(j="");break;case 1073877011:j=a.getNBOAtomLabel(d);break;case 1086324747:case 1639976963:case 1237320707:j=d.atomPropertyString(a,b.tok);break;case 1140850705:j=d.getIdentityXYZ(f,1);break;case 1086324754:j=d.getWyckoffPosition(!1);break;case 1086324755:j=d.getWyckoffPosition(!0);break;case 79:j=d.getSymmetryOperatorList(!1);
break;case 81:k=d.getOccupancy100()/100;break;default:switch(b.tok&1136656384){case 1094713344:b.intAsFloat?k=d.atomPropertyInt(b.tok):j=""+d.atomPropertyInt(b.tok);break;case 1111490560:k=d.atomPropertyFloat(a,b.tok,f);break;case 1086324736:j=d.atomPropertyString(a,b.tok);break;case 1077936128:g=d.atomPropertyTuple(a,b.tok,f);null==g&&(j="");break;default:1145045003==b.tok&&(j=d.atomPropertyString(a,1145045003))}}}catch(u){if(D(u,"IndexOutOfBoundsException"))k=NaN,g=j=null;else throw u;}j=b.format(k,
j,g);null==c?b.text=j:c.append(j)},"JV.Viewer,JM.Atom,JM.LabelToken,JU.SB,~A,JU.P3");c(b,"format",function(a,d,b){return Float.isNaN(a)?null!=d?JU.PT.formatS(d,this.width,this.precision,this.alignLeft,this.zeroPad):null!=b?(0==this.width&&2147483647==this.precision&&(this.width=6,this.precision=2),JU.PT.formatF(b.x,this.width,this.precision,!1,!1)+JU.PT.formatF(b.y,this.width,this.precision,!1,!1)+JU.PT.formatF(b.z,this.width,this.precision,!1,!1)):this.text:JU.PT.formatF(a,this.width,this.precision,
this.alignLeft,this.zeroPad)},"~N,~S,JU.T3");b.labelTokenIds=E(-1,[1086324739,1086326786,1086326785,1111492620,1631586315,1086326788,1094713347,1086324746,1086326789,1111490569,1094713357,1094713361,1111492618,1094715393,1094713363,1094715402,1094717454,1086324743,1094713360,1086324742,79,1088421903,1111492619,1111490570,81,1128269825,1094715412,1086324747,1094713366,1086326788,1111490574,1111492620,1086324745,1111490575,1648363544,1145047055,1140850705,1086324755,1111492612,1111492609,1111492629,
1111492613,1111492610,1111492630,1111492614,1111492611,1111492631,1114249217,1112152066,1112150019,1112150020,1112150021,1112152070,1112152071,1112152073,1112152074,1112152076,1649022989,1112152078,1111490561,1111490562,1153433601,1094713346,1228931586,1765808134,1094713356,1111490564,1228935687,1287653388,1825200146,1111490567,1094713359,1111490565,1111490568,1094713362,1715472409,1665140738,1113589787,1086324748,1086324744,1112152075,1639976963,1237320707,1094713367,1086324749,1086326798,1111490576,
1111490577,1111490578,1111490579,1094715418,1648361473,1111492626,1111492627,1111492628,1312817669,1145045006,1145047050,1145047049,1145047053,1111492615,1111492616,1111492617,1113589786,1111490571,1111490572,1111490573,1145047052,1111490566,1111490563,1094713351,1094713365,1111490583,1111490584,1111490585,1111490586,1145045008,1296041985,1073877011,1086324752,1086324753,1086324754,1145045003,1095241729]);b.twoCharLabelTokenIds=E(-1,[1111492612,1111492613,1111492614,1111490577,1111490578,1111490579,
1111492626,1111492627,1111492628])});n("JM");z(null,"JM.Measurement","JU.Measure $.PT $.SB J.atomdata.RadiusData J.c.VDW JM.LabelToken JU.Escape".split(" "),function(){var b=w(function(){this.thisID=this.ms=null;this.index=0;this.isVisible=!0;this.isTrajectory=this.isHidden=!1;this.$isValid=!0;this.colix=0;this.labelColix=-1;this.mad=0;this.tickInfo=null;this.traceX=-2147483648;this.count=this.traceY=0;this.pts=this.countPlusIndices=null;this.value=0;this.type=this.strMeasurement=this.vwr=this.text=
this.units=this.strFormat=this.property=null;this.tainted=!1;this.newUnits=this.renderArc=this.renderAxis=null;this.fixedValue=NaN;this.useDefaultLabel=this.inFront=this.isPending=!1;q(this,arguments)},JM,"Measurement",null);N(b,function(){this.countPlusIndices=E(5,0)});c(b,"isTainted",function(){return this.tainted&&!(this.tainted=!1)});c(b,"setM",function(a,d,b,c,e,f){this.ms=a;this.index=f;this.vwr=a.vwr;this.colix=c;this.strFormat=e;null!=d&&(this.tickInfo=d.tickInfo,this.pts=d.pts,this.mad=d.mad,
this.thisID=d.thisID,this.text=d.text,this.property=d.property,this.units=d.units,null==this.property&&"+hz".equals(this.units)&&(this.property="property_J"),null!=this.thisID&&null!=this.text&&(this.labelColix=this.text.colix));null==this.pts&&(this.pts=Array(4));d=null==d?null:d.countPlusIndices;this.count=null==d?0:d[0];0<this.count&&(System.arraycopy(d,0,this.countPlusIndices,0,this.count+1),this.isTrajectory=a.isTrajectoryMeasurement(this.countPlusIndices));this.value=(this.isPending=Float.isNaN(b))||
this.isTrajectory?this.getMeasurement(null):b;this.formatMeasurement(null);return this},"JM.ModelSet,JM.Measurement,~N,~N,~S,~N");c(b,"setPoints",function(a,d,b,c){this.ms=a;this.countPlusIndices=d;this.count=d[0];this.pts=null==b?Array(4):b;this.vwr=a.vwr;this.tickInfo=c;return this},"JM.ModelSet,~A,~A,JM.TickInfo");c(b,"setCount",function(a){this.setCountM(a)},"~N");c(b,"setCountM",function(a){this.count=this.countPlusIndices[0]=a},"~N");c(b,"getAtomIndex",function(a){return 0<a&&a<=this.count?
this.countPlusIndices[a]:-1},"~N");c(b,"getAtom",function(a){a=this.countPlusIndices[a];return-1>a?this.pts[-2-a]:this.ms.at[a]},"~N");c(b,"getLastIndex",function(){return 0<this.count?this.countPlusIndices[this.count]:-1});c(b,"getString",function(){return this.strMeasurement});g(b,"toString",function(){return this.getString()});c(b,"getStringUsing",function(a,d,b){this.vwr=a;this.value=this.getMeasurement(null);this.formatMeasurementAs(d,b,!0);return null==d?this.getInfoAsString(b):this.strMeasurement},
"JV.Viewer,~S,~S");c(b,"getStringDetail",function(){return(2==this.count?"Distance":3==this.count?"Angle":"Torsion")+this.getMeasurementScript(" - ",!1)+" : "+this.value});c(b,"refresh",function(a){this.value=this.getMeasurement(a);this.isTrajectory=this.ms.isTrajectoryMeasurement(this.countPlusIndices);this.formatMeasurement(null)},"~A");c(b,"getMeasurementScript",function(a,d){for(var b=new JU.SB,c=a.equals(" "),e=1;e<=this.count;e++)b.append(1<e?a:" ").append(this.getLabel(e,c,d));return b.toString()},
"~S,~B");c(b,"formatMeasurementAs",function(a,d,b){null!=a&&0==a.length&&(a=null);if(b||!(null!=a&&0!=a.indexOf(this.countPlusIndices[0]+":")))this.strFormat=a,this.formatMeasurement(d)},"~S,~S,~B");c(b,"formatMeasurement",function(a){this.tainted=!0;switch(Float.isNaN(this.value)?0:this.count){default:this.strMeasurement=null;break;case 2:this.strMeasurement=this.formatDistance(a);break;case 3:case 4:this.strMeasurement=this.formatAngle(this.value)}},"~S");c(b,"reformatDistanceIfSelected",function(a){if(2==
this.count&&this.vwr.slm.isSelected(this.countPlusIndices[1])&&this.vwr.slm.isSelected(this.countPlusIndices[2])){var d;if(this.useDefaultLabel&&null!=this.strFormat&&0<=(d=this.strFormat.indexOf("//")))this.strFormat=this.strFormat.substring(0,d);a&&(this.units=null);this.formatMeasurement(null)}},"~B");c(b,"formatDistance",function(a){var d=this.getLabelString();if(null==d)return"";var b=this.strFormat.indexOf("//");null==a&&(a=this.units,null==a&&(a=0<=b?this.strFormat.substring(b+2):null==this.property?
this.vwr.g.measureDistanceUnits:""));0<=b&&(this.strFormat=this.strFormat.substring(0,b));this.strFormat+="//"+a;a=JM.Measurement.fixUnits(a);b=d.indexOf("//");0<=b&&(d=d.substring(0,b),0==d.length&&(d="%VALUE"));a=this.fixValue(a,0<=d.indexOf("%V"));return this.formatString(a,this.newUnits,d)},"~S");c(b,"fixValue",function(a,d){this.checkJ(a);null!=a&&a.startsWith("+")&&(this.isPending||(this.value=Math.abs(this.value)),a=a.substring(1));this.newUnits=a;if(2!=this.count)return this.value;var b=this.value;
null==a&&null!=this.property&&(a="");if(null!=a){var c=a.equals("%");if(null==this.property&&(c||a.endsWith("hz"))){var e=this.getAtomIndex(1),f=this.getAtomIndex(2);if(0<=e&&0<=f){var e=this.getAtom(1),f=this.getAtom(2),j=JM.Measurement.nmrType(a),k=!c&&1==j;this.type=c?"percent":k?"dipoleCouplingConstant":3==j?"NOE or 3JHH":"J-CouplingConstant";3==j?(e=this.vwr.getNMRCalculation().getNOEorJHH(u(-1,[e,null,null,f]),11),null==e?(b=NaN,this.newUnits=a=""):(b=e[1],a=this.newUnits=2==e.length?"noe":
"hz")):b=c?b/(e.getVanderwaalsRadiusFloat(this.vwr,J.c.VDW.AUTO)+f.getVanderwaalsRadiusFloat(this.vwr,J.c.VDW.AUTO)):k?this.vwr.getNMRCalculation().getDipolarConstantHz(e,f):this.vwr.getNMRCalculation().getIsoOrAnisoHz(!0,e,f,a,null);this.$isValid=!Float.isNaN(b);c&&(a="pm")}}return JM.Measurement.toUnits(b,a,d)}return d?Math.round(100*b)/100:b},"~S,~B");c(b,"checkJ",function(a){null!=this.property||(null!=a||null!=this.units)||(a=this.vwr.g.measureDistanceUnits,"+hz".equals(a)&&(this.property="property_J",
this.units=a))},"~S");b.nmrType=c(b,"nmrType",function(a){return 0>a.indexOf("hz")?0:a.equals("noe_hz")?3:a.startsWith("dc_")||a.equals("khz")?1:2},"~S");c(b,"formatAngle",function(a){var d=this.getLabelString();0<=d.indexOf("%V")&&(a=Math.round(10*a)/10);return this.formatString(a,"\u00b0",d)},"~N");c(b,"getLabelString",function(){var a=this.countPlusIndices[0]+":",d=null;if(null!=this.strFormat){if(0==this.strFormat.length)return null;d=2<this.strFormat.length&&0==this.strFormat.indexOf(a)?this.strFormat:
null}this.useDefaultLabel=!1;null==d&&(this.strFormat=null,d=this.vwr.getDefaultMeasurementLabel(this.countPlusIndices[0]),this.useDefaultLabel=null==this.units);0==d.indexOf(a)&&(d=d.substring(2));null==this.strFormat&&(this.strFormat=a+d);return d});c(b,"formatString",function(a,d,b){return JM.LabelToken.formatLabelMeasure(this.vwr,this,b,a,d)},"~N,~S,~S");c(b,"sameAsPoints",function(a,d){if(this.count!=a[0])return!1;for(var b=!0,c=1;c<=this.count&&b;c++)b=this.countPlusIndices[c]==a[c];if(b)for(c=
0;c<this.count&&b;c++)null!=d[c]&&(b=0.01>this.pts[c].distance(d[c]));if(b)return!0;switch(this.count){default:return!0;case 2:return this.sameAsIJ(a,d,1,2)&&this.sameAsIJ(a,d,2,1);case 3:return this.sameAsIJ(a,d,1,3)&&this.sameAsIJ(a,d,2,2)&&this.sameAsIJ(a,d,3,1);case 4:return this.sameAsIJ(a,d,1,4)&&this.sameAsIJ(a,d,2,3)&&this.sameAsIJ(a,d,3,2)&&this.sameAsIJ(a,d,4,1)}},"~A,~A");c(b,"sameAsIJ",function(a,d,b,c){b=this.countPlusIndices[b];a=a[c];return 0<=b||0<=a?b==a:0.01>this.pts[-2-b].distance(d[-2-
a])},"~A,~A,~N,~N");c(b,"sameAs",function(a,d){return this.sameAsIJ(this.countPlusIndices,this.pts,a,d)},"~N,~N");c(b,"getPropMeasurement",function(a){if(null==this.countPlusIndices||2!=this.count)return NaN;for(var d=this.count;0<=--d;)if(0>this.countPlusIndices[d+1])return NaN;try{var b=null==a?this.getAtom(1):a[0],c=null==a?this.getAtom(2):a[1],e=this.vwr.getDataObj(this.property,null,2),f=b.i,j=c.i;return null==e||j>=e.length||f>=e.length?NaN:e[f][j]}catch(k){return NaN}},"~A");c(b,"getMeasurement",
function(a){this.checkJ(null);if(!Float.isNaN(this.fixedValue))return this.fixedValue;if(null!=this.property)return this.getPropMeasurement(a);if(null==this.countPlusIndices||2>this.count)return NaN;for(var d=this.count;0<=--d;)if(-1==this.countPlusIndices[d+1])return NaN;var d=null==a?this.getAtom(1):a[0],b=null==a?this.getAtom(2):a[1],c;switch(this.count){case 2:return d.distance(b);case 3:return c=null==a?this.getAtom(3):a[2],JU.Measure.computeAngleABC(d,b,c,!0);case 4:return c=null==a?this.getAtom(3):
a[2],a=null==a?this.getAtom(4):a[3],JU.Measure.computeTorsion(d,b,c,a,!0);default:return NaN}},"~A");c(b,"getLabel",function(a,d,b){var c=this.countPlusIndices[a];return 0>c?(b?"modelIndex "+this.getAtom(a).mi+" ":"")+JU.Escape.eP(this.getAtom(a)):d?"({"+c+"})":this.vwr.getAtomInfo(c)},"~N,~B,~B");c(b,"setModelIndex",function(a){if(null!=this.pts)for(var d=0;d<this.count;d++)null!=this.pts[d]&&(this.pts[d].mi=a)},"~N");c(b,"isValid",function(){return!(this.sameAs(1,2)||2<this.count&&this.sameAs(1,
3)||4==this.count&&this.sameAs(2,4))});b.find=c(b,"find",function(a,d){for(var b=d.countPlusIndices,c=d.pts,e=a.size();0<=--e;)if(a.get(e).sameAsPoints(b,c))return e;return-1},"JU.Lst,JM.Measurement");c(b,"isConnected",function(a,d){for(var b=-1,c=1;c<=d;c++){var e=this.getAtomIndex(c);if(!(0>e)){if(0<=b&&!a[e].isBonded(a[b]))return!1;b=e}}return!0},"~A,~N");c(b,"getInfoAsString",function(a){var d=this.fixValue(a,!0);a=new JU.SB;a.append(2==this.count?null!=this.property?this.property:null==this.type?
"distance":this.type:3==this.count?"angle":"dihedral");a.append(" \t").appendF(d);a.append(" \t").append(JU.PT.esc(this.strMeasurement));for(d=1;d<=this.count;d++)a.append(" \t").append(this.getLabel(d,!1,!1));null!=this.thisID&&a.append(" \t").append(this.thisID);return a.toString()},"~S");c(b,"isInRange",function(a,d){if(a.factorType===J.atomdata.RadiusData.EnumType.FACTOR){var b=this.getAtom(1),c=this.getAtom(2),b=(b.getVanderwaalsRadiusFloat(this.vwr,a.vdwType)+c.getVanderwaalsRadiusFloat(this.vwr,
a.vdwType))*a.value;return d<=b}return 3.4028235E38==a.values[0]||d>=a.values[0]&&d<=a.values[1]},"J.atomdata.RadiusData,~N");c(b,"isIntramolecular",function(a,d){for(var b=-1,c=1;c<=d;c++){var e=this.getAtomIndex(c);if(!(0>e))if(e=a[e].getMoleculeNumber(!1),0>b)b=e;else if(e!=b)return!1}return!0},"~A,~N");c(b,"isMin",function(a){var d=this.getAtom(1),b=this.getAtom(2),c=F(100*b.distanceSquared(d)),d=d.getAtomName(),b=b.getAtomName(),b=0>d.compareTo(b)?d+b:b+d;a=a.get(b);return null!=a&&c==a.intValue()},
"java.util.Map");b.isUnits=c(b,"isUnits",function(a){return JU.PT.isOneOf((a.startsWith("+")?a.substring(1):a).toLowerCase(),";nm;nanometers;pm;picometers;angstroms;angstroms;ang;\u00c5;au;vanderwaals;vdw;%;noe;")||0>a.indexOf(" ")&&a.endsWith("hz")},"~S");b.toUnits=c(b,"toUnits",function(a,d,b){return Float.isNaN(a)?NaN:d.equals("hz")?b?Math.round(10*a)/10:a:d.equals("nm")?b?Math.round(100*a)/1E3:a/10:d.equals("pm")?b?Math.round(1E3*a)/10:100*a:d.equals("au")?b?Math.round(1E3*(a/0.5291772))/1E3:
a/0.5291772:d.endsWith("khz")?b?Math.round(a/10)/100:a/1E3:b?Math.round(100*a)/100:a},"~N,~S,~B");b.fromUnits=c(b,"fromUnits",function(a,d){return d.equals("nm")?10*a:d.equals("pm")?a/100:d.equals("au")?0.5291772*a:d.equals("\u00c5")?a:0},"~N,~S");b.fixUnits=c(b,"fixUnits",function(a){var d=a.endsWith("s")?a.substring(0,a.length-1):a;return d.equals("nanometer")?"nm":d.equals("bohr")||d.equals("atomicunits")||d.equals("atomic")?"au":d.equals("picometer")?"pm":d.equals("\u00e5")||d.equals("angstrom")||
d.equals("a")||d.equals("ang")?"\u00c5":d.equals("vanderwaal")||d.equals("vdw")?"%":a},"~S");c(b,"getDistanceFormatForState",function(){return this.useDefaultLabel?null:this.strFormat});c(b,"setFromMD",function(a){null!=a.thisID&&(this.thisID=a.thisID,this.mad=a.mad,0!=a.colix&&(this.colix=a.colix),this.strFormat=a.strFormat,this.text=a.text);this.units="default".equals(a.units)?null:a.units;this.property=a.property;this.fixedValue=a.fixedValue;0!=a.colix&&(this.colix=a.colix);0!=a.mad&&(this.mad=
a.mad);null!=a.strFormat&&(this.strFormat=(null==this.strFormat?a.strFormat:this.strFormat.substring(0,2))+a.strFormat.substring(2));null!=a.text&&(null==this.text?this.text=a.text:(null!=a.text.font&&(this.text.setFont(a.text.font,!1),this.text.fontScale=a.text.font.fontSize/a.text.font.fontSizeNominal),this.text.text=null,0!=a.text.align&&(this.text.align=a.text.align),0!=a.colix&&(this.labelColix=this.text.colix=a.text.colix)));this.formatMeasurement(null)},"JM.MeasurementData,~B")});n("JM");z(["J.api.JmolMeasurementClient"],
"JM.MeasurementData",["JU.Lst","JM.Measurement"],function(){var b=w(function(){this.points=this.measurements=this.measurementStrings=this.bsSelected=this.client=null;this.mustNotBeConnected=this.mustBeConnected=!1;this.tickInfo=null;this.tokAction=12290;this.note=this.property=this.strFormat=this.radiusData=null;this.isAll=!1;this.colix=0;this.intramolecular=null;this.mad=0;this.units=this.text=this.thisID=null;this.fixedValue=0;this.ms=this.minArray=this.atoms=null;this.allowSelf=!1;this.vwr=null;
this.iFirstAtom=0;this.justOneModel=!0;this.htMin=null;q(this,arguments)},JM,"MeasurementData",null,J.api.JmolMeasurementClient);c(b,"init",function(a,d,b){this.vwr=d;this.points=b;this.thisID=a;return this},"~S,JV.Viewer,JU.Lst");c(b,"setModelSet",function(a){this.ms=a;return this},"JM.ModelSet");c(b,"set",function(a,d,b,c,e,f,j,k,g,s,m,p,y,A,n,q){this.ms=this.vwr.ms;this.tokAction=a;2<=this.points.size()&&(C(this.points.get(0),"JU.BS")&&C(this.points.get(1),"JU.BS"))&&(this.justOneModel=this.vwr.ms.getModelBS(this.points.get(0),
!1).equals(this.vwr.ms.getModelBS(this.points.get(1),!1)));this.bsSelected=q;this.htMin=d;this.radiusData=b;this.property=c;this.strFormat=e;this.units=f;this.tickInfo=j;this.mustBeConnected=k;this.mustNotBeConnected=g;this.intramolecular=s;this.isAll=m;this.mad=p;this.colix=y;this.text=A;this.fixedValue=n;return this},"~N,java.util.Map,J.atomdata.RadiusData,~S,~S,~S,JM.TickInfo,~B,~B,Boolean,~B,~N,~N,JM.Text,~N,JU.BS");c(b,"processNextMeasure",function(a,d){var b=d.getMeasurement(null);if(!(null!=
this.htMin&&!d.isMin(this.htMin)||null!=this.radiusData&&!d.isInRange(this.radiusData,b)))if(null==this.measurementStrings&&null==this.measurements){var c=this.minArray[this.iFirstAtom];d.value=b;b=d.fixValue(this.units,!1);this.minArray[this.iFirstAtom]=-Infinity==1/c?b:Math.min(c,b)}else null!=this.measurementStrings?this.measurementStrings.addLast(d.getStringUsing(this.vwr,this.strFormat,this.units)):this.measurements.addLast(Float.$valueOf(d.getMeasurement(null)))},"JM.MeasurementData,JM.Measurement");
c(b,"getMeasurements",function(a,d){if(d){this.minArray=L(this.points.get(0).cardinality(),0);for(var b=0;b<this.minArray.length;b++)this.minArray[b]=-0;this.define(null,this.ms);return this.minArray}if(a)return this.allowSelf=!0,this.measurements=new JU.Lst,this.define(null,this.ms),this.measurements;this.measurementStrings=new JU.Lst;this.define(null,this.ms);return this.measurementStrings},"~B,~B");c(b,"define",function(a,d){this.client=null==a?this:a;this.atoms=d.at;var b=this.points.size();if(!(2>
b)){var c=-1,e=Array(4),f=E(5,0),j=(new JM.Measurement).setPoints(d,f,e,null);j.setCount(b);j.property=this.property;j.strFormat=this.strFormat;j.units=this.units;j.fixedValue=this.fixedValue;for(var k=-1,g=0;g<b;g++){var s=this.points.get(g);if(C(s,"JU.BS")){k=s.cardinality();if(0==k)return;1<k&&(c=0);k=g;0==g&&(this.iFirstAtom=0);f[g+1]=s.nextSetBit(0)}else e[g]=s,f[g+1]=-2-g}this.nextMeasure(0,k,j,c)}},"J.api.JmolMeasurementClient,JM.ModelSet");c(b,"nextMeasure",function(a,d,b,c){if(a>d)(this.allowSelf&&
!this.mustBeConnected&&!this.mustNotBeConnected||b.isValid())&&((!this.mustBeConnected||b.isConnected(this.atoms,a))&&(!this.mustNotBeConnected||!b.isConnected(this.atoms,a))&&(null==this.intramolecular||b.isIntramolecular(this.atoms,a)==this.intramolecular.booleanValue()))&&this.client.processNextMeasure(this,b);else{var e=this.points.get(a),f=b.countPlusIndices,j=0==a?2147483647:f[a];if(0>j)this.nextMeasure(a+1,d,b,c);else{for(var k=!1,g=e.nextSetBit(0),s=0;0<=g;g=e.nextSetBit(g+1),s++)if(g!=j||
this.allowSelf){var m=this.atoms[g].mi;if(0<=c&&this.justOneModel)if(0==a)c=m;else if(c!=m)continue;f[a+1]=g;0==a&&(this.iFirstAtom=s);k=!0;this.nextMeasure(a+1,d,b,c)}k||this.nextMeasure(a+1,d,b,c)}}},"~N,~N,JM.Measurement,~N")});n("JM");z(["JM.Measurement"],"JM.MeasurementPending",null,function(){var b=w(function(){this.haveModified=this.haveTarget=!1;this.numSet=0;this.lastIndex=-1;q(this,arguments)},JM,"MeasurementPending",JM.Measurement);c(b,"set",function(a){return this.setM(a,null,NaN,0,null,
0)},"JM.ModelSet");c(b,"checkPoint",function(a){for(var d=1;d<=this.numSet;d++)if(this.countPlusIndices[d]==-1-d&&0.01>this.pts[d-1].distance(a))return!1;return!0},"JU.Point3fi");c(b,"getIndexOf",function(a){for(var d=1;d<=this.numSet;d++)if(this.countPlusIndices[d]==a)return d;return 0},"~N");g(b,"setCount",function(a){this.setCountM(a);this.numSet=a},"~N");c(b,"addPoint",function(a,d,b){this.haveModified=a!=this.lastIndex;this.lastIndex=a;if(null==d){if(0<this.getIndexOf(a))return b&&(this.numSet=
this.count),this.count;this.haveTarget=0<=a;if(!this.haveTarget)return this.count=this.numSet;this.count=this.numSet+1;this.countPlusIndices[this.count]=a}else{if(!this.checkPoint(d))return b&&(this.numSet=this.count),this.count;a=this.numSet;this.haveModified=this.haveTarget=!0;this.count=this.numSet+1;this.pts[a]=d;this.countPlusIndices[this.count]=-2-a}this.countPlusIndices[0]=this.count;b&&(this.numSet=this.count);this.value=this.getMeasurement(null);this.strFormat=null;this.formatMeasurement(null);
return this.count},"~N,JU.Point3fi,~B")});n("JM");z(null,"JM.Model","java.util.Hashtable JU.AU $.BS $.SB JU.BSUtil JV.FileManager".split(" "),function(){var b=w(function(){this.mat4=this.ms=null;this.fileIndex=this.modelIndex=0;this.isModelKit=this.isPdbWithMultipleBonds=this.isBioModel=!1;this.translation=this.dataFrames=this.biosymmetry=this.properties=this.auxiliaryInfo=this.orientation=this.dssrCache=this.simpleCage=this.chains=null;this.dataSourceFrame=-1;this.loadState="";this.loadScript=null;
this.isTrajectory=this.isJmolDataFrame=this.structureTainted=this.hasRasmolHBonds=!1;this.act=this.insertionCount=this.altLocCount=this.trajectoryBaseIndex=0;this.bondCount=-1;this.chainCount=0;this.groupCount=-1;this.firstMoleculeIndex=this.firstAtomIndex=this.biosymmetryCount=this.moleculeCount=this.hydrogenCount=0;this.bsAtomsDeleted=this.bsAtoms=null;this.frameDelay=this.defaultRotationRadius=0;this.selectedTrajectory=-1;this.bsCheck=this.pdbID=this.jmolFrameType=this.jmolData=null;this.hasChirality=
!1;this.isOrderly=!0;this.bsAsymmetricUnit=null;q(this,arguments)},JM,"Model",null);x(b,function(){this.setupArrays()});c(b,"setupArrays",function(){this.chains=Array(8);this.loadScript=new JU.SB;this.bsAtoms=new JU.BS;this.bsAtomsDeleted=new JU.BS});c(b,"set",function(a,d,b,c,e,f){this.ms=a;this.dataSourceFrame=this.modelIndex=d;this.trajectoryBaseIndex=(this.isTrajectory=0<=b)?b:d;null==f&&(f=new java.util.Hashtable);this.auxiliaryInfo=f;a=f.get("biosymmetryCount");null!=a&&(this.biosymmetryCount=
a.intValue(),this.biosymmetry=f.get("biosymmetry"));a=f.get("fileName");null!=a&&f.put("fileName",JV.FileManager.stripTypePrefix(a));this.properties=e;null==c?this.jmolFrameType="modelSet":(this.jmolData=c,this.isJmolDataFrame=!0,f.put("jmolData",c),f.put("title",c),this.jmolFrameType=0<=c.indexOf("ramachandran")?"ramachandran":0<=c.indexOf("quaternion")?"quaternion":"data");return this},"JM.ModelSet,~N,~N,~S,java.util.Properties,java.util.Map");c(b,"getTrueAtomCount",function(){return JU.BSUtil.andNot(this.bsAtoms,
this.bsAtomsDeleted).cardinality()});c(b,"isContainedIn",function(a){null==this.bsCheck&&(this.bsCheck=new JU.BS);this.bsCheck.clearAll();this.bsCheck.or(a);a=JU.BSUtil.andNot(this.bsAtoms,this.bsAtomsDeleted);this.bsCheck.and(a);return this.bsCheck.equals(a)},"JU.BS");c(b,"resetBoundCount",function(){this.bondCount=-1});c(b,"getBondCount",function(){if(0<=this.bondCount)return this.bondCount;var a=this.ms.bo;this.bondCount=0;for(var d=this.ms.bondCount;0<=--d;)null!=a[d]&&a[d].atom1.mi==this.modelIndex&&
this.bondCount++;return this.bondCount});c(b,"getChainCount",function(a){if(1<this.chainCount&&!a)for(a=0;a<this.chainCount;a++)if(0==this.chains[a].chainID)return this.chainCount-1;return this.chainCount},"~B");c(b,"calcSelectedGroupsCount",function(a){for(var d=this.chainCount;0<=--d;)this.chains[d].calcSelectedGroupsCount(a)},"JU.BS");c(b,"getGroupCount",function(){if(0>this.groupCount){this.groupCount=0;for(var a=this.chainCount;0<=--a;)this.groupCount+=this.chains[a].groupCount}return this.groupCount});
c(b,"getChainAt",function(a){return a<this.chainCount?this.chains[a]:null},"~N");c(b,"getChain",function(a){for(var d=this.chainCount;0<=--d;){var b=this.chains[d];if(b.chainID==a)return b}return null},"~N");c(b,"resetDSSR",function(a){this.dssrCache=null;a&&this.auxiliaryInfo.remove("dssr")},"~B");c(b,"fixIndices",function(a,d,b){this.fixIndicesM(a,d,b)},"~N,~N,JU.BS");c(b,"fixIndicesM",function(a,d,b){this.dataSourceFrame>a&&this.dataSourceFrame--;this.trajectoryBaseIndex>a&&this.trajectoryBaseIndex--;
this.firstAtomIndex-=d;for(a=0;a<this.chainCount;a++)this.chains[a].fixIndices(d,b);JU.BSUtil.deleteBits(this.bsAtoms,b);JU.BSUtil.deleteBits(this.bsAtomsDeleted,b)},"~N,~N,JU.BS");c(b,"freeze",function(){this.freezeM();return!1});c(b,"freezeM",function(){for(var a=0;a<this.chainCount;a++)if(0==this.chains[a].groupCount){for(var d=a+1;d<this.chainCount;d++)this.chains[d-1]=this.chains[d];this.chainCount--}this.chains=JU.AU.arrayCopyObject(this.chains,this.chainCount);this.groupCount=-1;this.getGroupCount();
for(a=0;a<this.chainCount;++a)this.chains[a].groups=JU.AU.arrayCopyObject(this.chains[a].groups,this.chains[a].groupCount)});c(b,"setSimpleCage",function(a){null!=(this.simpleCage=a)&&this.auxiliaryInfo.put("unitCellParams",a.getUnitCellParams())},"J.api.SymmetryInterface")});n("JM");z(["java.util.Hashtable","JU.BS"],"JM.ModelLoader","java.util.Arrays JU.AU $.Lst $.P3 $.PT $.SB $.V3 J.api.Interface JM.AtomCollection $.Chain $.Group $.Model $.ModelSet JS.T JU.BSUtil $.Elements $.JmolMolecule $.Logger JV.JC".split(" "),
function(){var b=w(function(){this.modelSet0=this.ms=this.vwr=null;this.appendNew=this.merging=!1;this.specialAtomIndexes=this.group3Counts=this.group3Lists=this.jmolData=null;this.doAddPDBHydrogens=this.doMinimize=this.isPyMOLsession=this.isTrajectory=this.isMutate=this.isMOL2D=this.is2D=this.someModelsAreModulated=this.someModelsHaveUnitcells=!1;this.groups=this.jbr=this.fileHeader=null;this.groupCount=0;this.modulationTUV=null;this.noH=!1;this.firstAtomIndexes=this.seqcodes=this.group3Of=this.chainOf=
this.htAtomMap=null;this.iModel=0;this.model=null;this.currentChainID=0;this.isNewChain=!1;this.currentChain=null;this.currentGroupSequenceNumber=0;this.currentGroupInsertionCode="\x00";this.nullGroup=this.currentGroup3=null;this.adapterTrajectoryCount=this.adapterModelCount=this.baseTrajectoryCount=this.baseGroupIndex=this.baseAtomIndex=this.baseModelCount=this.baseModelIndex=0;this.modulationOn=this.noAutoBond=!1;this.$mergeGroups=this.appendToModelIndex=this.htGroup1=null;this.iChain=0;this.vStereo=
null;this.lastModel=-1;this.structuresDefinedInFile=null;q(this,arguments)},JM,"ModelLoader",null);N(b,function(){this.htAtomMap=new java.util.Hashtable;this.structuresDefinedInFile=new JU.BS});x(b,function(a,d,b,c,e,f){this.vwr=a;this.ms=new JM.ModelSet(a,d);var j=a.getModelAdapter();this.modelSet0=e;(this.merging=null!=e&&(0<e.ac||null!=e.vwr.getOperativeSymmetry()))?this.ms.canSkipLoad=!1:a.resetShapes(!1);this.ms.preserveState=a.getPreserveState();this.ms.showRebondTimes=a.getBoolean(603979934);
null==f?(this.initializeInfo(d,null),this.createModelSet(null,null,null),a.setStringProperty("_fileType","")):(this.ms.preserveState||(this.ms.canSkipLoad=!1),d=j.getAtomSetCollectionAuxiliaryInfo(c),d.put("loadScript",b),this.initializeInfo(j.getFileTypeName(c).toLowerCase().intern(),d),this.createModelSet(j,c,f),null!=d.get("lowPrecision")&&a.setBooleanPropertyTok("doublePrecision",603979831,!1),null!=this.jbr&&this.jbr.setLoader(null),this.jbr=null)},"JV.Viewer,~S,JU.SB,~O,JM.ModelSet,JU.BS");
c(b,"initializeInfo",function(a,d){this.ms.g3d=this.vwr.gdata;this.ms.modelSetTypeName=a;this.ms.isXYZ="xyz"===a;this.ms.msInfo=d;this.ms.modelSetProperties=this.ms.getInfoM("properties");this.ms.haveBioModels=this.ms.getMSInfoB(JV.JC.getBoolName(4));this.isMutate=this.ms.getMSInfoB("isMutate");this.ms.haveBioModels&&(this.jbr=this.vwr.getJBR().setLoader(this),this.jbr.carbohydrates=d.get("carbohydrates"));this.jmolData=0==this.adapterModelCount?this.ms.getInfoM("jmolData"):null;this.fileHeader=this.ms.getInfoM("fileHeader");
var b=this.ms.getInfoM("trajectorySteps");if(this.isTrajectory=null!=b)this.ms.trajectory=this.newTrajectory(this.ms,b);this.isPyMOLsession=this.ms.getMSInfoB("isPyMOL");this.doAddPDBHydrogens=null!=this.jbr&&!this.isTrajectory&&!this.isPyMOLsession&&!this.ms.getMSInfoB("pdbNoHydrogens")&&(this.ms.getMSInfoB("pdbAddHydrogens")||this.vwr.getBoolean(603979894));null!=d&&(d.remove("pdbNoHydrogens"),d.remove("pdbAddHydrogens"),d.remove("trajectorySteps"),this.isTrajectory&&(this.ms.vibrationSteps=d.remove("vibrationSteps")),
d.containsKey("highPrecision")&&this.vwr.setBooleanProperty("legacyJavaFloat",!0));this.htGroup1=this.ms.getInfoM("htGroup1");b=this.ms.getInfoM("modulationOn");null!=b&&(this.modulationOn=!0,this.modulationTUV=b===Boolean.TRUE?null:b);this.noAutoBond=this.ms.getMSInfoB("noAutoBond");this.noH=this.ms.getMSInfoB("noHydrogen");this.doMinimize=((this.is2D=this.ms.getMSInfoB("is2D"))&&!this.noH||this.ms.getMSInfoB("minimize3D"))&&this.ms.getMSInfoB("doMinimize");this.adapterTrajectoryCount=this.isTrajectory?
this.ms.trajectory.steps.size():0;this.ms.someModelsHaveSymmetry=this.ms.getMSInfoB(JV.JC.getBoolName(1));this.someModelsHaveUnitcells=this.ms.getMSInfoB(JV.JC.getBoolName(2));this.someModelsAreModulated=this.ms.getMSInfoB(JV.JC.getBoolName(9));this.ms.someModelsHaveFractionalCoordinates=this.ms.getMSInfoB(JV.JC.getBoolName(1));this.merging&&(this.ms.haveBioModels=(new Boolean(this.ms.haveBioModels|this.modelSet0.haveBioModels)).valueOf(),this.ms.bioModelset=this.modelSet0.bioModelset,null!=this.ms.bioModelset&&
this.ms.bioModelset.set(this.vwr,this.ms),this.ms.someModelsHaveSymmetry=(new Boolean(this.ms.someModelsHaveSymmetry|this.modelSet0.getMSInfoB(JV.JC.getBoolName(1)))).valueOf(),this.someModelsHaveUnitcells=(new Boolean(this.someModelsHaveUnitcells|this.modelSet0.getMSInfoB(JV.JC.getBoolName(2)))).valueOf(),this.ms.someModelsHaveFractionalCoordinates=(new Boolean(this.ms.someModelsHaveFractionalCoordinates|this.modelSet0.getMSInfoB(JV.JC.getBoolName(0)))).valueOf(),this.ms.someModelsHaveAromaticBonds=
(new Boolean(this.ms.someModelsHaveAromaticBonds|this.modelSet0.someModelsHaveAromaticBonds)).valueOf(),this.ms.msInfo.put(JV.JC.getBoolName(1),Boolean.$valueOf(this.ms.someModelsHaveSymmetry)),this.ms.msInfo.put(JV.JC.getBoolName(2),Boolean.$valueOf(this.someModelsHaveUnitcells)),this.ms.msInfo.put(JV.JC.getBoolName(0),Boolean.$valueOf(this.ms.someModelsHaveFractionalCoordinates)),this.ms.msInfo.put(JV.JC.getBoolName(8),Boolean.$valueOf(this.ms.someModelsHaveAromaticBonds)))},"~S,java.util.Map");
c(b,"newTrajectory",function(a,d){return J.api.Interface.getInterface("JM.Trajectory",this.vwr,"load").set(this.vwr,a,d)},"JM.ModelSet,JU.Lst");c(b,"getGroup3",function(a){return a>=this.group3Of.length?null:this.group3Of[a]},"~N");c(b,"getFirstAtomIndex",function(a){return this.firstAtomIndexes[a]},"~N");c(b,"getAtomCount",function(){return this.ms.ac});c(b,"createModelSet",function(a,d,b){var c=null==a?0:a.getAtomCount(d,-1);0<c&&JU.Logger.info("reading "+c+" atoms");this.adapterModelCount=null==
a?1:a.getAtomSetCount(d);this.appendToModelIndex=null==this.ms.msInfo?null:this.ms.msInfo.get("appendToModelIndex");this.appendNew=!this.isMutate&&(!this.merging||null==a||1<this.adapterModelCount||this.isTrajectory||this.vwr.getBoolean(603979792)&&null==this.appendToModelIndex);this.htAtomMap.clear();this.chainOf=Array(32);this.group3Of=Array(32);this.seqcodes=E(32,0);this.firstAtomIndexes=E(32,0);this.currentChainID=2147483647;this.currentChain=null;this.currentGroupInsertionCode="\uffff";this.currentGroup3=
"xxxxx";this.iModel=-1;this.model=null;this.merging&&this.mergeTrajAndVib(this.modelSet0,this.ms);this.initializeAtomBondModelCounts(c);!this.noH&&(null!=b&&(this.doMinimize||this.is2D))&&b.setBits(this.baseAtomIndex,this.baseAtomIndex+a.getAtomCount(d,0));if(null==a)this.setModelNameNumberProperties(0,-1,"",1,null,null,null);else{0<this.adapterModelCount&&(JU.Logger.info("ModelSet: haveSymmetry:"+this.ms.someModelsHaveSymmetry+" haveUnitcells:"+this.someModelsHaveUnitcells+" haveFractionalCoord:"+
this.ms.someModelsHaveFractionalCoordinates),JU.Logger.info(this.adapterModelCount+" model"+(1==this.ms.mc?"":"s")+' in this collection. Use getProperty "modelInfo" or getProperty "auxiliaryInfo" to inspect them.'));b=this.ms.getInfoM("defaultOrientationQuaternion");null!=b&&(JU.Logger.info("defaultOrientationQuaternion = "+b),JU.Logger.info('Use "set autoLoadOrientation TRUE" before loading or "restore orientation DEFAULT" after loading to view this orientation.'));this.iterateOverAllNewModels(a,
d);b=a.getBondIterator(d);c=null!=b;this.iterateOverAllNewAtoms(a,d,c);var e=this.vwr.getMadBond();c&&(this.ms.defaultCovalentMad=null==this.jmolData?e:0,this.iterateOverAllNewBonds(b));this.ms.defaultCovalentMad=e;this.merging&&!this.appendNew&&(b=a.getAtomSetAuxiliaryInfo(d,0),this.ms.setInfo(this.baseModelIndex,"initialAtomCount",b.get("initialAtomCount")),this.ms.setInfo(this.baseModelIndex,"initialBondCount",b.get("initialBondCount")));this.initializeUnitCellAndSymmetry();this.initializeBonding()}this.finalizeGroupBuild();
this.is2D&&this.doMinimize&&this.setupMinimization();this.doAddPDBHydrogens&&this.jbr.finalizeHydrogens();null!=a&&(this.ms.calculatePolymers(this.groups,this.groupCount,this.baseGroupIndex,null),null!=this.jbr&&this.jbr.iterateOverAllNewStructures(a,d));this.setDefaultRendering(this.vwr.getInt(553648170));var f=this.vwr.rd;b=this.ms.ac;c=this.ms.at;for(e=this.baseAtomIndex;e<b;e++)c[e].setMadAtom(this.vwr,f);f=this.ms.am;for(e=f[this.baseModelIndex].firstAtomIndex;e<b;e++)null!=c[e]&&f[c[e].mi].bsAtoms.set(e);
this.freeze();this.finalizeShapes();this.vwr.setModelSet(this.ms);this.setAtomProperties();null!=a&&a.finish(d);null!=this.modelSet0&&this.modelSet0.releaseModelSet();this.modelSet0=null},"J.api.JmolAdapter,~O,JU.BS");c(b,"mergeTrajAndVib",function(a,d){this.baseModelCount=a.mc;this.baseTrajectoryCount=0;null==a.trajectory&&this.isTrajectory&&this.newTrajectory(a,new JU.Lst);if(!(null==a.trajectory||0==a.mc)){this.baseTrajectoryCount=a.mc;for(var b=a.trajectory.steps.size(),c=b;c<this.baseTrajectoryCount;c++)a.trajectory.steps.addLast(null);
if(this.isTrajectory){if(null==a.vibrationSteps){a.vibrationSteps=new JU.Lst;for(c=b;0<=--c;)a.vibrationSteps.addLast(null)}b=d.trajectory.steps.size();for(c=0;c<b;c++)a.trajectory.steps.addLast(d.trajectory.steps.get(c)),a.vibrationSteps.addLast(null==d.vibrationSteps?null:d.vibrationSteps.get(c))}else d.trajectory=this.newTrajectory(d,null);d.vibrationSteps=a.vibrationSteps;d.trajectory.steps=a.trajectory.steps;a.trajectory=null}},"JM.ModelSet,JM.ModelSet");c(b,"setDefaultRendering",function(a){if(!this.isPyMOLsession){for(var d=
new JU.SB,b=this.ms.mc,c=this.ms.am,e=this.baseModelIndex;e<b;e++)c[e].isBioModel&&c[e].getDefaultLargePDBRendering(d,a);0!=d.length()&&(d.append("select *;"),a=this.ms.getInfoM("jmolscript"),null==a&&(a=""),d.append(a),this.ms.msInfo.put("jmolscript",d.toString()))}},"~N");c(b,"setAtomProperties",function(){for(var a=this.ms.mc,d=this.baseModelIndex;d<a;d++){var b=this.ms.getInfo(d,"atomProperties");null!=this.jmolData&&this.addJmolDataProperties(this.ms.am[d],this.ms.getInfo(d,"jmolDataProperties"));
var c=this.ms.getInfo(d,"groupPropertyList");this.ms.am[d].isBioModel&&null!=this.ms.getInfo(d,"dssr")&&this.vwr.getAnnotationParser(!0).setGroup1(this.ms,d);if(null!=b){for(var e,b=b.entrySet().iterator();b.hasNext()&&((e=b.next())||1);){var f=e.getKey(),j=e.getValue(),k=this.ms.getModelAtomBitSetIncludingDeleted(d,!0);if(this.doAddPDBHydrogens)var g=null!=c&&JU.PT.isOneOf(f,c),j=this.jbr.fixPropertyValue(k,j,g);f="property_"+f.toLowerCase();JU.Logger.info("creating "+f+" for model "+this.ms.getModelName(d));
this.vwr.setData(f,u(-1,[f,j,k,Integer.$valueOf(-1),Boolean.FALSE,e]),this.ms.ac,0,0,2147483647,0)}this.ms.setInfo(d,"atomProperties",null)}}});c(b,"initializeAtomBondModelCounts",function(a){var d=this.adapterTrajectoryCount;if(this.merging){if(this.appendNew)this.baseModelIndex=this.baseModelCount,this.ms.mc=this.baseModelCount+this.adapterModelCount;else{this.baseModelIndex=null==this.appendToModelIndex?this.vwr.am.cmi:this.appendToModelIndex.intValue();if(0>this.baseModelIndex||this.baseModelIndex>=
this.baseModelCount)this.baseModelIndex=this.baseModelCount-1;this.ms.mc=this.baseModelCount}this.ms.ac=this.baseAtomIndex=this.modelSet0.ac;this.ms.bondCount=this.modelSet0.bondCount;this.$mergeGroups=this.modelSet0.getGroups();this.groupCount=this.baseGroupIndex=this.$mergeGroups.length;this.ms.mergeModelArrays(this.modelSet0);this.ms.growAtomArrays(this.ms.ac+a)}else this.ms.mc=this.adapterModelCount,this.ms.ac=0,this.ms.bondCount=0,this.ms.at=Array(a),this.ms.bo=Array(250+a);this.doAddPDBHydrogens&&
this.jbr.initializeHydrogenAddition();1<d&&(this.ms.mc+=d-1);this.ms.am=JU.AU.arrayCopyObject(this.ms.am,this.ms.mc);this.ms.modelFileNumbers=JU.AU.arrayCopyI(this.ms.modelFileNumbers,this.ms.mc);this.ms.modelNumbers=JU.AU.arrayCopyI(this.ms.modelNumbers,this.ms.mc);this.ms.modelNumbersForAtomLabel=JU.AU.arrayCopyS(this.ms.modelNumbersForAtomLabel,this.ms.mc);this.ms.modelNames=JU.AU.arrayCopyS(this.ms.modelNames,this.ms.mc);this.ms.frameTitles=JU.AU.arrayCopyS(this.ms.frameTitles,this.ms.mc);if(this.merging)for(a=
0;a<this.modelSet0.mc;a++)(this.ms.am[a]=this.modelSet0.am[a]).ms=this.ms},"~N");c(b,"mergeGroups",function(){var a=this.modelSet0.getModelSetAuxiliaryInfo(null),d=a.get("group3Lists"),a=a.get("group3Counts"),b=null==d?0:d.length;if(null!=d){for(var c=0;c<this.baseModelCount;c++)c<b&&(this.group3Lists[c+1]=d[c+1],this.group3Counts[c+1]=a[c+1]),this.structuresDefinedInFile.set(c);this.group3Lists[0]=d[0];this.group3Counts[0]=a[0]}!this.appendNew&&this.ms.haveBioModels&&this.structuresDefinedInFile.clear(this.baseModelIndex)});
c(b,"iterateOverAllNewModels",function(a,d){this.group3Lists=Array(this.ms.mc+1);this.group3Counts=JU.AU.newInt2(this.ms.mc+1);this.structuresDefinedInFile=new JU.BS;this.merging&&this.mergeGroups();for(var b=this.isTrajectory?this.baseTrajectoryCount:-1,c=this.baseModelIndex,e=0;e<this.adapterModelCount;++e,++c){var f=a.getAtomSetNumber(d,e),j=a.getAtomSetName(d,e),k=a.getAtomSetAuxiliaryInfo(d,e);k.containsKey("modelID")&&k.put("modelID0",k.get("modelID"));var g=k.get("modelProperties");if(!this.merging||
this.appendNew){var s=k.get("fileType");this.vwr.setStringProperty("_fileType",s);this.vwr.fm.setFileType(s)}null==j&&(j=null!=this.jmolData&&2<this.jmolData.indexOf(";")?this.jmolData.substring(this.jmolData.indexOf(":")+2,this.jmolData.indexOf(";")):this.appendNew?""+f%1E6:"");this.setModelNameNumberProperties(c,b,j,f,g,k,this.jmolData)}b=this.ms.am[null==this.appendToModelIndex?this.baseModelIndex:this.ms.mc-1];this.vwr.setSmilesString(this.ms.msInfo.get("smilesString"));e=this.ms.msInfo.remove("loadState");
f=this.ms.msInfo.remove("loadScript");if(0>f.indexOf("Viewer.AddHydrogens")||!b.isModelKit){j=JU.PT.split(e,"\n");k=new JU.SB;for(e=0;e<j.length;e++)g=b.loadState.indexOf(j[e]),(0>g||g!=b.loadState.lastIndexOf(j[e]))&&k.append(j[e]).appendC("\n");b.loadState+=b.loadScript.toString()+k.toString();b.loadScript=new JU.SB;if(0<=f.indexOf("load append ")||0<=f.indexOf('data "append '))f.insert(0,";var anew = appendNew;"),f.append(";set appendNew anew");b.loadScript.append("  ").appendSB(f).append(";\n")}if(this.isTrajectory){e=
this.ms.mc-c+1;JU.Logger.info(e+" trajectory steps read");this.ms.setInfo(this.baseModelCount,"trajectoryStepCount",Integer.$valueOf(e));b=this.adapterModelCount;for(e=c;e<this.ms.mc;e++,b++)this.ms.am[e]=this.ms.am[this.baseModelCount],this.ms.modelNumbers[e]=a.getAtomSetNumber(d,b),this.ms.modelNames[e]=a.getAtomSetName(d,b),this.structuresDefinedInFile.set(e)}this.finalizeModels(this.baseModelCount)},"J.api.JmolAdapter,~O");c(b,"setModelNameNumberProperties",function(a,d,b,c,e,f,j){if(this.appendNew){var k=
null!=f&&Boolean.TRUE===f.get(JV.JC.getBoolName(4));this.ms.am[a]=k?this.jbr.getBioModel(a,d,j,e,f):(new JM.Model).set(this.ms,a,d,j,e,f);this.ms.modelNumbers[a]=c;this.ms.modelNames[a]=b;k&&this.jbr.setGroupLists(a)}else d=f.get("PDB_CONECT_firstAtom_count_max"),null!=d&&this.ms.setInfo(a,"PDB_CONECT_firstAtom_count_max",d);d=this.ms.am;c=this.ms.at;d[a].bsAtoms.set(c.length+1);d[a].bsAtoms.clear(c.length+1);c=this.ms.getInfo(a,"altLocs");d[a].altLocCount=null==c?0:c.length;null!=c&&(c=c.toCharArray(),
java.util.Arrays.sort(c),c=String.valueOf(c),this.ms.setInfo(a,"altLocs",c));c=this.ms.getInfo(a,"insertionCodes");d[a].insertionCount=null==c?0:c.length;b=null!=this.ms.modelSetName&&this.ms.modelSetName.startsWith("Jmol Model Kit")||b.startsWith("Jmol Model Kit")||"Jme".equals(this.ms.getInfo(a,"fileType"))&&this.is2D;d[a].isModelKit=b},"~N,~N,~S,~N,java.util.Properties,java.util.Map,~S");c(b,"finalizeModels",function(a){var d=this.ms.mc;if(d!=a){var b,c=0,e=-1,f=this.ms.modelNumbers,j=this.ms.modelNames;
if(this.isTrajectory)for(var k=a;++k<this.ms.mc;)f[k]=f[k-1]+1;if(0<a){if(1E6>f[0])for(k=0;k<a;k++)0==j[k].length&&(j[k]=""+f[k]),f[k]+=1E6,this.ms.modelNumbersForAtomLabel[k]="1."+(k+1);var g=f[a-1],g=g-g%1E6;1E6>f[a]&&(g+=1E6);for(k=a;k<d;k++)f[k]+=g}for(var s=this.ms.am,k=a;k<d;++k)if(this.ms.setInfo(k,"fileType",this.ms.modelSetTypeName),null!=this.fileHeader&&this.ms.setInfo(k,"fileHeader",this.fileHeader),g=v(f[k]/1E6),g!=e&&(c=0,e=g),c++,0==g?(b=""+this.ms.getModelNumber(k),g=1):b=g+"."+c,
this.ms.modelNumbersForAtomLabel[k]=b,s[k].fileIndex=g-1,this.ms.modelFileNumbers[k]=1E6*g+c,null==j[k]||0==j[k].length)j[k]=b;if(this.merging)for(k=0;k<a;k++)s[k].ms=this.ms;for(k=0;k<d;k++)this.ms.setInfo(k,"modelName",j[k]),this.ms.setInfo(k,"modelNumber",Integer.$valueOf(f[k]%1E6)),this.ms.setInfo(k,"modelFileNumber",Integer.$valueOf(this.ms.modelFileNumbers[k])),this.ms.setInfo(k,"modelNumberDotted",this.ms.getModelNumberDotted(k)),a=this.ms.getInfo(k,"altLocs"),null!=a&&JU.Logger.info("model "+
this.ms.getModelNumberDotted(k)+" alternative locations: "+a)}},"~N");c(b,"iterateOverAllNewAtoms",function(a,d,b){var c=-1,e=0,f=!1,j=!1,k=a.getAtomIterator(d),g=a.getAtomCount(d,-1);this.ms.setCapacity(a.getAtomCount(d,-1));d=0;var s=this.ms.am;0<this.ms.mc&&(this.nullGroup=(new JM.Group).setGroup(new JM.Chain(this.ms.am[this.baseModelIndex],32,0),"",0,-1,-1));for(;k.hasNext();){d++;var m=k.getAtomSetIndex()+this.baseModelIndex;m!=c&&(this.iChain=0,this.iModel=m,this.model=s[m],c=this.model.bsAtoms,
this.merging&&(!this.appendNew&&null!=this.vwr.getOperativeSymmetry())&&(e=this.getAtomSiteBase(c)),this.currentChainID=2147483647,this.isNewChain=!0,c.set(this.ms.ac+g),c.clearAll(),this.model.isOrderly=null==this.appendToModelIndex,f=this.model.isBioModel,c=m,j=f&&this.doAddPDBHydrogens,null!=this.jbr&&this.jbr.setHaveHsAlready(!1));var m=k.getGroup3(),p=k.getChainID();this.checkNewGroup(a,p,m,k.getSequenceNumber(),k.getInsertionCode(),j,!1);p=k.getElementNumber();j&&1==JU.Elements.getElementNumber(p)&&
this.jbr.setHaveHsAlready(!0);var y=k.getAtomName(),A=j?this.getPdbCharge(m,y):k.getFormalCharge(),m=this.addAtom(f,k,y,p,e,A,m);b&&this.htAtomMap.put(k.getUniqueID(),m)}0<this.groupCount&&j&&this.jbr.addImplicitHydrogenAtoms(a,this.groupCount-1,this.isNewChain?1:0);c=-1;a=null;b=this.ms.at;for(e=s[0].firstAtomIndex=0;e<this.ms.ac;e++)null!=b[e]&&b[e].mi>c&&(c=b[e].mi,k=s[c],k.firstAtomIndex=e,k.isOrderly=k.act==k.bsAtoms.length()-e,k=this.ms.getDefaultVdwType(c),k!==a&&(JU.Logger.info("Default Van der Waals type for model set to "+
k.getVdwLabel()),a=k));JU.Logger.info(d+" atoms created")},"J.api.JmolAdapter,~O,~B");c(b,"getAtomSiteBase",function(a){for(var d=0,b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1)){var c=this.ms.at[b];!JM.AtomCollection.isDeleted(c)&&c.atomSite>d&&(d=c.atomSite)}return d},"JU.BS");c(b,"addJmolDataProperties",function(a,d){if(null!=d)for(var b=a.bsAtoms,c=b.cardinality(),e,f=d.entrySet().iterator();f.hasNext()&&((e=f.next())||1);){var j=e.getKey(),k=e.getValue();if(k.length!=c)break;var g=j.startsWith("property_")?
1715472409:JS.T.getTokFromName(j);switch(g){default:if(JS.T.tokAttr(g,2048)){this.vwr.setAtomProperty(b,g,0,0,null,k,null);break}case 1111492629:case 1111492630:case 1111492631:j="property_"+j;case 1715472409:this.vwr.setData(j,u(-1,[j,k,b,Integer.$valueOf(1)]),0,0,0,0,0)}}},"JM.Model,java.util.Map");c(b,"getPdbCharge",function(a,d){return a.equals("ARG")&&d.equals("NH1")||a.equals("LYS")&&d.equals("NZ")||a.equals("HIS")&&d.equals("ND1")?1:0},"~S,~S");c(b,"addAtom",function(a,d,b,c,e,f,j){var k=d.getSymmetry(),
g=d.getAtomSite()+e,s=d.getPartialCharge(),m=d.getTensors(),p=d.getOccupancy(),y=d.getBfactor(),A=d.getXYZ(),n=d.getIsHetero(),q=0>d.getPart(),u=d.getSerial(),v=d.getSeqID(),w=d.getVib();e=d.getAltLoc();var x=d.getRadius();d=d.getBondRadius();var z=0,B=null;if(null!=b){var C;if(0<=(C=b.indexOf("\x00")))B=b.substring(C+1),b=b.substring(0,C);a&&(0<=b.indexOf("*")&&(b=b.$replace("*","'")),z=this.vwr.getJBR().lookupSpecialAtomID(b),2==z&&"CA".equalsIgnoreCase(j)&&(z=0))}a=this.ms.addAtom(this.iModel,
this.nullGroup,c,b,B,u,v,g,A,x,w,f,s,p,y,m,n,q,z,k,d);a.altloc=e;return a},"~B,J.api.JmolAdapterAtomIterator,~S,~N,~N,~N,~S");c(b,"checkNewGroup",function(a,d,b,c,e,f,j){d!=this.currentChainID&&(this.currentChainID=d,this.currentChain=this.getOrAllocateChain(this.model,d),this.currentGroupInsertionCode="\uffff",this.currentGroupSequenceNumber=-1,this.currentGroup3="xxxx",this.isNewChain=!0);d=null==b?null:b.intern();if(c!=this.currentGroupSequenceNumber||e!=this.currentGroupInsertionCode||d!==this.currentGroup3){0<
this.groupCount&&f&&(this.jbr.addImplicitHydrogenAtoms(a,this.groupCount-1,this.isNewChain&&!j?1:0),this.jbr.setHaveHsAlready(!1));this.currentGroupSequenceNumber=c;this.currentGroupInsertionCode=e;for(this.currentGroup3=d;this.groupCount>=this.group3Of.length;)this.chainOf=JU.AU.doubleLength(this.chainOf),this.group3Of=JU.AU.doubleLengthS(this.group3Of),this.seqcodes=JU.AU.doubleLengthI(this.seqcodes),this.firstAtomIndexes=JU.AU.doubleLengthI(this.firstAtomIndexes);this.firstAtomIndexes[this.groupCount]=
this.ms.ac;this.chainOf[this.groupCount]=this.currentChain;this.group3Of[this.groupCount]=b;this.seqcodes[this.groupCount]=JM.Group.getSeqcodeFor(c,e);++this.groupCount}},"J.api.JmolAdapter,~N,~S,~N,~S,~B,~B");c(b,"getOrAllocateChain",function(a,d){var b=a.getChain(d);if(null!=b)return b;a.chainCount==a.chains.length&&(a.chains=0==a.chainCount?Array(2):JU.AU.doubleLength(a.chains));return a.chains[a.chainCount++]=new JM.Chain(a,d,0==d||32==d?0:++this.iChain)},"JM.Model,~N");c(b,"iterateOverAllNewBonds",
function(a){for(var d=this.isMutate&&!this.vwr.getBoolean(603979894),b=!1;a.hasNext();){var c=a.getEncodedOrder(),e=d?1:c,c=this.bondAtoms(a.getAtomUniqueID1(),a.getAtomUniqueID2(),e);null!=c&&(1<e&&(1025!=e&&1041!=e)&&(b=!0),e=a.getPymolRadius(),0<e&&c.setMad(sa(2E3*e)),e=a.getColix(),0<=e&&(c.colix=e))}b&&(this.ms.someModelsHaveSymmetry&&!this.vwr.getBoolean(603979794))&&JU.Logger.info('ModelSet: use "set appletSymmetryToBonds TRUE " to apply the file-based multiple bonds to symmetry-generated atoms.')},
"J.api.JmolAdapterBondIterator");c(b,"bondAtoms",function(a,d,b){var c=this.htAtomMap.get(a);if(null==c)return JU.Logger.error("bondAtoms cannot find atomUid1?:"+a),null;a=this.htAtomMap.get(d);if(null==a)return JU.Logger.error("bondAtoms cannot find atomUid2?:"+d),null;if(c.isBonded(a))return null;1025==b||1041==b?(d=c.getModelIndex(),d!=this.lastModel&&(this.lastModel=d,d=this.ms.getModelAuxiliaryInfo(d),this.isMOL2D=this.is2D||null!=d&&"2D".equals(d.get("dimension"))),b=this.ms.bondMutually(c,
a,this.isMOL2D?b:513,this.ms.getDefaultMadFromOrder(1),0),this.isMOL2D&&(null==this.vStereo&&(this.vStereo=new JU.Lst),this.vStereo.addLast(b))):(b=this.ms.bondMutually(c,a,b,this.ms.getDefaultMadFromOrder(b),0),b.isAromatic()&&(this.ms.someModelsHaveAromaticBonds=!0));this.ms.bondCount==this.ms.bo.length&&(this.ms.bo=JU.AU.arrayCopyObject(this.ms.bo,this.ms.bondCount+250));this.ms.setBond(this.ms.bondCount++,b);return b},"~O,~O,~N");c(b,"initializeUnitCellAndSymmetry",function(){this.someModelsAreModulated&&
null==this.ms.bsModulated&&(this.ms.bsModulated=new JU.BS);var a=null!=this.modelSet0&&null!=this.modelSet0.unitCells;if(this.someModelsHaveUnitcells||a){this.ms.unitCells=Array(this.ms.mc);this.ms.haveUnitCells=!0;for(var d=0,b=0;d<this.ms.mc;d++)if(a&&d<this.baseModelCount)this.ms.unitCells[d]=this.modelSet0.unitCells[d];else if(null!=this.ms.getModelAuxiliaryInfo(d).get("spaceGroupIndex")){this.ms.unitCells[d]=J.api.Interface.getSymmetry(this.vwr,"file");var c=null;if(this.isTrajectory){var e=
this.ms.getInfoM("unitCells");null!=e&&(c=e.get(b++))}this.ms.unitCells[d].setSymmetryInfoFromFile(this.ms,d,c)}}if(this.appendNew&&this.ms.someModelsHaveSymmetry){this.ms.getAtoms(1088421903,null);a=this.ms.at;d=this.baseAtomIndex;b=-1;for(c=0;d<this.ms.ac;d++){if(a[d].mi!=b){b=a[d].mi;c=this.baseAtomIndex+this.ms.getInfoI(b,"presymmetryAtomIndex");if(0>c)break;e=this.ms.getInfoI(b,"presymmetryAtomCount");this.ms.am[b].auxiliaryInfo.put("presymmetryAtomIndex",Integer.$valueOf(c));this.ms.setInfo(b,
"asymmetricUnit",this.ms.am[b].bsAsymmetricUnit=JU.BSUtil.newBitSet2(c,c+e));c+=e}d>=c&&this.ms.bsSymmetry.set(d)}}if(this.appendNew&&this.ms.someModelsHaveFractionalCoordinates){a=this.ms.at;b=-1;c=null;e=!1;for(d=this.baseAtomIndex;d<this.ms.ac;d++)if(a[d].mi!=b&&(b=a[d].mi,c=this.ms.getUnitCell(b),e=null!=c&&c.getCoordinatesAreFractional()),e){var f=null==this.ms.getModulation(d)?c:a[d].getUnitCell();f.toCartesian(f.toSupercell(a[d]),!1)}for(d=this.baseModelIndex;d<this.ms.mc;d++)this.ms.isTrajectory(d)&&
this.ms.trajectory.setUnitCell(d)}});c(b,"initializeBonding",function(){var a=this.ms.mc,d=this.ms.am,b=0,c=this.ms.getInfoM("bsExcludeBonding");null==c&&(c=null==this.ms.getInfoM(JV.JC.getBoolName(3))?null:new JU.BS,null!=c&&this.ms.setPdbConectBonding(this.baseAtomIndex,this.baseModelIndex,c));var e=this.vwr.getBoolean(603979794),f=this.vwr.getBoolean(603979798),j=this.vwr.getBoolean(603979848),k=null,g=!1;if(!this.noAutoBond)for(var s=this.baseModelIndex;s<a;s++){var b=d[s].bsAtoms.cardinality(),
m=this.ms.getInfoI(s,"initialBondCount"),p=d[s].isBioModel;0>m&&(m=this.ms.bondCount);if(j||f&&(0==m||p&&null==this.jmolData&&(this.ms.getMSInfoB("havePDBHeaderName")||m<v(b/2))||this.ms.getInfoB(s,"hasSymmetry")&&!e&&!this.ms.getInfoB(s,"hasBonds")))if(g=!0,this.merging||1<a)null==k&&(k=JU.BS.newN(this.ms.ac)),(s==this.baseModelIndex||!this.isTrajectory)&&k.or(d[s].bsAtoms)}this.modulationOn&&this.ms.setModulation(null,!0,this.modulationTUV,!1);g?(this.ms.autoBondBs4(k,k,c,null,this.ms.defaultCovalentMad,
this.vwr.getBoolean(603979872),null),JU.Logger.info("ModelSet: autobonding; use  autobond=false  to not generate bonds automatically")):JU.Logger.info("ModelSet: not autobonding; use  forceAutobond=true  to force automatic bond creation")});c(b,"finalizeGroupBuild",function(){this.groups=Array(this.groupCount);if(this.merging)for(var a=0;a<this.$mergeGroups.length;a++)(this.groups[a]=this.$mergeGroups[a]).chain.model.ms=this.ms;for(a=this.baseGroupIndex;a<this.groupCount;++a)this.distinguishAndPropagateGroup(a,
this.chainOf[a],this.group3Of[a],this.seqcodes[a],this.firstAtomIndexes[a],(a==this.groupCount-1?this.ms.ac:this.firstAtomIndexes[a+1])-1);if(null!=this.group3Lists){this.ms.msInfo.put("group3Lists",this.group3Lists);this.ms.msInfo.put("group3Counts",this.group3Counts);for(a=0;a<this.group3Counts.length;a++)null==this.group3Counts[a]&&(this.group3Counts[a]=E(0,0))}});c(b,"distinguishAndPropagateGroup",function(a,d,b,c,e,f){if(f<e)throw new NullPointerException;var j=null==b||null==this.jbr?null:this.jbr.distinguishAndPropagateGroup(d,
b,c,e,f,this.specialAtomIndexes,this.ms.at);null==j?(j=(new JM.Group).setGroup(d,b,c,e,f),null!=this.jbr&&(j.groupID=this.jbr.getGroupID(b)),c="o>"):c=j.isProtein()?"p>":j.isNucleic()?"n>":j.isCarbohydrate()?"c>":"o>";null!=b&&(this.countGroup(this.ms.at[e].mi,c,b),j.isNucleic()&&(b=null==this.htGroup1?null:this.htGroup1.get(b),null!=b&&(j.group1=b.charAt(0))));this.addGroup(d,j);this.groups[a]=j;j.groupIndex=a;for(a=f+1;--a>=e;)this.ms.at[a].group=j},"~N,JM.Chain,~S,~N,~N,~N");c(b,"addGroup",function(a,
d){a.groupCount==a.groups.length&&(a.groups=JU.AU.doubleLength(a.groups));a.groups[a.groupCount++]=d},"JM.Chain,JM.Group");c(b,"countGroup",function(a,d,b){var c=a+1;if(!(null==this.group3Lists||null==this.group3Lists[c])){var e=(b+"   ").substring(0,3),f=this.group3Lists[c].indexOf(e);0>f&&(this.group3Lists[c]+=",["+e+"]",f=this.group3Lists[c].indexOf(e),this.group3Counts[c]=JU.AU.arrayCopyI(this.group3Counts[c],this.group3Counts[c].length+10));this.group3Counts[c][v(f/6)]++;f=this.group3Lists[c].indexOf(",["+
e);0<=f&&(this.group3Lists[c]=this.group3Lists[c].substring(0,f)+d+this.group3Lists[c].substring(f+2));0<=a&&this.countGroup(-1,d,b)}},"~N,~S,~S");c(b,"freeze",function(){this.htAtomMap.clear();this.ms.ac<this.ms.at.length&&this.ms.growAtomArrays(this.ms.ac);this.ms.bondCount<this.ms.bo.length&&(this.ms.bo=JU.AU.arrayCopyObject(this.ms.bo,this.ms.bondCount));for(var a=5;0<--a;){this.ms.numCached[a]=0;for(var d=this.ms.freeBonds[a],b=d.length;0<=--b;)d[b]=null}this.ms.setAtomNamesAndNumbers(0,this.baseAtomIndex,
this.modelSet0,!1);this.findElementsPresent();this.ms.resetMolecules();this.currentChain=this.model=null;!this.ms.haveBioModels||this.isPyMOLsession||this.isMutate?this.ms.freezeModels():(a=this.vwr.getBoolean(603979826),a=this.ms.calculateStructuresAllExcept(this.structuresDefinedInFile,a,!1,!0,!0,a,1405E3<=JV.JC.versionInt&&null==this.ms.getInfoM("DSSP1")?2:1),0<a.length&&JU.Logger.info(a))});c(b,"findElementsPresent",function(){this.ms.elementsPresent=Array(this.ms.mc);for(var a=0;a<this.ms.mc;a++)this.ms.elementsPresent[a]=
JU.BS.newN(64);for(a=this.ms.ac;0<=--a;){var d=this.ms.at[a];if(null!=d){var b=d.getAtomicAndIsotopeNumber();b>=JU.Elements.elementNumberMax&&(b=JU.Elements.elementNumberMax+JU.Elements.altElementIndexFromNumber(b));this.ms.elementsPresent[d.mi].set(b)}}});c(b,"setupMinimization",function(){this.initialize2DMin();var a=new JU.V3,d=1;if(null!=this.vStereo){var b=this.vStereo.size();a:for(;0<=--b;)for(var c=this.vStereo.get(b),e=c.atom1,f=e.bonds,j=e.getBondCount();0<=--j;){var k=f[j];if(k!==c&&(k=
k.getOtherAtom(e),a.sub2(k,e),0.1>Math.abs(a.x))){1025==c.order==0>a.y&&(d=-1);break a}}}this.set2dZ(a,d);if(null!=this.vStereo){a=JU.BSUtil.newBitSet2(this.baseAtomIndex,this.ms.ac);for(b=this.vStereo.size();0<=--b;){c=this.vStereo.get(b);d=1025==c.order?3:-3;c.order=1;6>c.atom1.getBondCount()&&(c.atom2.z!=c.atom1.z&&0>d==c.atom2.z<c.atom1.z)&&(d/=3);e=JU.JmolMolecule.getBranchBitSet(this.ms.at,c.atom2.i,a,null,c.atom1.i,!1,!0);e.set(c.atom2.i);for(j=e.nextSetBit(0);0<=j;j=e.nextSetBit(j+1))this.ms.at[j].z+=
d;c.atom2.x=(c.atom1.x+c.atom2.x)/2;c.atom2.y=(c.atom1.y+c.atom2.y)/2}this.vStereo=null}this.is2D=!1});c(b,"initialize2DMin",function(){for(var a=0,d=0,b=-1,c=this.baseAtomIndex,e=this.ms.ac,f=c;f<e;f++){var j=this.ms.at[f],k=j.getModelIndex();k!=b&&(b=k,this.ms.setInfo(k,"dimension","3D"));k=j.bonds;if(null!=k)for(var g=k.length;0<=--g;)if(null!=k[g]){var s=k[g].getOtherAtom(j);1!=s.getAtomNumber()&&s.getIndex()>f&&(a+=s.distance(j),d++)}}if(0!=d){a=1.45/(a/d);for(f=c;f<e;f++)this.ms.at[f].scale(a)}});
c(b,"set2dZ",function(a,d){var b=this.baseAtomIndex,c=this.ms.ac,e=JU.BS.newN(c),f=new JU.BS,j=JU.V3.new3(0,1,0),k=new JU.V3,g=new JU.BS;for(g.setBits(b,c);b<c;b++)!e.get(b)&&!f.get(b)&&(f=this.getBranch2dZ(b,-1,g,f,a,j,k,d),e.or(f))},"JU.V3,~N");c(b,"getBranch2dZ",function(a,d,b,c,e,f,j,k){c=JU.BS.newN(this.ms.ac);if(0>a)return c;b=JU.BSUtil.copy(b);0<=d&&b.clear(d);JM.ModelLoader.setBranch2dZ(this.ms.at[a],c,b,e,f,j,k);return c},"~N,~N,JU.BS,JU.BS,JU.V3,JU.V3,JU.V3,~N");b.setBranch2dZ=c(b,"setBranch2dZ",
function(a,d,b,c,e,f,j){var k=a.i;if(b.get(k)&&(b.clear(k),d.set(k),null!=a.bonds))for(k=a.bonds.length;0<=--k;){var g=a.bonds[k];g.isHydrogen()||(g=g.getOtherAtom(a),JM.ModelLoader.setAtom2dZ(a,g,c,e,f,j),JM.ModelLoader.setBranch2dZ(g,d,b,c,e,f,j))}},"JM.Atom,JU.BS,JU.BS,JU.V3,JU.V3,JU.V3,~N");b.setAtom2dZ=c(b,"setAtom2dZ",function(a,d,b,c,e,f){b.sub2(d,a);b.z=0;b.normalize();e.cross(c,b);b=Math.acos(b.dot(c));f=0.4*-f*Math.sin(4*b);d.z=a.z+f},"JM.Atom,JM.Atom,JU.V3,JU.V3,JU.V3,~N");c(b,"finalizeShapes",
function(){this.ms.sm=this.vwr.shm;this.ms.sm.setModelSet(this.ms);this.ms.setBsHidden(this.vwr.slm.getHiddenSet());this.merging||this.ms.sm.resetShapes(!1);this.ms.sm.loadDefaultShapes(this.ms);this.ms.someModelsHaveAromaticBonds&&this.vwr.getBoolean(603979944)&&this.ms.assignAromaticBondsBs(!1,null);this.merging&&1==this.baseModelCount&&this.ms.sm.setShapePropertyBs(6,"clearModelIndex",null,null)});c(b,"undeleteAtom",function(a){this.ms.at[a].valence=0},"~N");b.createAtomDataSet=c(b,"createAtomDataSet",
function(a,d,b,c,e){if(null==c)return null;var f=a.getModelAdapter(),j=new JU.P3,k=d.at,g=a.getFloat(570425363);if(null!=d.unitCells)for(var s=e.nextSetBit(0);0<=s;s=e.nextSetBit(s+1))if(null!=k[s].atomSymmetry){g=-g;break}for(var s=-1,m=0,p=JU.BSUtil.cardinalityOf(e)==a.ms.ac,y=f.getAtomIterator(c);y.hasNext();){var A=y.getXYZ();if(!Float.isNaN(A.x+A.y+A.z))if(1145047049==b){s=e.nextSetBit(s+1);if(0>s)break;m++;JU.Logger.debugging&&JU.Logger.debug("atomIndex = "+s+": "+k[s]+" --\x3e ("+A.x+","+A.y+
","+A.z);d.setAtomCoord(s,A.x,A.y,A.z)}else{j.setT(A);A=JU.BS.newN(d.ac);d.getAtomsWithin(g,j,A,-1);A.and(e);if(p)if(m=JU.BSUtil.cardinalityOf(A),0==m){JU.Logger.warn("createAtomDataSet: no atom found at position "+j);continue}else 1<m&&JU.Logger.debugging&&JU.Logger.debug("createAtomDataSet: "+m+" atoms found at position "+j);switch(b){case 1145047055:var n=y.getVib();if(null==n)continue;JU.Logger.debugging&&JU.Logger.debug("xyz: "+j+" vib: "+n);d.setAtomCoords(A,1145047055,n);break;case 1128269825:d.setAtomProperty(A,
b,0,y.getOccupancy(),null,null,null);break;case 1111492619:d.setAtomProperty(A,b,0,y.getPartialCharge(),null,null,null);break;case 1111492620:d.setAtomProperty(A,b,0,y.getBfactor(),null,null,null)}}}switch(b){case 1145047055:d=f.getAtomSetName(c,0);JU.Logger.info("_vibrationName = "+d);a.setStringProperty("_vibrationName",d);break;case 1145047049:if(JU.Logger.info(m+" atom positions read"),d.recalculateLeadMidpointsAndWingVectors(-1),m==d.ac)return"boundbox {*};reset"}return null},"JV.Viewer,JM.ModelSet,~N,~O,JU.BS")});
n("JM");z(["JM.BondCollection"],"JM.ModelSet","java.util.Hashtable JU.A4 $.AU $.BS $.Lst $.M3 $.M4 $.Measure $.P3 $.P4 $.PT $.Quat $.SB $.V3 J.api.Interface J.atomdata.RadiusData J.bspt.Bspf J.c.PAL $.VDW JM.Atom $.AtomIteratorWithinModel $.AtomIteratorWithinModelSet $.HBond $.Model $.StateScript JS.ScriptCompiler JU.BSUtil $.BoxInfo $.Edge $.Elements $.Escape $.JmolMolecule $.Logger JV.JC".split(" "),function(){var b=w(function(){this.haveBioModels=!1;this.am=this.modelSetName=this.bsSymmetry=null;
this.mc=0;this.unitCells=null;this.haveUnitCells=!1;this.elementsPresent=this.frameTitles=this.modelNames=this.modelNumbersForAtomLabel=this.modelFileNumbers=this.modelNumbers=this.closest=null;this.isXYZ=!1;this.msInfo=this.modelSetProperties=null;this.isBbcageDefault=this.someModelsHaveFractionalCoordinates=this.someModelsHaveAromaticBonds=this.someModelsHaveSymmetry=!1;this.stateScripts=this.boxInfo=this.bboxAtoms=this.bboxModels=null;this.thisStateModel=0;this.selectedMolecules=this.vibrationSteps=
null;this.showRebondTimes=!0;this.sm=this.bsAll=null;this.proteinStructureTainted=!1;this.defaultBBox=this.vTemp=this.mat4t=this.mat4=this.matInv=this.matTemp=this.ptTemp2=this.ptTemp1=this.ptTemp=this.vOrientations=this.htPeaks=null;this.echoShapeActive=this.haveJmolDataFrames=!1;this.translations=this.modelSetTypeName=null;this.maxBondWarned=!1;q(this,arguments)},JM,"ModelSet",JM.BondCollection);x(b,function(a,d){I(this,JM.ModelSet,[]);this.vwr=a;this.modelSetName=d;this.selectedMolecules=new JU.BS;
this.stateScripts=new JU.Lst;this.boxInfo=new JU.BoxInfo;this.boxInfo.addBoundBoxPoint(JU.P3.new3(-10,-10,-10));this.boxInfo.addBoundBoxPoint(JU.P3.new3(10,10,10));this.am=Array(1);this.modelNumbers=E(1,0);this.modelFileNumbers=E(1,0);this.modelNumbersForAtomLabel=Array(1);this.modelNames=Array(1);this.frameTitles=Array(1);this.closest=Array(1);this.ptTemp=new JU.P3;this.ptTemp1=new JU.P3;this.ptTemp2=new JU.P3;this.matTemp=new JU.M3;this.matInv=new JU.M3;this.mat4=new JU.M4;this.mat4t=new JU.M4;
this.vTemp=new JU.V3;this.setupBC()},"JV.Viewer,~S");c(b,"getBoxInfo",function(){return this.boxInfo});c(b,"releaseModelSet",function(){this.am=null;this.mc=0;this.unitCells=this.bsAll=this.bsSymmetry=this.am=this.closest[0]=null;this.releaseModelSetBC()});c(b,"getEchoStateActive",function(){return this.echoShapeActive});c(b,"setEchoStateActive",function(a){this.echoShapeActive=a},"~B");c(b,"getModelSetTypeName",function(){return this.modelSetTypeName});c(b,"getModelNumberIndex",function(a,d,b){if(d){for(d=
0;d<this.mc;d++)if(this.modelNumbers[d]==a||1E6>a&&this.modelNumbers[d]==1E6+a)return d;return-1}if(1E6>a)return a;for(d=0;d<this.mc;d++)if(this.modelFileNumbers[d]==a)return b&&this.isTrajectory(d)&&this.setTrajectory(d),d;return-1},"~N,~B,~B");c(b,"getModelDataBaseName",function(a){for(var d=0;d<this.mc;d++)if(a.equals(this.am[d].bsAtoms))return this.getInfo(d,"dbName");return null},"JU.BS");c(b,"setTrajectory",function(a){0<=a&&(this.isTrajectory(a)&&this.at[this.am[a].firstAtomIndex].mi!=a)&&
this.trajectory.setModel(a)},"~N");c(b,"getBitSetTrajectories",function(){return null==this.trajectory?null:this.trajectory.getModelsSelected()});c(b,"setTrajectoryBs",function(a){if(null!=this.trajectory)for(var d=0;d<this.mc;d++)a.get(d)&&this.setTrajectory(d)},"JU.BS");c(b,"morphTrajectories",function(a,d,b){0<=a&&(0<=d&&this.isTrajectory(a)&&this.isTrajectory(d))&&this.trajectory.morph(a,d,b)},"~N,~N,~N");c(b,"getTranslation",function(a){return null==this.translations||a>=this.translations.length?
null:this.translations[a]},"~N");c(b,"translateModel",function(a,d){if(null==d){var b=this.getTranslation(a);null!=b&&(d=JU.P3.newP(b),d.scale(-1),this.translateModel(a,d),this.translations[a]=null)}else{if(null==this.translations||this.translations.length<=a)this.translations=Array(this.mc);null==this.translations[a]&&(this.translations[a]=new JU.P3);this.translations[a].add(d);for(var b=this.am[a].bsAtoms,c=b.nextSetBit(0);0<=c;c=b.nextSetBit(c+1))this.at[c].add(d)}},"~N,JU.T3");c(b,"getFrameOffsets",
function(a,d){if(null==a){if(d)for(var b=this.mc;0<=--b;){var c=this.am[b];!c.isJmolDataFrame&&!c.isTrajectory&&this.translateModel(c.modelIndex,null)}return null}if(0>a.nextSetBit(0))return null;if(d){for(var e=JU.BSUtil.copy(a),f=null,j=new JU.P3,b=0;b<this.mc;b++){c=this.am[b];if(!c.isJmolDataFrame&&!c.isTrajectory){var k=e.nextSetBit(0);c.bsAtoms.get(k)&&(null==f?f=JU.P3.newP(this.at[k]):(j.sub2(f,this.at[k]),this.translateModel(b,j)))}e.andNot(c.bsAtoms)}return null}e=Array(this.mc);for(b=this.mc;0<=
--b;)e[b]=new JU.P3;for(var j=f=0,k=null,g=null!=this.trajectory&&this.trajectory.steps.size()==this.mc,s=g?this.mc:1,c=0;c<s;c++){g&&this.setTrajectory(c);for(b=0;b<=this.ac;b++)if(!(b<this.ac&&JM.AtomCollection.isDeleted(this.at[b]))){if(b==this.ac||this.at[b].mi!=f){0<j&&(k.scale(-1/j),0!=f&&k.sub(e[0]),j=0);if(b==this.ac)break;f=this.at[b].mi;k=e[f]}a.get(b)&&(k.add(this.at[b]),j++)}}e[0].set(0,0,0);return e},"JU.BS,~B");c(b,"getAtoms",function(a,d){switch(a){default:return JU.BSUtil.andNot(this.getAtomBitsMaybeDeleted(a,
d),this.vwr.slm.bsDeleted);case 1073742358:var b=d.intValue(),c=this.getModelNumberIndex(b,!0,!0);return 0>c&&0<b?new JU.BS:this.vwr.getModelUndeletedAtomsBitSet(c);case 1275203608:return b=u(-1,[null,null,null]),this.vwr.shm.getShapePropertyData(21,"getCenters",b),null==b[1]?new JU.BS:b[1]}},"~N,~O");c(b,"findNearestAtomIndex",function(a,d,b,c){if(0==this.ac)return-1;this.closest[0]=null;this.g3d.isAntialiased()&&(a<<=1,d<<=1);this.findNearest2(a,d,this.closest,b,c);this.sm.findNearestShapeAtomIndex(a,
d,this.closest,b);a=null==this.closest[0]?-1:this.closest[0].i;this.closest[0]=null;return a},"~N,~N,JU.BS,~N");c(b,"calculatePointGroup",function(a,d){return this.calculatePointGroupForFirstModel(a,!1,!1,null,0,0,null,d,null)},"JU.BS,JU.P3");c(b,"getPointGroupInfo",function(a){return this.calculatePointGroupForFirstModel(a,!1,!0,null,0,0,null,null,null)},"JU.BS");c(b,"getPointGroupAsString",function(a,d,b,c,e,f,j){return this.calculatePointGroupForFirstModel(a,!0,!1,d,b,c,e,f,j)},"JU.BS,~S,~N,~N,~A,JU.P3,~S");
c(b,"calculatePointGroupForFirstModel",function(a,d,b,c,e,f,j,k,g){var s=this.pointGroup,m=J.api.Interface.getSymmetry(this.vwr,"ms"),p=null,y=!1,A=!1,n=!1,q=null!=j,v=this.vwr.am.cmi;if(!q)if(j=null==a?-1:a.nextSetBit(0),0>v&&0<=j&&(v=this.at[j].mi),0>v&&(v=this.vwr.getVisibleFramesBitSet().nextSetBit(0),a=null),p=this.vwr.getModelUndeletedAtomsBitSet(v),n=null!=a&&p.cardinality()!=a.cardinality(),null!=a&&p.and(a),j=p.nextSetBit(0),0>j&&(p=this.vwr.getModelUndeletedAtomsBitSet(v),j=p.nextSetBit(0)),
A=this.vwr.shm.getShapePropertyIndex(18,"mad",j),y=null!=A&&0!=A.intValue()||this.vwr.tm.vibrationOn,A=null!=c&&0<=c.toUpperCase().indexOf(":POLY")){s=u(-1,[Integer.$valueOf(j),null]);this.vwr.shm.getShapePropertyData(21,"points",s);j=s[1];if(null==j)return null;p=null;y=!1;s=null}else j=this.at;var w;if(null!=c&&0<=(w=c.indexOf(":")))c=c.substring(0,w);if(null!=c&&0<=(w=c.indexOf(".")))e=JU.PT.parseInt(c.substring(w+1)),0>e&&(e=0),c=c.substring(0,w);s=m.setPointGroup(this.vwr,s,k,j,p,y,q?0:this.vwr.getFloat(570425382),
this.vwr.getFloat(570425384),null==p?j.length:p.cardinality(),n);!A&&!q&&(this.pointGroup=s);if(!d&&!b)return s.getPointGroupName();d=s.getPointGroupInfo(v,g,b,c,e,f);return b?d:(1<this.mc?"frame "+this.getModelNumberDotted(v)+"; ":"")+d},"JU.BS,~B,~B,~S,~N,~N,~A,JU.P3,~S");c(b,"getDefaultStructure",function(a,d){return this.haveBioModels?this.bioModelset.getAllDefaultStructures(a,d):""},"JU.BS,JU.BS");c(b,"deleteModelBonds",function(a){a=this.getModelAtomBitSetIncludingDeleted(a,!1);this.makeConnections(0,
3.4028235E38,131071,12291,a,a,null,!1,!1,0)},"~N");c(b,"makeConnections",function(a,d,b,c,e,f,j,k,g,s){this.moleculeCount=0;var m=1073741852==c&&2048!=b?new JU.SB:null;a=this.makeConnections2(a,d,b,c,e,f,j,k,g,s,m);null!=m&&this.addStateScript(m.toString(),null,null,null,null,!1,!0);return a},"~N,~N,~N,~N,JU.BS,JU.BS,JU.BS,~B,~B,~N");c(b,"setPdbConectBonding",function(a,d,b){for(var c=this.vwr.getMadBond();d<this.mc;d++){var e=this.getInfo(d,"PDB_CONECT_bonds");if(null!=e){var f=e.size();this.setInfo(d,
"initialBondCount",Integer.$valueOf(f));var j=this.getInfo(d,"PDB_CONECT_firstAtom_count_max"),k=j[0]+a,g=k+j[1];g>this.atomSerials.length&&(g=this.atomSerials.length);for(var j=j[2],s=E(j+1,0),m=k;m<g;m++)if(0<(k=this.atomSerials[m]))s[k]=m+1;for(g=0;g<f;g++){var k=e.get(g),m=k[0],p=k[1],k=k[2];if(!(0>m||0>p||m>j||p>j))if(m=s[m]-1,p=s[p]-1,!(0>m||0>p)){var y=this.at[m],A=this.at[p];null!=b&&(y.isHetero()&&b.set(m),A.isHetero()&&b.set(p));if(y.altloc==A.altloc||"\x00"==y.altloc||"\x00"==A.altloc)this.getOrAddBond(y,
A,k,2048==k?1:c,null,0,!1)}}}}},"~N,~N,JU.BS");c(b,"deleteAllBonds",function(){this.moleculeCount=0;for(var a=this.stateScripts.size();0<=--a;)this.stateScripts.get(a).isConnect()&&this.stateScripts.removeItemAt(a);this.deleteAllBonds2()});c(b,"includeAllRelatedFrames",function(a){for(var d=0,b=0;b<this.mc;b++){var c=this.isTrajectory(b),e=c&&a.get(d=this.am[b].trajectoryBaseIndex);if(a.get(b)){if(c&&!e){a.set(d);this.includeAllRelatedFrames(a);break}}else(c||this.isJmolDataFrameForModel(b)&&a.get(this.am[b].dataSourceFrame))&&
a.set(b)}},"JU.BS");c(b,"deleteModels",function(a){this.includeAllRelatedFrames(a);var d=a.cardinality();if(0==d)return null;this.moleculeCount=0;null!=this.msInfo&&this.msInfo.remove("models");for(var b=new JU.BS,c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1))this.clearDataFrameReference(c),b.or(this.am[c].bsAtoms);var e;if(d==this.mc)return e=this.getModelAtomBitSetIncludingDeleted(-1,!0),this.vwr.zap(!0,!1,!1),e;this.validateBspf(!1);e=new JU.BS;for(var f=!0,j=!1,k=new JU.BS,g=b.nextSetBit(0),c=0;c<
this.mc;c++)b=this.am[c],c<this.mc-1&&(f=(new Boolean(f&(b.isOrderly||b.bsAtoms.length()<=g))).valueOf()),a.get(c)?(0<=b.fileIndex&&k.set(b.fileIndex),e.or(this.getModelAtomBitSetIncludingDeleted(c,!1))):0<=b.fileIndex&&k.get(b.fileIndex)&&(j=!0);if(!f||j)return this.vwr.deleteAtoms(e,!1),null;d=Array(this.mc-d);f=this.am;for(j=c=0;c<this.mc;c++)a.get(c)||(b=this.am[c],b.modelIndex=j,d[j++]=b);this.am=d;b=this.mc;k=this.getBondsForSelectedAtoms(e,!0);this.deleteBonds(k,!0);for(j=c=0;c<b;c++)if(a.get(c)){var s=
f[c],g=s.act;if(0!=g){var m=s.bsAtoms,s=s.firstAtomIndex;JU.BSUtil.deleteBits(this.bsSymmetry,m);this.deleteModel(j,m,k);this.deleteModelAtoms(s,g,m);this.vwr.deleteModelAtoms(j,s,g,m);for(var p=b;--p>c;)f[p].fixIndices(j,g,m);this.vwr.shm.deleteShapeAtoms(u(-1,[d,this.at,E(-1,[j,s,g])]),m);this.mc--}}else j++;this.haveBioModels=!1;for(c=this.mc;0<=--c;)this.am[c].isBioModel&&(this.haveBioModels=!0,this.bioModelset.set(this.vwr,this));this.validateBspf(!1);this.bsAll=null;this.resetMolecules();this.isBbcageDefault=
!1;this.calcBoundBoxDimensions(null,1);return e},"JU.BS");c(b,"resetMolecules",function(){this.molecules=this.bsAll=null;this.moleculeCount=0;this.resetChirality()});c(b,"resetChirality",function(){if(this.haveChirality)for(var a=-1,d=this.ac;0<=--d;){var b=this.at[d];null!=b&&(b.setCIPChirality(0),b.mi!=a&&b.mi<this.am.length&&(this.am[a=b.mi].hasChirality=!1))}});c(b,"deleteModel",function(a,d,b){if(!(0>a)){this.modelNumbers=JU.AU.deleteElements(this.modelNumbers,a,1);this.modelFileNumbers=JU.AU.deleteElements(this.modelFileNumbers,
a,1);this.modelNumbersForAtomLabel=JU.AU.deleteElements(this.modelNumbersForAtomLabel,a,1);this.modelNames=JU.AU.deleteElements(this.modelNames,a,1);this.frameTitles=JU.AU.deleteElements(this.frameTitles,a,1);this.thisStateModel=-1;var c=this.getInfoM("group3Lists"),e=this.getInfoM("group3Counts"),f=a+1;if(null!=c&&null!=c[f])for(var j=v(c[f].length/6);0<=--j;)0<e[f][j]&&(e[0][j]-=e[f][j],0==e[0][j]&&(c[0]=c[0].substring(0,6*j)+",["+c[0].substring(6*j+2)));null!=c&&(this.msInfo.put("group3Lists",
JU.AU.deleteElements(c,a,1)),this.msInfo.put("group3Counts",JU.AU.deleteElements(e,a,1)));null!=this.unitCells&&(this.unitCells=JU.AU.deleteElements(this.unitCells,a,1));for(j=this.stateScripts.size();0<=--j;)this.stateScripts.get(j).deleteAtoms(a,b,d)||this.stateScripts.removeItemAt(j)}},"~N,JU.BS,JU.BS");c(b,"setAtomProperty",function(a,d,b,c,e,f,j){switch(d){case 1114249217:case 1112152066:case 1112152071:case 1112152073:case 1112152074:case 1649022989:case 1112152078:if(4<c&&(c=4),null!=f){b=
L(this.ac,0);try{var k=a.nextSetBit(0);for(e=0;0<=k;k=a.nextSetBit(k+1))b[k]=f[e++]}catch(g){if(D(g,Exception))return;throw g;}f=b}case 1112152070:case 1112152076:k=null;b=0;null==f?(16<c&&(c=16.1),0>c&&(c=0),b=v(Math.floor(2E3*c))):k=new J.atomdata.RadiusData(f,0,null,null);this.sm.setShapeSizeBs(JV.JC.shapeTokenIndex(d),b,k,a);return}this.setAPm(a,d,b,c,e,f,j)},"JU.BS,~N,~N,~N,~S,~A,~A");c(b,"getFileData",function(a){if(0>a)return"";var d=this.getInfo(a,"fileData");if(null!=d)return d;if(!this.getInfoB(a,
"isCIF"))return this.getPDBHeader(a);d=this.vwr.getCifData(a);this.setInfo(a,"fileData",d);return d},"~N");c(b,"addHydrogens",function(a,d){var b=a.get(0).mi,c=new JU.BS;if(this.isTrajectory(b)||1<this.am[b].getGroupCount())return c;this.growAtomArrays(this.ac+d.length);var e=this.vwr.rd,f=this.getDefaultMadFromOrder(1);this.am[b].resetDSSR(!1);for(var j=0,k=this.am[b].act+1;j<a.size();j++,k++){var g=a.get(j),s=this.addAtom(b,g.group,1,"H"+k,null,k,g.getSeqID(),k,d[j],NaN,null,0,0,100,NaN,null,!1,
!1,0,null,NaN);s.setMadAtom(this.vwr,e);c.set(s.i);this.bondAtoms(g,s,1,f,null,0,!1,!1)}this.sm.loadDefaultShapes(this);return c},"JU.Lst,~A");c(b,"mergeModelArrays",function(a){this.at=a.at;this.bo=a.bo;this.stateScripts=a.stateScripts;this.proteinStructureTainted=a.proteinStructureTainted;this.thisStateModel=-1;this.bsSymmetry=a.bsSymmetry;this.modelFileNumbers=a.modelFileNumbers;this.modelNumbersForAtomLabel=a.modelNumbersForAtomLabel;this.modelNames=a.modelNames;this.modelNumbers=a.modelNumbers;
this.frameTitles=a.frameTitles;this.haveChirality=a.haveChirality;this.boxInfo.setBoundBox(a.boxInfo.bbCorner0,a.boxInfo.bbCorner1,!0,1);null!=this.msInfo&&this.msInfo.remove("models");this.mergeAtomArrays(a)},"JM.ModelSet");c(b,"getUnitCell",function(a){var d=-2147483648==a,b=!d&&0>a;d?a=this.vwr.am.cmi:b&&(a=-1-a);if(0>a||a>=this.mc)return null;this.isTrajectory(a)&&(a=this.am[a].trajectoryBaseIndex);var c=this.am[a].simpleCage,e=null;null!=this.unitCells&&(a<this.unitCells.length&&null!=this.unitCells[a]&&
this.unitCells[a].haveUnitCell())&&(e=this.unitCells[a]);if(null!=e){if(d)return d=this.vwr.getUnitCellAtomIndex(),0<d&&(e=this.getUnitCellForAtom(d)),null==c?this.setModelCagePts(a,e.getUnitCellVectors(),"cage"):c;if(b)return e}if(null==e||null!=c&&!e.isSymmetryCell(c))e=c;return e},"~N");c(b,"setModelCagePts",function(a,d,b){if(0>a&&0>(a=this.vwr.am.cmi))return null;var c=this.vwr.getSymTemp();try{return this.setModelCage(a,null==d?null:c.getUnitCell(d,!1,b))}catch(e){if(D(e,Exception))return e.printStackTrace(),
null;throw e;}},"~N,~A,~S");c(b,"getModelName",function(a){return 1>this.mc?"":0<=a?this.modelNames[a]:this.modelNumbersForAtomLabel[-1-a]},"~N");c(b,"getModelTitle",function(a){return this.getInfo(a,"title")},"~N");c(b,"getModelFileName",function(a){return this.getInfo(a,"fileName")},"~N");c(b,"getModelFileType",function(a){return this.getInfo(a,"fileType")},"~N");c(b,"setFrameTitle",function(a,d){if("string"==typeof d)for(var b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1))this.frameTitles[b]=d;else for(var b=
a.nextSetBit(0),c=0;0<=b;b=a.nextSetBit(b+1))c<d.length&&(this.frameTitles[b]=d[c++])},"JU.BS,~O");c(b,"getFrameTitle",function(a){return 0<=a&&a<this.mc?this.frameTitles[a]:""},"~N");c(b,"getModelNumberForAtomLabel",function(a){return this.modelNumbersForAtomLabel[a]},"~N");c(b,"getGroups",function(){for(var a=0,d=0;d<this.mc;d++)a+=this.am[d].getGroupCount();for(var a=Array(a),b=d=0;d<this.mc;d++)for(var c=0;c<this.am[d].chainCount;c++)for(var e=0;e<this.am[d].chains[c].groupCount;e++)a[b]=this.am[d].chains[c].groups[e],
a[b].groupIndex=b,b++;return a});c(b,"setCrystallographicDefaults",function(){return!this.haveBioModels&&(this.someModelsHaveSymmetry&&this.someModelsHaveFractionalCoordinates||null!=this.getUnitCell(this.vwr.am.cmi))});c(b,"getBoundBoxCenter",function(a){return this.isJmolDataFrameForModel(a)?new JU.P3:(null==this.getDefaultBoundBox()?this.boxInfo:this.defaultBBox).getBoundBoxCenter()},"~N");c(b,"getBoundBoxCornerVector",function(){return this.boxInfo.getBoundBoxCornerVector()});c(b,"getBBoxVertices",
function(){return this.boxInfo.getBoundBoxVertices()});c(b,"setBoundBox",function(a,d,b,c){0==c&&null!=this.msInfo&&(this.msInfo.remove("boundbox"),this.defaultBBox=null,this.isBbcageDefault=!1,this.calcBoundBoxDimensions(null,c=1));this.isBbcageDefault=!1;this.bboxAtoms=this.bboxModels=null;this.boxInfo.setBoundBox(a,d,b,c)},"JU.T3,JU.T3,~B,~N");c(b,"getBoundBoxCommand",function(a){if(!a&&null!=this.bboxAtoms)return"boundbox "+JU.Escape.eBS(this.bboxAtoms);this.ptTemp.setT(this.boxInfo.getBoundBoxCenter());
var d=this.boxInfo.getBoundBoxCornerVector();a=a?"boundbox "+JU.Escape.eP(this.ptTemp)+" "+JU.Escape.eP(d)+"\n#or\n":"";this.ptTemp.sub(d);a+="boundbox corners "+JU.Escape.eP(this.ptTemp)+" ";this.ptTemp.scaleAdd2(2,d,this.ptTemp);d=Math.abs(8*d.x*d.y*d.z);return a+=JU.Escape.eP(this.ptTemp)+" # volume = "+d},"~B");c(b,"findAtomsInRectangle",function(a){for(var d=this.vwr.getVisibleFramesBitSet(),b=new JU.BS,c=this.ac;0<=--c;){var e=this.at[c];JM.AtomCollection.isDeleted(e)||(d.get(e.mi)?e.checkVisible()&&
a.contains(e.sX,e.sY)&&b.set(c):c=this.am[e.mi].firstAtomIndex)}return b},"JU.Rectangle");c(b,"getDefaultVdwType",function(a){return!this.am[a].isBioModel?J.c.VDW.AUTO_BABEL:0==this.am[a].hydrogenCount?J.c.VDW.AUTO_JMOL:J.c.VDW.AUTO_BABEL},"~N");c(b,"setRotationRadius",function(a,d){return this.isJmolDataFrameForModel(a)?(this.am[a].defaultRotationRadius=d,!1):!0},"~N,~N");c(b,"calcRotationRadius",function(a,d,b){if(this.isJmolDataFrameForModel(a))return a=this.am[a].defaultRotationRadius,0==a?10:
a;if(b&&null!=this.getDefaultBoundBox())return 1.2*(this.defaultBBox.getMaxDim()/2);if(0==this.ac)return 10;a=-2;b=0;for(var c=this.ac;0<=--c;){var e=this.at[c];if(!JM.AtomCollection.isDeleted(e))if(this.isJmolDataFrameForAtom(e)){for(a=e.mi;0<=c&&null!=this.at[c]&&this.at[c].mi==a;)c--;c++}else{if(e.mi!=a){a=e.mi;var f=this.am[a].isBioModel?null:this.getUnitCell(a);if(null!=f)for(var j=f.getUnitCellVerticesNoOffset(),f=f.getCartesianOffset(),k=0;8>k;k++)this.ptTemp.setT(j[k]),this.ptTemp.add(f),
b=Math.max(b,d.distance(this.ptTemp))}e=d.distance(e)+this.getRadiusVdwJmol(e);e>b&&(b=e)}}return 0==b?10:b},"~N,JU.P3,~B");c(b,"calcBoundBoxDimensions",function(a,d){null!=a&&0>a.nextSetBit(0)&&(a=null);if(!(null==a&&this.isBbcageDefault||0==this.ac)){if(null==this.getDefaultBoundBox())this.bboxModels=this.getModelBS(this.bboxAtoms=JU.BSUtil.copy(a),!1),this.calcAtomsMinMax(a,this.boxInfo)==this.ac&&(this.isBbcageDefault=!0),null==a&&null!=this.unitCells&&this.calcUnitCellMinMax();else{var b=this.defaultBBox.getBoundBoxVertices();
this.boxInfo.reset();for(var c=0;8>c;c++)this.boxInfo.addBoundBoxPoint(b[c])}this.boxInfo.setBbcage(d)}},"JU.BS,~N");c(b,"getDefaultBoundBox",function(){var a=this.getInfoM("boundbox");null==a?this.defaultBBox=null:(null==this.defaultBBox&&(this.defaultBBox=new JU.BoxInfo),this.defaultBBox.setBoundBoxFromOABC(a));return this.defaultBBox});c(b,"getBoxInfo",function(a,d){if(null==a)return this.boxInfo;var b=new JU.BoxInfo;this.calcAtomsMinMax(a,b);b.setBbcage(d);return b},"JU.BS,~N");c(b,"calcAtomsMinMax",
function(a,d){d.reset();for(var b=0,c=null==a,e=c?this.ac-1:a.nextSetBit(0);0<=e;e=c?e-1:a.nextSetBit(e+1)){b++;var f=this.at[e];null!=f&&!this.isJmolDataFrameForAtom(f)&&d.addBoundBoxPoint(f)}return b},"JU.BS,JU.BoxInfo");c(b,"calcUnitCellMinMax",function(){for(var a=new JU.P3,d=0;d<this.mc;d++){var b=this.unitCells[d];if(null!=b&&b.getCoordinatesAreFractional())for(var c=b.getUnitCellVerticesNoOffset(),b=b.getCartesianOffset(),e=0;8>e;e++)a.add2(b,c[e]),this.boxInfo.addBoundBoxPoint(a)}});c(b,"calcRotationRadiusBs",
function(a){for(var d=this.getAtomSetCenter(a),b=0,c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1)){var e=this.at[c],e=d.distance(e)+this.getRadiusVdwJmol(e);e>b&&(b=e)}return 0==b?10:b},"JU.BS");c(b,"getCenterAndPoints",function(a,d){for(var b,c,e=d?1:0,f=a.size();0<=--f;){var j=a.get(f);b=j[0];C(j[1],"JU.BS")?(c=j[1],e+=Math.min(b.cardinality(),c.cardinality())):e+=Math.min(b.cardinality(),j[1].length)}var k=u(2,e,null);d&&(k[0][0]=new JU.P3,k[1][0]=new JU.P3);for(f=a.size();0<=--f;)if(j=a.get(f),b=
j[0],C(j[1],"JU.BS")){c=j[1];for(var j=b.nextSetBit(0),g=c.nextSetBit(0);0<=j&&0<=g;j=b.nextSetBit(j+1),g=c.nextSetBit(g+1))k[0][--e]=this.at[j],k[1][e]=this.at[g],d&&(k[0][0].add(this.at[j]),k[1][0].add(this.at[g]))}else{c=j[1];for(var s=0,j=b.nextSetBit(0),g=0;0<=j&&g<c.length;j=b.nextSetBit(j+1),g++,s++)d?(k[0][0].add(this.at[j]),k[1][0].add(c[g]),k[0][--e]=this.at[j],k[1][e]=c[g]):(k[0][s]=this.at[j],k[1][s]=c[g])}d&&(k[0][0].scale(1/(k[0].length-1)),k[1][0].scale(1/(k[1].length-1)));return k},
"JU.Lst,~B");c(b,"getAtomSetCenter",function(a){for(var d=new JU.P3,b=0,c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1))this.isJmolDataFrameForAtom(this.at[c])||(b++,d.add(this.at[c]));1<b&&d.scale(1/b);return d},"JU.BS");c(b,"getAverageAtomPoint",function(){return this.getAtomSetCenter(this.vwr.bsA())});c(b,"setAPm",function(a,d,b,c,e,f,j){this.setAPa(a,d,b,c,e,f,j);switch(d){case 1094715418:case 1631586315:this.vwr.getBoolean(603979944)&&this.assignAromaticBondsBs(!0,null)}},"JU.BS,~N,~N,~N,~S,~A,~A");
c(b,"addStateScript",function(a,d,b,c,e,f,j){var k=this.vwr.am.cmi;f?(this.thisStateModel!=k&&(a="frame "+(0>k?"all #"+k:this.getModelNumberDotted(k))+";\n  "+a),this.thisStateModel=k):this.thisStateModel=-1;a=new JM.StateScript(this.thisStateModel,a,d,b,c,e,j);a.isValid()&&this.stateScripts.addLast(a);return a},"~S,JU.BS,JU.BS,JU.BS,~S,~B,~B");c(b,"freezeModels",function(){this.haveBioModels=!1;for(var a=this.mc;0<=--a;)this.haveBioModels=(new Boolean(this.haveBioModels|this.am[a].freeze())).valueOf()});
c(b,"getStructureList",function(){return this.vwr.getStructureList()});c(b,"getInfoM",function(a){return null==this.msInfo?null:this.msInfo.get(a)},"~S");c(b,"getMSInfoB",function(a){a=this.getInfoM(a);return C(a,Boolean)&&a.booleanValue()},"~S");c(b,"isTrajectory",function(a){return this.am[a].isTrajectory},"~N");c(b,"isTrajectorySubFrame",function(a){return this.am[a].trajectoryBaseIndex!=a},"~N");c(b,"isTrajectoryMeasurement",function(a){return null!=this.trajectory&&this.trajectory.hasMeasure(a)},
"~A");c(b,"getModelBS",function(a,d){var b=new JU.BS,c=0,e=null==a;d=(new Boolean(d&null!=this.trajectory)).valueOf();for(var f=e?0:a.nextSetBit(0);0<=f&&f<this.ac;f=e?f+1:a.nextSetBit(f+1))JM.AtomCollection.isDeleted(this.at[f])||(b.set(c=this.at[f].mi),d&&this.trajectory.getModelBS(c,b),c=this.am[c],c.isOrderly&&(f=c.firstAtomIndex+c.act-1));return b},"JU.BS,~B");c(b,"getIterativeModels",function(a){for(var d=new JU.BS,b=0;b<this.mc;b++)if(a||!this.isJmolDataFrameForModel(b))this.isTrajectorySubFrame(b)||
d.set(b);return d},"~B");c(b,"fillAtomData",function(a,d){if(0!=(d&4)){this.getMolecules();a.bsMolecules=Array(this.molecules.length);a.atomMolecule=E(this.ac,0);for(var b,c=0;c<this.molecules.length;c++){b=a.bsMolecules[c]=this.molecules[c].atomList;for(var e=b.nextSetBit(0);0<=e;e=b.nextSetBit(e+1))a.atomMolecule[e]=c}}0!=(d&8)?(b=E(1,0),a.hAtomRadius=this.vwr.getVanderwaalsMar(1)/1E3,a.hAtoms=this.calculateHydrogens(a.bsSelected,b,null,512),a.hydrogenAtomCount=b[0]):(a.firstAtomIndex=0>a.modelIndex?
null==a.bsSelected?0:Math.max(0,a.bsSelected.nextSetBit(0)):this.am[a.modelIndex].firstAtomIndex,a.lastModelIndex=a.firstModelIndex=0==this.ac?0:this.at[a.firstAtomIndex].mi,a.modelName=this.getModelNumberDotted(a.firstModelIndex),this.fillADa(a,d))},"J.atomdata.AtomData,~N");c(b,"getModelNumberDotted",function(a){return 1>this.mc||a>=this.mc||0>a?"":JU.Escape.escapeModelFileNumber(this.modelFileNumbers[a])},"~N");c(b,"getModelNumber",function(a){return this.modelNumbers[2147483647==a?this.mc-1:a]},
"~N");c(b,"getModelProperty",function(a,d){var b=this.am[a].properties;return null==b?null:b.getProperty(d)},"~N,~S");c(b,"getModelAuxiliaryInfo",function(a){return 0>a?null:this.am[a].auxiliaryInfo},"~N");c(b,"setInfo",function(a,d,b){0<=a&&a<this.mc&&(null==b?this.am[a].auxiliaryInfo.remove(d):this.am[a].auxiliaryInfo.put(d,b))},"~N,~O,~O");c(b,"getInfo",function(a,d){return 0>a?null:this.am[a].auxiliaryInfo.get(d)},"~N,~S");c(b,"getInfoB",function(a,d){var b=this.am[a].auxiliaryInfo;return null!=
b&&b.containsKey(d)&&b.get(d).booleanValue()},"~N,~S");c(b,"getInfoI",function(a,d){var b=this.am[a].auxiliaryInfo;return null!=b&&b.containsKey(d)?b.get(d).intValue():-2147483648},"~N,~S");c(b,"getInsertionCountInModel",function(a){return this.am[a].insertionCount},"~N");b.modelFileNumberFromFloat=c(b,"modelFileNumberFromFloat",function(a){var d=v(Math.floor(a));for(a=v(Math.floor(1E4*(a-d+1E-5)));0!=a&&0==a%10;)a/=10;return 1E6*d+a},"~N");c(b,"getChainCountInModelWater",function(a,d){if(0>a){for(var b=
0,c=this.mc;0<=--c;)b+=this.am[c].getChainCount(d);return b}return this.am[a].getChainCount(d)},"~N,~B");c(b,"getGroupCountInModel",function(a){if(0>a){a=0;for(var d=this.mc;0<=--d;)a+=this.am[d].getGroupCount();return a}return this.am[a].getGroupCount()},"~N");c(b,"calcSelectedGroupsCount",function(){for(var a=this.vwr.bsA(),d=this.mc;0<=--d;)this.am[d].calcSelectedGroupsCount(a)});c(b,"isJmolDataFrameForModel",function(a){return this.haveJmolDataFrames&&null!=this.am&&0<=a&&a<this.mc&&this.am[a].isJmolDataFrame},
"~N");c(b,"isJmolDataFrameForAtom",function(a){return this.haveJmolDataFrames&&this.am[a.mi].isJmolDataFrame},"JM.Atom");c(b,"setJmolDataFrame",function(a,d,b){this.haveJmolDataFrames=!0;var c=this.am[null==a?this.am[b].dataSourceFrame:d];null==a&&(a=this.am[b].jmolFrameType);0<=d&&(null==c.dataFrames&&(c.dataFrames=new java.util.Hashtable),this.am[b].dataSourceFrame=d,this.am[b].jmolFrameType=a,c.dataFrames.put(a,Integer.$valueOf(b)));a.startsWith("quaternion")&&0>a.indexOf("deriv")&&(a=a.substring(0,
a.indexOf(" ")),c.dataFrames.put(a,Integer.$valueOf(b)))},"~S,~N,~N");c(b,"getJmolDataFrameIndex",function(a,d){if(null==this.am[a].dataFrames)return-1;var b=this.am[a].dataFrames.get(d);return null==b?-1:b.intValue()},"~N,~S");c(b,"clearDataFrameReference",function(a){for(var d=0;d<this.mc;d++){var b=this.am[d].dataFrames;if(null!=b)for(b=b.values().iterator();b.hasNext();)b.next().intValue()==a&&b.remove()}},"~N");c(b,"getJmolFrameType",function(a){return 0<=a&&a<this.mc?this.am[a].jmolFrameType:
"modelSet"},"~N");c(b,"getJmolDataSourceFrame",function(a){return 0<=a&&a<this.mc?this.am[a].dataSourceFrame:-1},"~N");c(b,"saveModelOrientation",function(a,d){this.am[a].orientation=d},"~N,JM.Orientation");c(b,"getModelOrientation",function(a){return this.am[a].orientation},"~N");c(b,"getPDBHeader",function(a){return this.am[a].isBioModel?this.am[a].getFullPDBHeader():this.getFileHeader(a)},"~N");c(b,"getFileHeader",function(a){if(0>a)return"";if(this.am[a].isBioModel)return this.getPDBHeader(a);
a=this.getInfo(a,"fileHeader");null==a&&(a=this.modelSetName);return null!=a?a:"no header information found"},"~N");c(b,"getAltLocCountInModel",function(a){return this.am[a].altLocCount},"~N");c(b,"getAltLocIndexInModel",function(a,d){if("\x00"==d)return 0;var b=this.getAltLocListInModel(a);return 0==b.length?0:b.indexOf(d)+1},"~N,~S");c(b,"getInsertionCodeIndexInModel",function(a,d){if("\x00"==d)return 0;var b=this.getInsertionListInModel(a);return 0==b.length?0:b.indexOf(d)+1},"~N,~S");c(b,"getAltLocListInModel",
function(a){a=this.getInfo(a,"altLocs");return null==a?"":a},"~N");c(b,"getInsertionListInModel",function(a){a=this.getInfo(a,"insertionCodes");return null==a?"":a},"~N");c(b,"getModelSymmetryCount",function(a){return 0<this.am[a].biosymmetryCount?this.am[a].biosymmetryCount:null==this.unitCells||null==this.unitCells[a]?0:this.unitCells[a].getSpaceGroupOperationCount()},"~N");c(b,"getModelCellRange",function(a){return null==this.unitCells?null:this.unitCells[a].getCellRange()},"~N");c(b,"getLastVibrationVector",
function(a,d){if(null!=this.vibrations&&a<this.vwr.ms.mc)for(var b,c=0>a||this.isTrajectory(a)||a>=this.mc-1?this.ac:this.am[a+1].firstAtomIndex,e=0>=a?0:this.am[a].firstAtomIndex;--c>=e;)if((0>a||!JM.AtomCollection.isDeleted(this.at[c])&&this.at[c].mi==a)&&((1275072532==d||0==d)&&null!=(b=this.getModulation(c))||(4166==d||0==d)&&null!=(b=this.getVibration(c,!1)))&&b.isNonzero())return c;return-1},"~N,~N");c(b,"getModulationList",function(a,d,b){var c=new JU.Lst;if(null!=this.vibrations)for(var e=
a.nextSetBit(0);0<=e;e=a.nextSetBit(e+1))C(this.vibrations[e],"J.api.JmolModulationSet")?c.addLast(this.vibrations[e].getModulation(d,b,!1)):c.addLast(Float.$valueOf("O"==d?NaN:-1));return c},"JU.BS,~S,JU.P3");c(b,"getElementsPresentBitSet",function(a){if(0<=a)return this.elementsPresent[a];a=new JU.BS;for(var d=0;d<this.mc;d++)a.or(this.elementsPresent[d]);return a},"~N");c(b,"getMoleculeIndex",function(a,d){0==this.moleculeCount&&this.getMolecules();for(var b=0;b<this.moleculeCount;b++)if(this.molecules[b].atomList.get(a))return d?
this.molecules[b].indexInModel:b;return 0},"~N,~B");c(b,"getMoleculeBitSet",function(a){0==this.moleculeCount&&this.getMolecules();var d=JU.BSUtil.copy(a);a=JU.BSUtil.copy(a);for(var b=0,c=new JU.BS;0<=(b=a.length()-1);)c=this.getMoleculeBitSetForAtom(b),null==c?(a.clear(b),d.clear(b)):(a.andNot(c),d.or(c));return d},"JU.BS");c(b,"getMoleculeBitSetForAtom",function(a){0==this.moleculeCount&&this.getMolecules();for(var d=0;d<this.moleculeCount;d++)if(this.molecules[d].atomList.get(a))return this.molecules[d].atomList;
return null},"~N");c(b,"getModelDipole",function(a){if(0>a)return null;var d=this.getInfo(a,"dipole");null==d&&(d=this.getInfo(a,"DIPOLE_VEC"));return d},"~N");c(b,"calculateMolecularDipole",function(a,d){if(null!=d){var b=d.nextSetBit(0);if(0>b)return null;a=this.at[b].mi}if(0>a)return null;var c=b=0,e=0,f=0,j=new JU.V3,k=new JU.V3;null==d&&(d=this.getModelAtomBitSetIncludingDeleted(-1,!1));this.vwr.getOrCalcPartialCharges(this.am[a].bsAtoms,null);for(var g=d.nextSetBit(0);0<=g;g=d.nextSetBit(g+
1))if(!(JM.AtomCollection.isDeleted(this.at[g])||this.at[g].mi!=a)){var s=this.partialCharges[g];0>s?(c++,f+=s,k.scaleAdd2(s,this.at[g],k)):0<s&&(b++,e+=s,j.scaleAdd2(s,this.at[g],j))}if(0.015<Math.abs(e+f))return JU.Logger.info("Dipole calculation requires balanced charges: "+e+" "+f),null;if(0==c||0==b)return null;j.add(k);j.scale(4.8);return j},"~N,JU.BS");c(b,"getMoleculeCountInModel",function(a){var d=0;0==this.moleculeCount&&this.getMolecules();if(0>a)return this.moleculeCount;for(var b=0;b<
this.mc;b++)a==b&&(d+=this.am[b].moleculeCount);return d},"~N");c(b,"calcSelectedMoleculesCount",function(){var a=this.vwr.bsA();0==this.moleculeCount&&this.getMolecules();this.selectedMolecules.xor(this.selectedMolecules);for(var d=new JU.BS,b=0;b<this.moleculeCount;b++)JU.BSUtil.copy2(a,d),d.and(this.molecules[b].atomList),0<d.length()&&this.selectedMolecules.set(b)});c(b,"setCentroid",function(a,d){var b=this.getNotInCentroid(a,d);null!=b&&0<=b.nextSetBit(0)&&this.vwr.deleteAtoms(b,!1)},"JU.BS,~A");
c(b,"getNotInCentroid",function(a,d){var b=a.nextSetBit(0);if(0>b)return null;b=this.getUnitCell(this.at[b].mi);return null==b?null:b.notInCentroid(this,a,d)},"JU.BS,~A");c(b,"getMolecules",function(){if(0<this.moleculeCount)return this.molecules;null==this.molecules&&(this.molecules=Array(4));this.moleculeCount=0;for(var a=null,d=Array(this.mc),b=null,c=0;c<this.mc;c++)d[c]=this.vwr.getModelUndeletedAtomsBitSet(c),a=this.am[c],a.moleculeCount=0,b=a.isBioModel?a.getBioBranches(b):null;this.molecules=
JU.JmolMolecule.getMolecules(this.at,d,b,null);for(c=this.moleculeCount=this.molecules.length;0<=--c;)a=this.am[this.molecules[c].modelIndex],a.firstMoleculeIndex=c,a.moleculeCount++;return this.molecules});c(b,"initializeBspf",function(){if(!(null!=this.bspf&&this.bspf.isValid)){this.showRebondTimes&&JU.Logger.startTimer("build bspf");var a=new J.bspt.Bspf(3);JU.Logger.debugging&&JU.Logger.debug("sequential bspt order");for(var d=JU.BS.newN(this.mc),b=this.ac;0<=--b;){var c=this.at[b];!JM.AtomCollection.isDeleted(c)&&
!this.isTrajectorySubFrame(c.mi)&&(a.addTuple(this.am[c.mi].trajectoryBaseIndex,c),d.set(c.mi))}this.showRebondTimes&&(JU.Logger.checkTimer("build bspf",!1),a.stats());for(b=d.nextSetBit(0);0<=b;b=d.nextSetBit(b+1))a.validateModel(b,!0);a.isValid=!0;this.bspf=a}});c(b,"initializeBspt",function(a){this.initializeBspf();this.bspf.isInitializedIndex(a)||this.bspf.initialize(a,this.at,this.vwr.getModelUndeletedAtomsBitSet(a))},"~N");c(b,"setIteratorForPoint",function(a,d,b,c){0>d?a.setCenter(b,c):(this.initializeBspt(d),
a.setModel(this,d,this.am[d].firstAtomIndex,2147483647,b,c,null))},"J.api.AtomIndexIterator,~N,JU.T3,~N");c(b,"setIteratorForAtom",function(a,d,b,c,e){0>d&&(d=this.at[b].mi);d=this.am[d].trajectoryBaseIndex;this.initializeBspt(d);a.setModel(this,d,this.am[d].firstAtomIndex,b,this.at[b],c,e)},"J.api.AtomIndexIterator,~N,~N,~N,J.atomdata.RadiusData");c(b,"getSelectedAtomIterator",function(a,d,b,c,e){this.initializeBspf();if(e){e=this.getModelBS(a,!1);for(var f=e.nextSetBit(0);0<=f;f=e.nextSetBit(f+
1))this.initializeBspt(f);e=new JM.AtomIteratorWithinModelSet(e)}else e=new JM.AtomIteratorWithinModel;e.initialize(this.bspf,a,d,b,c,this.vwr.isParallel());return e},"JU.BS,~B,~B,~B,~B");g(b,"getBondCountInModel",function(a){return 0>a?this.bondCount:this.am[a].getBondCount()},"~N");c(b,"getAtomCountInModel",function(a){return 0>a?this.ac:this.am[a].act},"~N");c(b,"getModelAtomBitSetIncludingDeletedBs",function(a){var d=new JU.BS;null==a&&null==this.bsAll&&(this.bsAll=JU.BSUtil.setAll(this.ac));
if(null==a)d.or(this.bsAll);else for(var b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1))d.or(this.getModelAtomBitSetIncludingDeleted(b,!1));return d},"JU.BS");c(b,"getModelAtomBitSetIncludingDeleted",function(a,d){var b=0>a?this.bsAll:this.am[a].bsAtoms;null==b&&(b=this.bsAll=JU.BSUtil.setAll(this.ac));return d?JU.BSUtil.copy(b):b},"~N,~B");c(b,"getAtomBitsMaybeDeleted",function(a,d){var b;switch(a){default:return this.getAtomBitsMDa(a,d,new JU.BS);case 1073741925:case 1073742189:case 1111490587:case 1073742128:case 1073741863:case 1086324744:return b=
new JU.BS,this.haveBioModels?this.bioModelset.getAtomBitsStr(a,d,b):b;case 1677721602:case 1073742331:return this.getAtomBitsMDb(a,d);case 1812599299:var c=this.getBoxInfo(d,1);b=this.getAtomsWithin(c.getBoundBoxCornerVector().length()+1E-4,c.getBoundBoxCenter(),null,-1);for(var e=b.nextSetBit(0);0<=e;e=b.nextSetBit(e+1))c.isWithin(this.at[e])||b.clear(e);return b;case 1094713350:b=JU.BSUtil.newBitSet2(0,this.ac);for(var e=d,f=E(-1,[F(e.x)-1,F(e.y)-1,F(e.z)-1,F(e.x),F(e.y),F(e.z),0]),e=this.mc;0<=
--e;)c=this.getUnitCell(e),null==c?JU.BSUtil.andNot(b,this.am[e].bsAtoms):b.andNot(c.notInCentroid(this,this.am[e].bsAtoms,f));return b;case 1094713360:return this.getMoleculeBitSet(d);case 1073742363:return this.getSelectCodeRange(d);case 2097196:b=JU.BS.newN(this.ac);c=-1;f=0;for(e=this.ac;0<=--e;){var j=this.at[e];if(!JM.AtomCollection.isDeleted(j)){var k=j.atomSymmetry;if(null!=k){if(j.mi!=c){c=j.mi;if(null==this.getModelCellRange(c))continue;f=this.getModelSymmetryCount(c)}for(var j=0,g=f;0<=
--g;)if(k.get(g)&&1<++j){b.set(e);break}}}}return b;case 1088421903:return JU.BSUtil.copy(null==this.bsSymmetry?this.bsSymmetry=JU.BS.newN(this.ac):this.bsSymmetry);case 1814695966:if("unitcell".equals(d))d=JU.P3.new3(1,1,1);else{b=new JU.BS;j=null!=d;c=C(d,"J.api.SymmetryInterface")?d:null;if(j&&null==c)return b;j&&(c=c.getUnitCellMultiplied());f=c;c=-1;for(e=this.ac;0<=--e;)if(null!=this.at[e]){if(!j&&(k=this.at[e].getModelIndex(),k!=c&&(c=k,f=this.getUnitCell(k),null!=f&&(f=f.getUnitCellMultiplied())),
null==f))continue;this.ptTemp1.setT(this.at[e]);f.toFractional(this.ptTemp1,!1);f.checkPeriodic(this.ptTemp1)&&b.set(e)}return b}case 1094713349:b=new JU.BS;c=d;f=this.vwr.getSymTemp();k=-1;for(e=this.ac;0<=--e;)JM.AtomCollection.isDeleted(this.at[e])||(j=this.at[e].getModelIndex(),k!=j&&(k=j,f=this.getUnitCell(k)),null!=f&&(this.ptTemp.setT(this.at[e]),f.toFractional(this.ptTemp,!1),f.isWithinUnitCell(this.ptTemp,c.x,c.y,c.z)&&b.set(e)));return b}},"~N,~O");c(b,"getSelectCodeRange",function(a){var d=
new JU.BS,b=a[0],c=a[1];a=a[2];var e=this.vwr.getBoolean(603979822);0<=a&&(300>a&&!e)&&(a=this.chainToUpper(a));for(var f=this.mc;0<=--f;)if(this.am[f].isBioModel)for(var j=this.am[f],k,g=j.chainCount;0<=--g;){var s=j.chains[g];if(-1==a||a==(k=s.chainID)||!e&&0<k&&300>k&&a==this.chainToUpper(k))for(var m=s.groups,s=s.groupCount,p=0;0<=p;)p=JM.ModelSet.selectSeqcodeRange(m,s,p,b,c,d)}return d},"~A");b.selectSeqcodeRange=c(b,"selectSeqcodeRange",function(a,d,b,c,e,f){var j,k,g,s=!1;for(k=b;k<d&&a[k].seqcode!=
c;k++);if(k==d){if(0<b)return-1;s=!0;g=2147483647;for(var m=d;0<=--m;)if((j=a[m].seqcode)>c&&j-c<g)k=m,g=j-c;if(2147483647==g)return-1}if(2147483647==e)c=d-1,s=!0;else{for(c=k;c<d&&a[c].seqcode!=e;c++);if(c==d){if(0<b)return-1;s=!0;g=2147483647;for(m=k;m<d;m++)if((j=a[m].seqcode)<e&&e-j<g)c=m,g=e-j;if(2147483647==g)return-1}}for(m=k;m<=c;++m)a[m].setAtomBits(f);return s?-1:c+1},"~A,~N,~N,~N,~N,JU.BS");c(b,"getAtomsWithinRadius",function(a,d,b,c,e){var f=new JU.BS;d=JU.BSUtil.andNot(d,this.vwr.slm.bsDeleted);
var j=this.getSelectedAtomIterator(e,!1,!1,!1,!1);if(b){b=!this.vwr.g.legacyJavaFloat;var k=new JU.P3;e=null==e?JU.BSUtil.newBitSet2(0,this.mc):this.getModelBS(e,!1);e.and(this.getIterativeModels(!1));for(var g=d.nextSetBit(0);0<=g;g=d.nextSetBit(g+1))for(var s=e.nextSetBit(0);0<=s;s=e.nextSetBit(s+1))0>a?this.getAtomsWithin(a,this.at[g].getFractionalUnitCoordPt(b,!0,k),f,s):(this.setIteratorForAtom(j,s,g,a,c),j.addAtoms(f))}else{null==e&&f.or(d);for(g=d.nextSetBit(0);0<=g;g=d.nextSetBit(g+1))0>a?
this.getAtomsWithin(a,this.at[g],f,this.at[g].mi):(this.setIteratorForAtom(j,-1,g,a,c),j.addAtoms(f))}j.release();return f},"~N,JU.BS,~B,J.atomdata.RadiusData,JU.BS");c(b,"getAtomsWithin",function(a,d,b,c){null==b&&(b=new JU.BS);if(0>a){a=-a;for(var e=this.ac;0<=--e;){var f=this.at[e];JM.AtomCollection.isDeleted(f)||0<=c&&f.mi!=c||!b.get(e)&&f.getFractionalUnitDistance(d,this.ptTemp1,this.ptTemp2)<=a&&b.set(f.i)}return b}for(var f=this.getSelectedAtomIterator(null,!1,!1,!1,!1),j=0<=c?JU.BSUtil.newAndSetBit(c):
this.getIterativeModels(!0),k=j.nextSetBit(0);0<=k;k=j.nextSetBit(k+1))e=this.am[k].bsAtoms.nextSetBit(0),0>e||(this.setIteratorForAtom(f,c,e,-1,null),f.setCenter(d,a),f.addAtoms(b));f.release();return b},"~N,JU.T3,JU.BS,~N");c(b,"deleteBonds",function(a,d){if(!d)for(var b=new JU.BS,c=new JU.BS,e=a.nextSetBit(0);0<=e;e=a.nextSetBit(e+1)){var f=this.bo[e];if(null!=f){var j=f.atom1;this.am[j.mi].isModelKit||(b.clearAll(),c.clearAll(),b.set(j.i),c.set(f.getAtomIndex2()),this.addStateScript("connect ",
null,b,c,"delete",!1,!0))}}this.dBb(a,d)},"JU.BS,~B");c(b,"makeConnections2",function(a,d,b,c,e,f,j,k,g,s,m){null==j&&(j=new JU.BS);var p=65535==b,y=131071==b,A=65537==b;y&&(b=1);var n=JU.Edge.isOrderH(b),q=!1,u=!1,v=!1,w=!1;switch(c){case 12291:return this.deleteConnections(a,d,b,e,f,k,y);case 603979872:case 1073741852:if(515!=b){if(k){a=e;e=new JU.BS;f=new JU.BS;for(var x=a.nextSetBit(0);0<=x;x=a.nextSetBit(x+1))null!=this.bo[x]&&(e.set(this.bo[x].atom1.i),f.set(this.bo[x].atom2.i))}return E(-1,
[n?this.autoHbond(e,f,!1):this.autoBondBs4(e,f,null,j,this.vwr.getMadBond(),603979872==c,m),0])}u=w=!0;break;case 1086324745:q=u=!0;break;case 1073742025:u=!0;break;case 1073741904:v=!0}c=!q&&!p;this.defaultCovalentMad=this.vwr.getMadBond();m=0>a;var y=0>d,z=m||y,B=!k||0.1!=a||1E8!=d;B&&(a=this.fixD(a,m),d=this.fixD(d,y));var C=this.getDefaultMadFromOrder(b),F=0,G=0,I=null,K=null,L=null,N="\x00",O=b|131072,Q=65535!=b&&0!=(b&512);try{for(x=e.nextSetBit(0);0<=x;x=e.nextSetBit(x+1)){if(k){I=this.bo[x];
if(null==I)continue;K=I.atom1;L=I.atom2}else{K=this.at[x];if(K.isDeleted())continue;N=this.isModulated(x)?"\x00":K.altloc}for(var P=k?0:f.nextSetBit(0);0<=P;P=f.nextSetBit(P+1)){if(k)P=2147483646;else{if(P==x)continue;L=this.at[P];if(null==L||K.mi!=L.mi||L.isDeleted())continue;if("\x00"!=N&&N!=L.altloc&&"\x00"!=L.altloc)continue;I=K.getBond(L)}if(!(null==I?u:v)&&!(B&&!this.isInRange(K,L,a,d,m,y,z)||Q&&null!=I&&!this.allowAromaticBond(I)))if(null==I)j.set(this.bondAtoms(K,L,b,C,j,s,g,!0).index),F++;
else{if(c){if(A){var R=I.order;I.setOrder(b);I.setAtropisomerOptions()?(this.haveAtropicBonds=!0,G++):I.setOrder(R)}else I.setOrder(b);this.bsAromatic.clear(I.index)}if(p||b==I.order||O==I.order||n&&I.isHydrogen())j.set(I.index),G++}}}}catch(S){if(!D(S,Exception))throw S;}w&&this.assignAromaticBondsBs(!0,j);q||this.sm.setShapeSizeBs(1,-2147483648,null,j);return E(-1,[F,G])},"~N,~N,~N,~N,JU.BS,JU.BS,JU.BS,~B,~B,~N,JU.SB");c(b,"autoBondBs4",function(a,d,b,c,e,f,j){if(f)return this.autoBond_Pre_11_9_24(a,
d,b,c,e);if(0==this.ac)return 0;0==e&&(e=1);1.4E-45==this.maxBondingRadius&&this.findMaxRadii();f=this.vwr.getFloat(570425348);var k=this.vwr.getFloat(570425364),k=k*k,g=0;this.showRebondTimes&&JU.Logger.startTimer("autobond");var s=-1,m=null==a,p,y;m?(y=0,p=null):(a.equals(d)?p=a:(p=JU.BSUtil.copy(a),p.or(d)),y=p.nextSetBit(0));for(var A=this.getSelectedAtomIterator(null,!1,!1,!0,!1),n=!1;0<=y&&y<this.ac;y=m?y+1:p.nextSetBit(y+1)){var q=m||a.get(y),u=m||d.get(y),v=this.at[y];if(!JM.AtomCollection.isDeleted(v)){var w=
v.mi;if(w!=s){s=w;if(this.isJmolDataFrameForModel(w)){y=this.am[w].firstAtomIndex+this.am[w].act-1;continue}n=this.getInfoB(w,"autoBondUsingOccupation")}w=v.getBondingRadius();if(0!=w){var x=v.getFormalCharge(),z=0!=x;z&&(x=Math.signum(x));var B=null!=b&&b.get(y);for(this.setIteratorForAtom(A,-1,y,w+this.maxBondingRadius+f,null);A.hasNext();){var C=this.at[A.next()];if(!C.isDeleted()){var D=C.i,E=m||a.get(D),F=m||d.get(D);!E&&!F||(!(q&&F||u&&E)||B&&b.get(D)||n&&null!=this.occupancies&&50>this.occupancies[y]!=
50>this.occupancies[D]||z&&Math.signum(C.getFormalCharge())==x)||(E=this.isBondable(w,C.getBondingRadius(),A.foundDistance2(),k,f)?1:0,0<E&&this.autoBondCheck(v,C,E,e,c)&&(g++,null!=j&&j.append("connect ({"+y+"}) ({"+D+"});")))}}A.release()}}}this.showRebondTimes&&JU.Logger.checkTimer("autoBond",!1);return g},"JU.BS,JU.BS,JU.BS,JU.BS,~N,~B,JU.SB");c(b,"isBondable",function(a,d,b,c,e){if(0==a||0==d||b<c)return!1;a=a+d+e;return b<=a*a},"~N,~N,~N,~N,~N");c(b,"autoBondCheck",function(a,d,b,c,e){if(20<
a.getCurrentBondCount()||20<d.getCurrentBondCount())return this.maxBondWarned||JU.Logger.warn("maximum auto bond count reached"),this.maxBondWarned=!0,!1;var f=a.getFormalCharge();if(0!=f){var j=d.getFormalCharge();if(0>f&&0>j||0<f&&0<j)return!1}if(a.altloc!=d.altloc&&"\x00"!=a.altloc&&"\x00"!=d.altloc&&null==this.getModulation(a.i))return!1;this.getOrAddBond(a,d,b,c,e,0,!1);return!0},"JM.Atom,JM.Atom,~N,~N,JU.BS");c(b,"autoBond_Pre_11_9_24",function(a,d,b,c,e){if(0==this.ac)return 0;0==e&&(e=1);
1.4E-45==this.maxBondingRadius&&this.findMaxRadii();var f=this.vwr.getFloat(570425348),j=this.vwr.getFloat(570425364),j=j*j,k=0;this.initializeBspf();for(var g=-1,s=this.ac;0<=--s;){var m=this.at[s];if(!JM.AtomCollection.isDeleted(m)){var p=null==a||a.get(s),y=null==d||d.get(s);if((p||y)&&!m.isDeleted()){var A=m.mi;if(A!=g&&(g=A,this.isJmolDataFrameForModel(A))){for(;0<=--s&&!(JM.AtomCollection.isDeleted(this.at[s])||this.at[s].mi!=A););s++;continue}var n=m.getBondingRadius();if(0!=n){var q=n+this.maxBondingRadius+
f;this.initializeBspt(A);A=this.bspf.getCubeIterator(A);for(A.initialize(m,q,!0);A.hasMoreElements();)if(q=A.nextElement(),!(q===m||q.isDeleted())){var u=q.i,v=null==a||a.get(u),w=null==d||d.get(u);if(!(!v&&!w||null!=b&&b.get(u)&&b.get(s)))if(p&&w||y&&v)u=this.isBondable(n,q.getBondingRadius(),A.foundDistance2(),j,f)?1:0,0<u&&this.autoBondCheck(m,q,u,e,c)&&k++}A.release()}}}}return k},"JU.BS,JU.BS,JU.BS,JU.BS,~N");c(b,"autoHbond",function(a,d,b){if(b){for(var c=this.getModelBS(a,!1),e=c.nextSetBit(0);0<=
e&&b;e=c.nextSetBit(e+1))b=!this.am[e].hasRasmolHBonds;if(b)return 0}b=!1;for(e=a.nextSetBit(0);0<=e;e=a.nextSetBit(e+1))if(1==this.at[e].getElementNumber()){b=!0;break}c=new JU.BS;e=this.vwr.getBoolean(603979853);if(null==d||e&&!b)return JU.Logger.info((null==d?"DSSP/DSSR ":"RasMol")+" pseudo-hbond calculation"),this.calcRasmolHydrogenBonds(a,d,null,!1,2147483647,!1,c),-c.cardinality();JU.Logger.info(b?"Standard Hbond calculation":"Jmol pseudo-hbond calculation");var f=null;if(!b){f=new JU.BS;for(e=
a.nextSetBit(0);0<=e;e=a.nextSetBit(e+1))switch(this.at[e].atomID){case 64:case 4:case 14:case 15:case 16:case 17:f.set(e)}}var j,k;b?(j=this.vwr.getFloat(570425361),k=1):(j=this.vwr.getFloat(570425360),k=JM.ModelSet.hbondMinRasmol*JM.ModelSet.hbondMinRasmol);var g=j*j,s=3.141592653589793*this.vwr.getFloat(570425359)/180,m=0,p=0;this.showRebondTimes&&JU.Logger.debugging&&JU.Logger.startTimer("hbond");var y=null,A=null;d=this.getSelectedAtomIterator(d,!1,!1,!1,!1);for(e=a.nextSetBit(0);0<=e;e=a.nextSetBit(e+
1)){var n=this.at[e],q=n.getElementNumber(),u=1==q;if(!(u?!b:b||7!=q&&8!=q)){if(u){q=!1;y=n.bonds;if(null==y)continue;for(var v=!1,A=0;!v&&A<y.length;A++)v=y[A].getOtherAtom(n).getElementNumber(),v=7==v||8==v;if(!v)continue}else q=f.get(e);for(this.setIteratorForAtom(d,-1,n.i,j,null);d.hasNext();)if(v=this.at[d.next()],y=v.getElementNumber(),!(v===n||(u?1==y:7!=y&&8!=y)||(p=d.foundDistance2())<k||p>g||q&&f.get(v.i)||n.isBonded(v)))if(this.v1.sub2(n,v),null!=(A=JM.ModelSet.checkMinAttachedAngle(n,
s,this.v1,this.v2,b)))if(this.v1.scale(-1),null!=(y=JM.ModelSet.checkMinAttachedAngle(v,s,this.v1,this.v2,b))){var w=0,x;u&&!Float.isNaN(y.x)&&!Float.isNaN(A.x)?(x=4096,w=JM.HBond.calcEnergy(Math.sqrt(p),y.distance(n),y.distance(A),v.distance(A))/1E3):x=2048;c.set(this.addHBond(n,v,x,w));m++}}}d.release();this.sm.setShapeSizeBs(1,-2147483648,null,c);this.showRebondTimes&&JU.Logger.checkTimer("hbond",!1);return b?m:-m},"JU.BS,JU.BS,~B");b.checkMinAttachedAngle=c(b,"checkMinAttachedAngle",function(a,
d,b,c,e){var f=a.bonds,j=!0,k=null;if(null!=f&&0<f.length)for(var g=3.4028235E38,s=f.length;0<=--s;)if(f[s].isCovalent()){var j=!1,m=f[s].getOtherAtom(a);if(e||1!=m.getElementNumber()){c.sub2(a,m);var p=c.angle(b);if(p<d)return null;p<g&&(k=m,g=p)}}return j?JU.P3.new3(NaN,0,0):k},"JM.Atom,~N,JU.V3,JU.V3,~B");c(b,"setStructureIndexes",function(){for(var a,d=0,b=-1,c=-1,e=-1,f=0;f<this.ac;f++)if(!JM.AtomCollection.isDeleted(this.at[f])){if((c=this.at[f].mi)!=e)d=0,e=c,b=-1;if((a=this.at[f].group.getStrucNo())!=
b&&0!=a)this.at[f].group.setStrucNo(++d),b=d}});c(b,"getModelInfoAsString",function(){var a=(new JU.SB).append('<models count="');a.appendI(this.mc).append('" modelSetHasVibrationVectors="').append(this.modelSetHasVibrationVectors()+'">\n<properties>');if(null!=this.modelSetProperties){for(var d=this.modelSetProperties.propertyNames();d.hasMoreElements();){var b=d.nextElement();a.append('\n <property name="').append(b).append('" value=').append(JU.PT.esc(this.modelSetProperties.getProperty(b))).append(" />")}a.append("\n</properties>")}for(d=
0;d<this.mc;++d)a.append('\n<model index="').appendI(d).append('" n="').append(this.getModelNumberDotted(d)).append('" id=').append(JU.PT.esc(""+this.getInfo(d,"modelID"))),b=this.vwr.getJDXBaseModelIndex(d),b!=d&&a.append(" baseModelId=").append(JU.PT.esc(this.getInfo(b,"jdxModelID"))),a.append(" name=").append(JU.PT.esc(this.getModelName(d))).append(" title=").append(JU.PT.esc(this.getModelTitle(d))).append(' hasVibrationVectors="').appendB(this.vwr.modelHasVibrationVectors(d)).append('" />');a.append("\n</models>");
return a.toString()});c(b,"getSymmetryInfoAsString",function(){for(var a=(new JU.SB).append("Symmetry Information:"),d=0;d<this.mc;++d){a.append("\nmodel #").append(this.getModelNumberDotted(d)).append("; name=").append(this.getModelName(d)).append("\n");var b=this.getUnitCell(d);a.append(null==b?"no symmetry information":b.getSymmetryInfoStr())}return a.toString()});c(b,"createModels",function(a){a=this.mc+a;var d=JU.AU.arrayCopyObject(this.am,a);this.validateBspf(!1);this.modelNumbers=JU.AU.arrayCopyI(this.modelNumbers,
a);this.modelFileNumbers=JU.AU.arrayCopyI(this.modelFileNumbers,a);this.modelNumbersForAtomLabel=JU.AU.arrayCopyS(this.modelNumbersForAtomLabel,a);this.modelNames=JU.AU.arrayCopyS(this.modelNames,a);this.frameTitles=JU.AU.arrayCopyS(this.frameTitles,a);for(var b=v(this.modelFileNumbers[this.mc-1]/1E6)+1,c=this.mc,e=0;c<a;c++)this.modelNumbers[c]=c+this.mc,this.modelFileNumbers[c]=1E6*b+ ++e,this.modelNumbersForAtomLabel[c]=this.modelNames[c]=b+"."+e;this.thisStateModel=-1;b=this.getInfoM("group3Lists");
null!=b&&(c=this.getInfoM("group3Counts"),b=JU.AU.arrayCopyS(b,a),c=JU.AU.arrayCopyII(c,a),this.msInfo.put("group3Lists",b),this.msInfo.put("group3Counts",c));this.unitCells=null==this.unitCells?Array(a):JU.AU.arrayCopyObject(this.unitCells,a);for(c=this.mc;c<a;c++)d[c]=(new JM.Model).set(this,c,-1,null,null,null),d[c].loadState=" model create #"+c+";";this.am=d;this.mc=a;this.vwr.setAnimationRange(-1,-1)},"~N");c(b,"deleteAtoms",function(a){if(null!=a){for(var d=this.getModelBS(a,!1),b=new JU.BS,
c=a.nextSetBit(0);0<=c&&c<this.ac;c=a.nextSetBit(c+1))JM.AtomCollection.isDeleted(this.at[c])||this.at[c].$delete(b);for(var e=JU.BSUtil.copy(a),c=0;c<this.mc;c++){var f=this.am[c];f.resetDSSR(!1);f.bsAtomsDeleted.or(a);f.bsAtomsDeleted.and(f.bsAtoms);null!=f.bsAsymmetricUnit&&f.bsAsymmetricUnit.andNot(a);d.get(f.modelIndex)&&this.updateBasisFromSite(f.modelIndex);a=JU.BSUtil.andNot(f.bsAtoms,f.bsAtomsDeleted);f.firstAtomIndex=a.nextSetBit(0);f.act=a.cardinality();f.isOrderly=f.act==f.bsAtoms.length()-
f.firstAtomIndex}this.dBb(b,!1);this.vwr.shm.notifyAtoms("atomsDeleted",u(-1,[e,d]));this.validateBspf(!1)}},"JU.BS");c(b,"clearDB",function(a){this.getModelAuxiliaryInfo(this.at[a].mi).remove("dbName")},"~N");c(b,"adjustAtomArrays",function(a,d,b){this.ac=b;for(var c=d;c<b;c++){this.at[c]=this.at[a[c]];this.at[c].i=c;var e=this.am[this.at[c].mi];e.firstAtomIndex==a[c]&&(e.firstAtomIndex=c);e.bsAtoms.set(c)}if(null!=this.vibrations)for(c=d;c<b;c++)this.vibrations[c]=this.vibrations[a[c]];if(null!=
this.atomTensorList)for(c=d;c<b;c++)if(e=this.atomTensorList[c]=this.atomTensorList[a[c]],null!=e)for(var f=e.length;0<=--f;){var j=e[f];null!=j&&(j.atomIndex1=c)}if(null!=this.atomNames)for(c=d;c<b;c++)this.atomNames[c]=this.atomNames[a[c]];if(null!=this.atomTypes)for(c=d;c<b;c++)this.atomTypes[c]=this.atomTypes[a[c]];if(null!=this.atomResnos)for(c=d;c<b;c++)this.atomResnos[c]=this.atomResnos[a[c]];if(null!=this.atomSerials)for(c=d;c<b;c++)this.atomSerials[c]=this.atomSerials[a[c]];if(null!=this.atomSeqIDs)for(c=
d;c<b;c++)this.atomSeqIDs[c]=this.atomSeqIDs[a[c]];if(null!=this.bfactor100s)for(c=d;c<b;c++)this.bfactor100s[c]=this.bfactor100s[a[c]];if(null!=this.occupancies)for(c=d;c<b;c++)this.occupancies[c]=this.occupancies[a[c]];if(null!=this.partialCharges)for(c=d;c<b;c++)this.partialCharges[c]=this.partialCharges[a[c]]},"~A,~N,~N");c(b,"growAtomArrays",function(a){this.at=JU.AU.arrayCopyObject(this.at,a);null!=this.vibrations&&(this.vibrations=JU.AU.arrayCopyObject(this.vibrations,a));null!=this.occupancies&&
(this.occupancies=JU.AU.arrayCopyF(this.occupancies,a));null!=this.bfactor100s&&(this.bfactor100s=JU.AU.arrayCopyShort(this.bfactor100s,a));null!=this.partialCharges&&(this.partialCharges=JU.AU.arrayCopyF(this.partialCharges,a));null!=this.atomTensorList&&(this.atomTensorList=JU.AU.arrayCopyObject(this.atomTensorList,a));null!=this.atomNames&&(this.atomNames=JU.AU.arrayCopyS(this.atomNames,a));null!=this.atomTypes&&(this.atomTypes=JU.AU.arrayCopyS(this.atomTypes,a));null!=this.atomResnos&&(this.atomResnos=
JU.AU.arrayCopyI(this.atomResnos,a));null!=this.atomSerials&&(this.atomSerials=JU.AU.arrayCopyI(this.atomSerials,a));null!=this.atomSeqIDs&&(this.atomSeqIDs=JU.AU.arrayCopyI(this.atomSeqIDs,a))},"~N");c(b,"addAtom",function(a,d,b,c,e,f,j,k,g,s,m,p,y,A,n,q,u,v,w,x,z){k=(new JM.Atom).setAtom(a,this.ac,g,s,x,k,b,p,u,!1);this.am[a].act++;this.am[a].bsAtoms.set(this.ac);JU.Elements.isElement(b,1)&&this.am[a].hydrogenCount++;this.ac>=this.at.length&&this.growAtomArrays(this.ac+100);this.at[this.ac]=k;this.setBFactor(this.ac,
n,!1);this.setOccupancy(this.ac,A,!1);this.setPartialCharge(this.ac,y,!1);null!=q&&this.setAtomTensors(this.ac,q);k.group=d;k.colixAtom=this.vwr.cm.getColixAtomPalette(k,J.c.PAL.CPK.id);v&&k.setTranslucent(!0,0.5);null!=c&&(null!=e&&(null==this.atomTypes&&(this.atomTypes=Array(this.at.length)),this.atomTypes[this.ac]=e),k.atomID=w,0==w&&(null==this.atomNames&&(this.atomNames=Array(this.at.length)),this.atomNames[this.ac]=c.intern()));-2147483648!=f&&(null==this.atomSerials&&(this.atomSerials=E(this.at.length,
0)),this.atomSerials[this.ac]=f);0!=j&&(null==this.atomSeqIDs&&(this.atomSeqIDs=E(this.at.length,0)),this.atomSeqIDs[this.ac]=j);null!=m&&this.setVibrationVector(this.ac,m);Float.isNaN(z)||this.setBondingRadius(this.ac,z);this.ac++;return k},"~N,JM.Group,~N,~S,~S,~N,~N,~N,JU.P3,~N,JU.V3,~N,~N,~N,~N,JU.Lst,~B,~B,~N,JU.BS,~N");c(b,"getInlineData",function(a){var d=null;if(0<=a)d=this.am[a].loadScript;else for(a=this.mc;0<=--a&&!(0<(d=this.am[a].loadScript).length()););a=d.lastIndexOf('data "');if(0>
a)return d=JU.PT.getQuotedStringAt(d.toString(),0),JS.ScriptCompiler.unescapeString(d,0,d.length);a=d.indexOf2('"',a+7);var b=d.lastIndexOf('end "');return b<a||0>a?null:d.substring2(a+2,b)},"~N");c(b,"isAtomPDB",function(a){return 0<=a&&this.am[this.at[a].mi].isBioModel},"~N");c(b,"setAtomNamesAndNumbers",function(a,d,b,c){var e=-1;if(c){for(;a<this.ac&&JM.AtomCollection.isDeleted(this.at[a]);)a++;if(a>=this.ac)return;e=this.at[a].mi;a=this.am[e].firstAtomIndex}null==this.atomSerials&&(this.atomSerials=
E(this.ac,0));null==this.atomNames&&(this.atomNames=Array(this.ac));for(var f=this.isXYZ&&this.vwr.getBoolean(603979978),j=2147483647,k=1;a<this.ac;++a){var g=this.at[a];if(!JM.AtomCollection.isDeleted(g)){if(g.mi!=j){if(c&&2147483647!=j&&g.mi!=e)continue;j=g.mi;k=f?0:1}var s=this.atomSerials[a];if(a>=-d){if(0==s||c)this.atomSerials[a]=a<d?b.atomSerials[a]:k;if(null==this.atomNames[a]||c)this.atomNames[a]=(g.getElementSymbol()+this.atomSerials[a]).intern()}else s>k&&(k=s),c&&(this.atomNames[a]=(g.getElementSymbol()+
s).intern());(!this.am[j].isModelKit||0<g.getElementNumber())&&k++}}},"~N,~N,JM.AtomCollection,~B");c(b,"connect",function(a){this.resetMolecules();for(var d=new JU.BS,b=0;b<a.length;b++){var c=a[b];if(!(null==c||2>c.length)){var e=F(c[0]),f=0>e;f&&(e=-1-e);var j=F(c[1]);if(!(0>j||e>=this.ac||j>=this.ac)){var k=2<c.length?F(c[2]):1;0>k&&(k&=65535);var g=3<c.length?sa(1E3*a[b][3]):this.getDefaultMadFromOrder(k);0==k||0==g&&32768!=k&&!JU.Edge.isOrderH(k)?(c=this.at[e].getBond(this.at[j]),null!=c&&d.set(c.index)):
this.bondAtoms(this.at[e],this.at[j],k,g,null,4<c.length?c[4]:0,f,!0)}}}0<=d.nextSetBit(0)&&this.deleteBonds(d,!1)},"~A");c(b,"setFrameDelayMs",function(a,d){for(var b=d.nextSetBit(0);0<=b;b=d.nextSetBit(b+1))this.am[this.am[b].trajectoryBaseIndex].frameDelay=a},"~N,JU.BS");c(b,"getFrameDelayMs",function(a){return a<this.am.length&&0<=a?this.am[this.am[a].trajectoryBaseIndex].frameDelay:0},"~N");c(b,"getModelIndexFromId",function(a){var d=0<=a.indexOf("#"),b=a.toLowerCase().endsWith(".basemodel");
b&&(a=a.substring(0,a.length-10));for(var c=-1,e=null,f=0;f<this.mc;f++){var j=this.getInfo(f,"modelID"),k=a.startsWith("~")?"~"+this.getModelNumberDotted(f):null;if(!(null==k&&null==j&&null==(j=this.getModelTitle(f)))){d&&(e=this.getModelFileName(f),e.endsWith("#molfile")?j=e:(e+="#",j=e+j));if(a.equalsIgnoreCase(j)||a.equalsIgnoreCase(k))return b?this.vwr.getJDXBaseModelIndex(f):f;null!=e&&a.startsWith(e)&&(c=-2)}}return null==e&&!d?-2:c},"~S");c(b,"getModelSetAuxiliaryInfo",function(a){var d=this.msInfo;
null==d&&(d=new java.util.Hashtable);if(null!=a||!d.containsKey("models")){for(var b=new JU.Lst,c=0;c<this.mc;++c)if(null==a||a.get(c)){var e=this.getModelAuxiliaryInfo(c);e.put("modelIndex",Integer.$valueOf(c));b.addLast(e)}d.put("models",b)}return d},"JU.BS");c(b,"getDihedralMap",function(a){for(var d=new JU.Lst,b=a.length,c=null,e=null,f=null,j=null,k=b-1;0<=--k;)for(var g=b;--g>k;)if(c=this.at[a[k]],e=this.at[a[g]],c.isBonded(e))for(var s=b;0<=--s;)if(s!=k&&s!=g&&(f=this.at[a[s]]).isBonded(c))for(var m=
b;0<=--m;)if(m!=k&&m!=g&&m!=s&&(j=this.at[a[m]]).isBonded(e)){var p=E(4,0);p[0]=f.i;p[1]=c.i;p[2]=e.i;p[3]=j.i;d.addLast(p)}b=d.size();a=JU.AU.newInt2(b);for(k=b;0<=--k;)a[b-k-1]=d.get(k);return a},"~A");c(b,"setModulation",function(a,d,b,c){if(null==this.bsModulated)if(d)this.bsModulated=new JU.BS;else if(null==a)return;null==a&&(a=this.getModelAtomBitSetIncludingDeleted(-1,!1));for(var e=this.vwr.getFloat(1275072532),f=!1,j=a.nextSetBit(0);0<=j;j=a.nextSetBit(j+1)){var k=this.getModulation(j);null!=
k&&(k.setModTQ(this.at[j],d,b,c,e),null!=this.bsModulated&&this.bsModulated.setBitTo(j,d),f=!0)}f||(this.bsModulated=null)},"JU.BS,~B,JU.P3,~B");c(b,"getBoundBoxOrientation",function(a,d,b){var c=0,e=0,f=0,j=null,k=null,g=d.nextSetBit(0),s=0;if(0<=g){if(null==this.vOrientations){for(var m=0,j=new JU.P4,s=Array(3375),c=-7;7>=c;c++)for(e=-7;7>=e;e++)for(f=0;14>=f;f++,m++)1<(s[m]=JU.V3.new3(c/7,e/7,f/14)).length()&&--m;this.vOrientations=Array(m);for(c=m;0<=--c;)j.set4(s[c].x,s[c].y,s[c].z,0),this.vOrientations[c]=
JU.Quat.newP4(j);for(c=m;0<=--c;)m=Math.sqrt(1-s[c].lengthSquared()),Float.isNaN(m)&&(m=0),j.set4(s[c].x,s[c].y,s[c].z,m),this.vOrientations[c]=JU.Quat.newP4(j)}var m=new JU.P3,s=3.4028235E38,f=null,p=new JU.BoxInfo;p.setMargin(1312817669==a?0:0.1);for(c=this.vOrientations.length;0<=--c;){j=this.vOrientations[c];p.reset();if(null==b)for(e=g;0<=e;e=d.nextSetBit(e+1)){var y=j.transform2(this.at[e],m);p.addBoundBoxPoint(y)}else for(e=b.length;0<=--e;)p.addBoundBoxPoint(j.transform2(b[e],m));switch(a){default:case 1312817669:case 1073741864:case 1814695966:e=
(p.bbCorner1.x-p.bbCorner0.x)*(p.bbCorner1.y-p.bbCorner0.y)*(p.bbCorner1.z-p.bbCorner0.z);break;case 1111492629:e=p.bbCorner1.x-p.bbCorner0.x;break;case 1111492630:e=p.bbCorner1.y-p.bbCorner0.y;break;case 1111492631:e=p.bbCorner1.z-p.bbCorner0.z}e<s&&(k=j,f=p,p=new JU.BoxInfo,p.setMargin(0.1),s=e)}switch(a){default:return k;case 1814695966:a=f.getBoundBoxVertices();a=u(-1,[a[0],a[4],a[2],a[1]]);k=k.inv();for(c=0;4>c;c++)k.transform2(a[c],a[c]),0<c&&a[c].sub(a[0]);return a;case 1312817669:case 1073741864:j=
JU.Quat.newQ(k),c=f.bbCorner1.x-f.bbCorner0.x,e=f.bbCorner1.y-f.bbCorner0.y,f=f.bbCorner1.z-f.bbCorner0.z,c<e&&(m.set(0,0,1),j=JU.Quat.newVA(m,90).mulQ(j),k=c,c=e,e=k),e<f&&(f>c&&(m.set(0,1,0),j=JU.Quat.newVA(m,90).mulQ(j),k=c,c=f,f=k),m.set(1,0,0),j=JU.Quat.newVA(m,90).mulQ(j),k=e,e=f,f=k)}}return 1312817669==a?s+"\t{"+c+" "+e+" "+f+"}\t"+d:1814695966==a?null:null==j||0==j.getTheta()?new JU.Quat:j},"~N,JU.BS,~A");c(b,"getUnitCellForAtom",function(a){if(0>a||a>this.ac||null==this.at[a])return null;
if(null!=this.bsModulated){var d=this.getModulation(a),d=null==d?null:d.getSubSystemUnitCell();if(null!=d)return d}return this.getUnitCell(this.at[a].mi)},"~N");c(b,"clearCache",function(){for(var a=this.mc;0<=--a;)this.am[a].resetDSSR(!1)});c(b,"getSymMatrices",function(a){var d=this.getModelSymmetryCount(a);if(0==d)return null;var b=Array(d),c=this.am[a].biosymmetry;null==c&&(c=this.getUnitCell(a));for(a=d;0<=--a;)b[a]=c.getSpaceGroupOperation(a);return b},"~N");c(b,"getSymmetryInvariant",function(a){a=
this.getBasisAtom(a,!0);return null==a?E(0,0):this.getUnitCellForAtom(a.i).getInvariantSymops(a,null)},"~N");c(b,"getBsBranches",function(a){for(var d=v(a.length/6),b=Array(d),c=new java.util.Hashtable,e=0,f=0;e<d;e++,f+=6)if(!(1>Math.abs(a[f+5]-a[f+4]))){var j=F(a[f+1]),k=F(a[f+2]),g=""+j+"_"+k;if(!c.containsKey(g)){c.put(g,Boolean.TRUE);for(var g=this.vwr.getBranchBitSet(k,j,!0),s=this.at[j].bonds,j=this.at[j],m=0;m<s.length;m++){var p=s[m];if(p.isCovalent()&&(p=p.getOtherAtom(j).i,p!=k&&g.get(p))){g=
null;break}}b[e]=g}}return b},"~A");c(b,"recalculatePositionDependentQuantities",function(a,d){null!=this.vwr.shm.getShape(21)&&this.vwr.shm.getShapePropertyData(21,"move",u(-1,[a,d]));this.haveStraightness&&this.calculateStraightnessAll();this.recalculateLeadMidpointsAndWingVectors(-1);for(var b=this.getModelBS(a,!1),c=b.nextSetBit(0);0<=c;c=b.nextSetBit(c+1))if(this.sm.notifyAtomPositionsChanged(c,a,d),null!=d){var e=this.am[c];e.isContainedIn(a)&&(null==e.mat4&&(e.mat4=JU.M4.newM4(null)),e.mat4.mul2(d,
e.mat4))}},"JU.BS,JU.M4");c(b,"moveAtoms",function(a,d,b,c,e,f,j,k){if(null!=a){for(d=e.nextSetBit(0);0<=d;d=e.nextSetBit(d+1))a.rotTrans(this.at[d]),this.taintAtom(d,2);this.mat4.setM4(a);c=null}else if(k)j||(this.matInv.setM3(b),this.matInv.invert(),this.matInv.rotate(c));else{null==d?this.matTemp.setM3(b):(this.ptTemp.set(0,0,0),this.matInv.setM3(b),this.matInv.invert(),this.matTemp.mul2(d,b),this.matTemp.mul2(this.matInv,this.matTemp));j?(this.vTemp.setT(f),this.mat4.setIdentity(),this.mat4.setTranslation(this.vTemp),
this.mat4t.setToM3(this.matTemp),this.mat4.mul(this.mat4t),this.mat4t.setIdentity(),this.vTemp.scale(-1),this.mat4t.setTranslation(this.vTemp),this.mat4.mul(this.mat4t)):this.mat4.setToM3(this.matTemp);for(d=e.nextSetBit(0);0<=d;d=e.nextSetBit(d+1))j?this.mat4.rotTrans(this.at[d]):(this.ptTemp.add(this.at[d]),this.mat4.rotTrans(this.at[d]),this.ptTemp.sub(this.at[d])),this.taintAtom(d,2);j||(this.ptTemp.scale(1/e.cardinality()),null==c&&(c=new JU.V3),c.add(this.ptTemp))}if(null!=c){for(d=e.nextSetBit(0);0<=
d;d=e.nextSetBit(d+1))this.at[d].add(c),this.taintAtom(d,2);k||(this.mat4t.setIdentity(),this.mat4t.setTranslation(c),this.mat4.mul2(this.mat4t,this.mat4))}this.recalculatePositionDependentQuantities(e,this.mat4)},"JU.M4,JU.M3,JU.M3,JU.V3,JU.BS,JU.P3,~B,~B");c(b,"setDihedrals",function(a,d,b){var c=v(a.length/6);1<b&&(b=1);for(var e=0,f=0;e<c;e++,f+=6){var j=d[e];if(!(null==j||j.isEmpty())){var k=this.at[F(a[f+1])],g=JU.V3.newVsub(this.at[F(a[f+2])],k),g=JU.A4.newVA(g,-((a[f+5]-a[f+4])*b)/57.29577951308232);
this.matTemp.setAA(g);this.ptTemp.setT(k);for(k=j.nextSetBit(0);0<=k;k=j.nextSetBit(k+1))this.at[k].sub(this.ptTemp),this.matTemp.rotate(this.at[k]),this.at[k].add(this.ptTemp),this.taintAtom(k,2)}}},"~A,~A,~N");c(b,"setAtomCoordsRelative",function(a,d){this.setAtomsCoordRelative(d,a.x,a.y,a.z);this.mat4.setIdentity();this.vTemp.setT(a);this.mat4.setTranslation(this.vTemp);this.recalculatePositionDependentQuantities(d,this.mat4)},"JU.T3,JU.BS");c(b,"setAtomCoords",function(a,d,b){this.setAtomCoord2(a,
d,b);switch(d){case 1111492626:case 1111492627:case 1111492628:case 1145047055:break;default:this.recalculatePositionDependentQuantities(a,null)}},"JU.BS,~N,~O");c(b,"invertSelected",function(a,d,b,c){this.resetChirality();if(null!=a)for(var e=c.nextSetBit(0);0<=e;e=c.nextSetBit(e+1)){var f=2*(a.x-this.at[e].x);b=2*(a.y-this.at[e].y);var j=2*(a.z-this.at[e].z);this.setAtomCoordRelative(e,f,b,j)}else if(null!=d){a=JU.V3.new3(d.x,d.y,d.z);a.normalize();for(var k=Math.sqrt(d.x*d.x+d.y*d.y+d.z*d.z),e=
c.nextSetBit(0);0<=e;e=c.nextSetBit(e+1))j=2*-JU.Measure.distanceToPlaneD(d,k,this.at[e]),f=a.x*j,b=a.y*j,j*=a.z,this.setAtomCoordRelative(e,f,b,j)}else if(0<=b&&(d=this.at[b],a=d.bonds,null!=a)){f=new JU.BS;j=new JU.Lst;k=this.vwr.getModelUndeletedAtomsBitSet(d.mi);for(e=0;e<a.length;e++){var g=a[e].getOtherAtom(d);c.get(g.i)?f.or(JU.JmolMolecule.getBranchBitSet(this.at,g.i,k,null,b,!0,!0)):j.addLast(g)}0!=j.size()&&(a=JU.Measure.getCenterAndPoints(j)[0],c=JU.V3.newVsub(d,a),c=JU.Quat.newVA(c,180),
this.moveAtoms(null,null,c.getMatrix(),null,f,d,!0,!1))}},"JU.P3,JU.P4,~N,JU.BS");c(b,"getCellWeights",function(a){var d=null,b=a.nextSetBit(0),c=-1,e;if(0<=b&&null!=(e=this.getUnitCell(c=this.at[b].mi))){e=e.getUnitCellMultiplied();this.getModelAtomBitSetIncludingDeleted(c,!0).and(a);for(var d=L(a.cardinality(),0),f=new JU.P3,j=0;0<=b;b=a.nextSetBit(b+1))c=this.at[b],f.setT(c),e.toFractional(f,!1),e.unitize(f),d[j++]=e.getCellWeight(f)}return d},"JU.BS");c(b,"getAtomGroupQuaternions",function(a,
d,b){var c=0,e=new JU.Lst;a=JU.BSUtil.copy(a);for(var f=new JU.BS,j=a.nextSetBit(0);0<=j&&c<d;j=a.nextSetBit(j+1)){var k=this.at[j].group;k.setAtomBits(f);a.andNot(f);var g=k.getQuaternion(b);if(null==g&&(this.am[this.at[j].mi].isBioModel||(g=k.getQuaternionFrame(this.at)),null==g))continue;c++;e.addLast(g)}return e.toArray(Array(e.size()))},"JU.BS,~N,~S");c(b,"getConformation",function(a,d,b,c){for(var e=new JU.BS,f=this.mc;0<=--f;)if(!(0<=a&&f!=a)){var j=this.am[f],k=this.vwr.getModelUndeletedAtomsBitSet(a);
null!=c&&k.and(c);if(!(0>k.nextSetBit(0)))if(d>j.altLocCount)1==d&&e.or(k);else{if(this.am[f].isBioModel){if(-1E3>d){var j=1E3+d,g=this.getAltLocListInModel(f);-32!=j&&0>g.indexOf(String.fromCharCode(-j))&&(j=-2147483648)}else 0>d?(g=this.getAltLocListInModel(f),j=-1-d,j=j>=g.length?-2147483648:-g.charAt(j).charCodeAt(0)):j=d;if(-2147483648==j)continue;this.am[f].getConformation(j,b,k,e)}else{var s=this.getAltLocCountInModel(f),g=this.getAltLocListInModel(f),m=new JU.BS;if(-1E3>d)var p=String.fromCharCode(-1E3-
d),j=g.indexOf(p);else if(0>d)if(j=-d,p=this.vwr.getDataObj("property_part",k,1),null==p)j-=1;else{for(var y=0,A=k.nextSetBit(0);0<=A;A=k.nextSetBit(A+1)){var n=p[y++];0!=n&&(n!=j&&n!=-j)&&k.clear(A)}e.or(k);j=-1}else j=d-1;if(0>j||j>=s)continue;for(p=s;0<=--p;)p!=j&&k.andNot(this.getAtomBitsMDa(1073742355,g.substring(p,p+1),m))}e.or(k)}}return e},"~N,~N,~B,JU.BS");c(b,"getSequenceBits",function(a,d,b){return this.haveBioModels?this.bioModelset.getAllSequenceBits(a,d,b):b},"~S,JU.BS,JU.BS");c(b,"getBioPolymerCountInModel",
function(a){return this.haveBioModels?this.bioModelset.getBioPolymerCountInModel(a):0},"~N");c(b,"getPolymerPointsAndVectors",function(a,d,b,c){this.haveBioModels&&this.bioModelset.getAllPolymerPointsAndVectors(a,d,b,c)},"JU.BS,JU.Lst,~B,~N");c(b,"recalculateLeadMidpointsAndWingVectors",function(a){this.haveBioModels&&this.bioModelset.recalculatePoints(a)},"~N");c(b,"calcRasmolHydrogenBonds",function(a,d,b,c,e,f,j){this.haveBioModels&&this.bioModelset.calcAllRasmolHydrogenBonds(a,d,b,c,e,f,j,2)},
"JU.BS,JU.BS,JU.Lst,~B,~N,~B,JU.BS");c(b,"calculateStraightnessAll",function(){this.haveBioModels&&!this.haveStraightness&&this.bioModelset.calculateStraightnessAll()});c(b,"calculateStruts",function(a,d){return this.haveBioModels?this.bioModelset.calculateStruts(a,d):0},"JU.BS,JU.BS");c(b,"getGroupsWithin",function(a,d){return this.haveBioModels?this.bioModelset.getGroupsWithinAll(a,d):new JU.BS},"~N,JU.BS");c(b,"getProteinStructureState",function(a,d){return this.haveBioModels?this.bioModelset.getFullProteinStructureState(a,
d):""},"JU.BS,~N");c(b,"calculateStructures",function(a,d,b,c,e,f){return this.haveBioModels?this.bioModelset.calculateAllStuctures(a,d,b,c,e,f):""},"JU.BS,~B,~B,~B,~B,~N");c(b,"calculateStructuresAllExcept",function(a,d,b,c,e,f,j){this.freezeModels();return this.haveBioModels?this.bioModelset.calculateAllStructuresExcept(a,d,b,c,e,f,j):""},"JU.BS,~B,~B,~B,~B,~B,~N");c(b,"recalculatePolymers",function(a){this.bioModelset.recalculateAllPolymers(a,this.getGroups())},"JU.BS");c(b,"calculatePolymers",
function(a,d,b,c){null!=this.bioModelset&&this.bioModelset.calculateAllPolymers(a,d,b,c)},"~A,~N,~N,JU.BS");c(b,"calcSelectedMonomersCount",function(){this.haveBioModels&&this.bioModelset.calcSelectedMonomersCount()});c(b,"setProteinType",function(a,d){this.haveBioModels&&this.bioModelset.setAllProteinType(a,d)},"JU.BS,J.c.STR");c(b,"setStructureList",function(a){this.haveBioModels&&this.bioModelset.setAllStructureList(a)},"java.util.Map");c(b,"setConformation",function(a){this.haveBioModels&&this.bioModelset.setAllConformation(a);
return JU.BSUtil.copy(a)},"JU.BS");c(b,"getHeteroList",function(a){a=this.haveBioModels?this.bioModelset.getAllHeteroList(a):null;return null==a?this.getInfoM("hetNames"):a},"~N");c(b,"getUnitCellPointsWithin",function(a,d,b,c){var e=new JU.Lst,f=null,j=null;c&&(f=new java.util.Hashtable,j=new JU.Lst,f.put("atoms",j),f.put("points",e));var k=null==d?-1:d.nextSetBit(0);d=this.vwr.getModelUndeletedAtomsBitSet(0>k?this.vwr.am.cmi:this.at[k].mi);0>k&&(k=d.nextSetBit(0));if(0<=k){var g=this.getUnitCellForAtom(k);
if(null!=g){d=g.getIterator(this.vwr,this.at[k],d,a);for(null!=b&&d.setCenter(b,a);d.hasNext();)k=d.next(),b=d.getPosition(),e.addLast(b),c&&j.addLast(Integer.$valueOf(k))}}return c?f:e},"~N,JU.BS,JU.P3,~B");c(b,"calculateDssrProperty",function(a){if(null!=a){if(null==this.dssrData||this.dssrData.length<this.ac)this.dssrData=L(this.ac,0);for(var d=0;d<this.ac;d++)this.dssrData[d]=NaN;for(d=this.mc;0<=--d;)this.am[d].isBioModel&&this.am[d].getAtomicDSSRData(this.dssrData,a)}},"~S");c(b,"getAtomicDSSRData",
function(a){return null==this.dssrData||this.dssrData.length<=a?NaN:this.dssrData[a]},"~N");c(b,"getAtomCIPChiralityCode",function(a){this.haveChirality=!0;var d=this.am[a.mi];d.hasChirality||(this.calculateChiralityForAtoms(d.bsAtoms,!1),d.hasChirality=!0);return a.getCIPChiralityCode()},"JM.Atom");c(b,"calculateChiralityForAtoms",function(a,d){this.haveChirality=!0;for(var b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1))this.at[b].setCIPChirality(0);J.api.Interface.getSymmetry(this.vwr,"ms").calculateCIPChiralityForAtoms(this.vwr,
a);if(!d)return null;for(var c="",b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1))c+=this.at[b].getCIPChirality(!1);return c},"JU.BS,~B");c(b,"getPointTransf",function(a,d,b,c){this.isTrajectory(0<=a?a:d.mi)?this.trajectory.getFractional(d,c):c.setT(d);null!=b&&b.transform2(c,c)},"~N,JM.Atom,JU.Quat,JU.P3");c(b,"getSymmetryEquivAtoms",function(a,d,b){a=JU.BS.copy(a);var c=JU.BS.copy(a),e=a.nextSetBit(0);null==d&&(d=this.getUnitCellForAtom(e));if(null!=d){null==b&&(b=this.vwr.getModelUndeletedAtomsBitSet(this.at[e].mi));
d=JU.BSUtil.copy(b);for(b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1))this.getSymmetryEquivAtomsForAtom(b,a,d,c)}return c},"JU.BS,J.api.SymmetryInterface,JU.BS");c(b,"getSymmetryEquivAtomsForAtom",function(a,d,b,c){a=this.at[a].getAtomSite();if(0<a)for(var e=b.nextSetBit(0);0<=e;e=b.nextSetBit(e+1))this.at[e].getAtomSite()==a&&(c.set(e),null!=d&&(d.clear(e),b.clear(e)))},"~N,JU.BS,JU.BS,JU.BS");c(b,"setSpaceGroup",function(a,d,b){null==this.unitCells&&(this.unitCells=Array(this.mc));this.unitCells[a]=
d;this.haveUnitCells=!0;var c=1==d.getSpaceGroupOperationCount(),e=d.getFinalOperationCount();if(null!=b){var f=b.isEmpty(),j=this.vwr.getModelUndeletedAtomsBitSet(a);f?b=JU.BSUtil.copy(j):this.setAsymmetricUnit(a,j,b,!c);1<e&&this.setModelCage(a,null);if(0<(null==this.atomSeqIDs?0:this.atomSeqIDs.length))for(var k=j.nextSetBit(0);0<=k;k=j.nextSetBit(k+1))this.atomSeqIDs[k]=0;if(c)this.fixP1AtomSites(d,j);else{for(var g=null!=this.occupancies,s=d.getSymmetryOperations(),m=new JU.P3,p=new JU.P3,y=
new JU.P3,A=0,n=b.nextSetBit(0);0<=n;n=b.nextSetBit(n+1)){k=this.at[n];p.setT(k);d.toFractional(p,!1);d.unitize(p);f&&this.setSite(k,++A,!0);A=k.atomSite;j.clear(n);var q=g?this.occupancies[n]:0,k=j.nextSetBit(f?n+1:0);a:for(;0<=k;k=j.nextSetBit(k+1)){var u=this.at[k];if(!(u.atomNumberFlags!=u.atomNumberFlags||g&&q!=this.occupancies[k])){m.setT(u);d.toFractional(m,!1);d.unitize(m);for(var v=0;v<e;v++)if(y.setT(p),s[v].rotTrans(y),d.unitize(y),1.96E-6>y.distanceSquared(m)){this.setSite(u,A,!0);j.clear(k);
b.clear(k);continue a}}}}j.isEmpty()||System.err.println("Model basis atoms not found for "+j);f&&this.setAsymmetricUnit(a,null,b,!c)}}this.setInfo(a,"unitCellParams",d.getUnitCellParams());this.setInfo(a,"spaceGroupAssigned",Boolean.TRUE);this.setInfo(a,"spaceGroupInfo",null);this.setInfo(a,"symmetryOperations",d.getSymopList(!1));this.setInfo(a,"spaceGroup",d.getSpaceGroupName());null!=this.am[a].simpleCage&&(d.getUnitCell(this.am[a].simpleCage.getUnitCellVectors(),!1,null),this.setInfo(a,"unitCellParams",
d.getUnitCellParams()));this.setModelCage(a,null)},"~N,J.api.SymmetryInterface,JU.BS");c(b,"setAsymmetricUnit",function(a,d,b,c){null==d&&(d=this.vwr.getModelUndeletedAtomsBitSet(a));this.am[a].bsAsymmetricUnit=b;null==this.bsSymmetry&&(this.bsSymmetry=JU.BS.newN(this.ac));this.bsSymmetry.or(d);this.bsSymmetry.andNot(b);if(c){a=0;for(c=d.nextSetBit(0);0<=c;c=d.nextSetBit(c+1)){var e=b.get(c);this.at[c].setSymop(e?1:0,!1);e&&this.setSite(this.at[c],++a,!1)}d.andNot(b)}},"~N,JU.BS,JU.BS,~B");c(b,"setModelCage",
function(a,d){0<=a&&a<this.mc&&(this.am[a].setSimpleCage(d),this.haveUnitCells=!0);return d},"~N,J.api.SymmetryInterface");c(b,"fixP1AtomSites",function(a,d){if(!(null==a||1!=a.getSpaceGroupOperationCount()))for(var b=d.cardinality(),b=Array(b),c=0,e=a.getPrecision(),e=e*e,f=d.nextSetBit(0);0<=f;f=d.nextSetBit(f+1)){var j=this.at[f],k=new JU.A4;k.setT(j);a.toFractional(k,!1);a.unitize(k);for(var g=!1,s=0;s<c;s++){var m=b[s];if(j.atomNumberFlags==m.angle&&m.distanceSquared(k)<e){g=!0;this.setSite(j,
s+1,!0);break}}g||(k.angle=j.atomNumberFlags,b[c]=k,this.setSite(j,++c,!0))}},"J.api.SymmetryInterface,JU.BS");c(b,"getBasisAtom",function(a,d){var b=this.at[a];if(!d||null!=this.getUnitCellForAtom(a)){var c=b.atomSite;if(0<c){var e=this.am[b.mi].bsAsymmetricUnit;if(null!=e)for(var f=e.nextSetBit(0);0<=f;f=e.nextSetBit(f+1))if(this.at[f].atomSite==c)return this.at[f]}}return b},"~N,~B");c(b,"updateBasisFromSite",function(a){if(null!=this.getUnitCell(a)){var d=this.am[a].bsAsymmetricUnit;if(null!=
d){d.clearAll();var b=new JU.BS;a=this.am[a].bsAtoms;for(var c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1))if(!JM.AtomCollection.isDeleted(this.at[c])){var e=this.at[c].atomSite;b.get(e)||(b.set(e),d.set(c))}for(var f=E(b.length(),0),e=0,c=b.nextSetBit(0);0<=c;c=b.nextSetBit(c+1))f[c]=++e;for(c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1))JM.AtomCollection.isDeleted(this.at[c])||(e=this.at[c].atomSite,this.setSite(this.at[c],-1,!1),this.setSite(this.at[c],f[e],!0));null==this.bsSymmetry&&(this.bsSymmetry=
JU.BS.newN(this.ac));this.bsSymmetry.or(a);this.bsSymmetry.andNot(d)}}},"~N");c(b,"getConnectingAtoms",function(a,d){for(var b=new JU.BS,c=new JU.BS,e=a.nextSetBit(0);0<=e;e=a.nextSetBit(e+1))for(var f=this.at[e],j=f.bonds,k=0,g=f.getBondCount();0<=--g;)if(j[g].isCovalent()&&!a.get(k=j[g].getOtherAtom(f).i))b.set(e),c.set(k);a.or(c);d.or(c);return b},"JU.BS,JU.BS");c(b,"saveAtomPositions",function(){for(var a=Array(this.at.length),d=a.length;0<=--d;){var b=this.at[d];JM.AtomCollection.isDeleted(b)||
(a[d]=JU.P3.newP(b))}return a});c(b,"restoreAtomPositions",function(a){for(var d=a.length;0<=--d;){var b=this.at[d];JM.AtomCollection.isDeleted(b)||b.setT(a[d])}},"~A");c(b,"clearUnitCell",function(a){if(null!=this.unitCells){if(0>a)for(a=0;a<this.mc;a++)this.clearUnitCell(a);else if(this.am[a].simpleCage=null,a<this.unitCells.length){this.unitCells[a]=null;for(a=this.getModelAuxiliaryInfo(a).entrySet().iterator();a.hasNext();)JV.JC.isSpaceGroupInfoKey(a.next().getKey())&&a.remove();if(1<this.mc)return}this.unitCells=
null;this.haveUnitCells=!1}},"~N");c(b,"fixDeletedBonds",function(a){var d=new JU.BS;if(null==this.bo)return a;for(var b=0,c=0;b<this.bondCount;b++)null!=this.bo[b]&&(0<=c&&d.setBitTo(b,a.get(c)),c++);return d},"JU.BS");c(b,"getEquivalentAtoms",function(a){var d=this.vwr.getModelUndeletedAtomsBitSet(this.at[a].mi);d.and(this.getAtomBitsMaybeDeleted(1094713366,JU.BSUtil.newAndSetBit(a)));return d},"~N");c(b,"morphAtoms",function(a,d,b,c,e){for(var f=a.nextSetBit(0);0<=f;f=a.nextSetBit(f+1),b++){var j=
this.vwr.ms.at[f];e.sub2(d[1][b],d[0][b]);e.scaleAdd2(c,e,d[0][b]);j.setT(e);this.taintAtom(f,2)}},"JU.BS,~A,~N,~N,JU.P3");c(b,"rotateModelSpinVectors",function(a,d){if(!(0>a||a>=this.mc||null==this.vibrations)){var b=this.getModelAuxiliaryInfo(a);if(null==d&&(d=b.get("spinFrameRotationMatrix"),null==d))return;var c=Float.isNaN(d.getElement(0,0)),e=c&&1==d.getElement(2,2),f=c||e?d.getElement(1,1):0;c&&0!=f&&(d.setElement(1,1,0),this.rotateModelSpinVectors(a,d),d.setElement(1,1,f));var j=b.get("spinFrameRotationMatrix"),
k=b.get("spinRotationMatrixApplied");null==k&&null==j&&(j=JU.M3.newM3(null),b.put("spinFrameRotationMatrix",j));null==k&&(k=j);j=JU.M3.newM3(k);j.invert();c&&(e?(k=JU.P3.new3(0,0,100),c=JU.P3.new3(0,0,200),this.vwr.tm.unTransformPoint(k,k),this.vwr.tm.unTransformPoint(c,c),k=JU.V3.newVsub(k,c)):k=JU.Quat.newM(k).getNormal(),d=JU.Quat.newVA(k,f).getMatrix());f=this.am[a].bsAtoms;for(k=f.nextSetBit(0);0<=k;k=f.nextSetBit(k+1)){if(k>=this.vibrations.length)return;c=this.vibrations[k];null==c||0==c.magMoment||
(j.rotate(c),d.rotate(c))}j=JU.Quat.newM(d).toAxisAngle4f();k=JU.M3.newM3(d);b.put("spinRotationMatrixApplied",k);b.put("spinRotationAxisAngleApplied",j);this.unitCells[a].setSpinAxisAngle(j)}},"~N,JU.M3");c(b,"getSpin",function(a){var d=this.at[a];if(null==d)return 0;d=d.getSymOp()-1;if(0>d)return 0;var b=this.vibrations[a];if(null==b||0==b.magMoment)return 0;a=this.getUnitCellForAtom(a);return null==a?0:a.getSpinIndex(d)+1},"~N");b.hbondMinRasmol=2.5});n("JM");z(["JU.M3","$.P3"],"JM.Orientation",
["JU.PT","JU.Escape"],function(){var b=w(function(){this.rotationMatrix=this.saveName=null;this.rotationRadius=this.zoom=this.yTrans=this.xTrans=0;this.navCenter=this.center=null;this.cameraY=this.cameraX=this.cameraDepth=this.navDepth=this.yNav=this.xNav=NaN;this.navigationMode=this.windowCenteredFlag=!1;this.vwr=this.pymolView=this.moveToText=null;q(this,arguments)},JM,"Orientation",null);N(b,function(){this.rotationMatrix=new JU.M3;this.center=new JU.P3;this.navCenter=new JU.P3});x(b,function(a,
d,b){this.vwr=a;null!=b?(this.pymolView=b,this.moveToText="moveTo -1.0 PyMOL "+JU.Escape.eAF(b)):(a.finalizeTransformParameters(),d?(d=a.ms.getInfoM("defaultOrientationMatrix"),null==d?this.rotationMatrix.setScale(1):this.rotationMatrix.setM3(d)):a.tm.getRotation(this.rotationMatrix),this.xTrans=a.tm.getTranslationXPercent(),this.yTrans=a.tm.getTranslationYPercent(),this.zoom=a.tm.getZoomSetting(),this.center.setT(a.tm.fixedRotationCenter),this.windowCenteredFlag=a.tm.isWindowCentered(),this.rotationRadius=
a.getFloat(570425388),this.navigationMode=a.getBoolean(603979889),this.moveToText=a.tm.getMoveToText(-1,!1),this.navigationMode&&(this.xNav=a.tm.getNavigationOffsetPercent("X"),this.yNav=a.tm.getNavigationOffsetPercent("Y"),this.navDepth=a.tm.navigationDepthPercent,this.navCenter=JU.P3.newP(a.tm.navigationCenter)),0!=a.tm.camera.z&&(this.cameraDepth=a.tm.getCameraDepth(),this.cameraX=a.tm.camera.x,this.cameraY=a.tm.camera.y))},"JV.Viewer,~B,~A");c(b,"getMoveToText",function(a){return a?"   "+this.moveToText+
"\n  save orientation "+JU.PT.esc(this.saveName.substring(12))+";\n":this.moveToText},"~B");c(b,"restore",function(a,d){d?(this.vwr.setBooleanProperty("windowCentered",this.windowCenteredFlag),this.vwr.setBooleanProperty("navigationMode",this.navigationMode),null==this.pymolView?this.vwr.moveTo(this.vwr.eval,a,this.center,null,NaN,this.rotationMatrix,this.zoom,this.xTrans,this.yTrans,this.rotationRadius,this.navCenter,this.xNav,this.yNav,this.navDepth,this.cameraDepth,this.cameraX,this.cameraY):this.vwr.tm.moveToPyMOL(this.vwr.eval,
a,this.pymolView)):this.vwr.tm.setRotation(this.rotationMatrix);return!0},"~N,~B")});n("JM");z(null,"JM.StateScript",["JU.SB","JU.BSUtil","$.Escape"],function(){var b=w(function(){this.modelIndex=0;this.script2=this.script1=this.bsAtoms2=this.bsAtoms1=this.bsBonds=null;this.inDefinedStateBlock=!1;q(this,arguments)},JM,"StateScript",null);x(b,function(a,d,b,c,e,f,j){this.modelIndex=a;this.script1=d;this.bsBonds=JU.BSUtil.copy(b);this.bsAtoms1=JU.BSUtil.copy(c);this.bsAtoms2=JU.BSUtil.copy(e);this.script2=
f;this.inDefinedStateBlock=j},"~N,~S,JU.BS,JU.BS,JU.BS,~S,~B");c(b,"isValid",function(){return null!=this.script1&&0<this.script1.length&&(null==this.bsBonds||0<=this.bsBonds.nextSetBit(0))&&(null==this.bsAtoms1||0<=this.bsAtoms1.nextSetBit(0))&&(null==this.bsAtoms2||0<=this.bsAtoms2.nextSetBit(0))});g(b,"toString",function(){if(!this.isValid())return"";var a=JU.SB.newS(this.script1);null!=this.bsBonds&&a.append(" ").append(JU.Escape.eBond(this.bsBonds));null!=this.bsAtoms1&&a.append(" ").append(JU.Escape.eBS(this.bsAtoms1));
null!=this.bsAtoms2&&a.append(" ").append(JU.Escape.eBS(this.bsAtoms2));null!=this.script2&&a.append(" ").append(this.script2);a=a.toString();a.endsWith(";")||(a+=";");return a});c(b,"isConnect",function(){return 0<=this.script1.indexOf("connect")});c(b,"deleteAtoms",function(a,d,b){if(a==this.modelIndex)return!1;if(a>this.modelIndex)return!0;JU.BSUtil.deleteBits(this.bsBonds,d);JU.BSUtil.deleteBits(this.bsAtoms1,b);JU.BSUtil.deleteBits(this.bsAtoms2,b);return this.isValid()},"~N,JU.BS,JU.BS");c(b,
"setModelIndex",function(a){this.modelIndex=a},"~N")});n("JM");K(JM,"Structure");n("JM");var pb=w(function(){this.id="";this.type=" ";this.scale=this.tickLabelFormats=this.ticks=null;this.first=0;this.signFactor=1;this.reference=null;q(this,arguments)},JM,"TickInfo",null);x(pb,function(b){this.ticks=b},"JU.P3");n("JU");z(["JU.P3","$.V3"],"JU.BoxInfo",["java.util.Hashtable","JU.Measure","$.P4","JU.Point3fi"],function(){var b=w(function(){this.bbVertices=this.bbVector=this.bbCenter=this.bbCorner1=this.bbCorner0=
null;this.isScaleSet=!1;this.margin=0;q(this,arguments)},JU,"BoxInfo",null);N(b,function(){this.bbCorner0=new JU.P3;this.bbCorner1=new JU.P3;this.bbCenter=new JU.P3;this.bbVector=new JU.V3;this.bbVertices=Array(8);for(var a=0;8>a;a++)JU.BoxInfo.unitBboxPoints[a]=JU.P3.new3(-1,-1,-1),JU.BoxInfo.unitBboxPoints[a].scaleAdd2(2,JU.BoxInfo.unitCubePoints[a],JU.BoxInfo.unitBboxPoints[a])});x(b,function(){for(var a=8;0<=--a;)this.bbVertices[a]=new JU.Point3fi;this.reset()});c(b,"reset",function(){this.isScaleSet=
!1;this.bbCorner0.set(3.4028235E38,3.4028235E38,3.4028235E38);this.bbCorner1.set(-3.4028235E38,-3.4028235E38,-3.4028235E38)});b.scaleBox=c(b,"scaleBox",function(a,d){if(!(0==d||1==d)){for(var b=new JU.P3,c=new JU.V3,e=0;8>e;e++)b.add(a[e]);b.scale(0.125);for(e=0;8>e;e++)c.sub2(a[e],b),c.scale(d),a[e].add2(b,c)}},"~A,~N");b.getVerticesFromOABC=c(b,"getVerticesFromOABC",function(a){for(var d=Array(8),b=0;7>=b;b++)d[b]=JU.P3.newP(a[0]),4==(b&4)&&d[b].add(a[1]),2==(b&2)&&d[b].add(a[2]),1==(b&1)&&d[b].add(a[3]);
return d},"~A");b.getCanonicalCopy=c(b,"getCanonicalCopy",function(a,d){for(var b=Array(8),c=0;8>c;c++)b[JU.BoxInfo.toCanonical[c]]=JU.P3.newP(a[c]);JU.BoxInfo.scaleBox(b,d);return b},"~A,~N");b.toOABC=c(b,"toOABC",function(a,d){var b=JU.P3.newP(a[0]),c=JU.P3.newP(a[4]),e=JU.P3.newP(a[2]),f=JU.P3.newP(a[1]);c.sub(b);e.sub(b);f.sub(b);null!=d&&b.add(d);return u(-1,[b,c,e,f])},"~A,JU.T3");c(b,"getBoundBoxCenter",function(){this.isScaleSet||this.setBbcage(1);return this.bbCenter});c(b,"getBoundBoxCornerVector",
function(){this.isScaleSet||this.setBbcage(1);return this.bbVector});c(b,"getBoundBoxPoints",function(a){this.isScaleSet||this.setBbcage(1);return a?u(-1,[this.bbCenter,JU.P3.newP(this.bbVector),this.bbCorner0,this.bbCorner1]):u(-1,[this.bbCorner0,this.bbCorner1])},"~B");c(b,"getBoundBoxVertices",function(){this.isScaleSet||this.setBbcage(1);return this.bbVertices});c(b,"setBoundBoxFromOABC",function(a){for(var d=JU.P3.newP(a[0]),b=new JU.P3,c=0;4>c;c++)b.add(a[c]);this.setBoundBox(d,b,!0,1)},"~A");
c(b,"setBoundBox",function(a,d,b,c){if(null!=a){if(0==c)return;if(b){if(0==a.distance(d))return;this.bbCorner0.set(Math.min(a.x,d.x),Math.min(a.y,d.y),Math.min(a.z,d.z));this.bbCorner1.set(Math.max(a.x,d.x),Math.max(a.y,d.y),Math.max(a.z,d.z))}else{if(0==d.x||0==d.y&&0==d.z)return;this.bbCorner0.set(a.x-d.x,a.y-d.y,a.z-d.z);this.bbCorner1.set(a.x+d.x,a.y+d.y,a.z+d.z)}}this.setBbcage(c)},"JU.T3,JU.T3,~B,~N");c(b,"setMargin",function(a){this.margin=a},"~N");c(b,"addBoundBoxPoint",function(a){this.isScaleSet=
!1;JU.BoxInfo.addPoint(a,this.bbCorner0,this.bbCorner1,this.margin)},"JU.T3");b.addPoint=c(b,"addPoint",function(a,d,b,c){a.x-c<d.x&&(d.x=a.x-c);a.x+c>b.x&&(b.x=a.x+c);a.y-c<d.y&&(d.y=a.y-c);a.y+c>b.y&&(b.y=a.y+c);a.z-c<d.z&&(d.z=a.z-c);a.z+c>b.z&&(b.z=a.z+c)},"JU.T3,JU.T3,JU.T3,~N");b.addPointXYZ=c(b,"addPointXYZ",function(a,d,b,c,e,f){a-f<c.x&&(c.x=a-f);a+f>e.x&&(e.x=a+f);d-f<c.y&&(c.y=d-f);d+f>e.y&&(e.y=d+f);b-f<c.z&&(c.z=b-f);b+f>e.z&&(e.z=b+f)},"~N,~N,~N,JU.P3,JU.P3,~N");c(b,"setBbcage",function(a){this.isScaleSet=
!0;this.bbCenter.add2(this.bbCorner0,this.bbCorner1);this.bbCenter.scale(0.5);this.bbVector.sub2(this.bbCorner1,this.bbCenter);0<a?this.bbVector.scale(a):(this.bbVector.x-=a/2,this.bbVector.y-=a/2,this.bbVector.z-=a/2);for(var d=8;0<=--d;){var b=this.bbVertices[d];b.setT(JU.BoxInfo.unitBboxPoints[d]);b.x*=this.bbVector.x;b.y*=this.bbVector.y;b.z*=this.bbVector.z;b.add(this.bbCenter)}1!=a&&(this.bbCorner0.setT(this.bbVertices[0]),this.bbCorner1.setT(this.bbVertices[7]))},"~N");c(b,"isWithin",function(a){this.isScaleSet||
this.setBbcage(1);return a.x>=this.bbCorner0.x&&a.x<=this.bbCorner1.x&&a.y>=this.bbCorner0.y&&a.y<=this.bbCorner1.y&&a.z>=this.bbCorner0.z&&a.z<=this.bbCorner1.z},"JU.P3");c(b,"getMaxDim",function(){return 2*this.bbVector.length()});c(b,"getInfo",function(a){var d=Double.$valueOf(Math.abs(8*this.bbVector.x*this.bbVector.y*this.bbVector.z));if("volume".equals(a))return d;var b=JU.P3.newP(this.bbCenter);return"center".equals(a)?b:null==a||"info".equals(a)?(a=new java.util.Hashtable,a.put("center",b),
b=JU.V3.newVsub(this.bbCorner1,this.bbCorner0),a.put("dimensions",b),a.put("girth",Double.$valueOf(b.x+b.y+b.z)),a.put("area",Double.$valueOf(2*(b.x*b.y+b.x*b.z+b.z*b.y))),a.put("volume",d),a):null},"~S");g(b,"toString",function(){return""+this.bbCorner0+this.bbCorner1});b.getBoxFacesFromOABC=c(b,"getBoxFacesFromOABC",function(a){var d=Array(6),b=new JU.V3,c=new JU.V3,e=new JU.P3,f=new JU.P3,j=new JU.P3;a=null==a?JU.BoxInfo.unitCubePoints:JU.BoxInfo.getVerticesFromOABC(a);for(var k=0;6>k;k++)e.setT(a[JU.BoxInfo.facePoints[k][0]]),
f.setT(a[JU.BoxInfo.facePoints[k][1]]),j.setT(a[JU.BoxInfo.facePoints[k][2]]),d[k]=JU.Measure.getPlaneThroughPoints(e,f,j,b,c,new JU.P4);return d},"~A");b.bbcageTickEdges=ba(-1,"z\x00\x00yx\x00\x00\x00\x00\x00\x00\x00".split(""));b.uccageTickEdges=ba(-1,"zyx\x00\x00\x00\x00\x00\x00\x00\x00\x00".split(""));b.edges=O(-1,[0,1,0,2,0,4,1,3,1,5,2,3,2,6,3,7,4,5,4,6,5,7,6,7]);b.faceOrder=E(-1,[0,3,5,2,1,4]);b.facePoints=u(-1,[E(-1,[4,0,6]),E(-1,[4,6,5]),E(-1,[5,7,1]),E(-1,[1,3,0]),E(-1,[6,2,7]),E(-1,[1,0,
5]),E(-1,[0,2,6]),E(-1,[6,7,5]),E(-1,[7,3,1]),E(-1,[3,2,0]),E(-1,[2,3,7]),E(-1,[0,4,5])]);b.unitCubePoints=u(-1,[JU.P3.new3(0,0,0),JU.P3.new3(0,0,1),JU.P3.new3(0,1,0),JU.P3.new3(0,1,1),JU.P3.new3(1,0,0),JU.P3.new3(1,0,1),JU.P3.new3(1,1,0),JU.P3.new3(1,1,1)]);b.toCanonical=E(-1,[0,3,4,7,1,2,5,6]);b.unitBboxPoints=Array(8)});n("JU");z(["JU.BS"],"JU.BSUtil",null,function(){var b=G(JU,"BSUtil",null);b.newAndSetBit=c(b,"newAndSetBit",function(a){var d=JU.BS.newN(a+1);d.set(a);return d},"~N");b.areEqual=
c(b,"areEqual",function(a,d){return null==a||null==d?null==a&&null==d:a.equals(d)},"JU.BS,JU.BS");b.haveCommon=c(b,"haveCommon",function(a,d){return null==a||null==d?!1:a.intersects(d)},"JU.BS,JU.BS");b.cardinalityOf=c(b,"cardinalityOf",function(a){return null==a?0:a.cardinality()},"JU.BS");b.newBitSet2=c(b,"newBitSet2",function(a,d){var b=JU.BS.newN(d);b.setBits(a,d);return b},"~N,~N");b.setAll=c(b,"setAll",function(a){var d=JU.BS.newN(a);d.setBits(0,a);return d},"~N");b.andNot=c(b,"andNot",function(a,
d){null!=d&&null!=a&&a.andNot(d);return a},"JU.BS,JU.BS");b.copy=c(b,"copy",function(a){return null==a?null:a.clone()},"JU.BS");b.copy2=c(b,"copy2",function(a,d){if(null==a||null==d)return null;d.clearAll();d.or(a);return d},"JU.BS,JU.BS");b.copyInvert=c(b,"copyInvert",function(a,d){return null==a?null:JU.BSUtil.andNot(JU.BSUtil.setAll(d),a)},"JU.BS,~N");b.invertInPlace=c(b,"invertInPlace",function(a,d){return JU.BSUtil.copy2(JU.BSUtil.copyInvert(a,d),a)},"JU.BS,~N");b.toggleInPlace=c(b,"toggleInPlace",
function(a,d){a.equals(d)?a.clearAll():0==JU.BSUtil.andNot(JU.BSUtil.copy(d),a).length()?JU.BSUtil.andNot(a,d):a.or(d);return a},"JU.BS,JU.BS");b.deleteBits=c(b,"deleteBits",function(a,d){if(null==a||null==d)return a;var b=d.nextSetBit(0);if(0>b)return a;var c=a.length(),e=Math.min(c,d.length()),f;for(f=d.nextClearBit(b);f<e&&0<=f;f=d.nextClearBit(f+1))a.setBitTo(b++,a.get(f));for(f=e;f<c;f++)a.setBitTo(b++,a.get(f));b<c&&a.clearBits(b,c);return a},"JU.BS,JU.BS");b.shiftBits=c(b,"shiftBits",function(a,
d,b,c){if(!(null==a||null==d)){for(var e=d.length(),f=JU.BS.newN(e),j=!1,k=!1,g=b,s=0,m=0;s<e&&m<c;s++)d.get(s)?(k&&f.set(s),g=b,j=!1):a.get(m++)?(f.set(s),g&&(g=!1,k=j=!0)):g&&!j&&(k=!1);a.clearAll();a.or(f)}},"JU.BS,JU.BS,~B,~N");b.offset=c(b,"offset",function(a,d,b){if(null!=a){for(var c=JU.BS.newN(a.length()+b),e=a.nextSetBit(0);e>=d;e=a.nextSetBit(e+1))c.set(e+b);JU.BSUtil.copy2(c,a)}},"JU.BS,~N,~N");b.setMapBitSet=c(b,"setMapBitSet",function(a,d,b,c){var e;a.containsKey(c)?e=a.get(c):a.put(c,
e=new JU.BS);e.setBits(d,b+1)},"java.util.Map,~N,~N,~S");b.emptySet=new JU.BS});n("JU");z(["JU.Int2IntHash"],"JU.C","JU.AU $.CU $.PT $.SB J.c.PAL JU.Escape $.Logger".split(" "),function(){var b=G(JU,"C",null);b.getColix=c(b,"getColix",function(a){if(0==a)return 0;a|=4278190080;var b=JU.C.colixHash.get(a);return(0<b?b:JU.C.allocateColix(a,!1))|0},"~N");b.allocateColix=c(b,"allocateColix",function(a,b){var c;if(b)c=2047;else{if(-74566==a)return 3;for(c=JU.C.colixMax;4<=--c;)if((a&16777215)==(JU.C.argbs[c]&
16777215))return c;c=JU.C.colixMax}if(c>=JU.C.argbs.length){var e=b?c+1:2*JU.C.colixMax;2048<e&&(e=2048);JU.C.argbs=JU.AU.arrayCopyI(JU.C.argbs,e);null!=JU.C.argbsGreyscale&&(JU.C.argbsGreyscale=JU.AU.arrayCopyI(JU.C.argbsGreyscale,e))}JU.C.argbs[c]=a;null!=JU.C.argbsGreyscale&&(JU.C.argbsGreyscale[c]=JU.CU.toFFGGGfromRGB(a));JU.C.colixHash.put(a,c);return 2047>c?JU.C.colixMax++:JU.C.colixMax},"~N,~B");b.setLastGrey=c(b,"setLastGrey",function(a){JU.C.calcArgbsGreyscale();JU.C.argbsGreyscale[2047]=
JU.CU.toFFGGGfromRGB(a)},"~N");b.calcArgbsGreyscale=c(b,"calcArgbsGreyscale",function(){if(null==JU.C.argbsGreyscale){for(var a=E(JU.C.argbs.length,0),b=JU.C.argbs.length;4<=--b;)a[b]=JU.CU.toFFGGGfromRGB(JU.C.argbs[b]);JU.C.argbsGreyscale=a}});b.getArgbGreyscale=c(b,"getArgbGreyscale",function(a){null==JU.C.argbsGreyscale&&JU.C.calcArgbsGreyscale();return JU.C.argbsGreyscale[a&-30721]},"~N");b.getColixO=c(b,"getColixO",function(a){if(null==a)return 0;if(C(a,"J.c.PAL"))return a===J.c.PAL.NONE?0:2;
if(C(a,Integer))return JU.C.getColix(a.intValue());if("string"==typeof a)return JU.C.getColixS(a);if(C(a,Byte))return 0==a.byteValue()?0:2;JU.Logger.debugging&&JU.Logger.debug("?? getColix("+a+")");return 22},"~O");b.getTranslucentFlag=c(b,"getTranslucentFlag",function(a){return 0==a?0:0>a?30720:Float.isNaN(a)||255<=a||1==a?16384:(v(Math.floor(1>a?256*a:15<=a?a:9>=a?v(Math.floor(a-1))<<5:256))>>5&15)<<11},"~N");b.isColixLastAvailable=c(b,"isColixLastAvailable",function(a){return 0<a&&2047==(a&2047)},
"~N");b.getArgb=c(b,"getArgb",function(a){return JU.C.argbs[a&-30721]},"~N");b.isColixColorInherited=c(b,"isColixColorInherited",function(a){switch(a){case 0:case 1:return!0;default:return 1==(a&-30721)}},"~N");b.getColixInherited=c(b,"getColixInherited",function(a,b){switch(a){case 0:return b;case 1:return b&-30721;default:return 1==(a&-30721)?b&-30721|a&30720:a}},"~N,~N");b.renderPass2=c(b,"renderPass2",function(a){a&=30720;return 0!=a&&30720!=a},"~N");b.isColixTranslucent=c(b,"isColixTranslucent",
function(a){return 0!=(a&30720)},"~N");b.getChangeableColixIndex=c(b,"getChangeableColixIndex",function(a){return 0<=a?-1:a&2047},"~N");b.getColixTranslucent3=c(b,"getColixTranslucent3",function(a,b,c){a&=-30721;0==a&&(a=1);return b?a|JU.C.getTranslucentFlag(c):a},"~N,~B,~N");b.copyColixTranslucency=c(b,"copyColixTranslucency",function(a,b){return JU.C.getColixTranslucent3(b,JU.C.isColixTranslucent(a),JU.C.getColixTranslucencyLevel(a))},"~N,~N");b.getColixTranslucencyFractional=c(b,"getColixTranslucencyFractional",
function(a){a=JU.C.getColixTranslucencyLevel(a);return-1==a?0.5:0==a?0:255==a?1:a/256},"~N");b.getColixTranslucencyLabel=c(b,"getColixTranslucencyLabel",function(a){return"translucent "+(30720==(a&30720)?-1:JU.C.getColixTranslucencyFractional(a))},"~N");b.getColixTranslucencyLevel=c(b,"getColixTranslucencyLevel",function(a){a=a>>11&15;switch(a){case 0:return 0;case 1:case 2:case 3:case 4:case 5:case 6:case 7:return a<<5;case 15:return-1;default:return 255}},"~N");b.isTransparent=c(b,"isTransparent",
function(a){return 16384==(a&30720)},"~N");b.getColixS=c(b,"getColixS",function(a){var b=JU.CU.getArgbFromString(a);return 0!=b?JU.C.getColix(b):"none".equalsIgnoreCase(a)?0:"opaque".equalsIgnoreCase(a)?1:2},"~S");b.getColixArray=c(b,"getColixArray",function(a){if(null==a||0==a.length)return null;a=JU.PT.getTokens(a);for(var b=U(a.length,0),c=0;c<a.length;c++)if(b[c]=JU.C.getColix(JU.CU.getArgbFromString(a[c])),0==b[c])return null;return b},"~S");b.getHexCode=c(b,"getHexCode",function(a){return JU.Escape.escapeColor(JU.C.getArgb(a))},
"~N");b.getHexCodes=c(b,"getHexCodes",function(a){if(null==a)return null;for(var b=new JU.SB,c=0;c<a.length;c++)b.append(0==c?"":" ").append(JU.C.getHexCode(a[c]));return b.toString()},"~A");b.getColixTranslucent=c(b,"getColixTranslucent",function(a){var b=a>>24&255;return 255==b?JU.C.getColix(a):JU.C.getColixTranslucent3(JU.C.getColix(a),!0,b/255)},"~N");b.getBgContrast=c(b,"getBgContrast",function(a){return 128>(JU.CU.toFFGGGfromRGB(a)&255)?8:4},"~N");b.colixMax=4;b.argbs=E(128,0);JU.C.argbs[3]=
-74566;b.argbsGreyscale=null;b.colixHash=new JU.Int2IntHash(256);for(var b=E(-1,[4278190080,4294944E3,4294951115,4278190335,4294967295,4278255615,4294901760,4278222848,4286611584,4290822336,4278255360,4286578688,4278190208,4286611456,4286578816,4278222976,4294902015,4294967040,4294928820,4294956800]),a=0;a<b.length;++a)JU.C.getColix(b[a])});n("JU");z(null,"JU.ColorEncoder","java.util.Hashtable JU.AU $.CU $.Lst $.PT $.Rdr J.c.PAL JU.C $.Escape $.Logger JV.FileManager $.JC".split(" "),function(){var b=
w(function(){this.argbsNucleic=this.argbsAmino=this.argbsShapely=this.argbsRwb=this.argbsRoygb=this.argbsCpk=this.paletteFriendly=this.paletteWB=this.paletteBW=this.vwr=null;this.ihalf=0;this.schemes=null;this.currentPalette=0;this.currentSegmentCount=1;this.isTranslucent=!1;this.hi=this.lo=0;this.isReversed=!1;this.thisScale=this.userScale=null;this.thisName="scheme";this.isColorIndex=!1;this.ce=null;q(this,arguments)},JU,"ColorEncoder",null);N(b,function(){this.userScale=E(-1,[-8355712]);this.thisScale=
E(-1,[-8355712])});x(b,function(a,d){null==a?(this.vwr=d,this.schemes=new java.util.Hashtable,this.argbsCpk=J.c.PAL.argbsCpk,this.argbsRoygb=JV.JC.argbsRoygbScale,this.argbsRwb=JV.JC.argbsRwbScale,this.argbsAmino=this.argbsNucleic=this.argbsShapely=null,this.ihalf=v(JV.JC.argbsRoygbScale.length/3),this.ce=this):(this.ce=a,this.vwr=a.vwr,this.schemes=a.schemes)},"JU.ColorEncoder,JV.Viewer");c(b,"clearCache",function(){this.schemes.clear()});b.getSchemeIndex=c(b,"getSchemeIndex",function(a){for(var d=
0;d<JU.ColorEncoder.colorSchemes.length;d++)if(JU.ColorEncoder.colorSchemes[d].equalsIgnoreCase(a))return 16<=d?d-16:13>d?d:-d;return-1},"~S");b.fixName=c(b,"fixName",function(a){if(a.equalsIgnoreCase("byelement"))return"byelement_jmol";var d=JU.ColorEncoder.getSchemeIndex(a);return 0<=d?JU.ColorEncoder.colorSchemes[d]:0<=a.indexOf("/")?a:a.toLowerCase()},"~S");c(b,"makeColorScheme",function(a,d,b){a=JU.ColorEncoder.fixName(a);if(null==d){this.schemes.remove(a);a=this.createColorScheme(a,!1,b);if(b)switch(a){case 2147483647:return 0;
case 12:this.paletteFriendly=this.getPaletteAC();break;case 10:this.paletteBW=this.getPaletteBW();break;case 11:this.paletteWB=this.getPaletteWB();break;case 0:case 1:this.argbsRoygb=JV.JC.argbsRoygbScale;break;case 6:case 7:this.argbsRwb=JV.JC.argbsRwbScale;break;case 2:this.argbsCpk=J.c.PAL.argbsCpk;break;case 3:JU.ColorEncoder.getRasmolScale();break;case 17:this.getNucleic();break;case 5:this.getAmino();break;case 4:this.getShapely()}return a}this.schemes.put(a,d);this.setThisScheme(a,d);a=this.createColorScheme(a,
!1,b);if(b)switch(a){case 10:this.paletteBW=this.thisScale;break;case 11:this.paletteWB=this.thisScale;break;case 0:case 1:this.argbsRoygb=this.thisScale;this.ihalf=v(this.argbsRoygb.length/3);break;case 6:case 7:this.argbsRwb=this.thisScale;break;case 2:this.argbsCpk=this.thisScale;break;case 5:this.argbsAmino=this.thisScale;break;case 17:this.argbsNucleic=this.thisScale;break;case 4:this.argbsShapely=this.thisScale}return-1},"~S,~A,~B");c(b,"getShapely",function(){return null==this.argbsShapely?
this.argbsShapely=this.vwr.getJBR().getArgbs(1073742144):this.argbsShapely});c(b,"getAmino",function(){return null==this.argbsAmino?this.argbsAmino=this.vwr.getJBR().getArgbs(2097154):this.argbsAmino});c(b,"getNucleic",function(){return null==this.argbsNucleic?this.argbsNucleic=this.vwr.getJBR().getArgbs(2097166):this.argbsNucleic});c(b,"createColorScheme",function(a,d,b){if(a.equalsIgnoreCase("inherit"))return 15;var c=a.lastIndexOf("="),e=a.indexOf("/"),f=Math.max(c,a.indexOf("[")),c=JU.ColorEncoder.fixName(a),
j=JU.ColorEncoder.getSchemeIndex(c);if(-1==j&&(0>f||0<e)){b=a;e=this.schemes.get(c);if(null==e)try{var k="~"==b.charAt(1);k&&(b=b.substring(1));for(c=null;;){if(0>b.indexOf("/")){0>b.indexOf(".")&&(b+=".lut.txt");var g=Array(1);try{JU.Logger.info("ColorEncoder opening colorschemes/"+b),JU.Rdr.readAllAsString(JV.FileManager.getBufferedReaderForResource(this.vwr,JU.C,"JU/","colorschemes/"+b),-1,!1,g,0)}catch(s){if(D(s,"java.io.IOException")){JU.Logger.info("ColorEncoder "+s);break}else throw s;}b=g[0]}else{b=
JU.PT.rep(b," ","%20");JU.Logger.info("ColorEncoder opening "+b);var m=this.vwr.fm.getFileAsBytes(b,null);if("string"==typeof m){JU.Logger.info("ColorEncoder "+m);break}c=m;JU.Logger.info("ColorEncoder read "+c.length+" bytes");var g=0,p=c.length;if(800==p||802==p)g=32;if(768==p-g||770==p-g)for(var e=E(256,0),p=256+g,y=0;256>y;y++)e[y]=JU.CU.rgb(c[y+g]&255,c[y+g+256]&255,c[y+g+512]&255);else b=String.instantialize(c)}if(null==e)for(var A=JU.PT.split(b.trim(),"\n"),p=A.length,e=E(p,0),n=0<p&&0>A[0].indexOf("."),
y=0;y<p;y++){var q=JU.PT.getTokens(A[y]);if(3>q.length){e=null;break}var u=q.length;e[y]=n?JU.CU.rgb(JU.PT.parseInt(q[u-3]),JU.PT.parseInt(q[u-2]),JU.PT.parseInt(q[u-1])):JU.CU.colorTriadToFFRGB(JU.PT.parseFloat(q[u-3]),JU.PT.parseFloat(q[u-2]),JU.PT.parseFloat(q[u-1]))}if(null!=e&&k){y=0;p=e.length-1;for(k=p+1>>1;y<k;y++){var v=e[y];e[y]=e[p-y];e[p-y]=v}}break}}catch(w){if(D(w,Exception))JU.Logger.info("ColorEncoder "+w),e=null;else throw w;}null==e&&(e=E(-1,[-1]));this.schemes.put(a,e);this.setThisScheme(a,
e);return-1}if(0<=f){a=a.toLowerCase();c=JU.PT.replaceAllCharacters(a.substring(0,f)," =","");0<c.length&&(b=!0);p=0;a.length>f+1&&!a.contains("[")&&(a="["+a.substring(f+1).trim()+"]",a=JU.PT.rep(a.$replace("\n"," "),"  "," "),a=JU.PT.rep(a,", ",",").$replace(" ",","),a=JU.PT.rep(a,",","]["));for(f=-1;0<=(f=a.indexOf("[",f+1));)p++;if(0==p)return this.makeColorScheme(c,null,b);e=E(p,0);for(p=0;0<=(f=a.indexOf("[",f+1));){y=a.indexOf("]",f);0>y&&(y=a.length-1);v=JU.CU.getArgbFromString(a.substring(f,
y+1));0==v&&(v=JU.CU.getArgbFromString(a.substring(f+1,y).trim()));if(0==v)return JU.Logger.error("error in color value: "+a.substring(f,y+1)),0;e[p++]=v}return c.equals("user")?(this.setUserScale(e),-13):this.makeColorScheme(c,e,b)}e=this.schemes.get(c);return null!=e?(this.setThisScheme(c,e),j):-1!=j?j:d?0:2147483647},"~S,~B,~B");c(b,"setUserScale",function(a){this.ce.userScale=a;this.makeColorScheme("user",a,!1)},"~A");c(b,"getColorSchemeArray",function(a){switch(a){case -1:return this.thisScale;
case 0:return this.ce.argbsRoygb;case 1:return JU.AU.arrayCopyRangeRevI(this.ce.argbsRoygb,0,-1);case 8:return JU.AU.arrayCopyRangeI(this.ce.argbsRoygb,0,this.ce.ihalf);case 9:var d=JU.AU.arrayCopyRangeI(this.ce.argbsRoygb,this.ce.argbsRoygb.length-2*this.ce.ihalf,-1);a=E(this.ce.ihalf,0);for(var b=a.length,c=d.length;0<=--b&&0<=--c;)a[b]=d[c--];return a;case 12:return this.getPaletteAC();case 10:return this.getPaletteBW();case 11:return this.getPaletteWB();case 6:return this.ce.argbsRwb;case 7:return JU.AU.arrayCopyRangeRevI(this.ce.argbsRwb,
0,-1);case 2:return this.ce.argbsCpk;case 3:return JU.ColorEncoder.getRasmolScale();case 4:return this.ce.getShapely();case 17:return this.ce.getNucleic();case 5:return this.ce.getAmino();case -13:return this.ce.userScale;case -14:return JU.AU.arrayCopyRangeRevI(this.ce.userScale,0,-1);default:return null}},"~N");c(b,"getColorIndexFromPalette",function(a,d,b,c,e){c=JU.C.getColix(this.getArgbFromPalette(a,d,b,c));e&&(a=(b-a)/(b-d),1<a?a=1:0.125>a&&(a=0.125),c=JU.C.getColixTranslucent3(c,!0,a));return c},
"~N,~N,~N,~N,~B");c(b,"getPaletteColorCount",function(a){switch(a){case -1:return this.thisScale.length;case 10:case 11:return this.getPaletteBW().length;case 0:case 1:return this.ce.argbsRoygb.length;case 8:case 9:return this.ce.ihalf;case 6:case 7:return this.ce.argbsRwb.length;case -13:case -14:return this.ce.userScale.length;case 2:return this.ce.argbsCpk.length;case 3:return JU.ColorEncoder.getRasmolScale().length;case 4:return this.ce.getShapely().length;case 17:return this.ce.getNucleic().length;
case 5:return this.ce.getAmino().length;case 12:return this.getPaletteAC().length;default:return 0}},"~N");c(b,"getArgbFromPalette",function(a,d,b,c){if(Float.isNaN(a))return-8355712;var e=this.getPaletteColorCount(c);switch(c){case -1:return this.isColorIndex&&(d=0,b=this.thisScale.length),this.thisScale[JU.ColorEncoder.quantize4(a,d,b,e)];case 10:return this.getPaletteBW()[JU.ColorEncoder.quantize4(a,d,b,e)];case 11:return this.getPaletteWB()[JU.ColorEncoder.quantize4(a,d,b,e)];case 0:return this.ce.argbsRoygb[JU.ColorEncoder.quantize4(a,
d,b,e)];case 1:return this.ce.argbsRoygb[JU.ColorEncoder.quantize4(-a,-b,-d,e)];case 8:return this.ce.argbsRoygb[JU.ColorEncoder.quantize4(a,d,b,e)];case 9:return this.ce.argbsRoygb[this.ce.ihalf+2*JU.ColorEncoder.quantize4(a,d,b,e)];case 6:return this.ce.argbsRwb[JU.ColorEncoder.quantize4(a,d,b,e)];case 7:return this.ce.argbsRwb[JU.ColorEncoder.quantize4(-a,-b,-d,e)];case -13:return 0==this.ce.userScale.length?-8355712:this.ce.userScale[JU.ColorEncoder.quantize4(a,d,b,e)];case -14:return 0==this.ce.userScale.length?
-8355712:this.ce.userScale[JU.ColorEncoder.quantize4(-a,-b,-d,e)];case 2:return this.ce.argbsCpk[JU.ColorEncoder.colorIndex(a,e)];case 3:return JU.ColorEncoder.getRasmolScale()[JU.ColorEncoder.colorIndex(a,e)];case 4:return this.ce.getShapely()[JU.ColorEncoder.colorIndex(a,e)];case 5:return this.ce.getAmino()[JU.ColorEncoder.colorIndex(a,e)];case 17:return this.ce.getNucleic()[JU.ColorEncoder.colorIndex(a-24+2,e)];case 12:return this.getPaletteAC()[JU.ColorEncoder.colorIndexRepeat(a,e)];default:return-8355712}},
"~N,~N,~N,~N");c(b,"setThisScheme",function(a,d){this.thisName=a;this.thisScale=d;a.equals("user")&&(this.userScale=d);this.isColorIndex=0==a.indexOf("byelement")||0==a.indexOf("byresidue")},"~S,~A");c(b,"getArgb",function(a){return this.isReversed?this.getArgbFromPalette(-a,-this.hi,-this.lo,this.currentPalette):this.getArgbFromPalette(a,this.lo,this.hi,this.currentPalette)},"~N");c(b,"getArgbMinMax",function(a,d,b){return this.isReversed?this.getArgbFromPalette(-a,-b,-d,this.currentPalette):this.getArgbFromPalette(a,
d,b,this.currentPalette)},"~N,~N,~N");c(b,"getColorIndex",function(a){return this.isReversed?this.getColorIndexFromPalette(-a,-this.hi,-this.lo,this.currentPalette,this.isTranslucent):this.getColorIndexFromPalette(a,this.lo,this.hi,this.currentPalette,this.isTranslucent)},"~N");c(b,"getColorKey",function(){for(var a=new java.util.Hashtable,d=this.getPaletteColorCount(this.currentPalette),b=new JU.Lst,c=L(d+1,0),e=(this.hi-this.lo)/d,f=e*(this.isReversed?-0.5:0.5),j=0;j<d;j++)c[j]=this.isReversed?
this.hi-j*e:this.lo+j*e,b.addLast(JU.CU.colorPtFromInt(this.getArgb(c[j]+f),null));c[d]=this.isReversed?this.lo:this.hi;a.put("values",c);a.put("colors",b);a.put("min",Float.$valueOf(this.lo));a.put("max",Float.$valueOf(this.hi));a.put("reversed",Boolean.$valueOf(this.isReversed));a.put("name",this.getCurrentColorSchemeName());return a});c(b,"getColorScheme",function(){return(this.isTranslucent?"translucent ":"")+(0>this.currentPalette?JU.ColorEncoder.getColorSchemeList(this.getColorSchemeArray(this.currentPalette)):
this.getColorSchemeName(this.currentPalette))});c(b,"setColorScheme",function(a,d){this.isTranslucent=d;null!=a&&(this.currentPalette=this.createColorScheme(a,!0,!1))},"~S,~B");c(b,"setRange",function(a,d,b){3.4028235E38==d&&(a=1,d=this.getPaletteColorCount(this.currentPalette)+1);this.lo=Math.min(a,d);this.hi=Math.max(a,d);this.isReversed=b},"~N,~N,~B");c(b,"getCurrentColorSchemeName",function(){return this.getColorSchemeName(this.currentPalette)});c(b,"getColorSchemeName",function(a){var d=Math.abs(a);
return-1==a?this.thisName:d<JU.ColorEncoder.colorSchemes.length&&0<=d?JU.ColorEncoder.colorSchemes[d]:null},"~N");b.getColorSchemeList=c(b,"getColorSchemeList",function(a){if(null==a)return"";for(var d="",b=0;b<a.length;b++)d+=(0==b?"":" ")+JU.Escape.escapeColor(a[b]);return d},"~A");b.getRasmolScale=c(b,"getRasmolScale",function(){if(null!=JU.ColorEncoder.rasmolScale)return JU.ColorEncoder.rasmolScale;JU.ColorEncoder.rasmolScale=E(J.c.PAL.argbsCpk.length,0);for(var a=J.c.PAL.argbsCpkRasmol[0]|4278190080,
d=JU.ColorEncoder.rasmolScale.length;0<=--d;)JU.ColorEncoder.rasmolScale[d]=a;for(d=J.c.PAL.argbsCpkRasmol.length;0<=--d;)a=J.c.PAL.argbsCpkRasmol[d],JU.ColorEncoder.rasmolScale[a>>24]=a|4278190080;return JU.ColorEncoder.rasmolScale});c(b,"getPaletteAC",function(){return null==this.ce.paletteFriendly?this.ce.paletteFriendly=E(-1,[8421504,1067945,11141282,13235712,16753152,2640510,8331387,10467374,12553008,339310,7209065,8626176,10906112,4488148,13907405,14219839,16759360,6984660,13918415,14809713,
16764019]):this.ce.paletteFriendly});c(b,"getPaletteWB",function(){if(null!=this.ce.paletteWB)return this.ce.paletteWB;for(var a=E(JV.JC.argbsRoygbScale.length,0),d=0;d<a.length;d++){var b=1/a.length*(a.length-d);a[d]=JU.CU.colorTriadToFFRGB(b,b,b)}return this.ce.paletteWB=a});b.getPaletteAtoB=c(b,"getPaletteAtoB",function(a,d,b){2>b&&(b=JV.JC.argbsRoygbScale.length);var c=E(b,0),e=L(3,0),f=L(3,0);JU.CU.toRGB3f(a,e);JU.CU.toRGB3f(d,f);a=(f[0]-e[0])/(b-1);d=(f[1]-e[1])/(b-1);for(var f=(f[2]-e[2])/
(b-1),j=0;j<b;j++)c[j]=JU.CU.colorTriadToFFRGB(e[0]+a*j,e[1]+d*j,e[2]+f*j);return c},"~N,~N,~N");c(b,"getPaletteBW",function(){if(null!=this.ce.paletteBW)return this.ce.paletteBW;for(var a=E(JV.JC.argbsRoygbScale.length,0),d=0;d<a.length;d++){var b=1/a.length*d;a[d]=JU.CU.colorTriadToFFRGB(b,b,b)}return this.ce.paletteBW=a});c(b,"quantize",function(a,d){var b=this.getPaletteColorCount(this.currentPalette);a=(F(a*b)+(d?0:1))/b;return 0>=a?this.lo:1<=a?this.hi:this.lo+(this.hi-this.lo)*a},"~N,~B");
b.quantize4=c(b,"quantize4",function(a,d,b,c){b-=d;if(0>=b||Float.isNaN(a))return v(c/2);a-=d;if(0>=a)return 0;a=F(a/(b/c)+1E-4);a>=c&&(a=c-1);return a},"~N,~N,~N,~N");b.colorIndex=c(b,"colorIndex",function(a,d){return v(Math.floor(0>=a||a>=d?0:a))},"~N,~N");b.colorIndexRepeat=c(b,"colorIndexRepeat",function(a,d){return v(Math.floor(0>=a?0:a))%d},"~N,~N");b.colorSchemes=u(-1,"roygb bgyor byelement_jmol byelement_rasmol byresidue_shapely byresidue_amino rwb bwr low high bw wb friendly user resu inherit rgb bgr jmol rasmol byresidue byresidue_nucleic".split(" "));
b.rasmolScale=null;b.argbsChainAtom=null;b.argbsChainHetero=null});n("JU");z(null,"JU.CommandHistory",["JU.Lst"],function(){var b=w(function(){this.commandList=null;this.maxSize=100;this.cursorPos=this.nextCommand=0;this.isOn=!0;this.lstStates=null;q(this,arguments)},JU,"CommandHistory",null);x(b,function(){this.reset(100)});c(b,"clear",function(){this.reset(this.maxSize)});c(b,"reset",function(a){this.maxSize=a;this.commandList=new JU.Lst;this.nextCommand=0;this.commandList.addLast("");this.cursorPos=
0},"~N");c(b,"setMaxSize",function(a){if(a!=this.maxSize){for(2>a&&(a=2);this.nextCommand>a;)this.commandList.removeItemAt(0),this.nextCommand--;this.nextCommand>a&&(this.nextCommand=a-1);this.cursorPos=this.nextCommand;this.maxSize=a}},"~N");c(b,"getCommandUp",function(){if(0>=this.cursorPos)return null;this.cursorPos--;var a=this.getCommand();a.endsWith("#??")&&this.removeCommand(this.cursorPos--);0>this.cursorPos&&(this.cursorPos=0);return a});c(b,"getCommandDown",function(){if(this.cursorPos>=
this.nextCommand)return null;this.cursorPos++;return this.getCommand()});c(b,"getCommand",function(){return this.commandList.get(this.cursorPos)});c(b,"addCommand",function(a){if((this.isOn||a.endsWith("#??"))&&!a.endsWith("#----")){for(var d;0<=(d=a.indexOf("\n"));){var b=a.substring(0,d);0<b.length&&this.addCommandLine(b);a=a.substring(d+1)}0<a.length&&this.addCommandLine(a)}},"~S");c(b,"getSetHistory",function(a){this.isOn=-2==a?this.isOn:!0;switch(a){case 0:return this.isOn=!1,this.clear(),"";
case -2147483648:case -2:return this.clear(),"";case -1:return this.getCommandUp();case 1:return this.getCommandDown();default:if(0>a)return this.setMaxSize(-2-a),"";a=Math.max(this.nextCommand-a,0)}for(var d="";a<this.nextCommand;a++)this.commandList.get(a).toUpperCase().startsWith("WRITE HISTORY")||(d+=this.commandList.get(a)+"\n");return d},"~N");c(b,"find",function(a,d){for(var b=this.cursorPos,c=a;null!=c;){c=this.getSetHistory(d);if(null==c)break;if(c.startsWith(a))return c}this.cursorPos=b;
return null},"~S,~N");c(b,"removeCommand",function(){return this.removeCommand(this.nextCommand-1)});c(b,"removeCommand",function(a){if(0>a||a>=this.nextCommand)return"";a=this.commandList.removeItemAt(a);this.nextCommand--;return a},"~N");c(b,"addCommandLine",function(a){if(!(null==a||0==a.length)&&!a.endsWith("#--"))0<this.nextCommand&&a.equals(this.commandList.get(this.nextCommand-1))?this.cursorPos=this.nextCommand:(this.nextCommand>=this.maxSize&&(this.commandList.removeItemAt(0),this.nextCommand=
this.maxSize-1),this.commandList.add(this.nextCommand,a),this.nextCommand++,this.cursorPos=this.nextCommand,this.commandList.add(this.nextCommand,""))},"~S");c(b,"pushState",function(a){null==this.lstStates&&(this.lstStates=new JU.Lst);this.lstStates.addLast(a)},"~S");c(b,"popState",function(){return null==this.lstStates||0==this.lstStates.size()?null:this.lstStates.removeItemAt(this.lstStates.size()-1)})});n("JU");z(["JU.LoggerInterface"],"JU.DefaultLogger",["JU.Logger"],function(){var b=G(JU,"DefaultLogger",
null,JU.LoggerInterface);c(b,"log",function(a,d,b,c){a===System.err&&System.out.flush();if(null!=a&&(null!=b||null!=c))if(b=(JU.Logger.logLevel()?"["+JU.Logger.getLevel(d)+"] ":"")+(null!=b?b:"")+(null!=c?": "+c.toString():""),a.println(b),null!=c&&(d=c.getStackTrace(),null!=d))for(c=0;c<d.length;c++)a.println(d[c].getClassName()+" - "+d[c].getLineNumber()+" - "+d[c].getMethodName());a===System.err&&System.err.flush();return b},"java.io.PrintStream,~N,~S,Throwable");g(b,"debug",function(a){this.log(System.out,
5,a,null)},"~S");g(b,"info",function(a){this.log(System.out,4,a,null)},"~S");g(b,"warn",function(a){this.log(System.out,3,a,null)},"~S");g(b,"warnEx",function(a,d){this.log(System.out,3,a,d)},"~S,Throwable");g(b,"error",function(a){this.log(System.err,2,a,null)},"~S");g(b,"errorEx",function(a,d){this.log(System.err,2,a,d)},"~S,Throwable");g(b,"fatal",function(a){this.log(System.err,1,a,null)},"~S");g(b,"fatalEx",function(a,d){this.log(System.err,1,a,d)},"~S,Throwable")});n("JU");z(["JU.BS"],"JU.Elements",
["java.util.Hashtable","JU.PT","JU.Logger"],function(){var b=G(JU,"Elements",null);b.getNaturalIsotope=c(b,"getNaturalIsotope",function(a){return JU.Elements.isotopeMass[a&127]},"~N");b.getAtomicMass=c(b,"getAtomicMass",function(a){return 1>a||a>=JU.Elements.atomicMass.length?0:JU.Elements.atomicMass[a]},"~N");b.elementNumberFromSymbol=c(b,"elementNumberFromSymbol",function(a,b){if(null==JU.Elements.htElementMap){for(var c=new java.util.Hashtable,e=JU.Elements.elementNumberMax;0<=--e;){var f=JU.Elements.elementSymbols[e],
j=Integer.$valueOf(e);c.put(f,j);2==f.length&&c.put(f.toUpperCase(),j)}for(e=JU.Elements.altElementMax;4<=--e;)f=JU.Elements.altElementSymbols[e],j=Integer.$valueOf(JU.Elements.altElementNumbers[e]),c.put(f,j),2==f.length&&c.put(f.toUpperCase(),j);c.put("Z",Integer.$valueOf(0));JU.Elements.htElementMap=c}if(null==a)return 0;c=JU.Elements.htElementMap.get(a);if(null!=c)return c.intValue();if(JU.PT.isDigit(a.charAt(0))&&(f=a.length-2,0<=f&&JU.PT.isDigit(a.charAt(f))&&f++,c=0<f?JU.PT.parseInt(a.substring(0,
f)):0,0<c&&(f=JU.Elements.elementNumberFromSymbol(a.substring(f),!0),0<f)))return c=JU.Elements.getAtomicAndIsotopeNumber(f,c),JU.Elements.htElementMap.put(a.toUpperCase(),Integer.$valueOf(c)),c;b||JU.Logger.error("'"+a+"' is not a recognized symbol");return 0},"~S,~B");b.elementSymbolFromNumber=c(b,"elementSymbolFromNumber",function(a){var b=0;if(a>=JU.Elements.elementNumberMax){for(b=JU.Elements.altElementMax;0<=--b;)if(a==JU.Elements.altElementNumbers[b])return JU.Elements.altElementSymbols[b];
b=JU.Elements.getIsotopeNumber(a);return""+b+JU.Elements.getElementSymbol(a&127)}return JU.Elements.getElementSymbol(a)},"~N");b.getElementSymbol=c(b,"getElementSymbol",function(a){if(0>a||a>=JU.Elements.elementNumberMax)a=0;return JU.Elements.elementSymbols[a]},"~N");b.elementNameFromNumber=c(b,"elementNameFromNumber",function(a){if(a>=JU.Elements.elementNumberMax){for(var b=JU.Elements.altElementMax;0<=--b;)if(a==JU.Elements.altElementNumbers[b])return JU.Elements.altElementNames[b];a%=128}if(0>
a||a>=JU.Elements.elementNumberMax)a=0;return JU.Elements.elementNames[a]},"~N");b.elementNumberFromName=c(b,"elementNumberFromName",function(a){for(var b=1;b<JU.Elements.elementNumberMax;b++)if(JU.Elements.elementNames[b].equalsIgnoreCase(a))return b;return-1},"~S");b.altElementNameFromIndex=c(b,"altElementNameFromIndex",function(a){return JU.Elements.altElementNames[a]},"~N");b.altElementNumberFromIndex=c(b,"altElementNumberFromIndex",function(a){return JU.Elements.altElementNumbers[a]},"~N");b.altElementSymbolFromIndex=
c(b,"altElementSymbolFromIndex",function(a){return JU.Elements.altElementSymbols[a]},"~N");b.altIsotopeSymbolFromIndex=c(b,"altIsotopeSymbolFromIndex",function(a){a=JU.Elements.altElementNumbers[a];return(a>>7)+JU.Elements.elementSymbolFromNumber(a&127)},"~N");b.altIsotopeSymbolFromIndex2=c(b,"altIsotopeSymbolFromIndex2",function(a){a=JU.Elements.altElementNumbers[a];return JU.Elements.elementSymbolFromNumber(a&127)+(a>>7)},"~N");b.getElementNumber=c(b,"getElementNumber",function(a){return a&127},
"~N");b.getIsotopeNumber=c(b,"getIsotopeNumber",function(a){return(a&32640)>>7},"~N");b.getAtomicAndIsotopeNumber=c(b,"getAtomicAndIsotopeNumber",function(a,b){return(0>a?0:a)+(0>=b?0:b<<7)},"~N,~N");b.altElementIndexFromNumber=c(b,"altElementIndexFromNumber",function(a){for(var b=0;b<JU.Elements.altElementMax;b++)if(JU.Elements.altElementNumbers[b]==a)return b;return 0},"~N");b.getCommonNMRIsotope=c(b,"getCommonNMRIsotope",function(a){if(JU.PT.isDigit(a.charAt(0)))return a;if(a.equals("D"))return"2H";
var b=JU.Elements.commonNmrIsotopes.indexOf(a+",");return 0>b?a:JU.Elements.commonNmrIsotopes.substring(b-2,b+a.length).trim()},"~S");b.getNmrNucleusFromName=c(b,"getNmrNucleusFromName",function(a){return JU.Elements.getCommonNMRIsotope(JU.Elements.elementSymbolFromNumber(JU.Elements.elementNumberFromName(a)))},"~S");b.isNaturalIsotope=c(b,"isNaturalIsotope",function(a){return 0<="1H,12C,14N".indexOf(a+",")},"~S");b.getBondingRadius=c(b,"getBondingRadius",function(a,b){var c=a&127;return 0<b&&JU.Elements.bsCations.get(c)?
JU.Elements.getBondingRadFromTable(c,b,JU.Elements.cationLookupTable):0>b&&JU.Elements.bsAnions.get(c)?JU.Elements.getBondingRadFromTable(c,b,JU.Elements.anionLookupTable):JU.Elements.defaultBondingMars[(c<<1)+JU.Elements.bondingVersion]/1E3},"~N,~N");b.getCovalentRadius=c(b,"getCovalentRadius",function(a){return JU.Elements.defaultBondingMars[((a&127)<<1)+JU.Elements.covalentVersion]/1E3},"~N");b.getBondingRadFromTable=c(b,"getBondingRadFromTable",function(a,b,c){b=(a<<4)+(b+4);for(var e=0,f=0,j=
0,k=v(c.length/2);j!=k;)if(f=v((j+k)/2),e=c[f<<1],e>b)k=f;else if(e<b)j=f+1;else return c[(f<<1)+1]/1E3;e>b&&f--;e=c[f<<1];a!=e>>4&&f++;return c[(f<<1)+1]/1E3},"~N,~N,~A");b.getVanderwaalsMar=c(b,"getVanderwaalsMar",function(a,b){return JU.Elements.vanderwaalsMars[((a&127)<<2)+b.pt%4]},"~N,J.c.VDW");b.getHydrophobicity=c(b,"getHydrophobicity",function(a){return 1>a||a>=JU.Elements.hydrophobicities.length?0:JU.Elements.hydrophobicities[a]},"~N");b.getAllredRochowElectroNeg=c(b,"getAllredRochowElectroNeg",
function(a){return 0<a&&a<JU.Elements.electroNegativities.length?JU.Elements.electroNegativities[a]:0},"~N");b.isElement=c(b,"isElement",function(a,b){return(a&127)==b},"~N,~N");b.elementSymbols=u(-1,"Xx H He Li Be B C N O F Ne Na Mg Al Si P S Cl Ar K Ca Sc Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr Rb Sr Y Zr Nb Mo Tc Ru Rh Pd Ag Cd In Sn Sb Te I Xe Cs Ba La Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb Lu Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn Fr Ra Ac Th Pa U Np Pu Am Cm Bk Cf Es Fm Md No Lr Rf Db Sg Bh Hs Mt".split(" "));
b.atomicMass=L(-1,[0,1.008,4.002,6.9675,9.012,10.8135,12.0106,14.006,15.999,18.998,20.1797,22.989,24.307,26.981,28.084,30.973,32.059,35.4515,39.948,39.0983,40.078,44.955,47.867,50.9415,51.9961,54.938,55.845,58.933,58.6934,63.546,65.38,69.723,72.63,74.921,78.971,79.904,83.798,85.4678,87.62,88.905,91.224,92.906,95.95,98.91,101.07,102.905,106.42,107.8682,112.414,114.818,118.71,121.76,127.6,126.904,131.293,132.905,137.327,138.905,140.116,140.907,144.242,144.9,150.36,151.964,157.25,158.925,162.5,164.93,
167.259,168.934,173.054,174.9668,178.49,180.947,183.84,186.207,190.23,192.217,195.084,196.966,200.592,204.3835,207.2,208.98,210,210,222,223,226.03,227.03,232.0377,231.035,238.028,237.05,239.1,243.1,247.1,247.1,252.1,252.1,257.1,256.1,259.1,260.1,261,262,263,262,265,268]);b.isotopeMass=E(-1,[0,1,4,7,9,11,12,14,16,19,20,23,24,27,28,31,32,35,40,39,40,45,48,51,52,55,56,59,59,64,65,70,73,75,79,80,84,85,88,89,91,93,96,98,101,103,106,108,112,115,119,122,128,127,131,133,137,139,140,141,144,145,150,152,157,
159,163,165,167,169,173,175,179,181,184,186,190,192,195,197,201,204,207,209,209,210,222,223,226,227,232,231,238,237,244,243,247,247,251,252,257,258,259,260,261,262,263,262,265,268]);b.elementNumberMax=JU.Elements.elementSymbols.length;b.htElementMap=null;b.elementNames=u(-1,"unknown hydrogen helium lithium beryllium boron carbon nitrogen oxygen fluorine neon sodium magnesium aluminum silicon phosphorus sulfur chlorine argon potassium calcium scandium titanium vanadium chromium manganese iron cobalt nickel copper zinc gallium germanium arsenic selenium bromine krypton rubidium strontium yttrium zirconium niobium molybdenum technetium ruthenium rhodium palladium silver cadmium indium tin antimony tellurium iodine xenon cesium barium lanthanum cerium praseodymium neodymium promethium samarium europium gadolinium terbium dysprosium holmium erbium thulium ytterbium lutetium hafnium tantalum tungsten rhenium osmium iridium platinum gold mercury thallium lead bismuth polonium astatine radon francium radium actinium thorium protactinium uranium neptunium plutonium americium curium berkelium californium einsteinium fermium mendelevium nobelium lawrencium rutherfordium dubnium seaborgium bohrium hassium meitnerium".split(" "));
b.commonNmrIsotopes=", 1H, 2H, 6Li, 7Li,10B,13C,15N,17O,19F,";b.altElementNumbers=E(-1,[0,13,16,55,257,385,1414,1670,1798,1927]);b.altElementMax=JU.Elements.altElementNumbers.length;b.altElementSymbols=u(-1,"Xx Al S Cs D T 11C 13C 14C 15N".split(" "));b.altElementNames=u(-1,"dummy aluminium sulphur caesium deuterium tritium    ".split(" "));b.vanderwaalsMars=U(-1,[1E3,1E3,1E3,1E3,1200,1100,1100,1200,1400,1400,2200,1400,1820,1810,1220,2200,1700,1530,628,1900,2080,1920,1548,1800,1950,1700,1548,1700,
1850,1550,1400,1600,1700,1520,1348,1550,1730,1470,1300,1500,1540,1540,2020,1540,2270,2270,2200,2400,1730,1730,1500,2200,2050,1840,1500,2100,2100,2100,2200,2100,2080,1800,1880,1950,2E3,1800,1808,1800,1970,1750,1748,1800,1880,1880,2768,1880,2750,2750,2388,2800,1973,2310,1948,2400,1700,2300,1320,2300,1700,2150,1948,2150,1700,2050,1060,2050,1700,2050,1128,2050,1700,2050,1188,2050,1700,2050,1948,2050,1700,2E3,1128,2E3,1630,2E3,1240,2E3,1400,2E3,1148,2E3,1390,2100,1148,2100,1870,1870,1548,2100,1700,2110,
3996,2100,1850,1850,828,2050,1900,1900,900,1900,2100,1830,1748,1900,2020,2020,1900,2020,1700,3030,2648,2900,1700,2490,2020,2550,1700,2400,1608,2400,1700,2300,1420,2300,1700,2150,1328,2150,1700,2100,1748,2100,1700,2050,1800,2050,1700,2050,1200,2050,1700,2E3,1220,2E3,1630,2050,1440,2050,1720,2100,1548,2100,1580,2200,1748,2200,1930,2200,1448,2200,2170,1930,1668,2250,2200,2170,1120,2200,2060,2060,1260,2100,2150,1980,1748,2100,2160,2160,2100,2160,1700,3430,3008,3E3,1700,2680,2408,2700,1700,2500,1828,2500,
1700,2480,1860,2480,1700,2470,1620,2470,1700,2450,1788,2450,1700,2430,1760,2430,1700,2420,1740,2420,1700,2400,1960,2400,1700,2380,1688,2380,1700,2370,1660,2370,1700,2350,1628,2350,1700,2330,1608,2330,1700,2320,1588,2320,1700,2300,1568,2300,1700,2280,1540,2280,1700,2270,1528,2270,1700,2250,1400,2250,1700,2200,1220,2200,1700,2100,1260,2100,1700,2050,1300,2050,1700,2E3,1580,2E3,1700,2E3,1220,2E3,1720,2050,1548,2050,1660,2100,1448,2100,1550,2050,1980,2050,1960,1960,1708,2200,2020,2020,2160,2300,1700,
2070,1728,2300,1700,1970,1208,2E3,1700,2020,1120,2E3,1700,2200,2300,2E3,1700,3480,3240,2E3,1700,2830,2568,2E3,1700,2E3,2120,2E3,1700,2400,1840,2400,1700,2E3,1600,2E3,1860,2300,1748,2300,1700,2E3,1708,2E3,1700,2E3,1668,2E3,1700,2E3,1660,2E3,1700,2E3,1648,2E3,1700,2E3,1640,2E3,1700,2E3,1628,2E3,1700,2E3,1620,2E3,1700,2E3,1608,2E3,1700,2E3,1600,2E3,1700,2E3,1588,2E3,1700,2E3,1580,2E3,1700,2E3,1600,2E3,1700,2E3,1600,2E3,1700,2E3,1600,2E3,1700,2E3,1600,2E3,1700,2E3,1600,2E3,1700,2E3,1600,2E3]);b.covalentVersion=
1;b.bondingVersion=0;b.defaultBondingMars=U(-1,[0,0,230,320,930,460,680,1330,350,1020,830,850,680,750,680,710,680,630,640,640,1120,670,970,1550,1100,1390,1350,1260,1200,1160,750,1110,1020,1030,990,990,1570,960,1330,1960,990,1710,1440,1480,1470,1360,1330,1340,1350,1220,1350,1190,1340,1160,1330,1110,1500,1100,1520,1120,1450,1180,1220,1240,1170,1210,1210,1210,1220,1160,1210,1140,1910,1170,1470,2100,1120,1850,1780,1630,1560,1540,1480,1470,1470,1380,1350,1280,1400,1250,1450,1250,1500,1200,1590,1280,1690,
1360,1630,1420,1460,1400,1460,1400,1470,1360,1400,1330,1980,1310,1670,2320,1340,1960,1870,1800,1830,1630,1820,1760,1810,1740,1800,1730,1800,1720,1990,1680,1790,1690,1760,1680,1750,1670,1740,1660,1730,1650,1720,1640,1940,1700,1720,1620,1570,1520,1430,1460,1370,1370,1350,1310,1370,1290,1320,1220,1500,1230,1500,1240,1700,1330,1550,1440,1540,1440,1540,1510,1680,1450,1700,1470,2400,1420,2E3,2230,1900,2010,1880,1860,1790,1750,1610,1690,1580,1700,1550,1710,1530,1720,1510,1660,1500,1660,1500,1680,1500,1680,
1500,1650,1500,1670,1500,1730,1500,1760,1500,1610,1600,1570,1600,1490,1600,1430,1600,1410,1600,1340,1600,1290]);b.cationLookupTable=U(-1,[53,680,69,440,70,350,85,350,87,230,104,160,117,680,119,160,121,130,133,220,138,90,155,80,165,1120,181,970,197,820,198,660,215,510,229,650,232,420,247,440,249,350,262,2190,264,370,266,300,281,340,283,270,293,1540,309,1330,325,1180,326,990,343,732,357,960,358,940,359,760,360,680,374,880,375,740,376,630,377,590,389,810,390,890,391,630,394,520,406,800,407,660,408,600,
411,460,422,740,423,640,438,720,439,630,454,690,469,960,470,720,485,880,486,740,501,810,503,620,518,730,520,530,535,580,537,460,549,660,552,500,554,420,569,470,571,390,597,1470,614,1120,631,893,645,1090,648,790,661,1E3,664,740,665,690,677,930,680,700,682,620,699,979,712,670,727,680,742,800,744,650,757,1260,758,890,773,1140,774,970,791,810,806,930,808,710,823,760,825,620,837,820,840,700,842,560,857,620,859,500,885,1670,901,1530,902,1340,917,1390,919,1016,933,1270,935,1034,936,920,951,1013,952,900,
967,995,983,979,999,964,1014,1090,1015,950,1031,938,1047,923,1048,840,1063,908,1079,894,1095,881,1111,870,1126,930,1127,858,1143,850,1160,780,1177,680,1192,700,1194,620,1208,720,1211,560,1224,880,1226,690,1240,680,1254,800,1256,650,1269,1370,1271,850,1285,1270,1286,1100,1301,1470,1303,950,1318,1200,1320,840,1333,980,1335,960,1337,740,1354,670,1371,620,1397,1800,1414,1430,1431,1180,1448,1020,1463,1130,1464,980,1465,890,1480,970,1482,800,1495,1100,1496,950,1499,710,1511,1080,1512,930,1527,1070,1528,
920]);b.anionLookupTable=U(-1,[19,1540,96,2600,113,1710,130,1360,131,680,147,1330,241,2120,258,1840,275,1810,512,2720,529,2220,546,1980,563,1960,800,2940,803,3700,817,2450,834,2110,835,2500,851,2200]);b.bsCations=new JU.BS;b.bsAnions=new JU.BS;for(var a=0;a<JU.Elements.anionLookupTable.length;a+=2)JU.Elements.bsAnions.set(JU.Elements.anionLookupTable[a]>>4);for(a=0;a<JU.Elements.cationLookupTable.length;a+=2)JU.Elements.bsCations.set(JU.Elements.cationLookupTable[a]>>4);b.hydrophobicities=L(-1,[0,
0.62,-2.53,-0.78,-0.9,0.29,-0.85,-0.74,0.48,-0.4,1.38,1.06,-1.5,0.64,1.19,0.12,-0.18,-0.05,0.81,0.26,1.08]);(JU.Elements.elementNames.length!=JU.Elements.elementNumberMax||JU.Elements.vanderwaalsMars.length>>2!=JU.Elements.elementNumberMax||JU.Elements.defaultBondingMars.length>>1!=JU.Elements.elementNumberMax)&&JU.Logger.error("ERROR!!! Element table length mismatch:\n elementSymbols.length="+JU.Elements.elementSymbols.length+"\n elementNames.length="+JU.Elements.elementNames.length+"\n vanderwaalsMars.length="+
JU.Elements.vanderwaalsMars.length+"\n covalentMars.length="+JU.Elements.defaultBondingMars.length);b.electroNegativities=L(-1,[0,2.2,0,0.97,1.47,2.01,2.5,3.07,3.5,4.1,0,1.01,1.23,1.47,1.74,2.06,2.44,2.83,0,0.91,1.04,1.2,1.32,1.45,1.56,1.6,1.64,1.7,1.75,1.75,1.66,1.82,2.02,2.2,2.48,2.74,0,0.89,0.99,1.11,1.22,1.23,1.3,1.36,1.42,1.45,1.35,1.42,1.46,1.49,1.72,1.82,2.01,2.21])});n("JU");z(null,"JU.Escape","JU.AU $.BS $.Lst $.M3 $.M4 $.P3 $.P4 $.PT $.SB $.V3 JS.SV".split(" "),function(){var b=G(JU,"Escape",
null);b.escapeColor=c(b,"escapeColor",function(a){return 0==a?null:"[x"+JU.Escape.getHexColorFromRGB(a)+"]"},"~N");b.getHexColorFromRGB=c(b,"getHexColorFromRGB",function(a){if(0==a)return null;var d="00"+Integer.toHexString(a>>16&255),d=d.substring(d.length-2),b="00"+Integer.toHexString(a>>8&255),b=b.substring(b.length-2);a="00"+Integer.toHexString(a&255);a=a.substring(a.length-2);return d+b+a},"~N");b.eP=c(b,"eP",function(a){return null==a?"null":"{"+a.x+" "+a.y+" "+a.z+"}"},"JU.T3");b.matrixToScript=
c(b,"matrixToScript",function(a){return JU.PT.replaceAllCharacters(a.toString(),"\n\r ","").$replace("\t"," ")},"~O");b.eP4=c(b,"eP4",function(a){return"{"+a.x+" "+a.y+" "+a.z+" "+a.w+"}"},"JU.P4");b.drawQuat=c(b,"drawQuat",function(a,d,b,c,e){c=" VECTOR "+JU.Escape.eP(c)+" ";0==e&&(e=1);return"draw "+d+"x"+b+c+JU.Escape.eP(a.getVectorScaled(0,e))+" color red\ndraw "+d+"y"+b+c+JU.Escape.eP(a.getVectorScaled(1,e))+" color green\ndraw "+d+"z"+b+c+JU.Escape.eP(a.getVectorScaled(2,e))+" color blue\n"},
"JU.Quat,~S,~S,JU.P3,~N");b.e=c(b,"e",function(a){if(null==a)return"null";if(JU.PT.isNonStringPrimitive(a))return a.toString();if("string"==typeof a)return JU.PT.esc(a);if(C(a,"JU.Lst"))return JU.Escape.eV(a);if(C(a,"java.util.Map"))return JU.Escape.escapeMap(a);if(C(a,"JU.BS"))return JU.Escape.eBS(a);if(C(a,"JU.P4"))return JU.Escape.eP4(a);if(C(a,"JU.T3"))return JU.Escape.eP(a);if(JU.AU.isAP(a))return JU.Escape.eAP(a);if(JU.AU.isAS(a))return JU.Escape.eAS(a,!0);if(C(a,"JU.M34"))return JU.PT.rep(JU.PT.rep(a.toString(),
"[\n  ","["),"] ]","]]");if(JU.AU.isAFF(a)){for(var d=(new JU.SB).append("["),b="",c=0;c<a.length;c++)d.append(b).append(JU.Escape.eAF(a[c])),b=",";d.append("]");return d.toString()}if(C(a,"JU.A4"))return"{"+a.x+" "+a.y+" "+a.z+" "+180*a.angle/3.141592653589793+"}";if(C(a,"JU.Quat"))return a.toString();d=JU.PT.nonArrayString(a);return null==d?JU.PT.toJSON(null,a):d},"~O");b.eV=c(b,"eV",function(a){if(null==a)return JU.PT.esc("");var d=new JU.SB;d.append("[");for(var b=0;b<a.size();b++)0<b&&d.append(", "),
d.append(JU.Escape.escapeNice(a.get(b).asString()));d.append("]");return d.toString()},"JU.Lst");b.escapeMap=c(b,"escapeMap",function(a){var d=new JU.SB;d.append("{ ");var b="",c;for(a=a.entrySet().iterator();a.hasNext()&&((c=a.next())||1);){var e=c.getKey();d.append(b).append(JU.PT.esc(e)).appendC(":");b=c.getValue();C(b,"JS.SV")||(b=JS.SV.getVariable(b));d.append(b.escape());b=","}d.append(" }");return d.toString()},"java.util.Map");b.escapeFloatA=c(b,"escapeFloatA",function(a,d){if(d)return JU.PT.toJSON(null,
a);for(var b=new JU.SB,c=0;c<a.length;c++)0<c&&b.appendC("\n"),b.appendF(a[c]);return b.toString()},"~A,~B");b.escapeFloatAA=c(b,"escapeFloatAA",function(a,d){for(var b=new JU.SB,c=d?";\n":"\n",e=0;e<a.length;e++)if(null!=a[e]){0<e&&b.append(c);for(var f=0;f<a[e].length;f++)b.appendF(a[e][f]).appendC("\t")}return b.toString()},"~A,~B");b.escapeFloatAAA=c(b,"escapeFloatAAA",function(a,d){var b=new JU.SB,c=d?";\n":"\n";if(null==a[0]||null==a[0][0])return"0 0 0"+c;b.appendI(a.length).append(" ").appendI(a[0].length).append(" ").appendI(a[0][0].length);
for(var e=0;e<a.length;e++)if(null!=a[e]){b.append(c);for(var f=0;f<a[e].length;f++)if(null!=a[e][f]){b.append(c);for(var j=0;j<a[e][f].length;j++)b.appendF(a[e][f][j]).appendC("\t")}}return b.toString()},"~A,~B");b.eAS=c(b,"eAS",function(a,d){if(null==a)return JU.PT.esc("");var b=new JU.SB;b.append("[");for(var c=0;c<a.length;c++)0<c&&b.append(", "),b.append(d?JU.Escape.escapeNice(a[c]):JU.PT.esc(a[c]));b.append("]");return b.toString()},"~A,~B");b.eAI=c(b,"eAI",function(a){if(null==a)return JU.PT.esc("");
var d=new JU.SB;d.append("[");for(var b=0;b<a.length;b++)0<b&&d.append(", "),d.appendI(a[b]);return d.append("]").toString()},"~A");b.eAD=c(b,"eAD",function(a){if(null==a)return JU.PT.esc("");var d=new JU.SB;d.append("[");for(var b=0;b<a.length;b++)0<b&&d.append(", "),d.appendD(a[b]);return d.append("]").toString()},"~A");b.eAF=c(b,"eAF",function(a){if(null==a)return JU.PT.esc("");var d=new JU.SB;d.append("[");for(var b=0;b<a.length;b++)0<b&&d.append(", "),d.appendF(a[b]);return d.append("]").toString()},
"~A");b.eAP=c(b,"eAP",function(a){if(null==a)return JU.PT.esc("");var d=new JU.SB;d.append("[");for(var b=0;b<a.length;b++)0<b&&d.append(", "),d.append(JU.Escape.eP(a[b]));return d.append("]").toString()},"~A");b.escapeNice=c(b,"escapeNice",function(a){if(null==a)return"null";var d=JU.PT.parseFloatStrict(a);return Float.isNaN(d)?JU.PT.esc(a):a},"~S");b.uABsM=c(b,"uABsM",function(a){return"{"==a.charAt(0)?JU.Escape.uP(a):(JU.Escape.isStringArray(a)||a.startsWith("[{")&&a.indexOf("[{")==a.lastIndexOf("[{"))&&
0>a.indexOf(",")&&0>a.indexOf(".")&&0>a.indexOf("-")?JU.BS.unescape(a):a.startsWith("[[")?JU.Escape.unescapeMatrix(a):a},"~S");b.isStringArray=c(b,"isStringArray",function(a){return a.startsWith("({")&&0==a.lastIndexOf("({")&&a.indexOf("})")==a.length-2},"~S");b.uP=c(b,"uP",function(a){if(null==a||0==a.length)return a;var d=a.$replace("\n"," ").trim();if("{"!=d.charAt(0)||"}"!=d.charAt(d.length-1))return a;for(var b=L(5,0),c=0,d=d.substring(1,d.length-1),e=E(1,0);5>c;c++)if(b[c]=JU.PT.parseFloatNext(d,
e),Float.isNaN(b[c])){if(e[0]>=d.length||","!=d.charAt(e[0]))break;e[0]++;c--}return 3==c?JU.P3.new3(b[0],b[1],b[2]):4==c?JU.P4.new4(b[0],b[1],b[2],b[3]):a},"~S");b.unescapeMatrix=c(b,"unescapeMatrix",function(a){if(null==a||0==a.length)return a;var d=a.$replace("\n"," ").trim();if(0!=d.lastIndexOf("[[")||d.indexOf("]]")!=d.length-2)return a;for(var b=L(16,0),d=d.substring(2,d.length-2).$replace("["," ").$replace("]"," ").$replace(","," "),c=E(1,0),e=0;16>e&&!(b[e]=JU.PT.parseFloatNext(d,c),Float.isNaN(b[e]));e++);
return!Float.isNaN(JU.PT.parseFloatNext(d,c))?a:9==e?JU.M3.newA9(b):16==e?JU.M4.newA16(b):a},"~S");b.eBS=c(b,"eBS",function(a){return JU.BS.escape(a,"(",")")},"JU.BS");b.eBond=c(b,"eBond",function(a){return JU.BS.escape(a,"[","]")},"JU.BS");b.toReadable=c(b,"toReadable",function(a,d){var b=new JU.SB,c="";if(null==d)return"null";if(JU.PT.isNonStringPrimitive(d))return JU.Escape.packageReadable(a,null,d.toString());if("string"==typeof d)return JU.Escape.packageReadable(a,null,JU.PT.esc(d));if(C(d,"JS.SV"))return JU.Escape.packageReadable(a,
null,d.escape());if(JU.AU.isAS(d)){b.append("[");for(var e=d.length,f=0;f<e;f++)b.append(c).append(JU.Escape.toReadable(null,d[f])),c=",";b.append("]");return JU.Escape.packageReadableSb(a,"String["+e+"]",b)}if(JU.AU.isAI(d)){b.append("[");e=d.length;for(f=0;f<e;f++)b.append(c).appendI(d[f]),c=",";b.append("]");return JU.Escape.packageReadableSb(a,"int["+e+"]",b)}if(JU.AU.isAF(d)){b.append("[");e=d.length;for(f=0;f<e;f++)b.append(c).appendF(d[f]),c=",";b.append("]");return JU.Escape.packageReadableSb(a,
"float["+e+"]",b)}if(JU.AU.isAD(d)){b.append("[");e=d.length;for(f=0;f<e;f++)b.append(c).appendD(d[f]),c=",";b.append("]");return JU.Escape.packageReadableSb(a,"double["+e+"]",b)}if(JU.AU.isAP(d)){b.append("[");e=d.length;for(f=0;f<e;f++)b.append(c).append(JU.Escape.eP(d[f])),c=",";b.append("]");return JU.Escape.packageReadableSb(a,"point3f["+e+"]",b)}if(JU.AU.isASS(d)){b.append("[");e=d.length;for(f=0;f<e;f++)b.append(c).append(JU.Escape.toReadable(null,d[f])),c=",\n";b.append("]");return JU.Escape.packageReadableSb(a,
"String["+e+"][]",b)}if(JU.AU.isAII(d)){b.append("[");e=d.length;for(f=0;f<e;f++)b.append(c).append(JU.Escape.toReadable(null,d[f])),c=",";b.append("]");return JU.Escape.packageReadableSb(a,"int["+e+"][]",b)}if(JU.AU.isAFF(d)){b.append("[\n");e=d.length;for(f=0;f<e;f++)b.append(c).append(JU.Escape.toReadable(null,d[f])),c=",\n";b.append("]");return JU.Escape.packageReadableSb(a,"float[][]",b)}if(JU.AU.isADD(d)){b.append("[\n");e=d.length;for(f=0;f<e;f++)b.append(c).append(JU.Escape.toReadable(null,
d[f])),c=",\n";b.append("]");return JU.Escape.packageReadableSb(a,"double[][]",b)}if(C(d,"JU.Lst")){e=d.size();for(f=0;f<e;f++)b.append(JU.Escape.toReadable(a+"["+(f+1)+"]",d.get(f)));return JU.Escape.packageReadableSb(a,"List["+e+"]",b)}if(C(d,"JU.M34")||C(d,"JU.T3")||C(d,"JU.P4")||C(d,"JU.A4"))return b.append(JU.Escape.e(d)),JU.Escape.packageReadableSb(a,null,b);if(C(d,"java.util.Map")){for(c=d.keySet().iterator();c.hasNext();)e=c.next(),b.append(JU.Escape.toReadable((null==a?"":a+".")+e,d.get(e)));
return b.toString()}return JU.Escape.packageReadable(a,null,JU.PT.toJSON(null,d))},"~S,~O");b.packageReadableSb=c(b,"packageReadableSb",function(a,d,b){return JU.Escape.packageReadable(a,d,b.toString())},"~S,~S,JU.SB");b.packageReadable=c(b,"packageReadable",function(a,d,b){return null==a?(null==d?"":d+"\t")+b:"\n"+a+"\t"+(null==d?"":"*"+d+"\t")+b},"~S,~S,~S");b.escapeModelFileNumber=c(b,"escapeModelFileNumber",function(a){return""+v(a/1E6)+"."+a%1E6},"~N");b.encapsulateData=c(b,"encapsulateData",
function(a,d,b){switch(b){case 1:d=JU.Escape.escapeFloatA(d,!1)+";\n";break;case 2:d=JU.Escape.escapeFloatAA(d,!0)+";\n";break;case 3:d=JU.Escape.escapeFloatAAA(d,!0)+";\n";break;default:d=d.toString()}return'  DATA "'+a+'"\n'+d+'    END "'+a+'";\n'},"~S,~O,~N");b.unescapeUnicode=c(b,"unescapeUnicode",function(a){for(var d=a.length,b=JU.SB.newN(d),c=0;c<d;){var e=a.charAt(c++);if("\\"==e&&c<d)switch(e=a.charAt(c++),e.charCodeAt(0)){case 117:if(c<d){for(var e=0,f=4;0<=--f&&c<d;){var j=a.charAt(c),
j=JU.Escape.getHexitValue(j);if(0>j)break;e<<=4;e+=j;++c}e=String.fromCharCode(e)}}b.appendC(e)}return b.toString()},"~S");b.getHexitValue=c(b,"getHexitValue",function(a){return 48<=a.charCodeAt(0)&&57>=a.charCodeAt(0)?a.charCodeAt(0)-48:97<=a.charCodeAt(0)&&102>=a.charCodeAt(0)?10+a.charCodeAt(0)-97:65<=a.charCodeAt(0)&&70>=a.charCodeAt(0)?10+a.charCodeAt(0)-65:-1},"~S");b.unescapeStringArray=c(b,"unescapeStringArray",function(a){if(null==a||!a.startsWith("[")||!a.endsWith("]"))return null;var d=
new JU.Lst,b=E(1,0);for(b[0]=1;b[0]<a.length;){var c=JU.PT.getQuotedStringNext(a,b);if(null==c)return null;for(d.addLast(JU.PT.rep(c,'\\"','"'));b[0]<a.length&&'"'!=a.charAt(b[0]);)b[0]++}return d.toArray(Array(d.size()))},"~S");b.isAV=c(b,"isAV",function(a){return C(a[0],JS.SV)},"~O");b.escapeHelical=c(b,"escapeHelical",function(a,d,b,c,e){switch(d){case 134217751:return null==e?new JU.P3:e[0];case 1073741854:case 1665140738:return null==e?new JU.V3:e[1073741854==d?1:2];case 134217729:return Float.$valueOf(null==
e?NaN:e[3].x);case 135176:return null==e?"":'draw ID "'+a+'" VECTOR '+JU.Escape.eP(e[0])+" "+JU.Escape.eP(e[1])+" color "+(0>e[3].x?"{255.0 200.0 0.0}":"{255.0 0.0 128.0}");case 1745489939:return(null==e?"":"measure "+JU.Escape.eP(b)+JU.Escape.eP(e[0])+JU.Escape.eP(e[4]))+JU.Escape.eP(c);default:return null==e?[]:e}},"~S,~N,JU.P3,JU.P3,~A")});n("JU");z(["J.api.JmolGraphicsInterface","JU.Normix"],"JU.GData","JU.AU $.P3 $.V3 JU.C $.Font $.Shader".split(" "),function(){var b=w(function(){this.apiPlatform=
null;this.antialiasEnabled=this.currentlyRendering=this.translucentCoverOnly=!1;this.displayMaxY2=this.displayMinY2=this.displayMaxX2=this.displayMinX2=this.displayMaxY=this.displayMinY=this.displayMaxX=this.displayMinX=this.windowHeight=this.windowWidth=0;this.inGreyscaleMode=this.antialiasThisFrame=!1;this.backgroundImage=this.changeableColixMap=null;this.newWindowHeight=this.newWindowWidth=0;this.newAntialiasing=!1;this.ht3=this.argbCurrent=this.colixCurrent=this.ambientOcclusion=this.height=this.width=
this.depth=this.slab=this.yLast=this.xLast=this.contrastColix=this.bgcolor=0;this.isPass2=!1;this.bufferSize=this.textY=0;this.currentFont=this.graphicsForMetrics=this.vwr=this.shader=null;this.argbNoisyDn=this.argbNoisyUp=0;this.transformedVectors=null;q(this,arguments)},JU,"GData",null,J.api.JmolGraphicsInterface);N(b,function(){this.changeableColixMap=U(16,0);this.transformedVectors=Array(JU.GData.normixCount)});x(b,function(){this.shader=new JU.Shader});c(b,"initialize",function(a,d){this.vwr=
a;this.apiPlatform=d},"JV.Viewer,J.api.GenericPlatform");c(b,"setDepth",function(a){this.depth=0>a?0:a},"~N");g(b,"setSlab",function(a){this.slab=Math.max(0,a)},"~N");g(b,"setSlabAndZShade",function(a,d){this.setSlab(a);this.setDepth(d)},"~N,~N,~N,~N,~N");c(b,"setAmbientOcclusion",function(a){this.ambientOcclusion=a},"~N");g(b,"isAntialiased",function(){return this.antialiasThisFrame});c(b,"getChangeableColix",function(a,d){a>=this.changeableColixMap.length&&(this.changeableColixMap=JU.AU.arrayCopyShort(this.changeableColixMap,
a+16));0==this.changeableColixMap[a]&&(this.changeableColixMap[a]=JU.C.getColix(d));return a|-32768},"~N,~N");c(b,"changeColixArgb",function(a,d){a<this.changeableColixMap.length&&0!=this.changeableColixMap[a]&&(this.changeableColixMap[a]=JU.C.getColix(d))},"~N,~N");c(b,"getColorArgbOrGray",function(a){if(3==a)return JU.C.getArgb(this.contrastColix);0>a&&(a=this.changeableColixMap[a&2047]);return this.inGreyscaleMode?JU.C.getArgbGreyscale(a):JU.C.getArgb(a)},"~N");c(b,"getShades",function(a){0>a&&
(a=this.changeableColixMap[a&2047]);return this.inGreyscaleMode?this.shader.getShadesG(a):this.shader.getShades(a)},"~N");c(b,"setGreyscaleMode",function(a){this.inGreyscaleMode=a},"~B");c(b,"getSpecularPower",function(){return this.shader.specularPower});c(b,"setSpecularPower",function(a){0>a?this.setSpecularExponent(-a):this.shader.specularPower!=a&&(this.shader.specularPower=a,this.shader.intenseFraction=a/100,this.shader.flushCaches())},"~N");c(b,"getSpecularPercent",function(){return this.shader.specularPercent});
c(b,"setSpecularPercent",function(a){this.shader.specularPercent!=a&&(this.shader.specularPercent=a,this.shader.specularFactor=a/100,this.shader.flushCaches())},"~N");c(b,"getSpecularExponent",function(){return this.shader.specularExponent});c(b,"setSpecularExponent",function(a){this.shader.specularExponent!=a&&(this.shader.specularExponent=a,this.shader.phongExponent=v(Math.pow(2,a)),this.shader.usePhongExponent=!1,this.shader.flushCaches())},"~N");c(b,"getPhongExponent",function(){return this.shader.phongExponent});
c(b,"setPhongExponent",function(a){this.shader.phongExponent==a&&this.shader.usePhongExponent||(this.shader.phongExponent=a,a=Math.log(a)/Math.log(2),this.shader.usePhongExponent=a!=F(a),this.shader.usePhongExponent||(this.shader.specularExponent=F(a)),this.shader.flushCaches())},"~N");c(b,"getDiffusePercent",function(){return this.shader.diffusePercent});c(b,"setDiffusePercent",function(a){this.shader.diffusePercent!=a&&(this.shader.diffusePercent=a,this.shader.diffuseFactor=a/100,this.shader.flushCaches())},
"~N");c(b,"getAmbientPercent",function(){return this.shader.ambientPercent});c(b,"setAmbientPercent",function(a){this.shader.ambientPercent!=a&&(this.shader.ambientPercent=a,this.shader.ambientFraction=a/100,this.shader.flushCaches())},"~N");c(b,"getSpecular",function(){return this.shader.specularOn});c(b,"setSpecular",function(a){this.shader.specularOn!=a&&(this.shader.specularOn=a,this.shader.flushCaches())},"~B");c(b,"setCel",function(a){this.shader.setCel(a,this.shader.celPower,this.bgcolor)},
"~B");c(b,"getCel",function(){return this.shader.celOn});c(b,"getCelPower",function(){return this.shader.celPower});c(b,"setCelPower",function(a){this.shader.setCel(this.shader.celOn||0==this.shader.celPower,a,this.bgcolor)},"~N");c(b,"getLightSource",function(){return this.shader.lightSource});c(b,"isClipped3",function(a,d,b){return 0>a||a>=this.width||0>d||d>=this.height||b<this.slab||b>this.depth},"~N,~N,~N");c(b,"isClipped",function(a,d){return 0>a||a>=this.width||0>d||d>=this.height},"~N,~N");
g(b,"isInDisplayRange",function(a,d){return a>=this.displayMinX&&a<this.displayMaxX&&d>=this.displayMinY&&d<this.displayMaxY},"~N,~N");g(b,"isClippedXY",function(a,d,b){a=a+1>>1;return d<-a||d>=this.width+a||b<-a||b>=this.height+a},"~N,~N,~N");c(b,"isClippedZ",function(a){return-2147483648!=a&&(a<this.slab||a>this.depth)},"~N");c(b,"clipCode3",function(a,d,b){var c=0;0>a?c|=a<this.displayMinX2?-1:8:a>=this.width&&(c|=a>this.displayMaxX2?-1:4);0>d?c|=d<this.displayMinY2?-1:2:d>=this.height&&(c|=d>
this.displayMaxY2?-1:1);b<this.slab?c|=32:b>this.depth&&(c|=16);return c},"~N,~N,~N");c(b,"clipCode",function(a){var d=0;a<this.slab?d|=32:a>this.depth&&(d|=16);return d},"~N");c(b,"getFont3D",function(a){return JU.Font.createFont3D(0,0,a,a,0,this.apiPlatform,this.graphicsForMetrics)},"~N");c(b,"getFont3DFS",function(a,d){return JU.Font.createFont3D(JU.Font.getFontFaceID(a),0,d,d,0,this.apiPlatform,this.graphicsForMetrics)},"~S,~N");c(b,"getFontFidFS",function(a,d){return this.getFont3DFSS(a,"Bold",
d).fid},"~S,~N");c(b,"getFont3DFSS",function(a,d,b){d=JU.Font.getFontStyleID(d);0>d&&(d=0);return JU.Font.createFont3D(JU.Font.getFontFaceID(a),d,b,b,0,this.apiPlatform,this.graphicsForMetrics)},"~S,~S,~N");c(b,"getFont3DScaled",function(a,d){var b=a.fontSizeNominal*d;return b==a.fontSize?a:JU.Font.createFont3D(a.idFontFace,a.idFontStyle,b,a.fontSizeNominal,a.fontSizeAngstroms,this.apiPlatform,this.graphicsForMetrics)},"JU.Font,~N");c(b,"getFontFidI",function(a){return this.getFont3D(a).fid},"~N");
c(b,"getFont3DCurrent",function(){return this.currentFont});c(b,"setFont",function(){},"JU.Font");c(b,"setFontBold",function(a,d){this.setFont(this.getFont3DFSS(a,"Bold",d))},"~S,~N");c(b,"setBackgroundTransparent",function(){},"~B");c(b,"setBackgroundArgb",function(a){this.bgcolor=a;this.setCel(this.shader.celOn)},"~N");c(b,"setBackgroundImage",function(a){this.backgroundImage=a},"~O");c(b,"setWindowParameters",function(a,d,b){this.setWinParams(a,d,b)},"~N,~N,~B");c(b,"setWinParams",function(a,d,
b){this.newWindowWidth=a;this.newWindowHeight=d;this.newAntialiasing=b},"~N,~N,~B");c(b,"setNewWindowParametersForExport",function(){this.windowWidth=this.newWindowWidth;this.windowHeight=this.newWindowHeight;this.setWidthHeight(!1)});c(b,"setWidthHeight",function(a){this.width=this.windowWidth;this.height=this.windowHeight;a&&(this.width<<=1,this.height<<=1);this.xLast=this.width-1;this.yLast=this.height-1;this.displayMinX=-(this.width>>1);this.displayMaxX=this.width-this.displayMinX;this.displayMinY=
-(this.height>>1);this.displayMaxY=this.height-this.displayMinY;this.displayMinX2=this.displayMinX<<2;this.displayMaxX2=this.displayMaxX<<2;this.displayMinY2=this.displayMinY<<2;this.displayMaxY2=this.displayMaxY<<2;this.ht3=3*this.height;this.bufferSize=this.width*this.height},"~B");c(b,"beginRendering",function(){},"JU.M3,~B,~B,~B");c(b,"endRendering",function(){});c(b,"snapshotAnaglyphChannelBytes",function(){});c(b,"getScreenImage",function(){return null},"~B");c(b,"releaseScreenImage",function(){});
c(b,"applyAnaglygh",function(){},"J.c.STER,~A");c(b,"setPass2",function(){return!1},"~B");c(b,"destroy",function(){});c(b,"clearFontCache",function(){});c(b,"drawQuadrilateralBits",function(a,d,b,c,e,f){a.drawLineBits(d,d,b,c);a.drawLineBits(d,d,c,e);a.drawLineBits(d,d,e,f);a.drawLineBits(d,d,f,b)},"J.api.JmolRendererInterface,~N,JU.P3,JU.P3,JU.P3,JU.P3");c(b,"drawTriangleBits",function(a,d,b,c,e,f,j,k){1==(k&1)&&a.drawLineBits(b,e,d,c);2==(k&2)&&a.drawLineBits(e,j,c,f);4==(k&4)&&a.drawLineBits(j,
b,f,d)},"J.api.JmolRendererInterface,JU.P3,~N,JU.P3,~N,JU.P3,~N,~N");c(b,"plotImage",function(){},"~N,~N,~N,~O,J.api.JmolRendererInterface,~N,~N,~N");c(b,"plotText",function(){},"~N,~N,~N,~N,~N,~S,JU.Font,J.api.JmolRendererInterface");c(b,"renderBackground",function(){},"J.api.JmolRendererInterface");c(b,"setColor",function(a){this.argbCurrent=this.argbNoisyUp=this.argbNoisyDn=a},"~N");c(b,"setC",function(){return!0},"~N");c(b,"isDirectedTowardsCamera",function(a){return 0>a||0<this.transformedVectors[a].z},
"~N");b.roundInt=c(b,"roundInt",function(a){return a},"~N");c(b,"clear",function(){});g(b,"renderAllStrings",function(){},"~O");c(b,"addRenderer",function(){},"~N");b.getHermiteList=c(b,"getHermiteList",function(a,d,b,c,e,f,j,k,g,s){var m=g+1;g-=1;var p=b.x,y=b.y,A=b.z,n=c.x,q=c.y;c=c.z;var u=(n-d.x)*a/8,v=(q-d.y)*a/8;d=(c-d.z)*a/8;var w=(e.x-p)*a/8,x=(e.y-y)*a/8,z=(e.z-A)*a/8,B=(f.x-n)*a/8,C=(f.y-q)*a/8;a=(f.z-c)*a/8;j[k]=b;for(b=0;b<m;b++){var D=b/g;b==m-1&&(p=n,y=q,A=c,n=e.x,q=e.y,c=e.z,u=w,v=
x,d=z,w=B,x=C,z=a,D-=1);var E=D*D,F=E*D;f=2*F-3*E+1;var G=-2*F+3*E,D=F-2*E+D,I=F-E,E=f*p+G*n+D*u+I*w,F=f*y+G*q+D*v+I*x;f=f*A+G*c+D*d+I*z;j[k+b]=s?JU.P3.new3(E,F,f):JU.V3.new3(E,F,f)}},"~N,JU.T3,JU.T3,JU.T3,JU.T3,JU.T3,~A,~N,~N,~B");c(b,"setTextPosition",function(a){this.textY=a},"~N");c(b,"getTextPosition",function(){return this.textY});c(b,"getTransformedVertexVectors",function(){return this.transformedVectors});g(b,"drawLinePixels",function(){},"JU.P3i,JU.P3i,~N,~N");b.normixCount=JU.Normix.getNormixCount()});
n("JU");z(["javajs.api.JSInterface","J.api.JmolAppletInterface","$.JmolStatusListener"],"JU.GenericApplet","java.net.URL java.util.Hashtable JU.Lst $.PT $.SB J.awtjs2d.Platform J.c.CBK J.i18n.GT JU.Logger $.Parser JV.JC $.Viewer".split(" "),function(){var b=w(function(){this.documentBase=this.codeBase=null;this.isSigned=!1;this.language=null;this.doTranslate=!0;this.mayScript=this.isStereoSlave=this.haveDocumentAccess=!1;this.vwrOptions=this.b$=this.viewer=this.gRight=this.statusTextarea=this.statusText=
this.statusForm=this.fullName=this.htmlName=null;this.haveNotifiedError=!1;this.appletObject=null;this.loading=!1;this.htParams=this.outputBuffer=this.syncId=null;q(this,arguments)},JU,"GenericApplet",null,[javajs.api.JSInterface,J.api.JmolAppletInterface,J.api.JmolStatusListener]);c(b,"setStereoGraphics",function(a){return a?vwr.apiPlatform.context:null},"~B");g(b,"processMouseEvent",function(a,d,b,c,e){return this.viewer.processMouseEvent(a,d,b,c,e)},"~N,~N,~N,~N,~N");g(b,"processKeyEvent",function(a){this.viewer.processKeyEvent(a)},
"~O");g(b,"setDisplay",function(a){this.viewer.setDisplay(a)},"~O");g(b,"setStatusDragDropped",function(a,d,b,c,e){return this.viewer.setStatusDragDropped(a,d,b,c,e)},"~N,~N,~N,~S,~A");g(b,"startHoverWatcher",function(a){this.viewer.startHoverWatcher(a)},"~B");g(b,"update",function(){this.viewer.updateJS()});g(b,"openFileAsyncSpecial",function(a,d){this.viewer.openFileAsyncSpecial(a,d)},"~S,~N");g(b,"openFileAsyncSpecialType",function(a,d,b){this.viewer.openFileAsyncSpecialType(a,d,b)},"~S,~N,~S");
g(b,"processTwoPointGesture",function(a){this.viewer.processTwoPointGesture(a)},"~A");g(b,"setScreenDimension",function(a,d){this.viewer.setScreenDimension(a,d)},"~N,~N");c(b,"resizeDisplay",function(a,d){J.awtjs2d.Platform.Jmol().resizeApplet(this.viewer.html5Applet,E(-1,[a,d]))},"~N,~N");c(b,"init",function(a){this.b$=new java.util.Hashtable;null==JU.GenericApplet.htRegistry&&(JU.GenericApplet.htRegistry=new java.util.Hashtable);this.appletObject=a;this.htmlName=JU.PT.split(""+this.getJmolParameter("name"),
"_object")[0];this.syncId=this.getJmolParameter("syncId");this.fullName=this.htmlName+"__"+this.syncId+"__";System.out.println("Jmol JavaScript applet "+this.fullName+" initializing");a=this.getValue("logLevel",this.getBooleanValue("debug",!1)?"5":"4").charAt(0).charCodeAt(0)-48;4!=a&&System.out.println("setting logLevel="+a+' -- To change, use script "set logLevel [0-5]"');JU.Logger.setLogLevel(a);J.i18n.GT.ignoreApplicationBundle();this.initOptions();JU.GenericApplet.checkIn(this.fullName,this.appletObject);
this.initApplication()},"~O");c(b,"initApplication",function(){this.vwrOptions.put("applet",Boolean.TRUE);null==this.getJmolParameter("statusListener")&&this.vwrOptions.put("statusListener",this);this.language=this.getJmolParameter("language");null!=this.language&&this.vwrOptions.put("language",this.language);this.viewer=new JV.Viewer(this.vwrOptions);this.viewer.pushHoldRepaint();var a=this.getValueLowerCase("emulate","jmol");this.setStringProperty("defaults",a.equals("chime")?"RasMol":"Jmol");this.setStringProperty("backgroundColor",
this.getValue("bgcolor",this.getValue("boxbgcolor","black")));this.viewer.setBooleanProperty("frank",!0);this.loading=!0;for(var d,a=0,b=J.c.CBK.values();a<b.length&&((d=b[a])||1);a++){var c=d.name(),e=this.getValue(c+"Callback",null);if(null!=e)if("string"==typeof e)this.setStringProperty(c+"Callback",e);else{var f=null,f="Info."+e.name;this.setStringProperty(c+"Callback",f);this.setCallback(c,e)}}this.loading=!1;null!=this.language&&System.out.print("requested language="+this.language+"; ");this.doTranslate=
!"none".equals(this.language)&&this.getBooleanValue("doTranslate",!0);this.language=J.i18n.GT.getLanguage();System.out.println("language="+this.language);if(null==this.b$.get(J.c.CBK.SCRIPT)&&null==this.b$.get(J.c.CBK.ERROR)&&(null!=this.b$.get(J.c.CBK.MESSAGE)||null!=this.statusForm||null!=this.statusText))this.doTranslate&&null==this.getValue("doTranslate",null)&&(this.doTranslate=!1,JU.Logger.warn("Note -- Presence of message callback disables disable translation; to enable message translation use jmolSetTranslation(true) prior to jmolApplet()")),
this.doTranslate&&JU.Logger.warn("Note -- Automatic language translation may affect parsing of message callbacks messages; use scriptCallback or errorCallback to process errors");this.doTranslate||(J.i18n.GT.setDoTranslate(!1),JU.Logger.warn("Note -- language translation disabled"));this.getBooleanValue("popupMenu",!0)||this.viewer.getProperty("DATA_API","disablePopupMenu",null);d=this.getJmolParameter("menuFile");null!=d&&this.viewer.setMenu(d,!0);d=this.getValue("script","");a=this.getValue("loadInline",
null);if(null==a){if(null!=(a=this.getValue("load",null)))d='load "'+a+'";'+d;a=null}this.viewer.popHoldRepaint("applet init");null!=a&&null!=this.viewer.loadInline(a)&&(d="");0<d.length&&this.scriptProcessor(d,null,1);this.viewer.notifyStatusReady(!0)});g(b,"destroy",function(){this.gRight=null;this.viewer.notifyStatusReady(!1);this.viewer=null;JU.GenericApplet.checkOut(this.fullName)});c(b,"getBooleanValue",function(a,d){var b=this.getValue(a,d?"true":"");return b.equalsIgnoreCase("true")||b.equalsIgnoreCase("on")||
b.equalsIgnoreCase("yes")},"~S,~B");c(b,"getValue",function(a,d){var b=this.getJmolParameter(a);System.out.println("Jmol getValue "+a+" "+b);return null==b?d:b},"~S,~S");c(b,"getValueLowerCase",function(a,d){var b=this.getValue(a,d);null!=b&&(b=b.trim().toLowerCase(),0==b.length&&(b=null));return b},"~S,~S");c(b,"setStringProperty",function(a,d){null!=d&&(JU.Logger.info(a+' = "'+d+'"'),this.viewer.setStringProperty(a,d))},"~S,~S");c(b,"scriptProcessor",function(a,d,b){if(null==a||0==a.length)return"";
switch(b){case 0:return a=this.viewer.scriptCheck(a),"string"==typeof a?a:"";case 1:return null!=d?this.viewer.scriptWaitStatus(a,d).toString():this.viewer.scriptWait(a);default:return this.viewer.script(a)}},"~S,~S,~N");g(b,"register",function(a,d){JU.GenericApplet.checkIn(a,d)},"~S,J.api.JmolSyncInterface");g(b,"getJSpecViewProperty",function(){return null},"~S");c(b,"syncScript",function(a){this.viewer.syncScript(a,"~",0)},"~S");g(b,"handleEvent",function(a){return null==this.viewer?!1:this.viewer.processMouseEvent(a.id,
a.x,a.y,a.modifiers,a.when)},"java.awt.Event");g(b,"getAppletInfo",function(){return J.i18n.GT.o(J.i18n.GT.$("Jmol Applet version {0} {1}.\n\nAn OpenScience project.\n\nSee http://www.jmol.org for more information"),u(-1,[JV.JC.version,JV.JC.date]))+"\nhtmlName = "+JU.PT.esc(this.htmlName)+"\nsyncId = "+JU.PT.esc(this.syncId)+"\ndocumentBase = "+JU.PT.esc(this.documentBase)+"\ncodeBase = "+JU.PT.esc(this.codeBase)});g(b,"script",function(a){this.scriptNoWait(a)},"~S");g(b,"scriptCheck",function(a){return null==
a||0==a.length?"":this.scriptProcessor(a,null,0)},"~S");g(b,"scriptNoWait",function(a){return null==a||0==a.length?"":this.scriptProcessor(a,null,2)},"~S");c(b,"scriptWait",function(a){return this.scriptWait(a,null)},"~S");c(b,"scriptWait",function(a,d){if(null==a||0==a.length)return"";this.outputBuffer=null;return this.scriptProcessor(a,d,1)},"~S,~S");g(b,"scriptWaitOutput",function(a){if(null==a||0==a.length)return"";this.outputBuffer=new JU.SB;this.viewer.scriptWaitStatus(a,"");a=null==this.outputBuffer?
"":this.outputBuffer.toString();this.outputBuffer=null;return a},"~S");g(b,"getModelIndexFromId",function(a){return this.viewer.getModelIndexFromId(a)},"~S");c(b,"getProperty",function(a){return this.viewer.getProperty(null,a,"")},"~S");c(b,"getProperty",function(a,d){d||(d="");return this.viewer.getProperty(null,a,d)},"~S,~S");c(b,"getPropertyAsString",function(a){return this.viewer.getProperty("readable",a,"").toString()},"~S");c(b,"getPropertyAsString",function(a,d){d||(d="");return this.viewer.getProperty("readable",
a,d).toString()},"~S,~S");c(b,"getPropertyAsJSON",function(a){return this.viewer.getProperty("JSON",a,"").toString()},"~S");c(b,"getPropertyAsJSON",function(a,d){d||(d="");return this.viewer.getProperty("JSON",a,d).toString()},"~S,~S");g(b,"loadInlineString",function(a,d,b){a=this.viewer.loadInlineAppend(a,b);null==a&&this.script(d);return a},"~S,~S,~B");g(b,"loadInlineArray",function(a,d,b){if(null==a||0==a.length)return null;a=this.viewer.loadInline(a,b);null==a&&this.script(d);return a},"~A,~S,~B");
g(b,"loadDOMNode",function(a){return this.viewer.openDOM(a)},"~O");c(b,"loadInline",function(a){return this.loadInlineString(a,"",!1)},"~S");c(b,"loadInline",function(a,d){return this.loadInlineString(a,d,!1)},"~S,~S");c(b,"loadInline",function(a){return this.loadInlineArray(a,"",!1)},"~A");c(b,"loadInline",function(a,d){return this.loadInlineArray(a,d,!1)},"~A,~S");c(b,"output",function(a){null!=this.outputBuffer&&null!=a&&this.outputBuffer.append(a).appendC("\n")},"~S");g(b,"setCallback",function(a,
d){this.viewer.sm.setCallbackFunction(a,d)},"~S,~O");g(b,"setCallbackFunction",function(a,d){if(a.equalsIgnoreCase("language"))this.consoleMessage(""),this.consoleMessage(null);else{var b=J.c.CBK.getCallback(a);null!=b&&(this.loading||b!==J.c.CBK.EVAL)?null==d?this.b$.remove(b):this.b$.put(b,d):this.consoleMessage("Available callbacks include: "+J.c.CBK.getNameList().$replace(";"," ").trim())}},"~S,~S");c(b,"consoleMessage",function(a){this.notifyCallback(J.c.CBK.ECHO,u(-1,["",a]))},"~S");g(b,"notifyEnabled",
function(a){switch(a){case J.c.CBK.SYNC:if(!JU.GenericApplet.isJS)return!1;case J.c.CBK.ANIMFRAME:case J.c.CBK.DRAGDROP:case J.c.CBK.ECHO:case J.c.CBK.ERROR:case J.c.CBK.EVAL:case J.c.CBK.IMAGE:case J.c.CBK.LOADSTRUCT:case J.c.CBK.MEASURE:case J.c.CBK.MESSAGE:case J.c.CBK.PICK:case J.c.CBK.SCRIPT:return!0}return null!=this.b$.get(a)},"J.c.CBK");c(b,"notifyCallback",function(a,d){var b=null==a?null:this.b$.get(a),c=null==a||null!=b&&(null==d||null==d[0]),e=!1;null!=d&&(d[0]=this.htmlName);var f=null==
d||null==d[1]?null:d[1].toString();if(null!=a)switch(a){case J.c.CBK.APPLETREADY:d[3]=this.appletObject;break;case J.c.CBK.CLICK:"alert".equals(b)&&(f="x="+d[1]+" y="+d[2]+" action="+d[3]+" clickCount="+d[4]);break;case J.c.CBK.ANIMFRAME:var j=d[1],k=j[0],g=j[1],s=j[2],m=j[3],j=j[4],p=-2>=k,y=0>m?-1:1,A=0>j?-1:1;c&&(d=u(-1,[this.htmlName,Integer.$valueOf(Math.max(k,-2-k)),Integer.$valueOf(g),Integer.$valueOf(s),Integer.$valueOf(Math.abs(m)),Integer.$valueOf(Math.abs(j)),Integer.$valueOf(p?1:0),Integer.$valueOf(y),
Integer.$valueOf(A),d[2],d[3]]));break;case J.c.CBK.ECHO:g=(k=2==d.length)||1==d[2].intValue();c||(g&&(e=!0),c=!k&&null!=(b=this.b$.get(a=J.c.CBK.MESSAGE)));e||this.output(f);break;case J.c.CBK.LOADSTRUCT:k=d[4];if(null!=k){k=(0<=k.indexOf("NOTE:")?"":J.i18n.GT.$("File Error:"))+k;this.doShowStatus(k);this.notifyCallback(J.c.CBK.MESSAGE,u(-1,["",k]));return}break;case J.c.CBK.MEASURE:c||(c=null!=(b=this.b$.get(a=J.c.CBK.MESSAGE)));k=d[3];0<=k.indexOf("Picked")||0<=k.indexOf("Sequence")?(this.doShowStatus(f),
e=!0):0<=k.indexOf("Completed")&&(f=k+": "+f,e=!0);break;case J.c.CBK.MESSAGE:e=!c;c=(new Boolean(c&null!=f)).valueOf();e||this.output(f);break;case J.c.CBK.PICK:this.doShowStatus(f);e=!0;break;case J.c.CBK.SCRIPT:!(0<d[3].intValue())&&!c&&(c=null!=(b=this.b$.get(a=J.c.CBK.MESSAGE)));this.output(f);this.doShowStatus(f);break;case J.c.CBK.SYNC:this.sendScript(f,d[2],!0,c);return}e&&(e=this.viewer.getProperty("DATA_API","getAppConsole",null),null!=e&&(e.notifyCallback(a,d),this.output(f)));if(c&&this.mayScript)try{this.doSendCallback(a,
b,d,f)}catch(n){if(D(n,Exception))this.haveNotifiedError||JU.Logger.debugging&&JU.Logger.debug(a.name()+"Callback call error to "+b+": "+n),this.haveNotifiedError=!0;else throw n;}},"J.c.CBK,~A");c(b,"sendScript",function(a,d,b,c){if(!JU.GenericApplet.isJS||c&&(a=this.notifySync(a,d),null==a||0==a.length||a.equals("0")))return"";var e=new JU.Lst;JU.GenericApplet.findApplets(d,this.syncId,this.fullName,e);var f=e.size();if(0==f)return!c&&!d.equals("*")&&JU.Logger.error(this.fullName+" couldn't find applet "+
d),"";d=b?null:new JU.SB;c=b&&a.equals("GET_GRAPHICS");var j=b&&a.equals("SET_GRAPHICS_OFF");c&&this.viewer.setStereo(!1,this.gRight=null);for(var k=0;k<f;k++){var g=e.get(k),s=JU.GenericApplet.htRegistry.get(g);JU.Logger.debugging&&JU.Logger.debug(this.fullName+" sending to "+g+": "+a);try{if(c||j)return this.viewer.setStereo(this.isStereoSlave=c,this.gRight=s.setStereoGraphics(c)),"";b?s.syncScript(a):d.append(s.scriptWait(a,"output")).append("\n")}catch(m){if(D(m,Exception))g=this.htmlName+" couldn't send to "+
g+": "+a+": "+m,JU.Logger.error(g),b||d.append(g);else throw m;}}return b?"":d.toString()},"~S,~S,~B,~B");c(b,"notifySync",function(a,d){var b=this.b$.get(J.c.CBK.SYNC);if(!this.mayScript||null==b)return a;try{return this.doSendCallback(J.c.CBK.SYNC,b,u(-1,[this.fullName,a,d]),null)}catch(c){if(D(c,Exception))this.haveNotifiedError||JU.Logger.debugging&&JU.Logger.debug("syncCallback call error to "+b+": "+c),this.haveNotifiedError=!0;else throw c;}return a},"~S,~S");g(b,"eval",function(a){var d=a.indexOf("\u0001");
return 0<=d?this.sendScript(a.substring(d+1),a.substring(0,d),!1,!1):!this.haveDocumentAccess?"NO EVAL ALLOWED":null!=this.b$.get(J.c.CBK.EVAL)?(this.notifyCallback(J.c.CBK.EVAL,u(-1,[null,a])),""):this.doEval(a)},"~S");g(b,"createImage",function(){return null},"~S,~S,~O,~N");g(b,"getRegistryInfo",function(){JU.GenericApplet.checkIn(null,null);return JU.GenericApplet.htRegistry});g(b,"showUrl",function(a){JU.Logger.debugging&&JU.Logger.debug("showUrl("+a+")");if(null!=a&&0<a.length)try{this.doShowDocument(new java.net.URL(ha("java.net.URL"),
a,null))}catch(d){if(D(d,"java.net.MalformedURLException"))this.consoleMessage("Malformed URL:"+a);else throw d;}},"~S");g(b,"resizeInnerPanel",function(a){var d=L(2,0);JU.Parser.parseStringInfestedFloatArray(a,null,d);this.resizeDisplay(F(d[0]),F(d[1]));return E(-1,[F(d[0]),F(d[1])])},"~S");b.checkIn=c(b,"checkIn",function(a,d){null!=a&&(JU.Logger.info("AppletRegistry.checkIn("+a+")"),JU.GenericApplet.htRegistry.put(a,d));if(JU.Logger.debugging)for(var b,c=JU.GenericApplet.htRegistry.entrySet().iterator();c.hasNext()&&
((b=c.next())||1);){var e=b.getKey();JU.Logger.debug(e+" "+b.getValue())}},"~S,~O");b.checkOut=c(b,"checkOut",function(a){JU.GenericApplet.htRegistry.remove(a)},"~S");b.findApplets=c(b,"findApplets",function(a,d,b,c){if(null!=a&&0<=a.indexOf(",")){var e=JU.PT.split(a,",");for(a=0;a<e.length;a++)JU.GenericApplet.findApplets(e[a],d,b,c)}else if(d="__"+d+"__",null==a||a.equals("*")||a.equals(">"))for(a=JU.GenericApplet.htRegistry.keySet().iterator();a.hasNext()&&((e=a.next())||1);)!e.equals(b)&&0<e.indexOf(d)&&
c.addLast(e);else 0<=b.indexOf("_object")&&0>a.indexOf("_object")&&(a+="_object"),0>a.indexOf("__")&&(a+=d),JU.GenericApplet.htRegistry.containsKey(a)||(a="jmolApplet"+a),!a.equals(b)&&JU.GenericApplet.htRegistry.containsKey(a)&&c.addLast(a)},"~S,~S,~S,JU.Lst");g(b,"notifyAudioEnded",function(a){a.put("jsEvent","TRUE");this.viewer.sm.notifyAudioStatus(a);a.remove("jsEvent")},"~O");c(b,"setJSOptions",function(a){this.htParams=new java.util.Hashtable;null==a&&(a=new java.util.Hashtable);this.vwrOptions=
a;for(var d,b=a.entrySet().iterator();b.hasNext()&&((d=b.next())||1);)this.htParams.put(d.getKey().toLowerCase(),d.getValue());this.documentBase=""+a.get("documentBase");this.codeBase=""+a.get("codePath")},"java.util.Map");c(b,"initOptions",function(){this.vwrOptions.remove("debug");this.vwrOptions.put("fullName",this.fullName);this.haveDocumentAccess="true".equalsIgnoreCase(""+this.getValue("allowjavascript","true"));this.mayScript=!0});c(b,"getJmolParameter",function(a){a=this.htParams.get(a.toLowerCase());
return null==a?null:""+a},"~S");g(b,"functionXY",function(a,d,b){var c=L(Math.abs(d),Math.abs(b),0);if(!this.mayScript||!this.haveDocumentAccess||0==d||0==b)return c;try{if(0<d&&0<b)for(var e=0;e<d;e++)for(var f=0;f<b;f++)c[e][f]=window.eval(a)(this.htmlName,e,f);else if(0<b){var j;j=window.eval(a)(this.htmlName,d,b);d=Math.abs(d);var k=L(d*b,0);JU.Parser.parseStringInfestedFloatArray(j,null,k);for(a=e=0;e<d;e++)for(f=0;f<b;f++,a++)c[e][f]=k[a]}else window.eval(a)(this.htmlName,d,b,c)}catch(g){if(D(g,
Exception))JU.Logger.error("Exception "+g+" with nX, nY: "+d+" "+b);else throw g;}return c},"~S,~N,~N");g(b,"functionXYZ",function(a,d,b,c){var e=L(Math.abs(d),Math.abs(b),Math.abs(c),0);if(!this.mayScript||!this.haveDocumentAccess||0==d||0==b||0==c)return e;try{window.eval(a)(this.htmlName,d,b,c,e)}catch(f){if(D(f,Exception))JU.Logger.error("Exception "+f+" for "+a+" with nX, nY, nZ: "+d+" "+b+" "+c);else throw f;}return e},"~S,~N,~N,~N");c(b,"doShowDocument",function(a){var d=JU.PT.split(a.toString(),
"?POST?");if(1==d.length)window.open(d[0]);else{a="<form id=f method=POST action='"+d[0]+"'>";a+="<input type='hidden' name='name' value='nmr-1h-prediction' id='name'><input type='submit' value='working...'>";for(var d=d[1].$plit("&"),b=0;b<d.length;b++){var c=d[b],e=c.indexOf("="),f=c.substring(0,e),c=c.substring(e);a=0<=c.indexOf("\n")?a+("<textarea style='display:none' name="+f+">"+c+"</textarea>"):a+("<input type=hidden name="+f+' value="'+c+'">')}a+="</form>";d=window.open("");d.document.write(a);
d.document.getElementById("f").submit()}},"java.net.URL");c(b,"doSendCallback",function(a,d,b,c){var e="string"==typeof d;if(!(null==d||e&&0==d.length)){if(e&&"alert".equals(d))return alert(c),"";c=e?JU.PT.split(d,"."):null;try{var f;if(e){f=window[c[0]];for(var j=1;j<c.length;j++)f=f[c[j]]}else f=d;for(j=0;j<b.length;j++)b[j]&&b[j].booleanValue&&(b[j]=b[j].booleanValue()),b[j]instanceof Number&&(b[j]=+b[j]);return f.apply(this,b)}catch(k){System.out.println("callback "+a+" failed "+k)}}return""},
"J.c.CBK,~O,~A,~S");c(b,"doEval",function(a){try{return window.eval(a)}catch(d){JU.Logger.error("# error evaluating "+a+":"+d.toString())}return""},"~S");c(b,"doShowStatus",function(a){try{System.out.println(a)}catch(d){if(!D(d,Exception))throw d;}},"~S");c(b,"getGLmolView",function(){return this.viewer.getGLmolView()});c(b,"openFile",function(a){return this.viewer.openFile(a)},"~S");g(b,"cacheFileByName",function(a,d){return this.viewer.cacheFileByName(a,d)},"~S,~B");g(b,"cachePut",function(a,d){this.viewer.cachePut(a,
d)},"~S,~O");g(b,"getFullName",function(){return this.fullName});b.htRegistry=null;b.isJS=!1});n("JU");z(["JU.AU"],"JU.Geodesic",["java.util.Hashtable","JU.V3"],function(){var b=G(JU,"Geodesic",null);b.getNeighborVertexesArrays=c(b,"getNeighborVertexesArrays",function(){null==JU.Geodesic.vertexCounts&&JU.Geodesic.createGeodesic(3);return JU.Geodesic.neighborVertexesArrays});b.getVertexCount=c(b,"getVertexCount",function(a){null==JU.Geodesic.vertexCounts&&JU.Geodesic.createGeodesic(3);return JU.Geodesic.vertexCounts[a]},
"~N");b.getVertexVectors=c(b,"getVertexVectors",function(){null==JU.Geodesic.vertexCounts&&JU.Geodesic.createGeodesic(3);return JU.Geodesic.vertexVectors});b.getVertexVector=c(b,"getVertexVector",function(a){return JU.Geodesic.vertexVectors[a]},"~N");b.getFaceVertexes=c(b,"getFaceVertexes",function(a){return JU.Geodesic.faceVertexesArrays[a]},"~N");b.createGeodesic=c(b,"createGeodesic",function(a){if(!(a<=JU.Geodesic.currentLevel)){JU.Geodesic.currentLevel=a;var d=U(a+1,0);JU.Geodesic.neighborVertexesArrays=
JU.AU.newShort2(a+1);JU.Geodesic.faceVertexesArrays=JU.AU.newShort2(a+1);JU.Geodesic.vertexVectors=Array(12);JU.Geodesic.vertexVectors[0]=JU.V3.new3(0,0,JU.Geodesic.halfRoot5);for(var b=0;5>b;++b)JU.Geodesic.vertexVectors[b+1]=JU.V3.new3(Math.cos(1.2566370614359172*b),Math.sin(1.2566370614359172*b),0.5),JU.Geodesic.vertexVectors[b+6]=JU.V3.new3(Math.cos(1.2566370614359172*b+0.6283185307179586),Math.sin(1.2566370614359172*b+0.6283185307179586),-0.5);JU.Geodesic.vertexVectors[11]=JU.V3.new3(0,0,-JU.Geodesic.halfRoot5);
for(b=12;0<=--b;)JU.Geodesic.vertexVectors[b].normalize();JU.Geodesic.faceVertexesArrays[0]=JU.Geodesic.faceVertexesIcosahedron;JU.Geodesic.neighborVertexesArrays[0]=JU.Geodesic.neighborVertexesIcosahedron;d[0]=12;for(b=0;b<a;++b)JU.Geodesic.quadruple(b,d);JU.Geodesic.vertexCounts=d}},"~N");b.quadruple=c(b,"quadruple",function(a,d){JU.Geodesic.htVertex=new java.util.Hashtable;var b=JU.Geodesic.vertexVectors.length,c=JU.Geodesic.faceVertexesArrays[a],e=c.length,f=v(e/3),j=b+(b+f-2),f=4*f;JU.Geodesic.vertexVectors=
JU.AU.arrayCopyObject(JU.Geodesic.vertexVectors,j);f=U(3*f,0);JU.Geodesic.faceVertexesArrays[a+1]=f;var k=U(6*j,0);JU.Geodesic.neighborVertexesArrays[a+1]=k;for(var g=k.length;0<=--g;)k[g]=-1;d[a+1]=j;JU.Geodesic.vertexNext=b;for(g=b=0;g<e;){var s=c[g++],m=c[g++],p=c[g++],y=JU.Geodesic.getVertex(s,m),A=JU.Geodesic.getVertex(m,p),n=JU.Geodesic.getVertex(p,s);f[b++]=s;f[b++]=y;f[b++]=n;f[b++]=m;f[b++]=A;f[b++]=y;f[b++]=p;f[b++]=n;f[b++]=A;f[b++]=n;f[b++]=y;f[b++]=A;JU.Geodesic.addNeighboringVertexes(k,
y,s);JU.Geodesic.addNeighboringVertexes(k,y,n);JU.Geodesic.addNeighboringVertexes(k,y,A);JU.Geodesic.addNeighboringVertexes(k,y,m);JU.Geodesic.addNeighboringVertexes(k,A,m);JU.Geodesic.addNeighboringVertexes(k,A,n);JU.Geodesic.addNeighboringVertexes(k,A,p);JU.Geodesic.addNeighboringVertexes(k,n,p);JU.Geodesic.addNeighboringVertexes(k,n,s)}e=JU.Geodesic.vertexVectors.length;if(b!=f.length)throw new NullPointerException;if(JU.Geodesic.vertexNext!=j)throw new NullPointerException;for(g=0;12>g;++g)for(c=
0;5>c;++c){b=k[6*g+c];if(0>b)throw new NullPointerException;if(b>=e)throw new NullPointerException;if(-1!=k[6*g+5])throw new NullPointerException;}for(g=72;g<k.length;++g){b=k[g];if(0>b)throw new NullPointerException;if(b>=e)throw new NullPointerException;}for(g=0;g<j;++g){e=0;for(c=k.length;0<=--c;)k[c]==g&&++e;if(12>g&&5!=e||12<=g&&6!=e)throw new NullPointerException;e=0;for(c=f.length;0<=--c;)f[c]==g&&++e;if(12>g&&5!=e||12<=g&&6!=e)throw new NullPointerException;}JU.Geodesic.htVertex=null},"~N,~A");
b.addNeighboringVertexes=c(b,"addNeighboringVertexes",function(a,d,b){for(var c=6*d,e=c+6;c<e;++c){if(a[c]==b)return;if(0>a[c]){a[c]=b;for(var f=6*b,j=f+6;f<j;++f){if(a[f]==d)return;if(0>a[f]){a[f]=d;return}}}}throw new NullPointerException;},"~A,~N,~N");b.getVertex=c(b,"getVertex",function(a,d){if(a>d){var b=a;a=d;d=b}var b=Integer.$valueOf((a<<16)+d),c=JU.Geodesic.htVertex.get(b);if(null!=c)return c.shortValue();c=JU.Geodesic.vertexVectors[JU.Geodesic.vertexNext]=new JU.V3;c.add2(JU.Geodesic.vertexVectors[a],
JU.Geodesic.vertexVectors[d]);c.normalize();JU.Geodesic.htVertex.put(b,Short.$valueOf(JU.Geodesic.vertexNext));return JU.Geodesic.vertexNext++},"~N,~N");b.halfRoot5=0.5*Math.sqrt(5);b.faceVertexesIcosahedron=U(-1,[0,1,2,0,2,3,0,3,4,0,4,5,0,5,1,1,6,2,2,7,3,3,8,4,4,9,5,5,10,1,6,1,10,7,2,6,8,3,7,9,4,8,10,5,9,11,6,10,11,7,6,11,8,7,11,9,8,11,10,9]);b.neighborVertexesIcosahedron=U(-1,[1,2,3,4,5,-1,0,5,10,6,2,-1,0,1,6,7,3,-1,0,2,7,8,4,-1,0,3,8,9,5,-1,0,4,9,10,1,-1,1,10,11,7,2,-1,2,6,11,8,3,-1,3,7,11,9,4,
-1,4,8,11,10,5,-1,5,9,11,6,1,-1,6,7,8,9,10,-1]);b.vertexCounts=null;b.vertexVectors=null;b.faceVertexesArrays=null;b.neighborVertexesArrays=null;b.currentLevel=0;b.vertexNext=0;b.htVertex=null});n("JU");var Ba=w(function(){this.entryCount=0;this.entries=null;q(this,arguments)},JU,"Int2IntHash",null);x(Ba,function(b){this.entries=Array(b)},"~N");c(Ba,"get",function(b){for(var a=this.entries,a=a[(b&2147483647)%a.length];null!=a;a=a.next)if(a.key==b)return a.value;return-2147483648},"~N");c(Ba,"put",
function(b,a){for(var d=this.entries,c=d.length,r=(b&2147483647)%c,e=d[r];null!=e;e=e.next)if(e.key==b){e.value=a;return}if(this.entryCount>c){for(var r=c,c=c+(c+1),f=Array(c),j=r;0<=--j;)for(e=d[j];null!=e;){var k=e,e=e.next,r=(k.key&2147483647)%c;k.next=f[r];f[r]=k}d=this.entries=f;r=(b&2147483647)%c}d[r]=new JU.Int2IntHashEntry(b,a,d[r]);++this.entryCount},"~N,~N");Ba=w(function(){this.value=this.key=0;this.next=null;q(this,arguments)},JU,"Int2IntHashEntry",null);x(Ba,function(b,a,d){this.key=
b;this.value=a;this.next=d},"~N,~N,JU.Int2IntHashEntry");n("JU");z(null,"JU.JSJSONParser",["java.util.Hashtable","JU.JSONException","$.Lst","$.SB"],function(){var b=w(function(){this.str=null;this.len=this.index=0;this.asHashTable=!1;q(this,arguments)},JU,"JSJSONParser",null);c(b,"parseMap",function(a,d){this.index=0;this.asHashTable=d;this.str=a;this.len=a.length;if("{"!=this.getChar())return null;this.returnChar();return this.getValue(!1)},"~S,~B");c(b,"parse",function(a,d){this.index=0;this.asHashTable=
d;this.str=a;this.len=a.length;return this.getValue(!1)},"~S,~B");c(b,"next",function(){return this.index<this.len?this.str.charAt(this.index++):"\x00"});c(b,"returnChar",function(){this.index--});c(b,"getChar",function(){for(;;){var a=this.next();if(0==a.charCodeAt(0)||" "<a)return a}});c(b,"getValue",function(a){var d=this.index,b=this.getChar();switch(b.charCodeAt(0)){case 0:return null;case 34:case 39:return this.getString(b);case 123:if(!a)return this.getObject();b=String.fromCharCode(0);break;
case 91:if(!a)return this.getArray();b=String.fromCharCode(0);break;default:for(this.returnChar();" "<=b&&0>"[,]{:}'\"".indexOf(b);)b=this.next();this.returnChar();a&&":"!=b&&(b=String.fromCharCode(0))}if(a&&0==b.charCodeAt(0))throw new JU.JSONException("invalid key");d=this.str.substring(d,this.index).trim();if(!a){if(d.equals("true"))return Boolean.TRUE;if(d.equals("false"))return Boolean.FALSE;if(d.equals("null"))return this.asHashTable?d:null}b=d.charAt(0);if("0"<=b&&"9">=b||"-"==b)try{if(0>d.indexOf(".")&&
0>d.indexOf("e")&&0>d.indexOf("E"))return new Integer(d);var c=Float.$valueOf(d);if(!c.isInfinite()&&!c.isNaN())return c}catch(e){if(!D(e,Exception))throw e;}System.out.println("JSON parser cannot parse "+d);throw new JU.JSONException("invalid value");},"~B");c(b,"getString",function(a){for(var d,b=null,c=this.index;;){var e=this.index;switch((d=this.next()).charCodeAt(0)){case 0:case 10:case 13:throw this.syntaxError("Unterminated string");case 92:switch((d=this.next()).charCodeAt(0)){case 34:case 39:case 92:case 47:break;
case 98:d="\b";break;case 116:d="\t";break;case 110:d="\n";break;case 102:d="\f";break;case 114:d="\r";break;case 117:var f=this.index;this.index+=4;try{d=String.fromCharCode(Integer.parseInt(this.str.substring(f,this.index),16))}catch(j){if(D(j,Exception))throw this.syntaxError("Substring bounds error");throw j;}break;default:throw this.syntaxError("Illegal escape.");}break;default:if(d==a)return null==b?this.str.substring(c,e):b.toString()}this.index>e+1&&null==b&&(b=new JU.SB,b.append(this.str.substring(c,
e)));null!=b&&b.appendC(d)}},"~S");c(b,"getObject",function(){var a=this.asHashTable?new java.util.Hashtable:new java.util.HashMap,d=null;switch(this.getChar().charCodeAt(0)){case 125:return a;case 0:throw new JU.JSONException("invalid object");}this.returnChar();for(var b=!1;;)switch(!0==(b=!b)?d=this.getValue(!0).toString():a.put(d,this.getValue(!1)),this.getChar().charCodeAt(0)){case 125:return a;case 58:if(b)continue;b=!0;case 44:if(!b)continue;default:throw this.syntaxError("Expected ',' or ':' or '}'");
}});c(b,"getArray",function(){var a=new JU.Lst;switch(this.getChar().charCodeAt(0)){case 93:return a;case 0:throw new JU.JSONException("invalid array");}this.returnChar();for(var d=!1;;)switch(d?(a.addLast(null),d=!1):a.addLast(this.getValue(!1)),this.getChar().charCodeAt(0)){case 44:switch(this.getChar().charCodeAt(0)){case 93:return a;case 44:d=!0;default:this.returnChar()}continue;case 93:return a;default:throw this.syntaxError("Expected ',' or ']'");}});c(b,"syntaxError",function(a){return new JU.JSONException(a+
" for "+this.str.substring(0,Math.min(this.index,this.len)))},"~S")});n("JU");z(["java.lang.RuntimeException"],"JU.JSONException",null,function(){G(JU,"JSONException",RuntimeException)});n("JU");K(JU,"SimpleNode");n("JU");K(JU,"SimpleEdge");n("JU");K(JU,"Node",JU.SimpleNode);n("JU");z(["java.lang.Enum","JU.SimpleEdge"],"JU.Edge",["JU.PT"],function(){var b=w(function(){this.index=-1;this.order=0;q(this,arguments)},JU,"Edge",null,JU.SimpleEdge);c(b,"isPartial",function(){return!this.isPymolMultiple()&&
0!=(this.order&224)&&!this.isStereo()&&!this.isPymolMultiple()});c(b,"isPymolMultiple",function(){return 98304==(this.order&98304)});c(b,"isStereo",function(){return 0!=(this.order&1024)});b.getArgbHbondType=c(b,"getArgbHbondType",function(a){return JU.Edge.argbsHbondType[(a&30720)>>11]},"~N");b.getBondOrderNumberFromOrder=c(b,"getBondOrderNumberFromOrder",function(a){a&=131071;switch(a){case 131071:case 65535:return"0";case 1025:case 1041:return"1";case 32768:break;default:0!=(a&98304)&&(a&=3)}return JU.Edge.isOrderH(a)||
JU.Edge.isAtropism(a)||0!=(a&256)?"1":0!=(a&224)?(a>>5)+"."+(a&31):JU.Edge.EnumBondOrder.getNumberFromCode(a)},"~N");b.getCmlBondOrder=c(b,"getCmlBondOrder",function(a){a=JU.Edge.getBondOrderNameFromOrder(a);switch(a.charAt(0).charCodeAt(0)){case 115:case 100:case 116:return""+a.toUpperCase().charAt(0);case 97:return 0<=a.indexOf("Double")?"D":0<=a.indexOf("Single")?"S":"aromatic";case 112:return 0<=a.indexOf(" ")?a.substring(a.indexOf(" ")+1):"partial12"}return null},"~N");b.getBondOrderNameFromOrder=
c(b,"getBondOrderNameFromOrder",function(a){a&=131071;switch(a){case 65535:case 131071:return"";case 1025:return"near";case 1041:return"far";case 32768:return JU.Edge.EnumBondOrder.STRUT.$$name;case 1:return JU.Edge.EnumBondOrder.SINGLE.$$name;case 2:return JU.Edge.EnumBondOrder.DOUBLE.$$name;default:0!=(a&98304)&&(a&=3)}return 0!=(a&224)?"partial "+JU.Edge.getBondOrderNumberFromOrder(a):JU.Edge.isOrderH(a)?JU.Edge.EnumBondOrder.H_REGULAR.$$name:65537==(a&65537)?(a=JU.Edge.getAtropismCode(a),"atropisomer_"+
v(a/4)+a%4):0!=(a&256)?JU.Edge.EnumBondOrder.SINGLE.$$name:JU.Edge.EnumBondOrder.getNameFromCode(a)},"~N");b.getAtropismOrder=c(b,"getAtropismOrder",function(a,b){return JU.Edge.getAtropismOrder12((a<<2)+b)},"~N,~N");b.getAtropismOrder12=c(b,"getAtropismOrder12",function(a){return a<<11|65537},"~N");b.getAtropismCode=c(b,"getAtropismCode",function(a){return a>>11&15},"~N");b.getAtropismNode=c(b,"getAtropismNode",function(a,b,c){a=a>>11+(c?0:2)&3;return b.getEdges()[a-1].getOtherNode(b)},"~N,JU.Node,~B");
b.isAtropism=c(b,"isAtropism",function(a){return 65537==(a&65537)},"~N");b.isOrderH=c(b,"isOrderH",function(a){return 0!=(a&30720)&&0==(a&65537)},"~N");b.getPartialBondDotted=c(b,"getPartialBondDotted",function(a){return a&31},"~N");b.getPartialBondOrder=c(b,"getPartialBondOrder",function(a){return 0!=(a&1024)?1:(a&131071)>>5},"~N");b.getCovalentBondOrder=c(b,"getCovalentBondOrder",function(a){if(0!=(a&1024))return 1;if(0==(a&1023))return 0;a&=131071;if(0!=(a&224))return JU.Edge.getPartialBondOrder(a);
0!=(a&256)&&(a&=-257);0!=(a&248)&&(a=1);return a&7},"~N");b.getBondOrderFromFloat=c(b,"getBondOrderFromFloat",function(a){switch(F(10*a)){case 10:return 1;case 5:case -10:return 33;case 15:return 515;case -15:return 66;case 20:return 2;case 25:return 97;case -25:return 100;case 30:return 3;case 40:return 4;case 50:return 5;case 60:return 6}return 131071},"~N");b.getBondOrderFromString=c(b,"getBondOrderFromString",function(a){if(0>a.indexOf(" "))if(0<=a.indexOf("."))a="partial "+a;else{if(JU.PT.isOneOf(a,
";1;2;3;4;5;6;"))return a.charAt(0).charCodeAt(0)-48;var b=JU.Edge.EnumBondOrder.getCodeFromName(a);if(131071!=b||!a.toLowerCase().startsWith("atropisomer_")||14!=a.length)return b;try{b=JU.Edge.getAtropismOrder(Integer.parseInt(a.substring(12,13)),Integer.parseInt(a.substring(13,14)))}catch(c){if(!D(c,"NumberFormatException"))throw c;}return b}if(0!=a.toLowerCase().indexOf("partial "))return 131071;a=a.substring(8).trim();return JU.Edge.getPartialBondOrderFromFloatEncodedInt(JU.Edge.getFloatEncodedInt(a))},
"~S");b.getPartialBondOrderFromFloatEncodedInt=c(b,"getPartialBondOrderFromFloatEncodedInt",function(a){return(v(a/1E6)%7<<5)+(a%1E6&31)},"~N");b.getFloatEncodedInt=c(b,"getFloatEncodedInt",function(a){var b=a.indexOf(".");if(1>b||"-"==a.charAt(0)||a.endsWith(".")||a.contains(".0"))return 2147483647;var c=0,e=0;if(0<b)try{c=Integer.parseInt(a.substring(0,b)),0>c&&(c=-c)}catch(f){if(D(f,"NumberFormatException"))c=-1;else throw f;}var j=a.length;if(b<j-1)try{var k=b+Math.min(6,j-b),e=Integer.parseInt(a.substring(b+
1,k))}catch(g){if(!D(g,"NumberFormatException"))throw g;}c=1E6*c+e;return 0>c||2147483647<c?2147483647:c},"~S");g(b,"getBondType",function(){return this.order&131071});c(b,"setCIPChirality",function(){},"~N");c(b,"getCIPChirality",function(){return""},"~B");var a=w(function(){this.code=0;this.$$name=this.number=null;q(this,arguments)},JU.Edge,"EnumBondOrder",Enum);x(a,function(a,b,c){this.code=a;this.number=b;this.$$name=c},"~N,~S,~S");a.getCodeFromName=c(a,"getCodeFromName",function(a){for(var b,
c=0,e=JU.Edge.EnumBondOrder.values();c<e.length&&((b=e[c])||1);c++)if(b.$$name.equalsIgnoreCase(a))return b.code;return 131071},"~S");a.getNameFromCode=c(a,"getNameFromCode",function(a){for(var b,c=0,e=JU.Edge.EnumBondOrder.values();c<e.length&&((b=e[c])||1);c++)if(b.code==a)return b.$$name;return"?"},"~N");a.getNumberFromCode=c(a,"getNumberFromCode",function(a){for(var b,c=0,e=JU.Edge.EnumBondOrder.values();c<e.length&&((b=e[c])||1);c++)if(b.code==a)return b.number;return"?"},"~N");B(a,"SINGLE",
0,[1,"1","single"]);B(a,"DOUBLE",1,[2,"2","double"]);B(a,"TRIPLE",2,[3,"3","triple"]);B(a,"QUADRUPLE",3,[4,"4","quadruple"]);B(a,"QUINTUPLE",4,[5,"5","quintuple"]);B(a,"sextuple",5,[6,"6","sextuple"]);B(a,"AROMATIC",6,[515,"1.5","aromatic"]);B(a,"STRUT",7,[32768,"1","struts"]);B(a,"H_REGULAR",8,[2048,"1","hbond"]);B(a,"PARTIAL01",9,[33,"0.5","partial"]);B(a,"PARTIAL12",10,[66,"1.5","partialDouble"]);B(a,"PARTIAL23",11,[97,"2.5","partialTriple"]);B(a,"PARTIAL32",12,[100,"2.5","partialTriple2"]);B(a,
"AROMATIC_SINGLE",13,[513,"1","aromaticSingle"]);B(a,"AROMATIC_DOUBLE",14,[514,"2","aromaticDouble"]);B(a,"ATROPISOMER",15,[65537,"1","atropisomer"]);B(a,"UNSPECIFIED",16,[17,"1","unspecified"]);b.argbsHbondType=E(-1,[4294928820,4294967040,4294967040,4294967295,4294902015,4294901760,4294944E3,4278255615,4278255360,4294934656])});n("JU");z(["JU.Elements"],"JU.JmolMolecule",["java.util.Hashtable","JU.AU","$.BS","$.PT"],function(){var b=w(function(){this.nodes=null;this.nElements=this.ac=this.firstAtomIndex=
this.indexInModel=this.modelIndex=this.moleculeIndex=0;this.altElementCounts=this.elementCounts=null;this.altElementMax=this.elementNumberMax=0;this.atNos=this.atomList=this.mf=null;q(this,arguments)},JU,"JmolMolecule",null);N(b,function(){this.elementCounts=E(JU.Elements.elementNumberMax,0);this.altElementCounts=E(JU.Elements.altElementMax,0)});x(b,function(){});b.getMolecules=c(b,"getMolecules",function(a,d,b,c){var e=null,f=new JU.BS,j=-1,k=0,g=0,s=Array(4);null==c&&(c=new JU.BS);for(var m=0;m<
a.length;m++)if(!c.get(m)&&!f.get(m)){var p=a[m];null==p||p.isDeleted()?c.set(m):(p=p.getModelIndex(),p!=j&&(j=p,k=0,e=d[p]),f=JU.JmolMolecule.getBranchBitSet(a,m,e,b,-1,!0,!0),0<=f.nextSetBit(0)&&(s=JU.JmolMolecule.addMolecule(s,g++,a,m,f,p,k++,c)))}return JU.JmolMolecule.allocateArray(s,g)},"~A,~A,JU.Lst,JU.BS");b.getBranchBitSet=c(b,"getBranchBitSet",function(a,d,b,c,e,f,j){var k=JU.BS.newN(a.length);if(0>d)return k;0<=e&&b.clear(e);return JU.JmolMolecule.getCovalentlyConnectedBitSet(a,a[d],b,
f,j,c,k,null,null)?k:new JU.BS},"~A,~N,JU.BS,JU.Lst,~N,~B,~B");b.addMolecule=c(b,"addMolecule",function(a,d,b,c,e,f,j,k){k.or(e);d==a.length&&(a=JU.JmolMolecule.allocateArray(a,2*d+1));a[d]=JU.JmolMolecule.initialize(b,d,c,e,f,j);return a},"~A,~N,~A,~N,JU.BS,~N,~N,JU.BS");b.getMolecularFormulaAtoms=c(b,"getMolecularFormulaAtoms",function(a,d,b,c){var e=new JU.JmolMolecule;e.nodes=a;e.atomList=d;return e.getMolecularFormula(!1,b,c)},"~A,JU.BS,~A,~B");c(b,"getMolecularFormula",function(a,d,b){this.getMFArray(a,
d,b);if(0>this.elementCounts[0])return"?";d=a="";for(var c=1;c<=this.elementNumberMax;c++)b=this.elementCounts[c],0!=b&&(a+=d+JU.Elements.elementSymbolFromNumber(c)+" "+b,d=" ");return a},"~B,~A,~B");c(b,"getMFArray",function(a,d,b){null==this.atomList&&(this.atomList=new JU.BS,this.atomList.setBits(0,null==this.atNos?this.nodes.length:this.atNos.length));this.elementCounts=E(JU.Elements.elementNumberMax,0);this.altElementCounts=E(JU.Elements.altElementMax,0);this.ac=this.atomList.cardinality();for(var c=
this.nElements=0,e=this.atomList.nextSetBit(0);0<=e;e=this.atomList.nextSetBit(e+1),c++){var f,j=null;if(null==this.atNos){j=this.nodes[e];if(null==j)continue;f=j.getAtomicAndIsotopeNumber()}else f=this.atNos[e];var k=null==d?1:F(8*d[c]);f<JU.Elements.elementNumberMax?(0==this.elementCounts[f]&&this.nElements++,this.elementCounts[f]+=k,this.elementNumberMax=Math.max(this.elementNumberMax,f)):(f=JU.Elements.altElementIndexFromNumber(f),0==this.altElementCounts[f]&&this.nElements++,this.altElementCounts[f]+=
k,this.altElementMax=Math.max(this.altElementMax,f));a&&(f=Math.max(0,j.getImplicitHydrogenCount())+Math.max(j.getExplicitHydrogenCount(),0),0<f&&(0==this.elementCounts[1]&&this.nElements++,this.elementCounts[1]+=f*k,this.elementNumberMax=Math.max(this.elementNumberMax,1)))}if(null!=d)for(e=1;e<=this.elementNumberMax;e++){var g=v(this.elementCounts[e]/8);if(8*g!=this.elementCounts[e])return this.elementCounts[0]=-1,this.elementCounts;this.elementCounts[e]=g}if(b){d=2;for(a=!0;a;){d=1E5;for(e=1;e<=
this.elementNumberMax;e++)if(0<(g=this.elementCounts[e])&&g<d)d=g;if(1==d)break;for(;1<d;d--){a=!0;for(e=1;e<=this.elementNumberMax&&a;e++)if(v((g=this.elementCounts[e])/d)*d!=g)a=!1;if(a){for(e=1;e<=this.elementNumberMax;e++)this.elementCounts[e]/=d;break}}}}return this.elementCounts},"~B,~A,~B");b.initialize=c(b,"initialize",function(a,d,b,c,e,f){var j=new JU.JmolMolecule;j.nodes=a;j.firstAtomIndex=b;j.atomList=c;j.ac=c.cardinality();j.moleculeIndex=d;j.modelIndex=e;j.indexInModel=f;return j},"~A,~N,~N,JU.BS,~N,~N");
b.getCovalentlyConnectedBitSet=c(b,"getCovalentlyConnectedBitSet",function(a,d,b,c,e,f,j,k,g){var s=d.getIndex();if(!b.get(s)||!e&&0<d.getBioStructureTypeName().length)return c;b.clear(s);if(null!=f&&!j.get(s))for(var m=f.size();0<=--m;){var p=f.get(m);if(p.get(s)){j.or(p);b.andNot(p);for(m=p.nextSetBit(0);0<=m;m=p.nextSetBit(m+1)){var y=a[m];null!=y&&(b.set(m),JU.JmolMolecule.getCovalentlyConnectedBitSet(a,y,b,c,e,f,j,k,d),b.clear(m))}break}}j.set(s);s=d.getEdges();if(null==s)return!0;for(m=s.length;0<=
--m;)if(p=s[m],null!=p&&p.isCovalent()&&(p=p.getOtherNode(d),p!==g&&(p===k||!JU.JmolMolecule.getCovalentlyConnectedBitSet(a,p,b,c,e,f,j,k,d))))return!1;return!0},"~A,JU.Node,JU.BS,~B,~B,JU.Lst,JU.BS,JU.Node,JU.Node");b.allocateArray=c(b,"allocateArray",function(a,d){return d==a.length?a:JU.AU.arrayCopyObject(a,d)},"~A,~N");b.getBitSetForMF=c(b,"getBitSetForMF",function(a,d,b){var c=new java.util.Hashtable,e,f;b=JU.PT.rep(JU.PT.clean(b+"Z")," ","");for(var j=0,k=0,g=0,s=b.length;j<s;j++)if((f=Character.isDigit(e=
b.charAt(j)))||0<j&&Character.isUpperCase(e)){var g=j,m=b.substring(k,g).trim();if(f)for(;j<s&&Character.isDigit(b.charAt(j));)j++;k=j;c.put(m,E(-1,[f?JU.PT.parseInt(b.substring(g,k)):1]))}b=new JU.BS;for(j=d.nextSetBit(0);0<=j;j=d.nextSetBit(j+1))e=a[j].getElementSymbol(),e=c.get(e),null==e||1>e[0]--||b.set(j);var p;for(a=c.values().iterator();a.hasNext()&&((p=a.next())||1);)if(0<p[0])return new JU.BS;return b},"~A,JU.BS,~S");b.getBranchesForInversion=c(b,"getBranchesForInversion",function(a,d,b){for(var c=
new JU.BS,e=a[d],f=e.getEdges(),j=e.getBondCount();0<=--j;)1==f[j].getBondType()&&c.set(f[j].getOtherNode(e).getIndex());if(2>c.cardinality())c.clearAll();else for(j=c.nextSetBit(0);0<=j;j=c.nextSetBit(j+1))1!=a[j].getCovalentBondCount()&&(e=JU.BS.copy(b),e.clear(d),f=JU.BS.newN(a.length),JU.JmolMolecule.getCovalentlyConnectedBitSet(a,a[j],e,!0,!0,null,f,a[d],a[d])||c.clear(j));return c},"~A,~N,JU.BS")});n("JU");z(["java.util.Hashtable","JU.DefaultLogger"],"JU.Logger",null,function(){var b=G(JU,"Logger",
null);b.getProperty=c(b,"getProperty",function(a,d){try{var b=System.getProperty("jmol.logger."+a,null);if(null!=b)return b.equalsIgnoreCase("true")}catch(c){if(!D(c,Exception))throw c;}return d},"~S,~B");b.setLogger=c(b,"setLogger",function(a){JU.Logger._logger=a;JU.Logger.debugging=JU.Logger.isActiveLevel(5)||JU.Logger.isActiveLevel(6);JU.Logger.debuggingHigh=JU.Logger.debugging&&JU.Logger._activeLevels[6]},"JU.LoggerInterface");b.isActiveLevel=c(b,"isActiveLevel",function(a){return null!=JU.Logger._logger&&
0<=a&&7>a&&JU.Logger._activeLevels[a]},"~N");b.setActiveLevel=c(b,"setActiveLevel",function(a,d){0>a&&(a=0);7<=a&&(a=6);JU.Logger._activeLevels[a]=d;JU.Logger.debugging=JU.Logger.isActiveLevel(5)||JU.Logger.isActiveLevel(6);JU.Logger.debuggingHigh=JU.Logger.debugging&&JU.Logger._activeLevels[6]},"~N,~B");b.setLogLevel=c(b,"setLogLevel",function(a){for(var d=7;0<=--d;)JU.Logger.setActiveLevel(d,d<=a)},"~N");b.getLevel=c(b,"getLevel",function(a){switch(a){case 6:return"DEBUGHIGH";case 5:return"DEBUG";
case 4:return"INFO";case 3:return"WARN";case 2:return"ERROR";case 1:return"FATAL"}return"????"},"~N");b.logLevel=c(b,"logLevel",function(){return JU.Logger._logLevel});b.doLogLevel=c(b,"doLogLevel",function(a){JU.Logger._logLevel=a},"~B");b.debug=c(b,"debug",function(a){if(JU.Logger.debugging)try{JU.Logger._logger.debug(a)}catch(d){}},"~S");b.info=c(b,"info",function(a){try{JU.Logger.isActiveLevel(4)&&JU.Logger._logger.info(a)}catch(d){}},"~S");b.warn=c(b,"warn",function(a){try{JU.Logger.isActiveLevel(3)&&
JU.Logger._logger.warn(a)}catch(d){}},"~S");b.warnEx=c(b,"warnEx",function(a,d){try{JU.Logger.isActiveLevel(3)&&JU.Logger._logger.warnEx(a,d)}catch(b){}},"~S,Throwable");b.error=c(b,"error",function(a){try{JU.Logger.isActiveLevel(2)&&JU.Logger._logger.error(a)}catch(d){}},"~S");b.errorEx=c(b,"errorEx",function(a,d){try{JU.Logger.isActiveLevel(2)&&JU.Logger._logger.errorEx(a,d)}catch(b){}},"~S,Throwable");b.getLogLevel=c(b,"getLogLevel",function(){for(var a=7;0<=--a;)if(JU.Logger.isActiveLevel(a))return a;
return 0});b.fatal=c(b,"fatal",function(a){try{JU.Logger.isActiveLevel(1)&&JU.Logger._logger.fatal(a)}catch(d){}},"~S");b.fatalEx=c(b,"fatalEx",function(a,d){try{JU.Logger.isActiveLevel(1)&&JU.Logger._logger.fatalEx(a,d)}catch(b){}},"~S,Throwable");b.startTimer=c(b,"startTimer",function(a){null!=a&&JU.Logger.htTiming.put(a,Long.$valueOf(System.currentTimeMillis()))},"~S");b.getTimerMsg=c(b,"getTimerMsg",function(a,d){0==d&&(d=JU.Logger.getTimeFrom(a));return"Time for "+a+": "+d+" ms"},"~S,~N");b.getTimeFrom=
c(b,"getTimeFrom",function(a){var d;return null==a||null==(d=JU.Logger.htTiming.get(a))?-1:System.currentTimeMillis()-d.longValue()},"~S");b.checkTimer=c(b,"checkTimer",function(a,d){var b=JU.Logger.getTimeFrom(a);0<=b&&!a.startsWith("(")&&JU.Logger.info(JU.Logger.getTimerMsg(a,b));d&&JU.Logger.startTimer(a);return b},"~S,~B");b.checkMemory=c(b,"checkMemory",function(){JU.Logger.info("Memory: Total-Free=0; Total=0; Free=0; Max=0")});b._logger=new JU.DefaultLogger;b._activeLevels=Ca(7,!1);b._logLevel=
!1;b.debugging=!1;b.debuggingHigh=!1;JU.Logger._activeLevels[6]=JU.Logger.getProperty("debugHigh",!1);JU.Logger._activeLevels[5]=JU.Logger.getProperty("debug",!1);JU.Logger._activeLevels[4]=JU.Logger.getProperty("info",!0);JU.Logger._activeLevels[3]=JU.Logger.getProperty("warn",!0);JU.Logger._activeLevels[2]=JU.Logger.getProperty("error",!0);JU.Logger._activeLevels[1]=JU.Logger.getProperty("fatal",!0);JU.Logger._logLevel=JU.Logger.getProperty("logLevel",!1);JU.Logger.debugging=null!=JU.Logger._logger&&
(JU.Logger._activeLevels[5]||JU.Logger._activeLevels[6]);JU.Logger.debuggingHigh=JU.Logger.debugging&&JU.Logger._activeLevels[6];b.htTiming=new java.util.Hashtable});n("JU");K(JU,"LoggerInterface");n("JU");z(["JU.V3"],"JU.Measure","javajs.api.Interface JU.Lst $.M3 $.P3 $.P4 $.Quat".split(" "),function(){var b=G(JU,"Measure",null);b.computeAngle=c(b,"computeAngle",function(a,d,b,c,e,f){c.sub2(a,d);e.sub2(b,d);a=c.angle(e);return f?a/0.017453292:a},"JU.T3,JU.T3,JU.T3,JU.V3,JU.V3,~B");b.computeAngleABC=
c(b,"computeAngleABC",function(a,d,b,c){var e=new JU.V3,f=new JU.V3;return JU.Measure.computeAngle(a,d,b,e,f,c)},"JU.T3,JU.T3,JU.T3,~B");b.computeTorsion=c(b,"computeTorsion",function(a,d,b,c,e){if(1E-10>a.distanceSquared(d))return 0;var f=a.x-d.x,j=a.y-d.y;a=a.z-d.z;var k=b.x-d.x,g=b.y-d.y,s=b.z-d.z,m=b.x-c.x,p=b.y-c.y,y=b.z-c.z;c=j*s-a*g;d=a*k-f*s;var A=f*g-j*k;b=g*y-s*p;s=s*m-k*y;k=k*p-g*m;m=1/(b*b+s*s+k*k);g=Math.sqrt(1/(c*c+d*d+A*A));m=Math.sqrt(m);c=(c*b+d*s+A*k)*g*m;1<c&&(c=1);-1>c&&(c=-1);
c=Math.acos(c);f=f*b+j*s+a*k;j=Math.abs(f);c=0<f/j?c:-c;return e?c/0.017453292:c},"JU.T3,JU.T3,JU.T3,JU.T3,~B");b.getPlaneThroughPoints=c(b,"getPlaneThroughPoints",function(a,d,b,c,e,f){null==c&&(c=new JU.V3);null==e&&(e=new JU.V3);a=JU.Measure.getNormalThroughPoints(a,d,b,c,e);f.set4(c.x,c.y,c.z,a);return f},"JU.T3,JU.T3,JU.T3,JU.V3,JU.V3,JU.P4");b.getPlaneThroughPoint=c(b,"getPlaneThroughPoint",function(a,d,b){b.set4(d.x,d.y,d.z,-d.dot(a))},"JU.T3,JU.V3,JU.P4");b.distanceToPlane=c(b,"distanceToPlane",
function(a,d){return null==a?NaN:(a.dot(d)+a.w)/Math.sqrt(a.dot(a))},"JU.P4,JU.T3");b.directedDistanceToPlane=c(b,"directedDistanceToPlane",function(a,d,b){a=d.dot(a)+d.w;b=d.dot(b)+d.w;return Math.signum(b)*a/Math.sqrt(d.dot(d))},"JU.P3,JU.P4,JU.P3");b.distanceToPlaneD=c(b,"distanceToPlaneD",function(a,d,b){return null==a?NaN:(a.dot(b)+a.w)/d},"JU.P4,~N,JU.P3");b.distanceToPlaneV=c(b,"distanceToPlaneV",function(a,d,b){return null==a?NaN:(a.dot(b)+d)/Math.sqrt(a.dot(a))},"JU.V3,~N,JU.P3");b.calcNormalizedNormal=
c(b,"calcNormalizedNormal",function(a,d,b,c,e){e.sub2(d,a);c.sub2(b,a);c.cross(e,c);c.normalize()},"JU.T3,JU.T3,JU.T3,JU.T3,JU.T3");b.getDirectedNormalThroughPoints=c(b,"getDirectedNormalThroughPoints",function(a,d,b,c,e,f){d=JU.Measure.getNormalThroughPoints(a,d,b,e,f);null!=c&&(b=JU.P3.newP(a),b.add(e),f=b.distance(c),b.sub2(a,e),f>b.distance(c)&&(e.scale(-1),d=-d));return d},"JU.T3,JU.T3,JU.T3,JU.T3,JU.V3,JU.V3");b.getNormalThroughPoints=c(b,"getNormalThroughPoints",function(a,d,b,c,e){JU.Measure.calcNormalizedNormal(a,
d,b,c,e);e.setT(a);return-e.dot(c)},"JU.T3,JU.T3,JU.T3,JU.T3,JU.T3");b.getPlaneProjection=c(b,"getPlaneProjection",function(a,d,b,c){var e=JU.Measure.distanceToPlane(d,a);c.set(d.x,d.y,d.z);c.normalize();0<e&&c.scale(-1);b.scaleAdd2(Math.abs(e),c,a);return e},"JU.T3,JU.P4,JU.T3,JU.V3");b.getNormalFromCenter=c(b,"getNormalFromCenter",function(a,d,b,c,e,f,j){d=JU.Measure.getNormalThroughPoints(d,b,c,f,j);a=0<JU.Measure.distanceToPlaneV(f,d,a);a==e&&f.scale(-1);return!a},"JU.P3,JU.P3,JU.P3,JU.P3,~B,JU.V3,JU.V3");
b.getNormalToLine=c(b,"getNormalToLine",function(a,d,b){b.sub2(a,d);b.cross(b,JU.Measure.axisY);b.normalize();Float.isNaN(b.x)&&b.set(1,0,0)},"JU.P3,JU.P3,JU.V3");b.getBisectingPlane=c(b,"getBisectingPlane",function(a,d,b,c,e){b.scaleAdd2(0.5,d,a);c.setT(d);c.normalize();JU.Measure.getPlaneThroughPoint(b,c,e)},"JU.P3,JU.V3,JU.T3,JU.V3,JU.P4");b.projectOntoAxis=c(b,"projectOntoAxis",function(a,d,b,c){c.sub2(a,d);var e=c.dot(b);a.scaleAdd2(e,b,d);c.sub2(a,d);return e},"JU.P3,JU.P3,JU.V3,JU.V3");b.calcBestAxisThroughPoints=
c(b,"calcBestAxisThroughPoints",function(a,d,b,c,e,f){b.setT(a[0]);c.sub2(a[d-1],b);c.normalize();JU.Measure.calcAveragePointN(a,d,b);for(var j=0;j++<f&&0.001<JU.Measure.findAxis(a,d,b,c,e););a=JU.P3.newP(a[0]);JU.Measure.projectOntoAxis(a,b,c,e);b.setT(a)},"~A,~N,JU.P3,JU.V3,JU.V3,~N");b.findAxis=c(b,"findAxis",function(a,d,b,c,e){for(var f=new JU.V3,j=new JU.V3,k=new JU.P3,g=new JU.P3,s=JU.V3.newV(c),m=0;0<=--d;)k.setT(a[d]),g.setT(k),JU.Measure.projectOntoAxis(g,b,c,e),j.sub2(k,g),j.cross(e,j),
f.add(j),m+=e.lengthSquared();a=JU.V3.newV(f);a.scale(1/m);j.cross(a,c);c.add(j);c.normalize();j.sub2(c,s);return j.length()},"~A,~N,JU.P3,JU.V3,JU.V3");b.calcAveragePoint=c(b,"calcAveragePoint",function(a,d,b){b.set((a.x+d.x)/2,(a.y+d.y)/2,(a.z+d.z)/2)},"JU.P3,JU.P3,JU.P3");b.calcAveragePointN=c(b,"calcAveragePointN",function(a,d,b){b.setT(a[0]);for(var c=1;c<d;c++)b.add(a[c]);b.scale(1/d)},"~A,~N,JU.P3");b.transformPoints=c(b,"transformPoints",function(a,d,b){for(var c=new JU.Lst,e=0;e<a.size();e++){var f=
JU.P3.newP(a.get(e));f.sub(b);d.rotTrans(f);f.add(b);c.addLast(f)}return c},"JU.Lst,JU.M4,JU.P3");b.isInTetrahedron=c(b,"isInTetrahedron",function(a,d,b,c,e,f,j,k,g){var s=0<=JU.Measure.distanceToPlane(JU.Measure.getPlaneThroughPoints(c,e,d,j,k,f),a);if(s!=0<=JU.Measure.distanceToPlane(JU.Measure.getPlaneThroughPoints(d,e,b,j,k,f),a)||s!=0<=JU.Measure.distanceToPlane(JU.Measure.getPlaneThroughPoints(b,e,c,j,k,f),a))return!1;a=JU.Measure.distanceToPlane(JU.Measure.getPlaneThroughPoints(d,b,c,j,k,f),
a);if(g)return s==0<=a;e=JU.Measure.distanceToPlane(f,e);return 0>=e*a||Math.abs(e)>Math.abs(a)},"JU.P3,JU.P3,JU.P3,JU.P3,JU.P3,JU.P4,JU.V3,JU.V3,~B");b.getIntersectionPP=c(b,"getIntersectionPP",function(a,d){var b=a.x,c=a.y,e=a.z,f=a.w,j=d.x,k=d.y,g=d.z,s=d.w,m=JU.V3.new3(b,c,e),p=JU.V3.new3(j,k,g),y=new JU.V3;y.cross(m,p);var m=Math.abs(y.x),p=Math.abs(y.y),A=Math.abs(y.z);switch(m>p?m>A?1:3:p>A?2:3){case 1:m=0;p=c*g-k*e;if(0.01>Math.abs(p))return null;e=(e*s-g*f)/p;b=(k*f-s*c)/p;break;case 2:p=
b*g-j*e;if(0.01>Math.abs(p))return null;m=(e*s-g*f)/p;e=0;b=(j*f-s*b)/p;break;default:p=b*k-j*c;if(0.01>Math.abs(p))return null;m=(c*s-k*f)/p;e=(j*f-s*b)/p;b=0}c=new JU.Lst;c.addLast(JU.P3.new3(m,e,b));y.normalize();c.addLast(y);return c},"JU.P4,JU.P4");b.getIntersection=c(b,"getIntersection",function(a,d,b,c,e,f){JU.Measure.getPlaneProjection(a,b,c,e);e.set(b.x,b.y,b.z);e.normalize();null==d&&(d=JU.V3.newV(e));b=d.dot(e);if(0.01>Math.abs(b))return null;f.sub2(c,a);c.scaleAdd2(f.dot(e)/b,d,a);return c},
"JU.P3,JU.V3,JU.P4,JU.P3,JU.V3,JU.V3");b.calculateQuaternionRotation=c(b,"calculateQuaternionRotation",function(a,d){d[1]=NaN;var b=new JU.Quat,c=a[0],e=a[1],f=c.length-1;if(2>f||c.length!=e.length)return b;for(var j=0,k=0,g=0,s=0,m=0,p=0,y=0,A=0,n=0,q=new JU.P3,u=new JU.P3,v=c[0],w=e[0],f=f+1;1<=--f;)q.sub2(c[f],v),u.sub2(e[f],w),j+=q.x*u.x,k+=q.x*u.y,g+=q.x*u.z,s+=q.y*u.x,m+=q.y*u.y,p+=q.y*u.z,y+=q.z*u.x,A+=q.z*u.y,n+=q.z*u.z;d[0]=JU.Measure.getRmsd(a,b);b=R(4,4,0);b[0][0]=j+m+n;b[0][1]=b[1][0]=
p-A;b[0][2]=b[2][0]=y-g;b[0][3]=b[3][0]=k-s;b[1][1]=j-m-n;b[1][2]=b[2][1]=k+s;b[1][3]=b[3][1]=y+g;b[2][2]=-j+m-n;b[2][3]=b[3][2]=p+A;b[3][3]=-j-m+n;j=javajs.api.Interface.getInterface("JU.Eigen").setM(b).getEigenvectorsFloatTransposed()[3];b=JU.Quat.newP4(JU.P4.new4(j[1],j[2],j[3],j[0]));d[1]=JU.Measure.getRmsd(a,b);return b},"~A,~A");b.getTransformMatrix4=c(b,"getTransformMatrix4",function(a,d,b,c){a=JU.Measure.getCenterAndPoints(a);var e=JU.Measure.getCenterAndPoints(d);d=L(2,0);var f=JU.Measure.calculateQuaternionRotation(u(-1,
[a,e]),d).getMatrix();null==c?f.rotate(a[0]):c.setT(a[0]);c=JU.V3.newVsub(e[0],a[0]);b.setMV(f,c);return d[1]},"JU.Lst,JU.Lst,JU.M4,JU.P3");b.getCenterAndPoints=c(b,"getCenterAndPoints",function(a){var d=a.size(),b=Array(d+1);b[0]=new JU.P3;if(0<d){for(var c=0;c<d;c++)b[0].add(b[c+1]=a.get(c));b[0].scale(1/d)}return b},"JU.Lst");b.getRmsd=c(b,"getRmsd",function(a,d){for(var b=0,c=a[0],e=a[1],f=c[0],j=e[0],k=c.length-1,g=new JU.P3,s=k+1;1<=--s;)g.sub2(c[s],f),d.transform2(g,g).add(j),b+=g.distanceSquared(e[s]);
return Math.sqrt(b/k)},"~A,JU.Quat");b.getBestLineThroughPoints=c(b,"getBestLineThroughPoints",function(a,d){0>=d&&(d=a.length);if(2>=d)return a;var b=new JU.P3,c=new JU.V3,e=new JU.V3;JU.Measure.calcBestAxisThroughPoints(a,d,b,c,e,8);return JU.Measure.getProjectedLineSegment(a,d,b,c,e)},"~A,~N");b.getProjectedLineSegment=c(b,"getProjectedLineSegment",function(a,d,b,c,e){null==e&&(e=new JU.V3);for(var f=d=null,j,k=3.4028235E38,g=-3.4028235E38,s=0;s<a.length;s++){JU.Measure.projectOntoAxis(j=JU.P3.newP(a[s]),
b,c,e);var m=c.dot(e);m<k&&(k=m,d=j);m>g&&(g=m,f=j)}return u(-1,[d,f])},"~A,~N,JU.P3,JU.V3,JU.V3");b.isInTriangle=c(b,"isInTriangle",function(a,d,b,c,e,f,j){e.sub2(c,d);f.sub2(b,d);j.sub2(a,d);a=e.dot(e);d=e.dot(f);e=e.dot(j);b=f.dot(f);f=f.dot(j);j=1/(a*b-d*d);b=(b*e-d*f)*j;f=(a*f-d*e)*j;return 0<=b&&0<=f&&1>=b+f},"JU.P3,JU.P3,JU.P3,JU.P3,JU.V3,JU.V3,JU.V3");b.calcBestPlaneThroughPoints=c(b,"calcBestPlaneThroughPoints",function(a,d,b){0>=d&&(d=a.length);if(3==d)return JU.Measure.getPlaneThroughPoints(a[0],
a[1],a[2],null,null,b),0;var c=b,e=new JU.P4,f=JU.Measure.calcPlaneForMode(a,d,b,"z");if(1E-6>f)return f;var j=JU.Measure.calcPlaneForMode(a,d,e,"y");j<f&&(f=j,c=e,e=b);1E-6<=f&&(j=JU.Measure.calcPlaneForMode(a,d,e,"x"),j<f&&(f=j,c=e));c!==b&&(b.setT(c),b.w=c.w);return f},"~A,~N,JU.P4");b.calcPlaneForMode=c(b,"calcPlaneForMode",function(a,d,b,c){for(var e=R(d,3,0),f=R(3,d,0),j=R(3,d,0),k=R(3,3,0),g=R(d,0),s=d;0<=--s;){var m=a[s];e[s][0]=f[0][s]="x"==c?m.z:m.x;e[s][1]=f[1][s]="y"==c?m.z:m.y;e[s][2]=
f[2][s]=1;g[s]=-("y"==c?m.y:"x"==c?m.x:m.z)}for(var p=new JU.M3,s=3;0<=--s;)for(m=3;0<=--m;){for(var y=0,A=d;0<=--A;)y+=f[s][A]*e[A][m];p.set33(s,m,y)}p.invert();for(s=3;0<=--s;)for(m=3;0<=--m;)k[s][m]=p.get33(s,m);for(s=3;0<=--s;)for(A=d;0<=--A;){y=0;for(m=3;0<=--m;)y+=k[s][m]*f[m][A];j[s][A]=y}switch(c.charCodeAt(0)){case 120:b.x=1;break;case 121:b.y=1;break;case 122:b.z=1}s=1;for(m=3;0<=--m;){e=0;for(A=d;0<=--A;)e+=j[m][A]*g[A];switch(m){case 0:s+=e*e;"x"==c?b.z=e:b.x=e;break;case 1:s+=e*e;"y"==
c?b.z=e:b.y=e;break;case 2:b.w=e}}c=Math.sqrt(s);b.scale4((0<1/b.w?1:-1)/c);for(s=c=0;s<d;s++)y=JU.Measure.distanceToPlane(b,a[s]),c+=y*y;return Math.sqrt(c/d)},"~A,~N,JU.P4,~S");b.rndPt=c(b,"rndPt",function(){return JU.P3.new3(20*Math.random(),20*Math.random(),20*Math.random())});b.testRnd=c(b,"testRnd",function(){var a=JU.P4.new4(20*Math.random(),20*Math.random(),20*Math.random(),20*Math.random());a.scale4(1/a.length());System.out.println("\n==========\n ");System.out.println("plane is "+a);for(var d=
new JU.P3,b=new JU.V3,c=Array(4),e=0;e<c.length;e++){c[e]=new JU.P3;var f=JU.Measure.rndPt();JU.Measure.getPlaneProjection(f,a,d,b);c[e].setT(d);f=0.1*Math.random();c[e].scaleAdd2(f,b,d);System.out.println(c[e]+" d="+f)}a=new JU.P4;c=JU.Measure.calcBestPlaneThroughPoints(c,-1,a);System.out.println("found "+a+" rmsd = "+c)});b.test=c(b,"test",function(){for(var a=0;10>a;a++)JU.Measure.testRnd();System.exit(0)});b.getPointsOnPlane=c(b,"getPointsOnPlane",function(a,d){for(var b=new JU.Lst,c=a.length;0<=
--c;)0.001>Math.abs(JU.Measure.distanceToPlane(d,a[c]))&&b.addLast(a[c]);return b},"~A,JU.P4");b.getLatticePoints=c(b,"getLatticePoints",function(a,d,b,c){a.addLast(new JU.P3);d=0==d?1:Math.abs(d);b=0==b?1:Math.abs(b);c=0==c?1:Math.abs(c);for(var e=a.size(),f=-d;f<=d;f++)for(var j=-b;j<=b;j++)for(var k=-c;k<=c;k++)for(var g=0;g<e;g++){var s=JU.P3.new3(f,j,k);s.add(a.get(g));a.addLast(s)}for(g=e;0<=--g;)a.removeItemAt(0);return a},"JU.Lst,~N,~N,~N");b.computeHelicalAxis=c(b,"computeHelicalAxis",function(a,
d,b){var c=new JU.V3;c.sub2(d,a);var e=b.getTheta(),f=b.getNormal(),j=c.dot(f);1E-4>Math.abs(j)&&(j=0);var k=new JU.V3;k.cross(c,f);0!=k.dot(k)&&k.normalize();var g=new JU.V3,s=JU.V3.newV(f);0==j&&(j=1.4E-45);s.scale(j);g.sub2(s,c);g.scale(0.5);k.scale(0==e?0:g.length()/Math.tan(3.141592653589793*(e/2/180)));c=JU.V3.newV(k);0!=e&&c.add(g);g=JU.P3.newP(a);g.sub(c);1.4E-45!=j&&f.scale(j);k=JU.P3.newP(g);k.add(f);e=JU.Measure.computeTorsion(a,g,k,d,!0);if(Float.isNaN(e)||1E-4>c.length())e=b.getThetaDirectedV(f);
a=Math.abs(0==e?0:360/e);j=Math.abs(1.4E-45==j?0:f.length()*(0==e?1:360/e));return u(-1,[g,f,c,JU.P3.new3(e,j,a),k])},"JU.P3,JU.P3,JU.Quat");b.axisY=JU.V3.new3(0,1,0)});n("JU");z(null,"JU.MeshSurface","JU.AU $.P3 J.api.Interface JU.BoxInfo $.C $.Geodesic $.TempArray".split(" "),function(){var b=w(function(){this.meshType=this.oabc=this.slicer=this.vwr=null;this.vc=0;this.surfaceAtoms=this.vertexSource=this.vvs=this.vs=null;this.pc=0;this.pis=null;this.haveQuads=this.isDrawPolygon=this.colorsExplicit=
!1;this.colixBack=this.colix=0;this.isColorSolid=!0;this.normalsTemp=this.normals=this.vcs=this.pcs=this.altVertices=this.offset=null;this.normixCount=this.normalCount=0;this.vertexSets=this.surfaceSet=this.mat4=this.bsPolygons=null;this.nSets=0;this.dataOnly=!1;this.vertexCount0=this.polygonCount0=this.iC=this.iB=this.iA=this.lastColix=this.lastColor=0;this.bsSlabGhost=this.bsSlabDisplay=null;this.slabColix=this.slabMeshType=0;this.slabOptions=this.bsDisplay=null;this.mergePolygonCount0=this.mergeVertexCount0=
0;this.isMerged=!1;q(this,arguments)},JU,"MeshSurface",null);c(b,"getMeshSlicer",function(){return null==this.slicer?this.slicer=J.api.Interface.getInterface("JU.MeshSlicer",this.vwr,"script").set(this):this.slicer});b.newMesh=c(b,"newMesh",function(a,d,b,c,e,f){var j=new JU.MeshSurface;j.pis=c;a?j.altVertices=d:j.vs=d;j.vc=0==b?d.length:b;j.normals=e;j.normalCount=0==f&&null!=e?e.length:f;return j},"~B,~A,~N,~A,~A,~N");c(b,"getVertices",function(){return null==this.altVertices?this.vs:this.altVertices});
c(b,"getFaces",function(){return this.pis});c(b,"setColix",function(a){this.colix=a},"~N");c(b,"setColixBack",function(a){this.colixBack=a},"~N");c(b,"addV",function(a,d){0==this.vc?this.vs=Array(25):this.vc==this.vs.length&&(this.vs=JU.AU.doubleLength(this.vs));this.vs[this.vc]=d?JU.P3.newP(a):a;return this.vc++},"JU.T3,~B");c(b,"addTriangle",function(a,d,b){this.addPolygon(E(-1,[a,d,b]),null)},"~N,~N,~N");c(b,"addQuad",function(a,d,b,c){this.haveQuads=!0;this.addPolygon(E(-1,[a,d,b,c]),null)},"~N,~N,~N,~N");
c(b,"setPolygonCount",function(a){this.pc=a;if(!(0>a)&&(null==this.pis||a>this.pis.length))this.pis=JU.AU.newInt2(a)},"~N");c(b,"addVCVal",function(a,d,b){0==this.vc?this.vvs=L(25,0):this.vc>=this.vvs.length&&(this.vvs=JU.AU.doubleLengthF(this.vvs));this.vvs[this.vc]=d;return this.addV(a,b)},"JU.T3,~N,~B");c(b,"addTriangleCheck",function(a,d,b,c,e,f){return null==this.vs||null!=this.vvs&&(Float.isNaN(this.vvs[a])||Float.isNaN(this.vvs[d])||Float.isNaN(this.vvs[b]))||Float.isNaN(this.vs[a].x)||Float.isNaN(this.vs[d].x)||
Float.isNaN(this.vs[b].x)?-1:this.addPolygonV3(a,d,b,c,e,f,null)},"~N,~N,~N,~N,~N,~N");c(b,"addPolygonV3",function(a,d,b,c,e,f,j){return this.dataOnly?this.addPolygon(E(-1,[a,d,b,c]),j):this.addPolygonC(E(-1,[a,d,b,c,e]),f,j,0>e)},"~N,~N,~N,~N,~N,~N,JU.BS");c(b,"addPolygonC",function(a,d,b,c){if(0!=d){if(null==this.pcs||0==this.pc)this.lastColor=0;c?this.colorsExplicit=!0:(null==this.pcs?this.pcs=U(25,0):this.pc>=this.pcs.length&&(this.pcs=JU.AU.doubleLengthShort(this.pcs)),this.pcs[this.pc]=c?2047:
d==this.lastColor?this.lastColix:this.lastColix=JU.C.getColix(this.lastColor=d))}return this.addPolygon(a,b)},"~A,~N,JU.BS,~B");c(b,"addPolygon",function(a,d){var b=this.pc;0==b?this.pis=JU.AU.newInt2(25):b==this.pis.length&&(this.pis=JU.AU.doubleLength(this.pis));null!=d&&d.set(b);this.pis[this.pc++]=a;return b},"~A,JU.BS");c(b,"invalidatePolygons",function(){for(var a=this.pc;--a>=this.mergePolygonCount0;)if((null==this.bsSlabDisplay||this.bsSlabDisplay.get(a))&&null==this.setABC(a))this.pis[a]=
null});c(b,"setABC",function(a){if(null!=this.bsSlabDisplay&&!this.bsSlabDisplay.get(a)&&(null==this.bsSlabGhost||!this.bsSlabGhost.get(a)))return null;a=this.pis[a];if(null==a||3>a.length)return null;this.iA=a[0];this.iB=a[1];this.iC=a[2];return null==this.vvs||!Float.isNaN(this.vvs[this.iA])&&!Float.isNaN(this.vvs[this.iB])&&!Float.isNaN(this.vvs[this.iC])?a:null},"~N");c(b,"setTranslucentVertices",function(){},"JU.BS");c(b,"getSlabColor",function(){return null==this.bsSlabGhost?null:JU.C.getHexCode(this.slabColix)});
c(b,"getSlabType",function(){return null!=this.bsSlabGhost&&1073742018==this.slabMeshType?"mesh":null});c(b,"resetSlab",function(){null!=this.slicer&&this.slicer.slabPolygons(JU.TempArray.getSlabObjectType(1073742333,null,!1,null),!1)});c(b,"slabPolygonsList",function(a,d){this.getMeshSlicer();for(var b=0;b<a.size()&&this.slicer.slabPolygons(a.get(b),d);b++);},"JU.Lst,~B");c(b,"slabBrillouin",function(){},"~A");c(b,"getResolution",function(){return 0});b.getSphereData=c(b,"getSphereData",function(a){JU.Geodesic.createGeodesic(a);
var d=JU.Geodesic.getVertexCount(a),b=JU.Geodesic.getFaceVertexes(a),c=v(b.length/3);a=JU.AU.newInt2(c);for(var e=0,f=0;e<c;e++)a[e]=E(-1,[b[f++],b[f++],b[f++]]);b=Array(d);for(e=0;e<d;e++)b[e]=JU.Geodesic.getVertexVector(e);return JU.MeshSurface.newMesh(!0,b,0,a,b,0)},"~N");c(b,"setBox",function(a,d){a.set(3.4028235E38,3.4028235E38,3.4028235E38);d.set(-3.4028235E38,-3.4028235E38,-3.4028235E38);for(var b=0;b<this.vc;b++){var c=this.vs[b];Float.isNaN(c.x)||JU.BoxInfo.addPoint(c,a,d,0)}},"JU.P3,JU.P3");
c(b,"setBoundingBox",function(){},"~A");b.getSphericalInterpolationFraction=c(b,"getSphericalInterpolationFraction",function(a,d,b,c){d=Math.abs(a+d)/c;b=Math.abs(a+b)/c;a/=c;c=d*d;var e=c-b*b+1;return(e+(d<b?1:-1)*Math.sqrt(e*e+4*(a*a-c)))/2},"~N,~N,~N,~N")});n("JU");z(["JU.Geodesic"],"JU.Normix",["JU.BS"],function(){var b=G(JU,"Normix",null);b.getNormixCount=c(b,"getNormixCount",function(){return 1<JU.Normix.normixCount?JU.Normix.normixCount:JU.Normix.normixCount=JU.Geodesic.getVertexCount(3)});
b.newVertexBitSet=c(b,"newVertexBitSet",function(){return JU.BS.newN(JU.Normix.getNormixCount())});b.getVertexVectors=c(b,"getVertexVectors",function(){null==JU.Normix.vertexVectors&&(JU.Normix.vertexVectors=JU.Geodesic.getVertexVectors());return JU.Normix.vertexVectors});b.setInverseNormixes=c(b,"setInverseNormixes",function(){if(null==JU.Normix.inverseNormixes){JU.Normix.getNormixCount();JU.Normix.getVertexVectors();JU.Normix.inverseNormixes=U(JU.Normix.normixCount,0);for(var a=new JU.BS,d=JU.Normix.normixCount;0<=
--d;){var b=JU.Normix.vertexVectors[d];JU.Normix.inverseNormixes[d]=JU.Normix.getNormix(-b.x,-b.y,-b.z,3,a)}}});b.getInverseNormix=c(b,"getInverseNormix",function(a){return JU.Normix.inverseNormixes[a]},"~N");b.getNeighborVertexArrays=c(b,"getNeighborVertexArrays",function(){null==JU.Normix.neighborVertexesArrays&&(JU.Normix.neighborVertexesArrays=JU.Geodesic.getNeighborVertexesArrays());return JU.Normix.neighborVertexesArrays});b.getNormixV=c(b,"getNormixV",function(a,d){return JU.Normix.getNormix(a.x,
a.y,a.z,3,d)},"JU.V3,JU.BS");b.get2SidedNormix=c(b,"get2SidedNormix",function(a,d){return~JU.Normix.getNormixV(a,d)},"JU.V3,JU.BS");b.getNormix=c(b,"getNormix",function(a,d,b,c,e){var f,j;0<=b?(f=0,j=b-1):(f=11,j=b- -1);e.clearAll();e.set(f);JU.Normix.getVertexVectors();JU.Normix.getNeighborVertexArrays();j=a*a+d*d+j*j;for(var k=0;k<=c;++k)for(var g=JU.Normix.neighborVertexesArrays[k],s=6*f,m=s+(12>f?5:6);--m>=s;){var p=g[m];if(!e.get(p)){e.set(p);var y=JU.Normix.vertexVectors[p],A;A=y.x-a;var n=
A*A;n>=j||(A=y.y-d,n+=A*A,n>=j||(A=y.z-b,n+=A*A,n>=j||(f=p,j=n)))}}return f},"~N,~N,~N,~N,JU.BS");b.normixCount=0;b.vertexVectors=null;b.inverseNormixes=null;b.neighborVertexesArrays=null});n("JU");z(null,"JU.Parser",["JU.PT"],function(){var b=G(JU,"Parser",null);b.parseStringInfestedFloatArray=c(b,"parseStringInfestedFloatArray",function(a,d,b){return JU.Parser.parseFloatArrayBsData(JU.PT.getTokens(a),d,b)},"~S,JU.BS,~A");b.parseFloatArrayBsData=c(b,"parseFloatArrayBsData",function(a,d,b){for(var c=
b.length,e=a.length,f=0,j=0,k=null!=d,g=k?d.nextSetBit(0):0;0<=g&&g<c&&f<e;g=k?d.nextSetBit(g+1):g+1){for(var s;Float.isNaN(s=JU.PT.parseFloat(a[f++]))&&f<e;);Float.isNaN(s)||(b[j=g]=s);if(f==e)break}return j+1},"~A,JU.BS,~A");b.parseFloatArrayFromMatchAndField=c(b,"parseFloatArrayFromMatchAndField",function(a,d,b,c,e,f,j,k,g){var s,m=-1,p=null!=e,y=JU.Parser.markLines(a,0<=a.indexOf("\n")?"\n":";");g=1>=g||g>=y.length?0:g-1;var n=0==g?0:y[g-1],q=y.length;null==k&&(k=L(q-g,0));for(var u=k.length,
v=0>=j?Math.max(f,b):Math.max(f+j,b+c)-1,w=null!=d;g<q;g++){var x=a.substring(n,y[g]).trim(),n=y[g],z=0>=j?JU.PT.getTokens(x):null;if(0>=j){if(z.length<v||Float.isNaN(s=JU.PT.parseFloat(z[f-1])))continue}else if(x.length<v||Float.isNaN(s=JU.PT.parseFloat(x.substring(f-1,f+j-1))))continue;if(p){x=JU.PT.parseInt(null==z?x.substring(b-1,b+c-1):z[b-1]);if(-2147483648==x||0>x||x>=u||0>(x=e[x]))continue;w&&d.set(x)}else{w?m=d.nextSetBit(m+1):m++;if(0>m||m>=u)break;x=m}k[x]=s}return k},"~S,JU.BS,~N,~N,~A,~N,~N,~A,~N");
b.fixDataString=c(b,"fixDataString",function(a){a=a.$replace(";",0>a.indexOf("\n")?"\n":" ");a=JU.PT.trim(a,"\n \t");a=JU.PT.rep(a,"\n ","\n");return a=JU.PT.rep(a,"\n\n","\n")},"~S");b.markLines=c(b,"markLines",function(a,d){for(var b=0,c=a.length;0<=--c;)a.charAt(c)==d&&b++;for(var c=E(b+1,0),e=b=0;0<=(e=a.indexOf(d,e));)c[b++]=++e;c[b]=a.length;return c},"~S,~S")});n("JU");z(["JU.P3"],"JU.Point3fi",null,function(){var b=w(function(){this.mi=-1;this.sZ=this.sY=this.sX=this.i=0;this.sD=-1;q(this,
arguments)},JU,"Point3fi",JU.P3,Cloneable);c(b,"copy",function(){try{return this.clone()}catch(a){if(D(a,"CloneNotSupportedException"))return null;throw a;}})});n("JU");var qb=w(function(){this.height=this.width=this.y=this.x=0;q(this,arguments)},JU,"Rectangle",null);c(qb,"contains",function(b,a){return b>=this.x&&a>=this.y&&b-this.x<this.width&&a-this.y<this.height},"~N,~N");n("JU");z(null,"JU.Rgb16",["JU.SB"],function(){var b=w(function(){this.b=this.g=this.r=0;q(this,arguments)},JU,"Rgb16",null);
b.newI=c(b,"newI",function(a){var d=new JU.Rgb16;d.setInt(a);return d},"~N");c(b,"setInt",function(a){this.r=a>>8&65280|128;this.g=a&65280|128;this.b=a<<8&65280|128},"~N");c(b,"setRgb",function(a){this.r=a.r;this.g=a.g;this.b=a.b},"JU.Rgb16");c(b,"diffDiv",function(a,d,b){this.r=v((a.r-d.r)/b);this.g=v((a.g-d.g)/b);this.b=v((a.b-d.b)/b)},"JU.Rgb16,JU.Rgb16,~N");c(b,"setAndIncrement",function(a,d){this.r=a.r;a.r+=d.r;this.g=a.g;a.g+=d.g;this.b=a.b;a.b+=d.b},"JU.Rgb16,JU.Rgb16");c(b,"getArgb",function(){return 4278190080|
this.r<<8&16711680|this.g&65280|this.b>>8});g(b,"toString",function(){return(new JU.SB).append("Rgb16(").appendI(this.r).appendC(",").appendI(this.g).appendC(",").appendI(this.b).append(" -> ").appendI(this.r>>8&255).appendC(",").appendI(this.g>>8&255).appendC(",").appendI(this.b>>8&255).appendC(")").toString()})});n("JU");z(["JU.AU","$.V3"],"JU.Shader",["JU.CU","JU.C"],function(){var b=w(function(){this.zLight=this.yLight=this.xLight=0;this.lightSource=null;this.specularOn=!0;this.usePhongExponent=
!1;this.ambientPercent=45;this.diffusePercent=84;this.specularExponent=6;this.specularPercent=22;this.specularPower=40;this.phongExponent=64;this.specularFactor=this.intenseFraction=this.diffuseFactor=this.ambientFraction=0;this.ashadesGreyscale=this.ashades=null;this.celOn=!1;this.celPower=10;this.celZ=this.celRGB=0;this.useLight=!1;this.sphereShadeIndexes=null;this.seed=305419897;this.ellipsoidShades=this.sphereShapeCache=null;this.nIn=this.nOut=0;q(this,arguments)},JU,"Shader",null);N(b,function(){this.lightSource=
new JU.V3;this.ambientFraction=this.ambientPercent/100;this.diffuseFactor=this.diffusePercent/100;this.intenseFraction=this.specularPower/100;this.specularFactor=this.specularPercent/100;this.ashades=JU.AU.newInt2(128);this.sphereShadeIndexes=O(65536,0);this.sphereShapeCache=JU.AU.newInt2(128)});x(b,function(){this.setLightSource(-1,-1,2.5)});c(b,"setLightSource",function(a,d,b){this.lightSource.set(a,d,b);this.lightSource.normalize();this.xLight=this.lightSource.x;this.yLight=this.lightSource.y;
this.zLight=this.lightSource.z},"~N,~N,~N");c(b,"setCel",function(a,d,b){a=a&&0!=d;b=JU.C.getArgb(JU.C.getBgContrast(b));b=4278190080==b?4278453252:-1==b?-2:b+1;this.celOn==a&&this.celRGB==b&&this.celPower==d||(this.celOn=a,this.celPower=d,this.useLight=!this.celOn||0<d,this.celZ=1-Math.pow(2,-Math.abs(d)/10),this.celRGB=b,this.flushCaches())},"~B,~N,~N");c(b,"flushCaches",function(){this.checkShades(JU.C.colixMax);for(var a=JU.C.colixMax;0<=--a;)this.ashades[a]=null;this.calcSphereShading();for(a=
128;0<=--a;)this.sphereShapeCache[a]=null;this.ellipsoidShades=null});c(b,"setLastColix",function(a,d){JU.C.allocateColix(a,!0);this.checkShades(2047);d&&JU.C.setLastGrey(a);this.ashades[2047]=this.getShades2(a,!1)},"~N,~B");c(b,"getShades",function(a){this.checkShades(JU.C.colixMax);a&=-30721;var d=this.ashades[a];null==d&&(d=this.ashades[a]=this.getShades2(JU.C.argbs[a],!1));return d},"~N");c(b,"getShadesG",function(a){this.checkShades(JU.C.colixMax);a&=-30721;null==this.ashadesGreyscale&&(this.ashadesGreyscale=
JU.AU.newInt2(this.ashades.length));var d=this.ashadesGreyscale[a];null==d&&(d=this.ashadesGreyscale[a]=this.getShades2(JU.C.argbs[a],!0));return d},"~N");c(b,"checkShades",function(a){null!=this.ashades&&this.ashades.length>=a||(2047==a&&a++,this.ashades=JU.AU.arrayCopyII(this.ashades,a),null!=this.ashadesGreyscale&&(this.ashadesGreyscale=JU.AU.arrayCopyII(this.ashadesGreyscale,a)))},"~N");c(b,"getShades2",function(a,d){var b=E(64,0);if(0==a)return b;for(var c=a>>16&255,e=a>>8&255,f=a&255,j=0,k=
0,g=0,s=this.ambientFraction;;)if(j=c*s+0.5,k=e*s+0.5,g=f*s+0.5,0<s&&4>j&&4>k&&4>g)c++,e++,f++,0.1>s&&(s+=0.1),a=JU.CU.rgb(v(Math.floor(c)),v(Math.floor(e)),v(Math.floor(f)));else break;var m=0,s=(1-s)/52,c=c*s,e=e*s,f=f*s;if(this.celOn){s=JU.CU.rgb(v(Math.floor(j)),v(Math.floor(k)),v(Math.floor(g)));if(0<=this.celPower)for(;32>m;++m)b[m]=s;k+=32*e;g+=32*f;for(s=JU.CU.rgb(v(Math.floor(j+32*c)),v(Math.floor(k)),v(Math.floor(g)));64>m;m++)b[m]=s;b[0]=b[1]=this.celRGB}else{for(;52>m;++m)b[m]=JU.CU.rgb(v(Math.floor(j)),
v(Math.floor(k)),v(Math.floor(g))),j+=c,k+=e,g+=f;b[m++]=a;s=this.intenseFraction/(64-m);c=(255.5-j)*s;e=(255.5-k)*s;for(f=(255.5-g)*s;64>m;m++)j+=c,k+=e,g+=f,b[m]=JU.CU.rgb(v(Math.floor(j)),v(Math.floor(k)),v(Math.floor(g)))}if(d)for(;0<=--m;)b[m]=JU.CU.toFFGGGfromRGB(b[m]);return b},"~N,~B");c(b,"getShadeIndex",function(a,d,b){var c=Math.sqrt(a*a+d*d+b*b);return Math.round(63*this.getShadeF(a/c,d/c,b/c))},"~N,~N,~N");c(b,"getShadeB",function(a,d,b){return Math.round(63*this.getShadeF(a,d,b))},"~N,~N,~N");
c(b,"getShadeFp8",function(a,d,b){var c=Math.sqrt(a*a+d*d+b*b);return v(Math.floor(16128*this.getShadeF(a/c,d/c,b/c)))},"~N,~N,~N");c(b,"getShadeF",function(a,d,b){d=this.useLight?a*this.xLight+d*this.yLight+b*this.zLight:b;if(0>=d)return 0;a=d*this.diffuseFactor;if(this.specularOn&&(d=2*d*b-this.zLight,0<d)){if(this.usePhongExponent)d=Math.pow(d,this.phongExponent);else for(var c=this.specularExponent;0<=--c&&1E-4<d;)d*=d;a+=d*this.specularFactor}return this.celOn&&b<this.celZ?0:1<a?1:a},"~N,~N,~N");
c(b,"getShadeN",function(a,d,b,c){d=v(Math.floor(16128*this.getShadeF(a/c,d/c,b/c)));a=d>>8;if(!this.useLight)return a;(d&255)>this.nextRandom8Bit()&&++a;d=this.seed&65535;21845>d&&0<a?--a:43690<d&&63>a&&++a;return a},"~N,~N,~N,~N");c(b,"calcSphereShading",function(){for(var a=-127.5,d=0;256>d;++a,++d)for(var b=-127.5,c=a*a,e=0;256>e;++b,++e){var f=0,j=16900-c-b*b;0<j&&(f=Math.sqrt(j),f=this.getShadeN(a,b,f,130));this.sphereShadeIndexes[(e<<8)+d]=f}});c(b,"nextRandom8Bit",function(){var a=this.seed;
this.seed=a=(a<<16)+(a<<1)+a&2147483647;return a>>23});c(b,"getEllipsoidShade",function(a,d,b,c,e){var f=e.m00*a+e.m01*d+e.m02*b+e.m03,j=e.m10*a+e.m11*d+e.m12*b+e.m13;a=e.m20*a+e.m21*d+e.m22*b+e.m23;c=Math.min(c/2,45)/Math.sqrt(f*f+j*j+a*a);f=F(-f*c);j=F(-j*c);c=F(a*c);if(a=-20>f||20<=f||-20>j||20<=j||0>c||40<=c){for(;0==f%2&&0==j%2&&0==c%2&&0<f+j+c;)f>>=1,j>>=1,c>>=1;a=-20>f||20<=f||-20>j||20<=j||0>c||40<=c}a?this.nOut++:this.nIn++;return a?this.getShadeIndex(f,j,c):this.ellipsoidShades[f+20][j+
20][c]},"~N,~N,~N,~N,JU.M4");c(b,"createEllipsoidShades",function(){this.ellipsoidShades=O(40,40,40,0);for(var a=0;40>a;a++)for(var d=0;40>d;d++)for(var b=0;40>b;b++)this.ellipsoidShades[a][d][b]=this.getShadeIndex(a-20,d-20,b)})});n("JU");z(["JV.Viewer"],"JU.SimpleUnitCell","JU.AU $.M4 $.P3 $.P4 $.PT $.V3 JU.Escape".split(" "),function(){var b=w(function(){this.unitCellParams=null;this.slop=0;this.matrixFtoCNoOffset=this.matrixCtoFNoOffset=this.matrixFractionalToCartesian=this.matrixCartesianToFractional=
null;this.volume=0;this.dimension=3;this.dimensionType=7;this.fractionalOrigin=null;this.c_=this.b_=this.a_=this.cB_=this.cA_=this.sinGamma=this.cosGamma=this.sinBeta=this.cosBeta=this.sinAlpha=this.cosAlpha=this.gamma=this.beta=this.alpha=this.c=this.b=this.a=this.nc=this.nb=this.na=0;q(this,arguments)},JU,"SimpleUnitCell",null);N(b,function(){this.slop=JV.Viewer.isHighPrecision?1E-12:1E-4});x(b,function(){this.fractionalOrigin=new JU.P3});c(b,"getPrecision",function(){return this.slop});c(b,"setPrecision",
function(a){this.unitCellParams[26]=this.slop=!Float.isNaN(a)?a:!Float.isNaN(this.unitCellParams[26])?this.unitCellParams[26]:JV.Viewer.isHighPrecision?1E-12:1E-4},"~N");c(b,"isSupercell",function(){return 1<this.na||1<this.nb||1<this.nc});b.isValid=c(b,"isValid",function(a){return null!=a&&(0<a[0]||14<a.length&&!Float.isNaN(a[14]))},"~A");b.newA=c(b,"newA",function(a){var d=new JU.SimpleUnitCell;d.init(a);return d},"~A");b.getDimensionFromParams=c(b,"getDimensionFromParams",function(a){return 0>=
a[0]?3:0>a[1]?1:0>a[2]?2:3},"~A");c(b,"init",function(a){null==a&&(a=L(-1,[1,1,1,90,90,90]));if(JU.SimpleUnitCell.isValid(a)){this.unitCellParams=JU.SimpleUnitCell.newParams(a,NaN);var d=!1;this.dimension=JU.SimpleUnitCell.getDimensionFromParams(a);switch(this.dimension){case 1:this.dimensionType=1;break;case 2:this.dimensionType=3;break;case 3:this.dimensionType=7}this.a=a[0];this.b=a[1];this.c=a[2];this.alpha=a[3];this.beta=a[4];this.gamma=a[5];-1==this.gamma&&0<this.c&&(d=!0,this.gamma=120);26<
a.length&&(Float.isNaN(a[26])?a[26]=this.slop:this.slop=a[26]);var b=this.na=Math.max(1,24<a.length&&!Float.isNaN(a[22])?F(a[22]):1),c=this.nb=Math.max(1,24<a.length&&!Float.isNaN(a[23])?F(a[23]):1),e=this.nc=Math.max(1,24<a.length&&!Float.isNaN(a[24])?F(a[24]):1);if(25<a.length&&!Float.isNaN(a[25])){var f=a[25];0<f&&(b*=f,c*=f,e*=f)}else b=c=e=1;if(0>=this.a&&0>=this.c){var f=JU.SimpleUnitCell.newV(a,6),j=JU.SimpleUnitCell.newV(a,9),k=JU.SimpleUnitCell.newV(a,12);this.setABC(f,j,k);0>this.c&&(a=
JU.AU.arrayCopyF(a,-1),0>this.b&&(j.set(0,0,1),j.cross(j,f),0.001>j.length()&&j.set(0,1,0),j.normalize(),a[9]=j.x,a[10]=j.y,a[11]=j.z),0>this.c&&(k.cross(f,j),k.normalize(),a[12]=k.x,a[13]=k.y,a[14]=k.z))}this.a*=b;0>=this.b?this.b=this.c=1:0>=this.c?(this.c=1,this.b*=c):(this.b*=c,this.c*=e);this.setCellParams();if(21<a.length&&!Float.isNaN(a[21])){d=L(16,0);for(f=0;16>f;f++){switch(f%4){case 0:j=b;break;case 1:j=c;break;case 2:j=e;break;default:j=1}d[f]=a[6+f]*j}this.matrixCartesianToFractional=
JU.M4.newA16(d);this.matrixCartesianToFractional.getTranslation(this.fractionalOrigin);this.matrixFractionalToCartesian=JU.M4.newM4(this.matrixCartesianToFractional).invert();1==a[0]&&this.setParamsFromMatrix()}else 14<a.length&&!Float.isNaN(a[14])?(f=this.matrixFractionalToCartesian=new JU.M4,f.setColumn4(0,a[6]*b,a[7]*b,a[8]*b,0),f.setColumn4(1,a[9]*c,a[10]*c,a[11]*c,0),f.setColumn4(2,a[12]*e,a[13]*e,a[14]*e,0),17<a.length&&!Float.isNaN(a[17])?f.setColumn4(3,a[15],a[16],a[17],1):f.setColumn4(3,
0,0,0,1)):(f=this.matrixFractionalToCartesian=new JU.M4,d?(f.setColumn4(0,-this.b*this.cosGamma,-this.b*this.sinGamma,0,0),f.setColumn4(1,-this.b*this.cosGamma,this.b*this.sinGamma,0,0)):(f.setColumn4(0,this.a,0,0,0),f.setColumn4(1,this.b*this.cosGamma,this.b*this.sinGamma,0,0)),f.setColumn4(2,this.c*this.cosBeta,this.c*(this.cosAlpha-this.cosBeta*this.cosGamma)/this.sinGamma,this.volume/(this.a*this.b*this.sinGamma),0),f.setColumn4(3,0,0,0,1)),this.matrixCartesianToFractional=JU.M4.newM4(this.matrixFractionalToCartesian).invert();
this.matrixCtoFNoOffset=this.matrixCartesianToFractional;this.matrixFtoCNoOffset=this.matrixFractionalToCartesian}},"~A");b.newV=c(b,"newV",function(a,d){return JU.V3.new3(a[d++],a[d++],a[d])},"~A,~N");b.newParams=c(b,"newParams",function(a,d){for(var b=L(27,0),c=a.length,e=0;27>e;e++)b[e]=e<c?a[e]:NaN;27>c&&(b[26]=d);return b},"~A,~N");b.addVectors=c(b,"addVectors",function(a){for(var d=JU.SimpleUnitCell.newA(a).matrixFractionalToCartesian,b=0;9>b;b++)a[6+b]=d.getElement(b%3,v(b/3))},"~A");c(b,"setParamsFromMatrix",
function(){var a=JU.V3.new3(1,0,0),d=JU.V3.new3(0,1,0),b=JU.V3.new3(0,0,1);this.matrixFractionalToCartesian.rotate(a);this.matrixFractionalToCartesian.rotate(d);this.matrixFractionalToCartesian.rotate(b);this.setABC(a,d,b);this.setCellParams()});c(b,"setABC",function(a,d,b){JU.SimpleUnitCell.fillParams(a,d,b,this.unitCellParams);a=this.unitCellParams;this.a=a[0];this.b=a[1];this.c=a[2];this.alpha=a[3];this.beta=a[4];this.gamma=a[5]},"JU.V3,JU.V3,JU.V3");b.fillParams=c(b,"fillParams",function(a,d,
b,c){null==a&&(a=JU.SimpleUnitCell.newV(c,6),d=JU.SimpleUnitCell.newV(c,9),b=JU.SimpleUnitCell.newV(c,12));var e=a.length(),f=d.length(),j=b.length();0!=e&&(0==f?f=j=-1:0==j&&(j=-1),c[0]=e,c[1]=f,c[2]=j,c[3]=0>f||0>j?90:d.angle(b)/0.017453292519943295,c[4]=0>j?90:a.angle(b)/0.017453292519943295,c[5]=0>f?90:a.angle(d)/0.017453292519943295)},"JU.V3,JU.V3,JU.V3,~A");c(b,"setCellParams",function(){this.cosAlpha=Math.cos(0.017453292519943295*this.alpha);this.sinAlpha=Math.sin(0.017453292519943295*this.alpha);
this.cosBeta=Math.cos(0.017453292519943295*this.beta);this.sinBeta=Math.sin(0.017453292519943295*this.beta);this.cosGamma=Math.cos(0.017453292519943295*this.gamma);this.sinGamma=Math.sin(0.017453292519943295*this.gamma);var a=Math.sqrt(this.sinAlpha*this.sinAlpha+this.sinBeta*this.sinBeta+this.sinGamma*this.sinGamma+2*this.cosAlpha*this.cosBeta*this.cosGamma-2);this.volume=this.a*this.b*this.c*a;this.cA_=(this.cosAlpha-this.cosBeta*this.cosGamma)/this.sinGamma;this.cB_=a/this.sinGamma;this.a_=this.b*
this.c*this.sinAlpha/this.volume;this.b_=this.a*this.c*this.sinBeta/this.volume;this.c_=this.a*this.b*this.sinGamma/this.volume});c(b,"getFractionalOrigin",function(){return this.fractionalOrigin});c(b,"toSupercell",function(a){a.x/=this.na;a.y/=this.nb;a.z/=this.nc;return a},"JU.P3");c(b,"toCartesian",function(a,d){null!=this.matrixFractionalToCartesian&&(d?this.matrixFtoCNoOffset:this.matrixFractionalToCartesian).rotTrans(a)},"JU.T3,~B");c(b,"toFractionalM",function(a){null!=this.matrixCartesianToFractional&&
(a.mul(this.matrixFractionalToCartesian),a.mul2(this.matrixCartesianToFractional,a))},"JU.M4");c(b,"toFractional",function(a,d){null!=this.matrixCartesianToFractional&&(d?this.matrixCtoFNoOffset:this.matrixCartesianToFractional).rotTrans(a)},"JU.T3,~B");c(b,"isPolymer",function(){return 1==this.dimension});c(b,"isSlab",function(){return 2==this.dimension});c(b,"getUnitCellParams",function(){return this.unitCellParams});c(b,"getUnitCellAsArray",function(a){var d=this.matrixFractionalToCartesian;return a?
L(-1,[d.m00,d.m10,d.m20,d.m01,d.m11,d.m21,d.m02,d.m12,d.m22]):L(-1,[this.a,this.b,this.c,this.alpha,this.beta,this.gamma,d.m00,d.m10,d.m20,d.m01,d.m11,d.m21,d.m02,d.m12,d.m22,this.dimension,this.volume])},"~B");c(b,"getInfo",function(a){switch(a){case 0:return this.a;case 1:return this.b;case 2:return this.c;case 3:return this.alpha;case 4:return this.beta;case 5:return this.gamma;case 6:return this.dimension;case 7:return this.dimensionType;case 8:return JU.SimpleUnitCell.isHexagonal(this.unitCellParams)?
1:0;case 9:return JU.SimpleUnitCell.isRhombohedral(this.unitCellParams)?1:0}return NaN},"~N");b.getReciprocal=c(b,"getReciprocal",function(a,d,b){var c=4==a.length?1:0,e=Array(4);e[0]=1==c?JU.P3.newP(a[0]):new JU.P3;0==b&&(b=6.283185307179586);for(var f=0;3>f;f++){var j=e[f+1]=new JU.P3;j.cross(a[(f+1)%3+c],a[(f+2)%3+c]);var k=a[f+c].dot(j);-1==b&&(b=Math.sqrt(k));j.scale(b/k)}if(null==d)return e;for(f=0;4>f;f++)d[f]=e[f];return d},"~A,~A,~N");b.setAbc=c(b,"setAbc",function(a,d,b){if(null!=a&&(null==
d&&(d=L(6,0)),a=JU.PT.split(a.$replace(",","="),"="),12<=a.length))for(var c=0;6>c;c++)d[c]=JU.PT.parseFloat(a[2*c+1]);return null==b?null:JU.SimpleUnitCell.setAbcFromParams(d,b)},"~S,~A,~A");b.setAbcFromParams=c(b,"setAbcFromParams",function(a,d){var b=JU.SimpleUnitCell.newA(a).getUnitCellAsArray(!0);d[1].set(b[0],b[1],b[2]);d[2].set(b[3],b[4],b[5]);d[3].set(b[6],b[7],b[8]);return d},"~A,~A");c(b,"unitizeDim",function(a,d){switch(a){case 3:d.z=JU.SimpleUnitCell.unitizeX(d.z,this.slop);case 2:d.y=
JU.SimpleUnitCell.unitizeX(d.y,this.slop);case 1:d.x=JU.SimpleUnitCell.unitizeX(d.x,this.slop)}},"~N,JU.T3");b.unitizeDimRnd=c(b,"unitizeDimRnd",function(a,d,b){switch(a){case 3:d.z=JU.SimpleUnitCell.unitizeXRnd(d.z,b);case 2:d.y=JU.SimpleUnitCell.unitizeXRnd(d.y,b);case 1:d.x=JU.SimpleUnitCell.unitizeXRnd(d.x,b)}},"~N,JU.T3,~N");b.unitizeX=c(b,"unitizeX",function(a,d){a-=Math.floor(a);if(a>1-d||a<d)a=0;return a},"~N,~N");b.unitizeXRnd=c(b,"unitizeXRnd",function(a,d){a-=Math.floor(a);if(a>1-d||a<
d)a=0;return a},"~N,~N");c(b,"twelfthsOf",function(a){if(0==a)return 0;a=Math.abs(12*a);var d=Math.round(a);return 12>=d&&Math.abs(a-d)<12*this.slop?d:-1},"~N");c(b,"twelfthify",function(a){switch(this.dimension){case 3:a.z=this.setTwelfths(a.z);case 2:a.y=this.setTwelfths(a.y);case 1:a.x=this.setTwelfths(a.x)}},"JU.P3");c(b,"setTwelfths",function(a){var d=this.twelfthsOf(a);return 0<=d?d/12*(0>a?-1:1):a},"~N");b.ijkToPoint3f=c(b,"ijkToPoint3f",function(a,d,b,c){var e=1E9<a?1E3:1E6<a?100:10,f=e*e;
b-=0<=b?v(5*e/10):b;d.x=v(a/f)%e+b;d.y=v(a%f/e)+b;d.z=(0==c?a%e:(-500==b?v(c/e):c)%e)+b},"~N,JU.P3,~N,~N");b.ptToIJK=c(b,"ptToIJK",function(a,d){return 5>=a.x&&5>=a.y&&5>=a.z?JU.P4.new4(555,100*(a.x+4)+10*(a.y+4)+a.z+4,d,0):JU.P4.new4(1500500500,1500500500+1E6*a.x+1E3*a.y+a.z,d,1500500+a.z)},"JU.T3,~N");b.escapeMultiplier=c(b,"escapeMultiplier",function(a){if(C(a,"JU.P4")){var d=1E3*v(Math.floor(a.x/1E3))+v(Math.floor(a.w/1E3))-1E3,b=1E3*v(Math.floor(a.y/1E3))+v(Math.floor(a.w))%1E3;return"{"+d+" "+
b+" "+a.z+"}"}return JU.Escape.eP(a)},"JU.T3");b.setMinMaxLatticeParameters=c(b,"setMinMaxLatticeParameters",function(a,d,b,c){if(b.x<=b.y&&555<=b.y){var e=new JU.P3;JU.SimpleUnitCell.ijkToPoint3f(b.x,e,0,c);d.x=F(e.x);d.y=F(e.y);d.z=F(e.z);JU.SimpleUnitCell.ijkToPoint3f(b.y,e,1,c);b.x=F(e.x);b.y=F(e.y);b.z=F(e.z)}switch(a){case 1:d.y=0,b.y=1;case 2:d.z=0,b.z=1}},"~N,JU.P3i,JU.P3i,~N");b.isHexagonal=c(b,"isHexagonal",function(a){return JU.SimpleUnitCell.approx0(a[0]-a[1])&&JU.SimpleUnitCell.approx0(a[3]-
90)&&JU.SimpleUnitCell.approx0(a[4]-90)&&(JU.SimpleUnitCell.approx0(a[5]-120)||-1==a[5])},"~A");b.isRhombohedral=c(b,"isRhombohedral",function(a){return JU.SimpleUnitCell.approx0(a[0]-a[1])&&JU.SimpleUnitCell.approx0(a[1]-a[2])&&!JU.SimpleUnitCell.approx0(a[3]-90)&&JU.SimpleUnitCell.approx0(a[3]-a[4])&&JU.SimpleUnitCell.approx0(a[4]-a[5])},"~A");b.approx0=c(b,"approx0",function(a){return 0.001>Math.abs(a)},"~N");b.getCellRange=c(b,"getCellRange",function(a,d){var b=C(a,"JU.T4")?F(a.w):0;JU.SimpleUnitCell.ijkToPoint3f(F(a.x),
d[0],0,b);JU.SimpleUnitCell.ijkToPoint3f(F(a.y),d[1],1,b);0>a.z&&(d[0].scale(-1/a.z),d[1].scale(-1/a.z));return b},"JU.T3,~A");b.parseCalc=c(b,"parseCalc",function(a,d){return JU.SimpleUnitCell.parseCalcFunctions(a,JU.SimpleUnitCell.functions,d)},"JV.Viewer,~S");b.parseCalcFunctions=c(b,"parseCalcFunctions",function(a,d,b){var c;b.startsWith("+")&&(b=b.substring(1));c=JU.PT.parseFloatStrict(b);if(!Float.isNaN(c))return c;b=b.toLowerCase();if(null!=d&&0<=b.indexOf("(")){c=JU.PT.split(b,"(");for(var e=
c.length-1;0<=--e;){var f=c[e];if(0!=f.length){for(var j=null,k=d.length;0<=--k;)if(f.endsWith(d[k])){j=d[k];break}null==j&&(System.err.println("Unrecognized function "+b),c[e]+="?")}}b=JU.PT.join(c,"(",0)}if(0<=b.indexOf("/")){c=JU.PT.split(b,"/");for(e=c.length-1;0<=--e;){f=c[e];b=d=!1;for(k=f.length;0<=--k;){j=f.charAt(k);if("."==j){d=!0;break}else if(")"==j){if(b)return NaN;c[e]+="*1.0";break}if("."==j){d=!0;break}if(!JU.PT.isDigit(j))break;b=!0}b&&!d&&(c[e]+=".0")}b=JU.PT.join(c,"/",0)}return a.evaluateExpressionAsVariable(b).asFloat()},
"JV.Viewer,~A,~S");b.parseSimpleMath=c(b,"parseSimpleMath",function(a,d){if(0>d.indexOf("("))return d;0<=d.indexOf("PI")&&(d=JU.PT.rep(d,"PI","(180)"));for(var b=d.$replace('"'," ").$replace("'"," ").$plit(","),c=0;c<b.length;c++){var e=b[c].trim();if(!(0>e.indexOf("("))){for(var e=","+e,f=e.length,j=f;0<=--f;)switch(e.charAt(f).charCodeAt(0)){case 110:case 111:f--;default:continue;case 93:case 91:case 44:case 97:case 98:case 99:case 117:case 118:case 119:case 120:case 121:case 122:if(j>f+1)var k=
JU.SimpleUnitCell.parseCalc(a,e.substring(f+1,j)),g=1<f&&0<=k?"+":"",e=e.substring(0,f+1)+g+k+e.substring(j);j=f}b[c]=e.substring(1)}}return JU.PT.join(b,",",0)},"JV.Viewer,~S");g(b,"toString",function(){return"["+this.a+" "+this.b+" "+this.c+" "+this.alpha+" "+this.beta+" "+this.gamma+"]"});b.functions=u(-1,"sqrt sin cos tan + - * /".split(" "))});n("JU");z(null,"JU.TempArray",["JU.P3","$.P3i"],function(){var b=w(function(){this.freeEnum=this.lengthsFreeEnum=this.freeScreens=this.lengthsFreeScreens=
this.freePoints=this.lengthsFreePoints=null;q(this,arguments)},JU,"TempArray",null);N(b,function(){this.lengthsFreePoints=E(6,0);this.freePoints=Array(6);this.lengthsFreeScreens=E(6,0);this.freeScreens=Array(6);this.lengthsFreeEnum=E(2,0);this.freeEnum=Array(2)});x(b,function(){});c(b,"clear",function(){this.clearTempPoints();this.clearTempScreens()});b.findBestFit=c(b,"findBestFit",function(a,d){for(var b=-1,c=2147483647,e=d.length;0<=--e;){var f=d[e];f>=a&&f<c&&(c=f,b=e)}0<=b&&(d[b]=0);return b},
"~N,~A");b.findShorter=c(b,"findShorter",function(a,d){for(var b=d.length;0<=--b;)if(0==d[b])return d[b]=a,b;for(var c=0,e=d[0],b=d.length;0<--b;)d[b]<e&&(e=d[b],c=b);return e<a?(d[c]=a,c):-1},"~N,~A");c(b,"clearTempPoints",function(){for(var a=0;6>a;a++)this.lengthsFreePoints[a]=0,this.freePoints[a]=null});c(b,"allocTempPoints",function(a){var d;d=JU.TempArray.findBestFit(a,this.lengthsFreePoints);if(0<d)d=this.freePoints[d];else for(d=Array(a);0<=--a;)d[a]=new JU.P3;return d},"~N");c(b,"freeTempPoints",
function(a){for(var d=0;d<this.freePoints.length;d++)if(this.freePoints[d]===a){this.lengthsFreePoints[d]=a.length;return}d=JU.TempArray.findShorter(a.length,this.lengthsFreePoints);0<=d&&(this.freePoints[d]=a)},"~A");c(b,"clearTempScreens",function(){for(var a=0;6>a;a++)this.lengthsFreeScreens[a]=0,this.freeScreens[a]=null});c(b,"allocTempScreens",function(a){var d;d=JU.TempArray.findBestFit(a,this.lengthsFreeScreens);if(0<d)d=this.freeScreens[d];else for(d=Array(a);0<=--a;)d[a]=new JU.P3i;return d},
"~N");c(b,"freeTempScreens",function(a){for(var d=0;d<this.freeScreens.length;d++)if(this.freeScreens[d]===a){this.lengthsFreeScreens[d]=a.length;return}d=JU.TempArray.findShorter(a.length,this.lengthsFreeScreens);0<=d&&(this.freeScreens[d]=a)},"~A");c(b,"allocTempEnum",function(a){var d=JU.TempArray.findBestFit(a,this.lengthsFreeEnum);return 0<d?this.freeEnum[d]:Array(a)},"~N");c(b,"freeTempEnum",function(a){for(var d=0;d<this.freeEnum.length;d++)if(this.freeEnum[d]===a){this.lengthsFreeEnum[d]=
a.length;return}d=JU.TempArray.findShorter(a.length,this.lengthsFreeEnum);0<=d&&(this.freeEnum[d]=a)},"~A");b.getSlabWithinRange=c(b,"getSlabWithinRange",function(a,d){return u(-1,[Integer.$valueOf(1073742114),u(-1,[Float.$valueOf(a),Float.$valueOf(d)]),Boolean.FALSE,null])},"~N,~N");b.getSlabObjectType=c(b,"getSlabObjectType",function(a,d,b,c){return u(-1,[Integer.$valueOf(a),d,Boolean.$valueOf(b),c])},"~N,~O,~B,~O")});n("JU");G(JU,"Txt",null);n("JU");z(["JU.V3"],"JU.Vibration",["JU.P3"],function(){var b=
w(function(){this.modDim=-1;this.modScale=NaN;this.magMoment=0;this.isFractional=this.showTrace=!1;this.v0=null;this.tracePt=0;this.symmform=this.trace=null;q(this,arguments)},JU,"Vibration",JU.V3);c(b,"setCalcPoint",function(a,d,b){switch(this.modDim){case -2:case -3:break;default:a.scaleAdd2(Math.cos(6.283185307179586*d.x)*b,this,a)}return a},"JU.T3,JU.T3,~N,~N");c(b,"getInfo",function(a){a.put("vibVector",JU.V3.newV(this));a.put("vibType",-2==this.modDim?"spin":-1==this.modDim?"vib":"mod")},"java.util.Map");
g(b,"clone",function(){var a=new JU.Vibration;a.setT(this);a.modDim=this.modDim;a.magMoment=this.magMoment;a.v0=this.v0;return a});c(b,"setXYZ",function(a){this.setT(a)},"JU.T3");c(b,"setV0",function(){this.v0=JU.V3.newV(this)});c(b,"setType",function(a){this.modDim=a;return this},"~N");c(b,"isNonzero",function(){return 0!=this.x||0!=this.y||0!=this.z});c(b,"getOccupancy100",function(){return-2147483648},"~B");c(b,"startTrace",function(a){this.trace=Array(a);this.tracePt=a},"~N");c(b,"addTracePt",
function(a,d){(null==this.trace||0==a||a!=this.trace.length)&&this.startTrace(a);if(null!=d&&2<a){if(0>=--this.tracePt){for(var b=this.trace[this.trace.length-1],c=this.trace.length;1<=--c;)this.trace[c]=this.trace[c-1];this.trace[1]=b;this.tracePt=1}b=this.trace[this.tracePt];null==b&&(b=this.trace[this.tracePt]=new JU.P3);b.setT(d)}return this.trace},"~N,JU.Point3fi")});n("JV");z(["J.api.EventManager","JU.Rectangle","JV.MouseState"],["JV.MotionPoint","$.ActionManager","$.Gesture"],"JU.AU $.PT J.api.Interface J.i18n.GT JS.SV $.ScriptEval J.thread.HoverWatcherThread JU.BSUtil $.Escape $.Logger $.Point3fi JV.Viewer JV.binding.Binding $.JmolBinding".split(" "),
function(){var b=w(function(){this.vwr=null;this.isMultiTouch=this.haveMultiTouchInput=!1;this.predragBinding=this.rasmolBinding=this.dragBinding=this.pfaatBinding=this.jmolBinding=this.b=null;this.LEFT_DRAGGED=0;this.hoverable=!1;this.dragGesture=this.hoverWatcherThread=null;this.apm=1;this.pickingStyleSelect=this.pickingStyle=this.bondPickingMode=0;this.pickingStyleMeasure=5;this.rootPickingStyle=0;this.mouseDragFactor=this.gestureSwipeFactor=1;this.mouseWheelFactor=1.15;this.dragged=this.pressed=
this.clicked=this.moved=this.current=null;this.clickedCount=this.pressedCount=0;this.dragSelectedMode=this.labelMode=this.drawMode=!1;this.measuresEnabled=!0;this.hoverActive=this.haveSelection=!1;this.mp=null;this.dragAtomIndex=-1;this.rubberbandSelectionMode=this.mkBondPressed=!1;this.rectRubber=null;this.isAltKeyReleased=!0;this.isMultiTouchServer=this.isMultiTouchClient=this.keyProcessing=!1;this.clickAction=this.dragAction=this.pressAction=0;this.measurementQueued=null;this.selectionWorking=
this.zoomTrigger=!1;q(this,arguments)},JV,"ActionManager",null,J.api.EventManager);N(b,function(){this.current=new JV.MouseState("current");this.moved=new JV.MouseState("moved");this.clicked=new JV.MouseState("clicked");this.pressed=new JV.MouseState("pressed");this.dragged=new JV.MouseState("dragged");this.rectRubber=new JU.Rectangle});c(b,"setViewer",function(a){this.vwr=a;JV.Viewer.isJS||this.createActions();this.setBinding(this.jmolBinding=new JV.binding.JmolBinding);this.LEFT_DRAGGED=JV.binding.Binding.getMouseAction(1,
16,1);this.dragGesture=new JV.Gesture(20,a)},"JV.Viewer,~S");c(b,"isHoverable",function(){return this.hoverable});c(b,"checkHover",function(){if(this.zoomTrigger)this.zoomTrigger=!1,8==this.vwr.currentCursor&&this.vwr.setCursor(0),this.vwr.setInMotion(!1);else if(!this.vwr.getInMotion(!0)&&!this.vwr.tm.spinOn&&!this.vwr.tm.navOn&&!this.vwr.checkObjectHovered(this.current.x,this.current.y)){var a=this.vwr.findNearestAtomIndex(this.current.x,this.current.y);if(!(0>a)){var d=2==this.apm&&this.bnd(JV.binding.Binding.getMouseAction(this.clickedCount,
this.moved.modifiers,1),[10]);this.vwr.hoverOn(a,d)}}});c(b,"processMultitouchEvent",function(){},"~N,~N,~N,~N,JU.P3,~N");c(b,"bind",function(a,d){var b=JV.ActionManager.getActionFromName(d),c=JV.binding.Binding.getMouseActionStr(a);0!=c&&(0<=b?this.b.bindAction(c,b):this.b.bindName(c,d))},"~S,~S");c(b,"clearBindings",function(){this.setBinding(this.jmolBinding=new JV.binding.JmolBinding);this.rasmolBinding=this.dragBinding=this.pfaatBinding=null});c(b,"unbindAction",function(a,d){if(null==a&&null==
d)this.clearBindings();else{var b=JV.ActionManager.getActionFromName(d),c=JV.binding.Binding.getMouseActionStr(a);0<=b?this.b.unbindAction(c,b):0!=c&&this.b.unbindName(c,d);null==d&&this.b.unbindUserAction(a)}},"~S,~S");b.newAction=c(b,"newAction",function(a,d,b){JV.ActionManager.actionInfo[a]=b;JV.ActionManager.actionNames[a]=d},"~N,~S,~S");c(b,"createActions",function(){null==JV.ActionManager.actionInfo[0]&&(JV.ActionManager.newAction(0,"_assignNew",J.i18n.GT.o(J.i18n.GT.$("assign/new atom or bond (requires {0})"),
"set picking assignAtom_??/assignBond_?")),JV.ActionManager.newAction(1,"_center",J.i18n.GT.$("center")),JV.ActionManager.newAction(2,"_clickFrank",J.i18n.GT.$("pop up recent context menu (click on Jmol frank)")),JV.ActionManager.newAction(4,"_deleteAtom",J.i18n.GT.o(J.i18n.GT.$("delete atom (requires {0})"),"set picking DELETE ATOM")),JV.ActionManager.newAction(5,"_deleteBond",J.i18n.GT.o(J.i18n.GT.$("delete bond (requires {0})"),"set picking DELETE BOND")),JV.ActionManager.newAction(6,"_depth",
J.i18n.GT.o(J.i18n.GT.$("adjust depth (back plane; requires {0})"),"SLAB ON")),JV.ActionManager.newAction(7,"_dragAtom",J.i18n.GT.o(J.i18n.GT.$("move atom (requires {0})"),"set picking DRAGATOM")),JV.ActionManager.newAction(8,"_dragDrawObject",J.i18n.GT.o(J.i18n.GT.$("move whole DRAW object (requires {0})"),"set picking DRAW")),JV.ActionManager.newAction(9,"_dragDrawPoint",J.i18n.GT.o(J.i18n.GT.$("move specific DRAW point (requires {0})"),"set picking DRAW")),JV.ActionManager.newAction(10,"_dragLabel",
J.i18n.GT.o(J.i18n.GT.$("move label (requires {0})"),"set picking LABEL")),JV.ActionManager.newAction(11,"_dragMinimize",J.i18n.GT.o(J.i18n.GT.$("move atom and minimize molecule (requires {0})"),"set picking DRAGMINIMIZE")),JV.ActionManager.newAction(12,"_dragMinimizeMolecule",J.i18n.GT.o(J.i18n.GT.$("move and minimize molecule (requires {0})"),"set picking DRAGMINIMIZEMOLECULE")),JV.ActionManager.newAction(13,"_dragSelected",J.i18n.GT.o(J.i18n.GT.$("move selected atoms (requires {0})"),"set DRAGSELECTED")),
JV.ActionManager.newAction(14,"_dragZ",J.i18n.GT.o(J.i18n.GT.$("drag atoms in Z direction (requires {0})"),"set DRAGSELECTED")),JV.ActionManager.newAction(15,"_multiTouchSimulation",J.i18n.GT.$("simulate multi-touch using the mouse)")),JV.ActionManager.newAction(16,"_navTranslate",J.i18n.GT.o(J.i18n.GT.$("translate navigation point (requires {0} and {1})"),u(-1,["set NAVIGATIONMODE","set picking NAVIGATE"]))),JV.ActionManager.newAction(17,"_pickAtom",J.i18n.GT.$("pick an atom")),JV.ActionManager.newAction(3,
"_pickConnect",J.i18n.GT.o(J.i18n.GT.$("connect atoms (requires {0})"),"set picking CONNECT")),JV.ActionManager.newAction(18,"_pickIsosurface",J.i18n.GT.o(J.i18n.GT.$("pick an ISOSURFACE point (requires {0}"),"set DRAWPICKING")),JV.ActionManager.newAction(19,"_pickLabel",J.i18n.GT.o(J.i18n.GT.$("pick a label to toggle it hidden/displayed (requires {0})"),"set picking LABEL")),JV.ActionManager.newAction(20,"_pickMeasure",J.i18n.GT.o(J.i18n.GT.$("pick an atom to include it in a measurement (after starting a measurement or after {0})"),
"set picking DISTANCE/ANGLE/TORSION")),JV.ActionManager.newAction(21,"_pickNavigate",J.i18n.GT.o(J.i18n.GT.$("pick a point or atom to navigate to (requires {0})"),"set NAVIGATIONMODE")),JV.ActionManager.newAction(22,"_pickPoint",J.i18n.GT.o(J.i18n.GT.$("pick a DRAW point (for measurements) (requires {0}"),"set DRAWPICKING")),JV.ActionManager.newAction(23,"_popupMenu",J.i18n.GT.$("pop up the full context menu")),JV.ActionManager.newAction(24,"_reset",J.i18n.GT.$("reset (when clicked off the model)")),
JV.ActionManager.newAction(25,"_rotate",J.i18n.GT.$("rotate")),JV.ActionManager.newAction(26,"_rotateBranch",J.i18n.GT.o(J.i18n.GT.$("rotate branch around bond (requires {0})"),"set picking ROTATEBOND")),JV.ActionManager.newAction(27,"_rotateSelected",J.i18n.GT.o(J.i18n.GT.$("rotate selected atoms (requires {0})"),"set DRAGSELECTED")),JV.ActionManager.newAction(28,"_rotateZ",J.i18n.GT.$("rotate Z")),JV.ActionManager.newAction(29,"_rotateZorZoom",J.i18n.GT.$("rotate Z (horizontal motion of mouse) or zoom (vertical motion of mouse)")),
JV.ActionManager.newAction(30,"_select",J.i18n.GT.o(J.i18n.GT.$("select an atom (requires {0})"),"set pickingStyle EXTENDEDSELECT")),JV.ActionManager.newAction(31,"_selectAndDrag",J.i18n.GT.o(J.i18n.GT.$("select and drag atoms (requires {0})"),"set DRAGSELECTED")),JV.ActionManager.newAction(32,"_selectAndNot",J.i18n.GT.o(J.i18n.GT.$("unselect this group of atoms (requires {0})"),"set pickingStyle DRAG/EXTENDEDSELECT")),JV.ActionManager.newAction(33,"_selectNone",J.i18n.GT.o(J.i18n.GT.$("select NONE (requires {0})"),
"set pickingStyle EXTENDEDSELECT")),JV.ActionManager.newAction(34,"_selectOr",J.i18n.GT.o(J.i18n.GT.$("add this group of atoms to the set of selected atoms (requires {0})"),"set pickingStyle DRAG/EXTENDEDSELECT")),JV.ActionManager.newAction(35,"_selectToggle",J.i18n.GT.o(J.i18n.GT.$("toggle selection (requires {0})"),"set pickingStyle DRAG/EXTENDEDSELECT/RASMOL")),JV.ActionManager.newAction(36,"_selectToggleOr",J.i18n.GT.o(J.i18n.GT.$("if all are selected, unselect all, otherwise add this group of atoms to the set of selected atoms (requires {0})"),
"set pickingStyle DRAG")),JV.ActionManager.newAction(37,"_setMeasure",J.i18n.GT.$("pick an atom to initiate or conclude a measurement")),JV.ActionManager.newAction(38,"_slab",J.i18n.GT.o(J.i18n.GT.$("adjust slab (front plane; requires {0})"),"SLAB ON")),JV.ActionManager.newAction(39,"_slabAndDepth",J.i18n.GT.o(J.i18n.GT.$("move slab/depth window (both planes; requires {0})"),"SLAB ON")),JV.ActionManager.newAction(40,"_slideZoom",J.i18n.GT.$("zoom (along right edge of window)")),JV.ActionManager.newAction(41,
"_spinDrawObjectCCW",J.i18n.GT.o(J.i18n.GT.$("click on two points to spin around axis counterclockwise (requires {0})"),"set picking SPIN")),JV.ActionManager.newAction(42,"_spinDrawObjectCW",J.i18n.GT.o(J.i18n.GT.$("click on two points to spin around axis clockwise (requires {0})"),"set picking SPIN")),JV.ActionManager.newAction(43,"_stopMotion",J.i18n.GT.o(J.i18n.GT.$("stop motion (requires {0})"),"set waitForMoveTo FALSE")),JV.ActionManager.newAction(44,"_swipe",J.i18n.GT.$("spin model (swipe and release button and stop motion simultaneously)")),
JV.ActionManager.newAction(45,"_translate",J.i18n.GT.$("translate")),JV.ActionManager.newAction(46,"_wheelZoom",J.i18n.GT.$("zoom")))});b.getActionName=c(b,"getActionName",function(a){return a<JV.ActionManager.actionNames.length?JV.ActionManager.actionNames[a]:null},"~N");b.getActionFromName=c(b,"getActionFromName",function(a){for(var d=0;d<JV.ActionManager.actionNames.length;d++)if(JV.ActionManager.actionNames[d].equalsIgnoreCase(a))return d;return-1},"~S");c(b,"getBindingInfo",function(a){return this.b.getBindingInfo(JV.ActionManager.actionInfo,
JV.ActionManager.actionNames,a)},"~S");c(b,"setBinding",function(a){this.b=a},"JV.binding.Binding");c(b,"bnd",function(a,d){for(var b=d.length;0<=--b;)if(this.b.isBound(a,d[b]))return!0;return!1},"~N,~A");c(b,"isDrawOrLabelAction",function(a){return this.drawMode&&this.bnd(a,[8,9])||this.labelMode&&this.bnd(a,[10])},"~N");c(b,"getBondPickingMode",function(){return this.bondPickingMode});b.getPickingModeName=c(b,"getPickingModeName",function(a){return 0>a||a>=JV.ActionManager.pickingModeNames.length?
"off":JV.ActionManager.pickingModeNames[a]},"~N");b.getPickingMode=c(b,"getPickingMode",function(a){for(var d=JV.ActionManager.pickingModeNames.length;0<=--d;)if(a.equalsIgnoreCase(JV.ActionManager.pickingModeNames[d]))return 38==d&&(d=6),d;return-1},"~S");b.getPickingStyleName=c(b,"getPickingStyleName",function(a){return 0>a||a>=JV.ActionManager.pickingStyleNames.length?"toggle":JV.ActionManager.pickingStyleNames[a]},"~N");b.getPickingStyleIndex=c(b,"getPickingStyleIndex",function(a){for(var d=JV.ActionManager.pickingStyleNames.length;0<=
--d;)if(a.equalsIgnoreCase(JV.ActionManager.pickingStyleNames[d]))return d;return-1},"~S");c(b,"getAtomPickingMode",function(){return this.apm});c(b,"setPickingMode",function(a){var d=!1;switch(a){case -1:d=!0;this.bondPickingMode=35;a=1;this.vwr.setStringProperty("pickingStyle","toggle");this.vwr.setBooleanProperty("bondPicking",!1);break;case 34:case 33:case 8:this.vwr.getModelkit(!1);case 35:this.vwr.setBooleanProperty("bondPicking",!0);this.bondPickingMode=a;this.resetMeasurement();return}d=(new Boolean(d|
this.apm!=a)).valueOf();this.apm=a;d&&this.resetMeasurement()},"~N");c(b,"getPickingState",function(){var a=";set modelkitMode "+this.vwr.getBoolean(603983903)+";set picking "+JV.ActionManager.getPickingModeName(this.apm);32==this.apm&&(a+="_"+this.vwr.getModelkitPropertySafely("atomtype"));a+=";";0!=this.bondPickingMode&&(a+="set picking "+JV.ActionManager.getPickingModeName(this.bondPickingMode));33==this.bondPickingMode&&(a+="_"+this.vwr.getModelkitPropertySafely("bondtype"));return a+";"});c(b,
"getPickingStyle",function(){return this.pickingStyle});c(b,"setPickingStyle",function(a){this.pickingStyle=a;4<=a?(this.pickingStyleMeasure=a,this.resetMeasurement()):(3>a&&(this.rootPickingStyle=a),this.pickingStyleSelect=a);this.rubberbandSelectionMode=!1;switch(this.pickingStyleSelect){case 2:this.b.name.equals("extendedSelect")||this.setBinding(null==this.pfaatBinding?this.pfaatBinding=JV.binding.Binding.newBinding(this.vwr,"Pfaat"):this.pfaatBinding);break;case 3:this.b.name.equals("drag")||
this.setBinding(null==this.dragBinding?this.dragBinding=JV.binding.Binding.newBinding(this.vwr,"Drag"):this.dragBinding);this.rubberbandSelectionMode=!0;break;case 1:this.b.name.equals("selectOrToggle")||this.setBinding(null==this.rasmolBinding?this.rasmolBinding=JV.binding.Binding.newBinding(this.vwr,"Rasmol"):this.rasmolBinding);break;default:this.b!==this.jmolBinding&&this.setBinding(this.jmolBinding)}this.b.name.equals("drag")||(this.predragBinding=this.b)},"~N");c(b,"setGestureSwipeFactor",function(a){this.gestureSwipeFactor=
a},"~N");c(b,"setMouseDragFactor",function(a){this.mouseDragFactor=a},"~N");c(b,"setMouseWheelFactor",function(a){this.mouseWheelFactor=a},"~N");c(b,"setCurrent",function(a,d,b,c){this.vwr.hoverOff();this.current.set(a,d,b,c)},"~N,~N,~N,~N");c(b,"getCurrentX",function(){return this.current.x});c(b,"getCurrentY",function(){return this.current.y});c(b,"setMouseMode",function(){this.drawMode=this.labelMode=!1;this.dragSelectedMode=this.vwr.getDragSelected();this.measuresEnabled=!this.dragSelectedMode;
if(!this.dragSelectedMode)switch(this.apm){default:return;case 32:this.measuresEnabled=!this.vwr.getModelkit(!1).isPickAtomAssignCharge();return;case 4:this.drawMode=!0;this.measuresEnabled=!1;break;case 2:this.labelMode=!0;this.measuresEnabled=!1;break;case 9:this.measuresEnabled=!1;break;case 19:case 22:case 20:case 21:this.measuresEnabled=!1;return}this.exitMeasurementMode(null)});c(b,"clearMouseInfo",function(){this.pressedCount=this.clickedCount=0;this.dragGesture.setAction(0,0);this.exitMeasurementMode(null)});
c(b,"setDragAtomIndex",function(a){this.dragAtomIndex=a;this.setAtomsPicked(JU.BSUtil.newAndSetBit(a),"Label picked for atomIndex = "+a)},"~N");c(b,"isMTClient",function(){return this.isMultiTouchClient});c(b,"isMTServer",function(){return this.isMultiTouchServer});c(b,"dispose",function(){this.clear()});c(b,"clear",function(){this.startHoverWatcher(!1);null!=this.predragBinding&&(this.b=this.predragBinding);this.vwr.setPickingStyle(null,this.rootPickingStyle);this.isAltKeyReleased=!0});c(b,"startHoverWatcher",
function(a){if(!this.vwr.isPreviewOnly)try{a?null==this.hoverWatcherThread&&(this.current.time=-1,this.hoverWatcherThread=new J.thread.HoverWatcherThread(this,this.current,this.moved,this.vwr)):null!=this.hoverWatcherThread&&(this.current.time=-1,this.hoverWatcherThread.interrupt(),this.hoverWatcherThread=null)}catch(d){if(!D(d,Exception))throw d;}},"~B");c(b,"setModeMouse",function(a){-1==a&&this.startHoverWatcher(!1)},"~N");g(b,"keyPressed",function(a,d){if(this.keyProcessing)return!1;this.keyProcessing=
!0;switch(a){case 18:this.dragSelectedMode&&this.isAltKeyReleased&&this.vwr.moveSelectedXY(-2147483648,0,d);this.isAltKeyReleased=!1;this.moved.modifiers|=8;break;case 16:this.moved.keybuf=0;this.dragged.modifiers|=1;this.moved.modifiers|=1;break;case 17:this.moved.modifiers|=2;break;case 27:this.vwr.hoverOff();this.exitMeasurementMode("escape");break;default:this.vwr.hoverOff()}var b=8464|this.moved.modifiers;!this.labelMode&&!this.b.isUserAction(b)&&this.checkMotionRotateZoom(b,this.current.x,0,
0,!1);if(this.vwr.getBoolean(603979889))switch(a){case 38:case 40:case 37:case 39:case 32:case 46:this.vwr.navigate(a,d)}this.keyProcessing=!1;return!0},"~N,~N");g(b,"keyTyped",function(){return!1},"~N,~N");g(b,"keyReleased",function(a){switch(a){case 18:this.moved.modifiers&=-9;this.dragSelectedMode&&this.vwr.moveSelectedXY(2147483647,0,this.moved.modifiers);this.isAltKeyReleased=!0;break;case 16:this.moved.modifiers&=-2;0<this.moved.keybuf&&this.vwr.isModelKitOpen()&&this.checkKeyBuf(0);break;case 17:this.moved.modifiers&=
-3}0==this.moved.modifiers&&this.vwr.setCursor(0);if(65<=a&&this.vwr.isModelKitOpen()&&(this.dragAtomIndex=this.vwr.findNearestAtomIndex(this.current.x,this.current.y),0<=this.dragAtomIndex)){this.checkKeyBuf(a);return}if(this.vwr.getBoolean(603979889))switch(a){case 38:case 40:case 37:case 39:this.vwr.navigate(0,0)}this.moved.keybuf=0},"~N");c(b,"checkKeyBuf",function(a){var d=0!=(this.moved.modifiers&1);if(0!=a)if(0==this.moved.keybuf){if(this.moved.keybuf=a,d)return}else this.moved.keybuf+=a<<
8;0<this.moved.keybuf&&(this.assignNew(this.moved.keybuf),this.moved.keybuf=0)},"~N");g(b,"mouseEnterExit",function(a,d,b,c){this.vwr.tm.stereoDoubleDTI&&(d<<=1);this.setCurrent(a,d,b,0);c&&this.exitMeasurementMode("mouseExit")},"~N,~N,~N,~B");c(b,"setMouseActions",function(a,d,b){this.pressAction=JV.binding.Binding.getMouseAction(a,d,b?5:4);this.dragAction=JV.binding.Binding.getMouseAction(a,d,1);this.clickAction=JV.binding.Binding.getMouseAction(a,d,2)},"~N,~N,~B");g(b,"mouseAction",function(a,
d,b,c,e,f){if(this.vwr.getMouseEnabled())switch(JU.Logger.debuggingHigh&&(0!=a&&this.vwr.getBoolean(603979960))&&this.vwr.showString("mouse action: "+a+" "+f+" "+JV.binding.Binding.getMouseActionName(JV.binding.Binding.getMouseAction(e,f,a),!1),!1),this.vwr.tm.stereoDoubleDTI&&(b<<=1),a){case 0:this.hoverable||(JU.Logger.info("ActionManager: mouse move detected"),this.hoverable=!0);this.setCurrent(d,b,c,f);this.moved.setCurrent(this.current,0);this.moved.keybuf=0;if(null!=this.mp||this.hoverActive){this.clickAction=
JV.binding.Binding.getMouseAction(this.clickedCount,f,0);this.checkClickAction(b,c,d,0);break}if(this.isZoomArea(b)){this.checkMotionRotateZoom(this.LEFT_DRAGGED,0,0,0,!1);break}8==this.vwr.currentCursor&&this.vwr.setCursor(0);break;case 4:this.setMouseMode();this.pressedCount=this.pressed.check(20,b,c,f,d,700)?this.pressedCount+1:1;1==this.pressedCount&&(this.vwr.checkInMotion(1),this.setCurrent(d,b,c,f));this.pressAction=JV.binding.Binding.getMouseAction(this.pressedCount,f,4);this.vwr.setCursor(12);
this.pressed.setCurrent(this.current,1);this.dragged.setCurrent(this.current,1);this.vwr.setFocus();this.dragGesture.setAction(this.dragAction,d);this.checkPressedAction(b,c,d);break;case 1:this.setMouseMode();this.setMouseActions(this.pressedCount,f,!1);a=b-this.dragged.x;e=c-this.dragged.y;this.setCurrent(d,b,c,f);this.dragged.setCurrent(this.current,-1);this.dragGesture.add(this.dragAction,b,c,d);this.checkDragWheelAction(this.dragAction,b,c,a,e,d,1);break;case 5:this.setMouseActions(this.pressedCount,
f,!0);this.setCurrent(d,b,c,f);this.vwr.spinXYBy(0,0,0);f=!this.pressed.check(10,b,c,f,d,9223372036854775E3);this.checkReleaseAction(b,c,d,f);break;case 3:if(this.vwr.isApplet&&!this.vwr.hasFocus())break;this.setCurrent(d,this.current.x,this.current.y,f);this.checkDragWheelAction(JV.binding.Binding.getMouseAction(0,f,3),this.current.x,this.current.y,0,c,d,3);break;case 2:this.setMouseMode();this.clickedCount=1<e?e:this.clicked.check(10,0,0,f,d,700)?this.clickedCount+1:1;1==this.clickedCount&&this.setCurrent(d,
b,c,f);this.setMouseActions(this.clickedCount,f,!1);this.clicked.setCurrent(this.current,this.clickedCount);this.vwr.setFocus();if(9!=this.apm&&this.bnd(JV.binding.Binding.getMouseAction(1,f,4),[31]))break;this.clickAction=JV.binding.Binding.getMouseAction(this.clickedCount,f,2);this.checkClickAction(b,c,d,this.clickedCount)}},"~N,~N,~N,~N,~N,~N");c(b,"checkPressedAction",function(a,d,b){var c=JV.binding.Binding.getButtonMods(this.pressAction),e=this.bnd(JV.binding.Binding.getMouseAction(1,c,4),[31]);
if(0!=c){this.pressAction=this.vwr.notifyMouseClicked(a,d,this.pressAction,4);if(0==this.pressAction)return;c=JV.binding.Binding.getButtonMods(this.pressAction)}this.setMouseActions(this.pressedCount,c,!1);JU.Logger.debuggingHigh&&this.vwr.getBoolean(603979960)&&JU.Logger.debug(JV.binding.Binding.getMouseActionName(this.pressAction,!1));if(!this.isDrawOrLabelAction(this.dragAction)||!this.vwr.checkObjectDragged(-2147483648,0,a,d,this.dragAction)){this.checkUserAction(this.pressAction,a,d,0,0,b,4);
b=!1;switch(this.apm){case 32:b=this.bnd(this.clickAction,[0]);break;case 28:b=this.bnd(this.dragAction,[7,14]);break;case 26:case 36:case 37:case 27:b=this.bnd(this.dragAction,[7,14,27]);break;case 29:b=this.bnd(this.dragAction,[11,14]);break;case 30:b=this.bnd(this.dragAction,[11,14,27]);break;default:b=34==this.bondPickingMode}if(b){this.dragAtomIndex=this.vwr.findNearestAtomIndexMovable(a,d,!0);a=34==this.bondPickingMode?this.vwr.getModelkit(!1).getRotateBondIndex():-1;if(0<=this.dragAtomIndex&&
(0<=a||32==this.apm||31==this.apm))this.enterMeasurementMode(this.dragAtomIndex),this.mp.addPoint(this.dragAtomIndex,null,!1),0<=a&&this.updateModelkitBranch(a,!0);a=this.vwr.getModelkitPropertySafely("screenxy");this.mkBondPressed=null!=a&&this.pressed.inRange(10,a[0],a[1])}else this.bnd(this.pressAction,[23])?this.doPopup(a,d):this.dragSelectedMode?(this.haveSelection=!e||0<=this.vwr.findNearestAtomIndexMovable(a,d,!0))&&this.bnd(this.dragAction,[13,14])&&this.vwr.moveSelectedXY(-2147483648,0,c):
this.checkMotionRotateZoom(this.dragAction,a,0,0,!0)}},"~N,~N,~N");c(b,"checkDragWheelAction",function(a,d,b,c,e,f,j){var k=JV.binding.Binding.getButtonMods(a);if(0!=k){var g=this.vwr.notifyMouseClicked(d,b,JV.binding.Binding.getMouseAction(this.pressedCount,k,j),j);if(0==g)return;0<g&&(a=g)}if(this.isRubberBandSelect(a))this.calcRectRubberBand(),this.vwr.refresh(3,"rubberBand selection");else if(!this.checkUserAction(a,d,b,c,e,f,j))if(f=34==this.bondPickingMode?this.vwr.getModelkit(!1).getRotateBondIndex():
-1,0<=f&&(0<=this.dragAtomIndex||this.mkBondPressed||this.bnd(a,[26])))0<=this.dragAtomIndex&&this.updateModelkitBranch(f,!1),this.vwr.moveSelected(c,e,-2147483648,d,b,null,null,null,!1,!1,0<=this.dragAtomIndex?0:16);else{f=null;if(0<=this.dragAtomIndex&&2!=this.apm)switch(this.apm){case 26:this.dragSelected(a,c,e,!0);return;case 36:case 37:case 27:case 30:f=this.vwr.ms.getAtoms(37==this.apm?1094717454:1094713360,JU.BSUtil.newAndSetBit(this.dragAtomIndex)),36==this.apm&&f.and(this.vwr.getAtomBitSet("ligand"));
case 28:case 29:1==this.dragGesture.getPointCount()&&this.vwr.undoMoveActionClear(this.dragAtomIndex,2,!0);this.setMotion(13,!0);if(this.bnd(a,[27]))this.vwr.rotateSelected(this.getDegrees(c,!0),this.getDegrees(e,!1),f);else{switch(this.apm){case 36:case 37:case 27:case 30:this.vwr.selectStatus(f,!1,0,!0,!0)}this.vwr.moveAtomWithHydrogens(this.dragAtomIndex,c,e,this.bnd(a,[14])?-e:-2147483648,null,f);this.vwr.checkCoordinatesChanged(null)}return}if(0<=this.dragAtomIndex&&1==j&&this.bnd(this.clickAction,
[0])&&32==this.apm)a=this.vwr.findNearestAtomIndexMovable(d,b,!1),0<=a?(null!=this.mp?this.mp.setCount(1):this.measuresEnabled&&this.enterMeasurementMode(a),this.addToMeasurement(a,null,!0),this.mp.colix=20):null!=this.mp&&(this.mp.setCount(1),this.mp.colix=23),null!=this.mp&&(this.vwr.antialiased&&(d<<=1,b<<=1),this.mp.traceX=d,this.mp.traceY=b,this.vwr.refresh(3,"assignNew"));else if(!this.drawMode&&!this.labelMode&&this.bnd(a,[45]))this.vwr.translateXYBy(c,e);else if(this.dragSelectedMode&&this.haveSelection&&
this.bnd(a,[13,27]))d=this.vwr.bsA().nextSetBit(0),0>d||(1==this.dragGesture.getPointCount()?this.vwr.undoMoveActionClear(d,2,!0):this.vwr.moveSelected(2147483647,0,-2147483648,-2147483648,-2147483648,null,null,null,!1,!1,k),this.dragSelected(a,c,e,!1));else{if(this.isDrawOrLabelAction(a)&&(this.setMotion(13,!0),this.vwr.checkObjectDragged(this.dragged.x,this.dragged.y,d,b,a)))return;if(this.checkMotionRotateZoom(a,d,c,e,!0))this.vwr.tm.slabEnabled&&this.bnd(a,[39])?this.vwr.slabDepthByPixels(e):
this.vwr.zoomBy(e);else if(this.bnd(a,[25]))this.vwr.rotateXYBy(this.getDegrees(c,!0),this.getDegrees(e,!1));else if(this.bnd(a,[29]))0==c&&1<Math.abs(e)?(this.setMotion(8,!0),this.vwr.zoomBy(e+(0<e?-1:1))):0==e&&1<Math.abs(c)&&(this.setMotion(13,!0),this.vwr.rotateZBy(-c+(0<c?1:-1),2147483647,2147483647));else{if(this.vwr.tm.slabEnabled){if(this.bnd(a,[6])){this.vwr.depthByPixels(e);return}if(this.bnd(a,[38])){this.vwr.slabByPixels(e);return}if(this.bnd(a,[39])){this.vwr.slabDepthByPixels(e);return}}this.bnd(a,
[46])?this.zoomByFactor(e,2147483647,2147483647):this.bnd(a,[28])&&(this.setMotion(13,!0),this.vwr.rotateZBy(-c,2147483647,2147483647))}}}},"~N,~N,~N,~N,~N,~N,~N");c(b,"updateModelkitBranch",function(a,d){this.vwr.setModelkitPropertySafely(d?"branchatomclicked":"branchatomdragged",Integer.$valueOf(this.dragAtomIndex));null==this.measurementQueued||0==this.measurementQueued.numSet||null==this.mp?this.vwr.setPendingMeasurement(this.vwr.getModelkit(!1).setBondMeasure(a,this.measurementQueued=this.mp=
this.getMP())):this.measurementQueued.refresh(null)},"~N,~B");c(b,"dragSelected",function(a,d,b,c){this.setMotion(13,!0);this.bnd(a,[27])&&this.vwr.getBoolean(603979785)?this.vwr.rotateSelected(this.getDegrees(d,!0),this.getDegrees(b,!1),null):this.vwr.moveSelected(d,b,c&&this.bnd(a,[14])?-b:-2147483648,-2147483648,-2147483648,null,null,null,!0,!1,this.dragged.modifiers)},"~N,~N,~N,~B");c(b,"checkReleaseAction",function(a,d,b,c){JU.Logger.debuggingHigh&&this.vwr.getBoolean(603979960)&&JU.Logger.debug(JV.binding.Binding.getMouseActionName(this.pressAction,
!1));this.vwr.checkInMotion(0);this.vwr.setInMotion(!1);this.vwr.setCursor(0);this.dragGesture.add(this.dragAction,a,d,b);0<=this.dragAtomIndex&&!this.vwr.isModelkitPickingRotateBond()&&(29==this.apm||30==this.apm)&&this.minimize(!0);if(32==this.apm&&this.bnd(this.clickAction,[0]))null==this.mp||0>this.dragAtomIndex?this.exitMeasurementMode(null):34==this.bondPickingMode?(this.vwr.setModelkitPropertySafely("rotatebond",Integer.$valueOf(this.dragAtomIndex)),this.exitMeasurementMode(null)):this.assignNew(-1);
else if(this.dragAtomIndex=-1,this.mkBondPressed=!1,this.isRubberBandSelect(this.dragAction)&&this.selectRb(this.clickAction),this.rubberbandSelectionMode=this.b.name.equals("drag"),this.rectRubber.x=2147483647,c&&this.vwr.notifyMouseClicked(a,d,JV.binding.Binding.getMouseAction(this.pressedCount,0,5),5),this.isDrawOrLabelAction(this.dragAction))this.vwr.checkObjectDragged(2147483647,0,a,d,this.dragAction);else if(this.haveSelection&&(this.dragSelectedMode&&this.bnd(this.dragAction,[13]))&&this.vwr.moveSelectedXY(2147483647,
0,this.dragged.modifiers),(!c||!this.checkUserAction(this.pressAction,a,d,0,0,b,5))&&this.vwr.getBoolean(603979780)&&this.bnd(this.dragAction,[44]))a=this.getExitRate(),0<a&&this.vwr.spinXYBy(this.dragGesture.getDX(4,2),this.dragGesture.getDY(4,2),30*a*this.gestureSwipeFactor),this.vwr.g.logGestures&&this.vwr.log("$NOW$ swipe "+this.dragGesture+" "+a)},"~N,~N,~N,~B");c(b,"checkClickAction",function(a,d,b,c){if(1<c&&(5==this.apm||6==this.apm))this.resetMeasurement(),this.runScript("draw ID sym* delete;spin off;");
else{if(0<c){if(this.checkUserAction(this.clickAction,a,d,0,0,b,32768))return;this.clickAction=this.vwr.notifyMouseClicked(a,d,this.clickAction,32768);if(0==this.clickAction)return}JU.Logger.debuggingHigh&&this.vwr.getBoolean(603979960)&&JU.Logger.debug(JV.binding.Binding.getMouseActionName(this.clickAction,!1));if(this.bnd(this.clickAction,[2])){if(this.vwr.frankClicked(a,d)){this.vwr.popupMenu(-a,d,"j");return}if(this.vwr.frankClickedModelKit(a,d)){this.vwr.popupMenu(10,0,"m");return}}b=null;var e=
!1,f=!1,j=null;if(!this.drawMode&&(j=this.vwr.checkObjectClicked(a,d,this.clickAction),null!=j)){if(this.labelMode){this.pickLabel(j.get("atomIndex").intValue());return}e="bond".equals(j.get("type"));f="isosurface".equals(j.get("type"));b=this.getPoint(j);e&&this.vwr.isModelkitPickingRotateBond()&&this.vwr.highlightBond(j.get("index").intValue(),-1,a,d)}e&&(c=1);if(!(null!=b&&Float.isNaN(b.x))){var k=this.findNearestAtom(a,d,b,0<c);if(this.bnd(this.clickAction,[23]))this.doPopup(a,d);else if(0==c&&
32!=this.apm&&!this.vwr.isModelkitPickingRotateBond()){if(null!=this.mp){if(null!=b||0==this.mp.getIndexOf(k))try{this.mp.addPoint(k,b,!1)}catch(g){if(D(g,Exception)){this.exitMeasurementMode(null);return}throw g;}this.mp.haveModified&&this.vwr.setPendingMeasurement(this.mp);this.vwr.refresh(3,"measurementPending")}}else if(this.setMouseMode(),this.bnd(this.clickAction,[43])&&this.vwr.tm.stopMotion(),this.vwr.getBoolean(603979889)&&23==this.apm&&this.bnd(this.clickAction,[21]))this.vwr.navTranslatePercent(100*
a/this.vwr.getScreenWidth()-50,100*d/this.vwr.getScreenHeight()-50);else{if(e){if(this.bnd(this.clickAction,[34==this.bondPickingMode||33==this.bondPickingMode?0:5])){this.bondPicked(j.get("index").intValue());this.vwr.refresh(1,"bondpicked");return}}else{if(f)return;if(32!=this.apm&&null!=this.mp&&this.bnd(this.clickAction,[20])){this.atomOrPointPicked(k,b);4==this.addToMeasurement(k,b,!1)&&this.toggleMeasurement();return}if(this.bnd(this.clickAction,[37])){null!=this.mp?(this.addToMeasurement(k,
b,!0),this.toggleMeasurement()):!this.drawMode&&(!this.labelMode&&!this.dragSelectedMode&&this.measuresEnabled)&&(this.enterMeasurementMode(k),this.addToMeasurement(k,b,!0));this.atomOrPointPicked(k,b);return}}this.isSelectAction(this.clickAction)?f||this.atomOrPointPicked(k,b):this.bnd(this.clickAction,[24])&&0>k&&this.reset()}}}},"~N,~N,~N,~N");c(b,"doPopup",function(a,d){this.vwr.popupMenu(a,d,this.vwr.isModelKitOpen()?"m":"j")},"~N,~N");c(b,"pickLabel",function(a){var d=this.vwr.ms.at[a].atomPropertyString(this.vwr,
1825200146);2==this.pressedCount?(d=this.vwr.apiPlatform.prompt("Set label for atomIndex="+a,d,null,!1),null!=d&&(this.vwr.shm.setAtomLabel(d,a),this.vwr.refresh(1,"label atom"))):this.setAtomsPicked(JU.BSUtil.newAndSetBit(a),"Label picked for atomIndex = "+a+": "+d)},"~N");c(b,"checkUserAction",function(a,d,b,c,e,f,j){if(!this.b.isUserAction(a))return!1;for(var k=!1,g,s=this.b.getBindings(),m=a+"\t",p,y=s.keySet().iterator();y.hasNext()&&((p=y.next())||1);)if(0==p.indexOf(m)&&JU.AU.isAS(g=s.get(p))){var n=
g[1],q=null;if(0<=n.indexOf("_ATOM")){var u=this.findNearestAtom(d,b,null,!0),n=JU.PT.rep(n,"_ATOM","({"+(0<=u?""+u:"")+"})");0<=u&&(n=JU.PT.rep(n,"_POINT",JU.Escape.eP(this.vwr.ms.at[u])))}if(!this.drawMode&&(0<=n.indexOf("_POINT")||0<=n.indexOf("_OBJECT")||0<=n.indexOf("_BOND"))){u=this.vwr.checkObjectClicked(d,b,a);if(null!=u&&null!=(q=u.get("pt")))u.get("type").equals("bond")&&(n=JU.PT.rep(n,"_BOND","[{"+u.get("index")+"}]")),n=JU.PT.rep(n,"_POINT",JU.Escape.eP(q)),n=JU.PT.rep(n,"_OBJECT",JU.Escape.escapeMap(u));
n=JU.PT.rep(n,"_BOND","[{}]");n=JU.PT.rep(n,"_OBJECT","{}")}n=JU.PT.rep(n,"_POINT","{}");n=JU.PT.rep(n,"_ACTION",""+a);n=JU.PT.rep(n,"_X",""+d);n=JU.PT.rep(n,"_Y",""+(this.vwr.getScreenHeight()-b));n=JU.PT.rep(n,"_DELTAX",""+c);n=JU.PT.rep(n,"_DELTAY",""+e);n=JU.PT.rep(n,"_TIME",""+f);n=JU.PT.rep(n,"_MODE",""+j);n.startsWith("+:")&&(k=!0,n=n.substring(2));this.vwr.evalStringQuiet(n)}return!k},"~N,~N,~N,~N,~N,~N,~N");c(b,"checkMotionRotateZoom",function(a,d,b,c,e){d=this.bnd(a,[40])&&this.isZoomArea(this.pressed.x);
var f=this.bnd(a,[25]),j=this.bnd(a,[29]);if(!d&&!f&&!j)return!1;a=(b=j&&(0==b||Math.abs(c)>5*Math.abs(b)))||this.isZoomArea(this.moved.x)||this.bnd(a,[46])?8:f||j?13:this.bnd(a,[1])?12:0;this.setMotion(a,e);return b||d},"~N,~N,~N,~N,~B");c(b,"getExitRate",function(){var a=this.dragGesture.getTimeDifference(2);return this.isMultiTouch?80<a?0:this.dragGesture.getSpeedPixelsPerMillisecond(2,1):10<a?0:this.dragGesture.getSpeedPixelsPerMillisecond(4,2)});c(b,"isRubberBandSelect",function(a){return this.rubberbandSelectionMode&&
this.bnd(a&-8193|32768,[35,34,32])},"~N");c(b,"getRubberBand",function(){return this.rubberbandSelectionMode&&2147483647!=this.rectRubber.x?this.rectRubber:null});c(b,"calcRectRubberBand",function(){var a=this.vwr.antialiased?2:1;this.current.x<this.pressed.x?(this.rectRubber.x=this.current.x*a,this.rectRubber.width=(this.pressed.x-this.current.x)*a):(this.rectRubber.x=this.pressed.x*a,this.rectRubber.width=(this.current.x-this.pressed.x)*a);this.current.y<this.pressed.y?(this.rectRubber.y=this.current.y*
a,this.rectRubber.height=(this.pressed.y-this.current.y)*a):(this.rectRubber.y=this.pressed.y*a,this.rectRubber.height=(this.current.y-this.pressed.y)*a)});c(b,"getDegrees",function(a,d){return 180*(a/Math.min(500,d?this.vwr.getScreenWidth():this.vwr.getScreenHeight()))*this.mouseDragFactor},"~N,~B");c(b,"isZoomArea",function(a){return a>98*this.vwr.getScreenWidth()*(this.vwr.tm.stereoDoubleFull||this.vwr.tm.stereoDoubleDTI?2:1)/100},"~N");c(b,"getPoint",function(a){var d=new JU.Point3fi;d.setT(a.get("pt"));
d.mi=a.get("modelIndex").intValue();return d},"java.util.Map");c(b,"findNearestAtom",function(a,d,b,c){a=this.drawMode||null!=b?-1:this.vwr.findNearestAtomIndexMovable(a,d,!1);return 0<=a&&(c||null==this.mp)&&!this.vwr.slm.isInSelectionSubset(a)?-1:a},"~N,~N,JU.Point3fi,~B");c(b,"isSelectAction",function(a){return this.bnd(a,[17])||!this.drawMode&&!this.labelMode&&1==this.apm&&this.bnd(a,[1])||this.dragSelectedMode&&this.bnd(this.dragAction,[27,13])||this.bnd(a,[22,35,32,34,36,30])},"~N");c(b,"enterMeasurementMode",
function(a){this.vwr.setPicked(a,!0);this.vwr.setCursor(1);this.vwr.setPendingMeasurement(this.mp=this.getMP());this.measurementQueued=this.mp},"~N");c(b,"getMP",function(){return J.api.Interface.getInterface("JM.MeasurementPending",this.vwr,"mouse").set(this.vwr.ms)});c(b,"addToMeasurement",function(a,d,b){if(-1==a&&null==d||null==this.mp)return this.exitMeasurementMode(null),0;var c=this.mp.count;-2147483648!=this.mp.traceX&&2==c&&this.mp.setCount(c=1);return 4==c&&!b?c:this.mp.addPoint(a,d,!0)},
"~N,JU.Point3fi,~B");c(b,"resetMeasurement",function(){this.exitMeasurementMode(null);this.measurementQueued=this.getMP()});c(b,"exitMeasurementMode",function(a){null!=this.mp&&(this.vwr.setPendingMeasurement(this.mp=null),this.vwr.setCursor(0),null!=a&&this.vwr.refresh(3,a))},"~S");c(b,"getSequence",function(){var a=this.measurementQueued.getAtomIndex(1),d=this.measurementQueued.getAtomIndex(2);if(!(0>a||0>d))try{var b=this.vwr.getSmilesOpt(null,a,d,1048576,null);this.vwr.setStatusMeasuring("measureSequence",
-2,b,0)}catch(c){if(D(c,Exception))JU.Logger.error(c.toString());else throw c;}});c(b,"minimize",function(a){var d=this.dragAtomIndex;a&&(this.dragAtomIndex=-1,this.mkBondPressed=!1);this.vwr.dragMinimizeAtom(d)},"~B");c(b,"queueAtom",function(a,d){var b=this.measurementQueued.addPoint(a,d,!0);0<=a&&this.vwr.setStatusAtomPicked(a,"Atom #"+b+":"+this.vwr.getAtomInfo(a),null,!1);return b},"~N,JU.Point3fi");c(b,"setMotion",function(a,d){switch(this.vwr.currentCursor){case 3:break;default:this.vwr.setCursor(a)}d&&
this.vwr.setInMotion(!0)},"~N,~B");c(b,"zoomByFactor",function(a,d,b){0!=a&&(this.setMotion(8,!0),this.vwr.zoomByFactor(Math.pow(this.mouseWheelFactor,a),d,b),this.moved.setCurrent(this.current,0),this.vwr.setInMotion(!0),this.zoomTrigger=!0,this.startHoverWatcher(!0))},"~N,~N,~N");c(b,"runScript",function(a){this.vwr.evalStringGUI(a)},"~S");c(b,"atomOrPointPicked",function(a,d){if(0>a){this.resetMeasurement();if(this.bnd(this.clickAction,[33])){this.runScript("select none");return}if(5!=this.apm&&
6!=this.apm)return}var b=2;switch(this.apm){case 28:case 29:return;case 0:return;case 25:case 24:case 8:var b=8==this.apm,c=25==this.apm;if(!this.bnd(this.clickAction,[b?5:3]))return;if(null==this.measurementQueued||0==this.measurementQueued.count||2<this.measurementQueued.count)this.resetMeasurement(),this.enterMeasurementMode(a);this.addToMeasurement(a,d,!0);if(2!=this.queueAtom(a,d))return;b=b||this.measurementQueued.isConnected(this.vwr.ms.at,2)?" DELETE":c?"STRUTS":"";this.runScript("connect "+
this.measurementQueued.getMeasurementScript(" ",!0)+b);this.resetMeasurement();return;case 21:b++;case 20:b++;case 18:case 19:case 22:if(!this.bnd(this.clickAction,[20]))return;if(null==this.measurementQueued||0==this.measurementQueued.count||this.measurementQueued.count>b)this.resetMeasurement(),this.enterMeasurementMode(a);this.addToMeasurement(a,d,!0);this.queueAtom(a,d);c=this.measurementQueued.count;1==c&&this.vwr.setPicked(a,!0);if(c<b)return;22==this.apm?this.getSequence():(this.vwr.setStatusMeasuring("measurePicked",
b,this.measurementQueued.getStringDetail(),this.measurementQueued.value),(18==this.apm||4==this.pickingStyleMeasure)&&this.runScript("measure "+this.measurementQueued.getMeasurementScript(" ",!0)));this.resetMeasurement();return}b=null!=this.mp&&1!=this.apm?1:this.apm;switch(b){case 3:if(!this.bnd(this.clickAction,[17]))return;null==d?this.zoomTo(a):this.runScript("zoomTo "+JU.Escape.eP(d));return;case 5:case 6:if(this.bnd(this.clickAction,[17])){this.checkTwoAtomAction(d,a);return}}if(null==d){switch(b){case 1:!this.drawMode&&
!this.labelMode&&this.bnd(this.clickAction,[1])?this.zoomTo(a):this.bnd(this.clickAction,[17])&&this.vwr.setStatusAtomPicked(a,null,null,!1);return;case 2:this.bnd(this.clickAction,[19])&&(this.runScript("set labeltoggle {atomindex="+a+"}"),this.pickLabel(a));return;case 31:this.bnd(this.clickAction,[0])&&(this.vwr.invertAtomCoord(null,null,null,a,!0),this.vwr.setStatusAtomPicked(a,"invert stereo for atomIndex="+a,null,!1));return;case 7:this.bnd(this.clickAction,[4])&&(b=JU.BSUtil.newAndSetBit(a),
this.vwr.deleteAtoms(b,!1),this.vwr.setStatusAtomPicked(a,"deleted: "+JU.Escape.eBS(b),null,!1));return}b="atomindex="+a;switch(this.apm){default:return;case 9:this.selectAtoms(b);break;case 10:this.selectAtoms("within(group, "+b+")");break;case 11:this.selectAtoms("within(chain, "+b+")");break;case 13:this.selectAtoms("within(polymer, "+b+")");break;case 14:this.selectAtoms("within(structure, "+b+")");break;case 12:this.selectAtoms("within(molecule, "+b+")");break;case 16:this.selectAtoms("within(model, "+
b+")");break;case 17:this.selectAtoms("visible and within(element, "+b+")");break;case 15:this.selectAtoms("visible and within(site, "+b+")")}this.vwr.clearClickCount();this.vwr.setStatusAtomPicked(a,null,null,!1)}},"~N,JU.Point3fi");c(b,"assignNew",function(a){0>a?this.vwr.getModelkit(!1).handleAssignNew(this.pressed,this.dragged,this.mp,this.dragAtomIndex,a)||this.exitMeasurementMode("bond dropped"):this.vwr.getModelkit(!1).handleAssignNew(this.current,this.current,null,this.dragAtomIndex,a);this.exitMeasurementMode(null)},
"~N");c(b,"bondPicked",function(a){switch(this.bondPickingMode){case 33:this.vwr.undoMoveActionClear(-1,4146,!0);this.vwr.getModelkit(!1).setProperty("assignbond",Integer.$valueOf(a));break;case 8:this.vwr.deleteBonds(JU.BSUtil.newAndSetBit(a))}},"~N");c(b,"checkTwoAtomAction",function(a,d){var b=5==this.apm,c=6==this.apm;if(b||c)if(this.vwr.tm.spinOn||this.vwr.tm.navOn||null!=this.vwr.getPendingMeasurement())this.resetMeasurement(),this.vwr.tm.spinOn&&this.runScript("spin off");else{2<=this.measurementQueued.count&&
this.resetMeasurement();var e=this.measurementQueued.count;if(1==e)if(null==a){if(this.measurementQueued.getAtomIndex(1)==d)return}else if(0==this.measurementQueued.getAtom(1).distance(a))return;if(b||c){if(0<=d||null!=a)e=this.queueAtom(d,a);2>e?b?this.vwr.scriptStatus(1==e?J.i18n.GT.$("pick one more atom in order to spin the model around an axis"):J.i18n.GT.$("pick two atoms in order to spin the model around an axis")):this.vwr.scriptStatus(1==e?J.i18n.GT.$("pick one more atom in order to display the symmetry relationship"):
J.i18n.GT.$("pick two atoms in order to display the symmetry relationship between them")):(c=this.measurementQueued.getMeasurementScript(" ",!1),this.resetMeasurement(),b?this.runScript("spin"+c+" "+this.vwr.getInt(553648157)):this.runScript("draw symop "+c+";print 'all:';show symop "+c))}}},"JU.Point3fi,~N");c(b,"reset",function(){this.runScript("!reset")});c(b,"selectAtoms",function(a){if(!(null!=this.mp||this.selectionWorking)){this.selectionWorking=!0;var d=this.rubberbandSelectionMode||this.bnd(this.clickAction,
[35])?"selected and not ("+a+") or (not selected) and ":this.bnd(this.clickAction,[32])?"selected and not ":this.bnd(this.clickAction,[34])?"selected or ":0==this.clickAction||this.bnd(this.clickAction,[36])?"selected tog ":this.bnd(this.clickAction,[30])?"":null;if(null!=d)try{var b=this.vwr.getAtomBitSetEval(null,d+("("+a+")"));this.setAtomsPicked(b,"selected: "+JU.Escape.eBS(b));this.vwr.refresh(3,"selections set")}catch(c){if(!D(c,Exception))throw c;}this.selectionWorking=!1}},"~S");c(b,"setAtomsPicked",
function(a,d){this.vwr.selectStatus(a,!1,0,!1,!0);this.vwr.setStatusAtomPicked(-1,d,null,!1)},"JU.BS,~S");c(b,"selectRb",function(a){var d=this.vwr.ms.findAtomsInRectangle(this.rectRubber);0<d.length()&&(d=JU.Escape.eBS(d),this.bnd(a,[34])?this.runScript("selectionHalos on;select selected or "+d):this.bnd(a,[32])?this.runScript("selectionHalos on;select selected and not "+d):this.runScript("selectionHalos on;select selected tog "+d));this.vwr.refresh(3,"mouseReleased")},"~N");c(b,"toggleMeasurement",
function(){if(null!=this.mp){var a=this.mp.count;2<=a&&4>=a&&this.runScript("!measure "+this.mp.getMeasurementScript(" ",!0));this.exitMeasurementMode(null)}});c(b,"zoomTo",function(a){this.runScript("zoomTo (atomindex="+a+")");this.vwr.setStatusAtomPicked(a,null,null,!1)},"~N");c(b,"userActionEnabled",function(a){return this.vwr.isFunction(JV.ActionManager.getActionName(a).toLowerCase())},"~N");c(b,"userAction",function(a,d){if(!this.userActionEnabled(a))return!1;var b=JS.ScriptEval.runUserAction(JV.ActionManager.getActionName(a),
d,this.vwr);return!JS.SV.vF.equals(b)},"~N,~A");b.actionInfo=Array(47);b.actionNames=Array(47);JV.ActionManager.pickingModeNames="off identify label center draw spin symmetry deleteatom deletebond atom group chain molecule polymer structure site model element measure distance angle torsion sequence navigate connect struts dragselected dragmolecule dragatom dragminimize dragminimizemolecule invertstereo assignatom assignbond rotatebond identifybond dragligand dragmodel symop".$plit(" ");JV.ActionManager.pickingStyleNames=
"toggle selectOrToggle extendedSelect drag measure measureoff".$plit(" ");b=w(function(){this.time=this.y=this.x=this.index=0;q(this,arguments)},JV,"MotionPoint",null);c(b,"set",function(a,d,b,c){this.index=a;this.x=d;this.y=b;this.time=c},"~N,~N,~N,~N");g(b,"toString",function(){return"[x = "+this.x+" y = "+this.y+" time = "+this.time+" ]"});b=w(function(){this.action=0;this.nodes=null;this.time0=this.ptNext=0;this.vwr=null;q(this,arguments)},JV,"Gesture",null);x(b,function(a,d){this.vwr=d;this.nodes=
Array(a);for(var b=0;b<a;b++)this.nodes[b]=new JV.MotionPoint},"~N,JV.Viewer");c(b,"setAction",function(a,d){this.action=a;this.ptNext=0;this.time0=d;for(var b=0;b<this.nodes.length;b++)this.nodes[b].index=-1},"~N,~N");c(b,"add",function(a,d,b,c){this.action=a;this.getNode(this.ptNext).set(this.ptNext,d,b,c-this.time0);this.ptNext++;return this.ptNext},"~N,~N,~N,~N");c(b,"getTimeDifference",function(a){a=this.getPointCount2(a,0);if(2>a)return 0;var d=this.getNode(this.ptNext-1);a=this.getNode(this.ptNext-
a);return d.time-a.time},"~N");c(b,"getSpeedPixelsPerMillisecond",function(a,d){a=this.getPointCount2(a,d);if(2>a)return 0;var b=this.getNode(this.ptNext-1-d),c=this.getNode(this.ptNext-a-d),e=360*((b.x-c.x)/this.vwr.getScreenWidth()),f=360*((b.y-c.y)/this.vwr.getScreenHeight());return Math.sqrt(e*e+f*f)/(b.time-c.time)},"~N,~N");c(b,"getDX",function(a,d){a=this.getPointCount2(a,d);if(2>a)return 0;var b=this.getNode(this.ptNext-1-d),c=this.getNode(this.ptNext-a-d);return b.x-c.x},"~N,~N");c(b,"getDY",
function(a,d){a=this.getPointCount2(a,d);if(2>a)return 0;var b=this.getNode(this.ptNext-1-d),c=this.getNode(this.ptNext-a-d);return b.y-c.y},"~N,~N");c(b,"getPointCount",function(){return this.ptNext});c(b,"getPointCount2",function(a,d){a>this.nodes.length-d&&(a=this.nodes.length-d);for(var b=a+1;0<=--b&&!(0<=this.getNode(this.ptNext-b-d).index););return b},"~N,~N");c(b,"getNode",function(a){return this.nodes[(a+this.nodes.length+this.nodes.length)%this.nodes.length]},"~N");g(b,"toString",function(){return 0==
this.nodes.length?""+this:JV.binding.Binding.getMouseActionName(this.action,!1)+" nPoints = "+this.ptNext+" "+this.nodes[0]})});n("JV");z(["JU.BS"],"JV.AnimationManager",["J.api.Interface","JU.BSUtil"],function(){var b=w(function(){this.vwr=this.animationThread=null;this.animationOn=!1;this.lastFrameDelayMs=this.firstFrameDelayMs=this.animationFps=0;this.bsVisibleModels=null;this.animationReplayMode=1073742070;this.animationFrames=this.bsDisplay=null;this.animationPaused=this.isMovie=!1;this.morphCount=
this.caf=this.cmi=0;this.currentDirection=this.animationDirection=1;this.frameStep=this.lastFrameIndex=this.firstFrameIndex=0;this.backgroundModelIndex=-1;this.firstFrameDelay=this.currentMorphModel=0;this.lastFrameDelay=1;this.intAnimThread=this.lastModelPainted=this.lastFramePainted=0;this.cai=-1;q(this,arguments)},JV,"AnimationManager",null);N(b,function(){this.bsVisibleModels=new JU.BS});x(b,function(a){this.vwr=a},"JV.Viewer");c(b,"setAnimationOn",function(a){a!=this.animationOn&&(!a||this.vwr.headless?
this.stopThread(!1):(this.vwr.tm.spinOn||this.vwr.refresh(3,"Anim:setAnimationOn"),this.setAnimationRange(-1,-1),this.resumeAnimation()))},"~B");c(b,"stopThread",function(a){var d=!1;null!=this.animationThread&&(this.animationThread.interrupt(),this.animationThread=null,d=!0);this.animationPaused=a;d&&!this.vwr.tm.spinOn&&this.vwr.refresh(3,"Viewer:setAnimationOff");this.animation(!1);this.vwr.setStatusFrameChanged(!1,!1)},"~B");c(b,"setAnimationNext",function(){return this.setAnimationRelative(this.animationDirection)});
c(b,"currentIsLast",function(){return this.isMovie?this.lastFramePainted==this.caf:this.lastModelPainted==this.cmi});c(b,"currentFrameIs",function(a){var d=this.cmi;return 0==this.morphCount?d==a:0.001>Math.abs(this.currentMorphModel-a)},"~N");c(b,"clear",function(){this.setMovie(null);this.initializePointers(0);this.setAnimationOn(!1);this.setModel(0,!0);this.currentDirection=1;this.cai=-1;this.setAnimationDirection(1);this.setAnimationFps(10);this.setAnimationReplayMode(1073742070,0,0);this.initializePointers(0)});
c(b,"getModelSpecial",function(a){switch(a){case -1:if(null!=this.animationFrames)return"1";a=this.firstFrameIndex;break;case 0:if(0<this.morphCount)return"-"+(1+this.currentMorphModel);a=this.cmi;break;case 1:if(null!=this.animationFrames)return""+this.animationFrames.length;a=this.lastFrameIndex}return this.vwr.getModelNumberDotted(a)},"~N");c(b,"setDisplay",function(a){this.bsDisplay=null==a||a.isEmpty()?null:JU.BSUtil.copy(a)},"JU.BS");c(b,"setMorphCount",function(a){this.morphCount=this.isMovie?
0:a},"~N");c(b,"morph",function(a){var d=F(a);0.001>Math.abs(d-a)?a=d:0.999<Math.abs(d-a)&&(a=d+=1);a-=d;d-=1;if(0==a)this.currentMorphModel=d,this.setModel(d,!0);else{var b;this.setModel(d,!0);b=d+1;this.currentMorphModel=d+a;b==d||(0>b||0>d)||this.vwr.ms.morphTrajectories(d,b,a)}},"~N");c(b,"setModel",function(a,d){0>a&&this.stopThread(!1);var b=this.cmi,c=this.vwr.ms,e=null==c?0:c.mc;if(1==e)this.cmi=a=0;else if(0>a||a>=e)a=-1;var c=null,f=!1;if(this.cmi!=a){if(0<e){var e=this.vwr.ms,j=e.isJmolDataFrameForModel(a),
k=e.isJmolDataFrameForModel(this.cmi);k&&e.setJmolDataFrame(null,-1,this.cmi);-1!=this.cmi&&this.vwr.saveModelOrientation();if(k||j)c=e.getJmolFrameType(a)+" "+a+" <--  "+this.cmi+" "+e.getJmolFrameType(this.cmi),f=e.getJmolDataSourceFrame(a)==e.getJmolDataSourceFrame(this.cmi)}this.cmi=a;null!=c&&(0<=a&&this.vwr.restoreModelOrientation(a),f&&(0<=c.indexOf("quaternion")||0>c.indexOf("plot")&&0>c.indexOf("ramachandran")&&0>c.indexOf(" property "))&&this.vwr.restoreModelRotation(b))}this.setViewer(d)},
"~N,~B");c(b,"setBackgroundModelIndex",function(a){var d=this.vwr.ms;if(null==d||0>a||a>=d.mc)a=-1;this.backgroundModelIndex=a;0<=a&&this.vwr.ms.setTrajectory(a);this.vwr.setTainted(!0);this.setFrameRangeVisible()},"~N");c(b,"initializePointers",function(a){this.firstFrameIndex=0;this.lastFrameIndex=(0==a?0:this.getFrameCount())-1;this.frameStep=a;this.vwr.setFrameVariables()},"~N");c(b,"setAnimationDirection",function(a){this.animationDirection=a},"~N");c(b,"setAnimationFps",function(a){1>a&&(a=
1);50<a&&(a=50);this.animationFps=a;this.vwr.setFrameVariables()},"~N");c(b,"setAnimationReplayMode",function(a,d,b){this.firstFrameDelay=0<d?d:0;this.firstFrameDelayMs=F(1E3*this.firstFrameDelay);this.lastFrameDelay=0<b?b:0;this.lastFrameDelayMs=F(1E3*this.lastFrameDelay);this.animationReplayMode=a;this.vwr.setFrameVariables()},"~N,~N,~N");c(b,"setAnimationRange",function(a,d){var b=this.getFrameCount();0>a&&(a=0);0>d&&(d=b);a>=b&&(a=b-1);d>=b&&(d=b-1);this.currentMorphModel=this.firstFrameIndex=
a;this.lastFrameIndex=d;this.frameStep=d<a?-1:1;this.rewindAnimation()},"~N,~N");c(b,"pauseAnimation",function(){this.stopThread(!0)});c(b,"reverseAnimation",function(){this.currentDirection=-this.currentDirection;this.animationOn||this.resumeAnimation()});c(b,"repaintDone",function(){this.lastModelPainted=this.cmi;this.lastFramePainted=this.caf});c(b,"resumeAnimation",function(){0>this.cmi&&this.setAnimationRange(this.firstFrameIndex,this.lastFrameIndex);1>=this.getFrameCount()?this.animation(!1):
(this.animation(!0),this.animationPaused=!1,null==this.animationThread&&(this.intAnimThread++,this.animationThread=J.api.Interface.getOption("thread.AnimationThread",this.vwr,"script"),this.animationThread.setManager(this,this.vwr,E(-1,[this.firstFrameIndex,this.lastFrameIndex,this.intAnimThread])),this.animationThread.start()))});c(b,"setAnimationLast",function(){this.setFrame(0<this.animationDirection?this.lastFrameIndex:this.firstFrameIndex)});c(b,"rewindAnimation",function(){this.setFrame(0<this.animationDirection?
this.firstFrameIndex:this.lastFrameIndex);this.currentDirection=1;this.vwr.setFrameVariables()});c(b,"setAnimationPrevious",function(){return this.setAnimationRelative(-this.animationDirection)});c(b,"getAnimRunTimeSeconds",function(){var a=this.getFrameCount();if(this.firstFrameIndex==this.lastFrameIndex||0>this.lastFrameIndex||0>this.firstFrameIndex||this.lastFrameIndex>=a||this.firstFrameIndex>=a)return 0;for(var d=Math.min(this.firstFrameIndex,this.lastFrameIndex),a=Math.max(this.firstFrameIndex,
this.lastFrameIndex),b=1*(a-d)/this.animationFps+this.firstFrameDelay+this.lastFrameDelay;d<=a;d++)b+=this.vwr.ms.getFrameDelayMs(this.modelIndexForFrame(d))/1E3;return b});c(b,"setMovie",function(a){if(this.isMovie=null!=a&&null==a.get("scripts")){this.animationFrames=a.get("frames");if(null==this.animationFrames||0==this.animationFrames.length)this.isMovie=!1;else if(this.caf=a.get("currentFrame").intValue(),0>this.caf||this.caf>=this.animationFrames.length)this.caf=0;this.setFrame(this.caf)}this.isMovie||
(this.animationFrames=null);this.vwr.setBooleanProperty("_ismovie",this.isMovie);this.bsDisplay=null;this.currentMorphModel=this.morphCount=0;this.vwr.setFrameVariables()},"java.util.Map");c(b,"modelIndexForFrame",function(a){return this.isMovie?this.animationFrames[a]-1:a},"~N");c(b,"getFrameCount",function(){return this.isMovie?this.animationFrames.length:this.vwr.ms.mc});c(b,"setFrame",function(a){try{if(this.isMovie){var d=this.modelIndexForFrame(a);this.caf=a;a=d}else this.caf=a;this.setModel(a,
!0)}catch(b){if(!D(b,Exception))throw b;}},"~N");c(b,"getUnitCellAtomIndex",function(){return this.cai});c(b,"setUnitCellAtomIndex",function(a){this.cai=a},"~N");c(b,"setViewer",function(a){this.vwr.ms.setTrajectory(this.cmi);this.vwr.tm.setFrameOffset(this.cmi);-1==this.cmi&&a&&this.setBackgroundModelIndex(-1);this.vwr.setTainted(!0);a=this.setFrameRangeVisible();this.vwr.setStatusFrameChanged(!1,!1);this.vwr.g.selectAllModels||this.setSelectAllSubset(2>a)},"~B");c(b,"setSelectAllSubset",function(a){null!=
this.vwr.ms&&this.vwr.slm.setSelectionSubset(a?this.vwr.ms.getModelAtomBitSetIncludingDeleted(this.cmi,!0):this.vwr.ms.getModelAtomBitSetIncludingDeletedBs(this.bsVisibleModels))},"~B");c(b,"setFrameRangeVisible",function(){var a=0;this.bsVisibleModels.clearAll();0<=this.backgroundModelIndex&&(this.bsVisibleModels.set(this.backgroundModelIndex),a=1);if(0<=this.cmi)return this.bsVisibleModels.set(this.cmi),++a;if(0==this.frameStep)return a;for(var d=0,a=0,b=this.firstFrameIndex;b!=this.lastFrameIndex;b+=
this.frameStep){var c=this.modelIndexForFrame(b);this.vwr.ms.isJmolDataFrameForModel(c)||(this.bsVisibleModels.set(c),a++,d=b)}c=this.modelIndexForFrame(this.lastFrameIndex);if(this.firstFrameIndex==this.lastFrameIndex||!this.vwr.ms.isJmolDataFrameForModel(c)||0==a)this.bsVisibleModels.set(c),0==a&&(this.firstFrameIndex=this.lastFrameIndex),a=0;1==a&&0>this.cmi&&this.setFrame(d);return a});c(b,"animation",function(a){this.animationOn=a;this.vwr.setBooleanProperty("_animating",a)},"~B");c(b,"setAnimationRelative",
function(a){a=this.getFrameStep(a);var d=(this.isMovie?this.caf:this.cmi)+a,b=0,c=0,e;0<this.morphCount?(b=1/(this.morphCount+1),c=this.currentMorphModel+a*b,e=this.isNotInRange(c)):e=this.isNotInRange(d);if(e)switch(this.animationReplayMode){case 1073742070:return!1;case 528411:c=d=this.animationDirection==this.currentDirection?this.firstFrameIndex:this.lastFrameIndex;break;case 1073742082:this.currentDirection=-this.currentDirection,d-=2*a,c-=2*a*b}if(1>this.morphCount){if(0>d||d>=this.getFrameCount())return!1;
this.setFrame(d);return!0}this.morph(c+1);return!0},"~N");c(b,"isNotInRange",function(a){var d=a-0.001;return d>this.firstFrameIndex&&d>this.lastFrameIndex||(d=a+0.001)<this.firstFrameIndex&&d<this.lastFrameIndex},"~N");c(b,"getFrameStep",function(a){return this.frameStep*a*this.currentDirection},"~N")});n("JV.binding");z(["java.util.Hashtable"],"JV.binding.Binding","java.util.Arrays JU.AU $.Lst $.PT $.SB J.api.Interface JU.Escape $.Logger".split(" "),function(){var b=w(function(){this.bindings=this.name=
null;q(this,arguments)},JV.binding,"Binding",null);N(b,function(){this.bindings=new java.util.Hashtable});x(b,function(){});b.getMouseAction=c(b,"getMouseAction",function(a,d,b){2<a&&(a=2);switch(a){case 0:break;case 1:a=256;break;default:a=512}switch(b){case 4:b=4096;break;case 1:b=8192;break;case 5:b=16384;break;case 2:b=32768;break;case 3:b=32}return d&63|a|b},"~N,~N,~N");b.getMouseActionStr=c(b,"getMouseActionStr",function(a){if(null==a)return 0;var d=0;a=a.toUpperCase();d=0<=a.indexOf("MIDDLE")?
8:0<=a.indexOf("RIGHT")?4:0<=a.indexOf("WHEEL")?32:16;0<=a.indexOf("DOWN")?d|=4096:0<=a.indexOf("DRAG")?d|=8192:0<=a.indexOf("UP")?d|=16384:32!=d&&(d|=32768);32!=d&&0<=a.indexOf("DOUBLE")?d|=512:0<d&&(d|=256);288!=d&&0<=a.indexOf("ALT")&&(d|=8);0<=a.indexOf("CTRL")&&(d|=2);0<=a.indexOf("SHIFT")&&(d|=1);return d},"~S");b.getButtonMods=c(b,"getButtonMods",function(a){return a&63},"~N");b.getClickCount=c(b,"getClickCount",function(a){return(a&768)>>8},"~N");b.getMouseActionName=c(b,"getMouseActionName",
function(a,d){var b=new JU.SB;if(0==a)return"";var c=JV.binding.Binding.includes(a,8)&&!JV.binding.Binding.includes(a,16)&&!JV.binding.Binding.includes(a,4),e="      ".toCharArray();JV.binding.Binding.includes(a,2)&&(b.append("CTRL+"),e[5]="C");!c&&JV.binding.Binding.includes(a,8)&&(b.append("ALT+"),e[4]="A");JV.binding.Binding.includes(a,1)&&(b.append("SHIFT+"),e[3]="S");JV.binding.Binding.includes(a,16)?(e[2]="L",b.append("LEFT")):JV.binding.Binding.includes(a,4)?(e[2]="R",b.append("RIGHT")):c?
(e[2]="M",b.append("MIDDLE")):JV.binding.Binding.includes(a,32)&&(e[2]="W",b.append("WHEEL"));JV.binding.Binding.includes(a,512)&&(b.append("+double"),e[1]="2");JV.binding.Binding.includes(a,4096)?(b.append("+down"),e[0]="1"):JV.binding.Binding.includes(a,8192)?(b.append("+drag"),e[0]="2"):JV.binding.Binding.includes(a,16384)?(b.append("+up"),e[0]="3"):JV.binding.Binding.includes(a,32768)&&(b.append("+click"),e[0]="4");return d?String.instantialize(e)+":"+b.toString():b.toString()},"~N,~B");c(b,"getBindings",
function(){return this.bindings});c(b,"bindAction",function(a,d){this.addBinding(a+"\t"+d,E(-1,[a,d]))},"~N,~N");c(b,"bindName",function(a,d){this.addBinding(a+"\t",Boolean.TRUE);this.addBinding(a+"\t"+d,u(-1,[JV.binding.Binding.getMouseActionName(a,!1),d]))},"~N,~S");c(b,"unbindAction",function(a,d){0==a?this.unbindJmolAction(d):this.removeBinding(null,a+"\t"+d)},"~N,~N");c(b,"unbindName",function(a,d){null==d?this.unbindMouseAction(a):this.removeBinding(null,a+"\t"+d)},"~N,~S");c(b,"unbindJmolAction",
function(a){var d=this.bindings.keySet().iterator();for(a="\t"+a;d.hasNext();){var b=d.next();b.endsWith(a)&&this.removeBinding(d,b)}},"~N");c(b,"addBinding",function(a,d){JU.Logger.debugging&&JU.Logger.debug("adding binding "+a+"\t==\t"+JU.Escape.e(d));this.bindings.put(a,d)},"~S,~O");c(b,"removeBinding",function(a,d){JU.Logger.debugging&&JU.Logger.debug("removing binding "+d);null==a?this.bindings.remove(d):a.remove()},"java.util.Iterator,~S");c(b,"unbindUserAction",function(a){var d=this.bindings.keySet().iterator();
for(a="\t"+a;d.hasNext();){var b=d.next();b.endsWith(a)&&this.removeBinding(d,b)}},"~S");c(b,"unbindMouseAction",function(a){var d=this.bindings.keySet().iterator();for(a+="\t";d.hasNext();){var b=d.next();b.startsWith(a)&&this.removeBinding(d,b)}},"~N");c(b,"isBound",function(a,d){return this.bindings.containsKey(a+"\t"+d)},"~N,~N");c(b,"isUserAction",function(a){return this.bindings.containsKey(a+"\t")},"~N");c(b,"getBindingInfo",function(a,d,b){var c=new JU.SB;b=null==b||b.equalsIgnoreCase("all")?
null:b.toLowerCase();for(var e=Array(a.length),f=new JU.Lst,j,k=this.bindings.values().iterator();k.hasNext()&&((j=k.next())||1);)if(!C(j,Boolean))if(JU.AU.isAS(j)){var g=j[0],s=j[1];(null==b||0<=b.indexOf("user")||0<=g.indexOf(b)||0<=s.indexOf(b))&&f.addLast(j)}else s=j,g=s[1],null==e[g]&&(e[g]=new JU.Lst),s=JV.binding.Binding.getMouseActionName(s[0],!0),(null==b||0<=(d[g]+";"+a[g]+";"+s).toLowerCase().indexOf(b))&&e[g].addLast(s);for(g=0;g<a.length;g++){var m;null==e[g]||0==(m=e[g].size())||this.addInfo(c,
e[g].toArray(Array(m)),d[g],a[g])}for(g=0;g<f.size();g++)s=f.get(g),this.addInfo(c,u(-1,["USER:::"+s[0]]),"user-defined",s[1]);return c.toString()},"~A,~A,~S");c(b,"addInfo",function(a,b,c,r){java.util.Arrays.sort(b);JU.PT.leftJustify(a,"                      ",c);a.append("\t");c="";for(var e=a.length(),f=0;f<b.length;f++)a.append(c).append(b[f].substring(7)),c=", ";e=a.length()-e;20>e&&a.append("                 ".substring(0,20-e));a.append("\t").append(r).appendC("\n")},"JU.SB,~A,~S,~S");b.includes=
c(b,"includes",function(a,b){return(a&b)==b},"~N,~N");b.newBinding=c(b,"newBinding",function(a,b){return J.api.Interface.getInterface("JV.binding."+b+"Binding",a,"script")},"JV.Viewer,~S")});n("JV.binding");z(["JV.binding.JmolBinding"],"JV.binding.DragBinding",null,function(){var b=G(JV.binding,"DragBinding",JV.binding.JmolBinding);x(b,function(){I(this,JV.binding.DragBinding,[]);this.set("drag")});g(b,"setSelectBindings",function(){this.bindAction(33040,30);this.bindAction(33041,35);this.bindAction(33048,
34);this.bindAction(33049,32);this.bindAction(4368,31);this.bindAction(8464,13);this.bindAction(33040,17)})});n("JV.binding");z(["JV.binding.Binding"],"JV.binding.JmolBinding",null,function(){var b=G(JV.binding,"JmolBinding",JV.binding.Binding);x(b,function(){I(this,JV.binding.JmolBinding,[]);this.set("toggle")});c(b,"set",function(a){this.name=a;this.setGeneralBindings();this.setSelectBindings()},"~S");c(b,"setSelectBindings",function(){this.bindAction(33296,30);this.bindAction(33040,36)});c(b,"setGeneralBindings",
function(){this.bindAction(8474,45);this.bindAction(8454,45);this.bindAction(8721,45);this.bindAction(8712,45);this.bindAction(8464,25);this.bindAction(8720,25);this.bindAction(8472,28);this.bindAction(8453,28);this.bindAction(8465,29);this.bindAction(8456,29);this.bindAction(288,46);this.bindAction(8464,40);this.bindAction(8464,16);this.bindAction(4370,23);this.bindAction(4356,23);this.bindAction(33040,2);this.bindAction(8467,38);this.bindAction(8723,6);this.bindAction(8475,39);this.bindAction(290,
46);this.bindAction(289,46);this.bindAction(291,46);this.bindAction(290,38);this.bindAction(289,6);this.bindAction(291,39);this.bindAction(8464,44);this.bindAction(8464,41);this.bindAction(8465,42);this.bindAction(8473,13);this.bindAction(8465,14);this.bindAction(8472,27);this.bindAction(8465,26);this.bindAction(8464,10);this.bindAction(8472,9);this.bindAction(8465,8);this.bindAction(33297,24);this.bindAction(33288,24);this.bindAction(33296,43);this.bindAction(8464,7);this.bindAction(8464,11);this.bindAction(8464,
12);this.bindAction(33040,17);this.bindAction(33040,22);this.bindAction(33040,19);this.bindAction(33040,20);this.bindAction(33296,37);this.bindAction(33040,18);this.bindAction(33043,21);this.bindAction(33040,4);this.bindAction(33040,5);this.bindAction(33040,3);this.bindAction(33040,0);this.bindAction(33043,1)})});n("JV");z(null,"JV.ColorManager","JU.AU J.c.PAL JU.C $.ColorEncoder $.Elements $.Logger JV.JC".split(" "),function(){var b=w(function(){this.colorData=this.altArgbsCpk=this.argbsCpk=this.g3d=
this.vwr=this.ce=null;this.isDefaultColorRasmol=!1;this.colixRubberband=22;this.colixBackgroundContrast=0;q(this,arguments)},JV,"ColorManager",null);x(b,function(a,b){this.vwr=a;this.ce=new JU.ColorEncoder(null,a);this.g3d=b;this.argbsCpk=J.c.PAL.argbsCpk;this.altArgbsCpk=JU.AU.arrayCopyRangeI(JV.JC.altArgbsCpk,0,-1)},"JV.Viewer,JU.GData");c(b,"setDefaultColors",function(a){a?(this.isDefaultColorRasmol=!0,this.argbsCpk=JU.AU.arrayCopyI(JU.ColorEncoder.getRasmolScale(),-1)):(this.isDefaultColorRasmol=
!1,this.argbsCpk=J.c.PAL.argbsCpk);this.altArgbsCpk=JU.AU.arrayCopyRangeI(JV.JC.altArgbsCpk,0,-1);this.ce.createColorScheme(a?"Rasmol=":"Jmol=",!0,!0);for(a=J.c.PAL.argbsCpk.length;0<=--a;)this.g3d.changeColixArgb(a,this.argbsCpk[a]);for(a=JV.JC.altArgbsCpk.length;0<=--a;)this.g3d.changeColixArgb(JU.Elements.elementNumberMax+a,this.altArgbsCpk[a])},"~B");c(b,"setRubberbandArgb",function(a){this.colixRubberband=0==a?0:JU.C.getColix(a)},"~N");c(b,"setColixBackgroundContrast",function(a){this.colixBackgroundContrast=
JU.C.getBgContrast(a)},"~N");c(b,"getColixBondPalette",function(a,b){switch(b){case 19:return this.ce.getColorIndexFromPalette(a.getEnergy(),-2.5,-0.5,7,!1)}return 10},"JM.Bond,~N");c(b,"getColixAtomPalette",function(a,b){var c=0,r;r=this.vwr.ms;switch(b){case 84:return null==this.colorData||a.i>=this.colorData.length||Float.isNaN(this.colorData[a.i])?12:this.ce.getColorIndex(this.colorData[a.i]);case 0:case 1:var c=this.argbsCpk,e=r=a.getAtomicAndIsotopeNumber();e>=JU.Elements.elementNumberMax&&
(r=JU.Elements.altElementIndexFromNumber(e),0<r?(e=r,r+=JU.Elements.elementNumberMax,c=this.altArgbsCpk):e=r=JU.Elements.getElementNumber(e));return this.g3d.getChangeableColix(r,c[e]);case 2:return r=JU.ColorEncoder.quantize4(a.getPartialCharge(),-1,1,JV.JC.PARTIAL_CHARGE_RANGE_SIZE),this.g3d.getChangeableColix(JV.JC.PARTIAL_CHARGE_COLIX_RED+r,JV.JC.argbsRwbScale[r]);case 3:return r=a.getFormalCharge()- -4,this.g3d.getChangeableColix(JV.JC.FORMAL_CHARGE_COLIX_RED+r,JV.JC.argbsFormalCharge[r]);case 68:case 5:return 68==
b?(r=this.vwr.ms.getBfactor100Lo(),c=this.vwr.ms.getBfactor100Hi()):(r=0,c=1E4),this.ce.getColorIndexFromPalette(a.getBfactor100(),r,c,7,!1);case 86:return this.ce.getColorIndexFromPalette(a.group.getGroupParameter(1111490574),-1,1,7,!1);case 70:return c=this.vwr.ms.getSurfaceDistanceMax(),this.ce.getColorIndexFromPalette(a.getSurfaceDistance100(),0,c,7,!1);case 24:return r=a.group.groupID,42<=r&&(r=24+"PGCATU".indexOf(Character.toUpperCase(a.group.group1))-1),this.ce.getColorIndexFromPalette(r,0,
0,17,!1);case 8:return this.ce.getColorIndexFromPalette(a.group.groupID,0,0,5,!1);case 9:return this.ce.getColorIndexFromPalette(a.group.groupID,0,0,4,!1);case 75:return this.ce.getColorIndexFromPalette(a.group.selectedIndex,0,a.group.chain.selectedGroupCount-1,1,!1);case 87:return r=this.vwr.ms.am[a.mi],this.ce.getColorIndexFromPalette(a.group.getBioPolymerIndexInModel(),0,(r.isBioModel?r.getBioPolymerCount():0)-1,1,!1);case 76:return this.ce.getColorIndexFromPalette(a.group.getSelectedMonomerIndex(),
0,a.group.getSelectedMonomerCount()-1,1,!1);case 77:return this.ce.getColorIndexFromPalette(r.getMoleculeIndex(a.i,!0),0,r.getMoleculeCountInModel(a.mi)-1,0,!1);case 14:return c=a.mi,this.ce.getColorIndexFromPalette(r.getAltLocIndexInModel(c,a.altloc),0,r.getAltLocCountInModel(c),0,!1);case 15:return c=a.mi,this.ce.getColorIndexFromPalette(r.getInsertionCodeIndexInModel(c,a.group.getInsertionCode()),0,r.getInsertionCountInModel(c),0,!1);case 16:r=a.getAtomicAndIsotopeNumber();c=this.getJmolOrRasmolArgb(r,
1073741991);break;case 17:r=a.getAtomicAndIsotopeNumber();c=this.getJmolOrRasmolArgb(r,1073742116);break;case 7:c=a.group.getProteinStructureSubType().getColor();break;case 10:r=a.getChainID(),null==JU.ColorEncoder.argbsChainAtom&&(JU.ColorEncoder.argbsChainAtom=this.getArgbs(1153433601),JU.ColorEncoder.argbsChainHetero=this.getArgbs(1612709894)),r=((0>r?0:256<=r?r-256:r)&31)%JU.ColorEncoder.argbsChainAtom.length,c=(a.isHetero()?JU.ColorEncoder.argbsChainHetero:JU.ColorEncoder.argbsChainAtom)[r]}return 0==
c?22:JU.C.getColix(c)},"JM.Atom,~N");c(b,"getArgbs",function(a){return this.vwr.getJBR().getArgbs(a)},"~N");c(b,"getJmolOrRasmolArgb",function(a,b){switch(b){case 1073741991:if(a>=JU.Elements.elementNumberMax)break;return this.ce.getArgbFromPalette(a,0,0,2);case 1073742116:if(a>=JU.Elements.elementNumberMax)break;return this.ce.getArgbFromPalette(a,0,0,3);default:return b}return JV.JC.altArgbsCpk[JU.Elements.altElementIndexFromNumber(a)]},"~N,~N");c(b,"getElementColix",function(a){var b=this.argbsCpk;
if(a>JU.Elements.elementNumberMax){var c=JU.Elements.altElementIndexFromNumber(a);0<c?(a=c,b=this.altArgbsCpk):a=JU.Elements.getElementNumber(a)}return JU.C.getColix(b[a])},"~N");c(b,"setElementArgb",function(a,b){if(!(1073741991==b&&this.argbsCpk===J.c.PAL.argbsCpk)){b=this.getJmolOrRasmolArgb(a,b);this.argbsCpk===J.c.PAL.argbsCpk&&(this.argbsCpk=JU.AU.arrayCopyRangeI(J.c.PAL.argbsCpk,0,-1),this.altArgbsCpk=JU.AU.arrayCopyRangeI(JV.JC.altArgbsCpk,0,-1));var c=a;c<JU.Elements.elementNumberMax?this.argbsCpk[c]=
b:(c=JU.Elements.altElementIndexFromNumber(a),this.altArgbsCpk[c]=b,c+=JU.Elements.elementNumberMax);this.g3d.changeColixArgb(c,b);this.vwr.setModelkitPropertySafely("updatemodelkeys",null)}},"~N,~N");c(b,"getPropertyColorRange",function(){return this.ce.isReversed?L(-1,[this.ce.hi,this.ce.lo]):L(-1,[this.ce.lo,this.ce.hi])});c(b,"setPropertyColorRangeData",function(a,b){this.colorData=a;this.ce.currentPalette=this.ce.createColorScheme(this.vwr.g.propertyColorScheme,!0,!1);this.ce.hi=-3.4028235E38;
this.ce.lo=3.4028235E38;if(null!=a){for(var c=null==b,r,e=c?a.length-1:b.nextSetBit(0);0<=e;e=c?e-1:b.nextSetBit(e+1))if(!Float.isNaN(r=a[e]))this.ce.hi=Math.max(this.ce.hi,r),this.ce.lo=Math.min(this.ce.lo,r);this.setPropertyColorRange(this.ce.lo,this.ce.hi)}},"~A,JU.BS");c(b,"setPropertyColorRange",function(a,b){this.ce.setRange(a,b,a>b);JU.Logger.debugging&&JU.Logger.debug('ColorManager: color "'+this.ce.getCurrentColorSchemeName()+'" range '+a+" "+b)},"~N,~N");c(b,"setPropertyColorScheme",function(a,
b,c){var r=0==a.length;r&&(a="=");var e=this.getPropertyColorRange();this.ce.currentPalette=this.ce.createColorScheme(a,!0,c);r||this.setPropertyColorRange(e[0],e[1]);this.ce.isTranslucent=b},"~S,~B,~B");c(b,"getColorSchemeList",function(a){a=null==a||0==a.length?this.ce.currentPalette:this.ce.createColorScheme(a,!0,!1);return JU.ColorEncoder.getColorSchemeList(this.ce.getColorSchemeArray(a))},"~S");c(b,"getColorEncoder",function(a){if(null==a||0==a.length)return this.ce;var b=new JU.ColorEncoder(this.ce,
this.vwr);b.currentPalette=b.createColorScheme(a,!1,!0);return 2147483647==b.currentPalette?null:b},"~S")});n("JV");z(["javajs.api.BytePoster","java.util.Hashtable"],"JV.FileManager","java.net.URL $.URLEncoder JU.AU $.Base64 $.LimitedLineReader $.Lst $.OC $.PT $.Rdr $.SB J.adapter.smarter.Resolver J.api.Interface J.io.FileReader JU.Escape $.Logger JV.JC $.JmolAsyncException $.Viewer".split(" "),function(){var b=w(function(){this.jzu=this.spartanDoc=this.vwr=null;this.pathForAllFiles="";this.nameAsGiven=
"zapped";this.lastFullPathName=this.fullPathName=null;this.lastNameAsGiven="zapped";this.spardirCache=this.pngjCache=this.cache=this.appletProxy=this.appletDocumentBaseURL=this.lastFileType=this.fileName=null;q(this,arguments)},JV,"FileManager",null,javajs.api.BytePoster);N(b,function(){this.cache=new java.util.Hashtable});x(b,function(a){this.vwr=a;this.clear()},"JV.Viewer");c(b,"spartanUtil",function(){return null==this.spartanDoc?this.spartanDoc=J.api.Interface.getInterface("J.adapter.readers.spartan.SpartanUtil",
this.vwr,"fm getSpartanUtil()").set(this):this.spartanDoc});c(b,"getJzu",function(){return null==this.jzu?this.jzu=J.api.Interface.getOption("io.JmolUtil",this.vwr,"file"):this.jzu});c(b,"clear",function(){this.setFileInfo(u(-1,[this.vwr.getZapName()]));this.spardirCache=null});c(b,"setLoadState",function(a){this.vwr.getPreserveState()&&a.put("loadState",this.vwr.g.getLoadState(a))},"java.util.Map");c(b,"getPathForAllFiles",function(){return this.pathForAllFiles});c(b,"setPathForAllFiles",function(a){0<
a.length&&(!a.endsWith("/")&&!a.endsWith("|"))&&(a+="/");return this.pathForAllFiles=a},"~S");c(b,"setFileInfo",function(a){null==a?(this.fullPathName=this.lastFullPathName,this.nameAsGiven=this.lastNameAsGiven):(this.fullPathName=a[0],this.fileName=a[Math.min(1,a.length-1)],this.nameAsGiven=a[Math.min(2,a.length-1)],this.nameAsGiven.equals("zapped")||(this.lastNameAsGiven=this.nameAsGiven,this.lastFullPathName=this.fullPathName))},"~A");c(b,"getFileInfo",function(){return u(-1,[this.fullPathName,
this.fileName,this.nameAsGiven])});c(b,"getFullPathName",function(a){var b=null!=this.fullPathName?this.fullPathName:this.nameAsGiven;return!a||!b.equals("zapped")&&!b.equals("string")?b:null!=this.lastFullPathName?this.lastFullPathName:this.lastNameAsGiven},"~B");c(b,"getFileType",function(){return this.lastFileType});c(b,"setFileType",function(a){this.lastFileType=a},"~S");c(b,"getFileName",function(){return null!=this.fileName?this.fileName:this.nameAsGiven});c(b,"getAppletDocumentBase",function(){return null==
this.appletDocumentBaseURL?"":this.appletDocumentBaseURL.toString()});c(b,"setAppletContext",function(a){try{System.out.println('setting document base to "'+a+'"'),this.appletDocumentBaseURL=0==a.length?null:new java.net.URL(ha("java.net.URL"),a,null)}catch(b){if(D(b,"java.net.MalformedURLException"))System.out.println("error setting document base to "+a);else throw b;}},"~S");c(b,"setAppletProxy",function(a){this.appletProxy=null==a||0==a.length?null:a},"~S");c(b,"createAtomSetCollectionFromFile",
function(a,b,c){null==b.get("atomDataOnly")&&this.setLoadState(b);var r=a,e=a.indexOf("::");0>e&&(a=this.vwr.resolveDatabaseFormat(a));!r.equals(a)&&(0>r.indexOf("/")&&JV.Viewer.hasDatabasePrefix(r))&&b.put("dbName",r);a.endsWith("%2D%")&&(r=b.get("filter"),b.put("filter",(null==r?"":r)+"2D"),a=a.substring(0,a.length-4));r=0<=e?a.substring(e+2):a;e=0<=e?a.substring(0,e):null;JU.Logger.info("\nFileManager.getAtomSetCollectionFromFile("+r+")"+(a.equals(r)?"":" //"+a));var f=this.getClassifiedName(r,
!0);if(1==f.length)return f[0];a=f[0];f=f[1];b.put("fullPathName",(null==e?"":e+"::")+JV.FileManager.fixDOSName(a));this.vwr.getBoolean(603979879)&&this.vwr.getBoolean(603979825)&&this.vwr.getChimeMessenger().update(a);b=new J.io.FileReader(this.vwr,f,a,r,e,null,b,c);b.run();return b.getAtomSetCollection()},"~S,java.util.Map,~B");c(b,"createAtomSetCollectionFromFiles",function(a,b,c){this.setLoadState(b);for(var r=Array(a.length),e=Array(a.length),f=Array(a.length),j=0;j<a.length;j++){var g=a[j].indexOf("::"),
l=0<=g?a[j].substring(g+2):a[j],g=0<=g?a[j].substring(0,g):null,s=this.getClassifiedName(l,!0);if(1==s.length)return s[0];r[j]=s[0];a[j]=JV.FileManager.fixDOSName(s[0]);f[j]=g;e[j]=l}b.put("fullPathNames",r);b.put("fileTypes",f);a=this.newFilesReader(r,e,f,null,b,c);a.run();return a.getAtomSetCollection()},"~A,java.util.Map,~B");c(b,"createAtomSetCollectionFromString",function(a,b,c){this.setLoadState(b);var r=0<=a.indexOf("Viewer.AddHydrogens")?this.getFileInfo():null;b=new J.io.FileReader(this.vwr,
"string",null,null,null,a.startsWith(JV.JC.BASE64_TAG)?JU.Base64.decodeBase64(a):JU.Rdr.getBR(a),b,c);b.run();null!=r&&this.setFileInfo(r);!c&&"string"!=typeof b.getAtomSetCollection()&&this.setFileInfo(u(-1,["5\n\nC 0 0 0\nH .63 .63 .63\nH -.63 -.63 .63\nH -.63 .63 -.63\nH .63 -.63 -.63"===a?"Jmol Model Kit":"string"]));return b.getAtomSetCollection()},"~S,java.util.Map,~B");c(b,"createAtomSeCollectionFromStrings",function(a,b,c,r){if(!c.containsKey("isData")){var e='"'+this.vwr.getDataSeparator()+
'"',f='"'+(r?"append":"model")+' inline"',j=new JU.SB;j.append('set dataSeparator "~~~next file~~~";\ndata ').append(f);for(var g=0;g<a.length;g++)0<g&&j.append("~~~next file~~~"),j.append(a[g]);j.append("end ").append(f).append(";set dataSeparator ").append(e);b.appendSB(j)}this.setLoadState(c);JU.Logger.info("FileManager.getAtomSetCollectionFromStrings(string[])");b=Array(a.length);e=Array(a.length);for(g=0;g<a.length;g++)b[g]="string["+g+"]",e[g]=JV.FileManager.newDataReader(this.vwr,a[g]);a=this.newFilesReader(b,
b,null,e,c,r);a.run();return a.getAtomSetCollection()},"~A,JU.SB,java.util.Map,~B");c(b,"createAtomSeCollectionFromArrayData",function(a,b,c){JU.Logger.info("FileManager.getAtomSetCollectionFromArrayData(Vector)");for(var r=a.size(),e=Array(r),f=Array(r),j=0;j<r;j++)e[j]="String["+j+"]",f[j]=JV.FileManager.newDataReader(this.vwr,a.get(j));a=this.newFilesReader(e,e,null,f,b,c);a.run();return a.getAtomSetCollection()},"JU.Lst,java.util.Map,~B");b.newDataReader=c(b,"newDataReader",function(a,b){var c=
"string"==typeof b?"String":JU.AU.isAS(b)?"Array":C(b,"JU.Lst")?"List":null;return null==c?null:J.api.Interface.getInterface("JU."+c+"DataReader",a,"file").setData(b)},"JV.Viewer,~O");c(b,"newFilesReader",function(a,b,c,r,e,f){var j=J.api.Interface.getOption("io.FilesReader",this.vwr,"file");j.set(this,this.vwr,a,b,c,r,e,f);return j},"~A,~A,~A,~A,java.util.Map,~B");c(b,"createAtomSetCollectionFromReader",function(a,b,c,r){a=new J.io.FileReader(this.vwr,b,a,null,null,c,r,!1);a.run();return a.getAtomSetCollection()},
"~S,~S,~O,java.util.Map");c(b,"getBufferedInputStream",function(a){a=this.getBufferedReaderOrErrorMessageFromName(a,Array(2),!0,!0);return C(a,"java.io.BufferedInputStream")?a:null},"~S");c(b,"getBufferedInputStreamOrErrorMessageFromName",function(a,b,c,r,e,f,j){var g=null,l=null;b=(j=j||a.startsWith("cache://"))&&null==e?b=this.getPngjOrDroppedBytes(b,a):null;try{j&&(0<=a.indexOf(".png")&&null==this.pngjCache&&!this.vwr.getBoolean(603979960))&&(this.pngjCache=new java.util.Hashtable);if(null==b){var s=
0<=a.indexOf("?POST?_PNGJBIN_"),m=s||0<=a.indexOf("?POST?_PNGJ_");if(0<a.indexOf("?POST?_PNG_")||m){var p=Array(1),n=this.vwr.getImageAsBytes(m?"PNGJ":"PNG",0,0,-1,p);if(null!=p[0])return p[0];s?(e=n,a=JU.PT.rep(a,"?_","=_")):a=(new JU.SB).append(a).append("=").appendSB(JU.Base64.getBase64(n)).toString()}var A=JU.OC.urlTypeIndex(a),s=0<=A,m=null;if(s&&0<=(A=a.indexOf("?POST?")))m=a.substring(A+6),a=a.substring(0,A);var q=null!=this.appletDocumentBaseURL;if(q||s){q&&(s&&null!=this.appletProxy)&&(a=
this.appletProxy+"?url="+this.urlEncode(a));var u=q?new java.net.URL(this.appletDocumentBaseURL,a,null):new java.net.URL(ha("java.net.URL"),a,null);if(r)return null;a=u.toString();c&&0>a.toLowerCase().indexOf("password")&&JU.Logger.info("FileManager opening url "+a);l=this.vwr.apiPlatform.getURLContents(u,e,m,!1);n=null;if(C(l,"JU.SB")){a=l;if(f&&!JU.Rdr.isBase64(a))return JU.Rdr.getBR(a.toString());n=JU.Rdr.getBytesFromSB(a)}else JU.AU.isAB(l)&&(n=l);null!=n&&(l=JU.Rdr.getBIS(n))}else if(!j||null==
(b=this.cacheGet(a,!0)))c&&JU.Logger.info("FileManager opening file "+a),l=this.vwr.apiPlatform.getBufferedFileInputStream(a);if("string"==typeof l)return l}g=null==b?l:JU.Rdr.getBIS(b);r&&(g.close(),g=null);return g}catch(v){if(D(v,Exception))try{null!=g&&g.close()}catch(w){if(!D(w,"java.io.IOException"))throw w;}else throw v;}return""+v},"~S,~S,~B,~B,~A,~B,~B");b.getBufferedReaderForResource=c(b,"getBufferedReaderForResource",function(a,b,c,r){r=a.vwrOptions.get("codePath")+c+r;if(a.async){a=a.fm.cacheGet(r,
!1);if(null==a)throw new JV.JmolAsyncException(r);return JU.Rdr.getBufferedReader(JU.Rdr.getBIS(a),null)}return a.fm.getBufferedReaderOrErrorMessageFromName(r,u(-1,[null,null]),!1,!0)},"JV.Viewer,Class,~S,~S");c(b,"urlEncode",function(a){try{return java.net.URLEncoder.encode(a,"utf-8")}catch(b){if(D(b,"java.io.UnsupportedEncodingException"))return a;throw b;}},"~S");c(b,"getFullPathNameOrError",function(a,b,c){var r=this.getClassifiedName(JV.JC.fixProtocol(a),!0);if(null==r||null==r[0]||2>r.length)return u(-1,
[null,"cannot read file name: "+a]);a=r[0];r=JV.FileManager.fixDOSName(r[0]);a=JU.Rdr.getZipRoot(a);b=this.getBufferedInputStreamOrErrorMessageFromName(a,r,!1,!b,null,!1,!b);c[0]=r;"string"==typeof b&&(c[1]=b);return b},"~S,~B,~A");c(b,"getBufferedReaderOrErrorMessageFromName",function(a,b,c,r){a=JV.JC.fixProtocol(a);var e=this.cacheGet(a,!1),f=JU.AU.isAB(e),j=f?e:null;if(a.startsWith("cache://")){if(null==e)return"cannot read "+a;if(f)j=e;else return JU.Rdr.getBR(e)}e=this.getClassifiedName(a,!0);
if(null==e)return"cannot read file name: "+a;null!=b&&(b[0]=JV.FileManager.fixDOSName(e[0]));return this.getUnzippedReaderOrStreamFromName(e[0],j,!1,c,!1,r,null)},"~S,~A,~B,~B");c(b,"getUnzippedReaderOrStreamFromName",function(a,b,c,r,e,f,j){if(f&&null==b){var g=a.endsWith(".spt")?u(-1,[null,null,null]):0>a.indexOf(".spardir")?null:this.spartanUtil().getFileList(a,e);if(null!=g)return g}a=JV.JC.fixProtocol(a);null==b&&(null!=(b=this.getCachedPngjBytes(a))&&null!=j)&&j.put("sourcePNGJ",Boolean.TRUE);
f=a=a.$replace("#_DOCACHE_","");e=null;0<=a.indexOf("|")&&(e=JU.PT.split(a.$replace("\\","/"),"|"),null==b&&JU.Logger.info("FileManager opening zip "+a),a=e[0]);a=null==b?this.getBufferedInputStreamOrErrorMessageFromName(a,f,!0,!1,null,!r,!0):JU.AU.isAB(b)?JU.Rdr.getBIS(b):b;try{if("string"==typeof a||C(a,"java.io.BufferedReader"))return a;JU.Rdr.isGzipS(a)?a=JU.Rdr.getUnzippedInputStream(this.vwr.getJzt(),a):JU.Rdr.isBZip2S(a)&&(a=JU.Rdr.getUnzippedInputStreamBZip2(this.vwr.getJzt(),a));if(r&&null==
e)return a;if(JU.Rdr.isCompoundDocumentS(a)){var l=J.api.Interface.getInterface("JU.CompoundDocument",this.vwr,"file");l.setDocStream(this.vwr.getJzt(),a);var s=l.getAllDataFiles("Molecule","Input").toString();return r?JU.Rdr.getBIS(s.getBytes()):JU.Rdr.getBR(s)}if(JU.Rdr.isMessagePackS(a)||JU.Rdr.isPickleS(a))return a;a=JU.Rdr.getPngZipStream(a,!0);g=null;if(JU.Rdr.isZipS(a)){if(c)return this.vwr.getJzt().newZipInputStream(a);g=this.vwr.getJzt().getZipFileDirectory(a,e,1,r)}else if(JU.Rdr.isTar(a))g=
this.vwr.getJzt().getZipFileDirectory(a,e,1,r);else if(JU.Rdr.isBinary(a,32))return a;if(null!=g){if(!C(g,"java.io.BufferedInputStream"))return"string"==typeof g?JU.Rdr.getBR(g):g;a=JU.Rdr.getUnzippedInputStream(this.vwr.getJzt(),g)}return r?a:JU.Rdr.getBufferedReader(a,null)}catch(m){if(D(m,Exception))return m.toString();throw m;}},"~S,~O,~B,~B,~B,~B,java.util.Map");c(b,"getZipDirectory",function(a,b,c){a=this.getBufferedInputStreamOrErrorMessageFromName(a,a,!1,!1,null,!1,c);return this.vwr.getJzt().getZipDirectoryAndClose(a,
b?"JmolManifest":null)},"~S,~B,~B");c(b,"getFileAsBytes",function(a,b){if(null==a)return null;var c=a,r=null;0<=a.indexOf("|")&&(r=JU.PT.split(a,"|"),a=r[0]);var e=null!=r?null:this.getPngjOrDroppedBytes(c,a);if(null==e){c=this.getBufferedInputStreamOrErrorMessageFromName(a,c,!1,!1,null,!1,!0);if("string"==typeof c)return"Error:"+c;try{e=null!=b||null==r||1>=r.length||!JU.Rdr.isZipS(c)&&!JU.Rdr.isPngZipStream(c)&&!JU.Rdr.isTar(c)?JU.Rdr.getStreamAsBytes(c,b):this.vwr.getJzt().getZipFileContentsAsBytes(c,
r,1),c.close()}catch(f){if(D(f,Exception))return f.toString();throw f;}}if(null==b||!JU.AU.isAB(e))return e;b.write(e,0,-1);return e.length+" bytes"},"~S,JU.OC");c(b,"getFileAsMap",function(a,b,c){var r=c?null:new java.util.Hashtable,e;if(null==a){e=Array(1);b=this.vwr.getImageAsBytes(b,-1,-1,-1,e);if(null!=e[0]){if(c)return O(0,0);r.put("_ERROR_",e[0]);return r}if(null==r)return b;e=JU.Rdr.getBIS(b)}else{b=Array(2);e=this.getFullPathNameOrError(a,!0,b);if("string"==typeof e){if(c)return O(0,0);r.put("_ERROR_",
e);return r}if(!this.checkSecurity(b[0])){if(c)return O(0,0);r.put("_ERROR_","java.io. Security exception: cannot read file "+b[0]);return r}}try{if(c)return JU.Rdr.streamToBytes(e);this.vwr.getJzt().readFileAsMap(e,r,a)}catch(f){if(D(f,Exception)){if(c)return O(0,0);r.clear();r.put("_ERROR_",""+f)}else throw f;}return r},"~S,~S,~B");c(b,"getFileDataAsString",function(a,b,c,r,e){a[1]="";var f=a[0];if(null==f)return!1;c=this.getBufferedReaderOrErrorMessageFromName(f,a,!1,c);if("string"==typeof c)return a[1]=
c,!1;if(e&&!this.checkSecurity(a[0]))return a[1]="java.io. Security exception: cannot read file "+a[0],!1;try{if(C(c,"java.io.BufferedInputStream")&&(f.toUpperCase().endsWith(".PNG")||JV.FileManager.isEmbeddable(f)))c=JU.Rdr.getBufferedReader(c,null);return JU.Rdr.readAllAsString(c,b,r,a,1)}catch(j){if(D(j,Exception))return!1;throw j;}},"~A,~N,~B,~B,~B");c(b,"checkSecurity",function(a){if(!a.startsWith("file:"))return!0;var b=a.lastIndexOf("/");return a.lastIndexOf(":/")==b-1||0<=a.indexOf("/.")||
a.lastIndexOf(".")<a.lastIndexOf("/")?!1:!0},"~S");c(b,"loadImage",function(a,b,c){var r=null,e=null,f=null,j=null!=b&&b.startsWith("\u0001");if(j){if(b.equals("\u0001closeall\u0001null"))return this.vwr.loadImageData(Boolean.TRUE,"\u0001closeall","\u0001closeall",null);if("\u0001close".equals(a))return this.vwr.loadImageData(Boolean.FALSE,"\u0001close",b,null)}C(a,"java.util.Map")&&(a=a.containsKey("_DATA_")?a.get("_DATA_"):a.get("_IMAGE_"));C(a,"JS.SV")&&(a=a.value);var g="string"==typeof a?a:null,
l=!1;null!=g&&g.startsWith(JV.JC.BASE64_TAG)?f=JU.Base64.decodeBase64(g):C(a,"JU.BArray")?f=a.data:null==b||"string"==typeof a?(g=this.getClassifiedName(a,!0),e=null==g?"cannot read file name: "+a:JV.FileManager.fixDOSName(g[0]),null!=g&&(r=this.getImage(e,b,c)),l=null==r):r=a;null!=f&&(r=this.getImage(f,b,!0),l=!1);"string"==typeof r&&(e=r,r=null);!JV.Viewer.isJS&&(null!=r&&null!=f)&&(e=JV.JC.BASE64_TAG+JU.Base64.getBase64(f).toString());return!JV.Viewer.isJS||j&&null==e||!j&&null!=r?this.vwr.loadImageData(r,
e,b,null):l},"~O,~S,~B");c(b,"getImage",function(a,b,c){return this.getJzu().getImage(this.vwr,a,b,c)},"~O,~S,~B");c(b,"getClassifiedName",function(a,b){if(null==a)return u(-1,[null]);var c=0<this.pathForAllFiles.length;if(a.startsWith("?")||a.startsWith("http://?")||a.startsWith("https://?")){if(!JV.Viewer.isJS&&null==(a=this.vwr.dialogAsk("Load",a,null)))return u(-1,[b?"#CANCELED#":null]);c=!1}var r=null,e=null,f=null;if(a.startsWith("cache://"))return f=Array(3),f[0]=f[2]=a,f[1]=JV.FileManager.stripPath(f[0]),
f;a=this.vwr.resolveDatabaseFormat(a);if(null==a)return u(-1,[null]);0>a.indexOf(":")&&0!=a.indexOf("/")&&0!=a.indexOf("\\")&&a.startsWith("file:///")&&9==a.indexOf("|")&&(a=a.substring(0,9)+":"+a.substring(10));0>a.indexOf(":")&&(0!=a.indexOf("/")&&0!=a.indexOf("\\"))&&(a=JV.FileManager.addDirectory(this.vwr.getDefaultDirectory(),a));if(null==this.appletDocumentBaseURL)if(0<=JU.OC.urlTypeIndex(a)||this.vwr.haveAccess(JV.Viewer.ACCESS.NONE)||this.vwr.haveAccess(JV.Viewer.ACCESS.READSPT)&&!a.endsWith(".spt")&&
!a.endsWith("/")||!this.vwr.haveAccessInternal(a))try{e=new java.net.URL(ha("java.net.URL"),a,null)}catch(j){if(D(j,"java.net.MalformedURLException"))return u(-1,[b?j.toString():null]);throw j;}else var r=this.vwr.apiPlatform.newFile(a),f=r.getFullPath(),g=r.getName(),f=u(-1,[null==f?g:f,g,null==f?g:"file:/"+f.$replace("\\","/")]);else try{if(1==a.indexOf(":\\")||1==a.indexOf(":/"))a="file:/"+a;e=new java.net.URL(this.appletDocumentBaseURL,a,null)}catch(l){if(D(l,"java.net.MalformedURLException"))return u(-1,
[b?l.toString():null]);throw l;}null!=e&&(f=Array(3),f[0]=f[2]=e.toString(),f[1]=JV.FileManager.stripPath(f[0]));c&&(c=f[0],f[0]=this.pathForAllFiles+f[1],JU.Logger.info("FileManager substituting "+c+" --\x3e "+f[0]));c=f[0];b&&(JU.OC.isLocal(c)&&!c.startsWith("file:/"))&&(null==r&&(c=JU.PT.trim(c.substring(c.indexOf(":")+1),"/")),r=c.length-f[1].length-1,0<r&&(c=c.substring(0,r).$replace("|",":"),JV.FileManager.setLocalPath(this.vwr,c,!0)));return f},"~S,~B");b.addDirectory=c(b,"addDirectory",function(a,
b){if(0==a.length||a.equals("."))return b;var c=0<b.length?b.charAt(0):" ",r=a.toLowerCase();if((r.endsWith(".zip")||r.endsWith(".tar"))&&"|"!=c&&"/"!=c)a+="|";return a+("/"==c||"/"==c||"|"==(c=a.charAt(a.length-1))||"/"==c?"":"/")+b},"~S,~S");c(b,"getDefaultDirectory",function(a){a=this.getClassifiedName(a,!0);if(null==a)return"";a=JV.FileManager.fixPath(a[0]);return null==a?"":a.substring(0,a.lastIndexOf("/"))},"~S");b.fixPath=c(b,"fixPath",function(a){a=JV.FileManager.fixDOSName(a);a=JU.PT.rep(a,
"/./","/");var b=a.lastIndexOf("//")+1;1>b&&(b=a.indexOf(":/")+1);1>b&&(b=a.indexOf("/"));if(0>b)return null;var c=a.substring(0,b);for(a=a.substring(b);0<=(b=a.lastIndexOf("/../"));){var r=a.substring(0,b).lastIndexOf("/");if(0>r)return JU.PT.rep(c+a,"/../","/");a=a.substring(0,r)+a.substring(b+3)}0==a.length&&(a="/");return c+a},"~S");c(b,"getFilePath",function(a,b,c){a=this.getClassifiedName(a,!1);return null==a||1==a.length?"":c?a[1]:b?a[2]:null==a[0]?"":JV.FileManager.fixDOSName(a[0])},"~S,~B,~B");
b.getLocalDirectory=c(b,"getLocalDirectory",function(a,b){var c=a.getP(b?"currentLocalPath":"defaultDirectoryLocal");b&&0==c.length&&(c=a.getP("defaultDirectoryLocal"));if(0==c.length)return a.isApplet?null:a.apiPlatform.newFile(System.getProperty("user.dir","."));a.isApplet&&0==c.indexOf("file:/")&&(c=c.substring(6));c=a.apiPlatform.newFile(c);try{return c.isDirectory()?c:c.getParentAsFile()}catch(r){if(D(r,Exception))return null;throw r;}},"JV.Viewer,~B");b.setLocalPath=c(b,"setLocalPath",function(a,
b,c){for(;b.endsWith("/")||b.endsWith("\\");)b=b.substring(0,b.length-1);a.setStringProperty("currentLocalPath",b);c||a.setStringProperty("defaultDirectoryLocal",b)},"JV.Viewer,~S,~B");b.getLocalPathForWritingFile=c(b,"getLocalPathForWritingFile",function(a,b,c){if(b.startsWith("http://")||b.startsWith("https://"))return b;b=JU.PT.rep(b,"?","");if(0==b.indexOf("file:/"))return a=b.indexOf("|"),5<a&&10>a&&(b=b.substring(0,a)+":"+b.substring(a+1)),a=b.indexOf(":",5),b.substring(0<a?a-1:5);if(0==b.indexOf("/")||
0==b.indexOf("\\")||0<=b.indexOf(":"))return b;var r=null;try{r=JV.FileManager.getLocalDirectory(a,c)}catch(e){if(!D(e,Exception))throw e;}return null==r?b:JV.FileManager.fixPath(r.toString()+"/"+b)},"JV.Viewer,~S,~B");b.fixDOSName=c(b,"fixDOSName",function(a){return 0<=a.indexOf(":\\")?a.$replace("\\","/"):a},"~S");b.stripPath=c(b,"stripPath",function(a){var b=Math.max(a.lastIndexOf("|"),a.lastIndexOf("/"));return a.substring(b+1)},"~S");b.isScriptType=c(b,"isScriptType",function(a){return JU.PT.isOneOf(a.toLowerCase().substring(a.lastIndexOf(".")+
1),";pse;spt;png;pngj;jmol;zip;")},"~S");b.determineSurfaceFileType=c(b,"determineSurfaceFileType",function(a){var b=null;if(C(a,"JU.Rdr.StreamReader")){var c=a.getStream();if(c.markSupported())try{c.mark(300);var r=O(300,0);c.read(r,0,300);c.reset();if(131==(r[0]&255))return J.adapter.smarter.Resolver.checkBCIF(r,!1)?"BCifDensity":null;if(80==r[0]&&77==r[1]&&1==r[2]&&0==r[3])return"Pmesh";if(77==r[208]&&65==r[209]&&80==r[210])return"Mrc";if(20==r[0]&&0==r[1]&&0==r[2]&&0==r[3])return"DelPhi";if(0==
r[36]&&100==r[37])return"Dsn6"}catch(e){if(!D(e,"java.io.IOException"))throw e;}}c=null;try{c=new JU.LimitedLineReader(a,16E3),b=c.getHeader(0)}catch(f){if(!D(f,Exception))throw f;}if(null==c||null==b||0==b.length)return null;if(0<=b.indexOf("\x00")){if(131==b.charAt(0).charCodeAt(0))return"D"==b.charAt(10)&&"e"==b.charAt(11)&&"n"==b.charAt(12)?"BCifDensity":null;if(0==b.indexOf("PM\u0001\x00"))return"Pmesh";if(208==b.indexOf("MAP "))return"Mrc";if(0==b.indexOf("\u0014\x00\x00\x00"))return"DelPhi";
if(37<b.length&&(0==b.charAt(36).charCodeAt(0)&&100==b.charAt(37).charCodeAt(0)||0==b.charAt(36).charCodeAt(0)&&100==b.charAt(37).charCodeAt(0)))return"Dsn6"}switch(b.charAt(0).charCodeAt(0)){case 64:if(0==b.indexOf("@text"))return"Kinemage";break;case 35:if(0<=b.indexOf(".obj"))return"Obj";if(0<=b.indexOf("MSMS"))return"Msms";if(0<=b.indexOf("Menu"))return"MENU";break;case 38:if(0==b.indexOf("&plot"))return"Jaguar";break;case 13:case 10:if(0<=b.indexOf("ZYX"))return"Xplor"}if(0<=b.indexOf("Here is your gzipped map"))return"UPPSALA"+
b;if(b.startsWith("data_SERVER"))return"CifDensity";if(b.startsWith("4MESHC"))return"Pmesh4";if(0<=b.indexOf("! nspins"))return"CastepDensity";if(0<=b.indexOf("<jvxl")&&0<=b.indexOf("<?xml"))return"JvxlXml";if(0<=b.indexOf("#JVXL+"))return"Jvxl+";if(0<=b.indexOf("#JVXL"))return"Jvxl";if(0<=b.indexOf("#JmolPmesh"))return"Pmesh";if(0<=b.indexOf("#obj")||0<=b.indexOf("#pmesh"))return"Obj";if(0<=b.indexOf("<efvet "))return"Efvet";if(0<=b.indexOf("usemtl"))return"Obj";if(0==b.indexOf("# object with"))return"Nff";
if(0<=b.indexOf("PRIMVEC")||0<=b.indexOf("BEGIN_DATAGRID_3D")||0<=b.indexOf("BEGIN_BANDGRID_3D"))return"Xsf";if(0<=b.indexOf("tiles in x, y"))return"Ras3D";if(0<=b.indexOf(" 0.00000e+00 0.00000e+00      0      0\n"))return"Uhbd";b=c.readLineWithNewline();if(0==b.indexOf("object 1 class gridpositions counts"))return"Apbs";a=JU.PT.getTokens(b);var j=c.readLineWithNewline();if(2==a.length&&(3==JU.PT.parseInt(a[0])&&-2147483648!=JU.PT.parseInt(a[1]))&&(a=JU.PT.getTokens(j),3==a.length&&-2147483648!=JU.PT.parseInt(a[0])&&
-2147483648!=JU.PT.parseInt(a[1])&&-2147483648!=JU.PT.parseInt(a[2])))return"PltFormatted";r=c.readLineWithNewline();if(b.startsWith("v ")&&j.startsWith("v ")&&r.startsWith("v "))return"Obj";j=JU.PT.parseInt(r);if(-2147483648==j)return 0==r.indexOf("+")?"Jvxl+":null;a=JU.PT.getTokens(r);if(0<a[0].indexOf("."))return 60<=r.length||3!=a.length?null:"VaspChgcar";if(0<=j)return 4==a.length||5==a.length&&a[4].equals("1")?"Cube":null;for(a=4+-j;0<=--a;)if(null==(b=c.readLineWithNewline()))return null;b=
JU.PT.parseInt(b);return-2147483648==b?null:0>b?"Jvxl":"Cube"},"java.io.BufferedReader");b.getManifestScriptPath=c(b,"getManifestScriptPath",function(a){if(0<=a.indexOf("$SCRIPT_PATH$"))return"";var b=0<=a.indexOf("\n")?"\n":"\r";if(0<=a.indexOf(".spt")){a=JU.PT.split(a,b);for(b=a.length;0<=--b;)if(0<=a[b].indexOf(".spt"))return"|"+JU.PT.trim(a[b],"\r\n \t")}return null},"~S");b.getFileReferences=c(b,"getFileReferences",function(a,b,c){for(var r=0;r<JV.FileManager.scriptFilePrefixes.length;r++)for(var e=
JV.FileManager.scriptFilePrefixes[r],f=-1;0<=(f=a.indexOf(e,f+1));){var j=JU.PT.getQuotedStringAt(a,f);0<=j.indexOf("\\u")&&(j=JU.Escape.unescapeUnicode(j));b.addLast(j);null!=c&&(0<=j.indexOf("\\u")&&(j=JU.Escape.unescapeUnicode(j)),c.addLast(j))}},"~S,JU.Lst,JU.Lst");b.setScriptFileReferences=c(b,"setScriptFileReferences",function(a,b,c,r){null!=b&&(a=JV.FileManager.setScriptFileRefs(a,b,!0));null!=c&&(a=JV.FileManager.setScriptFileRefs(a,c,!1));a=JU.PT.rep(a,'\u0001"','"');if(null!=r){for(;r.endsWith("/");)r=
r.substring(0,r.length-1);for(b=0;b<JV.FileManager.scriptFilePrefixes.length;b++)c=JV.FileManager.scriptFilePrefixes[b],a=JU.PT.rep(a,c+".",c+r)}return a},"~S,~S,~S,~S");b.setScriptFileRefs=c(b,"setScriptFileRefs",function(a,b,c){if(null==b)return a;var r=0==b.length,e=new JU.Lst;JV.FileManager.getFileReferences(a,e,null);for(var f=new JU.Lst,j=new JU.Lst,g=e.size(),l=0;l<g;l++){var s=e.get(l),m=s,p=m.indexOf("::"),n="";0<=p&&(n=m.substring(p+2),m=m.substring(p+2));c==JU.OC.isLocal(m)&&(p=r?-1:m.indexOf("/"+
b+"/"),0<=p?m=m.substring(p+1):(p=m.lastIndexOf("/"),0>p&&!r&&(m="/"+m),(0>p||r)&&p++,m=b+m.substring(p)));m=n+m;JU.Logger.info("FileManager substituting "+s+" --\x3e "+m);f.addLast('"'+s+'"');j.addLast('\u0001"'+m+'"')}return JU.PT.replaceStrings(a,f,j)},"~S,~S,~B");c(b,"cachePut",function(a,b){a=JV.FileManager.fixDOSName(a);JU.Logger.debugging&&JU.Logger.debug("cachePut "+a);null==b||"".equals(b)?this.cache.remove(a):(this.cache.put(a,b),this.getCachedPngjBytes(a))},"~S,~O");c(b,"cacheGet",function(a,
b){a=JV.FileManager.fixDOSName(a);var c=a.indexOf("|");0<=c&&!a.endsWith("##JmolSurfaceInfo##")&&(a=a.substring(0,c));a=this.getFilePath(a,!0,!1);c=null;(c=Jmol.Cache.get(a))||(c=this.cache.get(a));return b&&"string"==typeof c?null:c},"~S,~B");c(b,"cacheClear",function(){JU.Logger.info("cache cleared");this.cache.clear();null!=this.pngjCache&&(this.pngjCache=null,JU.Logger.info("PNGJ cache cleared"))});c(b,"cacheFileByNameAdd",function(a,b){if(null==a||!b&&a.equalsIgnoreCase(""))return this.cacheClear(),
-1;var c;if(b){a=JV.JC.fixProtocol(this.vwr.resolveDatabaseFormat(a));c=this.getFileAsBytes(a,null);if("string"==typeof c)return 0;this.cachePut(a,c)}else{if(a.endsWith("*"))return JU.AU.removeMapKeys(this.cache,a.substring(0,a.length-1));c=this.cache.remove(JV.FileManager.fixDOSName(a))}return null==c?0:c.length},"~S,~B");c(b,"cacheList",function(){for(var a=new java.util.Hashtable,b,c=this.cache.entrySet().iterator();c.hasNext()&&((b=c.next())||1);)a.put(b.getKey(),Integer.$valueOf(JU.AU.isAB(b.getValue())?
b.getValue().length:b.getValue().toString().length));return a});c(b,"getCanonicalName",function(a){var b=this.getClassifiedName(a,!0);return null==b?a:b[2]},"~S");c(b,"recachePngjBytes",function(a,b){null!=this.pngjCache&&this.pngjCache.containsKey(a)&&(this.pngjCache.put(a,b),JU.Logger.info("PNGJ recaching "+a+" ("+b.length+")"))},"~S,~A");c(b,"getPngjOrDroppedBytes",function(a,b){var c=this.getCachedPngjBytes(a);return null==c?this.cacheGet(b,!0):c},"~S,~S");c(b,"getCachedPngjBytes",function(a){return null==
a||null==this.pngjCache||0>a.indexOf(".png")?null:this.getJzu().getCachedPngjBytes(this,a)},"~S");g(b,"postByteArray",function(a,b){if(a.startsWith("cache://"))return this.cachePut(a,b),"OK "+b.length+"cached";var c=this.getBufferedInputStreamOrErrorMessageFromName(a,null,!1,!1,b,!1,!0);if("string"==typeof c)return c;try{c=JU.Rdr.getStreamAsBytes(c,null)}catch(r){if(D(r,"java.io.IOException"))try{c.close()}catch(e){if(!D(e,"java.io.IOException"))throw e;}else throw r;}return null==c?"":JU.Rdr.fixUTF(c)},
"~S,~A");b.isJmolType=c(b,"isJmolType",function(a){return a.equals("PNG")||a.equals("PNGJ")||a.equals("JMOL")||a.equals("ZIP")||a.equals("ZIPALL")},"~S");b.isEmbeddable=c(b,"isEmbeddable",function(a){var b=a.lastIndexOf(".");0<=b&&(a=a.substring(b+1));a=a.toUpperCase();return JV.FileManager.isJmolType(a)||JU.PT.isOneOf(a,";JPG;JPEG;POV;IDTF;")},"~S");c(b,"getEmbeddedFileState",function(a,b,c){if(!JV.FileManager.isEmbeddable(a))return"";b=this.getZipDirectory(a,!1,b);if(0==b.length)return a=this.vwr.getFileAsString4(a,
-1,!1,!0,!1,"file"),0>a.indexOf("**** Jmol Embedded Script ****")?"":JV.FileManager.getEmbeddedScript(a);for(var r=0;r<b.length;r++)if(0<=b[r].indexOf(c))return a=u(-1,[a+"|"+b[r],null]),this.getFileDataAsString(a,-1,!1,!1,!1),a[1];return""},"~S,~B,~S");b.stripTypePrefix=c(b,"stripTypePrefix",function(a){var b=a.indexOf("::");return 0>b||20<=b?a:a.substring(b+2)},"~S");b.getEmbeddedScript=c(b,"getEmbeddedScript",function(a){if(null==a)return a;var b=a.indexOf("**** Jmol Embedded Script ****");if(0>
b)return a;var c=a.lastIndexOf("/*",b),r=a.indexOf(("*"==a.charAt(c+2)?"*":"")+"*/",b);for(0<=c&&r>=b&&(a=a.substring(b+30,r)+"\n");0<=(c=a.indexOf(" #Jmol...\x00"));)a=a.substring(0,c)+a.substring(c+10+4);JU.Logger.debugging&&JU.Logger.debug(a);return a},"~S");c(b,"isZipStream",function(a){return this.vwr.getJzt().isZipStream(a)},"~O");b.SIMULATION_PROTOCOL="http://SIMULATION/";b.scriptFilePrefixes=u(-1,['/*file*/"','FILE0="','FILE1="'])});n("JV");z(["java.util.Hashtable","JU.P3","J.c.CBK"],"JV.GlobalSettings",
"JU.DF $.PT $.SB J.c.STR JS.SV JU.Escape $.Logger JV.JC $.StateManager $.Viewer".split(" "),function(){var b=w(function(){this.htUserVariables=this.htPropertyFlagsRemoved=this.htBooleanParameterFlags=this.htNonbooleanParameterValues=this.vwr=null;this.zDepth=0;this.zShadePower=3;this.zSlab=50;this.slabByAtom=this.slabByMolecule=!1;this.appendNew=this.allowEmbeddedScripts=!0;this.appletProxy="";this.applySymmetryToBonds=!1;this.atomTypes="";this.autoBond=!0;this.axesOrientationRasmol=!1;this.bondRadiusMilliAngstroms=
150;this.bondTolerance=0.45;this.defaultDirectory="";this.defaultStructureDSSP=!0;this.ptDefaultLattice=null;this.defaultLoadFilter=this.defaultLoadScript="";this.defaultDropScript="zap; load SYNC \"%FILE\";if (%ALLOWCARTOONS && _loadScript == '' && defaultLoadScript == '' && _filetype == 'Pdb') {if ({(protein or nucleic)&*/1.1} && {*/1.1}[1].groupindex != {*/1.1}[0].groupindex){select protein or nucleic;cartoons only;}if ({visible && cartoons > 0}){color structure}else{wireframe -0.1};if (!{visible}){spacefill 23%};select *}";
this.forceAutoBond=!1;this.fractionalRelative=!0;this.inlineNewlineChar="|";this.resolverResolver=this.macroDirectory=this.pubChemFormat=this.nihResolverFormat=this.smilesUrlFormat=this.nmrPredictFormat=this.nmrUrlFormat=this.pdbLoadLigandFormat=this.pdbLoadFormat=this.loadFormat=null;this.checkCIR=!1;this.minBondDistance=0.4;this.minPixelSelRadius=6;this.pdbSequential=this.pdbGetHeader=this.pdbAddHydrogens=!1;this.percentVdwAtom=23;this.smallMoleculeMaxAtoms=4E4;this.smartAromatic=!0;this.doublePrecision=
this.legacyJavaFloat=this.legacyHAddition=this.legacyAutoBonding=this.zeroBasedXyzRasmol=!1;this.modulateOccupancy=this.jmolInJSpecView=!0;this.dotSolvent=this.allowMoveAtoms=this.allowRotateSelected=!1;this.defaultTorsionLabel=this.defaultDistanceLabel=this.defaultAngleLabel="%VALUE %UNITS";this.measureAllModels=this.justifyMeasurements=!1;this.minimizationSteps=100;this.minimizationRefresh=!0;this.minimizationSilent=!1;this.minimizationCriterion=0.001;this.minimizationMaxAtoms=200;this.minimizationReportSteps=
10;this.infoFontSize=20;this.antialiasDisplay=!1;this.displayCellParameters=this.antialiasTranslucent=this.imageState=this.antialiasImages=!0;this.dotsSelectedOnly=!1;this.dotSurface=!0;this.dotDensity=3;this.meshScale=this.dotScale=1;this.isosurfaceKey=this.greyscaleRendering=this.mode2d=!1;this.isosurfacePropertySmoothing=!0;this.isosurfacePropertySmoothingPower=7;this.platformSpeed=10;this.repaintWaitMs=1E3;this.showHiddenSelectionHalos=!1;this.showMeasurements=this.showKeyStrokes=!0;this.showTiming=
!1;this.zoomLarge=!0;this.zoomHeight=!1;this.backgroundImageFileName=null;this.hbondsBackbone=this.bondModeOr=this.partialDots=!1;this.hbondsAngleMinimum=90;this.hbondNODistanceMaximum=3.25;this.hbondHXDistanceMaximum=2.5;this.hbondsRasmol=!0;this.hbondsSolid=!1;this.modeMultipleBond=2;this.showMultipleBonds=this.showHydrogens=!0;this.ssbondsBackbone=!1;this.multipleBondSpacing=-1;this.multipleBondRadiusFactor=0;this.multipleBondBananas=!1;this.nboCharges=!0;this.cartoonRockets=this.cartoonBaseEdges=
!1;this.cartoonBlockHeight=0.5;this.cipRule6Full=this.chainCaseSensitive=this.cartoonRibose=this.cartoonLadders=this.cartoonFancy=this.cartoonSteps=this.cartoonBlocks=!1;this.hermiteLevel=0;this.rangeSelected=this.highResolutionFlag=!1;this.rasmolHeteroSetting=this.rasmolHydrogenSetting=!0;this.ribbonAspectRatio=16;this.rocketBarrels=this.ribbonBorder=!1;this.sheetSmoothing=1;this.translucent=this.traceAlpha=!0;this.twistedSheets=!1;this.allowAudio=this.autoplayMovie=!0;this.allowGestures=!1;this.allowMultiTouch=
this.allowModelkit=!0;this.hiddenLinesDashed=this.allowKeyStrokes=!1;this.animationFps=10;this.atomPicking=!0;this.autoFps=!1;this.axesMode=603979809;this.axesScale=2;this.axesOffset=0;this.starWidth=0.05;this.bondPicking=!1;this.dataSeparator="~~~";this.debugScript=!1;this.defaultDrawArrowScale=0.5;this.defaultLabelXYZ="%a";this.defaultLabelPDB="%m%r";this.defaultTranslucent=0.5;this.delayMaximumMs=0;this.dipoleScale=1;this.drawFontSize=16;this.drawPicking=this.drawHover=this.dragSelected=this.disablePopupMenu=
!1;this.dsspCalcHydrogen=!0;this.labelKey=this.elementKey=!1;this.energyUnits="kJ";this.exportScale=0;this.helpPath="https://chemapps.stolaf.edu/jmol/docs/index.htm";this.fontScaling=!1;this.fontCaching=!0;this.forceField="MMFF";this.helixStep=1;this.hideNameInPopup=!1;this.hoverDelayMs=500;this.labelPointerWidth=2;this.loadAtomDataTolerance=0.01;this.logGestures=this.logCommands=!1;this.measureDistanceUnits="nanometers";this.measurementLabels=!0;this.monitorEnergy=this.messageStyleChime=!1;this.modulationScale=
1;this.multiProcessor=!0;this.particleRadius=20;this.pickingSpinRate=10;this.pickLabel="";this.pointGroupDistanceTolerance=0.2;this.pointGroupLinearTolerance=8;this.preserveState=!0;this.propertyColorScheme="roygb";this.quaternionFrame="p";this.saveProteinStructureState=!0;this.showModVecs=!1;this.showUnitCellDetails=!0;this.solventProbeRadius=1.2;this.scriptDelay=0;this.statusReporting=this.selectAllModels=!0;this.strandCountForStrands=5;this.strandCountForMeshRibbon=7;this.strutSpacing=6;this.strutLengthMaximum=
7;this.strutDefaultRadius=0.3;this.symmetryHermannMauguin=this.strutsMultiple=!1;this.waitForMoveTo=this.useScriptQueue=this.useNumberLocalization=this.useMinimizationThread=!0;this.noDelay=!1;this.vectorScale=1;this.vectorsCentered=this.vectorSymmetry=!1;this.vectorTrail=0;this.vibrationScale=this.vibrationPeriod=1;this.navigationPeriodic=this.navigationMode=this.hideNavigationPoint=this.wireframeRotation=!1;this.navigationSpeed=5;this.showNavigationPointAlways=!1;this.stereoState=null;this.modelKitMode=
!1;this.objMad10=this.objStateOn=this.objColors=null;this.ellipsoidFill=this.ellipsoidArrows=this.ellipsoidArcs=this.ellipsoidDots=this.ellipsoidAxes=!1;this.ellipsoidBall=!0;this.ellipsoidDotCount=200;this.ellipsoidAxisDiameter=0.02;this.testFlag4=this.testFlag3=this.testFlag2=this.testFlag1=!1;this.structureList=null;this.haveSetStructureList=!1;this.bondingVersion=0;q(this,arguments)},JV,"GlobalSettings",null);N(b,function(){this.htUserVariables=new java.util.Hashtable;this.ptDefaultLattice=new JU.P3;
this.objColors=E(7,0);this.objStateOn=Ca(7,!1);this.objMad10=E(7,0);this.structureList=new java.util.Hashtable;this.structureList.put(J.c.STR.TURN,L(-1,[30,90,-15,95]));this.structureList.put(J.c.STR.SHEET,L(-1,[-180,-10,70,180,-180,-45,-180,-130,140,180,90,180]));this.structureList.put(J.c.STR.HELIX,L(-1,[-160,0,-100,45]))});x(b,function(a,b,c){this.vwr=a;this.htNonbooleanParameterValues=new java.util.Hashtable;this.htBooleanParameterFlags=new java.util.Hashtable;this.htPropertyFlagsRemoved=new java.util.Hashtable;
this.loadFormat=this.pdbLoadFormat=JV.JC.databases.get("pdb");this.pdbLoadLigandFormat=JV.JC.databases.get("ligand");this.nmrUrlFormat=JV.JC.databases.get("nmr");this.nmrPredictFormat=JV.JC.databases.get("nmrdb");this.pubChemFormat=JV.JC.databases.get("pubchem");this.resolverResolver=JV.JC.databases.get("resolverresolver");this.macroDirectory="https://chemapps.stolaf.edu/jmol/macros";null==b?this.setB("undoAuto",!a.isApplet):(this.setB("undoAuto",a.getBooleanProperty("undoAuto")),c||(this.setO("_pngjFile",
b.getParameter("_pngjFile",!1)),this.htUserVariables=b.htUserVariables),this.debugScript=b.debugScript,this.disablePopupMenu=b.disablePopupMenu,this.messageStyleChime=b.messageStyleChime,this.measureDistanceUnits=b.measureDistanceUnits,this.defaultDirectory=b.defaultDirectory,this.autoplayMovie=b.autoplayMovie,this.allowAudio=b.allowAudio,this.allowGestures=b.allowGestures,this.allowModelkit=b.allowModelkit,this.allowMultiTouch=b.allowMultiTouch,this.allowKeyStrokes=b.allowKeyStrokes,this.legacyAutoBonding=
b.legacyAutoBonding,this.legacyHAddition=b.legacyHAddition,this.legacyJavaFloat=b.legacyJavaFloat,this.minimizationReportSteps=b.minimizationReportSteps,this.doublePrecision=b.doublePrecision,this.bondingVersion=b.bondingVersion,this.platformSpeed=b.platformSpeed,this.useScriptQueue=b.useScriptQueue,this.showTiming=b.showTiming,this.wireframeRotation=b.wireframeRotation,this.testFlag1=b.testFlag1,this.testFlag2=b.testFlag2,this.testFlag3=b.testFlag3,this.testFlag4=b.testFlag4,this.nihResolverFormat=
b.nihResolverFormat);null==this.nihResolverFormat&&(this.nihResolverFormat=JV.JC.databases.get("nci"));this.setCIR(this.nihResolverFormat,!1);var r;c=0;for(var e=J.c.CBK.values();c<e.length&&((r=e[c])||1);c++)this.resetValue(r.name()+"Callback",b);this.setF("cameraDepth",3);this.setI("undoMax",a.stm.getUndoMax());this.setI("contextDepthMax",100);this.setI("depth",0);this.setF("gestureSwipeFactor",1);this.setB("hideNotSelected",!1);this.setI("historyLevel",0);this.setO("hoverLabel","");this.setB("isKiosk",
a.isKiosk());this.setO("logFile",a.getLogFileName());this.setI("logLevel",JU.Logger.getLogLevel());this.setF("mouseWheelFactor",1.15);this.setF("mouseDragFactor",1);this.setI("navFps",10);this.setI("navigationDepth",0);this.setI("navigationSlab",0);this.setI("navX",0);this.setI("navY",0);this.setI("navZ",0);this.setO("pathForAllFiles","");this.setB("perspectiveDepth",!0);this.setI("perspectiveModel",11);this.setO("picking","identify");this.setO("pickingStyle","toggle");this.setB("refreshing",!0);
this.setI("rotationRadius",0);this.setI("scaleAngstromsPerInch",0);this.setI("scriptReportingLevel",0);this.setB("selectionHalos",!1);this.setB("showaxes",!1);this.setB("showboundbox",!1);this.setB("showfrank",!1);this.setB("showUnitcell",!1);this.setI("slab",100);this.setB("slabEnabled",!1);this.setF("slabrange",0);this.setI("spinX",0);this.setI("spinY",30);this.setI("spinZ",0);this.setI("spinFps",30);this.setF("visualRange",5);this.setI("stereoDegrees",-5);this.setB("syncScript",a.sm.syncingScripts);
this.setB("syncMouse",a.sm.syncingMouse);this.setB("syncStereo",a.sm.stereoSync);this.setB("windowCentered",!0);this.setB("zoomEnabled",!0);this.setI("_version",JV.JC.versionInt);this.setO("_versionDate",JV.Viewer.getJmolVersion());this.setB("axesWindow",!0);this.setB("axesMolecular",!1);this.setB("axesPosition",!1);this.setB("axesUnitcell",!1);this.setI("backgroundModel",0);this.setB("colorRasmol",!1);this.setO("currentLocalPath","");this.setO("defaultLattice","{0 0 0}");this.setO("defaultColorScheme",
"Jmol");this.setO("defaultDirectoryLocal","");this.setO("defaults","Jmol");this.setO("defaultVDW","Jmol");this.setO("exportDrivers","Idtf;Maya;Povray;Vrml;X3d;Stl;Tachyon;Obj");this.setI("propertyAtomNumberColumnCount",0);this.setI("propertyAtomNumberField",0);this.setI("propertyDataColumnCount",0);this.setI("propertyDataField",0);this.setI("undoMax",a.stm.getUndoMax());this.setB("allowEmbeddedScripts",this.allowEmbeddedScripts);this.setB("allowGestures",this.allowGestures);this.setB("allowKeyStrokes",
this.allowKeyStrokes);this.setB("allowModelkit",this.allowModelkit);this.setB("allowMultiTouch",this.allowMultiTouch);this.setB("allowRotateSelected",this.allowRotateSelected);this.setB("allowMoveAtoms",this.allowMoveAtoms);this.setI("animationFps",this.animationFps);this.setB("antialiasImages",this.antialiasImages);this.setB("antialiasDisplay",this.antialiasDisplay);this.setB("antialiasTranslucent",this.antialiasTranslucent);this.setB("appendNew",this.appendNew);this.setO("appletProxy",this.appletProxy);
this.setB("applySymmetryToBonds",this.applySymmetryToBonds);this.setB("atomPicking",this.atomPicking);this.setO("atomTypes",this.atomTypes);this.setB("autoBond",this.autoBond);this.setB("autoFps",this.autoFps);this.setI("axesMode",603979808==this.axesMode?2:603979804==this.axesMode?1:0);this.setF("axesScale",this.axesScale);this.setF("axesOffset",this.axesOffset);this.setB("axesOrientationRasmol",this.axesOrientationRasmol);this.setF("cartoonBlockHeight",this.cartoonBlockHeight);this.setB("cartoonBlocks",
this.cartoonBlocks);this.setB("cartoonSteps",this.cartoonSteps);this.setB("bondModeOr",this.bondModeOr);this.setB("bondPicking",this.bondPicking);this.setI("bondRadiusMilliAngstroms",this.bondRadiusMilliAngstroms);this.setF("bondTolerance",this.bondTolerance);this.setB("cartoonBaseEdges",this.cartoonBaseEdges);this.setB("cartoonFancy",this.cartoonFancy);this.setB("cartoonLadders",this.cartoonLadders);this.setB("cartoonLadders",this.cartoonRibose);this.setB("cartoonRockets",this.cartoonRockets);this.setB("chainCaseSensitive",
this.chainCaseSensitive);this.setB("cipRule6Full",this.cipRule6Full);this.setI("bondingVersion",this.bondingVersion);this.setO("dataSeparator",this.dataSeparator);this.setB("debugScript",this.debugScript);this.setO("defaultAngleLabel",this.defaultAngleLabel);this.setF("defaultDrawArrowScale",this.defaultDrawArrowScale);this.setO("defaultDirectory",this.defaultDirectory);this.setO("defaultDistanceLabel",this.defaultDistanceLabel);this.setO("defaultDropScript",this.defaultDropScript);this.setO("defaultLabelPDB",
this.defaultLabelPDB);this.setO("defaultLabelXYZ",this.defaultLabelXYZ);this.setO("defaultLoadFilter",this.defaultLoadFilter);this.setO("defaultLoadScript",this.defaultLoadScript);this.setB("defaultStructureDSSP",this.defaultStructureDSSP);this.setO("defaultTorsionLabel",this.defaultTorsionLabel);this.setF("defaultTranslucent",this.defaultTranslucent);this.setI("delayMaximumMs",this.delayMaximumMs);this.setF("dipoleScale",this.dipoleScale);this.setB("disablePopupMenu",this.disablePopupMenu);this.setB("displayCellParameters",
this.displayCellParameters);this.setI("dotDensity",this.dotDensity);this.setI("dotScale",this.dotScale);this.setB("dotsSelectedOnly",this.dotsSelectedOnly);this.setB("dotSurface",this.dotSurface);this.setB("dragSelected",this.dragSelected);this.setB("drawHover",this.drawHover);this.setF("drawFontSize",this.drawFontSize);this.setB("drawPicking",this.drawPicking);this.setB("dsspCalculateHydrogenAlways",this.dsspCalcHydrogen);this.setB("elementkey",this.elementKey);this.setB("labelkey",this.labelKey);
this.setB("ellipsoidArcs",this.ellipsoidArcs);this.setB("ellipsoidArrows",this.ellipsoidArrows);this.setB("ellipsoidAxes",this.ellipsoidAxes);this.setF("ellipsoidAxisDiameter",this.ellipsoidAxisDiameter);this.setB("ellipsoidBall",this.ellipsoidBall);this.setI("ellipsoidDotCount",this.ellipsoidDotCount);this.setB("ellipsoidDots",this.ellipsoidDots);this.setB("ellipsoidFill",this.ellipsoidFill);this.setO("energyUnits",this.energyUnits);this.setF("exportScale",this.exportScale);this.setB("doublePrecision",
this.doublePrecision);this.setB("fontScaling",this.fontScaling);this.setB("fontCaching",this.fontCaching);this.setB("forceAutoBond",this.forceAutoBond);this.setO("forceField",this.forceField);this.setB("fractionalRelative",this.fractionalRelative);this.setF("particleRadius",this.particleRadius);this.setB("greyscaleRendering",this.greyscaleRendering);this.setF("hbondsAngleMinimum",this.hbondsAngleMinimum);this.setF("hbondHXDistanceMaximum",this.hbondHXDistanceMaximum);this.setF("hbondsDistanceMaximum",
this.hbondNODistanceMaximum);this.setB("hbondsBackbone",this.hbondsBackbone);this.setB("hbondsRasmol",this.hbondsRasmol);this.setB("hbondsSolid",this.hbondsSolid);this.setI("helixStep",this.helixStep);this.setO("helpPath",this.helpPath);this.setI("hermiteLevel",this.hermiteLevel);this.setB("hideNameInPopup",this.hideNameInPopup);this.setB("hideNavigationPoint",this.hideNavigationPoint);this.setB("hiddenLinesDashed",this.hiddenLinesDashed);this.setB("highResolution",this.highResolutionFlag);this.setF("hoverDelay",
this.hoverDelayMs/1E3);this.setB("imageState",this.imageState);this.setI("infoFontSize",this.infoFontSize);this.setB("isosurfaceKey",this.isosurfaceKey);this.setB("isosurfacePropertySmoothing",this.isosurfacePropertySmoothing);this.setI("isosurfacePropertySmoothingPower",this.isosurfacePropertySmoothingPower);this.setB("jmolInJSpecView",this.jmolInJSpecView);this.setI("labelPointerWidth",this.labelPointerWidth);this.setB("justifyMeasurements",this.justifyMeasurements);this.setB("legacyAutoBonding",
this.legacyAutoBonding);this.setB("legacyHAddition",this.legacyHAddition);this.setB("legacyJavaFloat",this.legacyJavaFloat);this.setF("loadAtomDataTolerance",this.loadAtomDataTolerance);this.setO("loadFormat",this.loadFormat);this.setO("loadLigandFormat",this.pdbLoadLigandFormat);this.setB("logCommands",this.logCommands);this.setB("logGestures",this.logGestures);this.setB("measureAllModels",this.measureAllModels);this.setB("measurementLabels",this.measurementLabels);this.setO("measurementUnits",this.measureDistanceUnits);
this.setI("meshScale",this.meshScale);this.setB("messageStyleChime",this.messageStyleChime);this.setF("minBondDistance",this.minBondDistance);this.setI("minPixelSelRadius",this.minPixelSelRadius);this.setI("minimizationReportSteps",this.minimizationReportSteps);this.setI("minimizationSteps",this.minimizationSteps);this.setB("minimizationRefresh",this.minimizationRefresh);this.setB("minimizationSilent",this.minimizationSilent);this.setF("minimizationCriterion",this.minimizationCriterion);this.setB("mode2d",
this.mode2d);this.setB("modelKitMode",this.modelKitMode);this.setF("modulationScale",this.modulationScale);this.setB("monitorEnergy",this.monitorEnergy);this.setF("multipleBondRadiusFactor",this.multipleBondRadiusFactor);this.setB("multipleBondBananas",this.multipleBondBananas);this.setF("multipleBondSpacing",this.multipleBondSpacing);this.setB("multiProcessor",this.multiProcessor&&1<JV.Viewer.nProcessors);this.setB("navigationMode",this.navigationMode);this.setB("navigationPeriodic",this.navigationPeriodic);
this.setF("navigationSpeed",this.navigationSpeed);this.setB("nboCharges",this.nboCharges);this.setB("noDelay",this.noDelay);this.setO("nmrPredictFormat",this.nmrPredictFormat);this.setO("nmrUrlFormat",this.nmrUrlFormat);this.setB("partialDots",this.partialDots);this.setB("pdbAddHydrogens",this.pdbAddHydrogens);this.setB("pdbGetHeader",this.pdbGetHeader);this.setB("pdbSequential",this.pdbSequential);this.setI("percentVdwAtom",this.percentVdwAtom);this.setI("pickingSpinRate",this.pickingSpinRate);this.setO("pickLabel",
this.pickLabel);this.setI("platformSpeed",this.platformSpeed);this.setF("pointGroupLinearTolerance",this.pointGroupLinearTolerance);this.setF("pointGroupDistanceTolerance",this.pointGroupDistanceTolerance);this.setB("preserveState",this.preserveState);this.setO("propertyColorScheme",this.propertyColorScheme);this.setO("quaternionFrame",this.quaternionFrame);this.setB("rangeSelected",this.rangeSelected);this.setI("repaintWaitMs",this.repaintWaitMs);this.setI("ribbonAspectRatio",this.ribbonAspectRatio);
this.setB("ribbonBorder",this.ribbonBorder);this.setB("rocketBarrels",this.rocketBarrels);this.setB("saveProteinStructureState",this.saveProteinStructureState);this.setB("scriptqueue",this.useScriptQueue);this.setB("selectAllModels",this.selectAllModels);this.setB("selectHetero",this.rasmolHeteroSetting);this.setB("selectHydrogen",this.rasmolHydrogenSetting);this.setF("sheetSmoothing",this.sheetSmoothing);this.setB("showHiddenSelectionHalos",this.showHiddenSelectionHalos);this.setB("showHydrogens",
this.showHydrogens);this.setB("showKeyStrokes",this.showKeyStrokes);this.setB("showMeasurements",this.showMeasurements);this.setB("showModulationVectors",this.showModVecs);this.setB("showMultipleBonds",this.showMultipleBonds);this.setB("showNavigationPointAlways",this.showNavigationPointAlways);this.setI("showScript",this.scriptDelay);this.setB("showtiming",this.showTiming);this.setB("slabByMolecule",this.slabByMolecule);this.setB("slabByAtom",this.slabByAtom);this.setB("smartAromatic",this.smartAromatic);
this.setI("minimizationMaxAtoms",this.minimizationMaxAtoms);this.setI("smallMoleculeMaxAtoms",this.smallMoleculeMaxAtoms);this.setO("smilesUrlFormat",this.smilesUrlFormat);this.setO("macroDirectory",this.macroDirectory);this.setO("nihResolverFormat",this.nihResolverFormat);this.setO("pubChemFormat",this.pubChemFormat);this.setB("showUnitCellDetails",this.showUnitCellDetails);this.setB("solventProbe",this.dotSolvent);this.setF("solventProbeRadius",this.solventProbeRadius);this.setB("ssbondsBackbone",
this.ssbondsBackbone);this.setF("starWidth",this.starWidth);this.setB("statusReporting",this.statusReporting);this.setI("strandCount",this.strandCountForStrands);this.setI("strandCountForStrands",this.strandCountForStrands);this.setI("strandCountForMeshRibbon",this.strandCountForMeshRibbon);this.setF("strutDefaultRadius",this.strutDefaultRadius);this.setF("strutLengthMaximum",this.strutLengthMaximum);this.setI("strutSpacing",this.strutSpacing);this.setB("strutsMultiple",this.strutsMultiple);this.setB("symmetryhermannmauguin",
this.symmetryHermannMauguin);this.setB("testFlag1",this.testFlag1);this.setB("testFlag2",this.testFlag2);this.setB("testFlag3",this.testFlag3);this.setB("testFlag4",this.testFlag4);this.setB("traceAlpha",this.traceAlpha);this.setB("translucent",this.translucent);this.setB("twistedSheets",this.twistedSheets);this.setB("useMinimizationThread",this.useMinimizationThread);this.setB("useNumberLocalization",this.useNumberLocalization);this.setB("vectorsCentered",this.vectorsCentered);this.setF("vectorScale",
this.vectorScale);this.setB("vectorSymmetry",this.vectorSymmetry);this.setI("vectorTrail",this.vectorTrail);this.setF("vibrationPeriod",this.vibrationPeriod);this.setF("vibrationScale",this.vibrationScale);this.setB("waitForMoveTo",this.waitForMoveTo);this.setB("wireframeRotation",this.wireframeRotation);this.setI("zDepth",this.zDepth);this.setB("zeroBasedXyzRasmol",this.zeroBasedXyzRasmol);this.setB("zoomHeight",this.zoomHeight);this.setB("zoomLarge",this.zoomLarge);this.setI("zShadePower",this.zShadePower);
this.setI("zSlab",this.zSlab)},"JV.Viewer,JV.GlobalSettings,~B");c(b,"clear",function(){for(var a=this.htUserVariables.keySet().iterator();a.hasNext();){var b=a.next();("@"==b.charAt(0)||b.startsWith("site_"))&&a.remove()}this.vwr.setPicked(-1,!1);this.setI("_atomhovered",-1);this.setO("_pickinfo","");this.setB("selectionhalos",!1);this.setB("hidenotselected",!1);this.setB("measurementlabels",this.measurementLabels=!0);this.setB("drawHover",this.drawHover=!1);this.vwr.stm.saveScene("DELETE",null)});
c(b,"setUnits",function(a){var b=this.measureDistanceUnits,c=this.energyUnits;a.equalsIgnoreCase("angstroms")?this.measureDistanceUnits="angstroms":a.equalsIgnoreCase("nanometers")||a.equalsIgnoreCase("nm")?this.measureDistanceUnits="nanometers":a.equalsIgnoreCase("picometers")||a.equalsIgnoreCase("pm")?this.measureDistanceUnits="picometers":a.equalsIgnoreCase("bohr")||a.equalsIgnoreCase("au")?this.measureDistanceUnits="au":a.equalsIgnoreCase("vanderwaals")||a.equalsIgnoreCase("vdw")?this.measureDistanceUnits=
"vdw":a.toLowerCase().endsWith("hz")||a.toLowerCase().endsWith("khz")?this.measureDistanceUnits=a.toLowerCase():a.equalsIgnoreCase("kj")?this.energyUnits="kJ":a.equalsIgnoreCase("kcal")&&(this.energyUnits="kcal");b.equalsIgnoreCase(this.measureDistanceUnits)?c.equalsIgnoreCase(this.energyUnits)||this.setO("energyUnits",this.energyUnits):this.setO("measurementUnits",this.measureDistanceUnits)},"~S");c(b,"isJmolVariable",function(a){return"_"==a.charAt(0)||this.htNonbooleanParameterValues.containsKey(a=
a.toLowerCase())||this.htBooleanParameterFlags.containsKey(a)||0<=JV.GlobalSettings.unreportedProperties.indexOf(";"+a+";")},"~S");c(b,"resetValue",function(a,b){this.setO(a,null==b?"":b.getParameter(a,!0))},"~S,JV.GlobalSettings");c(b,"setB",function(a,b){a=a.toLowerCase();this.htNonbooleanParameterValues.containsKey(a)||this.htBooleanParameterFlags.put(a,b?Boolean.TRUE:Boolean.FALSE)},"~S,~B");c(b,"setI",function(a,b){2147483647!=b&&this.setO(a,Integer.$valueOf(b))},"~S,~N");c(b,"setF",function(a,
b){Float.isNaN(b)||this.setO(a,Float.$valueOf(b))},"~S,~N");c(b,"setO",function(a,b){a=a.toLowerCase();null==b||this.htBooleanParameterFlags.containsKey(a)||this.htNonbooleanParameterValues.put(a,b)},"~S,~O");c(b,"removeParam",function(a){a=a.toLowerCase();this.htBooleanParameterFlags.containsKey(a)?(this.htBooleanParameterFlags.remove(a),this.htPropertyFlagsRemoved.containsKey(a)||this.htPropertyFlagsRemoved.put(a,Boolean.FALSE)):this.htNonbooleanParameterValues.containsKey(a)&&this.htNonbooleanParameterValues.remove(a)},
"~S");c(b,"setUserVariable",function(a,b){null!=b&&(a=a.toLowerCase(),this.htUserVariables.put(a,b.setName(a)));return b},"~S,JS.SV");c(b,"unsetUserVariable",function(a){a.equals("all")||a.equals("variables")?(this.htUserVariables.clear(),JU.Logger.info("all user-defined variables deleted")):this.htUserVariables.containsKey(a)&&(JU.Logger.info("variable "+a+" deleted"),this.htUserVariables.remove(a))},"~S");c(b,"removeUserVariable",function(a){this.htUserVariables.remove(a)},"~S");c(b,"getUserVariable",
function(a){if(null==a)return null;a=a.toLowerCase();return this.htUserVariables.get(a)},"~S");c(b,"getParameterEscaped",function(a,b){a=a.toLowerCase();if(this.htNonbooleanParameterValues.containsKey(a)){var c=this.htNonbooleanParameterValues.get(a);return JV.StateManager.varClip(a,JU.Escape.e(c),b)}return this.htBooleanParameterFlags.containsKey(a)?this.htBooleanParameterFlags.get(a).toString():this.htUserVariables.containsKey(a)?this.htUserVariables.get(a).escape():this.htPropertyFlagsRemoved.containsKey(a)?
"false":"<not defined>"},"~S,~N");c(b,"getParameter",function(a,b){var c=this.getParam(a,!1);return null==c&&b?"":c},"~S,~B");c(b,"getAndSetNewVariable",function(a,b){if(null==a||0==a.length)a="x";var c=this.getParam(a,!0);return null==c&&b&&"_"!=a.charAt(0)?this.setUserVariable(a,JS.SV.newV(4,"")):JS.SV.getVariable(c)},"~S,~B");c(b,"getParam",function(a,b){a=a.toLowerCase();if(a.equals("_memory")){var c=JU.DF.formatDecimal(0,1)+"/"+JU.DF.formatDecimal(0,1);this.htNonbooleanParameterValues.put("_memory",
c)}return this.htNonbooleanParameterValues.containsKey(a)?this.htNonbooleanParameterValues.get(a):this.htBooleanParameterFlags.containsKey(a)?this.htBooleanParameterFlags.get(a):this.htPropertyFlagsRemoved.containsKey(a)?Boolean.FALSE:this.htUserVariables.containsKey(a)?(c=this.htUserVariables.get(a),b?c:JS.SV.oValue(c)):null},"~S,~B");c(b,"getVariableList",function(){return JV.StateManager.getVariableList(this.htUserVariables,0,!0,!1)});c(b,"setStructureList",function(a,b){this.haveSetStructureList=
!0;this.structureList.put(b,a)},"~A,J.c.STR");c(b,"getStructureList",function(){return this.structureList});b.doReportProperty=c(b,"doReportProperty",function(a){return"_"!=a.charAt(0)&&0>JV.GlobalSettings.unreportedProperties.indexOf(";"+a+";")},"~S");c(b,"getAllVariables",function(){var a=new java.util.Hashtable;a.putAll(this.htBooleanParameterFlags);a.putAll(this.htNonbooleanParameterValues);a.putAll(this.htUserVariables);return a});c(b,"getLoadState",function(a){var b=new JU.SB;this.app(b,"set allowEmbeddedScripts false");
this.allowEmbeddedScripts&&this.setB("allowEmbeddedScripts",!0);this.app(b,"set appendNew "+this.appendNew);this.app(b,"set appletProxy "+JU.PT.esc(this.appletProxy));this.app(b,"set applySymmetryToBonds "+this.applySymmetryToBonds);0<this.atomTypes.length&&this.app(b,"set atomTypes "+JU.PT.esc(this.atomTypes));this.app(b,"set autoBond "+this.autoBond);this.axesOrientationRasmol&&this.app(b,"set axesOrientationRasmol true");this.app(b,"set bondRadiusMilliAngstroms "+this.bondRadiusMilliAngstroms);
this.app(b,"set bondTolerance "+this.bondTolerance);this.app(b,"set defaultLattice "+JU.Escape.eP(this.ptDefaultLattice));this.app(b,"set defaultLoadFilter "+JU.PT.esc(this.defaultLoadFilter));this.app(b,'set defaultLoadScript ""');0<this.defaultLoadScript.length&&this.setO("defaultLoadScript",this.defaultLoadScript);this.app(b,"set defaultStructureDssp "+this.defaultStructureDSSP);var c=this.vwr.getDefaultVdwNameOrData(-2147483648,null,null);this.app(b,"set defaultVDW "+c);c.equals("User")&&this.app(b,
this.vwr.getDefaultVdwNameOrData(2147483647,null,null));this.app(b,"set forceAutoBond "+this.forceAutoBond);this.app(b,"#set defaultDirectory "+JU.PT.esc(this.defaultDirectory));this.app(b,"#set loadFormat "+JU.PT.esc(this.loadFormat));this.app(b,"#set loadLigandFormat "+JU.PT.esc(this.pdbLoadLigandFormat));this.app(b,"#set smilesUrlFormat "+JU.PT.esc(this.smilesUrlFormat));this.app(b,"#set nihResolverFormat "+JU.PT.esc(this.nihResolverFormat));this.app(b,"#set pubChemFormat "+JU.PT.esc(this.pubChemFormat));
this.app(b,"set bondingVersion "+this.bondingVersion);this.app(b,"set legacyAutoBonding "+this.legacyAutoBonding);this.app(b,"set legacyAutoBonding "+this.legacyAutoBonding);this.app(b,"set legacyHAddition "+this.legacyHAddition);this.app(b,"set legacyJavaFloat "+this.legacyJavaFloat);this.app(b,"set minBondDistance "+this.minBondDistance);this.app(b,"set minimizationCriterion  "+this.minimizationCriterion);this.app(b,"set minimizationSteps  "+this.minimizationSteps);this.app(b,"set multipleBondBananas false");
this.app(b,"set pdbAddHydrogens "+(null!=a&&a.get("pdbNoHydrogens")!==Boolean.TRUE?this.pdbAddHydrogens:!1));this.app(b,"set pdbGetHeader "+this.pdbGetHeader);this.app(b,"set pdbSequential "+this.pdbSequential);this.app(b,"set percentVdwAtom "+this.percentVdwAtom);this.app(b,"set smallMoleculeMaxAtoms "+this.smallMoleculeMaxAtoms);this.app(b,"set smartAromatic "+this.smartAromatic);this.zeroBasedXyzRasmol&&this.app(b,"set zeroBasedXyzRasmol true");return b.toString()},"java.util.Map");c(b,"app",function(a,
b){0!=b.length&&a.append("  ").append(b).append(";\n")},"JU.SB,~S");c(b,"setCIR",function(a,b){if(!(null==a||a.equals(this.nihResolverFormat)&&null!=this.smilesUrlFormat)){var c=a.indexOf("/structure");0<c&&(this.nihResolverFormat=a.substring(0,c+10),this.smilesUrlFormat=this.nihResolverFormat+"/%FILE/file?format=sdf&get3d=true",b&&JU.Logger.info("CIR resolver set to "+this.nihResolverFormat+" template="+a))}},"~S,~B");b.unreportedProperties=(";ambientpercent;animationfps;antialiasdisplay;antialiasimages;antialiastranslucent;appendnew;axescolor;axesposition;axesmolecular;axesorientationrasmol;axesunitcell;axeswindow;axis1color;axis2color;axis3color;backgroundcolor;backgroundmodel;bondsymmetryatoms;boundboxcolor;cameradepth;bondingversion;ciprule6full;contextdepthmax;debug;debugscript;defaultlatttice;defaults;defaultdropscript;diffusepercent;;exportdrivers;exportscale;_filecaching;_filecache;fontcaching;fontscaling;forcefield;language;hbondsDistanceMaximum;hbondsangleminimum;jmolinJSV;legacyautobonding;legacyhaddition;legacyjavafloat;loglevel;logfile;loggestures;logcommands;measurestylechime;loadformat;loadligandformat;macrodirectory;mkaddhydrogens;minimizationmaxatoms;smilesurlformat;pubchemformat;nihresolverformat;edsurlformat;edsurlcutoff;multiprocessor;navigationmode;;nodelay;pathforallfiles;perspectivedepth;phongexponent;perspectivemodel;platformspeed;preservestate;refreshing;repaintwaitms;rotationradius;selectallmodels;showaxes;showaxis1;showaxis2;showaxis3;showboundbox;showfrank;showtiming;showunitcell;slabenabled;slab;slabrange;depth;zshade;zshadepower;specular;specularexponent;specularpercent;celshading;celshadingpower;specularpower;stateversion;statusreporting;stereo;stereostate;vibrationperiod;unitcellcolor;visualrange;windowcentered;zerobasedxyzrasmol;zoomenabled;mousedragfactor;mousewheelfactor;scriptqueue;scriptreportinglevel;syncscript;syncmouse;syncstereo;defaultdirectory;currentlocalpath;defaultdirectorylocal;ambient;bonds;colorrasmol;diffuse;fractionalrelative;frank;hetero;hidenotselected;hoverlabel;hydrogen;languagetranslation;measurementunits;navigationdepth;navigationslab;picking;pickingstyle;propertycolorscheme;radius;rgbblue;rgbgreen;rgbred;scaleangstromsperinch;selectionhalos;showscript;showselections;solvent;strandcount;spinx;spiny;spinz;spinfps;navx;navy;navz;navfps;"+
J.c.CBK.getNameList()+";undo;undoauto;undomax;atompicking;drawpicking;bondpicking;pickspinrate;picklabel;modelkitmode;autoplaymovie;allowaudio;allowgestures;allowkeystrokes;allowmultitouch;allowmodelkit;dodrop;hovered;historylevel;imagestate;iskiosk;useminimizationthread;checkcir;resolverresolver;showkeystrokes;saveproteinstructurestate;testflag1;testflag2;testflag3;testflag4;selecthetero;selecthydrogen;pointgrouplineartolerance;pointgroupdistancetolerance;minimizationreportsteps;labelkey;elementkey;symmetryhermannmauguin;mode2d;").toLowerCase()});
n("JV");z(["java.util.Hashtable","JU.SB","$.V3","JU.Elements"],"JV.JC",["JU.PT","J.i18n.GT","JU.Logger"],function(){var b=G(JV,"JC",null);b.getNBOTypeFromName=c(b,"getNBOTypeFromName",function(a){a=";AO;;;;PNAO;;NAO;;;PNHO;;NHO;;;PNBO;;NBO;;;PNLMO;NLMO;;MO;;;;NO;;;;;;;;;;PRNBO;RNBO;;;;;;;;".indexOf(";"+a+";");return 0>a?a:v(a/6)+31},"~S");b.getCIPChiralityName=c(b,"getCIPChiralityName",function(a){switch(a){case 13:return"Z";case 5:return"z";case 14:return"E";case 6:return"e";case 17:return"M";case 18:return"P";
case 1:return"R";case 2:return"S";case 9:return"r";case 10:return"s";case 25:return"m";case 26:return"p";case 7:return"?";default:return""}},"~N");b.getCIPRuleName=c(b,"getCIPRuleName",function(a){return JV.JC.ruleNames[a]},"~N");b.getCIPChiralityCode=c(b,"getCIPChiralityCode",function(a){switch(a.charCodeAt(0)){case 90:return 13;case 122:return 5;case 69:return 14;case 101:return 6;case 82:return 1;case 83:return 2;case 114:return 9;case 115:return 10;case 63:return 7;default:return 0}},"~S");b.fixOptimadeCall=
c(b,"fixOptimadeCall",function(a){var b=a.indexOf("response_fields=")+16;if(16>b)b=a.indexOf("?"),a+=(0>b?"?":"&")+"response_fields=chemical_formula_descriptive,dimension_types,lattice_vectors,cartesian_site_positions,species_at_sites,species";else{for(var d=","+a.substring(b,(a+"&").indexOf("&",b))+",",c=d.length,h=0,e=0;0<=h;h=e){e=",chemical_formula_descriptive,dimension_types,lattice_vectors,cartesian_site_positions,species_at_sites,species,".indexOf(",",h+1);if(0>e)break;h=",chemical_formula_descriptive,dimension_types,lattice_vectors,cartesian_site_positions,species_at_sites,species,".substring(h,
e+1);0>d.indexOf(h)&&(d+=h.substring(1))}a=a.substring(0,b)+d.substring(1,d.length-1)+a.substring(b+c-2)}return a},"~S");b.resolveDataBase=c(b,"resolveDataBase",function(a,b,d){if(null==d){if(null==(d=JV.JC.databases.get(a.toLowerCase())))return null;var c=b.indexOf("/");0>c&&(a.equals("pubchem")?b="name/"+b:a.equals("nci")&&(b+="/file?format=sdf&get3d=true"));d.startsWith("'")&&(c=b.indexOf("."),a=0<c?JU.PT.parseInt(b.substring(c+1)):0,0<c&&(b=b.substring(0,c)),d=JU.PT.rep(d,"%n",""+a))}else 0<=
b.indexOf(".")&&0<=d.indexOf("%FILE.")&&(d=d.substring(0,d.indexOf("%FILE")));if(0<=d.indexOf("%c")){c=1;for(a=b.length;c<=a;c++)0<=d.indexOf("%c"+c)&&(d=JU.PT.rep(d,"%c"+c,b.substring(c-1,c).toLowerCase()))}return 0<=d.indexOf("%FILE")?JU.PT.rep(d,"%FILE",b):0<=d.indexOf("%file")?JU.PT.rep(d,"%file",b.toLowerCase()):d+b},"~S,~S,~S");b.fixProtocol=c(b,"fixProtocol",function(a){var b=null!=a&&0<=a.indexOf("http"),b=null==a||!b?a:0==a.indexOf("http://www.rcsb.org/pdb/files/")?JV.JC.resolveDataBase(0<=
a.indexOf("/ligand/")?"ligand":"pdb",a.substring(a.lastIndexOf("/")+1),null):0==a.indexOf("http://www.ebi")||0==a.indexOf("http://rruff")||0==a.indexOf("http://pubchem")||0==a.indexOf("http://cactus")||0==a.indexOf("http://www.materialsproject")?"https://"+a.substring(7):0<a.indexOf("optimade")?JV.JC.fixOptimadeCall(a):a;b!==a&&JU.Logger.info("JC.fixProtocol "+a+" --\x3e "+b);return b},"~S");b.embedScript=c(b,"embedScript",function(a){return"\n/****** Jmol Embedded Script **** \n"+a+"\n**/"},"~S");
b.getShapeVisibilityFlag=c(b,"getShapeVisibilityFlag",function(a){return 16<<Math.min(a,26)},"~N");b.shapeTokenIndex=c(b,"shapeTokenIndex",function(a){switch(a){case 1153433601:case 1073741859:return 0;case 1677721602:case 659488:return 1;case 1613238294:return 2;case 1611141176:return 3;case 659482:return 4;case 1825200146:return 5;case 1745489939:case 537006096:return 6;case 1112152076:return 7;case 1112152070:return 8;case 1114249217:return 9;case 1112152078:return 10;case 1112152066:return 11;
case 1649022989:return 12;case 1112152071:return 13;case 1112152073:return 14;case 1112152074:return 15;case 1112150019:return 16;case 135175:return 17;case 135198:return 18;case 1112150021:return 19;case 1112150020:return 20;case 1275203608:return 21;case 135174:return 23;case 135176:return 22;case 135180:return 24;case 134353926:return 25;case 135182:return 26;case 1073877010:return 27;case 1073877011:return 28;case 135188:return 29;case 135190:return 30;case 537022465:return 31;case 1611272194:return 34;
case 1812599299:return 32;case 1814695966:return 33;case 544771:return 35;case 1611272202:return 36}return-1},"~N");b.getShapeClassName=c(b,"getShapeClassName",function(a,b){return 0>a?JV.JC.shapeClassBases[~a]:"J."+(b?"render":"shape")+(9<=a&&16>a?"bio.":16<=a&&23>a?"special.":24<=a&&30>a?"surface.":23==a?"cgo.":".")+JV.JC.shapeClassBases[a]},"~N,~B");b.getEchoName=c(b,"getEchoName",function(a){return JV.JC.echoNames[a]},"~N");b.setZPosition=c(b,"setZPosition",function(a,b){return a&-49|b},"~N,~N");
b.setPointer=c(b,"setPointer",function(a,b){return a&-4|b},"~N,~N");b.getPointer=c(b,"getPointer",function(a){return a&3},"~N");b.getPointerName=c(b,"getPointerName",function(a){return 0==(a&1)?"":0<(a&2)?"background":"on"},"~N");b.isOffsetAbsolute=c(b,"isOffsetAbsolute",function(a){return 0!=(a&64)},"~N");b.getOffset=c(b,"getOffset",function(a,b,d){a=Math.min(Math.max(a,-500),500);b=Math.min(Math.max(b,-500),500);var c=(a&1023)<<21|(b&1023)<<11|(d?64:0);if(c==JV.JC.LABEL_DEFAULT_OFFSET)c=0;else if(!d&&
(0==a||0==b))c|=256;return c},"~N,~N,~B");b.getXOffset=c(b,"getXOffset",function(a){if(0==a)return 4;a=a>>21&1023;return 500<a?a-1023-1:a},"~N");b.getYOffset=c(b,"getYOffset",function(a){if(0==a)return 4;a=a>>11&1023;return 500<a?a-1023-1:a},"~N");b.getAlignment=c(b,"getAlignment",function(a){return a&12},"~N");b.setHorizAlignment=c(b,"setHorizAlignment",function(a,b){return a&-13|b},"~N,~N");b.getHorizAlignmentName=c(b,"getHorizAlignmentName",function(a){return JV.JC.hAlignNames[a>>2&3]},"~N");b.isSmilesCanonical=
c(b,"isSmilesCanonical",function(a){return null!=a&&JU.PT.isOneOf(a.toLowerCase(),";/cactvs///;/cactus///;/nci///;/canonical///;")},"~S");b.getServiceCommand=c(b,"getServiceCommand",function(a){return 7>a.length?-1:"JSPECVIPEAKS: SELECT:JSVSTR:H1SIMULC13SIMUNBO:MODNBO:RUNNBO:VIENBO:SEANBO:CONNONESIM".indexOf(a.substring(0,7).toUpperCase())},"~S");b.getUnitIDFlags=c(b,"getUnitIDFlags",function(a){var b=14;0==a.indexOf("-")&&(0<a.indexOf("m")&&(b|=1),0>a.indexOf("a")&&(b^=4),0<a.indexOf("t")&&(b|=16));
return b},"~S");b.getBoolName=c(b,"getBoolName",function(a){return JV.JC.globalBooleans[a]},"~N");b.isSpaceGroupInfoKey=c(b,"isSpaceGroupInfoKey",function(a){return 0<=a.indexOf("nitCell")||a.equals("coordinatesAreFractional")||a.startsWith("spaceGroup")||0<=a.indexOf("ymmet")||a.startsWith("lattice")||a.startsWith("intlTable")},"~S");b.getMenuScript=c(b,"getMenuScript",function(a){return"openPDB"===a?"var x__id__ = _modelTitle; if (x__id__.length != 4) { x__id__ = '1crn'};x__id__ = prompt('"+J.i18n.GT.$('Enter a four-digit PDB model ID or "=" and a three-digit ligand ID')+
"',x__id__);if (!x__id__) { quit }; load @{'=' + x__id__}":"openMOL"===a?"var x__id__ = _smilesString; if (!x__id__) { x__id__ = 'tylenol'};x__id__ = prompt('"+J.i18n.GT.$('Enter the name or identifier (SMILES, InChI, CAS) of a compound. Preface with ":" to load from PubChem; otherwise Jmol will use the NCI/NIH Resolver.')+"',x__id__);if (!x__id__) { quit }; load @{(x__id__[1]==':' ? x__id__ : '$' + x__id__)}":null},"~S");b.axisLabels=u(-1,["+X","+Y","+Z",null,null,null,"a","b","c","X","Y","Z",null,
null,null,"X",null,"Z",null,"(Y)",null]);b.axesTypes=u(-1,"abcxyz".split(""));b.ruleNames=u(-1," 1a 1b 2 3 4a 4b 4c 5 6".split(" "));b.databaseArray=u(-1,"itatable;https://www.cryst.ehu.es/cgi-bin/cryst/programs/nph-getgen?gnum=%FILE&what=gp&list=Standard%2FDefault+Setting;itadiagramita;https://onlinelibrary.wiley.com/iucr/itc/Ac/ch2o3v0001/sgtable2o3o%FILE;itadiagram;http://img.chem.ucl.ac.uk/sgp/large/%FILEaz1.htm;aflowbin;http://aflowlib.mems.duke.edu/users/jmolers/binary_new/%FILE.aflow_binary;aflowlib;https://aflow.org/p/%FILE.cif;aflowpro;$aflowlib;ams;'https://rruff.geo.arizona.edu/AMS/viewJmol.php?'+(0+'%file'==0? 'mineral':('%file'.length==7? 'amcsd':'id'))+'=%file&action=showcif#_DOCACHE_';dssr;http://dssr-jmol.x3dna.org/report.php?id=%FILE&opts=--json=ebi;dssrModel;http://dssr-jmol.x3dna.org/report.php?POST?opts=--json=ebi&model=;iucr;http://scripts.iucr.org/cgi-bin/sendcif_yard?%FILE;cod;http://www.crystallography.net/cod/cif/%c1/%c2%c3/%c4%c5/%FILE.cif;nmr;https://www.nmrdb.org/new_predictor?POST?molfile=;nmrdb;https://www.nmrdb.org/service/predictor?POST?molfile=;nmrdb13;https://www.nmrdb.org/service/jsmol13c?POST?molfile=;magndata;http://webbdcrista1.ehu.es/magndata/mcif/%FILE.mcif;rna3d;http://rna.bgsu.edu/rna3dhub/%TYPE/download/%FILE;mmtf;https://mmtf.rcsb.org/v1.0/full/%FILE;bcif;https://models.rcsb.org/%file.bcif;chebi;https://www.ebi.ac.uk/chebi/saveStructure.do?defaultImage=true&chebiId=%file%2D%;ligand;https://files.rcsb.org/ligands/download/%FILE.cif;nci;https://cactus.nci.nih.gov/chemical/structure/;pdb;https://files.rcsb.org/download/%FILE.pdb;pdb0;https://files.rcsb.org/download/%FILE.pdb;pdbe;https://www.ebi.ac.uk/pdbe/entry-files/download/%file.cif;pdbe2;https://www.ebi.ac.uk/pdbe/static/entry/%file_updated.cif;pubchem;https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/%FILE/SDF?record_type=3d;map;https://www.ebi.ac.uk/pdbe/api/%TYPE/%FILE?pretty=false&metadata=true;pdbemap;https://www.ebi.ac.uk/pdbe/coordinates/files/%file.ccp4;pdbemapdiff;https://www.ebi.ac.uk/pdbe/coordinates/files/%file_diff.ccp4;pdbemapserver;https://www.ebi.ac.uk/pdbe/volume-server/x-ray/%file/box/0,0,0/0,0,0?detail=6&space=cartesian&encoding=bcif;pdbemapdiffserver;https://www.ebi.ac.uk/pdbe/volume-server/x-ray/%file/box/0,0,0/0,0,0?detail=6&space=cartesian&encoding=bcif&diff=1;emdbmap;https://www.ebi.ac.uk/pdbe/volume-server/emd/emd-%file/cell?detail=6&space=cartesian&encoding=bcif;emdbquery;https://www.ebi.ac.uk/emdb/api/search/fitted_pdbs:%file?fl=emdb_id,map_contour_level_value&wt=csv;emdbmapserver;https://www.ebi.ac.uk/pdbe/volume-server/emd/emd-%file/box/0,0,0/0,0,0?detail=6&space=cartesian&encoding=bcif;xxxresolverResolver;https://chemapps.stolaf.edu/resolver;smiles2d;https://cirx.chemicalcreatures.com/chemical/structure/%FILE/file?format=sdf&get3d=false;smiles3d;https://cirx.chemicalcreatures.com/chemical/structure/%FILE/file?format=sdf&get3d=true".split(";"));
b.databases=new java.util.Hashtable;for(var a=0;a<JV.JC.databaseArray.length;a+=2){var d=JV.JC.databaseArray[a+1];"$"==d.charAt(0)&&(d=JV.JC.databases.get(d.substring(1)));JV.JC.databases.put(JV.JC.databaseArray[a].toLowerCase(),d)}var h=d=b.majorVersion=null,d=Jmol.___JmolVersion,h=Jmol.___JmolDate;null!=h&&(h=h.substring(7,23));JV.JC.version=null!=d?d:"(Unknown_version)";JV.JC.majorVersion=null!=d?d:"(Unknown_version)";JV.JC.date=null!=h?h:"(Unknown_date)";d=-1;try{var r=JV.JC.version,h="",a=r.indexOf(".");
0>a&&(d=1E5*Integer.parseInt(r),r=null);if(null!=r&&(d=1E5*Integer.parseInt(h=r.substring(0,a)),r=r.substring(a+1),a=r.indexOf("."),0>a&&(d+=1E3*Integer.parseInt(r),r=null),null!=r)){var e=r.substring(0,a);JV.JC.majorVersion=h+("."+e);d+=1E3*Integer.parseInt(e);r=r.substring(a+1);a=r.indexOf("_");0<=a&&(r=r.substring(0,a));a=r.indexOf(" ");0<=a&&(r=r.substring(0,a));d+=Integer.parseInt(r)}}catch(f){if(!D(f,"NumberFormatException"))throw f;}JV.JC.versionInt=d;b.center=JU.V3.new3(0,0,0);b.axisX=JU.V3.new3(1,
0,0);b.axisY=JU.V3.new3(0,1,0);b.axisZ=JU.V3.new3(0,0,1);b.axisNX=JU.V3.new3(-1,0,0);b.axisNY=JU.V3.new3(0,-1,0);b.axisNZ=JU.V3.new3(0,0,-1);b.unitAxisVectors=u(-1,[JV.JC.axisX,JV.JC.axisY,JV.JC.axisZ,JV.JC.axisNX,JV.JC.axisNY,JV.JC.axisNZ]);b.altArgbsCpk=E(-1,[4294907027,4290750118,4294967088,4283897743,4294967232,4294967200,4292401368,4283453520,4282400832,4279259216]);b.FORMAL_CHARGE_COLIX_RED=JU.Elements.elementSymbols.length+JV.JC.altArgbsCpk.length;b.argbsFormalCharge=E(-1,[4294901760,4294918208,
4294934656,4294951104,4294967295,4292401407,4290032895,4287664383,4285295871,4282927359,4280558847,4278190335]);b.PARTIAL_CHARGE_COLIX_RED=JV.JC.FORMAL_CHARGE_COLIX_RED+JV.JC.argbsFormalCharge.length;b.argbsRwbScale=E(-1,[4294901760,4294905872,4294909984,4294914096,4294918208,4294922320,4294926432,4294930544,4294934656,4294938768,4294942880,4294946992,4294951104,4294955216,4294959328,4294967295,4292927743,4291875071,4290822399,4289769727,4288717055,4287664383,4286611711,4285559039,4284506367,4283453695,
4282401023,4281348351,4280295679,4279243007,4278190335]);b.PARTIAL_CHARGE_RANGE_SIZE=JV.JC.argbsRwbScale.length;b.argbsRoygbScale=E(-1,[4294901760,4294909952,4294918144,4294926336,4294934528,4294942720,4294950912,4294959104,4294963200,4294967040,4293980160,4292935424,4290838272,4288741120,4286643968,4284546816,4282449664,4280352512,4278255360,4278255392,4278255424,4278255456,4278255488,4278255520,4278255552,4278255584,4278255615,4278247679,4278239487,4278231295,4278223103,4278214911,4278206719,4278198527,
4278190335]);b.predefinedVariable=u(-1,"@_1H _H & !(_2H,_3H);@_12C _C & !(_13C,_14C);@_14N _N & !(_15N);@solvent water, (_g>=45 & _g<48);@ligand _g=0|!(_g<46,protein,nucleic,water);@turn structure=1;@sheet structure=2;@helix structure=3;@helix310 substructure=7;@helixalpha substructure=8;@helixpi substructure=9;@bulges within(dssr,'bulges');@coaxStacks within(dssr,'coaxStacks');@hairpins within(dssr,'hairpins');@hbonds within(dssr,'hbonds');@helices within(dssr,'helices');@iloops within(dssr,'iloops');@isoCanonPairs within(dssr,'isoCanonPairs');@junctions within(dssr,'junctions');@kissingLoops within(dssr,'kissingLoops');@multiplets within(dssr,'multiplets');@nonStack within(dssr,'nonStack');@nts within(dssr,'nts');@pairs within(dssr,'pairs');@ssSegments within(dssr,'ssSegments');@stacks within(dssr,'stacks');@stems within(dssr,'stems')".split(";"));
b.predefinedStatic=u(-1,"@amino _g>0 & _g<=23;@acidic asp,glu;@basic arg,his,lys;@charged acidic,basic;@negative acidic;@positive basic;@neutral amino&!(acidic,basic);@polar amino&!hydrophobic;@peptide protein&within(chain,monomer>1)&!within(chain,monomer>12);@cyclic his,phe,pro,trp,tyr;@acyclic amino&!cyclic;@aliphatic ala,gly,ile,leu,val;@aromatic his,phe,trp,tyr;@cystine within(group,(cys,cyx)&atomname=sg&connected((cys,cyx)&atomname=sg));@buried ala,cys,ile,leu,met,phe,trp,val;@surface amino&!buried;@hydrophobic ala,gly,ile,leu,met,phe,pro,trp,tyr,val;@mainchain backbone;@small ala,gly,ser;@medium asn,asp,cys,pro,thr,val;@large arg,glu,gln,his,ile,leu,lys,met,phe,trp,tyr;@c nucleic & ([C] or [DC] or within(group,_a=42));@g nucleic & ([G] or [DG] or within(group,_a=43));@cg c,g;@a nucleic & ([A] or [DA] or within(group,_a=44));@t nucleic & ([T] or [DT] or within(group,_a=45 | _a=49));@at a,t;@i nucleic & ([I] or [DI] or within(group,_a=46) & !g);@u nucleic & ([U] or [DU] or within(group,_a=47) & !t);@tu nucleic & within(group,_a=48);@ions _g>=46&_g<48;@alpha _a=2;@_bb protein&(_a>=1&_a<6|_a=64) | nucleic&(_a>=6&_a<14|_a>=73&&_a<=79||_a==99||_a=100);@backbone _bb | _H && connected(single, _bb);@spine protein&_a>=1&_a<4|nucleic&(_a>=6&_a<11|_a=13);@sidechain (protein,nucleic) & !backbone;@base nucleic & !backbone;@dynamic_flatring search('[a]');@nonmetal _H,_He,_B,_C,_N,_O,_F,_Ne,_Si,_P,_S,_Cl,_Ar,_As,_Se,_Br,_Kr,_Te,_I,_Xe,_At,_Rn;@metal !nonmetal && !_Xx;@alkaliMetal _Li,_Na,_K,_Rb,_Cs,_Fr;@alkalineEarth _Be,_Mg,_Ca,_Sr,_Ba,_Ra;@nobleGas _He,_Ne,_Ar,_Kr,_Xe,_Rn;@metalloid _B,_Si,_Ge,_As,_Sb,_Te;@transitionMetal elemno>=21&elemno<=30|elemno=57|elemno=89|elemno>=39&elemno<=48|elemno>=72&elemno<=80|elemno>=104&elemno<=112;@lanthanide elemno>57&elemno<=71;@actinide elemno>89&elemno<=103".split(";"));
b.shapeClassBases=u(-1,"Balls Sticks Hsticks Sssticks Struts Labels Measures Stars Halos Backbone Trace Cartoon Strands MeshRibbon Ribbons Rockets Dots Dipoles Vectors GeoSurface Ellipsoids Polyhedra Draw CGO Isosurface Contact LcaoCartoon MolecularOrbital NBO Pmesh Plot3D Echo Bbcage Uccage Axes Hover Frank".split(" "));b.LABEL_DEFAULT_OFFSET=8396800;b.echoNames=u(-1,["top","bottom","middle","xy","xyz"]);b.hAlignNames=u(-1,["","left","center","right"]);b.READER_NOT_FOUND="File reader was not found:";
b.BASE64_TAG=";base64,";b.globalBooleans=u(-1,"someModelsHaveFractionalCoordinates someModelsHaveSymmetry someModelsHaveUnitcells someModelsHaveCONECT isPDB someModelsHaveDomains someModelsHaveValidations isSupercell someModelsHaveAromaticBonds someModelsAreModulated".split(" "))});n("JV");z(["java.io.IOException"],"JV.JmolAsyncException",null,function(){var b=w(function(){this.fileName=null;q(this,arguments)},JV,"JmolAsyncException",java.io.IOException);x(b,function(a){I(this,JV.JmolAsyncException,
[]);this.fileName=a},"~S");c(b,"getFileName",function(){return this.fileName})});n("JV");z(null,"JV.ModelManager",["JM.ModelLoader"],function(){var b=w(function(){this.fileName=this.modelSetPathName=this.modelSet=this.vwr=null;q(this,arguments)},JV,"ModelManager",null);x(b,function(a){this.vwr=a},"JV.Viewer");c(b,"zap",function(){this.modelSetPathName=this.fileName=null;new JM.ModelLoader(this.vwr,this.vwr.getZapName(),null,null,null,null)});c(b,"createModelSet",function(a,b,c,r,e,f){var j=null;f?
(j=this.modelSet.modelSetName,j.equals("zapped")?j=null:0>j.indexOf(" (modified)")&&(j+=" (modified)")):null==r?this.zap():(this.modelSetPathName=a,this.fileName=b);null!=r&&(null==j&&(j=this.vwr.getModelAdapter().getAtomSetCollectionName(r),null!=j&&(j=j.trim(),0==j.length&&(j=null)),null==j&&(j=JV.ModelManager.reduceFilename(b))),new JM.ModelLoader(this.vwr,j,c,r,f?this.modelSet:null,e));0==this.modelSet.ac&&!this.modelSet.getMSInfoB("isPyMOL")&&this.zap()},"~S,~S,JU.SB,~O,JU.BS,~B");b.reduceFilename=
c(b,"reduceFilename",function(a){if(null==a)return null;var b=a.indexOf(".");0<b&&(a=a.substring(0,b));24<a.length&&(a=a.substring(0,20)+" ...");return a},"~S");c(b,"createAtomDataSet",function(a,b){return JM.ModelLoader.createAtomDataSet(this.vwr,this.modelSet,b,a,this.vwr.bsA())},"~O,~N")});n("JV");var wa=w(function(){this.y=this.x=-1E3;this.modifiers=0;this.time=-1;this.name=null;this.keybuf=0;q(this,arguments)},JV,"MouseState",null);x(wa,function(b){this.name=b},"~S");c(wa,"set",function(b,a,
d,c){this.time=b;this.x=a;this.y=d;this.modifiers=c},"~N,~N,~N,~N");c(wa,"setCurrent",function(b,a){this.time=b.time;2>a&&(this.x=b.x,this.y=b.y);this.modifiers=b.modifiers},"JV.MouseState,~N");c(wa,"inRange",function(b,a,d){return Math.abs(this.x-a)<=b&&Math.abs(this.y-d)<=b},"~N,~N,~N");c(wa,"check",function(b,a,d,c,r,e){return this.modifiers==c&&(2147483647<=e?this.inRange(b,a,d):r-this.time<e&&20<r-this.time)},"~N,~N,~N,~N,~N,~N");c(wa,"is",function(b){return b.x==this.x&&b.y==this.y&&b.time==
this.time},"JV.MouseState");n("JV");z(["JU.BS"],"JV.SelectionManager",["JU.AU","J.i18n.GT","JU.BSUtil"],function(){var b=w(function(){this.noneSelected=this.bsDeleted=this.bsSubset=this.bsFixed=this.bsSelection=this.bsHidden=this.listeners=this.vwr=null;this.empty=1;this.hideNotSelected=!1;this.bsTemp=null;q(this,arguments)},JV,"SelectionManager",null);N(b,function(){this.listeners=[];this.bsHidden=new JU.BS;this.bsSelection=new JU.BS;this.bsFixed=new JU.BS;this.bsTemp=new JU.BS});x(b,function(a){this.vwr=
a},"JV.Viewer");c(b,"processDeletedModelAtoms",function(a){JU.BSUtil.deleteBits(this.bsDeleted,a);JU.BSUtil.deleteBits(this.bsSubset,a);JU.BSUtil.deleteBits(this.bsFixed,a);JU.BSUtil.deleteBits(this.bsHidden,a);var b=JU.BSUtil.copy(this.bsSelection);JU.BSUtil.deleteBits(b,a);this.setSelectionSet(b,0);this.selectionChanged(!1)},"JU.BS");c(b,"clear",function(){this.clearSelection(!0);this.setSelectionSubset(null);this.hide(null,null,0,!0);this.bsDeleted=null;this.setMotionFixedAtoms(null)});c(b,"display",
function(a,b,c,r){switch(c){default:c=null==this.bsSubset?null:JU.BSUtil.andNot(JU.BSUtil.copy(this.bsHidden),this.bsSubset);var e=a.getModelAtomBitSetIncludingDeleted(-1,!1);this.bsHidden.or(e);null!=c&&(this.bsHidden.and(this.bsSubset),this.bsHidden.or(c));case 1275069441:null!=b&&this.bsHidden.andNot(b);break;case 1073742119:null!=b&&this.bsHidden.or(b)}JU.BSUtil.andNot(this.bsHidden,this.bsDeleted);a.setBsHidden(this.bsHidden);r||this.vwr.reportSelection(J.i18n.GT.i(J.i18n.GT.$("{0} atoms hidden"),
this.bsHidden.cardinality()))},"JM.ModelSet,JU.BS,~N,~B");c(b,"hide",function(a,b,c,r){var e=0==c||null==this.bsSubset?null:JU.BSUtil.andNot(JU.BSUtil.copy(this.bsHidden),this.bsSubset);JV.SelectionManager.setBitSet(this.bsHidden,b,c);null!=e&&this.bsHidden.or(e);null!=a&&a.setBsHidden(this.bsHidden);r||this.vwr.reportSelection(J.i18n.GT.i(J.i18n.GT.$("{0} atoms hidden"),this.bsHidden.cardinality()))},"JM.ModelSet,JU.BS,~N,~B");c(b,"setSelectionSet",function(a,b){JV.SelectionManager.setBitSet(this.bsSelection,
a,b);this.empty=-1},"JU.BS,~N");b.setBitSet=c(b,"setBitSet",function(a,b,c){switch(c){default:a.clearAll();case 1275069441:null!=b&&a.or(b);break;case 1073742119:null!=b&&a.andNot(b)}},"JU.BS,JU.BS,~N");c(b,"getHiddenSet",function(){return this.bsHidden});c(b,"getHideNotSelected",function(){return this.hideNotSelected});c(b,"setHideNotSelected",function(a){(this.hideNotSelected=a)&&this.selectionChanged(!1)},"~B");c(b,"isSelected",function(a){return 0<=a&&this.bsSelection.get(a)},"~N");c(b,"select",
function(a,b,c){null==a?this.selectAll(!0):this.setSelectionSet(a,b);this.vwr.getBoolean(1612709900)||this.excludeSelectionSet(this.vwr.ms.getAtoms(1612709900,null));this.vwr.getBoolean(1612709894)||this.excludeSelectionSet(this.vwr.ms.getAtoms(1612709894,null));this.selectionChanged(!1);if((a=this.vwr.getBoolean(603979879))||!c)b=this.getSelectionCount(),a?this.vwr.getChimeMessenger().reportSelection(b):c||this.vwr.reportSelection(J.i18n.GT.i(J.i18n.GT.$("{0} atoms selected"),b))},"JU.BS,~N,~B");
c(b,"selectAll",function(a){var b=this.vwr.ms.ac;for(this.empty=0==b?1:0;0<=--b;)this.bsSelection.set(b);JU.BSUtil.andNot(this.bsSelection,this.bsDeleted);this.selectionChanged(a)},"~B");c(b,"clearSelection",function(a){this.setHideNotSelected(!1);this.bsSelection.clearAll();this.empty=1;this.selectionChanged(a)},"~B");c(b,"isAtomSelected",function(a){return((null==this.bsSubset||this.bsSubset.get(a))&&null==this.bsDeleted||!this.bsDeleted.get(a))&&this.bsSelection.get(a)},"~N");c(b,"setSelectedAtom",
function(a,b){0>a?this.selectionChanged(!0):null!=this.bsSubset&&!this.bsSubset.get(a)||null!=this.bsDeleted&&this.bsDeleted.get(a)||(this.bsSelection.setBitTo(a,b),this.empty=b?0:-1)},"~N,~B");c(b,"setSelectionSubset",function(a){this.bsSubset=a},"JU.BS");c(b,"isInSelectionSubset",function(a){return 0>a||null==this.bsSubset||this.bsSubset.get(a)},"~N");c(b,"invertSelection",function(){JU.BSUtil.invertInPlace(this.bsSelection,this.vwr.ms.ac);this.empty=0<this.bsSelection.length()?0:1;this.selectionChanged(!1)});
c(b,"excludeSelectionSet",function(a){null==a||1==this.empty||(this.bsSelection.andNot(a),this.empty=-1)},"JU.BS");c(b,"getSelectionCount",function(){if(1==this.empty)return 0;this.empty=1;var a;null==this.bsSubset?a=this.bsSelection:(this.bsTemp.clearAll(),this.bsTemp.or(this.bsSubset),this.bsTemp.and(this.bsSelection),a=this.bsTemp);a=a.cardinality();0<a&&(this.empty=0);return a});c(b,"addListener",function(a){for(var b=this.listeners.length;0<=--b;)if(this.listeners[b]===a){this.listeners[b]=null;
break}for(var c=this.listeners.length,b=c;0<=--b;)if(null==this.listeners[b]){this.listeners[b]=a;return}this.listeners=0==this.listeners.length?Array(1):JU.AU.doubleLength(this.listeners);this.listeners[c]=a},"J.api.JmolSelectionListener");c(b,"selectionChanged",function(a){this.hideNotSelected&&this.hide(this.vwr.ms,JU.BSUtil.copyInvert(this.bsSelection,this.vwr.ms.ac),0,a);if(!(a||0==this.listeners.length))for(a=this.listeners.length;0<=--a;)null!=this.listeners[a]&&this.listeners[a].selectionChanged(this.bsSelection)},
"~B");c(b,"deleteAtoms",function(a){var b=JU.BSUtil.copy(a);null==this.bsDeleted?this.bsDeleted=b:(b.andNot(this.bsDeleted),this.bsDeleted.or(a));this.bsHidden.andNot(this.bsDeleted);this.bsSelection.andNot(this.bsDeleted);return b.cardinality()},"JU.BS");c(b,"getSelectedAtoms",function(){if(null==this.bsSubset)return this.bsSelection;var a=JU.BSUtil.copy(this.bsSelection);a.and(this.bsSubset);return a});c(b,"getSelectedAtomsNoSubset",function(){return JU.BSUtil.copy(this.bsSelection)});c(b,"excludeAtoms",
function(a,b){null!=this.bsDeleted&&a.andNot(this.bsDeleted);!b&&null!=this.bsSubset&&(a=JU.BSUtil.copy(a)).and(this.bsSubset);return a},"JU.BS,~B");c(b,"setMotionFixedAtoms",function(a){this.bsFixed.clearAll();null!=a&&this.bsFixed.or(a)},"JU.BS");c(b,"getMotionFixedAtoms",function(){return this.bsFixed})});n("JV");z(null,"JV.ShapeManager","JU.BS $.P3 J.api.Interface J.c.PAL $.VDW JM.Atom JU.BSUtil JV.JC".split(" "),function(){var b=w(function(){this.navMinMax=this.bsSlabbedInternal=this.bsRenderableAtoms=
this.scaleText=this.vwr=this.shapes=this.ms=null;q(this,arguments)},JV,"ShapeManager",null);N(b,function(){this.navMinMax=E(4,0)});x(b,function(a){this.vwr=a;this.bsRenderableAtoms=new JU.BS;this.bsSlabbedInternal=new JU.BS},"JV.Viewer");c(b,"findNearestShapeAtomIndex",function(a,b,c,r){if(null!=this.shapes)for(var e=0;e<this.shapes.length&&null==c[0];++e)null!=this.shapes[e]&&this.shapes[e].findNearestAtomIndex(a,b,c,r)},"~N,~N,~A,JU.BS");c(b,"getShapePropertyIndex",function(a,b,c){if(null==this.shapes||
null==this.shapes[a])return null;this.vwr.setShapeErrorState(a,"get "+b);a=this.shapes[a].getProperty(b,c);this.vwr.setShapeErrorState(-1,null);return a},"~N,~S,~N");c(b,"getShapePropertyData",function(a,b,c){if(null==this.shapes||null==this.shapes[a])return!1;this.vwr.setShapeErrorState(a,"get "+b);a=this.shapes[a].getPropertyData(b,c);this.vwr.setShapeErrorState(-1,null);return a},"~N,~S,~A");c(b,"getShapeIdFromObjectName",function(a){if(null!=this.shapes)for(var b=16;30>b;++b)if(null!=this.shapes[b]&&
0<=this.shapes[b].getIndexFromName(a))return b;return null!=this.shapes[6]&&0<=this.shapes[6].getIndexFromName(a)?6:-1},"~S");c(b,"loadDefaultShapes",function(a){this.ms=a;if(null!=this.shapes)for(var b=0;b<this.shapes.length;++b)null!=this.shapes[b]&&this.shapes[b].setModelSet(a);this.loadShape(0);this.loadShape(1)},"JM.ModelSet");c(b,"loadShape",function(a){if(null==this.shapes)return null;if(null!=this.shapes[a])return this.shapes[a];if(2==a||3==a||4==a)return null;var b=JV.JC.getShapeClassName(a,
!1);if(null==(b=J.api.Interface.getInterface(b,this.vwr,"shape")))return null;this.vwr.setShapeErrorState(a,"allocate");b.initializeShape(this.vwr,this.ms,a);this.vwr.setShapeErrorState(-1,null);return this.shapes[a]=b},"~N");c(b,"notifyAtomPositionsChanged",function(a,b,c){var r=Integer.$valueOf(a);a=this.vwr.getModelUndeletedAtomsBitSet(a);for(var e=0;37>e;e++)null!=this.shapes[e]&&this.setShapePropertyBs(e,"refreshTrajectories",u(-1,[r,b,c]),a)},"~N,JU.BS,JU.M4");c(b,"releaseShape",function(a){null!=
this.shapes&&(this.shapes[a]=null)},"~N");c(b,"setScale",function(){null!=this.scaleText&&(this.loadShape(31),this.setShapePropertyBs(31,"%SCALE",this.scaleText,null),this.scaleText=null)});c(b,"resetShapes",function(a){a&&(a=Array(1),this.getShapePropertyData(31,"%SCALE",a),this.scaleText=a[0]);this.shapes=Array(37)},"~B");c(b,"setShapeProperties",function(a,b){this.vwr.setShapeErrorState(a,"set properties");this.loadShape(a).setProperties(b);this.vwr.setShapeErrorState(-1,null)},"~N,~A");c(b,"setShapeSizeBs",
function(a,b,c,r){if(null!=this.shapes){if(null==r&&(1!=a||2147483647!=b))r=this.vwr.bsA();null!=c&&(0!=c.value&&c.vdwType===J.c.VDW.TEMP)&&this.ms.getBfactor100Lo();this.vwr.setShapeErrorState(a,"set size");(null==c?0!=b:0!=c.value)&&this.loadShape(a);null!=this.shapes[a]&&this.shapes[a].setShapeSizeRD(b,c,r);this.vwr.setShapeErrorState(-1,null)}},"~N,~N,J.atomdata.RadiusData,JU.BS");c(b,"setLabel",function(a,b){if(null==a){if(null==this.shapes[5])return}else this.loadShape(5),this.setShapeSizeBs(5,
0,null,b);this.setShapePropertyBs(5,"label",a,b)},"~O,JU.BS");c(b,"setShapePropertyBs",function(a,b,c,r){null==this.shapes||null==this.shapes[a]||(null==r&&(r=this.vwr.bsA()),this.vwr.setShapeErrorState(a,"set "+b),this.shapes[a].setProperty(b.intern(),c,r),this.vwr.setShapeErrorState(-1,null))},"~N,~S,~O,JU.BS");c(b,"checkFrankclicked",function(a,b){var c=this.shapes[36];return null!=c&&c.wasClicked(a,b)},"~N,~N");c(b,"checkObjectClicked",function(a,b,c,r,e){var f,j=null;if(2==this.vwr.getPickingMode())return null==
this.shapes[5]?null:this.shapes[5].checkObjectClicked(a,b,c,r,!1);if(0!=c&&this.vwr.getBondsPickable()&&null!=(j=this.shapes[1].checkObjectClicked(a,b,c,r,!1)))return j;for(var g=0;g<JV.ShapeManager.clickableMax;g++)if(null!=(f=this.shapes[JV.ShapeManager.hoverable[g]])&&null!=(j=f.checkObjectClicked(a,b,c,r,e)))return j;return null},"~N,~N,~N,JU.BS,~B");c(b,"checkObjectDragged",function(a,b,c,r,e,f,j){for(var g=!1,l=0<j?j+1:37;!g&&j<l;++j)null!=this.shapes[j]&&(g=this.shapes[j].checkObjectDragged(a,
b,c,r,e,f));return g},"~N,~N,~N,~N,~N,JU.BS,~N");c(b,"checkObjectHovered",function(a,b,c,r){var e=this.shapes[1];if(r&&null!=e&&e.checkObjectHovered(a,b,c))return!0;for(r=0;r<JV.ShapeManager.hoverable.length;r++)if(e=this.shapes[JV.ShapeManager.hoverable[r]],null!=e&&e.checkObjectHovered(a,b,c))return!0;return!1},"~N,~N,JU.BS,~B");c(b,"deleteShapeAtoms",function(a,b){if(null!=this.shapes)for(var c=0;37>c;c++)null!=this.shapes[c]&&this.setShapePropertyBs(c,"deleteModelAtoms",a,b)},"~A,JU.BS");c(b,
"deleteVdwDependentShapes",function(a){null==a&&(a=this.vwr.bsA());this.setShapeAtomsSafely(24,"deleteVdw",a);this.setShapeAtomsSafely(25,"deleteVdw",a)},"JU.BS");c(b,"setShapeAtomsSafely",function(a,b,c){null!=this.shapes[a]&&this.shapes[a].setProperty(b,null,c)},"~N,~S,JU.BS");c(b,"notifyAtoms",function(a,b){switch(a){case "atomslabeled":this.vwr.setModelkitPropertySafely("updatemodelkeys",b);break;case "atomsDeleted":this.setShapeAtomsSafely(6,a,b[0]);this.vwr.setModelkitPropertySafely("updatemodelkeys",
b);break;case "atomsMoved":null!=this.getShape(22)&&this.vwr.setModelkitPropertySafely(a,b[0])}},"~S,~A");c(b,"getAtomShapeValue",function(a,b,c){a=JV.JC.shapeTokenIndex(a);if(0>a||null==this.shapes[a])return 0;c=this.shapes[a].getSize(c);if(0==c){if(0==(b.shapeVisibilityFlags&this.shapes[a].vf))return 0;c=this.shapes[a].getSizeG(b)}return c/2E3},"~N,JM.Group,~N");c(b,"replaceGroup",function(a,b){if(null!=this.shapes)for(var c=9;16>c;c++)null!=this.shapes[c]&&this.shapes[c].replaceGroup(a,b)},"JM.Group,JM.Group");
c(b,"getObjectMap",function(a,b){if(null!=this.shapes)for(var c=Boolean.$valueOf(b),r=16;30>r;++r)this.getShapePropertyData(r,"getNames",u(-1,[a,c]))},"java.util.Map,~B");c(b,"getProperty",function(a){return a.equals("getShapes")?this.shapes:null},"~O");c(b,"getShape",function(a){return null==this.shapes?null:this.shapes[a]},"~N");c(b,"resetBioshapes",function(a){if(null!=this.shapes)for(var b=0;b<this.shapes.length;++b)null!=this.shapes[b]&&this.shapes[b].isBioShape&&(this.shapes[b].setModelSet(this.ms),
this.shapes[b].setShapeSizeRD(0,null,a),this.shapes[b].setProperty("color",J.c.PAL.NONE,a))},"JU.BS");c(b,"setAtomLabel",function(a,b){null!=this.shapes&&(this.shapes[5].setProperty("label:"+a,Integer.$valueOf(b),null),this.vwr.getModelkitPropertySafely(null)===Boolean.TRUE&&this.notifyAtoms("atomslabeled",u(-1,[null,JU.BSUtil.newAndSetBit(this.vwr.ms.at[b].mi)])))},"~S,~N");c(b,"setModelVisibility",function(){var a=this.shapes;if(!(null==a||null==a[0])){var b=this.vwr.getVisibleFramesBitSet();null!=
a[8]&&a[8].setProperty("highlight",null,null);for(var c=8;33>c;c++)null!=a[c]&&a[c].setModelVisibilityFlags(b);var a=this.vwr.getBoolean(603979922),r=this.vwr.slm.bsDeleted,e=this.ms.at;this.ms.clearVisibleSets();if(0<e.length)for(c=this.ms.ac;0<=--c;){var f=e[c];null!=f&&(f.shapeVisibilityFlags&=-64);if(!(null!=r&&r.get(c))&&b.get(f.mi)){var j=1;if(!this.ms.isAtomHidden(c)&&(a||1!=f.getElementNumber()))j|=8,0!=f.madAtom&&(j|=16),f.setShapeVisibility(j,!0)}}this.setShapeVis()}});c(b,"setShapeVis",
function(){for(var a=0;37>a;++a){var b=this.shapes[a];null!=b&&b.setAtomClickability()}});c(b,"finalizeAtoms",function(a,b){var c=this.vwr,r=c.tm;b&&c.finalizeTransformParameters();if(null!=a){var e=this.ms.getAtomSetCenter(a),f=new JU.P3;r.transformPt3f(e,f);f.add(r.ptOffset);r.unTransformPoint(f,f);f.sub(e);c.setAtomCoordsRelative(f,a);r.ptOffset.set(0,0,0);r.bsSelectedAtoms=null}e=this.bsRenderableAtoms;this.ms.getAtomsInFrame(e);var j=this.ms.vibrations,g=null!=j&&r.vibrationOn,l=null!=this.ms.bsModulated&&
null!=this.ms.occupancies,s=this.ms.at,m,p=!1,n=this.bsSlabbedInternal;n.clearAll();for(var q=e.nextSetBit(0);0<=q;q=e.nextSetBit(q+1)){var f=s[q],u=g&&f.hasVibration()?r.transformPtVib(f,j[q]):r.transformPt(f);1==u.z&&(r.internalSlab&&r.xyzIsSlabbedInternal(f))&&n.set(q);f.sX=u.x;f.sY=u.y;f.sZ=u.z;var w=Math.abs(f.madAtom);w==JM.Atom.MAD_GLOBAL&&(w=F(2E3*c.getFloat(1153433601)));f.sD=sa(c.tm.scaleToScreen(u.z,w));if(l&&null!=j[q]&&-2147483648!=(m=j[q].getOccupancy100(g)))p=!0,f.setShapeVisibility(2,
!1),0<=m&&50>m?f.setShapeVisibility(24,!1):f.setShapeVisibility(8|(0<f.madAtom?16:0),!0),this.ms.occupancies[f.i]=Math.abs(m)}p&&this.setShapeVis();m=c.gdata;if(r.slabEnabled){q=c.getBoolean(603979940);r=c.getBoolean(603979939);j=m.slab;g=m.depth;if(q){l=this.ms.getMolecules();p=this.ms.getMoleculeCountInModel(-1);for(q=0;q<p;q++)if(n=l[q],u=0,f=n.firstAtomIndex,e.get(f)){for(;u<n.ac&&!m.isClippedZ(s[f].sZ-(s[f].sD>>1));u++,f++);if(u!=n.ac){f=n.firstAtomIndex;for(u=0;u<n.ac;u++)e.clear(f),s[f++].sZ=
0}}}for(q=e.nextSetBit(0);0<=q;q=e.nextSetBit(q+1))if(f=s[q],m.isClippedZ(f.sZ-(r?s[q].sD>>1:0)))f.setClickable(0),l=v((r?-1:1)*f.sD/2),(f.sZ+l<j||f.sZ-l>g||!m.isInDisplayRange(f.sX,f.sY))&&e.clear(q)}if(0==this.ms.ac||!c.getShowNavigationPoint())return null;c=2147483647;m=-2147483648;r=2147483647;j=-2147483648;for(q=e.nextSetBit(0);0<=q;q=e.nextSetBit(q+1))f=s[q],f.sX<c&&(c=f.sX),f.sX>m&&(m=f.sX),f.sY<r&&(r=f.sY),f.sY>j&&(j=f.sY);this.navMinMax[0]=c;this.navMinMax[1]=m;this.navMinMax[2]=r;this.navMinMax[3]=
j;return this.navMinMax},"JU.BS,~B");c(b,"setModelSet",function(a){this.ms=a},"JM.ModelSet");c(b,"checkInheritedShapes",function(){null!=this.shapes[24]&&this.setShapePropertyBs(24,"remapInherited",null,null)});c(b,"restrictSelected",function(a,b){var c=this.vwr.slm.getSelectedAtomsNoSubset();if(b){this.vwr.slm.invertSelection();var r=this.vwr.slm.bsSubset;null!=r&&(c=this.vwr.slm.getSelectedAtomsNoSubset(),c.and(r),this.vwr.selectStatus(c,!1,0,!0,!1),JU.BSUtil.invertInPlace(c,this.vwr.ms.ac),c.and(r))}JU.BSUtil.andNot(c,
this.vwr.slm.bsDeleted);r=this.vwr.getBoolean(603979812);a||this.vwr.setBooleanProperty("bondModeOr",!0);this.setShapeSizeBs(1,0,null,null);this.setShapePropertyBs(1,"type",Integer.$valueOf(32768),null);this.setShapeSizeBs(1,0,null,null);this.setShapePropertyBs(1,"type",Integer.$valueOf(1023),null);for(var e=this.vwr.bsA(),f=21;0<=--f;)6!=f&&null!=this.getShape(f)&&this.setShapeSizeBs(f,0,null,e);null!=this.getShape(21)&&this.setShapePropertyBs(21,"off",e,null);this.setLabel(null,e);a||this.vwr.setBooleanProperty("bondModeOr",
r);this.vwr.selectStatus(c,!1,0,!0,!1)},"~B,~B");b.hoverable=E(-1,[31,20,25,24,22,36]);b.clickableMax=JV.ShapeManager.hoverable.length-1});n("JV");z(["java.util.Hashtable"],["JV.Connection","$.Scene","$.StateManager","$.Connections"],"java.util.Arrays JU.BS $.Lst $.SB JM.Orientation JU.BSUtil $.Escape".split(" "),function(){var b=w(function(){this.maxUndo=20;this.saved=this.vwr=null;this.lastUnitcell=this.lastCoordinates=this.lastShape=this.lastState=this.lastSelected=this.lastScene=this.lastConnections=
this.lastContext=this.lastOrientation="";this.redoStateStack=this.undoStateStack=null;q(this,arguments)},JV,"StateManager",null);N(b,function(){this.saved=new java.util.Hashtable});x(b,function(a){this.vwr=a},"JV.Viewer");b.getVariableList=c(b,"getVariableList",function(a,b,c,r){var e=new JU.SB,f=0,j=Array(a.size()),g;for(a=a.entrySet().iterator();a.hasNext()&&((g=a.next())||1);){var l=g.getKey(),s=g.getValue();if((c||!l.startsWith("site_"))&&(!r||"@"==l.charAt(0)))j[f++]=l+("@"==l.charAt(0)?" "+
s.asString():" = "+JV.StateManager.varClip(l,s.escape(),b))}java.util.Arrays.sort(j,0,f);for(b=0;b<f;b++)null!=j[b]&&e.append("  ").append(j[b]).append(";\n");0==f&&!r&&e.append("# --no global user variables defined--;\n");return e.toString()},"java.util.Map,~N,~B,~B");b.getObjectIdFromName=c(b,"getObjectIdFromName",function(a){if(null==a)return-1;a="background axis1      axis2      axis3      boundbox   unitcell   frank      ".indexOf(a.toLowerCase());return 0>a?a:v(a/11)},"~S");b.getObjectNameFromId=
c(b,"getObjectNameFromId",function(a){return 0>a||7<=a?null:"background axis1      axis2      axis3      boundbox   unitcell   frank      ".substring(11*a,11*a+11).trim()},"~N");c(b,"clear",function(a){this.vwr.setShowAxes(!1);this.vwr.setShowBbcage(!1);this.vwr.setShowUnitCell(!1);a.clear()},"JV.GlobalSettings");c(b,"resetLighting",function(){this.vwr.setIntProperty("ambientPercent",45);this.vwr.setIntProperty("celShadingPower",10);this.vwr.setIntProperty("diffusePercent",84);this.vwr.setIntProperty("phongExponent",
64);this.vwr.setIntProperty("specularExponent",6);this.vwr.setIntProperty("specularPercent",22);this.vwr.setIntProperty("specularPower",40);this.vwr.setIntProperty("zDepth",0);this.vwr.setIntProperty("zShadePower",3);this.vwr.setIntProperty("zSlab",50);this.vwr.setBooleanProperty("specular",!0);this.vwr.setBooleanProperty("celShading",!1);this.vwr.setBooleanProperty("zshade",!1)});c(b,"setCrystallographicDefaults",function(){this.vwr.setAxesMode(603979808);this.vwr.setShowAxes(!0);this.vwr.setShowUnitCell(!0);
this.vwr.setBooleanProperty("perspectiveDepth",!1)});c(b,"setCommonDefaults",function(){this.vwr.setBooleanProperty("perspectiveDepth",!0);this.vwr.setFloatProperty("bondTolerance",0.45);this.vwr.setFloatProperty("minBondDistance",0.4);this.vwr.setIntProperty("bondingVersion",0);this.vwr.setBooleanProperty("translucent",!0)});c(b,"setJmolDefaults",function(){this.setCommonDefaults();this.vwr.setStringProperty("defaultColorScheme","Jmol");this.vwr.setBooleanProperty("axesOrientationRasmol",!1);this.vwr.setBooleanProperty("zeroBasedXyzRasmol",
!1);this.vwr.setIntProperty("percentVdwAtom",23);this.vwr.setIntProperty("bondRadiusMilliAngstroms",150);this.vwr.setVdwStr("auto")});c(b,"setRasMolDefaults",function(){this.setCommonDefaults();this.vwr.setStringProperty("defaultColorScheme","RasMol");this.vwr.setBooleanProperty("axesOrientationRasmol",!0);this.vwr.setBooleanProperty("zeroBasedXyzRasmol",!0);this.vwr.setIntProperty("percentVdwAtom",0);this.vwr.setIntProperty("bondRadiusMilliAngstroms",1);this.vwr.setVdwStr("Rasmol")});c(b,"setPyMOLDefaults",
function(){this.setCommonDefaults();this.vwr.setStringProperty("measurementUnits","ANGSTROMS");this.vwr.setBooleanProperty("zoomHeight",!0)});b.getNoCase=c(b,"getNoCase",function(a,b){for(var c,r=a.entrySet().iterator();r.hasNext()&&((c=r.next())||1);)if(c.getKey().equalsIgnoreCase(b))return c.getValue();return null},"java.util.Map,~S");c(b,"listSavedStates",function(){for(var a="",b,c=this.saved.keySet().iterator();c.hasNext()&&((b=c.next())||1);)a+="\n"+b;return a});c(b,"deleteSavedType",function(a){for(var b=
this.saved.keySet().iterator();b.hasNext();)b.next().startsWith(a)&&b.remove()},"~S");c(b,"deleteSaved",function(a){for(var b=this.saved.keySet().iterator();b.hasNext();){var c=b.next();(c.startsWith(a)||c.endsWith("_"+a)&&c.indexOf("_")==c.lastIndexOf("_"+a))&&b.remove()}},"~S");c(b,"saveSelection",function(a,b){a.equalsIgnoreCase("DELETE")?this.deleteSavedType("Selected_"):(a=this.lastSelected="Selected_"+a,this.saved.put(a,JU.BSUtil.copy(b)))},"~S,JU.BS");c(b,"restoreSelection",function(a){a=JV.StateManager.getNoCase(this.saved,
0<a.length?"Selected_"+a:this.lastSelected);if(null==a)return this.vwr.selectStatus(new JU.BS,!1,0,!1,!1),!1;this.vwr.selectStatus(a,!1,0,!1,!1);return!0},"~S");c(b,"saveUnitCell",function(a){if(a.equalsIgnoreCase("DELETE"))this.deleteSavedType("Unitcell_");else{a=this.lastUnitcell="Unitcell_"+a;var b=this.vwr.getCurrentUnitCell();null!=b&&(b="UNITCELL "+JU.Escape.e(b.getUnitCellVectors()),this.saved.put(a,"unitcell reset;"+b))}},"~S");c(b,"getSavedUnitCell",function(a){return JV.StateManager.getNoCase(this.saved,
0<a.length?"Unitcell_"+a:this.lastUnitcell)},"~S");c(b,"restoreUnitCell",function(a){a=this.getSavedUnitCell(a);if(null==a)return this.vwr.ms.setModelCagePts(-1,null,null),!1;this.vwr.runScript(a);return!0},"~S");c(b,"saveState",function(a){a.equalsIgnoreCase("DELETE")?(this.deleteSavedType("State_"),this.clearStateStack()):0==a.length?(this.vwr.setBooleanProperty("undoAuto",!1),this.appendState(this.getStack(603984065)),this.redoStateStack.clear()):(a=this.lastState="State_"+a,this.saved.put(a,this.vwr.getStateInfo()))},
"~S");c(b,"getSavedState",function(a){if(0==a.length)return a=this.getStack(603984065),0<a.size()?a.get(a.size()-1):null;a=JV.StateManager.getNoCase(this.saved,0<a.length?"State_"+a:this.lastState);return null==a?"":a},"~S");c(b,"popStack",function(a){var b=this.getStack(a),b=0<b.size()?b.removeItemAt(b.size()-1):null;null!=b&&this.appendState(this.getStack(603984065==a?4139:603984065));this.checkStack(this.getStack(603984065));return b},"~N");c(b,"appendState",function(a){this.checkStack(a);0<this.maxUndo&&
a.addLast(this.vwr.getStateInfo())},"JU.Lst");c(b,"checkStack",function(a){for(;a.size()>this.maxUndo;)a.removeItemAt(0)},"JU.Lst");c(b,"getStack",function(a){null==this.undoStateStack&&(this.undoStateStack=new JU.Lst,this.redoStateStack=new JU.Lst);return 603984065==a?this.undoStateStack:this.redoStateStack},"~N");c(b,"clearStateStack",function(){null!=this.undoStateStack&&(this.undoStateStack.clear(),this.redoStateStack.clear())});c(b,"saveStructure",function(a){a.equalsIgnoreCase("DELETE")?this.deleteSavedType("Shape_"):
(a=this.lastShape="Shape_"+a,this.saved.put(a,this.vwr.getStructureState()))},"~S");c(b,"getSavedStructure",function(a){a=JV.StateManager.getNoCase(this.saved,0<a.length?"Shape_"+a:this.lastShape);return null==a?"":a},"~S");c(b,"saveCoordinates",function(a,b){a.equalsIgnoreCase("DELETE")?this.deleteSavedType("Coordinates_"):(a=this.lastCoordinates="Coordinates_"+a,this.saved.put(a,this.vwr.getCoordinateState(b)))},"~S,JU.BS");c(b,"getSavedCoordinates",function(a){a=JV.StateManager.getNoCase(this.saved,
0<a.length?"Coordinates_"+a:this.lastCoordinates);return null==a?"":a},"~S");c(b,"getOrientation",function(){return new JM.Orientation(this.vwr,!1,null)});c(b,"getSavedOrientationText",function(a){var b;if(null!=a)return b=this.getOrientationFor(a),null==b?"":b.getMoveToText(!0);a=new JU.SB;for(var c=this.saved.entrySet().iterator();c.hasNext()&&((b=c.next())||1);)b.getKey().startsWith("Orientation_")&&a.append(b.getValue().getMoveToText(!0));return a.toString()},"~S");c(b,"saveScene",function(a,
b){if(a.equalsIgnoreCase("DELETE"))this.deleteSavedType("Scene_");else{var c=new JV.Scene(b);c.saveName=this.lastScene="Scene_"+a;this.saved.put(c.saveName,c)}},"~S,java.util.Map");c(b,"restoreScene",function(a,b){var c=JV.StateManager.getNoCase(this.saved,0<a.length?"Scene_"+a:this.lastScene);return null!=c&&c.restore(this.vwr,b)},"~S,~N");c(b,"saveOrientation",function(a,b){if(a.equalsIgnoreCase("DELETE"))this.deleteSavedType("Orientation_");else{var c=new JM.Orientation(this.vwr,a.equalsIgnoreCase("default"),
b);c.saveName=this.lastOrientation="Orientation_"+a;this.saved.put(c.saveName,c)}},"~S,~A");c(b,"restoreOrientation",function(a,b,c){a=this.getOrientationFor(a);return null!=a&&a.restore(b,c)},"~S,~N,~B");c(b,"getOrientationFor",function(a){return JV.StateManager.getNoCase(this.saved,0<a.length?"Orientation_"+a:this.lastOrientation)},"~S");c(b,"saveContext",function(a,b){a.equalsIgnoreCase("DELETE")?this.deleteSavedType("Context_"):this.saved.put(this.lastContext="Context_"+a,b)},"~S,~O");c(b,"getContext",
function(a){return this.saved.get(0==a.length?this.lastContext:"Context_"+a)},"~S");c(b,"saveBonds",function(a){if(a.equalsIgnoreCase("DELETE"))this.deleteSavedType("Bonds_");else{var b=new JV.Connections(this.vwr);b.saveName=this.lastConnections="Bonds_"+a;this.saved.put(b.saveName,b)}},"~S");c(b,"restoreBonds",function(a){this.vwr.clearModelDependentObjects();a=JV.StateManager.getNoCase(this.saved,0<a.length?"Bonds_"+a:this.lastConnections);return null!=a&&a.restore()},"~S");b.varClip=c(b,"varClip",
function(a,b,c){0<c&&b.length>c&&(b=b.substring(0,c)+" #...more ("+b.length+" bytes -- use SHOW "+a+" or MESSAGE @"+a+" to view)");return b},"~S,~S,~N");c(b,"getUndoMax",function(){return this.maxUndo});c(b,"setUndoMax",function(a){this.maxUndo=Math.max(a,0);this.checkStack(this.getStack(603984065));this.checkStack(this.getStack(4139))},"~N");c(b,"getUndoRedoState",function(a){return this.popStack(a)},"~N");c(b,"canDo",function(a){return 0<this.maxUndo&&this.vwr.getBoolean(603979898)&&!this.getStack(a).isEmpty()},
"~N");c(b,"getUndoInfo",function(){var a=this.vwr.getBooleanProperty("undoAuto");return this.vwr.getBoolean(603979898)?"undoAuto="+a+(!a?"; user stack sizes: UNDO="+this.getStack(603984065).size()+", REDO="+this.getStack(4139).size():""):"SET preserveState = FALSE -- undo/redo is disabled"});b=w(function(){this.scene=this.saveName=null;q(this,arguments)},JV,"Scene",null);x(b,function(a){this.scene=a},"java.util.Map");c(b,"restore",function(a,b){var c=this.scene.get("generator");null!=c&&c.generateScene(this.scene);
c=this.scene.get("pymolView");return null!=c&&a.tm.moveToPyMOL(a.eval,b,c)},"JV.Viewer,~N");b=w(function(){this.saveName=null;this.bondCount=0;this.vwr=this.connections=null;q(this,arguments)},JV,"Connections",null);x(b,function(a){var b=a.ms;if(null!=b){this.vwr=a;this.bondCount=b.bondCount;this.connections=Array(this.bondCount+1);a=b.bo;for(b=this.bondCount;0<=--b;){var c=a[b];null!=c&&(this.connections[b]=new JV.Connection(c.atom1.i,c.atom2.i,c.mad,c.colix,c.order,c.getEnergy(),c.shapeVisibilityFlags))}}},
"JV.Viewer");c(b,"restore",function(){var a=this.vwr.ms;if(null==a)return!1;a.deleteAllBonds();for(var b=this.bondCount;0<=--b;){var c=this.connections[b],r=a.ac;c.atomIndex1>=r||c.atomIndex2>=r||(r=a.bondAtoms(a.at[c.atomIndex1],a.at[c.atomIndex2],c.order,c.mad,null,c.energy,!1,!0),r.colix=c.colix,r.shapeVisibilityFlags=c.shapeVisibilityFlags)}c=a.bo;for(b=a.bondCount;0<=--b;)null!=c[b]&&(c[b].index=b);this.vwr.setShapeProperty(1,"reportAll",null);return!0});b=w(function(){this.shapeVisibilityFlags=
this.energy=this.order=this.colix=this.mad=this.atomIndex2=this.atomIndex1=0;q(this,arguments)},JV,"Connection",null);x(b,function(a,b,c,r,e,f,j){this.atomIndex1=a;this.atomIndex2=b;this.mad=c;this.colix=r;this.order=e;this.energy=f;this.shapeVisibilityFlags=j},"~N,~N,~N,~N,~N,~N,~N")});n("JV");z(["java.util.Hashtable"],"JV.StatusManager","JU.Lst $.PT J.api.Interface J.c.CBK JS.SV JU.BSUtil $.Logger JV.JC".split(" "),function(){var b=w(function(){this.cbl=this.jsl=this.vwr=null;this.statusList="";
this.allowStatusReporting=!1;this.messageQueue=null;this.statusPtr=0;this.imageMap=this.jmolScriptCallbacks=null;this.echoing=!1;this.minSyncRepeatMs=100;this.stereoSync=this.syncDisabled=this.isSynced=this.drivingSync=this.syncingMouse=this.syncingScripts=!1;this.qualityPNG=this.qualityJPG=-1;this.audios=this.imageType=null;q(this,arguments)},JV,"StatusManager",null);N(b,function(){this.messageQueue=new java.util.Hashtable;this.jmolScriptCallbacks=new java.util.Hashtable});x(b,function(a){this.vwr=
a},"JV.Viewer");c(b,"recordStatus",function(a){return this.allowStatusReporting&&0<this.statusList.length&&(this.statusList.equals("all")||0<=this.statusList.indexOf(a))},"~S");c(b,"setStatusChanged",function(a,b,c,r){if(this.recordStatus(a)){var e=new JU.Lst;e.addLast(Integer.$valueOf(++this.statusPtr));e.addLast(a);e.addLast(Integer.$valueOf(b));e.addLast(c);b=r?null:this.messageQueue.get(a);null==b?this.messageQueue.put(a,b=new JU.Lst):b.size()==JV.StatusManager.MAXIMUM_QUEUE_LENGTH&&b.removeItemAt(0);
b.addLast(e)}},"~S,~N,~O,~B");c(b,"getStatusChanged",function(a){var b=0<a.length&&"-"==a.charAt(0),c=0<a.length&&"+"==a.charAt(0),r=!1;b?this.statusList=JU.PT.rep(this.statusList,a.substring(1,a.length),""):(a=JU.PT.rep(a,"+",""),this.statusList.equals(a)||c&&0<=this.statusList.indexOf(a)?r=!0:(c||(this.statusList=""),this.statusList+=a,JU.Logger.debugging&&JU.Logger.debug("StatusManager messageQueue = "+this.statusList)));a=new JU.Lst;if(r)for(var e,r=this.messageQueue.entrySet().iterator();r.hasNext()&&
((e=r.next())||1);)a.addLast(e.getValue());this.messageQueue.clear();this.statusPtr=0;return a},"~S");c(b,"setCallbackFunction",function(a,b){var c=J.c.CBK.getCallback(a),r="string"==typeof b?b:null;if(null!=c)if(c=J.c.CBK.getCallback(a).name(),JU.Logger.info("StatusManager "+c+"callback set f="+r),null!=r&&r.startsWith("SYNC:"))if(r.toLowerCase().trim().equals("sync:off"))this.jmolScriptCallbacks.remove("SYNC:"+c),JU.Logger.info("SYNC callback for "+c+" deactivated");else{this.jmolScriptCallbacks.put("SYNC:"+
c,"_");JU.Logger.info("SYNC callback for "+c+" activated");return}else{var e="",f=null==r?0:(e=r.toLowerCase()).startsWith("script:")?7:e.startsWith("jmolscript:")?11:0;if(0==f)null==b&&this.jmolScriptCallbacks.remove(c);else{this.jmolScriptCallbacks.put(c,r.substring(f).trim());return}}null!=this.cbl&&this.cbl.setCallbackFunction(a,b)},"~S,~O");c(b,"notifyEnabled",function(a){return null!=this.cbl&&this.cbl.notifyEnabled(a)},"J.c.CBK");c(b,"getJmolScriptCallback",function(a){return this.jmolScriptCallbacks.get(a.name())},
"J.c.CBK");c(b,"fireJmolScriptCallback",function(a,b,c,r){var e=b.name();if(null!=c[0]){var f=Array(c.length);System.arraycopy(c,0,f,0,c.length);var j="try{\n"+f[0]+"\n}";f[0]=e;this.vwr.evalCallback(j,f,r)}this.jmolScriptCallbacks.containsKey("SYNC:"+b.name())&&(c[0]="SYNC");a&&this.cbl.notifyCallback(b,c)},"~B,J.c.CBK,~A,~B");c(b,"setStatusAppletReady",function(a,b){var c=b?this.getJmolScriptCallback(J.c.CBK.APPLETREADY):null,r=this.notifyEnabled(J.c.CBK.APPLETREADY);(r||null!=c)&&this.fireJmolScriptCallback(r,
J.c.CBK.APPLETREADY,u(-1,[c,a,Boolean.$valueOf(b),null]),!0)},"~S,~B");c(b,"setStatusAtomMoved",function(a){var b=this.getJmolScriptCallback(J.c.CBK.ATOMMOVED);this.setStatusChanged("atomMoved",-1,a,!1);var c=this.notifyEnabled(J.c.CBK.ATOMMOVED);(c||null!=b)&&this.fireJmolScriptCallback(c,J.c.CBK.ATOMMOVED,u(-1,[b,a,Integer.$valueOf(a.cardinality())]),!0)},"JU.BS");c(b,"setStatusSelect",function(a){var b=this.getJmolScriptCallback(J.c.CBK.SELECT);this.setStatusChanged("select",-1,a,!1);var c=this.notifyEnabled(J.c.CBK.SELECT);
(c||null!=b)&&this.fireJmolScriptCallback(c,J.c.CBK.SELECT,u(-1,[b,a,Integer.$valueOf(a.cardinality()),Integer.$valueOf(a.nextSetBit(0)),Integer.$valueOf(a.length())]),!0)},"JU.BS");c(b,"setStatusStructureModified",function(a,b,c,r,e,f){0<=a&&null==f&&(f=JU.BSUtil.newAndSetBit(a));var j=this.getJmolScriptCallback(J.c.CBK.STRUCTUREMODIFIED),g=this.notifyEnabled(J.c.CBK.STRUCTUREMODIFIED);(g||null!=j)&&this.fireJmolScriptCallback(g,J.c.CBK.STRUCTUREMODIFIED,u(-1,[j,Integer.$valueOf(c),Integer.$valueOf(a),
Integer.$valueOf(b),r,Integer.$valueOf(e),f]),!0)},"~N,~N,~N,~S,~N,JU.BS");c(b,"setStatusAtomPicked",function(a,b,c){var r=this.getJmolScriptCallback(J.c.CBK.PICK);JU.Logger.info("setStatusAtomPicked("+a+","+b+")");this.setStatusChanged("atomPicked",a,b,!1);var e=this.notifyEnabled(J.c.CBK.PICK);(e||null!=r)&&this.fireJmolScriptCallback(e,J.c.CBK.PICK,u(-1,[r,b,Integer.$valueOf(a),c]),!0)},"~N,~S,java.util.Map");c(b,"setStatusClicked",function(a,b,c,r,e){var f=this.getJmolScriptCallback(J.c.CBK.CLICK);
e=E(-1,[c,e]);var j=this.notifyEnabled(J.c.CBK.CLICK);(j||null!=f)&&this.fireJmolScriptCallback(j,J.c.CBK.CLICK,u(-1,[f,Integer.$valueOf(a),Integer.$valueOf(b),Integer.$valueOf(c),Integer.$valueOf(r),e]),!0);return e[0]},"~N,~N,~N,~N,~N");c(b,"setStatusResized",function(a,b){var c=this.getJmolScriptCallback(J.c.CBK.RESIZE),r=this.notifyEnabled(J.c.CBK.RESIZE);(r||null!=c)&&this.fireJmolScriptCallback(r,J.c.CBK.RESIZE,u(-1,[c,Integer.$valueOf(a),Integer.$valueOf(b)]),!0)},"~N,~N");c(b,"haveHoverCallback",
function(){return this.jmolScriptCallbacks.containsKey(J.c.CBK.HOVER.name())||this.notifyEnabled(J.c.CBK.HOVER)});c(b,"setStatusAtomHovered",function(a,b){var c=this.getJmolScriptCallback(J.c.CBK.HOVER),r=this.notifyEnabled(J.c.CBK.HOVER);(r||null!=c)&&this.fireJmolScriptCallback(r,J.c.CBK.HOVER,u(-1,[c,b,Integer.$valueOf(a)]),!0)},"~N,~S");c(b,"setStatusObjectHovered",function(a,b,c){var r=this.getJmolScriptCallback(J.c.CBK.HOVER),e=this.notifyEnabled(J.c.CBK.HOVER);(e||null!=r)&&this.fireJmolScriptCallback(e,
J.c.CBK.HOVER,u(-1,[r,b,Integer.$valueOf(-1),a,Float.$valueOf(c.x),Float.$valueOf(c.y),Float.$valueOf(c.z)]),!0)},"~S,~S,JU.T3");c(b,"showImage",function(a,b){var c=JU.PT.split(a,"\u0001");a=2>c.length?"Jmol":3>c.length||c[2].equals("null")?c[1].substring(c[1].lastIndexOf("/")+1):c[2];var c=this.getJmolScriptCallback(J.c.CBK.IMAGE),r=this.notifyEnabled(J.c.CBK.IMAGE);(r||null!=c)&&this.fireJmolScriptCallback(r,J.c.CBK.IMAGE,u(-1,[c,a,b]),!0);if(Boolean.TRUE.equals(b)){if(null!=this.imageMap){for(var c=
new JU.Lst,e,r=this.imageMap.keySet().iterator();r.hasNext()&&((e=r.next())||1);)c.addLast(e);for(e=c.size();0<=--e;)this.imageMap.get(c.get(e)).closeMe()}}else null==this.imageMap&&(this.imageMap=new java.util.Hashtable),e=this.imageMap.get(a),Boolean.FALSE.equals(b)?null!=e&&e.closeMe():(null==e&&null!=b&&(e=this.vwr.apiPlatform.getImageDialog(a,this.imageMap)),null!=e&&(null==b?e.closeMe():e.setImage(b)))},"~S,~O");c(b,"setFileLoadStatus",function(a,b,c,r,e,f,j){null==a&&"resetUndo".equals(b)&&
(b=this.vwr.getProperty("DATA_API","getAppConsole",null),null!=b&&b.zap(),b=this.vwr.getZapName());this.setStatusChanged("fileLoaded",e,a,!1);null!=r&&this.setStatusChanged("fileLoadError",e,r,!1);var g=this.getJmolScriptCallback(J.c.CBK.LOADSTRUCT);if((f=f&&this.notifyEnabled(J.c.CBK.LOADSTRUCT))||null!=g){var l=this.vwr.getP("_smilesString");0!=l.length&&(b=l);this.fireJmolScriptCallback(f,J.c.CBK.LOADSTRUCT,u(-1,[g,a,b,c,r,Integer.$valueOf(e),this.vwr.getP("_modelNumber"),this.vwr.getModelNumberDotted(this.vwr.ms.mc-
1),j]),!0)}},"~S,~S,~S,~S,~N,~B,Boolean");c(b,"setStatusModelKit",function(a){var b=1==a?"ON":"OFF";this.setStatusChanged("modelkit",a,b,!1);a=this.getJmolScriptCallback(J.c.CBK.MODELKIT);var c=this.notifyEnabled(J.c.CBK.MODELKIT);(c||null!=a)&&this.fireJmolScriptCallback(c,J.c.CBK.MODELKIT,u(-1,[a,b]),!0)},"~N");c(b,"setStatusFrameChanged",function(a,b,c,r,e,f,j){if(null!=this.vwr.ms){var g=this.vwr.am.animationOn,l=g?-2-e:e;this.setStatusChanged("frameChanged",l,0<=e?this.vwr.getModelNumberDotted(e):
"",!1);var s=this.getJmolScriptCallback(J.c.CBK.ANIMFRAME),m=this.notifyEnabled(J.c.CBK.ANIMFRAME);(m||null!=s)&&this.fireJmolScriptCallback(m,J.c.CBK.ANIMFRAME,u(-1,[s,E(-1,[l,a,b,c,r,e]),j,Float.$valueOf(f)]),!1);!g&&!this.vwr.isJSNoAWT&&this.vwr.checkMenuUpdate()}},"~N,~N,~N,~N,~N,~N,~S");c(b,"setStatusDragDropped",function(a,b,c,r,e){this.setStatusChanged("dragDrop",0,"",!1);var f=this.getJmolScriptCallback(J.c.CBK.DRAGDROP),j=this.notifyEnabled(J.c.CBK.DRAGDROP);(j||null!=f)&&this.fireJmolScriptCallback(j,
J.c.CBK.DRAGDROP,u(-1,[f,Integer.$valueOf(a),Integer.$valueOf(b),Integer.$valueOf(c),r,e]),!0);return j},"~N,~N,~N,~S,~A");c(b,"setScriptEcho",function(a,b){if(!(null==a||this.echoing)){this.echoing=!0;this.setStatusChanged("scriptEcho",0,a,!1);var c=this.getJmolScriptCallback(J.c.CBK.ECHO),r=this.notifyEnabled(J.c.CBK.ECHO);if(r||null!=c)this.fireJmolScriptCallback(r,J.c.CBK.ECHO,u(-1,[c,a,Integer.$valueOf(b?1:0)]),!0);this.echoing=!1}},"~S,~B");c(b,"setStatusMeasuring",function(a,b,c,r){this.setStatusChanged(a,
b,c,!1);var e=null;a.equals("measureCompleted")?(JU.Logger.info("measurement["+b+"] = "+c),e=this.getJmolScriptCallback(J.c.CBK.MEASURE)):a.equals("measurePicked")&&(this.setStatusChanged("measurePicked",b,c,!1),JU.Logger.info("measurePicked "+b+" "+c));var f=this.notifyEnabled(J.c.CBK.MEASURE);(f||null!=e)&&this.fireJmolScriptCallback(f,J.c.CBK.MEASURE,u(-1,[e,c,Integer.$valueOf(b),a,Float.$valueOf(r)]),!0)},"~S,~N,~S,~N");c(b,"notifyError",function(a,b,c){var r=this.getJmolScriptCallback(J.c.CBK.ERROR),
e=this.notifyEnabled(J.c.CBK.ERROR);(e||null!=r)&&this.fireJmolScriptCallback(e,J.c.CBK.ERROR,u(-1,[r,a,b,this.vwr.getShapeErrorState(),c]),!0)},"~S,~S,~S");c(b,"notifyMinimizationStatus",function(a,b,c,r,e){var f=this.getJmolScriptCallback(J.c.CBK.MINIMIZATION),j=this.notifyEnabled(J.c.CBK.MINIMIZATION);(j||null!=f)&&this.fireJmolScriptCallback(j,J.c.CBK.MINIMIZATION,u(-1,[f,a,b,c,r,e]),!0)},"~S,Integer,Float,Float,~S");c(b,"setScriptStatus",function(a,b,c,r){if(-1>c){var e=-2-c;this.setStatusChanged("scriptStarted",
e,b,!1);a="script "+e+" started"}else if(null==a)return;var e=0==c?this.getJmolScriptCallback(J.c.CBK.SCRIPT):null,f="Script completed"===a;if(this.recordStatus("script")){var j=null!=r;this.setStatusChanged(j?"scriptError":"scriptStatus",0,a,!1);if(j||f)this.setStatusChanged("scriptTerminated",1,"Jmol script terminated"+(j?" unsuccessfully: "+a:" successfully"),!1)}f&&(this.vwr.getBoolean(603979879)&&this.vwr.getBoolean(603979825))&&(a=this.vwr.getChimeMessenger().scriptCompleted(this,b,r));b=u(-1,
[e,a,b,Integer.$valueOf(f?-1:c),r]);((c=this.notifyEnabled(J.c.CBK.SCRIPT))||null!=e)&&this.fireJmolScriptCallback(c,J.c.CBK.SCRIPT,b,!0);this.processScript(b)},"~S,~S,~N,~S");c(b,"processScript",function(a){var b=a[3].intValue();this.vwr.notifyScriptEditor(b,a);0==b&&this.vwr.sendConsoleMessage(null==a[1]?null:a[1].toString())},"~A");c(b,"doSync",function(){return this.isSynced&&this.drivingSync&&!this.syncDisabled});c(b,"setSync",function(a){if(this.syncingMouse){if(null!=a){var b=this.getJmolScriptCallback(J.c.CBK.SYNC);
null!=b&&this.fireJmolScriptCallback(!1,J.c.CBK.SYNC,u(-1,[b,a,"sending mouseSync"]),!0);this.syncSend(a,"*",0)}}else this.syncingScripts||this.syncSend("!"+this.vwr.tm.getMoveToText(this.minSyncRepeatMs/1E3,!1),"*",0)},"~S");c(b,"setSyncDriver",function(a){this.stereoSync&&4!=a&&(this.syncSend("SET_GRAPHICS_OFF","*",0),this.stereoSync=!1);switch(a){case 4:if(!this.syncDisabled)return;this.syncDisabled=!1;break;case 3:this.syncDisabled=!0;break;case 5:this.stereoSync=this.isSynced=this.drivingSync=
!0;break;case 1:this.isSynced=this.drivingSync=!0;break;case 2:this.drivingSync=!1;this.isSynced=!0;break;default:this.isSynced=this.drivingSync=!1}JU.Logger.debugging&&JU.Logger.debug(this.vwr.appletName+" sync mode="+a+"; synced? "+this.isSynced+"; driving? "+this.drivingSync+"; disabled? "+this.syncDisabled)},"~N");c(b,"syncSend",function(a,b,c){return 0!=c||this.notifyEnabled(J.c.CBK.SYNC)?(a=u(-1,[null,a,b,Integer.$valueOf(c)]),null!=this.cbl&&this.cbl.notifyCallback(J.c.CBK.SYNC,a),a[0]):null},
"~S,~O,~N");c(b,"processService",function(a){var b=a.get("service");if(null==b)return null;if(C(b,"JS.SV")){var b=new java.util.Hashtable,c;for(a=a.entrySet().iterator();a.hasNext()&&((c=a.next())||1);)b.put(c.getKey(),JS.SV.oValue(c.getValue()));a=b}this.notifyEnabled(J.c.CBK.SERVICE)&&this.cbl.notifyCallback(J.c.CBK.SERVICE,u(-1,[null,a]));return a},"java.util.Map");c(b,"getSyncMode",function(){return!this.isSynced?0:this.drivingSync?1:2});c(b,"showUrl",function(a){null!=this.jsl&&this.jsl.showUrl(a)},
"~S");c(b,"clearConsole",function(){this.vwr.sendConsoleMessage(null);null!=this.jsl&&this.cbl.notifyCallback(J.c.CBK.MESSAGE,null)});c(b,"functionXY",function(a,b,c){return null==this.jsl?L(Math.abs(b),Math.abs(c),0):this.jsl.functionXY(a,b,c)},"~S,~N,~N");c(b,"functionXYZ",function(a,b,c,r){return null==this.jsl?L(Math.abs(b),Math.abs(c),Math.abs(c),0):this.jsl.functionXYZ(a,b,c,r)},"~S,~N,~N,~N");c(b,"jsEval",function(a){return null==this.jsl?"":this.jsl.eval(a)},"~S");c(b,"createImage",function(a,
b,c,r,e){return null==this.jsl?null:this.jsl.createImage(a,b,null==c?r:c,e)},"~S,~S,~S,~A,~N");c(b,"getRegistryInfo",function(){return null==this.jsl?null:this.jsl.getRegistryInfo()});c(b,"dialogAsk",function(a,b,c){var r=a.equals("Save Image"),e=J.api.Interface.getOption("dialog.Dialog",this.vwr,"status");if(null==e)return null;e.setupUI(!1);r&&e.setImageInfo(this.qualityJPG,this.qualityPNG,this.imageType);a=e.getFileNameFromDialog(this.vwr,a,b);r&&null!=a&&(this.qualityJPG=e.getQuality("JPG"),this.qualityPNG=
e.getQuality("PNG"),r=e.getType(),null!=c&&(c.put("qualityJPG",Integer.$valueOf(this.qualityJPG)),c.put("qualityPNG",Integer.$valueOf(this.qualityPNG)),null!=r&&c.put("dialogImageType",r)),null!=r&&(this.imageType=r));return a},"~S,~S,java.util.Map");c(b,"getJspecViewProperties",function(a){return null==this.jsl?null:this.jsl.getJSpecViewProperty(null==a||0==a.length?"":":"+a)},"~S");c(b,"resizeInnerPanel",function(a,b){return null==this.jsl||a==this.vwr.getScreenWidth()&&b==this.vwr.getScreenHeight()?
E(-1,[a,b]):this.jsl.resizeInnerPanel("preferredWidthHeight "+a+" "+b+";")},"~N,~N");c(b,"resizeInnerPanelString",function(a){null!=this.jsl&&this.jsl.resizeInnerPanel(a)},"~S");c(b,"registerAudio",function(a,b){this.stopAudio(a);null==this.audios&&(this.audios=new java.util.Hashtable);null==b?this.audios.remove(a):this.audios.put(a,b.get("audioPlayer"))},"~S,java.util.Map");c(b,"stopAudio",function(a){null!=this.audios&&(null==a?this.closeAllAudio():(a=this.audios.get(a),null!=a&&a.action("kill")))},
"~S");c(b,"playAudio",function(a){if(this.vwr.getBoolean(603979797))try{var b=null==a?"close":a.get("action"),c=null==a?null:a.get("id");if(null!=b&&0<b.length){if(null==c||0==c.length){if(null==this.audios||this.audios.isEmpty())return;b.equals("close")&&this.closeAllAudio();return}var r=null==this.audios?null:this.audios.get(c);if(null!=r){r.action(b);return}}try{J.api.Interface.getInterface("JU.JmolAudio",this.vwr,"script").playAudio(this.vwr,a)}catch(e){if(D(e,Exception))JU.Logger.info(e.getMessage());
else throw e;}}catch(f){}else null!=a&&(a.put("status","close"),JU.Logger.info("allowAudio is set false"),this.notifyAudioStatus(a))},"java.util.Map");c(b,"closeAllAudio",function(){for(var a,b=this.audios.keySet().iterator();b.hasNext()&&((a=b.next())||1);)System.out.println("AUDIO "+a),this.audios.get(a).action("close");this.audios.clear()});c(b,"notifyAudioStatus",function(a){var b=a.get("status"),c=a.get(b);null!=c&&this.vwr.script(c);var c=this.getJmolScriptCallback(J.c.CBK.AUDIO),r=this.notifyEnabled(J.c.CBK.AUDIO);
(r||null!=c)&&this.fireJmolScriptCallback(r,J.c.CBK.AUDIO,u(-1,[c,a,b]),!0);"ended"===b&&a.get("autoclose")!==Boolean.FALSE&&this.registerAudio(a.get("id"),null)},"java.util.Map");c(b,"syncScript",function(a,b,c){if("GET_GRAPHICS".equalsIgnoreCase(a))this.setSyncDriver(5),this.syncSend(a,b,0),this.vwr.setBooleanProperty("_syncMouse",!1),this.vwr.setBooleanProperty("_syncScript",!1);else{"=".equals(b)&&(b="~",this.setSyncDriver(2));var r="~".equals(b);if(0<c||!r&&!".".equals(b))if(this.syncSend(a,
b,c),!"*".equals(b)||a.startsWith("{"))return;if(a.equalsIgnoreCase("on")||a.equalsIgnoreCase("true"))this.setSyncDriver(1);else if(a.equalsIgnoreCase("off")||a.equalsIgnoreCase("false"))this.setSyncDriver(0);else if(a.equalsIgnoreCase("slave"))this.setSyncDriver(2);else if(b=this.getSyncMode(),0!=b)if(1!=b&&(r=!1),JU.Logger.debugging&&JU.Logger.debug(this.vwr.htmlName+" syncing with script: "+a),r&&this.setSyncDriver(3),0!=a.indexOf("Mouse: ")){b=JV.JC.getServiceCommand(a);switch(b){case 70:case 42:case 49:case 56:case 63:this.syncSend(a,
".",c);return;case 0:case 77:case 28:case 35:if(r)return;case 21:case 7:case 14:if(null==(a=this.vwr.getJSV().processSync(a,b)))return}this.vwr.evalStringQuietSync(a,!0,!1)}else this.mouseScript(a),r&&this.vwr.setSyncDriver(4)}},"~S,~S,~N");c(b,"mouseScript",function(a){var b=JU.PT.getTokens(a),c=b[1];try{switch(c=(c.toLowerCase()+"...............").substring(0,15),"zoombyfactor...zoomby.........rotatezby......rotatexyby.....translatexyby..rotatemolecule.spinxyby.......rotatearcball..".indexOf(c)){case 0:switch(b.length){case 3:this.vwr.zoomByFactor(JU.PT.parseFloat(b[2]),
2147483647,2147483647);return;case 5:this.vwr.zoomByFactor(JU.PT.parseFloat(b[2]),JU.PT.parseInt(b[3]),JU.PT.parseInt(b[4]));return}break;case 15:switch(b.length){case 3:this.vwr.zoomBy(JU.PT.parseInt(b[2]));return}break;case 30:switch(b.length){case 3:this.vwr.rotateZBy(JU.PT.parseInt(b[2]),2147483647,2147483647);return;case 5:this.vwr.rotateZBy(JU.PT.parseInt(b[2]),JU.PT.parseInt(b[3]),JU.PT.parseInt(b[4]))}break;case 45:this.vwr.rotateXYBy(JU.PT.parseFloat(b[2]),JU.PT.parseFloat(b[3]));return;
case 60:this.vwr.translateXYBy(JU.PT.parseInt(b[2]),JU.PT.parseInt(b[3]));return;case 75:this.vwr.rotateSelected(JU.PT.parseFloat(b[2]),JU.PT.parseFloat(b[3]),null);return;case 90:this.vwr.spinXYBy(JU.PT.parseInt(b[2]),JU.PT.parseInt(b[3]),JU.PT.parseFloat(b[4]));return;case 105:this.vwr.rotateXYBy(JU.PT.parseInt(b[2]),JU.PT.parseInt(b[3]));return}}catch(r){if(!D(r,Exception))throw r;}this.vwr.showString("error reading SYNC command: "+a,!1)},"~S");b.MAXIMUM_QUEUE_LENGTH=16});n("JV");z("JU.A4 $.M3 $.M4 $.P3 $.P3i $.V3 J.c.STER JU.Point3fi".split(" "),
"JV.TransformManager","java.util.Hashtable JU.P4 $.Quat $.SB J.api.Interface JU.Escape $.Logger".split(" "),function(){var b=w(function(){this.spinThread=this.vibrationThread=this.movetoThread=this.vwr=null;this.perspectiveModel=11;this.modelRadiusPixels=this.modelRadius=this.modelCenterOffset=this.cameraDistanceFromCenter=this.aperatureAngle=this.referencePlaneOffset=this.cameraScaleFactor=0;this.navigationShiftXY=this.navigationOffset=this.navigationCenter=null;this.navigationDepthPercent=0;this.vectorTemp=
this.matrixTemp=null;this.haveNotifiedNaN=!1;this.spinX=0;this.spinY=30;this.spinZ=0;this.spinFps=30;this.navZ=this.navY=this.navX=0;this.navFps=NaN;this.doTransform4D=this.isSpinSelected=this.isSpinFixed=this.isSpinInternal=!1;this.rotationCenterDefault=this.perspectiveShiftXY=this.perspectiveOffset=this.fixedRotationCenter=this.fixedRotationOffset=null;this.rotationRadiusDefault=0;this.internalRotationCenter=this.internalTranslation=this.internalRotationAxis=this.fixedRotationAxis=null;this.internalRotationAngle=
0;this.rotationAxis=this.pointT2=this.vectorT2=this.vectorT=this.axisangleT=this.matrixTemp4=this.matrixTemp3=this.matrixRotate=null;this.rotationRate=0;this.cameraSetting=this.camera=this.fixedTranslation=null;this.yTranslationFraction=this.xTranslationFraction=0.5;this.previousY=this.previousX=this.prevZoomSetting=0;this.zoomEnabled=!0;this.zmPctSet=this.zmPct=100;this.zoomRatio=0;this.internalSlab=this.zShadeEnabled=this.slabEnabled=!1;this.depthValue=this.slabValue=this.depthPercentSetting=this.slabPercentSetting=
0;this.zSlabPercentSetting=50;this.zDepthPercentSetting=0;this.zSlabPoint=null;this.slabRange=this.zDepthValue=this.zSlabValue=0;this.depthPlane=this.slabPlane=null;this.perspectiveDepth=!0;this.scale3D=!1;this.cameraDepthSetting=this.cameraDepth=3;this.visualRangeAngstroms=0;this.cameraDistance=1E3;this.scale3DAngstromsPerInch=this.scaleDefaultPixelsPerAngstrom=this.scalePixelsPerAngstrom=this.screenPixelCount=this.height=this.width=0;this.zoomHeight=this.useZoomLarge=this.antialias=!1;this.screenHeight=
this.screenWidth=0;this.ptVibTemp=this.iScrPt=this.fScrPt=this.matrixTransformInv=this.matrixTransform=null;this.navigating=!1;this.defaultMode=this.mode=0;this.matrixTest=this.aaTest1=this.ptTest3=this.ptTest2=this.ptTest1=this.untransformedPoint=null;this.vibrationOn=this.spinIsGesture=this.navOn=this.vectorSpinOnly=this.spinOn=!1;this.vibrationScale=this.vibrationPeriodMs=this.vibrationPeriod=0;this.stereoColors=this.stereoMode=this.vibrationT=null;this.stereoDoubleFull=this.stereoDoubleDTI=!1;
this.stereoDegrees=NaN;this.stereoRadians=0;this.stereoFrame=!1;this.matrixStereo=null;this.windowCentered=!1;this.ptOffset=this.bsSelectedAtoms=this.bsFrameOffsets=this.frameOffsets=this.frameOffset=null;this.navMode=1;this.zoomFactor=3.4028235E38;this.navigationSlabOffset=0;this.nav=null;q(this,arguments)},JV,"TransformManager",null);N(b,function(){this.navigationCenter=new JU.P3;this.navigationOffset=new JU.P3;this.navigationShiftXY=new JU.P3;this.matrixTemp=new JU.M4;this.vectorTemp=new JU.V3;
this.fixedRotationOffset=new JU.P3;this.fixedRotationCenter=new JU.P3;this.perspectiveOffset=new JU.P3;this.perspectiveShiftXY=new JU.P3;this.rotationCenterDefault=new JU.P3;this.fixedRotationAxis=new JU.A4;this.internalRotationAxis=new JU.A4;this.internalRotationCenter=JU.P3.new3(0,0,0);this.matrixRotate=new JU.M3;this.matrixTemp3=new JU.M3;this.matrixTemp4=new JU.M4;this.axisangleT=new JU.A4;this.vectorT=new JU.V3;this.vectorT2=new JU.V3;this.pointT2=new JU.P3;this.rotationAxis=new JU.V3;this.fixedTranslation=
new JU.P3;this.camera=new JU.P3;this.cameraSetting=new JU.P3;this.matrixTransform=new JU.M4;this.matrixTransformInv=new JU.M4;this.fScrPt=new JU.P3;this.iScrPt=new JU.P3i;this.ptVibTemp=new JU.Point3fi;this.untransformedPoint=new JU.P3;this.ptTest1=new JU.P3;this.ptTest2=new JU.P3;this.ptTest3=new JU.P3;this.aaTest1=new JU.A4;this.matrixTest=new JU.M3;this.vibrationT=new JU.P3;this.stereoMode=J.c.STER.NONE;this.matrixStereo=new JU.M3;this.frameOffset=new JU.P3;this.ptOffset=new JU.P3});x(b,function(){});
b.getTransformManager=c(b,"getTransformManager",function(a,b,c,r){r=r?J.api.Interface.getInterface("JV.TransformManager4D",a,"tm"):new JV.TransformManager;r.vwr=a;r.setScreenParameters(b,c,!0,!1,!0,!0);return r},"JV.Viewer,~N,~N,~B");c(b,"setDefaultPerspective",function(){this.setCameraDepthPercent(3,!0);this.setPerspectiveDepth(!0);this.setStereoDegrees(-5);this.visualRangeAngstroms=5;this.setSpinOff();this.setVibrationPeriod(0)});c(b,"homePosition",function(a){a&&this.setSpinOff();this.setNavOn(!1);
this.navFps=10;this.navX=this.navY=this.navZ=0;this.rotationCenterDefault.setT(this.vwr.getBoundBoxCenter());this.setFixedRotationCenter(this.rotationCenterDefault);this.rotationRadiusDefault=this.setRotationRadius(0,!0);this.windowCentered=!0;this.setRotationCenterAndRadiusXYZ(null,!0);this.resetRotation();a=this.vwr.ms.getInfoM("defaultOrientationMatrix");null!=a&&this.setRotation(a);this.setZoomEnabled(!0);this.zoomToPercent(this.vwr.g.modelKitMode?50:100);this.zmPct=this.zmPctSet;this.slabReset();
this.resetFitToScreen(!0);this.vwr.isJmolDataFrame()?this.fixedRotationCenter.set(0,0,0):this.vwr.g.axesOrientationRasmol&&this.matrixRotate.setAsXRotation(3.141592653589793);this.vwr.stm.saveOrientation("default",null);1==this.mode&&this.setNavigationMode(!0)},"~B");c(b,"setRotation",function(a){a.isRotation()?this.matrixRotate.setM3(a):this.resetRotation()},"JU.M3");c(b,"resetRotation",function(){this.matrixRotate.setScale(1)});c(b,"clearThreads",function(){this.clearVibration();this.clearSpin();
this.setNavOn(!1);this.stopMotion()});c(b,"clear",function(){this.fixedRotationCenter.set(0,0,0);this.navigating=!1;this.zSlabPoint=this.depthPlane=this.slabPlane=null;this.resetNavigationPoint(!0)});c(b,"setFixedRotationCenter",function(a){null!=a&&this.fixedRotationCenter.setT(a)},"JU.T3");c(b,"setRotationPointXY",function(a){a=this.transformPt(a);this.fixedTranslation.set(a.x,a.y,0)},"JU.P3");c(b,"spinXYBy",function(a,b,c){if(0==a&&0==b)null!=this.spinThread&&this.spinIsGesture&&this.clearSpin();
else{this.clearSpin();var r=JU.P3.newP(this.fixedRotationCenter),e=new JU.P3;this.transformPt3f(r,e);a=JU.P3.new3(-b,a,0);a.add(e);this.unTransformPoint(a,a);this.vwr.setInMotion(!1);this.rotateAboutPointsInternal(null,a,r,10*c,NaN,!1,!0,null,!0,null,null,null,null,null,!1,null)}},"~N,~N,~N");c(b,"rotateXYBy",function(a,b,c){this.vwr.is2D()||this.rotate3DBall(a,b,c)},"~N,~N,JU.BS");c(b,"rotateZBy",function(a,b,c){2147483647!=b&&2147483647!=c&&this.resetXYCenter(b,c);this.rotateZRadians(a/57.29577951308232)},
"~N,~N,~N");c(b,"applyRotation",function(a,b,c,r,e,f,j){null==c?this.matrixRotate.mul2(a,this.matrixRotate):(this.vwr.moveAtoms(f,a,this.matrixRotate,r,this.internalRotationCenter,b,c,e,j),null!=r&&this.internalRotationCenter.add(r))},"JU.M3,~B,JU.BS,JU.V3,~B,JU.M4,~B");c(b,"rotate3DBall",function(a,b,c){this.matrixTemp3.setAsBallRotation(0.017453292519943295,-b,-a)&&this.applyRotation(this.matrixTemp3,!1,c,null,!1,null,!0)},"~N,~N,JU.BS");c(b,"rotateXRadians",function(a,b){this.applyRotation(this.matrixTemp3.setAsXRotation(a),
!1,b,null,!1,null,!1)},"~N,JU.BS");c(b,"rotateYRadians",function(a,b){this.applyRotation(this.matrixTemp3.setAsYRotation(a),!1,b,null,!1,null,!1)},"~N,JU.BS");c(b,"rotateZRadians",function(a){this.applyRotation(this.matrixTemp3.setAsZRotation(a),!1,null,null,!1,null,!1)},"~N");c(b,"rotateAxisAngle",function(a,b){this.axisangleT.setVA(a,b);this.rotateAxisAngle2(this.axisangleT,null)},"JU.V3,~N");c(b,"rotateAxisAngle2",function(a,b){this.applyRotation(this.matrixTemp3.setAA(a),!1,b,null,!1,null,!1)},
"JU.A4,JU.BS");c(b,"rotateAxisAngleAtCenter",function(a,b,c,r,e,f,j){null!=b&&this.moveRotationCenter(b,!0);f&&this.setSpinOff();this.setNavOn(!1);if(this.vwr.headless){if(f&&3.4028235E38==e)return!1;f=!1}if(Float.isNaN(r)||0==r||0==e)return!1;null!=b&&this.setRotationPointXY(b);this.setFixedRotationCenter(b);this.rotationAxis.setT(c);this.rotationRate=r;if(f)return this.fixedRotationAxis.setVA(c,0.017453292519943295*r),this.isSpinInternal=!1,this.isSpinFixed=!0,this.isSpinSelected=null!=j,this.setSpin(a,
!0,e,null,null,null,j,!1,null,-1),3.4028235E38!=e;a=0.017453292519943295*e;this.fixedRotationAxis.setVA(c,e);this.rotateAxisAngleRadiansFixed(a,j);return!0},"J.api.JmolScriptEvaluator,JU.P3,JU.V3,~N,~N,~B,JU.BS");c(b,"rotateAxisAngleRadiansFixed",function(a,b){this.axisangleT.setAA(this.fixedRotationAxis);this.axisangleT.angle=a;this.rotateAxisAngle2(this.axisangleT,b)},"~N,JU.BS");c(b,"rotateAboutPointsInternal",function(a,b,c,r,e,f,j,g,l,s,m,p,n,q,u,w){j&&this.setSpinOff();this.setNavOn(!1);if(null==
n&&null==p&&null==w&&(null==s||0.001>s.length())&&(j?Float.isNaN(r)||0==r:0==e))return!1;var x=null;null==p&&null==n&&(x=JU.V3.newVsub(c,b),f&&x.scale(-1),this.internalRotationCenter.setT(b),this.rotationAxis.setT(x),this.internalTranslation=null==s?null:JU.V3.newV(s));b=null!=g;c=-1;if(j)return null==p&&null==n?(0==e&&(e=NaN),Float.isNaN(e)?this.rotationRate=r:(c=v(Math.abs(e)/Math.abs(r)*this.spinFps+0.5),this.rotationRate=e/c*this.spinFps,null!=s&&this.internalTranslation.scale(1/c)),this.internalRotationAxis.setVA(x,
0.017453292519943295*(Float.isNaN(this.rotationRate)?0:this.rotationRate)),this.isSpinInternal=!0,this.isSpinFixed=!1,this.isSpinSelected=b):e=r,this.setSpin(a,!0,e,m,p,n,g,l,w,null==w?-1:c),!Float.isNaN(e);a=0.017453292519943295*e;this.internalRotationAxis.setVA(x,a);this.rotateAxisAngleRadiansInternal(a,g,q,u);return!1},"J.api.JmolScriptEvaluator,JU.T3,JU.T3,~N,~N,~B,~B,JU.BS,~B,JU.V3,JU.Lst,~A,JU.M3,JU.M4,~B,~A");c(b,"rotateAxisAngleRadiansInternal",function(a,b,c,r){this.internalRotationAngle=
a;this.vectorT.set(this.internalRotationAxis.x,this.internalRotationAxis.y,this.internalRotationAxis.z);this.matrixRotate.rotate2(this.vectorT,this.vectorT2);this.axisangleT.setVA(this.vectorT2,a);this.applyRotation(this.matrixTemp3.setAA(this.axisangleT),!0,b,this.internalTranslation,1E6<a,c,r);null==b&&this.getNewFixedRotationCenter()},"~N,JU.BS,JU.M4,~B");c(b,"getNewFixedRotationCenter",function(){this.axisangleT.setAA(this.internalRotationAxis);this.axisangleT.angle=-this.internalRotationAngle;
this.matrixTemp4.setToAA(this.axisangleT);this.vectorT.setT(this.internalRotationCenter);this.pointT2.sub2(this.fixedRotationCenter,this.vectorT);var a=this.matrixTemp4.rotTrans2(this.pointT2,new JU.P3);a.add(this.vectorT);this.setRotationCenterAndRadiusXYZ(a,!1)});c(b,"setTranslationFractions",function(){this.xTranslationFraction=this.fixedTranslation.x/this.width;this.yTranslationFraction=this.fixedTranslation.y/this.height});c(b,"centerAt",function(a,b,c){null==c?this.translateXYBy(a,b):(this.windowCentered&&
this.vwr.setBooleanProperty("windowCentered",!1),this.fixedTranslation.x=a,this.fixedTranslation.y=b,this.setFixedRotationCenter(c))},"~N,~N,JU.P3");c(b,"percentToPixels",function(a,b){switch(a.charCodeAt(0)){case 120:return v(Math.floor(b/100*this.width));case 121:return v(Math.floor(b/100*this.height));case 122:return v(Math.floor(b/100*this.screenPixelCount))}return 0},"~S,~N");c(b,"angstromsToPixels",function(a){return this.scalePixelsPerAngstrom*a},"~N");c(b,"translateXYBy",function(a,b){this.fixedTranslation.x+=
a;this.fixedTranslation.y+=b;this.setTranslationFractions()},"~N,~N");c(b,"setCamera",function(a,b){this.cameraSetting.set(a,b,0==a&&0==b?0:1)},"~N,~N");c(b,"translateToPercent",function(a,b){switch(a.charCodeAt(0)){case 120:this.xTranslationFraction=0.5+b/100;this.fixedTranslation.x=this.width*this.xTranslationFraction;break;case 121:this.yTranslationFraction=0.5+b/100;this.fixedTranslation.y=this.height*this.yTranslationFraction;break;case 122:1==this.mode&&this.setNavigationDepthPercent(b)}},"~S,~N");
c(b,"getTranslationXPercent",function(){return 0==this.width?0:100*(this.fixedTranslation.x-this.width/2)/this.width});c(b,"getTranslationYPercent",function(){return 0==this.height?0:100*(this.fixedTranslation.y-this.height/2)/this.height});c(b,"getTranslationScript",function(){var a="",b=this.getTranslationXPercent();0!=b&&(a+="translate x "+b+";");b=this.getTranslationYPercent();0!=b&&(a+="translate y "+b+";");return a});c(b,"getOrientationText",function(a,b){switch(a){case 4129:return this.getMoveToText(1,
!1);case 1073742132:var c=this.getRotationQ();b&&(c=c.inv());return c.toString();case 1073742178:var c=new JU.SB,r=this.getTranslationXPercent();JV.TransformManager.truncate2(c,b?-r:r);r=this.getTranslationYPercent();JV.TransformManager.truncate2(c,b?-r:r);return c.toString();default:return this.getMoveToText(1,!0)+"\n#OR\n"+this.getRotateZyzText(!0)}},"~N,~B");c(b,"getRotationQ",function(){return JU.Quat.newM(this.matrixRotate)});c(b,"getOrientationInfo",function(){var a=new java.util.Hashtable;
a.put("moveTo",this.getMoveToText(1,!1));a.put("center","center "+this.getCenterText());a.put("centerPt",this.fixedRotationCenter);var b=new JU.A4;b.setM(this.matrixRotate);a.put("axisAngle",b);a.put("quaternion",this.getRotationQ().toPoint4f());a.put("rotationMatrix",this.matrixRotate);a.put("rotateZYZ",this.getRotateZyzText(!1));a.put("rotateXYZ",this.getRotateXyzText());a.put("transXPercent",Float.$valueOf(this.getTranslationXPercent()));a.put("transYPercent",Float.$valueOf(this.getTranslationYPercent()));
a.put("zoom",Float.$valueOf(this.zmPct));a.put("modelRadius",Float.$valueOf(this.modelRadius));1==this.mode&&(a.put("navigationCenter","navigate center "+JU.Escape.eP(this.navigationCenter)),a.put("navigationOffsetXPercent",Float.$valueOf(this.getNavigationOffsetPercent("X"))),a.put("navigationOffsetYPercent",Float.$valueOf(this.getNavigationOffsetPercent("Y"))),a.put("navigationDepthPercent",Float.$valueOf(this.navigationDepthPercent)));return a});c(b,"getRotation",function(a){a.setM3(this.matrixRotate)},
"JU.M3");c(b,"setZoomHeight",function(a,b){this.zoomHeight=a;this.scaleFitToScreen(!1,b,!1,!0)},"~B,~B");c(b,"zoomBy",function(a){20<a?a=20:-20>a&&(a=-20);var b=a*this.zmPctSet/50;0==b&&(b=0<a?1:0>b?-1:0);this.zoomRatio=(b+this.zmPctSet)/this.zmPctSet;this.zmPctSet+=b},"~N");c(b,"zoomByFactor",function(a,b,c){!(0>=a)&&this.zoomEnabled&&(1!=this.mode?(this.zoomRatio=a,this.zmPctSet*=a,this.resetXYCenter(b,c)):this.getNav()&&this.nav.zoomByFactor(a,b,c))},"~N,~N,~N");c(b,"zoomToPercent",function(a){this.zmPctSet=
a;this.zoomRatio=0},"~N");c(b,"translateZBy",function(a){a>=this.screenPixelCount||(a=this.scalePixelsPerAngstrom/(1-1*a/this.screenPixelCount),a>=this.screenPixelCount||(a=100*(a/this.scaleDefaultPixelsPerAngstrom),this.zoomRatio=a/this.zmPctSet,this.zmPctSet=a))},"~N");c(b,"resetXYCenter",function(a,b){if(!(2147483647==a||2147483647==b)){this.windowCentered&&this.vwr.setBooleanProperty("windowCentered",!1);var c=new JU.P3;this.transformPt3f(this.fixedRotationCenter,c);c.set(a,b,c.z);this.unTransformPoint(c,
c);this.fixedTranslation.set(a,b,0);this.setFixedRotationCenter(c)}},"~N,~N");c(b,"zoomByPercent",function(a){var b=a*this.zmPctSet/100;0==b&&(b=0>a?-1:1);this.zoomRatio=(b+this.zmPctSet)/this.zmPctSet;this.zmPctSet+=b},"~N");c(b,"setScaleAngstromsPerInch",function(a){if(this.scale3D=0<a)this.scale3DAngstromsPerInch=a;this.perspectiveDepth=!this.scale3D},"~N");c(b,"setSlabRange",function(a){this.slabRange=a},"~N");c(b,"setSlabEnabled",function(a){this.vwr.g.setB("slabEnabled",this.slabEnabled=a)},
"~B");c(b,"setZShadeEnabled",function(a){this.zShadeEnabled=a;this.vwr.g.setB("zShade",a)},"~B");c(b,"setZoomEnabled",function(a){this.zoomEnabled=a;this.vwr.g.setB("zoomEnabled",a)},"~B");c(b,"slabReset",function(){this.slabToPercent(100);this.depthToPercent(0);this.slabPlane=this.depthPlane=null;this.setSlabEnabled(!1);this.setZShadeEnabled(!1);this.slabDepthChanged()});c(b,"getSlabPercentSetting",function(){return this.slabPercentSetting});c(b,"slabDepthChanged",function(){this.vwr.g.setI("slab",
this.slabPercentSetting);this.vwr.g.setI("depth",this.depthPercentSetting);this.finalizeTransformParameters()});c(b,"slabByPercentagePoints",function(a){this.slabPlane=null;if(!(0>a?this.slabPercentSetting<=Math.max(0,this.depthPercentSetting):100<=this.slabPercentSetting))this.slabPercentSetting+=a,this.slabDepthChanged(),this.depthPercentSetting>=this.slabPercentSetting&&(this.depthPercentSetting=this.slabPercentSetting-1)},"~N");c(b,"depthByPercentagePoints",function(a){this.depthPlane=null;if(!(0>
a?0>=this.depthPercentSetting:this.depthPercentSetting>=Math.min(100,this.slabPercentSetting)))this.depthPercentSetting+=a,this.slabPercentSetting<=this.depthPercentSetting&&(this.slabPercentSetting=this.depthPercentSetting+1),this.slabDepthChanged()},"~N");c(b,"slabDepthByPercentagePoints",function(a){this.depthPlane=this.slabPlane=null;if(!(0>a?this.slabPercentSetting<=Math.max(0,this.depthPercentSetting):this.depthPercentSetting>=Math.min(100,this.slabPercentSetting)))this.slabPercentSetting+=
a,this.depthPercentSetting+=a,this.slabDepthChanged()},"~N");c(b,"slabToPercent",function(a){this.slabPlane=null;this.vwr.setFloatProperty("slabRange",0);this.slabPercentSetting=a;this.depthPercentSetting>=this.slabPercentSetting&&(this.depthPercentSetting=this.slabPercentSetting-1);this.slabDepthChanged()},"~N");c(b,"depthToPercent",function(a){this.depthPlane=null;this.vwr.g.setI("depth",a);this.depthPercentSetting=a;this.slabPercentSetting<=this.depthPercentSetting&&(this.slabPercentSetting=this.depthPercentSetting+
1);this.slabDepthChanged()},"~N");c(b,"zSlabToPercent",function(a){this.zSlabPercentSetting=a;this.zDepthPercentSetting>this.zSlabPercentSetting&&(this.zDepthPercentSetting=a)},"~N");c(b,"zDepthToPercent",function(a){this.zDepthPercentSetting=a;this.zDepthPercentSetting>this.zSlabPercentSetting&&(this.zSlabPercentSetting=a)},"~N");c(b,"slabInternal",function(a,b){b?(this.depthPlane=a,this.depthPercentSetting=0):(this.slabPlane=a,this.slabPercentSetting=100);this.slabDepthChanged()},"JU.P4,~B");c(b,
"setSlabDepthInternal",function(a){a?this.depthPlane=null:this.slabPlane=null;this.finalizeTransformParameters();this.slabInternal(this.getSlabDepthPlane(a),a)},"~B");c(b,"getSlabDepthPlane",function(a){if(a){if(null!=this.depthPlane)return this.depthPlane}else if(null!=this.slabPlane)return this.slabPlane;var b=this.matrixTransform;return JU.P4.new4(-b.m20,-b.m21,-b.m22,-b.m23+(a?this.depthValue:this.slabValue))},"~B");c(b,"getCameraFactors",function(){this.aperatureAngle=360*Math.atan2(this.screenPixelCount/
2,this.referencePlaneOffset)/3.141592653589793;this.cameraDistanceFromCenter=this.referencePlaneOffset/this.scalePixelsPerAngstrom;var a=JU.P3.new3(v(this.screenWidth/2),v(this.screenHeight/2),this.referencePlaneOffset);this.unTransformPoint(a,a);var b=JU.P3.new3(v(this.screenWidth/2),v(this.screenHeight/2),0);this.unTransformPoint(b,b);b.sub(this.fixedRotationCenter);var c=JU.P3.new3(v(this.screenWidth/2),v(this.screenHeight/2),this.cameraDistanceFromCenter*this.scalePixelsPerAngstrom);this.unTransformPoint(c,
c);c.sub(this.fixedRotationCenter);b.add(c);return u(-1,[a,b,this.fixedRotationCenter,JU.P3.new3(this.cameraDistanceFromCenter,this.aperatureAngle,this.scalePixelsPerAngstrom)])});c(b,"setPerspectiveDepth",function(a){this.perspectiveDepth!=a&&(this.perspectiveDepth=a,this.vwr.g.setB("perspectiveDepth",a),this.resetFitToScreen(!1))},"~B");c(b,"getPerspectiveDepth",function(){return this.perspectiveDepth});c(b,"setCameraDepthPercent",function(a,b){this.resetNavigationPoint(b);var c=0>a?-a/100:a;0!=
c&&(this.cameraDepthSetting=c,this.vwr.g.setF("cameraDepth",this.cameraDepthSetting),this.cameraDepth=NaN)},"~N,~B");c(b,"getCameraDepth",function(){return this.cameraDepthSetting});c(b,"setScreenParameters0",function(a,b,c,r,e,f){2147483647!=a&&(this.screenWidth=a,this.screenHeight=b,this.useZoomLarge=c,this.width=(this.antialias=r)?2*a:a,this.height=r?2*b:b,this.scaleFitToScreen(!1,c,e,f))},"~N,~N,~B,~B,~B,~B");c(b,"setAntialias",function(a){var b=this.antialias!=a;this.width=(this.antialias=a)?
2*this.screenWidth:this.screenWidth;this.height=this.antialias?2*this.screenHeight:this.screenHeight;b&&this.scaleFitToScreen(!1,this.useZoomLarge,!1,!1)},"~B");c(b,"defaultScaleToScreen",function(a){return this.screenPixelCount/2/a},"~N");c(b,"resetFitToScreen",function(a){this.scaleFitToScreen(a,this.vwr.g.zoomLarge,!0,!0)},"~B");c(b,"scaleFitToScreen",function(a,b,c,r){0==this.width||0==this.height?this.screenPixelCount=1:(this.fixedTranslation.set(this.width*(a?0.5:this.xTranslationFraction),
this.height*(a?0.5:this.yTranslationFraction),0),this.setTranslationFractions(),a&&this.camera.set(0,0,0),r&&this.resetNavigationPoint(c),this.zoomHeight&&(b=this.height>this.width),this.screenPixelCount=b==this.height>this.width?this.height:this.width);2<this.screenPixelCount&&(this.screenPixelCount-=2);this.scaleDefaultPixelsPerAngstrom=this.defaultScaleToScreen(this.modelRadius)},"~B,~B,~B,~B");c(b,"scaleToScreen",function(a,b){if(0==b||2>a)return 0;var c=this.scaleToPerspective(a,b*this.scalePixelsPerAngstrom/
1E3);return 0<c?c:1},"~N,~N");c(b,"unscaleToScreen",function(a,b){var c=b/this.scalePixelsPerAngstrom;return this.perspectiveDepth?c/this.getPerspectiveFactor(a):c},"~N,~N");c(b,"scaleToPerspective",function(a,b){return this.perspectiveDepth?b*this.getPerspectiveFactor(a):b},"~N,~N");c(b,"setNavigationMode",function(a){this.mode=a?1:this.defaultMode;this.resetNavigationPoint(!0)},"~B");c(b,"isNavigating",function(){return this.navigating||this.navOn});c(b,"finalizeTransformParameters",function(){this.haveNotifiedNaN=
!1;this.fixedRotationOffset.setT(this.fixedTranslation);this.camera.setT(this.cameraSetting);this.internalSlab=this.slabEnabled&&(null!=this.slabPlane||null!=this.depthPlane);var a=this.getZoomSetting();this.zmPct!=a&&(this.zmPct=a,this.vwr.g.fontCaching||this.vwr.gdata.clearFontCache());this.calcCameraFactors();this.calcTransformMatrix();1==this.mode?this.calcNavigationPoint():this.calcSlabAndDepthValues()});c(b,"getZoomSetting",function(){5>this.zmPctSet&&(this.zmPctSet=5);2E5<this.zmPctSet&&(this.zmPctSet=
2E5);return this.zoomEnabled||1==this.mode?this.zmPctSet:100});c(b,"calcSlabAndDepthValues",function(){this.slabValue=1>this.slabRange?this.zValueFromPercent(this.slabPercentSetting):v(Math.floor(this.modelCenterOffset*this.slabRange/(2*this.modelRadius)*(this.zmPctSet/100)));this.depthValue=this.zValueFromPercent(this.depthPercentSetting);this.zSlabPercentSetting==this.zDepthPercentSetting?(this.zSlabValue=this.slabValue,this.zDepthValue=this.depthValue):(this.zSlabValue=this.zValueFromPercent(this.zSlabPercentSetting),
this.zDepthValue=this.zValueFromPercent(this.zDepthPercentSetting));if(null!=this.zSlabPoint)try{this.transformPt3f(this.zSlabPoint,this.pointT2),this.zSlabValue=F(this.pointT2.z)}catch(a){if(!D(a,Exception))throw a;}this.vwr.g.setO("_slabPlane",JU.Escape.eP4(this.getSlabDepthPlane(!1)));this.vwr.g.setO("_depthPlane",JU.Escape.eP4(this.getSlabDepthPlane(!0)));this.slabEnabled||(this.slabValue=0,this.depthValue=2147483647)});c(b,"zValueFromPercent",function(a){return v(Math.floor((1-a/50)*this.modelRadiusPixels+
this.modelCenterOffset))},"~N");c(b,"calcTransformMatrix",function(){this.matrixTransform.setIdentity();this.vectorTemp.sub2(this.frameOffset,this.fixedRotationCenter);this.matrixTransform.setTranslation(this.vectorTemp);this.matrixTemp.setToM3(this.stereoFrame?this.matrixStereo:this.matrixRotate);this.matrixTransform.mul2(this.matrixTemp,this.matrixTransform);this.matrixTemp.setIdentity();this.matrixTemp.m00=this.matrixTemp.m11=this.matrixTemp.m22=this.scalePixelsPerAngstrom;this.matrixTemp.m11=
this.matrixTemp.m22=-this.scalePixelsPerAngstrom;this.matrixTransform.mul2(this.matrixTemp,this.matrixTransform);this.matrixTransform.m23+=this.modelCenterOffset;try{this.matrixTransformInv.setM4(this.matrixTransform).invert()}catch(a){if(D(a,Exception))System.out.println("ERROR INVERTING matrixTransform!");else throw a;}});c(b,"rotatePoint",function(a,b){this.matrixRotate.rotate2(a,b);b.y=-b.y},"JU.T3,JU.T3");c(b,"getScreenTemp",function(a){this.matrixTransform.rotTrans2(a,this.fScrPt)},"JU.T3");
c(b,"transformPtScr",function(a,b){b.setT(this.transformPt(a))},"JU.T3,JU.P3i");c(b,"transformPtScrT3",function(a,b){this.transformPt(a);b.setT(this.fScrPt)},"JU.T3,JU.T3");c(b,"transformPt3f",function(a,b){this.applyPerspective(a,a);b.setT(this.fScrPt)},"JU.T3,JU.P3");c(b,"transformPtNoClip",function(a,b){this.applyPerspective(a,null);b.setT(this.fScrPt)},"JU.T3,JU.T3");c(b,"transformPt",function(a){return this.applyPerspective(a,this.internalSlab?a:null)},"JU.T3");c(b,"transformPtVib",function(a,
b){this.ptVibTemp.setT(a);return this.applyPerspective(this.getVibrationPoint(b,this.ptVibTemp,NaN),a)},"JU.P3,JU.Vibration");c(b,"getVibrationPoint",function(a,b,c){return a.setCalcPoint(b,this.vibrationT,Float.isNaN(c)?this.vibrationScale:c,this.vwr.g.modulationScale)},"JU.Vibration,JU.T3,~N");c(b,"transformPt2Df",function(a,b){-3.4028235E38==a.z||3.4028235E38==a.z?(this.transformPt2D(a),b.set(this.iScrPt.x,this.iScrPt.y,this.iScrPt.z)):this.transformPt3f(a,b)},"JU.T3,JU.P3");c(b,"transformPtScrT32D",
function(a,b){-3.4028235E38==a.z||3.4028235E38==a.z?(this.transformPt2D(a),b.set(this.iScrPt.x,this.iScrPt.y,this.iScrPt.z)):this.transformPtScrT3(a,b)},"JU.T3,JU.P3");c(b,"transformPt2D",function(a){-3.4028235E38==a.z?(this.iScrPt.x=v(Math.floor(a.x/100*this.screenWidth)),this.iScrPt.y=v(Math.floor((1-a.y/100)*this.screenHeight))):(this.iScrPt.x=F(a.x),this.iScrPt.y=this.screenHeight-F(a.y));this.antialias&&(this.iScrPt.x<<=1,this.iScrPt.y<<=1);this.matrixTransform.rotTrans2(this.fixedRotationCenter,
this.fScrPt);this.iScrPt.z=F(this.fScrPt.z);return this.iScrPt},"JU.T3");c(b,"applyPerspective",function(a,b){this.getScreenTemp(a);var c=this.fScrPt.z;Float.isNaN(c)?(!this.haveNotifiedNaN&&JU.Logger.debugging&&JU.Logger.debug("NaN seen in TransformPoint"),this.haveNotifiedNaN=!0,c=this.fScrPt.z=1):0>=c&&(c=this.fScrPt.z=1);switch(this.mode){case 1:this.fScrPt.x-=this.navigationShiftXY.x;this.fScrPt.y-=this.navigationShiftXY.y;break;case 2:this.fScrPt.x+=this.perspectiveShiftXY.x,this.fScrPt.y+=
this.perspectiveShiftXY.y}this.perspectiveDepth&&(c=this.getPerspectiveFactor(c),this.fScrPt.x*=c,this.fScrPt.y*=c);switch(this.mode){case 1:this.fScrPt.x+=this.navigationOffset.x;this.fScrPt.y+=this.navigationOffset.y;break;case 2:this.fScrPt.x-=this.perspectiveShiftXY.x,this.fScrPt.y-=this.perspectiveShiftXY.y;case 0:this.fScrPt.x+=this.fixedRotationOffset.x,this.fScrPt.y+=this.fixedRotationOffset.y}Float.isNaN(this.fScrPt.x)&&!this.haveNotifiedNaN&&(JU.Logger.debugging&&JU.Logger.debug("NaN found in transformPoint "),
this.haveNotifiedNaN=!0);this.iScrPt.set(F(this.fScrPt.x),F(this.fScrPt.y),F(this.fScrPt.z));null!=b&&this.xyzIsSlabbedInternal(b)&&(this.fScrPt.z=this.iScrPt.z=1);return this.iScrPt},"JU.T3,JU.T3");c(b,"xyzIsSlabbedInternal",function(a){return null!=this.slabPlane&&0<a.x*this.slabPlane.x+a.y*this.slabPlane.y+a.z*this.slabPlane.z+this.slabPlane.w||null!=this.depthPlane&&0>a.x*this.depthPlane.x+a.y*this.depthPlane.y+a.z*this.depthPlane.z+this.depthPlane.w},"JU.T3");c(b,"move",function(a,b,c,r,e,f,
j){this.movetoThread=J.api.Interface.getOption("thread.MoveToThread",this.vwr,"tm");this.movetoThread.setManager(this,this.vwr,u(-1,[b,r,L(-1,[c,e,f,j])]));0<f&&this.movetoThread.setEval(a);this.movetoThread.run()},"J.api.JmolScriptEvaluator,JU.V3,~N,JU.V3,~N,~N,~N");c(b,"isInPosition",function(a,b){if(Float.isNaN(b))return!0;this.aaTest1.setVA(a,b/57.29577951308232);this.ptTest1.set(4.321,1.23456,3.14159);this.getRotation(this.matrixTest);this.matrixTest.rotate2(this.ptTest1,this.ptTest2);this.matrixTest.setAA(this.aaTest1).rotate2(this.ptTest1,
this.ptTest3);return 0.1>this.ptTest3.distance(this.ptTest2)},"JU.V3,~N");c(b,"moveToPyMOL",function(a,b,c){var r=JU.M3.newA9(c);r.invert();var e=c[9],f=-c[10],j=-c[11],g=JU.P3.new3(c[12],c[13],c[14]),l=c[15],s=c[16],m=c[17];this.setPerspectiveDepth(!(0<=m));var m=Math.abs(m)/2,p=Math.tan(3.141592653589793*m/180),m=j*p,p=0.5/p-0.5,n=50/m;0<l&&(l=50+F((j-l)*n),j=50+F((j-s)*n),this.setSlabEnabled(!0),this.slabToPercent(l),this.depthToPercent(j),21==c.length&&(s=0!=c[18],n=0!=c[19],c=c[20],this.setZShadeEnabled(s),
s&&(n?this.vwr.setIntProperty("zSlab",F(Math.min(100,l+c*(j-l)))):this.vwr.setIntProperty("zSlab",F((l+j)/2)),this.vwr.setIntProperty("zDepth",j))));this.moveTo(a,b,g,null,0,r,100,NaN,NaN,m,null,NaN,NaN,NaN,p,e,f);return!0},"J.api.JmolScriptEvaluator,~N,~A");c(b,"moveTo",function(a,b,c,r,e,f,j,g,l,s,m,p,n,q,v,w,x){if(null==f)if(f=new JU.M3,r=JU.V3.newV(r),Float.isNaN(e))f.m00=NaN;else if(0.01>e&&-0.01<e)f.setScale(1);else{if(0==r.x&&0==r.y&&0==r.z)return;var z=new JU.A4;z.setVA(r,e/57.29577951308232);
f.setAA(z)}w==this.cameraSetting.x&&(w=NaN);x==this.cameraSetting.y&&(x=NaN);v==this.cameraDepth&&(v=NaN);Float.isNaN(w)||(g=50*w/s/this.width*this.screenPixelCount);Float.isNaN(x)||(l=50*x/s/this.height*this.screenPixelCount);e=null==c?this.scaleDefaultPixelsPerAngstrom:this.defaultScaleToScreen(s);if(0>=b)this.setAll(c,f,m,j,g,l,s,e,q,p,n,v,w,x),this.vwr.moveUpdate(b),this.vwr.finalizeTransformParameters();else try{null==this.movetoThread&&(this.movetoThread=J.api.Interface.getOption("thread.MoveToThread",
this.vwr,"tm"));var B=this.movetoThread.setManager(this,this.vwr,u(-1,[c,f,m,L(-1,[b,j,g,l,s,e,q,p,n,v,w,x])]));0>=B||this.vwr.g.waitForMoveTo?(0<B&&this.movetoThread.setEval(a),this.movetoThread.run(),this.vwr.isSingleThreaded||(this.movetoThread=null)):this.movetoThread.start()}catch(C){if(!D(C,Exception))throw C;}},"J.api.JmolScriptEvaluator,~N,JU.P3,JU.T3,~N,JU.M3,~N,~N,~N,~N,JU.P3,~N,~N,~N,~N,~N,~N");c(b,"setAll",function(a,b,c,r,e,f,j,g,l,s,m,p,n,q){Float.isNaN(b.m00)||this.setRotation(b);null!=
a&&this.moveRotationCenter(a,!this.windowCentered);null!=c&&1==this.mode&&this.navigationCenter.setT(c);Float.isNaN(p)||this.setCameraDepthPercent(p,!1);!Float.isNaN(n)&&!Float.isNaN(q)&&this.setCamera(n,q);Float.isNaN(r)||this.zoomToPercent(r);Float.isNaN(j)||(this.modelRadius=j);Float.isNaN(g)||(this.scaleDefaultPixelsPerAngstrom=g);!Float.isNaN(e)&&!Float.isNaN(f)&&(this.translateToPercent("x",e),this.translateToPercent("y",f));1==this.mode&&(!Float.isNaN(s)&&!Float.isNaN(m)&&this.navTranslatePercentOrTo(0,
s,m),Float.isNaN(l)||this.setNavigationDepthPercent(l))},"JU.P3,JU.M3,JU.P3,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");c(b,"stopMotion",function(){this.movetoThread=null});c(b,"getRotationText",function(){this.axisangleT.setM(this.matrixRotate);var a=57.29577951308232*this.axisangleT.angle,b=new JU.SB;this.vectorT.set(this.axisangleT.x,this.axisangleT.y,this.axisangleT.z);if(0.01>a)return"{0 0 1 0}";this.vectorT.normalize();this.vectorT.scale(1E3);b.append("{");JV.TransformManager.truncate0(b,this.vectorT.x);
JV.TransformManager.truncate0(b,this.vectorT.y);JV.TransformManager.truncate0(b,this.vectorT.z);JV.TransformManager.truncate2(b,a);b.append("}");return b.toString()});c(b,"getMoveToText",function(a,b){this.finalizeTransformParameters();var c=new JU.SB;c.append("moveto ");b&&c.append("/* time, axisAngle */ ");c.appendF(a);c.append(" ").append(this.getRotationText());b&&c.append(" /* zoom, translation */ ");JV.TransformManager.truncate2(c,this.zmPctSet);JV.TransformManager.truncate2(c,this.getTranslationXPercent());
JV.TransformManager.truncate2(c,this.getTranslationYPercent());c.append(" ");b&&c.append(" /* center, rotationRadius */ ");c.append(this.getCenterText());c.append(" ").appendF(this.modelRadius);c.append(this.getNavigationText(b));b&&c.append(" /* cameraDepth, cameraX, cameraY */ ");JV.TransformManager.truncate2(c,this.cameraDepth);JV.TransformManager.truncate2(c,this.cameraSetting.x);JV.TransformManager.truncate2(c,this.cameraSetting.y);c.append(";");return c.toString()},"~N,~B");c(b,"getCenterText",
function(){return JU.Escape.eP(this.fixedRotationCenter)});c(b,"getRotateXyzText",function(){var a=new JU.SB,b=this.matrixRotate.m20,c=-(57.29577951308232*Math.asin(b)),r;0.999<b||-0.999>b?(b=-(57.29577951308232*Math.atan2(this.matrixRotate.m12,this.matrixRotate.m11)),r=0):(b=57.29577951308232*Math.atan2(this.matrixRotate.m21,this.matrixRotate.m22),r=57.29577951308232*Math.atan2(this.matrixRotate.m10,this.matrixRotate.m00));a.append("reset");a.append(";center ").append(this.getCenterText());0!=b&&
(a.append("; rotate x"),JV.TransformManager.truncate2(a,b));0!=c&&(a.append("; rotate y"),JV.TransformManager.truncate2(a,c));0!=r&&(a.append("; rotate z"),JV.TransformManager.truncate2(a,r));a.append(";");this.addZoomTranslationNavigationText(a);return a.toString()});c(b,"addZoomTranslationNavigationText",function(a){100!=this.zmPct&&(a.append(" zoom"),JV.TransformManager.truncate2(a,this.zmPct),a.append(";"));var b=this.getTranslationXPercent();0!=b&&(a.append(" translate x"),JV.TransformManager.truncate2(a,
b),a.append(";"));b=this.getTranslationYPercent();0!=b&&(a.append(" translate y"),JV.TransformManager.truncate2(a,b),a.append(";"));if(this.modelRadius!=this.rotationRadiusDefault||10==this.modelRadius)a.append(" set rotationRadius"),JV.TransformManager.truncate2(a,this.modelRadius),a.append(";");1==this.mode&&(a.append("navigate 0 center ").append(JU.Escape.eP(this.navigationCenter)),a.append(";navigate 0 translate"),JV.TransformManager.truncate2(a,this.getNavigationOffsetPercent("X")),JV.TransformManager.truncate2(a,
this.getNavigationOffsetPercent("Y")),a.append(";navigate 0 depth "),JV.TransformManager.truncate2(a,this.navigationDepthPercent),a.append(";"))},"JU.SB");c(b,"getRotateZyzText",function(a){var b=new JU.SB,c=this.vwr.ms.getInfoM("defaultOrientationMatrix");null==c?c=this.matrixRotate:(c=JU.M3.newM3(c),c.invert(),c.mul2(this.matrixRotate,c));var r=c.m22,e=57.29577951308232*Math.acos(r);0.999<r||-0.999>r?(r=57.29577951308232*Math.atan2(c.m10,c.m11),c=0):(r=57.29577951308232*Math.atan2(c.m21,-c.m20),
c=57.29577951308232*Math.atan2(c.m12,c.m02));0!=r&&(0!=e&&0!=c&&a)&&b.append("#Follows Z-Y-Z convention for Euler angles\n");b.append("reset");b.append(";center ").append(this.getCenterText());0!=r&&(b.append("; rotate z"),JV.TransformManager.truncate2(b,r));0!=e&&(b.append("; rotate y"),JV.TransformManager.truncate2(b,e));0!=c&&(b.append("; rotate z"),JV.TransformManager.truncate2(b,c));b.append(";");this.addZoomTranslationNavigationText(b);return b.toString()},"~B");b.truncate0=c(b,"truncate0",
function(a,b){a.appendC(" ");a.appendI(Math.round(b))},"JU.SB,~N");b.truncate2=c(b,"truncate2",function(a,b){a.appendC(" ");a.appendF(Math.round(100*b)/100)},"JU.SB,~N");c(b,"setSpinXYZ",function(a,b,c){Float.isNaN(a)||(this.spinX=a);Float.isNaN(b)||(this.spinY=b);Float.isNaN(c)||(this.spinZ=c);(this.isSpinInternal||this.isSpinFixed)&&this.clearSpin()},"~N,~N,~N");c(b,"setSpinFps",function(a){0>=a?a=1:50<a&&(a=50);this.spinFps=a},"~N");c(b,"setNavXYZ",function(a,b,c){Float.isNaN(a)||(this.navX=a);
Float.isNaN(b)||(this.navY=b);Float.isNaN(c)||(this.navZ=c)},"~N,~N,~N");c(b,"clearSpin",function(){this.setSpinOff();this.setNavOn(!1);this.isSpinFixed=this.isSpinInternal=!1});c(b,"setSpinOn",function(){this.setSpin(null,!0,3.4028235E38,null,null,null,null,!1,null,-1)});c(b,"setSpinOff",function(){this.setSpin(null,!1,3.4028235E38,null,null,null,null,!1,null,-1)});c(b,"setSpin",function(a,b,c,r,e,f,j,g,l,s){this.navOn&&b&&this.setNavOn(!1);this.spinOn!=b&&(this.spinOn=b,this.vectorSpinOnly=null!=
f,this.vwr.g.setB("_spinning",b),b?null==this.spinThread&&(this.spinThread=J.api.Interface.getOption("thread.SpinThread",this.vwr,"tm"),this.spinThread.setManager(this,this.vwr,u(-1,[Float.$valueOf(c),r,e,f,j,g?Boolean.TRUE:null,l,Integer.$valueOf(s)])),this.spinIsGesture=g,null!=f||Float.isNaN(c)||3.4028235E38==c||!this.vwr.g.waitForMoveTo?this.spinThread.start():(this.spinThread.setEval(a),this.spinThread.run())):null!=this.spinThread&&(this.spinThread.reset(),this.spinThread=null))},"J.api.JmolScriptEvaluator,~B,~N,JU.Lst,~A,JU.M3,JU.BS,~B,~A,~N");
c(b,"setNavOn",function(a){if(!Float.isNaN(this.navFps)){var b=this.navOn;a&&this.spinOn&&this.setSpin(null,!1,0,null,null,null,null,!1,null,-1);this.navOn=a;this.vwr.g.setB("_navigating",a);a||this.navInterrupt();a?(0==this.navX&&(0==this.navY&&0==this.navZ)&&(this.navZ=1),0==this.navFps&&(this.navFps=10),null==this.spinThread&&(this.spinThread=J.api.Interface.getOption("thread.SpinThread",this.vwr,"tm"),this.spinThread.setManager(this,this.vwr,null),this.spinThread.start())):b&&null!=this.spinThread&&
(this.spinThread.interrupt(),this.spinThread=null)}},"~B");c(b,"setVibrationScale",function(a){this.vibrationScale=a},"~N");c(b,"setVibrationPeriod",function(a){if(Float.isNaN(a))a=this.vibrationPeriod;else if(0==a)this.vibrationPeriodMs=this.vibrationPeriod=0;else{this.vibrationPeriod=Math.abs(a);this.vibrationPeriodMs=F(1E3*this.vibrationPeriod);if(0<a)return;a=-a}this.setVibrationOn(0<a&&0<=this.vwr.ms.getLastVibrationVector(this.vwr.am.cmi,0))},"~N");c(b,"setVibrationT",function(a){this.vibrationT.x=
this.vibrationT.y=this.vibrationT.z=a;0==this.vibrationScale&&(this.vibrationScale=this.vwr.g.vibrationScale)},"~N");c(b,"isVibrationOn",function(){return this.vibrationOn});c(b,"setVibrationOn",function(a){a?1>this.vwr.ms.mc?(this.vibrationOn=!1,this.vibrationT.x=this.vibrationT.y=this.vibrationT.z=0):(null==this.vibrationThread&&(this.vibrationThread=J.api.Interface.getOption("thread.VibrationThread",this.vwr,"tm"),this.vibrationThread.setManager(this,this.vwr,null),this.vibrationThread.start()),
this.vibrationOn=!0):(null!=this.vibrationThread&&(this.vibrationThread.interrupt(),this.vibrationThread=null),this.vibrationOn=!1,this.vibrationT.x=this.vibrationT.y=this.vibrationT.z=0)},"~B");c(b,"clearVibration",function(){this.setVibrationOn(!1);this.vibrationScale=0});c(b,"setStereoMode2",function(a){this.stereoMode=J.c.STER.CUSTOM;this.stereoColors=a},"~A");c(b,"setStereoMode",function(a){this.stereoColors=null;this.stereoMode=a;this.stereoDoubleDTI=a===J.c.STER.DTI;this.stereoDoubleFull=a===
J.c.STER.DOUBLE},"J.c.STER");c(b,"setStereoDegrees",function(a){this.stereoDegrees=a;this.stereoRadians=0.017453292519943295*a},"~N");c(b,"getStereoRotationMatrix",function(a){this.stereoFrame=a;if(!a)return this.matrixRotate;this.matrixTemp3.setAsYRotation(-this.stereoRadians);this.matrixStereo.mul2(this.matrixTemp3,this.matrixRotate);return this.matrixStereo},"~B");c(b,"isWindowCentered",function(){return this.windowCentered});c(b,"setWindowCentered",function(a){this.windowCentered=a;this.resetNavigationPoint(!0)},
"~B");c(b,"setRotationRadius",function(a,b){a=this.modelRadius=0>=a?this.vwr.ms.calcRotationRadius(this.vwr.am.cmi,this.fixedRotationCenter,!0):a;b&&this.vwr.setRotationRadius(a,!1);return a},"~N,~B");c(b,"setRotationCenterAndRadiusXYZ",function(a,b){this.resetNavigationPoint(!1);null==a?(this.setFixedRotationCenter(this.rotationCenterDefault),this.modelRadius=this.rotationRadiusDefault):(this.setFixedRotationCenter(a),b&&this.windowCentered&&(this.modelRadius=this.vwr.ms.calcRotationRadius(this.vwr.am.cmi,
this.fixedRotationCenter,!0)))},"JU.T3,~B");c(b,"setNewRotationCenter",function(a,b){null==a&&(a=this.rotationCenterDefault);this.windowCentered?(this.translateToPercent("x",0),this.translateToPercent("y",0),this.setRotationCenterAndRadiusXYZ(a,!0),b&&this.resetFitToScreen(!0)):this.moveRotationCenter(a,!0)},"JU.P3,~B");c(b,"moveRotationCenter",function(a,b){this.setRotationCenterAndRadiusXYZ(a,!1);b&&this.setRotationPointXY(this.fixedRotationCenter)},"JU.P3,~B");c(b,"setCenter",function(){this.setRotationCenterAndRadiusXYZ(this.fixedRotationCenter,
!0)});c(b,"setCenterAt",function(a,b){var c=JU.P3.newP(b);switch(a){case 1073741826:break;case 96:c.add(this.vwr.ms.getAverageAtomPoint());break;case 1812599299:c.add(this.vwr.getBoundBoxCenter());break;default:c.setT(this.rotationCenterDefault)}this.setRotationCenterAndRadiusXYZ(c,!0);this.resetFitToScreen(!0)},"~N,JU.P3");c(b,"setFrameOffset",function(a){null==this.frameOffsets||0>a||a>=this.frameOffsets.length?this.frameOffset.set(0,0,0):this.frameOffset.setT(this.frameOffsets[a])},"~N");c(b,"setSelectedTranslation",
function(a,b,c,r){if(this.perspectiveDepth)switch(this.bsSelectedAtoms=a,b.charCodeAt(0)){case 88:case 120:this.ptOffset.x+=c;break;case 89:case 121:this.ptOffset.y+=c;break;case 90:case 122:this.ptOffset.z+=c}else{c=new JU.V3;switch(b.charCodeAt(0)){case 88:case 120:c.set(r,0,0);break;case 89:case 121:c.set(0,r,0);break;case 90:case 122:c.set(0,0,r)}this.vwr.moveAtoms(null,null,this.matrixRotate,c,this.internalRotationCenter,!1,a,!0,!1)}},"JU.BS,~S,~N,~N");c(b,"setNavFps",function(a){this.navFps=
a},"~N");c(b,"calcCameraFactors",function(){Float.isNaN(this.cameraDepth)&&(this.cameraDepth=this.cameraDepthSetting,this.zoomFactor=3.4028235E38);this.cameraDistance=this.cameraDepth*this.screenPixelCount;this.referencePlaneOffset=this.cameraDistance+this.screenPixelCount/2;this.scalePixelsPerAngstrom=this.scale3D&&!this.perspectiveDepth&&1!=this.mode?72/this.scale3DAngstromsPerInch*(this.antialias?2:1):this.screenPixelCount/this.visualRangeAngstroms;1!=this.mode&&(this.mode=0==this.camera.z?0:2);
this.perspectiveShiftXY.set(0==this.camera.z?0:100*(this.camera.x*this.scalePixelsPerAngstrom/this.screenWidth),0==this.camera.z?0:100*(this.camera.y*this.scalePixelsPerAngstrom/this.screenHeight),0);this.modelRadiusPixels=this.modelRadius*this.scalePixelsPerAngstrom;var a=2*this.modelRadius/this.visualRangeAngstroms*this.referencePlaneOffset;if(1==this.mode)this.calcNavCameraFactors(a);else{this.zoomFactor=3.4028235E38;this.modelCenterOffset=this.referencePlaneOffset;if(!this.scale3D||this.perspectiveDepth)this.scalePixelsPerAngstrom*=
this.modelCenterOffset/a*this.zmPct/100;this.modelRadiusPixels=this.modelRadius*this.scalePixelsPerAngstrom}});c(b,"calcNavCameraFactors",function(a){3.4028235E38==this.zoomFactor?(1E4<this.zmPct&&(this.zmPct=1E4),this.modelCenterOffset=100*a/this.zmPct):this.prevZoomSetting!=this.zmPctSet&&(this.modelCenterOffset=0==this.zoomRatio?100*a/this.zmPctSet:this.modelCenterOffset+(1-this.zoomRatio)*this.referencePlaneOffset,this.navMode=-1);this.prevZoomSetting=this.zmPctSet;this.zoomFactor=this.modelCenterOffset/
this.referencePlaneOffset;this.zmPct=0==this.zoomFactor?1E4:100*(a/this.modelCenterOffset)},"~N");c(b,"getPerspectiveFactor",function(a){return 0>=a?this.referencePlaneOffset:this.referencePlaneOffset/a},"~N");c(b,"unTransformPoint",function(a,b){this.untransformedPoint.setT(a);switch(this.mode){case 1:this.untransformedPoint.x-=this.navigationOffset.x;this.untransformedPoint.y-=this.navigationOffset.y;break;case 2:this.fScrPt.x+=this.perspectiveShiftXY.x,this.fScrPt.y+=this.perspectiveShiftXY.y;
case 0:this.untransformedPoint.x-=this.fixedRotationOffset.x,this.untransformedPoint.y-=this.fixedRotationOffset.y}if(this.perspectiveDepth){var c=this.getPerspectiveFactor(this.untransformedPoint.z);this.untransformedPoint.x/=c;this.untransformedPoint.y/=c}switch(this.mode){case 1:this.untransformedPoint.x+=this.navigationShiftXY.x;this.untransformedPoint.y+=this.navigationShiftXY.y;break;case 2:this.untransformedPoint.x-=this.perspectiveShiftXY.x,this.untransformedPoint.y-=this.perspectiveShiftXY.y}this.matrixTransformInv.rotTrans2(this.untransformedPoint,
b)},"JU.T3,JU.T3");c(b,"resetNavigationPoint",function(a){5>this.zmPct&&1!=this.mode?(this.perspectiveDepth=!0,this.mode=1):(1==this.mode?(this.navMode=1,this.slabPercentSetting=0,this.perspectiveDepth=!0):a&&(this.slabPercentSetting=100),this.vwr.setFloatProperty("slabRange",0),a&&this.setSlabEnabled(1==this.mode),this.zoomFactor=3.4028235E38,this.zmPctSet=this.zmPct)},"~B");c(b,"setNavigatePt",function(a){this.navigationCenter.setT(a);this.navMode=3;this.navigating=!0;this.finalizeTransformParameters();
this.navigating=!1},"JU.P3");c(b,"setNavigationSlabOffsetPercent",function(a){this.vwr.g.setF("navigationSlab",a);this.calcCameraFactors();this.navigationSlabOffset=a/50*this.modelRadiusPixels},"~N");c(b,"getNavigationOffset",function(){this.transformPt3f(this.navigationCenter,this.navigationOffset);return this.navigationOffset});c(b,"getNavPtHeight",function(){return this.height/2});c(b,"getNavigationOffsetPercent",function(a){this.getNavigationOffset();return 0==this.width||0==this.height?0:"X"==
a?100*(this.navigationOffset.x-this.width/2)/this.width:100*(this.navigationOffset.y-this.getNavPtHeight())/this.height},"~S");c(b,"getNavigationText",function(a){a=a?" /* navigation center, translation, depth */ ":" ";if(1!=this.mode)return a+"{0 0 0} 0 0 0";this.getNavigationOffset();return a+JU.Escape.eP(this.navigationCenter)+" "+this.getNavigationOffsetPercent("X")+" "+this.getNavigationOffsetPercent("Y")+" "+this.navigationDepthPercent},"~B");c(b,"setScreenParameters",function(a,b,c,r,e,f){var j=
1==this.mode?JU.P3.newP(this.navigationCenter):null,g=JU.P3.newP(this.navigationOffset);g.x/=this.width;g.y/=this.height;this.setScreenParameters0(a,b,c,r,e,f);null!=j&&(this.navigationCenter.setT(j),this.navTranslatePercentOrTo(-1,g.x*this.width,g.y*this.height),this.setNavigatePt(j))},"~N,~N,~B,~B,~B,~B");c(b,"navInterrupt",function(){null!=this.nav&&this.nav.interrupt()});c(b,"getNav",function(){if(null!=this.nav)return!0;this.nav=J.api.Interface.getOption("navigate.Navigator",this.vwr,"tm");if(null==
this.nav)return!1;this.nav.set(this,this.vwr);return!0});c(b,"navigateList",function(a,b){this.getNav()&&this.nav.navigateList(a,b)},"J.api.JmolScriptEvaluator,JU.Lst");c(b,"navigateAxis",function(a,b){this.getNav()&&this.nav.navigateAxis(a,b)},"JU.V3,~N");c(b,"setNavigationOffsetRelative",function(){this.getNav()&&this.nav.setNavigationOffsetRelative()});c(b,"navigateKey",function(a,b){this.getNav()&&this.nav.navigateKey(a,b)},"~N,~N");c(b,"setNavigationDepthPercent",function(a){this.getNav()&&this.nav.setNavigationDepthPercent(a)},
"~N");c(b,"navTranslatePercentOrTo",function(a,b,c){this.getNav()&&this.nav.navTranslatePercentOrTo(a,b,c)},"~N,~N,~N");c(b,"calcNavigationPoint",function(){this.getNav()&&this.nav.calcNavigationPoint()});c(b,"getNavigationState",function(){return 1==this.mode&&this.getNav()?this.nav.getNavigationState():""})});n("JV");z("java.lang.Enum J.api.JmolViewer $.PlatformViewer J.atomdata.AtomDataServer java.util.Hashtable JU.P3".split(" "),"JV.Viewer","java.util.Arrays JU.AU $.BS $.CU $.DF $.Lst $.P3i $.PT $.Quat $.Rdr $.SB J.adapter.smarter.SmarterJmolAdapter J.api.Interface J.atomdata.RadiusData J.c.FIL $.STER $.VDW J.i18n.GT JM.Measurement $.ModelSet JS.SV $.T J.thread.TimeoutThread JU.BSUtil $.C $.CommandHistory $.Elements $.Escape $.GData $.JmolMolecule $.Logger $.Parser $.TempArray JV.ActionManager $.AnimationManager $.ColorManager $.FileManager $.GlobalSettings $.JC $.ModelManager $.SelectionManager $.ShapeManager $.StateManager $.StatusManager $.TransformManager JV.binding.Binding".split(" "),
function(){var b=w(function(){this.queueOnHold=this.isSingleThreaded=this.isWebGL=this.isJSNoAWT=this.haveDisplay=this.autoExit=this.testAsync=!1;this.fullName="";this.fm=this.ms=this.definedAtomSets=this.compiler=null;this.mustRender=this.listCommands=this.isSyntaxCheck=this.isSyntaxAndFileCheck=this.isJNLP=this.isApplet=!1;this.appletName=this.htmlName="";this.tryPt=0;this.insertedCommand="";this.tm=this.sm=this.g=this.rm=this.slm=this.shm=this.dm=this.cm=this.am=this.acm=this.html5Applet=this.gdata=
null;this.logFilePath=this.syncId="";this.useCommandThread=this.noGraphicsAllowed=this.multiTouch=this.isSilent=this.isSignedAppletLocal=this.isSignedApplet=this.isPrintOnly=this.allowScripting=!1;this.tempArray=this.eval=this.scm=this.stm=this.mm=this.commandHistory=this.internalAccessPath=this.access=this.access0=this.modelAdapter=this.display=this.vwrOptions=this.commandOptions=null;this.async=this.allowArrayDotNotation=!1;this.executor=null;this.screenHeight=this.screenWidth=0;this.errorMessageUntranslated=
this.errorMessage=this.chainList=this.chainMap=this.rd=this.defaultVdw=null;this.privateKey=0;this.dataOnly=!1;this.maximumSize=2147483647;this.gRight=null;this.isStereoSlave=!1;this.imageFontScaling=1;this.antialiased=!1;this.prevFrame=-2147483648;this.prevMorphModel=0;this.haveJDX=!1;this.jsv=null;this.systemInfoShown=!1;this.jzt=this.outputManager=null;this.headless=this.isPreviewOnly=!1;this.movableBitSet=null;this.hasSelected=!1;this.lastData=this.jsc=this.smilesMatcher=this.minimizer=this.dssrParser=
this.annotationParser=this.ligandModelSet=this.ligandModels=this.mouse=null;this.motionEventNumber=0;this.inMotion=!1;this.refreshing=!0;this.axesAreTainted=!1;this.jsParams=this.captureParams=null;this.cirChecked=!1;this.hoverAtomIndex=-1;this.hoverText=null;this.hoverLabel="%U";this.hoverEnabled=!0;this.currentCursor=0;this.ptTemp=null;this.selectionHalosEnabled=!1;this.noFrankEcho=this.frankOn=!0;this.scriptEditorVisible=!1;this.pm=this.headlessImageParams=this.modelkit=this.jmolpopup=this.scriptEditor=
this.appConsole=null;this.isTainted=!0;this.showSelected=this.movingSelected=!1;this.ptNew=this.ptScreenNew=this.ptScreen=null;this.atomHighlighted=-1;this.creatingImage=!1;this.userVdwMars=this.userVdws=this.bsUserVdws=null;this.currentShapeID=-1;this.localFunctions=this.currentShapeState=null;this.$isKiosk=!1;this.displayLoadErrors=!0;this.$isParallel=!1;this.stateScriptVersionInt=2147483647;this.timeouts=this.jsExporter3D=null;this.chainCaseSpecified=!1;this.macros=this.nboParser=this.triangulator=
this.symStatic=this.jsonParser=this.jcm=this.jbr=this.logFileName=this.nmrCalculation=null;this.consoleFontScale=1;q(this,arguments)},JV,"Viewer",J.api.JmolViewer,[J.atomdata.AtomDataServer,J.api.PlatformViewer]);N(b,function(){this.ptScreen=new JU.P3;this.ptScreenNew=new JU.P3;this.ptNew=new JU.P3});x(b,function(a){I(this,JV.Viewer,[]);this.commandHistory=new JU.CommandHistory;this.rd=new J.atomdata.RadiusData(null,0,null,null);this.defaultVdw=J.c.VDW.JMOL;this.localFunctions=new java.util.Hashtable;
this.privateKey=Math.random();this.chainMap=new java.util.Hashtable;this.chainList=new JU.Lst;this.setOptions(a)},"java.util.Map");c(b,"finalize",function(){JU.Logger.debugging&&JU.Logger.debug("vwr finalize "+this);ia(this,JV.Viewer,"finalize",[])});c(b,"setInsertedCommand",function(a){this.insertedCommand=a},"~S");b.getJmolVersion=g(b,"getJmolVersion",function(){return null==JV.Viewer.version_date?JV.Viewer.version_date=JV.JC.version+"  "+JV.JC.date:JV.Viewer.version_date});b.allocateViewer=c(b,
"allocateViewer",function(a,b,c,e,f,j,g,l){var s=new java.util.Hashtable;s.put("display",a);s.put("adapter",b);s.put("statusListener",g);s.put("platform",l);s.put("options",j);s.put("fullName",c);s.put("documentBase",e);s.put("codeBase",f);return new JV.Viewer(s)},"~O,J.api.JmolAdapter,~S,java.net.URL,java.net.URL,~S,J.api.JmolStatusListener,J.api.GenericPlatform");c(b,"haveAccess",function(a){return this.access===a},"JV.Viewer.ACCESS");g(b,"getModelAdapter",function(){return null==this.modelAdapter?
this.modelAdapter=new J.adapter.smarter.SmarterJmolAdapter:this.modelAdapter});g(b,"getSmartsMatch",function(a,b){null==b&&(b=this.bsA());return this.getSmilesMatcher().getSubstructureSet(a,this.ms.at,this.ms.ac,b,2)},"~S,JU.BS");c(b,"isSubstructure",function(a,b){try{var c=this.getSmilesMatcher().find(a,b,10);return null!=c&&0<c.length}catch(e){if(D(e,Exception))return!1;throw e;}},"~S,~S");c(b,"hasStructure",function(a,b,c){try{return 1==this.getSmilesMatcher().hasStructure(a,u(-1,[b]),(c?2:1)|
8)[0]}catch(e){if(D(e,Exception))return!1;throw e;}},"~S,~S,~B");c(b,"getSmartsMatchForNodes",function(a,b){return this.getSmilesMatcher().getSubstructureSet(a,b,b.length,null,2)},"~S,~A");c(b,"getSmartsMap",function(a,b,c){null==b&&(b=this.bsA());0==c&&(c=2);return this.getSmilesMatcher().getCorrelationMaps(a,this.ms.at,this.ms.ac,b,c)},"~S,JU.BS,~N");c(b,"setOptions",function(a){this.vwrOptions=a;JU.Logger.debugging&&JU.Logger.debug("Viewer constructor "+this);this.modelAdapter=a.get("adapter");
var b=a.get("statusListener");this.fullName=a.get("fullName");null==this.fullName&&(this.fullName="");var c=a.get("codePath");null==c&&(c="../java/");JV.Viewer.appletCodeBase=c.toString();JV.Viewer.appletIdiomaBase=JV.Viewer.appletCodeBase.substring(0,JV.Viewer.appletCodeBase.lastIndexOf("/",JV.Viewer.appletCodeBase.length-2)+1)+"idioma";c=a.get("documentBase");JV.Viewer.appletDocumentBase=null==c?"":c.toString();c=a.get("options");this.commandOptions=null==c?"":c.toString();(a.containsKey("debug")||
0<=this.commandOptions.indexOf("-debug"))&&JU.Logger.setLogLevel(5);this.isApplet&&a.containsKey("maximumSize")&&this.setMaximumSize(a.get("maximumSize").intValue());(this.isJNLP=this.checkOption2("isJNLP","-jnlp"))&&JU.Logger.info("setting JNLP mode TRUE");this.isApplet=(this.isSignedApplet=this.isJNLP||this.checkOption2("signedApplet","-signed"))||this.checkOption2("applet","-applet");this.allowScripting=!this.checkOption2("noscripting","-noscripting");var e=this.fullName.indexOf("__");this.htmlName=
0>e?this.fullName:this.fullName.substring(0,e);this.appletName=JU.PT.split(this.htmlName+"_","_")[0];this.syncId=0>e?"":this.fullName.substring(e+2,this.fullName.length-2);this.access=this.access0=this.checkOption2("access:READSPT","-r")?JV.Viewer.ACCESS.READSPT:this.checkOption2("access:NONE","-R")?JV.Viewer.ACCESS.NONE:JV.Viewer.ACCESS.ALL;(this.isPreviewOnly=a.containsKey("previewOnly"))&&a.remove("previewOnly");this.isPrintOnly=this.checkOption2("printOnly","-p");this.dataOnly=this.checkOption2("isDataOnly",
"\x00");this.autoExit=this.checkOption2("exit","-x");c=a.get("platform");e="unknown";null==c&&(c=this.commandOptions.contains("platform=")?this.commandOptions.substring(this.commandOptions.indexOf("platform=")+9):"J.awt.Platform");if("string"==typeof c){e=c;this.isWebGL=0<=e.indexOf(".awtjs.");JV.Viewer.isJS=this.isJSNoAWT=this.isWebGL||0<=e.indexOf(".awtjs2d.");this.async=!this.dataOnly&&!this.autoExit&&(this.testAsync||JV.Viewer.isJS&&a.containsKey("async"));var f=c=null,j="?";self.Jmol&&(f=Jmol,
c=Jmol._applets[this.htmlName.split("_object")[0]],j=Jmol._version);null!=j&&(this.html5Applet=c,JV.Viewer.jmolObject=f,JV.Viewer.strJavaVersion=j,JV.Viewer.strJavaVendor="Java2Script "+(this.isWebGL?"(WebGL)":"(HTML5)"));c=J.api.Interface.getInterface(e,this,"setOptions")}this.apiPlatform=c;this.display=a.get("display");this.isSingleThreaded=this.apiPlatform.isSingleThreaded();this.noGraphicsAllowed=this.checkOption2("noDisplay","-n");this.headless=this.apiPlatform.isHeadless();this.haveDisplay=
this.isWebGL||null!=this.display&&!this.noGraphicsAllowed&&!this.headless&&!this.dataOnly;this.noGraphicsAllowed=(new Boolean(this.noGraphicsAllowed&null==this.display)).valueOf();this.headless=(new Boolean(this.headless|this.noGraphicsAllowed)).valueOf();this.haveDisplay?(this.mustRender=!0,this.multiTouch=this.checkOption2("multiTouch","-multitouch"),this.isWebGL||(this.display=document.getElementById(this.display))):this.display=null;this.apiPlatform.setViewer(this,this.display);c=a.get("graphicsAdapter");
null==c&&!this.isWebGL&&(c=J.api.Interface.getOption("g3d.Graphics3D",this,"setOptions"));this.gdata=null==c&&(this.isWebGL||!JV.Viewer.isJS)?new JU.GData:c;this.gdata.initialize(this,this.apiPlatform);this.stm=new JV.StateManager(this);this.cm=new JV.ColorManager(this,this.gdata);this.sm=new JV.StatusManager(this);e=a.containsKey("4DMouse");this.tm=JV.TransformManager.getTransformManager(this,2147483647,0,e);this.slm=new JV.SelectionManager(this);this.haveDisplay&&(this.acm=this.multiTouch?J.api.Interface.getOption("multitouch.ActionManagerMT",
null,null):new JV.ActionManager,this.acm.setViewer(this,this.commandOptions+"-multitouch-"+a.get("multiTouch")),this.mouse=this.apiPlatform.getMouseManager(this.privateKey,this.display),this.multiTouch&&!this.checkOption2("-simulated","-simulated")&&this.apiPlatform.setTransparentCursor(this.display));this.mm=new JV.ModelManager(this);this.shm=new JV.ShapeManager(this);this.am=new JV.AnimationManager(this);this.tempArray=new JU.TempArray;c=a.get("repaintManager");if(!"NONE".equals(c)&&(null==c&&(c=
J.api.Interface.getOption("render.RepaintManager",this,"setOptions")),JV.Viewer.isJS||null!=c&&!c.equals("")))(this.rm=c).set(this,this.shm);this.ms=new JM.ModelSet(this,null);this.initialize(!0,!1);this.fm=new JV.FileManager(this);this.definedAtomSets=new java.util.Hashtable;this.setJmolStatusListener(b);this.isApplet?(JU.Logger.info("vwrOptions: \n"+JU.Escape.escapeMap(this.vwrOptions)),b=this.vwrOptions.get("documentLocation"),!JV.Viewer.isJS&&(null!=b&&b.startsWith("file:/"))&&(b=b.substring(0,
b.substring(0,(b+"?").indexOf("?")).lastIndexOf("/")),JU.Logger.info("setting current directory to "+b),this.cd(b)),b=JV.Viewer.appletDocumentBase,e=b.indexOf("#"),0<=e&&(b=b.substring(0,e)),e=b.lastIndexOf("?"),0<=e&&(b=b.substring(0,e)),e=b.lastIndexOf("/"),0<=e&&(b=b.substring(0,e)),JV.Viewer.jsDocumentBase=b,this.fm.setAppletContext(JV.Viewer.appletDocumentBase),b=a.get("appletProxy"),null!=b&&this.setStringProperty("appletProxy",b),this.isSignedApplet?(this.showSystemInfo(),this.logFilePath=
JU.PT.rep(JV.Viewer.appletCodeBase,"file://",""),this.logFilePath=JU.PT.rep(this.logFilePath,"file:/",""),0<=this.logFilePath.indexOf("//")?this.logFilePath=null:this.isSignedAppletLocal=!0):JV.Viewer.isJS||(this.logFilePath=null),new J.i18n.GT(this,a.get("language")),JV.Viewer.isJS&&this.haveDisplay&&this.acm.createActions()):(this.gdata.setBackgroundTransparent(this.checkOption2("backgroundTransparent","-b")),(this.isSilent=this.checkOption2("silent","-i"))?JU.Logger.setLogLevel(3):JU.Logger.info("Jmol version "+
JV.Viewer.getJmolVersion()),this.headless&&!this.isSilent&&JU.Logger.info("Operating headless display="+this.display+" nographicsallowed="+this.noGraphicsAllowed),this.isSyntaxCheck=(this.isSyntaxAndFileCheck=this.checkOption2("checkLoad","-C"))||this.checkOption2("check","-c"),this.listCommands=this.checkOption2("listCommands","-l"),this.cd("."),this.headless&&(this.headlessImageParams=a.get("headlessImage"),c=a.get("headlessMaxTimeMs"),null==c&&(c=Integer.$valueOf(6E4)),this.setTimeout(""+Math.random(),
c.intValue(),"exitJmol")));this.useCommandThread=!JV.Viewer.isJS&&!this.headless&&this.checkOption2("useCommandThread","-threaded");this.setStartupBooleans();this.setIntProperty("_nProcessors",JV.Viewer.nProcessors);this.zap(!1,!0,!1);this.g.setO("language",J.i18n.GT.getLanguage());this.g.setO("_hoverLabel",this.hoverLabel);this.stm.setJmolDefaults();JU.Elements.covalentVersion=1;this.allowArrayDotNotation=!0;this.allowScripting&&this.getScriptManager()},"java.util.Map");c(b,"setMaximumSize",function(a){this.maximumSize=
Math.max(a,100)},"~N");c(b,"setStereo",function(a,b){this.isStereoSlave=a;this.gRight=b},"~B,~O");c(b,"getMenu",function(a){this.getPopupMenu();return a.equals("\x00")?(this.popupMenu(this.screenWidth-120,0,"j"),"OK"):null==this.jmolpopup?"":this.jmolpopup.jpiGetMenuAsString("Jmol version "+JV.Viewer.getJmolVersion()+"|_GET_MENU|"+a)},"~S");g(b,"resizeInnerPanel",function(a,b){if(!this.autoExit&&this.haveDisplay)return this.sm.resizeInnerPanel(a,b);this.setScreenDimension(a,b);return E(-1,[this.screenWidth,
this.screenHeight])},"~N,~N");g(b,"setScreenDimension",function(a,b){b=Math.min(b,this.maximumSize);a=Math.min(a,this.maximumSize);this.tm.stereoDoubleFull&&(a=v((a+1)/2));this.screenWidth==a&&this.screenHeight==b||this.resizeImage(a,b,!1,!1,!0)},"~N,~N");c(b,"resizeImage",function(a,b,c,e,f){if(c||!this.creatingImage){var j=this.antialiased;this.antialiased=f?this.g.antialiasDisplay&&this.checkMotionRendering(603979786):c&&!e?this.g.antialiasImages:!1;!e&&(!c&&(0<a||j!=this.antialiased))&&this.setShapeProperty(5,
"clearBoxes",null);this.imageFontScaling=(this.antialiased?2:1)*(f||this.tm.scale3D||0>=a?1:1*(this.g.zoomLarge==b>a?b:a)/this.getScreenDim());0<a?(this.screenWidth=a,this.screenHeight=b,c||(this.g.setI("_width",a),this.g.setI("_height",b))):(a=0==this.screenWidth?this.screenWidth=500:this.screenWidth,b=0==this.screenHeight?this.screenHeight=500:this.screenHeight);this.tm.setScreenParameters(a,b,c||f?this.g.zoomLarge:!1,this.antialiased,!1,!1);this.gdata.setWindowParameters(a,b,this.antialiased);
this.setModelkitPropertySafely("frameresized",null);0<a&&!c&&this.setStatusResized(a,b)}},"~N,~N,~B,~B,~B");g(b,"getScreenWidth",function(){return this.screenWidth});g(b,"getScreenHeight",function(){return this.screenHeight});c(b,"getScreenDim",function(){return this.g.zoomLarge==this.screenHeight>this.screenWidth?this.screenHeight:this.screenWidth});c(b,"setWidthHeightVar",function(){this.g.setI("_width",this.screenWidth);this.g.setI("_height",this.screenHeight)});c(b,"getBoundBoxCenterX",function(){return v(this.screenWidth/
2)});c(b,"getBoundBoxCenterY",function(){return v(this.screenHeight/2)});c(b,"updateWindow",function(a,b){if(!this.refreshing||this.creatingImage)return this.refreshing?!1:!JV.Viewer.isJS;(this.isTainted||this.tm.slabEnabled)&&this.setModelVisibility();this.isTainted=!1;null!=this.rm&&0!=a&&this.setScreenDimension(a,b);return!0},"~N,~N");c(b,"getImage",function(a,b){var c=null;try{this.beginRendering(a,b),this.render(),this.gdata.endRendering(),c=this.gdata.getScreenImage(b)}catch(e){if(D(e,Error))this.gdata.getScreenImage(b),
this.handleError(e,!1),this.setErrorMessage("Error during rendering: "+e,null);else if(D(e,Exception))System.out.println("render error"+e);else throw e;}return c},"~B,~B");c(b,"beginRendering",function(a,b){this.gdata.beginRendering(this.tm.getStereoRotationMatrix(a),this.g.translucent,b,!this.checkMotionRendering(1111490588))},"~B,~B");c(b,"render",function(){if(!(null==this.mm.modelSet||!this.mustRender||!this.refreshing&&!this.creatingImage||null==this.rm)){var a=this.antialiased&&this.g.antialiasTranslucent,
b=this.shm.finalizeAtoms(this.tm.bsSelectedAtoms,!0);this.isWebGL?(this.rm.renderExport(this.gdata,this.ms,this.jsParams),this.notifyViewerRepaintDone()):(this.rm.render(this.gdata,this.ms,!0,b),this.gdata.setPass2(a)&&(this.tm.setAntialias(a),this.rm.render(this.gdata,this.ms,!1,null),this.tm.setAntialias(this.antialiased)))}});c(b,"drawImage",function(a,b,c,e,f){null!=a&&null!=b&&this.apiPlatform.drawImage(a,b,c,e,this.screenWidth,this.screenHeight,f);this.gdata.releaseScreenImage()},"~O,~O,~N,~N,~B");
c(b,"getScreenImage",function(){return this.getScreenImageBuffer(null,!0)});g(b,"getScreenImageBuffer",function(a,b){if(this.isWebGL)return b?this.apiPlatform.allocateRgbImage(0,0,null,0,!1,!0):null;var c=this.tm.stereoDoubleFull||this.tm.stereoDoubleDTI,e=this.tm.stereoMode.isBiColor(),f=null==a&&c;e?(this.beginRendering(!0,b),this.render(),this.gdata.endRendering(),this.gdata.snapshotAnaglyphChannelBytes(),this.beginRendering(!1,b),this.render(),this.gdata.endRendering(),this.gdata.applyAnaglygh(this.tm.stereoMode,
this.tm.stereoColors),e=this.gdata.getScreenImage(b)):e=this.getImage(c,b);var j=null;f&&(j=this.apiPlatform.newBufferedImage(e,this.tm.stereoDoubleDTI?this.screenWidth:this.screenWidth<<1,this.screenHeight),a=this.apiPlatform.getGraphics(j));null!=a&&(c&&(this.tm.stereoMode===J.c.STER.DTI?(this.drawImage(a,e,this.screenWidth>>1,0,!0),e=this.getImage(!1,!1),this.drawImage(a,e,0,0,!0),a=null):(this.drawImage(a,e,this.screenWidth,0,!1),e=this.getImage(!1,!1))),null!=a&&this.drawImage(a,e,0,0,!1));return f?
j:e},"~O,~B");c(b,"evalStringWaitStatusQueued",function(a,b,c,e,f){return null==this.getScriptManager()?null:this.scm.evalStringWaitStatusQueued(a,b,c,e,f)},"~S,~S,~S,~B,~B");c(b,"popupMenu",function(a,b,c){if(this.haveDisplay&&this.refreshing&&!this.isPreviewOnly&&!this.g.disablePopupMenu)switch(c.charCodeAt(0)){case 106:try{this.getPopupMenu(),this.jmolpopup.jpiShow(a,b)}catch(e){JU.Logger.info(e.toString()),this.g.disablePopupMenu=!0}break;case 97:case 98:case 109:if(null==this.getModelkit(!0))break;
this.modelkit.showMenu(a,b)}},"~N,~N,~S");c(b,"getModelkit",function(a){null==this.modelkit?(this.modelkit=J.api.Interface.getInterface("J.modelkit.ModelKit",this,"script"),this.headless||!this.haveDisplay?this.modelkit.setProperty("headless",this):this.modelkit.setMenu(this.apiPlatform.getMenuPopup(null,"m"))):a&&this.modelkit.updateMenu();return this.modelkit},"~B");c(b,"getPopupMenu",function(){if(this.g.disablePopupMenu)return null;if(null==this.jmolpopup&&(this.jmolpopup=this.allowScripting?
this.apiPlatform.getMenuPopup(this.menuStructure,"j"):null,null==this.jmolpopup))return this.async||(this.g.disablePopupMenu=!0),null;this.isJSNoAWT&&this.checkMenuUpdate();return this.jmolpopup.jpiGetMenuAsObject()});g(b,"setMenu",function(a,b){b&&JU.Logger.info("Setting menu "+(0==a.length?"to Jmol defaults":"from file "+a));0==a.length?a=null:b&&(a=this.getFileAsString3(a,!1,null));this.getProperty("DATA_API","setMenu",a);this.sm.setCallbackFunction("menu",a)},"~S,~B");c(b,"setStatusFrameChanged",
function(a){a&&(this.prevFrame=-2147483648);this.tm.setVibrationPeriod(NaN);var b=this.am.firstFrameIndex,c=this.am.lastFrameIndex,e=this.am.isMovie;a=this.am.cmi;b==c&&!e&&(a=b);var f=this.getModelFileNumber(a),j=this.am.cmi,g=f,l=f%1E6,s=e?b:this.getModelFileNumber(b),m=e?c:this.getModelFileNumber(c),p;e?p=""+(j+1):0==g?(p=this.getModelNumberDotted(b),b!=c&&(p+=" - "+this.getModelNumberDotted(c)),v(s/1E6)==v(m/1E6)&&(g=s)):p=this.getModelNumberDotted(a);0!=g&&(g=1E6>g?1:v(g/1E6));e||(this.g.setI("_currentFileNumber",
g),this.g.setI("_currentModelNumberInFile",l));b=this.am.currentMorphModel;this.g.setI("_currentFrame",j);this.g.setI("_morphCount",this.am.morphCount);this.g.setF("_currentMorphFrame",b);this.g.setI("_frameID",f);this.g.setI("_modelIndex",a);this.g.setO("_modelNumber",p);this.g.setO("_modelName",0>a?"":this.getModelName(a));f=0>a?"":this.ms.getModelTitle(a);this.g.setO("_modelTitle",null==f?"":f);this.g.setO("_modelFile",0>a?"":this.ms.getModelFileName(a));this.g.setO("_modelType",0>a?"":this.ms.getModelFileType(a));
j==this.prevFrame&&b==this.prevMorphModel||(this.prevFrame=j,this.prevMorphModel=b,f=this.getModelName(j),e?f=""+(""===f?j+1:this.am.caf+1)+": "+f:(e=""+this.getModelNumberDotted(j),e.equals(f)||(f=e+": "+f)),this.sm.setStatusFrameChanged(g,l,0>this.am.animationDirection?-s:s,0>this.am.currentDirection?-m:m,j,b,f),this.doHaveJDX()&&this.getJSV().setModel(a),JV.Viewer.isJS&&this.updateJSView(a,-1))},"~B,~B");c(b,"doHaveJDX",function(){return this.haveJDX||(this.haveJDX=this.getBooleanProperty("_jspecview"))});
c(b,"getJSV",function(){null==this.jsv&&(this.jsv=J.api.Interface.getOption("jsv.JSpecView",this,"script"),this.jsv.setViewer(this));return this.jsv});c(b,"getJDXBaseModelIndex",function(a){return!this.doHaveJDX()?a:this.getJSV().getBaseModelIndex(a)},"~N");c(b,"getJspecViewProperties",function(a){a=this.sm.getJspecViewProperties(""+a);null!=a&&(this.haveJDX=!0);return a},"~O");c(b,"scriptEcho",function(a){JU.Logger.isActiveLevel(4)&&(JV.Viewer.isJS&&System.out.println(a),this.sm.setScriptEcho(a,
this.isScriptQueued()),this.listCommands&&(null!=a&&0==a.indexOf("$["))&&JU.Logger.info(a))},"~S");c(b,"isScriptQueued",function(){return null!=this.scm&&this.scm.isScriptQueued()});c(b,"notifyError",function(a,b,c){this.g.setO("_errormessage",c);this.sm.notifyError(a,b,c)},"~S,~S,~S");c(b,"jsEval",function(a){return""+this.sm.jsEval(a)},"~S");c(b,"jsEvalSV",function(a){return JS.SV.getVariable(JV.Viewer.isJS?this.sm.jsEval(a):this.jsEval(a))},"~S");c(b,"setFileLoadStatus",function(a,b,c,e,f,j){this.setErrorMessage(f,
null);this.g.setI("_loadPoint",a.getCode());var g=a!==J.c.FIL.CREATING_MODELSET;g&&this.setStatusFrameChanged(!1,!1);this.sm.setFileLoadStatus(b,c,e,f,a.getCode(),g,j);g&&(this.doHaveJDX()&&this.getJSV().setModel(this.am.cmi),JV.Viewer.isJS&&this.updateJSView(this.am.cmi,-2))},"J.c.FIL,~S,~S,~S,~S,Boolean");c(b,"getZapName",function(){return this.g.modelKitMode?"Jmol Model Kit":"zapped"});c(b,"setStatusMeasuring",function(a,b,c,e){this.sm.setStatusMeasuring(a,b,c,e)},"~S,~N,~S,~N");c(b,"notifyMinimizationStatus",
function(){var a=this.getP("_minimizationStep"),b=this.getP("_minimizationForceField"),c=this.getP("_minimizationStatus"),e="starting".equals(c),f="done".equals(c)||"failed".equals(c),j=null!=this.minimizer&&(f||e)?this.minimizer.bsAtoms:null,g=null==j?-1:j.nextSetBit(0),l=0<=g?this.getModelIndexForAtom(g):-1;e&&0<=g&&this.sm.setStatusStructureModified(g,l,3,"minimize:"+c,j.cardinality(),j);this.sm.notifyMinimizationStatus(c,"string"==typeof a?Integer.$valueOf(0):a,this.getP("_minimizationEnergy"),
a.toString().equals("0")?Float.$valueOf(0):this.getP("_minimizationEnergyDiff"),b);f&&0<=g&&this.sm.setStatusStructureModified(g,l,-3,"minimize:"+c,j.cardinality(),j)});c(b,"setStatusAtomPicked",function(a,b,c,e){e&&this.setSelectionSet(JU.BSUtil.newAndSetBit(a));null==b&&(b=this.g.pickLabel,b=0==b.length?this.getAtomInfoXYZ(a,this.g.messageStyleChime?4:2)+(null==this.getOperativeSymmetry()?"":" ("+this.getAtomInfoXYZ(a,3)+")"):this.ms.getAtomInfo(a,b,this.ptTemp));this.setPicked(a,!1);0>a&&(e=this.getPendingMeasurement(),
null!=e&&(b=b.substring(0,b.length-1)+',"'+e.getString()+'"]'));this.g.setO("_pickinfo",b);this.sm.setStatusAtomPicked(a,b,c);0>a||(1==this.sm.getSyncMode()&&this.doHaveJDX()&&this.getJSV().atomPicked(a),JV.Viewer.isJS&&this.updateJSView(this.ms.at[a].mi,a))},"~N,~S,java.util.Map,~B");g(b,"getProperty",function(a,b,c){if(!"DATA_API".equals(a))return this.getPropertyManager().getProperty(a,b,c);switch("scriptCheck.........consoleText.........scriptEditor........scriptEditorState...getAppConsole.......getScriptEditor.....setMenu.............spaceGroupInfo......disablePopupMenu....defaultDirectory....getPopupMenu........shapeManager........getPreference.......".indexOf(b)){case 0:return this.scriptCheckRet(c,
!0);case 20:return null==this.appConsole?"":this.appConsole.getText();case 40:return this.showEditor(c),null;case 60:return this.scriptEditorVisible=c.booleanValue(),null;case 80:return this.$isKiosk?this.appConsole=null:C(c,"J.api.JmolAppConsoleInterface")?this.appConsole=c:null!=c&&!c.booleanValue()?this.appConsole=null:null==this.appConsole&&(null!=c&&c.booleanValue())&&(JV.Viewer.isJS&&(this.appConsole=J.api.Interface.getOption("consolejs.AppletConsole",this,"script")),null!=this.appConsole&&
this.appConsole.start(this)),this.scriptEditor=JV.Viewer.isJS||null==this.appConsole?null:this.appConsole.getScriptEditor(),this.appConsole;case 100:return null==this.appConsole&&(null!=c&&c.booleanValue())&&(this.getProperty("DATA_API","getAppConsole",Boolean.TRUE),this.scriptEditor=null==this.appConsole?null:this.appConsole.getScriptEditor()),this.scriptEditor;case 120:return null!=this.jmolpopup&&this.jmolpopup.jpiDispose(),this.jmolpopup=null,this.menuStructure=c;case 140:return this.getSymTemp().getSpaceGroupInfo(this.ms,
null,-1,!1,null);case 160:return this.g.disablePopupMenu=!0,null;case 180:return this.g.defaultDirectory;case 200:return"string"==typeof c?this.getMenu(c):this.getPopupMenu();case 220:return this.shm.getProperty(c);case 240:return this.sm.syncSend("getPreference",c,1)}JU.Logger.error("ERROR in getProperty DATA_API: "+b);return null},"~S,~S,~O");c(b,"showSystemInfo",function(){!this.isSilent&&!this.systemInfoShown&&JU.Logger.info("(C) 2015 Jmol Development\nJmol Version: "+JV.Viewer.getJmolVersion()+
"\njava.vendor: "+JV.Viewer.strJavaVendor+"\njava.version: "+JV.Viewer.strJavaVersion+"\nos: "+JV.Viewer.strOSName+" "+System.getProperty("os.arch","")+"\nAccess: "+this.access+"\nmemory: "+this.getP("_memory")+"\nprocessors available: "+JV.Viewer.nProcessors+"\nuseCommandThread: "+this.useCommandThread+(!this.isApplet?"":"\nappletId:"+this.htmlName+(this.isSignedApplet?" (signed)":"")))});c(b,"notifyMouseClicked",function(a,b,c,e){var f=JV.binding.Binding.getButtonMods(c),j=JV.binding.Binding.getClickCount(c);
this.g.setI("_mouseX",a);this.g.setI("_mouseY",this.screenHeight-b);this.g.setI("_mouseAction",c);this.g.setI("_mouseModifiers",f);this.g.setI("_clickCount",j);return this.sm.setStatusClicked(a,this.screenHeight-b,c,j,e)},"~N,~N,~N,~N");c(b,"getOutputManager",function(){return null!=this.outputManager?this.outputManager:(this.outputManager=J.api.Interface.getInterface("JV.OutputManager"+(JV.Viewer.isJS?"JS":"Awt"),this,"file")).setViewer(this,this.privateKey)});c(b,"getJzt",function(){return null==
this.jzt?this.jzt=J.api.Interface.getInterface("JU.ZipTools",this,"zip"):this.jzt});c(b,"readFileAsMap",function(a,b,c){this.getJzt().readFileAsMap(a,b,c)},"java.io.BufferedInputStream,java.util.Map,~S");c(b,"getZipDirectoryAsString",function(a){a=this.fm.getBufferedInputStreamOrErrorMessageFromName(a,a,!1,!1,null,!1,!0);return this.getJzt().getZipDirectoryAsStringAndClose(a)},"~S");g(b,"getImageAsBytes",function(a,b,c,e,f){return this.getOutputManager().getImageAsBytes(a,b,c,e,f)},"~S,~N,~N,~N,~A");
g(b,"releaseScreenImage",function(){this.gdata.releaseScreenImage()});c(b,"setDisplay",function(a){this.display=a;this.apiPlatform.setViewer(this,a)},"~O");c(b,"newMeasurementData",function(a,b){return J.api.Interface.getInterface("JM.MeasurementData",this,"script").init(a,this,b)},"~S,JU.Lst");c(b,"getDataManager",function(){return null==this.dm?this.dm=J.api.Interface.getInterface("JV.DataManager",this,"script").set(this):this.dm});c(b,"getScriptManager",function(){if(this.allowScripting&&null==
this.scm){this.scm=J.api.Interface.getInterface("JS.ScriptManager",this,"setOptions");if(JV.Viewer.isJS&&null==this.scm)throw new NullPointerException;if(null==this.scm)return this.allowScripting=!1,null;this.eval=this.scm.setViewer(this);this.useCommandThread&&this.scm.startCommandWatcher(!0)}return this.scm});c(b,"checkOption2",function(a,b){return this.vwrOptions.containsKey(a)&&!this.vwrOptions.get(a).toString().equals("false")||0<=this.commandOptions.indexOf(b)},"~S,~S");c(b,"setStartupBooleans",
function(){this.setBooleanProperty("_applet",this.isApplet);this.setBooleanProperty("_jspecview",!1);this.setBooleanProperty("_signedApplet",this.isSignedApplet);this.setBooleanProperty("_headless",this.headless);this.setStringProperty("_restrict",'"'+this.access+'"');this.setBooleanProperty("_useCommandThread",this.useCommandThread);this.setBooleanPropertyTok("doubleprecision",603979831,!1)});c(b,"getExportDriverList",function(){return this.haveAccess(JV.Viewer.ACCESS.ALL)?this.g.getParameter("exportDrivers",
!0):""});g(b,"dispose",function(){this.gRight=null;null!=this.mouse&&(this.acm.dispose(),this.mouse.dispose(),this.mouse=null);this.clearScriptQueue();this.clearThreads();this.haltScriptExecution();null!=this.scm&&this.scm.clear(!0);this.gdata.destroy();null!=this.jmolpopup&&this.jmolpopup.jpiDispose();null!=this.modelkit&&this.modelkit.dispose();try{null!=this.appConsole&&(this.appConsole.dispose(),this.appConsole=null),null!=this.scriptEditor&&(this.scriptEditor.dispose(),this.scriptEditor=null)}catch(a){if(!D(a,
Exception))throw a;}});c(b,"reset",function(a){this.ms.setBoundBox(null,null,!0,0);this.axesAreTainted=!0;this.tm.homePosition(a);this.ms.setCrystallographicDefaults()?(this.stm.setCrystallographicDefaults(),this.setNewRotationCenter(this.getUnitCellCenter())):this.setAxesMode(603979809);this.prevFrame=-2147483648;this.tm.spinOn||this.setSync()},"~B");g(b,"homePosition",function(){this.evalString("reset spin")});c(b,"initialize",function(a,b){this.g=new JV.GlobalSettings(this,this.g,a);this.setStartupBooleans();
this.setWidthHeightVar();this.haveDisplay&&(this.g.setB("_is2D",JV.Viewer.isJS&&!this.isWebGL),this.g.setB("_multiTouchClient",this.acm.isMTClient()),this.g.setB("_multiTouchServer",this.acm.isMTServer()));this.cm.setDefaultColors(!1);this.setObjectColor("background","black");this.setObjectColor("axis1","red");this.setObjectColor("axis2","green");this.setObjectColor("axis3","blue");this.am.setAnimationOn(!1);this.am.setAnimationFps(this.g.animationFps);this.sm.playAudio(null);this.sm.allowStatusReporting=
this.g.statusReporting;this.setBooleanPropertyTok("antialiasDisplay",603979786,b?!0:this.g.antialiasDisplay);this.stm.resetLighting();this.tm.setDefaultPerspective()},"~B,~B");c(b,"saveModelOrientation",function(){this.ms.saveModelOrientation(this.am.cmi,this.stm.getOrientation())});c(b,"restoreModelOrientation",function(a){a=this.ms.getModelOrientation(a);null!=a&&a.restore(-1,!0)},"~N");c(b,"restoreModelRotation",function(a){a=this.ms.getModelOrientation(a);null!=a&&a.restore(-1,!1)},"~N");c(b,
"getGLmolView",function(){var a=this.tm,b=a.fixedRotationCenter,c=a.getRotationQ();return{center:b,quaternion:c,xtrans:a.xTranslationFraction,ytrans:a.yTranslationFraction,scale:a.scalePixelsPerAngstrom,zoom:a.zmPctSet,cameraDistance:a.cameraDistance,pixelCount:a.screenPixelCount,perspective:a.perspectiveDepth,width:a.width,height:a.height}});c(b,"setRotationRadius",function(a,b){b&&(a=this.tm.setRotationRadius(a,!1));this.ms.setRotationRadius(this.am.cmi,a)&&this.g.setF("rotationRadius",a)},"~N,~B");
c(b,"setCenterBitSet",function(a,b){this.isJmolDataFrame()||this.tm.setNewRotationCenter(0<JU.BSUtil.cardinalityOf(a)?this.ms.getAtomSetCenter(a):null,b)},"JU.BS,~B");c(b,"setNewRotationCenter",function(a){this.isJmolDataFrame()||this.tm.setNewRotationCenter(a,!0)},"JU.P3");c(b,"navigate",function(a,b){this.isJmolDataFrame()||(this.tm.navigateKey(a,b),!this.tm.vibrationOn&&0!=a&&this.refresh(1,"Viewer:navigate()"))},"~N,~N");c(b,"move",function(a,b,c,e,f,j,g){this.tm.move(a,b,c,e,f,j,g);this.moveUpdate(j)},
"J.api.JmolScriptEvaluator,JU.V3,~N,JU.V3,~N,~N,~N");c(b,"moveTo",function(a,b,c,e,f,j,g,l,s,m,p,n,q,u,v,w,x){this.haveDisplay||(b=0);this.setTainted(!0);this.tm.moveTo(a,b,c,e,f,j,g,l,s,m,p,n,q,u,v,w,x)},"J.api.JmolScriptEvaluator,~N,JU.P3,JU.V3,~N,JU.M3,~N,~N,~N,~N,JU.P3,~N,~N,~N,~N,~N,~N");c(b,"moveUpdate",function(a){0<a?this.requestRepaintAndWait("moveUpdate"):0==a&&this.setSync()},"~N");c(b,"navigatePt",function(a){this.tm.setNavigatePt(a);this.setSync()},"JU.P3");c(b,"navigateAxis",function(a,
b){this.tm.navigateAxis(a,b);this.setSync()},"JU.V3,~N");c(b,"navTranslatePercent",function(a,b){this.isJmolDataFrame()||(this.tm.navTranslatePercentOrTo(0,a,b),this.setSync())},"~N,~N");c(b,"zoomBy",function(a){this.tm.zoomBy(a);this.refresh(2,this.sm.syncingMouse?"Mouse: zoomBy "+a:"")},"~N");c(b,"zoomByFactor",function(a,b,c){this.tm.zoomByFactor(a,b,c);this.refresh(2,!this.sm.syncingMouse?"":"Mouse: zoomByFactor "+a+(2147483647==b?"":" "+b+" "+c))},"~N,~N,~N");c(b,"rotateXYBy",function(a,b){this.tm.rotateXYBy(a,
b,null);this.refresh(2,this.sm.syncingMouse?"Mouse: rotateXYBy "+a+" "+b:"")},"~N,~N");c(b,"spinXYBy",function(a,b,c){this.tm.spinXYBy(a,b,c);0==a&&0==b||this.refresh(2,this.sm.syncingMouse?"Mouse: spinXYBy "+a+" "+b+" "+c:"")},"~N,~N,~N");c(b,"rotateZBy",function(a,b,c){this.tm.rotateZBy(a,b,c);this.refresh(2,this.sm.syncingMouse?"Mouse: rotateZBy "+a+(2147483647==b?"":" "+b+" "+c):"")},"~N,~N,~N");c(b,"rotateSelected",function(a,b,c){this.isJmolDataFrame()||(this.tm.rotateXYBy(a,b,this.setMovableBitSet(c,
!0)),this.refreshMeasures(!0),this.refresh(2,this.sm.syncingMouse?"Mouse: rotateMolecule "+a+" "+b:""))},"~N,~N,JU.BS");c(b,"setMovableBitSet",function(a,b){null==a&&(a=this.bsA());a=JU.BSUtil.copy(a);JU.BSUtil.andNot(a,this.getMotionFixedAtoms(null,null));b&&!this.g.allowMoveAtoms&&(a=this.ms.getMoleculeBitSet(a));return this.movableBitSet=a},"JU.BS,~B");c(b,"translateXYBy",function(a,b){this.tm.translateXYBy(a,b);this.refresh(2,this.sm.syncingMouse?"Mouse: translateXYBy "+a+" "+b:"")},"~N,~N");
g(b,"rotateFront",function(){this.tm.resetRotation();this.refresh(1,"Viewer:rotateFront()")});c(b,"translate",function(a,b,c,e){var f="\x00"==c?b:"%"==c?this.tm.percentToPixels(a,b):this.tm.angstromsToPixels(b*("n"==c?10:1));if(null!=e){if(0==b)return;this.tm.setSelectedTranslation(e,a,f,b)}else switch(a.charCodeAt(0)){case 88:case 120:"\x00"==c?this.tm.translateToPercent("x",b):this.tm.translateXYBy(F(f),0);break;case 89:case 121:"\x00"==c?this.tm.translateToPercent("y",b):this.tm.translateXYBy(0,
F(f));break;case 90:case 122:"\x00"==c?this.tm.translateToPercent("z",b):this.tm.translateZBy(F(f))}this.refresh(1,"Viewer:translate()")},"~S,~N,~S,JU.BS");c(b,"slabByPixels",function(a){this.tm.slabByPercentagePoints(a);this.refresh(3,"slabByPixels")},"~N");c(b,"depthByPixels",function(a){this.tm.depthByPercentagePoints(a);this.refresh(3,"depthByPixels")},"~N");c(b,"slabDepthByPixels",function(a){this.tm.slabDepthByPercentagePoints(a);this.refresh(3,"slabDepthByPixels")},"~N");c(b,"finalizeTransformParameters",
function(){this.tm.finalizeTransformParameters();this.gdata.setSlabAndZShade(this.tm.slabValue,this.tm.depthValue,this.tm.zShadeEnabled?this.tm.zSlabValue:2147483647,this.tm.zDepthValue,this.g.zShadePower)});c(b,"getScalePixelsPerAngstrom",function(a){return this.tm.scalePixelsPerAngstrom*(a||!this.antialiased?1:0.5)},"~B");c(b,"setSpin",function(a,b){if(JU.PT.isOneOf(a,";x;y;z;fps;X;Y;Z;FPS;")){var c="x;y;z;fps;X;Y;Z;FPS".indexOf(a);switch(c){case 0:this.tm.setSpinXYZ(b,NaN,NaN);break;case 2:this.tm.setSpinXYZ(NaN,
b,NaN);break;case 4:this.tm.setSpinXYZ(NaN,NaN,b);break;default:this.tm.setSpinFps(b);break;case 10:this.tm.setNavXYZ(b,NaN,NaN);break;case 12:this.tm.setNavXYZ(NaN,b,NaN);break;case 14:this.tm.setNavXYZ(NaN,NaN,b);break;case 16:this.tm.setNavFps(b)}this.g.setI((10>c?"spin":"nav")+a,b)}},"~S,~N");c(b,"getSpinState",function(){return this.getStateCreator().getSpinState(!1)});c(b,"getOrientation",function(a,b,c,e){switch(a){case 1312817669:case 1814695966:case 1073741864:case 1111492629:case 1111492630:case 1111492631:case 134221850:null==
c&&(c=this.bsA());if(c.isEmpty())return 1312817669==a?"0":1814695966==a||1073741864==a?null:new JU.Quat;c=this.ms.getBoundBoxOrientation(a,c,e);return"best"===b&&1312817669!=a?c.div(this.tm.getRotationQ()):c;case 1073742034:return this.stm.getSavedOrientationText(b);default:return this.tm.getOrientationText(a,"best"===b)}},"~N,~S,JU.BS,~A");c(b,"getCurrentColorRange",function(){return this.cm.getPropertyColorRange()});c(b,"setDefaultColors",function(a){this.cm.setDefaultColors(a);this.g.setB("colorRasmol",
a);this.g.setO("defaultColorScheme",a?"rasmol":"jmol")},"~B");c(b,"setElementArgb",function(a,b){this.g.setO("=color "+JU.Elements.elementNameFromNumber(a),JU.Escape.escapeColor(b));this.cm.setElementArgb(a,b)},"~N,~N");g(b,"setVectorScale",function(a){this.g.setF("vectorScale",a);this.g.vectorScale=a},"~N");g(b,"setVibrationScale",function(a){this.tm.setVibrationScale(a);this.g.vibrationScale=a;this.g.setF("vibrationScale",a)},"~N");g(b,"setVibrationPeriod",function(a){Double.isNaN(a)&&(a=this.g.vibrationPeriod);
this.tm.setVibrationPeriod(a);a=Math.abs(a);this.g.vibrationPeriod=a;this.g.setF("vibrationPeriod",a)},"~N");c(b,"setObjectColor",function(a,b){null==b||0==b.length||this.setObjectArgb(a,JU.CU.getArgbFromString(b))},"~S,~S");c(b,"setObjectVisibility",function(a,b){var c=JV.StateManager.getObjectIdFromName(a);0<=c&&this.setShapeProperty(c,"display",b?Boolean.TRUE:Boolean.FALSE)},"~S,~B");c(b,"setObjectArgb",function(a,b){var c=JV.StateManager.getObjectIdFromName(a);if(0>c)a.equalsIgnoreCase("axes")&&
(this.setObjectArgb("axis1",b),this.setObjectArgb("axis2",b),this.setObjectArgb("axis3",b));else{this.g.objColors[c]=b;switch(c){case 0:this.gdata.setBackgroundArgb(b),this.cm.setColixBackgroundContrast(b)}this.g.setO(a+"Color",JU.Escape.escapeColor(b))}},"~S,~N");c(b,"setBackgroundImage",function(a,b){this.g.backgroundImageFileName=a;this.gdata.setBackgroundImage(b)},"~S,~O");c(b,"getObjectColix",function(a){a=this.g.objColors[a];return 0==a?this.cm.colixBackgroundContrast:JU.C.getColix(a)},"~N");
g(b,"setColorBackground",function(a){this.setObjectColor("background",a)},"~S");g(b,"getBackgroundArgb",function(){return this.g.objColors[0]});c(b,"setObjectMad10",function(a,b,c){var e=JV.StateManager.getObjectIdFromName(b.equalsIgnoreCase("axes")?"axis":b);if(!(0>e)){if(-2==c||-4==c){var f=c+3;c=this.getObjectMad10(e);0==c&&(c=f)}this.g.setB("show"+b,0!=c);this.g.objStateOn[e]=0!=c;0!=c&&(this.g.objMad10[e]=c,this.setShapeSize(a,c,null))}},"~N,~S,~N");c(b,"getObjectMad10",function(a){return this.g.objStateOn[a]?
this.g.objMad10[a]:0},"~N");c(b,"setPropertyColorScheme",function(a,b,c){this.g.propertyColorScheme=a;a.startsWith("translucent ")&&(b=!0,a=a.substring(12).trim());this.cm.setPropertyColorScheme(a,b,c)},"~S,~B,~B");c(b,"getLightingState",function(){return this.getStateCreator().getLightingState(!0)});c(b,"getColorPointForPropertyValue",function(a){return JU.CU.colorPtFromInt(this.gdata.getColorArgbOrGray(this.cm.ce.getColorIndex(a)),null)},"~N");c(b,"select",function(a,b,c,e){b&&(a=this.getUndeletedGroupAtomBits(a));
this.slm.select(a,c,e);this.shm.setShapeSizeBs(1,2147483647,null,null);this.hasSelected=!0},"JU.BS,~B,~N,~B");g(b,"setSelectionSet",function(a){this.selectStatus(a,!1,0,!0,!0)},"JU.BS");c(b,"selectBonds",function(a){this.shm.setShapeSizeBs(1,2147483647,null,a)},"JU.BS");c(b,"displayAtoms",function(a,b,c,e,f){c&&(a=this.getUndeletedGroupAtomBits(a));b?this.slm.display(this.ms,a,e,f):this.slm.hide(this.ms,a,e,f)},"JU.BS,~B,~B,~N,~B");c(b,"getUndeletedGroupAtomBits",function(a){a=this.ms.getAtoms(1086324742,
a);JU.BSUtil.andNot(a,this.slm.bsDeleted);return a},"JU.BS");c(b,"reportSelection",function(a){this.selectionHalosEnabled&&this.setTainted(!0);(this.isScriptQueued()||this.g.debugScript)&&this.scriptStatus(a)},"~S");c(b,"clearAtomSets",function(){this.slm.setSelectionSubset(null);this.definedAtomSets.clear();this.haveDisplay&&this.acm.exitMeasurementMode("clearAtomSets")});c(b,"getDefinedAtomSet",function(a){a=this.definedAtomSets.get(a.toLowerCase());return C(a,"JU.BS")?a:new JU.BS},"~S");g(b,"selectAll",
function(){this.slm.selectAll(!1)});g(b,"clearSelection",function(){this.slm.clearSelection(!0);this.g.setB("hideNotSelected",!1)});c(b,"bsA",function(){return this.slm.getSelectedAtoms()});g(b,"addSelectionListener",function(a){this.slm.addListener(a)},"J.api.JmolSelectionListener");g(b,"removeSelectionListener",function(a){this.slm.addListener(a)},"J.api.JmolSelectionListener");c(b,"getAtomBitSetEval",function(a,b){return this.allowScripting?this.getScriptManager().getAtomBitSetEval(a,b):new JU.BS},
"J.api.JmolScriptEvaluator,~O");c(b,"processTwoPointGesture",function(a){this.mouse.processTwoPointGesture(a)},"~A");c(b,"processMouseEvent",function(a,b,c,e,f){return this.mouse.processEvent(a,b,c,e,f)},"~N,~N,~N,~N,~N");c(b,"processKeyEvent",function(a){this.mouse.processKeyEvent(a)},"~O");c(b,"getRubberBandSelection",function(){return this.haveDisplay?this.acm.getRubberBand():null});c(b,"isBound",function(a,b){return this.haveDisplay&&this.acm.bnd(a,[b])},"~N,~N");c(b,"getCursorX",function(){return this.haveDisplay?
this.acm.getCurrentX():0});c(b,"getCursorY",function(){return this.haveDisplay?this.acm.getCurrentY():0});c(b,"getDefaultDirectory",function(){return this.g.defaultDirectory});c(b,"getLocalUrl",function(a){return this.apiPlatform.getLocalUrl(a)},"~S");c(b,"getFileAsString",function(a){return this.getAsciiFileOrNull(a)},"~S");g(b,"getBufferedInputStream",function(a){return this.fm.getBufferedInputStream(a)},"~S");c(b,"setLoadParameters",function(a,b){null==a&&(a=new java.util.Hashtable);a.put("vwr",
this);0<this.g.atomTypes.length&&a.put("atomTypes",this.g.atomTypes);a.containsKey("lattice")||a.put("lattice",this.g.ptDefaultLattice);this.g.applySymmetryToBonds&&a.put("applySymmetryToBonds",Boolean.TRUE);this.g.pdbGetHeader&&a.put("getHeader",Boolean.TRUE);this.g.pdbSequential&&a.put("isSequential",Boolean.TRUE);(this.g.legacyJavaFloat||this.g.doublePrecision)&&a.put("highPrecision",Boolean.TRUE);this.g.doublePrecision||a.put("lowPrecision",Boolean.TRUE);a.put("stateScriptVersionInt",Integer.$valueOf(this.stateScriptVersionInt));
if(!a.containsKey("filter")){var c=this.g.defaultLoadFilter;0<c.length&&a.put("filter",c)}c=b&&!this.g.appendNew&&0<this.ms.ac;a.put("baseAtomIndex",Integer.$valueOf(b?this.ms.ac:0));a.put("baseBondIndex",Integer.$valueOf(b?this.ms.bondCount:0));a.put("baseModelIndex",Integer.$valueOf(0==this.ms.ac?0:this.ms.mc+(c?-1:0)));c&&a.put("merging",Boolean.TRUE);return a},"java.util.Map,~B");g(b,"openFileAsyncSpecial",function(a,b){this.getScriptManager().openFileAsync(a,b,null)},"~S,~N");g(b,"openFileAsyncSpecialType",
function(a,b,c){this.getScriptManager().openFileAsync(a,b,c)},"~S,~N,~S");g(b,"openFile",function(a){this.zap(!0,!0,!1);return this.loadModelFromFileRepaint(null,a,null,null)},"~S");g(b,"openFiles",function(a){this.zap(!0,!0,!1);return this.loadModelFromFileRepaint(null,null,a,null)},"~A");c(b,"openReader",function(a,b,c){this.zap(!0,!0,!1);return this.loadModelFromFileRepaint(a,b,null,c)},"~S,~S,~O");g(b,"openDOM",function(a){this.zap(!0,!0,!1);return this.loadModelFromFileRepaint("?","?",null,a)},
"~O");c(b,"loadModelFromFileRepaint",function(a,b,c,e){a=this.loadModelFromFile(a,b,c,e,!1,null,null,null,0," ");this.refresh(1,"loadModelFromFileRepaint");return a},"~S,~S,~A,~O");c(b,"loadModelFromFile",function(a,b,c,e,f,j,g,l,s,m){null==j&&(j=this.setLoadParameters(null,f));0!=s&&j.put("dataType",JS.T.nameOf(s));" "!==m&&j.put("concatenate",Boolean.TRUE);var p=this.fm.getFileInfo();if(null!=c){if(null==g){g=(new JU.SB).append("load files");for(a=0;a<c.length;a++)g.append(0==a||null==m?" ":m).append("/*file*/$FILENAME"+
(a+1)+"$");0<l.length()&&g.append(" /*options*/ ").append(l.toString())}a=System.currentTimeMillis();l=this.fm.createAtomSetCollectionFromFiles(c,this.setLoadParameters(j,f),f);a=System.currentTimeMillis()-a;JU.Logger.info("openFiles("+c.length+") "+a+" ms");c=j.get("fullPathNames");m=j.get("fileTypes");g=g.toString();for(a=0;a<c.length;a++)b=c[a],null!=m&&null!=m[a]&&(b=m[a]+"::"+b),g=JU.PT.rep(g,"$FILENAME"+(a+1)+"$",JU.PT.esc(JV.FileManager.fixDOSName(b)));g=(new JU.SB).append(g)}else if(null==
e)null==g&&(g=(new JU.SB).append("load /*file*/$FILENAME$")),l=this.openFileFull(b,f,j,g);else if(C(e,"java.io.Reader")||C(e,"java.io.BufferedInputStream")||JU.AU.isAB(e))l=this.fm.createAtomSetCollectionFromReader(a,b,e,this.setLoadParameters(j,f));else return"ERROR - invalid reader";if(0!=s)return this.fm.setFileInfo(p),this.loadAtomDataAndReturnError(l,s);if(j.containsKey("isData"))return l;null!=g&&"string"!=typeof l&&(b=j.get("fullPathName"),null==b&&(b=""),j.containsKey("loadScript")&&(g=j.get("loadScript")),
j.put("loadScript",g=(new JU.SB).append(JU.PT.rep(g.toString(),"$FILENAME$",JU.PT.esc(JV.FileManager.fixDOSName(b))))));return this.createModelSetAndReturnError(l,f,g,j)},"~S,~S,~A,~O,~B,java.util.Map,JU.SB,JU.SB,~N,~S");c(b,"setLigandModel",function(a,b){null==this.ligandModels&&(this.ligandModels=new java.util.Hashtable);this.ligandModels.put(a,b)},"~S,~S");c(b,"getLigandModel",function(a,b,c,e){if(null==a){if(null!=this.ligandModelSet)for(a=this.ligandModels.entrySet().iterator();a.hasNext();){var f=
a.next();C(f.getValue(),Boolean)&&a.remove()}return null}a=a.$replace("\\","/");var j=b.equals("ligand_");a=0<=a.indexOf("/cif")?a:j?a.toUpperCase():a.substring(a.lastIndexOf("/")+1);null==this.ligandModelSet&&(this.ligandModelSet=new java.util.Hashtable);this.ligandModelSet.put(a,Boolean.TRUE);null==this.ligandModels&&(this.ligandModels=new java.util.Hashtable);var g=a.indexOf("|");0<=g&&(a=a.substring(a.indexOf("|")+1));var l=null==e?this.ligandModels.get(a):null,f=null;if(C(l,Boolean))return null;
if(null==l&&(null==e||0<=g))l=this.ligandModels.get(a+c);var g=!1,s=null==l;if(s){if(j){f=this.setLoadFormat(!1,"#"+a,"#",!1);if(0==f.length)return null;this.scriptEcho("fetching "+f);l=this.getFileAsString3(f,!1,null)}else this.scriptEcho("fetching "+b),l=this.getFileAsString3(b,!1,null),e=null==e?-1:l.indexOf(e),0<=e&&(l=l.substring(0,e));(g=0==l.indexOf("java."))||this.ligandModels.put(a+c,l)}if(!j)return s||this.scriptEcho(b+" loaded from cache"),l;!g&&"string"==typeof l&&(b=l,0!=b.length&&(c=
new java.util.Hashtable,c.put("modelOnly",Boolean.TRUE),l=this.getModelAdapter().getAtomSetCollectionReader("ligand",null,JU.Rdr.getBR(b),c),g="string"==typeof l,g||(l=this.getModelAdapter().getAtomSetCollection(l),g="string"==typeof l,null!=f&&!g&&this.scriptEcho(this.getModelAdapter().getAtomSetCollectionAuxiliaryInfo(l).get("modelLoadNote")))));return g?(this.scriptEcho(l.toString()),this.ligandModels.put(a,Boolean.FALSE),null):l},"~S,~S,~S,~S");c(b,"openFileFull",function(a,b,c,e){if(null==a||
a.equals("String[]"))return null;var f,j="openFile("+a+")";JU.Logger.startTimer(j);c=this.setLoadParameters(c,b);var g=a.startsWith("@"),l=c.containsKey("fileData");0==a.indexOf("$")&&c.put("smilesString",a.substring(1));var s=a.equals("string")||a.equals("Jmol Model Kit");f=null;if(l){if(f=c.get("fileData"),c.containsKey("isData"))return j=this.loadInlineScript(f,"\x00",b,c),this.lastData=this.g.preserveState?this.getDataManager().createFileData(f):null,j}else if(s){f=this.ms.getInlineData(-1);if(null==
f)if(this.g.modelKitMode)f="5\n\nC 0 0 0\nH .63 .63 .63\nH -.63 -.63 .63\nH -.63 .63 -.63\nH .63 -.63 -.63";else return"cannot find string data";null!=e&&c.put("loadScript",e=(new JU.SB).append(JU.PT.rep(e.toString(),"/*file*/$FILENAME$",'/*data*/data "model inline"\n'+f+'end "model inline"')))}null!=f?(b||this.zap(!0,!1,!1),!g&&(!l||s)&&this.getStateCreator().getInlineData(e,f,b,c.get("appendToModelIndex"),this.g.defaultLoadFilter),f=this.fm.createAtomSetCollectionFromString(f,c,b)):f=this.fm.createAtomSetCollectionFromFile(a,
c,b);JU.Logger.checkTimer(j,!1);return f},"~S,~B,java.util.Map,JU.SB");g(b,"openStringInline",function(a){a=this.openStringInlineParamsAppend(a,null,!1);this.refresh(1,"openStringInline");return a},"~S");c(b,"loadInline",function(a){return this.loadInlineScriptRepaint(a,this.g.inlineNewlineChar,!1)},"~S");c(b,"loadInline",function(a,b){return this.loadInlineScriptRepaint(a,b,!1)},"~S,~S");g(b,"loadInlineAppend",function(a,b){return this.loadInlineScriptRepaint(a,"\x00",b)},"~S,~B");c(b,"loadInlineScriptRepaint",
function(a,b,c){a=this.loadInlineScript(a,b,c,null);this.refresh(1,"loadInlineScript");return a},"~S,~S,~B");c(b,"loadInline",function(a){return this.loadInline(a,!1)},"~A");c(b,"loadInline",function(a,b){if(null==a||0==a.length)return null;var c=this.openStringsInlineParamsAppend(a,new java.util.Hashtable,b);this.refresh(1,"loadInline String[]");return c},"~A,~B");c(b,"loadInline",function(a,b){if(null==a||0==a.size())return null;b||this.zap(!0,!1,!1);for(var c=new JU.Lst,e=0;e<a.size();e++)c.addLast(a.get(e));
c=this.fm.createAtomSeCollectionFromArrayData(c,this.setLoadParameters(null,b),b);c=this.createModelSetAndReturnError(c,b,null,new java.util.Hashtable);this.refresh(1,"loadInline");return c},"java.util.List,~B");c(b,"loadInlineScript",function(a,b,c,e){if(null==a||0==a.length)return null;if(!a.startsWith(JV.JC.BASE64_TAG)){a=JV.Viewer.fixInlineString(a,b);0!=b.charCodeAt(0)&&JU.Logger.info("loading model inline, "+a.length+" bytes, with newLine character "+b.charCodeAt(0)+" isAppend="+c);JU.Logger.debugging&&
JU.Logger.debug(a);b=this.getDataSeparator();var f;if(null!=b&&""!==b&&0<=(f=a.indexOf(b))&&0>a.indexOf("# Jmol state")){for(var j=2;0<=(f=a.indexOf(b,f+1));)j++;var g=Array(j),l=0,s=0;for(f=0;f<j;f++)l=a.indexOf(b,s),0>l&&(l=a.length),g[f]=a.substring(s,l),s=l+b.length;return this.openStringsInlineParamsAppend(g,e,c)}}return this.openStringInlineParamsAppend(a,e,c)},"~S,~S,~B,java.util.Map");b.fixInlineString=c(b,"fixInlineString",function(a,b){var c;0<=a.indexOf("\\/n")&&(a=JU.PT.rep(a,"\n",""),
a=JU.PT.rep(a,"\\/n","\n"),b=String.fromCharCode(0));if(0!=b.charCodeAt(0)&&"\n"!=b){var e=0<=a.indexOf("\n"),f=a.length;for(c=0;c<f&&" "==a.charAt(c);++c);c<f&&a.charAt(c)==b&&(a=a.substring(c+1));a=e?JU.PT.rep(a,""+b,""):a.$replace(b,"\n")}return a},"~S,~S");c(b,"openStringInlineParamsAppend",function(a,b,c){b=this.setLoadParameters(b,c);var e=b.get("loadScript"),f=b.containsKey("isData");if(!a.startsWith(JV.JC.BASE64_TAG)){var j=this.getModelAdapter().getFileTypeName(b.get("filter"));if(null==
j&&null==(j=this.getModelAdapter().getFileTypeName(JU.Rdr.getBR(a))))return"unknown file type";if(j.equals("spt"))return"cannot open script inline"}null==e&&(e=new JU.SB);c||this.zap(!0,!1,!1);f||this.getStateCreator().getInlineData(e,a,c,b.get("appendToModelIndex"),this.g.defaultLoadFilter);a=this.fm.createAtomSetCollectionFromString(a,b,c);return this.createModelSetAndReturnError(a,c,e,b)},"~S,java.util.Map,~B");c(b,"openStringsInlineParamsAppend",function(a,b,c){var e=new JU.SB;c||this.zap(!0,
!1,!1);a=this.fm.createAtomSeCollectionFromStrings(a,e,this.setLoadParameters(b,c),c);return this.createModelSetAndReturnError(a,c,e,b)},"~A,java.util.Map,~B");c(b,"getInlineChar",function(){return this.g.inlineNewlineChar});c(b,"getDataSeparator",function(){return this.g.getParameter("dataseparator",!0)});c(b,"createModelSetAndReturnError",function(a,b,c,e){JU.Logger.startTimer("creating model");var f=this.fm.getFullPathName(!1),j=this.fm.getFileName();null==c&&(this.setBooleanPropertyTok("preserveState",
603979898,!1),c=(new JU.SB).append('load "???"'));if("string"==typeof a)return this.setFileLoadStatus(J.c.FIL.NOT_LOADED,f,null,null,a,null),this.displayLoadErrors&&(!b&&!a.equals("#CANCELED#")&&!a.startsWith(JV.JC.READER_NOT_FOUND))&&this.zapMsg(a),a;b?this.clearAtomSets():this.g.modelKitMode&&!j.equals("Jmol Model Kit")&&this.setModelKitMode(!1);this.setFileLoadStatus(J.c.FIL.CREATING_MODELSET,f,j,null,null,null);this.pushHoldRepaintWhy("createModelSet");this.setErrorMessage(null,null);try{var g=
new JU.BS;this.mm.createModelSet(f,j,c,a,g,b);if(!g.isEmpty()){var l=this.ms.getInfoM("jmolscript");if(this.ms.getMSInfoB("doMinimize"))try{var s=e.get("eval"),m=this.getAtomBitSet("_C & connected(3) & !connected(double)");m.and(g);0<=m.nextSetBit(0)&&g.or(this.addHydrogens(m,41));this.minimize(s,2147483647,0,g,null,null,0,185)}catch(p){if(!D(p,Exception))throw p;}else this.addHydrogens(g,9);null!=l&&this.ms.msInfo.put("jmolscript",l)}this.initializeModel(b)}catch(n){if(D(n,Error))this.handleError(n,
!0),a=this.getShapeErrorState(),a="ERROR creating model: "+n+(0==a.length?"":"|"+a),this.zapMsg(a),this.setErrorMessage(a,null);else throw n;}this.popHoldRepaint("createModelSet \u0001## REPAINT_IGNORE ##");a=this.getErrorMessage();this.setFileLoadStatus(J.c.FIL.CREATED,f,j,this.ms.modelSetName,a,e.get("async"));b&&(this.selectAll(),this.setTainted(!0),this.axesAreTainted=!0);JU.Logger.checkTimer("creating model",!1);System.gc();return a},"~O,~B,JU.SB,java.util.Map");c(b,"loadAtomDataAndReturnError",
function(a,b){if("string"==typeof a)return a;this.setErrorMessage(null,null);try{var c=this.mm.createAtomDataSet(a,b);switch(b){case 1145047049:null!=c&&this.runScriptCautiously(c);break;case 4166:this.setStatusFrameChanged(!0,!1);break;case 1648363544:this.shm.deleteVdwDependentShapes(null)}}catch(e){if(D(e,Error))this.handleError(e,!0),c=this.getShapeErrorState(),c="ERROR adding atom data: "+e+(0==c.length?"":"|"+c),this.zapMsg(c),this.setErrorMessage(c,null),this.setParallel(!1);else throw e;}return this.getErrorMessage()},
"~O,~N");c(b,"getCurrentFileAsString",function(a){var b=this.fm.getFullPathName(!1);return b.equals("string")||b.equals("Jmol Model Kit")?this.ms.getInlineData(this.am.cmi):b.equals("String[]")?b:"JSNode"===b?"<DOM NODE>":this.getFileAsString4(b,-1,!0,!1,!1,a)},"~S");c(b,"getFullPathNameOrError",function(a){var b=Array(2);this.fm.getFullPathNameOrError(a,!1,b);return b},"~S");c(b,"getFileAsString3",function(a,b,c){return this.getFileAsString4(a,-1,!1,!1,b,c)},"~S,~B,~S");c(b,"getFileAsString4",function(a,
b,c,e,f,j){if(null==a)return this.getCurrentFileAsString(j);a=u(-1,[a,null]);this.fm.getFileDataAsString(a,b,c,e,f);return a[1]},"~S,~N,~B,~B,~B,~S");c(b,"getAsciiFileOrNull",function(a){a=u(-1,[a,null]);return this.fm.getFileDataAsString(a,-1,!1,!1,!1)?a[1]:null},"~S");c(b,"autoCalculate",function(a,b){switch(a){case 1111490575:this.ms.getSurfaceDistanceMax();break;case 1111490574:this.ms.calculateStraightnessAll();break;case 1111490587:this.ms.calculateDssrProperty(b)}},"~N,~S");c(b,"calculateStraightness",
function(){this.ms.haveStraightness=!1;this.ms.calculateStraightnessAll()});c(b,"calculateSurface",function(a,b){null==a&&(a=this.bsA());if(3.4028235E38==b||-1==b)this.ms.addStateScript("calculate surfaceDistance "+(3.4028235E38==b?"FROM":"WITHIN"),null,a,null,"",!1,!0);return this.ms.calculateSurface(a,b)},"JU.BS,~N");c(b,"getStructureList",function(){return this.g.getStructureList()});c(b,"setStructureList",function(a,b){this.g.setStructureList(a,b);this.ms.setStructureList(this.getStructureList())},
"~A,J.c.STR");c(b,"calculateStructures",function(a,b,c,e){null==a&&(a=this.bsA());return this.ms.calculateStructures(a,b,!this.am.animationOn,this.g.dsspCalcHydrogen,c,e)},"JU.BS,~B,~B,~N");c(b,"getAnnotationParser",function(a){return a?null==this.dssrParser?this.dssrParser=J.api.Interface.getOption("dssx.DSSR1",this,"script"):this.dssrParser:null==this.annotationParser?this.annotationParser=J.api.Interface.getOption("dssx.AnnotationParser",this,"script"):this.annotationParser},"~B");g(b,"getSelectedAtomIterator",
function(a,b,c,e){return this.ms.getSelectedAtomIterator(a,b,c,!1,e)},"JU.BS,~B,~B,~B");g(b,"setIteratorForAtom",function(a,b,c){this.ms.setIteratorForAtom(a,-1,b,c,null)},"J.api.AtomIndexIterator,~N,~N");g(b,"setIteratorForPoint",function(a,b,c,e){this.ms.setIteratorForPoint(a,b,c,e)},"J.api.AtomIndexIterator,~N,JU.T3,~N");g(b,"fillAtomData",function(a,b){a.programInfo="Jmol Version "+JV.Viewer.getJmolVersion();a.fileName=this.fm.getFileName();this.ms.fillAtomData(a,b)},"J.atomdata.AtomData,~N");
c(b,"addStateScript",function(a,b,c){return this.ms.addStateScript(a,null,null,null,null,b,c)},"~S,~B,~B");c(b,"getMinimizer",function(a){return null==this.minimizer&&a?(this.minimizer=J.api.Interface.getInterface("JM.Minimizer",this,"script")).setProperty("vwr",this):this.minimizer},"~B");c(b,"getSmilesMatcher",function(){return null==this.smilesMatcher?this.smilesMatcher=J.api.Interface.getInterface("JS.SmilesMatcher",this,"script"):this.smilesMatcher});c(b,"clearModelDependentObjects",function(){this.setFrameOffsets(null,
!1);this.stopMinimization();this.smilesMatcher=this.minimizer=null;null!=this.modelkit&&this.modelkit.clearAtomConstraints()});c(b,"zap",function(a,b,c){this.clearThreads();null==this.mm.modelSet?this.mm.zap():(this.ligandModelSet=null,this.clearModelDependentObjects(),this.fm.clear(),this.clearRepaintManager(-1),this.am.clear(),this.tm.clear(),this.slm.clear(),this.hasSelected=!0,this.clearAllMeasurements(),this.clearMinimization(),this.gdata.clear(),this.mm.zap(),null!=this.scm&&this.scm.clear(!1),
null!=this.nmrCalculation&&this.getNMRCalculation().setChemicalShiftReference(null,0),this.haveDisplay&&(this.mouse.clear(),this.clearTimeouts(),this.acm.clear()),this.stm.clear(this.g),this.tempArray.clear(),this.chainMap.clear(),this.chainList.clear(),this.chainCaseSpecified=!1,this.definedAtomSets.clear(),this.lastData=null,null!=this.dm&&this.dm.clear(),!this.g.doublePrecision&&this.g.legacyJavaFloat&&this.setBooleanPropertyTok("legacyjavafloat",603979874,!1),b&&(c&&this.g.removeParam("_pngjFile"),
c&&this.g.modelKitMode?this.loadDefaultModelKitModel(null):this.setPickingMode(null,1),this.undoMoveAction(4165,-2)),System.gc());this.initializeModel(!1);a&&this.setFileLoadStatus(J.c.FIL.ZAPPED,null,b?"resetUndo":this.getZapName(),null,null,null);JU.Logger.debugging&&JU.Logger.checkMemory()},"~B,~B,~B");c(b,"loadDefaultModelKitModel",function(a){this.getModelkit(!1).isHidden()||null!=this.getOperativeSymmetry()||(this.openStringInlineParamsAppend(this.getModelkit(!1).getDefaultModel(),a,!0),this.setRotationRadius(5,
!0),this.setStringProperty("picking","assignAtom_C"),this.setStringProperty("picking","assignBond_p"))},"java.util.Map");c(b,"zapMsg",function(a){this.zap(!0,!0,!1);this.echoMessage(a)},"~S");c(b,"echoMessage",function(a){this.shm.loadShape(31);this.setShapeProperty(31,"font",this.getFont3D("SansSerif","Plain",20));this.setShapeProperty(31,"target","error");this.setShapeProperty(31,"text",a)},"~S");c(b,"initializeModel",function(a){this.clearThreads();a?this.am.initializePointers(1):(this.reset(!0),
this.selectAll(),this.setModelkitPropertySafely("initializemodel",null),this.movingSelected=!1,this.slm.noneSelected=Boolean.FALSE,this.setHoverEnabled(!0),this.setSelectionHalosEnabled(!1),this.tm.setCenter(),this.am.initializePointers(1),this.setBooleanPropertyTok("multipleBondBananas",603979886,!1),this.ms.getMSInfoB("isPyMOL")||(this.clearAtomSets(),this.setCurrentModelIndex(0)),this.setBackgroundModelIndex(-1),this.setFrankOn(this.getShowFrank()),this.shm.setScale(),this.startHoverWatcher(!0),
this.setTainted(!0),this.finalizeTransformParameters())},"~B");c(b,"startHoverWatcher",function(a){a&&this.inMotion||(!this.haveDisplay||a&&(!this.hoverEnabled&&!this.sm.haveHoverCallback()||this.am.animationOn))||this.acm.startHoverWatcher(a)},"~B");g(b,"getModelSetPathName",function(){return this.mm.modelSetPathName});g(b,"getModelSetFileName",function(){return null==this.mm.fileName?this.getZapName():this.mm.fileName});c(b,"getUnitCellInfoText",function(){var a=this.getCurrentUnitCell();return null==
a?"not applicable":a.getUnitCellInfo(!0)});c(b,"getUnitCellInfo",function(a){var b=this.getCurrentUnitCell();return null==b?NaN:b.getUnitCellInfoType(a)},"~N");c(b,"getV0abc",function(a,b){var c=0>a?this.getCurrentUnitCell():this.getUnitCell(a);null==c&&(c=this.getSymTemp());return null==c?null:c.getV0abc(b,null)},"~N,~O");c(b,"getCurrentUnitCell",function(){var a=this.getUnitCell(this.am.cmi);if(null==a)return null;var b=a.getCartesianOffset(),c=this.am.getUnitCellAtomIndex();return 0<=c&&(null==
b||0==b.length())?this.ms.getUnitCellForAtom(c):a});c(b,"getUnitCell",function(a){if(0<=a)return this.ms.getUnitCell(a);a=this.getVisibleFramesBitSet();for(var b=null,c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1)){var e=this.ms.getUnitCell(c);if(null!=e)if(null==b)b=e;else if(!b.unitCellEquals(e))return null}return b},"~N");c(b,"getPolymerPointsAndVectors",function(a,b){this.ms.getPolymerPointsAndVectors(a,b,this.g.traceAlpha,this.g.sheetSmoothing)},"JU.BS,JU.Lst");c(b,"getHybridizationAndAxes",function(a,
b,c,e){return this.ms.getHybridizationAndAxes(a,0,b,c,e,!0,!0,!1,null)},"~N,JU.V3,JU.V3,~S");c(b,"getAllAtoms",function(){return this.getModelUndeletedAtomsBitSet(-1)});c(b,"getFrameAtoms",function(){return this.getModelUndeletedAtomsBitSetBs(this.getVisibleFramesBitSet())});g(b,"getVisibleFramesBitSet",function(){var a=JU.BSUtil.copy(this.am.bsVisibleModels);null!=this.ms.trajectory&&this.ms.trajectory.selectDisplayed(a);return a});c(b,"getModelUndeletedAtomsBitSet",function(a){return this.slm.excludeAtoms(this.ms.getModelAtomBitSetIncludingDeleted(a,
!0),!1)},"~N");c(b,"getModelUndeletedAtomsBitSetBs",function(a){return this.slm.excludeAtoms(this.ms.getModelAtomBitSetIncludingDeletedBs(a),!1)},"JU.BS");g(b,"getBoundBoxCenter",function(){return this.ms.getBoundBoxCenter(this.am.cmi)});c(b,"calcBoundBoxDimensions",function(a,b){this.ms.calcBoundBoxDimensions(a,b);this.axesAreTainted=!0},"JU.BS,~N");g(b,"getBoundBoxCornerVector",function(){return this.ms.getBoundBoxCornerVector()});g(b,"getModelSetProperties",function(){return this.ms.modelSetProperties});
g(b,"getModelProperties",function(a){return this.ms.am[a].properties},"~N");c(b,"getModelForAtomIndex",function(a){return this.ms.am[this.ms.at[a].mi]},"~N");c(b,"getModelIndexForAtom",function(a){return this.ms.at[a].mi},"~N");g(b,"getModelSetAuxiliaryInfo",function(){return this.ms.getModelSetAuxiliaryInfo(null)});g(b,"getModelNumber",function(a){return 0>a?a:this.ms.getModelNumber(a)},"~N");c(b,"getModelFileNumber",function(a){return 0>a?0:this.ms.modelFileNumbers[a]},"~N");g(b,"getModelNumberDotted",
function(a){return 0>a?"0":this.ms.getModelNumberDotted(a)},"~N");g(b,"getModelName",function(a){return this.ms.getModelName(a)},"~N");c(b,"modelHasVibrationVectors",function(a){return 0<=this.ms.getLastVibrationVector(a,4166)},"~N");c(b,"getBondsForSelectedAtoms",function(a){return this.ms.getBondsForSelectedAtoms(a,this.g.bondModeOr||1==JU.BSUtil.cardinalityOf(a))},"JU.BS");c(b,"frankClicked",function(a,b){return!this.g.disablePopupMenu&&this.getShowFrank()&&this.shm.checkFrankclicked(a,b)},"~N,~N");
c(b,"frankClickedModelKit",function(a,b){return!this.g.disablePopupMenu&&this.isModelKitOpen()&&0<=a&&0<=b&&40>a&&104>b},"~N,~N");g(b,"findNearestAtomIndex",function(a,b){return this.findNearestAtomIndexMovable(a,b,!1)},"~N,~N");c(b,"findNearestAtomIndexMovable",function(a,b,c){return!this.g.atomPicking?-1:this.ms.findNearestAtomIndex(a,b,c?this.slm.getMotionFixedAtoms():null,this.g.minPixelSelRadius)},"~N,~N,~B");c(b,"toCartesian",function(a,b){this.toCartesianUC(null,a,b)},"JU.T3,~B");c(b,"toCartesianUC",
function(a,b,c){null==a&&(a=this.getCurrentUnitCell());null!=a&&(a.toCartesian(b,c),this.g.legacyJavaFloat||JU.PT.fixPtFloats(b,1E4))},"J.api.SymmetryInterface,JU.T3,~B");c(b,"toFractional",function(a,b){this.toFractionalUC(null,a,b)},"JU.T3,~B");c(b,"toFractionalUC",function(a,b,c){null==a&&(a=this.getCurrentUnitCell());null!=a&&(a.toFractional(b,c),this.g.legacyJavaFloat||JU.PT.fixPtFloats(b,1E5))},"J.api.SymmetryInterface,JU.T3,~B");c(b,"toUnitCell",function(a,b){var c=this.getCurrentUnitCell();
null!=c&&c.toUnitCell(a,b)},"JU.P3,JU.P3");c(b,"setCurrentCage",function(a){a=u(-1,[a,null]);this.shm.getShapePropertyData(24,"unitCell",a);this.ms.setModelCage(this.am.cmi,a[1])},"~S");c(b,"addUnitCellOffset",function(a){var b=this.getCurrentUnitCell();null!=b&&a.add(b.getCartesianOffset())},"JU.P3");c(b,"setAtomData",function(a,b,c,e){this.ms.setAtomData(a,b,c,e);2==a&&this.checkCoordinatesChanged(null);this.refreshMeasures(!0)},"~N,~S,~S,~B");g(b,"setCenterSelected",function(){this.setCenterBitSet(this.bsA(),
!0)});c(b,"setApplySymmetryToBonds",function(a){this.g.applySymmetryToBonds=a},"~B");g(b,"setBondTolerance",function(a){this.g.setF("bondTolerance",a);this.g.bondTolerance=a},"~N");g(b,"setMinBondDistance",function(a){this.g.setF("minBondDistance",a);this.g.minBondDistance=a},"~N");c(b,"getAtomsNearPt",function(a,b,c){null==c&&(c=new JU.BS);this.ms.getAtomsWithin(a,b,c,-1);return c},"~N,JU.P3,JU.BS");c(b,"getBranchBitSet",function(a,b,c){return 0>a||a>=this.ms.ac?new JU.BS:JU.JmolMolecule.getBranchBitSet(this.ms.at,
a,this.getModelUndeletedAtomsBitSet(this.ms.at[a].mi),null,b,c,!0)},"~N,~N,~B");g(b,"getElementsPresentBitSet",function(a){return this.ms.getElementsPresentBitSet(a)},"~N");c(b,"getFileHeader",function(){return this.ms.getFileHeader(this.am.cmi)});c(b,"getFileData",function(){return this.ms.getFileData(this.am.cmi)});c(b,"getCifData",function(a){return this.readCifData(this.ms.getModelFileName(a),this.ms.getModelFileType(a).toUpperCase())},"~N");c(b,"readCifData",function(a,b){var c=null==a?this.ms.getModelFileName(this.am.cmi):
a,e=null,f=null==c?-1:c.indexOf(";keys=");0<=f&&(e=c.substring(f+6).$plit(","),c=c.substring(0,f));if(null==b&&null!=c&&0<=c.toUpperCase().indexOf("BCIF")){e=this.fm.getBufferedInputStream(c);try{return J.api.Interface.getInterface("JU.MessagePackReader",this,"script").getMapForStream(e)}catch(j){if(D(j,Exception))return j.printStackTrace(),new java.util.Hashtable;throw j;}}c=null==c||0==c.length?this.getCurrentFileAsString("script"):this.getFileAsString3(c,!1,null);if(null==c||2>c.length)return null;
c=JU.Rdr.getBR(c);null==b&&(b=this.getModelAdapter().getFileTypeName(c));return null==b?null:this.readCifDataKey(null,c,b,e)},"~S,~S");c(b,"readCifData",function(a,b,c){return this.readCifDataKey(a,b,c,ha("Array"))},"~S,~O,~S");c(b,"readCifDataKey",function(a,b,c,e){null==b&&(b=this.getFileAsString(a));a=C(b,"java.io.BufferedReader")?b:JU.Rdr.getBR(b);return JU.Rdr.readCifData(J.api.Interface.getInterface("Cif2".equals(c)?"J.adapter.readers.cif.Cif2DataParser":"JU.CifDataParser",this,"script"),a,
e)},"~S,~O,~S,~A");c(b,"getStateCreator",function(){null==this.jsc&&(this.jsc=J.api.Interface.getInterface("JV.StateCreator",this,"script")).setViewer(this);return this.jsc});c(b,"getWrappedStateScript",function(){return this.getOutputManager().getWrappedState(null,null,null,null)});g(b,"getStateInfo",function(){return this.getStateInfo3(null,0,0)});c(b,"getStateInfo3",function(a,b,c){return this.g.preserveState?this.getStateCreator().getStateScript(a,b,c):""},"~S,~N,~N");c(b,"getStructureState",
function(){return this.getStateCreator().getModelState(null,!1,!0)});c(b,"getCoordinateState",function(a){return this.getStateCreator().getAtomicPropertyState(2,a)},"JU.BS");c(b,"setCurrentColorRange",function(a){var b=this.getDataObj(a,null,1);a=null==b?null:this.getDataObj(a,null,-1)[2];null!=a&&this.g.rangeSelected&&a.and(this.bsA());this.cm.setPropertyColorRangeData(b,a)},"~S");c(b,"setData",function(a,b,c,e,f,j,g){this.getDataManager().setData(a,this.lastData=b,c,this.ms.ac,e,f,j,g)},"~S,~A,~N,~N,~N,~N,~N");
c(b,"getDataObj",function(a,b,c){return null==a&&-2==c?this.lastData:this.getDataManager().getData(a,b,c)},"~S,JU.BS,~N");c(b,"autoHbond",function(a,b,c){null==a&&(a=b=this.bsA());return this.ms.autoHbond(a,b,c)},"JU.BS,JU.BS,~B");c(b,"getDefaultMeasurementLabel",function(a){switch(a){case 2:return this.g.defaultDistanceLabel;case 3:return this.g.defaultAngleLabel;default:return this.g.defaultTorsionLabel}},"~N");g(b,"getMeasurementCount",function(){var a=this.getShapePropertyAsInt(6,"count");return 0>=
a?0:a});g(b,"getMeasurementStringValue",function(a){return""+this.shm.getShapePropertyIndex(6,"stringValue",a)},"~N");c(b,"getMeasurementInfoAsString",function(){return this.getShapeProperty(6,"infostring")});g(b,"getMeasurementCountPlusIndices",function(a){return this.shm.getShapePropertyIndex(6,"countPlusIndices",a)},"~N");c(b,"setPendingMeasurement",function(a){this.shm.loadShape(6);this.setShapeProperty(6,"pending",a)},"JM.MeasurementPending");c(b,"getPendingMeasurement",function(){return this.getShapeProperty(6,
"pending")});c(b,"clearAllMeasurements",function(){this.setShapeProperty(6,"clear",null)});g(b,"clearMeasurements",function(){this.evalString("measures delete")});c(b,"setAnimation",function(a){switch(a){case 1073742098:this.am.reverseAnimation();case 1073742096:case 4143:this.am.animationOn||this.am.resumeAnimation();break;case 20487:this.am.animationOn&&!this.am.animationPaused&&this.am.pauseAnimation();break;case 1073742037:this.am.setAnimationNext();break;case 1073742108:this.am.setAnimationPrevious();
break;case 1073741942:case 1073742125:this.am.rewindAnimation();break;case 1073741993:this.am.setAnimationLast()}},"~N");g(b,"setAnimationFps",function(a){this.am.setAnimationFps(a)},"~N");c(b,"setAnimationMode",function(a){a.equalsIgnoreCase("once")?this.am.setAnimationReplayMode(1073742070,0,0):a.equalsIgnoreCase("loop")?this.am.setAnimationReplayMode(528411,1,1):a.startsWith("pal")&&this.am.setAnimationReplayMode(1073742082,1,1)},"~S");c(b,"setAnimationOn",function(a){a!=this.am.animationOn&&this.am.setAnimationOn(a)},
"~B");c(b,"setAnimationRange",function(a,b){this.am.setAnimationRange(a,b)},"~N,~N");c(b,"defineAtomSets",function(a){this.definedAtomSets.putAll(a)},"java.util.Map");c(b,"setAnimDisplay",function(a){this.am.setDisplay(a);this.am.animationOn||this.am.morph(this.am.currentMorphModel+1)},"JU.BS");c(b,"setCurrentModelIndex",function(a){-2147483648==a?(this.prevFrame=-2147483648,this.setCurrentModelIndexClear(this.am.cmi,!0)):this.am.setModel(a,!0)},"~N");c(b,"getTrajectoryState",function(){return null==
this.ms.trajectory?"":this.ms.trajectory.getState()});c(b,"setFrameOffsets",function(a,b){this.tm.bsFrameOffsets=null;b?this.clearModelDependentObjects():this.tm.bsFrameOffsets=a;this.tm.frameOffsets=this.ms.getFrameOffsets(a,b)},"JU.BS,~B");c(b,"setCurrentModelIndexClear",function(a,b){this.am.setModel(a,b)},"~N,~B");c(b,"haveFileSet",function(){return 1<this.ms.mc&&2E6<this.getModelNumber(2147483647)});c(b,"setBackgroundModelIndex",function(a){this.am.setBackgroundModelIndex(a);this.g.setO("backgroundModel",
this.ms.getModelNumberDotted(a))},"~N");c(b,"setFrameVariables",function(){this.g.setO("animationMode",JS.T.nameOf(this.am.animationReplayMode));this.g.setI("animationFps",this.am.animationFps);this.g.setO("_firstFrame",this.am.getModelSpecial(-1));this.g.setO("_lastFrame",this.am.getModelSpecial(1));this.g.setF("_animTimeSec",this.am.getAnimRunTimeSeconds());this.g.setB("_animMovie",this.am.isMovie)});c(b,"getInMotion",function(a){return this.inMotion||a&&this.am.animationOn},"~B");g(b,"getMotionEventNumber",
function(){return this.motionEventNumber});g(b,"setInMotion",function(a){(new Boolean(this.inMotion^a)).valueOf()&&(this.inMotion=a,this.resizeImage(0,0,!1,!1,!0),a?(this.startHoverWatcher(!1),++this.motionEventNumber):(this.startHoverWatcher(!0),this.refresh(3,"vwr setInMotion "+a)))},"~B");c(b,"setRefreshing",function(a){this.refreshing=a},"~B");c(b,"getRefreshing",function(){return this.refreshing});g(b,"pushHoldRepaint",function(){this.pushHoldRepaintWhy(null)});c(b,"pushHoldRepaintWhy",function(a){null!=
this.rm&&this.rm.pushHoldRepaint(a)},"~S");g(b,"popHoldRepaint",function(a){null!=this.rm&&this.rm.popHoldRepaint(0>a.indexOf("\u0001## REPAINT_IGNORE ##"),a)},"~S");g(b,"refresh",function(a,b){if(!(null==this.rm||!this.refreshing||6==a&&this.getInMotion(!0)||!this.isWebGL&&7==a)){if(this.isWebGL)switch(a){case 1:case 2:case 7:this.tm.finalizeTransformParameters();if(null==this.html5Applet)return;this.html5Applet._refresh();if(7==a)return}else this.rm.repaintIfReady("refresh "+a+" "+b);this.sm.doSync()&&
this.sm.setSync(2==a?b:null)}},"~N,~S");c(b,"requestRepaintAndWait",function(a){null!=this.rm&&(this.haveDisplay?(this.rm.requestRepaintAndWait(a),this.setSync()):(this.setModelVisibility(),this.shm.finalizeAtoms(null,!0)))},"~S");c(b,"clearShapeRenderers",function(){this.clearRepaintManager(-1)});c(b,"isRepaintPending",function(){return null==this.rm?!1:this.rm.isRepaintPending()});g(b,"notifyViewerRepaintDone",function(){null!=this.rm&&this.rm.repaintDone();this.am.repaintDone()});c(b,"areAxesTainted",
function(){var a=this.axesAreTainted;this.axesAreTainted=!1;return a});g(b,"generateOutputForExport",function(a){return this.noGraphicsAllowed||null==this.rm?null:this.getOutputManager().getOutputFromExport(a)},"java.util.Map");c(b,"clearRepaintManager",function(a){null!=this.rm&&this.rm.clear(a)},"~N");c(b,"renderScreenImage",function(a,b,c){this.renderScreenImageStereo(a,!1,b,c)},"~O,~N,~N");c(b,"renderScreenImageStereo",function(a,b,c,e){this.updateWindow(c,e)&&(!b||null==this.gRight?this.getScreenImageBuffer(a,
!1):(this.drawImage(this.gRight,this.getImage(!0,!1),0,0,this.tm.stereoDoubleDTI),this.drawImage(a,this.getImage(!1,!1),0,0,this.tm.stereoDoubleDTI)));this.isCapturing()&&this.doCapture();this.notifyViewerRepaintDone()},"~O,~B,~N,~N");c(b,"isCapturing",function(){return null!=this.captureParams&&Boolean.FALSE!==this.captureParams.get("captureEnabled")});c(b,"doCapture",function(){this.captureParams.remove("imagePixels");var a=this.captureParams.get("endTime").longValue();0<a&&System.currentTimeMillis()+
50>a&&this.captureParams.put("captureMode","end");this.processWriteOrCapture(this.captureParams)});c(b,"updateJS",function(){this.isWebGL?(null==this.jsParams&&(this.jsParams=new java.util.Hashtable,this.jsParams.put("type","JS")),this.updateWindow(0,0)&&this.render(),this.notifyViewerRepaintDone()):this.isStereoSlave||this.renderScreenImageStereo(this.apiPlatform.getGraphics(null),!0,0,0)});c(b,"updateJSView",function(a,b){if(null!=this.html5Applet){var c=this.html5Applet,e=!0;(e=null!=c&&null!=
c._viewSet)&&this.html5Applet._atomPickedCallback(a,b)}},"~N,~N");g(b,"evalFile",function(a){return this.evalFileArgs(a,null)},"~S");g(b,"evalFileArgs",function(a,b){return this.allowScripting&&null!=this.getScriptManager()?this.scm.evalFileArgs(a,b):null},"~S,~S");c(b,"getInsertedCommand",function(){var a=this.insertedCommand;this.insertedCommand="";JU.Logger.debugging&&""!==a&&JU.Logger.debug("inserting: "+a);return a});g(b,"script",function(a){return this.evalStringQuietSync(a,!1,!0)},"~S");g(b,
"evalString",function(a){return this.evalStringQuietSync(a,!1,!0)},"~S");g(b,"evalStringQuiet",function(a){return this.evalStringQuietSync(a,!0,!0)},"~S");c(b,"evalStringQuietSync",function(a,b,c){return null==this.getScriptManager()?null:this.scm.evalStringQuietSync(a,b,c)},"~S,~B,~B");c(b,"clearScriptQueue",function(){null!=this.scm&&this.scm.clearQueue()});c(b,"setScriptQueue",function(a){(this.g.useScriptQueue=a)||this.clearScriptQueue()},"~B");g(b,"checkHalt",function(a,b){return null!=this.scm&&
this.scm.checkHalt(a,b)},"~S,~B");g(b,"scriptWait",function(a){return this.evalWait("JSON",a,"+scriptStarted,+scriptStatus,+scriptEcho,+scriptTerminated")},"~S");g(b,"scriptWaitStatus",function(a,b){return this.evalWait("object",a,b)},"~S,~S");c(b,"evalWait",function(a,b,c){if(null==this.getScriptManager())return null;this.scm.waitForQueue();var e=J.i18n.GT.setDoTranslate(!1);a=this.evalStringWaitStatusQueued(a,b,c,!1,!1);J.i18n.GT.setDoTranslate(e);return a},"~S,~S,~S");c(b,"exitJmol",function(){if(!this.isApplet||
this.isJNLP){if(null!=this.headlessImageParams)try{this.headless&&this.outputToFile(this.headlessImageParams)}catch(a){if(!D(a,Exception))throw a;}JU.Logger.debugging&&JU.Logger.debug("exitJmol -- exiting");System.out.flush();System.exit(0)}});c(b,"scriptCheckRet",function(a,b){return null==this.getScriptManager()?null:this.scm.scriptCheckRet(a,b)},"~S,~B");g(b,"scriptCheck",function(a){return this.scriptCheckRet(a,!1)},"~S");g(b,"isScriptExecuting",function(){return null!=this.eval&&this.eval.isExecuting()});
g(b,"haltScriptExecution",function(){null!=this.eval&&(this.eval.haltExecution(),this.eval.stopScriptThreads());this.setStringPropertyTok("pathForAllFiles",545259572,"");this.clearTimeouts()});c(b,"pauseScriptExecution",function(){null!=this.eval&&this.eval.pauseExecution(!0)});c(b,"resolveDatabaseFormat",function(a){return JV.Viewer.hasDatabasePrefix(a)||0<=a.indexOf("cactus.nci.nih.gov/chemical/structure")?this.setLoadFormat(!1,a,a.charAt(0),!1):a},"~S");b.hasDatabasePrefix=c(b,"hasDatabasePrefix",
function(a){return 0!=a.length&&JV.Viewer.isDatabaseCode(a.charAt(0))},"~S");b.isDatabaseCode=c(b,"isDatabaseCode",function(a){return"*"==a||"$"==a||"="==a||":"==a},"~S");c(b,"setLoadFormat",function(a,b,c,e){var f=null,j=b.substring(1);switch(c.charCodeAt(0)){case 99:return b;case 104:return this.g.checkCIR&&this.checkCIR(!1),this.g.nihResolverFormat+b.substring(b.indexOf("/structure")+10);case 61:if(b.startsWith("==")){if(j=j.substring(1),j.equals("?")&&null==(j=this.getDBID("chemical component from RCSB")))return null}else{if(j.equals("?")&&
null==(j=this.getDBID("PDB ID from RCSB")))return null;if(0<j.indexOf("/"))try{var g=j.indexOf("/"),l=j.substring(0,g),j=j.substring(g+1);l.equalsIgnoreCase("aflowlib")&&(c=1,g=j.indexOf("."),0<=g&&(c=JU.PT.parseInt(j.substring(g+1)),j=j.substring(0,g)),0>j.indexOf("_")&&(j=this.getSymTemp().getSpaceGroupJSON("AFLOWLIB",j,c)));j=JV.JC.resolveDataBase(l,j,null);null!=j&&j.startsWith("'")&&(j=this.evaluateExpression(j).toString());return null==j||0==j.length?b:j}catch(s){if(D(s,Exception))return b;
throw s;}if(!a&&j.endsWith(".bcif"))return j=j.substring(0,j.indexOf(".bcif")),JV.JC.resolveDataBase("bcif",j.toLowerCase(),null);if(j.endsWith(".mmtf"))return j=j.substring(0,j.indexOf(".mmtf")),JV.JC.resolveDataBase("mmtf",j.toUpperCase(),null);f=this.g.loadFormat}case 35:return null==f&&(f=this.g.pdbLoadLigandFormat),JV.JC.resolveDataBase(null,j,f);case 42:if(j.equals("?")&&null==(j=this.getDBID("PDB ID from EBI")))return null;g=b.lastIndexOf("/");if(b.startsWith("*dom/"))return j=b.substring(g+
1),f=4<g?b.substring(5):"mappings",JU.PT.rep(JV.JC.resolveDataBase("map",j,null),"%TYPE",f);if(b.startsWith("*val/"))return j=b.substring(g+1),f=4<g?b.substring(5):"validation/outliers/all",JU.PT.rep(JV.JC.resolveDataBase("map",j,null),"%TYPE",f);if(b.startsWith("*rna3d/"))return j=b.substring(g+1),f=6<g?b.substring(6):"loops",JU.PT.rep(JV.JC.resolveDataBase("rna3d",j,null),"%TYPE",f);if(b.startsWith("*dssr--"))return j=b.substring(g+1),j=JV.JC.resolveDataBase("dssr",j,null),j+"%20"+JU.PT.rep(b.substring(5,
g)," ","%20");if(b.startsWith("*dssr/"))return j=b.substring(g+1),JV.JC.resolveDataBase("dssr",j,null);if(b.startsWith("*dssr1/"))return j=b.substring(g+1),JV.JC.resolveDataBase("dssr1",j,null);c="pdbe";5==j.length&&"*"==j.charAt(4)&&(c="pdbe2",j=j.substring(0,4));return JV.JC.resolveDataBase(c,j,null);case 58:f=this.g.pubChemFormat;if(j.equals("?")&&null==(j=this.getDBID("structure from PubChem")))return null;if(""===j)try{j="smiles:"+this.getOpenSmiles(this.bsA())}catch(m){if(!D(m,Exception))throw m;
}c=j.toLowerCase();g=-2147483648;try{g=Integer.parseInt(j)}catch(p){if(!D(p,Exception))throw p;}-2147483648!=g?j="cid/"+g:c.startsWith("smiles:")?(f+="?POST?smiles="+j.substring(7),j="smiles"):j.startsWith("inchi:")?(f+="?POST?inchi="+j.substring(6),j="inchi"):j.startsWith("cid:")||j.startsWith("inchikey:")||j.startsWith("cas:")?j=j.$replace(":","/"):(c.startsWith("name:")&&(j=j.substring(5)),j="name/"+JU.PT.escapeUrl(j));return JU.PT.formatStringS(f,"FILE",j);case 36:this.checkCIR(!1);if(j.equals("?")&&
null==(j=this.getDBID("structure from NCI/CADD")))return null;if(b.equals("$"))try{j=this.getOpenSmiles(this.bsA())}catch(n){if(!D(n,Exception))throw n;}else if(b.startsWith("$$")){j=j.substring(1);if(0==j.length)try{j=this.getOpenSmiles(this.bsA())}catch(q){if(!D(q,Exception))throw q;}f=JU.PT.rep(this.g.smilesUrlFormat,"get3d","get2d");return JU.PT.formatStringS(f,"FILE",JU.PT.escapeUrl(j))}case 77:case 78:case 50:case 73:case 75:case 83:case 84:case 47:j=JU.PT.escapeUrl(j);switch(c.charCodeAt(0)){case 77:case 78:f=
this.g.nihResolverFormat+"/%FILE/names";break;case 50:f=this.g.nihResolverFormat+"/%FILE/image";break;case 73:case 84:f=this.g.nihResolverFormat+"/%FILE/file?format=stdinchi";break;case 75:case 83:f=this.g.nihResolverFormat+"/%FILE/stdinchikey";break;case 47:f=this.g.nihResolverFormat+"/%FILE/";break;default:f=this.g.smilesUrlFormat}return(e?"MOL3D::":"")+JU.PT.formatStringS(f,"FILE",j);case 63:case 45:case 95:(f=j.startsWith("*")||j.startsWith("="))&&(j=j.substring(1));b=null;g=j.indexOf(".");0<=
g&&(b=j.substring(g+1),j=j.substring(0,g));(l=j.startsWith("density"))&&(j="em"+j.substring(7));if(j.equals("emdb")||j.equals("em"))j+="/";j.startsWith("em/")&&(j="emdb"+j.substring(2));if(j.startsWith("emdb/")){j=j.substring(5);0==j.length?j="=":j.startsWith("*")&&(j="="+j.substring(1));a="#-sigma=10";if(j.startsWith("=")){j=j.equals("=")?this.getPdbID():j.substring(1);if(null==j||"?"==c)break;g=JV.JC.resolveDataBase("emdbquery",j,null);e=this.fm.cacheGet(g,!1);if(null==e){this.showString("retrieving "+
g,!1);e=this.getFileAsString(g);if(null==e){this.showString("EM retrieve failed for "+j,!1);if(!l)return null;e="FAILED"}else this.showString(e,!1);this.fm.cachePut(g,e)}g=e.indexOf("EMD-");if(0<=g)j=e.substring(g+4),g=j.indexOf("\n"),0<g&&(j=j.substring(0,g)),g=j.indexOf(","),0<g&&(a="#-cutoff="+j.substring(g+1),j=j.substring(0,g));else{if(!l)return null;a=null}}if(null!=a)return JV.JC.resolveDataBase("emdbmap"+("-"==c?"server":""),j,null)+a}j=JV.JC.resolveDataBase((f?"pdbemapdiff":"pdbemap")+("-"==
c?"server":""),j,null);"cif".equals(b)&&(j=j.$replace("bcif","cif"))}return j},"~B,~S,~S,~B");c(b,"getDBID",function(a){return this.prompt("load a "+a,"",null,!1)},"~S");c(b,"checkCIR",function(a){if(!(this.cirChecked&&!a||null==this.g.resolverResolver)){try{this.g.removeParam("_cirStatus");var b=this.getModelSetAuxiliaryInfo();b.remove("cirInfo");var c=this.getFileAsString(this.g.resolverResolver);System.out.println(c);var e=this.parseJSONMap(c);b.put("cirInfo",e);this.ms.msInfo=b;c=e.get("status");
this.g.setO("_cirStatus",c);this.g.setCIR(e.get("rfc6570Template"),!this.isSilent);this.isSilent||JU.Logger.info("Viewer.checkCIR _.cirInfo.status = "+c)}catch(f){System.out.println("Viewer.checkCIR failed at "+this.g.resolverResolver+": "+f)}this.cirChecked=!0}},"~B");c(b,"getStandardLabelFormat",function(a){switch(a){default:case 0:return"%[identify]";case 1:return this.g.defaultLabelXYZ;case 2:return this.g.defaultLabelPDB}},"~N");c(b,"getAdditionalHydrogens",function(a,b,c){null==a&&(a=this.bsA());
var e=E(1,0);a=this.ms.calculateHydrogens(a,e,b,c);e=Array(e[0]);for(c=b=0;b<a.length;b++)if(null!=a[b])for(var f=0;f<a[b].length;f++)e[c++]=a[b][f];return e},"JU.BS,JU.Lst,~N");g(b,"setMarBond",function(a){this.g.bondRadiusMilliAngstroms=a;this.g.setI("bondRadiusMilliAngstroms",a);this.setShapeSize(1,2*a,JU.BSUtil.setAll(this.ms.ac))},"~N");c(b,"setHoverLabel",function(a){this.shm.loadShape(35);this.setShapeProperty(35,"label",a);this.setHoverEnabled(null!=a);this.g.setO("_hoverLabel",this.hoverLabel=
a);!this.hoverEnabled&&!this.sm.haveHoverCallback()&&this.startHoverWatcher(!1)},"~S");c(b,"setHoverEnabled",function(a){this.hoverEnabled=a;this.g.setB("_hoverEnabled",a)},"~B");c(b,"hoverOn",function(a,b){this.g.removeParam("_objecthovered");this.g.setI("_atomhovered",a);this.g.setO("_hoverLabel",this.hoverLabel);this.g.setUserVariable("hovered",JS.SV.getVariable(JU.BSUtil.newAndSetBit(a)));this.sm.haveHoverCallback()&&this.sm.setStatusAtomHovered(a,this.getAtomInfoXYZ(a,2));if(this.hoverEnabled&&
!(null!=this.eval&&this.isScriptExecuting()||a==this.hoverAtomIndex||0==this.g.hoverDelayMs||!this.slm.isInSelectionSubset(a))){var c=b?J.i18n.GT.$("Drag to move label"):this.isModelKitOpen()||this.isModelkitPickingActive()?this.getModelkit(!1).setProperty("hoverlabel",Integer.$valueOf(a)):null;this.shm.loadShape(35);null!=c&&(!b||this.ms.at[a].isVisible(512))&&this.setShapeProperty(35,"specialLabel",c);this.setShapeProperty(35,"text",this.hoverText=null);this.setShapeProperty(35,"target",Integer.$valueOf(this.hoverAtomIndex=
a));this.refresh(3,"hover on atom")}},"~N,~B");c(b,"isModelkitPickingActive",function(){if(null==this.acm)return!1;if(32==this.acm.getAtomPickingMode())return!0;switch(this.acm.getBondPickingMode()){case 34:case 33:case 8:case 35:return this.g.bondPicking}return!1});c(b,"isModelkitPickingRotateBond",function(){return 34==this.acm.getBondPickingMode()});c(b,"hoverOnPt",function(a,b,c,e,f){null!=this.eval&&this.isScriptExecuting()||(this.g.setO("_hoverLabel",c),null!=e&&null!=f&&(this.g.setO("_objecthovered",
e),this.g.setI("_atomhovered",-1),this.g.setUserVariable("hovered",JS.SV.getVariable(f)),this.sm.haveHoverCallback()&&this.sm.setStatusObjectHovered(e,c,f)),this.hoverEnabled&&(this.shm.loadShape(35),this.gdata.antialiasEnabled&&(a<<=1,b<<=1),this.setShapeProperty(35,"xy",JU.P3i.new3(a,b,0)),this.setShapeProperty(35,"target",null),this.setShapeProperty(35,"specialLabel",null),this.setShapeProperty(35,"text",c),this.hoverAtomIndex=-1,this.hoverText=c,this.refresh(3,"hover on point")))},"~N,~N,~S,~S,JU.T3");
c(b,"hoverOff",function(){try{if((this.isModelKitOpen()||null!=this.modelkit&&this.modelkit.wasRotating())&&!this.isModelkitPickingRotateBond()&&this.highlight(null),this.hoverEnabled){var a=null!=this.hoverText||0<=this.hoverAtomIndex;0<=this.hoverAtomIndex&&(this.setShapeProperty(35,"target",null),this.hoverAtomIndex=-1);null!=this.hoverText&&(this.setShapeProperty(35,"text",null),this.hoverText=null);this.setShapeProperty(35,"specialLabel",null);a&&this.refresh(3,"hover off")}}catch(b){if(!D(b,
Exception))throw b;}});g(b,"setDebugScript",function(a){this.g.debugScript=a;this.g.setB("debugScript",a);null!=this.eval&&this.eval.setDebugging()},"~B");c(b,"clearClickCount",function(){this.setTainted(!0)});c(b,"setCursor",function(a){if(!this.$isKiosk&&!(this.currentCursor==a||this.multiTouch||!this.haveDisplay))this.apiPlatform.setCursor(this.currentCursor=a,this.display)},"~N");c(b,"setPickingMode",function(a,b){if(this.haveDisplay){var c=this.acm.getAtomPickingMode();this.showSelected=!1;var e=
null;if(null!=a){var f=a.indexOf("_");0<=f&&(e=a.substring(f+1),a=a.substring(0,f));b=JV.ActionManager.getPickingMode(a)}0>b&&(b=1);this.acm.setPickingMode(b);f=JV.ActionManager.getPickingModeName(this.acm.getAtomPickingMode());this.g.setO("picking",f);if(null!=this.modelkit)switch(this.modelkit.setProperty("atompickingmode",f),this.acm.setPickingMode(b),b){case 1:b!=c&&this.setModelKitMode(!1);break;case 8:case 35:this.modelkit.setProperty("bondpickingmode",a.toLowerCase())}if(!(null==e||0==e.length))switch(e=
Character.toUpperCase(e.charAt(0))+(1==e.length?"":e.substring(1,2)),b){case 32:this.getModelkit(!1).setProperty("atomtype",e);break;case 33:this.setBooleanPropertyTok("bondPicking",603979814,!0);this.getModelkit(!1).setProperty("bondtype",e);break;default:JU.Logger.error("Bad picking mode: "+a+"_"+e)}}},"~S,~N");c(b,"getPickingMode",function(){return this.haveDisplay?this.acm.getAtomPickingMode():0});c(b,"setPickingStyle",function(a,b){this.haveDisplay&&(null!=a&&(b=JV.ActionManager.getPickingStyleIndex(a)),
0>b&&(b=0),this.acm.setPickingStyle(b),this.g.setO("pickingStyle",JV.ActionManager.getPickingStyleName(this.acm.getPickingStyle())))},"~S,~N");c(b,"getDrawHover",function(){return this.haveDisplay&&this.g.drawHover});c(b,"getAtomInfo",function(a){null==this.ptTemp&&(this.ptTemp=new JU.P3);return 0<=a?this.ms.getAtomInfo(a,null,this.ptTemp):this.shm.getShapePropertyIndex(6,"pointInfo",-a)},"~N");c(b,"getAtomInfoXYZ",function(a,b){var c=this.ms.at[a];if(4==b)return this.getChimeMessenger().getInfoXYZ(c);
null==this.ptTemp&&(this.ptTemp=new JU.P3);return c.getIdentityXYZ(this.ptTemp,b)},"~N,~N");c(b,"setSync",function(){this.sm.doSync()&&this.sm.setSync(null)});g(b,"setJmolCallbackListener",function(a){this.sm.cbl=a},"J.api.JmolCallbackListener");g(b,"setJmolStatusListener",function(a){this.sm.cbl=this.sm.jsl=a},"J.api.JmolStatusListener");c(b,"getStatusChanged",function(a){return null==a?null:this.sm.getStatusChanged(a)},"~S");c(b,"menuEnabled",function(){return!this.g.disablePopupMenu&&null!=this.getPopupMenu()});
c(b,"setStatusDragDropped",function(a,b,c,e,f){0==a&&(this.g.setO("_fileDropped",e),this.g.setUserVariable("doDrop",JS.SV.vT),this.g.setUserVariable("dropFileType",JS.SV.newS("")),this.g.setUserVariable("dropFileName",JS.SV.newS(e)));a=this.sm.setStatusDragDropped(a,b,c,e,f);b=this.getP("dropFileType").toString();0<b.length&&null!=f&&(f[0]=b);return!a||this.getP("doDrop").toString().equals("true")},"~N,~N,~N,~S,~A");c(b,"setStatusResized",function(a,b){this.sm.setStatusResized(a,b)},"~N,~N");c(b,
"scriptStatus",function(a){this.setScriptStatus(a,"",0,null)},"~S");c(b,"scriptStatusMsg",function(a,b){this.setScriptStatus(a,b,0,null)},"~S,~S");c(b,"setScriptStatus",function(a,b,c,e){this.sm.setScriptStatus(a,b,c,e)},"~S,~S,~N,~S");g(b,"showUrl",function(a){if(null!=a){if(0>a.indexOf(":")){var b=this.fm.getAppletDocumentBase();""===b&&(b=this.fm.getFullPathName(!1));0<=b.indexOf("/")?b=b.substring(0,b.lastIndexOf("/")+1):0<=b.indexOf("\\")&&(b=b.substring(0,b.lastIndexOf("\\")+1));a=b+a}JU.Logger.info("showUrl:"+
a);this.sm.showUrl(a)}},"~S");c(b,"setMeshCreator",function(a){this.shm.loadShape(24);this.setShapeProperty(24,"meshCreator",a)},"~O");c(b,"showConsole",function(a){if(this.haveDisplay)try{null==this.appConsole&&a&&this.getConsole(),this.appConsole.setVisible(!0)}catch(b){}},"~B");c(b,"getConsole",function(){this.getProperty("DATA_API","getAppConsole",Boolean.TRUE);return this.appConsole});g(b,"getParameter",function(a){return this.getP(a)},"~S");c(b,"getP",function(a){return this.g.getParameter(a,
!0)},"~S");c(b,"getPOrNull",function(a){return this.g.getParameter(a,!1)},"~S");c(b,"unsetProperty",function(a){a=a.toLowerCase();(a.equals("all")||a.equals("variables"))&&this.fm.setPathForAllFiles("");this.g.unsetUserVariable(a)},"~S");g(b,"notifyStatusReady",function(a){System.out.println("Jmol applet "+this.fullName+(a?" ready":" destroyed"));a||this.dispose();this.sm.setStatusAppletReady(this.fullName,a)},"~B");g(b,"getBooleanProperty",function(a){a=a.toLowerCase();if(this.g.htBooleanParameterFlags.containsKey(a))return this.g.htBooleanParameterFlags.get(a).booleanValue();
if(a.endsWith("p!")){if(null==this.acm)return!1;var b=this.acm.getPickingState().toLowerCase();a=a.substring(0,a.length-2)+";";return 0<=b.indexOf(a)}if(a.equalsIgnoreCase("executionPaused"))return null!=this.eval&&this.eval.isPaused();if(a.equalsIgnoreCase("executionStepping"))return null!=this.eval&&this.eval.isStepping();if(a.equalsIgnoreCase("haveBFactors"))return null!=this.ms.getBFactors();if(a.equalsIgnoreCase("colorRasmol"))return this.cm.isDefaultColorRasmol;if(a.equalsIgnoreCase("frank"))return this.getShowFrank();
if(a.equalsIgnoreCase("spinOn"))return this.tm.spinOn;if(a.equalsIgnoreCase("isNavigating"))return this.tm.isNavigating();if(a.equalsIgnoreCase("showSelections"))return this.selectionHalosEnabled;if(this.g.htUserVariables.containsKey(a)){b=this.g.getUserVariable(a);if(1073742335==b.tok)return!0;if(1073742334==b.tok)return!1}JU.Logger.error("vwr.getBooleanProperty("+a+") - unrecognized");return!1},"~S");g(b,"getInt",function(a){switch(a){case 553648132:return this.am.animationFps;case 553648139:return this.g.dotDensity;
case 553648140:return this.g.dotScale;case 553648142:return this.g.helixStep;case 553648145:return this.g.infoFontSize;case 553648147:return this.g.labelPointerWidth;case 553648149:return this.g.meshScale;case 553648150:return this.g.minimizationReportSteps;case 553648153:return this.g.minPixelSelRadius;case 553648154:return this.g.percentVdwAtom;case 553648157:return this.g.pickingSpinRate;case 553648166:return this.g.ribbonAspectRatio;case 536870922:return this.g.scriptDelay;case 553648152:return this.g.minimizationMaxAtoms;
case 553648170:return this.g.smallMoleculeMaxAtoms;case 553648183:return this.g.strutSpacing;case 553648184:return this.stm.getUndoMax();case 553648185:return this.g.vectorTrail}JU.Logger.error("viewer.getInt("+JS.T.nameOf(a)+") - not listed");return 0},"~N");c(b,"getDelayMaximumMs",function(){return this.haveDisplay?this.g.delayMaximumMs:1});c(b,"getHermiteLevel",function(){return this.tm.spinOn&&0<this.g.hermiteLevel?0:this.g.hermiteLevel});c(b,"getHoverDelay",function(){return this.isModelKitOpen()||
this.isModelkitPickingActive()||this.getDrawHover()?20:this.g.hoverDelayMs});g(b,"getBoolean",function(a){switch(a){case 603979970:return this.g.useMinimizationThread;case 603979891:return this.g.nboCharges;case 603979856:return this.g.hiddenLinesDashed;case 1073742086:return this.ms.getMSInfoB(JV.JC.getBoolName(4));case 603979802:return this.g.autoplayMovie;case 603979797:return!this.headless&&this.g.allowAudio;case 603979780:return this.g.allowGestures;case 603979784:return this.g.allowMultiTouch;
case 603979785:return this.g.allowRotateSelected;case 603979792:return this.g.appendNew;case 603979794:return this.g.applySymmetryToBonds;case 603979796:return this.g.atomPicking;case 603979798:return this.g.autoBond;case 603979800:return this.g.autoFps;case 603979806:return this.g.axesOrientationRasmol;case 603979811:return this.g.cartoonSteps;case 603979810:return this.g.cartoonBlocks;case 603979821:return this.g.checkCIR;case 603979812:return this.g.bondModeOr;case 603979815:return this.g.cartoonBaseEdges;
case 603979816:return this.g.cartoonFancy;case 603979817:return this.g.cartoonLadders;case 603979818:return this.g.cartoonRibose;case 603979819:return this.g.cartoonRockets;case 603979822:return this.g.chainCaseSensitive||this.chainCaseSpecified;case 603979823:return this.g.cipRule6Full;case 603979825:return this.g.debugScript;case 603979826:return this.g.defaultStructureDSSP;case 603979827:return this.g.disablePopupMenu;case 603979828:return this.g.displayCellParameters;case 603979830:return this.g.dotSurface;
case 603979829:return this.g.dotsSelectedOnly;case 603979831:return this.g.doublePrecision;case 603979834:return this.g.drawPicking;case 603979838:return this.g.elementKey;case 603979846:return this.g.fontCaching;case 603979847:return this.g.fontScaling;case 603979848:return this.g.forceAutoBond;case 603979849:return!1;case 603979850:return this.g.greyscaleRendering;case 603979852:return this.g.hbondsBackbone;case 603979853:return this.g.hbondsRasmol;case 603979854:return this.g.hbondsSolid;case 1612709894:return this.g.rasmolHeteroSetting;
case 603979858:return this.g.hideNameInPopup;case 603979863:return this.g.highResolutionFlag;case 1612709900:return this.g.rasmolHydrogenSetting;case 603979866:return this.g.isosurfaceKey;case 603979868:return this.g.jmolInJSpecView;case 603979869:return this.g.justifyMeasurements;case 603979872:return this.g.legacyAutoBonding;case 603979873:return this.g.legacyHAddition;case 603979874:return this.g.legacyJavaFloat;case 603979876:return this.g.logGestures;case 603979877:return this.g.measureAllModels;
case 603979878:return this.g.measurementLabels;case 603979879:return this.g.messageStyleChime;case 603979882:return this.g.mode2d;case 603983903:return this.g.modelKitMode;case 603979886:return this.g.multipleBondBananas;case 603979889:return this.g.navigationMode;case 603979890:return this.g.navigationPeriodic;case 603979893:return this.g.partialDots;case 603979894:return this.g.pdbAddHydrogens;case 603979896:return this.g.pdbSequential;case 603979898:return this.g.preserveState;case 603979900:return this.refreshing;
case 603979901:return this.g.ribbonBorder;case 603979902:return this.g.rocketBarrels;case 603979892:return this.g.noDelay;case 603979906:return this.g.selectAllModels;case 603979920:return this.g.showHiddenSelectionHalos;case 603979922:return this.g.showHydrogens;case 603979926:return this.g.showMeasurements;case 603979927:return this.g.showModVecs;case 603979928:return this.g.showMultipleBonds;case 603979934:return this.g.showTiming;case 603979937:return this.g.showUnitCellDetails;case 603979939:return this.g.slabByAtom;
case 603979940:return this.g.slabByMolecule;case 603979944:return this.g.smartAromatic;case 603979948:return this.g.dotSolvent;case 603979952:return this.g.ssbondsBackbone;case 603979955:return this.g.strutsMultiple;case 603979956:return this.g.symmetryHermannMauguin;case 603979960:return this.g.testFlag1;case 603979962:return this.g.testFlag2;case 603979964:return this.g.testFlag3;case 603979965:return this.g.testFlag4;case 603979966:return this.g.traceAlpha;case 1111490588:return this.g.translucent;
case 603979968:return this.g.twistedSheets;case 603979972:return this.g.vectorsCentered;case 603979973:return this.g.vectorSymmetry;case 603979975:return this.g.waitForMoveTo;case 603979978:return this.g.zeroBasedXyzRasmol}JU.Logger.error("viewer.getBoolean("+JS.T.nameOf(a)+") - not listed");return!1},"~N");c(b,"allowEmbeddedScripts",function(){return this.g.allowEmbeddedScripts&&!this.isPreviewOnly});c(b,"getDragSelected",function(){return this.g.dragSelected&&!this.g.modelKitMode});c(b,"getBondsPickable",
function(){return this.g.bondPicking||this.isModelkitPickingActive()||this.isModelKitOpen()&&this.getModelkitPropertySafely("ismolecular")===Boolean.TRUE});c(b,"isModelKitOpen",function(){return this.g.modelKitMode&&null!=this.modelkit&&!this.modelkit.isHidden()});c(b,"useMinimizationThread",function(){return this.g.useMinimizationThread&&!this.autoExit});g(b,"getFloat",function(a){switch(a){case 1153433601:return this.g.particleRadius;case 570425345:return this.g.axesOffset;case 570425346:return this.g.axesScale;
case 570425348:return this.g.bondTolerance;case 570425353:return this.g.defaultTranslucent;case 570425352:return this.g.defaultDrawArrowScale;case 570425354:return this.g.dipoleScale;case 570425355:return this.g.drawFontSize;case 570425357:return this.g.exportScale;case 570425359:return this.g.hbondsAngleMinimum;case 570425361:return this.g.hbondHXDistanceMaximum;case 570425360:return this.g.hbondNODistanceMaximum;case 570425363:return this.g.loadAtomDataTolerance;case 570425364:return this.g.minBondDistance;
case 1275072532:return this.g.modulationScale;case 570425370:return this.g.multipleBondSpacing;case 570425369:return this.g.multipleBondRadiusFactor;case 570425374:return this.g.navigationSpeed;case 570425382:return this.g.pointGroupDistanceTolerance;case 570425384:return this.g.pointGroupLinearTolerance;case 570425388:return this.tm.modelRadius;case 570425392:return this.g.sheetSmoothing;case 570425394:return this.g.solventProbeRadius;case 570425403:return this.g.starWidth;case 570425406:return this.g.strutDefaultRadius;
case 570425408:return this.g.strutLengthMaximum;case 1648361473:return this.g.vectorScale;case 570425412:return this.g.vibrationPeriod;case 570425347:return this.g.cartoonBlockHeight}JU.Logger.error("viewer.getFloat("+JS.T.nameOf(a)+") - not listed");return 0},"~N");g(b,"setStringProperty",function(a,b){if(!(null==b||null==a||0==a.length))if("_"==a.charAt(0))this.g.setO(a,b);else{var c=JS.T.getTokFromName(a);switch(JS.T.getParamType(c)){case 603979776:this.setBooleanPropertyTok(a,c,JS.SV.newV(4,b).asBoolean());
break;case 553648128:this.setIntPropertyTok(a,c,JS.SV.newV(4,b).asInt());break;case 570425344:this.setFloatPropertyTok(a,c,JU.PT.parseFloat(b));break;default:this.setStringPropertyTok(a,c,b)}}},"~S,~S");c(b,"setStringPropertyTok",function(a,b,c){switch(b){case 545259567:this.g.macroDirectory=c=null==c||0==c.length?"https://chemapps.stolaf.edu/jmol/macros":c;this.macros=null;break;case 545259570:this.g.nihResolverFormat=c;break;case 545259521:this.setAnimationMode(c);return;case 545259569:this.g.nmrPredictFormat=
c;break;case 545259548:this.g.defaultDropScript=c;break;case 545259572:c=this.fm.setPathForAllFiles(c);break;case 545259558:this.setUnits(c,!1);return;case 545259560:this.g.forceField.equals(c)||(this.g.forceField=c="UFF".equalsIgnoreCase(c)?"UFF":"UFF2D".equalsIgnoreCase(c)?"UFF2D":"MMFF2D".equalsIgnoreCase(c)?"MMFF2D":"MMFF",this.minimizer=null);break;case 545259571:this.g.nmrUrlFormat=c;break;case 545259568:this.setUnits(c,!0);return;case 545259565:this.g.pdbLoadLigandFormat=c;break;case 545259543:this.g.defaultLabelPDB=
c;break;case 545259544:this.g.defaultLabelXYZ=c;break;case 545259549:this.g.defaultLoadFilter=c;break;case 545259566:c=this.getOutputManager().setLogFile(c);if(null==c)return;break;case 545259559:break;case 545259524:this.g.atomTypes=c;break;case 545259538:break;case 545259576:this.g.pickLabel=c;break;case 545259580:this.g.quaternionFrame=2==c.length&&c.startsWith("R")?c.substring(0,2):""+(c.toLowerCase()+"p").charAt(0);JU.PT.isOneOf(this.g.quaternionFrame,"RC;RP;a;b;c;n;p;q;x;")||(this.g.quaternionFrame=
"p");this.ms.haveStraightness=!1;break;case 545259555:this.setVdwStr(c);return;case 545259563:new J.i18n.GT(this,c);b=J.i18n.GT.getLanguage();this.modelkit=null;null!=this.jmolpopup&&(this.jmolpopup.jpiDispose(),this.jmolpopup=null,this.getPopupMenu());this.sm.setCallbackFunction("language",b);c=J.i18n.GT.getLanguage();break;case 545259564:this.g.loadFormat=c;break;case 545259534:this.setObjectColor("background",c);return;case 545259528:this.setObjectColor("axis1",c);return;case 545259530:this.setObjectColor("axis2",
c);return;case 545259532:this.setObjectColor("axis3",c);return;case 545259536:this.setObjectColor("boundbox",c);return;case 545259586:this.setObjectColor("unitcell",c);return;case 545259578:this.setPropertyColorScheme(c,!1,!1);break;case 545259562:this.shm.loadShape(35);this.setShapeProperty(35,"atomLabel",c);break;case 545259547:this.g.defaultDistanceLabel=c;break;case 545259542:this.g.defaultAngleLabel=c;break;case 545259554:this.g.defaultTorsionLabel=c;break;case 545259550:this.g.defaultLoadScript=
c;break;case 545259522:this.fm.setAppletProxy(c);break;case 545259546:null==c&&(c="");c=c.$replace("\\","/");this.g.defaultDirectory=c;break;case 545259561:this.g.helpPath=c;break;case 545259552:!c.equalsIgnoreCase("RasMol")&&!c.equalsIgnoreCase("PyMOL")&&(c="Jmol");this.setDefaultsType(c);break;case 545259545:this.setDefaultColors(c.equalsIgnoreCase("rasmol"));return;case 545259573:this.setPickingMode(c,0);return;case 545259574:this.setPickingStyle(c,0);return;case 545259540:break;default:if(a.toLowerCase().endsWith("callback")){this.sm.setCallbackFunction(a,
0==c.length||c.equalsIgnoreCase("none")?null:c);break}if(!this.g.htNonbooleanParameterValues.containsKey(a.toLowerCase())){this.g.setUserVariable(a,JS.SV.newV(4,c));return}}this.g.setO(a,c)},"~S,~N,~S");g(b,"setFloatProperty",function(a,b){if(!(null==a||0==a.length))if("_"==a.charAt(0))this.g.setF(a,b);else{var c=JS.T.getTokFromName(a);switch(JS.T.getParamType(c)){case 545259520:this.setStringPropertyTok(a,c,""+b);break;case 603979776:this.setBooleanPropertyTok(a,c,0!=b);break;case 553648128:this.setIntPropertyTok(a,
c,F(b));break;case 570425344:if(Float.isNaN(b))break;default:this.setFloatPropertyTok(a,c,b)}}},"~S,~N");c(b,"setFloatPropertyTok",function(a,b,c){switch(b){case 570425347:this.g.cartoonBlockHeight=c;break;case 570425366:this.ms.setModulation(null,!1,null,!1);this.g.modulationScale=c=Math.max(0.1,c);this.ms.setModulation(null,!0,null,!1);break;case 570425381:this.g.particleRadius=Math.abs(c);break;case 570425355:this.g.drawFontSize=c;this.shm.setShapePropertyBs(22,"font",null,null);break;case 570425357:this.g.exportScale=
c;break;case 570425403:this.g.starWidth=c;break;case 570425369:this.g.multipleBondRadiusFactor=c;break;case 570425370:this.g.multipleBondSpacing=c;break;case 570425393:this.tm.setSlabRange(c);break;case 570425365:this.g.minimizationCriterion=c;break;case 570425358:this.haveDisplay&&this.acm.setGestureSwipeFactor(c);break;case 570425367:this.haveDisplay&&this.acm.setMouseDragFactor(c);break;case 570425368:this.haveDisplay&&this.acm.setMouseWheelFactor(c);break;case 570425408:this.g.strutLengthMaximum=
c;break;case 570425406:this.g.strutDefaultRadius=c;break;case 570425376:this.setSpin("X",F(c));break;case 570425378:this.setSpin("Y",F(c));break;case 570425380:this.setSpin("Z",F(c));break;case 570425371:if(Float.isNaN(c))return;this.setSpin("FPS",F(c));break;case 570425363:this.g.loadAtomDataTolerance=c;break;case 570425359:this.g.hbondsAngleMinimum=c;break;case 570425361:this.g.hbondHXDistanceMaximum=c;break;case 570425360:this.g.hbondNODistanceMaximum=c;break;case 570425382:this.g.pointGroupDistanceTolerance=
c;break;case 570425384:this.g.pointGroupLinearTolerance=c;break;case 570425356:this.g.ellipsoidAxisDiameter=c;break;case 570425398:this.setSpin("x",F(c));break;case 570425400:this.setSpin("y",F(c));break;case 570425402:this.setSpin("z",F(c));break;case 570425396:this.setSpin("fps",F(c));break;case 570425352:this.g.defaultDrawArrowScale=c;break;case 570425353:this.g.defaultTranslucent=c;break;case 570425345:this.setAxesScale(b,c);break;case 570425346:this.setAxesScale(b,c);break;case 570425416:this.tm.visualRangeAngstroms=
c;this.refresh(1,"set visualRange");break;case 570425372:this.setNavigationDepthPercent(c);break;case 570425374:this.g.navigationSpeed=c;break;case 570425373:this.tm.setNavigationSlabOffsetPercent(c);break;case 570425350:this.tm.setCameraDepthPercent(c,!1);this.refresh(1,"set cameraDepth");return;case 570425388:this.setRotationRadius(c,!0);return;case 570425362:this.g.hoverDelayMs=F(1E3*c);break;case 570425392:this.g.sheetSmoothing=c;break;case 570425354:c=JV.Viewer.checkFloatRange(c,-10,10);this.g.dipoleScale=
c;break;case 570425404:this.tm.setStereoDegrees(c);break;case 1648361473:this.setVectorScale(c);return;case 570425412:this.setVibrationPeriod(c);return;case 570425414:this.setVibrationScale(c);return;case 570425348:this.setBondTolerance(c);return;case 570425364:this.setMinBondDistance(c);return;case 570425390:this.tm.setScaleAngstromsPerInch(c);break;case 570425394:c=JV.Viewer.checkFloatRange(c,0,10);this.g.solventProbeRadius=c;break;default:if(!this.g.htNonbooleanParameterValues.containsKey(a.toLowerCase())){this.g.setUserVariable(a,
JS.SV.newF(c));return}}this.g.setF(a,c)},"~S,~N,~N");g(b,"setIntProperty",function(a,b){if(!(-2147483648==b||null==a||0==a.length))if("_"==a.charAt(0))this.g.setI(a,b);else{var c=JS.T.getTokFromName(a);switch(JS.T.getParamType(c)){case 545259520:this.setStringPropertyTok(a,c,""+b);break;case 603979776:this.setBooleanPropertyTok(a,c,0!=b);break;case 570425344:this.setFloatPropertyTok(a,c,b);break;default:this.setIntPropertyTok(a,c,b)}}},"~S,~N");c(b,"setIntPropertyTok",function(a,b,c){switch(b){case 553648150:this.g.minimizationReportSteps=
Math.min(Math.max(c,1),20);break;case 553648184:this.stm.setUndoMax(c);break;case 553648147:this.g.labelPointerWidth=c;break;case 553648152:this.g.minimizationMaxAtoms=c;break;case 553648145:this.g.infoFontSize=Math.max(0,c);break;case 553648167:case 553648144:case 553648168:c=this.eval.setStatic(b,c);break;case 553648185:this.g.vectorTrail=c;break;case 553648136:c=0==c?0:1;this.g.bondingVersion=JU.Elements.bondingVersion=c;break;case 553648135:this.gdata.setCelPower(c);break;case 553648129:this.gdata.setAmbientOcclusion(c);
break;case 553648158:this.g.platformSpeed=Math.min(Math.max(c,0),10);break;case 553648149:this.g.meshScale=c;break;case 553648153:this.g.minPixelSelRadius=c;break;case 553648146:this.g.isosurfacePropertySmoothingPower=c;break;case 553648165:this.g.repaintWaitMs=c;break;case 553648170:this.g.smallMoleculeMaxAtoms=c;break;case 553648151:this.g.minimizationSteps=c;break;case 553648183:this.g.strutSpacing=c;break;case 553648156:c=JV.Viewer.checkIntRange(c,0,1E3);this.gdata.setPhongExponent(c);break;case 553648142:this.g.helixStep=
c;this.ms.haveStraightness=!1;break;case 553648140:this.g.dotScale=c;break;case 553648139:this.g.dotDensity=c;break;case 553648137:this.g.delayMaximumMs=c;break;case 553648148:JU.Logger.setLogLevel(c);JU.Logger.info("logging level set to "+c);this.g.setI("logLevel",c);null!=this.eval&&this.eval.setDebugging();return;case 553648133:this.setAxesMode(2==c?603979808:1==c?603979804:603979809);return;case 553648178:this.setStrandCount(0,c);return;case 553648182:this.setStrandCount(12,c);return;case 553648180:this.setStrandCount(13,
c);return;case 553648155:return;case 536870922:this.g.scriptDelay=c;break;case 553648176:c=0>c?JV.Viewer.checkIntRange(c,-10,-1):JV.Viewer.checkIntRange(c,0,100);this.gdata.setSpecularPower(c);break;case 553648172:c=JV.Viewer.checkIntRange(-c,-10,-1);this.gdata.setSpecularPower(c);break;case 553648134:this.setMarBond(c);return;case 536870924:this.setBooleanPropertyTok(a,b,1==c);return;case 553648174:c=JV.Viewer.checkIntRange(c,0,100);this.gdata.setSpecularPercent(c);break;case 553648138:c=JV.Viewer.checkIntRange(c,
0,100);this.gdata.setDiffusePercent(c);break;case 553648130:c=JV.Viewer.checkIntRange(c,0,100);this.gdata.setAmbientPercent(c);break;case 553648186:this.tm.zDepthToPercent(c);break;case 553648188:this.tm.zSlabToPercent(c);break;case 554176526:this.tm.depthToPercent(c);break;case 554176565:this.tm.slabToPercent(c);break;case 553648190:this.g.zShadePower=c=Math.max(c,0);break;case 553648166:this.g.ribbonAspectRatio=c;break;case 553648157:this.g.pickingSpinRate=1>c?1:c;break;case 553648132:this.setAnimationFps(c);
return;case 553648154:this.setPercentVdwAtom(c);break;case 553648143:this.g.hermiteLevel=c;break;case 553648141:case 553648161:case 553648160:case 553648162:case 553648164:break;default:if(!this.g.htNonbooleanParameterValues.containsKey(a)){this.g.setUserVariable(a,JS.SV.newI(c));return}}this.g.setI(a,c)},"~S,~N,~N");b.checkIntRange=c(b,"checkIntRange",function(a,b,c){return a<b?b:a>c?c:a},"~N,~N,~N");b.checkFloatRange=c(b,"checkFloatRange",function(a,b,c){return a<b?b:a>c?c:a},"~N,~N,~N");g(b,"setBooleanProperty",
function(a,b){if(!(null==a||0==a.length))if("_"==a.charAt(0))this.g.setB(a,b);else{var c=JS.T.getTokFromName(a);switch(JS.T.getParamType(c)){case 545259520:this.setStringPropertyTok(a,c,"");break;case 553648128:this.setIntPropertyTok(a,c,b?1:0);break;case 570425344:this.setFloatPropertyTok(a,c,b?1:0);break;default:this.setBooleanPropertyTok(a,c,b)}}},"~S,~B");c(b,"setBooleanPropertyTok",function(a,b,c){var e=!0;switch(b){case 603979882:this.g.mode2d=c;break;case 603979870:if(this.g.labelKey=c)this.g.elementKey=
!1;this.getModelkit(!1).setProperty("setlabelkey",Boolean.$valueOf(c));break;case 603979838:if(this.g.elementKey=c)this.g.labelKey=!1;this.getModelkit(!1).setProperty("setelementkey",Boolean.$valueOf(c));break;case 603979956:this.g.symmetryHermannMauguin=c;break;case 603979831:c=(new Boolean(c&JV.Viewer.isJS)).valueOf();this.g.doublePrecision=c;JV.Viewer.isHighPrecision=this.g.doublePrecision;this.setBooleanPropertyTok("legacyJavaFloat",603979874,c);break;case 603979821:(this.g.checkCIR=c)&&this.checkCIR(!0);
break;case 603979823:this.g.cipRule6Full=c;break;case 603979802:this.g.autoplayMovie=c;break;case 603979797:c=!1;this.g.allowAudio=c;break;case 603979892:this.g.noDelay=c;break;case 603979891:this.g.nboCharges=c;break;case 603979856:this.g.hiddenLinesDashed=c;break;case 603979886:this.g.multipleBondBananas=c;break;case 603979884:this.g.modulateOccupancy=c;break;case 603979874:if(c||!this.g.doublePrecision)this.g.legacyJavaFloat=c;c=this.g.legacyJavaFloat;break;case 603979927:this.g.showModVecs=c;
break;case 603979937:this.g.showUnitCellDetails=c;break;case 603979849:e=!1;break;case 603979972:this.g.vectorsCentered=c;break;case 603979810:this.g.cartoonBlocks=c;break;case 603979811:this.g.cartoonSteps=c;break;case 603979818:this.g.cartoonRibose=c;break;case 603979840:this.g.ellipsoidArrows=c;break;case 1111490588:this.g.translucent=c;break;case 603979817:this.g.cartoonLadders=c;break;case 603979968:b=this.g.twistedSheets;this.g.twistedSheets=c;b!=c&&this.checkCoordinatesChanged(null);break;
case 603979820:this.gdata.setCel(c);break;case 603979816:this.g.cartoonFancy=c;break;case 603979934:this.g.showTiming=c;break;case 603979973:this.g.vectorSymmetry=c;break;case 603979866:this.g.isosurfaceKey=c;break;case 603979893:this.g.partialDots=c;break;case 603979872:this.g.legacyAutoBonding=c;break;case 603979826:this.g.defaultStructureDSSP=c;break;case 603979835:this.g.dsspCalcHydrogen=c;break;case 603979782:(this.g.allowModelkit=c)||this.setModelKitMode(!1);break;case 603983903:this.setModelKitMode(c);
break;case 603979887:this.g.multiProcessor=c&&1<JV.Viewer.nProcessors;break;case 603979885:this.g.monitorEnergy=c;break;case 603979853:this.g.hbondsRasmol=c;break;case 603979880:this.g.minimizationRefresh=c;break;case 603979881:this.g.minimizationSilent=c;break;case 603979865:c&&(this.$isKiosk=!0,this.g.disablePopupMenu=!0,null!=this.display&&this.apiPlatform.setTransparentCursor(this.display));break;case 603979975:this.g.waitForMoveTo=c;break;case 603979875:this.g.logCommands=!0;break;case 603979876:this.g.logGestures=
!0;break;case 603979784:this.g.allowMultiTouch=c;break;case 603979898:this.g.preserveState=c;this.ms.setPreserveState(c);this.undoMoveAction(4165,-2);break;case 603979955:this.g.strutsMultiple=c;break;case 603979845:break;case 603979939:this.g.slabByAtom=c;break;case 603979940:this.g.slabByMolecule=c;break;case 603979903:this.g.saveProteinStructureState=c;break;case 603979780:this.g.allowGestures=c;break;case 603979864:this.g.imageState=c;break;case 603979970:this.g.useMinimizationThread=c;break;
case 603979781:this.g.allowKeyStrokes=c;break;case 603979832:this.g.dragSelected=c;this.showSelected=!1;break;case 603979924:this.g.showKeyStrokes=c;break;case 603979846:this.g.fontCaching=c;break;case 603979796:this.g.atomPicking=c;break;case 603979814:this.highlight(null);this.g.bondPicking=c;break;case 603979906:(this.g.selectAllModels=c)?this.slm.setSelectionSubset(null):this.am.setSelectAllSubset(!1);break;case 603979879:this.g.messageStyleChime=c;break;case 603979896:this.g.pdbSequential=c;
break;case 603979894:this.g.pdbAddHydrogens=c;break;case 603979895:this.g.pdbGetHeader=c;break;case 603979841:this.g.ellipsoidAxes=c;break;case 603979839:this.g.ellipsoidArcs=c;break;case 603979842:this.g.ellipsoidBall=c;break;case 603979843:this.g.ellipsoidDots=c;break;case 603979844:this.g.ellipsoidFill=c;break;case 603979847:this.g.fontScaling=c;break;case 603979957:this.setSyncTarget(0,c);break;case 603979958:this.setSyncTarget(1,c);break;case 603979977:this.g.wireframeRotation=c;break;case 603979867:this.g.isosurfacePropertySmoothing=
c;break;case 603979834:this.g.drawPicking=c;break;case 603979786:case 603979790:case 603979788:this.setAntialias(b,c);break;case 603979944:this.g.smartAromatic=c;break;case 603979794:this.setApplySymmetryToBonds(c);break;case 603979792:this.g.appendNew=c;break;case 603979800:this.g.autoFps=c;break;case 603979971:JU.DF.setUseNumberLocalization(this.g.useNumberLocalization=c);break;case 603979918:case 1611272202:a="showFrank";this.setFrankOn(c);break;case 1612709912:a="solventProbe";this.g.dotSolvent=
c;break;case 603979948:this.g.dotSolvent=c;break;case 603979785:this.g.allowRotateSelected=c;break;case 603979783:this.g.allowMoveAtoms=c;this.showSelected=!1;break;case 536870922:this.setIntPropertyTok("showScript",b,c?1:0);return;case 603979778:this.g.allowEmbeddedScripts=c;break;case 603979890:this.g.navigationPeriodic=c;break;case 603979984:this.tm.setZShadeEnabled(c);return;case 603979833:this.haveDisplay&&(this.g.drawHover=c);break;case 603979889:this.setNavigationMode(c);break;case 603979888:return;
case 603979860:this.g.hideNavigationPoint=c;break;case 603979930:this.g.showNavigationPointAlways=c;break;case 603979900:this.setRefreshing(c);break;case 603979868:this.g.jmolInJSpecView=c;break;case 603979869:this.g.justifyMeasurements=c;break;case 603979952:this.g.ssbondsBackbone=c;break;case 603979852:this.g.hbondsBackbone=c;break;case 603979854:this.g.hbondsSolid=c;break;case 536870924:this.gdata.setSpecular(c);break;case 603979942:this.tm.setSlabEnabled(c);return;case 603979980:this.tm.setZoomEnabled(c);
return;case 603979863:this.g.highResolutionFlag=c;break;case 603979966:this.g.traceAlpha=c;break;case 603979983:this.g.zoomLarge=c;this.tm.setZoomHeight(this.g.zoomHeight,c);break;case 603979982:this.g.zoomHeight=c;this.tm.setZoomHeight(c,this.g.zoomLarge);break;case 603979871:J.i18n.GT.setDoTranslate(c);break;case 603979862:this.slm.setHideNotSelected(c);break;case 603979904:this.setScriptQueue(c);break;case 603979830:this.g.dotSurface=c;break;case 603979829:this.g.dotsSelectedOnly=c;break;case 1611141172:this.setSelectionHalosEnabled(c);
break;case 603979910:this.g.rasmolHydrogenSetting=c;break;case 603979908:this.g.rasmolHeteroSetting=c;break;case 603979928:this.g.showMultipleBonds=c;break;case 603979920:this.g.showHiddenSelectionHalos=c;break;case 603979976:this.tm.setWindowCentered(c);break;case 603979828:this.g.displayCellParameters=c;break;case 603979960:this.g.testFlag1=c;break;case 603979962:this.g.testFlag2=c;break;case 603979964:this.g.testFlag3=c;break;case 603979965:this.jmolTest();this.g.testFlag4=c;break;case 603979901:this.g.ribbonBorder=
c;break;case 603979815:this.g.cartoonBaseEdges=c;break;case 603979819:this.g.cartoonRockets=c;break;case 603979902:this.g.rocketBarrels=c;break;case 603979850:this.gdata.setGreyscaleMode(this.g.greyscaleRendering=c);break;case 603979878:this.g.measurementLabels=c;break;case 603979809:case 603979804:case 603979808:this.setAxesMode(b);return;case 603979806:this.setAxesOrientationRasmol(c);return;case 603979824:this.setStringPropertyTok("defaultcolorscheme",545259545,c?"rasmol":"jmol");return;case 603979825:this.setDebugScript(c);
return;case 603979897:this.setPerspectiveDepth(c);return;case 603979798:this.setAutoBond(c);return;case 603979914:this.setShowAxes(c);return;case 603979916:this.setShowBbcage(c);return;case 603979922:this.setShowHydrogens(c);return;case 603979926:this.setShowMeasurements(c);return;case 603979936:this.setShowUnitCell(c);return;case 603979812:e=!1;this.g.bondModeOr=c;break;case 603979978:e=!1;this.g.zeroBasedXyzRasmol=c;this.reset(!0);break;case 603979899:e=!1;this.g.rangeSelected=c;break;case 603979877:e=
!1;this.g.measureAllModels=c;break;case 603979954:e=!1;this.sm.allowStatusReporting=c;break;case 603979822:e=!1;this.g.chainCaseSensitive=c;break;case 603979858:e=!1;this.g.hideNameInPopup=c;break;case 603979827:e=!1;this.g.disablePopupMenu=c;break;case 603979848:e=!1;this.g.forceAutoBond=c;break;default:if(!this.g.htBooleanParameterFlags.containsKey(a.toLowerCase())){this.g.setUserVariable(a,JS.SV.getBoolean(c));return}}this.g.setB(a,c);e&&this.setTainted(!0)},"~S,~N,~B");c(b,"setModelKitMode",function(a){if(null!=
this.acm&&this.allowScripting){if(a||this.g.modelKitMode)this.setPickingMode(null,a?33:1),this.setPickingMode(null,a?32:1);var b=this.g.modelKitMode!=a;this.g.modelKitMode=a;this.g.setB("modelkitmode",a);this.highlight(null);b&&this.setModelkitPropertySafely("constraint",null);a?(this.setNavigationMode(!1),this.selectAll(),this.setStringProperty("picking","assignAtom_C"),this.setStringProperty("picking","assignBond_p"),this.isApplet||this.popupMenu(10,0,"m"),b&&this.sm.setStatusModelKit(1),this.g.modelKitMode=
!0,null==this.getOperativeSymmetry()&&(0==this.ms.ac?this.zap(!1,!0,!0):0<=this.am.cmi&&this.getModelUndeletedAtomsBitSet(this.am.cmi).isEmpty()&&(a=new java.util.Hashtable,a.put("appendToModelIndex",Integer.$valueOf(this.am.cmi)),this.loadDefaultModelKitModel(a)))):(this.acm.setPickingMode(-1),b?this.sm.setStatusModelKit(0):a||this.getModelkit(!1).setProperty("hidemenu",null))}},"~B");c(b,"setSmilesString",function(a){null==a?this.g.removeParam("_smilesString"):this.g.setO("_smilesString",a)},"~S");
c(b,"removeUserVariable",function(a){this.g.removeUserVariable(a);a.endsWith("callback")&&this.sm.setCallbackFunction(a,null)},"~S");c(b,"jmolTest",function(){});c(b,"showParameter",function(a,b,c){c=""+this.g.getParameterEscaped(a,c);(b||0>c.indexOf("<not defined>"))&&this.showString(a+" = "+c,!1)},"~S,~B,~N");c(b,"showString",function(a,b){!JV.Viewer.isJS&&(this.isScriptQueued()&&(!this.isSilent||b)&&!"\x00".equals(a))&&JU.Logger.warn(a);this.scriptEcho(a)},"~S,~B");c(b,"getAllSettings",function(a){return this.getStateCreator().getAllSettings(a)},
"~S");c(b,"getBindingInfo",function(a){return this.haveDisplay?this.acm.getBindingInfo(a):""},"~S");c(b,"getIsosurfacePropertySmoothing",function(a){return a?this.g.isosurfacePropertySmoothingPower:this.g.isosurfacePropertySmoothing?1:0},"~B");c(b,"setNavigationDepthPercent",function(a){this.tm.setNavigationDepthPercent(a);this.refresh(1,"set navigationDepth")},"~N");c(b,"getShowNavigationPoint",function(){return!this.g.navigationMode?!1:this.tm.isNavigating()&&!this.g.hideNavigationPoint||this.g.showNavigationPointAlways||
this.getInMotion(!0)});g(b,"setPerspectiveDepth",function(a){this.tm.setPerspectiveDepth(a)},"~B");g(b,"setAxesOrientationRasmol",function(a){this.g.setB("axesOrientationRasmol",a);this.g.axesOrientationRasmol=a;this.reset(!0)},"~B");c(b,"setAxesScale",function(a,b){b=JV.Viewer.checkFloatRange(b,-100,100);570425345==a?this.g.axesOffset=b:this.g.axesScale=b;this.axesAreTainted=!0},"~N,~N");c(b,"setAxesMode",function(a){this.g.axesMode=a;this.axesAreTainted=!0;switch(a){case 603979808:this.g.removeParam("axesmolecular");
this.g.removeParam("axeswindow");this.g.setB("axesUnitcell",!0);a=2;break;case 603979804:this.g.removeParam("axesunitcell");this.g.removeParam("axeswindow");this.g.setB("axesMolecular",!0);a=1;break;case 603979809:this.g.removeParam("axesunitcell"),this.g.removeParam("axesmolecular"),this.g.setB("axesWindow",!0),a=0}this.g.setI("axesMode",a)},"~N");c(b,"getSelectionHalosEnabled",function(){return this.selectionHalosEnabled});c(b,"setSelectionHalosEnabled",function(a){this.selectionHalosEnabled!=a&&
(this.g.setB("selectionHalos",a),this.shm.loadShape(8),this.selectionHalosEnabled=a)},"~B");c(b,"getShowSelectedOnce",function(){var a=this.showSelected;this.showSelected=!1;return a});c(b,"setStrandCount",function(a,b){b=JV.Viewer.checkIntRange(b,0,20);switch(a){case 12:this.g.strandCountForStrands=b;break;case 13:this.g.strandCountForMeshRibbon=b;break;default:this.g.strandCountForStrands=b,this.g.strandCountForMeshRibbon=b}this.g.setI("strandCount",b);this.g.setI("strandCountForStrands",this.g.strandCountForStrands);
this.g.setI("strandCountForMeshRibbon",this.g.strandCountForMeshRibbon)},"~N,~N");c(b,"getStrandCount",function(a){return 12==a?this.g.strandCountForStrands:this.g.strandCountForMeshRibbon},"~N");c(b,"setNavigationMode",function(a){this.g.navigationMode=a;this.tm.setNavigationMode(a)},"~B");g(b,"setAutoBond",function(a){this.g.setB("autobond",a);this.g.autoBond=a},"~B");c(b,"makeConnections",function(a,b,c,e,f,j,g,l,s,m){this.clearModelDependentObjects();this.clearMinimization();return this.ms.makeConnections(a,
b,c,e,f,j,g,l,s,m)},"~N,~N,~N,~N,JU.BS,JU.BS,JU.BS,~B,~B,~N");g(b,"rebond",function(){this.rebondState(!1)});c(b,"rebondState",function(a){this.clearModelDependentObjects();this.ms.deleteAllBonds();a=a&&this.g.legacyAutoBonding;this.ms.autoBondBs4(null,null,null,null,this.getMadBond(),a,null);this.addStateScript(a?"set legacyAutoBonding TRUE;connect;set legacyAutoBonding FALSE;":"connect;",!1,!0)},"~B");g(b,"setPercentVdwAtom",function(a){this.g.setI("percentVdwAtom",a);this.g.percentVdwAtom=a;this.rd.value=
a/100;this.rd.factorType=J.atomdata.RadiusData.EnumType.FACTOR;this.rd.vdwType=J.c.VDW.AUTO;this.shm.setShapeSizeBs(0,0,this.rd,null)},"~N");g(b,"getMadBond",function(){return 2*this.g.bondRadiusMilliAngstroms});g(b,"setShowHydrogens",function(a){this.g.setB("showHydrogens",a);this.g.showHydrogens=a},"~B");c(b,"setShowBbcage",function(a){this.setObjectMad10(32,"boundbox",a?-4:0);this.g.setB("showBoundBox",a)},"~B");c(b,"getShowBbcage",function(){return 0!=this.getObjectMad10(4)});c(b,"setShowUnitCell",
function(a){this.setObjectMad10(33,"unitcell",a?-2:0);this.g.setB("showUnitCell",a)},"~B");c(b,"getShowUnitCell",function(){return 0!=this.getObjectMad10(5)});c(b,"setShowAxes",function(a){this.setObjectMad10(34,"axes",a?-2:0);this.g.setB("showAxes",a)},"~B");c(b,"getShowAxes",function(){return 0!=this.getObjectMad10(1)});g(b,"setFrankOn",function(a){this.isPreviewOnly&&(a=!1);this.frankOn=a;this.setObjectMad10(36,"frank",a?1:0)},"~B");c(b,"getShowFrank",function(){return this.isPreviewOnly||this.isApplet&&
this.creatingImage?!1:this.isSignedApplet&&!this.isSignedAppletLocal&&!JV.Viewer.isJS||this.frankOn});g(b,"setShowMeasurements",function(a){this.g.setB("showMeasurements",a);this.g.showMeasurements=a},"~B");c(b,"setUnits",function(a,b){var c="default".equals(a);(!b||!c)&&this.g.setUnits(a);b&&this.setShapeProperty(6,"reformatDistances",a)},"~S,~B");g(b,"setRasmolDefaults",function(){this.setDefaultsType("RasMol")});g(b,"setJmolDefaults",function(){this.setDefaultsType("Jmol")});c(b,"setDefaultsType",
function(a){a.equalsIgnoreCase("RasMol")?this.stm.setRasMolDefaults():a.equalsIgnoreCase("PyMOL")?this.stm.setPyMOLDefaults():(this.stm.setJmolDefaults(),this.setIntProperty("bondingVersion",0),this.shm.setShapeSizeBs(0,0,this.rd,this.getAllAtoms()))},"~S");c(b,"setAntialias",function(a,b){var c=!1;switch(a){case 603979786:c=this.g.antialiasDisplay!=b;this.g.antialiasDisplay=b;break;case 603979790:c=this.g.antialiasTranslucent!=b;this.g.antialiasTranslucent=b;break;case 603979788:this.g.antialiasImages=
b;return}c&&(this.resizeImage(0,0,!1,!1,!0),this.refresh(3,"Viewer:setAntialias()"))},"~N,~B");c(b,"allocTempPoints",function(a){return this.tempArray.allocTempPoints(a)},"~N");c(b,"freeTempPoints",function(a){this.tempArray.freeTempPoints(a)},"~A");c(b,"allocTempScreens",function(a){return this.tempArray.allocTempScreens(a)},"~N");c(b,"freeTempScreens",function(a){this.tempArray.freeTempScreens(a)},"~A");c(b,"allocTempEnum",function(a){return this.tempArray.allocTempEnum(a)},"~N");c(b,"freeTempEnum",
function(a){this.tempArray.freeTempEnum(a)},"~A");c(b,"getFont3D",function(a,b,c){return this.gdata.getFont3DFSS(a,b,c)},"~S,~S,~N");c(b,"getAtomGroupQuaternions",function(a,b){return this.ms.getAtomGroupQuaternions(a,b,this.getQuaternionFrame())},"JU.BS,~N");c(b,"setStereoMode",function(a,b,c){this.setFloatProperty("stereoDegrees",c);this.setBooleanPropertyTok("greyscaleRendering",603979850,b.isBiColor());null!=a?this.tm.setStereoMode2(a):this.tm.setStereoMode(b)},"~A,J.c.STER,~N");c(b,"getChimeInfo",
function(a){return this.getPropertyManager().getChimeInfo(a,this.bsA())},"~N");c(b,"getModelFileInfo",function(){return this.getPropertyManager().getModelFileInfo(this.getVisibleFramesBitSet())});c(b,"getModelFileInfoAll",function(){return this.getPropertyManager().getModelFileInfo(null)});c(b,"showEditor",function(a){var b=this.getProperty("DATA_API","getScriptEditor",Boolean.TRUE);null!=b&&b.show(a)},"~A");c(b,"getPropertyManager",function(){null==this.pm&&(this.pm=J.api.Interface.getInterface("JV.PropertyManager",
this,"prop")).setViewer(this);return this.pm});c(b,"setTainted",function(a){this.isTainted=this.axesAreTainted=a&&(this.refreshing||this.creatingImage)},"~B");c(b,"checkObjectClicked",function(a,b,c){return this.shm.checkObjectClicked(a,b,c,this.getVisibleFramesBitSet(),this.g.drawPicking)},"~N,~N,~N");c(b,"checkObjectHovered",function(a,b){return 0<=a&&null!=this.shm&&this.shm.checkObjectHovered(a,b,this.getVisibleFramesBitSet(),this.getBondsPickable())},"~N,~N");c(b,"checkObjectDragged",function(a,
b,c,e,f){var j=0;switch(this.getPickingMode()){case 2:j=5;break;case 4:j=22}return this.shm.checkObjectDragged(a,b,c,e,f,this.getVisibleFramesBitSet(),j)?(this.refresh(1,"checkObjectDragged"),22==j&&this.scriptEcho(this.getShapeProperty(22,"command")),!0):!1},"~N,~N,~N,~N,~N");c(b,"rotateAxisAngleAtCenter",function(a,b,c,e,f,j,g){(a=this.tm.rotateAxisAngleAtCenter(a,b,c,e,f,j,g))&&this.setSync();return a},"J.api.JmolScriptEvaluator,JU.P3,JU.V3,~N,~N,~B,JU.BS");c(b,"rotateAboutPointsInternal",function(a,
b,c,e,f,j,g,l,s,m,p,n,q,u){null==a&&(a=this.eval);if(this.headless){if(j&&3.4028235E38==f)return!1;j=!1}(a=this.tm.rotateAboutPointsInternal(a,b,c,e,f,!1,j,g,!1,l,s,m,p,n,q,u))&&this.setSync();return a},"J.api.JmolScriptEvaluator,JU.P3,JU.P3,~N,~N,~B,JU.BS,JU.V3,JU.Lst,~A,JU.M3,JU.M4,~B,~A");c(b,"startSpinningAxis",function(a,b,c){this.tm.spinOn||this.tm.navOn?(this.tm.setSpinOff(),this.tm.setNavOn(!1)):this.tm.rotateAboutPointsInternal(null,a,b,this.g.pickingSpinRate,3.4028235E38,c,!0,null,!1,null,
null,null,null,null,!1,null)},"JU.T3,JU.T3,~B");c(b,"getModelDipole",function(){return this.ms.getModelDipole(this.am.cmi)});c(b,"calculateMolecularDipole",function(a){try{return this.ms.calculateMolecularDipole(this.am.cmi,a)}catch(b){if(D(b,"JV.JmolAsyncException"))return null!=this.eval&&this.eval.loadFileResourceAsync(b.getFileName()),null;throw b;}},"JU.BS");c(b,"setDefaultLattice",function(a){Float.isNaN(a.x+a.y+a.z)||this.g.ptDefaultLattice.setT(a);this.g.setO("defaultLattice",JU.Escape.eP(a))},
"JU.P3");c(b,"getDefaultLattice",function(){return this.g.ptDefaultLattice});c(b,"getModelExtract",function(a,b,c,e){return this.getPropertyManager().getModelExtract(this.getAtomBitSet(a),b,c,e,!1)},"~O,~B,~B,~S");g(b,"getData",function(a,b){return this.getModelFileData(a,b,!0)},"~S,~S");c(b,"getModelFileData",function(a,b,c){return this.getPropertyManager().getAtomData(a,b,c)},"~S,~S,~B");c(b,"getModelCml",function(a,b,c,e){return this.getPropertyManager().getModelCml(a,b,c,e,!1)},"JU.BS,~N,~B,~B");
c(b,"getPdbAtomData",function(a,b,c,e){return this.getPropertyManager().getPdbAtomData(null==a?this.bsA():a,b,c,e,!1)},"JU.BS,JU.OC,~B,~B");c(b,"isJmolDataFrame",function(){return this.ms.isJmolDataFrameForModel(this.am.cmi)});c(b,"setFrameTitle",function(a,b){this.ms.setFrameTitle(JU.BSUtil.newAndSetBit(a),b)},"~N,~S");c(b,"setFrameTitleObj",function(a){this.shm.loadShape(31);this.ms.setFrameTitle(this.getVisibleFramesBitSet(),a)},"~O");c(b,"getFrameTitle",function(){return this.ms.getFrameTitle(this.am.cmi)});
c(b,"setAtomProperty",function(a,b,c,e,f,j,g){1648363544==b&&this.shm.deleteVdwDependentShapes(a);this.clearMinimization();this.ms.setAtomProperty(a,b,c,e,f,j,g);switch(b){case 1086326789:this.setModelkitPropertySafely("updateatomkeys",a);case 1111492609:case 1111492610:case 1111492611:case 1111492612:case 1111492613:case 1111492614:case 1111490577:case 1111490578:case 1111490579:this.refreshMeasures(!0)}},"JU.BS,~N,~N,~N,~S,~A,~A");c(b,"checkCoordinatesChanged",function(a){this.ms.recalculatePositionDependentQuantities(a,
null);this.refreshMeasures(!0)},"JU.BS");c(b,"setAtomCoords",function(a,b,c){if(!a.isEmpty()){var e=this.ms.at[a.nextSetBit(0)],f=a.cardinality();this.sm.setStatusStructureModified(e.i,e.mi,3,"setAtomCoords",f,a);this.ms.setAtomCoords(a,b,c);this.setStatusAtomMoved(!0,a);this.sm.setStatusStructureModified(e.i,e.mi,-3,"OK",f,a)}},"JU.BS,~N,~O");c(b,"setAtomCoordsRelative",function(a,b){null==b&&(b=this.bsA());if(!b.isEmpty()){var c=0!=a.lengthSquared(),e=this.ms.at[b.nextSetBit(0)],f=b.cardinality();
c&&this.sm.setStatusStructureModified(e.i,e.mi,3,"setAtomCoords",f,b);this.ms.setAtomCoordsRelative(a,b);this.checkMinimization();c&&(this.setStatusAtomMoved(!1,b),this.sm.setStatusStructureModified(e.i,e.mi,-3,"OK",f,b))}},"JU.T3,JU.BS");c(b,"invertAtomCoord",function(a,b,c,e,f){if(0<=e){c=JU.JmolMolecule.getBranchesForInversion(this.ms.at,e,this.ms.getMoleculeBitSetForAtom(e));var j=c.cardinality();switch(j){case 0:case 1:return;case 3:case 4:for(var g=E(j,0),l=E(j,0),s=0,m=c.nextSetBit(0);0<=m;m=
c.nextSetBit(m+1),s++)g[s]=this.getBranchBitSet(m,e,!0).cardinality(),l[s]=m;for(s=0;s<j-2;s++){for(var p=-2147483648,n=0,m=0;m<j;m++)g[m]>=p&&c.get(l[m])&&(n=l[m],p=g[m]);c.clear(n)}}f&&!c.isEmpty()&&this.undoMoveActionClear(e,2,!0)}j=c.cardinality();0!=j&&(g=this.ms.at[c.nextSetBit(0)],this.sm.setStatusStructureModified(g.i,g.mi,3,"invertAtomCoords",j,c),this.ms.invertSelected(a,b,e,c),this.setStatusAtomMoved(!0,c),this.sm.setStatusStructureModified(g.i,g.mi,-3,"OK",j,c),f&&this.setStatusAtomPicked(e,
"inverted: "+JU.Escape.eBS(c),null,!1))},"JU.P3,JU.P4,JU.BS,~N,~B");c(b,"invertSelected",function(a,b,c,e){null==e&&(e=this.bsA());e.isEmpty()||(this.ms.invertSelected(a,b,c,e),this.setStatusAtomMoved(!0,e))},"JU.P3,JU.P4,~N,JU.BS");c(b,"moveAtoms",function(a,b,c,e,f,j,g,l,s){if(!g.isEmpty()){var m=this.getMotionFixedAtoms(null,null);if(!g.intersects(m)){s=s?this.getOperativeSymmetry():null;var p=null;null!=s&&(p=this.ms.saveAtomPositions());this.ms.moveAtoms(a,b,c,e,g,f,j,l);null!=s&&this.getModelkit(!1).checkMovedAtoms(m,
g,p);this.setStatusAtomMoved(!0,g)}}},"JU.M4,JU.M3,JU.M3,JU.V3,JU.P3,~B,JU.BS,~B,~B");c(b,"moveSelectedXY",function(a,b,c){this.moveSelected(a,b,-2147483648,-2147483648,-2147483648,null,null,null,!1,!1,c)},"~N,~N,~N");c(b,"moveSelected",function(a,b,c,e,f,j,g,l,s,m,p){if(0==c&&null==l||this.isJmolDataFrame())return 0;if(null==l){-2147483648==e&&null!=this.modelkit&&this.setModelkitPropertySafely("rotatebondindex",Integer.$valueOf(-2147483648));if(-2147483648==a)return this.showSelected=!0,this.movableBitSet=
this.setMovableBitSet(null,!m),this.shm.loadShape(8),this.refresh(6,"moveSelected"),0;if(2147483647==a){if(!this.showSelected)return 0;this.showSelected=!1;this.movableBitSet=null;this.refresh(6,"moveSelected");return 0}}if(this.movingSelected)return 0;this.movingSelected=!0;this.stopMinimization();if(null==l&&-2147483648!=e&&null!=this.modelkit&&null!=this.modelkit.getProperty("rotatebondindex"))this.modelkit.actionRotateBond(a,b,e,f,0!=(p&16));else if(null==j&&(j=this.bsA()),e=j.nextSetBit(0),j=
this.setMovableBitSet(j,!m),j.isEmpty())j.set(e),this.sm.setStatusStructureModified(e,this.getModelIndexForAtom(e),-3,"FAILED",1,j);else if(s){g=null==g?this.ms.getAtomSetCenter(j):g;if(null==l){this.tm.finalizeTransformParameters();l=this.g.antialiasDisplay?2:1;this.tm.transformPt3f(g,this.ptScreen);s=this.getOperativeSymmetry();if(-2147483648!=c){if(null!=s)return 0;this.ptScreenNew.set(this.ptScreen.x,this.ptScreen.y,this.ptScreen.z+c)}else this.ptScreenNew.set(this.ptScreen.x+a*l,this.ptScreen.y+
b*l,this.ptScreen.z);this.tm.unTransformPoint(this.ptScreenNew,this.ptNew);l=this.ptNew;null!=s&&(l.sub(g),l.add(this.ms.at[e]),this.getModelkit(!1).assignMoveAtoms(j,e,l,null,!0,!m,!1))}Float.isNaN(l.x)||(l.sub(g),this.setAtomCoordsRelative(l,j))}else this.tm.rotateXYBy(a,b,j);this.refresh(2,"");this.movingSelected=!1;return null==j?0:j.cardinality()},"~N,~N,~N,~N,~N,JU.BS,JU.P3,JU.P3,~B,~B,~N");c(b,"warnAtom",function(a){0>a&&0>this.atomHighlighted||(this.atomHighlighted=a,this.shm.loadShape(8),
this.setShapeProperty(8,"warnAtom",0<=a?Integer.$valueOf(a):null))},"~N");c(b,"highlightBond",function(a,b,c,e){if(this.hoverEnabled){b=null;if(0<=a){var f=this.ms.bo[a];b=JU.BSUtil.newAndSetBit(f.atom2.i);b.set(f.atom1.i)}this.highlight(b);this.getModelkit(!1);this.setModelkitPropertySafely("screenxy",E(-1,[c,e]));this.setModelkitPropertySafely("bondindex",Integer.$valueOf(a));a=this.setModelkitPropertySafely("hoverlabel",Integer.$valueOf(-2-a));null!=a&&this.hoverOnPt(c,e,a,null,null);this.refresh(3,
"highlightBond")}},"~N,~N,~N,~N");c(b,"highlight",function(a){this.atomHighlighted=null!=a&&1==a.cardinality()?a.nextSetBit(0):-1;null==a?this.setCursor(0):(this.shm.loadShape(8),this.setCursor(12));this.setModelkitPropertySafely("highlight",a);this.setShapeProperty(8,"highlight",a)},"JU.BS");c(b,"refreshMeasures",function(a){this.setShapeProperty(6,"refresh",null);this.setStatusMeasuring("refreshed",-3,"",0);a&&this.stopMinimization()},"~B");c(b,"functionXY",function(a,b,c){var e=null;if(0==a.indexOf("file:"))e=
this.getFileAsString3(a.substring(5),!1,null);else if(0!=a.indexOf("data2d_"))return this.sm.functionXY(a,b,c);b=Math.abs(b);c=Math.abs(c);if(null==e){a=this.getDataObj(a,null,2);if(null!=a)return a;e=""}a=L(b,c,0);var f=L(b*c,0);JU.Parser.parseStringInfestedFloatArray(e,null,f);for(var j=e=0;e<b;e++)for(var g=0;g<c;g++)a[e][g]=f[j++];return a},"~S,~N,~N");c(b,"functionXYZ",function(a,b,c,e){var f=null;if(0==a.indexOf("file:"))f=this.getFileAsString3(a.substring(5),!1,null);else if(0!=a.indexOf("data3d_"))return this.sm.functionXYZ(a,
b,c,e);b=Math.abs(b);c=Math.abs(c);e=Math.abs(e);if(null==f){a=this.getDataObj(a,null,2);if(null!=a)return a;f=""}a=L(b,c,e,0);var j=L(b*c*e,0);JU.Parser.parseStringInfestedFloatArray(f,null,j);for(var g=f=0;f<b;f++)for(var l=0;l<c;l++)for(var s=0;s<e;s++)a[f][l][s]=j[g++];return a},"~S,~N,~N,~N");g(b,"extractMolData",function(a){if(null==a){a=this.am.cmi;if(0>a||0==this.ms.ac)return null;a=this.getModelNumberDotted(a)}return this.getModelExtract(a,!0,!1,"V2000")},"~S");c(b,"getNMRPredict",function(a){a=
a.toUpperCase();if(a.equals("H")||a.equals("1H")||a.equals(""))a="H1";else if(a.equals("C")||a.equals("13C"))a="C13";if(!a.equals("NONE")){if(!a.equals("C13")&&!a.equals("H1"))return"Type must be H1 or C13";var b=this.getModelExtract("selected",!0,!1,"V2000"),c=b.indexOf("\n");if(0>c)return null;b="Jmol "+JV.Viewer.version_date+b.substring(c);if(this.isApplet)return this.showUrl(this.g.nmrUrlFormat+b),"opening "+this.g.nmrUrlFormat}this.syncScript("true","*",0);this.syncScript(a+"Simulate:",".",0);
return"sending request to JSpecView"},"~S");c(b,"getHelp",function(a){0>this.g.helpPath.indexOf("?")?(0<a.length&&0!=a.indexOf("?")&&(a="?search="+JU.PT.rep(a," ","%20")),a+=(0==a.length?"?ver=":"&ver=")+JV.JC.majorVersion):a="&"+a;this.showUrl(this.g.helpPath+a)},"~S");c(b,"getChemicalInfo",function(a,b,c){b=b.toLowerCase();var e="/";switch(";inchi;inchikey;stdinchi;stdinchikey;name;image;drawing;names;".indexOf(";"+b+";")){case 0:e="I";break;case 6:e="K";break;case 15:e="T";break;case 24:e="S";
break;case 36:e="M";break;case 41:case 47:e="2";break;case 55:e="N"}var f=this.setLoadFormat(!1,"_"+a,e,!1);if("2"==e)return this.fm.loadImage(f,"\u0001"+a,!1),f;"/"==e&&(f=JU.PT.isOneOf(b,";alc;cdxml;cerius;charmm;cif;cml;ctx;gjf;gromacs;hyperchem;jme;maestro;mol;mol2;sybyl2;mrv;pdb;sdf;sdf3000;sln;smiles;xyz")?f+("file?format="+b):f+JU.PT.rep(b," ","%20"));f=this.getFileAsString4(f,-1,!1,!1,!1,"file");switch(e.charCodeAt(0)){case 73:case 84:0<f.indexOf("\t")&&(f=f.substring(0,f.indexOf("\t")));
break;case 75:case 77:f.startsWith("InChIKey=")&&(f=f.substring(9));0<f.indexOf("\n")&&(f=f.substring(0,f.indexOf("\n")));break;default:b.equals("jme")&&(f=this.getPropertyManager().fixJMEFormalCharges(c,f))}return f},"~S,~S,JU.BS");c(b,"addCommand",function(a){if(!this.autoExit&&this.haveDisplay&&this.getPreserveState()){if(a.startsWith("pause ")||a.equals("pause"))a="resume";this.commandHistory.addCommand(JU.PT.replaceAllCharacters(a,"\r\n\t"," "))}},"~S");c(b,"pushState",function(){!this.autoExit&&
(this.haveDisplay&&this.getPreserveState())&&this.commandHistory.pushState(this.getStateInfo())});c(b,"popState",function(){if(!this.autoExit&&this.haveDisplay&&this.getPreserveState()){var a=this.commandHistory.popState();null!=a&&this.evalStringQuiet(a)}});c(b,"removeCommand",function(){return this.commandHistory.removeCommand()});g(b,"getSetHistory",function(a){return this.commandHistory.getSetHistory(a)},"~N");c(b,"historyFind",function(a,b){return this.commandHistory.find(a,b)},"~S,~N");c(b,
"setHistory",function(a){this.commandHistory.getSetHistory(-2147483648);this.commandHistory.addCommand(this.getFileAsString4(a,-1,!1,!1,!0,null))},"~S");c(b,"getOutputChannel",function(a,b){return this.getOutputManager().getOutputChannel(a,b)},"~S,~A");g(b,"writeTextFile",function(a,b){return this.writeFile(a,b,"txt")},"~S,~S");c(b,"writeFile",function(a,b,c){var e=new java.util.Hashtable;e.put("fileName",a);e.put("type",c);e.put("string"==typeof b?"text":"bytes",b);return this.outputToFile(e)},"~S,~O,~S");
g(b,"clipImageOrPasteText",function(a){return!this.haveAccess(JV.Viewer.ACCESS.ALL)?"no":this.getOutputManager().clipImageOrPasteText(a)},"~S");g(b,"getClipboardText",function(){if(!this.haveAccess(JV.Viewer.ACCESS.ALL))return"no";try{return this.getOutputManager().getClipboardText()}catch(a){if(D(a,Error))return J.i18n.GT.$("clipboard is not accessible -- use signed applet");throw a;}});c(b,"processWriteOrCapture",function(a){return this.getOutputManager().processWriteOrCapture(a)},"java.util.Map");
c(b,"createZip",function(a,b,c){var e=this.getStateInfo(),f=c.get("data");null!=a&&c.put("fileName",a);c.put("type",b);c.put("text",e);C(f,Array)?c.put("scripts",f):C(f,"JU.Lst")&&c.put("imageData",f);return this.getOutputManager().outputToFile(c)},"~S,~S,java.util.Map");g(b,"outputToFile",function(a){return this.getOutputManager().outputToFile(a)},"java.util.Map");c(b,"setSyncTarget",function(a,b){switch(a){case 0:this.sm.syncingMouse=b;break;case 1:this.sm.syncingScripts=b;break;case 2:this.sm.syncSend(b?
"GET_GRAPHICS":"SET_GRAPHICS_OFF","*",0);Float.isNaN(this.tm.stereoDegrees)&&this.setFloatProperty("stereoDegrees",-5);b&&(this.setBooleanProperty("_syncMouse",!1),this.setBooleanProperty("_syncScript",!1));return}!this.sm.syncingScripts&&!this.sm.syncingMouse&&this.setSync()},"~N,~B");g(b,"syncScript",function(a,b,c){this.sm.syncScript(a,b,c)},"~S,~S,~N");g(b,"getModelIndexFromId",function(a){return this.ms.getModelIndexFromId(a)},"~S");c(b,"setSyncDriver",function(a){this.sm.setSyncDriver(a)},"~N");
c(b,"setProteinType",function(a,b){this.ms.setProteinType(null==b?this.bsA():b,a)},"J.c.STR,JU.BS");c(b,"getVanderwaalsMar",function(a){return this.defaultVdw===J.c.VDW.USER?this.userVdwMars[a]:JU.Elements.getVanderwaalsMar(a,this.defaultVdw)},"~N");c(b,"getVanderwaalsMarType",function(a,b){if(null==b)b=this.defaultVdw;else switch(b){case J.c.VDW.AUTO:case J.c.VDW.AUTO_BABEL:case J.c.VDW.AUTO_JMOL:case J.c.VDW.AUTO_RASMOL:this.defaultVdw!==J.c.VDW.AUTO&&(b=this.defaultVdw)}b===J.c.VDW.USER&&null==
this.bsUserVdws&&(b=J.c.VDW.JMOL);return b===J.c.VDW.USER?this.userVdwMars[a&127]:JU.Elements.getVanderwaalsMar(a,b)},"~N,J.c.VDW");c(b,"setVdwStr",function(a){a=J.c.VDW.getVdwType(a);null==a&&(a=J.c.VDW.AUTO);switch(a){case J.c.VDW.JMOL:case J.c.VDW.BABEL:case J.c.VDW.RASMOL:case J.c.VDW.AUTO:case J.c.VDW.USER:break;default:a=J.c.VDW.JMOL}a!==this.defaultVdw&&(a===J.c.VDW.USER&&null==this.bsUserVdws)&&this.setUserVdw(this.defaultVdw);this.defaultVdw=a;this.g.setO("defaultVDW",a.getVdwLabel())},"~S");
c(b,"setUserVdw",function(a){this.userVdwMars=E(JU.Elements.elementNumberMax,0);this.userVdws=L(JU.Elements.elementNumberMax,0);this.bsUserVdws=new JU.BS;a===J.c.VDW.USER&&(a=J.c.VDW.JMOL);for(var b=1;b<JU.Elements.elementNumberMax;b++)this.userVdwMars[b]=JU.Elements.getVanderwaalsMar(b,a),this.userVdws[b]=this.userVdwMars[b]/1E3},"J.c.VDW");c(b,"getDefaultVdwNameOrData",function(a,b,c){switch(a){case -2147483648:return this.defaultVdw.getVdwLabel();case 2147483647:if(null==(c=this.bsUserVdws))return"";
b=J.c.VDW.USER}if(null==b||b===J.c.VDW.AUTO)b=this.defaultVdw;b===J.c.VDW.USER&&null==this.bsUserVdws&&this.setUserVdw(this.defaultVdw);return this.getDataManager().getDefaultVdwNameOrData(b,c)},"~N,J.c.VDW,JU.BS");c(b,"deleteAtoms",function(a,b){var c=null==a?-1:a.nextSetBit(0);if(0>c)return 0;this.clearModelDependentObjects();var e=this.ms.at[c];if(null==e)return 0;var f=e.mi;if(b)return this.deleteModels(f,a);this.sm.setStatusStructureModified(c,e.mi,4,"deleting atoms "+a,a.cardinality(),a);this.ms.deleteAtoms(a);
e=this.slm.deleteAtoms(a);this.setTainted(!0);this.sm.setStatusStructureModified(c,f,-4,"OK",e,a);return e},"JU.BS,~B");c(b,"deleteModels",function(a,b){var c=null==b?JU.BSUtil.newAndSetBit(a):this.ms.getModelBS(b,!1);this.clearModelDependentObjects();b=this.getModelUndeletedAtomsBitSetBs(c);var e=b.cardinality(),f=this.am.cmi;this.setCurrentModelIndexClear(0,!1);this.am.setAnimationOn(!1);var j=JU.BSUtil.copy(this.slm.bsDeleted),c=this.ms.deleteModels(c);if(null==c)return this.setCurrentModelIndexClear(f,
!1),0;this.sm.setStatusStructureModified(-1,a,5,"deleting model "+this.getModelNumberDotted(a),e,b);this.slm.processDeletedModelAtoms(c);null!=this.eval&&this.eval.deleteAtomsInVariables(c);this.setAnimationRange(0,0);this.clearRepaintManager(-1);this.am.clear();this.am.initializePointers(1);this.setCurrentModelIndexClear(1<this.ms.mc?-1:0,1<this.ms.mc);this.hoverAtomIndex=-1;this.setFileLoadStatus(J.c.FIL.DELETED,null,null,null,null,null);this.refreshMeasures(!0);null!=j&&c.andNot(j);e=JU.BSUtil.cardinalityOf(c);
this.sm.setStatusStructureModified(-1,a,-5,"OK",e,c);return e},"~N,JU.BS");c(b,"deleteBonds",function(a){for(var b=this.ms.bondCount,c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1))(c>=b||null==this.ms.bo[c])&&a.clear(c);b=a.nextSetBit(0);0>b||(b=this.ms.bo[b].atom1.mi,this.sm.setStatusStructureModified(-1,b,2,"delete bonds "+JU.Escape.eBond(a),a.cardinality(),a),this.ms.deleteBonds(a,!1),this.sm.setStatusStructureModified(-1,b,-2,"OK",a.cardinality(),a))},"JU.BS");c(b,"deleteModelAtoms",function(a,b,
c,e){var f=e.cardinality();0!=f&&(this.sm.setStatusStructureModified(-1,a,7,"delete atoms "+JU.Escape.eBS(e),f,e),JU.BSUtil.deleteBits(this.tm.bsFrameOffsets,e),this.getDataManager().deleteModelAtoms(b,c,e),this.sm.setStatusStructureModified(-1,a,-7,"OK",f,e))},"~N,~N,~N,JU.BS");c(b,"getQuaternionFrame",function(){return this.g.quaternionFrame.charAt(2==this.g.quaternionFrame.length?1:0)});c(b,"loadImageData",function(a,b,c,e){null==a&&null!=b&&this.scriptEcho(b);null==c?this.setBackgroundImage(null==
a?null:b,a):c.startsWith("\u0001")?this.sm.showImage(c,a):c.startsWith("\x00")?null!=a&&this.setWindowDimensions(L(-1,[this.apiPlatform.getImageWidth(a),this.apiPlatform.getImageHeight(a)])):(this.shm.loadShape(31),this.setShapeProperty(31,"text",b),null!=a&&this.setShapeProperty(31,"image",a));JV.Viewer.isJS&&null!=e&&(e.mustResumeEval=!0,this.eval.resumeEval(e));return!1},"~O,~S,~S,~O");c(b,"cd",function(a){null==a?a=".":0==a.length&&(this.setStringProperty("defaultDirectory",""),a=".");a=this.fm.getDefaultDirectory(a+
(a.equals("=")?"":a.endsWith("/")?"X.spt":"/X.spt"));0<a.length&&this.setStringProperty("defaultDirectory",a);this.fm.getFilePath(a+"/",!0,!1).startsWith("file:/")&&JV.FileManager.setLocalPath(this,a,!1);return a},"~S");c(b,"setErrorMessage",function(a,b){this.errorMessageUntranslated=b;null!=a&&this.eval.stopScriptThreads();return this.errorMessage=a},"~S,~S");g(b,"getErrorMessage",function(){return this.errorMessage});g(b,"getErrorMessageUn",function(){return null==this.errorMessageUntranslated?
this.errorMessage:this.errorMessageUntranslated});c(b,"setShapeErrorState",function(a,b){this.currentShapeID=a;this.currentShapeState=b},"~N,~S");c(b,"getShapeErrorState",function(){if(0>this.currentShapeID)return"";this.shm.releaseShape(this.currentShapeID);this.clearRepaintManager(this.currentShapeID);return JV.JC.getShapeClassName(this.currentShapeID,!1)+" "+this.currentShapeState});c(b,"handleError",function(a,b){try{b&&this.zapMsg(""+a),this.undoMoveAction(4165,-2),0==JU.Logger.getLogLevel()&&
JU.Logger.setLogLevel(4),this.setCursor(0),this.setBooleanPropertyTok("refreshing",603979900,!0),this.fm.setPathForAllFiles(""),JU.Logger.error("vwr handling error condition: "+a+"  "),this.notifyError("Error","doClear="+b+"; "+a,""+a)}catch(c){try{JU.Logger.error("Could not notify error "+a+": due to "+c)}catch(e){}}},"Throwable,~B");c(b,"getFunctions",function(a){return a?JV.Viewer.staticFunctions:this.localFunctions},"~B");c(b,"removeFunction",function(a){a=a.toLowerCase();null!=this.getFunction(a)&&
(JV.Viewer.staticFunctions.remove(a),this.localFunctions.remove(a))},"~S");c(b,"getFunction",function(a){if(null==a)return null;a=(JV.Viewer.isStaticFunction(a)?JV.Viewer.staticFunctions:this.localFunctions).get(a);return null==a||null==a.geTokens()?null:a},"~S");b.isStaticFunction=c(b,"isStaticFunction",function(a){return a.startsWith("static_")},"~S");c(b,"isFunction",function(a){return(JV.Viewer.isStaticFunction(a)?JV.Viewer.staticFunctions:this.localFunctions).containsKey(a)},"~S");c(b,"clearFunctions",
function(){JV.Viewer.staticFunctions.clear();this.localFunctions.clear()});c(b,"addFunction",function(a){var b=a.getName();(JV.Viewer.isStaticFunction(b)?JV.Viewer.staticFunctions:this.localFunctions).put(b,a)},"J.api.JmolScriptFunction");c(b,"getFunctionCalls",function(a){return this.getStateCreator().getFunctionCalls(a)},"~S");c(b,"checkPrivateKey",function(a){return a==this.privateKey},"~N");c(b,"bindAction",function(a,b){this.haveDisplay&&this.acm.bind(a,b)},"~S,~S");c(b,"unBindAction",function(a,
b){this.haveDisplay&&this.acm.unbindAction(a,b)},"~S,~S");c(b,"calculateStruts",function(a,b){return this.ms.calculateStruts(null==a?this.bsA():a,null==b?this.bsA():b)},"JU.BS,JU.BS");c(b,"getPreserveState",function(){return this.g.preserveState&&null!=this.scm});c(b,"isKiosk",function(){return this.$isKiosk});c(b,"hasFocus",function(){return this.haveDisplay&&(this.$isKiosk||this.apiPlatform.hasFocus(this.display))});c(b,"setFocus",function(){this.haveDisplay&&!this.apiPlatform.hasFocus(this.display)&&
this.apiPlatform.requestFocusInWindow(this.display)});c(b,"stopMinimization",function(){null!=this.minimizer&&this.minimizer.setProperty("stop",null)});c(b,"clearMinimization",function(){null!=this.minimizer&&this.minimizer.setProperty("clear",null)});c(b,"getMinimizationInfo",function(){return null==this.minimizer?"":this.minimizer.getProperty("log",0)});c(b,"checkMinimization",function(){this.refreshMeasures(!0);if(this.g.monitorEnergy){try{this.minimize(null,0,0,this.getFrameAtoms(),null,null,
0,1)}catch(a){if(!D(a,Exception))throw a;}this.echoMessage(this.getP("_minimizationForceField")+" Energy = "+this.getP("_minimizationEnergy"))}});c(b,"minimize",function(a,b,c,e,f,j,g,l){var s=null!=e;s&&(l|=2);var m=0!=(l&16),p=0!=(l&256),n=0!=(l&1),q=0!=(l&8),u=0!=(l&64),v=u||0!=(l&32),w=null!=f;this.isModelKitOpen()&&this.setModelkitPropertySafely("constraint",null);null==j&&(j=this.getFrameAtoms());!q&&(!m&&s&&!w&&!v)&&(w=JU.BSUtil.copy(j),f=JU.BSUtil.copy(w),f.andNot(e),e=w,w=!0);s?q||e.and(j):
(e=this.getThisModelAtoms(),v&&e.and(this.bsA()));if(!e.isEmpty())if(s=p||!v?JU.BSUtil.copy(this.ms.am[this.ms.at[e.nextSetBit(0)].mi].bsAsymmetricUnit):null,p&&null==s)this.scriptStatusMsg("MODELKIT MINIMIZE is only applicable to crystal structures.","minimization: not a crystal structure");else try{if(p)this.getModelkit(!1).cmdMinimize(a,s,b,c,g,l);else{var x=null==s?this.g.forceField:"UFF";this.getModelForAtomIndex(e.nextSetBit(0)).auxiliaryInfo.put("dimension","3D");q&&(j=e);var z=JU.BSUtil.copy(w?
f:this.slm.getMotionFixedAtoms()),B=!z.isEmpty();B&&e.andNot(z);var C=null!=s&&p?this.getThisModelAtoms():v||!B?new JU.BS:this.ms.getAtomsWithinRadius(0>=g?5:g,e,!0,null,null);C.andNot(e);B?z.and(C):z=C;z.and(j);l|=(B?4:0)|(this.getBooleanProperty("minimizationSilent")?1:0);if(!q||!this.getBoolean(603979962)){if(q)try{n||JU.Logger.info("Minimizing "+e.cardinality()+" atoms"),this.getMinimizer(!0).minimize(b,c,e,z,null,l,"UFF")}catch(E){if(D(E,Exception))JU.Logger.error("Minimization error: "+E.toString()),
E.printStackTrace();else throw E;}if(m){var F=this.addHydrogens(e,l);q||e.or(F)}var G=e.cardinality();if(x.equals("MMFF")&&G>this.g.minimizationMaxAtoms)this.scriptStatusMsg("Too many atoms for minimization ("+G+">"+this.g.minimizationMaxAtoms+"); use 'set minimizationMaxAtoms' to increase this limit","minimization: too many atoms");else if(u&&(z.or(this.ms.getConnectingAtoms(e,z)),e.andNot(z)),n||JU.Logger.info("Minimizing "+e.cardinality()+" atoms"),this.getMinimizer(!0).minimize(b,c,e,z,s,l,q?
"MMFF":x),q){this.g.forceField="MMFF";this.setHydrogens(e);var I=this.getMinimizer(!1).getForceFieldUsed();null!=I&&this.showString("Minimized by Jmol using "+I,!1)}}}}catch(K){if(D(K,"JV.JmolAsyncException"))null!=a&&a.loadFileResourceAsync(K.getFileName());else if(D(K,Exception))a=K,JU.Logger.error("Minimization error: "+a.toString()),a.printStackTrace();else throw K;}},"J.api.JmolScriptEvaluator,~N,~N,JU.BS,JU.BS,JU.BS,~N,~N");c(b,"setHydrogens",function(a){for(var b=E(1,0),b=this.ms.calculateHydrogens(a,
b,null,2056),c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1)){var e=b[c];if(!(null==e||0==e.length))for(var f=this.ms.at[c],j=f.bonds,g=0,l=0,s=f.getBondCount();g<s;g++){var m=j[g].getOtherAtom(f);if(1==m.getAtomicAndIsotopeNumber()){var p=e[l++];null!=p&&this.ms.setAtomCoord(m.i,p.x,p.y,p.z)}}}this.ms.resetMolecules()},"JU.BS");c(b,"setMotionFixedAtoms",function(a){this.slm.setMotionFixedAtoms(a)},"JU.BS");c(b,"setMotionFixed",function(a){this.slm.setMotionFixedAtoms(a)},"JU.BS");c(b,"getMotionFixedAtoms",
function(a,b){if(0>this.am.cmi)return new JU.BS;null==b&&(b=new JU.BS);b.or(this.slm.getMotionFixedAtoms());b.and(this.getThisModelAtoms());null==a&&(a=this.getOperativeSymmetry());null!=a&&null!=this.getModelkit(!1)&&this.modelkit.addLockedAtoms(a,b);return b},"J.api.SymmetryInterface,JU.BS");c(b,"getAtomicPropertyState",function(a,b,c,e,f){this.getStateCreator().getAtomicPropertyStateBuffer(a,b,c,e,f)},"JU.SB,~N,JU.BS,~S,~A");c(b,"getCenterAndPoints",function(a,b){return this.ms.getCenterAndPoints(a,
b)},"JU.Lst,~B");c(b,"writeFileData",function(a,b,c,e){return this.getOutputManager().writeFileData(a,b,c,e)},"~S,~S,~N,~A");c(b,"getPdbData",function(a,b,c,e,f,j){return this.getPropertyManager().getPdbData(a,b,null==c?this.bsA():c,e,f,j)},"~N,~S,JU.BS,~A,JU.OC,~B");c(b,"getGroupsWithin",function(a,b){return this.ms.getGroupsWithin(a,b)},"~N,JU.BS");c(b,"setShapeSize",function(a,b,c){null==c&&(c=this.bsA());this.shm.setShapeSizeBs(a,b,null,c)},"~N,~N,JU.BS");c(b,"setShapeProperty",function(a,b,c){0<=
a&&this.shm.setShapePropertyBs(a,b,c,null)},"~N,~S,~O");c(b,"getShapeProperty",function(a,b){return this.shm.getShapePropertyIndex(a,b,-2147483648)},"~N,~S");c(b,"getShapePropertyAsInt",function(a,b){var c=this.getShapeProperty(a,b);return null==c||!C(c,Integer)?-2147483648:c.intValue()},"~N,~S");c(b,"setModelVisibility",function(){null!=this.shm&&this.shm.setModelVisibility()});c(b,"resetShapes",function(a){this.shm.resetShapes(!a);a&&(this.shm.loadDefaultShapes(this.ms),this.clearRepaintManager(-1))},
"~B");c(b,"setParallel",function(a){return this.$isParallel=this.g.multiProcessor&&a},"~B");c(b,"isParallel",function(){return this.g.multiProcessor&&this.$isParallel});c(b,"undoMoveAction",function(a,b){return this.g.preserveState?this.getStateCreator().undoMoveAction(a,b):0},"~N,~N");c(b,"undoMoveActionClear",function(a,b,c){this.g.preserveState&&null==this.getOperativeSymmetry()&&this.getStateCreator().undoMoveActionClear(a,b,c)},"~N,~N,~B");c(b,"moveAtomWithHydrogens",function(a,b,c,e,f,j){this.stopMinimization();
var g=null!=f&&0==b,l=this.ms.at[a];null==j&&(j=JU.BSUtil.newAndSetBit(a),(null==this.getOperativeSymmetry()||this.isModelKitOpen()&&!this.modelkit.hasConstraint(a,!0,!1))&&!g&&this.ms.addConnectedHAtoms(l,j));return this.moveSelected(b,c,e,-2147483648,-2147483648,j,l,f,!0,!0,0)},"~N,~N,~N,~N,JU.P3,JU.BS");c(b,"isModelPDB",function(a){return this.ms.am[a].isBioModel},"~N");g(b,"deleteMeasurement",function(a){this.setShapeProperty(6,"delete",Integer.$valueOf(a))},"~N");g(b,"getSmiles",function(a){return this.getSmilesOpt(a,
-1,-1,16|(null==a&&JU.Logger.debugging?131072:0),null)},"JU.BS");g(b,"getOpenSmiles",function(a){return this.getSmilesOpt(a,-1,-1,5|(null==a&&JU.Logger.debugging?131072:0),"/open///")},"JU.BS");c(b,"getBioSmiles",function(a){return this.getSmilesOpt(a,-1,-1,24117248|(JU.Logger.debugging?131072:0),null)},"JU.BS");c(b,"getSmilesOpt",function(a,b,c,e,f){var j=17825792==(e&17825792)?JV.Viewer.getJmolVersion()+" "+this.getModelName(this.am.cmi):f,g=this.ms.at;null==a&&(0>b||0>c?a=this.bsA():(1048576==
(e&1048576)&&(b>c&&(a=b,b=c,c=a),b=g[b].group.firstAtomIndex,c=g[c].group.lastAtomIndex),a=new JU.BS,a.setBits(b,c+1)));e|=this.isModel2D(a)?134217728:0;b=this.getSmilesMatcher();return JV.JC.isSmilesCanonical(f)?(e=b.getSmiles(g,this.ms.ac,a,"/noAromatic/",e),this.getChemicalInfo(e,"smiles",null).trim()):b.getSmiles(g,this.ms.ac,a,j,e)},"JU.BS,~N,~N,~N,~S");c(b,"isModel2D",function(a){a=this.getModelForAtomIndex(a.nextSetBit(0));return null!=a&&"2D".equals(a.auxiliaryInfo.get("dimension"))},"JU.BS");
c(b,"alert",function(a){this.prompt(a,null,null,!0)},"~S");c(b,"prompt",function(a,b,c,e){return this.$isKiosk?"null":this.apiPlatform.prompt(a,b,c,e)},"~S,~S,~A,~B");c(b,"dialogAsk",function(a,b){return prompt(a,b)},"~S,~S,java.util.Map");c(b,"initializeExporter",function(a){var b=a.get("type").equals("JS");if(b){if(null!=this.jsExporter3D)return this.jsExporter3D.initializeOutput(this,this.privateKey,a),this.jsExporter3D}else{var c=a.get("fileName"),e=a.get("fullPath"),c=this.getOutputChannel(c,
e);if(null==c)return null;a.put("outputChannel",c)}c=J.api.Interface.getOption("export.Export3D",this,"export");if(null==c)return null;a=c.initializeExporter(this,this.privateKey,this.gdata,a);b&&null!=a&&(this.jsExporter3D=c);return null==a?null:c},"java.util.Map");c(b,"getMouseEnabled",function(){return this.refreshing&&!this.creatingImage});g(b,"calcAtomsMinMax",function(a,b){this.ms.calcAtomsMinMax(a,b)},"JU.BS,JU.BoxInfo");c(b,"getObjectMap",function(a,b){switch(b.charCodeAt(0)){case 123:null!=
this.getScriptManager()&&(null!=this.definedAtomSets&&a.putAll(this.definedAtomSets),JS.T.getTokensType(a,2097152));break;case 36:case 48:this.shm.getObjectMap(a,"$"==b)}},"java.util.Map,~S");c(b,"setPicked",function(a,b){var c=null,e=null;0<=a&&(b&&this.setPicked(-1,!1),this.g.setI("_atompicked",a),c=this.g.getParam("picked",!0),e=this.g.getParam("pickedList",!0));if(null==c||10!=c.tok)c=JS.SV.newV(10,new JU.BS),e=JS.SV.getVariableList(new JU.Lst),this.g.setUserVariable("picked",c),this.g.setUserVariable("pickedList",
e);0>a||(JS.SV.getBitSet(c,!1).set(a),c=e.pushPop(null,null),10==c.tok&&e.pushPop(null,c),(10!=c.tok||!c.value.get(a))&&e.pushPop(null,JS.SV.newV(10,JU.BSUtil.newAndSetBit(a))))},"~N,~B");g(b,"runScript",function(a){return""+this.evaluateExpression(u(-1,[u(-1,[JS.T.tokenScript,JS.T.tokenLeftParen,JS.SV.newS(a),JS.T.tokenRightParen])]))},"~S");g(b,"runScriptCautiously",function(a){var b=new JU.SB;try{if(null==this.getScriptManager())return null;this.eval.runScriptBuffer(a,b,!1)}catch(c){if(D(c,Exception))return this.eval.getErrorMessage();
throw c;}return b.toString()},"~S");c(b,"setFrameDelayMs",function(a){this.ms.setFrameDelayMs(a,this.getVisibleFramesBitSet())},"~N");c(b,"getBaseModelBitSet",function(){return this.ms.getModelAtomBitSetIncludingDeleted(this.getJDXBaseModelIndex(this.am.cmi),!0)});c(b,"clearTimeouts",function(){null!=this.timeouts&&J.thread.TimeoutThread.clear(this.timeouts)});c(b,"setTimeout",function(a,b,c){this.haveDisplay&&(!this.headless&&!this.autoExit)&&(null==a?this.clearTimeouts():(null==this.timeouts&&(this.timeouts=
new java.util.Hashtable),J.thread.TimeoutThread.setTimeout(this,this.timeouts,a,b,c)))},"~S,~N,~S");c(b,"triggerTimeout",function(a){this.haveDisplay&&null!=this.timeouts&&J.thread.TimeoutThread.trigger(this.timeouts,a)},"~S");c(b,"clearTimeout",function(a){this.setTimeout(a,0,null)},"~S");c(b,"showTimeout",function(a){return this.haveDisplay?J.thread.TimeoutThread.showTimeout(this.timeouts,a):""},"~S");c(b,"getOrCalcPartialCharges",function(a,b){null==a&&(a=this.bsA());a=JU.BSUtil.copy(a);JU.BSUtil.andNot(a,
b);JU.BSUtil.andNot(a,this.ms.bsPartialCharges);a.isEmpty()||this.calculatePartialCharges(a);return this.ms.getPartialCharges()},"JU.BS,JU.BS");c(b,"calculatePartialCharges",function(a){if(null==a||a.isEmpty())a=this.getFrameAtoms();a.isEmpty()||(JU.Logger.info("Calculating MMFF94 partial charges for "+a.cardinality()+" atoms"),this.getMinimizer(!0).calculatePartialCharges(this.ms,a,null))},"JU.BS");c(b,"setCurrentModelID",function(a){var b=this.am.cmi;0<=b&&this.ms.setInfo(b,"modelID",a)},"~S");
c(b,"cacheClear",function(){this.fm.cacheClear();this.ligandModels=this.ligandModelSet=null;this.ms.clearCache();this.cm.ce.clearCache()});c(b,"cachePut",function(a,b){JU.Logger.info("Viewer cachePut "+a);this.fm.cachePut(a,b)},"~S,~O");c(b,"cacheFileByName",function(a,b){return null==a?(this.cacheClear(),-1):this.fm.cacheFileByNameAdd(a,b)},"~S,~B");c(b,"clearThreads",function(){null!=this.eval&&this.eval.stopScriptThreads();this.stopMinimization();this.tm.clearThreads();this.setAnimationOn(!1)});
c(b,"getEvalContextAndHoldQueue",function(a){if(null==a||!JV.Viewer.isJS&&!this.testAsync)return null;a.pushContextDown("getEvalContextAndHoldQueue");a=a.getThisContext();a.setMustResume();this.queueOnHold=a.isJSThread=!0;return a},"J.api.JmolScriptEvaluator");c(b,"getDefaultPropertyParam",function(a){return this.getPropertyManager().getDefaultPropertyParam(a)},"~N");c(b,"getPropertyNumber",function(a){return this.getPropertyManager().getPropertyNumber(a)},"~S");c(b,"checkPropertyParameter",function(a){return this.getPropertyManager().checkPropertyParameter(a)},
"~S");c(b,"extractProperty",function(a,b,c){return this.getPropertyManager().extractProperty(a,b,c,null,!1)},"~O,~O,~N");c(b,"addHydrogens",function(a,b){var c=1==(b&1),e=8==(b&8),f=null==a;null==a&&(a=this.getModelUndeletedAtomsBitSet(this.getVisibleFramesBitSet().length()-1));var j=new JU.BS;if(a.isEmpty())return j;var g=new JU.Lst,f=this.getAdditionalHydrogens(a,g,b|(f?256:0)),l=!1,l=this.g.appendNew;if(0<f.length){this.clearModelDependentObjects();try{j=e&&g.get(0).mi==this.ms.mc-1?this.ms.addHydrogens(g,
f):this.addHydrogensInline(a,g,f,null),this.setModelkitPropertySafely("updateatomkeys",a)}catch(s){if(D(s,Exception))System.out.println(s.toString());else throw s;}l&&(this.g.appendNew=!0)}c||this.scriptStatus(J.i18n.GT.i(J.i18n.GT.$("{0} hydrogens added"),f.length));return j},"JU.BS,~N");c(b,"addHydrogensInline",function(a,b,c,e){return null==this.getScriptManager()?null:this.scm.addHydrogensInline(a,b,c,e)},"JU.BS,JU.Lst,~A,java.util.Map");g(b,"evalFunctionFloat",function(a,b,c){return null==this.getScriptManager()?
0:this.eval.evalFunctionFloat(a,b,c)},"~O,~O,~A");c(b,"evalParallel",function(a,b){this.displayLoadErrors=!1;var c=null!=this.getScriptManager()&&this.eval.evalParallel(a,null==b?this.shm:b);this.displayLoadErrors=!0;return c},"JS.ScriptContext,JV.ShapeManager");g(b,"evaluateExpression",function(a){return null==this.getScriptManager()?null:this.eval.evaluateExpression(a,!1,!1)},"~O");g(b,"evaluateExpressionAsVariable",function(a){return null==this.getScriptManager()?null:this.eval.evaluateExpression(a,
!0,!1)},"~O");c(b,"getAtomBitSet",function(a){if(C(a,"JU.BS"))return this.slm.excludeAtoms(a,!1);this.getScriptManager();return this.getAtomBitSetEval(this.eval,a)},"~O");c(b,"getScriptContext",function(a){return null==this.getScriptManager()?null:this.eval.getScriptContext(a)},"~S");c(b,"getAtomDefs",function(a){var b=new JU.Lst,c;for(a=a.entrySet().iterator();a.hasNext()&&((c=a.next())||1);)C(c.getValue(),"JU.BS")&&b.addLast("{"+c.getKey()+"} <"+c.getValue().cardinality()+" atoms>\n");c=b.size();
a=Array(c);b.toArray(a);java.util.Arrays.sort(a);for(var b=new JU.SB,e=0;e<c;e++)b.append(a[e]);return b.append("\n").toString()},"java.util.Map");c(b,"setCGO",function(a){this.shm.loadShape(23);this.shm.setShapePropertyBs(23,"setCGO",a,null)},"java.util.Map");c(b,"setModelSet",function(a){this.ms=this.mm.modelSet=a},"JM.ModelSet");c(b,"setObjectProp",function(a,b){this.getScriptManager();null==a&&(a="*");return null==this.eval?null:this.eval.setObjectPropSafe(a,b)},"~S,~N");c(b,"setDihedrals",function(a,
b,c){null==b&&(b=this.ms.getBsBranches(a));this.ms.setDihedrals(a,b,c)},"~A,~A,~N");c(b,"getChainID",function(a,b){var c=this.chainMap.get(a);if(null!=c)return c.intValue();var e=a.charAt(0).charCodeAt(0);if(1<a.length)e=300+this.chainList.size();else if((b||this.chainCaseSpecified)&&97<=e&&122>=e)e+=159;if(256<=e){c=this.chainMap.get(a);if(null!=c)return c.intValue();this.chainCaseSpecified=(new Boolean(this.chainCaseSpecified|b)).valueOf();this.chainList.addLast(a)}c=Integer.$valueOf(e);this.chainMap.put(c,
a);this.chainMap.put(a,c);return e},"~S,~B");c(b,"getChainIDStr",function(a){return this.chainMap.get(Integer.$valueOf(a))},"~N");c(b,"getScriptQueueInfo",function(){return null!=this.scm&&this.scm.isQueueProcessing()?Boolean.TRUE:Boolean.FALSE});c(b,"getNMRCalculation",function(){return null==this.nmrCalculation?(this.nmrCalculation=J.api.Interface.getOption("quantum.NMRCalculation",this,"script")).setViewer(this):this.nmrCalculation});c(b,"getDistanceUnits",function(a){null==a&&(a=this.getDefaultMeasurementLabel(2));
var b=a.indexOf("//");return 0>b?this.g.measureDistanceUnits:a.substring(b+2)},"~S");c(b,"calculateFormalCharges",function(a){return this.ms.fixFormalCharges(null==a?this.bsA():a)},"JU.BS");c(b,"setModulation",function(a,b,c,e){e&&this.g.setO("_modt",JU.Escape.eP(c));this.ms.setModulation(null==a?this.getAllAtoms():a,b,c,e);this.refreshMeasures(!0)},"JU.BS,~B,JU.P3,~B");c(b,"checkInMotion",function(a){switch(a){case 0:this.setTimeout("_SET_IN_MOTION_",0,null);break;case 1:this.inMotion||this.setTimeout("_SET_IN_MOTION_",
2*this.g.hoverDelayMs,"!setInMotion");break;case 2:this.setInMotion(!0),this.refresh(3,"timeoutThread set in motion")}},"~N");c(b,"checkMotionRendering",function(a){if(!this.getInMotion(!0)&&!this.tm.spinOn&&!this.tm.vibrationOn&&!this.am.animationOn)return!0;if(this.g.wireframeRotation)return!1;var b=0;switch(a){case 1677721602:case 1153433601:b=2;break;case 1112150020:b=3;break;case 1112150021:b=4;break;case 1112152066:b=5;break;case 1073742018:b=6;break;case 1111490588:b=7;break;case 603979786:b=
8}return this.g.platformSpeed>=b},"~N");c(b,"openExportChannel",function(a,b,c){return this.getOutputManager().openOutputChannel(a,b,c,!1)},"~N,~S,~B");g(b,"log",function(a){null!=a&&this.getOutputManager().logToFile(a)},"~S");c(b,"getLogFileName",function(){return null==this.logFileName?"":this.logFileName});c(b,"getCommands",function(a,b,c){return this.getStateCreator().getCommands(a,b,c)},"java.util.Map,java.util.Map,~S");c(b,"allowCapture",function(){return!this.isApplet||this.isSignedApplet});
c(b,"compileExpr",function(a){var b=null==this.getScriptManager()?null:this.eval.evaluateExpression(a,!1,!0);return C(b,Array)?b:u(-1,[JS.T.o(4,a)])},"~S");c(b,"checkSelect",function(a,b){return null!=this.getScriptManager()&&this.eval.checkSelect(a,b)},"java.util.Map,~A");c(b,"getAnnotationInfo",function(a,b,c){return this.getAnnotationParser(1111490587==c).getAnnotationInfo(this,a,b,c,this.am.cmi)},"JS.SV,~S,~N");c(b,"getAtomValidation",function(a,b){return this.getAnnotationParser(!1).getAtomValidation(this,
a,b)},"~S,JM.Atom");c(b,"dragMinimizeAtom",function(a){this.stopMinimization();var b=0,c=this.getOperativeSymmetry();null!=c&&(b=256);c=0!=b?null:this.getMotionFixedAtoms(c,null).isEmpty()?this.ms.getAtoms(this.ms.isAtomPDB(a)?1086324742:1094713360,JU.BSUtil.newAndSetBit(a)):JU.BSUtil.setAll(this.ms.ac);try{this.minimize(this.eval,2147483647,0,c,null,null,0,b)}catch(e){if(D(e,Exception)){if(this.async){var f=(W("JV.Viewer$1")?0:JV.Viewer.$Viewer$1$(),Y(JV.Viewer$1,this,Ia("me",this,"iAtom",a)));setTimeout(function(){f.run()},
100)}}else throw e;}},"~N");c(b,"getJBR",function(){return null==this.jbr?this.jbr=J.api.Interface.getInterface("JM.BioResolver",this,"file").setViewer(this):this.jbr});c(b,"checkMenuUpdate",function(){null!=this.jmolpopup&&this.jmolpopup.jpiUpdateComputedMenus()});c(b,"getChimeMessenger",function(){return null==this.jcm?this.jcm=J.api.Interface.getInterface("JV.ChimeMessenger",this,"script").set(this):this.jcm});c(b,"getModelSetAuxiliaryInfoForAtoms",function(a){return this.ms.getModelSetAuxiliaryInfo(this.ms.getModelBS(this.getAtomBitSet(a),
!1))},"~O");c(b,"getJSJSONParser",function(){return null==this.jsonParser?this.jsonParser=J.api.Interface.getInterface("JU.JSJSONParser",this,"script"):this.jsonParser});c(b,"parseJSON",function(a){return null==a?null:(a=a.trim()).startsWith("{")?this.parseJSONMap(a):this.parseJSONArray(a)},"~S");c(b,"parseJSONMap",function(a){return this.getJSJSONParser().parseMap(a,!0)},"~S");c(b,"parseJSONArray",function(a){return this.getJSJSONParser().parse(a,!0)},"~S");c(b,"getSymTemp",function(){return J.api.Interface.getSymmetry(this,
"temp")});c(b,"getSymStatic",function(){return null==this.symStatic?this.symStatic=J.api.Interface.getSymmetry(this,"static"):this.symStatic});c(b,"setWindowDimensions",function(a){this.resizeInnerPanel(F(a[0]),F(a[1]))},"~A");c(b,"getTriangulator",function(){return null==this.triangulator?this.triangulator=J.api.Interface.getUtil("Triangulator",this,"script"):this.triangulator});c(b,"getCurrentModelAuxInfo",function(){return 0<=this.am.cmi?this.ms.getModelAuxiliaryInfo(this.am.cmi):null});c(b,"startNBO",
function(a){var b=new java.util.Hashtable;b.put("service","nbo");b.put("action","showPanel");b.put("options",a);this.sm.processService(b)},"~S");c(b,"startPlugin",function(a){"nbo".equalsIgnoreCase(a)&&this.startNBO("all")},"~S");c(b,"connectNBO",function(a){0>this.am.cmi||this.getNBOParser().connectNBO(this.am.cmi,a)},"~S");c(b,"getNBOParser",function(){return null==this.nboParser?this.nboParser=J.api.Interface.getInterface("J.adapter.readers.quantum.NBOParser",this,"script").set(this):this.nboParser});
c(b,"getNBOAtomLabel",function(a){return this.getNBOParser().getNBOAtomLabel(a)},"JM.Atom");c(b,"calculateChirality",function(a){null==a&&(a=this.bsA());return this.ms.calculateChiralityForAtoms(a,!0)},"JU.BS");c(b,"getSubstructureSetArray",function(a,b,c){return this.getSmilesMatcher().getSubstructureSetArray(a,this.ms.at,this.ms.ac,b,null,c)},"~O,JU.BS,~N");c(b,"getSubstructureSetArrayForNodes",function(a,b,c){return this.getSmilesMatcher().getSubstructureSetArray(a,b,b.length,null,null,c)},"~O,~A,~N");
c(b,"getSmilesAtoms",function(a){return this.getSmilesMatcher().getAtoms(a)},"~S");c(b,"calculateChiralityForSmiles",function(a){try{return J.api.Interface.getSymmetry(this,"smiles").calculateCIPChiralityForSmiles(a)}catch(b){if(D(b,Exception))return null;throw b;}},"~S");c(b,"getPdbID",function(){return this.ms.getInfo(this.am.cmi,JV.JC.getBoolName(4))===Boolean.TRUE?this.ms.getInfo(this.am.cmi,"pdbID"):null});c(b,"getModelInfo",function(a){return this.ms.getInfo(this.am.cmi,a)},"~S");c(b,"notifyScriptEditor",
function(a,b){null!=this.scriptEditor&&this.scriptEditor.notify(a,b)},"~N,~A");c(b,"sendConsoleMessage",function(a){null!=this.appConsole&&this.appConsole.sendConsoleMessage(a)},"~S");c(b,"getModelkitPropertySafely",function(a){return null==this.modelkit?null:null==a?Boolean.TRUE:this.modelkit.getProperty(a)},"~S");c(b,"setModelkitPropertySafely",function(a,b){return null==this.modelkit?null:this.modelkit.setProperty(a,b)},"~S,~O");c(b,"isModelKitOption",function(a,b){return null!=this.modelkit&&
this.modelkit.checkOption(a,b)},"~S,~S");c(b,"getSymmetryInfo",function(a,b,c,e,f,j,g,l,s,m,p,n){try{return this.getSymTemp().getSymmetryInfoAtom(this.ms,a,b,c,e,f,j,l,g,s,m,p,n)}catch(q){if(D(q,Exception))return System.out.println("Exception in Viewer.getSymmetryInfo: "+q),JV.Viewer.isJS||q.printStackTrace(),null;throw q;}},"~N,~S,~N,JU.P3,JU.P3,JU.P3,~N,~S,~N,~N,~N,~A");c(b,"getMacro",function(a){if(null==this.macros||this.macros.isEmpty())try{var b=this.getAsciiFileOrNull(this.g.macroDirectory+
"/macros.json");this.macros=this.parseJSON(b)}catch(c){if(D(c,Exception))this.macros=new java.util.Hashtable;else throw c;}if(null==a){var b=new JU.SB,e;for(a=this.macros.keySet().iterator();a.hasNext()&&((e=a.next())||1);){var f=this.macros.get(e);b.append(e).append("\t").appendO(f).append("\n")}return b.toString()}a=a.toLowerCase();return this.macros.containsKey(a)?this.macros.get(a).get("path").toString():null},"~S");c(b,"getConsoleFontScale",function(){return this.consoleFontScale});c(b,"setConsoleFontScale",
function(a){this.consoleFontScale=a},"~N");c(b,"confirm",function(a,b){return this.apiPlatform.confirm(a,b)},"~S,~S");c(b,"evalStringGUI",function(a){this.evalStringQuiet(a+"; ## GUI ##")},"~S");c(b,"selectStatus",function(a,b,c,e,f){this.select(a,b,c,e);f&&this.setStatusSelect(a)},"JU.BS,~B,~N,~B,~B");c(b,"setStatusSelect",function(a){this.hasSelected=!1;this.sm.setStatusSelect(null==a?this.bsA():a)},"JU.BS");c(b,"wasmInchiHack",function(a){(JV.Viewer.isJS&&(0<=a.indexOf("inchi")||0<=a.indexOf("INCHI"))||
0<=a.indexOf("TAUTOMER")||0<=a.indexOf("tautomer"))&&this.getInchi(null,null,null);return a},"~S");c(b,"getInchi",function(a,b,c){try{var e=this.apiPlatform.getInChI();if(null==a&&null==b)return"";if("string"==typeof b){var f=b;f.startsWith("$")||f.startsWith(":")?b=this.getFileAsString4(f,-1,!1,!1,!0,"script"):!f.startsWith("InChI=")&&0>f.indexOf(" ")&&(f=this.setLoadFormat(!1,"$"+b,"$",!1),b=this.getFileAsString4(f,-1,!1,!1,!0,"script"))}return e.getInchi(this,a,b,c)}catch(j){return""}},"JU.BS,~O,~S");
c(b,"findSpaceGroup",function(a,b,c,e,f,j,g){var l=null;if(null==b&&null==c||0!=(g&2))b=this.getThisModelAtoms();null==c?b.isEmpty()||(a=null==a?this.getOperativeSymmetry():a,l=null==a?null:a.findSpaceGroup(this,b,null,e,null,j,g)):l=this.getSymTemp().findSpaceGroup(this,b,c,e,f,j,g);return null==l&&0!=(g&1)?"":l},"J.api.SymmetryInterface,JU.BS,~S,~A,JU.T3,~A,~N");c(b,"restrictToModel",function(a,b){null==a&&(a=this.bsA());var c=a.isEmpty();if(c&&0<=b)return a;-1==b&&(b=this.am.cmi);if(0>b){if(c)return this.getThisModelAtoms();
b=this.ms.at[a.nextSetBit(0)].getModelIndex()}c=this.getModelUndeletedAtomsBitSet(b);c.and(a);return c},"JU.BS,~N");c(b,"getThisModelAtoms",function(){return this.getModelUndeletedAtomsBitSet(this.getVisibleFramesBitSet().nextSetBit(0))});c(b,"getSymmetryEquivPoints",function(a,b){var c=this.getCurrentUnitCell();return null==c?new JU.Lst:c.getEquivPoints(null,a,b)},"JU.P3,~S");c(b,"getSymmetryEquivPointList",function(a,b){var c=this.getCurrentUnitCell();if(null==c)return new JU.Lst;c.getEquivPointList(a,
0,b.toLowerCase(),null);return a},"JU.Lst,~S");c(b,"getOperativeSymmetry",function(){var a=this.getCurrentUnitCell();return null==a||null==a.getSymmetryOperations()?null:a});c(b,"formatText",function(a){if(0>a.indexOf("@{")&&0>a.indexOf("%{"))return a;var b=a,c=0<=b.indexOf("\\");c&&(b=JU.PT.rep(b,"\\%","\u0001"),b=JU.PT.rep(b,"\\@","\u0002"),c=!b.equals(a));for(var b=JU.PT.rep(b,"%{","@{"),e;0<=(a=b.indexOf("@{"));){a++;var f=a+1;e=b.length;for(var j=1,g="\x00",l="\x00";0<j&&++a<e;){var s=b.charAt(a);
if("\x00"!=g)"\\"==l?s="\x00":s==g&&(g="\x00"),l=s;else switch(s.charCodeAt(0)){case 39:case 34:g=s;break;case 123:j++;break;case 125:j--}}if(a>=e)return b;e=b.substring(f,a);if(0==e.length)return b;e=this.evaluateExpression(e);C(e,"JU.P3")&&(e=JU.Escape.eP(e));b=b.substring(0,f-2)+e.toString()+b.substring(a+1)}c&&(b=JU.PT.rep(b,"\u0002","@"),b=JU.PT.rep(b,"\u0001","%"));return b},"~S");c(b,"getScaleText",function(a,b,c,e){a=JM.Measurement.fixUnits(0<a.length?(a.startsWith("//")?a.substring(2):a).toLowerCase():
this.g.measureDistanceUnits.equals("vdw")?"angstroms":this.g.measureDistanceUnits);0==JM.Measurement.fromUnits(1,a)&&(a=JM.Measurement.fixUnits(this.g.measureDistanceUnits));if(null==e)return a;var f=this.tm.modelRadius*this.tm.scaleDefaultPixelsPerAngstrom/this.tm.scalePixelsPerAngstrom/4,j=b?2:1,g=0,l=b=0,s=0;for(c=2*(c*this.imageFontScaling/j);b<c;)l=JM.Measurement.toUnits(f,a,!1),g=v(Math.floor(Math.log10(l))),s=Math.pow(10,g),l=JM.Measurement.fromUnits(s+1E-6,a),b=F(l*this.tm.scalePixelsPerAngstrom/
j),b<c&&(f*=10);c=0<=g?" "+F(s)+" ":" 0."+"000000000".substring(0,-1-g)+"1 ";e[0]=b;e[1]=l;return c+a},"~S,~B,~N,~A");c(b,"setStatusAtomMoved",function(a,b){a&&this.checkMinimization();this.sm.setStatusAtomMoved(b)},"~B,JU.BS");c(b,"getFormulaForAtoms",function(a,b,c){return JU.JmolMolecule.getMolecularFormulaAtoms(this.ms.at,a,"CELLFORMULA".equals(b)?this.ms.getCellWeights(a):null,c)},"JU.BS,~S,~B");c(b,"evalCallback",function(a,b,c){null!=this.getScriptManager()&&this.scm.evalCallback(a,b,c)},"~S,~A,~B");
c(b,"checkConsoleScript",function(a){return 0==a.indexOf("JSCONSOLE")?(this.html5Applet._showInfo(0>a.indexOf("CLOSE")),0<=a.indexOf("CLEAR")&&this.html5Applet._clearConsole(),!0):!1},"~S");c(b,"haveAccessInternal",function(a){if(null==a)return this.access===JV.Viewer.ACCESS.INTERNAL;if(JV.Viewer.isJS)return!0;a=a.$replace("\\","/");var b=this.access!==JV.Viewer.ACCESS.NONE&&(null==this.internalAccessPath||this.access!==JV.Viewer.ACCESS.INTERNAL||a.startsWith(this.internalAccessPath));b||System.err.println("Viewer: Internal file access in "+
this.internalAccessPath+" denied for "+a);return b},"~S");c(b,"setAccessInternal",function(a){JV.Viewer.isJS||(null==a?this.access=this.access0:this.access!==JV.Viewer.ACCESS.INTERNAL&&(this.access=JV.Viewer.ACCESS.INTERNAL),this.internalAccessPath=a)},"~S");c(b,"getItaNumberFor",function(a){a=this.getSymStatic().getSpaceGroupInfoObj("itaNumber",a,!1,!1);return null==a?-1:JU.PT.parseInt(a)},"~S");c(b,"is2D",function(){return this.getBoolean(603979882)});c(b,"getUnitCellCenter",function(){var a=this.getCurrentUnitCell();
return null==a?new JU.P3:a.getUnitCellCenter()});c(b,"setUnitCellAtomIndex",function(a){var b=this.getCurrentUnitCell();null!=b&&b.setOffsetPt(new JU.P3);this.am.setUnitCellAtomIndex(a)},"~N");c(b,"getUnitCellAtomIndex",function(){return this.am.getUnitCellAtomIndex()});c(b,"writeBinaryFile",function(a,b){var c=new java.util.Hashtable,e=new JU.Lst;e.addLast(b);c.put("imageData",e);c.put("fileName",a);c.put("type","BINARY");return this.getOutputManager().outputToFile(c)},"~S,~A");c(b,"rotateModelSpinVectors",
function(a,b){0>a&&(a=this.am.cmi);0>a||a>=this.ms.mc||(null==b&&this.tm.setSpinOff(),this.ms.rotateModelSpinVectors(a,b))},"~N,JU.M3");b.$Viewer$1$=function(){var a=qa(JV,"Viewer$1",null,Runnable);g(a,"run",function(){this.f$.me.dragMinimizeAtom(this.f$.iAtom)})};var a=G(JV.Viewer,"ACCESS",Enum);B(a,"NONE",0,[]);B(a,"READSPT",1,[]);B(a,"ALL",2,[]);B(a,"INTERNAL",3,[]);self.Jmol&&Jmol.extend&&Jmol.extend("vwr",JV.Viewer.prototype);b.isJS=!1;b.isSwingJS=!1;b.appletDocumentBase="";b.appletCodeBase=
"";b.appletIdiomaBase=null;b.jsDocumentBase="";b.jmolObject=null;b.strJavaVendor="Java: "+System.getProperty("java.vendor","j2s");b.strOSName=System.getProperty("os.name","");b.strJavaVersion="Java "+System.getProperty("java.version","");b.version_date=null;b.staticFunctions=new java.util.Hashtable;b.nProcessors=1;b.isHighPrecision=!1});n("J.api");K(J.api,"JmolJDXMOLParser");n("J.api");K(J.api,"JmolJDXMOLReader");n("J.jsv");z(["J.api.JmolJDXMOLParser"],"J.jsv.JDXMOLParser","java.util.Hashtable JU.BS $.Lst $.PT $.SB JU.Logger".split(" "),
function(){var b=w(function(){this.line=null;this.lastModel="";this.baseModel=this.thisModelID=null;this.vibScale=0;this.loader=this.piUnitsY=this.piUnitsX=null;this.modelIdList="";this.peakFilePath=this.peakIndex=null;q(this,arguments)},J.jsv,"JDXMOLParser",null,J.api.JmolJDXMOLParser);g(b,"set",function(a,b,c){this.loader=a;this.peakFilePath=b;this.peakIndex=E(1,0);null!=c&&(c.remove("modelNumber"),c.containsKey("zipSet")&&(this.peakIndex=c.get("peakIndex"),null==this.peakIndex&&(this.peakIndex=
E(1,0),c.put("peakIndex",this.peakIndex)),c.containsKey("subFileName")||(this.peakFilePath=JU.PT.split(b,"|")[0])));return this},"J.api.JmolJDXMOLReader,~S,java.util.Map");g(b,"getAttribute",function(a,b){var c=JU.PT.getQuotedAttribute(a,b);return null==c?"":c},"~S,~S");g(b,"getRecord",function(a){if(null==this.line||0>this.line.indexOf(a))return null;for(a=this.line;0>a.indexOf(">");)a+=" "+this.readLine();return this.line=a},"~S");g(b,"readModels",function(){if(!this.findRecord("Models"))return!1;
this.thisModelID=this.line="";for(var a=!0;;){this.line=this.loader.discardLinesUntilNonBlank();if(null==this.getRecord("<ModelData"))break;this.getModelData(a);a=!1}return!0});g(b,"readACDMolFile",function(){var a=new JU.SB;for(a.append(this.line.substring(this.line.indexOf("=")+1)).appendC("\n");null!=this.readLine()&&!this.line.contains("$$$$");)a.append(this.line).appendC("\n");return JU.PT.rep(a.toString(),"  $$ Empty String","")});g(b,"readACDAssignments",function(a,b){var c=new JU.Lst;try{this.readLine();
0>a&&(a=2147483647);for(var g=0;g<a;g++){var e=this.readLine();if(null==e||0==e.indexOf("#"))break;if(b){for(;0>e.indexOf(">");)e+=" "+this.readLine();e=e.trim()}e=JU.PT.replaceAllCharacters(e,"()<>"," ").trim();if(0==e.length)break;var f=e.indexOf("'");if(0<=f)var j=e.indexOf("'",f+1),e=e.substring(0,f)+JU.PT.rep(e.substring(f+1,j),",",";")+e.substring(j+1);JU.Logger.info("Peak Assignment: "+e);var k=JU.PT.split(e,",");c.addLast(k)}}catch(l){if(D(l,Exception))JU.Logger.error("Error reading peak assignments at "+
this.line+": "+l);else throw l;}return c},"~N,~B");g(b,"setACDAssignments",function(a,b,c,g,e){try{0<=c&&(this.peakIndex=E(-1,[c]));var f=0==b.indexOf("MASS"),j=" file="+JU.PT.esc(this.peakFilePath.$replace("\\","/"));a=" model="+JU.PT.esc(a+" (assigned)");this.piUnitsY=this.piUnitsX="";var k=this.getACDPeakWidth(b)/2,l=new java.util.Hashtable,s=new JU.Lst;c=null;var m,p,n=0;if(f){c=new java.util.Hashtable;for(var q=JU.PT.split(e,"M  ZZC"),u=q.length;1<=--u;){var v=JU.PT.getTokens(q[u]),n=Math.max(n,
JU.PT.parseInt(v[0]));c.put(v[1],v[0])}m=4;p=0}else 0<=b.indexOf("NMR")?(m=0,p=3):(m=0,p=2);for(var w=g.size(),u=0;u<w;u++){var x=g.get(u),z=JU.PT.parseFloat(x[m]),B=x[p],B=f?this.fixACDAtomList(B,c,n):B.$replace(";",",");if(0<=B.indexOf("select")){var C=B.indexOf("select atomno=");if(0>C)continue;B=JU.PT.split(B.substring(C+14)," ")[0]}var F=f?"m/z="+Math.round(z)+": "+x[2]+" ("+x[1]+")":2==p?""+Math.round(10*z)/10:null;this.getStringInfo(j,F,b,a,B,l,""+z,s,' atoms="%ATOMS%" xMin="'+(z-k)+'" xMax="'+
(z+k)+'">')}return this.setPeakData(s,0)}catch(G){if(D(G,Exception))return 0;throw G;}},"~S,~S,~N,JU.Lst,~S");c(b,"fixACDAtomList",function(a,b,c){a=a.trim();a=JU.PT.getTokens(a.$replace(";"," "));for(var g=new JU.BS,e=!1,f=0;f<a.length;f++){var j=a[f];(e=0<=j.indexOf("M"))&&(j="1-"+c);var k=j.indexOf("-");if(0<=k)for(var l=JU.PT.parseInt(j.substring(0,k)),j=JU.PT.parseInt(j.substring(k+1))+1;l<j;l++)g.set(e?l:JU.PT.parseInt(b.get(""+l)));else g.set(JU.PT.parseInt(b.get(j)))}b=g.toJSON();return b.substring(1,
b.length-1)},"~S,java.util.Map,~N");c(b,"getACDPeakWidth",function(a){return 0<=a.indexOf("HNMR")?0.05:0<=a.indexOf("CNMR")?1:0<=a.indexOf("MASS")?1:10},"~S");g(b,"readPeaks",function(a,b){try{0<=b&&(this.peakIndex=E(-1,[b]));var c=a?1:0,g=a?"Signals":"Peaks",e=a?"<Signal":"<PeakData";if(!this.findRecord(g))return 0;var f=" file="+JU.PT.esc(this.peakFilePath.$replace("\\","/")),j=JU.PT.getQuotedAttribute(this.line,"model"),j=" model="+JU.PT.esc(null==j?this.thisModelID:j),k=JU.PT.getQuotedAttribute(this.line,
"type");this.piUnitsX=JU.PT.getQuotedAttribute(this.line,"xLabel");this.piUnitsY=JU.PT.getQuotedAttribute(this.line,"yLabel");for(var l=new java.util.Hashtable,s=new JU.Lst;null!=this.readLine()&&!(this.line=this.line.trim()).startsWith("</"+g);)if(this.line.startsWith(e)){this.getRecord(e);JU.Logger.info(this.line);var m=JU.PT.getQuotedAttribute(this.line,"title");null==k&&(k=JU.PT.getQuotedAttribute(this.line,"type"));var p=JU.PT.getQuotedAttribute(this.line,"atoms"),n=F(100*JU.PT.parseFloat(JU.PT.getQuotedAttribute(this.line,
"xMin")))+"_"+F(100*JU.PT.parseFloat(JU.PT.getQuotedAttribute(this.line,"xMax")));this.getStringInfo(f,m,k,null==JU.PT.getQuotedAttribute(this.line,"model")?j:"",p,l,n,s,this.line.substring(e.length).trim())}return this.setPeakData(s,c)}catch(q){if(D(q,Exception))return 0;throw q;}},"~B,~N");c(b,"setPeakData",function(a,b){for(var c=0,g=a.size(),e=0;e<g;e++){var f=a.get(e),j=JU.PT.rep(f[0],"%INDEX%",""+ ++this.peakIndex[0]),k=f[1];if(null!=k){for(var f="",l=k.nextSetBit(0);0<=l;l=k.nextSetBit(l+1))f+=
","+(l+b);k=k.cardinality();c+=k;j=JU.PT.rep(j,"%ATOMS%",f.substring(1));j=JU.PT.rep(j,"%S%",1==k?"":"s");j=JU.PT.rep(j,"%NATOMS%",""+k)}JU.Logger.info("adding PeakData "+j);this.loader.addPeakData(j)}this.loader.setSpectrumPeaks(c,this.piUnitsX,this.piUnitsY);return g},"JU.Lst,~N");c(b,"getStringInfo",function(a,b,c,g,e,f,j,k,l){"HNMR".equals(c)?c="1HNMR":"CNMR".equals(c)&&(c="13CNMR");var s=null==c?"":" type="+JU.PT.esc(c);null==b&&(b="1HNMR".equals(c)?"atom%S%: %ATOMS%; integration: %NATOMS%":
"");b=" title="+JU.PT.esc(b);a="<PeakData "+a+' index="%INDEX%"'+b+s+g+" "+l;null!=e&&(a=JU.PT.rep(a,'atoms="'+e+'"','atoms="%ATOMS%"'));b=f.get(j);null==b&&(b=u(-1,[a,null==e?null:new JU.BS]),f.put(j,b),k.addLast(b));null!=e&&(f=b[1],e=e.$replace(","," "),e.equals("*")&&(e="0:1000"),f.or(JU.BS.unescape("({"+e+"})")))},"~S,~S,~S,~S,~S,java.util.Map,~S,JU.Lst,~S");c(b,"getModelData",function(a){this.lastModel=this.thisModelID;this.thisModelID=this.getAttribute(this.line,"id");var b=";"+this.thisModelID+
";";if(0<=this.modelIdList.indexOf(b))this.line=this.loader.discardLinesUntilContains("</ModelData>");else{this.modelIdList+=b;for(this.baseModel=this.getAttribute(this.line,"baseModel");0>this.line.indexOf(">")&&0>this.line.indexOf("type");)this.readLine();b=this.getAttribute(this.line,"type").toLowerCase();this.vibScale=JU.PT.parseFloat(this.getAttribute(this.line,"vibrationScale"));b.equals("xyzvib")?b="xyz":0==b.length&&(b=null);for(var c=new JU.SB;null!=this.readLine()&&!this.line.contains("</ModelData>");)c.append(this.line).appendC("\n");
this.loader.processModelData(c.toString(),this.thisModelID,b,this.baseModel,this.lastModel,NaN,this.vibScale,a)}},"~B");c(b,"findRecord",function(a){null==this.line&&this.readLine();null!=this.line&&0>this.line.indexOf("<"+a)&&(this.line=this.loader.discardLinesUntilContains2("<"+a,"##"));return null!=this.line&&0<=this.line.indexOf("<"+a)},"~S");c(b,"readLine",function(){return this.line=this.loader.rd()});g(b,"setLine",function(a){this.line=a},"~S")});n("JSV.api");K(JSV.api,"AnnotationData");n("JSV.api");
K(JSV.api,"AppletFrame");n("JSV.api");K(JSV.api,"JSVAppInterface",JSV.api.JSVAppletInterface);n("JSV.api");K(JSV.api,"JSVAppletInterface");n("JSV.api");K(JSV.api,"JSVFileHelper");n("JSV.api");K(JSV.api,"JSVMainPanel",JSV.api.JSVViewPanel);n("JSV.api");K(JSV.api,"JSVPanel",JSV.api.JSVViewPanel);n("JSV.api");K(JSV.api,"JSVTree");n("JSV.api");K(JSV.api,"JSVTreeNode");n("JSV.api");K(JSV.api,"JSVTreePath");n("JSV.api");K(JSV.api,"JSVViewPanel");n("JSV.api");K(JSV.api,"JSVZipReader");n("JSV.api");K(JSV.api,
"PanelListener");n("JSV.api");K(JSV.api,"ScriptInterface");n("JSV.app");z(["JSV.api.JSVAppInterface","$.PanelListener","$.ScriptInterface"],"JSV.app.JSVApp","JU.Lst $.PT JSV.common.Coordinate $.JSVFileManager $.JSVersion $.JSViewer $.ScriptToken JU.Logger".split(" "),function(){var b=w(function(){this.appletFrame=null;this.isNewWindow=!1;this.prevPanel=this.vwr=this.syncCallbackFunctionName=this.peakCallbackFunctionName=this.loadFileCallbackFunctionName=this.coordCallbackFunctionName=this.appletReadyCallbackFunctionName=
null;q(this,arguments)},JSV.app,"JSVApp",null,[JSV.api.PanelListener,JSV.api.JSVAppInterface,JSV.api.ScriptInterface]);x(b,function(a,b){this.appletFrame=a;this.initViewer(b);this.initParams(a.getParameter("script"))},"JSV.api.AppletFrame,~B");c(b,"initViewer",function(a){this.vwr=new JSV.common.JSViewer(this,!0,a);this.appletFrame.setDropTargetListener(this.isSigned(),this.vwr);a=this.appletFrame.getDocumentBase();JSV.common.JSVFileManager.setDocumentBase(this.vwr,a)},"~B");g(b,"isPro",function(){return this.isSigned()});
g(b,"isSigned",function(){return!0});c(b,"getAppletFrame",function(){return this.appletFrame});c(b,"dispose",function(){try{this.vwr.dispose()}catch(a){if(D(a,Exception))a.printStackTrace();else throw a;}});g(b,"getPropertyAsJavaObject",function(a){return this.vwr.getPropertyAsJavaObject(a)},"~S");g(b,"getPropertyAsJSON",function(a){return JU.PT.toJSON(null,this.getPropertyAsJavaObject(a))},"~S");g(b,"getCoordinate",function(){return this.vwr.getCoordinate()});g(b,"loadInline",function(a){this.siOpenDataOrFile(a,
"[inline]",null,null,-1,-1,!0,null,null);this.appletFrame.validateContent(3)},"~S");g(b,"exportSpectrum",function(a,b){return this.vwr.$export(a,b)},"~S,~N");g(b,"setFilePath",function(a){this.runScript("load "+JU.PT.esc(a))},"~S");g(b,"setSpectrumNumber",function(a){this.runScript(JSV.common.ScriptToken.SPECTRUMNUMBER+" "+a)},"~N");g(b,"reversePlot",function(){this.toggle(JSV.common.ScriptToken.REVERSEPLOT)});g(b,"toggleGrid",function(){this.toggle(JSV.common.ScriptToken.GRIDON)});g(b,"toggleCoordinate",
function(){this.toggle(JSV.common.ScriptToken.COORDINATESON)});g(b,"togglePointsOnly",function(){this.toggle(JSV.common.ScriptToken.POINTSONLY)});g(b,"toggleIntegration",function(){this.toggle(JSV.common.ScriptToken.INTEGRATE)});c(b,"toggle",function(a){null!=this.vwr.selectedPanel&&this.runScript(a+" TOGGLE")},"JSV.common.ScriptToken");g(b,"addHighlight",function(a,b,c,g,e,f){this.runScript("HIGHLIGHT "+a+" "+b+" "+c+" "+g+" "+e+" "+f)},"~N,~N,~N,~N,~N,~N");g(b,"removeHighlight",function(a,b){this.runScript("HIGHLIGHT "+
a+" "+b+" OFF")},"~N,~N");g(b,"removeAllHighlights",function(){this.runScript("HIGHLIGHT OFF")});g(b,"syncScript",function(a){this.vwr.syncScript(a)},"~S");g(b,"writeStatus",function(a){JU.Logger.info(a)},"~S");c(b,"initParams",function(a){this.vwr.parseInitScript(a);this.newAppletPanel();this.vwr.setPopupMenu(this.vwr.allowMenu,this.vwr.parameters.getBoolean(JSV.common.ScriptToken.ENABLEZOOM));this.vwr.allowMenu&&this.vwr.closeSource(null);this.runScriptNow(a)},"~S");c(b,"newAppletPanel",function(){JU.Logger.info("newAppletPanel");
this.appletFrame.createMainPanel(this.vwr)});g(b,"repaint",function(){var a=null==this.vwr?null:this.vwr.html5Applet;null==JSV.common.JSViewer.jmolObject?this.appletFrame.repaint():null!=a&&JSV.common.JSViewer.jmolObject.repaint(a,!0)});c(b,"updateJS",function(){},"~N,~N");g(b,"runScriptNow",function(a){return this.vwr.runScriptNow(a)},"~S");c(b,"checkCallbacks",function(){if(!(null==this.coordCallbackFunctionName&&null==this.peakCallbackFunctionName)){var a=new JSV.common.Coordinate,b=null==this.peakCallbackFunctionName?
null:new JSV.common.Coordinate;if(this.vwr.pd().getPickedCoordinates(a,b)){var c=this.vwr.mainPanel.getCurrentPanelIndex();null==b?this.appletFrame.callToJavaScript(this.coordCallbackFunctionName,u(-1,[Double.$valueOf(a.getXVal()),Double.$valueOf(a.getYVal()),Integer.$valueOf(c+1)])):this.appletFrame.callToJavaScript(this.peakCallbackFunctionName,u(-1,[Double.$valueOf(a.getXVal()),Double.$valueOf(a.getYVal()),Double.$valueOf(b.getXVal()),Double.$valueOf(b.getYVal()),Integer.$valueOf(c+1)]))}}});c(b,
"doAdvanced",function(){},"~S");g(b,"panelEvent",function(a){C(a,"JSV.common.PeakPickEvent")?this.vwr.processPeakPickEvent(a,!1):C(a,"JSV.common.ZoomEvent")||C(a,"JSV.common.SubSpecChangeEvent")},"~O");g(b,"getSolnColour",function(){return this.vwr.getSolutionColorStr(!0)});c(b,"updateJSView",function(a){var b=this.vwr.html5Applet,c=null==b?null:this.vwr.selectedPanel;b&&null!=b._viewSet&&b._updateView(c,a);b._updateView(c,a)},"~S");g(b,"syncToJmol",function(a){this.updateJSView(a);null!=this.syncCallbackFunctionName&&
(JU.Logger.info("JSVApp.syncToJmol JSV>Jmol "+a),this.appletFrame.callToJavaScript(this.syncCallbackFunctionName,u(-1,[this.vwr.fullName,a])))},"~S");g(b,"setVisible",function(a){this.appletFrame.setPanelVisible(a)},"~B");g(b,"setCursor",function(a){this.vwr.apiPlatform.setCursor(a,this.appletFrame)},"~N");g(b,"runScript",function(a){this.vwr.runScript(a)},"~S");g(b,"getScriptQueue",function(){return this.vwr.scriptQueue});g(b,"siSetCurrentSource",function(a){this.vwr.currentSource=a},"JSV.source.JDXSource");
g(b,"siSendPanelChange",function(){this.vwr.selectedPanel!==this.prevPanel&&(this.prevPanel=this.vwr.selectedPanel,this.vwr.sendPanelChange())});g(b,"siNewWindow",function(a,b){this.isNewWindow=a;b?null!=this.vwr.jsvpPopupMenu&&this.vwr.jsvpPopupMenu.setSelected("Window",!1):this.appletFrame.newWindow(a)},"~B,~B");g(b,"siValidateAndRepaint",function(){var a=this.vwr.pd();null!=a&&a.setTaintedAll();this.appletFrame.validate();this.repaint()},"~B");g(b,"siSyncLoad",function(a){this.newAppletPanel();
JU.Logger.info("JSVP syncLoad reading "+a);this.siOpenDataOrFile(null,null,null,a,-1,-1,!1,null,null);this.appletFrame.validateContent(3)},"~S");g(b,"siOpenDataOrFile",function(a,b,c,g,e,f,j,k,l){switch(this.vwr.openDataOrFile(a,b,c,g,e,f,j,l)){case 0:null!=k&&this.runScript(k);break;case -1:return;default:this.siSetSelectedPanel(null);return}JU.Logger.info(this.appletFrame.getAppletInfo()+" File "+this.vwr.currentSource.getFilePath()+" Loaded Successfully")},"~O,~S,JU.Lst,~S,~N,~N,~B,~S,~S");g(b,
"siProcessCommand",function(a){this.vwr.runScriptNow(a)},"~S");g(b,"siSetSelectedPanel",function(a){this.vwr.mainPanel.setSelectedPanel(this.vwr,a,this.vwr.panelNodes);this.vwr.selectedPanel=a;this.vwr.spectraTree.setSelectedPanel(this,a);null==a&&(this.vwr.selectedPanel=a=this.appletFrame.getJSVPanel(this.vwr,null),this.vwr.mainPanel.setSelectedPanel(this.vwr,a,null));this.appletFrame.validate();null!=a&&(a.setEnabled(!0),a.setFocusable(!0))},"JSV.api.JSVPanel");g(b,"siExecSetCallback",function(a,
b){switch(a){case JSV.common.ScriptToken.APPLETREADYCALLBACKFUNCTIONNAME:this.appletReadyCallbackFunctionName=b;break;case JSV.common.ScriptToken.LOADFILECALLBACKFUNCTIONNAME:this.loadFileCallbackFunctionName=b;break;case JSV.common.ScriptToken.PEAKCALLBACKFUNCTIONNAME:this.peakCallbackFunctionName=b;break;case JSV.common.ScriptToken.SYNCCALLBACKFUNCTIONNAME:this.syncCallbackFunctionName=b;break;case JSV.common.ScriptToken.COORDCALLBACKFUNCTIONNAME:this.coordCallbackFunctionName=b}},"JSV.common.ScriptToken,~S");
g(b,"siLoaded",function(a){null!=this.loadFileCallbackFunctionName&&this.appletFrame.callToJavaScript(this.loadFileCallbackFunctionName,u(-1,[this.vwr.appletName,a]));this.updateJSView(null);return null},"~S");g(b,"siExecHidden",function(){},"~B");g(b,"siExecScriptComplete",function(a,b){b||this.vwr.showMessage(a);this.siValidateAndRepaint(!1)},"~S,~B");g(b,"siUpdateBoolean",function(){},"JSV.common.ScriptToken,~B");g(b,"siCheckCallbacks",function(){this.checkCallbacks()},"~S");g(b,"siNodeSet",function(){this.appletFrame.validateContent(2);
this.siValidateAndRepaint(!1)},"JSV.common.PanelNode");g(b,"siSourceClosed",function(){},"JSV.source.JDXSource");g(b,"siGetNewJSVPanel",function(a){if(null==a)return this.vwr.initialEndIndex=this.vwr.initialStartIndex=-1,null;var b=new JU.Lst;b.addLast(a);a=this.appletFrame.getJSVPanel(this.vwr,b);a.getPanelData().addListener(this);this.vwr.parameters.setFor(a,null,!0);return a},"JSV.common.Spectrum");g(b,"siGetNewJSVPanel2",function(a){if(null==a)return this.vwr.initialEndIndex=this.vwr.initialStartIndex=
-1,this.appletFrame.getJSVPanel(this.vwr,null);a=this.appletFrame.getJSVPanel(this.vwr,a);this.vwr.initialEndIndex=this.vwr.initialStartIndex=-1;a.getPanelData().addListener(this);this.vwr.parameters.setFor(a,null,!0);return a},"JU.Lst");g(b,"siSetPropertiesFromPreferences",function(){this.vwr.checkAutoIntegrate()},"JSV.api.JSVPanel,~B");g(b,"siSetLoaded",function(){},"~S,~S");g(b,"siSetMenuEnables",function(){},"JSV.common.PanelNode,~B");g(b,"siUpdateRecentMenus",function(){},"~S");g(b,"siExecTest",
function(){this.loadInline("")},"~S");g(b,"print",function(a){return this.vwr.print(a)},"~S");g(b,"checkScript",function(a){return this.vwr.checkScript(a)},"~S");b.getAppletInfo=c(b,"getAppletInfo",function(){return"JSpecView Applet "+JSV.common.JSVersion.VERSION+"\n\nAuthors:\nProf. Robert M. Hanson,\nD. Facey, K. Bryan, C. Walters, Prof. Robert J. Lancashire and\nvolunteer developers through sourceforge."})});n("JSV.app");z(["J.api.GenericMouseInterface"],"JSV.app.GenericMouse",["JU.Logger"],function(){var b=
w(function(){this.jsvp=this.pd=null;this.modifiersWhenPressed10=this.yWhenPressed=this.xWhenPressed=0;this.disposed=this.isMouseDown=!1;q(this,arguments)},JSV.app,"GenericMouse",null,J.api.GenericMouseInterface);x(b,function(a){this.jsvp=a;this.pd=a.getPanelData()},"JSV.api.JSVPanel");g(b,"clear",function(){});g(b,"processEvent",function(a,b,c,g,e){if(null==this.pd)return!this.disposed&&(501==a&&0!=(g&4))&&this.jsvp.showMenu(b,c),!0;507!=a&&(g=JSV.app.GenericMouse.applyLeftMouse(g));switch(a){case 507:this.wheeled(e,
b,g|32);break;case 501:this.xWhenPressed=b;this.yWhenPressed=c;this.modifiersWhenPressed10=g;this.pressed(e,b,c,g,!1);break;case 506:this.dragged(e,b,c,g);break;case 504:this.entered(e,b,c);break;case 505:this.exited(e,b,c);break;case 503:this.moved(e,b,c,g);break;case 502:this.released(e,b,c,g);b==this.xWhenPressed&&(c==this.yWhenPressed&&g==this.modifiersWhenPressed10)&&this.clicked(e,b,c,g,1);break;default:return!1}return!0},"~N,~N,~N,~N,~N");c(b,"mouseEntered",function(a){this.entered(a.getWhen(),
a.getX(),a.getY())},"java.awt.event.MouseEvent");c(b,"mouseExited",function(a){this.exited(a.getWhen(),a.getX(),a.getY())},"java.awt.event.MouseEvent");c(b,"mouseMoved",function(a){this.moved(a.getWhen(),a.getX(),a.getY(),a.getModifiers())},"java.awt.event.MouseEvent");c(b,"mousePressed",function(a){this.pressed(a.getWhen(),a.getX(),a.getY(),a.getModifiers(),a.isPopupTrigger())},"java.awt.event.MouseEvent");c(b,"mouseDragged",function(a){var b=a.getModifiers();0==(b&28)&&(b|=16);this.dragged(a.getWhen(),
a.getX(),a.getY(),b)},"java.awt.event.MouseEvent");c(b,"mouseReleased",function(a){this.released(a.getWhen(),a.getX(),a.getY(),a.getModifiers())},"java.awt.event.MouseEvent");c(b,"mouseClicked",function(a){this.clicked(a.getWhen(),a.getX(),a.getY(),a.getModifiers(),a.getClickCount())},"java.awt.event.MouseEvent");c(b,"mouseWheelMoved",function(a){a.consume();this.wheeled(a.getWhen(),a.getWheelRotation(),a.getModifiers()|32)},"java.awt.event.MouseWheelEvent");c(b,"keyTyped",function(a){if(null!=this.pd){var b=
a.getKeyChar(),c=a.getModifiers();JU.Logger.info("MouseManager keyTyped: "+b+" "+(0+b.charCodeAt(0))+" "+c);this.pd.keyTyped(b.charCodeAt(0),c)&&a.consume()}},"java.awt.event.KeyEvent");c(b,"keyPressed",function(a){null!=this.pd&&this.pd.keyPressed(a.getKeyCode(),a.getModifiers())&&a.consume()},"java.awt.event.KeyEvent");c(b,"keyReleased",function(a){null!=this.pd&&this.pd.keyReleased(a.getKeyCode())},"java.awt.event.KeyEvent");g(b,"processKeyEvent",function(a){switch(a.getID()){case 401:this.keyPressed(a);
break;case 402:this.keyReleased(a);break;case 400:this.keyTyped(a)}},"~O");c(b,"entered",function(a,b,c){null!=this.pd&&this.pd.mouseEnterExit(a,b,c,!1)},"~N,~N,~N");c(b,"exited",function(a,b,c){null!=this.pd&&this.pd.mouseEnterExit(a,b,c,!0)},"~N,~N,~N");c(b,"clicked",function(a,b,c,g){null!=this.pd&&this.pd.mouseAction(2,a,b,c,1,g)},"~N,~N,~N,~N,~N");c(b,"moved",function(a,b,c,g){null!=this.pd&&(this.isMouseDown?this.pd.mouseAction(1,a,b,c,0,JSV.app.GenericMouse.applyLeftMouse(g)):this.pd.mouseAction(0,
a,b,c,0,g&-29))},"~N,~N,~N,~N");c(b,"wheeled",function(a,b,c){null!=this.pd&&this.pd.mouseAction(3,a,0,b,0,c)},"~N,~N,~N");c(b,"pressed",function(a,b,c,g){null==this.pd?this.disposed||this.jsvp.showMenu(b,c):(this.isMouseDown=!0,this.pd.mouseAction(4,a,b,c,0,g))},"~N,~N,~N,~N,~B");c(b,"released",function(a,b,c,g){null!=this.pd&&(this.isMouseDown=!1,this.pd.mouseAction(5,a,b,c,0,g))},"~N,~N,~N,~N");c(b,"dragged",function(a,b,c,g){null!=this.pd&&(20==(g&20)&&(g=g&-5|2),this.pd.mouseAction(1,a,b,c,0,
g))},"~N,~N,~N,~N");b.applyLeftMouse=c(b,"applyLeftMouse",function(a){return 0==(a&28)?a|16:a},"~N");g(b,"processTwoPointGesture",function(){},"~A");g(b,"dispose",function(){this.jsvp=this.pd=null;this.disposed=!0})});n("JSV.appletjs");z(["javajs.api.JSInterface","JSV.api.AppletFrame","$.JSVAppletInterface"],"JSV.appletjs.JSVApplet","java.net.URL java.util.Hashtable JU.PT JSV.app.JSVApp JSV.js2d.JsMainPanel $.JsPanel JU.Logger".split(" "),function(){var b=w(function(){this.viewer=this.app=null;this.isStandalone=
!1;this.htParams=this.viewerOptions=null;q(this,arguments)},JSV.appletjs,"JSVApplet",null,[JSV.api.JSVAppletInterface,JSV.api.AppletFrame,javajs.api.JSInterface]);x(b,function(a){null==a&&(a=new java.util.Hashtable);this.viewerOptions=a;this.htParams=new java.util.Hashtable;var b;for(a=a.entrySet().iterator();a.hasNext()&&((b=a.next())||1);)this.htParams.put(b.getKey().toLowerCase(),b.getValue());this.init()},"java.util.Map");c(b,"init",function(){this.app=new JSV.app.JSVApp(this,!0);this.initViewer();
null!=this.app.appletReadyCallbackFunctionName&&null!=this.viewer.fullName&&this.callToJavaScript(this.app.appletReadyCallbackFunctionName,u(-1,[this.viewer.appletName,this.viewer.fullName,Boolean.TRUE,this]))});c(b,"initViewer",function(){this.viewer=this.app.vwr;this.setLogging();this.viewerOptions.remove("debug");var a=this.viewerOptions.get("display"),a=document.getElementById(a);this.viewer.setDisplay(a);JU.Logger.info(this.getAppletInfo())});c(b,"setLogging",function(){var a=this.getValue("logLevel",
this.getBooleanValue("debug",!1)?"5":"4").charAt(0).charCodeAt(0)-48;4!=a&&System.out.println("setting logLevel="+a+' -- To change, use script "set logLevel [0-5]"');JU.Logger.setLogLevel(a)});c(b,"getParameter",function(a){a=this.htParams.get(a.toLowerCase());return null==a?null:a.toString()},"~S");c(b,"getBooleanValue",function(a,b){var c=this.getValue(a,b?"true":"");return c.equalsIgnoreCase("true")||c.equalsIgnoreCase("on")||c.equalsIgnoreCase("yes")},"~S,~B");c(b,"getValue",function(a,b){var c=
this.getParameter(a);System.out.println("getValue "+a+" = "+c);return null!=c?c:b},"~S,~S");g(b,"isPro",function(){return this.app.isPro()});g(b,"isSigned",function(){return this.app.isSigned()});g(b,"destroy",function(){this.app.dispose();this.app=null});c(b,"getParameter",function(a,b){return this.isStandalone?System.getProperty(a,b):null!=this.getParameter(a)?this.getParameter(a):b},"~S,~S");g(b,"getAppletInfo",function(){return JSV.app.JSVApp.getAppletInfo()});g(b,"getSolnColour",function(){return this.app.getSolnColour()});
g(b,"getCoordinate",function(){return this.app.getCoordinate()});g(b,"loadInline",function(a){this.app.loadInline(a)},"~S");c(b,"$export",function(a,b){return this.app.exportSpectrum(a,b)},"~S,~N");g(b,"exportSpectrum",function(a,b){return this.app.exportSpectrum(a,b)},"~S,~N");g(b,"setFilePath",function(a){this.app.setFilePath(a)},"~S");g(b,"setSpectrumNumber",function(a){this.app.setSpectrumNumber(a)},"~N");g(b,"toggleGrid",function(){this.app.toggleGrid()});g(b,"toggleCoordinate",function(){this.app.toggleCoordinate()});
g(b,"togglePointsOnly",function(){this.app.togglePointsOnly()});g(b,"toggleIntegration",function(){this.app.toggleIntegration()});g(b,"addHighlight",function(a,b,c,g,e,f){this.app.addHighlight(a,b,c,g,e,f)},"~N,~N,~N,~N,~N,~N");g(b,"removeAllHighlights",function(){this.app.removeAllHighlights()});g(b,"removeHighlight",function(a,b){this.app.removeHighlight(a,b)},"~N,~N");g(b,"reversePlot",function(){this.app.reversePlot()});c(b,"script",function(a){this.app.initParams(a)},"~S");g(b,"runScript",function(a){this.app.runScript(a)},
"~S");g(b,"syncScript",function(a){this.app.syncScript(a)},"~S");g(b,"writeStatus",function(a){this.app.writeStatus(a)},"~S");g(b,"getPropertyAsJavaObject",function(a){return this.app.getPropertyAsJavaObject(a)},"~S");g(b,"getPropertyAsJSON",function(a){return this.app.getPropertyAsJSON(a)},"~S");g(b,"runScriptNow",function(a){return this.app.runScriptNow(a)},"~S");g(b,"print",function(a){return this.app.print(a)},"~S");g(b,"setDropTargetListener",function(){},"~B,JSV.common.JSViewer");g(b,"validateContent",
function(){},"~N");g(b,"createMainPanel",function(a){a.mainPanel=new JSV.js2d.JsMainPanel},"JSV.common.JSViewer");g(b,"newWindow",function(){},"~B");g(b,"callToJavaScript",function(a,b){var c=JU.PT.split(a,".");try{for(var g=window[c[0]],e=1;e<c.length;e++)g=g[c[e]];return g(b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7],b[8],b[9])}catch(f){System.out.println(a+" failed "+f)}},"~S,~A");g(b,"setPanelVisible",function(){},"~B");g(b,"getJSVPanel",function(a,b){return null==b?JSV.js2d.JsPanel.getEmptyPanel(a):
JSV.js2d.JsPanel.getPanelMany(a,b)},"JSV.common.JSViewer,JU.Lst");g(b,"setVisible",function(){},"~B");g(b,"getDocumentBase",function(){try{return new java.net.URL(ha("java.net.URL"),this.viewerOptions.get("documentBase"),null)}catch(a){if(D(a,"java.net.MalformedURLException"))return null;throw a;}});g(b,"repaint",function(){});g(b,"validate",function(){});g(b,"doExitJmol",function(){});g(b,"getApp",function(){return this.app});g(b,"setStatusDragDropped",function(){return!0},"~N,~N,~N,~S,~A");g(b,
"cacheFileByName",function(){return 0},"~S,~B");g(b,"cachePut",function(){},"~S,~O");g(b,"getFullName",function(){return this.app.vwr.fullName});g(b,"processMouseEvent",function(a,b,c,g,e){return this.app.vwr.processMouseEvent(a,b,c,g,e)},"~N,~N,~N,~N,~N");g(b,"setDisplay",function(a){this.app.vwr.setDisplay(a)},"~O");g(b,"startHoverWatcher",function(){},"~B");g(b,"update",function(){this.app.vwr.updateJS()});c(b,"openFile",function(a){this.app.vwr.openFile(a,!0);return null},"~S");g(b,"openFileAsyncSpecial",
function(a,b){this.app.vwr.openFileAsyncSpecial(a,b)},"~S,~N");g(b,"openFileAsyncSpecialType",function(a,b){this.openFileAsyncSpecial(a,b)},"~S,~N,~S");g(b,"processTwoPointGesture",function(a){this.app.vwr.processTwoPointGesture(a)},"~A");g(b,"setScreenDimension",function(a,b){this.app.vwr.setScreenDimension(a,b)},"~N,~N");g(b,"checkScript",function(a){a=this.app.checkScript(a);null!=a&&System.out.println(a);return a},"~S");g(b,"processKeyEvent",function(){},"~O")});n("JSV.common");z(["java.lang.Enum",
"JSV.common.Coordinate"],"JSV.common.Annotation",["JU.CU"],function(){var b=w(function(){this.text="";this.is2D=this.$isPixels=!1;this.offsetY=this.offsetX=0;this.spec=null;q(this,arguments)},JSV.common,"Annotation",JSV.common.Coordinate);c(b,"setA",function(a,b,c,g,e,f,j,k){this.set(a,b);this.spec=c;this.text=g;this.$isPixels=e;this.is2D=f;this.offsetX=j;this.offsetY=k;return this},"~N,~N,JSV.common.Spectrum,~S,~B,~B,~N,~N");c(b,"setSpec",function(a){this.spec=a;return this},"JSV.common.Spectrum");
c(b,"addSpecShift",function(a){this.setXVal(this.getXVal()+a)},"~N");c(b,"isPixels",function(){return this.$isPixels});g(b,"toString",function(){return"["+this.getXVal()+", "+this.getYVal()+","+this.text+"]"});b.getColoredAnnotation=c(b,"getColoredAnnotation",function(a,b,c,g){var e,f=0,j=1,k=2,l=3,s=c.size();try{switch(s){default:return null;case 1:e=c.get(0);f=j=-1;'"'==e.charAt(0)?(l=0,k=-1):(k=0,l=-1);break;case 2:f=j=-1;e=c.get(0);'"'==e.charAt(0)?(l=0,k=1):(k=0,l=1);break;case 3:case 4:e=c.get(2),
'"'==e.charAt(0)?(l=2,k=4==s?3:-1):(k=2,l=4==s?3:-1),e=c.get(2),'"'==e.charAt(0)?(l=2,k=-1):(k=2,l=-1)}if(null==g&&(0>f||0>j||0>l||0>k))return null;var m=0>f?g.getXVal():Double.$valueOf(c.get(f)).doubleValue(),p=0>j?g.getYVal():Double.$valueOf(c.get(j)).doubleValue(),n=0>k?g.getColor():a.getColor1(JU.CU.getArgbFromString(c.get(k))),q;0>l?q=g.text:(q=c.get(l),'"'==q.charAt(0)&&(q=q.substring(1,q.length-1)));return(new JSV.common.ColoredAnnotation).setCA(m,p,b,q,n,!1,!1,0,0)}catch(u){if(D(u,Exception))return null;
throw u;}},"J.api.GenericGraphics,JSV.common.Spectrum,JU.Lst,JSV.common.Annotation");b=G(JSV.common.Annotation,"AType",Enum);B(b,"Integration",0,[]);B(b,"PeakList",1,[]);B(b,"Measurements",2,[]);B(b,"OverlayLegend",3,[]);B(b,"Views",4,[]);B(b,"NONE",5,[])});n("JSV.common");z(["JSV.common.Annotation"],"JSV.common.ColoredAnnotation",null,function(){var b=w(function(){this.color=null;q(this,arguments)},JSV.common,"ColoredAnnotation",JSV.common.Annotation);x(b,function(){I(this,JSV.common.ColoredAnnotation,
[])});c(b,"getColor",function(){return this.color});c(b,"setCA",function(a,b,c,g,e,f,j,k,l){this.setA(a,b,c,g,f,j,k,l);this.color=e;return this},"~N,~N,JSV.common.Spectrum,~S,javajs.api.GenericColor,~B,~B,~N,~N")});n("JSV.common");z(["JSV.common.Parameters"],"JSV.common.ColorParameters",["java.util.Hashtable","$.StringTokenizer","JU.CU","$.Lst","JSV.common.ScriptToken"],function(){var b=w(function(){this.plotColors=this.elementColors=this.displayFontName=this.titleFontName=null;this.isDefault=!1;
q(this,arguments)},JSV.common,"ColorParameters",JSV.common.Parameters);x(b,function(){I(this,JSV.common.ColorParameters,[]);JSV.common.ColorParameters.BLACK=this.getColor3(0,0,0);JSV.common.ColorParameters.RED=this.getColor3(255,0,0);JSV.common.ColorParameters.LIGHT_GRAY=this.getColor3(200,200,200);JSV.common.ColorParameters.DARK_GRAY=this.getColor3(80,80,80);JSV.common.ColorParameters.BLUE=this.getColor3(0,0,255);JSV.common.ColorParameters.WHITE=this.getColor3(255,255,255);this.elementColors=new java.util.Hashtable;
this.setColor(JSV.common.ScriptToken.TITLECOLOR,JSV.common.ColorParameters.BLACK);this.setColor(JSV.common.ScriptToken.UNITSCOLOR,JSV.common.ColorParameters.RED);this.setColor(JSV.common.ScriptToken.SCALECOLOR,JSV.common.ColorParameters.BLACK);this.setColor(JSV.common.ScriptToken.COORDINATESCOLOR,JSV.common.ColorParameters.RED);this.setColor(JSV.common.ScriptToken.GRIDCOLOR,JSV.common.ColorParameters.LIGHT_GRAY);this.setColor(JSV.common.ScriptToken.PLOTCOLOR,JSV.common.ColorParameters.BLUE);this.setColor(JSV.common.ScriptToken.PLOTAREACOLOR,
JSV.common.ColorParameters.WHITE);this.setColor(JSV.common.ScriptToken.BACKGROUNDCOLOR,this.getColor3(192,192,192));this.setColor(JSV.common.ScriptToken.INTEGRALPLOTCOLOR,JSV.common.ColorParameters.RED);this.setColor(JSV.common.ScriptToken.PEAKTABCOLOR,JSV.common.ColorParameters.RED);this.setColor(JSV.common.ScriptToken.HIGHLIGHTCOLOR,JSV.common.ColorParameters.DARK_GRAY);for(var a=0;8>a;a++)JSV.common.ColorParameters.defaultPlotColors[a]=this.getColorFromString(JSV.common.ColorParameters.defaultPlotColorNames[a]);
this.plotColors=Array(8);System.arraycopy(JSV.common.ColorParameters.defaultPlotColors,0,this.plotColors,0,8)});c(b,"setFor",function(a,b,c){null==b&&(b=this);c&&a.getPanelData().setBooleans(b,null);a=a.getPanelData();null!=a.getCurrentPlotColor(1)&&a.setPlotColors(this.plotColors);a.setColorOrFont(b,null)},"JSV.api.JSVPanel,JSV.common.ColorParameters,~B");c(b,"set",function(a,b,c){var g=null;switch(b){default:this.setP(a,b,c);return;case JSV.common.ScriptToken.PLOTCOLORS:null==a?this.getPlotColors(c):
a.setPlotColors(this.getPlotColors(c));return;case JSV.common.ScriptToken.BACKGROUNDCOLOR:case JSV.common.ScriptToken.COORDINATESCOLOR:case JSV.common.ScriptToken.GRIDCOLOR:case JSV.common.ScriptToken.HIGHLIGHTCOLOR:case JSV.common.ScriptToken.INTEGRALPLOTCOLOR:case JSV.common.ScriptToken.PEAKTABCOLOR:case JSV.common.ScriptToken.PLOTAREACOLOR:case JSV.common.ScriptToken.PLOTCOLOR:case JSV.common.ScriptToken.SCALECOLOR:case JSV.common.ScriptToken.TITLECOLOR:case JSV.common.ScriptToken.UNITSCOLOR:g=
this.setColorFromString(b,c);break;case JSV.common.ScriptToken.TITLEFONTNAME:case JSV.common.ScriptToken.DISPLAYFONTNAME:g=this.getFontName(b,c)}null!=a&&null!=g&&a.setColorOrFont(this,b)},"JSV.common.PanelData,JSV.common.ScriptToken,~S");c(b,"getElementColor",function(a){return this.elementColors.get(a)},"JSV.common.ScriptToken");c(b,"setColor",function(a,b){null!=b&&this.elementColors.put(a,b);return b},"JSV.common.ScriptToken,javajs.api.GenericColor");c(b,"copy",function(){return this.copy(this.name)});
c(b,"setElementColors",function(a){this.displayFontName=a.displayFontName;var b;for(a=a.elementColors.entrySet().iterator();a.hasNext()&&((b=a.next())||1);)this.setColor(b.getKey(),b.getValue());return this},"JSV.common.ColorParameters");c(b,"getColorFromString",function(a){return this.getColor1(JU.CU.getArgbFromString(a))},"~S");c(b,"getPlotColors",function(a){if(null==a)return this.plotColors[0]=this.getElementColor(JSV.common.ScriptToken.PLOTCOLOR),this.plotColors;a=new java.util.StringTokenizer(a,
",;.- ");var b=new JU.Lst;try{for(;a.hasMoreTokens();)b.addLast(this.getColorFromString(a.nextToken()))}catch(c){if(D(c,Exception))return null;throw c;}return b.toArray(Array(b.size()))},"~S");c(b,"setColorFromString",function(a,b){return this.setColor(a,this.getColorFromString(b))},"JSV.common.ScriptToken,~S");c(b,"getFontName",function(a,b){var c=this.isValidFontName(b);switch(a){case JSV.common.ScriptToken.TITLEFONTNAME:return c?this.titleFontName=b:this.titleFontName;case JSV.common.ScriptToken.DISPLAYFONTNAME:return c?
this.displayFontName=b:this.displayFontName}return null},"JSV.common.ScriptToken,~S");b.BLACK=null;b.RED=null;b.LIGHT_GRAY=null;b.DARK_GRAY=null;b.BLUE=null;b.WHITE=null;b.defaultPlotColors=Array(8);b.defaultPlotColorNames=u(-1,"black darkGreen darkred orange magenta cyan maroon darkGray".split(" "))});n("JSV.common");var rb=G(JSV.common,"CoordComparator",null,java.util.Comparator);g(rb,"compare",function(b,a){return b.getXVal()>a.getXVal()?1:b.getXVal()<a.getXVal()?-1:0},"JSV.common.Coordinate,JSV.common.Coordinate");
n("JSV.common");z(["JSV.common.CoordComparator"],"JSV.common.Coordinate",["java.util.Arrays","$.StringTokenizer","JU.Lst"],function(){var b=w(function(){this.yVal=this.xVal=0;q(this,arguments)},JSV.common,"Coordinate",null);c(b,"set",function(a,b){this.xVal=a;this.yVal=b;return this},"~N,~N");c(b,"getXVal",function(){return this.xVal});c(b,"getYVal",function(){return this.yVal});c(b,"setXVal",function(a){this.xVal=a},"~N");c(b,"setYVal",function(a){this.yVal=a},"~N");c(b,"copy",function(){return(new JSV.common.Coordinate).set(this.xVal,
this.yVal)});c(b,"equals",function(a){return a.xVal==this.xVal&&a.yVal==this.yVal},"JSV.common.Coordinate");g(b,"toString",function(){return"["+this.xVal+", "+this.yVal+"]"});b.isYInRange=c(b,"isYInRange",function(a,b,c){return JSV.common.Coordinate.getMinY(a,0,a.length-1)>=b&&JSV.common.Coordinate.getMaxY(a,0,a.length-1)>=c},"~A,~N,~N");b.normalise=c(b,"normalise",function(a,b,c){var g=Array(a.length),e=JSV.common.Coordinate.getMinY(a,0,a.length-1);c=(JSV.common.Coordinate.getMaxY(a,0,a.length-1)-
e)/(c-b);for(var f=0;f<a.length;f++)g[f]=(new JSV.common.Coordinate).set(a[f].getXVal(),(a[f].getYVal()-e)/c-b);return g},"~A,~N,~N");b.reverse=c(b,"reverse",function(a){for(var b=a.length,c=0;c<b;c++){var g=a[c];a[c]=a[--b];a[b]=g}return a},"~A");b.parseDSV=c(b,"parseDSV",function(a,b,c){var g,e=g=0,f=new JU.Lst;0<=a.indexOf("(")&&(a=a.$replace("("," ").$replace(")"," ").$replace(","," "));for(a=new java.util.StringTokenizer(a," \t\n\r\f,;");a.hasMoreTokens();)g=a.nextToken().trim(),e=a.nextToken().trim(),
g=Double.parseDouble(g),e=Double.parseDouble(e),g=(new JSV.common.Coordinate).set(g*b,e*c),f.addLast(g);b=Array(f.size());return f.toArray(b)},"~S,~N,~N");b.deltaX=c(b,"deltaX",function(a,b,c){return(a-b)/(c-1)},"~N,~N,~N");b.removeScale=c(b,"removeScale",function(a,b,c){JSV.common.Coordinate.applyScale(a,1/b,1/c)},"~A,~N,~N");b.applyScale=c(b,"applyScale",function(a,b,c){if(1!=b||1!=c)for(var g=0;g<a.length;g++)a[g].setXVal(a[g].getXVal()*b),a[g].setYVal(a[g].getYVal()*c)},"~A,~N,~N");b.getMinX=
c(b,"getMinX",function(a,b,c){for(var g=1.7976931348623157E308;b<=c;b++){var e=a[b].getXVal();e<g&&(g=e)}return g},"~A,~N,~N");b.getMinX=c(b,"getMinX",function(a,b){for(var c=1.7976931348623157E308,g=0;g<a.size();g++){var e=a.get(g).getXYCoords(),e=JSV.common.Coordinate.getMinX(e,b.getStartingPointIndex(g),b.getEndingPointIndex(g));e<c&&(c=e)}return c},"JU.Lst,JSV.common.ViewData");b.getMaxX=c(b,"getMaxX",function(a,b,c){for(var g=-1.7976931348623157E308;b<=c;b++){var e=a[b].getXVal();e>g&&(g=e)}return g},
"~A,~N,~N");b.getMaxX=c(b,"getMaxX",function(a,b){for(var c=-1.7976931348623157E308,g=0;g<a.size();g++){var e=a.get(g).getXYCoords(),e=JSV.common.Coordinate.getMaxX(e,b.getStartingPointIndex(g),b.getEndingPointIndex(g));e>c&&(c=e)}return c},"JU.Lst,JSV.common.ViewData");b.getMinY=c(b,"getMinY",function(a,b,c){for(var g=1.7976931348623157E308;b<=c;b++){var e=a[b].getYVal();e<g&&(g=e)}return g},"~A,~N,~N");b.getMinYUser=c(b,"getMinYUser",function(a,b){for(var c=1.7976931348623157E308,g=0;g<a.size();g++){var e=
a.get(g).getUserYFactor(),f=a.get(g).getYRef(),j=a.get(g).getXYCoords(),e=(JSV.common.Coordinate.getMinY(j,b.getStartingPointIndex(g),b.getEndingPointIndex(g))-f)*e+f;e<c&&(c=e)}return c},"JU.Lst,JSV.common.ViewData");b.getMaxY=c(b,"getMaxY",function(a,b,c){for(var g=-1.7976931348623157E308;b<=c;b++){var e=a[b].getYVal();e>g&&(g=e)}return g},"~A,~N,~N");b.getMaxYUser=c(b,"getMaxYUser",function(a,b){for(var c=-1.7976931348623157E308,g=0;g<a.size();g++){var e=a.get(g).getUserYFactor(),f=a.get(g).getYRef(),
j=a.get(g).getXYCoords(),e=(JSV.common.Coordinate.getMaxY(j,b.getStartingPointIndex(g),b.getEndingPointIndex(g))-f)*e+f;e>c&&(c=e)}return c},"JU.Lst,JSV.common.ViewData");b.getYValueAt=c(b,"getYValueAt",function(a,b){var c=JSV.common.Coordinate.getNearestIndexForX(a,b);if(0==c||c==a.length)return NaN;var g=a[c].getXVal(),e=a[c-1].getXVal(),f=a[c].getYVal(),c=a[c-1].getYVal();return g==e?f:c+(f-c)/(g-e)*(b-e)},"~A,~N");b.intoRange=c(b,"intoRange",function(a,b,c){return Math.max(Math.min(a,c),b)},"~N,~N,~N");
b.getNearestIndexForX=c(b,"getNearestIndexForX",function(a,b){var c=(new JSV.common.Coordinate).set(b,0),c=java.util.Arrays.binarySearch(a,c,JSV.common.Coordinate.c);0>c&&(c=-1-c);return 0>c?0:c>a.length-1?a.length-1:c},"~A,~N");b.findXForPeakNearest=c(b,"findXForPeakNearest",function(a,b,c){b=JSV.common.Coordinate.getNearestIndexForX(a,b);for(c=c?-1:1;b<a.length-1&&0<c*(a[b+1].yVal-a[b].yVal);)b++;for(;1<=b&&0<c*(a[b-1].yVal-a[b].yVal);)b--;return 0==b||b==a.length-1?a[b].xVal:JSV.common.Coordinate.parabolicInterpolation(a,
b)},"~A,~N,~B");b.parabolicInterpolation=c(b,"parabolicInterpolation",function(a,b){var c=a[b-1].yVal,g=a[b+1].yVal;return a[b].xVal+(c-g)/2/(c-2*a[b].yVal+g)*(a[b+1].xVal-a[b].xVal)},"~A,~N");b.getPickedCoordinates=c(b,"getPickedCoordinates",function(a,b,c,g){if(null==b)return!1;var e=b.getXVal();c.setXVal(e);c.setYVal(b.getYVal());if(null==g)return!0;b=JSV.common.Coordinate.getNearestIndexForX(a,e);g.setXVal(a[b].getXVal());g.setYVal(a[b].getYVal());return!0},"~A,JSV.common.Coordinate,JSV.common.Coordinate,JSV.common.Coordinate");
b.shiftX=c(b,"shiftX",function(a,b){for(var c=a.length;0<=--c;)a[c].xVal+=b},"~A,~N");b.getNearestXWithYAbove=c(b,"getNearestXWithYAbove",function(a,b,c,g,e){b=JSV.common.Coordinate.getNearestIndexForX(a,b);var f=g?-1:1;if(e)for(;b<a.length&&0>f*(a[b].yVal-c);)b++;else for(;0<=b&&0>f*(a[b].yVal-c);)b--;return-1==b||b==a.length?NaN:JSV.common.Coordinate.findXForPeakNearest(a,a[b].getXVal(),g)},"~A,~N,~N,~B,~B");b.c=new JSV.common.CoordComparator});n("JSV.common");z(["java.lang.Enum"],"JSV.common.ExportType",
null,function(){var b=G(JSV.common,"ExportType",Enum);b.getType=c(b,"getType",function(a){a=a.toUpperCase();if(a.equalsIgnoreCase("Original..."))return JSV.common.ExportType.SOURCE;if(a.startsWith("XML"))return JSV.common.ExportType.AML;for(var b,c=0,g=JSV.common.ExportType.values();c<g.length&&((b=g[c])||1);c++)if(b.name().equals(a))return b;return JSV.common.ExportType.UNK},"~S");b.isExportMode=c(b,"isExportMode",function(a){return JSV.common.ExportType.getType(a)!==JSV.common.ExportType.UNK},"~S");
B(b,"UNK",0,[]);B(b,"SOURCE",1,[]);B(b,"DIF",2,[]);B(b,"FIX",3,[]);B(b,"SQZ",4,[]);B(b,"PAC",5,[]);B(b,"XY",6,[]);B(b,"DIFDUP",7,[]);B(b,"PNG",8,[]);B(b,"JPG",9,[]);B(b,"SVG",10,[]);B(b,"SVGI",11,[]);B(b,"CML",12,[]);B(b,"AML",13,[]);B(b,"PDF",14,[])});n("JSV.common");z(["JSV.common.XYScaleConverter","java.util.Hashtable","JU.BS","$.Lst","JSV.common.Coordinate"],"JSV.common.GraphSet","JU.DF $.PT JSV.common.Annotation $.ColorParameters $.ColoredAnnotation $.ImageView $.IntegralData $.Measurement $.MeasurementData $.PanelData $.Parameters $.PeakData $.PeakPickEvent $.PlotWidget $.ScaleData $.ScriptToken $.Spectrum $.ViewData JU.Logger".split(" "),
function(){var b=w(function(){this.gs2dLinkedY=this.gs2dLinkedX=null;this.cur1D2Locked=!1;this.spectra=this.highlights=null;this.allowStacking=this.isSplittable=!0;this.widgets=this.graphsTemp=this.pendingIntegral=this.pendingMeasurement=this.lastAnnotation=this.selectedSpectrumIntegrals=this.selectedSpectrumMeasurements=this.annotations=null;this.haveSingleYScale=this.isLinked=!1;this.iSpectrumClicked=this.iSpectrumMovedTo=0;this.iSpectrumSelected=-1;this.stackSelected=!1;this.viewData=this.bsSelected=
null;this.reversePlot=!1;this.nSplit=1;this.yStackOffsetPercent=0;this.showAllStacked=!0;this.pd=this.imageView=this.viewList=null;this.sticky2Dcursor=!1;this.nSpectra=0;this.fracY=this.fracX=1;this.fY0=this.fX0=0;this.cur2Dy=this.cur1D2x2=this.cur1D2x1=this.cur2Dx1=this.cur2Dx0=this.pin2Dy01=this.pin2Dx01=this.pin2Dy1=this.pin2Dy0=this.pin2Dx1=this.pin2Dx0=this.pin1Dy01=this.pin1Dx01=this.pin1Dy1=this.pin1Dy0=this.pin1Dx1=this.pin1Dx0=this.zoomBox2D=this.zoomBox1D=null;this.xPixels0=this.xPixel10=
this.yPixels=this.xPixels=this.yPixel000=this.yPixel11=this.xPixel11=this.yPixel00=this.xPixel00=this.yHArrows=this.xHArrows=this.xVArrows=this.yPixel1=this.xPixel1=this.yPixel0=this.xPixel0=0;this.allowStackedYScale=!0;this.drawXAxisLeftToRight=!1;this.xAxisLeftToRight=!0;this.iPreviousSpectrumClicked=-1;this.zoomEnabled=this.$haveSelectedSpectrum=!1;this.currentZoomIndex=0;this.lastClickX=NaN;this.lastPixelX=2147483647;this.bottom=this.left=this.top=this.right=this.width=this.height=0;this.coordTemp=
this.piMouseOver=null;this.FONT_PLAIN=0;this.FONT_BOLD=1;this.FONT_ITALIC=2;this.is2DSpectrum=!1;this.selectedIntegral=this.selectedMeasurement=null;this.lastXMax=NaN;this.lastSpecClicked=-1;this.inPlotMove=!1;this.xPixelMovedTo2=this.xPixelMovedTo=-1;this.xValueMovedTo=this.yValueMovedTo=0;this.haveLeftRightArrows=!1;this.yPixelPlot1=this.yPixelPlot0=this.xPixelPlot0=this.xPixelPlot1=0;this.nextClickForSetPeak=null;this.splitterY=this.splitterX=this.closerY=this.closerX=0;this.mapX=null;W("JSV.common.GraphSet.Highlight")||
JSV.common.GraphSet.$GraphSet$Highlight$();this.widgetsAreSet=!0;this.nextClickMode=this.lastIntDragX=0;this.gMain=this.g2d=this.plotColors=this.image2D=this.jsvp=this.aIntegrationRatios=this.dialogs=null;this.COLOR_GREY=-3;this.COLOR_BLACK=-2;this.COLOR_INTEGRAL=-1;q(this,arguments)},JSV.common,"GraphSet",null,JSV.common.XYScaleConverter);N(b,function(){this.highlights=new JU.Lst;this.spectra=new JU.Lst;this.graphsTemp=new JU.Lst;this.bsSelected=new JU.BS;this.coordTemp=new JSV.common.Coordinate;
this.mapX=new java.util.Hashtable});x(b,function(a){this.pd=a;this.jsvp=a.jsvp;this.g2d=a.g2d},"JSV.common.PanelData");c(b,"setSpectrumMovedTo",function(a){return this.iSpectrumMovedTo=a},"~N");c(b,"setSpectrumClicked",function(a){this.stackSelected=this.showAllStacked;if(0>a||this.iSpectrumClicked!=a)this.lastClickX=NaN,this.lastPixelX=2147483647;this.iSpectrumClicked=this.setSpectrumSelected(this.setSpectrumMovedTo(a))},"~N");c(b,"setSpectrumSelected",function(a){var b=a!=this.iSpectrumSelected;
this.iSpectrumSelected=a;b&&this.getCurrentView();return this.iSpectrumSelected},"~N");c(b,"closeDialogsExcept",function(a){if(null!=this.dialogs)for(var b,c=this.dialogs.entrySet().iterator();c.hasNext()&&((b=c.next())||1);){var g=b.getValue();g.isDialog()&&(a===JSV.common.Annotation.AType.NONE||g.getAType()!==a)&&g.setVisible(!1)}},"JSV.common.Annotation.AType");c(b,"dispose",function(){this.widgets=this.graphsTemp=this.imageView=this.pendingMeasurement=this.lastAnnotation=this.annotations=this.viewList=
this.viewData=this.spectra=null;this.disposeImage();if(null!=this.dialogs)for(var a,b=this.dialogs.entrySet().iterator();b.hasNext()&&((a=b.next())||1);){var c=a.getValue();c.isDialog()&&c.dispose()}this.dialogs=null});c(b,"isDrawNoSpectra",function(){return-2147483648==this.iSpectrumSelected});c(b,"getFixedSelectedSpectrumIndex",function(){return Math.max(this.iSpectrumSelected,0)});c(b,"getSpectrum",function(){return this.getSpectrumAt(this.getFixedSelectedSpectrumIndex()).getCurrentSubSpectrum()});
c(b,"getSpectrumAt",function(a){return this.spectra.get(a)},"~N");c(b,"getSpectrumIndex",function(a){for(var b=this.spectra.size();0<=--b;)if(this.spectra.get(b)===a)return b;return-1},"JSV.common.Spectrum");c(b,"addSpec",function(a){this.spectra.addLast(a);this.nSpectra++},"JSV.common.Spectrum");c(b,"splitStack",function(a){a&&this.isSplittable?(this.nSplit=this.nSpectra,this.showAllStacked=!1,this.setSpectrumClicked(this.iSpectrumSelected),this.pd.currentSplitPoint=this.iSpectrumSelected):(this.nSplit=
1,this.showAllStacked=this.allowStacking&&!a,this.setSpectrumClicked(this.iSpectrumSelected));this.stackSelected=!1;JSV.common.GraphSet.setFractionalPositions(this.pd,this.pd.graphSets,JSV.common.PanelData.LinkMode.NONE);this.pd.setTaintedAll()},"~B");c(b,"setPositionForFrame",function(a){0>a&&(a=0);var b=this.height-50;this.xPixel00=v(this.width*this.fX0);this.xPixel11=v(this.xPixel00+this.width*this.fracX-1);this.xHArrows=this.xPixel00+25;this.xVArrows=this.xPixel11-v(this.right/2);this.xPixel0=
this.xPixel00+v(this.left*(1-this.fX0));this.xPixel10=this.xPixel1=this.xPixel11-this.right;this.xPixels0=this.xPixels=this.xPixel1-this.xPixel0+1;this.yPixel000=(0==this.fY0?25:0)+v(this.height*this.fY0);this.yPixel00=this.yPixel000+v(b*this.fracY*a);this.yPixel11=this.yPixel00+v(b*this.fracY)-1;this.yHArrows=this.yPixel11-12;this.yPixel0=this.yPixel00+v(this.top/2);this.yPixel1=this.yPixel11-v(this.bottom/2);this.yPixels=this.yPixel1-this.yPixel0+1;null!=this.imageView&&this.is2DSpectrum&&(this.setImageWindow(),
this.pd.display1D?(this.xPixels=v(Math.floor(0.8*(this.pd.display1D?1*(this.xPixels0-this.imageView.xPixels)/this.xPixels0:1)*this.xPixels0)),this.xPixel1=this.xPixel0+this.xPixels-1):(this.xPixels=0,this.xPixel1=this.imageView.xPixel0-30))},"~N");c(b,"hasPoint",function(a,b){return a>=this.xPixel00&&a<=this.xPixel11&&b>=this.yPixel000&&b<=this.yPixel11*this.nSplit},"~N,~N");c(b,"isInPlotRegion",function(a,b){return a>=this.xPixel0&&a<=this.xPixel1&&b>=this.yPixel0&&b<=this.yPixel1},"~N,~N");c(b,
"getSplitPoint",function(a){return Math.max(0,Math.min(v((a-this.yPixel000)/(this.yPixel11-this.yPixel00)),this.nSplit-1))},"~N");c(b,"isSplitWidget",function(a,b){return this.isFrameBox(a,b,this.splitterX,this.splitterY)},"~N,~N");c(b,"isCloserWidget",function(a,b){return this.isFrameBox(a,b,this.closerX,this.closerY)},"~N,~N");c(b,"initGraphSet",function(a,b){null==JSV.common.GraphSet.veryLightGrey&&(JSV.common.GraphSet.veryLightGrey=this.g2d.getColor3(200,200,200));this.setPlotColors(JSV.common.ColorParameters.defaultPlotColors);
this.xAxisLeftToRight=this.getSpectrumAt(0).shouldDisplayXAxisIncreasing();this.setDrawXAxis();var c=E(this.nSpectra,0),g=E(this.nSpectra,0);this.bsSelected.setBits(0,this.nSpectra);this.allowStackedYScale=!0;0>=b&&(b=2147483647);this.isSplittable=1<this.nSpectra;this.showAllStacked=(this.allowStacking=this.spectra.get(0).isStackable())&&1<this.nSpectra;for(var e=0;e<this.nSpectra;e++){var f=this.spectra.get(e).getXYCoords().length-1;c[e]=JSV.common.Coordinate.intoRange(a,0,f);g[e]=JSV.common.Coordinate.intoRange(b,
0,f);this.allowStackedYScale=(new Boolean(this.allowStackedYScale&(this.spectra.get(e).getYUnits().equals(this.spectra.get(0).getYUnits())&&this.spectra.get(e).getUserYFactor()==this.spectra.get(0).getUserYFactor()))).valueOf()}this.getView(0,0,0,0,c,g,null,null);this.viewList=new JU.Lst;this.viewList.addLast(this.viewData)},"~N,~N");c(b,"getView",function(a,b,c,g,e,f,j,k){var l=0==this.graphsTemp.size()?this.spectra:this.graphsTemp,s=this.getSpectrumAt(0).getSubSpectra(),m=null==s||2==s.size()&&
s.get(1).isImaginary(),p=!this.getSpectrumAt(0).is1D();m&&c==g?l=this.spectra:c==g&&(this.viewData=new JSV.common.ViewData(s,c,g,this.getSpectrum().isContinuous()),l=null);null!=l&&(this.viewData=new JSV.common.ViewData(l,c,g,e,f,this.getSpectrumAt(0).isContinuous(),p),a!=b&&this.getScale().setXRange(a,b));null!=j&&(JSV.common.ScaleData.copyScaleFactors(j,this.viewData.getScaleData()),null!=k&&JSV.common.ScaleData.copyYScales(k,this.viewData.getScaleData()),this.getCurrentView())},"~N,~N,~N,~N,~A,~A,~A,~A");
c(b,"isNearby",function(a,b,c,g){var e=a.getXVal(),f=c.toPixelX(e);a=this.toPixelY(a.getYVal());e=b.getXVal();c=c.toPixelX(e);b=this.toPixelY(b.getYVal());return Math.abs(f-c)+Math.abs(a-b)<g},"JSV.common.Coordinate,JSV.common.Coordinate,JSV.common.XYScaleConverter,~N");c(b,"setReversePlot",function(a){(this.reversePlot=a)&&this.closeDialogsExcept(JSV.common.Annotation.AType.NONE);this.setDrawXAxis()},"~B");c(b,"setDrawXAxis",function(){this.drawXAxisLeftToRight=(new Boolean(this.xAxisLeftToRight^
this.reversePlot)).valueOf();for(var a=0;a<this.spectra.size();a++)this.spectra.get(a).setExportXAxisDirection(this.drawXAxisLeftToRight)});c(b,"isInTopBar",function(a,b){return a==this.fixX(a)&&b>this.pin1Dx0.yPixel0-2&&b<this.pin1Dx0.yPixel1},"~N,~N");c(b,"isInTopBar2D",function(a,b){return null!=this.imageView&&a==this.imageView.fixX(a)&&b>this.pin2Dx0.yPixel0-2&&b<this.pin2Dx0.yPixel1},"~N,~N");c(b,"isInRightBar",function(a,b){return b==this.fixY(b)&&a>this.pin1Dy0.xPixel1&&a<this.pin1Dy0.xPixel0+
2},"~N,~N");c(b,"isInRightBar2D",function(a,b){return null!=this.imageView&&b==this.fixY(b)&&a>this.pin2Dy0.xPixel1&&a<this.pin2Dy0.xPixel0+2},"~N,~N");c(b,"toX0",function(a){return this.viewList.get(0).getScale().toX0(this.fixX(a),this.xPixel0,this.xPixel1,this.drawXAxisLeftToRight)},"~N");c(b,"toY0",function(a){return this.viewList.get(0).getScale().toY0(this.fixY(a),this.yPixel0,this.yPixel1)},"~N");g(b,"toX",function(a){return null!=this.imageView&&this.imageView.isXWithinRange(a)?this.imageView.toX(a):
this.getScale().toX(this.fixX(a),this.xPixel1,this.drawXAxisLeftToRight)},"~N");g(b,"toY",function(a){return this.getScale().toY(a,this.yPixel0)},"~N");c(b,"toPixelX",function(a){return this.getScale().toPixelX(a,this.xPixel0,this.xPixel1,this.drawXAxisLeftToRight)},"~N");c(b,"toPixelY",function(a){return this.getScale().toPixelY(a,this.yPixel1)},"~N");c(b,"toPixelX0",function(a){return this.viewList.get(0).getScale().toPixelX0(a,this.xPixel0,this.xPixel1,this.drawXAxisLeftToRight)},"~N");c(b,"toPixelY0",
function(a){return this.fixY(this.viewList.get(0).getScale().toPixelY0(a,this.yPixel0,this.yPixel1))},"~N");c(b,"fixX",function(a){return JSV.common.Coordinate.intoRange(a,this.xPixel0,this.xPixel1)},"~N");c(b,"fixY",function(a){return JSV.common.Coordinate.intoRange(a,this.yPixel0,this.yPixel1)},"~N");c(b,"getXPixel0",function(){return this.xPixel0});c(b,"getXPixels",function(){return this.xPixels});g(b,"getYPixels",function(){return this.yPixels});c(b,"getScale",function(){return this.viewData.getScale()});
c(b,"toPixelYint",function(a){return this.yPixel1-v(Double.isNaN(a)?-2147483648:this.yPixels*a)},"~N");c(b,"findAnnotation2D",function(a){for(var b=this.annotations.size();0<=--b;){var c=this.annotations.get(b);if(this.isNearby(c,a,this.imageView,10))return c}return null},"JSV.common.Coordinate");c(b,"addAnnotation",function(a,b){null==this.annotations&&(this.annotations=new JU.Lst);for(var c=!1,g=this.annotations.size();0<=--g;)if(a.is2D?this.isNearby(this.annotations.get(g),a,this.imageView,10):
a.equals(this.annotations.get(g)))c=!0,this.annotations.removeItemAt(g);0<a.text.length&&(!c||!b)&&this.annotations.addLast(a)},"JSV.common.Annotation,~B");c(b,"setImageWindow",function(){this.imageView.setPixelWidthHeight(v((this.pd.display1D?0.6:1)*this.xPixels0),this.yPixels);this.imageView.setXY0(this.getSpectrumAt(0),v(Math.floor(this.xPixel10-this.imageView.xPixels)),this.yPixel0)});c(b,"findNearestMaxMin",function(){if(1<this.nSpectra&&0>this.iSpectrumClicked)return!1;this.xValueMovedTo=this.getSpectrum().findXForPeakNearest(this.xValueMovedTo);
this.setXPixelMovedTo(this.xValueMovedTo,1.7976931348623157E308,0,0);return!Double.isNaN(this.xValueMovedTo)});c(b,"setXPixelMovedTo",function(a,b,c,g){1.7976931348623157E308==a&&1.7976931348623157E308==b?(this.xPixelMovedTo=c,this.xPixelMovedTo2=g,this.isLinked&&this.sticky2Dcursor&&this.pd.setlinkedXMove(this,this.toX(this.xPixelMovedTo),!1)):(1.7976931348623157E308!=a&&(this.xPixelMovedTo=this.toPixelX(a),this.fixX(this.xPixelMovedTo)!=this.xPixelMovedTo&&(this.xPixelMovedTo=-1),this.xPixelMovedTo2=
-1,1E10!=a&&this.setSpectrumClicked(this.getFixedSelectedSpectrumIndex())),1.7976931348623157E308!=b&&(this.xPixelMovedTo2=this.toPixelX(b)))},"~N,~N,~N,~N");c(b,"processPendingMeasurement",function(a,b,c){if(!this.isInPlotRegion(a,b)||this.is2dClick(a,b))this.pendingMeasurement=null;else{var g=this.toX(a),e=this.toY(b),f=g;switch(c){case 0:this.pendingMeasurement.setPt2(this.toX(a),this.toY(b));break;case 3:case 2:if(0>this.iSpectrumClicked)break;var j=this.spectra.get(this.iSpectrumClicked);this.setScale(this.iSpectrumClicked);
3!=c&&(c=this.findMeasurement(this.selectedSpectrumMeasurements,a,b,1),null!=c?(g=c.getXVal(),e=c.getYVal()):null!=(c=this.findMeasurement(this.selectedSpectrumMeasurements,a,b,2))?(g=c.getXVal2(),e=c.getYVal2()):g=this.getNearestPeak(j,g,e));this.pendingMeasurement=(new JSV.common.Measurement).setM1(g,e,j);this.pendingMeasurement.setPt2(f,e);this.pd.setTaintedAll();this.pd.repaint();break;case 1:case -2:case -3:for(f=null!=this.pendingMeasurement&&this.isVisible(this.getDialog(JSV.common.Annotation.AType.Measurements,
-1));f;){this.setScale(this.getSpectrumIndex(this.pendingMeasurement.spec));if(3!=c){if(!this.findNearestMaxMin()){f=!1;break}a=this.xPixelMovedTo}g=this.toX(a);e=this.toY(b);this.pendingMeasurement.setPt2(g,e);if(0==this.pendingMeasurement.text.length){f=!1;break}this.setMeasurement(this.pendingMeasurement);if(1!=c){f=!1;break}this.setSpectrumClicked(this.getSpectrumIndex(this.pendingMeasurement.spec));this.pendingMeasurement=(new JSV.common.Measurement).setM1(g,e,this.pendingMeasurement.spec);break}f||
(this.pendingMeasurement=null);this.pd.setTaintedAll();this.pd.repaint();break;case 5:this.findNearestMaxMin()?(a=this.getFixedSelectedSpectrumIndex(),Double.isNaN(this.lastXMax)||this.lastSpecClicked!=a||null==this.pendingMeasurement?(this.lastXMax=this.xValueMovedTo,this.lastSpecClicked=a,this.pendingMeasurement=(new JSV.common.Measurement).setM1(this.xValueMovedTo,this.yValueMovedTo,this.spectra.get(a))):(this.pendingMeasurement.setPt2(this.xValueMovedTo,this.yValueMovedTo),0<this.pendingMeasurement.text.length&&
this.setMeasurement(this.pendingMeasurement),this.pendingMeasurement=null,this.lastXMax=NaN)):this.lastXMax=NaN}}},"~N,~N,~N");c(b,"checkIntegralNormalizationClick",function(a,b){if(null==this.selectedSpectrumIntegrals)return!1;var c=this.findMeasurement(this.selectedSpectrumIntegrals,a,b,-5);if(null==c)return!1;this.selectedIntegral=c;this.pd.normalizeIntegral();this.updateDialog(JSV.common.Annotation.AType.Integration,-1);this.setSpectrumClicked(this.getSpectrumIndex(c.spec));return!0},"~N,~N");
c(b,"getNearestPeak",function(a,b,c){var g=JSV.common.Coordinate.getNearestXWithYAbove(a.getXYCoords(),b,c,a.isInverted(),!1);a=JSV.common.Coordinate.getNearestXWithYAbove(a.getXYCoords(),b,c,a.isInverted(),!0);return Double.isNaN(g)?a:Double.isNaN(a)?g:Math.abs(g-b)<Math.abs(a-b)?g:a},"JSV.common.Spectrum,~N,~N");c(b,"findMeasurement",function(a,b,c,g){if(null==a||0==a.size())return null;if(0==g){var e=this.findMeasurement(a,b,c,-1);return null!=e||C(a.get(0),"JSV.common.Integral")?e:this.findMeasurement(a,
b,c,-2)}for(var f=a.size();0<=--f;){var e=a.get(f),j,k,l,s;C(e,"JSV.common.Integral")?(j=k=this.toPixelX(e.getXVal2()),l=this.toPixelYint(e.getYVal()),s=this.toPixelYint(e.getYVal2())):(j=this.toPixelX(e.getXVal()),k=this.toPixelX(e.getXVal2()),l=s=-2==g?this.yPixel1-2:this.toPixelY(e.getYVal()));switch(g){case 1:if(4>Math.abs(b-j)+Math.abs(c-l))return e;break;case 2:if(4>Math.abs(b-k)+Math.abs(c-s))return e;break;case -5:l=s=v((l+s)/2),k=j+20;default:case -1:case -2:if(JSV.common.GraphSet.isOnLine(b,
c,j,l,k,s))return e}}return null},"JSV.common.MeasurementData,~N,~N,~N");c(b,"setMeasurement",function(a){var b=this.getSpectrumIndex(a.spec),c=this.getDialog(JSV.common.Annotation.AType.Measurements,b);null==c&&this.addDialog(b,JSV.common.Annotation.AType.Measurements,c=new JSV.common.MeasurementData(JSV.common.Annotation.AType.Measurements,a.spec));c.getData().addLast(a.copyM());this.updateDialog(JSV.common.Annotation.AType.Measurements,-1)},"JSV.common.Measurement");c(b,"checkArrowUpDownClick",
function(a,b){var c=!1,g=this.isArrowClick(a,b,3)?JSV.common.GraphSet.RT2:this.isArrowClick(a,b,4)?1/JSV.common.GraphSet.RT2:0;if(0!=g){1<this.nSplit&&this.setSpectrumSelected(this.iSpectrumMovedTo);if((1==this.nSpectra||0<=this.iSpectrumSelected)&&this.spectra.get(this.getFixedSelectedSpectrumIndex()).isTransmittance())g=1/g;this.viewData.scaleSpectrum(null==this.imageView?this.iSpectrumSelected:-2,g);c=!0}else this.isArrowClick(a,b,-1)&&(this.resetViewCompletely(),c=!0);c&&(null!=this.imageView&&
(this.update2dImage(!1),this.resetPinsFromView()),this.pd.setTaintedAll());return c},"~N,~N");c(b,"resetViewCompletely",function(){this.clearViews();this.showAllStacked&&!this.stackSelected&&this.closeDialogsExcept(JSV.common.Annotation.AType.NONE);this.viewData.resetScaleFactors();this.updateDialogs()});c(b,"checkArrowLeftRightClick",function(a,b){if(this.haveLeftRightArrows){var c=this.isArrowClick(a,b,1)?-1:this.isArrowClick(a,b,2)?1:0;if(0!=c)return c=this.iSpectrumSelected+c,0>c&&(c=this.nSpectra-
1),this.setSpectrumClicked(c%this.nSpectra),!0;if(this.isArrowClick(a,b,0)){if(this.showAllStacked)return this.showAllStacked=!1,this.setSpectrumClicked(this.getFixedSelectedSpectrumIndex()),!0;this.showAllStacked=this.allowStacking;this.setSpectrumSelected(-1);this.stackSelected=!1}}return!1},"~N,~N");c(b,"isArrowClick",function(a,b,c){switch(c){case 3:case 4:case -1:return c=v((this.yPixel00+this.yPixel11)/2)+15*(3==c?-1:4==c?1:0),10>Math.abs(this.xVArrows-a)&&10>Math.abs(c-b);case 1:case 2:case 0:return c=
this.xHArrows+15*(1==c?-1:2==c?1:0),10>Math.abs(c-a)&&10>Math.abs(this.yHArrows-b)}return!1},"~N,~N,~N");c(b,"setWidgetValueByUser",function(a){var b;b=a===this.cur2Dy?""+this.imageView.toSubspectrumIndex(a.yPixel0):a===this.pin1Dx01?""+Math.min(this.pin1Dx0.getXVal(),this.pin1Dx1.getXVal())+" - "+Math.max(this.pin1Dx0.getXVal(),this.pin1Dx1.getXVal()):a===this.pin1Dy01?""+Math.min(this.pin1Dy0.getYVal(),this.pin1Dy1.getYVal())+" - "+Math.max(this.pin1Dy0.getYVal(),this.pin1Dy1.getYVal()):a===this.pin2Dx01?
""+Math.min(this.pin2Dx0.getXVal(),this.pin2Dx1.getXVal())+" - "+Math.max(this.pin2Dx0.getXVal(),this.pin2Dx1.getXVal()):a===this.pin2Dy01?""+v(Math.min(this.pin2Dy0.getYVal(),this.pin2Dy1.getYVal()))+" - "+v(Math.max(this.pin2Dy0.getYVal(),this.pin2Dy1.getYVal())):""+a.getValue();b=this.pd.getInput("New value?","Set Slider",b);if(null!=b){b=b.trim();try{if(a===this.pin1Dx01||a===this.pin1Dy01||a===this.pin2Dx01||a===this.pin2Dy01){var c=b.indexOf("-",1);if(!(0>c)){var g=Double.$valueOf(b.substring(0,
c)).doubleValue(),e=Double.$valueOf(b.substring(c+1)).doubleValue();a===this.pin1Dx01?this.doZoom(g,this.pin1Dy0.getYVal(),e,this.pin1Dy1.getYVal(),!0,!1,!1,!0,!0):a===this.pin1Dy01?this.doZoom(this.pin1Dx0.getXVal(),g,this.pin1Dx1.getXVal(),e,null==this.imageView,null==this.imageView,!1,!1,!0):a===this.pin2Dx01?(this.imageView.setView0(this.imageView.toPixelX0(g),this.pin2Dy0.yPixel0,this.imageView.toPixelX0(e),this.pin2Dy1.yPixel0),this.doZoom(g,this.pin1Dy0.getYVal(),e,this.pin1Dy1.getYVal(),!1,
!1,!1,!0,!0)):a===this.pin2Dy01&&(this.imageView.setView0(this.pin2Dx0.xPixel0,this.imageView.toPixelY0(g),this.pin2Dx1.xPixel0,this.imageView.toPixelY0(e)),this.doZoom(this.imageView.toX(this.imageView.xPixel0),this.getScale().minY,this.imageView.toX(this.imageView.xPixel0+this.imageView.xPixels-1),this.getScale().maxY,!1,!1,!1,!1,!0))}}else{var f=Double.$valueOf(b).doubleValue();a.isXtype?(e=a===this.pin1Dx0||a===this.cur2Dx0||a===this.pin2Dx0?this.pin1Dx1.getXVal():this.pin1Dx0.getXVal(),this.doZoom(f,
0,e,0,!a.is2D,!1,!1,!0,!0)):a===this.cur2Dy?this.setCurrentSubSpectrum(v(f)):a===this.pin2Dy0||a===this.pin2Dy1?(e=a===this.pin2Dy0?this.pin2Dy1.yPixel0:this.pin2Dy0.yPixel0,this.imageView.setView0(this.pin2Dx0.xPixel0,this.imageView.subIndexToPixelY(v(f)),this.pin2Dx1.xPixel0,e)):(e=a===this.pin1Dy0?this.pin1Dy1.getYVal():this.pin1Dy0.getYVal(),this.doZoom(this.pin1Dx0.getXVal(),f,this.pin1Dx1.getXVal(),e,null==this.imageView,null==this.imageView,!1,!1,!0))}}catch(j){if(!D(j,Exception))throw j;}}},
"JSV.common.PlotWidget");c(b,"removeAllHighlights",function(a){if(null==a)this.highlights.clear();else for(var b=this.highlights.size();0<=--b;)this.highlights.get(b).spectrum===a&&this.highlights.removeItemAt(b)},"JSV.common.Spectrum");c(b,"setCoordClicked",function(a,b,c){0==c&&(this.nextClickForSetPeak=null);if(Double.isNaN(b))return this.pd.coordClicked=null,this.pd.coordsClicked=null;this.pd.coordClicked=(new JSV.common.Coordinate).set(this.lastClickX=b,c);this.pd.coordsClicked=this.getSpectrum().getXYCoords();
this.pd.xPixelClicked=this.lastPixelX=a;return this.pd.coordClicked},"~N,~N,~N");c(b,"setWidgets",function(a,b,c){if(a||null==this.pin1Dx0)null==this.zoomBox1D?this.newPins():this.resetPinPositions();this.setDerivedPins(b);this.setPinSliderPositions(c)},"~B,~N,~B");c(b,"newPins",function(){this.zoomBox1D=new JSV.common.PlotWidget("zoomBox1D");this.pin1Dx0=new JSV.common.PlotWidget("pin1Dx0");this.pin1Dx1=new JSV.common.PlotWidget("pin1Dx1");this.pin1Dy0=new JSV.common.PlotWidget("pin1Dy0");this.pin1Dy1=
new JSV.common.PlotWidget("pin1Dy1");this.pin1Dx01=new JSV.common.PlotWidget("pin1Dx01");this.pin1Dy01=new JSV.common.PlotWidget("pin1Dy01");this.cur1D2x1=new JSV.common.PlotWidget("cur1D2x1");this.cur1D2x1.color=JSV.common.ScriptToken.PEAKTABCOLOR;this.cur1D2x2=new JSV.common.PlotWidget("cur1D2x2");this.cur1D2x2.color=JSV.common.ScriptToken.PEAKTABCOLOR;if(null!=this.imageView){this.zoomBox2D=new JSV.common.PlotWidget("zoomBox2D");this.pin2Dx0=new JSV.common.PlotWidget("pin2Dx0");this.pin2Dx1=new JSV.common.PlotWidget("pin2Dx1");
this.pin2Dy0=new JSV.common.PlotWidget("pin2Dy0");this.pin2Dy1=new JSV.common.PlotWidget("pin2Dy1");this.pin2Dx01=new JSV.common.PlotWidget("pin2Dx01");this.pin2Dy01=new JSV.common.PlotWidget("pin2Dy01");this.cur2Dx0=new JSV.common.PlotWidget("cur2Dx0");this.cur2Dx1=new JSV.common.PlotWidget("cur2Dx1");this.cur2Dy=new JSV.common.PlotWidget("cur2Dy");this.pin2Dy0.setY(0,this.imageView.toPixelY0(0));var a=this.getSpectrumAt(0).getSubSpectra().size();this.pin2Dy1.setY(a,this.imageView.toPixelY0(a))}this.setWidgetX(this.pin1Dx0,
this.getScale().minX);this.setWidgetX(this.pin1Dx1,this.getScale().maxX);this.setWidgetY(this.pin1Dy0,this.getScale().minY);this.setWidgetY(this.pin1Dy1,this.getScale().maxY);this.widgets=u(-1,[this.zoomBox1D,this.zoomBox2D,this.pin1Dx0,this.pin1Dx01,this.pin1Dx1,this.pin1Dy0,this.pin1Dy01,this.pin1Dy1,this.pin2Dx0,this.pin2Dx01,this.pin2Dx1,this.pin2Dy0,this.pin2Dy01,this.pin2Dy1,this.cur2Dx0,this.cur2Dx1,this.cur2Dy,this.cur1D2x1,this.cur1D2x2])});c(b,"setWidgetX",function(a,b){a.setX(b,this.toPixelX0(b))},
"JSV.common.PlotWidget,~N");c(b,"setWidgetY",function(a,b){a.setY(b,this.toPixelY0(b))},"JSV.common.PlotWidget,~N");c(b,"resetPinsFromView",function(){null!=this.pin1Dx0&&(this.setWidgetX(this.pin1Dx0,this.getScale().minXOnScale),this.setWidgetX(this.pin1Dx1,this.getScale().maxXOnScale),this.setWidgetY(this.pin1Dy0,this.getScale().minYOnScale),this.setWidgetY(this.pin1Dy1,this.getScale().maxYOnScale))});c(b,"resetPinPositions",function(){this.resetX(this.pin1Dx0);this.resetY(this.pin1Dy0);this.resetY(this.pin1Dy1);
null==this.imageView?(null!=this.gs2dLinkedX&&this.resetX(this.cur1D2x1),null!=this.gs2dLinkedY&&this.resetX(this.cur1D2x2)):(this.pin2Dy0.setY(this.pin2Dy0.getYVal(),this.imageView.toPixelY0(this.pin2Dy0.getYVal())),this.pin2Dy1.setY(this.pin2Dy1.getYVal(),this.imageView.toPixelY0(this.pin2Dy1.getYVal())))});c(b,"resetX",function(a){this.setWidgetX(a,a.getXVal())},"JSV.common.PlotWidget");c(b,"resetY",function(a){this.setWidgetY(a,a.getYVal())},"JSV.common.PlotWidget");c(b,"setPinSliderPositions",
function(a){this.pin1Dx0.yPixel0=this.pin1Dx1.yPixel0=this.pin1Dx01.yPixel0=this.yPixel0-5;this.pin1Dx0.yPixel1=this.pin1Dx1.yPixel1=this.pin1Dx01.yPixel1=this.yPixel0;this.cur1D2x1.yPixel1=this.cur1D2x2.yPixel1=this.yPixel0-5;this.cur1D2x1.yPixel0=this.cur1D2x2.yPixel0=this.yPixel1+6;null==this.imageView?(this.pin1Dy0.xPixel0=this.pin1Dy1.xPixel0=this.pin1Dy01.xPixel0=this.xPixel1+5,this.pin1Dy0.xPixel1=this.pin1Dy1.xPixel1=this.pin1Dy01.xPixel1=this.xPixel1):(this.pin1Dy0.xPixel0=this.pin1Dy1.xPixel0=
this.pin1Dy01.xPixel0=this.imageView.xPixel1+15,this.pin1Dy0.xPixel1=this.pin1Dy1.xPixel1=this.pin1Dy01.xPixel1=this.imageView.xPixel1+10,this.pin2Dx0.yPixel0=this.pin2Dx1.yPixel0=this.pin2Dx01.yPixel0=this.yPixel0-5,this.pin2Dx0.yPixel1=this.pin2Dx1.yPixel1=this.pin2Dx01.yPixel1=this.yPixel0,this.pin2Dy0.xPixel0=this.pin2Dy1.xPixel0=this.pin2Dy01.xPixel0=this.imageView.xPixel1+5,this.pin2Dy0.xPixel1=this.pin2Dy1.xPixel1=this.pin2Dy01.xPixel1=this.imageView.xPixel1,this.cur2Dx0.yPixel0=this.cur2Dx1.yPixel0=
this.yPixel1+6,this.cur2Dx0.yPixel1=this.cur2Dx1.yPixel1=this.yPixel0-5,this.cur2Dx0.yPixel0=this.cur2Dx1.yPixel0=this.yPixel1+6,this.cur2Dx1.yPixel1=this.cur2Dx1.yPixel1=this.yPixel0-5,this.cur2Dy.xPixel0=a?v((this.xPixel1+this.imageView.xPixel0)/2):this.imageView.xPixel0-6,this.cur2Dy.xPixel1=this.imageView.xPixel1+5)},"~B");c(b,"setDerivedPins",function(a){this.widgetsAreSet=!0;null!=this.gs2dLinkedX&&this.cur1D2x1.setX(this.cur1D2x1.getXVal(),this.toPixelX(this.cur1D2x1.getXVal()));null!=this.gs2dLinkedY&&
this.cur1D2x2.setX(this.cur1D2x2.getXVal(),this.toPixelX(this.cur1D2x2.getXVal()));this.pin1Dx01.setX(0,v((this.pin1Dx0.xPixel0+this.pin1Dx1.xPixel0)/2));this.pin1Dy01.setY(0,v((this.pin1Dy0.yPixel0+this.pin1Dy1.yPixel0)/2));this.pin1Dx01.setEnabled(Math.min(this.pin1Dx0.xPixel0,this.pin1Dx1.xPixel0)>this.xPixel0||Math.max(this.pin1Dx0.xPixel0,this.pin1Dx1.xPixel0)<this.xPixel1);this.pin1Dy01.setEnabled(Math.min(this.pin1Dy0.yPixel0,this.pin1Dy1.yPixel0)>Math.min(this.toPixelY(this.getScale().minY),
this.toPixelY(this.getScale().maxY))||Math.max(this.pin1Dy0.yPixel0,this.pin1Dy1.yPixel0)<Math.max(this.toPixelY(this.getScale().minY),this.toPixelY(this.getScale().maxY)));if(null!=this.imageView){var b=this.pin1Dx0.getXVal();this.cur2Dx0.setX(b,this.imageView.toPixelX(b));b=this.pin1Dx1.getXVal();this.cur2Dx1.setX(b,this.imageView.toPixelX(b));b=this.imageView.toX(this.imageView.xPixel0);this.pin2Dx0.setX(b,this.imageView.toPixelX0(b));b=this.imageView.toX(this.imageView.xPixel1);this.pin2Dx1.setX(b,
this.imageView.toPixelX0(b));this.pin2Dx01.setX(0,v((this.pin2Dx0.xPixel0+this.pin2Dx1.xPixel0)/2));b=this.imageView.imageHeight-1-this.imageView.yView1;this.pin2Dy0.setY(b,this.imageView.toPixelY0(b));b=this.imageView.imageHeight-1-this.imageView.yView2;this.pin2Dy1.setY(b,this.imageView.toPixelY0(b));this.pin2Dy01.setY(0,v((this.pin2Dy0.yPixel0+this.pin2Dy1.yPixel0)/2));this.cur2Dy.yPixel0=this.cur2Dy.yPixel1=this.imageView.subIndexToPixelY(a);this.pin2Dx01.setEnabled(Math.min(this.pin2Dx0.xPixel0,
this.pin2Dx1.xPixel0)!=this.imageView.xPixel0||Math.max(this.pin2Dx0.xPixel0,this.pin2Dx1.xPixel1)!=this.imageView.xPixel1);this.pin2Dy01.setEnabled(Math.min(this.pin2Dy0.yPixel0,this.pin2Dy1.yPixel0)!=this.yPixel0||Math.max(this.pin2Dy0.yPixel0,this.pin2Dy1.yPixel1)!=this.yPixel1)}},"~N");c(b,"doZoom",function(a,b,c,g,e,f,j,k,l){a==c?(a=this.getScale().minXOnScale,c=this.getScale().maxXOnScale):this.isLinked&&k&&this.pd.doZoomLinked(this,a,c,l,j,e);a>c&&(k=a,a=c,c=k);b>g&&(k=b,b=g,g=k);k=!e&&null!=
this.imageView&&(this.imageView.minZ!=b||this.imageView.maxZ!=g);if(this.zoomEnabled||k){if(j){if(!this.getScale().isInRangeX(a)&&!this.getScale().isInRangeX(c))return;this.getScale().isInRangeX(a)?this.getScale().isInRangeX(c)||(c=this.getScale().maxX):a=this.getScale().minX}this.pd.setTaintedAll();j=this.viewData.getScaleData();var s=E(this.nSpectra,0),m=E(this.nSpectra,0);this.graphsTemp.clear();var p=this.getSpectrumAt(0).getSubSpectra(),p=null==p||2==p.size();if(this.getSpectrumAt(0).is1D()&&
!p){if(this.graphsTemp.addLast(this.getSpectrum()),!JSV.common.ScaleData.setDataPointIndices(this.graphsTemp,a,c,3,s,m))return}else if(!JSV.common.ScaleData.setDataPointIndices(this.spectra,a,c,3,s,m))return;if(p=b==g)e=!k&&e?e=this.getScale().spectrumScaleFactor:1,1E-4>Math.abs(e-1)&&(b=this.getScale().minYOnScale,g=this.getScale().maxYOnScale);e=null;if(p||f)this.getCurrentView(),e=this.viewData.getNewScales(this.iSpectrumSelected,p,b,g);this.getView(a,c,b,g,s,m,j,e);this.setXPixelMovedTo(1E10,
1.7976931348623157E308,0,0);this.setWidgetX(this.pin1Dx0,a);this.setWidgetX(this.pin1Dx1,c);this.setWidgetY(this.pin1Dy0,b);this.setWidgetY(this.pin1Dy1,g);null==this.imageView?this.updateDialogs():(a=this.getSpectrumAt(0).getSubIndex(),c=this.imageView.fixSubIndex(a),c!=a&&this.setCurrentSubSpectrum(c),k&&this.update2dImage(!1));l&&this.addCurrentZoom()}},"~N,~N,~N,~N,~B,~B,~B,~B,~B");c(b,"updateDialogs",function(){this.updateDialog(JSV.common.Annotation.AType.PeakList,-1);this.updateDialog(JSV.common.Annotation.AType.Measurements,
-1)});c(b,"setCurrentSubSpectrum",function(a){var b=this.getSpectrumAt(0);a=b.setCurrentSubSpectrum(a);b.isForcedSubset()&&this.viewData.setXRangeForSubSpectrum(this.getSpectrum().getXYCoords());this.pd.notifySubSpectrumChange(a,this.getSpectrum())},"~N");c(b,"addCurrentZoom",function(){if(this.viewList.size()>this.currentZoomIndex+1)for(var a=this.viewList.size()-1;a>this.currentZoomIndex;a--)this.viewList.removeItemAt(a);this.viewList.addLast(this.viewData);this.currentZoomIndex++});c(b,"setZoomTo",
function(a){this.currentZoomIndex=a;this.viewData=this.viewList.get(a);this.resetPinsFromView()},"~N");c(b,"clearViews",function(){this.isLinked&&this.pd.clearLinkViews(this);this.setZoom(0,0,0,0);for(var a=this.viewList.size();1<=--a;)this.viewList.removeItemAt(a)});c(b,"drawAll",function(a,b,c,g,e,f,j){this.g2d=this.pd.g2d;this.gMain=a;var k=this.getSpectrumAt(0),l=k.getSubIndex();this.is2DSpectrum=!k.is1D()&&(this.isLinked||this.pd.getBoolean(JSV.common.ScriptToken.DISPLAY2D))&&(null!=this.imageView||
this.get2DImage(k));null!=this.imageView&&f&&(this.pd.isPrinting&&this.g2d!==this.pd.g2d0&&this.g2d.newGrayScaleImage(a,this.image2D,this.imageView.imageWidth,this.imageView.imageHeight,this.imageView.getBuffer()),this.is2DSpectrum&&this.setPositionForFrame(g),this.draw2DImage());var s=this.stackSelected||!this.showAllStacked?this.iSpectrumSelected:-1,m=!this.showAllStacked||1==this.nSpectra||0<=s,k=null==this.imageView||this.pd.display1D,p=0<=s?1:0,n=this.getFixedSelectedSpectrumIndex();if(k&&f&&
(this.fillBox(a,this.xPixel0,this.yPixel0,this.xPixel1,this.yPixel1,JSV.common.ScriptToken.PLOTAREACOLOR),0>s)){m=!0;for(s=0;s<this.nSpectra;s++)this.doPlot(s,g)&&0!=p++&&(m=(new Boolean(m&this.viewData.areYScalesSame(s-1,s))).valueOf())}var q=1==this.nSpectra?0:!this.showAllStacked?this.iSpectrumMovedTo:this.iSpectrumSelected;c=c===a?b:c;if(f){var s=this.pd.getCurrentGraphSet()===this&&!this.isLinked&&(!this.isSplittable||1==this.nSplit||this.pd.currentSplitPoint==g),u=this.zoomEnabled&&!this.isDrawNoSpectra()&&
this.pd.isCurrentGraphSet(this)&&this.spectra.get(0).isScalable()&&(s||1==this.nSpectra)&&(1==this.nSplit||this.pd.currentSplitPoint==this.iSpectrumMovedTo);this.drawFrame(a,q,s,this.isSplittable,u)}if(this.pd.isCurrentGraphSet(this)&&g==this.pd.currentSplitPoint&&(2>p||0<=this.iSpectrumSelected))this.$haveSelectedSpectrum=!0;this.haveSingleYScale=this.showAllStacked&&1<this.nSpectra?this.allowStackedYScale&&m:!0;if(k){m=F(this.yPixels*(this.yStackOffsetPercent/100));this.haveLeftRightArrows=!1;for(u=
s=0;s<this.nSpectra;s++)if(this.doPlot(s,g)){var q=this.stackSelected&&0<=this.iSpectrumSelected&&this.iSpectrumSelected!=s,v=!this.reversePlot&&this.getShowAnnotation(JSV.common.Annotation.AType.Integration,s)&&(!this.showAllStacked||this.iSpectrumSelected==s)?this.getDialog(JSV.common.Annotation.AType.Integration,s).getData():null;this.setScale(s);var w=this.spectra.get(s);1<this.nSplit&&(n=s);var x=!q&&(1==this.nSplit||this.showAllStacked||this.iSpectrumSelected==g),z=x&&this.$haveSelectedSpectrum&&
s==n;x&&(this.resetPinsFromView(),this.drawWidgets(b,c,l,e,k,z,!1));this.haveSingleYScale&&(s==n&&f)&&(this.drawGrid(a),this.pd.isPrinting&&1<this.nSplit&&this.drawSpectrumSource(a,s));x&&this.drawWidgets(b,c,l,!1,k,z,!0);!this.isDrawNoSpectra()&&((1==this.nSpectra||0<=this.iSpectrumSelected)&&(this.haveSingleYScale&&s==n||this.showAllStacked&&this.stackSelected&&s==this.iSpectrumSelected))&&this.drawHighlightsAndPeakTabs(b,c,s);if(f){if((1==p&&0>this.iSpectrumSelected||this.iSpectrumSelected==s&&
this.pd.isCurrentGraphSet(this))&&this.pd.titleOn&&!this.pd.titleDrawn)this.pd.drawTitle(a,this.height,this.width,this.pd.getDrawTitle(this.pd.isPrinting)),this.pd.titleDrawn=!0;this.haveSingleYScale&&s==n&&(this.pd.getBoolean(JSV.common.ScriptToken.YSCALEON)&&this.drawYScale(a,this),this.pd.getBoolean(JSV.common.ScriptToken.YUNITSON)&&this.drawYUnits(a))}var x=w.isContinuous(),z=(1<this.nSplit?s==this.iSpectrumMovedTo:this.isLinked||s==n)&&!this.pd.isPrinting&&x,B=!q&&null!=this.pendingIntegral&&
w===this.pendingIntegral.spec;if(f||B)this.drawPlot(B&&!f?b:a,s,w,x,u,q,null,z,B,j);this.drawIntegration(b,s,u,q,v,x,z);this.drawMeasurements(b,s);null!=this.pendingMeasurement&&this.pendingMeasurement.spec===w&&this.drawMeasurement(b,this.pendingMeasurement);z&&0<=this.xPixelMovedTo&&this.drawSpectrumPointer(b,w,u,v);1<this.nSpectra&&(1==this.nSplit&&this.pd.isCurrentGraphSet(this)&&f)&&(this.haveLeftRightArrows=!0,this.pd.isPrinting||(this.setScale(0),q=this.iSpectrumSelected,2!=this.nSpectra&&
(this.setPlotColor(a,(q+this.nSpectra-1)%this.nSpectra),this.fillArrow(a,1,this.yHArrows,this.xHArrows-9,!0),this.setCurrentBoxColor(a),this.fillArrow(a,1,this.yHArrows,this.xHArrows-9,!1)),0<=q&&(this.setPlotColor(a,q),this.fillCircle(a,this.xHArrows,this.yHArrows,!0)),this.setCurrentBoxColor(a),this.fillCircle(a,this.xHArrows,this.yHArrows,!1),this.setPlotColor(a,(q+1)%this.nSpectra),this.fillArrow(a,2,this.yHArrows,this.xHArrows+9,!0),this.setCurrentBoxColor(a),this.fillArrow(a,2,this.yHArrows,
this.xHArrows+9,!1)));u-=m}f&&(this.pd.getBoolean(JSV.common.ScriptToken.XSCALEON)&&this.drawXScale(a,this),this.pd.getBoolean(JSV.common.ScriptToken.XUNITSON)&&this.drawXUnits(a))}else f&&(this.pd.getBoolean(JSV.common.ScriptToken.XSCALEON)&&this.drawXScale(a,this.imageView),this.pd.getBoolean(JSV.common.ScriptToken.YSCALEON)&&this.drawYScale(a,this.imageView),0<=l&&this.draw2DUnits(a)),this.drawWidgets(b,c,l,e,k,!0,!1),this.drawWidgets(b,c,l,e,k,!0,!0),this.widgetsAreSet=!0;null!=this.annotations&&
this.drawAnnotations(b,this.annotations,null)},"~O,~O,~O,~N,~B,~B,~B");c(b,"drawSpectrumSource",function(a,b){this.pd.printFilePath(a,this.pd.thisWidth-this.pd.right,this.yPixel0,this.spectra.get(b).getFilePath())},"~O,~N");c(b,"doPlot",function(a,b){var c=this.stackSelected&&0<=this.iSpectrumSelected&&this.iSpectrumSelected!=a,g=this.showAllStacked||-1==this.iSpectrumSelected||this.iSpectrumSelected==a;return 1<this.nSplit?a==b:g&&(!this.pd.isPrinting||!c)},"~N,~N");c(b,"drawSpectrumPointer",function(a,
b,c,g){this.setColorFromToken(a,JSV.common.ScriptToken.PEAKTABCOLOR);var e=this.pd.integralShiftMode;null!=g&&((!this.pd.ctrlPressed||this.pd.isIntegralDrag)&&!this.isOnSpectrum(this.pd.mouseX,this.pd.mouseY,-1)?g=null:0==e&&(e=this.getShiftMode(this.pd.mouseX,this.pd.mouseY),0==e&&(e=2147483647)));var f=this.yValueMovedTo;this.yValueMovedTo=null==g?b.getYValueAt(this.xValueMovedTo):g.getPercentYValueAt(this.xValueMovedTo);this.setCoordStr(this.xValueMovedTo,this.yValueMovedTo);if(0!=e&&(this.setPlotColor(a,
2147483647==e?-1:0),(0>e||2147483647==e)&&this.drawHandle(a,this.xPixelPlot1,this.yPixelPlot0,3,!1),0<e&&this.drawHandle(a,this.xPixelPlot0,this.yPixelPlot1,3,!1),2147483647!=e))return;null!=g&&this.g2d.setStrokeBold(a,!0);Double.isNaN(f)||null!=this.pendingMeasurement?(this.g2d.drawLine(a,this.xPixelMovedTo,this.yPixel0,this.xPixelMovedTo,this.yPixel1),0<=this.xPixelMovedTo2&&this.g2d.drawLine(a,this.xPixelMovedTo2,this.yPixel0,this.xPixelMovedTo2,this.yPixel1),this.yValueMovedTo=NaN):(b=null==g?
c+this.toPixelY(this.yValueMovedTo):this.toPixelYint(this.yValueMovedTo/100),b==this.fixY(b)&&this.g2d.drawLine(a,this.xPixelMovedTo,b-10,this.xPixelMovedTo,b+10));null!=g&&this.g2d.setStrokeBold(a,!1)},"~O,JSV.common.Spectrum,~N,JSV.common.IntegralData");c(b,"setScale",function(a){this.viewData.setScale(a,this.xPixels,this.yPixels,this.spectra.get(a).isInverted())},"~N");c(b,"draw2DUnits",function(a){var b=this.getSpectrumAt(0).nucleusX,c=this.getSpectrumAt(0).nucleusY;this.setColorFromToken(a,JSV.common.ScriptToken.PLOTCOLOR);
this.drawUnits(a,b,this.imageView.xPixel1+5*this.pd.scalingFactor,this.yPixel1,1,1);this.drawUnits(a,c,this.imageView.xPixel0-5*this.pd.scalingFactor,this.yPixel0,1,0)},"~O");c(b,"drawPeakTabs",function(a,b,c){var g=1==this.nSpectra||0<=this.iSpectrumSelected?c.getPeakList():null;if(null!=g&&0<g.size()){null!=this.piMouseOver&&this.piMouseOver.spectrum===c&&this.pd.isMouseUp()?(this.g2d.setGraphicsColor(b,this.g2d.getColor4(240,240,240,140)),this.drawPeak(b,this.piMouseOver,0),c.setHighlightedPeak(this.piMouseOver)):
c.setHighlightedPeak(null);this.setColorFromToken(a,JSV.common.ScriptToken.PEAKTABCOLOR);for(b=g.size();0<=--b;){var e=g.get(b);this.drawPeak(a,e,e===c.getSelectedPeak()?14:7)}}},"~O,~O,JSV.common.Spectrum");c(b,"drawPeak",function(a,b,c){if(!this.pd.isPrinting){var g=b.getXMin(),e=b.getXMax();g!=e&&this.drawBar(a,b,g,e,null,c)}},"~O,JSV.common.PeakInfo,~N");c(b,"drawWidgets",function(a,b,c,g,e,f,j){this.setWidgets(g,c,e);if(!this.pd.isPrinting||!(null==this.imageView?!this.cur1D2Locked:this.sticky2Dcursor)){!this.pd.isPrinting&&
!j&&(e?(this.fillBox(a,this.xPixel0,this.pin1Dx0.yPixel1,this.xPixel1,this.pin1Dx1.yPixel1+2,JSV.common.ScriptToken.GRIDCOLOR),this.fillBox(a,this.pin1Dx0.xPixel0,this.pin1Dx0.yPixel1,this.pin1Dx1.xPixel0,this.pin1Dx1.yPixel1+2,JSV.common.ScriptToken.PLOTCOLOR)):(this.fillBox(a,this.imageView.xPixel0,this.pin2Dx0.yPixel1,this.imageView.xPixel1,this.pin2Dx0.yPixel1+2,JSV.common.ScriptToken.GRIDCOLOR),this.fillBox(a,this.pin2Dx0.xPixel0,this.pin2Dx0.yPixel1,this.pin2Dx1.xPixel0,this.pin2Dx1.yPixel1+
2,JSV.common.ScriptToken.PLOTCOLOR),this.fillBox(a,this.pin2Dy0.xPixel1,this.yPixel1,this.pin2Dy1.xPixel1+2,this.yPixel0,JSV.common.ScriptToken.GRIDCOLOR),this.fillBox(a,this.pin2Dy0.xPixel1,this.pin2Dy0.yPixel1,this.pin2Dy1.xPixel1+2,this.pin2Dy1.yPixel0,JSV.common.ScriptToken.PLOTCOLOR)),this.fillBox(a,this.pin1Dy0.xPixel1,this.yPixel1,this.pin1Dy1.xPixel1+2,this.yPixel0,JSV.common.ScriptToken.GRIDCOLOR),f&&this.fillBox(a,this.pin1Dy0.xPixel1,this.pin1Dy0.yPixel1,this.pin1Dy1.xPixel1+2,this.pin1Dy1.yPixel0,
JSV.common.ScriptToken.PLOTCOLOR));for(c=0;c<this.widgets.length;c++)if(g=this.widgets[c],!(null==g||!g.isPinOrCursor&&!this.zoomEnabled)){var k=g===this.cur1D2x1||g===this.cur1D2x2||g===this.cur2Dx0||g===this.cur2Dx1||g===this.cur2Dy;if((g.isPin||!g.isPinOrCursor)!=j){if(g.is2D){if(g===this.cur2Dx0&&!e)continue}else{var l=g===this.pin1Dy0||g===this.pin1Dy1||g===this.pin1Dy01;if(null!=this.imageView&&e==l||l&&!f||g===this.cur1D2x1&&null==this.gs2dLinkedX||g===this.cur1D2x2&&null==this.gs2dLinkedY||
g===this.zoomBox1D&&(this.pd.isIntegralDrag||0!=this.pd.integralShiftMode))if(!this.isLinked||null!=this.imageView)continue}if(!this.pd.isPrinting||k)g.isPinOrCursor?(this.setColorFromToken(a,g.color),this.g2d.drawLine(a,g.xPixel0,g.yPixel0,g.xPixel1,g.yPixel1),g.isVisible=!0,g.isPin&&this.drawHandle(a,g.xPixel0,g.yPixel0,2,!g.isEnabled)):g.xPixel1!=g.xPixel0&&this.fillBox(b,g.xPixel0,g.yPixel0,g.xPixel1,g.yPixel1,g===this.zoomBox1D&&this.pd.shiftPressed?JSV.common.ScriptToken.ZOOMBOXCOLOR2:JSV.common.ScriptToken.ZOOMBOXCOLOR)}}}},
"~O,~O,~N,~B,~B,~B,~B");c(b,"drawBar",function(a,b,c,g,e,f){Math.abs(g-c);Math.abs(this.toX(this.xPixel1)-this.toX(this.xPixel0));c=this.toPixelX(c);g=this.toPixelX(g);if(c>g){var j=c;c=g;g=j}c=this.fixX(c);g=this.fixX(g);3>g-c&&(c-=2,g+=2);null!=b&&b.setPixelRange(c,g);0==f?this.fillBox(a,c,this.yPixel0,g,this.yPixel0+this.yPixels,e):(this.fillBox(a,c,this.yPixel0+2,g,this.yPixel0+5,e),null!=b&&(c=v((c+g)/2),this.fillBox(a,c-1,this.yPixel0+2,c+1,this.yPixel0+2+f,e)))},"~O,JSV.common.PeakInfo,~N,~N,JSV.common.ScriptToken,~N");
c(b,"drawIntegration",function(a,b,c,g,e){null!=e&&(this.haveIntegralDisplayed(b)&&this.drawPlot(a,b,this.spectra.get(b),!0,c,!1,e,!0,!1,!1),this.drawIntegralValues(a,b,c));b=this.getIntegrationRatios(b);null!=b&&this.drawAnnotations(a,b,JSV.common.ScriptToken.INTEGRALPLOTCOLOR)},"~O,~N,~N,~B,JSV.common.IntegralData,~B,~B");c(b,"getMeasurements",function(a,b){var c=this.getDialog(a,b);return null==c||0==c.getData().size()||!c.getState()?null:c.getData()},"JSV.common.Annotation.AType,~N");c(b,"drawPlot",
function(a,b,c,g,e,f,j,k,l,s){var m=null==j?c.getXYCoords():this.getIntegrationGraph(b).getXYCoords(),p=null!=j;j=p?j.getBitSet():null;k=l||null!=c.fillColor&&k;f=f?-2:p?-1:!this.allowStacking?0:b;this.setPlotColor(a,f);var n=!0,q=this.toPixelY(0);p?k=(new Boolean(k&q==this.fixY(q))).valueOf():q=this.fixY(q);var u=p||k?this.pd.getColor(JSV.common.ScriptToken.INTEGRALPLOTCOLOR):null;c=null==u||null==c.fillColor?u:c.fillColor;u=this.viewData.getStartingPointIndex(b);b=this.viewData.getEndingPointIndex(b);
if(g&&!s){b--;(s=(p||null!=this.pendingIntegral)&&this.g2d.canDoLineTo())&&this.g2d.doStroke(a,!0);var v=!1;for(g=u;g<=b;g++){var w=m[g],x=m[g+1],z=p?this.toPixelYint(w.getYVal()):this.toPixelY(w.getYVal());if(-2147483648!=z){var B=p?this.toPixelYint(x.getYVal()):this.toPixelY(x.getYVal());if(-2147483648!=B){var w=w.getXVal(),C=x.getXVal(),x=this.toPixelX(w),D=this.toPixelX(C),z=this.fixY(e+z),B=this.fixY(e+B);p&&(g==u&&(this.xPixelPlot1=x,this.yPixelPlot0=z),this.xPixelPlot0=D,this.yPixelPlot1=B);
if(!(D==x&&z==B))if(k&&l&&this.pendingIntegral.overlaps(w,C))null!=c&&(this.g2d.doStroke(a,!1),this.g2d.setGraphicsColor(a,c)),this.g2d.fillRect(a,Math.min(x,D),Math.min(q,z),Math.max(1,Math.abs(D-x)),Math.abs(q-z)),null!=c&&(this.g2d.doStroke(a,!1),this.g2d.doStroke(a,!0),v=!1,this.setPlotColor(a,f));else if(!(z==B&&z==this.yPixel0)&&(null!=j&&j.get(g)!=n&&(n=j.get(g),s&&v&&(this.g2d.doStroke(a,!1),this.g2d.doStroke(a,!0),v=!1),!this.pd.isPrinting&&0!=this.pd.integralShiftMode?this.setPlotColor(a,
0):n?this.setColorFromToken(a,JSV.common.ScriptToken.INTEGRALPLOTCOLOR):this.setPlotColor(a,-3)),!this.pd.isPrinting||n))v?this.g2d.lineTo(a,D,B):(this.g2d.drawLine(a,x,z,D,B),v=s)}}}s&&this.g2d.doStroke(a,!1)}else{for(g=u;g<=b;g++)l=m[g],B=this.toPixelY(l.getYVal()),-2147483648!=B&&(x=this.toPixelX(l.getXVal()),z=this.toPixelY(Math.max(this.getScale().minYOnScale,0)),z=this.fixY(e+z),B=this.fixY(e+B),z==B&&(z==this.yPixel0||z==this.yPixel1)||(s?this.g2d.fillRect(a,x-1,B-1,3,3):this.g2d.drawLine(a,
x,z,x,B)));!s&&this.getScale().isYZeroOnScale()&&(e+=this.toPixelY(this.getScale().spectrumYRef),e==this.fixY(e)&&this.g2d.drawLine(a,this.xPixel1,e,this.xPixel0,e))}},"~O,~N,JSV.common.Spectrum,~B,~N,~B,JSV.common.IntegralData,~B,~B,~B");c(b,"drawFrame",function(a,b,c,g,e){if(!this.pd.gridOn||this.pd.isPrinting)if(this.setColorFromToken(a,JSV.common.ScriptToken.GRIDCOLOR),this.g2d.drawRect(a,this.xPixel0,this.yPixel0,this.xPixels,this.yPixels),this.pd.isPrinting)return;this.setCurrentBoxColor(a);
e&&(0<=b&&(this.setPlotColor(a,b),this.fillArrow(a,3,this.xVArrows,v((this.yPixel00+this.yPixel11)/2)-9,!0),this.fillArrow(a,4,this.xVArrows,v((this.yPixel00+this.yPixel11)/2)+9,!0),this.setCurrentBoxColor(a)),this.fillArrow(a,3,this.xVArrows,v((this.yPixel00+this.yPixel11)/2)-9,!1),this.fillCircle(a,this.xVArrows,v((this.yPixel00+this.yPixel11)/2),!1),this.fillArrow(a,4,this.xVArrows,v((this.yPixel00+this.yPixel11)/2)+9,!1));if(null==this.imageView&&c){b=this.xPixel00+10;c=this.xPixel11-10;e=this.yPixel00+
1;var f=this.yPixel11-2;this.g2d.drawLine(a,b,e,c,e);this.g2d.drawLine(a,c,e,c,f);this.g2d.drawLine(a,b,f,c,f);this.splitterX=this.closerX=-2147483648;this.drawBox(a,c-10,e,c,e+10,null);this.g2d.drawLine(a,c-10,e+10,c,e);this.g2d.drawLine(a,c,e+10,c-10,e);this.closerX=c-10;this.closerY=e;g&&(c-=10,this.fillBox(a,c-10,e,c,e+10,null),this.splitterX=c-10,this.splitterY=e)}},"~O,~N,~B,~B,~B");c(b,"drawGrid",function(a){if(this.pd.gridOn&&null==this.imageView){this.setColorFromToken(a,JSV.common.ScriptToken.GRIDCOLOR);
var b;if(Double.isNaN(this.getScale().firstX)){b=this.getScale().maxXOnScale+this.getScale().steps[0]/2;for(var c=this.getScale().minXOnScale;c<b;c+=this.getScale().steps[0]){var g=this.toPixelX(c);this.g2d.drawLine(a,g,this.yPixel0,g,this.yPixel1)}}else{b=1.0001*this.getScale().maxXOnScale;for(c=this.getScale().firstX;c<=b;c+=this.getScale().steps[0])g=this.toPixelX(c),this.g2d.drawLine(a,g,this.yPixel0,g,this.yPixel1)}for(c=this.getScale().firstY;c<this.getScale().maxYOnScale+this.getScale().steps[1]/
2;c+=this.getScale().steps[1])b=this.toPixelY(c),b==this.fixY(b)&&this.g2d.drawLine(a,this.xPixel0,b,this.xPixel1,b)}},"~O");c(b,"drawXScale",function(a,b){this.setColorFromToken(a,JSV.common.ScriptToken.SCALECOLOR);this.pd.isPrinting&&this.g2d.drawLine(a,b.getXPixel0(),this.yPixel1,b.getXPixel0()+b.getXPixels()-1,this.yPixel1);for(var c=this.getScale().precision[0],g=this.pd.setFont(a,b.getXPixels(),0,this.pd.isPrinting?10:12,!1),e=this.yPixel1,f=this.yPixel1+4*this.pd.scalingFactor,j=this.yPixel1+
2*this.pd.scalingFactor,g=g.getHeight(),k=b.toPixelX(this.getScale().steps[0])-b.toPixelX(0),l=Math.abs(0.95*k),s=this.getScale().firstX-this.getScale().steps[0],m=1.0001*(this.getScale().maxXOnScale+this.getScale().steps[0]),p=0;2>p;p++){1==p&&JSV.common.ScaleData.fixScale(this.mapX);for(var n=1E10,q=s;q<=m;q+=this.getScale().steps[0]){var k=b.toPixelX(q),u=Double.$valueOf(q),w;switch(p){case 0:w=JU.DF.formatDecimalDbl(q,c);this.mapX.put(u,w);this.drawTick(a,k,e,f,b);k=Math.abs(n-q);n=this.getScale().minorTickCounts[0];
if(0!=n){k/=n;for(w=1;w<n;w++)this.drawTick(a,b.toPixelX(q-w*k),e,j,b)}n=q;continue;case 1:w=this.mapX.get(u);if(null==w||k!=b.fixX(k))continue;var u=this.pd.getStringWidth(w),x=k+v(u/2)==b.fixX(k+v(u/2))?2:0;0<x&&this.g2d.drawString(a,w,k-v(u/x),f+g);q+=Math.floor(u/l)*this.getScale().steps[0]}}}this.mapX.clear()},"~O,JSV.common.XYScaleConverter");c(b,"drawTick",function(a,b,c,g,e){b==e.fixX(b)&&this.g2d.drawLine(a,b,c,b,g)},"~O,~N,~N,~N,JSV.common.XYScaleConverter");c(b,"drawYScale",function(a,
b){var c=b.getScale(),g=c.precision[1],e=this.pd.setFont(a,b.getXPixels(),0,this.pd.isPrinting?10:12,!1).getHeight(),f=c.maxYOnScale+c.steps[1]/2,j=-2147483648;this.setColorFromToken(a,JSV.common.ScriptToken.SCALECOLOR);for(var k=0;2>k;k++){1==k&&JSV.common.ScaleData.fixScale(this.mapX);for(var l=c.firstY;l<f;l+=c.steps[1]){var s=Double.$valueOf(l),m=b.getXPixel0(),p=b.toPixelY(l);if(p==b.fixY(p)){var n;0==k&&this.g2d.drawLine(a,m,p,m-3*this.pd.scalingFactor,p);if(!(Math.abs(p-j)<=e))switch(j=p,k){case 0:n=
JU.DF.formatDecimalDbl(l,g);this.mapX.put(s,n);break;case 1:n=this.mapX.get(s);if(null==n)continue;n.startsWith("0")&&n.contains("E")&&(n="0");this.g2d.drawString(a,n,m-4*this.pd.scalingFactor-this.pd.getStringWidth(n),p+v(e/3))}}}}this.mapX.clear()},"~O,JSV.common.XYScaleConverter");c(b,"drawXUnits",function(a){var b=this.spectra.get(0).getAxisLabel(!0);null!=b&&this.drawUnits(a,b,this.xPixel1+25*this.pd.scalingFactor,this.yPixel1+5*this.pd.scalingFactor,1,1)},"~O");c(b,"drawUnits",function(a,b,
c,g,e,f){this.setColorFromToken(a,JSV.common.ScriptToken.UNITSCOLOR);this.pd.setFont(a,(null==this.imageView?this:this.imageView).getXPixels(),3,10,!1);this.g2d.drawString(a,b,v(c-this.pd.getStringWidth(b)*e),v(g+this.pd.getFontHeight()*f))},"~O,~S,~N,~N,~N,~N");c(b,"drawYUnits",function(a){var b=this.spectra.get(0).getAxisLabel(!1);null!=b&&this.drawUnits(a,b,(this.pd.isPrinting?30:5)*this.pd.scalingFactor,this.yPixel0+(this.pd.isPrinting?0:5)*this.pd.scalingFactor,0,-1)},"~O");c(b,"drawHighlightsAndPeakTabs",
function(a,b,c){var g=this.getMeasurements(JSV.common.Annotation.AType.PeakList,c),e=this.spectra.get(c);if(this.pd.isPrinting)null!=g&&(this.setColorFromToken(a,JSV.common.ScriptToken.PEAKTABCOLOR),this.printPeakList(a,e,g));else{if(null==g){for(var f=0;f<this.highlights.size();f++){var j=this.highlights.get(f);j.spectrum===e&&(this.pd.setHighlightColor(j.color),this.drawBar(b,null,j.x1,j.x2,JSV.common.ScriptToken.HIGHLIGHTCOLOR,0))}this.pd.peakTabsOn&&this.drawPeakTabs(a,b,e)}if(null!=g){b=e.isInverted()?
this.yPixel1-10*this.pd.scalingFactor:this.yPixel0;this.setColorFromToken(a,JSV.common.ScriptToken.PEAKTABCOLOR);for(f=g.size();0<=--f;)e=g.get(f),e=this.toPixelX(e.getXVal()),this.g2d.drawLine(a,e,b,e,b+10*this.pd.scalingFactor);this.isVisible(this.getDialog(JSV.common.Annotation.AType.PeakList,c))&&(b=this.toPixelY(g.getThresh()),b==this.fixY(b)&&!this.pd.isPrinting&&this.g2d.drawLine(a,this.xPixel0,b,this.xPixel1,b))}}},"~O,~O,~N");c(b,"printPeakList",function(a,b,c){var g=c.getMeasurementListArray(null);
if(0!=g.length){this.pd.setFont(a,this.xPixels,0,8,!1);for(var e=this.pd.getFontHeight(),f=E(c.size(),0),j=E(c.size(),0),k=0,l=5*this.pd.scalingFactor,s=10*this.pd.scalingFactor,m=15*this.pd.scalingFactor,p=25*this.pd.scalingFactor,n=0;n<g.length;n++)j[n]=this.toPixelX(Double.parseDouble(g[n][1])),0==n?f[n]=j[n]:(f[n]=Math.max(f[n-1]+e,j[n]+e),k+=f[n]-j[n]);k/=2*g.length;f[0]-k<this.xPixel0+p&&(k=f[0]-(this.xPixel0+p));for(n=0;n<g.length;n++)f[n]-=k;n=b.isInverted();b=this.pd.getStringWidth("99.9999");
for(var k=6<=g[0].length?this.pd.getStringWidth("99.99"):0,p=n?-1:1,q=(n?this.yPixel1:this.yPixel0)+p*(k+b+m),n=0;n<g.length;n++)this.g2d.drawLine(a,f[n],q,f[n],q+l*p),this.g2d.drawLine(a,f[n],q+l*p,j[n],q+s*p),this.g2d.drawLine(a,j[n],q+s*p,j[n],q+m*p),0<k&&0<g[n][4].length&&this.g2d.drawLine(a,v((f[n]+f[n-1])/2),q-b+l,v((f[n]+f[n-1])/2),q-b-l);q-=2*p*this.pd.scalingFactor;0<k&&(this.drawStringRotated(a,-90,f[0]-m,q,"  ppm"),this.drawStringRotated(a,-90,f[0]-m,q-b-l," Hz"));for(n=c.size();0<=--n;)this.drawStringRotated(a,
-90*p,f[n]+v(p*e/3),q,g[n][1]),0<k&&0<g[n][4].length&&(c=v((f[n]+f[n-1])/2)+v(e/3),this.drawStringRotated(a,-90,c,q-b-l,g[n][4]))}},"~O,JSV.common.Spectrum,JSV.common.PeakData");c(b,"drawStringRotated",function(a,b,c,g,e){this.g2d.drawStringRotated(a,e,c,g,b)},"~O,~N,~N,~N,~S");c(b,"drawAnnotations",function(a,b,c){this.pd.setFont(a,this.xPixels,1,18,!1);for(var g=b.size();0<=--g;){var e=b.get(g);this.setAnnotationColor(a,e,c);var f=(e.is2D?this.imageView:this).toPixelX(e.getXVal()),j=e.isPixels()?
v(this.yPixel0+10+10*this.pd.scalingFactor-e.getYVal()):e.is2D?this.imageView.subIndexToPixelY(v(e.getYVal())):this.toPixelY(e.getYVal());this.g2d.drawString(a,e.text,f+e.offsetX*this.pd.scalingFactor,j-e.offsetY*this.pd.scalingFactor)}},"~O,JU.Lst,JSV.common.ScriptToken");c(b,"drawIntegralValues",function(a,b,c){var g=this.getMeasurements(JSV.common.Annotation.AType.Integration,b);if(null!=g){this.pd.isPrinting?this.pd.setFont(a,this.xPixels,0,8,!1):this.pd.setFont(a,this.xPixels,1,12,!1);this.setColorFromToken(a,
JSV.common.ScriptToken.INTEGRALPLOTCOLOR);var e=this.pd.getFontHeight();this.g2d.setStrokeBold(a,!0);for(var f=g.size();0<=--f;){var j=g.get(f);if(0!=j.getValue()){var k=this.toPixelX(j.getXVal2()),l=c*this.pd.scalingFactor+this.toPixelYint(j.getYVal()),n=c*this.pd.scalingFactor+this.toPixelYint(j.getYVal2());k!=this.fixX(k)||(l!=this.fixY(l)||n!=this.fixY(n))||(this.pd.isPrinting||this.g2d.drawLine(a,k,l,k,n),this.g2d.drawString(a,"  "+j.text,k,v((l+n)/2)+v(e/3)))}}this.g2d.setStrokeBold(a,!1)}b==
this.getFixedSelectedSpectrumIndex()&&(this.selectedSpectrumIntegrals=g)},"~O,~N,~N");c(b,"drawMeasurements",function(a,b){var c=this.getMeasurements(JSV.common.Annotation.AType.Measurements,b);if(null!=c)for(var g=c.size();0<=--g;)this.drawMeasurement(a,c.get(g));b==this.getFixedSelectedSpectrumIndex()&&(this.selectedSpectrumMeasurements=c)},"~O,~N");c(b,"drawMeasurement",function(a,b){if(!(0==b.text.length&&b!==this.pendingMeasurement)){this.pd.setFont(a,this.xPixels,1,12,!1);this.g2d.setGraphicsColor(a,
b===this.pendingMeasurement?this.pd.getColor(JSV.common.ScriptToken.PEAKTABCOLOR):this.pd.BLACK);var c=this.toPixelX(b.getXVal()),g=this.toPixelY(b.getYVal()),e=this.toPixelX(b.getXVal2());if(!Double.isNaN(b.getXVal())&&!(c!=this.fixX(c)||e!=this.fixX(e))){var f=2<=Math.abs(c-e),j=this.getScale().isYZeroOnScale()&&b.spec.isHNMR(),k=v((c+e)/2);this.g2d.setStrokeBold(a,!0);f&&this.g2d.drawLine(a,c,g,e,g);j&&this.g2d.drawLine(a,c+1,this.yPixel1-1,e,this.yPixel1-1);this.g2d.setStrokeBold(a,!1);f&&this.g2d.drawString(a,
b.text,k+b.offsetX,g-b.offsetY);j&&(this.g2d.drawLine(a,c,this.yPixel1,c,this.yPixel1-6*this.pd.scalingFactor),this.g2d.drawLine(a,e,this.yPixel1,e,this.yPixel1-6*this.pd.scalingFactor))}}},"~O,JSV.common.Measurement");c(b,"getPinSelected",function(a,b){if(null!=this.widgets)for(var c=0;c<this.widgets.length;c++)if(null!=this.widgets[c]&&this.widgets[c].isPinOrCursor&&this.widgets[c].selected(a,b))return this.widgets[c];return null},"~N,~N");c(b,"set2DCrossHairs",function(a,b){var c;if(a==this.imageView.fixX(a)&&
b==this.fixY(b)&&(this.pin1Dx1.setX(c=this.imageView.toX(a),this.toPixelX(c)),this.cur2Dx1.setX(c,a),this.setCurrentSubSpectrum(this.imageView.toSubspectrumIndex(b)),this.isLinked)){var g=this.imageView.toY(b);this.pd.set2DCrossHairsLinked(this,c,g,!this.sticky2Dcursor)}},"~N,~N");c(b,"reset2D",function(a){a?(this.imageView.setView0(this.imageView.xPixel0,this.pin2Dy0.yPixel0,this.imageView.xPixel1,this.pin2Dy1.yPixel0),this.doZoom(0,this.getScale().minY,0,this.getScale().maxY,!0,!1,!1,!1,!0)):this.imageView.setView0(this.pin2Dx0.xPixel0,
this.imageView.yPixel0,this.pin2Dx1.xPixel0,this.imageView.yPixel1)},"~B");c(b,"setAnnotationText",function(a){var b=this.pd.getInput("New text?","Set Label",a.text);if(null==b)return!1;0==b.length?this.annotations.removeObj(a):a.text=b;return!0},"JSV.common.Annotation");c(b,"checkIntegral",function(a,b,c){var g=this.getDialog(JSV.common.Annotation.AType.Integration,-1);if(null==g)return!1;a=g.getData().addIntegralRegion(a,b);c&&g.isDialog()&&g.update(null,0,0);if(Double.isNaN(b))return!1;this.pendingIntegral=
c?null:a;this.pd.isIntegralDrag=!c;this.selectedSpectrumIntegrals=null;return!0},"~N,~N,~B");c(b,"setToolTipForPixels",function(a,b){if(this.iSpectrumMovedTo!=this.iSpectrumClicked||this.pd.getCurrentGraphSet()!==this)this.pd.setToolTipText("click spectrum to activate");else if(this.isSplitWidget(a,b))this.pd.setToolTipText("click to "+(1<this.nSplit?"combine":"split"));else if(this.isCloserWidget(a,b))this.pd.setToolTipText("click to close");else{var c=this.getPinSelected(a,b),g=this.getScale().precision[0],
e=this.getScale().precision[1];if(null!=c)this.setStartupPinTip()||(c===this.pin1Dx01||c===this.pin2Dx01?g=JU.DF.formatDecimalDbl(Math.min(this.pin1Dx0.getXVal(),this.pin1Dx1.getXVal()),g)+" - "+JU.DF.formatDecimalDbl(Math.max(this.pin1Dx0.getXVal(),this.pin1Dx1.getXVal()),g):c===this.pin1Dy01?g=JU.DF.formatDecimalDbl(Math.min(this.pin1Dy0.getYVal(),this.pin1Dy1.getYVal()),e)+" - "+JU.DF.formatDecimalDbl(Math.max(this.pin1Dy0.getYVal(),this.pin1Dy1.getYVal()),e):c===this.cur2Dy?(c=this.imageView.toSubspectrumIndex(c.yPixel0),
g=this.get2DYLabel(c,g)):g=c===this.pin2Dy01?""+v(Math.min(this.pin2Dy0.getYVal(),this.pin2Dy1.getYVal()))+" - "+v(Math.max(this.pin2Dy0.getYVal(),this.pin2Dy1.getYVal())):c.isXtype?JU.DF.formatDecimalDbl(c.getXVal(),g):c.is2D?""+v(c.getYVal()):JU.DF.formatDecimalDbl(c.getYVal(),e),this.pd.setToolTipText(g));else{if(null!=this.imageView){if(this.imageView.fixX(a)==a&&this.fixY(b)==b){c=this.imageView.toSubspectrumIndex(b);g="y="+this.get2DYLabel(c,g)+" / x="+JU.DF.formatDecimalDbl(this.imageView.toX(a),
g)+" "+this.getSpectrum().getAxisLabel(!0);this.pd.setToolTipText(g);this.pd.coordStr=g;return}if(!this.pd.display1D){this.pd.setToolTipText("");this.pd.coordStr="";return}}var c=this.toX(this.fixX(a)),g=null!=this.imageView&&this.imageView.isXWithinRange(a)?this.imageView.toSubspectrumIndex(this.fixY(b)):this.toY(this.fixY(b)),e=this.setCoordStr(c,g),f=this.getFixedSelectedSpectrumIndex();this.isInPlotRegion(a,b)?1!=this.nSpectra&&this.haveIntegralDisplayed(f)&&(g=this.getIntegrationGraph(f).getPercentYValueAt(c),
e+=", "+JU.DF.formatDecimalDbl(g,1)):g=NaN;this.pd.setToolTipText(null!=this.selectedIntegral?"click to set value":null!=this.pendingMeasurement||null!=this.selectedMeasurement?this.pd.hasFocus()?"Press ESC to delete "+(null!=this.selectedIntegral?"integral, DEL to delete all visible, or N to normalize":null==this.pendingMeasurement?'"'+this.selectedMeasurement.text+'" or DEL to delete all visible':"measurement"):"":Double.isNaN(g)?null:e)}}},"~N,~N");c(b,"isFrameBox",function(a,b,c,g){return 5>Math.abs(a-
(c+5))&&5>Math.abs(b-(g+5))},"~N,~N,~N,~N");c(b,"setCoordStr",function(a,b){var c=JU.DF.formatDecimalDbl(a,this.getScale().precision[0]);this.pd.coordStr="("+c+(this.haveSingleYScale||0<=this.iSpectrumSelected?", "+JU.DF.formatDecimalDbl(b,this.getScale().precision[1]):"")+")";return c},"~N,~N");c(b,"setStartupPinTip",function(){if(null==this.pd.startupPinTip)return!1;this.pd.setToolTipText(this.pd.startupPinTip);this.pd.startupPinTip=null;return!0});c(b,"get2DYLabel",function(a,b){var c=this.getSpectrumAt(0).getSubSpectra().get(a);
return JU.DF.formatDecimalDbl(c.getY2DPPM(),b)+" PPM"+(c.y2DUnits.equals("HZ")?" ("+JU.DF.formatDecimalDbl(c.getY2D(),b)+" HZ) ":"")},"~N,~N");c(b,"isOnSpectrum",function(a,b,c){var g=null,e=!0,f=0>c;if(f){g=this.getDialog(JSV.common.Annotation.AType.Integration,-1);if(null==g)return!1;g=g.getData().getXYCoords();c=this.getFixedSelectedSpectrumIndex()}else{this.setScale(c);var j=this.spectra.get(c),g=j.xyCoords,e=j.isContinuous()}var j=c*F(this.yPixels*(this.yStackOffsetPercent/100)),k=this.viewData.getStartingPointIndex(c);
c=this.viewData.getEndingPointIndex(c);if(e)for(e=k;e<c;e++){var l=g[e],n=g[e+1],k=this.toPixelX(l.getXVal()),m=this.toPixelX(n.getXVal()),l=f?this.toPixelYint(l.getYVal()):this.toPixelY(l.getYVal()),n=f?this.toPixelYint(n.getYVal()):this.toPixelY(n.getYVal());if(!(-2147483648==l||-2147483648==n))if(l=this.fixY(l)-j,n=this.fixY(n)-j,JSV.common.GraphSet.isOnLine(a,b,k,l,m,n))return!0}else for(e=k;e<=c;e++)if(f=g[e],n=this.toPixelY(f.getYVal()),-2147483648!=n&&(k=this.toPixelX(f.getXVal()),l=this.toPixelY(Math.max(this.getScale().minYOnScale,
0)),l=this.fixY(l),n=this.fixY(n),!(l==n&&(l==this.yPixel0||l==this.yPixel1))&&JSV.common.GraphSet.isOnLine(a,b,k,l,k,n)))return!0;return!1},"~N,~N,~N");b.distance=c(b,"distance",function(a,b){return Math.sqrt(a*a+b*b)},"~N,~N");b.findCompatibleGraphSet=c(b,"findCompatibleGraphSet",function(a,b){for(var c=0;c<a.size();c++)if(JSV.common.Spectrum.areXScalesCompatible(b,a.get(c).getSpectrum(),!1,!1))return a.get(c);return null},"JU.Lst,JSV.common.Spectrum");b.isGoodEvent=c(b,"isGoodEvent",function(a,
b,c){return null==b?5<Math.abs(a.xPixel1-a.xPixel0)&&5<Math.abs(a.yPixel1-a.yPixel0):c?5<Math.abs(a.xPixel0-b.xPixel0):5<Math.abs(a.yPixel0-b.yPixel0)},"JSV.common.PlotWidget,JSV.common.PlotWidget,~B");b.isOnLine=c(b,"isOnLine",function(a,b,c,g,e,f){var j=Math.abs(c-a);if(2>j&&2>Math.abs(g-b))return!0;var k=e-a;if(2>Math.abs(k)&&2>Math.abs(f-b))return!0;var l=g-f;if(2<Math.abs(l)&&g<b==f<b)return!1;var n=c-e;return 2<Math.abs(n)&&c<a==e<a?!1:JSV.common.GraphSet.distance(j,g-b)+JSV.common.GraphSet.distance(k,
b-f)<JSV.common.GraphSet.distance(n,l)+2},"~N,~N,~N,~N,~N,~N");b.setFractionalPositions=c(b,"setFractionalPositions",function(a,b,c){var g=b.size(),e=0,f=0;a.isLinked=c!==JSV.common.PanelData.LinkMode.NONE;if(c===JSV.common.PanelData.LinkMode.NONE){for(var j=0;j<g;j++)c=b.get(j),e+=(c.getSpectrumAt(0).is1D(),1)*c.nSplit;e=1/e;for(j=0;j<g;j++)c=b.get(j),c.isLinked=!1,a=c.getSpectrumAt(0).is1D()?e:1*e,c.fX0=0,c.fY0=f,c.fracX=1,c.fracY=a,f+=a*c.nSplit}else{var e=null,k=-1;if(2==g||3==g)for(j=0;j<g;j++)if(c=
b.get(j),!c.getSpectrum().is1D()){e=c;0<=k&&(j=-2);k=j;break}if(-2==k||-1==k&&2!=g)JSV.common.GraphSet.setFractionalPositions(a,b,JSV.common.PanelData.LinkMode.NONE);else for(j=0;j<g;j++)c=b.get(j),c.isLinked=!0,a=c.getSpectrumAt(0),a.is1D()?(null!=e&&(k=e.getSpectrumAt(0),JSV.common.Spectrum.areLinkableX(a,k)&&(c.gs2dLinkedX=e),JSV.common.Spectrum.areLinkableY(a,k)&&(c.gs2dLinkedY=e)),c.fX0=0,c.fY0=f,c.fracX=null==e?1:0.5,c.fracY=3==g||null==e?0.5:1,f+=0.5):(c.fX0=0.5,c.fY0=0,c.fracX=0.5,c.fracY=
1)}},"JSV.common.PanelData,JU.Lst,JSV.common.PanelData.LinkMode");c(b,"addAnnotation",function(a,b){if(0==a.size()||1==a.size()&&a.get(0).equalsIgnoreCase("none"))return this.lastAnnotation=this.annotations=null;4>a.size()&&null==this.lastAnnotation&&(this.lastAnnotation=this.getAnnotation((this.getScale().maxXOnScale+this.getScale().minXOnScale)/2,(this.getScale().maxYOnScale+this.getScale().minYOnScale)/2,b,!1,!1,0,0));var c=this.getAnnotation(a,this.lastAnnotation);if(null==c)return null;if(null==
this.annotations&&1==a.size()&&'"'==a.get(0).charAt(0))return c=c.text,this.getSpectrum().setTitle(c),c;this.lastAnnotation=c;this.addAnnotation(c,!1);return null},"JU.Lst,~S");c(b,"addHighlight",function(a,b,c,g){null==c&&(c=this.getSpectrumAt(0));a=Y(JSV.common.GraphSet.Highlight,this,null,a,b,c,null==g?this.pd.getColor(JSV.common.ScriptToken.HIGHLIGHTCOLOR):g);this.highlights.contains(a)||this.highlights.addLast(a)},"~N,~N,JSV.common.Spectrum,javajs.api.GenericColor");c(b,"addPeakHighlight",function(a){for(var b=
this.spectra.size();0<=--b;){var c=this.spectra.get(b);this.removeAllHighlights(c);if(!(null==a||a.isClearAll()||c!==a.spectrum)){var g=a.toString();if(null!=g){var e=JU.PT.getQuotedAttribute(g,"xMin"),g=JU.PT.getQuotedAttribute(g,"xMax");if(null==e||null==g)break;e=JU.PT.parseFloat(e);g=JU.PT.parseFloat(g);if(Float.isNaN(e)||Float.isNaN(g))break;this.pd.addHighlight(this,e,g,c,200,140,140,100);c.setSelectedPeak(a);!this.getScale().isInRangeX(e)&&!(this.getScale().isInRangeX(g)||e<this.getScale().minX&&
this.getScale().maxX<g)&&this.setZoomTo(0)}}}},"JSV.common.PeakInfo");c(b,"advanceSubSpectrum",function(a){var b=this.getSpectrumAt(0);a=b.advanceSubSpectrum(a);b.isForcedSubset()&&this.viewData.setXRangeForSubSpectrum(this.getSpectrum().getXYCoords());this.pd.notifySubSpectrumChange(a,this.getSpectrum())},"~N");c(b,"checkSpectrumClickedEvent",function(a,b,c){if(null!=this.nextClickForSetPeak||(1<c||null!=this.pendingMeasurement||!this.isInPlotRegion(a,b))||0==c&&(c=this.isOnSpectrum(a,b,-1),this.pd.integralShiftMode=
c?this.getShiftMode(a,b):0,this.pd.isIntegralDrag=0==this.pd.integralShiftMode&&(c||this.haveIntegralDisplayed(-1)&&null!=this.findMeasurement(this.getIntegrationGraph(-1),a,b,0)),0!=this.pd.integralShiftMode)||!this.showAllStacked)return!1;this.stackSelected=!1;for(c=0;c<this.nSpectra;c++)if(this.isOnSpectrum(a,b,c))return this.setSpectrumClicked(this.iPreviousSpectrumClicked=c),!1;if(this.isDialogOpen())return!1;this.setSpectrumClicked(-1);return this.stackSelected=!1},"~N,~N,~N");c(b,"getShiftMode",
function(a,b){return this.isStartEndIntegral(a,!1)?b:this.isStartEndIntegral(a,!0)?-b:0},"~N,~N");c(b,"isDialogOpen",function(){return this.isVisible(this.getDialog(JSV.common.Annotation.AType.Integration,-1))||this.isVisible(this.getDialog(JSV.common.Annotation.AType.Measurements,-1))||this.isVisible(this.getDialog(JSV.common.Annotation.AType.PeakList,-1))});c(b,"isStartEndIntegral",function(a,b){return b?20>this.xPixelPlot1-a:20>a-this.xPixelPlot0},"~N,~B");c(b,"checkWidgetEvent",function(a,b,c){if(!this.widgetsAreSet)return!1;
this.widgetsAreSet=!1;if(c){if(2==this.pd.clickCount&&this.lastIntDragX!=a&&!this.is2dClick(a,b)){if(null==this.pendingMeasurement)return-1==this.iSpectrumClicked&&0<=this.iPreviousSpectrumClicked&&this.setSpectrumClicked(this.iPreviousSpectrumClicked),this.processPendingMeasurement(a,b,2),!0}else if(!this.is2dClick(a,b)&&(this.isOnSpectrum(a,b,-1)&&this.checkIntegral(this.toX(a),NaN,!1),this.lastIntDragX==a&&(this.pd.isIntegralDrag=!0,!this.checkIntegral(this.toX(a),this.toX(a),!1))))return!1;if(null!=
this.pendingMeasurement)return!0;c=this.getPinSelected(a,b);null==c&&(b=this.fixY(b),a<this.xPixel1?(this.pd.shiftPressed&&this.setSpectrumClicked(this.iPreviousSpectrumClicked),a=this.fixX(a),null==this.zoomBox1D&&this.newPins(),this.zoomBox1D.setX(this.toX(a),a),this.zoomBox1D.yPixel0=b,c=this.zoomBox1D):null!=this.imageView&&a<this.imageView.xPixel1&&(this.zoomBox2D.setX(this.imageView.toX(a),this.imageView.fixX(a)),this.zoomBox2D.yPixel0=b,c=this.zoomBox2D));this.pd.thisWidget=c;return!1}this.nextClickForSetPeak=
null;c=this.pd.thisWidget;if(null==c)return!1;if(c===this.zoomBox1D)return this.zoomBox1D.xPixel1=this.fixX(a),this.zoomBox1D.yPixel1=this.fixY(b),this.pd.isIntegralDrag&&this.zoomBox1D.xPixel0!=this.zoomBox1D.xPixel1&&(this.lastIntDragX<=a!=this.zoomBox1D.xPixel0<=a&&(this.zoomBox1D.xPixel0=this.lastIntDragX,this.zoomBox1D.xPixel1=a,this.zoomBox1D.setXVal(this.toX(this.zoomBox1D.xPixel0))),this.lastIntDragX=a,this.checkIntegral(this.zoomBox1D.getXVal(),this.toX(this.zoomBox1D.xPixel1),!1)),!1;if(!this.zoomEnabled)return!1;
if(c===this.zoomBox2D)return this.zoomBox2D.xPixel1=this.imageView.fixX(a),this.zoomBox2D.yPixel1=this.fixY(b),!0;if(c===this.cur2Dy)return b=this.fixY(b),this.cur2Dy.yPixel0=this.cur2Dy.yPixel1=b,this.setCurrentSubSpectrum(this.imageView.toSubspectrumIndex(b)),!0;if(c===this.cur2Dx0||c===this.cur2Dx1)return!1;if(c===this.pin1Dx0||c===this.pin1Dx1||c===this.pin1Dx01){a=this.fixX(a);c.setX(this.toX0(a),a);if(c===this.pin1Dx01){c=a-v((this.pin1Dx0.xPixel0+this.pin1Dx1.xPixel0)/2);a=this.pin1Dx0.xPixel0+
c;b=this.pin1Dx1.xPixel0+c;if(0==c||this.fixX(a)!=a||this.fixX(b)!=b)return!0;this.pin1Dx0.setX(this.toX0(a),a);this.pin1Dx1.setX(this.toX0(b),b)}this.doZoom(this.pin1Dx0.getXVal(),0,this.pin1Dx1.getXVal(),0,!0,!1,!1,!0,!1);return!0}if(c===this.pin1Dy0||c===this.pin1Dy1||c===this.pin1Dy01){b=this.fixY(b);c.setY(this.toY0(b),b);if(c===this.pin1Dy01){c=b-v((this.pin1Dy0.yPixel0+this.pin1Dy1.yPixel0)/2)+1;b=this.pin1Dy0.yPixel0+c;a=this.pin1Dy1.yPixel0+c;c=this.toY0(b);var g=this.toY0(a);if(Math.min(c,
g)==this.getScale().minY||Math.max(c,g)==this.getScale().maxY)return!0;this.pin1Dy0.setY(c,b);this.pin1Dy1.setY(g,a)}this.doZoom(0,this.pin1Dy0.getYVal(),0,this.pin1Dy1.getYVal(),null==this.imageView,null==this.imageView,!1,!1,!1);return!0}if(c===this.pin2Dx0||c===this.pin2Dx1||c===this.pin2Dx01){a=this.imageView.fixX(a);c.setX(this.imageView.toX0(a),a);if(c===this.pin2Dx01){c=a-v((this.pin2Dx0.xPixel0+this.pin2Dx1.xPixel0)/2)+1;a=this.pin2Dx0.xPixel0+c;b=this.pin2Dx1.xPixel0+c;if(this.imageView.fixX(a)!=
a||this.imageView.fixX(b)!=b)return!0;this.pin2Dx0.setX(this.imageView.toX0(a),a);this.pin2Dx1.setX(this.imageView.toX0(b),b)}if(!JSV.common.GraphSet.isGoodEvent(this.pin2Dx0,this.pin2Dx1,!0))return this.reset2D(!0),!0;this.imageView.setView0(this.pin2Dx0.xPixel0,this.pin2Dy0.yPixel0,this.pin2Dx1.xPixel0,this.pin2Dy1.yPixel0);this.doZoom(this.pin2Dx0.getXVal(),this.getScale().minY,this.pin2Dx1.getXVal(),this.getScale().maxY,!1,!1,!1,!0,!1);return!0}if(c===this.pin2Dy0||c===this.pin2Dy1||c===this.pin2Dy01){b=
this.fixY(b);c.setY(this.imageView.toSubspectrumIndex(b),b);if(c===this.pin2Dy01){c=b-v((this.pin2Dy0.yPixel0+this.pin2Dy1.yPixel0)/2)+1;b=this.pin2Dy0.yPixel0+c;a=this.pin2Dy1.yPixel0+c;if(b!=this.fixY(b)||a!=this.fixY(a))return!0;this.pin2Dy0.setY(this.imageView.toSubspectrumIndex(b),b);this.pin2Dy1.setY(this.imageView.toSubspectrumIndex(a),a)}if(!JSV.common.GraphSet.isGoodEvent(this.pin2Dy0,this.pin2Dy1,!1))return this.reset2D(!1),!0;this.imageView.setView0(this.pin2Dx0.xPixel0,this.pin2Dy0.yPixel0,
this.pin2Dx1.xPixel1,this.pin2Dy1.yPixel1);return!0}return!1},"~N,~N,~B");c(b,"clearIntegrals",function(){this.checkIntegral(NaN,0,!1)});c(b,"clearMeasurements",function(){this.removeDialog(this.getFixedSelectedSpectrumIndex(),JSV.common.Annotation.AType.Measurements)});b.createGraphSetsAndSetLinkMode=c(b,"createGraphSetsAndSetLinkMode",function(a,b,c,g,e,f){for(var j=new JU.Lst,k=0;k<c.size();k++){var l=c.get(k),n=f===JSV.common.PanelData.LinkMode.NONE?JSV.common.GraphSet.findCompatibleGraphSet(j,
l):null;null==n&&j.addLast(n=new JSV.common.GraphSet(b.getPanelData()));n.addSpec(l)}JSV.common.GraphSet.setFractionalPositions(a,j,f);for(k=j.size();0<=--k;)j.get(k).initGraphSet(g,e),JU.Logger.info("JSVGraphSet "+(k+1)+" nSpectra = "+j.get(k).nSpectra);return j},"JSV.common.PanelData,JSV.api.JSVPanel,JU.Lst,~N,~N,JSV.common.PanelData.LinkMode");c(b,"drawGraphSet",function(a,b,c,g,e,f,j,k,l,n,m,p){this.zoomEnabled=this.pd.getBoolean(JSV.common.ScriptToken.ENABLEZOOM);this.height=e*this.pd.scalingFactor;
this.width=g*this.pd.scalingFactor;this.left=f*this.pd.scalingFactor;this.right=j*this.pd.scalingFactor;this.top=k*this.pd.scalingFactor;this.bottom=l*this.pd.scalingFactor;this.$haveSelectedSpectrum=!1;this.selectedSpectrumMeasurements=this.selectedSpectrumIntegrals=null;if(!this.pd.isPrinting&&null!=this.widgets)for(g=0;g<this.widgets.length;g++)null!=this.widgets[g]&&(this.widgets[g].isVisible=!1);for(g=0;g<this.nSplit;g++)this.setPositionForFrame(g),this.drawAll(a,b,c,g,n||1<this.nSplit,m,p);
this.setPositionForFrame(1<this.nSplit?this.pd.currentSplitPoint:0)},"~O,~O,~O,~N,~N,~N,~N,~N,~N,~B,~B,~B");c(b,"escapeKeyPressed",function(a){null!=this.zoomBox1D&&(this.zoomBox1D.xPixel0=this.zoomBox1D.xPixel1=0);null!=this.zoomBox2D&&(this.zoomBox2D.xPixel0=this.zoomBox2D.xPixel1=0);this.inPlotMove&&(null!=this.pendingMeasurement?this.pendingMeasurement=null:(this.pendingMeasurement=this.pd.thisWidget=null,null!=this.selectedSpectrumMeasurements&&null!=this.selectedMeasurement&&(a?this.selectedSpectrumMeasurements.clear(this.getScale().minXOnScale,
this.getScale().maxXOnScale):this.selectedSpectrumMeasurements.removeObj(this.selectedMeasurement),this.selectedMeasurement=null,this.updateDialog(JSV.common.Annotation.AType.Measurements,-1)),null!=this.selectedSpectrumIntegrals&&null!=this.selectedIntegral&&(a?this.selectedSpectrumIntegrals.clear(this.getScale().minXOnScale,this.getScale().maxXOnScale):this.selectedSpectrumIntegrals.removeObj(this.selectedIntegral),this.selectedIntegral=null,this.updateDialog(JSV.common.Annotation.AType.Integration,
-1))))},"~B");b.findGraphSet=c(b,"findGraphSet",function(a,b,c){for(var g=a.size();0<=--g;)if(a.get(g).hasPoint(b,c))return a.get(g);return null},"JU.Lst,~N,~N");c(b,"findMatchingPeakInfo",function(a){for(var b=null,c=0;c<this.spectra.size()&&null==(b=this.spectra.get(c).findMatchingPeakInfo(a));c++);return b},"JSV.common.PeakInfo");c(b,"getCurrentSpectrumIndex",function(){return 1==this.nSpectra?0:this.iSpectrumSelected});c(b,"getSelectedIntegral",function(){return this.selectedIntegral});c(b,"getShowAnnotation",
function(a,b){var c=this.getDialog(a,b);return null!=c&&c.getState()},"JSV.common.Annotation.AType,~N");c(b,"hasFileLoaded",function(a){for(var b=this.spectra.size();0<=--b;)if(this.spectra.get(b).getFilePathForwardSlash().equals(a))return!0;return!1},"~S");c(b,"haveSelectedSpectrum",function(){return this.$haveSelectedSpectrum});c(b,"mouseClickedEvent",function(a,b,c,g){this.selectedIntegral=this.selectedMeasurement=null;var e=this.nextClickForSetPeak;this.nextClickForSetPeak=null;if(!this.checkArrowUpDownClick(a,
b)&&!this.checkArrowLeftRightClick(a,b))if(this.lastClickX=NaN,this.lastPixelX=2147483647,this.isSplitWidget(a,b))this.splitStack(1==this.nSplit);else if(this.isCloserWidget(a,b))this.pd.closeSpectrum();else{var f=this.getPinSelected(a,b);if(null!=f)this.setWidgetValueByUser(f);else if(f=this.is2dClick(a,b),2==c&&(-1==this.iSpectrumClicked&&0<=this.iPreviousSpectrumClicked)&&this.setSpectrumClicked(this.iPreviousSpectrumClicked),!f&&g)this.setSpectrumClicked(this.iPreviousSpectrumClicked),null!=this.pendingMeasurement?
this.processPendingMeasurement(a,b,-3):0<=this.iSpectrumClicked&&this.processPendingMeasurement(a,b,3);else if(this.lastXMax=NaN,2==c)f?(this.sticky2Dcursor&&this.addAnnotation(this.getAnnotation(this.imageView.toX(a),this.imageView.toSubspectrumIndex(b),this.pd.coordStr,!1,!0,5,5),!0),this.sticky2Dcursor=!0,this.set2DCrossHairs(a,b)):this.isInTopBar(a,b)?this.doZoom(this.toX0(this.xPixel0),0,this.toX0(this.xPixel1),0,!0,!1,!1,!0,!0):this.isInRightBar(a,b)?this.doZoom(this.getScale().minXOnScale,
this.viewList.get(0).getScale().minYOnScale,this.getScale().maxXOnScale,this.viewList.get(0).getScale().maxYOnScale,!0,!0,!1,!1,!1):this.isInTopBar2D(a,b)?this.reset2D(!0):this.isInRightBar2D(a,b)?this.reset2D(!1):null!=this.pendingMeasurement?this.processPendingMeasurement(a,b,-2):0<=this.iSpectrumClicked&&this.processPendingMeasurement(a,b,2);else if(f){if(null!=this.annotations&&(g=(new JSV.common.Coordinate).set(this.imageView.toX(a),this.imageView.toSubspectrumIndex(b)),g=this.findAnnotation2D(g),
null!=g&&this.setAnnotationText(g)))return;1==c&&(this.sticky2Dcursor=!1);this.set2DCrossHairs(a,b)}else{if(this.isInPlotRegion(a,b)){if(null!=this.selectedSpectrumIntegrals&&this.checkIntegralNormalizationClick(a,b))return;if(null!=this.pendingMeasurement){this.processPendingMeasurement(a,b,1);return}this.setCoordClicked(a,this.toX(a),this.toY(b));this.updateDialog(JSV.common.Annotation.AType.PeakList,-1);if(null!=e){this.nextClickForSetPeak=e;this.shiftSpectrum(4,NaN,NaN);this.nextClickForSetPeak=
null;return}}else this.setCoordClicked(0,NaN,0);this.pd.notifyPeakPickedListeners(null)}}},"~N,~N,~N,~B");c(b,"is2dClick",function(a,b){return null!=this.imageView&&a==this.imageView.fixX(a)&&b==this.fixY(b)},"~N,~N");c(b,"updateDialog",function(a,b){var c=this.getDialog(a,b);if(null!=c&&this.isVisible(c)){var g=this.toX(this.xPixel1)-this.toX(this.xPixel0),e=this.getSpectrum().isInverted()?this.yPixel1-this.pd.mouseY:this.pd.mouseY-this.yPixel0;c.update(this.pd.coordClicked,g,e)}},"JSV.common.Annotation.AType,~N");
c(b,"isVisible",function(a){return null!=a&&a.isDialog()&&a.isVisible()},"JSV.api.AnnotationData");c(b,"mousePressedEvent",function(a,b){this.checkWidgetEvent(a,b,!0)},"~N,~N,~N");c(b,"mouseReleasedEvent",function(a,b){if(null!=this.pendingMeasurement)2>Math.abs(this.toPixelX(this.pendingMeasurement.getXVal())-a)&&(this.pendingMeasurement=null),this.processPendingMeasurement(a,b,-2),this.setToolTipForPixels(a,b);else if(0!=this.pd.integralShiftMode)this.pd.integralShiftMode=0,this.zoomBox1D.xPixel1=
this.zoomBox1D.xPixel0;else{0<=this.iSpectrumMovedTo&&this.setScale(this.iSpectrumMovedTo);var c=this.pd.thisWidget;if(this.pd.isIntegralDrag)JSV.common.GraphSet.isGoodEvent(this.zoomBox1D,null,!0)&&this.checkIntegral(this.toX(this.zoomBox1D.xPixel0),this.toX(this.zoomBox1D.xPixel1),!0),this.zoomBox1D.xPixel1=this.zoomBox1D.xPixel0=0,this.pendingIntegral=null,this.pd.isIntegralDrag=!1;else if(c===this.zoomBox2D)JSV.common.GraphSet.isGoodEvent(this.zoomBox2D,null,!0)&&(this.imageView.setZoom(this.zoomBox2D.xPixel0,
this.zoomBox2D.yPixel0,this.zoomBox2D.xPixel1,this.zoomBox2D.yPixel1),this.zoomBox2D.xPixel1=this.zoomBox2D.xPixel0,this.doZoom(this.imageView.toX(this.imageView.xPixel0),this.getScale().minY,this.imageView.toX(this.imageView.xPixel0+this.imageView.xPixels-1),this.getScale().maxY,!1,!1,!1,!0,!0));else if(c===this.zoomBox1D){if(JSV.common.GraphSet.isGoodEvent(this.zoomBox1D,null,!0)){var c=this.zoomBox1D.xPixel1,g=this.pd.shiftPressed;this.doZoom(this.toX(this.zoomBox1D.xPixel0),g?this.toY(this.zoomBox1D.yPixel0):
0,this.toX(c),g?this.toY(this.zoomBox1D.yPixel1):0,!0,g,!0,!0,!0);this.zoomBox1D.xPixel1=this.zoomBox1D.xPixel0}}else(c===this.pin1Dx0||c===this.pin1Dx1||c===this.cur2Dx0||c===this.cur2Dx1)&&this.addCurrentZoom()}},"~N,~N");c(b,"mouseMovedEvent",function(a,b){if(1<this.nSpectra){var c=this.getSplitPoint(b);this.setPositionForFrame(c);this.setSpectrumMovedTo(1<this.nSplit?c:this.iSpectrumSelected);0<=this.iSpectrumMovedTo&&this.setScale(this.iSpectrumMovedTo)}this.inPlotMove=this.isInPlotRegion(a,
b);this.setXPixelMovedTo(1.7976931348623157E308,1.7976931348623157E308,this.inPlotMove?a:-1,-1);this.inPlotMove&&(this.xValueMovedTo=this.toX(this.xPixelMovedTo),this.yValueMovedTo=this.getSpectrum().getYValueAt(this.xValueMovedTo));if(0!=this.pd.integralShiftMode){var c=this.getDialog(JSV.common.Annotation.AType.Integration,-1),g=c.getData().getXYCoords(),g=g[0<this.pd.integralShiftMode?g.length-1:0].getYVal();c.getData().shiftY(this.pd.integralShiftMode,this.toPixelYint(g)+b-(0<this.pd.integralShiftMode?
this.yPixelPlot1:this.yPixelPlot0),this.yPixel0,this.yPixels)}else this.pd.isIntegralDrag||(null!=this.pendingMeasurement?(this.processPendingMeasurement(a,b,0),this.setToolTipForPixels(a,b)):(this.selectedMeasurement=this.inPlotMove&&null!=this.selectedSpectrumMeasurements?this.findMeasurement(this.selectedSpectrumMeasurements,a,b,0):null,this.selectedIntegral=null,this.inPlotMove&&(null!=this.selectedSpectrumIntegrals&&null==this.selectedMeasurement)&&(this.selectedIntegral=this.findMeasurement(this.selectedSpectrumIntegrals,
a,b,0),null==this.selectedIntegral&&(this.selectedIntegral=this.findMeasurement(this.selectedSpectrumIntegrals,a,b,-5))),this.setToolTipForPixels(a,b),null==this.imageView?(this.piMouseOver=null,c=1<this.nSplit?this.iSpectrumMovedTo:this.iSpectrumClicked,!this.isDrawNoSpectra()&&0<=c&&(c=this.spectra.get(c),null!=c.getPeakList()&&(this.coordTemp.setXVal(this.toX(a)),this.coordTemp.setYVal(this.toY(b)),this.piMouseOver=c.findPeakByCoord(a,this.coordTemp)))):!this.pd.display1D&&this.sticky2Dcursor&&
this.set2DCrossHairs(a,b)))},"~N,~N");c(b,"nextView",function(){this.currentZoomIndex+1<this.viewList.size()&&this.setZoomTo(this.currentZoomIndex+1)});c(b,"previousView",function(){0<this.currentZoomIndex&&this.setZoomTo(this.currentZoomIndex-1)});c(b,"resetView",function(){this.setZoomTo(0)});c(b,"removeAllHighlights",function(){this.removeAllHighlights(null)});c(b,"removeHighlight",function(a){this.highlights.removeItemAt(a)},"~N");c(b,"removeHighlight",function(a,b){for(var c=this.highlights.size();0<=
--c;){var g=this.highlights.get(c);g.x1==a&&g.x2==b&&this.highlights.removeItemAt(c)}},"~N,~N");c(b,"scaleYBy",function(a){if(null!=this.imageView||this.zoomEnabled)this.viewData.scaleSpectrum(null==this.imageView?this.iSpectrumSelected:-2,a),null!=this.imageView&&(this.update2dImage(!1),this.resetPinsFromView()),this.pd.refresh()},"~N");c(b,"selectSpectrum",function(a,b,c){for(var g=!1,e=this.spectra.size();0<=--e;)if((null==a||this.getSpectrumAt(e).getFilePathForwardSlash().equals(a))&&this.getSpectrumAt(e).matchesPeakTypeModel(b,
c))this.setSpectrumSelected(e),1<this.nSplit&&this.splitStack(!0),g=!0;1<this.nSpectra&&(!g&&0<=this.iSpectrumSelected&&!this.pd.isCurrentGraphSet(this))&&this.setSpectrumSelected(-2147483648);return g},"~S,~S,~S");c(b,"selectPeakByFileIndex",function(a,b,c){for(var g,e=this.spectra.size();0<=--e;)if(null!=(g=this.getSpectrumAt(e).selectPeakByFileIndex(a,b,c)))return g;return null},"~S,~S,~S");c(b,"setSelected",function(a){0>a?(this.bsSelected.clearAll(),this.setSpectrumClicked(-1)):(this.bsSelected.set(a),
this.setSpectrumClicked(1==this.bsSelected.cardinality()?a:-1),1<this.nSplit&&0<=a&&(this.pd.currentSplitPoint=a))},"~N");c(b,"setSelectedIntegral",function(a){var b=this.selectedIntegral.getSpectrum();this.getIntegrationGraph(this.getSpectrumIndex(b)).setSelectedIntegral(this.selectedIntegral,a)},"~N");c(b,"setShowAnnotation",function(a,b){var c=this.getDialog(a,-1);if(null==c)null!=b&&b!==Boolean.TRUE||(a===JSV.common.Annotation.AType.PeakList||a===JSV.common.Annotation.AType.Integration||a===JSV.common.Annotation.AType.Measurements)&&
this.pd.showDialog(a);else if(null==b)c.isDialog()?c.setVisible(!c.isVisible()):this.pd.showDialog(a);else{var g=b.booleanValue();g&&c.setState(g);(g||c.isDialog())&&this.pd.showDialog(a);!g&&c.isDialog()&&c.setVisible(!1)}},"JSV.common.Annotation.AType,Boolean");c(b,"checkIntegralParams",function(a,b){if(!this.getSpectrum().canIntegrate()||this.reversePlot)return!1;var c=this.getFixedSelectedSpectrumIndex(),g=this.getDialog(JSV.common.Annotation.AType.Integration,-1);if(null==b)return!0;switch(JSV.common.IntegralData.IntMode.getMode(b.toUpperCase())){case JSV.common.IntegralData.IntMode.NA:return!1;
case JSV.common.IntegralData.IntMode.CLEAR:this.integrate(c,null);this.integrate(c,a);break;case JSV.common.IntegralData.IntMode.ON:null==g?this.integrate(c,a):g.setState(!0);break;case JSV.common.IntegralData.IntMode.OFF:null!=g&&g.setState(!1);break;case JSV.common.IntegralData.IntMode.TOGGLE:null==g?this.integrate(c,a):g.setState(!g.getState());break;case JSV.common.IntegralData.IntMode.AUTO:null==g&&(this.checkIntegralParams(a,"ON"),g=this.getDialog(JSV.common.Annotation.AType.Integration,-1));
null!=g&&g.getData().autoIntegrate();break;case JSV.common.IntegralData.IntMode.LIST:this.pd.showDialog(JSV.common.Annotation.AType.Integration);break;case JSV.common.IntegralData.IntMode.MARK:null==g&&(this.checkIntegralParams(a,"ON"),g=this.getDialog(JSV.common.Annotation.AType.Integration,-1));null!=g&&g.getData().addMarks(b.substring(4).trim());break;case JSV.common.IntegralData.IntMode.MIN:if(null!=g)try{var e=Double.parseDouble(JSV.common.ScriptToken.getTokens(b).get(1));g.getData().setMinimumIntegral(e)}catch(f){if(!D(f,
Exception))throw f;}break;case JSV.common.IntegralData.IntMode.UPDATE:null!=g&&g.getData().update(a)}this.updateDialog(JSV.common.Annotation.AType.Integration,-1);return!0},"JSV.common.Parameters,~S");c(b,"setSpectrum",function(a,b){b&&1<this.nSplit?1<this.nSplit&&this.setSpectrumClicked(a):(this.setSpectrumClicked(a),this.showAllStacked=this.stackSelected=!1);0<=a&&this.dialogsToFront(this.getSpectrum())},"~N,~B");c(b,"setSpectrumJDX",function(a){var b=this.getFixedSelectedSpectrumIndex();this.spectra.removeItemAt(b);
this.spectra.add(b,a);this.pendingMeasurement=null;this.clearViews();this.viewData.newSpectrum(this.spectra)},"JSV.common.Spectrum");c(b,"setZoom",function(a,b,c,g){this.setZoomTo(0);0==a&&0==c&&0==b&&0==g?(this.newPins(),this.imageView=null,this.getScale(),this.getScale()):this.doZoom(a,b,c,g,!0,b!=g,!1,!0,!0)},"~N,~N,~N,~N");c(b,"shiftSpectrum",function(a,b,c){var g=this.getSpectrum();if(!g.isNMR()||!g.is1D())return!1;var e=null,e=0;if(1.7976931348623157E308==c)e=-g.addSpecShift(0);else switch(a){case 3:e=
c;break;case 1:case 2:this.nextClickMode=a;if(Double.isNaN(b))return e=this.pd.getInput("Click on "+(1==a?"or beside a peak to set its chemical shift":"the spectrum set the chemical shift at that point")+(-2147483648==c?"":" to "+c)+".","Set Reference "+(1==a?"for Peak":"at Point"),"OK"),this.nextClickForSetPeak="OK".equals(e)?Double.$valueOf(c):null,!1;this.nextClickForSetPeak=null;case 4:null!=this.nextClickForSetPeak&&(c=this.nextClickForSetPeak.doubleValue(),this.nextClickForSetPeak=null);Double.isNaN(b)&&
(b=this.lastClickX);1==this.nextClickMode&&(b=this.getNearestPeak(g,b,this.toY(this.pd.mouseY)));if(Double.isNaN(c))try{var f=this.pd.getInput("New chemical shift (set blank to reset)","Set Reference",JU.DF.formatDecimalDbl(b,this.getScale().precision[0])).trim();c=0==f.length?b-g.addSpecShift(0):Double.parseDouble(f)}catch(j){if(D(j,Exception))return!1;throw j;}e=c-b}if(0==e)return!1;g.addSpecShift(e);if(null!=this.annotations)for(a=this.annotations.size();0<=--a;)this.annotations.get(a).spec===
g&&this.annotations.get(a).addSpecShift(e);if(null!=this.dialogs){var k;for(a=this.dialogs.entrySet().iterator();a.hasNext()&&((k=a.next())||1);)k.getValue().getSpectrum()===g&&k.getValue().setSpecShift(e)}this.getScale().addSpecShift(e);Double.isNaN(this.lastClickX)||(this.lastClickX+=e);this.updateDialogs();this.doZoom(0,this.getScale().minYOnScale,0,this.getScale().maxYOnScale,!0,!0,!1,!0,!1);this.pd.setTaintedAll();this.pd.repaint();return!0},"~N,~N,~N");c(b,"toPeak",function(a){a*=this.drawXAxisLeftToRight?
1:-1;Double.isNaN(this.lastClickX)&&(this.lastClickX=this.lastPixelX=0);var b=this.getSpectrum(),c=this.setCoordClicked(this.lastPixelX,this.lastClickX,0);a=b.setNextPeak(c,a);0>a||(a=b.getPeakList().get(a),b.setSelectedPeak(a),this.setCoordClicked(a.getXPixel(),a.getX(),0),this.pd.notifyPeakPickedListeners(new JSV.common.PeakPickEvent(this.jsvp,this.pd.coordClicked,a)))},"~N");c(b,"scaleSelectedBy",function(a){for(var b=this.bsSelected.nextSetBit(0);0<=b;b=this.bsSelected.nextSetBit(b+1))this.viewData.scaleSpectrum(b,
a)},"~N");g(b,"toString",function(){return"gs: "+this.nSpectra+" "+this.spectra+" "+this.spectra.get(0).getFilePath()});c(b,"setXPointer",function(a,b){null!=a&&this.setSpectrumClicked(this.getSpectrumIndex(a));this.xValueMovedTo=this.lastClickX=b;this.lastPixelX=this.toPixelX(b);this.setXPixelMovedTo(b,1.7976931348623157E308,0,0);this.yValueMovedTo=NaN},"JSV.common.Spectrum,~N");c(b,"setXPointer2",function(a,b){null!=a&&this.setSpectrumClicked(this.getSpectrumIndex(a));this.setXPixelMovedTo(1.7976931348623157E308,
b,0,0)},"JSV.common.Spectrum,~N");c(b,"hasCurrentMeasurement",function(a){return null!=(a===JSV.common.Annotation.AType.Integration?this.selectedSpectrumIntegrals:this.selectedSpectrumMeasurements)},"JSV.common.Annotation.AType");c(b,"getDialog",function(a,b){-1==b&&(b=this.getCurrentSpectrumIndex());return null==this.dialogs||0>b?null:this.dialogs.get(a+"_"+b)},"JSV.common.Annotation.AType,~N");c(b,"removeDialog",function(a,b){null!=this.dialogs&&0<=a&&this.dialogs.remove(b+"_"+a)},"~N,JSV.common.Annotation.AType");
c(b,"addDialog",function(a,b,c){null==this.dialogs&&(this.dialogs=new java.util.Hashtable);a=b+"_"+a;c.setGraphSetKey(a);this.dialogs.put(a,c);return c},"~N,JSV.common.Annotation.AType,JSV.api.AnnotationData");c(b,"removeDialog",function(a){var b=a.getGraphSetKey();this.dialogs.remove(b);a=a.getData();null!=a&&this.dialogs.put(b,a)},"JSV.dialog.JSVDialog");c(b,"getPeakListing",function(a,b,c){0>a&&(a=this.getCurrentSpectrumIndex());if(0>a)return null;var g=this.getDialog(JSV.common.Annotation.AType.PeakList,
-1);if(null==g){if(!c)return null;this.addDialog(a,JSV.common.Annotation.AType.PeakList,g=new JSV.common.PeakData(JSV.common.Annotation.AType.PeakList,this.getSpectrum()))}g.getData().setPeakList(b,-2147483648,this.viewData.getScale());g.isDialog()&&g.setFields();return g.getData()},"~N,JSV.common.Parameters,~B");c(b,"setPeakListing",function(a){var b=this.getDialog(JSV.common.Annotation.AType.PeakList,-1),c=null!=b&&b.isDialog()?b:null;(null==a?null==c||!c.isVisible():a.booleanValue())?this.pd.showDialog(JSV.common.Annotation.AType.PeakList):
b.isDialog()&&b.setVisible(!1)},"Boolean");c(b,"haveIntegralDisplayed",function(a){a=this.getDialog(JSV.common.Annotation.AType.Integration,a);return null!=a&&a.getState()},"~N");c(b,"getIntegrationGraph",function(a){a=this.getDialog(JSV.common.Annotation.AType.Integration,a);return null==a?null:a.getData()},"~N");c(b,"setIntegrationRatios",function(a){var b=this.getFixedSelectedSpectrumIndex();null==this.aIntegrationRatios&&(this.aIntegrationRatios=Array(this.nSpectra));this.aIntegrationRatios[b]=
JSV.common.IntegralData.getIntegrationRatiosFromString(this.getSpectrum(),a)},"~S");c(b,"getIntegrationRatios",function(a){return null==this.aIntegrationRatios?null:this.aIntegrationRatios[a]},"~N");c(b,"integrate",function(a,b){var c=this.getSpectrumAt(a);if(null==b||!c.canIntegrate())return this.removeDialog(a,JSV.common.Annotation.AType.Integration),!1;this.addDialog(a,JSV.common.Annotation.AType.Integration,new JSV.common.IntegralData(c,b));return!0},"~N,JSV.common.Parameters");c(b,"getIntegration",
function(a,b,c){0>a&&(a=this.getCurrentSpectrumIndex());if(0>a)return null;var g=this.getDialog(JSV.common.Annotation.AType.Integration,-1);if(null==g){if(!c)return null;g=this.addDialog(a,JSV.common.Annotation.AType.Integration,new JSV.common.IntegralData(this.getSpectrum(),b))}return g.getData()},"~N,JSV.common.Parameters,~B");c(b,"getMeasurementInfo",function(a,b){var c;switch(a){case JSV.common.Annotation.AType.PeakList:c=this.getPeakListing(b,null,!1);break;case JSV.common.Annotation.AType.Integration:c=
this.getIntegration(b,null,!1);break;default:return null}if(null==c)return null;var g=new java.util.Hashtable;c.getInfo(g);return g},"JSV.common.Annotation.AType,~N");c(b,"getInfo",function(a,b){var c=new java.util.Hashtable;if("".equals(a))c.put("KEYS","viewInfo spectra");else if("viewInfo".equalsIgnoreCase(a))return this.getScale().getInfo(c);var g=new JU.Lst;c.put("spectra",g);for(var e=0;e<this.nSpectra;e++)if(!(0<=b&&e!=b)){var f=this.spectra.get(e),j=f.getInfo(a);if(0<=b&&null!=a&&(2==j.size()||
a.equalsIgnoreCase("id")))return 2==j.size()&&j.remove("id"),j;JSV.common.Parameters.putInfo(a,j,"type",f.getDataType());JSV.common.Parameters.putInfo(a,j,"titleLabel",f.getTitleLabel());JSV.common.Parameters.putInfo(a,j,"filePath",f.getFilePath().$replace("\\","/"));JSV.common.Parameters.putInfo(a,j,"PeakList",JSV.common.Parameters.isMatch(a,"PeakList")?this.getMeasurementInfo(JSV.common.Annotation.AType.PeakList,e):null);JSV.common.Parameters.putInfo(a,j,"Integration",JSV.common.Parameters.isMatch(a,
"Integration")?this.getMeasurementInfo(JSV.common.Annotation.AType.Integration,e):null);if(0<=b)return j;g.addLast(j)}return c},"~S,~N");c(b,"getTitle",function(a){return 1==this.nSpectra||0<=this.iSpectrumSelected&&(!a||1==this.nSplit)?this.getSpectrum().getTitle():null},"~B");c(b,"getCurrentView",function(){this.setScale(this.getFixedSelectedSpectrumIndex());return this.viewData.getScale()});c(b,"set2DXY",function(a,b,c){var g;null!=this.gs2dLinkedX&&(g=this.toPixelX(a),g!=this.fixX(g)&&(g=-2147483648,
a=1.7976931348623157E308),this.cur1D2x1.setX(a,g));null!=this.gs2dLinkedY&&(g=this.toPixelX(b),g!=this.fixX(g)&&(g=-2147483648,b=1.7976931348623157E308),this.cur1D2x2.setX(b,g));this.cur1D2Locked=c},"~N,~N,~B");c(b,"dialogsToFront",function(a){if(null!=this.dialogs){null==a&&(a=this.getSpectrum());for(var b,c=this.dialogs.entrySet().iterator();c.hasNext()&&((b=c.next())||1);){var g=b.getValue();this.isVisible(g)&&(null==a?g.setVisible(!0):g.setFocus(g.getSpectrum()===a))}}},"JSV.common.Spectrum");
c(b,"setPlotColors",function(a){var b=a;if(b.length>this.nSpectra)a=Array(this.nSpectra),System.arraycopy(b,0,a,0,this.nSpectra),b=a;else if(this.nSpectra>b.length){a=Array(this.nSpectra);var c=this.nSpectra-b.length;System.arraycopy(b,0,a,0,b.length);for(var g=0,b=b.length;g<c;g++,b++)a[b]=this.generateRandomColor();b=a}this.plotColors=b},"~O");c(b,"disposeImage",function(){null!=this.image2D&&this.image2D.parentNode.removeChild(this.image2D);this.plotColors=this.highlights=this.pd=this.jsvp=this.image2D=
null});c(b,"generateRandomColor",function(){for(;;){var a=v(255*Math.random()),b=v(255*Math.random()),c=v(255*Math.random()),a=this.g2d.getColor3(a,b,c);if(0!=a.getRGB())return a}});c(b,"setPlotColor0",function(a){this.plotColors[0]=a},"~O");c(b,"getPlotColor",function(a){return a>=this.plotColors.length?null:this.plotColors[a]},"~N");c(b,"setColorFromToken",function(a,b){null!=b&&this.g2d.setGraphicsColor(a,b===JSV.common.ScriptToken.PLOTCOLOR?this.plotColors[0]:this.pd.getColor(b))},"~O,JSV.common.ScriptToken");
c(b,"setPlotColor",function(a,b){var c;switch(b){case -3:c=JSV.common.GraphSet.veryLightGrey;break;case -2:c=this.pd.BLACK;break;case -1:c=this.pd.getColor(JSV.common.ScriptToken.INTEGRALPLOTCOLOR);break;default:c=this.plotColors[b]}this.g2d.setGraphicsColor(a,c)},"~O,~N");c(b,"draw2DImage",function(){null!=this.imageView&&this.g2d.drawGrayScaleImage(this.gMain,this.image2D,this.imageView.xPixel0,this.imageView.yPixel0,this.imageView.xPixel0+this.imageView.xPixels-1,this.imageView.yPixel0+this.imageView.yPixels-
1,this.imageView.xView1,this.imageView.yView1,this.imageView.xView2,this.imageView.yView2)});c(b,"get2DImage",function(){this.imageView=new JSV.common.ImageView;this.imageView.set(this.viewList.get(0).getScale());if(!this.update2dImage(!0))return!1;this.imageView.resetZoom();return this.sticky2Dcursor=!0},"JSV.common.Spectrum");c(b,"update2dImage",function(a){this.imageView.set(this.viewData.getScale());var b=this.getSpectrumAt(0),c=this.imageView.get2dBuffer(b,!a);if(null==c)return this.imageView=
this.image2D=null,!1;a&&(c=this.imageView.adjustView(b,this.viewData),this.imageView.resetView());this.image2D=this.g2d.newGrayScaleImage(this.gMain,this.image2D,this.imageView.imageWidth,this.imageView.imageHeight,c);this.setImageWindow();return!0},"~B");c(b,"getAnnotation",function(a,b,c,g,e,f,j){return(new JSV.common.ColoredAnnotation).setCA(a,b,this.getSpectrum(),c,this.pd.BLACK,g,e,f,j)},"~N,~N,~S,~B,~B,~N,~N");c(b,"getAnnotation",function(a,b){return JSV.common.Annotation.getColoredAnnotation(this.g2d,
this.getSpectrum(),a,b)},"JU.Lst,JSV.common.Annotation");c(b,"fillBox",function(a,b,c,g,e,f){this.setColorFromToken(a,f);this.g2d.fillRect(a,Math.min(b,g),Math.min(c,e),Math.abs(b-g),Math.abs(c-e))},"~O,~N,~N,~N,~N,JSV.common.ScriptToken");c(b,"drawBox",function(a,b,c,g,e,f){this.setColorFromToken(a,f);this.g2d.drawRect(a,Math.min(b,g),Math.min(c,e),Math.abs(b-g)-1,Math.abs(c-e)-1)},"~O,~N,~N,~N,~N,JSV.common.ScriptToken");c(b,"drawHandle",function(a,b,c,g,e){e?this.g2d.drawRect(a,b-g,c-g,2*g,2*g):
this.g2d.fillRect(a,b-g,c-g,2*g+1,2*g+1)},"~O,~N,~N,~N,~B");c(b,"setCurrentBoxColor",function(a){this.g2d.setGraphicsColor(a,this.pd.BLACK)},"~O");c(b,"fillArrow",function(a,b,c,g,e){var f=1;switch(b){case 1:case 3:f=-1}c=E(-1,[c-5,c-5,c+5,c+5,c+8,c,c-8]);g=E(-1,[g+5*f,g-f,g-f,g+5*f,g+5*f,g+10*f,g+5*f]);switch(b){case 1:case 2:e?this.g2d.fillPolygon(a,g,c,7):this.g2d.drawPolygon(a,g,c,7);break;case 3:case 4:e?this.g2d.fillPolygon(a,c,g,7):this.g2d.drawPolygon(a,c,g,7)}},"~O,~N,~N,~N,~B");c(b,"fillCircle",
function(a,b,c,g){g?this.g2d.fillCircle(a,b-4,c-4,8):this.g2d.drawCircle(a,b-4,c-4,8)},"~O,~N,~N,~B");c(b,"setAnnotationColor",function(a,b,c){null!=c?this.setColorFromToken(a,c):(c=null,C(b,"JSV.common.ColoredAnnotation")&&(c=b.getColor()),null==c&&(c=this.pd.BLACK),this.g2d.setGraphicsColor(a,c))},"~O,JSV.common.Annotation,JSV.common.ScriptToken");c(b,"setSolutionColor",function(a,b,c){for(var g=0;g<this.nSpectra;g++){var e=this.spectra.get(g),f=b||!e.canShowSolutionColor()?-1:a.getColour(e,c);
e.setFillColor(-1==f?null:this.pd.vwr.parameters.getColor1(f))}},"JSV.api.VisibleInterface,~B,~B");c(b,"setIRMode",function(a,b){for(var c=0;c<this.nSpectra;c++){var g=this.spectra.get(c);if(g.dataType.equals(b)){var e=JSV.common.Spectrum.taConvert(g,a);e!==g&&this.pd.setSpecForIRMode(e)}}},"JSV.common.Spectrum.IRMode,~S");c(b,"getSpectrumCount",function(){return 0});c(b,"invertYAxis",function(){this.viewList.get(0).init(null,0,0,this.getSpectrum().invertYAxis().isContinuous());this.resetViewCompletely()});
b.$GraphSet$Highlight$=function(){var a=w(function(){fa(this,arguments);this.x2=this.x1=0;this.spectrum=this.color=null;q(this,arguments)},JSV.common.GraphSet,"Highlight",null);x(a,function(a,b,c,e){this.x1=a;this.x2=b;this.color=e;this.spectrum=c},"~N,~N,JSV.common.Spectrum,javajs.api.GenericColor");g(a,"toString",function(){return"highlight "+this.x1+" "+this.x2+" "+this.spectrum});g(a,"equals",function(a){return!C(a,"JSV.common.GraphSet.Highlight")?!1:a.x1==this.x1&&a.x2==this.x2},"~O")};b.RT2=
Math.sqrt(2);b.veryLightGrey=null});n("JSV.common");z(["JSV.common.XYScaleConverter"],"JSV.common.ImageView",["JSV.common.Coordinate","$.ScaleData"],function(){var b=w(function(){this.buf2d=null;this.yView2=this.xView2=this.yView1=this.xView1=this.yPixelZoom2=this.xPixelZoom2=this.yPixelZoom1=this.xPixelZoom1=this.yPixels=this.xPixels=this.imageHeight=this.imageWidth=this.yPixel1=this.xPixel1=this.yPixel0=this.xPixel0=this.averageGray=this.grayFactorLast=0;this.minX=NaN;this.maxZ=this.minZ=this.maxY=
this.minY=this.maxX=0;this.scaleData=null;q(this,arguments)},JSV.common,"ImageView",null,JSV.common.XYScaleConverter);c(b,"set",function(a){Double.isNaN(this.minX)&&(this.minX=a.minX,this.maxX=a.maxX);this.minZ=a.minY;this.maxZ=a.maxY;this.scaleData=new JSV.common.ScaleData},"JSV.common.ScaleData");c(b,"setZoom",function(a,b,c,g){this.xPixelZoom1=Math.min(a,c);this.yPixelZoom1=Math.min(b,g);this.xPixelZoom2=Math.max(a,c);this.yPixelZoom2=Math.max(b,g);this.setView()},"~N,~N,~N,~N");c(b,"setXY0",function(a,
b,c){this.xPixel0=b;this.yPixel0=c;this.xPixel1=this.xPixel0+this.xPixels-1;this.yPixel1=this.yPixel0+this.yPixels-1;this.setMinMaxY(a)},"JSV.common.Spectrum,~N,~N");c(b,"setPixelWidthHeight",function(a,b){this.xPixels=a;this.yPixels=b},"~N,~N");c(b,"resetView",function(){this.yView1=this.xView1=0;this.xView2=this.imageWidth-1;this.yView2=this.imageHeight-1});c(b,"setView",function(){0==this.xPixelZoom1&&this.resetZoom();var a=this.toImageX(this.xPixelZoom1),b=this.toImageY(this.yPixelZoom1),c=this.toImageX(this.xPixelZoom2),
g=this.toImageY(this.yPixelZoom2);this.xView1=Math.min(a,c);this.yView1=Math.min(b,g);this.xView2=Math.max(a,c);this.yView2=Math.max(b,g);this.setScaleData();this.resetZoom()});c(b,"resetZoom",function(){this.xPixelZoom1=this.xPixel0;this.yPixelZoom1=this.yPixel0;this.xPixelZoom2=this.xPixel1;this.yPixelZoom2=this.yPixel1});c(b,"toImageX",function(a){return this.xView1+v(Math.floor((a-this.xPixel0)/(this.xPixels-1)*(this.xView2-this.xView1)))},"~N");c(b,"toImageY",function(a){return this.yView1+v(Math.floor((a-
this.yPixel0)/(this.yPixels-1)*(this.yView2-this.yView1)))},"~N");c(b,"toImageX0",function(a){return JSV.common.Coordinate.intoRange(v((1*a-this.xPixel0)/(this.xPixels-1)*(this.imageWidth-1)),0,this.imageWidth-1)},"~N");c(b,"toImageY0",function(a){return JSV.common.Coordinate.intoRange(v((1*a-this.yPixel0)/(this.yPixels-1)*(this.imageHeight-1)),0,this.imageHeight-1)},"~N");c(b,"isXWithinRange",function(a){return a>=this.xPixel0-5&&a<this.xPixel0+this.xPixels+5},"~N");c(b,"toSubspectrumIndex",function(a){return JSV.common.Coordinate.intoRange(this.imageHeight-
1-this.toImageY(a),0,this.imageHeight-1)},"~N");c(b,"toX0",function(a){return this.maxX+(this.minX-this.maxX)*(this.fixX(a)-this.xPixel0)/(this.xPixels-1)},"~N");c(b,"toPixelX0",function(a){return this.xPixel1-v((a-this.minX)/(this.maxX-this.minX)*(this.xPixels-1))},"~N");c(b,"toPixelY0",function(a){return this.yPixel1-v(a/(this.imageHeight-1)*(this.yPixels-1))},"~N");c(b,"subIndexToPixelY",function(a){return this.yPixel0+v(1*(this.imageHeight-1-a-this.yView1)/(this.yView2-this.yView1)*(this.yPixels-
1))},"~N");c(b,"fixSubIndex",function(a){return JSV.common.Coordinate.intoRange(a,this.imageHeight-1-this.yView2,this.imageHeight-1-this.yView1)},"~N");c(b,"setView0",function(a,b,c,g){a=this.toImageX0(a);b=this.toImageY0(b);c=this.toImageX0(c);g=this.toImageY0(g);this.xView1=Math.min(a,c);this.yView1=Math.min(b,g);this.xView2=Math.max(a,c);this.yView2=Math.max(b,g);this.resetZoom()},"~N,~N,~N,~N");c(b,"get2dBuffer",function(a,b){var c=a.getSubSpectra();if(null==c||!c.get(0).isContinuous())return null;
var g=a.getXYCoords(),e=c.size();this.imageWidth=g.length;this.imageHeight=e;var f=255/(this.maxZ-this.minZ);if(!b&&null!=this.buf2d&&f==this.grayFactorLast)return this.buf2d;this.grayFactorLast=f;for(var j=this.imageWidth*this.imageHeight,k=null==this.buf2d||this.buf2d.length!=j?E(j,0):this.buf2d,l=0,n=0;n<e;n++){var m=c.get(n).xyCoords;if(m.length!=g.length)return null;for(var p=0;p<g.length;p++){var q=m[p].getYVal(),q=255-JSV.common.Coordinate.intoRange(v((q-this.minZ)*f),0,255);k[--j]=q;l+=q}}this.averageGray=
1-l/(this.imageWidth*this.imageHeight)/255;System.out.println("Average gray = "+this.averageGray);return this.buf2d=k},"JSV.common.Spectrum,~B");c(b,"adjustView",function(a,b){for(var c=0,g=!1;((g=0.05>this.averageGray)||0.3<this.averageGray)&&10>c++;)b.scaleSpectrum(-2,g?2:0.5),this.set(b.getScale()),this.get2dBuffer(a,!1);return this.buf2d},"JSV.common.Spectrum,JSV.common.ViewData");c(b,"getBuffer",function(){return this.buf2d});c(b,"setMinMaxY",function(a){a=a.getSubSpectra();var b=a.get(0);this.maxY=
b.getY2D();this.minY=a.get(a.size()-1).getY2D();b.y2DUnits.equalsIgnoreCase("Hz")&&(this.maxY/=b.freq2dY,this.minY/=b.freq2dY);this.setScaleData()},"JSV.common.Spectrum");c(b,"setScaleData",function(){this.scaleData.minY=this.minY;this.scaleData.maxY=this.maxY;this.scaleData.setYScale(this.toY(this.yPixel0),this.toY(this.yPixel1),!1,!1)});g(b,"fixX",function(a){return a<this.xPixel0?this.xPixel0:a>this.xPixel1?this.xPixel1:a},"~N");g(b,"fixY",function(a){return JSV.common.Coordinate.intoRange(a,this.yPixel0,
this.yPixel1)},"~N");g(b,"getScale",function(){return this.scaleData});g(b,"toX",function(a){return this.maxX+(this.minX-this.maxX)*this.toImageX(this.fixX(a))/(this.imageWidth-1)},"~N");g(b,"toY",function(a){a=this.toSubspectrumIndex(a);return this.maxY+(this.minY-this.maxY)*a/(this.imageHeight-1)},"~N");g(b,"toPixelX",function(a){var b=this.toX(this.xPixel0),c=this.toX(this.xPixel1);return this.xPixel0+v((a-b)/(c-b)*(this.xPixels-1))},"~N");g(b,"toPixelY",function(a){return v(this.yPixel0+(a-this.scaleData.minYOnScale)/
(this.scaleData.maxYOnScale-this.scaleData.minYOnScale)*this.yPixels)},"~N");g(b,"getXPixels",function(){return this.xPixels});g(b,"getYPixels",function(){return this.yPixels});g(b,"getXPixel0",function(){return this.xPixel0})});n("JSV.common");z(["JSV.common.Measurement"],"JSV.common.Integral",null,function(){var b=G(JSV.common,"Integral",JSV.common.Measurement);c(b,"setInt",function(a,b,c,g,e,f){this.setA(a,b,c,"",!1,!1,0,6);this.setPt2(e,f);this.setValue(g);return this},"~N,~N,JSV.common.Spectrum,~N,~N,~N")});
n("JSV.common");var sb=G(JSV.common,"IntegralComparator",null,java.util.Comparator);g(sb,"compare",function(b,a){return b.getXVal()<a.getXVal()?-1:b.getXVal()>a.getXVal()?1:0},"JSV.common.Measurement,JSV.common.Measurement");n("JSV.common");z(["java.lang.Enum","JSV.common.MeasurementData","$.IntegralComparator"],"JSV.common.IntegralData","java.util.Collections $.StringTokenizer JU.AU $.BS $.DF $.Lst $.PT JSV.common.Annotation $.Coordinate $.Integral $.ScriptToken".split(" "),function(){var b=w(function(){this.intRange=
this.percentOffset=this.percentMinY=0;this.normalizationFactor=1;this.integralTotal=this.offset=this.percentRange=0;this.haveRegions=!1;this.xyCoords=null;q(this,arguments)},JSV.common,"IntegralData",JSV.common.MeasurementData);x(b,function(a,b,c,e){I(this,JSV.common.IntegralData,[JSV.common.Annotation.AType.Integration,e]);this.percentMinY=a;this.percentOffset=b;this.percentRange=c;this.calculateIntegral()},"~N,~N,~N,JSV.common.Spectrum");x(b,function(a,b){I(this,JSV.common.IntegralData,[JSV.common.Annotation.AType.Integration,
a]);null==b?this.autoIntegrate():(this.percentOffset=b.integralOffset,this.percentRange=b.integralRange,this.calculateIntegral())},"JSV.common.Spectrum,JSV.common.Parameters");c(b,"getPercentMinimumY",function(){return this.percentMinY});c(b,"getPercentOffset",function(){return this.percentOffset});c(b,"getIntegralFactor",function(){return this.intRange});c(b,"update",function(a){this.update(a.integralMinY,a.integralOffset,a.integralRange)},"JSV.common.Parameters");c(b,"update",function(a,b,c){var e=
this.percentRange;if(!(0>=c||c==this.percentRange&&b==this.percentOffset)){this.percentOffset=b;this.percentRange=c;this.checkRange();a=c/100/this.integralTotal;b/=100;for(var f=0;f<this.xyCoords.length;f++){var g=this.xyCoords[f].getYVal(),g=(g-this.offset)/this.intRange;this.xyCoords[f].setYVal(g*a+b)}1!=this.normalizationFactor&&(this.normalizationFactor*=e/c);if(this.haveRegions)for(f=this.size();0<=--f;)c=this.get(f),e=this.getYValueAt(c.getXVal()),g=this.getYValueAt(c.getXVal2()),c.setYVal(e),
c.setYVal2(g),c.setValue(100*Math.abs(g-e)*this.normalizationFactor);this.intRange=a;this.offset=b}},"~N,~N,~N");c(b,"getYValueAt",function(a){return JSV.common.Coordinate.getYValueAt(this.xyCoords,a)},"~N");c(b,"addIntegralRegion",function(a,b){if(Double.isNaN(a))return this.haveRegions=!1,this.clear(),null;if(Double.isNaN(b))return this.splitIntegral(a);if(a==b)return null;if(a<b)return this.clear(a,b),null;var c=this.getYValueAt(a),e=this.getYValueAt(b);this.haveRegions=!0;c=(new JSV.common.Integral).setInt(a,
c,this.spec,100*Math.abs(e-c)*this.normalizationFactor,b,e);this.clear(a,b);this.addLast(c);java.util.Collections.sort(this,JSV.common.IntegralData.c);return c},"~N,~N");c(b,"splitIntegral",function(a){var b=this.find(a);if(0>b)return null;var c=this.removeItemAt(b),b=c.getXVal(),c=c.getXVal2();this.addIntegralRegion(b,a);return this.addIntegralRegion(a,c)},"~N");g(b,"setSpecShift",function(a){JSV.common.Coordinate.shiftX(this.xyCoords,a);for(var b=this.size();1<=--b;)this.get(b).addSpecShift(a)},
"~N");c(b,"addMarks",function(a){a=JU.PT.rep(" "+a,","," ");a=JU.PT.rep(a," -"," #");a=JU.PT.rep(a,"--","-#");a=a.$replace("-","^");a=a.$replace("#","-");a=JSV.common.ScriptToken.getTokens(a);for(var b=0;b<a.size();b++)try{var c=a.get(b),e=0,f=c.indexOf("^");if(!(0>f)){var g=c.indexOf(":");g>f&&(e=Double.$valueOf(c.substring(g+1).trim()).doubleValue(),c=c.substring(0,g).trim());var k=Double.$valueOf(c.substring(0,f).trim()).doubleValue(),l=Double.$valueOf(c.substring(f+1).trim()).doubleValue();0==
l&&0==k&&this.clear();if(l!=k){var n=this.addIntegralRegion(Math.max(l,k),Math.min(l,k));null!=n&&0<e&&this.setSelectedIntegral(n,e)}}}catch(m){if(!D(m,Exception))throw m;}},"~S");c(b,"calculateIntegral",function(){var a=this.spec.getXYCoords();this.xyCoords=Array(a.length);this.integralTotal=0;this.checkRange();for(var b=1E100,c=0;c<a.length;c++){var e=a[c].getYVal();e<b&&0<=e&&(b=e)}for(var f=1E100,g=-1E100,c=0;c<a.length;c++)e=a[c].getYVal(),this.integralTotal+=e-b,this.integralTotal<f&&(f=this.integralTotal),
this.integralTotal>g&&(g=this.integralTotal);this.integralTotal=g-f;this.intRange=this.percentRange/100/this.integralTotal;this.offset=this.percentOffset/100;f=0;for(c=a.length;0<=--c;)e=a[c].getYVal(),f+=e-b,this.xyCoords[c]=(new JSV.common.Coordinate).set(a[c].getXVal(),f*this.intRange+this.offset);return this.xyCoords});c(b,"checkRange",function(){this.percentOffset=Math.max(5,this.percentOffset);this.percentRange=Math.max(10,this.percentRange)});b.getIntegrationRatiosFromString=c(b,"getIntegrationRatiosFromString",
function(a,b){for(var c=new JU.Lst,e=new java.util.StringTokenizer(b,",");e.hasMoreTokens();){var f=e.nextToken(),f=new java.util.StringTokenizer(f,":"),f=(new JSV.common.Annotation).setA(Double.parseDouble(f.nextToken()),0,a,f.nextToken(),!0,!1,0,0);c.addLast(f)}return c},"JSV.common.Spectrum,~S");c(b,"getXYCoords",function(){return this.xyCoords});c(b,"getPercentYValueAt",function(a){return 100*this.getYValueAt(a)},"~N");c(b,"dispose",function(){this.xyCoords=this.spec=null});c(b,"setSelectedIntegral",
function(a,b){var c=a.getValue();this.factorAllIntegrals(0>=b?1/this.normalizationFactor:b/c,0>=b)},"JSV.common.Measurement,~N");c(b,"factorAllIntegrals",function(a,b){for(var c=0;c<this.size();c++){var e=this.get(c);e.setValue(a*e.getValue())}this.normalizationFactor=b?1:this.normalizationFactor*a},"~N,~B");c(b,"remove",function(a){return this.removeItemAt(a)},"~N");c(b,"getBitSet",function(){var a=JU.BS.newN(this.xyCoords.length);if(0==this.size())return a.setBits(0,this.xyCoords.length),a;for(var b=
this.size();0<=--b;){var c=this.get(b),e=JSV.common.Coordinate.getNearestIndexForX(this.xyCoords,c.getXVal()),c=JSV.common.Coordinate.getNearestIndexForX(this.xyCoords,c.getXVal2());a.setBits(Math.min(e,c),Math.max(e,c))}return a});g(b,"getMeasurementListArray",function(){for(var a=Array(this.size()),b=0,c=this.size();0<=--c;)a[b++]=u(-1,[""+b,JU.DF.formatDecimalDbl(this.get(c).getXVal(),2),JU.DF.formatDecimalDbl(this.get(c).getXVal2(),2),this.get(c).text]);return a},"~S");g(b,"getMeasurementListArrayReal",
function(){for(var a=JU.AU.newDouble2(this.size()),b=0,c=this.size();0<=--c;b++)a[b]=R(-1,[this.get(c).getXVal(),this.get(c).getXVal2(),this.get(c).getValue()]);return a},"~S");g(b,"getDataHeader",function(){return JSV.common.IntegralData.$HEADER});c(b,"shiftY",function(a,b,c,e){b=v(100*(c+e-b)/e);0>a&&(b-=this.percentOffset);0>a?this.update(0,this.percentOffset,b):this.update(0,b,this.percentRange)},"~N,~N,~N,~N");c(b,"autoIntegrate",function(){null==this.xyCoords&&this.calculateIntegral();if(0!=
this.xyCoords.length){this.clear();for(var a=-1,b=0,c=this.xyCoords[this.xyCoords.length-1].getYVal(),e=this.xyCoords.length-1;0<=--e;){var f=this.xyCoords[e].getYVal();b++;1E-4>f-c&&0>a?f<c&&(c=f,b=0):0>a?(a=e+Math.min(b,20),c=f,b=0):1E-4>f-c?(1==b&&(c=f),20<=b&&(this.addIntegralRegion(this.xyCoords[a].getXVal(),this.xyCoords[e].getXVal()),a=-1,c=f,b=0)):(b=0,c=f)}a=this.spec.getHydrogenCount();0<a&&this.factorAllIntegrals(a/this.percentRange,!1)}});c(b,"getInfo",function(a){a.put("offset",Double.$valueOf(this.myParams.integralOffset));
a.put("range",Double.$valueOf(this.myParams.integralRange));a.put("normalizationFactor",Double.$valueOf(this.normalizationFactor));a.put("integralTotal",Double.$valueOf(this.integralTotal));ia(this,JSV.common.IntegralData,"getInfo",[a])},"java.util.Map");c(b,"setMinimumIntegral",function(a){for(var b=this.size();0<=--b;)this.get(b).getValue()<a&&this.removeItemAt(b)},"~N");var a=G(JSV.common.IntegralData,"IntMode",Enum);a.getMode=c(a,"getMode",function(a){for(var b,c=0,e=JSV.common.IntegralData.IntMode.values();c<
e.length&&((b=e[c])||1);c++)if(a.startsWith(b.name()))return b;return JSV.common.IntegralData.IntMode.NA},"~S");B(a,"OFF",0,[]);B(a,"ON",1,[]);B(a,"TOGGLE",2,[]);B(a,"AUTO",3,[]);B(a,"LIST",4,[]);B(a,"MARK",5,[]);B(a,"MIN",6,[]);B(a,"UPDATE",7,[]);B(a,"CLEAR",8,[]);B(a,"NA",9,[]);b.c=new JSV.common.IntegralComparator;b.$HEADER=u(-1,["peak","start/ppm","end/ppm","value"])});n("JSV.common");z(["java.lang.Enum","JSV.source.JDXDataObject","JU.Lst"],"JSV.common.Spectrum","java.util.Hashtable JU.PT JSV.common.Coordinate $.Parameters $.PeakInfo JSV.source.JDXSourceStreamTokenizer JU.Logger".split(" "),
function(){var b=w(function(){this.id="";this.convertedSpectrum=this.highlightedPeak=this.selectedPeak=this.peakYLabel=this.peakXLabel=this.peakList=this.subSpectra=this.fillColor=null;this.specShift=0;this.userYFactor=1;this.currentSubSpectrumIndex=0;this.exportXAxisLeftToRight=this.$isForcedSubset=!1;this.titleLabel=null;q(this,arguments)},JSV.common,"Spectrum",JSV.source.JDXDataObject);N(b,function(){this.peakList=new JU.Lst});x(b,function(){I(this,JSV.common.Spectrum,[]);this.headerTable=new JU.Lst;
this.xyCoords=[];this.parent=this});c(b,"dispose",function(){});c(b,"isForcedSubset",function(){return this.$isForcedSubset});c(b,"setId",function(a){this.id=a},"~S");c(b,"copy",function(){var a=new JSV.common.Spectrum;this.copyTo(a);a.setPeakList(this.peakList,this.peakXLabel,null);a.fillColor=this.fillColor;return a});c(b,"getXYCoords",function(){return this.getCurrentSubSpectrum().xyCoords});c(b,"getPeakList",function(){return this.peakList});c(b,"setPeakList",function(a,b,c){this.peakList=a;this.peakXLabel=
b;this.peakYLabel=c;for(b=a.size();0<=--b;)this.peakList.get(b).spectrum=this;JU.Logger.debugging&&JU.Logger.info("Spectrum "+this.getTitle()+" peaks: "+a.size());return a.size()},"JU.Lst,~S,~S");c(b,"selectPeakByFileIndex",function(a,b,c){if(null!=this.peakList&&0<this.peakList.size()&&(null==c||this.sourceID.equals(b)))for(var g=0;g<this.peakList.size();g++)if(this.peakList.get(g).checkFileIndex(a,b,c))return System.out.println("selecting peak by FileIndex "+this+" "+this.peakList.get(g)),this.selectedPeak=
this.peakList.get(g);return null},"~S,~S,~S");c(b,"selectPeakByFilePathTypeModel",function(a,b,c){if(null!=this.peakList&&0<this.peakList.size())for(var g=0;g<this.peakList.size();g++)if(this.peakList.get(g).checkFileTypeModel(a,b,c))return System.out.println("selecting peak byFilePathTypeModel "+this+" "+this.peakList.get(g)),this.selectedPeak=this.peakList.get(g);return null},"~S,~S,~S");c(b,"matchesPeakTypeModel",function(a,b){if(a.equals("ID"))return this.sourceID.equalsIgnoreCase(b);if(null!=
this.peakList&&0<this.peakList.size())for(var c=0;c<this.peakList.size();c++)if(this.peakList.get(c).checkTypeModel(a,b))return!0;return!1},"~S,~S");c(b,"setSelectedPeak",function(a){this.selectedPeak=a},"JSV.common.PeakInfo");c(b,"setHighlightedPeak",function(a){this.highlightedPeak=a},"JSV.common.PeakInfo");c(b,"getSelectedPeak",function(){return this.selectedPeak});c(b,"getModelPeakInfoForAutoSelectOnLoad",function(){if(null!=this.peakList)for(var a=0;a<this.peakList.size();a++)if(this.peakList.get(a).autoSelectOnLoad())return this.peakList.get(a);
return null});c(b,"getAssociatedPeakInfo",function(a,b){this.selectedPeak=this.findPeakByCoord(a,b);return null==this.selectedPeak?this.getBasePeakInfo():this.selectedPeak},"~N,JSV.common.Coordinate");c(b,"findPeakByCoord",function(a,b){if(null!=b&&null!=this.peakList&&0<this.peakList.size()){for(var c=b.getXVal(),g=-1,e=1E100,f=0;f<this.peakList.size();f++){var j=this.peakList.get(f).checkRange(a,c);j<e&&(e=j,g=f)}if(0<=g)return this.peakList.get(g)}return null},"~N,JSV.common.Coordinate");c(b,"getPeakTitle",
function(){return null!=this.selectedPeak?this.selectedPeak.getTitle():null!=this.highlightedPeak?this.highlightedPeak.getTitle():this.getTitleLabel()});c(b,"getTitleLabel",function(){if(null!=this.titleLabel)return this.titleLabel;var a=null==this.peakList||0==this.peakList.size()?this.getQualifiedDataType():this.peakList.get(0).getType();null!=a&&a.startsWith("NMR")&&(a=null!=this.nucleusY&&!this.nucleusY.equals("?")?"2D"+a:JSV.source.JDXDataObject.getNominalSpecFreq(this.nucleusX,this.getObservedFreq())+
" MHz "+this.nucleusX+" "+a);return this.titleLabel=(null!=a&&0<a.length?a+" ":"")+this.getTitle()});c(b,"setNextPeak",function(a,b){if(null==this.peakList||0==this.peakList.size())return-1;for(var c=a.getXVal()+1E-6*b,g=-1,e=-1,f=1.7976931348623157E308*b,j=0,k=this.peakList.size();0<=--k;){var l=this.peakList.get(k).getX();0<b?l>c&&l<f?(g=k,f=l):l<c&&l-c<j&&(e=k,j=l-c):l<c&&l>f?(g=k,f=l):l>c&&l-c>j&&(e=k,j=l-c)}if(0>g){if(0>e)return-1;g=e}return g},"JSV.common.Coordinate,~N");c(b,"getPercentYValueAt",
function(a){return!this.isContinuous()?NaN:this.getYValueAt(a)},"~N");c(b,"getYValueAt",function(a){return JSV.common.Coordinate.getYValueAt(this.xyCoords,a)},"~N");c(b,"setUserYFactor",function(a){this.userYFactor=a},"~N");c(b,"getUserYFactor",function(){return this.userYFactor});c(b,"getConvertedSpectrum",function(){return this.convertedSpectrum});c(b,"setConvertedSpectrum",function(a){this.convertedSpectrum=a},"JSV.common.Spectrum");b.taConvert=c(b,"taConvert",function(a,b){if(!a.isContinuous())return a;
switch(b){case JSV.common.Spectrum.IRMode.NO_CONVERT:return a;case JSV.common.Spectrum.IRMode.TO_ABS:if(!a.isTransmittance())return a;break;case JSV.common.Spectrum.IRMode.TO_TRANS:if(!a.isAbsorbance())return a}var c=a.getConvertedSpectrum();return null!=c?c:a.isAbsorbance()?JSV.common.Spectrum.toT(a):JSV.common.Spectrum.toA(a)},"JSV.common.Spectrum,JSV.common.Spectrum.IRMode");b.toT=c(b,"toT",function(a){if(!a.isAbsorbance())return null;var b=a.getXYCoords(),c=Array(b.length);JSV.common.Coordinate.isYInRange(b,
0,4)||(b=JSV.common.Coordinate.normalise(b,0,4));for(var g=0;g<b.length;g++)c[g]=(new JSV.common.Coordinate).set(b[g].getXVal(),JSV.common.Spectrum.toTransmittance(b[g].getYVal()));return JSV.common.Spectrum.newSpectrum(a,c,"TRANSMITTANCE")},"JSV.common.Spectrum");b.toA=c(b,"toA",function(a){if(!a.isTransmittance())return null;for(var b=a.getXYCoords(),c=Array(b.length),g=JSV.common.Coordinate.isYInRange(b,-2,2),e=0;e<b.length;e++)c[e]=(new JSV.common.Coordinate).set(b[e].getXVal(),JSV.common.Spectrum.toAbsorbance(b[e].getYVal(),
g));return JSV.common.Spectrum.newSpectrum(a,c,"ABSORBANCE")},"JSV.common.Spectrum");b.newSpectrum=c(b,"newSpectrum",function(a,b,c){var g=a.copy();g.setOrigin("JSpecView Converted");g.setOwner("JSpecView Generated");g.setXYCoords(b);g.setYUnits(c);a.setConvertedSpectrum(g);g.setConvertedSpectrum(a);return g},"JSV.common.Spectrum,~A,~S");b.toAbsorbance=c(b,"toAbsorbance",function(a,b){return Math.min(4,b?2-JSV.common.Spectrum.log10(a):-JSV.common.Spectrum.log10(a))},"~N,~B");b.toTransmittance=c(b,
"toTransmittance",function(a){return 0>=a?1:Math.pow(10,-a)},"~N");b.log10=c(b,"log10",function(a){return Math.log(a)/Math.log(10)},"~N");b.process=c(b,"process",function(a,b){if(b===JSV.common.Spectrum.IRMode.TO_ABS||b===JSV.common.Spectrum.IRMode.TO_TRANS)for(var c=0;c<a.size();c++)a.set(c,JSV.common.Spectrum.taConvert(a.get(c),b));return!0},"JU.Lst,JSV.common.Spectrum.IRMode");c(b,"getSubSpectra",function(){return this.subSpectra});c(b,"getCurrentSubSpectrum",function(){return null==this.subSpectra?
this:this.subSpectra.get(this.currentSubSpectrumIndex)});c(b,"advanceSubSpectrum",function(a){return this.setCurrentSubSpectrum(this.currentSubSpectrumIndex+a)},"~N");c(b,"setCurrentSubSpectrum",function(a){return this.currentSubSpectrumIndex=JSV.common.Coordinate.intoRange(a,0,this.subSpectra.size()-1)},"~N");c(b,"addSubSpectrum",function(a,b){if(!b&&(this.is1D()||this.blockID!=a.blockID)||!JSV.common.Spectrum.allowSubSpec(this,a))return!1;this.$isForcedSubset=b;null==this.subSpectra&&(this.subSpectra=
new JU.Lst,this.addSubSpectrum(this,!0));this.subSpectra.addLast(a);a.parent=this;return!0},"JSV.common.Spectrum,~B");c(b,"getSubIndex",function(){return null==this.subSpectra?-1:this.currentSubSpectrumIndex});c(b,"setExportXAxisDirection",function(a){this.exportXAxisLeftToRight=a},"~B");c(b,"isExportXAxisLeftToRight",function(){return this.exportXAxisLeftToRight});c(b,"getInfo",function(a){var b=new java.util.Hashtable;if("id".equalsIgnoreCase(a))return b.put(a,this.id),b;var c=null;"".equals(a)&&
(c="id specShift header");b.put("id",this.id);JSV.common.Parameters.putInfo(a,b,"specShift",Double.$valueOf(this.specShift));var g="header".equals(a);if(!g&&null!=a&&null==c)for(var e=this.headerTable.size();0<=--e;){var f=this.headerTable.get(e);if(f[0].equalsIgnoreCase(a)||f[2].equalsIgnoreCase(a))return b.put(a,f[1]),b}for(var f=new java.util.Hashtable,j=this.getHeaderRowDataAsArray(),e=0;e<j.length;e++){var k=JSV.source.JDXSourceStreamTokenizer.cleanLabel(j[e][0]);if(null!=c)c+=" "+k;else if(!(null!=
a&&!g&&!k.equals(a))){var l=JSV.common.Spectrum.fixInfoValue(j[e][1]);if(null==a){var n=new java.util.Hashtable;n.put("value",l);n.put("index",Integer.$valueOf(e+1));b.put(k,n)}else b.put(k,l)}}0<f.size()&&b.put("header",f);g||(null!=c?c+="  titleLabel type isHZToPPM subSpectrumCount":(JSV.common.Parameters.putInfo(a,b,"titleLabel",this.getTitleLabel()),JSV.common.Parameters.putInfo(a,b,"type",this.getDataType()),JSV.common.Parameters.putInfo(a,b,"isHZToPPM",Boolean.$valueOf(this.isHZtoPPM())),JSV.common.Parameters.putInfo(a,
b,"subSpectrumCount",Integer.$valueOf(null==this.subSpectra?0:this.subSpectra.size()))));null!=c&&b.put("KEYS",c);return b},"~S");b.fixInfoValue=c(b,"fixInfoValue",function(a){try{return Integer.$valueOf(a)}catch(b){if(!D(b,Exception))throw b;}try{return Double.$valueOf(a)}catch(c){if(!D(c,Exception))throw c;}return a},"~S");c(b,"findMatchingPeakInfo",function(a){for(var b=0;b<this.peakList.size();b++)if(this.peakList.get(b).checkTypeMatch(a))return this.peakList.get(b);return null},"JSV.common.PeakInfo");
c(b,"getBasePeakInfo",function(){return 0==this.peakList.size()?new JSV.common.PeakInfo:new JSV.common.PeakInfo(' baseModel="" '+this.peakList.get(0))});c(b,"getAxisLabel",function(a){var b=a?this.peakXLabel:this.peakYLabel;null==b&&(b=a?this.xLabel:this.yLabel);null==b&&(b=a?this.xUnits:this.yUnits);return null==b?"":b.equalsIgnoreCase("WAVENUMBERS")?"1/cm":b.equalsIgnoreCase("nanometers")?"nm":b},"~B");c(b,"findXForPeakNearest",function(a){return JSV.common.Coordinate.findXForPeakNearest(this.xyCoords,
a,this.isInverted())},"~N");c(b,"addSpecShift",function(a){if(0!=a&&(this.specShift+=a,JSV.common.Coordinate.shiftX(this.xyCoords,a),null!=this.subSpectra))for(var b=this.subSpectra.size();0<=--b;){var c=this.subSpectra.get(b);c!==this&&c!==this.parent&&c.addSpecShift(a)}return this.specShift},"~N");b.allowSubSpec=c(b,"allowSubSpec",function(a,b){return a.is1D()==b.is1D()&&a.xUnits.equalsIgnoreCase(b.xUnits)&&a.isHNMR()==b.isHNMR()},"JSV.common.Spectrum,JSV.common.Spectrum");b.areXScalesCompatible=
c(b,"areXScalesCompatible",function(a,b,c,g){var e=a.isNMR();if(e!=b.isNMR()||a.isContinuous()!=b.isContinuous()||!g&&!JSV.common.Spectrum.areUnitsCompatible(a.xUnits,b.xUnits))return!1;if(c){if(a.is1D()!=b.is1D())return!1}else if(g){if(!e)return!0}else if(!a.is1D()||!b.is1D())return!1;return!e||b.is1D()&&a.parent.nucleusX.equals(b.parent.nucleusX)},"JSV.common.Spectrum,JSV.common.Spectrum,~B,~B");b.areUnitsCompatible=c(b,"areUnitsCompatible",function(a,b){if(a.equalsIgnoreCase(b))return!0;a=a.toUpperCase();
b=b.toUpperCase();return a.equals("HZ")&&b.equals("PPM")||a.equals("PPM")&&b.equals("HZ")},"~S,~S");b.areLinkableX=c(b,"areLinkableX",function(a,b){return a.isNMR()&&b.isNMR()&&a.nucleusX.equals(b.nucleusX)},"JSV.common.Spectrum,JSV.common.Spectrum");b.areLinkableY=c(b,"areLinkableY",function(a,b){return a.isNMR()&&b.isNMR()&&a.nucleusX.equals(b.nucleusY)},"JSV.common.Spectrum,JSV.common.Spectrum");c(b,"getPeakWidth",function(){return(this.getLastX()-this.getFirstX())/100});c(b,"setSimulated",function(a){this.isSimulation=
!0;var b=this.sourceID;0==b.length&&(b=JU.PT.rep(a,"http://SIMULATION/",""));0<=b.indexOf("MOL=")&&(b="");this.title="SIMULATED "+JU.PT.rep(b,"$","")},"~S");c(b,"setFillColor",function(a){this.fillColor=a;null!=this.convertedSpectrum&&(this.convertedSpectrum.fillColor=a)},"javajs.api.GenericColor");g(b,"toString",function(){return this.getTitleLabel()+(null==this.xyCoords?"":" xyCoords.length="+this.xyCoords.length)});b=G(JSV.common.Spectrum,"IRMode",Enum);b.getMode=c(b,"getMode",function(a){switch((null==
a?"I":a.toUpperCase().charAt(0)).charCodeAt(0)){case 65:return JSV.common.Spectrum.IRMode.TO_ABS;case 84:return a.equalsIgnoreCase("TOGGLE")?JSV.common.Spectrum.IRMode.TOGGLE:JSV.common.Spectrum.IRMode.TO_TRANS;case 78:return JSV.common.Spectrum.IRMode.NO_CONVERT;default:return JSV.common.Spectrum.IRMode.TOGGLE}},"~S");B(b,"NO_CONVERT",0,[]);B(b,"TO_TRANS",1,[]);B(b,"TO_ABS",2,[]);B(b,"TOGGLE",3,[])});n("JSV.common");G(JSV.common,"JSVersion",null);var xa=null,ya=null,xa=Jmol.___JmolVersion,ya=Jmol.___JmolDate;
null!=ya&&(ya=ya.substring(7,23));JSV.common.JSVersion.VERSION_SHORT=null!=xa?xa:"(Unknown_version)";var Za=null!=xa?xa:"(Unknown_version)";JSV.common.JSVersion.date=null!=ya?ya:"";JSV.common.JSVersion.VERSION=JSV.common.JSVersion.VERSION_SHORT+(null==JSV.common.JSVersion.date?"":" "+JSV.common.JSVersion.date);var oa=-1;if(null!=xa)try{var Q=JSV.common.JSVersion.VERSION_SHORT,Ma="",ea=Q.indexOf(".");0>ea&&(oa=1E5*Integer.parseInt(Q),Q=null);if(null!=Q&&(oa=1E5*Integer.parseInt(Ma=Q.substring(0,ea)),
Q=Q.substring(ea+1),ea=Q.indexOf("."),0>ea&&(oa+=1E3*Integer.parseInt(Q),Q=null),null!=Q)){var $a=Q.substring(0,ea),Za=Ma+="."+$a,oa=oa+1E3*Integer.parseInt($a),Q=Q.substring(ea+1),ea=Q.indexOf("_");0<=ea&&(Q=Q.substring(0,ea));ea=Q.indexOf(" ");0<=ea&&(Q=Q.substring(0,ea));oa+=Integer.parseInt(Q)}}catch(ab){if(!D(ab,"NumberFormatException"))throw ab;}JSV.common.JSVersion.majorVersion=Za;JSV.common.JSVersion.versionInt=oa;n("JSV.common");z(["java.util.Hashtable"],"JSV.common.JSVFileManager","java.io.BufferedInputStream $.BufferedReader $.InputStreamReader $.StringReader java.net.URL JU.AU $.BS $.Encoding $.JSJSONParser $.P3 $.PT $.SB JSV.common.JSVersion $.JSViewer JSV.exception.JSVException JU.Logger".split(" "),
function(){var b=G(JSV.common,"JSVFileManager",null);c(b,"isApplet",function(){return null!=JSV.common.JSVFileManager.appletDocumentBase});b.getFileAsString=c(b,"getFileAsString",function(a){if(null==a)return null;var b,c=new JU.SB;try{b=JSV.common.JSVFileManager.getBufferedReaderFromName(a);for(var g;null!=(g=b.readLine());)c.append(g),c.appendC("\n");b.close()}catch(e){if(D(e,Exception))return null;throw e;}return c.toString()},"~S");b.getBufferedReaderForInputStream=c(b,"getBufferedReaderForInputStream",
function(a){try{return new java.io.BufferedReader(new java.io.InputStreamReader(a,"UTF-8"))}catch(b){if(D(b,Exception))return null;throw b;}},"java.io.InputStream");b.getBufferedReaderForStringOrBytes=c(b,"getBufferedReaderForStringOrBytes",function(a){return null==a?null:new java.io.BufferedReader(new java.io.StringReader("string"==typeof a?a:String.instantialize(a)))},"~O");b.getBufferedReaderFromName=c(b,"getBufferedReaderFromName",function(a){if(null==a)throw new JSV.exception.JSVException("Cannot find "+
a);JU.Logger.info("JSVFileManager getBufferedReaderFromName "+a);var b=JSV.common.JSVFileManager.getFullPathName(a);b.equals(a)||JU.Logger.info("JSVFileManager getBufferedReaderFromName "+b);return JSV.common.JSVFileManager.getUnzippedBufferedReaderFromName(b)},"~S");b.getFullPathName=c(b,"getFullPathName",function(a){try{if(null==JSV.common.JSVFileManager.appletDocumentBase){if(JSV.common.JSVFileManager.isURL(a)){var b=new java.net.URL(ha("java.net.URL"),a,null);return b.toString()}return JSV.common.JSVFileManager.newFile(a).getFullPath()}if(1==
a.indexOf(":\\")||1==a.indexOf(":/"))a="file:///"+a;else if(a.startsWith("cache://"))return a;b=new java.net.URL(JSV.common.JSVFileManager.appletDocumentBase,a,null);return b.toString()}catch(c){if(D(c,Exception))throw new JSV.exception.JSVException("Cannot create path for "+a);throw c;}},"~S");b.isURL=c(b,"isURL",function(a){for(var b=JSV.common.JSVFileManager.urlPrefixes.length;0<=--b;)if(a.startsWith(JSV.common.JSVFileManager.urlPrefixes[b]))return!0;return!1},"~S");b.urlTypeIndex=c(b,"urlTypeIndex",
function(a){for(var b=0;b<JSV.common.JSVFileManager.urlPrefixes.length;++b)if(a.startsWith(JSV.common.JSVFileManager.urlPrefixes[b]))return b;return-1},"~S");b.isLocal=c(b,"isLocal",function(a){if(null==a)return!1;a=JSV.common.JSVFileManager.urlTypeIndex(a);return 0>a||4==a},"~S");b.getUnzippedBufferedReaderFromName=c(b,"getUnzippedBufferedReaderFromName",function(a){var b=null;0<=a.indexOf("|")&&(b=JU.PT.split(a,"|"),null!=b&&0<b.length&&(a=b[0]));if(a.startsWith("http://SIMULATION/"))return JSV.common.JSVFileManager.getSimulationReader(a);
try{var c=JSV.common.JSVFileManager.getInputStream(a,!0,null);if(C(c,"JU.SB")||"string"==typeof c)return new java.io.BufferedReader(new java.io.StringReader(c.toString()));if(JSV.common.JSVFileManager.isAB(c))return new java.io.BufferedReader(new java.io.StringReader(String.instantialize(c)));var g=new java.io.BufferedInputStream(c);a=g;JSV.common.JSVFileManager.isGzip(g)&&(a=JSV.common.JSViewer.getInterface("JSV.common.JSVZipUtil").newGZIPInputStream(a));return new java.io.BufferedReader(new java.io.InputStreamReader(a,
"UTF-8"))}catch(e){throw D(e,Exception),e;}},"~S");b.getAbbrSimulationFileName=c(b,"getAbbrSimulationFileName",function(a){var b=JSV.common.JSVFileManager.getSimulationType(a);return JSV.common.JSVFileManager.getAbbreviatedSimulationName(a,b,!0)},"~S");b.getAbbreviatedSimulationName=c(b,"getAbbreviatedSimulationName",function(a,b,c){return 0<=a.indexOf("MOL=")?(c?"http://SIMULATION/":"")+"MOL="+JSV.common.JSVFileManager.getSimulationHash(a,b):a},"~S,~S,~B");b.getSimulationHash=c(b,"getSimulationHash",
function(a,b){var c=b+Math.abs(a.substring(a.indexOf("V2000")+1).hashCode());JU.Logger.debugging&&System.out.println("JSVFileManager hash for "+a+" = "+c);return c},"~S,~S");b.getSimulationFileData=c(b,"getSimulationFileData",function(a,b){return JSV.common.JSVFileManager.cacheGet(a.startsWith("MOL=")?a.substring(4):JSV.common.JSVFileManager.getAbbreviatedSimulationName(a,b,!1))},"~S,~S");b.cachePut=c(b,"cachePut",function(a,b){JU.Logger.debugging&&JU.Logger.debug("JSVFileManager cachePut "+b+" for "+
a);null!=b&&JSV.common.JSVFileManager.htCorrelationCache.put(a,b)},"~S,~S");b.cacheGet=c(b,"cacheGet",function(a){var b=JSV.common.JSVFileManager.htCorrelationCache.get(a);JU.Logger.debugging&&JU.Logger.info("JSVFileManager cacheGet "+b+" for "+a);return b},"~S");b.getSimulationReader=c(b,"getSimulationReader",function(a){var b=JSV.common.JSVFileManager.cacheGet(a);null==b&&JSV.common.JSVFileManager.cachePut(a,b=JSV.common.JSVFileManager.getNMRSimulationJCampDX(a.substring(18)));return JSV.common.JSVFileManager.getBufferedReaderForStringOrBytes(b)},
"~S");b.isAB=c(b,"isAB",function(a){return JU.AU.isAB(a)},"~O");b.isZipFile=c(b,"isZipFile",function(a){try{var b=O(4,0);a.mark(5);var c=a.read(b,0,4);a.reset();return 4==c&&80==b[0]&&75==b[1]&&3==b[2]&&4==b[3]}catch(g){if(D(g,Exception))throw new JSV.exception.JSVException(g.toString());throw g;}},"java.io.InputStream");b.isGzip=c(b,"isGzip",function(a){try{var b=O(4,0);a.mark(5);var c=a.read(b,0,4);a.reset();return 4==c&&31==b[0]&&139==b[1]}catch(g){if(D(g,Exception))throw new JSV.exception.JSVException(g.toString());
throw g;}},"java.io.InputStream");b.getStreamAsBytes=c(b,"getStreamAsBytes",function(a,b){try{for(var c=O(1024,0),g=null==b?O(4096,0):null,e=0,f=0;0<(e=a.read(c,0,1024));)f+=e,null==b?(f>=g.length&&(g=JU.AU.ensureLengthByte(g,2*f)),System.arraycopy(c,0,g,f-e,e)):b.write(c,0,e);a.close();return null==b?JU.AU.arrayCopyByte(g,f):f+" bytes"}catch(j){if(D(j,Exception))throw new JSV.exception.JSVException(j.toString());throw j;}},"java.io.BufferedInputStream,JU.OC");b.postByteArray=c(b,"postByteArray",
function(a,b){var c=null;try{c=JSV.common.JSVFileManager.getInputStream(a,!1,b)}catch(g){if(D(g,Exception))c=g.toString();else throw g;}if("string"==typeof c)return c;try{c=JSV.common.JSVFileManager.getStreamAsBytes(c,null)}catch(e){if(D(e,"JSV.exception.JSVException"))try{c.close()}catch(f){if(!D(f,Exception))throw f;}else throw e;}return null==c?"":JSV.common.JSVFileManager.fixUTF(c)},"~S,~A");b.getUTFEncoding=c(b,"getUTFEncoding",function(a){return 3<=a.length&&239==a[0]&&187==a[1]&&191==a[2]?
JU.Encoding.UTF8:4<=a.length&&0==a[0]&&0==a[1]&&254==a[2]&&255==a[3]?JU.Encoding.UTF_32BE:4<=a.length&&255==a[0]&&254==a[1]&&0==a[2]&&0==a[3]?JU.Encoding.UTF_32LE:2<=a.length&&255==a[0]&&254==a[1]?JU.Encoding.UTF_16LE:2<=a.length&&254==a[0]&&255==a[1]?JU.Encoding.UTF_16BE:JU.Encoding.NONE},"~A");b.fixUTF=c(b,"fixUTF",function(a){var b=JSV.common.JSVFileManager.getUTFEncoding(a);if(b!==JU.Encoding.NONE)try{var c=String.instantialize(a,b.name().$replace("_","-"));switch(b){case JU.Encoding.UTF8:case JU.Encoding.UTF_16BE:case JU.Encoding.UTF_16LE:c=
c.substring(1)}return c}catch(g){if(D(g,"java.io.IOException"))JU.Logger.error("fixUTF error "+g);else throw g;}return String.instantialize(a)},"~A");b.getInputStream=c(b,"getInputStream",function(a,b,c){var g=JSV.common.JSVFileManager.isURL(a),e=null!=JSV.common.JSVFileManager.appletDocumentBase,f=null,f=null,j;if(g&&0<=(j=a.indexOf("?POST?")))f=a.substring(j+6),a=a.substring(0,j);if(e||g){var k;try{k=new java.net.URL(JSV.common.JSVFileManager.appletDocumentBase,a,null)}catch(l){if(D(l,Exception))throw new JSV.exception.JSVException("Cannot read "+
a);throw l;}JU.Logger.info("JSVFileManager opening URL "+k+(null==f?"":" with POST of "+f.length+" bytes"));f=JSV.common.JSVFileManager.viewer.apiPlatform.getURLContents(k,c,f,!1)}else b&&JU.Logger.info("JSVFileManager opening file "+a),f=JSV.common.JSVFileManager.viewer.apiPlatform.getBufferedFileInputStream(a);if("string"==typeof f)throw new JSV.exception.JSVException("\n"+f);return f},"~S,~B,~A");b.getNMRSimulationJCampDX=c(b,"getNMRSimulationJCampDX",function(a){var b=0,c=null,g=JSV.common.JSVFileManager.getSimulationType(a);
a.startsWith(g)&&(a=a.substring(g.length+1));var e=a.startsWith("MOL=");e&&(a=a.substring(4),b=a.indexOf("/n__Jmol"),0<b&&(a=a.substring(0,b)+JU.PT.rep(a.substring(b),"/n","\n")),c=a=JU.PT.rep(a,"\\n","\n"));var f=""+JSV.common.JSVFileManager.getSimulationHash(a,g);JU.Logger.debugging&&JU.Logger.info("JSVFileManager type="+g+" key="+f+" name="+a);var j=JSV.common.JSVFileManager.cacheGet(f);if(null!=j)return j;var k=e?null:JU.PT.rep(JSV.common.JSVFileManager.nciResolver,"%FILE",JU.PT.escapeUrl(a));
if(!e&&null==(c=JSV.common.JSVFileManager.getFileAsString(k))||0<=c.indexOf("<html"))return JU.Logger.error("no MOL data returned by NCI"),null;var j=g.equals("C13"),l=JSV.common.JSVFileManager.getFileAsString((j?JSV.common.JSVFileManager.nmrdbServerC13:JSV.common.JSVFileManager.nmrdbServerH1)+c);if(0<=l.indexOf("Error:"))return l;b=(new JU.JSJSONParser).parseMap(l,!0);JSV.common.JSVFileManager.cachePut("json",l);j&&(b=b.get("result"));l=b.get("molfile");null==l?(System.out.println("JSVFileManager: no MOL file returned from EPFL"),
l=c):System.out.println("JSVFileManager: MOL file hash="+l.hashCode());l=JSV.common.JSVFileManager.getAtomMap(l,c);JSV.common.JSVFileManager.cachePut("mol",c);e||Jmol.Cache.put("http://SIMULATION/"+g+"/"+a+"#molfile",c.getBytes());var n="<Signals src="+JU.PT.esc(JU.PT.rep(j?JSV.common.JSVFileManager.nmrdbServerC13:JSV.common.JSVFileManager.nmrdbServerH1,"?POST?molfile=",""))+">\n";if(j){for(var b=b.get("spectrum13C"),j=b.get("jcamp").get("value"),m=b.get("predCSNuc"),p=new JU.SB,q=m.size();0<=--q;)b=
m.get(q),p.append("<Signal "),JSV.common.JSVFileManager.setAttr(p,"type","nucleus",b),null==l?JSV.common.JSVFileManager.setAttr(p,"atoms","assignment",b):p.append('atoms="').appendI(l[JU.PT.parseInt(b.get("assignment"))]).append('" '),JSV.common.JSVFileManager.setAttr(p,"multiplicity","multiplicity",b),b=b.get("integralData"),JSV.common.JSVFileManager.setAttr(p,"xMin","from",b),JSV.common.JSVFileManager.setAttr(p,"xMax","to",b),JSV.common.JSVFileManager.setAttr(p,"integral","value",b),p.append("></Signal>\n");
p.append("</Signals>");n+=p.toString()}else{n=JU.PT.rep(b.get("xml"),"<Signals>",n);if(null!=l){p=new JU.SB;n=JU.PT.split(n,' atoms="');p.append(n[0]);for(q=1;q<n.length;q++)j=n[q],m=JU.PT.parseInt(j),p.append(' atoms="').appendI(l[m]).append(j.substring(j.indexOf('"')));n=p.toString()}n=JU.PT.rep(n,"</","\n</");n=JU.PT.rep(n,"><",">\n<");n=JU.PT.rep(n,'\\"','"');j=b.get("jcamp")}JU.Logger.debugging&&JU.Logger.info(n);JSV.common.JSVFileManager.cachePut("xml",n);j="##TITLE="+(e?"JMOL SIMULATION/"+
g:a)+"\n"+j.substring(j.indexOf("\n##")+1);b=c.indexOf("\n");b=c.indexOf("\n",b+1);0<b&&b==c.indexOf("\n \n")&&(c=c.substring(0,b+1)+"Created "+JSV.common.JSVFileManager.viewer.apiPlatform.getDateFormat("8824")+" by JSpecView "+JSV.common.JSVersion.VERSION+c.substring(b+1));b=j.indexOf("##.");a=JSV.common.JSVFileManager.getAbbreviatedSimulationName(a,g,!1);g=a.indexOf("id='");e&&0<g&&(a=a.substring(g+4,(a+"'").indexOf("'",g+4)));j=j.substring(0,b)+"##$MODELS=\n<Models>\n<ModelData id="+JU.PT.esc(a)+
' type="MOL" src='+JU.PT.esc(k)+">\n"+c+"</ModelData>\n</Models>\n##$SIGNALS=\n"+n+"\n"+j.substring(b);JSV.common.JSVFileManager.cachePut("jcamp",j);JSV.common.JSVFileManager.cachePut(f,j);return j},"~S");b.getAtomMap=c(b,"getAtomMap",function(a,b){var c=JSV.common.JSVFileManager.getCoord(a),g=JSV.common.JSVFileManager.getCoord(b),e=c.length;if(e!=g.length)return null;var f=E(e,0),j=new JU.BS;j.setBits(0,e);for(var k=!1,l=0;l<e;l++)for(var n=c[l],m=j.nextSetBit(0);0<=m;m=j.nextSetBit(m+1))if(0.1>
n.distanceSquared(g[m])){j.clear(m);f[l]=m;l!=m&&(k=!0);break}return k?f:null},"~S,~S");b.getCoord=c(b,"getCoord",function(a){a=JU.PT.split(a,"\n");for(var b=L(3,0),c=Integer.parseInt(a[3].substring(0,3).trim()),g=Array(c),e=0;e<c;e++)JU.PT.parseFloatArrayInfested(JU.PT.getTokens(a[4+e].substring(0,31)),b),g[e]=JU.P3.new3(b[0],b[1],b[2]);return g},"~S");b.setAttr=c(b,"setAttr",function(a,b,c,g){a.append(b+'="').appendO(g.get(c)).append('" ')},"JU.SB,~S,~S,java.util.Map");b.getResource=c(b,"getResource",
function(a,b,c){var g=null;try{if(null==(g=a.getClass().getResource(b)))c[0]="Couldn't find file: "+b}catch(e){if(D(e,Exception))c[0]="Exception "+e+" in getResource "+b;else throw e;}return g},"~O,~S,~A");b.getResourceString=c(b,"getResourceString",function(a,b,c){a=JSV.common.JSVFileManager.getResource(a,b,c);if(null==a)return c[0]="Error loading resource "+b,null;if("string"==typeof a)return JSV.common.JSVFileManager.getFileAsString(a);b=new JU.SB;try{for(var g=new java.io.BufferedReader(new java.io.InputStreamReader(a.getContent(),
"UTF-8")),e;null!=(e=g.readLine());)b.append(e).append("\n");g.close()}catch(f){if(D(f,Exception))c[0]=f.toString();else throw f;}return b.toString()},"~O,~S,~A");b.getJmolFilePath=c(b,"getJmolFilePath",function(a){try{a=JSV.common.JSVFileManager.getFullPathName(a)}catch(b){if(D(b,"JSV.exception.JSVException"))return null;throw b;}return null==JSV.common.JSVFileManager.appletDocumentBase?a.$replace("\\","/"):a},"~S");b.getTagName=c(b,"getTagName",function(a){if(null==a)return"String"+ ++JSV.common.JSVFileManager.stringCount;
if(JSV.common.JSVFileManager.isURL(a))try{if(a.startsWith("http://SIMULATION/"))return JSV.common.JSVFileManager.getAbbrSimulationFileName(a);var b=(new java.net.URL(ha("java.net.URL"),a,null)).getFile();return b.substring(b.lastIndexOf("/")+1)}catch(c){if(D(c,"java.io.IOException"))return null;throw c;}return JSV.common.JSVFileManager.newFile(a).getName()},"~S");b.newFile=c(b,"newFile",function(a){return JSV.common.JSVFileManager.viewer.apiPlatform.newFile(a)},"~S");b.setDocumentBase=c(b,"setDocumentBase",
function(a,b){JSV.common.JSVFileManager.viewer=a;JSV.common.JSVFileManager.appletDocumentBase=b},"JSV.common.JSViewer,java.net.URL");b.getSimulationType=c(b,"getSimulationType",function(a){return 0<=a.indexOf("C13/")?"C13":"H1"},"~S");b.appletDocumentBase=null;b.viewer=null;b.jsDocumentBase="";b.urlPrefixes=u(-1,["http:","https:","ftp:","http://SIMULATION/","file:"]);b.htCorrelationCache=new java.util.Hashtable;b.nciResolver="https://cactus.nci.nih.gov/chemical/structure/%FILE/file?format=sdf&get3d=True";
b.nmrdbServerH1="https://www.nmrdb.org/tools/jmol/predict.php?POST?molfile=";b.nmrdbServerC13="https://www.nmrdb.org/service/jsmol13c?POST?molfile=";b.stringCount=0});n("JSV.common");z(["javajs.api.BytePoster","J.api.PlatformViewer","JSV.common.Spectrum"],"JSV.common.JSViewer","java.io.File java.net.URL java.util.Arrays $.Hashtable JU.CU $.Lst $.OC $.PT $.SB JSV.common.Annotation $.ExportType $.JSVFileManager $.PanelData $.PanelNode $.Parameters $.PeakInfo $.PrintLayout $.RepaintManager $.ScriptToken $.ScriptTokenizer JSV.source.JDXReader $.JDXSource JSV.tree.SimpleTree JU.Logger".split(" "),
function(){var b=w(function(){this.irMode=this.overlayLegendDialog=this.viewDialog=this.dialogManager=this.jsvpPopupMenu=this.fileHelper=this.scriptQueue=this.properties=this.mainPanel=this.selectedPanel=this.repaintManager=this.parameters=this.panelNodes=this.currentSource=this.spectraTree=this.g2d=this.si=null;this.autoShowLegend=this.autoIntegrate=this.interfaceOverlaid=this.loadImaginary=!1;this.obscureTitleFromUser=null;this.allowMenu=!0;this.initialEndIndex=this.initialStartIndex=-1;this.isSigned=
this.isApplet=this.isSingleThreaded=!1;this.recentScript="";this.display=this.html5Applet=this.syncID=this.fullName=this.appletName=null;this.maximumSize=2147483647;this.scriptLevelCount=this.nViews=this.fileCount=this.screenWidth=this.screenHeight=0;this.apiPlatform=this.integrationRatios=this.returnFromJmolModel=null;this.popupZoomEnabled=this.popupAllowMenu=!0;this.defaultLoadScript=null;this.nmrMaxY=NaN;this.overlayLegendVisible=!1;this.recentStackPercent=5;this.offWindowFrame=this.lastPrintLayout=
null;this.recentOpenURL="http://";this.recentURL=null;this.recentSimulation="tylenol";q(this,arguments)},JSV.common,"JSViewer",null,[J.api.PlatformViewer,javajs.api.BytePoster]);N(b,function(){this.irMode=JSV.common.Spectrum.IRMode.NO_CONVERT});x(b,function(a,b,c){this.si=a;this.isApplet=b;JSV.common.JSViewer.isJS=b&&c;c=null;self.Jmol&&(c=Jmol);JSV.common.JSViewer.jmolObject=c;this.isSigned=a.isSigned();this.apiPlatform=this.getPlatformInterface("Platform");this.apiPlatform.setViewer(this,this.display);
this.g2d=this.getPlatformInterface("G2D");this.spectraTree=new JSV.tree.SimpleTree(this);this.parameters=this.getPlatformInterface("Parameters");this.parameters.setName("applet");this.fileHelper=this.getPlatformInterface("FileHelper").set(this);this.isSingleThreaded=this.apiPlatform.isSingleThreaded();this.panelNodes=new JU.Lst;this.repaintManager=new JSV.common.RepaintManager(this);b||this.setPopupMenu(!0,!0)},"JSV.api.ScriptInterface,~B,~B");c(b,"setProperty",function(a,b){null!=this.properties&&
this.properties.setProperty(a,b)},"~S,~S");c(b,"setNode",function(a){a.jsvp!==this.selectedPanel&&this.si.siSetSelectedPanel(a.jsvp);this.si.siSendPanelChange();this.si.siNodeSet(a)},"JSV.common.PanelNode");c(b,"setPopupMenu",function(a,b){this.popupAllowMenu=a;this.popupZoomEnabled=b},"~B,~B");c(b,"showMenu",function(a,b){if(this.popupAllowMenu){if(null==this.jsvpPopupMenu)try{this.jsvpPopupMenu=this.getPlatformInterface("Popup"),this.jsvpPopupMenu.jpiInitialize(this,this.isApplet?"appletMenu":"appMenu"),
this.jsvpPopupMenu.setEnabled(this.popupAllowMenu,this.popupZoomEnabled)}catch(c){if(D(c,Exception)){JU.Logger.error(c+" initializing popup menu");return}throw c;}this.jsvpPopupMenu.jpiShow(a,b)}},"~N,~N");c(b,"runScriptNow",function(a){System.out.println(this.checkScript(a));this.scriptLevelCount++;null==a&&(a="");a=a.trim();if(a.startsWith("!"))a=a.substring(1).trim();else if(a.startsWith(">"))return JU.Logger.error(a),!0;if(0<=a.indexOf("<PeakData"))return this.syncScript(a),!0;JU.Logger.info("RUNSCRIPT "+
a);var b=!0,c=10;a=new JSV.common.ScriptTokenizer(a,!0);for(var g=null;null!=a&&a.hasMoreTokens()&&0<c&&b;){var e=a.nextToken(),f=new JSV.common.ScriptTokenizer(e,!1),j=JSV.common.ScriptToken.getKey(f);if(null!=j){var k=JSV.common.ScriptToken.getScriptToken(j),f=JSV.common.ScriptToken.getValue(k,f,e);try{switch(k){case JSV.common.ScriptToken.UNKNOWN:JU.Logger.info("Unrecognized parameter: "+j);--c;break;default:if(null==this.selectedPanel)break;this.parameters.set(this.pd(),k,f);this.si.siUpdateBoolean(k,
JSV.common.Parameters.isTrue(f));break;case JSV.common.ScriptToken.PEAKCALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.SYNCCALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.COORDCALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.LOADFILECALLBACKFUNCTIONNAME:this.si.siExecSetCallback(k,f);break;case JSV.common.ScriptToken.DEFAULTLOADSCRIPT:f=JU.PT.rep(f,"''",'"');this.defaultLoadScript=0<f.length?f:null;break;case JSV.common.ScriptToken.DEFAULTNMRNORMALIZATION:this.nmrMaxY=JU.PT.parseFloat(f);break;
case JSV.common.ScriptToken.AUTOINTEGRATE:this.autoIntegrate=JSV.common.Parameters.isTrue(f);break;case JSV.common.ScriptToken.CLOSE:this.execClose(f);break;case JSV.common.ScriptToken.DEBUG:JU.Logger.setLogLevel(f.toLowerCase().equals("high")?6:JSV.common.Parameters.isTrue(f)?5:4);break;case JSV.common.ScriptToken.GETPROPERTY:var l=null==this.selectedPanel?null:this.getPropertyAsJavaObject(f);null!=l&&this.selectedPanel.showMessage(JU.PT.toJSON(null,l),f);break;case JSV.common.ScriptToken.HELP:this.execHelp(f);
break;case JSV.common.ScriptToken.HIDDEN:this.si.siExecHidden(JSV.common.Parameters.isTrue(f));break;case JSV.common.ScriptToken.INTEGRATIONRATIOS:this.integrationRatios=f;this.execIntegrate(null);break;case JSV.common.ScriptToken.INTERFACE:this.interfaceOverlaid=this.checkOvelayInterface(f);break;case JSV.common.ScriptToken.INTEGRALOFFSET:case JSV.common.ScriptToken.INTEGRALRANGE:this.execSetIntegralParameter(k,Double.parseDouble(f));break;case JSV.common.ScriptToken.INVERTY:this.execZoom("invertY");
break;case JSV.common.ScriptToken.JMOL:this.si.syncToJmol(f);break;case JSV.common.ScriptToken.JSV:this.syncScript(JU.PT.trimQuotes(f));break;case JSV.common.ScriptToken.LOAD:if(0==f.length){null!=this.defaultLoadScript&&this.runScriptNow(this.defaultLoadScript);break}this.execLoad(f,(null==this.defaultLoadScript?"":this.defaultLoadScript+";")+a.getRemainingScript());g=null==this.selectedPanel?null:this.si.siLoaded(f);a=null;break;case JSV.common.ScriptToken.LOADIMAGINARY:this.loadImaginary=JSV.common.Parameters.isTrue(f);
break;case JSV.common.ScriptToken.PEAK:this.execPeak(f);break;case JSV.common.ScriptToken.PEAKLIST:this.execPeakList(f);break;case JSV.common.ScriptToken.SCALEBY:this.scaleSelectedBy(this.panelNodes,f);break;case JSV.common.ScriptToken.SCRIPT:if(f.equals("")||f.toLowerCase().startsWith("inline"))this.execScriptInline(f);else{var n=JSV.common.JSVFileManager.getFileAsString(f);null!=n&&100>this.scriptLevelCount&&this.runScriptNow(n)}break;case JSV.common.ScriptToken.SELECT:this.execSelect(f);break;
case JSV.common.ScriptToken.SPECTRUM:case JSV.common.ScriptToken.SPECTRUMNUMBER:this.setSpectrum(f)||(b=!1);break;case JSV.common.ScriptToken.STACKOFFSETY:this.execOverlayOffsetY(JU.PT.parseInt(""+JU.PT.parseFloat(f)));break;case JSV.common.ScriptToken.TEST:this.si.siExecTest(f);break;case JSV.common.ScriptToken.OVERLAY:case JSV.common.ScriptToken.VIEW:this.execView(f,!0);break;case JSV.common.ScriptToken.HIGHLIGHT:b=this.highlight(e);break;case JSV.common.ScriptToken.FINDX:case JSV.common.ScriptToken.GETSOLUTIONCOLOR:case JSV.common.ScriptToken.INTEGRATION:case JSV.common.ScriptToken.INTEGRATE:case JSV.common.ScriptToken.IRMODE:case JSV.common.ScriptToken.LABEL:case JSV.common.ScriptToken.LINK:case JSV.common.ScriptToken.OVERLAYSTACKED:case JSV.common.ScriptToken.PRINT:case JSV.common.ScriptToken.SETPEAK:case JSV.common.ScriptToken.SETX:case JSV.common.ScriptToken.SHIFTX:case JSV.common.ScriptToken.SHOWERRORS:case JSV.common.ScriptToken.SHOWMEASUREMENTS:case JSV.common.ScriptToken.SHOWMENU:case JSV.common.ScriptToken.SHOWKEY:case JSV.common.ScriptToken.SHOWPEAKLIST:case JSV.common.ScriptToken.SHOWINTEGRATION:case JSV.common.ScriptToken.SHOWPROPERTIES:case JSV.common.ScriptToken.SHOWSOURCE:case JSV.common.ScriptToken.YSCALE:case JSV.common.ScriptToken.WRITE:case JSV.common.ScriptToken.ZOOM:if(this.isClosed()){b=
!1;break}switch(k){case JSV.common.ScriptToken.FINDX:this.pd().findX(null,Double.parseDouble(f));break;case JSV.common.ScriptToken.GETSOLUTIONCOLOR:this.show("solutioncolor"+f.toLowerCase());break;case JSV.common.ScriptToken.INTEGRATION:case JSV.common.ScriptToken.INTEGRATE:this.execIntegrate(f);break;case JSV.common.ScriptToken.IRMODE:this.execIRMode(f);break;case JSV.common.ScriptToken.LABEL:this.pd().addAnnotation(JSV.common.ScriptToken.getTokens(f));break;case JSV.common.ScriptToken.LINK:this.pd().linkSpectra(JSV.common.PanelData.LinkMode.getMode(f));
break;case JSV.common.ScriptToken.OVERLAYSTACKED:this.pd().splitStack(!JSV.common.Parameters.isTrue(f));break;case JSV.common.ScriptToken.PRINT:g=this.execWrite(null);break;case JSV.common.ScriptToken.SETPEAK:case JSV.common.ScriptToken.SETX:case JSV.common.ScriptToken.SHIFTX:this.execShiftSpectrum(k,e);break;case JSV.common.ScriptToken.SHOWERRORS:this.show("errors");break;case JSV.common.ScriptToken.SHOWINTEGRATION:this.pd().showAnnotation(JSV.common.Annotation.AType.Integration,JSV.common.Parameters.getTFToggle(f));
break;case JSV.common.ScriptToken.SHOWKEY:this.setOverlayLegendVisibility(JSV.common.Parameters.getTFToggle(f),!0);break;case JSV.common.ScriptToken.SHOWMEASUREMENTS:this.pd().showAnnotation(JSV.common.Annotation.AType.Measurements,JSV.common.Parameters.getTFToggle(f));break;case JSV.common.ScriptToken.SHOWMENU:this.showMenu(-2147483648,0);break;case JSV.common.ScriptToken.SHOWPEAKLIST:this.pd().showAnnotation(JSV.common.Annotation.AType.PeakList,JSV.common.Parameters.getTFToggle(f));break;case JSV.common.ScriptToken.SHOWPROPERTIES:this.show("properties");
break;case JSV.common.ScriptToken.SHOWSOURCE:this.show("source");break;case JSV.common.ScriptToken.YSCALE:this.setYScale(f);break;case JSV.common.ScriptToken.WINDOW:this.si.siNewWindow(JSV.common.Parameters.isTrue(f),!1);break;case JSV.common.ScriptToken.WRITE:g=this.execWrite(f);break;case JSV.common.ScriptToken.ZOOM:b=this.execZoom(f)}}}catch(m){if(D(m,Exception))g=m.toString(),JU.Logger.error(m.toString()),b=!1,--c;else throw m;}}}this.scriptLevelCount--;this.si.siExecScriptComplete(g,!0);return b},
"~S");c(b,"execShiftSpectrum",function(a,b){var c=JSV.common.ScriptToken.getTokens(b),g=NaN,e=NaN;switch(c.size()){case 2:e=c.get(1);e.equals("")&&(e="?");e=e.equalsIgnoreCase("NONE")?1.7976931348623157E308:e.equalsIgnoreCase("?")?NaN:Double.parseDouble(e);break;case 3:g=Double.parseDouble(c.get(1));e=Double.parseDouble(c.get(2));break;default:Double.parseDouble("")}c=0;switch(a){case JSV.common.ScriptToken.SETPEAK:c=1;break;case JSV.common.ScriptToken.SETX:c=2;break;case JSV.common.ScriptToken.SHIFTX:c=
3;Double.isNaN(e)&&Double.parseDouble("");break;default:return}this.pd().shiftSpectrum(c,g,e)},"JSV.common.ScriptToken,~S");c(b,"execClose",function(a){var b=!a.startsWith("!");b||(a=a.substring(1));this.close(JU.PT.trimQuotes(a));(!b||0==this.panelNodes.size())&&this.si.siValidateAndRepaint(!0)},"~S");c(b,"checkOvelayInterface",function(a){return a.equalsIgnoreCase("single")||a.equalsIgnoreCase("overlay")},"~S");c(b,"execPeak",function(a){try{var b=JSV.common.ScriptToken.getTokens(JU.PT.rep(a,"#",
"INDEX="));a=' type="'+b.get(0).toUpperCase()+'" _match="'+JU.PT.trimQuotes(b.get(1).toUpperCase())+'"';2<b.size()&&b.get(2).equalsIgnoreCase("all")&&(a+=' title="ALL"');this.processPeakPickEvent(new JSV.common.PeakInfo(a),!1)}catch(c){if(!D(c,Exception))throw c;}},"~S");c(b,"execPeakList",function(a){var b=this.parameters,c=JSV.common.Parameters.getTFToggle(a);if(0>a.indexOf("="))this.isClosed()||this.pd().getPeakListing(null,c);else{var c=JSV.common.ScriptToken.getTokens(a),g=b.peakListThreshold,
e=b.peakListInterpolation;try{for(var f=c.size();0<=--f;){var j=c.get(f),k=j.indexOf("=");if(!(0>=k)){var l=j.substring(0,k);a=j.substring(k+1);l.startsWith("thr")?g=Double.$valueOf(a).doubleValue():l.startsWith("int")&&(e=a.equalsIgnoreCase("none")?"NONE":"parabolic")}}b.peakListThreshold=g;b.peakListInterpolation=e;this.isClosed()||this.pd().getPeakListing(b,Boolean.TRUE)}catch(n){if(!D(n,Exception))throw n;}}},"~S");c(b,"highlight",function(a){var b=JSV.common.ScriptToken.getTokens(a),c=b.size();
switch(c){case 3:case 5:case 6:case 7:break;case 2:case 4:if(b.get(c-1).equalsIgnoreCase("OFF"))break;default:return!1}if(!this.isClosed()){a=JU.PT.parseFloat(1<c?b.get(1):"");var g=JU.PT.parseFloat(2<c?b.get(2):""),e=this.getRGB(3<c?b.get(3):"100"),f=this.getRGB(4<c?b.get(4):"100"),j=this.getRGB(5<c?b.get(5):"100"),b=this.getRGB(6<c?b.get(6):"100");Float.isNaN(a)||Float.isNaN(g)?this.pd().removeAllHighlights():(this.pd().removeHighlight(a,g),0>b&&(b=150),0<=e&&(0<=f&&0<=j)&&this.pd().addHighlight(null,
a,g,null,e,f,j,b));this.repaint(!0)}return!0},"~S");c(b,"getRGB",function(a){a=JU.PT.parseFloat(a);return F(Float.isNaN(a)?-1:1<a?a:255*a)},"~S");c(b,"execZoom",function(a){var b=0,c=0,g=0,e=0;a=JU.PT.rep(a," - "," ").$replace(","," ");a=JSV.common.ScriptToken.getTokens(a);switch(a.size()){default:return!1;case 0:return b=this.pd().getCurrentGraphSet().getCurrentView(),a=Math.round(100*b.minXOnScale)/100+","+Math.round(100*b.maxXOnScale)/100,a=this.selectedPanel.getInput("Enter zoom range x1 x2",
"Zoom",a),null==a||this.execZoom(a);case 1:return a=a.get(0),a.equalsIgnoreCase("next")?this.pd().nextView():a.toLowerCase().startsWith("prev")?this.pd().previousView():a.equalsIgnoreCase("out")?this.pd().resetView():a.equalsIgnoreCase("clear")?this.pd().clearAllView():a.equalsIgnoreCase("invertY")&&this.pd().getCurrentGraphSet().invertYAxis(),!0;case 2:b=Double.parseDouble(a.get(0));c=Double.parseDouble(a.get(1));break;case 3:var f=a.get(0);f.equalsIgnoreCase("X")?(b=Double.parseDouble(a.get(1)),
c=Double.parseDouble(a.get(2))):f.equalsIgnoreCase("Y")&&(g=Double.parseDouble(a.get(1)),e=Double.parseDouble(a.get(2)));break;case 4:b=Double.parseDouble(a.get(0)),g=Double.parseDouble(a.get(1)),c=Double.parseDouble(a.get(2)),e=Double.parseDouble(a.get(3))}this.pd().setZoom(b,g,c,e);return!0},"~S");c(b,"scaleSelectedBy",function(a,b){try{for(var c=Double.parseDouble(b),g=a.size();0<=--g;)a.get(g).pd().scaleSelectedBy(c)}catch(e){if(!D(e,Exception))throw e;}},"JU.Lst,~S");c(b,"pd",function(){return null==
this.selectedPanel?null:this.selectedPanel.getPanelData()});c(b,"isClosed",function(){return null==this.pd()});c(b,"execSelect",function(a){if(a.startsWith("ID ")){if(!this.isClosed())try{this.pd().selectSpectrum(null,"ID",JU.PT.trimQuotes(a.substring(3)),!0)}catch(b){if(!D(b,Exception))throw b;}}else{for(var c=this.panelNodes,g=c.size();0<=--g;)c.get(g).pd().selectFromEntireSet(-2147483648);c=new JU.Lst;this.fillSpecList(a,c,!1)}},"~S");c(b,"execView",function(a,b){if(a.equals(""))this.checkOverlay();
else{var c=new JU.Lst,g=this.fillSpecList(a,c,!0);0<c.size()&&this.si.siOpenDataOrFile(null,g,c,g,-1,-1,!1,null,null);b||this.si.siValidateAndRepaint(!1)}},"~S,~B");c(b,"execIRMode",function(a){for(var b=JSV.common.Spectrum.IRMode.getMode(a),c=this.pd().getSpectrum().dataType,g=this.panelNodes.size();0<=--g;)this.panelNodes.get(g).pd().setIRMode(b,c);this.setIRmode(a)},"~S");c(b,"execIntegrate",function(a){this.isClosed()||(this.pd().checkIntegral(this.parameters,a),null!=this.integrationRatios&&
this.pd().setIntegrationRatios(this.integrationRatios),this.integrationRatios=null,this.repaint(!0))},"~S");c(b,"repaint",function(a){this.selectedPanel.doRepaint(a)},"~B");c(b,"execSetIntegralParameter",function(a,b){var c=this.parameters;switch(a){case JSV.common.ScriptToken.INTEGRALRANGE:c.integralRange=b;break;case JSV.common.ScriptToken.INTEGRALOFFSET:c.integralOffset=b}this.isClosed()||this.pd().checkIntegral(this.parameters,"update")},"JSV.common.ScriptToken,~N");c(b,"setYScale",function(a){var b=
JSV.common.ScriptToken.getTokens(a),c=0,g=!1;1<b.size()&&b.get(0).equalsIgnoreCase("ALL")&&(g=!0,c++);a=Double.parseDouble(b.get(c++));b=Double.parseDouble(b.get(c));if(g){g=this.pd().getSpectrum();for(c=this.panelNodes.size();0<=--c;){var e=this.panelNodes.get(c);e.source===this.currentSource&&JSV.common.Spectrum.areXScalesCompatible(g,e.getSpectrum(),!1,!1)&&e.pd().setZoom(0,a,0,b)}}else this.pd().setZoom(0,a,0,b)},"~S");c(b,"setOverlayLegendVisibility",function(a,b){b&&(this.overlayLegendVisible=
null==a?!this.overlayLegendVisible:a===Boolean.TRUE);for(var c=JSV.common.PanelNode.findNode(this.selectedPanel,this.panelNodes),g=this.panelNodes.size();0<=--g;)this.showOverlayLegend(this.panelNodes.get(g),this.panelNodes.get(g)===c&&this.overlayLegendVisible)},"Boolean,~B");c(b,"showOverlayLegend",function(a,b){var c=a.legend;null==c&&b&&(c=a.setLegend(1<a.pd().getNumberOfSpectraInCurrentSet()&&1==a.pd().getNumberOfGraphSets()?this.getDialog(JSV.common.Annotation.AType.OverlayLegend,null):null));
null!=c&&c.setVisible(b)},"JSV.common.PanelNode,~B");c(b,"syncScript",function(a){a.equals("TEST")&&(a=JSV.common.JSViewer.testScript);JU.Logger.info("JSViewer.syncScript Jmol>JSV "+a);if(0>a.indexOf("<PeakData"))a.startsWith("JSVSTR:")?this.si.syncToJmol(a):(this.runScriptNow(a),0<=a.indexOf("#SYNC_PEAKS")&&this.syncPeaksAfterSyncScript());else{JU.Logger.info(">>toJSV>> "+a);var b=JU.PT.getQuotedAttribute(a,"sourceID"),c,g,e,f;if(null==b){g=JU.PT.getQuotedAttribute(a,"file");e=JU.PT.getQuotedAttribute(a,
"index");if(null==g||null==e)return;g=JU.PT.rep(g,"#molfile","");c=JU.PT.getQuotedAttribute(a,"model");b=JU.PT.getQuotedAttribute(a,"src");f=null!=b&&b.startsWith("Jmol")?null:this.returnFromJmolModel;if(null!=c&&null!=f&&!c.equals(f)){JU.Logger.info("JSV ignoring model "+c+"; should be "+f);return}this.returnFromJmolModel=null;if(0==this.panelNodes.size()||!this.checkFileAlreadyLoaded(g))JU.Logger.info("file "+g+" not found -- JSViewer closing all and reopening"),this.si.siSyncLoad(g);a=JU.PT.getQuotedAttribute(a,
"type");f=null}else g=null,e=c=b,f=","+JU.PT.getQuotedAttribute(a,"atom")+",",a="ID";e=this.selectPanelByPeak(g,e,f);f=this.pd();f.selectSpectrum(g,a,c,!0);this.si.siSendPanelChange();f.addPeakHighlight(e);this.repaint(!0);(null==b||null!=e&&null!=e.getAtoms())&&this.si.syncToJmol(this.jmolSelect(e))}},"~S");c(b,"syncPeaksAfterSyncScript",function(){var a=this.currentSource;if(null!=a)try{var b="file="+JU.PT.esc(a.getFilePath()),c=a.getSpectra().get(0).getPeakList(),g=new JU.SB;g.append("[");for(var e=
c.size(),a=0;a<e;a++){var f=c.get(a).toString(),f=f+" "+b;g.append(JU.PT.esc(f));0<a&&g.append(",")}g.append("]");this.si.syncToJmol("Peaks: "+g)}catch(j){if(!D(j,Exception))throw j;}});c(b,"checkFileAlreadyLoaded",function(a){if(this.isClosed())return!1;if(this.pd().hasFileLoaded(a))return!0;for(var b=this.panelNodes.size();0<=--b;)if(this.panelNodes.get(b).pd().hasFileLoaded(a))return this.si.siSetSelectedPanel(this.panelNodes.get(b).jsvp),!0;return!1},"~S");c(b,"selectPanelByPeak",function(a,b,
c){if(null==this.panelNodes)return null;for(var g=null,e=this.panelNodes.size();0<=--e;)this.panelNodes.get(e).pd().addPeakHighlight(null);g=this.pd().selectPeakByFileIndex(a,b,c);if(null!=g)this.setNode(JSV.common.PanelNode.findNode(this.selectedPanel,this.panelNodes));else for(e=this.panelNodes.size();0<=--e;){var f=this.panelNodes.get(e);if(null!=(g=f.pd().selectPeakByFileIndex(a,b,c))){this.setNode(f);break}}return g},"~S,~S,~S");c(b,"processPeakPickEvent",function(a){if(C(a,"JSV.common.PeakInfo")){var b=
this.pd().findMatchingPeakInfo(a);if(null==b){if(!"ALL".equals(a.getTitle()))return;for(var c=null,g=0;g<this.panelNodes.size();g++)if(null!=(b=this.panelNodes.get(g).pd().findMatchingPeakInfo(a))){c=this.panelNodes.get(g);break}if(null==c)return;this.setNode(c)}a=b}else this.si.siSetSelectedPanel(a.getSource()),a=a.getPeakInfo();this.pd().addPeakHighlight(a);this.syncToJmol(a);a.isClearAll()?this.repaint(!1):this.pd().selectSpectrum(a.getFilePath(),a.getType(),a.getModel(),!0);this.si.siCheckCallbacks(a.getTitle())},
"~O,~B");c(b,"newStructToJmol",function(a){JU.Logger.info("sending new structure to Jmol:\n"+a);this.si.syncToJmol("struct:"+a)},"~S");c(b,"syncToJmol",function(a){this.repaint(!0);this.returnFromJmolModel=a.getModel();this.si.syncToJmol(this.jmolSelect(a))},"JSV.common.PeakInfo");c(b,"sendPanelChange",function(){var a=this.pd(),b=a.getSpectrum(),c=b.getSelectedPeak();null==c&&(c=b.getModelPeakInfoForAutoSelectOnLoad());null==c&&(c=b.getBasePeakInfo());a.addPeakHighlight(c);JU.Logger.info(Thread.currentThread()+
"JSViewer sendFrameChange "+this.selectedPanel);this.syncToJmol(c)});c(b,"jmolSelect",function(a){var b="IR".equals(a.getType())||"RAMAN".equals(a.getType())?"vibration ON; selectionHalos OFF;":"vibration OFF; selectionhalos "+(null==a.getAtoms()?"OFF":"ON");return"Select: "+a+' script="'+b+' " sourceID="'+this.pd().getSpectrum().sourceID+'"'},"JSV.common.PeakInfo");c(b,"getPropertyAsJavaObject",function(a){var b=new java.util.Hashtable;if("SOURCEID".equalsIgnoreCase(a))return b.put(a,null==this.pd()?
"":this.pd().getSpectrum().sourceID),b;if(null!=a&&a.startsWith("DATA_"))return b.put(a,""+JSV.common.JSVFileManager.cacheGet(a.substring(5))),b;var c=!1;if(null!=a&&a.toUpperCase().startsWith("ALL ")||"all".equalsIgnoreCase(a))a=a.substring(3).trim(),c=!0;"".equals(a)&&(a=null);if("NAMES".equalsIgnoreCase(a)||"KEYS".equalsIgnoreCase(a))a="";var g=this.pd().getInfo(!0,a);if(!c&&null!=g)return g;null!=g&&b.put("current",g);c=new JU.Lst;for(g=0;g<this.panelNodes.size();g++)null!=this.panelNodes.get(g).jsvp&&
c.addLast(this.panelNodes.get(g).getInfo(a));b.put("items",c);return b},"~S");c(b,"getCoordinate",function(){if(!this.isClosed()){var a=this.pd().getClickedCoordinate();if(null!=a)return a.getXVal()+" "+a.getYVal()}return""});c(b,"fillSpecList",function(a,b,c){var g,e=null,f=a.equalsIgnoreCase("NONE");if(f||a.equalsIgnoreCase("all"))a="*";if(0>a.indexOf("*")){g=a.$plit(" ");a=new JU.SB;for(var j=0;j<g.length;j++){var k=g[j].indexOf(".");k!=g[j].lastIndexOf(".")&&(g[j]=g[j].substring(0,k+1)+g[j].substring(k+
1).$replace(".","_"));a.append(g[j]).append(" ")}a=a.toString().trim()}if(a.equals("*"))g=JSV.common.ScriptToken.getTokens(JSV.common.PanelNode.getSpectrumListAsString(this.panelNodes));else if(a.startsWith('"')||a.startsWith("'"))g=JSV.common.ScriptToken.getTokens(a);else if(a=JU.PT.rep(a,"_"," _ "),a=JU.PT.rep(a,"-"," - "),g=JSV.common.ScriptToken.getTokens(a),e=JSV.common.ScriptToken.getTokens(JSV.common.PanelNode.getSpectrumListAsString(this.panelNodes)),0==e.size())return null;var l=this.isClosed()?
"1.":JSV.common.PanelNode.findNode(this.selectedPanel,this.panelNodes).id,l=l.substring(0,l.indexOf(".")+1);a=new JU.SB;for(var n=g.size(),m=null,j=0;j<n;j++){var p=g.get(j),k=NaN,q=-1;j+1<n&&g.get(j+1).equals("*")?(j+=2,k=Double.parseDouble(g.get(j))):j+1<n&&g.get(j+1).equals("_")&&(j+=2,q=Integer.parseInt(g.get(j)));if(p.equals("-")){null==m&&(m=e.get(0));p=j+1==n?e.get(e.size()-1):g.get(++j);p.contains(".")||(p=l+p);for(k=0;k<e.size()&&!e.get(k).equals(m);)k++;for(k++;k<e.size()&&!m.equals(p);){var u=
JSV.common.PanelNode.findNodeById(m=e.get(k++),this.panelNodes);b.addLast(u.pd().getSpectrumAt(0));a.append(",").append(m)}}else if(p.startsWith("'")&&p.endsWith("'")&&(p='"'+JU.PT.trim(p,"'")+'"'),p.startsWith('"'))for(var p=JU.PT.trim(p,'"'),q=this.panelNodes.size(),v=0;v<q;v++){if(u=this.panelNodes.get(v),null!=u.fileName&&u.fileName.startsWith(p)||null!=u.frameTitle&&u.frameTitle.startsWith(p))this.addSpecToList(u.pd(),k,-1,b,c),a.append(",").append(u.id)}else p.contains(".")||(p=l+p),u=JSV.common.PanelNode.findNodeById(p,
this.panelNodes),null!=u&&(m=p,this.addSpecToList(u.pd(),k,q,b,c),a.append(",").append(p),0<q&&a.append(".").appendI(q))}c&&0<b.size()&&(u=JSV.common.PanelNode.findNodeById(a.substring(1),this.panelNodes),null!=u&&(this.setNode(u),b.clear()));return f?"NONE":0<a.length()?a.toString().substring(1):null},"~S,JU.Lst,~B");c(b,"addSpecToList",function(a,b,c,g,e){e?(a.getSpectrumAt(0).setUserYFactor(Double.isNaN(b)?1:b),a.addToList(c-1,g)):a.selectFromEntireSet(c-1)},"JSV.common.PanelData,~N,~N,JU.Lst,~B");
c(b,"getSolutionColor",function(a){var b=this.pd().getSpectrum(),c=b.canShowSolutionColor()?JSV.common.JSViewer.getInterface("JSV.common.Visible"):null;return null==c?-1:c.getColour(b,a)},"~B");c(b,"openDataOrFile",function(a,b,c,g,e,f,j,k){if("NONE".equals(b))return this.close("View*"),0;this.si.writeStatus("");var l=null,n=null,m=null,p=!1;null!=g&&g.startsWith("cache://")&&(a=Jmol.Cache.get(b=g));var q=null;if(null!=a)try{m=b,n=l=JSV.common.JSVFileManager.getFullPathName(b)}catch(u){if(!D(u,"JSV.exception.JSVException"))throw u;
}else if(null!=c)p=!0,n=m=l="View"+ ++this.nViews;else if(null!=g)try{q=this.apiPlatform.newFile(g),this.recentURL=l=(new java.net.URL(JSV.common.JSVFileManager.appletDocumentBase,g,null)).toString(),m=JSV.common.JSVFileManager.getTagName(l)}catch(v){if(D(v,"java.net.MalformedURLException"))m=q.getName(),n=l=q.getFullPath(),this.recentURL=null;else throw v;}b=-1;if(0<=(b=JSV.common.PanelNode.isOpen(this.panelNodes,l))||0<=(b=JSV.common.PanelNode.isOpen(this.panelNodes,g)))return p?(--this.nViews,
this.setNode(this.panelNodes.get(b))):this.si.writeStatus(l+" is already open"),-1;!j&&!p&&this.close("all");this.si.setCursor(3);try{this.si.siSetCurrentSource(p?JSV.source.JDXSource.createView(c):JSV.source.JDXReader.createJDXSource(q,a,l,this.obscureTitleFromUser===Boolean.TRUE,this.loadImaginary,e,f,this.nmrMaxY))}catch(w){if(D(w,Exception))return alert(w.toString()),this.si.setCursor(0),this.isApplet&&this.selectedPanel.showMessage(w.toString(),"Error Opening File"),-3;throw w;}this.si.setCursor(0);
System.gc();null==n?(n=this.currentSource.getFilePath(),null!=n&&(m=n.substring(n.lastIndexOf("/")+1))):this.currentSource.setFilePath(n);null==k&&!p&&(k=n);null!=k&&this.currentSource.setID(k);this.si.siSetLoaded(m,n);a=this.currentSource.getJDXSpectrum(0);if(null==a)return-4;c=this.currentSource.getSpectra();JSV.common.Spectrum.process(c,this.irMode);c=this.interfaceOverlaid||a.isAutoOverlayFromJmolClick();p||c&&this.currentSource.isCompoundSource?this.combineSpectra(p?g:null):this.splitSpectra();
this.pd().setTaintedAll();p||this.si.siUpdateRecentMenus(l);return 0},"~O,~S,JU.Lst,~S,~N,~N,~B,~S");c(b,"close",function(a){var b=0,c=null==a?-2:a.indexOf(">");0<c&&(b=JU.PT.parseInt(a.substring(c+1).trim()),a=a.substring(0,c).trim());"*".equals(a)&&(a="all");var g="all"===a;if(null==a||0==b&&a.equalsIgnoreCase("all"))this.closeSource(null);else{var e=a.equalsIgnoreCase("views"),c=new JU.Lst;a=a.$replace("\\","/");var f=this.panelNodes.size(),b=f-b;if(a.endsWith("*"))for(a=a.substring(0,a.length-
1);0<=--f;)this.panelNodes.get(f).fileName.startsWith(a)&&c.addLast(this.panelNodes.get(f).source);else if(a.equalsIgnoreCase("selected"))for(a=null;0<=--f;)g=this.panelNodes.get(f).source,this.panelNodes.get(f).isSelected&&(null==a||a!==g)&&c.addLast(g),a=g;else if(g||e||a.equalsIgnoreCase("simulations"))for(a=0;0<=--f&&a<b;){if(g||(e?this.panelNodes.get(f).isView:this.panelNodes.get(f).isSimulation))c.addLast(this.panelNodes.get(f).source),a++}else g=0==a.length?this.currentSource:JSV.common.PanelNode.findSourceByNameOrId(a,
this.panelNodes),null!=g&&c.addLast(g);for(f=c.size();0<=--f;)this.closeSource(c.get(f));null==this.selectedPanel&&0<this.panelNodes.size()&&this.si.siSetSelectedPanel(JSV.common.PanelNode.getLastFileFirstNode(this.panelNodes))}},"~S");c(b,"execLoad",function(a,b){var c=JSV.common.ScriptToken.getTokens(a),g=c.get(0),e=null,f=0;g.equalsIgnoreCase("ID")&&(e=JU.PT.trimQuotes(c.get(1)),g=c.get(2),f=2);var j=g.equalsIgnoreCase("APPEND"),k=g.equalsIgnoreCase("CHECK");(j||k)&&f++;0<f&&(g=c.get(f));null==
b&&(b=this.defaultLoadScript);if(g.equals("?"))this.openFileFromDialog(j,!1,null,b);else if(g.equals("http://?"))this.openFileFromDialog(j,!0,null,null);else if(g.equals("$?")||g.equals("$H1?"))this.openFileFromDialog(j,!0,"H1",null);else if(g.equals("$C13?"))this.openFileFromDialog(j,!0,"C13",null);else{var l=g.equalsIgnoreCase("MOL")||g.equalsIgnoreCase("H1"),n=g.equalsIgnoreCase("C13");if(l||n)g="http://SIMULATION/"+(l?"H1/":"C13/")+"MOL="+JU.PT.trimQuotes(c.get(++f));!k&&!j&&(g.equals('""')&&
null!=this.currentSource&&(g=this.currentSource.getFilePath()),this.close("all"));g=JU.PT.trimQuotes(g);if(k=g.startsWith("$"))!g.startsWith("$H1")&&!g.startsWith("$C13")&&(g="$H1/"+g.substring(1)),g="http://SIMULATION/"+g.substring(1);l=f+1<c.size()?Integer.$valueOf(c.get(++f)).intValue():-1;c=f+1<c.size()?Integer.$valueOf(c.get(++f)).intValue():l;this.si.siOpenDataOrFile(null,null,null,g,l,c,j,b,e);k&&(this.close("views"),this.execView("*",!0))}},"~S,~S");c(b,"combineSpectra",function(a){for(var b=
this.currentSource,c=b.getSpectra(),g=!1,e=c.size();0<=--e;)if(c.get(e).isSimulation){g=!0;break}c=this.si.siGetNewJSVPanel2(c);c.setTitle(b.getTitle());c.getTitle().equals("")&&(c.getPanelData().setViewTitle(b.getFilePath()),c.setTitle(a));this.si.siSetPropertiesFromPreferences(c,!0);this.spectraTree.createTree(++this.fileCount,b,u(-1,[c])).getPanelNode().isView=!0;b=JSV.common.PanelNode.findNode(this.selectedPanel,this.panelNodes);b.setFrameTitle(a);b.isView=!0;this.autoShowLegend&&1==this.pd().getNumberOfGraphSets()&&
b.setLegend(this.getDialog(JSV.common.Annotation.AType.OverlayLegend,null));this.si.siSetMenuEnables(b,!1);g&&this.pd().splitStack(!0)},"~S");c(b,"closeSource",function(a){for(var b=this.spectraTree.getRootNode(),c=null==a?null:a.getFilePath(),g=new JU.Lst,b=b.children();b.hasMoreElements();){var e=b.nextElement();if(null==c||e.getPanelNode().source.matchesFilePath(c)){JU.Logger.info("Closing "+e.getPanelNode().source.getFilePath());for(var f=e.children();f.hasMoreElements();){var j=f.nextElement();
g.addLast(j);this.panelNodes.removeObj(j.getPanelNode())}g.addLast(e);if(null!=c)break}}this.spectraTree.deleteNodes(g);null==a&&(null!=this.currentSource&&this.currentSource.dispose(),this.currentSource=null,null!=this.selectedPanel&&this.selectedPanel.dispose());this.currentSource===a&&(this.si.siSetSelectedPanel(null),this.si.siSetCurrentSource(null));for(g=c=0;g<this.panelNodes.size();g++)b=JU.PT.parseFloat(this.panelNodes.get(g).id),b>=c+1&&(c=v(Math.floor(b)));this.fileCount=c;System.gc();JU.Logger.debugging&&
JU.Logger.checkMemory();this.si.siSourceClosed(a)},"JSV.source.JDXSource");c(b,"setFrameAndTreeNode",function(a){null==this.panelNodes||(0>a||a>=this.panelNodes.size())||this.setNode(this.panelNodes.get(a))},"~N");c(b,"selectFrameNode",function(a){a=JSV.common.PanelNode.findNode(a,this.panelNodes);if(null==a)return null;this.spectraTree.setPath(this.spectraTree.newTreePath(a.treeNode.getPath()));this.setOverlayLegendVisibility(null,!1);return a},"JSV.api.JSVPanel");c(b,"setSpectrum",function(a){if(0<=
a.indexOf(".")){a=JSV.common.PanelNode.findNodeById(a,this.panelNodes);if(null==a)return!1;this.setNode(a)}else{a=JU.PT.parseInt(a);if(0>=a)return this.checkOverlay(),!1;this.setFrameAndTreeNode(a-1)}return!0},"~S");c(b,"splitSpectra",function(){for(var a=this.currentSource,b=a.getSpectra(),c=Array(b.size()),g=null,e=0;e<b.size();e++)g=b.get(e),g=this.si.siGetNewJSVPanel(g),this.si.siSetPropertiesFromPreferences(g,!0),c[e]=g;this.spectraTree.createTree(++this.fileCount,a,c);this.si.siGetNewJSVPanel(null);
a=JSV.common.PanelNode.findNode(this.selectedPanel,this.panelNodes);this.si.siSetMenuEnables(a,!0)});c(b,"selectedTreeNode",function(a){null!=a&&(a.isLeaf()?this.setNode(a.getPanelNode()):System.out.println("not a leaf"),this.si.siSetCurrentSource(a.getPanelNode().source))},"JSV.api.JSVTreeNode");c(b,"dispose",function(){this.fileHelper=null;null!=this.viewDialog&&this.viewDialog.dispose();this.viewDialog=null;null!=this.overlayLegendDialog&&this.overlayLegendDialog.dispose();this.overlayLegendDialog=
null;null!=this.jsvpPopupMenu&&(this.jsvpPopupMenu.jpiDispose(),this.jsvpPopupMenu=null);if(null!=this.panelNodes)for(var a=this.panelNodes.size();0<=--a;)this.panelNodes.get(a).dispose(),this.panelNodes.removeItemAt(a)});c(b,"runScript",function(a){null==this.scriptQueue?this.si.siProcessCommand(a):this.scriptQueue.addLast(a)},"~S");c(b,"requestRepaint",function(){null!=this.selectedPanel&&this.repaintManager.refresh()});c(b,"repaintDone",function(){this.repaintManager.repaintDone()});c(b,"checkOverlay",
function(){null!=this.mainPanel&&this.markSelectedPanels(this.panelNodes,this.mainPanel.getCurrentPanelIndex());this.viewDialog=this.getDialog(JSV.common.Annotation.AType.Views,null)});c(b,"markSelectedPanels",function(a,b){for(var c=a.size();0<=--c;)a.get(c).isSelected=b==c},"JU.Lst,~N");c(b,"execOverlayOffsetY",function(a){if(-2147483648==a){if(null==this.selectedPanel)return;a=this.selectedPanel.getInput("Enter a vertical offset in percent for stacked plots","Overlay",""+this.recentStackPercent);
a=JU.PT.parseFloat(a);if(Float.isNaN(a))return;a=F(a)}this.recentStackPercent=a;this.parameters.viewOffset=a;this.isClosed()&&this.pd().setYStackOffsetPercent(a)},"~N");c(b,"execScriptInline",function(a){0<a.length&&(a=a.substring(6).trim());0==a.length&&(a=this.selectedPanel.getInput("Enter a JSpecView script","Script",this.recentScript));null!=a&&(this.recentScript=a,this.runScriptNow(a))},"~S");c(b,"setDisplay",function(a){this.apiPlatform.setViewer(this,this.display=a);var b=E(2,0);this.apiPlatform.getFullScreenDimensions(a,
b);this.setScreenDimension(b[0],b[1])},"~O");c(b,"setScreenDimension",function(a,b){b=Math.min(b,this.maximumSize);a=Math.min(a,this.maximumSize);this.screenWidth==a&&this.screenHeight==b||this.resizeImage(a,b)},"~N,~N");c(b,"resizeImage",function(a,b){0<a?(this.screenWidth=a,this.screenHeight=b):(a=0==this.screenWidth?this.screenWidth=500:this.screenWidth,b=0==this.screenHeight?this.screenHeight=500:this.screenHeight);this.g2d.setWindowParameters(a,b)},"~N,~N");c(b,"updateJS",function(){null!=this.selectedPanel&&
this.selectedPanel.paintComponent(this.apiPlatform.getGraphics(null))});c(b,"processMouseEvent",function(a,b,c,g,e){return null!=this.selectedPanel&&this.selectedPanel.processMouseEvent(a,b,c,g,e)},"~N,~N,~N,~N,~N");c(b,"processTwoPointGesture",function(a){this.isClosed()||this.selectedPanel.processTwoPointGesture(a)},"~A");c(b,"getApplet",function(){return this.html5Applet});c(b,"openFileAsyncSpecial",function(a){var b=null==this.currentSource?"NO":this.getDialogManager().getDialogInput(this,"Do you want to append this file? (Answer NO to replace.)",
"Drag/Drop Action",3,null,null,"YES");null!=b&&(b=b.toLowerCase().startsWith("y")?"append":"",this.runScript("load "+b+' "'+a+'"'+(""===b?"":"; view *")))},"~S,~N");c(b,"getHeight",function(){return this.screenHeight});c(b,"getWidth",function(){return this.screenWidth});c(b,"getPlatformInterface",function(a){return JSV.common.JSViewer.getInterface("JSV."+(JSV.common.JSViewer.isJS?"js2d.Js":"java.Awt")+a)},"~S");c(b,"getDialogManager",function(){if(null!=this.dialogManager)return this.dialogManager;
this.dialogManager=this.getPlatformInterface("DialogManager");return this.dialogManager.set(this)});c(b,"getDialog",function(a,b){switch(a){case JSV.common.Annotation.AType.Integration:return JSV.common.JSViewer.getInterface("JSV.dialog.IntegrationDialog").setParams("Integration for "+b,this,b);case JSV.common.Annotation.AType.Measurements:return JSV.common.JSViewer.getInterface("JSV.dialog.MeasurementsDialog").setParams("Measurements for "+b,this,b);case JSV.common.Annotation.AType.PeakList:return JSV.common.JSViewer.getInterface("JSV.dialog.PeakListDialog").setParams("Peak List for "+
b,this,b);case JSV.common.Annotation.AType.OverlayLegend:return this.overlayLegendDialog=JSV.common.JSViewer.getInterface("JSV.dialog.OverlayLegendDialog").setParams(this.pd().getViewTitle(),this,null);case JSV.common.Annotation.AType.Views:return this.viewDialog=JSV.common.JSViewer.getInterface("JSV.dialog.ViewsDialog").setParams("View/Combine/Close Spectra",this,null);default:return null}},"JSV.common.Annotation.AType,JSV.common.Spectrum");c(b,"show",function(a){this.getDialogManager();if(a.equals("properties"))this.dialogManager.showProperties(null,
this.pd().getSpectrum());else if(a.equals("errors"))this.dialogManager.showSourceErrors(null,this.currentSource);else if(a.equals("source"))null==this.currentSource?0<this.panelNodes.size()&&this.dialogManager.showMessageDialog(null,"Please Select a Spectrum","Select Spectrum",0):this.dialogManager.showSource(this,this.pd().getSpectrum());else if(a.startsWith("solutioncolorfill"))if(0<=a.indexOf("all"))for(var b=this.panelNodes.size();0<=--b;)this.panelNodes.get(b).pd().setSolutionColor(a);else this.pd().setSolutionColor(a);
else a.startsWith("solutioncolor")&&(a=this.getSolutionColorStr(0>a.indexOf("false")),a="background-color:rgb("+a+")'><br />Predicted Solution Colour- RGB("+a+")<br /><br />",JSV.common.JSViewer.isJS?this.dialogManager.showMessage(this,"<div style='width:100%;height:100%;"+a+"</div>","Predicted Colour"):this.selectedPanel.showMessage("<html><body style='"+a+"</body></html>","Predicted Colour"))},"~S");c(b,"getDialogPrint",function(a){if(!JSV.common.JSViewer.isJS)try{var b=this.getPlatformInterface("PrintDialog").set(this.offWindowFrame,
this.lastPrintLayout,a).getPrintLayout();null!=b&&(this.lastPrintLayout=b);return b}catch(c){if(!D(c,Exception))throw c;}return new JSV.common.PrintLayout(this.pd())},"~B");c(b,"setIRmode",function(a){this.irMode=a.equals("AtoT")?JSV.common.Spectrum.IRMode.TO_TRANS:a.equals("TtoA")?JSV.common.Spectrum.IRMode.TO_ABS:JSV.common.Spectrum.IRMode.getMode(a)},"~S");c(b,"getOptionFromDialog",function(a,b,c){return this.getDialogManager().getOptionFromDialog(null,a,this.selectedPanel,b,c)},"~A,~S,~S");c(b,
"print",function(a){return this.execWrite('PDF "'+a+'"')},"~S");c(b,"execWrite",function(a){JSV.common.JSViewer.isJS&&null==a&&(a="PDF");a=JSV.common.JSViewer.getInterface("JSV.export.Exporter").write(this,null==a?null:JSV.common.ScriptToken.getTokens(a),!1);this.si.writeStatus(a);return a},"~S");c(b,"$export",function(a,b){null==a&&(a="XY");var c=this.pd(),g=c.getNumberOfSpectraInCurrentSet();if(-1>b||b>=g)return"Maximum spectrum index (0-based) is "+(g-1)+".";c=0>b?c.getSpectrum():c.getSpectrumAt(b);
try{return JSV.common.JSViewer.getInterface("JSV.export.Exporter").exportTheSpectrum(this,JSV.common.ExportType.getType(a),null,c,0,c.getXYCoords().length-1,null,a.equalsIgnoreCase("PDF"))}catch(e){if(D(e,Exception))return JU.Logger.error(e.toString()),null;throw e;}},"~S,~N");g(b,"postByteArray",function(a,b){return JSV.common.JSVFileManager.postByteArray(a,b)},"~S,~A");c(b,"getOutputChannel",function(a,b){for(;a.startsWith("/");)a=a.substring(1);return(new JU.OC).setParams(this,a,!b,null)},"~S,~B");
b.getInterface=c(b,"getInterface",function(a){try{var b=ra._4Name(a);return null==b?null:b.newInstance()}catch(c){if(D(c,Exception))return JU.Logger.error("Interface.java Error creating instance for "+a+": \n"+c),null;throw c;}},"~S");c(b,"showMessage",function(a){null!=this.selectedPanel&&null!=a&&this.selectedPanel.showMessage(a,null)},"~S");c(b,"openFileFromDialog",function(a,b,c,g){var e=null;if(null!=c){e=this.fileHelper.getUrlFromDialog("Enter the name or identifier of a compound",this.recentSimulation);
if(null==e)return;this.recentSimulation=e;e="$"+c+"/"+e}else if(b){e=this.fileHelper.getUrlFromDialog("Enter the URL of a JCAMP-DX File",null==this.recentURL?this.recentOpenURL:this.recentURL);if(null==e)return;this.recentOpenURL=e}else b=u(-1,[Boolean.$valueOf(a),g]),b=this.fileHelper.showFileOpenDialog(this.mainPanel,b),null!=b&&(e=b.getFullPath());null!=e&&this.runScriptNow("load "+(a?"APPEND ":"")+'"'+e+'"'+(null==g?"":";"+g))},"~B,~B,~S,~S");c(b,"openFile",function(a,b){if(b&&null!=this.panelNodes){var c=
JSV.common.PanelNode.findSourceByNameOrId((new java.io.File(a)).getAbsolutePath(),this.panelNodes);null!=c&&this.closeSource(c)}this.si.siOpenDataOrFile(null,null,null,a,-1,-1,!0,this.defaultLoadScript,null)},"~S,~B");c(b,"selectPanel",function(a,b){var c=-1;if(null!=b){for(var g=b.size();0<=--g;){var e=b.get(g).jsvp;e===a?c=g:(e.setEnabled(!1),e.setFocusable(!1),e.getPanelData().closeAllDialogsExcept(JSV.common.Annotation.AType.NONE))}this.markSelectedPanels(b,c)}return c},"JSV.api.JSVPanel,JU.Lst");
c(b,"checkAutoIntegrate",function(){this.autoIntegrate&&this.pd().integrateAll(this.parameters)});c(b,"parseInitScript",function(a){null==a&&(a="");a=new JSV.common.ScriptTokenizer(a,!0);for(JU.Logger.debugging&&JU.Logger.info("Running in DEBUG mode");a.hasMoreTokens();){var b=a.nextToken(),c=new JSV.common.ScriptTokenizer(b,!1),g=c.nextToken();g.equalsIgnoreCase("SET")&&(g=c.nextToken());var g=g.toUpperCase(),e=JSV.common.ScriptToken.getScriptToken(g),b=JSV.common.ScriptToken.getValue(e,c,b);JU.Logger.info("KEY-> "+
g+" VALUE-> "+b+" : "+e);try{switch(e){default:this.parameters.set(null,e,b);break;case JSV.common.ScriptToken.UNKNOWN:break;case JSV.common.ScriptToken.APPLETID:this.fullName=this.appletName+"__"+(this.appletName=b)+"__";g=null;self.Jmol&&(g=Jmol._applets[b]);this.html5Applet=g;break;case JSV.common.ScriptToken.AUTOINTEGRATE:this.autoIntegrate=JSV.common.Parameters.isTrue(b);break;case JSV.common.ScriptToken.COMPOUNDMENUON:break;case JSV.common.ScriptToken.APPLETREADYCALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.COORDCALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.LOADFILECALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.PEAKCALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.SYNCCALLBACKFUNCTIONNAME:this.si.siExecSetCallback(e,
b);break;case JSV.common.ScriptToken.ENDINDEX:this.initialEndIndex=Integer.parseInt(b);break;case JSV.common.ScriptToken.INTERFACE:this.checkOvelayInterface(b);break;case JSV.common.ScriptToken.IRMODE:this.setIRmode(b);break;case JSV.common.ScriptToken.MENUON:this.allowMenu=Boolean.parseBoolean(b);break;case JSV.common.ScriptToken.OBSCURE:null==this.obscureTitleFromUser&&(this.obscureTitleFromUser=Boolean.$valueOf(b));break;case JSV.common.ScriptToken.STARTINDEX:this.initialStartIndex=Integer.parseInt(b);
break;case JSV.common.ScriptToken.SYNCID:this.fullName=this.appletName+"__"+(this.syncID=b)+"__"}}catch(f){if(!D(f,Exception))throw f;}}},"~S");c(b,"getSolutionColorStr",function(a){a=JU.CU.colorPtFromInt(this.getSolutionColor(a),null);return F(a.x)+","+F(a.y)+","+F(a.z)},"~B");c(b,"checkCommandLineForTip",function(a,b,c){var g="\u0001"==a;if(!g&&"\x00"!=a){if("\t"!=a&&("\n"==a||32>a.charCodeAt(0)||126<a.charCodeAt(0)))return null;b+=Character.isISOControl(a)?"":""+a}var e;0<=b.indexOf(";")&&(b=b.substring(b.lastIndexOf(";")+
1));for(var f=null;b.startsWith(" ");)b=b.substring(1);if(0==b.length&&!g)e="";else{e=JSV.common.ScriptToken.getTokens(b);if(0==e.size()&&!g)return"";b=b.endsWith(" ")||1<e.size()&&c;e=JSV.common.ScriptToken.getScriptTokenList(0==e.size()?null:e.get(0),b);switch(e.size()){case 0:e="?";break;case 1:g=e.get(0);e=g.getTip();try{e=0<=e.indexOf("TRUE")?" ("+this.parameters.getBoolean(g)+")":0<=g.name().indexOf("COLOR")?" ("+JU.CU.toRGBHexString(this.parameters.getElementColor(g))+")":""}catch(j){if(D(j,
Exception))return null;throw j;}if("\t"==a||b||!c){e=g.name()+" "+g.getTip()+e+" "+g.getDescription();"\t"==a&&(f=g.name()+" ");break}e=g.name()+" "+e;break;default:e=JSV.common.ScriptToken.getNameList(e)}}c?this.si.writeStatus(e):f=e;return f},"~S,~S,~B");c(b,"checkScript",function(a){return this.checkCommandLineForTip("\x00",a,!1)},"~S");c(b,"execHelp",function(a){var b=this.checkCommandLineForTip("\u0001",a,!1);if(0>b.indexOf(" ")&&0<b.indexOf(",")){var c=JU.PT.split(b,",");java.util.Arrays.sort(c);
for(var b="",g=0;g<c.length;g++)var e=JSV.common.ScriptToken.getScriptToken(c[g]),b=b+(c[g]+" "+e.getTip()+"\n  "+e.getDescription()+"\n\n");this.getDialogManager().showMessage(null,b,"HELP "+a)}else this.selectedPanel.showMessage(b,"Help "+a);System.out.println(b)},"~S");b.testScript='<PeakData  index="1" title="" model="~1.1" type="1HNMR" xMin="3.2915" xMax="3.2965" atoms="15,16,17,18,19,20" multiplicity="" integral="1"> src="JPECVIEW" file="http://SIMULATION/$caffeine"';b.isJS=!1;b.isSwingJS=!1;
b.jmolObject=null});n("JSV.common");z(["JSV.common.Annotation","$.Coordinate"],"JSV.common.Measurement",null,function(){var b=w(function(){this.pt2=null;this.value=0;q(this,arguments)},JSV.common,"Measurement",JSV.common.Annotation);N(b,function(){this.pt2=new JSV.common.Coordinate});c(b,"setM1",function(a,b,c){this.setA(a,b,c,"",!1,!1,0,6);this.setPt2(this.getXVal(),this.getYVal());return this},"~N,~N,JSV.common.Spectrum");c(b,"copyM",function(){var a=new JSV.common.Measurement;a.setA(this.getXVal(),
this.getYVal(),this.spec,this.text,!1,!1,this.offsetX,this.offsetY);a.setPt2(this.pt2.getXVal(),this.pt2.getYVal());return a});c(b,"setPt2",function(a,b){this.spec=a;b&&this.setPt2(this.getXVal(),this.getYVal());return this},"JSV.common.Spectrum,~B");c(b,"setPt2",function(a,b){this.pt2.setXVal(a);this.pt2.setYVal(b);this.value=Math.abs(a-this.getXVal());this.text=this.spec.setMeasurementText(this)},"~N,~N");c(b,"getSpectrum",function(){return this.spec});c(b,"setValue",function(a){this.value=a;this.text=
this.spec.setMeasurementText(this)},"~N");c(b,"getValue",function(){return this.value});c(b,"getXVal2",function(){return this.pt2.getXVal()});c(b,"getYVal2",function(){return this.pt2.getYVal()});g(b,"addSpecShift",function(a){this.setXVal(this.getXVal()+a);this.pt2.setXVal(this.pt2.getXVal()+a)},"~N");c(b,"setYVal2",function(a){this.pt2.setYVal(a)},"~N");c(b,"overlaps",function(a,b){return Math.min(this.getXVal(),this.getXVal2())<Math.max(a,b)&&Math.max(this.getXVal(),this.getXVal2())>Math.min(a,
b)},"~N,~N");g(b,"toString",function(){return"["+this.getXVal()+","+this.pt2.getXVal()+"]"})});n("JSV.common");z(["JU.Lst","JSV.api.AnnotationData"],"JSV.common.MeasurementData",["JU.AU","$.DF","JSV.common.Annotation","$.Parameters"],function(){var b=w(function(){this.units=this.spec=this.type=null;this.precision=0;this.myParams=null;this.isON=!0;this.key=null;q(this,arguments)},JSV.common,"MeasurementData",JU.Lst,JSV.api.AnnotationData);x(b,function(a,b){I(this,JSV.common.MeasurementData,[]);this.type=
a;this.spec=b;this.myParams=(new JSV.common.Parameters).setName("MeasurementData")},"JSV.common.Annotation.AType,JSV.common.Spectrum");c(b,"getMeasurements",function(){return this});g(b,"getAType",function(){return this.type});g(b,"getState",function(){return this.isON});g(b,"setState",function(a){this.isON=a},"~B");c(b,"setMeasurements",function(){},"JU.Lst");g(b,"getParameters",function(){return this.myParams});c(b,"getDataHeader",function(){return JSV.common.MeasurementData.HEADER});c(b,"getMeasurementListArray",
function(a){this.units=a;var b=this.getMeasurementListArrayReal(a),c=this.spec.isNMR()?4:2;a=this.spec.isHNMR()&&a.equals("ppm")?4:2;for(var g=Array(this.size()),e=this.size();0<=--e;)g[e]=u(-1,[""+(e+1),JU.DF.formatDecimalDbl(b[e][0],c),JU.DF.formatDecimalDbl(b[e][1],c),JU.DF.formatDecimalDbl(b[e][2],a)]);return g},"~S");c(b,"getMeasurementListArrayReal",function(a){a=this.spec.isNMR()&&a.equalsIgnoreCase("HZ");for(var b=JU.AU.newDouble2(this.size()),c=0,g=this.size();0<=--g;){var e=this.get(g).getValue();
a&&(e*=this.spec.getObservedFreq());b[c++]=R(-1,[this.get(g).getXVal(),this.get(g).getXVal2(),e])}return b},"~S");b.checkParameters=c(b,"checkParameters",function(a,b){if(0==a.size())return!1;var c=a.getParameters();switch(a.getAType()){case JSV.common.Annotation.AType.PeakList:return b.peakListInterpolation.equals(c.peakListInterpolation)&&b.peakListThreshold==c.peakListThreshold}return!1},"JSV.common.MeasurementData,JSV.common.ColorParameters");g(b,"getSpectrum",function(){return this.spec});g(b,
"getData",function(){return this});c(b,"clear",function(a,b){for(var c=this.size();0<=--c;){var g=this.get(c);(0==g.text.length||g.overlaps(a,b))&&this.removeItemAt(c)}},"~N,~N");c(b,"find",function(a){for(var b=this.size();0<=--b;)if(this.get(b).overlaps(a,a))return b;return-1},"~N");g(b,"setSpecShift",function(a){for(var b=this.size();0<=--b;){var c=this.get(b),g=c.getXVal()+a;c.setXVal(g);c.setValue(g);c.text=JU.DF.formatDecimalDbl(g,this.precision)}},"~N");g(b,"getGraphSetKey",function(){return this.key});
g(b,"setGraphSetKey",function(a){this.key=a},"~S");g(b,"isVisible",function(){return!0});c(b,"getInfo",function(a){a.put("header",this.getDataHeader());a.put("table",this.getMeasurementListArrayReal("ppm"));null!=this.units&&a.put("units",this.units)},"java.util.Map");g(b,"isDialog",function(){return!1});b.HEADER=u(-1,["","start","end","value"])});n("JSV.common");z(["java.lang.Enum","J.api.EventManager","java.util.Hashtable","JU.Lst"],"JSV.common.PanelData","JU.CU JSV.common.Annotation $.Coordinate $.GraphSet $.JSVFileManager $.JSVersion $.JSViewer $.MeasurementData $.Parameters $.PeakPickEvent $.ScriptToken $.Spectrum $.SubSpecChangeEvent $.ZoomEvent JU.Font $.Logger".split(" "),
function(){var b=w(function(){this.graphSets=this.jsvp=this.options=this.currentGraphSet=this.listeners=this.vwr=this.g2d0=this.g2d=null;this.currentSplitPoint=0;this.coordsClicked=this.coordClicked=this.thisWidget=null;this.isIntegralDrag=this.drawXAxisLeftToRight=this.shiftPressed=this.ctrlPressed=!1;this.xAxisLeftToRight=!0;this.scalingFactor=1;this.integralShiftMode=0;this.left=60;this.right=50;this.coordStr="";this.startupPinTip="Click to set.";this.title=null;this.endIndex=this.startIndex=this.thisHeight=
this.thisWidth=this.nSpectra=this.clickCount=0;this.titleFontName=this.displayFontName=this.viewTitle=this.commonFilePath=null;this.isPrinting=!1;this.doReset=!0;this.printingFontName=null;this.printGraphPosition="default";this.isLinked=this.display1D=this.titleDrawn=!1;this.spectra=this.printJobTitle=null;this.taintedAll=!0;this.testingJavaScript=!1;this.mouseState=this.currentFont=null;this.peakTabsOn=this.titleOn=this.gridOn=!1;this.mouseY=this.mouseX=0;this.linking=!1;this.xPixelClicked=0;this.gMain=
this.optionsSaved=this.bgcolor=this.BLACK=this.zoomBoxColor2=this.zoomBoxColor=this.highlightColor=this.unitsColor=this.titleColor=this.scaleColor=this.plotAreaColor=this.peakTabColor=this.integralPlotColor=this.gridColor=this.coordinatesColor=null;q(this,arguments)},JSV.common,"PanelData",null,J.api.EventManager);N(b,function(){this.listeners=new JU.Lst;this.options=new java.util.Hashtable});x(b,function(a,b){this.vwr=b;this.jsvp=a;this.g2d=this.g2d0=b.g2d;this.BLACK=this.g2d.getColor1(0);this.highlightColor=
this.g2d.getColor4(255,0,0,200);this.zoomBoxColor=this.g2d.getColor4(150,150,100,130);this.zoomBoxColor2=this.g2d.getColor4(150,100,100,130)},"JSV.api.JSVPanel,JSV.common.JSViewer");c(b,"addListener",function(a){this.listeners.contains(a)||this.listeners.addLast(a)},"JSV.api.PanelListener");c(b,"getCurrentGraphSet",function(){return this.currentGraphSet});c(b,"dispose",function(){this.jsvp=null;for(var a=0;a<this.graphSets.size();a++)this.graphSets.get(a).dispose();this.listeners=this.options=this.thisWidget=
this.coordsClicked=this.coordClicked=this.currentGraphSet=this.currentFont=this.graphSets=null});c(b,"setViewTitle",function(a){this.viewTitle=a},"~S");c(b,"getViewTitle",function(){return null==this.viewTitle?this.getTitle():this.viewTitle});c(b,"getInfo",function(a,b){var c=new java.util.Hashtable,g=null;if(a)return this.currentGraphSet.getInfo(b,this.getCurrentSpectrumIndex());var e=this.options.entrySet();if("".equals(b)){for(var g="type title nSets ",f,e=e.iterator();e.hasNext()&&((f=e.next())||
1);)g+=f.getKey().name()+" ";c.put("KEYS",g)}else{for(e=e.iterator();e.hasNext()&&((f=e.next())||1);)JSV.common.Parameters.putInfo(b,c,f.getKey().name(),f.getValue());JSV.common.Parameters.putInfo(b,c,"type",this.getSpectrumAt(0).getDataType());JSV.common.Parameters.putInfo(b,c,"title",this.title);JSV.common.Parameters.putInfo(b,c,"nSets",Integer.$valueOf(this.graphSets.size()))}g=new JU.Lst;for(f=this.graphSets.size();0<=--f;)g.addLast(this.graphSets.get(f).getInfo(b,-1));c.put("sets",g);return c},
"~B,~S");c(b,"setBooleans",function(a,b){if(null==b)for(var c,g=a.getBooleans().entrySet().iterator();g.hasNext()&&((c=g.next())||1);)this.setBooleans(a,c.getKey());else this.setBoolean(b,a.getBoolean(b))},"JSV.common.Parameters,JSV.common.ScriptToken");c(b,"setBoolean",function(a,b){this.setTaintedAll();if(a===JSV.common.ScriptToken.REVERSEPLOT)this.currentGraphSet.setReversePlot(b);else switch(this.options.put(a,Boolean.$valueOf(b)),a){case JSV.common.ScriptToken.DISPLAY1D:case JSV.common.ScriptToken.DISPLAY2D:this.doReset=
!0}},"JSV.common.ScriptToken,~B");c(b,"getBoolean",function(a){if(a===JSV.common.ScriptToken.REVERSEPLOT)return this.currentGraphSet.reversePlot;if(null==this.options)return!1;a=this.options.get(a);return null!=a&&C(a,Boolean)&&a===Boolean.TRUE},"JSV.common.ScriptToken");c(b,"setFontName",function(a,b){switch(a){case JSV.common.ScriptToken.DISPLAYFONTNAME:this.displayFontName=b;break;case JSV.common.ScriptToken.TITLEFONTNAME:this.titleFontName=b}null!=b&&this.options.put(a,b)},"JSV.common.ScriptToken,~S");
c(b,"getDisplay1D",function(){return this.display1D});c(b,"setTaintedAll",function(){this.taintedAll=!0});c(b,"initOne",function(a){this.spectra=new JU.Lst;this.spectra.addLast(a);this.initMany(this.spectra,0,0)},"JSV.common.Spectrum");c(b,"initMany",function(a,b,c){this.startIndex=b;this.endIndex=c;this.nSpectra=a.size();this.spectra=a;this.commonFilePath=a.get(0).getFilePath();for(b=0;b<this.nSpectra;b++)if(!this.commonFilePath.equalsIgnoreCase(a.get(b).getFilePath())){this.commonFilePath=null;
break}this.setGraphSets(JSV.common.PanelData.LinkMode.NONE)},"JU.Lst,~N,~N");c(b,"setGraphSets",function(a){this.graphSets=JSV.common.GraphSet.createGraphSetsAndSetLinkMode(this,this.jsvp,this.spectra,this.startIndex,this.endIndex,a);this.currentGraphSet=this.graphSets.get(0);this.title=this.getSpectrum().getTitleLabel()},"JSV.common.PanelData.LinkMode");c(b,"findMatchingPeakInfo",function(a){for(var b=null,c=0;c<this.graphSets.size()&&null==(b=this.graphSets.get(c).findMatchingPeakInfo(a));c++);
return b},"JSV.common.PeakInfo");c(b,"integrateAll",function(a){for(var b=this.graphSets.size();0<=--b;)this.graphSets.get(b).integrate(-1,a)},"JSV.common.ColorParameters");c(b,"getNumberOfGraphSets",function(){return this.graphSets.size()});c(b,"getTitle",function(){return this.title});c(b,"refresh",function(){this.doReset=!0});c(b,"addAnnotation",function(a){a=this.currentGraphSet.addAnnotation(a,this.getTitle());null!=a&&(this.title=a)},"JU.Lst");c(b,"addPeakHighlight",function(a){for(var b=0;b<
this.graphSets.size();b++)this.graphSets.get(b).addPeakHighlight(a)},"JSV.common.PeakInfo");c(b,"selectPeakByFileIndex",function(a,b,c){var g=this.currentGraphSet.selectPeakByFileIndex(a,b,c);if(null==g)for(var e=this.graphSets.size();0<=--e&&!(this.graphSets.get(e)!==this.currentGraphSet&&null!=(g=this.graphSets.get(e).selectPeakByFileIndex(a,b,c))););return g},"~S,~S,~S");c(b,"setPlotColors",function(a){for(var b=this.graphSets.size();0<=--b;)this.graphSets.get(b).setPlotColors(a)},"~A");c(b,"selectSpectrum",
function(a,b,c,g){g&&this.currentGraphSet.selectSpectrum(a,b,c);if("ID".equals(b))this.jumpToSpectrumIndex(this.getCurrentSpectrumIndex(),!0);else for(g=0;g<this.graphSets.size();g++)this.graphSets.get(g)!==this.currentGraphSet&&this.graphSets.get(g).selectSpectrum(a,b,c)},"~S,~S,~S,~B");c(b,"hasFileLoaded",function(a){for(var b=this.graphSets.size();0<=--b;)if(this.graphSets.get(b).hasFileLoaded(a))return!0;return!1},"~S");c(b,"clearAllView",function(){for(var a=this.graphSets.size();0<=--a;)this.graphSets.get(a).resetViewCompletely()});
c(b,"drawGraph",function(a,b,c,g,e,f){var j;this.gMain=a;this.display1D=!this.isLinked&&this.getBoolean(JSV.common.ScriptToken.DISPLAY1D);var k=40,l=50,n=this.isPrinting||this.doReset||this.thisWidth!=g||this.thisHeight!=e;n&&this.setTaintedAll();this.taintedAll&&this.g2d.fillBackground(c,this.bgcolor);b!==a&&(this.g2d.fillBackground(b,null),a!==c&&this.g2d.fillBackground(a,null),this.g2d.setStrokeBold(a,!1));this.isPrinting?(k*=3,l*=3,this.scalingFactor=10,j=!1):(this.scalingFactor=1,j=this.getBoolean(JSV.common.ScriptToken.COORDINATESON),
this.titleOn=this.getBoolean(JSV.common.ScriptToken.TITLEON),this.gridOn=this.getBoolean(JSV.common.ScriptToken.GRIDON),this.peakTabsOn=this.getBoolean(JSV.common.ScriptToken.PEAKTABSON));var m=this.getBoolean(JSV.common.ScriptToken.POINTSONLY);this.titleDrawn=this.doReset=!1;this.thisWidth=g;this.thisHeight=e;for(var p=this.graphSets.size();0<=--p;)this.graphSets.get(p).drawGraphSet(a,b,c,g,e,this.left,this.right,k,l,n,this.taintedAll,m);this.titleOn&&(!this.titleDrawn&&this.taintedAll)&&this.drawTitle(a,
e*this.scalingFactor,g*this.scalingFactor,this.getDrawTitle(this.isPrinting));j&&null!=this.coordStr&&this.drawCoordinates(b,k,this.thisWidth-this.right,k-20);f&&this.taintedAll&&this.printFilePath(a,this.left,e,null!=this.commonFilePath?this.commonFilePath:1==this.graphSets.size()&&null!=this.currentGraphSet.getTitle(!0)?this.getSpectrum().getFilePath():null);this.isPrinting&&this.printVersion(a,e);!this.testingJavaScript&&(this.isPrinting||a===b)?this.setTaintedAll():this.taintedAll=!1},"~O,~O,~O,~N,~N,~B");
c(b,"drawCoordinates",function(a,b,c,g){this.g2d.setGraphicsColor(a,this.coordinatesColor);b=this.setFont(a,this.jsvp.getWidth(),1,14,!0);this.g2d.drawString(a,this.coordStr,c-b.stringWidth(this.coordStr),g)},"~O,~N,~N,~N");c(b,"setFont",function(a,b,c,g,e){return this.g2d.setFont(a,this.getFont(a,b,c,g,e))},"~O,~N,~N,~N,~B");c(b,"printFilePath",function(a,b,c,g){if(null!=g){b*=this.scalingFactor;c*=this.scalingFactor;0<g.indexOf("?")&&(g=g.substring(g.indexOf("?")+1));g=g.substring(g.lastIndexOf("/")+
1);g=g.substring(g.lastIndexOf("\\")+1);this.g2d.setGraphicsColor(a,this.BLACK);var e=this.setFont(a,1E3,0,9,!0);b!=this.left*this.scalingFactor&&(b-=e.stringWidth(g));this.g2d.drawString(a,g,b,c-e.getHeight())}},"~O,~N,~N,~S");c(b,"printVersion",function(a,b){this.g2d.setGraphicsColor(a,this.BLACK);var c=this.setFont(a,100,0,12,!0),g=this.jsvp.getApiPlatform().getDateFormat(null)+" JSpecView "+JSV.common.JSVersion.VERSION_SHORT,e=c.stringWidth(g);this.g2d.drawString(a,g,(this.thisWidth-this.right)*
this.scalingFactor-e,b*this.scalingFactor-3*c.getHeight())},"~O,~N");c(b,"drawTitle",function(a,b,c,g){g=g.$replace("\n"," ");var e=this.getFont(a,c,this.isPrinting||this.getBoolean(JSV.common.ScriptToken.TITLEBOLDON)?1:0,14,!0),f=e.stringWidth(g);f>c&&(e=v(14*c/f),10>e&&(e=10),e=this.getFont(a,c,this.isPrinting||this.getBoolean(JSV.common.ScriptToken.TITLEBOLDON)?1:0,e,!0));this.g2d.setGraphicsColor(a,this.titleColor);this.setCurrentFont(this.g2d.setFont(a,e));this.g2d.drawString(a,g,this.isPrinting?
this.left*this.scalingFactor:5,b-v(e.getHeight()*(this.isPrinting?2:0.5)))},"~O,~N,~N,~S");c(b,"setCurrentFont",function(a){this.currentFont=a},"JU.Font");c(b,"getFontHeight",function(){return this.currentFont.getAscent()});c(b,"getStringWidth",function(a){return this.currentFont.stringWidth(a)},"~S");c(b,"selectFromEntireSet",function(a){for(var b=0,c=0;b<this.graphSets.size();b++)if(-2147483648==a)this.graphSets.get(b).setSelected(-1);else for(var g=this.graphSets.get(b).spectra,e=0;e<g.size();e++,
c++)(0>a||a==c)&&this.graphSets.get(b).setSelected(e)},"~N");c(b,"addToList",function(a,b){for(var c=0;c<this.spectra.size();c++)(0>a||c==a)&&b.addLast(this.spectra.get(c))},"~N,JU.Lst");c(b,"scaleSelectedBy",function(a){for(var b=this.graphSets.size();0<=--b;)this.graphSets.get(b).scaleSelectedBy(a)},"~N");c(b,"setCurrentGraphSet",function(a,b){var c=1<a.nSplit?a.getSplitPoint(b):a.getCurrentSpectrumIndex(),g=this.currentGraphSet!==a,e=g||this.currentSplitPoint!=c;this.currentGraphSet=a;this.currentSplitPoint=
c;(g||1<a.nSplit&&e)&&this.setSpectrum(c,!0);if(!g){g=a.checkSpectrumClickedEvent(this.mouseX,this.mouseY,this.clickCount);if(!g)return!1;this.currentSplitPoint=c=a.getCurrentSpectrumIndex();this.setSpectrum(c,!0)}this.jumpToSpectrumIndex(c,g||1<a.nSplit&&e);return g},"JSV.common.GraphSet,~N");c(b,"jumpToSpectrum",function(a){a=this.currentGraphSet.getSpectrumIndex(a);this.jumpToSpectrumIndex(a,!0)},"JSV.common.Spectrum");c(b,"jumpToSpectrumIndex",function(a,b){if(!(0>a||a>=this.currentGraphSet.nSpectra)){this.currentSplitPoint=
a;b&&this.setSpectrum(this.currentSplitPoint,1<this.currentGraphSet.nSplit);var c=this.getSpectrum();this.notifySubSpectrumChange(c.getSubIndex(),c)}},"~N,~B");c(b,"splitStack",function(a){this.currentGraphSet.splitStack(a)},"~B");c(b,"getNumberOfSpectraInCurrentSet",function(){return this.currentGraphSet.nSpectra});c(b,"getSourceID",function(){var a=this.getSpectrum().sourceID;return null==a?this.getSpectrumAt(0).sourceID:a});c(b,"getStartingPointIndex",function(a){return this.currentGraphSet.viewData.getStartingPointIndex(a)},
"~N");c(b,"getEndingPointIndex",function(a){return this.currentGraphSet.viewData.getEndingPointIndex(a)},"~N");c(b,"haveSelectedSpectrum",function(){return this.currentGraphSet.haveSelectedSpectrum()});c(b,"getShowAnnotation",function(a){return this.currentGraphSet.getShowAnnotation(a,-1)},"JSV.common.Annotation.AType");c(b,"showAnnotation",function(a,b){this.currentGraphSet.setShowAnnotation(a,b)},"JSV.common.Annotation.AType,Boolean");c(b,"setYStackOffsetPercent",function(a){this.currentGraphSet.yStackOffsetPercent=
a},"~N");c(b,"setSpectrum",function(a,b){this.currentGraphSet.setSpectrum(a,b)},"~N,~B");c(b,"getSpectrum",function(){return this.currentGraphSet.getSpectrum()});c(b,"setSpecForIRMode",function(a){this.setTaintedAll();var b=this.currentGraphSet.getSpectrum();this.currentGraphSet.setSpectrumJDX(a);for(var c=0;c<this.spectra.size();c++)this.spectra.get(c)===b&&this.spectra.set(c,a)},"JSV.common.Spectrum");c(b,"isShowAllStacked",function(){return this.currentGraphSet.showAllStacked});c(b,"getCurrentSpectrumIndex",
function(){return this.currentGraphSet.getCurrentSpectrumIndex()});c(b,"getSpectrumAt",function(a){return null==this.currentGraphSet?null:this.currentGraphSet.getSpectrumAt(a)},"~N");c(b,"addHighlight",function(a,b,c,g,e,f,j,k){(null==a?this.currentGraphSet:a).addHighlight(b,c,g,this.g2d.getColor4(e,f,j,k))},"JSV.common.GraphSet,~N,~N,JSV.common.Spectrum,~N,~N,~N,~N");c(b,"removeHighlight",function(a,b){this.currentGraphSet.removeHighlight(a,b)},"~N,~N");c(b,"removeAllHighlights",function(){this.currentGraphSet.removeAllHighlights()});
c(b,"setZoom",function(a,b,c,g){this.currentGraphSet.setZoom(a,b,c,g);this.doReset=!0;this.setTaintedAll();this.notifyListeners(new JSV.common.ZoomEvent)},"~N,~N,~N,~N");c(b,"resetView",function(){this.currentGraphSet.resetView()});c(b,"previousView",function(){this.currentGraphSet.previousView()});c(b,"nextView",function(){this.currentGraphSet.nextView()});c(b,"getSelectedIntegral",function(){return this.currentGraphSet.getSelectedIntegral()});c(b,"advanceSubSpectrum",function(a){this.currentGraphSet.advanceSubSpectrum(a)},
"~N");c(b,"setSelectedIntegral",function(a){this.currentGraphSet.setSelectedIntegral(a)},"~N");c(b,"scaleYBy",function(a){this.currentGraphSet.scaleYBy(a)},"~N");c(b,"toPeak",function(a){this.currentGraphSet.toPeak(a)},"~N");c(b,"getClickedCoordinate",function(){return this.coordClicked});c(b,"getPickedCoordinates",function(a,b){return JSV.common.Coordinate.getPickedCoordinates(this.coordsClicked,this.coordClicked,a,b)},"JSV.common.Coordinate,JSV.common.Coordinate");c(b,"shiftSpectrum",function(a,
b,c){return this.currentGraphSet.shiftSpectrum(a,b,c)},"~N,~N,~N");c(b,"findX",function(a,b){this.currentGraphSet.setXPointer(a,b)},"JSV.common.Spectrum,~N");c(b,"setXPointers",function(a,b,c,g){this.currentGraphSet.setXPointer(a,b);this.currentGraphSet.setXPointer2(c,g)},"JSV.common.Spectrum,~N,JSV.common.Spectrum,~N");c(b,"isCurrentGraphSet",function(a){return a===this.currentGraphSet},"JSV.common.GraphSet");c(b,"repaint",function(){this.jsvp.doRepaint(!1)});c(b,"setToolTipText",function(a){this.jsvp.setToolTipText(a)},
"~S");c(b,"setHighlightColor",function(a){this.setColor(JSV.common.ScriptToken.HIGHLIGHTCOLOR,a)},"javajs.api.GenericColor");c(b,"getInput",function(a,b,c){return this.jsvp.getInput(a,b,c)},"~S,~S,~S");c(b,"getFont",function(a,b,c,g,e){g*=this.scalingFactor;e?400>b&&(g=b*g/400):250>b&&(g=b*g/250);b=this.jsvp.getFontFaceID(this.isPrinting?this.printingFontName:this.displayFontName);return this.currentFont=JU.Font.createFont3D(b,c,g,g,0,this.jsvp.getApiPlatform(),a)},"~O,~N,~N,~N,~B");c(b,"notifySubSpectrumChange",
function(a,b){this.notifyListeners(new JSV.common.SubSpecChangeEvent(a,null==b?null:b.getTitleLabel()))},"~N,JSV.common.Spectrum");c(b,"notifyPeakPickedListeners",function(a){null==a&&(a=new JSV.common.PeakPickEvent(this.jsvp,this.coordClicked,this.getSpectrum().getAssociatedPeakInfo(this.xPixelClicked,this.coordClicked)));this.notifyListeners(a)},"JSV.common.PeakPickEvent");c(b,"notifyListeners",function(a){for(var b=0;b<this.listeners.size();b++)null!=this.listeners.get(b)&&this.listeners.get(b).panelEvent(a)},
"~O");c(b,"escapeKeyPressed",function(a){this.currentGraphSet.escapeKeyPressed(a)},"~B");c(b,"hasFocus",function(){return this.jsvp.hasFocus()});c(b,"isMouseUp",function(){return this.mouseState===JSV.common.PanelData.Mouse.UP});c(b,"doMouseMoved",function(a,b){this.mouseX=a;this.mouseY=b;this.mouseState=JSV.common.PanelData.Mouse.UP;this.clickCount=0;var c=JSV.common.GraphSet.findGraphSet(this.graphSets,a,b);null!=c&&c.mouseMovedEvent(a,b)},"~N,~N");c(b,"doMousePressed",function(a,b){this.mouseState=
JSV.common.PanelData.Mouse.DOWN;var c=JSV.common.GraphSet.findGraphSet(this.graphSets,a,b);null!=c&&(this.setCurrentGraphSet(c,b),this.clickCount=++this.clickCount%3,this.currentGraphSet.mousePressedEvent(a,b,this.clickCount))},"~N,~N");c(b,"doMouseDragged",function(a,b){this.isIntegralDrag=(new Boolean(this.isIntegralDrag|this.ctrlPressed)).valueOf();this.mouseState=JSV.common.PanelData.Mouse.DOWN;JSV.common.GraphSet.findGraphSet(this.graphSets,a,b)===this.currentGraphSet&&(this.currentGraphSet.checkWidgetEvent(a,
b,!1)&&this.setTaintedAll(),this.currentGraphSet.mouseMovedEvent(a,b))},"~N,~N");c(b,"doMouseReleased",function(a,b,c){this.mouseState=JSV.common.PanelData.Mouse.UP;!(null==this.thisWidget&&null==this.currentGraphSet.pendingMeasurement)&&c&&(this.currentGraphSet.mouseReleasedEvent(a,b),this.thisWidget=null,this.isIntegralDrag=!1,this.integralShiftMode=0)},"~N,~N,~B");c(b,"doMouseClicked",function(a,b,c){var g=JSV.common.GraphSet.findGraphSet(this.graphSets,a,b);null!=g&&(this.setCurrentGraphSet(g,
b),g.mouseClickedEvent(a,b,this.clickCount,c),this.setTaintedAll(),this.repaint())},"~N,~N,~B");c(b,"hasCurrentMeasurements",function(a){return this.currentGraphSet.hasCurrentMeasurement(a)},"JSV.common.Annotation.AType");c(b,"getDialog",function(a){return this.currentGraphSet.getDialog(a,-1)},"JSV.common.Annotation.AType");c(b,"addDialog",function(a,b,c){this.currentGraphSet.addDialog(a,b,c)},"~N,JSV.common.Annotation.AType,JSV.api.AnnotationData");c(b,"getPeakListing",function(a,b){null!=a&&this.currentGraphSet.getPeakListing(-1,
a,!0);this.currentGraphSet.setPeakListing(b)},"JSV.common.Parameters,Boolean");c(b,"checkIntegral",function(a,b){this.currentGraphSet.checkIntegralParams(a,b)},"JSV.common.Parameters,~S");c(b,"setIntegrationRatios",function(a){this.currentGraphSet.setIntegrationRatios(a)},"~S");c(b,"getView",function(){return this.currentGraphSet.getCurrentView()});c(b,"closeAllDialogsExcept",function(a){for(var b=this.graphSets.size();0<=--b;)this.graphSets.get(b).closeDialogsExcept(a)},"JSV.common.Annotation.AType");
c(b,"removeDialog",function(a){this.currentGraphSet.removeDialog(a)},"JSV.dialog.JSVDialog");c(b,"normalizeIntegral",function(){var a=this.getSelectedIntegral();if(null!=a){var b=a.text;0==b.length&&(b=""+a.getValue());a=this.getInput("Enter a new value for this integral","Normalize Integral",b);try{this.setSelectedIntegral(Double.parseDouble(a))}catch(c){if(!D(c,Exception))throw c;}}});c(b,"getDrawTitle",function(a){var b=null;a?b=this.printJobTitle:1==this.nSpectra?b=this.getSpectrum().getPeakTitle():
null!=this.viewTitle?(null!=this.currentGraphSet.getTitle(!1)&&(b=this.getSpectrum().getPeakTitle()),null==b&&(b=this.viewTitle)):b=this.jsvp.getTitle().trim();0<=b.indexOf("\n")&&(b=b.substring(0,b.indexOf("\n")).trim());return b},"~B");c(b,"getPrintJobTitle",function(a){var b=null;1==this.nSpectra?b=this.getSpectrum().getTitle():null!=this.viewTitle?(1==this.graphSets.size()&&(b=this.currentGraphSet.getTitle(a)),null==b&&(b=this.viewTitle)):b=this.jsvp.getTitle().trim();0<=b.indexOf("\n")?b=b.substring(0,
b.indexOf("\n")).trim():b.startsWith("$")&&(b=b.substring(1));return b},"~B");c(b,"linkSpectra",function(a){a===JSV.common.PanelData.LinkMode.ALL&&(a=2==this.nSpectra?JSV.common.PanelData.LinkMode.AB:3==this.nSpectra?JSV.common.PanelData.LinkMode.ABC:JSV.common.PanelData.LinkMode.NONE);a!==JSV.common.PanelData.LinkMode.NONE&&a.toString().length!=this.nSpectra||this.setGraphSets(a)},"JSV.common.PanelData.LinkMode");c(b,"doZoomLinked",function(a,b,c,g,e,f){if(!this.linking){this.linking=!0;for(var j=
a.getSpectrumAt(0),k=this.graphSets.size();0<=--k;){var l=this.graphSets.get(k);l!==a&&JSV.common.Spectrum.areXScalesCompatible(j,this.graphSets.get(k).getSpectrumAt(0),!1,!0)&&l.doZoom(b,0,c,0,f,!1,e,!1,g)}this.linking=!1}},"JSV.common.GraphSet,~N,~N,~B,~B,~B");c(b,"clearLinkViews",function(a){if(!this.linking){this.linking=!0;for(var b=a.getSpectrum(),c=this.graphSets.size();0<=--c;){var g=this.graphSets.get(c);g!==a&&JSV.common.Spectrum.areXScalesCompatible(b,this.graphSets.get(c).getSpectrum(),
!1,!0)&&g.clearViews()}this.linking=!1}},"JSV.common.GraphSet");c(b,"setlinkedXMove",function(a,b,c){if(!this.linking){this.linking=!0;for(var g=a.getSpectrum(),e=this.graphSets.size();0<=--e;){var f=this.graphSets.get(e);f!==a&&JSV.common.Spectrum.areXScalesCompatible(g,this.graphSets.get(e).getSpectrum(),!1,!0)&&null==f.imageView&&(c?f.setXPixelMovedTo(1.7976931348623157E308,b,0,0):f.setXPixelMovedTo(b,1.7976931348623157E308,0,0))}this.linking=!1}},"JSV.common.GraphSet,~N,~B");c(b,"set2DCrossHairsLinked",
function(a,b,c,g){for(var e=this.graphSets.size();0<=--e;){var f=this.graphSets.get(e);f!==a&&f.set2DXY(b,c,g)}},"JSV.common.GraphSet,~N,~N,~B");c(b,"dialogsToFront",function(a){this.currentGraphSet.dialogsToFront(a)},"JSV.common.Spectrum");c(b,"setColor",function(a,b){null!=b&&this.options.put(a,JU.CU.toRGBHexString(b));switch(a){case JSV.common.ScriptToken.COORDINATESCOLOR:this.coordinatesColor=b;return;case JSV.common.ScriptToken.HIGHLIGHTCOLOR:this.highlightColor=b;255==this.highlightColor.getOpacity255()&&
this.highlightColor.setOpacity255(150);return;case JSV.common.ScriptToken.ZOOMBOXCOLOR:this.zoomBoxColor=b;return;case JSV.common.ScriptToken.ZOOMBOXCOLOR2:this.zoomBoxColor2=b;return;case JSV.common.ScriptToken.BACKGROUNDCOLOR:this.jsvp.setBackgroundColor(this.bgcolor=b);break;case JSV.common.ScriptToken.GRIDCOLOR:this.gridColor=b;break;case JSV.common.ScriptToken.INTEGRALPLOTCOLOR:this.integralPlotColor=b;break;case JSV.common.ScriptToken.PEAKTABCOLOR:this.peakTabColor=b;break;case JSV.common.ScriptToken.PLOTCOLOR:for(var c=
this.graphSets.size();0<=--c;)this.graphSets.get(c).setPlotColor0(b);break;case JSV.common.ScriptToken.PLOTAREACOLOR:this.plotAreaColor=b;break;case JSV.common.ScriptToken.SCALECOLOR:this.scaleColor=b;break;case JSV.common.ScriptToken.TITLECOLOR:this.titleColor=b;break;case JSV.common.ScriptToken.UNITSCOLOR:this.unitsColor=b;break;default:JU.Logger.warn("AwtPanel --- unrecognized color: "+a);return}this.taintedAll=!0},"JSV.common.ScriptToken,javajs.api.GenericColor");c(b,"getColor",function(a){switch(a){default:return JU.Logger.error("awtgraphset missing color "+
a),this.BLACK;case JSV.common.ScriptToken.ZOOMBOXCOLOR2:return this.zoomBoxColor2;case JSV.common.ScriptToken.ZOOMBOXCOLOR:return this.zoomBoxColor;case JSV.common.ScriptToken.HIGHLIGHTCOLOR:return this.highlightColor;case JSV.common.ScriptToken.INTEGRALPLOTCOLOR:return this.integralPlotColor;case JSV.common.ScriptToken.GRIDCOLOR:return this.gridColor;case JSV.common.ScriptToken.PEAKTABCOLOR:return this.peakTabColor;case JSV.common.ScriptToken.PLOTAREACOLOR:return this.plotAreaColor;case JSV.common.ScriptToken.SCALECOLOR:return this.scaleColor;
case JSV.common.ScriptToken.TITLECOLOR:return this.titleColor;case JSV.common.ScriptToken.UNITSCOLOR:return this.unitsColor}},"JSV.common.ScriptToken");c(b,"getOverlayLegendData",function(){for(var a=this.currentGraphSet.nSpectra,b=Array(a),c=this.getSpectrumAt(0).getFilePath(),g=this.getSpectrumAt(a-1).getFilePath(),c=null!=c&&null!=g&&!c.equals(g),g=0;g<a;g++){var e=Array(3),f=this.getSpectrumAt(g);this.title=f.getTitle();c&&(this.title=JSV.common.JSVFileManager.getTagName(f.getFilePath())+" - "+
this.title);f=this.getCurrentPlotColor(g);e[0]=new Integer(g+1);e[1]=f;e[2]=" "+this.title;b[g]=e}return b});c(b,"setColorOrFont",function(a,b){if(null==b){for(var c,g=a.elementColors.entrySet().iterator();g.hasNext()&&((c=g.next())||1);)this.setColorOrFont(a,c.getKey());this.setColorOrFont(a,JSV.common.ScriptToken.DISPLAYFONTNAME);this.setColorOrFont(a,JSV.common.ScriptToken.TITLEFONTNAME)}else{switch(b){case JSV.common.ScriptToken.DISPLAYFONTNAME:this.setFontName(b,a.displayFontName);return;case JSV.common.ScriptToken.TITLEFONTNAME:this.setFontName(b,
a.titleFontName);return}this.setColor(b,a.getElementColor(b))}},"JSV.common.ColorParameters,JSV.common.ScriptToken");c(b,"getCurrentPlotColor",function(a){return this.currentGraphSet.getPlotColor(a)},"~N");c(b,"setPrint",function(a,b){null==a?(this.options.putAll(this.optionsSaved),this.optionsSaved=null):(this.printJobTitle=a.title,this.printingFontName=b,this.printGraphPosition=a.position,this.optionsSaved=new java.util.Hashtable,this.optionsSaved.putAll(this.options),this.gridOn=a.showGrid,this.titleOn=
a.showTitle,this.setBoolean(JSV.common.ScriptToken.XSCALEON,a.showXScale),this.setBoolean(JSV.common.ScriptToken.XUNITSON,a.showXScale),this.setBoolean(JSV.common.ScriptToken.YSCALEON,a.showYScale),this.setBoolean(JSV.common.ScriptToken.YUNITSON,a.showYScale))},"JSV.common.PrintLayout,~S");c(b,"setDefaultPrintOptions",function(a){a.showGrid=this.gridOn;a.showXScale=this.getBoolean(JSV.common.ScriptToken.XSCALEON);a.showYScale=this.getBoolean(JSV.common.ScriptToken.YSCALEON);a.showTitle=this.titleOn},
"JSV.common.PrintLayout");c(b,"showDialog",function(a){var b=this.getDialog(a);this.closeAllDialogsExcept(a);if(null!=b&&C(b,"JSV.dialog.JSVDialog"))return b.reEnable();var c=this.getCurrentSpectrumIndex();if(0>c)return this.jsvp.showMessage("To enable "+a+" first select a spectrum by clicking on it.",""+a),null;var g=this.getSpectrum(),e=this.vwr.getDialog(a,g);null==b&&a===JSV.common.Annotation.AType.Measurements&&(b=new JSV.common.MeasurementData(JSV.common.Annotation.AType.Measurements,g));null!=
b&&e.setData(b);this.addDialog(c,a,e);e.reEnable();return e},"JSV.common.Annotation.AType");c(b,"printPdf",function(a,b){var c=!b.layout.equals("landscape");this.print(a,c?b.imageableHeight:b.imageableWidth,c?b.imageableWidth:b.imageableHeight,b.imageableX,b.imageableY,b.paperHeight,b.paperWidth,c,0)},"J.api.GenericGraphics,JSV.common.PrintLayout");c(b,"print",function(a,b,c,g,e,f,j,k,l){this.g2d=this.g2d0;if(0==l)return this.isPrinting=!0,l=!1,C(a,"J.api.GenericGraphics")&&(this.g2d=a,a=this.gMain),
this.printGraphPosition.equals("default")?k?(b=450,c=280):(b=280,c=450):this.printGraphPosition.equals("fit to page")?l=!0:k?(b=450,c=280,g=v(v(j-c)/2),e=v(v(f-b)/2)):(b=280,c=450,e=v(v(j-280)/2),g=v(v(f-450)/2)),this.g2d.translateScale(a,g,e,0.1),this.setTaintedAll(),this.drawGraph(a,a,a,v(c),v(b),l),this.isPrinting=!1,0;this.isPrinting=!1;return 1},"~O,~N,~N,~N,~N,~N,~N,~B,~N");g(b,"keyPressed",function(a,b){if(this.isPrinting)return!1;this.checkKeyControl(a,!0);switch(a){case 27:case 127:case 8:return this.escapeKeyPressed(27!=
a),this.isIntegralDrag=!1,this.setTaintedAll(),this.repaint(),!0}var c=0,g=!1;if(0==b)switch(a){case 37:case 39:this.doMouseMoved(39==a?++this.mouseX:--this.mouseX,this.mouseY);this.repaint();g=!0;break;case 33:case 34:c=33==a?JSV.common.GraphSet.RT2:1/JSV.common.GraphSet.RT2;g=!0;break;case 40:case 38:g=40==a?-1:1,null==this.getSpectrumAt(0).getSubSpectra()?this.notifySubSpectrumChange(g,null):(this.advanceSubSpectrum(g),this.setTaintedAll(),this.repaint()),g=!0}else if(this.checkMod(a,2))switch(a){case 40:case 38:case 45:case 61:c=
61==a||38==a?JSV.common.GraphSet.RT2:1/JSV.common.GraphSet.RT2;g=!0;break;case 37:case 39:this.toPeak(39==a?1:-1),g=!0}0!=c&&(this.scaleYBy(c),this.setTaintedAll(),this.repaint());return g},"~N,~N");g(b,"keyReleased",function(a){this.isPrinting||this.checkKeyControl(a,!1)},"~N");g(b,"keyTyped",function(a,b){if(this.isPrinting)return!1;switch(a){case 110:if(0!=b)break;this.normalizeIntegral();return!0;case 26:if(2!=b)break;this.previousView();this.setTaintedAll();this.repaint();return!0;case 25:if(2!=
b)break;this.nextView();this.setTaintedAll();this.repaint();return!0}return!1},"~N,~N");g(b,"mouseAction",function(a,b,c,g,e,f){if(!this.isPrinting)switch(a){case 4:if(!this.checkMod(f,16))break;this.doMousePressed(c,g);break;case 5:this.doMouseReleased(c,g,this.checkMod(f,16));this.setTaintedAll();this.repaint();break;case 1:this.doMouseDragged(c,g);this.repaint();break;case 0:this.jsvp.getFocusNow(!1);if(0!=(f&28)){this.doMouseDragged(c,g);this.repaint();break}this.doMouseMoved(c,g);null!=this.coordStr&&
this.repaint();break;case 2:if(this.checkMod(f,4)){this.jsvp.showMenu(c,g);break}this.ctrlPressed=!1;this.doMouseClicked(c,g,this.updateControlPressed(f))}},"~N,~N,~N,~N,~N,~N");c(b,"checkMod",function(a,b){return(a&b)==b},"~N,~N");c(b,"checkKeyControl",function(a,b){switch(a){case 17:case 157:this.ctrlPressed=b;break;case 16:this.shiftPressed=b}},"~N,~B");c(b,"updateControlPressed",function(a){return this.ctrlPressed=(new Boolean(this.ctrlPressed|(this.checkMod(a,2)||this.checkMod(a,20)))).valueOf()},
"~N");g(b,"mouseEnterExit",function(a,b,c,g){if(g)this.thisWidget=null,this.isIntegralDrag=!1,this.integralShiftMode=0;else try{this.jsvp.getFocusNow(!1)}catch(e){if(D(e,Exception))System.out.println("pd "+this+" cannot focus");else throw e;}},"~N,~N,~N,~B");c(b,"setSolutionColor",function(a){var b=0<=a.indexOf("none"),c=0>a.indexOf("false");if(0>a.indexOf("all"))b=b?-1:this.vwr.getSolutionColor(c),this.getSpectrum().setFillColor(-1==b?null:this.vwr.parameters.getColor1(b));else{a=JSV.common.JSViewer.getInterface("JSV.common.Visible");
for(var g=this.graphSets.size();0<=--g;)this.graphSets.get(g).setSolutionColor(a,b,c)}},"~S");c(b,"setIRMode",function(a,b){for(var c=this.graphSets.size();0<=--c;)this.graphSets.get(c).setIRMode(a,b)},"JSV.common.Spectrum.IRMode,~S");c(b,"closeSpectrum",function(){this.vwr.close("views");this.vwr.close(this.getSourceID());this.vwr.execView("*",!0)});b=G(JSV.common.PanelData,"LinkMode",Enum);b.getMode=c(b,"getMode",function(a){if(a.equals("*"))return JSV.common.PanelData.LinkMode.ALL;for(var b,c=
0,g=JSV.common.PanelData.LinkMode.values();c<g.length&&((b=g[c])||1);c++)if(b.name().equalsIgnoreCase(a))return b;return JSV.common.PanelData.LinkMode.NONE},"~S");B(b,"ALL",0,[]);B(b,"NONE",1,[]);B(b,"AB",2,[]);B(b,"ABC",3,[]);b=G(JSV.common.PanelData,"Mouse",Enum);B(b,"UP",0,[]);B(b,"DOWN",1,[])});n("JSV.common");z(null,"JSV.common.PanelNode",["JU.SB","JSV.common.Parameters"],function(){var b=w(function(){this.legend=this.id=this.jsvp=this.fileName=this.source=this.treeNode=null;this.isSimulation=
this.isView=this.isSelected=!1;this.frameTitle=null;q(this,arguments)},JSV.common,"PanelNode",null);x(b,function(a,b,c,g){this.id=a;this.source=c;this.fileName=b;this.isSimulation=0<=c.getFilePath().indexOf("http://SIMULATION/");this.jsvp=g;null!=g&&(this.pd().getSpectrumAt(0).setId(a),this.frameTitle=g.getTitle())},"~S,~S,JSV.source.JDXSource,JSV.api.JSVPanel");c(b,"setTreeNode",function(a){this.treeNode=a},"JSV.api.JSVTreeNode");c(b,"getTreeNode",function(){return this.treeNode});c(b,"dispose",
function(){this.source.dispose();null!=this.jsvp&&this.jsvp.dispose();this.legend=this.jsvp=this.source=null});c(b,"pd",function(){return this.jsvp.getPanelData()});c(b,"getSpectrum",function(){return this.pd().getSpectrum()});c(b,"setLegend",function(a){null!=this.legend&&this.legend.dispose();return this.legend=a},"JSV.dialog.JSVDialog");g(b,"toString",function(){return(null==this.id?"":this.id+": ")+(null==this.frameTitle?this.fileName:this.frameTitle)});b.findSourceByNameOrId=c(b,"findSourceByNameOrId",
function(a,b){for(var c=b.size();0<=--c;){var g=b.get(c);if(a.equals(g.id)||a.equals(g.source.getSpectra().get(0).sourceID)||g.source.matchesFilePath(a))return g.source}for(c=b.size();0<=--c;)if(g=b.get(c),a.equals(g.fileName))return g.source;return null},"~S,JU.Lst");b.findNodeById=c(b,"findNodeById",function(a,b){if(null!=a)for(var c=b.size();0<=--c;)if(a.equals(b.get(c).id)||a.equals(b.get(c).frameTitle))return b.get(c);return null},"~S,JU.Lst");b.findNode=c(b,"findNode",function(a,b){for(var c=
b.size();0<=--c;)if(b.get(c).jsvp===a)return b.get(c);return null},"JSV.api.JSVPanel,JU.Lst");b.getSpectrumListAsString=c(b,"getSpectrumListAsString",function(a){for(var b=new JU.SB,c=0;c<a.size();c++){var g=a.get(c);g.isView||b.append(" ").append(g.id)}return b.toString().trim()},"JU.Lst");b.isOpen=c(b,"isOpen",function(a,b){if(null!=b)for(var c=a.size();0<=--c&&!a.get(c).source.matchesFilePath(b)&&!b.equals(a.get(c).frameTitle););return-1},"JU.Lst,~S");c(b,"setFrameTitle",function(a){this.frameTitle=
a},"~S");b.getLastFileFirstNode=c(b,"getLastFileFirstNode",function(a){for(var b=a.size(),c=0==b?null:a.get(b-1),b=b-1;0<=--b&&a.get(b).source===c.source;)c=a.get(b);return null==c?null:c.jsvp},"JU.Lst");c(b,"getInfo",function(a){var b=this.pd().getInfo(!1,a);JSV.common.Parameters.putInfo(a,b,"panelId",this.id);JSV.common.Parameters.putInfo(a,b,"panelFileName",this.fileName);JSV.common.Parameters.putInfo(a,b,"panelSource",this.source.getFilePath());return b},"~S")});n("JSV.common");z(null,"JSV.common.Parameters",
["java.util.Hashtable","JSV.common.ScriptToken"],function(){var b=w(function(){this.name=null;this.integralMinY=0.1;this.integralRange=50;this.integralOffset=30;this.integralDrawAll=!1;this.viewOffset=0;this.peakListThreshold=NaN;this.peakListInterpolation="parabolic";this.precision=2;this.htBooleans=null;q(this,arguments)},JSV.common,"Parameters",null);x(b,function(){this.htBooleans=new java.util.Hashtable;this.setBoolean(JSV.common.ScriptToken.TITLEON,!0);this.setBoolean(JSV.common.ScriptToken.ENABLEZOOM,
!0);this.setBoolean(JSV.common.ScriptToken.DISPLAY2D,!0);this.setBoolean(JSV.common.ScriptToken.COORDINATESON,!0);this.setBoolean(JSV.common.ScriptToken.PEAKTABSON,!0);this.setBoolean(JSV.common.ScriptToken.POINTSONLY,!1);this.setBoolean(JSV.common.ScriptToken.GRIDON,!0);this.setBoolean(JSV.common.ScriptToken.XSCALEON,!0);this.setBoolean(JSV.common.ScriptToken.YSCALEON,!0);this.setBoolean(JSV.common.ScriptToken.XUNITSON,!0);this.setBoolean(JSV.common.ScriptToken.YUNITSON,!0)});c(b,"setName",function(a){this.name=
a;return this},"~S");c(b,"getBooleans",function(){return this.htBooleans});c(b,"setBoolean",function(a,b){this.htBooleans.put(a,Boolean.$valueOf(b));return b},"JSV.common.ScriptToken,~B");c(b,"getBoolean",function(a){return Boolean.TRUE===this.htBooleans.get(a)},"JSV.common.ScriptToken");b.isTrue=c(b,"isTrue",function(a){return 0==a.length||Boolean.parseBoolean(a)},"~S");b.getTFToggle=c(b,"getTFToggle",function(a){return a.equalsIgnoreCase("TOGGLE")?null:JSV.common.Parameters.isTrue(a)?Boolean.TRUE:
Boolean.FALSE},"~S");c(b,"setP",function(a,b,c){switch(b){default:return;case JSV.common.ScriptToken.COORDINATESON:case JSV.common.ScriptToken.DISPLAY1D:case JSV.common.ScriptToken.DISPLAY2D:case JSV.common.ScriptToken.ENABLEZOOM:case JSV.common.ScriptToken.GRIDON:case JSV.common.ScriptToken.POINTSONLY:case JSV.common.ScriptToken.PEAKTABSON:case JSV.common.ScriptToken.REVERSEPLOT:case JSV.common.ScriptToken.TITLEON:case JSV.common.ScriptToken.TITLEBOLDON:case JSV.common.ScriptToken.XSCALEON:case JSV.common.ScriptToken.XUNITSON:case JSV.common.ScriptToken.YSCALEON:case JSV.common.ScriptToken.YUNITSON:c=
JSV.common.Parameters.getTFToggle(c);if(null!=c){this.setBoolean(b,c.booleanValue());break}if(null==a)return;c=!a.getBoolean(b);switch(b){case JSV.common.ScriptToken.XSCALEON:this.setBoolean(JSV.common.ScriptToken.XUNITSON,c);a.setBoolean(JSV.common.ScriptToken.XUNITSON,c);break;case JSV.common.ScriptToken.YSCALEON:this.setBoolean(JSV.common.ScriptToken.YUNITSON,c),a.setBoolean(JSV.common.ScriptToken.YUNITSON,c)}this.setBoolean(b,c)}null!=a&&a.setBooleans(this,b)},"JSV.common.PanelData,JSV.common.ScriptToken,~S");
b.isMatch=c(b,"isMatch",function(a,b){return null==a||b.equalsIgnoreCase(a)},"~S,~S");b.putInfo=c(b,"putInfo",function(a,b,c,g){null!=g&&JSV.common.Parameters.isMatch(a,c)&&b.put(null==a?c:a,g)},"~S,java.util.Map,~S,~O")});n("JSV.common");z(["JSV.common.MeasurementData"],"JSV.common.PeakData",["JU.DF","JSV.common.Coordinate","$.PeakPick"],function(){var b=w(function(){this.maxY=this.minY=this.thresh=0;q(this,arguments)},JSV.common,"PeakData",JSV.common.MeasurementData);c(b,"getThresh",function(){return this.thresh});
g(b,"getDataHeader",function(){return this.spec.isHNMR()?JSV.common.PeakData.HNMR_HEADER:u(-1,["peak",this.spec.getXUnits(),this.spec.getYUnits()])});g(b,"getMeasurementListArray",function(){for(var a=Array(this.size()),b=R(-1,[-1E100,1E100,1E100]),c,g=0,e=this.size();0<=--e;g++)c=this.spec.getPeakListArray(this.get(e),b,this.maxY),a[g]=2==c.length?u(-1,[""+(g+1),JU.DF.formatDecimalDbl(c[0],2),JU.DF.formatDecimalDbl(c[1],4)]):u(-1,[""+(g+1),JU.DF.formatDecimalDbl(c[0],4),JU.DF.formatDecimalDbl(c[1],
4),JU.DF.formatDecimalDbl(c[2],2),0==c[3]?"":JU.DF.formatDecimalDbl(c[3],2),0==c[4]?"":JU.DF.formatDecimalDbl(c[4],2),0==c[5]?"":JU.DF.formatDecimalDbl(c[5],2)]);return a},"~S");g(b,"getMeasurementListArrayReal",function(){for(var a=R(this.size(),0),b=R(-1,[-1E100,1E100,1E100]),c=0,g=this.size();0<=--g;c++)a[c]=this.spec.getPeakListArray(this.get(g),b,this.maxY);return a},"~S");c(b,"getInfo",function(a){a.put("interpolation",this.myParams.peakListInterpolation);a.put("threshold",Double.$valueOf(this.myParams.peakListThreshold));
ia(this,JSV.common.PeakData,"getInfo",[a])},"java.util.Map");c(b,"setPeakList",function(a,b,c){this.precision=-2147483648==b?this.spec.getDefaultUnitPrecision():b;var g=this.spec.getXYCoords();if(!(3>g.length)){this.clear();null!=a&&(this.myParams.peakListInterpolation=a.peakListInterpolation,this.myParams.peakListThreshold=a.peakListThreshold);a=this.myParams.peakListInterpolation.equals("parabolic");var e=this.spec.isInverted();this.minY=c.minYOnScale;this.maxY=c.maxYOnScale;var f=c.minXOnScale;
c=c.maxXOnScale;this.thresh=this.myParams.peakListThreshold;Double.isNaN(this.thresh)&&(this.thresh=this.myParams.peakListThreshold=(this.minY+this.maxY)/2);var j=0,k=R(-1,[g[0].getYVal(),j=g[1].getYVal(),0]),l=0;if(e)for(e=2;e<g.length;e++){var n=k[e%3]=g[e].getYVal();if(j<this.thresh&&(k[(e-2)%3]>j&&j<n)&&(j=a?JSV.common.Coordinate.parabolicInterpolation(g,e-1):g[e-1].getXVal(),j>=f||j<=c))if(j=(new JSV.common.PeakPick).setValue(j,n,this.spec,null,0),this.addLast(j),100==++l)break;j=n}else for(e=
2;e<g.length;e++){n=k[e%3]=g[e].getYVal();if(j>this.thresh&&(k[(e-2)%3]<j&&j>n)&&(j=a?JSV.common.Coordinate.parabolicInterpolation(g,e-1):g[e-1].getXVal(),j>=f&&j<=c&&(j=(new JSV.common.PeakPick).setValue(j,n,this.spec,JU.DF.formatDecimalDbl(j,b),j),this.addLast(j),100==++l)))break;j=n}}},"JSV.common.Parameters,~N,JSV.common.ScaleData");b.HNMR_HEADER=u(-1,"peak shift/ppm intens shift/hz diff/hz 2-diff 3-diff".split(" "))});n("JSV.common");z(null,"JSV.common.PeakInfo",["JU.PT"],function(){var b=w(function(){this.px1=
this.px0=this.yMax=this.yMin=this.xMax=this.xMin=0;this.atomKey=this._match=this.spectrum=this.id=this.atoms=this.model=this.title=this.filePathForwardSlash=this.file=this.index=this.type2=this.type=this.stringInfo=null;q(this,arguments)},JSV.common,"PeakInfo",null);x(b,function(a){this.stringInfo=a;this.type=JU.PT.getQuotedAttribute(a,"type");null==this.type&&(this.type="");this.type=this.type.toUpperCase();var b=this.type.indexOf("/");this.type2=0>b?"":JSV.common.PeakInfo.fixType(this.type.substring(this.type.indexOf("/")+
1));this.type=0<=b?JSV.common.PeakInfo.fixType(this.type.substring(0,b))+"/"+this.type2:JSV.common.PeakInfo.fixType(this.type);this.id=JU.PT.getQuotedAttribute(a,"id");this.index=JU.PT.getQuotedAttribute(a,"index");this.file=JU.PT.getQuotedAttribute(a,"file");System.out.println("pi file="+this.file);this.filePathForwardSlash=null==this.file?null:this.file.$replace("\\","/");this.model=JU.PT.getQuotedAttribute(a,"model");a.contains('baseModel=""')||(this.atoms=JU.PT.getQuotedAttribute(a,"atoms"));
this.atomKey=","+this.atoms+",";this.title=JU.PT.getQuotedAttribute(a,"title");this._match=JU.PT.getQuotedAttribute(a,"_match");this.xMax=JU.PT.parseFloat(JU.PT.getQuotedAttribute(a,"xMax"));this.xMin=JU.PT.parseFloat(JU.PT.getQuotedAttribute(a,"xMin"));this.yMax=JU.PT.parseFloat(JU.PT.getQuotedAttribute(a,"yMax"));this.yMin=JU.PT.parseFloat(JU.PT.getQuotedAttribute(a,"yMin"))},"~S");c(b,"isClearAll",function(){return null==this.spectrum});c(b,"getType",function(){return this.type});c(b,"getAtoms",
function(){return this.atoms});c(b,"getXMax",function(){return this.xMax});c(b,"getXMin",function(){return this.xMin});c(b,"getYMin",function(){return this.yMin});c(b,"getYMax",function(){return this.yMax});c(b,"getX",function(){return(this.xMax+this.xMin)/2});c(b,"getMatch",function(){return this._match});b.fixType=c(b,"fixType",function(a){return a.equals("HNMR")?"1HNMR":a.equals("CNMR")?"13CNMR":a},"~S");g(b,"toString",function(){return this.stringInfo});c(b,"getIndex",function(){return this.index});
c(b,"getTitle",function(){return this.title});c(b,"checkFileIndex",function(a,b,c){return null!=c?0<=this.atomKey.indexOf(c):b.equals(this.index)&&(a.equals(this.file)||a.equals(this.filePathForwardSlash))},"~S,~S,~S");c(b,"checkFileTypeModel",function(a,b,c){return a.equals(this.file)&&this.checkModel(c)&&this.type.endsWith(b)},"~S,~S,~S");c(b,"checkTypeModel",function(a,b){return this.checkType(a)&&this.checkModel(b)},"~S,~S");c(b,"checkModel",function(a){return null!=a&&a.equals(this.model)},"~S");
c(b,"checkType",function(a){return a.endsWith(this.type)},"~S");c(b,"checkTypeMatch",function(a){return this.checkType(a.type)&&(this.checkId(a._match)||this.checkModel(a._match)||0<=this.title.toUpperCase().indexOf(a._match))},"JSV.common.PeakInfo");c(b,"checkId",function(a){return null==a?!1:null!=this.id&&a.toUpperCase().startsWith("ID=")&&a.substring(3).equals(this.id)||(a=a.toUpperCase()).startsWith("INDEX=")&&a.equals("INDEX="+this.index)||a.startsWith("#=")&&a.equals("#="+this.index)},"~S");
c(b,"getModel",function(){return this.model});c(b,"getFilePath",function(){return this.file});c(b,"autoSelectOnLoad",function(){return this.type.startsWith("GC")});c(b,"setPixelRange",function(a,b){this.px0=a;this.px1=b},"~N,~N");c(b,"checkRange",function(a,b){return(2147483647!=a?this.px0<=a&&this.px1>=a:b>=this.xMin&&b<=this.xMax)?Math.abs(b-this.getX()):1E100},"~N,~N");c(b,"getXPixel",function(){return v((this.px0+this.px1)/2)});b.nullPeakInfo=null});n("JSV.common");z(["JSV.common.Measurement"],
"JSV.common.PeakPick",null,function(){var b=G(JSV.common,"PeakPick",JSV.common.Measurement);c(b,"setValue",function(a,b,c,g,e){null==g?(this.set(a,b),this.setPt2(c,!1)):(this.setA(a,b,c,g,!1,!1,0,6),this.value=e,this.setPt2(this.getXVal(),this.getYVal()));return this},"~N,~N,JSV.common.Spectrum,~S,~N")});n("JSV.common");z(["java.util.EventObject"],"JSV.common.PeakPickEvent",null,function(){var b=w(function(){this.peakInfo=this.coord=null;q(this,arguments)},JSV.common,"PeakPickEvent",java.util.EventObject);
x(b,function(a,b,c){I(this,JSV.common.PeakPickEvent,[a]);this.coord=b;this.peakInfo=null==c?null:c},"~O,JSV.common.Coordinate,JSV.common.PeakInfo");c(b,"getCoord",function(){return this.coord});c(b,"getPeakInfo",function(){return this.peakInfo});g(b,"toString",function(){return null==this.peakInfo?null:this.peakInfo.toString()})});n("JSV.common");z(["JSV.common.Coordinate","$.ScriptToken"],"JSV.common.PlotWidget",null,function(){var b=w(function(){this.yPixel1=this.xPixel1=this.yPixel0=this.xPixel0=
0;this.is2Donly=this.is2D=this.isXtype=this.isPinOrCursor=this.isPin=!1;this.isEnabled=!0;this.isVisible=!1;this.color=this.name=null;q(this,arguments)},JSV.common,"PlotWidget",JSV.common.Coordinate);N(b,function(){this.color=JSV.common.ScriptToken.PLOTCOLOR});x(b,function(a){I(this,JSV.common.PlotWidget,[]);this.name=a;this.isPin="p"==a.charAt(0);this.isPinOrCursor="z"!=a.charAt(0);this.isXtype=0<=a.indexOf("x");this.is2Donly=(this.is2D=0<=a.indexOf("2D"))&&"p"==a.charAt(0)},"~S");g(b,"toString",
function(){return this.name+(!this.isPinOrCursor?""+this.xPixel0+" "+this.yPixel0+" / "+this.xPixel1+" "+this.yPixel1:" x="+this.getXVal()+"/"+this.xPixel0+" y="+this.getYVal()+"/"+this.yPixel0)});c(b,"selected",function(a,b){return this.isVisible&&5>Math.abs(a-this.xPixel0)&&5>Math.abs(b-this.yPixel0)},"~N,~N");c(b,"setX",function(a,b){this.setXVal(a);this.xPixel0=this.xPixel1=b},"~N,~N");c(b,"setY",function(a,b){this.setYVal(a);this.yPixel0=this.yPixel1=b},"~N,~N");c(b,"getValue",function(){return this.isXtype?
this.getXVal():this.getYVal()});c(b,"setEnabled",function(a){this.isEnabled=a},"~B")});n("JSV.common");var bb=w(function(){this.imageableWidth=this.imageableHeight=this.paperWidth=this.paperHeight=this.imageableY=this.imageableX=0;this.layout="landscape";this.position="fit to page";this.showTitle=this.showYScale=this.showXScale=this.showGrid=!0;this.font="Helvetica";this.paper=null;this.asPDF=!0;this.date=this.title=null;q(this,arguments)},JSV.common,"PrintLayout",null);N(bb,function(){this.paperHeight=
F(72*Math.min(11,11.69));this.paperWidth=F(72*Math.min(8.5,8.27));this.imageableHeight=this.paperHeight;this.imageableWidth=this.paperWidth});x(bb,function(b){null!=b&&(this.asPDF=!0,b.setDefaultPrintOptions(this))},"JSV.common.PanelData");n("JSV.common");z(null,"JSV.common.RepaintManager",["JSV.common.JSViewer"],function(){var b=w(function(){this.repaintPending=!1;this.vwr=null;q(this,arguments)},JSV.common,"RepaintManager",null);x(b,function(a){this.vwr=a},"JSV.common.JSViewer");c(b,"refresh",function(){if(this.repaintPending)return!1;
this.repaintPending=!0;var a=this.vwr.html5Applet,b=JSV.common.JSViewer.isJS&&!JSV.common.JSViewer.isSwingJS?JSV.common.JSViewer.jmolObject:null;null==b?this.vwr.selectedPanel.repaint():(b.repaint(a,!1),this.repaintDone());return!0});c(b,"repaintDone",function(){this.repaintPending=!1;this.notify()})});n("JSV.common");z(null,"JSV.common.ScaleData",["JSV.common.Coordinate"],function(){var b=w(function(){this.maxX=this.minX=this.pointCount=this.endDataPointIndex=this.startDataPointIndex=this.initMaxY=
this.initMinY=this.initMaxYOnScale=this.initMinYOnScale=0;this.firstX=NaN;this.specShift=this.maxXOnScale=this.minXOnScale=0;this.minorTickCounts=this.steps=this.exportPrecision=this.precision=null;this.maxY=this.minY=this.maxYOnScale=this.minYOnScale=0;this.isShiftZoomedY=!1;this.spectrumScaleFactor=1;this.spectrumYRef=0;this.userYFactor=1;this.yFactorForScale=this.xFactorForScale=this.maxY2D=this.minY2D=this.firstY=0;q(this,arguments)},JSV.common,"ScaleData",null);N(b,function(){this.precision=
E(2,0);this.exportPrecision=E(2,0);this.steps=R(2,0);this.minorTickCounts=E(2,0)});x(b,function(){});x(b,function(a,b){this.startDataPointIndex=a;this.endDataPointIndex=b;this.pointCount=this.endDataPointIndex-this.startDataPointIndex+1},"~N,~N");x(b,function(a,b,c,g,e){this.minX=JSV.common.Coordinate.getMinX(a,b,c);this.maxX=JSV.common.Coordinate.getMaxX(a,b,c);this.minY=JSV.common.Coordinate.getMinY(a,b,c);0<this.minY&&!g&&(this.minY=0);this.maxY=JSV.common.Coordinate.getMaxY(a,b,c);this.setScale(g,
e)},"~A,~N,~N,~B,~B");c(b,"setScale",function(a,b){this.setXScale();a||(this.maxXOnScale+=this.steps[0]/2);this.setYScale(this.minY,this.maxY,!0,b)},"~B,~B");c(b,"setXScale",function(){var a=this.setScaleParams(this.minX,this.maxX,0);this.firstX=Math.floor(this.minX/a)*a;1E-4<Math.abs((this.minX-this.firstX)/a)&&(this.firstX+=a);this.minXOnScale=this.minX;this.maxXOnScale=this.maxX});c(b,"isYZeroOnScale",function(){return this.minYOnScale<this.spectrumYRef&&this.maxYOnScale>this.spectrumYRef});c(b,
"setYScale",function(a,b,c,g){0==a&&0==b&&(b=1);this.isShiftZoomedY&&(a=this.minYOnScale,b=this.maxYOnScale);var e=this.setScaleParams(a,b,1),f=g?e/2:e/4;g=g?e/4:e/2;this.isShiftZoomedY||(this.minYOnScale=0==a?0:c?f*Math.floor(a/f):a,this.maxYOnScale=c?g*Math.ceil(1.05*b/g):b);this.firstY=0==a?0:Math.floor(a/f)*f;if(0>this.minYOnScale&&0<this.maxYOnScale)for(this.firstY=0;this.firstY-e>this.minYOnScale;)this.firstY-=e;else 0!=this.minYOnScale&&1E-4<Math.abs((a-this.firstY)/f)&&(this.firstY+=f);c&&
(this.initMinYOnScale=this.minYOnScale,this.initMaxYOnScale=this.maxYOnScale,this.initMinY=a,this.initMaxY=b)},"~N,~N,~B,~B");c(b,"scale2D",function(a){var b=this.maxY-this.minY;1==a?(this.maxY=this.initMaxY,this.minY=this.initMinY):this.maxY=this.minY+b/a},"~N");c(b,"setXRange",function(a,b){this.minX=a;this.maxX=b;this.setXScale()},"~N,~N");b.getXRange=c(b,"getXRange",function(a,b,c,g,e,f,j,k){for(var l=0,n=0,l=e;l<=f;l++)if(b[l].getXVal()>=c){j[a]=l;n=1;break}for(;++l<=f&&b[l].getXVal()<=g;)n++;
k[a]=j[a]+n-1;return n},"~N,~A,~N,~N,~N,~N,~A,~A");c(b,"setScaleParams",function(a,b,c){a=b==a?1:Math.abs(b-a)/14;var g=Math.log10(Math.abs(a));b=v(Math.floor(g));this.exportPrecision[c]=b;this.precision[c]=0>=b?Math.min(8,1-b):3<b?-2:0;a=0;for(g=Math.pow(10,g-b);g>JSV.common.ScaleData.NTICKS[a];)a++;this.steps[c]=Math.pow(10,b)*JSV.common.ScaleData.NTICKS[a];g=Math.log10(Math.abs(100010*this.steps[c]));b=g-Math.floor(g);for(a=g=0;a<JSV.common.ScaleData.NTICKS.length;a++)if(0.001>Math.abs(b-JSV.common.ScaleData.LOGTICKS[a])){g=
JSV.common.ScaleData.NTICKS[a];break}this.minorTickCounts[c]=g;return this.steps[c]},"~N,~N,~N");c(b,"isInRangeX",function(a){return a>=this.minX&&a<=this.maxX},"~N");c(b,"addSpecShift",function(a){this.specShift+=a;this.minX+=a;this.maxX+=a;this.minXOnScale+=a;this.maxXOnScale+=a;this.firstX+=a},"~N");c(b,"getInfo",function(a){a.put("specShift",Double.$valueOf(this.specShift));a.put("minX",Double.$valueOf(this.minX));a.put("maxX",Double.$valueOf(this.maxX));a.put("minXOnScale",Double.$valueOf(this.minXOnScale));
a.put("maxXOnScale",Double.$valueOf(this.maxXOnScale));a.put("minY",Double.$valueOf(this.minY));a.put("maxY",Double.$valueOf(this.maxY));a.put("minYOnScale",Double.$valueOf(this.minYOnScale));a.put("maxYOnScale",Double.$valueOf(this.maxYOnScale));a.put("minorTickCountX",Integer.$valueOf(this.minorTickCounts[0]));a.put("xStep",Double.$valueOf(this.steps[0]));return a},"java.util.Map");c(b,"setMinMax",function(a,b,c,g){this.minX=a;this.maxX=b;this.minY=c;this.maxY=g},"~N,~N,~N,~N");c(b,"toX",function(a,
b,c){return this.toXScaled(a,b,c,this.xFactorForScale)},"~N,~N,~B");c(b,"toX0",function(a,b,c,g){return this.toXScaled(a,c,g,(this.maxXOnScale-this.minXOnScale)/(c-b))},"~N,~N,~N,~B");c(b,"toXScaled",function(a,b,c,g){return c?this.maxXOnScale-(b-a)*g:this.minXOnScale+(b-a)*g},"~N,~N,~B,~N");c(b,"toPixelX",function(a,b,c,g){return this.toPixelXScaled(a,b,c,g,this.xFactorForScale)},"~N,~N,~N,~B");c(b,"toPixelX0",function(a,b,c,g){return this.toPixelXScaled(a,b,c,g,(this.maxXOnScale-this.minXOnScale)/
(c-b))},"~N,~N,~N,~B");c(b,"toPixelXScaled",function(a,b,c,g,e){a=v((a-this.minXOnScale)/e);return g?b+a:c-a},"~N,~N,~N,~B,~N");c(b,"toY",function(a,b){return this.maxYOnScale+(b-a)*this.yFactorForScale},"~N,~N");c(b,"toY0",function(a,b,c){return Math.max(this.minYOnScale,Math.min(this.maxYOnScale+(b-a)*((this.maxYOnScale-this.minYOnScale)/(c-b)),this.maxYOnScale))},"~N,~N,~N");c(b,"toPixelY",function(a,b){return Double.isNaN(a)?-2147483648:b-v(((a-this.spectrumYRef)*this.userYFactor+this.spectrumYRef-
this.minYOnScale)/this.yFactorForScale)},"~N,~N");c(b,"toPixelY0",function(a,b,c){return v(b+(this.maxYOnScale-a)/((this.maxYOnScale-this.minYOnScale)/(c-b)))},"~N,~N,~N");c(b,"setXYScale",function(a,b,c){var g=this.spectrumYRef,e=this.spectrumScaleFactor,f=1!=e||this.isShiftZoomedY,j=f?this.initMinYOnScale:this.minY,k=f?this.initMaxYOnScale:this.maxY;f&&g<j&&(g=j);f&&g>k&&(g=k);this.setYScale((j-g)/e+g,(k-g)/e+g,1==e,c);this.xFactorForScale=(this.maxXOnScale-this.minXOnScale)/(a-1);this.yFactorForScale=
(this.maxYOnScale-this.minYOnScale)/(b-1)},"~N,~N,~B");b.copyScaleFactors=c(b,"copyScaleFactors",function(a,b){for(var c=0;c<a.length;c++)b[c].spectrumScaleFactor=a[c].spectrumScaleFactor,b[c].spectrumYRef=a[c].spectrumYRef,b[c].userYFactor=a[c].userYFactor,b[c].specShift=a[c].specShift,b[c].isShiftZoomedY=a[c].isShiftZoomedY},"~A,~A");b.copyYScales=c(b,"copyYScales",function(a,b){for(var c=0;c<a.length;c++)b[c].initMinYOnScale=a[c].initMinYOnScale,b[c].initMaxYOnScale=a[c].initMaxYOnScale,b[c].minY=
a[c].minY,b[c].maxY=a[c].maxY,a[c].isShiftZoomedY&&(b[c].isShiftZoomedY=!0,b[c].minYOnScale=a[c].minYOnScale,b[c].maxYOnScale=a[c].maxYOnScale)},"~A,~A");b.setDataPointIndices=c(b,"setDataPointIndices",function(a,b,c,g,e,f){for(var j=0,k=a.size(),l=0;l<k;l++){var n=a.get(l).getXYCoords();JSV.common.ScaleData.getXRange(l,n,b,c,0,n.length-1,e,f)>=g&&j++}return j==k},"JU.Lst,~N,~N,~N,~A,~A");b.fixScale=c(b,"fixScale",function(a){if(!a.isEmpty())for(;;){for(var b,c=a.entrySet().iterator();c.hasNext()&&
((b=c.next())||1);){var g=b.getValue(),e=g.indexOf("E");0<=e&&(g=g.substring(0,e));if(0>g.indexOf(".")||!g.endsWith("0")&&!g.endsWith("."))return}for(c=a.entrySet().iterator();c.hasNext()&&((b=c.next())||1);)g=b.getValue(),e=g.indexOf("E"),0<=e?b.setValue(g.substring(0,e-1)+g.substring(e)):b.setValue(g.substring(0,g.length-1))}},"java.util.Map");c(b,"scaleBy",function(a){if(this.isShiftZoomedY){var b=this.isYZeroOnScale()?this.spectrumYRef:(this.minYOnScale+this.maxYOnScale)/2;this.minYOnScale=b-
(b-this.minYOnScale)/a;this.maxYOnScale=b-(b-this.maxYOnScale)/a}else this.spectrumScaleFactor*=a},"~N");b.NTICKS=E(-1,[2,5,10,10]);b.LOGTICKS=R(-1,[Math.log10(2),Math.log10(5),0,1])});n("JSV.common");z(["java.lang.Enum"],"JSV.common.ScriptToken",["java.util.Hashtable","JU.Lst","$.PT","$.SB","JSV.common.ScriptTokenizer"],function(){var b=w(function(){this.description=this.tip=null;q(this,arguments)},JSV.common,"ScriptToken",Enum);c(b,"getTip",function(){return"  "+("T"===this.tip?"TRUE/FALSE/TOGGLE":
"TF"===this.tip?"TRUE or FALSE":"C"===this.tip?"COLOR":this.tip)});x(b,function(){});x(b,function(a){this.tip=a;this.description=""},"~S");x(b,function(a,b){this.tip=a;this.description="-- "+b},"~S,~S");b.getParams=c(b,"getParams",function(){if(null==JSV.common.ScriptToken.htParams){JSV.common.ScriptToken.htParams=new java.util.Hashtable;for(var a,b=0,c=JSV.common.ScriptToken.values();b<c.length&&((a=c[b])||1);b++)JSV.common.ScriptToken.htParams.put(a.name(),a)}return JSV.common.ScriptToken.htParams});
b.getScriptToken=c(b,"getScriptToken",function(a){a=JSV.common.ScriptToken.getParams().get(a.toUpperCase());return null==a?JSV.common.ScriptToken.UNKNOWN:a},"~S");b.getScriptTokenList=c(b,"getScriptTokenList",function(a,b){null!=a&&(a=a.toUpperCase());var c=new JU.Lst;if(b){var g=JSV.common.ScriptToken.getScriptToken(a);null!=g&&c.addLast(g)}else for(var e=JSV.common.ScriptToken.getParams().entrySet().iterator();e.hasNext()&&((g=e.next())||1);)(null==a||g.getKey().startsWith(a))&&null!=g.getValue().tip&&
c.addLast(g.getValue());return c},"~S,~B");b.getValue=c(b,"getValue",function(a,b,c){if(!b.hasMoreTokens())return"";switch(a){default:return JSV.common.ScriptTokenizer.nextStringToken(b,!0);case JSV.common.ScriptToken.CLOSE:case JSV.common.ScriptToken.GETPROPERTY:case JSV.common.ScriptToken.INTEGRATION:case JSV.common.ScriptToken.INTEGRATE:case JSV.common.ScriptToken.JMOL:case JSV.common.ScriptToken.LABEL:case JSV.common.ScriptToken.LOAD:case JSV.common.ScriptToken.PEAK:case JSV.common.ScriptToken.PLOTCOLORS:case JSV.common.ScriptToken.YSCALE:case JSV.common.ScriptToken.WRITE:return JSV.common.ScriptToken.removeCommandName(c);
case JSV.common.ScriptToken.SELECT:case JSV.common.ScriptToken.OVERLAY:case JSV.common.ScriptToken.VIEW:case JSV.common.ScriptToken.ZOOM:return JSV.common.ScriptToken.removeCommandName(c).$replace(","," ").trim()}},"JSV.common.ScriptToken,JSV.common.ScriptTokenizer,~S");b.removeCommandName=c(b,"removeCommandName",function(a){var b=a.indexOf(" ");return 0>b?"":a.substring(b).trim()},"~S");b.getKey=c(b,"getKey",function(a){var b=a.nextToken();if(b.startsWith("#")||b.startsWith("//"))return null;b.equalsIgnoreCase("SET")&&
(b=a.nextToken());return b.toUpperCase()},"JSV.common.ScriptTokenizer");b.getTokens=c(b,"getTokens",function(a){a.startsWith("'")&&a.endsWith("'")&&(a='"'+JU.PT.trim(a,"'")+'"');var b=new JU.Lst;for(a=new JSV.common.ScriptTokenizer(a,!1);a.hasMoreTokens();){var c=JSV.common.ScriptTokenizer.nextStringToken(a,!1);if(c.startsWith("//")||c.startsWith("#"))break;b.addLast(c)}return b},"~S");b.getNameList=c(b,"getNameList",function(a){if(0==a.size())return"";for(var b=new JU.SB,c=0;c<a.size();c++)b.append(",").append(a.get(c).toString());
return b.toString().substring(1)},"JU.Lst");c(b,"getDescription",function(){return this.description});b.htParams=null;B(b,"UNKNOWN",0,[]);B(b,"APPLETID",1,[]);B(b,"APPLETREADYCALLBACKFUNCTIONNAME",2,[]);B(b,"AUTOINTEGRATE",3,["TF","automatically integrate an NMR spectrum"]);B(b,"BACKGROUNDCOLOR",4,["C","set the background color"]);B(b,"CLOSE",5,["spectrumId or fileName or ALL or VIEWS or SIMULATIONS","close one or more views or simulations"]);B(b,"COMPOUNDMENUON",6,[]);B(b,"COORDCALLBACKFUNCTIONNAME",
7,[]);B(b,"COORDINATESCOLOR",8,["C","set the color of the coordinates shown in the upper right-hand corner"]);B(b,"COORDINATESON",9,["T","turn on or off the coordinates shown in the upper right-hand corner"]);B(b,"DEBUG",10,["TF","turn debugging on and off"]);B(b,"DEFAULTLOADSCRIPT",11,['"script..."',"set the script to be run after each file is loaded"]);B(b,"DEFAULTNMRNORMALIZATION",12,["maxYvalue","set the value to be given the largest peak in an HMR spectrum"]);B(b,"DISPLAYFONTNAME",13,[]);B(b,
"DISPLAY1D",14,["T","turn on or off display of 1D spectra when 1D and 2D spectra are loaded"]);B(b,"DISPLAY2D",15,["T","turn on or off display of the 2D spectrum when 1D and 2D spectra are loaded"]);B(b,"ENABLEZOOM",16,["T","allow or disallow zooming"]);B(b,"ENDINDEX",17,[]);B(b,"FINDX",18,["value","move the vertical-line cursor to a specific x-axis value"]);B(b,"GETPROPERTY",19,["[propertyName] or ALL or NAMES","get a property value or all property values as key/value pairs, or a list of names"]);
B(b,"GETSOLUTIONCOLOR",20,[" FILL or FILLNONE or FILLALL or FILLALLNONE","estimate the solution color for UV/VIS spectra"]);B(b,"GRIDCOLOR",21,["C","color of the grid"]);B(b,"GRIDON",22,["T","turn the grid lines on or off"]);B(b,"HELP",23,["[command]","get this listing or help for a specific command"]);B(b,"HIDDEN",24,[]);B(b,"HIGHLIGHTCOLOR",25,["C","set the highlight color"]);B(b,"HIGHLIGHT",26,["OFF or X1 X2 [OFF] or X1 X2 r g b [a]","turns on or off a highlight color, possibily setting its color, where r g b a are 0-255 or 0.0-1.0"]);
B(b,"INTEGRALOFFSET",27,["percent","sets the integral offset from baseline"]);B(b,"INTEGRALRANGE",28,["percent","sets the height of the total integration"]);B(b,"INTEGRATE",29,["","see INTEGRATION"]);B(b,"INTEGRATION",30,["ON/OFF/TOGGLE/AUTO/CLEAR/MIN value/MARK ppm1-ppm2:norm,ppm3-ppm4,...","show/hide integration or set integrals (1D 1H NMR only)"]);B(b,"INTEGRALPLOTCOLOR",31,["C","color of the integration line"]);B(b,"INTEGRATIONRATIOS",32,["'x:value,x:value,..'","annotate the spectrum with numbers or text at specific x values"]);
B(b,"INTERFACE",33,["SINGLE or OVERLAY","set how multiple spectra are displayed"]);B(b,"INVERTY",34,["","invert the Y axis"]);B(b,"IRMODE",35,["A or T or TOGGLE","set the IR mode to absorption or transmission"]);B(b,"JMOL",36,["...Jmol command...","send a command to Jmol (if present)"]);B(b,"JSV",37,[]);B(b,"LABEL",38,['x y [color and/or "text"]',"add a text label"]);B(b,"LINK",39,["AB or ABC or NONE or ALL","synchronize the crosshair of a 2D spectrum with 1D cursors"]);B(b,"LOAD",40,['[APPEND] "fileName" [first] [last]; use "" for current file; $H1/name or $C13/name for simulation',
"load a specturm"]);B(b,"LOADFILECALLBACKFUNCTIONNAME",41,[]);B(b,"LOADIMAGINARY",42,["TF","set TRUE to load imaginary NMR component"]);B(b,"MENUON",43,[]);B(b,"OBSCURE",44,[]);B(b,"OVERLAY",45,[]);B(b,"OVERLAYSTACKED",46,["TF","whether viewed spectra are shown separately, in a stack"]);B(b,"PEAK",47,["[IR,CNMR,HNMR,MS] [#nnn or ID=xxx or text] [ALL], for example: PEAK HNMR #3","highlights a peak based on its number or title text, optionally checking all loade spectra"]);B(b,"PEAKCALLBACKFUNCTIONNAME",
48,[]);B(b,"PEAKLIST",49,["[THRESHOLD=n] [INTERPOLATE=PARABOLIC or NONE]","creates a peak list based on a threshold value and parabolic or no interpolation"]);B(b,"PEAKTABCOLOR",50,["C","sets the color of peak marks for a peak listing"]);B(b,"PEAKTABSON",51,["T","show peak tabs for simulated spectra"]);B(b,"PLOTAREACOLOR",52,["C","sets the color of the plot background"]);B(b,"PLOTCOLOR",53,["C","sets the color of the graph line"]);B(b,"PLOTCOLORS",54,["color,color,color,...","sets the colors of multiple plots"]);
B(b,"POINTSONLY",55,["TF","show points only for all data"]);B(b,"PRINT",56,["","prints the current spectrum"]);B(b,"REVERSEPLOT",57,["T","reverses the x-axis of a spectrum"]);B(b,"SCALEBY",58,["factor","multiplies the y-scale of the spectrum by a factor"]);B(b,"SCALECOLOR",59,["C","sets the color of the x-axis and y-axis scales"]);B(b,"SCRIPT",60,["filename.jsv","runs a script from a file"]);B(b,"SELECT",61,["spectrumID, spectrumID,...","selects one or more spectra based on IDs"]);B(b,"SETPEAK",62,
["xNew, xOld xNew, ?, or NONE","sets nearest peak to xOld ppm to a new value; NONE resets (1D NMR only)"]);B(b,"SETX",63,["xNew, xOld xNew, ?, or NONE","sets an old ppm position in the spectrum to a new value; NONE resets (1D NMR only)"]);B(b,"SHIFTX",64,["dx or NONE","shifts the x-axis of a 1D NMR spectrum by the given ppm; NONE resets (1D NMR only)"]);B(b,"SHOWERRORS",65,["shows recent errors"]);B(b,"SHOWINTEGRATION",66,["T","shows an integration listing"]);B(b,"SHOWKEY",67,["T","shows a color key when multiple spectra are displayed"]);
B(b,"SHOWMEASUREMENTS",68,["T","shows a listing of measurements"]);B(b,"SHOWMENU",69,["displays the popup menu"]);B(b,"SHOWPEAKLIST",70,["T","shows a listing for peak picking"]);B(b,"SHOWPROPERTIES",71,["displays the header information of a JDX file"]);B(b,"SHOWSOURCE",72,["displays the source JDX file associated with the selected data"]);B(b,"SPECTRUM",73,["id","displays a specific spectrum, where id is a number 1, 2, 3... or a file.spectrum number such as 2.1"]);B(b,"SPECTRUMNUMBER",74,["n","displays the nth spectrum loaded"]);
B(b,"STACKOFFSETY",75,["percent","sets the y-axis offset of stacked spectra"]);B(b,"STARTINDEX",76,[]);B(b,"SYNCCALLBACKFUNCTIONNAME",77,[]);B(b,"SYNCID",78,[]);B(b,"TEST",79,[]);B(b,"TITLEON",80,["T","turns the title in the bottom left corner on or off"]);B(b,"TITLEBOLDON",81,["T","makes the title bold"]);B(b,"TITLECOLOR",82,["C","sets the color of the title"]);B(b,"TITLEFONTNAME",83,["fontName","sets the title font"]);B(b,"UNITSCOLOR",84,["C","sets the color of the x-axis and y-axis units"]);B(b,
"VERSION",85,[]);B(b,"VIEW",86,['spectrumID, spectrumID, ... Example: VIEW 3.1, 3.2  or  VIEW "acetophenone"',"creates a view of one or more spectra"]);B(b,"XSCALEON",87,["T","set FALSE to turn off the x-axis scale"]);B(b,"XUNITSON",88,["T","set FALSE to turn off the x-axis units"]);B(b,"YSCALE",89,["[ALL] lowValue highValue"]);B(b,"YSCALEON",90,["T","set FALSE to turn off the y-axis scale"]);B(b,"YUNITSON",91,["T","set FALSE to turn off the y-axis units"]);B(b,"WINDOW",92,[]);B(b,"WRITE",93,['[XY,DIF,DIFDUP,PAC,FIX,SQZ,AML,CML,JPG,PDF,PNG,SVG] "filename"',
"writes a file in the specified format"]);B(b,"ZOOM",94,["OUT or PREVIOUS or NEXT or x1,x2 or x1,y1 x2,y2","sets the zoom"]);B(b,"ZOOMBOXCOLOR",95,[]);B(b,"ZOOMBOXCOLOR2",96,[])});n("JSV.common");z(null,"JSV.common.ScriptTokenizer",["JU.PT"],function(){var b=w(function(){this.str=null;this.pt=-1;this.len=0;this.isCmd=!1;this.doCheck=!0;q(this,arguments)},JSV.common,"ScriptTokenizer",null);x(b,function(a,b){this.str=a;this.len=a.length;this.isCmd=b},"~S,~B");b.nextStringToken=c(b,"nextStringToken",
function(a,b){var c=a.nextToken();return b&&'"'==c.charAt(0)&&c.endsWith('"')&&1<c.length?JU.PT.trimQuotes(c):c},"JSV.common.ScriptTokenizer,~B");c(b,"nextToken",function(){this.doCheck&&this.hasMoreTokens();for(var a=this.pt,b='"'==this.str.charAt(this.pt);++this.pt<this.len;){switch(this.str.charAt(this.pt).charCodeAt(0)){case 34:if(b){if(this.isCmd){b=!1;continue}this.pt++;break}this.isCmd&&(b=!0);continue;case 32:if(!this.isCmd&&!b)break;continue;case 59:case 10:if(this.isCmd&&!b)break;continue;
default:continue}break}this.doCheck=!0;return this.str.substring(a,this.pt)});c(b,"hasMoreTokens",function(){for(;++this.pt<this.len;){switch(this.str.charAt(this.pt).charCodeAt(0)){case 32:case 59:case 10:continue}break}this.doCheck=!1;return this.pt<this.len});c(b,"getRemainingScript",function(){return this.str.substring(this.pt)})});n("JSV.common");var Ha=w(function(){this.isub=0;this.title=null;q(this,arguments)},JSV.common,"SubSpecChangeEvent",null);x(Ha,function(b,a){this.isub=b;this.title=
a},"~N,~S");c(Ha,"isValid",function(){return null!=this.title});c(Ha,"getSubIndex",function(){return this.isub});g(Ha,"toString",function(){return this.title});n("JSV.common");z(null,"JSV.common.ViewData",["JSV.common.Coordinate","$.ScaleData"],function(){var b=w(function(){this.thisScale=this.scaleData=null;this.iThisScale=this.nSpectra=0;this.spectra=null;q(this,arguments)},JSV.common,"ViewData",null);x(b,function(a,b,c,g,e,f,j){this.nSpectra=j?1:a.size();this.scaleData=Array(this.nSpectra);for(j=
0;j<this.nSpectra;j++)this.scaleData[j]=new JSV.common.ScaleData(g[j],e[j]);this.init(a,b,c,f)},"JU.Lst,~N,~N,~A,~A,~B,~B");x(b,function(a,b,c,g){this.nSpectra=a.size();var e=a.get(0).getXYCoords().length;this.scaleData=Array(1);this.scaleData[0]=new JSV.common.ScaleData(0,e-1);this.init(a,b,c,g)},"JU.Lst,~N,~N,~B");c(b,"getScaleData",function(){return this.scaleData});c(b,"getScale",function(){return this.thisScale});c(b,"init",function(a,b,c,g){null==a?a=this.spectra:this.spectra=a;this.thisScale=
this.scaleData[this.iThisScale=0];for(var e=0;e<this.scaleData.length;e++)this.scaleData[e].userYFactor=a.get(e).getUserYFactor(),this.scaleData[e].spectrumYRef=a.get(e).getYRef();this.resetScaleFactors();var f=JSV.common.Coordinate.getMinX(a,this),j=JSV.common.Coordinate.getMaxX(a,this),k=JSV.common.Coordinate.getMinYUser(a,this),l=JSV.common.Coordinate.getMaxYUser(a,this);b!=c&&(k=b,l=c,k>l&&(e=k,k=l,l=e));a=a.get(0).isInverted();for(e=0;e<this.scaleData.length;e++)this.scaleData[e].setMinMax(f,
j,k,l),this.scaleData[e].setScale(g,a)},"JU.Lst,~N,~N,~B");c(b,"newSpectrum",function(a){this.init(a,0,0,!1)},"JU.Lst");c(b,"setXRangeForSubSpectrum",function(a){this.setXRange(0,a,this.scaleData[0].minX,this.scaleData[0].maxX,0,a.length-1)},"~A");c(b,"setXRange",function(a,b,c,g,e,f){for(var j=0,k=0,j=e;j<=f;j++)if(e=b[j].getXVal(),e>=c){this.scaleData[a%this.scaleData.length].startDataPointIndex=j;break}for(;j<=f&&!(e=b[j].getXVal(),k++,e>=g);j++);this.scaleData[a%this.scaleData.length].endDataPointIndex=
j;return k},"~N,~A,~N,~N,~N,~N");c(b,"getStartingPointIndex",function(a){return this.scaleData[a%this.scaleData.length].startDataPointIndex},"~N");c(b,"getEndingPointIndex",function(a){return this.scaleData[a%this.scaleData.length].endDataPointIndex},"~N");c(b,"areYScalesSame",function(a,b){a%=this.scaleData.length;b%=this.scaleData.length;return this.scaleData[a].minYOnScale==this.scaleData[b].minYOnScale&&this.scaleData[a].maxYOnScale==this.scaleData[b].maxYOnScale},"~N,~N");c(b,"setScale",function(a,
b,c,g){this.iThisScale=a%this.scaleData.length;this.thisScale=this.scaleData[this.iThisScale];this.thisScale.setXYScale(b,c,g)},"~N,~N,~N,~B");c(b,"resetScaleFactors",function(){for(var a=0;a<this.scaleData.length;a++)this.scaleData[a].spectrumScaleFactor=1});c(b,"scaleSpectrum",function(a,b){if(!(0>=b||a>=this.nSpectra))if(-2==a)this.thisScale.scale2D(b);else if(0>a)for(a=0;a<this.scaleData.length;a++)this.scaleData[a].scaleBy(b);else this.scaleData[a%this.scaleData.length].scaleBy(b)},"~N,~N");
c(b,"getNewScales",function(a,b,c,g){if(b)return this.scaleData;a%=this.scaleData.length;b=(c-this.thisScale.minYOnScale)/(this.thisScale.maxYOnScale-this.thisScale.minYOnScale);g=(g-this.thisScale.minYOnScale)/(this.thisScale.maxYOnScale-this.thisScale.minYOnScale);c=Array(this.scaleData.length);for(var e=0;e<this.scaleData.length;e++)c[e]=0<=a&&e!=a?this.scaleData[e]:new JSV.common.ScaleData;JSV.common.ScaleData.copyScaleFactors(this.scaleData,c);JSV.common.ScaleData.copyYScales(this.scaleData,
c);for(e=0;e<this.scaleData.length;e++)0<=a&&e!=a||(c[e].isShiftZoomedY=!0,c[e].minYOnScale=this.scaleData[e].minYOnScale*(1-b)+b*this.scaleData[e].maxYOnScale,c[e].maxYOnScale=this.scaleData[e].minYOnScale*(1-g)+g*this.scaleData[e].maxYOnScale);return c},"~N,~B,~N,~N")});n("JSV.common");K(JSV.common,"XYScaleConverter");n("JSV.common");G(JSV.common,"ZoomEvent",null);n("JSV.dialog");z(["JSV.api.AnnotationData","JSV.common.Annotation"],"JSV.dialog.JSVDialog",["JU.DF","$.PT","JSV.common.IntegralData",
"$.PeakData","JSV.dialog.DialogManager"],function(){var b=w(function(){this.myParams=this.xyData=this.combo1=this.txt3=this.txt2=this.txt1=this.jsvp=this.dialog=this.manager=this.$spec=this.vwr=this.title=this.type=this.options=this.optionKey=null;this.precision=1;this.showHideButton=this.loc=null;this.defaultVisible=this.isNumeric=this.addApplyBtn=this.addCombo1=this.addClearBtn=!1;this.tableData=this.graphSetKey=this.subType=null;this.addUnits=!1;this.unitPtr=this.formatOptions=this.unitOptions=
null;this.isON=!0;this.lastNorm=1;this.iSelected=this.iRowColSelected=-1;this.skipCreate=!1;this.iColSelected=this.iRowSelected=-1;q(this,arguments)},JSV.dialog,"JSVDialog",JSV.common.Annotation,JSV.api.AnnotationData);g(b,"isDialog",function(){return!0});c(b,"setParams",function(a,b,c){this.title=a=JSV.dialog.DialogManager.fixTitle(a);this.vwr=b;this.$spec=c;this.manager=b.getDialogManager();this.jsvp=b.selectedPanel;this.myParams=b.getPlatformInterface("Parameters").setName("dialogParams");this.subType=
null==c?"!":c.getTypeLabel();this.optionKey=this.type+"_"+this.subType;this.options=this.manager.getDialogOptions();null!=c&&(a=c.getDefaultAnnotationInfo(this.type),this.options.put(this.optionKey,a),this.unitOptions=a[0],this.formatOptions=a[1],this.unitPtr=this.options.get(this.optionKey+"_unitPtr"),null==this.unitPtr&&(this.unitPtr=a[2]));switch(this.type){case JSV.common.Annotation.AType.Integration:this.addApplyBtn=this.defaultVisible=this.addClearBtn=this.isNumeric=!0;break;case JSV.common.Annotation.AType.Measurements:this.defaultVisible=
this.addCombo1=this.addClearBtn=this.isNumeric=!0;break;case JSV.common.Annotation.AType.PeakList:this.defaultVisible=this.addApplyBtn=this.isNumeric=!0;break;case JSV.common.Annotation.AType.Views:this.defaultVisible=!0}this.initDialog();return this},"~S,JSV.common.JSViewer,JSV.common.Spectrum");c(b,"initDialog",function(){this.dialog=this.manager.getDialog(this);this.restoreDialogPosition(this.jsvp,this.getPosXY());this.dialog.setTitle(this.title);this.layoutDialog()});c(b,"layoutDialog",function(){this.dialog.startLayout();
this.addUniqueControls();this.isNumeric&&(this.getUnitOptions(),this.addCombo1&&(this.combo1=this.dialog.addSelectOption("cmbUnits","Units",this.unitOptions,this.unitPtr.intValue(),this.addUnits)),this.addApplyBtn&&this.dialog.addButton("btnApply","Apply"),this.showHideButton=this.dialog.addButton("btnShow","Show"),this.addClearBtn&&this.dialog.addButton("btnClear","Clear"));this.dialog.endLayout();this.checkEnables();this.dialog.setVisible(this.defaultVisible)});c(b,"callbackAD",function(a,b){if(a.equals("FOCUS"))this.eventFocus();
else if(a.equals("tableSelect"))this.tableSelect(b);else if(a.equals("btnClear"))this.clear();else if(a.equals("btnApply"))this.eventApply();else if(a.equals("btnShow")){var c=this.dialog.getText(this.showHideButton);this.eventShowHide(c.equals("Show"))}else if(a.equals("cmbUnits"))this.setPrecision(this.dialog.getSelectedIndex(this.combo1));else if(a.startsWith("txt"))this.eventApply();else if(a.equals("windowClosing"))return this.done(),!0;null!=this.jsvp&&this.jsvp.doRepaint(!0);return!0},"~S,~S");
c(b,"addUniqueControls",function(){},"JSV.dialog.DialogManager");g(b,"getAType",function(){return this.type});g(b,"getGraphSetKey",function(){return this.graphSetKey});g(b,"setGraphSetKey",function(a){this.graphSetKey=a},"~S");g(b,"getSpectrum",function(){return this.$spec});g(b,"getState",function(){return this.isON});g(b,"setState",function(a){this.isON=a},"~B");c(b,"checkEnables",function(){var a=this.checkVisible();this.dialog.setText(this.showHideButton,a?"Hide":"Show")});c(b,"createTable",function(a,
b,c){this.tableData=a;this.dialog.createTable(a,b,c)},"~A,~A,~A");c(b,"setTableSelectionEnabled",function(a){this.dialog.setCellSelectionEnabled(a)},"~B");c(b,"getParameters",function(){return this.myParams});c(b,"showMessage",function(a,b,c){this.manager.showMessageDialog(this.dialog,a,b,c)},"~S,~S,~N");c(b,"setThreshold",function(a){this.dialog.setText(this.txt1,this.getThreasholdText(a))},"~N");c(b,"setComboSelected",function(a){this.dialog.setSelectedIndex(this.combo1,a)},"~N");c(b,"applyFromFields",
function(){this.apply(null)});c(b,"reEnable",function(){this.paramsReEnable();return this});c(b,"dispose",function(){this.dialog.dispose()});c(b,"setVisible",function(a){this.dialog.setVisible(a)},"~B");g(b,"isVisible",function(){return this.dialog.isVisible()});c(b,"selectTableRow",function(a){this.dialog.selectTableRow(a)},"~N");c(b,"repaint",function(){this.dialog.repaint()});c(b,"setFields",function(){switch(this.type){case JSV.common.Annotation.AType.PeakList:this.myParams=this.xyData.getParameters(),
this.setThreshold(this.myParams.peakListThreshold),this.setComboSelected(this.myParams.peakListInterpolation.equals("none")?1:0),this.createData()}});c(b,"setFocus",function(a){this.dialog.setFocus(a)},"~B");c(b,"update",function(a,b,c){this.selectTableRow(-1);switch(this.type){case JSV.common.Annotation.AType.Integration:this.loadData();this.checkEnables();break;case JSV.common.Annotation.AType.Measurements:this.loadData();this.checkEnables();break;case JSV.common.Annotation.AType.PeakList:20<c&&
this.applyFromFields();if(null==this.xyData||null==a||20<c)break;c=0;var g=1E100;a=a.getXVal();var e=this.xyData;b=Math.abs(b/20);for(var f=e.size();0<=--f;){var j=Math.abs(a-e.get(f).getXVal());j<g&&(g=j,c=f)}g<b&&(this.selectTableRow(e.size()-2-c),this.repaint())}},"JSV.common.Coordinate,~N,~N");c(b,"getPeakData",function(){var a=new JSV.common.PeakData(JSV.common.Annotation.AType.PeakList,this.$spec);a.setPeakList(this.myParams,this.precision,this.jsvp.getPanelData().getView());this.xyData=a;return null});
g(b,"getData",function(){null==this.xyData&&this.createData();return this.xyData});c(b,"setData",function(a){this.myParams=a.getParameters();this.xyData=a},"JSV.api.AnnotationData");g(b,"setSpecShift",function(a){null!=this.xyData&&this.xyData.setSpecShift(a)},"~N");c(b,"setType",function(a){this.type=a;switch(a){case JSV.common.Annotation.AType.Measurements:this.addUnits=!0}},"JSV.common.Annotation.AType");c(b,"apply",function(a){try{switch(this.type){case JSV.common.Annotation.AType.Integration:var b=
Double.parseDouble(a[0]),c=Double.parseDouble(a[1]);this.myParams.integralOffset=b;this.myParams.integralRange=c;this.myParams.integralDrawAll=!1;this.getData().update(this.myParams);break;case JSV.common.Annotation.AType.NONE:return;case JSV.common.Annotation.AType.PeakList:this.skipCreate||(this.setThreshold(NaN),this.createData());this.skipCreate=!1;break;case JSV.common.Annotation.AType.Views:this.vwr.parameters.viewOffset=Double.parseDouble(a[0])}this.loadData();this.checkEnables();this.jsvp.doRepaint(!0)}catch(g){if(!D(g,
Exception))throw g;}},"~A");c(b,"done",function(){null!=this.jsvp&&null!=this.$spec&&this.jsvp.getPanelData().removeDialog(this);null!=this.xyData&&this.xyData.setState(this.isON);this.saveDialogPosition(this.getPosXY());this.dispose();this.jsvp.doRepaint(!0)});c(b,"restoreDialogPosition",function(a,b){if(null!=a){-2147483648==b[0]&&(b[0]=0,b[1]=-20);var c=this.manager.getLocationOnScreen(a),g=a.getHeight();this.loc=E(-1,[Math.max(0,c[0]+b[0]),Math.max(0,c[1]+g+b[1])]);this.dialog.setIntLocation(this.loc)}},
"JSV.api.JSVPanel,~A");c(b,"saveDialogPosition",function(a){try{var b=this.manager.getLocationOnScreen(this.dialog);a[0]+=b[0]-this.loc[0];a[1]+=b[1]-this.loc[1]}catch(c){if(!D(c,Exception))throw c;}},"~A");c(b,"getThreasholdText",function(a){if(Double.isNaN(a)){a=this.jsvp.getPanelData();var b=a.getSpectrum().isInverted()?0.1:0.9,c=a.getClickedCoordinate();a=null==c?(a.getView().minYOnScale*b+a.getView().maxYOnScale)*(1-b):c.getYVal()}return" "+JU.DF.formatDecimalDbl(a,1E3>a?2:-2)},"~N");c(b,"checkVisible",
function(){return this.vwr.pd().getShowAnnotation(this.type)});c(b,"getUnitOptions",function(){var a=this.optionKey+"_format";null==this.options.get(a)&&this.options.put(a,Integer.$valueOf(this.formatOptions[null==this.unitPtr?0:this.unitPtr.intValue()]))});c(b,"eventFocus",function(){null!=this.$spec&&this.jsvp.getPanelData().jumpToSpectrum(this.$spec);switch(this.type){case JSV.common.Annotation.AType.Integration:0<=this.iRowSelected&&(this.iRowSelected++,this.tableCellSelect(-1,-1));break;case JSV.common.Annotation.AType.PeakList:this.createData(),
this.skipCreate=!0}});c(b,"eventApply",function(){switch(this.type){case JSV.common.Annotation.AType.PeakList:this.createData(),this.skipCreate=!0}this.applyFromFields()});c(b,"eventShowHide",function(a){(this.isON=a)&&this.eventApply();this.jsvp.doRepaint(!0);this.checkEnables()},"~B");c(b,"clear",function(){this.setState(!0);null!=this.xyData&&(this.xyData.clear(),this.applyFromFields())});c(b,"paramsReEnable",function(){switch(this.type){case JSV.common.Annotation.AType.PeakList:this.skipCreate=
!0}this.setVisible(!0);this.isON=!0;this.applyFromFields()});c(b,"tableCellSelect",function(a,b){System.out.println(a+" jSVDial "+b);0>a&&(a=v(this.iRowColSelected/1E3),b=this.iRowColSelected%1E3,this.iRowColSelected=-1);var c=this.tableData[a][1],g=1E3*a+b;if(g!=this.iRowColSelected){this.iRowColSelected=g;System.out.println("Setting rc = "+this.iRowColSelected+" "+this.$spec);this.selectTableRow(this.iRowSelected);try{switch(this.type){case JSV.common.Annotation.AType.Integration:this.callback("SHOWSELECTION",
c.toString());this.checkEnables();break;case JSV.common.Annotation.AType.PeakList:try{switch(b){case 6:case 5:case 4:var e=Double.parseDouble(c),f=Double.parseDouble(this.tableData[a+3-b][1]);this.jsvp.getPanelData().setXPointers(this.$spec,e,this.$spec,f);break;default:this.jsvp.getPanelData().findX(this.$spec,Double.parseDouble(c))}}catch(j){if(D(j,Exception))this.jsvp.getPanelData().findX(this.$spec,1E100);else throw j;}this.jsvp.doRepaint(!1);break;case JSV.common.Annotation.AType.OverlayLegend:this.jsvp.getPanelData().setSpectrum(a,
!1)}}catch(k){if(!D(k,Exception))throw k;}}},"~N,~N");c(b,"loadData",function(){var a,b,c;switch(this.type){case JSV.common.Annotation.AType.Integration:null==this.xyData&&this.createData();this.iSelected=-1;a=this.xyData.getMeasurementListArray(null);b=this.xyData.getDataHeader();c=E(-1,[40,65,65,50]);this.createTable(a,b,c);break;case JSV.common.Annotation.AType.Measurements:if(null==this.xyData)break;a=this.xyData.getMeasurementListArray(this.dialog.getSelectedItem(this.combo1).toString());b=this.xyData.getDataHeader();
c=E(-1,[40,65,65,50]);this.createTable(a,b,c);break;case JSV.common.Annotation.AType.PeakList:null==this.xyData&&this.createData();a=this.xyData.getMeasurementListArray(null);b=this.xyData.getDataHeader();c=E(-1,[40,65,50,50,50,50,50]);this.createTable(a,b,c);this.setTableSelectionEnabled(!0);break;case JSV.common.Annotation.AType.OverlayLegend:b=u(-1,["No.","Plot Color","Title"]),a=this.vwr.selectedPanel.getPanelData().getOverlayLegendData(),c=E(-1,[30,60,250]),this.createTable(a,b,c),this.setTableSelectionEnabled(!0)}});
c(b,"createData",function(){switch(this.type){case JSV.common.Annotation.AType.Integration:this.xyData=new JSV.common.IntegralData(this.$spec,this.myParams);this.iSelected=-1;break;case JSV.common.Annotation.AType.PeakList:try{var a=Double.parseDouble(this.dialog.getText(this.txt1));this.myParams.peakListThreshold=a;this.myParams.peakListInterpolation=this.dialog.getSelectedItem(this.combo1).toString();this.myParams.precision=this.precision;var b=new JSV.common.PeakData(JSV.common.Annotation.AType.PeakList,
this.$spec);b.setPeakList(this.myParams,this.precision,this.jsvp.getPanelData().getView());this.xyData=b;this.loadData()}catch(c){if(!D(c,Exception))throw c;}}});c(b,"setPrecision",function(a){this.precision=this.formatOptions[a]},"~N");c(b,"tableSelect",function(a){if("true".equals(this.getField(a,"adjusting")))this.iColSelected=this.iRowSelected=-1,System.out.println("adjusting"+a);else{var b=JU.PT.parseInt(this.getField(a,"index"));switch("ROW COL ROWCOL".indexOf(this.getField(a,"selector"))){case 8:this.iColSelected=
JU.PT.parseInt(this.getField(a,"index2"));case 0:this.iRowSelected=b;System.out.println("r set to "+b);break;case 4:this.iColSelected=b,System.out.println("c set to "+b)}0<=this.iColSelected&&0<=this.iRowSelected&&this.tableCellSelect(this.iRowSelected,this.iColSelected)}},"~S");c(b,"getField",function(a,b){a+="&";var c="&"+b+"=",g=a.indexOf(c);return 0>g?null:a.substring(g+c.length,a.indexOf("&",g+1))},"~S,~S")});n("JSV.exception");z(["java.lang.Exception"],"JSV.exception.JSVException",null,function(){G(JSV.exception,
"JSVException",Exception)});n("JSV.js2d");var $=G(JSV.js2d,"Display",null);$.getFullScreenDimensions=c($,"getFullScreenDimensions",function(b,a){a[0]=b.width;a[1]=b.height},"~O,~A");$.hasFocus=c($,"hasFocus",function(){return!0},"~O");$.requestFocusInWindow=c($,"requestFocusInWindow",function(){},"~O");$.repaint=c($,"repaint",function(){},"~O");$.renderScreenImage=c($,"renderScreenImage",function(){},"J.api.PlatformViewer,~O,~O");$.setTransparentCursor=c($,"setTransparentCursor",function(){},"~O");
$.setCursor=c($,"setCursor",function(){},"~N,~O");$.prompt=c($,"prompt",function(b,a){var c=prompt(b,a);return null!=c?c:"null"},"~S,~S,~A,~B");$.convertPointFromScreen=c($,"convertPointFromScreen",function(){},"~O,JU.P3");n("JSV.js2d");var X=G(JSV.js2d,"Image",null);X.getWidth=c(X,"getWidth",function(b){return b.imageWidth?b.imageWidth:b.width},"~O");X.getHeight=c(X,"getHeight",function(b){return b.imageHeight?b.imageHeight:b.height},"~O");X.grabPixels=c(X,"grabPixels",function(b,a,c){var g=null;
if(b._buf32)return b._buf32;g=b.getImageData(0,0,a,c).data;return JSV.js2d.Image.toIntARGB(g)},"~O,~N,~N");X.toIntARGB=c(X,"toIntARGB",function(b){for(var a=v(b.length/4),c=E(a,0),g=0,r=0;g<a;r++)c[g++]=b[r++]<<16|b[r++]<<8|b[r++]|4278190080;return c},"~A");X.fromIntARGB=c(X,"fromIntARGB",function(b,a){for(var c=a.length>>2,g=0,r=0;g<c;g++)a[r++]=b[g]>>16&255,a[r++]=b[g]>>8&255,a[r++]=b[g]&255,a[r++]=255},"~A,~A");X.getTextPixels=c(X,"getTextPixels",function(b,a,c,g,r,e){c.fillStyle="#000000";c.fillRect(0,
0,g,r);c.fillStyle="#FFFFFF";c.font=a.font;c.fillText(b,0,e);return JSV.js2d.Image.grabPixels(c,g,r)},"~S,JU.Font,~O,~N,~N,~N");X.allocateRgbImage=c(X,"allocateRgbImage",function(b,a,c,g,r,e){null==e&&(e={width:b,height:a});e.buf32=c},"~N,~N,~A,~N,~B,~O");X.getStaticGraphics=c(X,"getStaticGraphics",function(b){return JSV.js2d.Image.getGraphics(b)},"~O,~B");X.getGraphics=c(X,"getGraphics",function(b){return b.getContext("2d")},"~O");X.drawImage=c(X,"drawImage",function(b,a,c,g){this.fromIntARGB(a.buf32,
a.buf8);b.putImageData(a.imgdata,c,g)},"~O,~O,~N,~N,~N,~N");n("JSV.js2d");z(["J.api.GenericFileInterface"],"JSV.js2d.JsFile",["JU.PT","JSV.common.JSVFileManager"],function(){var b=w(function(){this.fullName=this.name=null;q(this,arguments)},JSV.js2d,"JsFile",null,J.api.GenericFileInterface);x(b,function(a){this.name=a.$replace("\\","/");this.fullName=a;!this.fullName.startsWith("/")&&0>JSV.common.JSVFileManager.urlTypeIndex(a)&&(this.fullName=JSV.common.JSVFileManager.jsDocumentBase+"/"+this.fullName);
this.fullName=JU.PT.rep(this.fullName,"/./","/");a.substring(a.lastIndexOf("/")+1)},"~S");b.newFile=c(b,"newFile",function(a){return new JSV.js2d.JsFile(a)},"~S");g(b,"getParentAsFile",function(){var a=this.fullName.lastIndexOf("/");return 0>a?null:new JSV.js2d.JsFile(this.fullName.substring(0,a))});g(b,"getFullPath",function(){return this.fullName});g(b,"getName",function(){return this.name});g(b,"isDirectory",function(){return this.fullName.endsWith("/")});g(b,"length",function(){return 0});b.getURLContents=
c(b,"getURLContents",function(a,b,c){try{var g=a.openConnection();null!=b?g.outputBytes(b):null!=c&&g.outputString(c);return g.getContents()}catch(e){if(D(e,Exception))return e.toString();throw e;}},"java.net.URL,~A,~S")});n("JSV.js2d");z(["JSV.api.JSVFileHelper"],"JSV.js2d.JsFileHelper",["JU.PT","JSV.common.JSViewer","JSV.js2d.JsFile"],function(){var b=w(function(){this.vwr=null;q(this,arguments)},JSV.js2d,"JsFileHelper",null,JSV.api.JSVFileHelper);g(b,"set",function(a){this.vwr=a;return this},"JSV.common.JSViewer");
g(b,"getFile",function(a){var b=null;a=JU.PT.rep(a,"=","_");b=prompt("Enter a file name:",a);return null==b?null:new JSV.js2d.JsFile(b)},"~S,~O,~B");g(b,"setDirLastExported",function(a){return a},"~S");g(b,"setFileChooser",function(){},"JSV.common.ExportType");g(b,"showFileOpenDialog",function(a,b){JSV.common.JSViewer.jmolObject.loadFileAsynchronously(this,this.vwr.html5Applet,"?",b);return null},"~O,~A");c(b,"setData",function(a,b,c){if(null!=a)if(null==b)this.vwr.selectedPanel.showMessage(a,"File Open Error");
else{var g=null==c?null:"",e=!1,e=c[0],g=c[1];this.vwr.si.siOpenDataOrFile(String.instantialize(b),"cache://"+a,null,null,-1,-1,e,null,null);null!=g&&this.vwr.runScript(g)}},"~S,~O,~A");g(b,"getUrlFromDialog",function(a,b){return prompt(a,b)},"~S,~S")});n("JSV.js2d");var ma=G(JSV.js2d,"JsFont",null);ma.newFont=c(ma,"newFont",function(b,a,c,g,n){b=b.equals("Monospaced")?"Courier":b.startsWith("Sans")?"Sans-Serif":"Serif";return(a?"bold ":"")+(c?"italic ":"")+g+n+" "+b},"~S,~B,~B,~N,~S");ma.getFontMetrics=
c(ma,"getFontMetrics",function(b,a){a.font!=b.font&&(a.font=b.font,b.font=a.font,a._fontAscent=Math.ceil(b.fontSize),a._fontDescent=Math.ceil(0.25*b.fontSize));return a},"JU.Font,~O");ma.getAscent=c(ma,"getAscent",function(b){return Math.ceil(b._fontAscent)},"~O");ma.getDescent=c(ma,"getDescent",function(b){return Math.ceil(b._fontDescent)},"~O");ma.stringWidth=c(ma,"stringWidth",function(b,a){b.fontMetrics.font=b.font;return Math.ceil(b.fontMetrics.measureText(a).width)},"JU.Font,~S");n("JSV.js2d");
z(["J.api.GenericGraphics"],"JSV.js2d.JsG2D",["JU.CU","JSV.common.JSViewer","JS.Color"],function(){var b=w(function(){this.windowHeight=this.windowWidth=0;this.inPath=this.isShifted=!1;q(this,arguments)},JSV.js2d,"JsG2D",null,J.api.GenericGraphics);g(b,"getColor4",function(a,b,c,g){return JS.Color.get4(a,b,c,g)},"~N,~N,~N,~N");g(b,"getColor3",function(a,b,c){return JS.Color.get3(a,b,c)},"~N,~N,~N");g(b,"getColor1",function(a){return JS.Color.get1(a)},"~N");g(b,"newGrayScaleImage",function(a,b,c,g,
e){return JSV.common.JSViewer.jmolObject.newGrayScaleImage(a,b,c,g,e)},"~O,~O,~N,~N,~A");g(b,"drawGrayScaleImage",function(a,b,c,g,e,f,j,k,l,n){a=e-c+1;f=f-g+1;l=l-j+1;n=n-k+1;e=b.w*a/l;var m=b.h*f/n;b.width=e;b.height=m;var p=b.div;b=b.layer;b.style.left=c+"px";b.style.top=g+"px";b.style.width=a+"px";b.style.height=f+"px";p.style.left=-j*a/l+"px";p.style.top=-k*f/n+"px";p.style.width=e+"px";p.style.height=m+"px"},"~O,~O,~N,~N,~N,~N,~N,~N,~N,~N");g(b,"drawLine",function(a,b,c,g,e){var f=this.inPath;
f||a.beginPath();a.moveTo(b,c);a.lineTo(g,e);f||a.stroke()},"~O,~N,~N,~N,~N");g(b,"drawCircle",function(a,b,c,g){g/=2;a.beginPath();a.arc(b+g,c+g,g,0,2*Math.PI,!1);a.stroke()},"~O,~N,~N,~N");g(b,"drawPolygon",function(a,b,c,g){this.doPoly(a,b,c,g,!1)},"~O,~A,~A,~N");c(b,"doPoly",function(a,b,c,g,e){a.beginPath();a.moveTo(b[0],c[0]);for(var f=1;f<g;f++)a.lineTo(b[f],c[f]);e?a.fill():a.stroke()},"~O,~A,~A,~N,~B");g(b,"drawRect",function(a,b,c,g,e){a.beginPath();a.rect(b,c,g,e);a.stroke()},"~O,~N,~N,~N,~N");
g(b,"drawString",function(a,b,c,g){a.fillText(b,c,g)},"~O,~S,~N,~N");g(b,"drawStringRotated",function(){},"~O,~S,~N,~N,~N");g(b,"fillBackground",function(a,b){null==b?(this.isShifted||(a.translate(-0.5,-0.5),this.isShifted=!0),a.clearRect(0,0,this.windowWidth,this.windowHeight)):(this.setGraphicsColor(a,b),this.fillRect(a,0,0,this.windowWidth,this.windowHeight))},"~O,javajs.api.GenericColor");g(b,"fillCircle",function(a,b,c,g){g/=2;a.beginPath();a.arc(b+g,c+g,g,0,2*Math.PI,!1);a.fill()},"~O,~N,~N,~N");
g(b,"fillPolygon",function(a,b,c,g){this.doPoly(a,b,c,g,!0)},"~O,~A,~A,~N");g(b,"fillRect",function(a,b,c,g,e){a.fillRect(b,c,g,e)},"~O,~N,~N,~N,~N");g(b,"setGraphicsColor",function(a,b){var c=JU.CU.toCSSString(b);a.fillStyle=a.strokeStyle=c},"~O,javajs.api.GenericColor");g(b,"setFont",function(a,b){var c=b.getInfo(),g=c.indexOf(" "),c=c.substring(0,g)+"px"+c.substring(g);a.font=c;return b},"~O,JU.Font");g(b,"setStrokeBold",function(a,b){a.lineWidth=b?2:1},"~O,~B");g(b,"setWindowParameters",function(a,
b){this.windowWidth=a;this.windowHeight=b},"~N,~N");g(b,"translateScale",function(){},"~O,~N,~N,~N");g(b,"canDoLineTo",function(){return!0});g(b,"doStroke",function(a,b){(this.inPath=b)?a.beginPath():a.stroke()},"~O,~B");g(b,"lineTo",function(a,b,c){a.lineTo(b,c)},"~O,~N,~N")});n("JSV.js2d");z(["JSV.api.JSVPanel"],"JSV.js2d.JsPanel",["JSV.common.JSViewer","$.PanelData","JU.Font","$.Logger"],function(){var b=w(function(){this.bgcolor=this.name=this.vwr=this.mouse=this.pd=this.apiPlatform=null;q(this,
arguments)},JSV.js2d,"JsPanel",null,JSV.api.JSVPanel);x(b,function(a,b){this.vwr=a;this.pd=b?new JSV.common.PanelData(this,a):null;this.apiPlatform=a.apiPlatform;this.mouse=this.apiPlatform.getMouseManager(0,this)},"JSV.common.JSViewer,~B");g(b,"getApiPlatform",function(){return this.apiPlatform});g(b,"getPanelData",function(){return this.pd});b.getEmptyPanel=c(b,"getEmptyPanel",function(a){a=new JSV.js2d.JsPanel(a,!1);a.pd=null;return a},"JSV.common.JSViewer");b.getPanelMany=c(b,"getPanelMany",function(a,
b){var c=new JSV.js2d.JsPanel(a,!0);c.pd.initMany(b,a.initialStartIndex,a.initialEndIndex);return c},"JSV.common.JSViewer,JU.Lst");g(b,"getTitle",function(){return this.pd.getTitle()});g(b,"dispose",function(){null!=this.pd&&this.pd.dispose();this.pd=null;this.mouse.dispose();this.mouse=null});g(b,"setTitle",function(a){this.name=this.pd.title=a},"~S");c(b,"setColorOrFont",function(a,b){this.pd.setColorOrFont(a,b)},"JSV.common.ColorParameters,JSV.common.ScriptToken");g(b,"setBackgroundColor",function(a){this.bgcolor=
a},"javajs.api.GenericColor");g(b,"getInput",function(a,b,c){b=null;b=prompt(a,c);this.getFocusNow(!0);return b},"~S,~S,~S");g(b,"showMessage",function(a,b){JU.Logger.info(a);this.vwr.html5Applet._showStatus(a,b);this.getFocusNow(!0)},"~S,~S");g(b,"getFocusNow",function(){null!=this.pd&&this.pd.dialogsToFront(null)},"~B");g(b,"getFontFaceID",function(){return JU.Font.getFontFaceID("SansSerif")},"~S");g(b,"doRepaint",function(a){null!=this.pd&&(a&&this.pd.setTaintedAll(),this.pd.isPrinting||this.vwr.requestRepaint())},
"~B");g(b,"paintComponent",function(a){var b=null,c=null,b=a.canvas.frontLayer.getContext("2d"),c=a;null!=this.vwr&&(null==this.pd?(null==this.bgcolor&&(this.bgcolor=this.vwr.g2d.getColor1(-1)),this.vwr.g2d.fillBackground(a,this.bgcolor),this.vwr.g2d.fillBackground(c,this.bgcolor),this.vwr.g2d.fillBackground(b,this.bgcolor)):null==this.pd.graphSets||this.pd.isPrinting||(this.pd.g2d=this.pd.g2d0,this.pd.drawGraph(a,b,c,this.getWidth(),this.getHeight(),!1),this.vwr.repaintDone()))},"~O");g(b,"printPanel",
function(a,b,c){a.title=c;a.date=this.apiPlatform.getDateFormat("8824");this.pd.setPrint(a,"Helvetica");try{JSV.common.JSViewer.getInterface("JSV.common.PDFWriter").createPdfDocument(this,a,b)}catch(g){if(D(g,Exception))this.showMessage(g.toString(),"creating PDF");else throw g;}finally{this.pd.setPrint(null,null)}},"JSV.common.PrintLayout,java.io.OutputStream,~S");g(b,"saveImage",function(a,b,c){a=b.getName();null!=c&&c.cancel();JSV.common.JSViewer.jmolObject.saveImage(this.vwr.html5Applet,"png",
a);return"OK"},"~S,J.api.GenericFileInterface,JU.OC");g(b,"hasFocus",function(){return!1});g(b,"repaint",function(){});g(b,"setToolTipText",function(a){var b=this.pd.mouseX,c=this.pd.mouseY,g=this.vwr.html5Applet;g._showTooltip&&g._showTooltip(a,b,c)},"~S");g(b,"getHeight",function(){return this.vwr.getHeight()});g(b,"getWidth",function(){return this.vwr.getWidth()});g(b,"isEnabled",function(){return!1});g(b,"isFocusable",function(){return!1});g(b,"isVisible",function(){return!1});g(b,"setEnabled",
function(){},"~B");g(b,"setFocusable",function(){},"~B");g(b,"toString",function(){return null==this.pd?"<closed>":""+this.pd.getSpectrumAt(0)});g(b,"processMouseEvent",function(a,b,c,g,e){return null!=this.mouse&&this.mouse.processEvent(a,b,c,g,e)},"~N,~N,~N,~N,~N");g(b,"processTwoPointGesture",function(a){null!=this.mouse&&this.mouse.processTwoPointGesture(a)},"~A");g(b,"processKeyEvent",function(a){null!=this.mouse&&this.mouse.processKeyEvent(a)},"~O");g(b,"showMenu",function(a,b){this.vwr.showMenu(a,
b)},"~N,~N")});n("JSV.js2d");z(["JSV.common.ColorParameters"],"JSV.js2d.JsParameters",["JS.Color"],function(){var b=G(JSV.js2d,"JsParameters",JSV.common.ColorParameters);x(b,function(){I(this,JSV.js2d.JsParameters,[])});g(b,"isValidFontName",function(){return!0},"~S");g(b,"getColor1",function(a){return JS.Color.get1(a)},"~N");g(b,"getColor3",function(a,b,c){return JS.Color.get3(a,b,c)},"~N,~N,~N");c(b,"copy",function(a){return(new JSV.js2d.JsParameters).setName(a).setElementColors(this)},"~S")});
n("JSV.js2d");z(["J.api.GenericPlatform"],"JSV.js2d.JsPlatform","java.net.URL JU.AjaxURLStreamHandlerFactory $.Rdr JSV.app.GenericMouse JSV.js2d.Display $.Image $.JsFile $.JsFont".split(" "),function(){var b=w(function(){this.context=this.viewer=this.canvas=null;q(this,arguments)},JSV.js2d,"JsPlatform",null,J.api.GenericPlatform);g(b,"setViewer",function(a,b){var c="";this.viewer=a;this.canvas=b;null!=b&&(c=b.getContext("2d"),b.imgdata=c.getImageData(0,0,b.width,b.height),b.buf8=b.imgdata.data);""!==
c&&(this.context=c);try{java.net.URL.setURLStreamHandlerFactory(new JU.AjaxURLStreamHandlerFactory)}catch(g){}},"J.api.PlatformViewer,~O");g(b,"isSingleThreaded",function(){return!0});g(b,"getJsObjectInfo",function(a,b,c){return null==b?null:"localName"==b?a[0].nodeName:null==c?a[0][b]:a[0][b](c[0])},"~A,~S,~A");g(b,"isHeadless",function(){return!1});g(b,"getMouseManager",function(a,b){return new JSV.app.GenericMouse(b)},"~N,~O");g(b,"convertPointFromScreen",function(a,b){JSV.js2d.Display.convertPointFromScreen(a,
b)},"~O,JU.P3");g(b,"getFullScreenDimensions",function(a,b){JSV.js2d.Display.getFullScreenDimensions(a,b)},"~O,~A");g(b,"getMenuPopup",function(){return null},"~S,~S");g(b,"hasFocus",function(a){return JSV.js2d.Display.hasFocus(a)},"~O");g(b,"prompt",function(a,b,c,g){return JSV.js2d.Display.prompt(a,b,c,g)},"~S,~S,~A,~B");g(b,"renderScreenImage",function(a,b){JSV.js2d.Display.renderScreenImage(this.viewer,a,b)},"~O,~O");g(b,"drawImage",function(a,b,c,g,e,f){JSV.js2d.Image.drawImage(a,b,c,g,e,f)},
"~O,~O,~N,~N,~N,~N,~B");g(b,"requestFocusInWindow",function(a){JSV.js2d.Display.requestFocusInWindow(a)},"~O");g(b,"repaint",function(a){JSV.js2d.Display.repaint(a)},"~O");g(b,"setTransparentCursor",function(a){JSV.js2d.Display.setTransparentCursor(a)},"~O");g(b,"setCursor",function(a,b){JSV.js2d.Display.setCursor(a,b)},"~N,~O");g(b,"allocateRgbImage",function(a,b,c,g,e,f){return JSV.js2d.Image.allocateRgbImage(a,b,c,g,e,f?null:this.canvas)},"~N,~N,~A,~N,~B,~B");g(b,"notifyEndOfRendering",function(){});
g(b,"createImage",function(){return null},"~O");g(b,"disposeGraphics",function(){},"~O");g(b,"grabPixels",function(a,b,c){a.image&&(b!=a.width||c!=a.height)&&Jmol._setCanvasImage(a,b,c);if(a.buf32)return a.buf32;b=JSV.js2d.Image.grabPixels(JSV.js2d.Image.getGraphics(a),b,c);return a.buf32=b},"~O,~N,~N,~A");g(b,"drawImageToBuffer",function(a,b,c,g,e){return this.grabPixels(c,g,e,null)},"~O,~O,~O,~N,~N,~N");g(b,"getTextPixels",function(a,b,c,g,e,f,j){return JSV.js2d.Image.getTextPixels(a,b,c,e,f,j)},
"~S,JU.Font,~O,~O,~N,~N,~N");g(b,"flushImage",function(){},"~O");g(b,"getGraphics",function(a){return null==a?this.context:this.context=JSV.js2d.Image.getGraphics(this.canvas=a)},"~O");g(b,"getImageHeight",function(a){return null==a?-1:JSV.js2d.Image.getHeight(a)},"~O");g(b,"getImageWidth",function(a){return null==a?-1:JSV.js2d.Image.getWidth(a)},"~O");g(b,"getStaticGraphics",function(a,b){return JSV.js2d.Image.getStaticGraphics(a,b)},"~O,~B");g(b,"newBufferedImage",function(a,b,c){return self.Jmol&&
Jmol._getHiddenCanvas?Jmol._getHiddenCanvas(this.vwr.html5Applet,"stereoImage",b,c):null},"~O,~N,~N");g(b,"newOffScreenImage",function(a,b){return self.Jmol&&Jmol._getHiddenCanvas?Jmol._getHiddenCanvas(this.vwr.html5Applet,"textImage",a,b):null},"~N,~N");g(b,"waitForDisplay",function(){return!1},"~O,~O");g(b,"fontStringWidth",function(a,b){return JSV.js2d.JsFont.stringWidth(a,b)},"JU.Font,~S");g(b,"getFontAscent",function(a){return JSV.js2d.JsFont.getAscent(a)},"~O");g(b,"getFontDescent",function(a){return JSV.js2d.JsFont.getDescent(a)},
"~O");g(b,"getFontMetrics",function(a,b){return JSV.js2d.JsFont.getFontMetrics(a,b)},"JU.Font,~O");g(b,"newFont",function(a,b,c,g){return JSV.js2d.JsFont.newFont(a,b,c,g,"px")},"~S,~B,~B,~N");g(b,"getDateFormat",function(a){if(null!=a){if(0<=a.indexOf("8824")){var b=new Date;a=b.toString().split(" ");var c="0"+b.getMonth(),c=c.substring(c.length-2),b="0"+b.getDate(),b=b.substring(b.length-2);return a[3]+c+b+a[4].replace(/\:/g,"")+a[5].substring(3,6)+"'"+a[5].substring(6,8)+"'"}if(0<=a.indexOf("8601"))return b=
new Date,a=b.toString().split(" "),c="0"+b.getMonth(),c=c.substring(c.length-2),b="0"+b.getDate(),b=b.substring(b.length-2),a[3]+c+b+a[4].replace(/\:/g,"")+a[5].substring(3,6)+"'"+a[5].substring(6,8)+"'"}return(""+new Date).split(" (")[0]},"~S");g(b,"newFile",function(a){return new JSV.js2d.JsFile(a)},"~S");g(b,"getBufferedFileInputStream",function(){return null},"~S");g(b,"getURLContents",function(a,b,c,g){a=JSV.js2d.JsFile.getURLContents(a,b,c);try{return!g?a:"string"==typeof a?a:C(a,"JU.SB")?a.toString():
C(a,Array)?String.instantialize(a):String.instantialize(JU.Rdr.getStreamAsBytes(a,null))}catch(e){if(D(e,Exception))return""+e;throw e;}},"java.net.URL,~A,~S,~B");g(b,"getLocalUrl",function(){return null},"~S");g(b,"getImageDialog",function(){return null},"~S,java.util.Map");g(b,"forceAsyncLoad",function(){return!1},"~S");g(b,"getInChI",function(){return null});g(b,"confirm",function(a,b){var c=!1;null!=b&&(c=!1);return c?1:2},"~S,~S")});n("JSV.js2d");z(["JSV.api.JSVMainPanel"],"JSV.js2d.JsMainPanel",
null,function(){var b=w(function(){this.selectedPanel=null;this.currentPanelIndex=0;this.title=null;this.enabled=this.focusable=this.visible=!1;q(this,arguments)},JSV.js2d,"JsMainPanel",null,JSV.api.JSVMainPanel);g(b,"getCurrentPanelIndex",function(){return this.currentPanelIndex});g(b,"dispose",function(){});g(b,"getTitle",function(){return this.title});g(b,"setTitle",function(a){this.title=a},"~S");g(b,"setSelectedPanel",function(a,b,c){b!==this.selectedPanel&&(this.selectedPanel=b);a=a.selectPanel(b,
c);0<=a&&(this.currentPanelIndex=a);this.visible=!0},"JSV.common.JSViewer,JSV.api.JSVPanel,JU.Lst");c(b,"getHeight",function(){return null==this.selectedPanel?0:this.selectedPanel.getHeight()});c(b,"getWidth",function(){return null==this.selectedPanel?0:this.selectedPanel.getWidth()});g(b,"isEnabled",function(){return this.enabled});g(b,"isFocusable",function(){return this.focusable});g(b,"isVisible",function(){return this.visible});g(b,"setEnabled",function(a){this.enabled=a},"~B");g(b,"setFocusable",
function(a){this.focusable=a},"~B")});n("JSV.source");z(["JSV.source.JDXHeader","java.util.Hashtable"],"JSV.source.JDXDataObject","JU.DF $.PT JSV.common.Annotation $.Coordinate JSV.exception.JSVException JU.Logger".split(" "),function(){var b=w(function(){this.sourceID="";this.isSimulation=!1;this.blockID=0;this.inlineData=this.filePathForwardSlash=this.filePath=null;this.fileShiftRef=1.7976931348623157E308;this.fileShiftRefDataPt=this.fileShiftRefType=-1;this.deltaX=this.maxY=this.maxX=this.minY=
this.minX=NaN;this.xyCoords=null;this.$isHZtoPPM=this.continuous=!1;this.xIncreases=!0;this.fileLastX=this.fileFirstX=1.7976931348623157E308;this.fileNPoints=-1;this.yFactor=this.xFactor=1.7976931348623157E308;this.nucleusX=null;this.nucleusY="?";this.freq2dY=this.freq2dX=NaN;this.y2DUnits="";this.parent=null;this.yUnits=this.xUnits="";this.yLabel=this.xLabel=null;this.observedNucl=this.varName="";this.observedFreq=1.7976931348623157E308;this.numDim=1;this.nH=0;this.y2D=NaN;q(this,arguments)},JSV.source,
"JDXDataObject",JSV.source.JDXHeader);c(b,"setInlineData",function(a){this.inlineData=a},"~S");c(b,"getInlineData",function(){return this.inlineData});c(b,"setFilePath",function(a){null!=a&&(this.filePathForwardSlash=(this.filePath=a.trim()).$replace("\\","/"))},"~S");c(b,"getFilePath",function(){return this.filePath});c(b,"getFilePathForwardSlash",function(){return this.filePathForwardSlash});c(b,"setBlockID",function(a){this.blockID=a},"~N");c(b,"checkJDXRequiredTokens",function(){var a=1.7976931348623157E308==
this.fileFirstX?"##FIRSTX":1.7976931348623157E308==this.fileLastX?"##LASTX":-1==this.fileNPoints?"##NPOINTS":1.7976931348623157E308==this.xFactor?"##XFACTOR":1.7976931348623157E308==this.yFactor?"##YFACTOR":null;if(null!=a)throw new JSV.exception.JSVException("Error Reading Data Set: "+a+" not found");});c(b,"setXFactor",function(a){this.xFactor=a},"~N");c(b,"getXFactor",function(){return this.xFactor});c(b,"setYFactor",function(a){this.yFactor=a},"~N");c(b,"getYFactor",function(){return this.yFactor});
c(b,"setVarName",function(a){this.varName=a},"~S");c(b,"isImaginary",function(){return this.varName.contains("IMAG")});c(b,"setXUnits",function(a){this.xUnits=a},"~S");c(b,"getXUnits",function(){return this.xUnits});c(b,"setYUnits",function(a){a.equals("PPM")&&(a="ARBITRARY UNITS");this.yUnits=a},"~S");c(b,"getYUnits",function(){return this.yUnits});c(b,"setXLabel",function(a){this.xLabel=a},"~S");c(b,"setYLabel",function(a){this.yLabel=a},"~S");c(b,"setObservedNucleus",function(a){this.observedNucl=
a;this.is1D()&&(this.parent.nucleusX=this.nucleusX=this.fixNucleus(a))},"~S");c(b,"getObservedNucleus",function(){return this.observedNucl});c(b,"setObservedFreq",function(a){this.observedFreq=a},"~N");c(b,"getObservedFreq",function(){return this.observedFreq});c(b,"setHydrogenCount",function(a){this.nH=a},"~N");c(b,"getHydrogenCount",function(){return this.nH});c(b,"is1D",function(){return 1==this.numDim});c(b,"getNumDim",function(){return this.numDim});c(b,"setNumDim",function(a){this.numDim=a},
"~N");c(b,"setY2D",function(a){this.y2D=a},"~N");c(b,"getY2D",function(){return this.y2D});c(b,"setY2DUnits",function(a){this.y2DUnits=a},"~S");c(b,"getY2DPPM",function(){var a=this.y2D;this.y2DUnits.equals("HZ")&&(a/=this.freq2dY);return a});c(b,"setNucleusAndFreq",function(a,b){a=this.fixNucleus(a);b?this.nucleusX=a:this.nucleusY=a;var c;if(0<=this.observedNucl.indexOf(a))c=this.observedFreq;else{c=JSV.source.JDXDataObject.getGyromagneticRatio(this.fixNucleus(this.observedNucl));var e=JSV.source.JDXDataObject.getGyromagneticRatio(a);
c=this.observedFreq*e/c}b?this.freq2dX=c:this.freq2dY=c;JU.Logger.info("Freq for "+a+" = "+c)},"~S,~B");c(b,"fixNucleus",function(a){return JU.PT.rep(JU.PT.trim(a,"[]^<>"),"NUC_","")},"~S");b.getNominalSpecFreq=c(b,"getNominalSpecFreq",function(a,b){var c=JSV.source.JDXDataObject.getSpecFreq(a,b),e=100*Math.round(c/100);return Double.isNaN(c)?-1:2>Math.abs(c-e)?e:Math.round(c)},"~S,~N");b.getSpecFreq=c(b,"getSpecFreq",function(a,b){return b*JSV.source.JDXDataObject.getGyromagneticRatio("1H")/JSV.source.JDXDataObject.getGyromagneticRatio(a)},
"~S,~N");b.getGyromagneticRatio=c(b,"getGyromagneticRatio",function(a){var b=null;try{b=JSV.source.JDXDataObject.gyroMap.get(a);if(null!=b)return b.doubleValue();for(var c=0;c<a.length&&Character.isDigit(a.charAt(c));)c++;b=JSV.source.JDXDataObject.gyroMap.get(a.substring(0,c));null!=b&&JSV.source.JDXDataObject.gyroMap.put(a,b)}catch(e){if(!D(e,Exception))throw e;}return null==b?NaN:b.doubleValue()},"~S");c(b,"isTransmittance",function(){var a=this.yUnits.toLowerCase();return a.equals("transmittance")||
a.contains("trans")||a.equals("t")});c(b,"isAbsorbance",function(){var a=this.yUnits.toLowerCase();return a.equals("absorbance")||a.contains("abs")||a.equals("a")});c(b,"canSaveAsJDX",function(){return this.getDataClass().equals("XYDATA")});c(b,"canIntegrate",function(){return this.continuous&&(this.isHNMR()||this.isGC())&&this.is1D()});c(b,"isAutoOverlayFromJmolClick",function(){return this.isGC()});c(b,"isGC",function(){return this.dataType.startsWith("GC")||this.dataType.startsWith("GAS")});c(b,
"isMS",function(){return this.dataType.startsWith("MASS")||this.dataType.startsWith("MS")});c(b,"isStackable",function(){return!this.isMS()});c(b,"isScalable",function(){return!0});c(b,"getYRef",function(){return!this.isTransmittance()?0:2>JSV.common.Coordinate.getMaxY(this.xyCoords,0,this.xyCoords.length-1)?1:100});c(b,"isInverted",function(){return this.isTransmittance()});c(b,"canConvertTransAbs",function(){return this.continuous&&this.yUnits.toLowerCase().contains("abs")||this.yUnits.toLowerCase().contains("trans")});
c(b,"canShowSolutionColor",function(){return this.isContinuous()&&this.canConvertTransAbs()&&(this.xUnits.toLowerCase().contains("nanometer")||this.xUnits.equalsIgnoreCase("nm"))&&401>this.getFirstX()&&699<this.getLastX()&&30<=this.xyCoords.length});c(b,"isHZtoPPM",function(){return this.$isHZtoPPM});c(b,"setHZtoPPM",function(a){this.$isHZtoPPM=a},"~B");c(b,"setIncreasing",function(a){this.xIncreases=a},"~B");c(b,"isXIncreasing",function(){return this.xIncreases});c(b,"shouldDisplayXAxisIncreasing",
function(){var a=this.dataType.toUpperCase(),b=this.xUnits.toUpperCase();return a.contains("NMR")&&!a.contains("FID")||a.contains("LINK")&&b.contains("CM")||a.startsWith("IR")||a.contains("INFRA")&&b.contains("CM")||a.contains("RAMAN")&&b.contains("CM")?!1:a.contains("VIS")&&b.contains("NANOMETERS")?!0:this.xIncreases});c(b,"setContinuous",function(a){this.continuous=a},"~B");c(b,"isContinuous",function(){return this.continuous});c(b,"getHeaderRowDataAsArray",function(){var a=8;1.7976931348623157E308!=
this.observedFreq&&a++;""!==this.observedNucl&&a++;var b=this.getHeaderRowDataAsArray(!0,a),a=b.length-a;1.7976931348623157E308!=this.observedFreq&&(b[a++]=u(-1,["##.OBSERVE FREQUENCY",""+this.observedFreq]));""!==this.observedNucl&&(b[a++]=u(-1,["##.OBSERVE NUCLEUS",this.observedNucl]));b[a++]=u(-1,["##XUNITS",this.$isHZtoPPM?"HZ":this.xUnits]);b[a++]=u(-1,["##YUNITS",this.yUnits]);var c=this.xIncreases?this.getFirstX():this.getLastX();b[a++]=u(-1,["##FIRSTX",String.valueOf(this.isHZtoPPM()?c*this.observedFreq:
c)]);c=this.xIncreases?this.getLastX():this.getFirstX();b[a++]=u(-1,["##FIRSTY",String.valueOf(this.xIncreases?this.getFirstY():this.getLastY())]);b[a++]=u(-1,["##LASTX",String.valueOf(this.isHZtoPPM()?c*this.observedFreq:c)]);b[a++]=u(-1,["##XFACTOR",String.valueOf(this.getXFactor())]);b[a++]=u(-1,["##YFACTOR",String.valueOf(this.getYFactor())]);b[a++]=u(-1,["##NPOINTS",String.valueOf(this.xyCoords.length)]);return b});c(b,"getDefaultUnitPrecision",function(){return 2});c(b,"setMeasurementText",
function(a){var b=a.getValue();if(Double.isNaN(b))return"";var c=1,e="";if(this.isNMR())if(this.is1D())a=C(a,"JSV.common.Integral"),this.isHNMR()||a?a||(b*=this.observedFreq,e=" Hz"):(e=" ppm",c=2);else return"";return 0.1>b?"":JU.DF.formatDecimalDbl(b,c)+e},"JSV.common.Measurement");c(b,"isNMR",function(){return 0<=this.dataType.toUpperCase().indexOf("NMR")});c(b,"isHNMR",function(){return this.isNMR()&&0<=this.observedNucl.toUpperCase().indexOf("H")});c(b,"setXYCoords",function(a){this.xyCoords=
a},"~A");c(b,"invertYAxis",function(){for(var a=this.xyCoords.length;0<=--a;)this.xyCoords[a].setYVal(-this.xyCoords[a].getYVal());a=this.minY;this.minY=-this.maxY;this.maxY=-a;return this});c(b,"getFirstX",function(){return this.xyCoords[0].getXVal()});c(b,"getFirstY",function(){return this.xyCoords[0].getYVal()});c(b,"getLastX",function(){return this.xyCoords[this.xyCoords.length-1].getXVal()});c(b,"getLastY",function(){return this.xyCoords[this.xyCoords.length-1].getYVal()});c(b,"getMinX",function(){return Double.isNaN(this.minX)?
this.minX=JSV.common.Coordinate.getMinX(this.xyCoords,0,this.xyCoords.length-1):this.minX});c(b,"getMinY",function(){return Double.isNaN(this.minY)?this.minY=JSV.common.Coordinate.getMinY(this.xyCoords,0,this.xyCoords.length-1):this.minY});c(b,"getMaxX",function(){return Double.isNaN(this.maxX)?this.maxX=JSV.common.Coordinate.getMaxX(this.xyCoords,0,this.xyCoords.length-1):this.maxX});c(b,"getMaxY",function(){return Double.isNaN(this.maxY)?this.maxY=JSV.common.Coordinate.getMaxY(this.xyCoords,0,this.xyCoords.length-
1):this.maxY});c(b,"normalizeSimulation",function(a){this.isNMR()&&this.is1D()&&(a/=this.getMaxY(),this.maxY=NaN,JSV.common.Coordinate.applyScale(this.xyCoords,1,a),JU.Logger.info("Y values have been scaled by a factor of "+a))},"~N");c(b,"getDeltaX",function(){return Double.isNaN(this.deltaX)?this.deltaX=JSV.common.Coordinate.deltaX(this.getLastX(),this.getFirstX(),this.xyCoords.length):this.deltaX});c(b,"copyTo",function(a){a.setTitle(this.title);a.setJcampdx(this.jcampdx);a.setOrigin(this.origin);
a.setOwner(this.owner);a.setDataClass(this.dataClass);a.setDataType(this.dataType);a.setHeaderTable(this.headerTable);a.setXFactor(this.xFactor);a.setYFactor(this.yFactor);a.setXUnits(this.xUnits);a.setYUnits(this.yUnits);a.setXLabel(this.xLabel);a.setYLabel(this.yLabel);a.setXYCoords(this.xyCoords);a.setContinuous(this.continuous);a.setIncreasing(this.xIncreases);a.observedFreq=this.observedFreq;a.observedNucl=this.observedNucl;a.fileShiftRef=this.fileShiftRef;a.fileShiftRefDataPt=this.fileShiftRefDataPt;
a.fileShiftRefType=this.fileShiftRefType;a.$isHZtoPPM=this.$isHZtoPPM;a.numDim=this.numDim;a.nucleusX=this.nucleusX;a.nucleusY=this.nucleusY;a.freq2dX=this.freq2dX;a.freq2dY=this.freq2dY;a.setFilePath(this.filePath);a.nH=this.nH},"JSV.source.JDXDataObject");c(b,"getTypeLabel",function(){return this.isNMR()?this.nucleusX+"NMR":this.dataType});c(b,"getDefaultAnnotationInfo",function(a){var b,c=this.isNMR();switch(a){case JSV.common.Annotation.AType.Integration:return u(-1,[null,E(-1,[1]),null]);case JSV.common.Annotation.AType.Measurements:return a=
c?u(-1,["Hz","ppm"]):u(-1,[""]),b=this.isHNMR()?E(-1,[1,4]):E(-1,[1,3]),u(-1,[a,b,Integer.$valueOf(0)]);case JSV.common.Annotation.AType.PeakList:return a=c?u(-1,["Hz","ppm"]):u(-1,[""]),b=this.isHNMR()?E(-1,[1,2]):E(-1,[1,1]),u(-1,[a,b,Integer.$valueOf(c?1:0)])}return null},"JSV.common.Annotation.AType");c(b,"getPeakListArray",function(a,b,c){var e=a.getXVal();a=a.getYVal();this.isNMR()&&(a/=c);c=Math.abs(e-b[0]);b[0]=e;var f=c+b[1];b[1]=c;var g=f+b[2];b[2]=f;return this.isNMR()?R(-1,[e,a,e*this.observedFreq,
20<c*this.observedFreq?0:c*this.observedFreq,20<f*this.observedFreq?0:f*this.observedFreq,20<g*this.observedFreq?0:g*this.observedFreq]):R(-1,[e,a])},"JSV.common.Measurement,~A,~N");c(b,"finalizeCoordinates",function(){var a=Double.isNaN(this.freq2dX)?this.observedFreq:this.freq2dX,b=1.7976931348623157E308!=a&&this.getXUnits().toUpperCase().equals("HZ");1.7976931348623157E308!=this.fileShiftRef&&(1.7976931348623157E308!=a&&this.dataType.toUpperCase().contains("SPECTRUM")&&0>this.jcampdx.indexOf("JEOL"))&&
this.applyShiftReference(b?a:1,this.fileShiftRef);this.fileFirstX>this.fileLastX&&JSV.common.Coordinate.reverse(this.xyCoords);b&&(JSV.common.Coordinate.applyScale(this.xyCoords,1/a,1),this.setXUnits("PPM"),this.setHZtoPPM(!0))});c(b,"setShiftReference",function(a,b,c){this.fileShiftRef=a;this.fileShiftRefDataPt=0<b?b:1;this.fileShiftRefType=c},"~N,~N,~N");c(b,"isShiftTypeSpecified",function(){return-1!=this.fileShiftRefType});c(b,"applyShiftReference",function(a,b){if(!(this.fileShiftRefDataPt>this.xyCoords.length||
0>this.fileShiftRefDataPt)){var c;switch(this.fileShiftRefType){case 0:b=this.xyCoords[this.fileShiftRefDataPt-1].getXVal()-b*a;break;case 1:b=this.fileFirstX-b*a;break;case 2:b=this.fileLastX+b}for(var e=0;e<this.xyCoords.length;e++)c=this.xyCoords[e],c.setXVal(c.getXVal()-b),this.xyCoords[e]=c}},"~N,~N");b.gyroData=R(-1,[1,42.5774806,2,6.53590131,3,45.4148,3,32.436,6,6.2661,7,16.5483,9,5.9842,10,4.5752,11,13.663,13,10.70839657,14,3.07770646,15,4.3172657,17,5.7742,19,40.07757016,21,3.3631,23,11.26952167,
25,2.6083,27,11.1031,29,8.4655,31,17.2514409,33,3.2717,35,4.1765,37,3.4765,37,5.819,39,3.46,39,1.9893,40,2.4737,41,1.0919,43,2.8688,45,10.3591,47,2.4041,49,2.4048,50,4.2505,51,11.2133,53,2.4115,55,10.5763,57,1.3816,59,10.077,61,3.8114,63,11.2982,65,12.103,67,2.6694,69,10.2478,71,13.0208,73,1.4897,75,7.315,77,8.1571,79,10.7042,81,11.5384,83,1.6442,85,4.1254,87,13.9811,87,1.8525,89,2.0949,91,3.9748,93,10.4523,95,2.7874,97,2.8463,99,9.6294,99,1.9553,101,2.1916,103,1.3477,105,1.957,107,1.7331,109,1.9924,
111,9.0692,113,9.4871,113,9.3655,115,9.3856,115,14.0077,117,15.261,119,15.966,121,10.2551,123,5.5532,123,11.2349,125,13.5454,127,8.5778,129,11.8604,131,3.5159,133,5.6234,135,4.2582,137,4.7634,138,5.6615,139,6.0612,137,4.88,139,5.39,141,2.37,141,13.0359,143,2.319,145,1.429,143,11.59,147,5.62,147,1.7748,149,14631,151,10.5856,153,4.6745,155,1.312,157,1.72,159,10.23,161,1.4654,163,2.0508,165,9.0883,167,1.2281,169,3.531,171,7.5261,173,2.073,175,4.8626,176,3.451,177,1.7282,179,1.0856,180,4.087,181,5.1627,
183,1.7957,185,9.7176,187,9.817,187,0.9856,189,3.3536,191,0.7658,191,0.8319,195,9.2922,197,0.7406,199,7.7123,201,2.8469,203,24.7316,205,24.9749,207,9.034,209,6.963,209,11.7,211,9.16,223,5.95,223,1.3746,225,11.187,227,5.6,229,1.4,231,10.2,235,0.83,237,9.57,239,3.09,243,4.6,1E100]);b.gyroMap=new java.util.Hashtable;for(var b=0,a=JSV.source.JDXDataObject.gyroData.length-1;b<a;b+=2)JSV.source.JDXDataObject.gyroMap.put(""+v(JSV.source.JDXDataObject.gyroData[b]),Double.$valueOf(JSV.source.JDXDataObject.gyroData[b+
1]))});n("JSV.source");z(["java.util.Iterator"],"JSV.source.JDXDecompressor",["JSV.common.Coordinate","JU.Logger"],function(){var b=w(function(){this.ich=this.nPoints=this.yFactor=this.xFactor=0;this.t=null;this.lastX=this.firstX=0;this.maxY=4.9E-324;this.minY=1.7976931348623157E308;this.debugging=!1;this.line=this.xyCoords=null;this.lineLen=0;this.errorLog=null;this.lastDif=-2147483648;this.lastY=this.nptsFound=this.dupCount=0;this.isDIF=!0;q(this,arguments)},JSV.source,"JDXDecompressor",null,java.util.Iterator);
x(b,function(a,b,c,g,e,f){this.t=a;this.firstX=b;this.lastX=c;this.xFactor=g;this.yFactor=e;this.nPoints=f;this.debugging=JU.Logger.isActiveLevel(6)},"JSV.source.JDXSourceStreamTokenizer,~N,~N,~N,~N,~N");x(b,function(a,b){this.line=a.trim();this.lineLen=a.length;this.lastY=b},"~S,~N");c(b,"getMinY",function(){return this.minY});c(b,"getMaxY",function(){return this.maxY});c(b,"decompressData",function(a){this.errorLog=a;a=JSV.common.Coordinate.deltaX(this.lastX,this.firstX,this.nPoints);this.debugging&&
this.logError("firstX="+this.firstX+" lastX="+this.lastX+" xFactor="+this.xFactor+" yFactor="+this.yFactor+" deltaX="+a+" nPoints="+this.nPoints);this.xyCoords=Array(this.nPoints);var b=0,c=0,g=this.lastX,e=this.lastX=this.firstX,f=null,j=0,k=0,l=!1,n=this.t.labelLineNo;try{for(;null!=(this.line=this.t.readLineTrimmed())&&0>this.line.indexOf("##");)if(n++,0!=(this.lineLen=this.line.length)){this.ich=0;var m=this.isDIF,p=this.readSignedFloat()*this.xFactor,k=this.nextValue(k);!m&&0<j&&(e+=a);this.debugging&&
this.logError("Line: "+n+" isCP="+m+"\t>>"+this.line+"<<\n x, xcheck "+e+" "+e/this.xFactor+" "+p/this.xFactor+" "+a/this.xFactor);var q=k*this.yFactor,u=(new JSV.common.Coordinate).set(e,q);if(0==j||!m)this.addPoint(u,j++);else if(j<this.nPoints){var v=this.xyCoords[j-1].getYVal();q!=v&&(this.xyCoords[j-1]=u,this.logError(f+"\n"+this.line+"\nY-value Checkpoint Error! Line "+n+" for y="+q+" yLast="+v));(p==b||p<b!=0>a)&&this.logError(f+"\n"+this.line+"\nX-sequence Checkpoint Error! Line "+n+" order for xCheck="+
p+" after prevXCheck="+b);var w=Math.abs(p-b),x=Math.abs((j-c)*a),z=Math.abs(w-x)/w;this.debugging&&System.err.println("JDXD fracDif = "+p+"\t"+b+"\txcheckDif="+w+"\txiptDif="+x+"\tf="+z);0.5<z&&this.logError(f+"\n"+this.line+"\nX-value Checkpoint Error! Line "+n+" expected "+x+" but X-Sequence Check difference reads "+w)}for(var c=1==j?0:j,b=p,B=0;this.hasNext();){var C=this.ich;this.debugging&&this.logError("line "+n+" char "+C+":"+this.line.substring(0,C)+">>>>"+this.line.substring(this.ich));
Double.isNaN(k=this.nextValue(k))?this.logError("There was an error reading line "+n+" char "+C+":"+this.line.substring(0,C)+">>>>"+this.line.substring(C)):(e+=a,1.7976931348623157E308==k&&(k=0,this.logError("Point marked invalid '?' for line "+n+" char "+C+":"+this.line.substring(0,C)+">>>>"+this.line.substring(C))),this.addPoint((new JSV.common.Coordinate).set(e,k*this.yFactor),j++),this.debugging&&this.logError("nx="+ ++B+" "+e+" "+e/this.xFactor+" yval="+k))}this.lastX=e;!l&&j>this.nPoints&&(this.logError("! points overflow nPoints!"),
l=!0);f=this.line}}catch(E){if(D(E,"java.io.IOException"))E.printStackTrace();else throw E;}this.checkZeroFill(j,g);return this.xyCoords},"JU.SB");c(b,"checkZeroFill",function(a,b){this.nptsFound=a;if(this.nPoints==this.nptsFound)1E-5<Math.abs(b-this.lastX)&&this.logError("Something went wrong! The last X value was "+this.lastX+" but expected "+b);else{this.logError("Decompressor did not find "+this.nPoints+" points -- instead "+this.nptsFound+" xyCoords.length set to "+this.nPoints);for(var c=this.nptsFound;c<
this.nPoints;c++)this.addPoint((new JSV.common.Coordinate).set(0,NaN),c)}},"~N,~N");c(b,"addPoint",function(a,b){if(!(b>=this.nPoints)){this.xyCoords[b]=a;var c=a.getYVal();c>this.maxY?this.maxY=c:c<this.minY&&(this.minY=c);this.debugging&&this.logError("Coord: "+b+a)}},"JSV.common.Coordinate,~N");c(b,"logError",function(a){this.debugging&&JU.Logger.debug(a);System.err.println(a);this.errorLog.append(a).appendC("\n")},"~S");c(b,"nextValue",function(a){if(0<this.dupCount)return this.getDuplicate(a);
var b=this.skipUnknown();switch(JSV.source.JDXDecompressor.actions[b.charCodeAt(0)]){case 1:return this.isDIF=!0,a+(this.lastDif=this.readNextInteger("%"==b?0:"R">=b?b.charCodeAt(0)-73:105-b.charCodeAt(0)));case 2:return this.dupCount=this.readNextInteger("s"==b?9:b.charCodeAt(0)-82)-1,this.getDuplicate(a);case 3:a=this.readNextSqueezedNumber(b);break;case 4:this.ich--;a=this.readSignedFloat();break;case -1:a=1.7976931348623157E308;break;default:a=NaN}this.isDIF=!1;return a},"~N");c(b,"skipUnknown",
function(){for(var a="\x00";this.ich<this.lineLen&&0==JSV.source.JDXDecompressor.actions[(a=this.line.charAt(this.ich++)).charCodeAt(0)];);return a});c(b,"readSignedFloat",function(){for(var a=this.ich,b="\x00";this.ich<this.lineLen&&0<=" ,\t\n".indexOf(b=this.line.charAt(this.ich));)this.ich++;var c=1;switch(b.charCodeAt(0)){case 45:c=-1;case 43:a=++this.ich}if("E"==this.scanToNonnumeric()&&this.ich+3<this.lineLen)switch(this.line.charAt(this.ich+1).charCodeAt(0)){case 45:case 43:this.ich+=4,this.ich<
this.lineLen&&("0"<=(b=this.line.charAt(this.ich))&&"9">=b)&&this.ich++}return c*Double.parseDouble(this.line.substring(a,this.ich))});c(b,"getDuplicate",function(a){this.dupCount--;return this.isDIF?a+this.lastDif:a},"~N");c(b,"readNextInteger",function(a){for(var b=String.fromCharCode(0);this.ich<this.lineLen&&"0"<=(b=this.line.charAt(this.ich))&&"9">=b;)a=10*a+(0>a?48-b.charCodeAt(0):b.charCodeAt(0)-48),this.ich++;return a},"~N");c(b,"readNextSqueezedNumber",function(a){var b=this.ich;this.scanToNonnumeric();
return Double.parseDouble((96<a.charCodeAt(0)?96-a.charCodeAt(0):a.charCodeAt(0)-64)+this.line.substring(b,this.ich))},"~S");c(b,"scanToNonnumeric",function(){for(var a=String.fromCharCode(0);this.ich<this.lineLen&&("."==(a=this.line.charAt(this.ich))||"0"<=a&&"9">=a);)this.ich++;return this.ich<this.lineLen?a:"\x00"});c(b,"getNPointsFound",function(){return this.nptsFound});g(b,"hasNext",function(){return this.ich<this.lineLen||0<this.dupCount});g(b,"next",function(){return this.hasNext()?Double.$valueOf(this.lastY=
this.nextValue(this.lastY)):null});g(b,"remove",function(){});b.actions=E(255,0);for(b=37;115>=b;b++)switch(String.fromCharCode(b).charCodeAt(0)){case 37:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:JSV.source.JDXDecompressor.actions[b]=1;break;case 43:case 45:case 46:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:JSV.source.JDXDecompressor.actions[b]=4;break;
case 63:JSV.source.JDXDecompressor.actions[b]=-1;break;case 64:case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:JSV.source.JDXDecompressor.actions[b]=3;break;case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 115:JSV.source.JDXDecompressor.actions[b]=2}});n("JSV.source");z(["JU.Lst"],"JSV.source.JDXHeader",["java.util.Hashtable","JSV.source.JDXSourceStreamTokenizer"],function(){var b=
w(function(){this.title="";this.jcampdx="5.01";this.origin=this.dataClass=this.dataType="";this.owner="PUBLIC DOMAIN";this.time=this.date=this.longDate="";this.headerTable=this.qualifiedType=null;q(this,arguments)},JSV.source,"JDXHeader",null);N(b,function(){this.headerTable=new JU.Lst});c(b,"setTitle",function(a){this.title=a},"~S");c(b,"setJcampdx",function(a){this.jcampdx=a},"~S");c(b,"setDataType",function(a){this.dataType=a},"~S");c(b,"setDataClass",function(a){this.dataClass=a},"~S");c(b,"setOrigin",
function(a){this.origin=a},"~S");c(b,"setOwner",function(a){this.owner=a},"~S");c(b,"setLongDate",function(a){this.longDate=a},"~S");c(b,"setDate",function(a){this.date=a},"~S");c(b,"setTime",function(a){this.time=a},"~S");c(b,"getTitle",function(){return this.title});b.getTypeName=c(b,"getTypeName",function(a){a=a.toUpperCase();for(var b=0;b<JSV.source.JDXHeader.typeNames.length;b++)if(JSV.source.JDXHeader.typeNames[b].startsWith(a))return JSV.source.JDXHeader.typeNames[b].substring(18);return a},
"~S");c(b,"getQualifiedDataType",function(){return null==this.qualifiedType?this.qualifiedType=JSV.source.JDXHeader.getTypeName(this.dataType):this.qualifiedType});c(b,"getJcampdx",function(){return this.jcampdx});c(b,"getDataType",function(){return this.dataType});c(b,"getOrigin",function(){return this.origin});c(b,"getOwner",function(){return this.owner});c(b,"getLongDate",function(){return this.longDate});c(b,"getDate",function(){return this.date});c(b,"getTime",function(){return this.time});c(b,
"getDataClass",function(){return this.dataClass});c(b,"setHeaderTable",function(a){this.headerTable=a},"JU.Lst");c(b,"getHeaderTable",function(){return this.headerTable});c(b,"getHeaderRowDataAsArray",function(a,b){var c=Array((a?6:5)+this.headerTable.size()+b),e=0;c[e++]=u(-1,["##TITLE",this.title]);c[e++]=u(-1,["##JCAMP-DX",this.jcampdx]);c[e++]=u(-1,["##DATA TYPE",this.dataType]);a&&(c[e++]=u(-1,["##DATA CLASS",this.dataClass]));c[e++]=u(-1,["##ORIGIN",this.origin]);c[e++]=u(-1,["##OWNER",this.owner]);
for(var f=0;f<this.headerTable.size();f++)c[e++]=this.getRow(f);return c},"~B,~N");c(b,"getRow",function(a){a=this.headerTable.get(a);return[a[0],JU.PT.rep(a[1],"<","&lt;")]},"~N");var a=w(function(){this.map=this.table=null;q(this,arguments)},JSV.source.JDXHeader,"DataLDRTable",null);x(a,function(){this.table=new JU.Lst;this.map=new java.util.Hashtable});c(a,"addHeader",function(a,b){var c=this.map.get(a);null==c?(c=Integer.$valueOf(this.table.size()),this.table.addLast(u(-1,[a,b,JSV.source.JDXSourceStreamTokenizer.cleanLabel(a)])),
this.map.put(a,c)):this.table.get(c.intValue())[1]=b},"~S,~S");b.typeNames=u(-1,"ND NMR SPECTRUM   NMR;NMR SPECTRUM      NMR;INFRARED SPECTRUM IR;MASS SPECTRUM     MS;RAMAN SPECTRUM    RAMAN;GAS CHROMATOGRAM  GC;UV/VIS SPECTRUM   UV/VIS".split(";"))});n("JSV.source");z(["J.api.JmolJDXMOLReader"],"JSV.source.JDXReader","java.io.BufferedReader $.StringReader java.util.Hashtable $.LinkedHashMap $.StringTokenizer javajs.api.Interface JU.AU $.Lst $.PT $.Rdr $.SB JSV.common.Coordinate $.JSVFileManager $.JSViewer $.PeakInfo $.Spectrum JSV.exception.JSVException JSV.source.JDXDecompressor $.JDXHeader $.JDXSource $.JDXSourceStreamTokenizer JU.Logger".split(" "),
function(){var b=w(function(){this.mnovaParamValue=null;this.nmrMaxY=NaN;this.errorLog=this.t=this.source=null;this.isZipFile=this.done=this.obscure=!1;this.filePath=null;this.loadImaginary=!0;this.ignorePeakTables=this.ignoreShiftReference=this.isSimulation=!1;this.lastErrPath=null;this.isTabularData=!1;this.blockID=this.nSpec=this.lastSpec=this.firstSpec=0;this.peakData=this.acdMolFile=this.acdAssignments=this.modelSpectrum=this.reader=this.mpr=null;q(this,arguments)},JSV.source,"JDXReader",null,
J.api.JmolJDXMOLReader);x(b,function(a,b,c,g,e,f){a=JU.PT.trimQuotes(a);if(this.isSimulation=null!=a&&a.startsWith("http://SIMULATION/"))this.nmrMaxY=Float.isNaN(f)?1E4:f;this.filePath=a;this.obscure=b;this.firstSpec=g;this.lastSpec=e;this.loadImaginary=c},"~S,~B,~B,~N,~N,~N");b.getVarList=c(b,"getVarList",function(a){a=JSV.source.JDXReader.VAR_LIST_TABLE[0].indexOf(a);return JSV.source.JDXReader.VAR_LIST_TABLE[1].substring(a+1,a+12).trim()},"~S");b.createJDXSourceFromStream=c(b,"createJDXSourceFromStream",
function(a,b,c,g){return JSV.source.JDXReader.createJDXSource(null,a,"stream",b,c,-1,-1,g)},"java.io.InputStream,~B,~B,~N");b.getHeaderMap=c(b,"getHeaderMap",function(a,b){return JSV.source.JDXReader.getHeaderMapS(a,b,-1,null)},"java.io.InputStream,java.util.Map");b.getHeaderMapS=c(b,"getHeaderMapS",function(a,b,c,g){a=JSV.source.JDXReader.createJDXSource(null,a,null,!1,!1,0,-1,0).getJDXSpectrum(c).headerTable;null==b&&(b=new java.util.LinkedHashMap);c=0;for(var e=a.size();c<e;c++){var f=a.get(c);
b.put(null==g?f[2]:f[2]+g,f[1])}return b},"java.io.InputStream,java.util.Map,~N,~S");b.createJDXSource=c(b,"createJDXSource",function(a,b,c,g,e,f,j,k){var l=j<f,n=null,m=null;if(JU.AU.isAB(b)&&(m=b,JU.Rdr.isZipB(m)))return JSV.source.JDXReader.readBrukerFileZip(m,null==a?c:a.getFullPath());"string"==typeof b||null!=m?("string"==typeof b&&(n=b),b=JSV.common.JSVFileManager.getBufferedReaderForStringOrBytes(b)):b=C(b,"java.io.InputStream")?JSV.common.JSVFileManager.getBufferedReaderForInputStream(b):
b;var p=m=null;try{if(null==b){if(null!=a&&a.isDirectory())return JSV.source.JDXReader.readBrukerFileDir(a.getFullPath());b=JSV.common.JSVFileManager.getBufferedReaderFromName(c)}if(!l){b.mark(400);var q=ba(400,"\x00");b.read(q,0,400);b.reset();m=String.instantialize(q);if(m.startsWith("PK"))return b.close(),JSV.source.JDXReader.readBrukerFileZip(null,a.getFullPath());if(0<=m.indexOf("\x00")||0==m.indexOf("##TITLE= Parameter file")||0==m.indexOf("##TITLE= Audit trail"))return b.close(),JSV.source.JDXReader.readBrukerFileDir(a.getParentAsFile().getFullPath());
var u=m.indexOf("#"),v=m.indexOf("<");if(0>u||0<=v&&v<u){var w=m.toLowerCase(),w=w.contains("<animl")||w.contains("<!doctype technique")?"AnIML":w.contains("xml-cml")?"CML":w.contains("<nmrml")?"NMRML":null;if(null==w)return JSV.source.JDXReader.readBrukerFileDir(a.getFullPath());p=JSV.common.JSViewer.getInterface("JSV.source."+w+"Reader").getSource(c,b);b.close();if(null==p)throw JU.Logger.error(m+"..."),new JSV.exception.JSVException("File type not recognized");}}null==p&&(p=(new JSV.source.JDXReader(c,
g,e,f,j,k)).getJDXSource(b,l));null!=n&&p.setInlineData(n);return p}catch(x){if(D(x,Exception))throw JSV.common.JSViewer.isJS||x.printStackTrace(),null!=b&&b.close(),null!=m&&JU.Logger.error(m+"..."),a=x.getMessage(),new JSV.exception.JSVException("Error reading data: "+a);throw x;}},"J.api.GenericFileInterface,~O,~S,~B,~B,~N,~N,~N");b.readBrukerFileDir=c(b,"readBrukerFileDir",function(a){return javajs.api.Interface.getInterface("JSV.source.BrukerReader").readBrukerDir(a)},"~S");b.readBrukerFileZip=
c(b,"readBrukerFileZip",function(a,b){return javajs.api.Interface.getInterface("JSV.source.BrukerReader").readBrukerZip(a,b)},"~A,~S");c(b,"getJDXSource",function(a,b){this.source=new JSV.source.JDXSource(0,this.filePath);this.isZipFile=C(a,"JSV.api.JSVZipReader");this.t=new JSV.source.JDXSourceStreamTokenizer(a);this.errorLog=new JU.SB;for(var c=null,g=null,e=!1;!this.done&&"##TITLE".equals(this.t.peakLabel());){e=!0;null!=c&&!this.isZipFile&&this.logError("Warning - file is a concatenation without LINK record -- does not conform to JCAMP-DX standard 6.1.3!");
var f=new JSV.common.Spectrum,j=new JSV.source.JDXHeader.DataLDRTable;for(b&&f.setHeaderTable(j.table);!this.done&&null!=(c=this.t.getLabel())&&null!=(g=this.getValue(c));)if(this.isTabularData){if(b){j.addHeader(this.t.rawLabel,"<data>");break}this.processTabularData(f,j,c,b);this.addSpectrum(f,!1);this.isSimulation&&f.getXUnits().equals("PPM")&&f.setHZtoPPM(!0);f=null}else{if(!b){if(c.equals("##DATATYPE")&&g.toUpperCase().equals("LINK")){this.getBlockSpectra(j);f=null;continue}if(c.equals("##NTUPLES")||
c.equals("##VARNAME")){this.getNTupleSpectra(j,f,c);f=null;continue}}c.equals("##JCAMPDX")&&this.setVenderSpecificValues(this.t.rawLine);null==f&&(f=new JSV.common.Spectrum);this.processLabel(f,j,c,g,b)}b&&null!=f&&this.addSpectrum(f,!1)}if(!e)throw new JSV.exception.JSVException("##TITLE record not found");this.source.setErrorLog(this.errorLog.toString());return this.source},"~O,~B");c(b,"processLabel",function(a,b,c,g,e){if(this.readDataLabel(a,c,g,this.errorLog,this.obscure,e)||e){if(null!=this.mnovaParamValue){var f;
if(g.startsWith("(")&&0<=(f=g.indexOf(","))){var j=g.substring(1,f).trim();f=g.indexOf(")",f+1);0<f&&(g=g.substring(f+1).trim());b.addHeader(j,g)}this.mnovaParamValue=null}else b.addHeader(this.t.rawLabel,g);e||this.checkCustomTags(a,c,g)}},"JSV.common.Spectrum,JSV.source.JDXHeader.DataLDRTable,~S,~S,~B");c(b,"logError",function(a){this.errorLog.append(null==this.filePath||this.filePath.equals(this.lastErrPath)?"":this.filePath).append("\n").append(a).append("\n");this.lastErrPath=this.filePath},
"~S");c(b,"setVenderSpecificValues",function(a){0<=a.indexOf("JEOL")&&(System.out.println("Skipping ##SHIFTREFERENCE for JEOL "+a),this.ignoreShiftReference=!0);0<=a.indexOf("MestReNova")&&(this.ignorePeakTables=!0)},"~S");c(b,"getValue",function(a){var b=this.isTabularDataLabel(a)?"":this.t.getValue();return"##END".equals(a)?null:b},"~S");c(b,"isTabularDataLabel",function(a){return this.isTabularData=0<="##DATATABLE##PEAKTABLE##XYDATA##XYPOINTS#".indexOf(a+"#")},"~S");c(b,"addSpectrum",function(a,
b){if(!this.loadImaginary&&a.isImaginary())return JU.Logger.info("FileReader skipping imaginary spectrum -- use LOADIMAGINARY TRUE to load this spectrum."),!0;if(null!=this.acdAssignments){if(!a.dataType.equals("MASS SPECTRUM")&&!a.isContinuous())return JU.Logger.info("Skipping ACD Labs line spectrum for "+a),!0;if(0<this.acdAssignments.size())try{this.mpr.setACDAssignments(a.title,a.getTypeLabel(),this.source.peakCount,this.acdAssignments,this.acdMolFile)}catch(c){if(D(c,Exception))JU.Logger.info("Failed to create peak data: "+
c);else throw c;}null!=this.acdMolFile&&JSV.common.JSVFileManager.cachePut("mol",this.acdMolFile)}Float.isNaN(this.nmrMaxY)?1E4<=a.getMaxY()&&a.normalizeSimulation(1E3):a.normalizeSimulation(this.nmrMaxY);this.isSimulation&&a.setSimulated(this.filePath);this.nSpec++;if(0<this.firstSpec&&this.nSpec<this.firstSpec)return!0;if(0<this.lastSpec&&this.nSpec>this.lastSpec)return!(this.done=!0);a.setBlockID(this.blockID);this.source.addJDXSpectrum(null,a,b);return!0},"JSV.common.Spectrum,~B");c(b,"getBlockSpectra",
function(a){JU.Logger.debug("--JDX block start--");for(var b="",c=null,g=0==this.source.type,e=!1;null!=(b=this.t.getLabel())&&!b.equals("##TITLE");)c=this.getValue(b),g&&!this.readHeaderLabel(this.source,b,c,this.errorLog,this.obscure)&&a.addHeader(this.t.rawLabel,c),b.equals("##BLOCKS")&&100<JU.PT.parseInt(c)&&0>=this.firstSpec&&(e=!0);c=this.getValue(b);if(!"##TITLE".equals(b))throw new JSV.exception.JSVException("Unable to read block source");g&&this.source.setHeaderTable(a.table);this.source.type=
1;this.source.isCompoundSource=!0;a=new JSV.common.Spectrum;g=new JSV.source.JDXHeader.DataLDRTable;this.readDataLabel(a,b,c,this.errorLog,this.obscure,!1);try{for(var f;null!=(f=this.t.getLabel());){if(null==(c=this.getValue(f))&&"##END".equals(b)){JU.Logger.debug("##END= "+this.t.getValue());break}b=f;if(this.isTabularData)this.processTabularData(a,g,b,!1);else{if(b.equals("##DATATYPE"))if(c.toUpperCase().equals("LINK"))this.getBlockSpectra(g),b=a=null;else{if(c.toUpperCase().startsWith("NMR PEAK")&&
this.ignorePeakTables)return this.done=!0,this.source}else if(b.equals("##NTUPLES")||b.equals("##VARNAME"))this.getNTupleSpectra(g,a,b),a=null,b="";if(this.done)break;if(null==a){a=new JSV.common.Spectrum;g=new JSV.source.JDXHeader.DataLDRTable;if(""===b)continue;if(null==b){b="##END";continue}}if(null==c){if(0<a.getXYCoords().length&&!this.addSpectrum(a,e))return this.source;a=new JSV.common.Spectrum;g=new JSV.source.JDXHeader.DataLDRTable}else this.processLabel(a,g,b,c,!1)}}}catch(j){if(D(j,Exception))throw JSV.common.JSViewer.isJS||
j.printStackTrace(),new JSV.exception.JSVException(j.getMessage());throw j;}this.addErrorLogSeparator();this.source.setErrorLog(this.errorLog.toString());JU.Logger.debug("--JDX block end--");return this.source},"JSV.source.JDXHeader.DataLDRTable");c(b,"addErrorLogSeparator",function(){0<this.errorLog.length()&&this.errorLog.lastIndexOf("=====================\n")!=this.errorLog.length()-22&&this.logError("=====================\n")});c(b,"getNTupleSpectra",function(a,b,c){var g=R(-1,[1.7976931348623157E308,
4.9E-324]);this.blockID=Math.random();0<this.firstSpec&&b.setNumDim(1);var e=c.equals("##VARNAME");e||(c="");var f=new java.util.Hashtable,j=Array(2);0==this.source.type&&(this.source.type=2,this.source.isCompoundSource=!0,this.source.setHeaderTable(a.table));for(;!(c=e?c:this.t.getLabel()).equals("##PAGE");){for(var e=!1,k=new java.util.StringTokenizer(this.t.getValue(),","),l=new JU.Lst;k.hasMoreTokens();)l.addLast(k.nextToken().trim());f.put(c,l)}e=f.get("##SYMBOL");if(!c.equals("##PAGE"))throw new JSV.exception.JSVException("Error Reading NTuple Source");
for(var k=this.t.getValue(),l=null,n=!0;!this.done;){if((c=this.t.getLabel()).equals("##ENDNTUPLES")){this.t.getValue();break}if(c.equals("##PAGE"))k=this.t.getValue();else{if(null==l&&(l=new JSV.common.Spectrum,b.copyTo(l),l.setTitle(b.getTitle()),!l.is1D())){var m=k.indexOf("=");if(0<=m)try{l.setY2D(this.parseAFFN(k.substring(0,m),k.substring(m+1).trim()));var p=k.substring(0,m).trim(),q=e.indexOf(p);0<=q&&l.setY2DUnits(f.get("##UNITS").get(q))}catch(u){if(!D(u,Exception))throw u;}}m=new JSV.source.JDXHeader.DataLDRTable;
for(l.setHeaderTable(m.table);!c.equals("##DATATABLE");)m.addHeader(this.t.rawLabel,this.t.getValue()),c=this.t.getLabel();c=!0;q=this.t.flushLine();0<q.trim().indexOf("PEAKS")&&(c=!1);var v=q.indexOf("("),w=q.lastIndexOf(")");if(-1==v||-1==w)throw new JSV.exception.JSVException("Variable List not Found");v=q.substring(v,w+1);for(q=w=0;q<e.size();q++){var x=e.get(q).trim();-1!=v.indexOf(x)&&(j[w++]=x);if(2==w)break}this.setTabularDataType(l,"##"+(c?"XYDATA":"PEAKTABLE"));if(!this.readNTUPLECoords(l,
f,j,g))throw new JSV.exception.JSVException("Unable to read Ntuple Source");l.nucleusX.equals("?")||(b.nucleusX=l.nucleusX);b.nucleusY=l.nucleusY;b.freq2dX=l.freq2dX;b.freq2dY=l.freq2dY;b.y2DUnits=l.y2DUnits;q=0;for(c=a.table.size();q<c;q++)v=a.table.get(q),w=JSV.source.JDXSourceStreamTokenizer.cleanLabel(v[0]),!w.equals("##TITLE")&&(!w.equals("##DATACLASS")&&!w.equals("##NTUPLES"))&&m.table.addLast(v);this.addSpectrum(l,!n);n=!1;l=null}}this.addErrorLogSeparator();this.source.setErrorLog(this.errorLog.toString());
JU.Logger.info("NTUPLE MIN/MAX Y = "+g[0]+" "+g[1]);return this.source},"JSV.source.JDXHeader.DataLDRTable,JSV.source.JDXDataObject,~S");c(b,"readDataLabel",function(a,b,c,g,e){if(!this.readHeaderLabel(a,b,c,g,e))return!1;b+=" ";if(0<="##MINX ##MINY ##MAXX ##MAXY ##FIRSTY ##DELTAX ##DATACLASS ".indexOf(b))return!1;switch("##FIRSTX  ##LASTX   ##NPOINTS ##XFACTOR ##YFACTOR ##XUNITS  ##YUNITS  ##XLABEL  ##YLABEL  ##NUMDIM  ##OFFSET  ".indexOf(b)){case 0:return a.fileFirstX=this.parseAFFN(b,c),!1;case 10:return a.fileLastX=
this.parseAFFN(b,c),!1;case 20:return a.fileNPoints=Integer.parseInt(c),!1;case 30:return a.setXFactor(this.parseAFFN(b,c)),!1;case 40:return a.yFactor=this.parseAFFN(b,c),!1;case 50:return a.setXUnits(c),!1;case 60:return a.setYUnits(c),!1;case 70:return a.setXLabel(c),!0;case 80:return a.setYLabel(c),!0;case 90:return a.setNumDim(Integer.parseInt(c)),!1;case 100:return a.isShiftTypeSpecified()||a.setShiftReference(this.parseAFFN(b,c),1,1),!1;default:if(17>b.length)return!0;if(b.equals("##.OBSERVEFREQUENCY "))return a.setObservedFreq(this.parseAFFN(b,
c)),!1;if(b.equals("##.OBSERVENUCLEUS "))return a.setObservedNucleus(c),!1;if(b.equals("##$REFERENCEPOINT ")&&!a.isShiftTypeSpecified()){var f=c.indexOf(" ");0<f&&(c=c.substring(0,f));a.setShiftReference(this.parseAFFN(b,c),1,2);return!1}if(b.equals("##.SHIFTREFERENCE ")){if(this.ignoreShiftReference||!a.dataType.toUpperCase().contains("SPECTRUM"))return!1;c=JU.PT.replaceAllCharacters(c,")(","");c=new java.util.StringTokenizer(c,",");if(4!=c.countTokens())return!1;try{c.nextToken();c.nextToken();
var f=F(Float.parseFloat(c.nextToken().trim())),j=this.parseAFFN(b,c.nextToken().trim());a.setShiftReference(j,f,0)}catch(k){if(!D(k,Exception))throw k;}return!1}return!0}},"JSV.source.JDXDataObject,~S,~S,JU.SB,~B,~B");c(b,"readHeaderLabel",function(a,b,c,g,e){switch(b){case "##TITLE":return a.setTitle(e||null==c||c.equals("")?"Unknown":c),!1;case "##JCAMPDX":return a.jcampdx=c,a=JU.PT.parseFloat(c),(6<=a||Float.isNaN(a))&&null!=g&&g.append("Warning: JCAMP-DX version may not be fully supported: "+
c+"\n"),!1;case "##ORIGIN":return a.origin=null!=c&&!c.equals("")?c:"Unknown",!1;case "##OWNER":return a.owner=null!=c&&!c.equals("")?c:"Unknown",!1;case "##DATATYPE":return a.dataType=c,!1;case "##LONGDATE":return a.longDate=c,!1;case "##DATE":return a.date=c,!1;case "##TIME":return a.time=c,!1;case "##$PARAMETERFILE":return this.mnovaParamValue=c,!1}return!0},"JSV.source.JDXHeader,~S,~S,JU.SB,~B");c(b,"setTabularDataType",function(a,b){b.equals("##PEAKASSIGNMENTS")?a.setDataClass("PEAKASSIGNMENTS"):
b.equals("##PEAKTABLE")?a.setDataClass("PEAKTABLE"):b.equals("##XYDATA")?a.setDataClass("XYDATA"):b.equals("##XYPOINTS")&&a.setDataClass("XYPOINTS")},"JSV.source.JDXDataObject,~S");c(b,"processTabularData",function(a,b,c,g){this.setTabularDataType(a,c);a.setHeaderTable(b.table);if(a.dataClass.equals("XYDATA"))a.checkJDXRequiredTokens(),g||this.decompressData(a,null);else if(a.dataClass.equals("PEAKTABLE")||a.dataClass.equals("XYPOINTS")){a.setContinuous(a.dataClass.equals("XYPOINTS"));try{this.t.readLineTrimmed()}catch(e){if(!D(e,
"java.io.IOException"))throw e;}1.7976931348623157E308!=a.xFactor&&1.7976931348623157E308!=a.yFactor?(b=this.t.getValue(),b=JSV.common.Coordinate.parseDSV(b,a.xFactor,a.yFactor)):b=JSV.common.Coordinate.parseDSV(this.t.getValue(),1,1);a.setXYCoords(b);b=JSV.common.Coordinate.deltaX(b[b.length-1].getXVal(),b[0].getXVal(),b.length);a.setIncreasing(0<b)}else throw new JSV.exception.JSVException("Unable to read JDX file tabular data for line "+this.t.labelLineNo);},"JSV.source.JDXDataObject,JSV.source.JDXHeader.DataLDRTable,~S,~B");
c(b,"readNTUPLECoords",function(a,b,c,g){var e;if(a.dataClass.equals("XYDATA")){e=b.get("##SYMBOL");var f=e.indexOf(c[0]),j=e.indexOf(c[1]);e=b.get("##VARNAME");a.setVarName(e.get(j).toUpperCase());e=b.get(c="##FACTOR");a.setXFactor(this.parseAFFN(c,e.get(f)));a.setYFactor(this.parseAFFN(c,e.get(j)));e=b.get(c="##LAST");a.fileLastX=this.parseAFFN(c,e.get(f));e=b.get(c="##FIRST");a.fileFirstX=this.parseAFFN(c,e.get(f));e=b.get("##VARDIM");a.fileNPoints=Integer.parseInt(e.get(f));e=b.get("##UNITS");
a.setXUnits(e.get(f));a.setYUnits(e.get(j));null==a.nucleusX&&null!=(e=b.get("##.NUCLEUS"))?(a.setNucleusAndFreq(e.get(0),!1),a.setNucleusAndFreq(e.get(f),!0)):null==a.nucleusX&&(a.nucleusX="?");this.decompressData(a,g);return!0}return a.dataClass.equals("PEAKTABLE")||a.dataClass.equals("XYPOINTS")?(a.setContinuous(a.dataClass.equals("XYPOINTS")),e=b.get("##SYMBOL"),f=e.indexOf(c[0]),j=e.indexOf(c[1]),e=b.get("##UNITS"),a.setXUnits(e.get(f)),a.setYUnits(e.get(j)),a.setXYCoords(JSV.common.Coordinate.parseDSV(this.t.getValue(),
a.xFactor,a.yFactor)),!0):!1},"JSV.source.JDXDataObject,java.util.Map,~A,~A");c(b,"parseAFFN",function(a,b){var c=b.indexOf("E");if(0<c){var g;switch(b.length-c){case 2:case 3:this.logError("Warning - "+a+" value "+b+" is not of the format xxxE[+/-]nn or xxxE[+/-]nnn (spec. 4.5.3) -- warning only; accepted");break;case 4:case 5:if("+"==(g=b.charAt(c+1))||"-"==g)break;default:this.logError("Error - "+a+" value "+b+" is not of the format xxxE[+/-]nn or xxxE[+/-]nnn (spec. 4.5.3) -- "+b.substring(c)+
" ignored!"),b=b.substring(0,c)}}return Double.parseDouble(b)},"~S,~S");c(b,"decompressData",function(a,b){var c=this.errorLog.length();a.setIncreasing(a.fileLastX>a.fileFirstX);a.setContinuous(!0);var g=new JSV.source.JDXDecompressor(this.t,a.fileFirstX,a.fileLastX,a.xFactor,a.yFactor,a.fileNPoints),e=System.currentTimeMillis(),f=g.decompressData(this.errorLog);JU.Logger.debugging&&JU.Logger.debug("decompression time = "+(System.currentTimeMillis()-e)+" ms");a.setXYCoords(f);e=g.getMinY();null!=
b&&(e<b[0]&&(b[0]=e),e=g.getMaxY(),e>b[1]&&(b[1]=e));a.finalizeCoordinates();this.errorLog.length()!=c&&(c=JSV.common.Coordinate.deltaX(a.fileLastX,a.fileFirstX,a.fileNPoints),this.logError(a.getTitle()),this.logError("firstX from Header "+a.fileFirstX),this.logError("lastX from Header "+a.fileLastX+" Found "+g.lastX),this.logError("deltaX from Header "+c),this.logError("Number of points in Header "+a.fileNPoints+" Found "+g.getNPointsFound()));JU.Logger.debugging&&System.err.println(this.errorLog.toString())},
"JSV.source.JDXDataObject,~A");c(b,"checkCustomTags",function(a,b,c){10<b.length&&(b=b.substring(0,10));null==a?System.out.println(b):this.modelSpectrum=a;b="##$MODELS ##$PEAKS  ##$SIGNALS##$MOLFILE##PEAKASSI##$UVIRASS##$MSFRAGM".indexOf(b);if(0>b)return!1;this.getMpr().set(this,this.filePath,null);try{switch(this.reader=new java.io.BufferedReader(new java.io.StringReader(c)),b){case 0:this.mpr.readModels();break;case 10:case 20:this.peakData=new JU.Lst;this.source.peakCount+=this.mpr.readPeaks(20==
b,this.source.peakCount);break;case 30:this.acdAssignments=new JU.Lst;this.acdMolFile=JU.PT.rep(c,"$$ Empty String","");break;case 40:case 50:case 60:this.acdAssignments=this.mpr.readACDAssignments(a.fileNPoints,40==b);break}}catch(g){if(D(g,Exception))throw new JSV.exception.JSVException(g.getMessage());throw g;}finally{this.reader=null}return!0},"JSV.common.Spectrum,~S,~S");c(b,"getMpr",function(){return null==this.mpr?this.mpr=JSV.common.JSViewer.getInterface("J.jsv.JDXMOLParser"):this.mpr});g(b,
"rd",function(){return this.reader.readLine()});g(b,"setSpectrumPeaks",function(a,b,c){this.modelSpectrum.setPeakList(this.peakData,b,c);this.modelSpectrum.isNMR()&&this.modelSpectrum.setHydrogenCount(a)},"~N,~S,~S");g(b,"addPeakData",function(a){null==this.peakData&&(this.peakData=new JU.Lst);this.peakData.addLast(new JSV.common.PeakInfo(a))},"~S");g(b,"processModelData",function(){},"~S,~S,~S,~S,~S,~N,~N,~B");g(b,"discardLinesUntilContains",function(a){for(var b;null!=(b=this.rd())&&0>b.indexOf(a););
return b},"~S");g(b,"discardLinesUntilContains2",function(a,b){for(var c;null!=(c=this.rd())&&0>c.indexOf(a)&&0>c.indexOf(b););return c},"~S,~S");g(b,"discardLinesUntilNonBlank",function(){for(var a;null!=(a=this.rd())&&0==a.trim().length;);return a});b.VAR_LIST_TABLE=u(-1,["PEAKTABLE   XYDATA      XYPOINTS"," (XY..XY)    (X++(Y..Y)) (XY..XY)    "])});n("JSV.source");z(["JSV.source.JDXHeader"],"JSV.source.JDXSource",["JU.Lst"],function(){var b=w(function(){this.type=0;this.isCompoundSource=!1;this.jdxSpectra=
null;this.errors="";this.filePath=null;this.peakCount=0;this.isView=!1;this.inlineData=null;q(this,arguments)},JSV.source,"JDXSource",JSV.source.JDXHeader);x(b,function(a,b){I(this,JSV.source.JDXSource,[]);this.type=a;this.setFilePath(b);this.headerTable=new JU.Lst;this.jdxSpectra=new JU.Lst;this.isCompoundSource=0!=a},"~N,~S");c(b,"dispose",function(){this.jdxSpectra=this.headerTable=null});c(b,"getJDXSpectrum",function(a){0>a&&(a+=this.jdxSpectra.size());return this.jdxSpectra.size()<=a?null:this.jdxSpectra.get(a)},
"~N");c(b,"addJDXSpectrum",function(a,b,c){null==a&&(a=this.filePath);b.setFilePath(a);null!=this.inlineData&&b.setInlineData(this.inlineData);a=this.jdxSpectra.size();(0==a||!this.jdxSpectra.get(a-1).addSubSpectrum(b,c))&&this.jdxSpectra.addLast(b)},"~S,JSV.common.Spectrum,~B");c(b,"getNumberOfSpectra",function(){return this.jdxSpectra.size()});c(b,"getSpectra",function(){return this.jdxSpectra});c(b,"getSpectraAsArray",function(){return null==this.jdxSpectra?null:this.jdxSpectra.toArray()});c(b,
"getErrorLog",function(){return this.errors});c(b,"setErrorLog",function(a){this.errors=a},"~S");c(b,"setFilePath",function(a){this.filePath=a},"~S");c(b,"getFilePath",function(){return this.filePath});b.createView=c(b,"createView",function(a){var b=new JSV.source.JDXSource(-2,"view");b.isView=!0;for(var c=0;c<a.size();c++)b.addJDXSpectrum(a.get(c).getFilePath(),a.get(c),!1);return b},"JU.Lst");c(b,"getHeaderRowDataAsArray",function(a,b){null==b&&(b=u(0,0,null));for(var c=this.getHeaderRowDataAsArray(a,
b.length),g=b.length;0<=--g;)c[c.length-b.length+g]=b[g];return c},"~B,~A");c(b,"setID",function(a){this.jdxSpectra.get(0).sourceID=a},"~S");c(b,"matchesFilePath",function(a){return this.filePath.equals(a)||this.filePath.$replace("\\","/").equals(a)},"~S");c(b,"setInlineData",function(a){this.inlineData=a;if(null!=this.jdxSpectra)for(var b=this.jdxSpectra.size();0<=--b;)this.jdxSpectra.get(b).setInlineData(a)},"~S")});n("JSV.source");z(null,"JSV.source.JDXSourceStreamTokenizer",["JU.SB","JU.Logger"],
function(){var b=w(function(){this.value=this.rawLabel=this.br=null;this.labelLineNo=0;this.line=null;this.lineNo=0;this.rawLine=null;q(this,arguments)},JSV.source,"JDXSourceStreamTokenizer",null);x(b,function(a){this.br=a},"java.io.BufferedReader");c(b,"peakLabel",function(){return this.nextLabel(!1)});c(b,"getLabel",function(){return this.nextLabel(!0)});c(b,"nextLabel",function(a){for(this.value=this.rawLabel=null;null==this.line||0==this.line.length;){try{this.readLine();if(null==this.line)return this.line=
"",null;this.line=this.line.trim()}catch(b){if(D(b,"java.io.IOException"))return this.line="",null;throw b;}if(this.line.startsWith("##"))break;this.line=null}this.rawLine=this.line;var c=this.line.indexOf("=");0>c?(a&&JU.Logger.info("BAD JDX LINE -- no '=' (line "+this.lineNo+"): "+this.line),this.rawLabel=this.line,a||(this.line="")):(this.rawLabel=this.line.substring(0,c).trim(),a&&(this.line=this.line.substring(c+1)));this.labelLineNo=this.lineNo;JU.Logger.debugging&&JU.Logger.info(this.rawLabel);
return JSV.source.JDXSourceStreamTokenizer.cleanLabel(this.rawLabel)},"~B");b.cleanLabel=c(b,"cleanLabel",function(a){if(null==a)return null;if(!a.startsWith("#"))return a;var b,c=new JU.SB;for(b=0;b<a.length;b++)switch(a.charAt(b).charCodeAt(0)){case 47:case 92:case 32:case 45:case 95:break;default:c.appendC(a.charAt(b))}return c.toString().toUpperCase()},"~S");c(b,"getValue",function(){if(null!=this.value)return this.value;var a=(new JU.SB).append(this.line);0<a.length()&&a.appendC("\n");try{for(;null!=
this.readLine()&&!(0<=this.line.indexOf("##")&&this.line.trim().startsWith("##"));)a.append(this.line).appendC("\n")}catch(b){if(D(b,"java.io.IOException"))JU.Logger.info(b.toString());else throw b;}this.value=this.rawLabel.startsWith("##$")?a.toString().trim():JSV.source.JDXSourceStreamTokenizer.trimLines(a);JU.Logger.debugging&&JU.Logger.info(this.value);return this.value});c(b,"readLineTrimmed",function(){this.readLine();if(null==this.line)return null;if(0>this.line.indexOf("$$"))return this.line.trim();
var a=(new JU.SB).append(this.line);return JSV.source.JDXSourceStreamTokenizer.trimLines(a)});c(b,"flushLine",function(){var a=(new JU.SB).append(this.line);this.line=null;return JSV.source.JDXSourceStreamTokenizer.trimLines(a)});c(b,"readLine",function(){this.line=this.br.readLine();this.lineNo++;return this.line});b.trimLines=c(b,"trimLines",function(a){var b=a.length(),c=b-1,g=JSV.source.JDXSourceStreamTokenizer.ptNonWhite(a,0,b);if(g>=b)return"";for(var e=ba(b-g,"\x00"),f=0;g<b;g++){var j;switch((j=
a.charAt(g)).charCodeAt(0)){case 13:if(g<c&&"\n"==a.charAt(g+1))continue;j="\n";break;case 10:0<f&&"\n"!=e[f-1]&&(f-=g-JSV.source.JDXSourceStreamTokenizer.ptNonSpaceRev(a,g)-1);g=JSV.source.JDXSourceStreamTokenizer.ptNonSpace(a,++g,b)-1;break;case 36:if(g<c&&"$"==a.charAt(g+1)){for(g++;++g<b&&0>"\n\r".indexOf(a.charAt(g)););continue}}"\n"==j&&0<f&&"\n"==e[f-1]||(e[f++]=j)}0<f&&"\n"==e[f-1]&&--f;return String.instantialize(e).substring(0,f).trim()},"JU.SB");b.ptNonWhite=c(b,"ptNonWhite",function(a,
b,c){for(;b<c&&Character.isWhitespace(a.charAt(b));)b++;return b},"JU.SB,~N,~N");b.ptNonSpace=c(b,"ptNonSpace",function(a,b,c){for(;b<c&&(" "==a.charAt(b)||"\t"==a.charAt(b));)b++;return b},"JU.SB,~N,~N");b.ptNonSpaceRev=c(b,"ptNonSpaceRev",function(a,b){for(;0<=--b&&(" "==a.charAt(b)||"\t"==a.charAt(b)););return b},"JU.SB,~N")});n("JSV.tree");z(["JSV.api.JSVTree"],"JSV.tree.SimpleTree",["JSV.common.JSVFileManager","$.PanelNode","JSV.tree.SimpleTreeModel","$.SimpleTreeNode","$.SimpleTreePath"],function(){var b=
w(function(){this.selectedPath=this.vwr=this.spectraTreeModel=this.rootNode=this.si=null;q(this,arguments)},JSV.tree,"SimpleTree",null,JSV.api.JSVTree);x(b,function(a){this.vwr=a;this.rootNode=new JSV.tree.SimpleTreeNode("Spectra",null);this.spectraTreeModel=new JSV.tree.SimpleTreeModel(this.rootNode)},"JSV.common.JSViewer");g(b,"getRootNode",function(){return this.rootNode});c(b,"valueChanged",function(){this.vwr.selectedTreeNode(this.getLastSelectedPathComponent())});c(b,"getLastSelectedPathComponent",
function(){return null==this.selectedPath?null:this.selectedPath.getLastPathComponent()});g(b,"setSelectedPanel",function(a,b){if(null!=b){var c=JSV.common.PanelNode.findNode(b,this.vwr.panelNodes).treeNode;this.setSelectionPath(this.vwr.spectraTree.newTreePath(c.getPath()))}},"JSV.api.ScriptInterface,JSV.api.JSVPanel");c(b,"setSelectionPath",function(a){this.selectedPath=a;this.valueChanged()},"JSV.api.JSVTreePath");g(b,"createTree",function(a,b,c){var g=this.vwr.spectraTree,e=g.getRootNode(),f=
this.vwr.panelNodes,j=JSV.common.JSVFileManager.getTagName(b.getFilePath()),k=new JSV.common.PanelNode(null,j,b,null),l=new JSV.tree.SimpleTreeNode(j,k);k.setTreeNode(l);g.spectraTreeModel.insertNodeInto(l,e,e.getChildCount());for(e=0;e<c.length;e++){var k=new JSV.common.PanelNode(a+"."+(e+1),j,b,c[e]),n=new JSV.tree.SimpleTreeNode(k.toString(),k);k.setTreeNode(n);f.addLast(k);g.spectraTreeModel.insertNodeInto(n,l,l.getChildCount())}this.vwr.selectFrameNode(c[0]);return l},"~N,JSV.source.JDXSource,~A");
g(b,"setPath",function(a){this.setSelectionPath(a)},"JSV.api.JSVTreePath");c(b,"newTreePath",function(a){return new JSV.tree.SimpleTreePath(a)},"~A");g(b,"deleteNodes",function(a){for(var b=0;b<a.size();b++)this.spectraTreeModel.removeNodeFromParent(a.get(b))},"JU.Lst")});n("JSV.tree");z(["java.util.Enumeration"],"JSV.tree.SimpleTreeEnumeration",null,function(){var b=w(function(){this.node=null;this.pt=0;q(this,arguments)},JSV.tree,"SimpleTreeEnumeration",null,java.util.Enumeration);x(b,function(a){this.node=
a},"JSV.tree.SimpleTreeNode");g(b,"hasMoreElements",function(){return this.pt<this.node.$children.size()});g(b,"nextElement",function(){return this.node.$children.get(this.pt++)})});n("JSV.tree");var Na=w(function(){this.rootNode=null;q(this,arguments)},JSV.tree,"SimpleTreeModel",null);x(Na,function(b){this.rootNode=b},"JSV.api.JSVTreeNode");c(Na,"insertNodeInto",function(b,a,c){a.$children.add(c,b);b.prevNode=a},"JSV.api.JSVTreeNode,JSV.api.JSVTreeNode,~N");c(Na,"removeNodeFromParent",function(b){b.prevNode.$children.removeObj(b)},
"JSV.api.JSVTreeNode");n("JSV.tree");z(["JSV.api.JSVTreeNode"],"JSV.tree.SimpleTreeNode",["JU.Lst","JSV.tree.SimpleTreeEnumeration"],function(){var b=w(function(){this.panelNode=null;this.index=0;this.text=this.$children=this.prevNode=null;q(this,arguments)},JSV.tree,"SimpleTreeNode",null,JSV.api.JSVTreeNode);x(b,function(a,b){this.text=a;this.panelNode=b;this.$children=new JU.Lst},"~S,JSV.common.PanelNode");g(b,"getPanelNode",function(){return this.panelNode});g(b,"getIndex",function(){return this.index});
g(b,"setIndex",function(a){this.index=a},"~N");g(b,"children",function(){return new JSV.tree.SimpleTreeEnumeration(this)});g(b,"getChildCount",function(){return this.$children.size()});g(b,"getPath",function(){var a=new JU.Lst,b=this;for(a.addLast(b);null!=(b=b.prevNode);)a.add(0,b);return a.toArray()});g(b,"isLeaf",function(){return null!=this.prevNode&&null!=this.prevNode.prevNode});g(b,"toString",function(){return this.text})});n("JSV.tree");z(["JSV.api.JSVTreePath"],"JSV.tree.SimpleTreePath",
null,function(){var b=w(function(){this.path=null;q(this,arguments)},JSV.tree,"SimpleTreePath",null,JSV.api.JSVTreePath);x(b,function(a){this.path=a},"~A");g(b,"getLastPathComponent",function(){return null==this.path||0==this.path.length?null:this.path[this.path.length-1]})})}ra._coreLoaded=!0})(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);
