(function($,u,T,L,w,Da,r,C,v,q,p,I,Ea,n,j,y,F,V,s,K,A,N,E,pa,G,H,U,B,Y,Fa,Q,W,qa,R,aa,O,X,ea,Ga,ra,sa,fa,ta,ua,va,wa,xa,ya,za,ga,ha,Aa,ia,Ba,Ha,c,e,M,ja){Jmol.___JmolDate="$Date: 2026-08-14 08:51:03 -0600 (Fri, 14 Aug 2026) $";Jmol.___fullJmolProperties="src/org/jmol/viewer/Jmol.properties";Jmol.___JmolVersion="16.4.19";(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";aa(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())});
e(Number,"hashCode",function(){return this.valueOf()});java.lang.Integer=Integer=function(){q(this,arguments)};W(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()};X(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;e(Integer,"$valueOf",function(a){return new Integer(a)});Integer.$valueOf=Integer.prototype.$valueOf;e(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");e(Integer,"hashCode",function(){return this.valueOf()});java.lang.Long=Long=function(){q(this,arguments)};W(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()};X(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;e(Long,"$valueOf",function(a){return new Long(a)});Long.$valueOf=Long.prototype.$valueOf;e(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)};W(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()};X(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;e(Short,"$valueOf",function(a){return new Short(a)});Short.$valueOf=Short.prototype.$valueOf;e(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)};W(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()};n(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;e(Byte,"$valueOf",function(a){return new Byte(a)});Byte.$valueOf=Byte.prototype.$valueOf;e(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)};W(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]};X(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;
e(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;e(Float,"equals",function(a){return null==a||!C(a,Float)?!1:a.valueOf()==this.valueOf()},"Object");java.lang.Double=Double=function(){q(this,arguments)};
W(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())};X(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;e(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";aa(Boolean,[java.io.Serializable,java.lang.Comparable]);Boolean.equals=b._innerFunctions.equals;Boolean.getName=b._innerFunctions.getName;Boolean.serialVersionUID=Boolean.prototype.serialVersionUID=-0x32df8d7f2a630600;X(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=e(Boolean,"$valueOf",function(a){return("string"==typeof a?"true".equalsIgnoreCase(a):a)?Boolean.TRUE:Boolean.FALSE});e(Boolean,"toString",function(){return this.valueOf()?"true":"false"});e(Boolean,"hashCode",function(){return this.valueOf()?1231:1237});e(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");e(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 c=d.charCodeAt(b);if(128>c)h[h.length]=d.charAt(b);else if(192<c&&224>c){c&=31;b++;var f=d.charCodeAt(b)&63,c=(c<<6)+f;h[h.length]=String.fromCharCode(c)}else if(224<=c){c&=15;b++;f=d.charCodeAt(b)&63;b++;var g=d.charCodeAt(b)&63,c=(c<<12)+(f<<6)+g;h[h.length]=String.fromCharCode(c)}}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 c=d[b];if(128>c)h[h.length]=String.fromCharCode(c);else if(192<c&&224>c){var c=c&31,f=d[++b]&63,c=(c<<6)+f;h[h.length]=String.fromCharCode(c)}else if(224<=c){var c=c&15,f=d[++b]&63,g=d[++b]&63,c=(c<<12)+(f<<6)+g;h[h.length]=String.fromCharCode(c)}}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),c=b;c<d.length;c++){var f=d.charCodeAt(c);if(128>f)h[0+
c-b]=d.charAt(c);else if(2047>=f){var g=192+((f&1984)>>6),e=128+(f&63);h[0+c-b]=String.fromCharCode(g)+String.fromCharCode(e)}else g=224+((f&61440)>>12),e=128+((f&4032)>>6),f=128+(f&63),h[0+c-b]=String.fromCharCode(g)+String.fromCharCode(e)+String.fromCharCode(f)}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,c=0,f=[],g,e;c<b;)g=d.charCodeAt(c++),
f[f.length]=h[g>>2],c<b?(e=d.charCodeAt(c++),f[f.length]=h[g<<4&48|e>>4],c<b?(g=d.charCodeAt(c++),f[f.length]=h[e<<2&60|g>>6],f[f.length]=h[g&63]):(f[f.length]=h[e<<2&60],f[f.length]="=")):(f[f.length]=h[g<<4&48],f[f.length]="=",f[f.length]="=");return f.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={},c=0;c<h.length;c++)b[h[c]]=c;a.xBase64Chars=b}for(var h=d.length,c=0,f=[],g,e,D,n,q=0;c<h&&6E4>q++;)g=
b[d.charAt(c++)],e=b[d.charAt(c++)],D=b[d.charAt(c++)],n=b[d.charAt(c++)],f[f.length]=String.fromCharCode(g<<2&255|e>>4),null!=D&&(f[f.length]=String.fromCharCode(e<<4&255|D>>2),null!=n&&(f[f.length]=String.fromCharCode(D<<6&255|n)));return f.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])}aa(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});var h=d.indexOf("$");(h=0<=h&&h<d.length-1)&&(d=d.split("$").join("\ufffd"));
var b=this.replace(RegExp(a,"gm"),d);h&&(b=b.split("\ufffd").join("$"));return b};d.$generateExpFunction=function(a){var d=[],h=[],b=0;d[0]="";for(var k=0;k<a.length;k++){var c=a.charAt(k);k!=a.length-1&&"\\"==c?(k++,c=a.charAt(k),"\\"==c&&(d[b]+="\\"),d[b]+=c):k!=a.length-1&&"$"==c?(k++,h[b]=parseInt(a.charAt(k)),b++,d[b]=""):d[b]="\r"==c?d[b]+"\\r":"\n"==c?d[b]+"\\n":"\t"==c?d[b]+"\\t":'"'==c?d[b]+'\\"':d[b]+c}a="f = function (";b=Math.max.apply({},h);for(k=0;k<=b;k++)a+="$"+k,k!=b&&(a+=", ");a+=
") { return ";for(k=0;k<d.length-1;k++)a+='"'+d[k]+'" + $'+h[k]+" + ";a+='"'+d[k]+'"; }';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,k){if("number"==typeof a||!0!=a&&!1!=a)k=b,b=h,h=d,d=a,a=!1;if(0>b||0>d||
d>this.length-k||b>h.length-k)return!1;d=this.substring(d,d+k);h=h.substring(b,b+k);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,k=this.replace(h,function(a){b++;return b==d?"@@_@@":a}),h=RegExp(a,"gm"),h=this.split(h);h.length>d&&(h[d-1]=k.substring(k.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,k=0,c=d.length;if(0>h||h>a.length-c)return!1;for(;0<=--c;)if(a.charAt(b++)!=d.charAt(k++))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(" "),c=!1,f=0;f<b.length;f++)if(b[f]==h){c=!0;break}if(!c)throw new java.io.UnsupportedEncodingException;
if("utf-8"==h||"utf8"==h)d=a.convert2UTF8(this)}h=Array(d.length);for(f=c=b=0;f<d.length;f++)b=d.charCodeAt(f),255<b?(h[c]=26,h[c+1]=b&255,h[c+2]=(b&65280)>>8,c+=2):h[c]=b,c++;return N(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),k=0;k<h;k++)b[k]=a[d+k];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 k=0;k<d-a;k++)h[b+k]=this.charAt(a+k)};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 k=0;k<d;k++)b[k]=a[h+k];else for(k=0;k<d;k++)b[k]=String.fromCharCode(a[h+k]);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(k=0;k<d;k++)b[k]=a[h+k];return c.decode(b)}k=arguments[3];h=arguments[2];d=arguments[1];b=Array(k);if(0==d)for(;0<k--;)b[k]=String.fromCharCode(a[k+h]&255);else for(d<<=8;0<k--;)b[k]=String.fromCharCode(d|a[k+h]&255);return b.join("");default:a="";for(k=
0;k<arguments.length;k++)a+=arguments[k];return a}};-1!=navigator.userAgent.toLowerCase().indexOf("chrome")&&(String.prototype.toString=function(){return this.valueOf()})}})(b._Encoding);d=p(function(){this.value=0;q(this,arguments)},java.lang,"Character",null,[java.io.Serializable,Comparable]);n(d,function(a){this.value=a},"~N");c(d,"charValue",function(){return this.value});e(d,"hashCode",function(){return this.value.charCodeAt(0)});e(d,"equals",function(a){return C(a,Character)?this.value.charCodeAt(0)==
a.charValue().charCodeAt(0):!1},"~O");e(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");e(d,"toString",function(){return String.valueOf([this.value])});d.toString=e(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=s(java.lang.reflect,"Array");d.newInstance=c(d,"newInstance",function(a,d){var h=B(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);aa(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");e(a.Date,"hashCode",function(){var a=this.getTime();return parseInt(a)^parseInt(a>>32)});d=p(function(){this.source=null;q(this,arguments)},a,"EventObject",null,java.io.Serializable);n(d,function(a){if(null!=a)this.source=a;else throw new IllegalArgumentException;},"~O");c(d,"getSource",function(){return this.source});e(d,"toString",function(){return this.getClass().getName()+"[source="+String.valueOf(this.source)+"]"});E(a,"EventListener");d=p(function(){this.listener=null;q(this,
arguments)},a,"EventListenerProxy",null,a.EventListener);n(d,function(a){this.listener=a},"javautil.EventListener");c(d,"getListener",function(){return this.listener});E(a,"Iterator");E(a,"ListIterator",a.Iterator);E(a,"Enumeration");E(a,"Collection",Iterable);E(a,"Set",a.Collection);E(a,"Map");E(a.Map,"Entry");E(a,"List",a.Collection);E(a,"Queue",a.Collection);E(a,"RandomAccess");d=p(function(){this.stackTrace=this.cause=this.detailMessage=null;q(this,arguments)},java.lang,"Throwable",null,java.io.Serializable);
K(d,function(){this.cause=this});n(d,function(){this.fillInStackTrace()});n(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");e(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+" "+ia())});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>ra(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,e=!0;-1<c||null!=a;){var m=null;if(!e||a==Aa||a==Q||null==a){if(0>c)break;e=!0;d=b._callingStackTraces[c].caller;
m=b._callingStackTraces[c].owner;c--}else d=a,null!=d.claxxOwner?m=d.claxxOwner:null!=d.exClazz&&(m=d.exClazz);a=new StackTraceElement(null!=m&&0!=m.__CLASS_NAME__.length?m.__CLASS_NAME__:"anonymous",(null==d.exName?"anonymous":d.exName)+" ("+sa(d.arguments)+")",null,-1);a.nativeClazz=m;this.stackTrace[this.stackTrace.length]=a;for(m=0;m<h.length;m++)h[m]==d&&(a=new StackTraceElement("lost","missing",null,-3),a.nativeClazz=null,this.stackTrace[this.stackTrace.length]=a,e=!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=p(function(){this.fileName=this.methodName=this.declaringClass=null;this.lineNumber=0;q(this,arguments)},java.lang,"StackTraceElement",null,java.io.Serializable);n(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");e(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});e(d,"hashCode",function(){return null==this.methodName?0:this.methodName.hashCode()^this.declaringClass.hashCode()});c(d,"isNativeMethod",function(){return-2==this.lineNumber});e(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():ia())});Clazz_Error=Error;Clazz_declareTypeError=function(a,d,h,b,c){return p(function(){q(this,arguments);return Clazz_Error()},a,d,h,b,c)};b._Error||(b._Error=Error);p(function(){q(this,
arguments);return b._Error()},java.lang,"Error",Throwable);d=s(java.lang,"LinkageError",Error);d=s(java.lang,"IncompatibleClassChangeError",LinkageError);d=s(java.lang,"AbstractMethodError",IncompatibleClassChangeError);d=s(java.lang,"AssertionError",Error);n(d,function(a){A(this,AssertionError,[""+a,C(a,Throwable)?a:null])},"~O");d=s(java.lang,"ClassCircularityError",LinkageError);d=s(java.lang,"ClassFormatError",LinkageError);d=p(function(){this.exception=null;q(this,arguments)},java.lang,"ExceptionInInitializerError",
LinkageError);n(d,function(){A(this,ExceptionInInitializerError);this.initCause(null)});n(d,function(a){A(this,ExceptionInInitializerError,[a]);this.initCause(null)},"~S");n(d,function(a){A(this,ExceptionInInitializerError);this.exception=a;this.initCause(a)},"Throwable");c(d,"getException",function(){return this.exception});e(d,"getCause",function(){return this.exception});d=s(java.lang,"IllegalAccessError",IncompatibleClassChangeError);d=s(java.lang,"InstantiationError",IncompatibleClassChangeError);
d=s(java.lang,"VirtualMachineError",Error);d=s(java.lang,"InternalError",VirtualMachineError);d=s(java.lang,"NoClassDefFoundError",LinkageError);d=s(java.lang,"NoSuchFieldError",IncompatibleClassChangeError);d=s(java.lang,"NoSuchMethodError",IncompatibleClassChangeError);d=s(java.lang,"OutOfMemoryError",VirtualMachineError);d=s(java.lang,"StackOverflowError",VirtualMachineError);d=s(java.lang,"UnknownError",VirtualMachineError);d=s(java.lang,"UnsatisfiedLinkError",LinkageError);d=s(java.lang,"UnsupportedClassVersionError",
ClassFormatError);d=s(java.lang,"VerifyError",LinkageError);d=s(java.lang,"ThreadDeath",Error);n(d,function(){A(this,ThreadDeath,[])});d=s(java.lang,"Exception",Throwable);d=s(java.lang,"RuntimeException",Exception);d=s(java.lang,"ArithmeticException",RuntimeException);d=s(java.lang,"IndexOutOfBoundsException",RuntimeException);d=s(java.lang,"ArrayIndexOutOfBoundsException",IndexOutOfBoundsException);n(d,function(a){A(this,ArrayIndexOutOfBoundsException,["Array index out of range: "+a])},"~N");d=
s(java.lang,"ArrayStoreException",RuntimeException);d=s(java.lang,"ClassCastException",RuntimeException);d=p(function(){this.ex=null;q(this,arguments)},java.lang,"ClassNotFoundException",Exception);n(d,function(){A(this,ClassNotFoundException,[Y("Throwable")])});n(d,function(a){A(this,ClassNotFoundException,[a,null])},"~S");n(d,function(a,d){A(this,ClassNotFoundException,[a]);this.ex=d},"~S,Throwable");c(d,"getException",function(){return this.ex});e(d,"getCause",function(){return this.ex});d=s(java.lang,
"CloneNotSupportedException",Exception);d=s(java.lang,"IllegalAccessException",Exception);d=s(java.lang,"IllegalArgumentException",RuntimeException);n(d,function(a){A(this,IllegalArgumentException,[null==a?null:a.toString(),a])},"Throwable");d=s(java.lang,"IllegalMonitorStateException",RuntimeException);d=s(java.lang,"IllegalStateException",RuntimeException);n(d,function(a){A(this,IllegalStateException,[null==a?null:a.toString(),a])},"Throwable");d=s(java.lang,"IllegalThreadStateException",IllegalArgumentException);
d=s(java.lang,"InstantiationException",Exception);d=s(java.lang,"InterruptedException",Exception);d=s(java.lang,"NegativeArraySizeException",RuntimeException);d=s(java.lang,"NoSuchFieldException",Exception);d=s(java.lang,"NoSuchMethodException",Exception);d=s(java.lang,"NullPointerException",RuntimeException);d=s(java.lang,"NumberFormatException",IllegalArgumentException);d=s(java.lang,"SecurityException",RuntimeException);n(d,function(a){A(this,SecurityException,[null==a?null:a.toString(),a])},"Throwable");
d=s(java.lang,"StringIndexOutOfBoundsException",IndexOutOfBoundsException);n(d,function(a){A(this,StringIndexOutOfBoundsException,["String index out of range: "+a])},"~N");d=s(java.lang,"UnsupportedOperationException",RuntimeException);n(d,function(){A(this,UnsupportedOperationException,[])});n(d,function(a){A(this,UnsupportedOperationException,[null==a?null:a.toString(),a])},"Throwable");d=p(function(){this.target=null;q(this,arguments)},java.lang.reflect,"InvocationTargetException",Exception);n(d,
function(){A(this,java.lang.reflect.InvocationTargetException,[Y("Throwable")])});n(d,function(a){A(this,java.lang.reflect.InvocationTargetException,[null,a]);this.target=a},"Throwable");n(d,function(a,d){A(this,java.lang.reflect.InvocationTargetException,[d,a]);this.target=a},"Throwable,~S");c(d,"getTargetException",function(){return this.target});e(d,"getCause",function(){return this.target});d=p(function(){this.undeclaredThrowable=null;q(this,arguments)},java.lang.reflect,"UndeclaredThrowableException",
RuntimeException);n(d,function(a){A(this,java.lang.reflect.UndeclaredThrowableException);this.undeclaredThrowable=a;this.initCause(a)},"Throwable");n(d,function(a,d){A(this,java.lang.reflect.UndeclaredThrowableException,[d]);this.undeclaredThrowable=a;this.initCause(a)},"Throwable,~S");c(d,"getUndeclaredThrowable",function(){return this.undeclaredThrowable});e(d,"getCause",function(){return this.undeclaredThrowable});d=s(java.io,"IOException",Exception);d=s(java.io,"CharConversionException",java.io.IOException);
d=s(java.io,"EOFException",java.io.IOException);d=s(java.io,"FileNotFoundException",java.io.IOException);d=p(function(){this.bytesTransferred=0;q(this,arguments)},java.io,"InterruptedIOException",java.io.IOException);d=s(java.io,"SyncFailedException",java.io.IOException);d=s(java.io,"UnsupportedEncodingException",java.io.IOException);d=s(java.io,"UTFDataFormatException",java.io.IOException);c(d,"getMessage",function(){var a=Q(this,java.io.WriteAbortedException,"getMessage",[]);return this.detail?
a+"; "+this.detail.toString():a});e(d,"getCause",function(){return this.detail});d=s(a,"ConcurrentModificationException",RuntimeException);n(d,function(){A(this,a.ConcurrentModificationException,[])});d=s(a,"EmptyStackException",RuntimeException);d=p(function(){this.key=this.className=null;q(this,arguments)},a,"MissingResourceException",RuntimeException);n(d,function(d,h,b){A(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=s(a,"NoSuchElementException",RuntimeException);d=s(a,"TooManyListenersException",Exception);d=s(java.lang,"Void");d.TYPE=d;E(java.lang.reflect,"GenericDeclaration");E(java.lang.reflect,"AnnotatedElement");d=s(java.lang.reflect,"AccessibleObject",null,java.lang.reflect.AnnotatedElement);n(d,function(){});c(d,"isAccessible",function(){return!1});d.setAccessible=c(d,"setAccessible",function(){},"~A,~B");c(d,"setAccessible",function(){},"~B");e(d,"isAnnotationPresent",
function(){return!1},"Class");e(d,"getDeclaredAnnotations",function(){return[]});e(d,"getAnnotations",function(){return[]});e(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=[];E(java.lang.reflect,"InvocationHandler");d=E(java.lang.reflect,"Member");d=s(java.lang.reflect,"Modifier");n(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=p(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]);
n(d,function(a,d,h,b){A(this,java.lang.reflect.Constructor,[]);this.clazz=a;this.parameterTypes=d;this.exceptionTypes=h;this.modifiers=b},"Class,~A,~A,~N");e(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});e(d,"isSynthetic",function(){return!1});e(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");e(d,"getDeclaringClass",function(){return this.clazz});c(d,"getExceptionTypes",function(){return this.exceptionTypes});e(d,"getModifiers",function(){return this.modifiers});e(d,"getName",function(){return this.getDeclaringClass().getName()});
c(d,"getParameterTypes",function(){return this.parameterTypes});e(d,"hashCode",function(){return this.getDeclaringClass().getName().hashCode()});c(d,"newInstance",function(a){var d=new this.clazz(Ba);q(d,a);return d},"~A");e(d,"toString",function(){return null});d=s(java.lang.reflect,"Field",java.lang.reflect.AccessibleObject,java.lang.reflect.Member);e(d,"isSynthetic",function(){return!1});c(d,"toGenericString",function(){return null});c(d,"isEnumConstant",function(){return!1});c(d,"getGenericType",
function(){return null});e(d,"equals",function(){return!1},"~O");e(d,"getDeclaringClass",function(){return null});e(d,"getName",function(){return null});c(d,"getType",function(){return null});e(d,"hashCode",function(){return 0});e(d,"toString",function(){return null});d=p(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]);n(d,function(a,d,h,b,c,e){A(this,java.lang.reflect.Method,[]);this.clazz=a;this.name=d;this.parameterTypes=h;this.returnType=b;this.exceptionTypes=c;this.modifiers=e},"Class,~S,~A,Class,~A,~N");e(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});e(d,"isSynthetic",function(){return!1});c(d,"getDefaultValue",function(){return null});e(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");e(d,"getDeclaringClass",
function(){return this.clazz});c(d,"getExceptionTypes",function(){return this.exceptionTypes});e(d,"getModifiers",function(){return this.modifiers});e(d,"getName",function(){return this.name});c(d,"getParameterTypes",function(){return this.parameterTypes});c(d,"getReturnType",function(){return this.returnType});e(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");e(d,"toString",function(){return null})})($);if(!Jmol._debugCode){u=p(function(){this.$name=null;this.$ordinal=0;q(this,arguments)},java.lang,"Enum",null,[Comparable,java.io.Serializable]);n(u,function(b,a){this.$name=b;this.$ordinal=a},"~S,~N");c(u,"name",function(){return this.$name});c(u,"ordinal",function(){return this.$ordinal});e(u,"toString",function(){return this.$name});e(u,"equals",function(b){return this===b},"~O");e(u,"clone",
function(){throw new CloneNotSupportedException;});e(u,"compareTo",function(b){if(this.getClass()!==b.getClass()&&this.getDeclaringClass()!==b.getDeclaringClass())throw new ClassCastException;return this.$ordinal-b.$ordinal},"~O");c(u,"getDeclaringClass",function(){var b=this.getClass(),a=b.getSuperclass();return a===Enum?b:a});u.$valueOf=c(u,"$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");e(u,"finalize",function(){});v(null,"java.lang.Thread",["java.util.Date"],function(){var b=p(function(){this.name=this.group=this.target=null;this.priority=0;q(this,arguments)},java.lang,"Thread",null,Runnable);n(b,function(a){this.init(null,a,"Thread-"+(new java.util.Date).getTime()+Math.random(),0)},"Runnable");n(b,function(a,d){this.init(a,d,"Thread-"+(new java.util.Date).getTime()+Math.random(),0)},"ThreadGroup,Runnable");n(b,function(a){this.init(null,null,a,0)},"~S");
n(b,function(a,d){this.init(a,null,d,0)},"ThreadGroup,~S");n(b,function(a,d){this.init(null,a,d,0)},"Runnable,~S");n(b,function(a,d,h){this.init(a,d,h,0)},"ThreadGroup,Runnable,~S");n(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});e(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});u=p(function(){this.name=this.parent=null;this.maxPriority=0;q(this,arguments)},java.lang,"ThreadGroup",null);n(u,function(){this.name="system";this.maxPriority=10});n(u,
function(b){this.construct(Thread.currentThread().getThreadGroup(),b)},"~S");n(u,function(b,a){if(null==b)throw new NullPointerException;this.name=a;this.parent=b;this.maxPriority=10},"ThreadGroup,~S");c(u,"getName",function(){return this.name});c(u,"getParent",function(){return this.parent});c(u,"getMaxPriority",function(){return this.maxPriority});v(["java.io.FilterInputStream"],"java.io.BufferedInputStream",null,function(){var b=p(function(){this.buf=null;this.pos=this.count=0;this.markpos=-1;
this.marklimit=0;q(this,arguments)},java.io,"BufferedInputStream",java.io.FilterInputStream);n(b,function(a){A(this,java.io.BufferedInputStream,[a]);this.buf=N(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});e(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=N(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)});e(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");e(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");e(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");e(b,"available",function(){var a=this.count-this.pos,d=this.getInIfOpen().available();return a>2147483647-d?2147483647:a+d});e(b,"mark",function(a){this.marklimit=a;this.markpos=this.pos},"~N");e(b,"reset",function(){this.getBufIfOpen();if(0>this.markpos)throw new java.io.IOException("Resetting to invalid mark");this.pos=this.markpos});e(b,"markSupported",function(){return!0});e(b,"close",function(){var a=this.$in;this.$in=null;null!=a&&a.close()})});v(["java.io.Reader"],
"java.io.BufferedReader",null,function(){var b=p(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);n(b,function(a){A(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=R(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=R(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),g;a&&"\n"==this.cb[this.nextChar]&&this.nextChar++;a=this.skipLF=!1;g=this.nextChar;a:for(;g<this.nChars;g++)if(c=this.cb[g],"\n"==c||"\r"==c){b=!0;break a}h=this.nextChar;this.nextChar=g;h=String.instantialize(this.cb,h,g-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)});e(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()});e(b,"markSupported",function(){return!0});e(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");e(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)})});v(["java.io.Writer"],"java.io.BufferedWriter",null,function(){var b=p(function(){this.buf=this.out=null;this.pos=0;this.lineSeparator="\r\n";q(this,arguments)},java.io,"BufferedWriter",java.io.Writer);n(b,function(a){A(this,java.io.BufferedWriter,[a]);this.out=a;this.buf=R(8192,"\x00")},"java.io.Writer");n(b,function(a,d){A(this,java.io.BufferedWriter,[a]);if(0<d)this.out=a,this.buf=R(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=R(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=R(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")});v(["java.io.InputStream"],"java.io.ByteArrayInputStream",null,function(){var b=p(function(){this.buf=null;this.count=this.$mark=this.pos=0;q(this,arguments)},java.io,"ByteArrayInputStream",java.io.InputStream);n(b,function(a){A(this,java.io.ByteArrayInputStream,[]);this.buf=a;this.pos=0;this.count=a.length},
"~A");e(b,"readByteAsInt",function(){return this.pos<this.count?this.buf[this.pos++]&255:-1});e(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");e(b,"skip",function(a){var d=this.count-this.pos;
a<d&&(d=0>a?0:a);this.pos+=d;return d},"~N");e(b,"available",function(){return this.count-this.pos});e(b,"markSupported",function(){return!0});e(b,"mark",function(){this.$mark=this.pos},"~N");e(b,"resetStream",function(){});e(b,"reset",function(){this.pos=this.$mark});e(b,"close",function(){})});v(["java.io.OutputStream"],"java.io.ByteArrayOutputStream",null,function(){var b=p(function(){this.buf=null;this.count=0;q(this,arguments)},java.io,"ByteArrayOutputStream",java.io.OutputStream);n(b,function(){this.construct(32)});
n(b,function(a){A(this,java.io.ByteArrayOutputStream,[]);if(0>a)throw new IllegalArgumentException("Negative initial size: "+a);this.buf=N(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=N(d,0);System.arraycopy(a,0,h,0,a.length<
d?a.length:d);return h},"~A,~N");e(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});e(b,"toString",function(){return String.instantialize(this.buf,0,this.count)});e(b,"close",function(){})});v(["java.io.InputStream"],"java.io.FilterInputStream",null,function(){var b=p(function(){this.$in=null;q(this,arguments)},java.io,"FilterInputStream",java.io.InputStream);n(b,function(a){A(this,java.io.FilterInputStream,[]);this.$in=a},"java.io.InputStream");c(b,
"readByteAsInt",function(){return this.$in.readByteAsInt()});e(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()})});v(["java.io.Closeable"],"java.io.InputStream",null,function(){var b=
s(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(g){if(!y(g,"java.io.IOException"))throw g;}return c},"~A,~N,~N");c(b,"skip",function(a){var d=a,h;null==java.io.InputStream.skipBuffer&&(java.io.InputStream.skipBuffer=N(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});e(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});v(["java.io.Reader"],"java.io.InputStreamReader",null,function(){var b=p(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);n(b,function(a,d){A(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});e(b,"read",function(a,d,h){if(null==this.bytearr||this.bytearr.length<h)this.bytearr=
N(h,0);var b,c,g=0,e=d,l=this.$in.read(this.bytearr,this.pos,h-this.pos),m=this.$in.available();if(0>l)return-1;for(var x=l;g<x;){h=this.bytearr[g]&255;if(this.isUTF8)switch(h>>4){case 12:case 13:if(g+1>=l){if(1<=m){x=g;continue}}else if(128==((b=this.bytearr[g+1])&192)){a[e++]=String.fromCharCode((h&31)<<6|b&63);g+=2;continue}this.isUTF8=!1;break;case 14:if(g+2>=l){if(2<=m){x=g;continue}}else if(128==((b=this.bytearr[g+1])&192)&&128==((c=this.bytearr[g+2])&192)){a[e++]=String.fromCharCode((h&15)<<
12|(b&63)<<6|c&63);g+=3;continue}this.isUTF8=!1}g++;a[e++]=String.fromCharCode(h)}this.pos=l-g;for(a=0;a<this.pos;a++)this.bytearr[a]=this.bytearr[g++];return e-d},"~A,~N,~N");e(b,"ready",function(){return this.isOpen});e(b,"close",function(){this.$in.close();this.isOpen=!1})});v(["java.io.Closeable","$.Flushable"],"java.io.OutputStream",null,function(){var b=s(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");e(b,"flush",function(){});e(b,"close",function(){})});v(["java.io.Closeable"],"java.io.Reader",null,function(){var b=p(function(){this.lock=null;this.skipBuffer=String.fromCharCode(null);q(this,arguments)},java.io,"Reader",null,java.io.Closeable);n(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=R(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");
})});v(["java.io.Reader"],"java.io.StringReader",null,function(){var b=p(function(){this.str=null;this.$mark=this.next=this.length=0;q(this,arguments)},java.io,"StringReader",java.io.Reader);n(b,function(a){A(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");});e(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");e(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");e(b,"ready",function(){this.ensureOpen();return!0});e(b,"markSupported",function(){return!0});e(b,"mark",function(a){if(0>a)throw new IllegalArgumentException("Read-ahead limit < 0");
this.ensureOpen();this.$mark=this.next},"~N");e(b,"reset",function(){this.ensureOpen();this.next=this.$mark});e(b,"close",function(){this.str=null})});v(["java.io.Closeable","$.Flushable","java.lang.Appendable"],"java.io.Writer",null,function(){var b=p(function(){this.lock=null;q(this,arguments)},java.io,"Writer",null,[Appendable,java.io.Closeable,java.io.Flushable]);n(b,function(){this.lock=this});n(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=R(1,"\x00");d[0]=String.fromCharCode(a);this.write(d)},"~N");c(b,"write",function(a){var d=R(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=R(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")});r("java.net");v(["java.io.IOException"],"java.net.MalformedURLException",null,function(){var b=s(java.net,"MalformedURLException",java.io.IOException);n(b,function(){A(this,java.net.MalformedURLException,[])})});r("java.net");v(["java.io.IOException"],"java.net.UnknownServiceException",null,function(){var b=s(java.net,"UnknownServiceException",
java.io.IOException);n(b,function(){A(this,java.net.UnknownServiceException,[])})});r("java.net");v(["java.util.Hashtable"],"java.net.URL",null,function(){var b=p(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);n(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,g,e,l=0,m=null,x=!1,n=!1;try{for(g=d.length;0<g&&" ">=d.charAt(g-1);)g--;for(;l<g&&" ">=d.charAt(l);)l++;d.regionMatches(!0,l,"url:",0,4)&&(l+=4);l<d.length&&"#"==d.charAt(l)&&(x=!0);for(c=l;!x&&c<g&&47!=(e=d.charAt(c).charCodeAt(0));c++)if(58==e){var q=d.substring(l,c).toLowerCase();this.isValidProtocol(q)&&(m=q,l=c+1);break}this.protocol=m;if(null!=a&&(null==m||m.equalsIgnoreCase(a.protocol)))null==h&&(h=a.handler),null!=a.path&&a.path.startsWith("/")&&
(m=null),null==m&&(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,n=!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("#",l);0<=c&&(this.ref=d.substring(c+1,g),g=c);n&&l==g&&(this.query=a.query,
null==this.ref&&(this.ref=a.ref));h.parseURL(this,d,l,g)}catch(S){if(y(S,"java.net.MalformedURLException"))throw S;if(y(S,Exception))throw b=S,c=new java.net.MalformedURLException(b.getMessage()),c.initCause(b),c;throw S;}},"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,g,e,l){this.protocol=a;this.host=d;this.port=h;this.file=null==e?g:g+"?"+e;this.userInfo=c;this.path=g;this.ref=l;this.$hashCode=-1;this.query=e;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});e(b,"equals",function(a){return!C(a,"java.net.URL")?!1:
this.handler.equals2(this,a)},"~O");e(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");e(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 $._O});r("java.net");v(null,"java.net.URLConnection",["java.util.ArrayList"],function(){var b=p(function(){this.url=null;this.doInput=!0;this.connected=this.doOutput=!1;this.requests=null;q(this,arguments)},java.net,"URLConnection",null);n(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(B(-1,[a,d]))},"~S,~S")});r("java.net");u=s(java.net,"URLEncoder",null);u.encode=c(u,"encode",function(b){return encodeURIComponent(b)},"~S");r("java.net");
u=s(java.net,"URLStreamHandler",null);c(u,"openConnectionProxy",function(){throw new UnsupportedOperationException("Method not implemented.");},"java.net.URL,java.net.Proxy");c(u,"parseURL",function(b,a,d,h){var k=b.getProtocol(),c=b.getAuthority(),g=b.getUserInfo(),e=b.getHost(),l=b.getPort(),m=b.getPath(),x=b.getQuery(),n=b.getRef(),q=!1,S=!1;if(d<h){var p=a.indexOf("?"),S=p==d;-1!=p&&p<h&&(x=a.substring(p+1,h),h>p&&(h=p),a=a.substring(0,p))}var j=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;j=a.indexOf("/",d);0>j&&(j=a.indexOf("?",d),0>j&&(j=h));e=c=a.substring(d,j);p=c.indexOf("@");-1!=p?(g=c.substring(0,p),e=c.substring(p+1)):g=null;if(null!=e){if(0<e.length&&"["==e.charAt(0))throw new IllegalArgumentException("Invalid host: "+e);p=e.indexOf(":");l=-1;0<=p&&(e.length>p+1&&(l=Integer.parseInt(e.substring(p+1))),e=e.substring(0,p))}else e="";if(-1>l)throw new IllegalArgumentException("Invalid port number :"+
l);d=j;0<c.length&&(m="")}null==e&&(e="");d<h?"/"==a.charAt(d)?m=a.substring(d,h):null!=m&&0<m.length?(q=!0,p=m.lastIndexOf("/"),S="",-1==p&&null!=c&&(S="/"),m=m.substring(0,p+1)+S+a.substring(d,h)):m=(null!=c?"/":"")+a.substring(d,h):S&&null!=m&&(p=m.lastIndexOf("/"),0>p&&(p=0),m=m.substring(0,p)+"/");null==m&&(m="");if(q){for(;0<=(j=m.indexOf("/./"));)m=m.substring(0,j)+m.substring(j+2);for(j=0;0<=(j=m.indexOf("/../",j));)0<j&&0<=(h=m.lastIndexOf("/",j-1))&&0!=m.indexOf("/../",h)?(m=m.substring(0,
h)+m.substring(j+3),j=0):j+=3;for(;m.endsWith("/..");)if(j=m.indexOf("/.."),0<=(h=m.lastIndexOf("/",j-1)))m=m.substring(0,h+1);else break;m.startsWith("./")&&2<m.length&&(m=m.substring(2));m.endsWith("/.")&&(m=m.substring(0,m.length-1))}this.setURL(b,k,e,l,c,g,m,x,n)},"java.net.URL,~S,~N,~N");c(u,"getDefaultPort",function(){return-1});c(u,"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(u,"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(u,"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(u,"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(u,"toExternalForm",function(){return""},"java.net.URL");c(u,"setURL",function(b,a,d,h,k,c,g,e,l){if(this!==b.handler)throw new SecurityException("handler for url different from this handler");
b.set(b.getProtocol(),d,h,k,c,g,e,l)},"java.net.URL,~S,~S,~N,~S,~S,~S,~S,~S");c(u,"setURLDeprecated",function(b,a,d,h,k,c){var g=null,e=null;if(null!=d&&0!=d.length){var g=-1==h?d:d+":"+h,l=d.lastIndexOf("@");-1!=l&&(e=d.substring(0,l),d=d.substring(l+1))}var m=null,l=null;null!=k&&(m=k.lastIndexOf("?"),-1!=m?(l=k.substring(m+1),m=k.substring(0,m)):m=k);this.setURL(b,a,d,h,g,e,m,l,c)},"java.net.URL,~S,~S,~N,~S,~S");r("java.net");E(java.net,"URLStreamHandlerFactory");r("java.text");u=p(function(){this.pattern=
null;q(this,arguments)},java.text,"MessageFormat",null);n(u,function(b){this.pattern=b},"~S");n(u,function(b){this.pattern=b},"~S,java.util.Locale");u.format=c(u,"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(u,"format",function(b){return java.text.MessageFormat.format(this.pattern,B(-1,[b]))},"~O");u=p(function(){this.haveNextNextGaussian=!1;this.nextNextGaussian=this.seed=0;q(this,arguments)},java.util,"Random",null,java.io.Serializable);
n(u,function(){var b=-2147483648;1==arguments.length&&(b=arguments[0]);-2147483648==b&&(b=System.currentTimeMillis());this.setSeed(b)});c(u,"next",function(b){this.seed=25214903917*this.seed+11&0xffffffffffff;return this.seed>>>48-b},"~N");c(u,"nextBoolean",function(){return 0.5<Math.random()});c(u,"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(u,"nextDouble",function(){return Math.random()});c(u,"nextFloat",function(){return Math.random()});
c(u,"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(u,"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(u,"nextLong",function(){return(this.next(32)<<
32)+this.next(32)});c(u,"setSeed",function(b){Math.seedrandom(b)},"~N");var ba=[],Z=Math,ca=52,ka=void 0,la=void 0,Ca=function(b){var a,d,h=this,k=b.length,c=0,g=h.i=h.j=h.m=0;h.S=[];h.c=[];for(k||(b=[k++]);256>c;)h.S[c]=c++;for(c=0;256>c;c++)a=h.S[c],g=g+a+b[c%k]&255,d=h.S[g],h.S[c]=d,h.S[g]=a;h.g=function(a){var d=h.S,b=h.i+1&255,k=d[b],c=h.j+k&255,f=d[c];d[b]=f;d[c]=k;for(var g=d[k+f&255];--a;)b=b+1&255,k=d[b],c=c+k&255,f=d[c],d[b]=f,d[c]=k,g=256*g+d[k+f&255];h.i=b;h.j=c;return g};h.g(256)},ma=
function(b,a,d,h){d=[];if(a&&"object"==typeof b)for(h in b)if(5>h.indexOf("S"))try{d.push(ma(b[h],a-1))}catch(k){}return d.length?d:""+b},da=function(b,a,d,h){b+="";for(h=d=0;h<b.length;h++){var k=a,c=h&255,g=(d^=19*a[h&255])+b.charCodeAt(h);k[c]=g&255}b="";for(h in a)b+=String.fromCharCode(a[h]);return b};Z.seedrandom=function(b,a){var d=[],h;b=da(ma(a?[b,ba]:arguments.length?b:[(new Date).getTime(),ba,window],3),d);h=new Ca(d);da(h.S,ba);Z.random=function(){for(var a=h.g(6),d=la,b=0;a<ca;)a=256*
(a+b),d*=256,b=h.g(1);for(;a>=ka;)a/=2,d/=2,b>>>=1;return(a+b)/d};return b};la=Z.pow(256,6);ca=Z.pow(2,ca);ka=2*ca;da(Z.random(),ba);v(["java.util.Collection"],"java.util.AbstractCollection",["java.lang.reflect.Array"],function(){var b=s(java.util,"AbstractCollection",null,java.util.Collection);e(b,"add",function(){throw new UnsupportedOperationException;},"~O");e(b,"addAll",function(a){var d=!1;for(a=a.iterator();a.hasNext();)this.add(a.next())&&(d=!0);return d},"java.util.Collection");e(b,"clear",
function(){for(var a=this.iterator();a.hasNext();)a.next(),a.remove()});e(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");e(b,"containsAll",function(a){for(a=a.iterator();a.hasNext();)if(!this.contains(a.next()))return!1;return!0},"java.util.Collection");e(b,"isEmpty",function(){return 0==this.size()});e(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");e(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");e(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");e(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+"]"})});v(["java.util.AbstractCollection","$.Iterator","$.List","$.ListIterator","$.RandomAccess"],"java.util.AbstractList",
null,function(){var b=p(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");e(b,"clear",function(){this.removeRange(0,this.size())});e(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");e(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});e(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");e(b,"iterator",function(){return new java.util.AbstractList.SimpleListIterator(this)});e(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");e(b,"set",function(){throw new UnsupportedOperationException;},"~N,~O");e(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=p(function(){this.pos=-1;this.expectedModCount=0;this.lastPosition=-1;this.list=null;q(this,arguments)},java.util.AbstractList,"SimpleListIterator",null,java.util.Iterator);n(b,function(a){this.list=a;this.expectedModCount=a.modCount},"java.util.AbstractList");e(b,"hasNext",function(){return this.pos+1<this.list.size()});e(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(y(d,"IndexOutOfBoundsException"))throw new java.util.NoSuchElementException;
throw d;}throw new java.util.ConcurrentModificationException;});e(b,"remove",function(){if(this.expectedModCount==this.list.modCount){try{this.list.remove(this.lastPosition)}catch(a){if(y(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=s(java.util.AbstractList,"FullListIterator",java.util.AbstractList.SimpleListIterator,
java.util.ListIterator);n(b,function(a,d){A(this,java.util.AbstractList.FullListIterator,[a]);if(0<=d&&d<=a.size())this.pos=d-1;else throw new IndexOutOfBoundsException;},"java.util.AbstractList,~N");e(b,"add",function(a){if(this.expectedModCount==this.list.modCount){try{this.list.add(this.pos+1,a)}catch(d){if(y(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");e(b,"hasPrevious",function(){return 0<=this.pos});e(b,"nextIndex",function(){return this.pos+1});e(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(y(d,"IndexOutOfBoundsException"))throw new java.util.NoSuchElementException;throw d;}throw new java.util.ConcurrentModificationException;});e(b,"previousIndex",function(){return this.pos});e(b,"set",function(a){if(this.expectedModCount==
this.list.modCount)try{this.list.set(this.lastPosition,a)}catch(d){if(y(d,"IndexOutOfBoundsException"))throw new IllegalStateException;throw d;}else throw new java.util.ConcurrentModificationException;},"~O");s(java.util.AbstractList,"SubAbstractListRandomAccess",java.util.AbstractList.SubAbstractList,java.util.RandomAccess);b=p(function(){this.fullList=null;this.$size=this.offset=0;q(this,arguments)},java.util.AbstractList,"SubAbstractList",java.util.AbstractList);n(b,function(a,d,h){A(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");e(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");e(b,"size",function(){return this.$size});c(b,"sizeChanged",function(a){a?this.$size++:this.$size--;this.modCount=this.fullList.modCount},"~B");b=p(function(){this.iterator=this.subList=
null;this.end=this.start=0;q(this,arguments)},java.util.AbstractList.SubAbstractList,"SubAbstractListIterator",null,java.util.ListIterator);n(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");e(b,"hasNext",function(){return this.iterator.nextIndex()<this.end});e(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")});v(["java.util.Map"],"java.util.AbstractMap",["java.util.AbstractCollection","$.AbstractSet","$.Iterator"],function(){var b=p(function(){this.$values=this.$keySet=null;q(this,arguments)},java.util,"AbstractMap",null,java.util.Map);e(b,"clear",function(){this.entrySet().clear()});e(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");e(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");e(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");e(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");e(b,"hashCode",function(){for(var a=0,d=this.entrySet().iterator();d.hasNext();)a+=d.next().hashCode();return a});e(b,"isEmpty",function(){return 0==this.size()});e(b,"keySet",function(){null==this.$keySet&&(this.$keySet=(H("java.util.AbstractMap$1")?0:java.util.AbstractMap.$AbstractMap$1$(),
G(java.util.AbstractMap$1,this,null)));return this.$keySet});e(b,"put",function(){throw new UnsupportedOperationException;},"~O,~O");e(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");e(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");e(b,"size",function(){return this.entrySet().size()});e(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+"}"});e(b,"values",function(){null==this.$values&&(this.$values=(H("java.util.AbstractMap$2")?
0:java.util.AbstractMap.$AbstractMap$2$(),G(java.util.AbstractMap$2,this,null)));return this.$values});c(b,"clone",function(){return this.cloneAM()});c(b,"cloneAM",function(){var a;a=ea(this);a.$keySet=null;a.$values=null;return a});b.$AbstractMap$1$=function(){var a=M(java.util,"AbstractMap$1",java.util.AbstractSet);e(a,"contains",function(a){return this.b$["java.util.AbstractMap"].containsKey(a)},"~O");e(a,"size",function(){return this.b$["java.util.AbstractMap"].size()});e(a,"iterator",function(){return H("java.util.AbstractMap$1$1")?
0:java.util.AbstractMap.$AbstractMap$1$1$(),G(java.util.AbstractMap$1$1,this,null)})};b.$AbstractMap$1$1$=function(){var a=p(function(){U(this,arguments);this.setIterator=null;q(this,arguments)},java.util,"AbstractMap$1$1",null,java.util.Iterator);K(a,function(){this.setIterator=this.b$["java.util.AbstractMap"].entrySet().iterator()});e(a,"hasNext",function(){return this.setIterator.hasNext()});e(a,"next",function(){return this.setIterator.next().getKey()});e(a,"remove",function(){this.setIterator.remove()})};
b.$AbstractMap$2$=function(){var a=M(java.util,"AbstractMap$2",java.util.AbstractCollection);e(a,"size",function(){return this.b$["java.util.AbstractMap"].size()});e(a,"contains",function(a){return this.b$["java.util.AbstractMap"].containsValue(a)},"~O");e(a,"iterator",function(){return H("java.util.AbstractMap$2$1")?0:java.util.AbstractMap.$AbstractMap$2$1$(),G(java.util.AbstractMap$2$1,this,null)})};b.$AbstractMap$2$1$=function(){var a=p(function(){U(this,arguments);this.setIterator=null;q(this,
arguments)},java.util,"AbstractMap$2$1",null,java.util.Iterator);K(a,function(){this.setIterator=this.b$["java.util.AbstractMap"].entrySet().iterator()});e(a,"hasNext",function(){return this.setIterator.hasNext()});e(a,"next",function(){return this.setIterator.next().getValue()});e(a,"remove",function(){this.setIterator.remove()})}});v(["java.util.AbstractCollection","$.Set"],"java.util.AbstractSet",null,function(){var b=s(java.util,"AbstractSet",java.util.AbstractCollection,java.util.Set);e(b,"equals",
function(a){return this===a?!0:C(a,"java.util.Set")?this.size()==a.size()&&this.containsAll(a):!1},"~O");e(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});e(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")});v(["java.util.AbstractList","$.List",
"$.RandomAccess"],"java.util.ArrayList",["java.util.Arrays"],function(){var b=p(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]);n(b,function(){A(this,java.util.ArrayList,[]);this.setCapacity(0)});n(b,function(a){A(this,java.util.ArrayList,[]);this.setCapacity(a)},"~N");n(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+w(d/10)),this.addAll(a))},"java.util.Collection");c(b,"setCapacity",function(a){try{this.array=this.newElementArray(a)}catch(d){if(y(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<w(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<w(h/2)&&0<this.firstIndex||this.lastIndex>this.array.length-b){var c=this.firstIndex-b;if(0>c){var g=a+this.firstIndex;
System.arraycopy(this.array,g,this.array,g-c,h-a);this.lastIndex-=c;c=0}System.arraycopy(this.array,this.firstIndex,this.array,c,a);this.firstIndex=c}else g=a+this.firstIndex,System.arraycopy(this.array,g,this.array,g+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();g=a+this.firstIndex;for(b=g+b;g<b;)this.array[g++]=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");e(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=Q(this,java.util.ArrayList,"clone",
[]);a.array=this.array.clone();return a}catch(d){if(y(d,"CloneNotSupportedException"))return null;throw d;}});e(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");e(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=w(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=w(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=w(h/2);d>b&&(b=d);12>b&&(b=12);var c=this.newElementArray(h+b);if(a<w(h/2)){var g=c.length-(h+d);System.arraycopy(this.array,a,c,a+b,h-a);System.arraycopy(this.array,this.firstIndex,c,g,a);this.firstIndex=g;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");e(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");e(b,"isEmpty",function(){return this.lastIndex==this.firstIndex});e(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<w(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");e(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");e(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");e(b,"size",function(){return this.lastIndex-this.firstIndex});e(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})});v(["java.util.AbstractList",
"$.RandomAccess"],"java.util.Arrays",null,function(){var b=s(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 g=h;g<b;g++)a[g]=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 g=b+c>>1,e=a[g];if(e<h)b=g+1;else if(e>h)c=g-1;else return g}return-(b+1)},"~A,~N");b.binarySearch=c(b,"binarySearch",function(a,h){for(var b=0,c=a.length-1;b<=c;){var g=b+c>>1,e=a[g].compareTo(h);if(0>e)b=g+1;else if(0<e)c=g-1;else return g}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,g=a.length-1;c<=g;){var e=c+g>>1,l=b.compare(a[e],h);if(0>l)c=e+1;else if(0<l)g=e-1;else return e}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 g=a[c],e=h[c];if(!(null==g?null==e:null==g.equals?g==e:g.equals(e)))return!1}return!0},"~A,~A");b.sort=c(b,"sort",function(a,h,b,c){if(!(2>a.length)){var g=0,e=null,g=arguments.length,e=h,l=a,m=null;
switch(g){case 1:e=null;case 2:h=0;b=a.length;break;case 3:c=null;case 4:e=c,0==h&&b==a.length?l=a:(l=a.slice(h,b),m=a)}java.util.Arrays.rangeCheck(a.length,h,b);null==e&&(e=java.util.Arrays.comp);c=e;l.sort(function(a,d){return c.compare(a,d)});null!=m&&System.arraycopy(l,0,m,h,b)}},"~A,~N,~N,java.util.Comparator");var a=p(function(){this.a=null;q(this,arguments)},java.util.Arrays,"ArrayList",java.util.AbstractList,[java.util.RandomAccess,java.io.Serializable]);n(a,function(a){A(this,java.util.Arrays.ArrayList,
[]);if(null==a)throw new NullPointerException;this.a=a},"~A");e(a,"size",function(){return this.a.length});c(a,"toArray",function(){return this.a.clone()});e(a,"get",function(a){return this.a[a]},"~N");e(a,"set",function(a,h){var b=this.a[a];this.a[a]=h;return b},"~N,~O");e(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");e(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)}}});v("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=s(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,g=a.size(),e=g-1;for(c=-1;b<=e;)if(g=b+e>>1,0<(c=h.compareTo(a.get(g))))b=g+1;else{if(0==c)return g;e=g-1}return-g-(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 g;if(0>=(g=b.compare(h,c.next())))return 0==g?c.previousIndex():-c.previousIndex()-1}return-a.size()-1}var c=0,e=a.size(),l=e-1;for(g=-1;c<=l;)if(e=c+l>>1,0<(g=b.compare(h,a.get(e))))c=e+1;else{if(0==g)return e;l=e-1}return-e-(0>g?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(g){if(y(g,"java.util.NoSuchElementException"))throw new ArrayIndexOutOfBoundsException;
throw g;}c.set(b.next())}},"java.util.List,java.util.List");b.enumeration=c(b,"enumeration",function(a){return H("java.util.Collections$1")?0:java.util.Collections.$Collections$1$(),G(java.util.Collections$1,this,ja("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 b=a.next();a.hasNext();){var k=a.next();0>b.compareTo(k)&&(b=k)}return b},"java.util.Collection");
b.max=c(b,"max",function(a,b){for(var k=a.iterator(),c=k.next();k.hasNext();){var g=k.next();0>b.compare(c,g)&&(c=g)}return c},"java.util.Collection,java.util.Comparator");b.min=c(b,"min",function(a){a=a.iterator();for(var b=a.next();a.hasNext();){var k=a.next();0<b.compareTo(k)&&(b=k)}return b},"java.util.Collection");b.min=c(b,"min",function(a,b){for(var k=a.iterator(),c=k.next();k.hasNext();){var g=k.next();0<b.compare(c,g)&&(c=g)}return c},"java.util.Collection,java.util.Comparator");b.nCopies=
c(b,"nCopies",function(a,b){return new java.util.Collections.CopiesList(a,b)},"~N,~O");b.reverse=c(b,"reverse",function(a){var b=a.size(),k=a.listIterator();a=a.listIterator(b);for(var c=0;c<w(b/2);c++){var g=k.next(),e=a.previous();k.set(e);a.set(g)}},"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,b){if(C(a,"java.util.RandomAccess"))for(c=a.size()-1;0<c;c--)g=b.nextInt()%(c+1),0>g&&(g=-g),a.set(g,a.set(c,a.get(g)));else{for(var k=a.toArray(),c=k.length-1;0<c;c--){var g=b.nextInt()%(c+1);0>g&&(g=-g);var e=k[c];k[c]=k[g];k[g]=e}c=0;for(g=a.listIterator();g.hasNext();)g.next(),g.set(k[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,b){return new java.util.Collections.SingletonMap(a,b)},"~O,~O");b.sort=c(b,"sort",function(a){var b=a.toArray();java.util.Arrays.sort(b);var k=0;for(a=a.listIterator();a.hasNext();)a.next(),a.set(b[k++])},"java.util.List");b.sort=c(b,"sort",function(a,b){var k=
a.toArray(Array(a.size()));java.util.Arrays.sort(k,b);for(var c=0,g=a.listIterator();g.hasNext();)g.next(),g.set(k[c++])},"java.util.List,java.util.Comparator");b.swap=c(b,"swap",function(a,b,k){if(null==a)throw new NullPointerException;b!=k&&a.set(k,a.set(b,a.get(k)))},"java.util.List,~N,~N");b.replaceAll=c(b,"replaceAll",function(a,b,k){for(var c,g=!1;-1<(c=a.indexOf(b));)g=!0,a.set(c,k);return g},"java.util.List,~O,~O");b.rotate=c(b,"rotate",function(a,b){var k=a.size();if(0!=k){var c;c=0<b?b%
k:k- -1*(b%k);if(!(0==c||c==k))if(C(a,"java.util.RandomAccess"))for(var g=a.get(0),e=0,l=0,m=0;m<k;m++)e=(e+c)%k,g=a.set(e,g),e==l&&(e=++l,g=a.get(l));else g=(k-c)%k,c=a.subList(0,g),k=a.subList(g,k),java.util.Collections.reverse(c),java.util.Collections.reverse(k),java.util.Collections.reverse(a)}},"java.util.List,~N");b.indexOfSubList=c(b,"indexOfSubList",function(a,b){var k=a.size(),c=b.size();if(c>k)return-1;if(0==c)return 0;var g=b.get(0),e=a.indexOf(g);if(-1==e)return-1;for(;e<k&&k-e>=c;){var l=
a.listIterator(e);if(null==g?null==l.next():g.equals(l.next())){for(var m=b.listIterator(1),x=!1;m.hasNext();){var n=m.next();if(!l.hasNext())return-1;if(null==n?null!=l.next():!n.equals(l.next())){x=!0;break}}if(!x)return e}e++}return-1},"java.util.List,java.util.List");b.lastIndexOfSubList=c(b,"lastIndexOfSubList",function(a,b){var k=b.size(),c=a.size();if(k>c)return-1;if(0==k)return c;for(var c=b.get(k-1),g=a.lastIndexOf(c);-1<g&&g+1>=k;){var e=a.listIterator(g+1);if(null==c?null==e.previous():
c.equals(e.previous())){for(var l=b.listIterator(k-1),m=!1;l.hasPrevious();){var x=l.previous();if(!e.hasPrevious())return-1;if(null==x?null!=e.previous():!x.equals(e.previous())){m=!0;break}}if(!m)return e.nextIndex()}g--}return-1},"java.util.List,java.util.List");b.list=c(b,"list",function(a){for(var b=new java.util.ArrayList;a.hasMoreElements();)b.add(a.nextElement());return b},"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,b){if(null==a)throw new NullPointerException;if(a.isEmpty())return 0;for(var k=0,c=a.iterator();c.hasNext();){var g=c.next();(null==b?null==g:b.equals(g))&&k++}return k},"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,b){return new java.util.Collections.CheckedCollection(a,b)},"java.util.Collection,Class");b.checkedMap=c(b,"checkedMap",function(a,b,k){return new java.util.Collections.CheckedMap(a,b,k)},"java.util.Map,Class,Class");b.checkedList=c(b,"checkedList",function(a,b){return C(a,"java.util.RandomAccess")?new java.util.Collections.CheckedRandomAccessList(a,
b):new java.util.Collections.CheckedList(a,b)},"java.util.List,Class");b.checkedSet=c(b,"checkedSet",function(a,b){return new java.util.Collections.CheckedSet(a,b)},"java.util.Set,Class");b.checkedSortedMap=c(b,"checkedSortedMap",function(a,b,k){return new java.util.Collections.CheckedSortedMap(a,b,k)},"java.util.SortedMap,Class,Class");b.checkedSortedSet=c(b,"checkedSortedSet",function(a,b){return new java.util.Collections.CheckedSortedSet(a,b)},"java.util.SortedSet,Class");b.addAll=c(b,"addAll",
function(a,b){for(var k=!1,c=0;c<b.length;c++)k=(new Boolean(k|a.add(b[c]))).valueOf();return k},"java.util.Collection,~A");b.disjoint=c(b,"disjoint",function(a,b){if(C(a,"java.util.Set")&&!C(b,"java.util.Set")||b.size()>a.size()){var k=a;a=b;b=k}for(k=a.iterator();k.hasNext();)if(b.contains(k.next()))return!1;return!0},"java.util.Collection,java.util.Collection");b.checkType=c(b,"checkType",function(a,b){if(!b.isInstance(a))throw new ClassCastException("Attempt to insert "+a.getClass()+" element into collection with element type "+
b);return a},"~O,Class");b.$Collections$1$=function(){var a=p(function(){U(this,arguments);this.it=null;q(this,arguments)},java.util,"Collections$1",null,java.util.Enumeration);K(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=s(java.util.Collections,"EmptyEnumeration",null,java.util.Enumeration);e(a,"hasMoreElements",function(){return!1});e(a,"nextElement",function(){throw new java.util.NoSuchElementException;
});a=s(java.util.Collections,"EmptyIterator",null,java.util.Iterator);e(a,"hasNext",function(){return!1});e(a,"next",function(){throw new java.util.NoSuchElementException;});e(a,"remove",function(){throw new IllegalStateException;});a=p(function(){this.n=0;this.element=null;q(this,arguments)},java.util.Collections,"CopiesList",java.util.AbstractList,java.io.Serializable);n(a,function(a,b){A(this,java.util.Collections.CopiesList,[]);if(0>a)throw new IllegalArgumentException;this.n=a;this.element=b},
"~N,~O");e(a,"contains",function(a){return null==this.element?null==a:this.element.equals(a)},"~O");e(a,"size",function(){return this.n});e(a,"get",function(a){if(0<=a&&a<this.n)return this.element;throw new IndexOutOfBoundsException;},"~N");a=s(java.util.Collections,"EmptyList",java.util.AbstractList,java.io.Serializable);e(a,"contains",function(){return!1},"~O");e(a,"size",function(){return 0});e(a,"get",function(){throw new IndexOutOfBoundsException;},"~N");a=s(java.util.Collections,"EmptySet",
java.util.AbstractSet,java.io.Serializable);e(a,"contains",function(){return!1},"~O");e(a,"size",function(){return 0});e(a,"iterator",function(){return H("java.util.Collections$EmptySet$1")?0:java.util.Collections.EmptySet.$Collections$EmptySet$1$(),G(java.util.Collections$EmptySet$1,this,null)});a.$Collections$EmptySet$1$=function(){var a=M(java.util,"Collections$EmptySet$1",null,java.util.Iterator);e(a,"hasNext",function(){return!1});e(a,"next",function(){throw new java.util.NoSuchElementException;
});e(a,"remove",function(){throw new UnsupportedOperationException;})};a=s(java.util.Collections,"EmptyMap",java.util.AbstractMap,java.io.Serializable);e(a,"containsKey",function(){return!1},"~O");e(a,"containsValue",function(){return!1},"~O");e(a,"entrySet",function(){return java.util.Collections.EMPTY_SET});e(a,"get",function(){return null},"~O");e(a,"keySet",function(){return java.util.Collections.EMPTY_SET});e(a,"values",function(){return java.util.Collections.EMPTY_LIST});a=s(java.util.Collections,
"ReverseComparator",null,[java.util.Comparator,java.io.Serializable]);e(a,"compare",function(a,b){return b.compareTo(a)},"~O,~O");a=p(function(){this.comparator=null;q(this,arguments)},java.util.Collections,"ReverseComparatorWithComparator",null,[java.util.Comparator,java.io.Serializable]);n(a,function(a){this.comparator=a},"java.util.Comparator");c(a,"compare",function(a,b){return this.comparator.compare(b,a)},"~O,~O");a=p(function(){this.element=null;q(this,arguments)},java.util.Collections,"SingletonSet",
java.util.AbstractSet,java.io.Serializable);n(a,function(a){A(this,java.util.Collections.SingletonSet,[]);this.element=a},"~O");e(a,"contains",function(a){return null==this.element?null==a:this.element.equals(a)},"~O");e(a,"size",function(){return 1});e(a,"iterator",function(){return H("java.util.Collections$SingletonSet$1")?0:java.util.Collections.SingletonSet.$Collections$SingletonSet$1$(),G(java.util.Collections$SingletonSet$1,this,null)});a.$Collections$SingletonSet$1$=function(){var a=p(function(){U(this,
arguments);this.$hasNext=!0;q(this,arguments)},java.util,"Collections$SingletonSet$1",null,java.util.Iterator);e(a,"hasNext",function(){return this.$hasNext});e(a,"next",function(){if(this.$hasNext)return this.$hasNext=!1,this.b$["java.util.Collections.SingletonSet"].element;throw new java.util.NoSuchElementException;});e(a,"remove",function(){throw new UnsupportedOperationException;})};a=p(function(){this.element=null;q(this,arguments)},java.util.Collections,"SingletonList",java.util.AbstractList,
java.io.Serializable);n(a,function(a){A(this,java.util.Collections.SingletonList,[]);this.element=a},"~O");e(a,"contains",function(a){return null==this.element?null==a:this.element.equals(a)},"~O");e(a,"get",function(a){if(0==a)return this.element;throw new IndexOutOfBoundsException;},"~N");e(a,"size",function(){return 1});a=p(function(){this.v=this.k=null;q(this,arguments)},java.util.Collections,"SingletonMap",java.util.AbstractMap,java.io.Serializable);n(a,function(a,b){A(this,java.util.Collections.SingletonMap,
[]);this.k=a;this.v=b},"~O,~O");e(a,"containsKey",function(a){return null==this.k?null==a:this.k.equals(a)},"~O");e(a,"containsValue",function(a){return null==this.v?null==a:this.v.equals(a)},"~O");e(a,"get",function(a){return this.containsKey(a)?this.v:null},"~O");e(a,"size",function(){return 1});e(a,"entrySet",function(){return H("java.util.Collections$SingletonMap$1")?0:java.util.Collections.SingletonMap.$Collections$SingletonMap$1$(),G(java.util.Collections$SingletonMap$1,this,null)});a.$Collections$SingletonMap$1$=
function(){var a=M(java.util,"Collections$SingletonMap$1",java.util.AbstractSet);e(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");e(a,"size",function(){return 1});e(a,"iterator",function(){return H("java.util.Collections$SingletonMap$1$1")?0:java.util.Collections.$Collections$SingletonMap$1$1$(),G(java.util.Collections$SingletonMap$1$1,
this,null)})};a.$Collections$SingletonMap$1$1$=function(){var a=p(function(){U(this,arguments);this.$hasNext=!0;q(this,arguments)},java.util,"Collections$SingletonMap$1$1",null,java.util.Iterator);e(a,"hasNext",function(){return this.$hasNext});e(a,"next",function(){if(this.$hasNext)return this.$hasNext=!1,H("java.util.Collections$SingletonMap$1$1$1")?0:java.util.Collections.$Collections$SingletonMap$1$1$1$(),G(java.util.Collections$SingletonMap$1$1$1,this,null);throw new java.util.NoSuchElementException;
});e(a,"remove",function(){throw new UnsupportedOperationException;})};a.$Collections$SingletonMap$1$1$1$=function(){var a=M(java.util,"Collections$SingletonMap$1$1$1",null,java.util.Map.Entry);e(a,"equals",function(a){return this.b$["java.util.Collections$SingletonMap$1"].contains(a)},"~O");e(a,"getKey",function(){return this.b$["java.util.Collections.SingletonMap"].k});e(a,"getValue",function(){return this.b$["java.util.Collections.SingletonMap"].v});e(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())});e(a,"setValue",function(){throw new UnsupportedOperationException;},"~O")};a=p(function(){this.mutex=this.c=null;q(this,arguments)},java.util.Collections,"SynchronizedCollection",null,[java.util.Collection,java.io.Serializable]);n(a,function(a){this.c=a;this.mutex=this},"java.util.Collection");n(a,function(a,b){this.c=
a;this.mutex=b},"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=s(java.util.Collections,"SynchronizedRandomAccessList",java.util.Collections.SynchronizedList,java.util.RandomAccess);e(a,"subList",
function(a,b){return new java.util.Collections.SynchronizedRandomAccessList(this.list.subList(a,b),this.mutex)},"~N,~N");a=p(function(){this.list=null;q(this,arguments)},java.util.Collections,"SynchronizedList",java.util.Collections.SynchronizedCollection,java.util.List);n(a,function(a){A(this,java.util.Collections.SynchronizedList,[a]);this.list=a},"java.util.List");n(a,function(a,b){A(this,java.util.Collections.SynchronizedList,[a,b]);this.list=a},"java.util.List,~O");c(a,"add",function(a,b){this.list.add(a,
b)},"~N,~O");c(a,"addAll",function(a,b){return this.list.addAll(a,b)},"~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,b){return this.list.set(a,b)},"~N,~O");c(a,"subList",function(a,b){return new java.util.Collections.SynchronizedList(this.list.subList(a,b),this.mutex)},"~N,~N");a=p(function(){this.mutex=this.m=null;q(this,arguments)},java.util.Collections,"SynchronizedMap",null,[java.util.Map,java.io.Serializable]);n(a,function(a){this.m=a;this.mutex=this},"java.util.Map");n(a,function(a,b){this.m=a;this.mutex=b},"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,b){return this.m.put(a,b)},"~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=s(java.util.Collections,"SynchronizedSet",
java.util.Collections.SynchronizedCollection,java.util.Set);e(a,"equals",function(a){return this.c.equals(a)},"~O");e(a,"hashCode",function(){return this.c.hashCode()});a=p(function(){this.sm=null;q(this,arguments)},java.util.Collections,"SynchronizedSortedMap",java.util.Collections.SynchronizedMap,java.util.SortedMap);n(a,function(a){A(this,java.util.Collections.SynchronizedSortedMap,[a]);this.sm=a},"java.util.SortedMap");n(a,function(a,b){A(this,java.util.Collections.SynchronizedSortedMap,[a,b]);
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,b){return new java.util.Collections.SynchronizedSortedMap(this.sm.subMap(a,b),this.mutex)},"~O,~O");c(a,"tailMap",function(a){return new java.util.Collections.SynchronizedSortedMap(this.sm.tailMap(a),
this.mutex)},"~O");a=p(function(){this.ss=null;q(this,arguments)},java.util.Collections,"SynchronizedSortedSet",java.util.Collections.SynchronizedSet,java.util.SortedSet);n(a,function(a){A(this,java.util.Collections.SynchronizedSortedSet,[a]);this.ss=a},"java.util.SortedSet");n(a,function(a,b){A(this,java.util.Collections.SynchronizedSortedSet,[a,b]);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,b){return new java.util.Collections.SynchronizedSortedSet(this.ss.subSet(a,b),this.mutex)},"~O,~O");c(a,"tailSet",function(a){return new java.util.Collections.SynchronizedSortedSet(this.ss.tailSet(a),this.mutex)},"~O");a=p(function(){this.c=null;q(this,arguments)},java.util.Collections,"UnmodifiableCollection",null,[java.util.Collection,
java.io.Serializable]);n(a,function(a){this.c=a},"java.util.Collection");e(a,"add",function(){throw new UnsupportedOperationException;},"~O");e(a,"addAll",function(){throw new UnsupportedOperationException;},"java.util.Collection");e(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 H("java.util.Collections$UnmodifiableCollection$1")?0:java.util.Collections.UnmodifiableCollection.$Collections$UnmodifiableCollection$1$(),G(java.util.Collections$UnmodifiableCollection$1,this,null)});e(a,"remove",function(){throw new UnsupportedOperationException;},"~O");e(a,"removeAll",function(){throw new UnsupportedOperationException;},"java.util.Collection");e(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=p(function(){U(this,arguments);this.iterator=null;q(this,arguments)},java.util,"Collections$UnmodifiableCollection$1",null,java.util.Iterator);K(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()});e(a,"remove",function(){throw new UnsupportedOperationException;})};a=s(java.util.Collections,"UnmodifiableRandomAccessList",java.util.Collections.UnmodifiableList,java.util.RandomAccess);e(a,"subList",function(a,b){return new java.util.Collections.UnmodifiableRandomAccessList(this.list.subList(a,b))},"~N,~N");a=p(function(){this.list=null;q(this,arguments)},java.util.Collections,"UnmodifiableList",java.util.Collections.UnmodifiableCollection,java.util.List);
n(a,function(a){A(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 H("java.util.Collections$UnmodifiableList$1")?0:java.util.Collections.UnmodifiableList.$Collections$UnmodifiableList$1$(),G(java.util.Collections$UnmodifiableList$1,this,ja("location",a))},"~N");c(a,"remove",function(){throw new UnsupportedOperationException;},"~N");e(a,"set",function(){throw new UnsupportedOperationException;},"~N,~O");c(a,"subList",
function(a,b){return new java.util.Collections.UnmodifiableList(this.list.subList(a,b))},"~N,~N");a.$Collections$UnmodifiableList$1$=function(){var a=p(function(){U(this,arguments);this.iterator=null;q(this,arguments)},java.util,"Collections$UnmodifiableList$1",null,java.util.ListIterator);K(a,function(){this.iterator=this.b$["java.util.Collections.UnmodifiableList"].list.listIterator(this.f$.location)});e(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()});e(a,"remove",function(){throw new UnsupportedOperationException;});e(a,"set",function(){throw new UnsupportedOperationException;},"~O")};a=p(function(){this.m=null;q(this,arguments)},java.util.Collections,
"UnmodifiableMap",null,[java.util.Map,java.io.Serializable]);n(a,function(a){this.m=a},"java.util.Map");e(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())});e(a,"put",function(){throw new UnsupportedOperationException;},"~O,~O");e(a,"putAll",function(){throw new UnsupportedOperationException;},"java.util.Map");e(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=s(java.util.Collections.UnmodifiableMap,"UnmodifiableEntrySet",java.util.Collections.UnmodifiableSet);e(a,"iterator",function(){return H("java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1")?0:java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet.$Collections$UnmodifiableMap$UnmodifiableEntrySet$1$(),G(java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1,this,null)});c(a,"toArray",function(){for(var a=this.c.size(),b=Array(a),
k=this.iterator();0<=--a;)b[a]=k.next();return b});c(a,"toArray",function(a){var b=this.c.size(),k=0,c=this.iterator();b>a.length&&(a=a.getClass().getComponentType(),a=java.lang.reflect.Array.newInstance(a,b));for(;k<b;)a[k++]=c.next();k<a.length&&(a[k]=null);return a},"~A");a.$Collections$UnmodifiableMap$UnmodifiableEntrySet$1$=function(){var a=p(function(){U(this,arguments);this.iterator=null;q(this,arguments)},java.util,"Collections$UnmodifiableMap$UnmodifiableEntrySet$1",null,java.util.Iterator);
K(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())});e(a,"remove",function(){throw new UnsupportedOperationException;})};a=p(function(){this.mapEntry=null;q(this,arguments)},java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet,"UnmodifiableMapEntry",
null,java.util.Map.Entry);n(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()});e(a,"setValue",function(){throw new UnsupportedOperationException;},"~O");c(a,"toString",function(){return this.mapEntry.toString()});a=s(java.util.Collections,"UnmodifiableSet",java.util.Collections.UnmodifiableCollection,
java.util.Set);e(a,"equals",function(a){return this.c.equals(a)},"~O");e(a,"hashCode",function(){return this.c.hashCode()});a=p(function(){this.sm=null;q(this,arguments)},java.util.Collections,"UnmodifiableSortedMap",java.util.Collections.UnmodifiableMap,java.util.SortedMap);n(a,function(a){A(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,b){return new java.util.Collections.UnmodifiableSortedMap(this.sm.subMap(a,b))},"~O,~O");c(a,"tailMap",function(a){return new java.util.Collections.UnmodifiableSortedMap(this.sm.tailMap(a))},"~O");a=p(function(){this.ss=null;q(this,arguments)},java.util.Collections,"UnmodifiableSortedSet",java.util.Collections.UnmodifiableSet,java.util.SortedSet);
n(a,function(a){A(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,b){return new java.util.Collections.UnmodifiableSortedSet(this.ss.subSet(a,b))},"~O,~O");c(a,"tailSet",function(a){return new java.util.Collections.UnmodifiableSortedSet(this.ss.tailSet(a))},
"~O");a=p(function(){this.type=this.c=null;q(this,arguments)},java.util.Collections,"CheckedCollection",null,[java.util.Collection,java.io.Serializable]);n(a,function(a,b){if(null==a||null==b)throw new NullPointerException;this.c=a;this.type=b},"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");e(a,"addAll",function(a){var b=a.size();if(0==b)return!1;var k=Array(b),c=a.iterator();
for(a=0;a<b;a++)k[a]=java.util.Collections.checkType(c.next(),this.type);c=!1;for(a=0;a<b;a++)c=(new Boolean(c|this.c.add(k[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=p(function(){this.type=this.i=null;q(this,arguments)},java.util.Collections,
"CheckedListIterator",null,java.util.ListIterator);n(a,function(a,b){this.i=a;this.type=b},"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=p(function(){this.l=null;q(this,arguments)},java.util.Collections,"CheckedList",java.util.Collections.CheckedCollection,java.util.List);n(a,function(a,b){A(this,java.util.Collections.CheckedList,[a,b]);this.l=a},"java.util.List,Class");c(a,"addAll",function(a,b){var k=b.size();if(0==k)return!1;for(var c=Array(k),g=b.iterator(),e=0;e<k;e++)c[e]=
java.util.Collections.checkType(g.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,b){return this.l.set(a,java.util.Collections.checkType(b,this.type))},"~N,~O");c(a,"add",function(a,b){this.l.add(a,java.util.Collections.checkType(b,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,b){return java.util.Collections.checkedList(this.l.subList(a,b),this.type)},"~N,~N");c(a,"equals",function(a){return this.l.equals(a)},"~O");c(a,"hashCode",function(){return this.l.hashCode()});
s(java.util.Collections,"CheckedRandomAccessList",java.util.Collections.CheckedList,java.util.RandomAccess);a=s(java.util.Collections,"CheckedSet",java.util.Collections.CheckedCollection,java.util.Set);e(a,"equals",function(a){return this.c.equals(a)},"~O");e(a,"hashCode",function(){return this.c.hashCode()});a=p(function(){this.valueType=this.keyType=this.m=null;q(this,arguments)},java.util.Collections,"CheckedMap",null,[java.util.Map,java.io.Serializable]);n(a,function(a,b,k){if(null==a||null==
b||null==k)throw new NullPointerException;this.m=a;this.keyType=b;this.valueType=k},"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,b){return this.m.put(java.util.Collections.checkType(a,this.keyType),java.util.Collections.checkType(b,
this.valueType))},"~O,~O");c(a,"remove",function(a){return this.m.remove(a)},"~O");e(a,"putAll",function(a){var b=a.size();if(0!=b){var k=Array(b);a=a.entrySet().iterator();for(var c=0;c<b;c++){var g=a.next();java.util.Collections.checkType(g.getKey(),this.keyType);java.util.Collections.checkType(g.getValue(),this.valueType);k[c]=g}for(c=0;c<b;c++)this.m.put(k[c].getKey(),k[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=p(function(){this.valueType=this.e=null;q(this,arguments)},java.util.Collections.CheckedMap,"CheckedEntry",null,java.util.Map.Entry);n(a,function(a,b){if(null==a)throw new NullPointerException;
this.e=a;this.valueType=b},"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=p(function(){this.valueType=this.s=null;q(this,arguments)},java.util.Collections.CheckedMap,"CheckedEntrySet",null,java.util.Set);
n(a,function(a,b){this.s=a;this.valueType=b},"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(),b=Array(a),c=this.iterator(),f=0;f<a;f++)b[f]=c.next();return b});c(a,"toArray",function(a){var b=this.size();a.length<b&&(a=a.getClass().getComponentType(),a=java.lang.reflect.Array.newInstance(a,b));for(var c=this.iterator(),f=0;f<b;f++)a[f]=
c.next();b<a.length&&(a[b]=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");e(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");e(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=p(function(){this.valueType=this.i=null;q(this,arguments)},java.util.Collections.CheckedMap.CheckedEntrySet,"CheckedEntryIterator",null,java.util.Iterator);n(a,function(a,b){this.i=
a;this.valueType=b},"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=p(function(){this.ss=null;q(this,arguments)},java.util.Collections,"CheckedSortedSet",java.util.Collections.CheckedSet,java.util.SortedSet);n(a,function(a,b){A(this,java.util.Collections.CheckedSortedSet,[a,b]);this.ss=a},"java.util.SortedSet,Class");
c(a,"comparator",function(){return this.ss.comparator()});c(a,"subSet",function(a,b){return new java.util.Collections.CheckedSortedSet(this.ss.subSet(a,b),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=p(function(){this.sm=
null;q(this,arguments)},java.util.Collections,"CheckedSortedMap",java.util.Collections.CheckedMap,java.util.SortedMap);n(a,function(a,b,c){A(this,java.util.Collections.CheckedSortedMap,[a,b,c]);this.sm=a},"java.util.SortedMap,Class,Class");c(a,"comparator",function(){return this.sm.comparator()});c(a,"subMap",function(a,b){return new java.util.Collections.CheckedSortedMap(this.sm.subMap(a,b),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});s(java.util,"Dictionary",null);v("java.util.AbstractCollection $.AbstractSet $.Dictionary $.Enumeration $.Iterator $.Map".split(" "),
"java.util.Hashtable",["java.util.Collections"],function(){var b=p(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]);n(b,function(){this.initHT()});c(b,"initHT",function(a,b){var c=null,f=11,g=0.75,f=a,g=b;"object"==typeof f?(c=f,f=Math.max(2*t.size(),11),this.__allowJS=c.__allowJS):this.__allowJS=!0;f=
f||11;g=g||0.75;if(0>f)throw new IllegalArgumentException("Illegal Capacity: "+f);if(0>=g||Float.isNaN(g))throw new IllegalArgumentException("Illegal Load: "+g);0==f&&(f=1);this.loadFactor=g;this.table=Array(f);this.threshold=I(Math.min(f*g,2147483640));this.__setJS();null!=c&&this.putAll(c)});e(b,"size",function(){var a=this.count;return a=this.__m&&this.__m.size||a});e(b,"isEmpty",function(){return 0==this.size()});e(b,"keys",function(){return this.getEnumeration(0)});e(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 b=this.__m.values(),c=b.next();!c.done;c=b.next()){if(c.value==a||c.value.equals(a))return!0}else{b=this.table;for(c=b.length;0<c--;)for(var f=b[c];null!=f;f=f.next_)if(f.value.equals(a))return!0}return!1},"~O");e(b,"containsValue",function(a){return this.contains(a)},"~O");e(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 b=this.table,c=a.hashCode(),b=b[(c&2147483647)%b.length];null!=b;b=b.next_)if(b.hash==c&&b.key.equals(a))return!0;return!1},"~O");e(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 b=null;return b=this.__m.get(a)}for(var c=this.table,b=a.hashCode(),c=c[(b&2147483647)%c.length];null!=c;c=c.next_)if(c.hash==b&&c.key.equals(a))return c.value;
return null},"~O");c(b,"rehash",function(){var a=this.table.length,b=this.table,c=(a<<1)+1;if(0<c-2147483639){if(2147483639==a)return;c=2147483639}var f=Array(c);this.modCount++;this.threshold=I(Math.min(c*this.loadFactor,2147483640));for(this.table=f;0<a--;)for(var g=b[a];null!=g;){var e=g,g=g.next_,l=(e.hash&2147483647)%c;e.next_=f[l];f[l]=e}});c(b,"addEntry",function(a,b,c,f){this.modCount++;var g=this.table;this.count>=this.threshold&&(this.rehash(),g=this.table,a=b.hashCode(),f=(a&2147483647)%
g.length);g[f]=new java.util.Hashtable.Entry(a,b,c,g[f]);this.count++},"~N,~O,~O,~N");e(b,"put",function(a,b){if(null==b)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,b),++this.modCount,null;case 3:var c=null,c=this.__m.get(a);this.__m.set(a,b);++this.modCount;return c}for(var f=this.table,c=a.hashCode(),g=(c&2147483647)%f.length,f=f[g];null!=f;f=f.next_)if(f.hash==c&&f.key.equals(a))return c=
f.value,f.value=b,c;this.addEntry(c,a,b,g);return null},"~O,~O");e(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 b=null,b=this.__m.get(a);this.__m["delete"](a);++this.modCount;return b}for(var c=this.table,f=a.hashCode(),g=(f&2147483647)%c.length,b=c[g],e=null;null!=b;e=b,b=b.next_)if(b.hash==f&&b.key.equals(a))return this.modCount++,
null!=e?e.next_=b.next_:c[g]=b.next_,this.count--,a=b.value,b.value=null,a;return null},"~O");e(b,"putAll",function(a){if(java.util.Hashtable.__isSimple(a)){var b=this;a.__m.forEach(function(a,d){b.put(d,a)})}else{var c;for(a=a.entrySet().iterator();a.hasNext()&&((c=a.next())||1);)this.put(c.getKey(),c.getValue())}},"java.util.Map");e(b,"clear",function(){var a=this.table;this.modCount++;java.util.Hashtable.__isSimple(this)&&this.__m.clear();this.__setJS();for(var b=a.length;0<=--b;)a[b]=null;this.count=
0});c(b,"clone",function(){try{var a=Q(this,java.util.Hashtable,"clone",[]);a.table=Array(this.table.length);for(var b=this.table.length;0<b--;)a.table[b]=null!=this.table[b]?this.table[b].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(b,h){a.__m.set(h,b);a.modCount++})):a.__m=null;return a}catch(c){if(y(c,"CloneNotSupportedException"))throw new InternalError(c);throw c;}});e(b,"toString",function(){var a=
this.size()-1;if(-1==a)return"{}";for(var b=this.entrySet().iterator(),c="{",f=0;;f++){var g=b.next(),e=g.getKey(),g=g.getValue(),c=c+(e===this?"(this Map)":e.toString()),c=c+"=",c=c+(g===this?"(this Map)":g.toString());if(f==a)return c+"}";c+=", "}});e(b,"equals",function(a){if(a===this)return!0;if(!C(a,"java.util.Map")||a.size()!=this.size())return!1;try{for(var b=this.entrySet().iterator();b.hasNext();){var c=b.next(),f=c.getKey(),g=c.getValue();if(null==g){if(!(null==a.get(f)&&a.containsKey(f)))return!1}else if(!g.equals(a.get(f)))return!1}}catch(e){if(y(e,
"ClassCastException")||y(e,NullPointerException))return!1;throw e;}return!0},"~O");e(b,"hashCode",function(){var a=0;if(0==this.count||0>this.loadFactor)return a;this.loadFactor=-this.loadFactor;for(var b,c=0,f=this.table;c<f.length&&((b=f[c])||1);c++)for(;null!=b;)a+=b.hashCode(),b=b.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");e(b,"keySet",function(){null==this.$keySet&&(this.$keySet=new java.util.Hashtable.KeySet(this));return this.$keySet});e(b,"entrySet",function(){null==this.$entrySet&&(this.$entrySet=new java.util.Hashtable.EntrySet(this));return this.$entrySet});e(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,b){return a.__m.get(null==b?null:b+"")},"~O,~O");b.__set=c(b,"__set",function(a,b,c){a.__m.set(null==b?null:b+"",c)},"java.util.Map,~O,~O");b.__hasKey=c(b,"__hasKey",function(a,b){return!a.__m?0:null!=b&&"string"!=typeof b?1:a.__m.has(b)?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 b=a.__m;a.__m=null;b.forEach(function(b,h){a.put(h,b)});b.clear()}},"java.util.Map");var a=p(function(){this.hash=0;this.next_=this.value=this.key=null;q(this,arguments)},java.util.Hashtable,"Entry",null,java.util.Map.Entry);n(a,function(a,b,c,f){this.hash=a;this.key=b;this.value=c;this.next_=f},"~N,~O,~O,java.util.Hashtable.Entry");e(a,"clone",function(){return new java.util.Hashtable.Entry(this.hash,this.key,this.value,null==this.next_?null:this.next_.clone())});
e(a,"getKey",function(){return this.key});e(a,"getValue",function(){return this.value});e(a,"setValue",function(a){if(null==a)throw new NullPointerException;var b=this.value;this.value=a;return b},"~O");e(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");e(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=p(function(){this.ht=null;q(this,arguments)},java.util.Hashtable,"KeySet",java.util.AbstractSet);n(a,function(a){A(this,java.util.Hashtable.KeySet,[]);this.ht=a},"java.util.Hashtable");e(a,"iterator",function(){return this.ht.getIterator(0)});e(a,"size",function(){return this.ht.size()});e(a,"contains",function(a){return this.ht.containsKey(a)},"~O");e(a,"remove",function(a){return null!=this.ht.remove(a)},"~O");e(a,"clear",function(){this.ht.clear()});
a=p(function(){this.ht=null;q(this,arguments)},java.util.Hashtable,"EntrySet",java.util.AbstractSet);n(a,function(a){A(this,java.util.Hashtable.EntrySet,[]);this.ht=a},"java.util.Hashtable");e(a,"iterator",function(){return this.ht.getIterator(2)});e(a,"contains",function(a){if(!C(a,"java.util.Map.Entry"))return!1;var b=a.getKey();switch(java.util.Hashtable.__hasKey(this.ht,b)){case 1:java.util.Hashtable.__ensureJavaMap(this.ht);break;case 3:a=a.getValue();var c=this.ht.get(b);return a===c||null!=
a&&a.equals(b);case 2:return!1}c=this.ht.table;b=b.hashCode();for(c=c[(b&2147483647)%c.length];null!=c;c=c.next_)if(c.hash==b&&c.equals(a))return!0;return!1},"~O");e(a,"remove",function(a){if(!C(a,"java.util.Map.Entry"))return!1;var b=a.getKey();switch(java.util.Hashtable.__hasKey(this.ht,b)){case 1:java.util.Hashtable.__ensureJavaMap(this.ht);break;case 3:a=a.getValue();if(null==a)return!1;var c=this.ht.get(b);return c===a||c.equals(a)?(this.ht.remove(b),!0):!1;case 2:return!1}for(var c=this.ht.table,
b=b.hashCode(),f=(b&2147483647)%c.length,g=c[f],e=null;null!=g;e=g,g=g.next_)if(g.hash==b&&g.equals(a))return this.ht.modCount++,null!=e?e.next_=g.next_:c[f]=g.next_,this.ht.count--,g.value=null,!0;return!1},"~O");e(a,"size",function(){return this.ht.size()});e(a,"clear",function(){this.ht.clear()});a=p(function(){this.ht=null;q(this,arguments)},java.util.Hashtable,"ValueCollection",java.util.AbstractCollection);n(a,function(a){A(this,java.util.Hashtable.ValueCollection,[]);this.ht=a},"java.util.Hashtable");
e(a,"iterator",function(){return this.ht.getIterator(1)});e(a,"size",function(){return this.ht.size()});e(a,"contains",function(a){return this.ht.containsValue(a)},"~O");e(a,"clear",function(){this.ht.clear()});a=p(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]);n(a,function(a,b,c){this.ht=a;
this.table=a.table;this.index=a.table.length;this.type=b;this.isIterator=c;this.expectedModCount=a.modCount;java.util.Hashtable.__isSimple(a)&&(this.jsMapIterator=a.__m.entries(),this.next_=this.jsMapIterator.next())},"java.util.Hashtable,~N,~B");e(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_,b=this.index,c=this.table;null==a&&0<b;)a=c[--b];this.next_=a;this.index=b;return null!=a});e(a,"nextElement",
function(){var a=this.next_;if(java.util.Hashtable.__isSimple(this.ht)){var b=this.type;this.current=a;var c=null;this.next_=c=this.jsMapIterator.next()||null;if(null!=a){var f=c=null,g=!1,g=a.done;if(!g){if(2>b)return a.value[b];c=a.value[0];f=a.value[1]}if(!g)return H("java.util.Hashtable$Enumerator$1")?0:java.util.Hashtable.Enumerator.$Hashtable$Enumerator$1$(),G(java.util.Hashtable$Enumerator$1,this,null,0,c,f,null)}}else{c=this.index;for(b=this.table;null==a&&0<c;)a=b[--c];this.next_=a;this.index=
c;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");});e(a,"hasNext",function(){return this.hasMoreElements()});e(a,"next",function(){if(this.ht.modCount!=this.expectedModCount)throw new java.util.ConcurrentModificationException;return this.nextElement()});e(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 b=null,b=a.value[0];this.ht.remove(b);this.expectedModCount++}else{for(var a=this.ht.table,b=(this.current.hash&2147483647)%a.length,c=a[b],f=null;null!=c;f=c,c=c.next_)if(c===this.current){this.ht.modCount++;this.expectedModCount++;null==f?a[b]=c.next_:f.next_=c.next_;this.ht.count--;this.current=null;return}throw new java.util.ConcurrentModificationException;
}});a.$Hashtable$Enumerator$1$=function(){var a=M(java.util,"Hashtable$Enumerator$1",java.util.Hashtable.Entry);e(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});v(["java.util.Map"],"java.util.MapEntry",null,function(){var b=p(function(){this.value=this.key=null;q(this,arguments)},java.util,"MapEntry",null,
[java.util.Map.Entry,Cloneable]);n(b,function(a){this.key=a},"~O");n(b,function(a,d){this.key=a;this.value=d},"~O,~O");c(b,"clone",function(){try{return Q(this,java.util.MapEntry,"clone",[])}catch(a){if(y(a,"CloneNotSupportedException"))return null;throw a;}});e(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");e(b,"getKey",function(){return this.key});
e(b,"getValue",function(){return this.value});e(b,"hashCode",function(){return(null==this.key?0:this.key.hashCode())^(null==this.value?0:this.value.hashCode())});e(b,"setValue",function(a){var d=this.value;this.value=a;return d},"~O");e(b,"toString",function(){return this.key+"="+this.value});E(java.util.MapEntry,"Type")});v(["java.util.Hashtable"],"java.util.Properties",null,function(){var b=p(function(){this.defaults=this.builder=null;q(this,arguments)},java.util,"Properties",java.util.Hashtable);
n(b,function(){A(this,java.util.Properties,[])});n(b,function(a){this.initHT();this.defaults=null==a?null:a},"java.util.Properties");c(b,"dumpString",function(a,d,b){var c=0;!b&&(c<d.length&&" "==d.charAt(c))&&(a+="\\ ",c++);for(;c<d.length;c++){var f=d.charAt(c);switch(f.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(f)||b&&" "==f)a+="\\";if(!(" "<=f&&"~">=f)){f=Integer.toHexString(f.charCodeAt(0));a+="\\u";
for(var g=0;g<4-f.length;g++)a+="0"}a+=f}}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 b=this.get(a),b="string"==typeof b?b:null;null==b&&null!=this.defaults&&(b=this.defaults.getProperty(a));return null==b?d:b},"~S,~S");c(b,"list",function(a){if(null==a)throw new NullPointerException;for(var d="",b=this.propertyNames();b.hasMoreElements();){for(var c=
b.nextElement(),d=d+c,d=d+"=",f=this.get(c),g=this.defaults;null==f;)f=g.get(c),g=g.defaults;40<f.length?(d+=f.substring(0,37),d+="..."):d+=f;a.println(d.toString());d=""}},"java.io.PrintStream");c(b,"list",function(a){if(null==a)throw new NullPointerException;for(var d="",b=this.propertyNames();b.hasMoreElements();){for(var c=b.nextElement(),d=d+c,d=d+"=",f=this.get(c),g=this.defaults;null==f;)f=g.get(c),g=g.defaults;40<f.length?(d+=f.substring(0,37),d+="..."):d+=f;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(b){if(!y(b,"java.io.IOException"))throw b;}},"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});E(java.util,"SortedMap",java.util.Map);
E(java.util,"SortedSet",java.util.Set);v(["java.util.Enumeration"],"java.util.StringTokenizer",null,function(){var b=p(function(){this.delimiters=this.string=null;this.returnDelimiters=!1;this.position=0;q(this,arguments)},java.util,"StringTokenizer",null,java.util.Enumeration);n(b,function(a,d,b){switch(arguments.length){case 1:d=" \t\n\r\f";case 2:b=!1}if(null==a)throw new NullPointerException;this.string=a;this.delimiters=d;this.returnDelimiters=b;this.position=0},"~S,~S,~B");c(b,"countTokens",
function(){for(var a=0,d=!1,b=this.position,c=this.string.length;b<c;b++)0<=this.delimiters.indexOf(this.string.charAt(b),0)?(this.returnDelimiters&&a++,d&&(a++,d=!1)):d=!0;d&&a++;return a});e(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});e(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;})});r("javajs.api");E(javajs.api,"BytePoster");r("javajs.api");E(javajs.api,"GenericColor");r("J.api");E(J.api,"GenericFileInterface");r("javajs.api");E(javajs.api,"GenericOutputChannel");r("javajs.api");E(javajs.api,"JSInterface");
r("javajs.api");E(javajs.api,"JSONEncodable");r("javajs.api");E(javajs.api,"ZInputStream");r("javajs.api.js");E(javajs.api.js,"J2SObjectInterface");r("J.api");E(J.api,"GenericMouseInterface");r("J.api");v(["J.api.FontManager"],"J.api.GenericPlatform",null,function(){E(J.api,"GenericPlatform",J.api.FontManager)});r("J.api");E(J.api,"PlatformViewer");r("J.api");E(J.api,"EventManager");r("J.api");E(J.api,"FontManager");r("JU");v(null,"JU.Font",["JU.AU"],function(){var b=p(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);n(b,function(a,d,b,c,f,g,e,l){this.manager=a;this.fid=d;this.fontFace=JU.Font.fontFaces[b];this.fontStyle=JU.Font.fontStyles[c];this.idFontFace=b;this.idFontStyle=c;this.fontSize=f;this.fontSizeAngstroms=e;this.isBold=1==(c&1);this.isItalic=2==(c&2);this.fontSizeNominal=
g;this.font=a.newFont(JU.Font.fontFaces[b],this.isBold,this.isItalic,f);this.fontMetrics=a.getFontMetrics(this,l);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,b,c,f,g,e){255<b&&(b=255);0>b&&(f=-b,c=b=10);for(var l=I(b)<<4,l=a&3|(d&3)<<2|l<<4,m=JU.Font.fontkeyCount;0<--m;)if(l==JU.Font.fontkeys[m]&&
JU.Font.font3ds[m].fontSizeNominal==c)return JU.Font.font3ds[m];m=JU.Font.fontkeyCount++;m==JU.Font.fontkeys.length&&(JU.Font.fontkeys=JU.AU.arrayCopyI(JU.Font.fontkeys,m+8),JU.Font.font3ds=JU.AU.arrayCopyObject(JU.Font.font3ds,m+8));a=new JU.Font(g,m,a,d,b,c,f,e);JU.Font.font3ds[m]=a;JU.Font.fontkeys[m]=l;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});e(b,"toString",function(){return"["+this.getInfo()+"]"});b.fontkeyCount=1;b.fontkeys=F(8,0);b.font3ds=Array(8);b.fontFaces=B(-1,["SansSerif","Serif","Monospaced",""]);b.fontStyles=B(-1,["Plain","Bold","Italic","BoldItalic"])});r("JS");v(["javajs.api.GenericColor"],"JS.Color",null,function(){var b=p(function(){this.argb=0;q(this,arguments)},JS,"Color",null,javajs.api.GenericColor);e(b,"addAlpha",function(a){if(255!=this.getOpacity255())return this;
var d=new JS.Color;d.argb=this.argb&16777215|a<<24;return d},"~N");e(b,"getRGB",function(){return this.argb&16777215});e(b,"getOpacity255",function(){return this.argb>>24&255});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,b){return(new JS.Color).set4(a,d,b,255)},"~N,~N,~N");b.get4=c(b,"get4",function(a,d,b,c){return(new JS.Color).set4(a,d,b,c)},"~N,~N,~N,~N");c(b,"set4",function(a,d,b,c){this.argb=(c<<24|a<<16|d<<8|b)&4294967295;
return this},"~N,~N,~N,~N");e(b,"toString",function(){var a="00000000"+Integer.toHexString(this.argb);return"[0x"+a.substring(a.length-8,a.length)+"]"})});r("JS");u=p(function(){this.height=this.width=0;q(this,arguments)},JS,"Dimension",null);n(u,function(b,a){this.set(b,a)},"~N,~N");c(u,"set",function(b,a){this.width=b;this.height=a;return this},"~N,~N");r("J.awtjs");s(J.awtjs,"Event",null);r("J.api");E(J.api,"GenericMenuInterface");r("JU");v(["JU.P3"],"JU.A4",["JU.T3"],function(){var b=p(function(){this.angle=
0;q(this,arguments)},JU,"A4",JU.P3);n(b,function(){A(this,JU.A4,[]);this.z=1});b.new4=c(b,"new4",function(a,d,b,c){var f=new JU.A4;f.set4(a,d,b,c);return f},"~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 b=new JU.A4;b.setVA(a,d);return b},"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,b,c){this.x=a;this.y=d;this.z=b;this.angle=
c},"~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,b,c,f,g,e,l,m){a=0.5*(a+f+m-1);this.x=l-g;this.y=b-e;this.z=c-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");e(b,"hashCode",function(){return JU.T3.floatToIntBits(this.x)^
JU.T3.floatToIntBits(this.y)^JU.T3.floatToIntBits(this.z)^JU.T3.floatToIntBits(this.angle)});e(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");e(b,"toString",function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.angle+")"});e(b,"toJSON",function(){return"["+this.x+","+this.y+","+this.z+","+180*this.angle/3.141592653589793+"]"})});r("JU");v(["java.net.URLConnection"],"JU.AjaxURLConnection",["JU.AU","$.Rdr"],function(){var b=p(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)});e(b,"connect",function(){});c(b,"outputBytes",function(a){this.bytesOut=a},"~A");c(b,"outputString",function(a){this.postOut=a},"~S");e(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()})});r("JU");v(["java.net.URLStreamHandler"],"JU.AjaxURLStreamHandler",["JU.AjaxURLConnection","$.SB"],function(){var b=p(function(){this.protocol=null;q(this,arguments)},JU,"AjaxURLStreamHandler",java.net.URLStreamHandler);n(b,function(a){A(this,JU.AjaxURLStreamHandler,[]);this.protocol=a},"~S");c(b,"openConnection",function(a){return new JU.AjaxURLConnection(a)},"java.net.URL");e(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")});r("JU");v(["java.net.URLStreamHandlerFactory","java.util.Hashtable"],"JU.AjaxURLStreamHandlerFactory",["JU.AjaxURLStreamHandler"],function(){var b=p(function(){this.htFactories=null;q(this,arguments)},
JU,"AjaxURLStreamHandlerFactory",null,java.net.URLStreamHandlerFactory);K(b,function(){this.htFactories=new java.util.Hashtable});e(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")});r("JU");v(null,"JU.AU",["java.lang.reflect.Array","java.util.Arrays","JU.Lst"],function(){var b=s(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,b){if(0==b||null==a)return a;var c=JU.AU.getLength(a);if(d>=c)return a;c-=d+b;
0>c&&(c=0);var f=JU.AU.newInstanceO(a,d+c);0<d&&System.arraycopy(a,0,f,0,d);0<c&&System.arraycopy(a,d+b,f,d,c);return f},"~O,~N,~N");b.arrayCopyObject=c(b,"arrayCopyObject",function(a,d){var b=null==a?-1:JU.AU.getLength(a);0>d&&(d=b);if(d==b)return a;if(d<b)return B(-1,a,0,d);var c=JU.AU.newInstanceO(a,d);0<b&&System.arraycopy(a,0,c,0,b<d?b:d);return c},"~O,~N");b.newInstanceO=c(b,"newInstanceO",function(a,d){return JU.AU.isAI(a)?F(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 b=null==a?-1:a.length;0>d&&(d=b);if(d<b)return B(-1,a,0,d);var c=Array(d);null!=a&&System.arraycopy(a,0,c,0,b<d?b:d);return c},"~A,~N");b.arrayCopyII=c(b,"arrayCopyII",function(a,d){var b=JU.AU.newInt2(d);if(null!=a){var c=a.length;System.arraycopy(a,0,b,0,c<d?c:d)}return b},"~A,~N");b.arrayCopyPt=c(b,"arrayCopyPt",function(a,d){0>d&&(d=a.length);var b=Array(d);if(null!=a){var c=
a.length;System.arraycopy(a,0,b,0,c<d?c:d)}return b},"~A,~N");b.arrayCopyF=c(b,"arrayCopyF",function(a,d){var b=null==a?-1:a.length;0>d&&(d=b);if(d<b)return B(-1,a,0,d);var c=V(d,0);null!=a&&System.arraycopy(a,0,c,0,b<d?b:d);return c},"~A,~N");b.arrayCopyI=c(b,"arrayCopyI",function(a,d){var b=null==a?-1:a.length;0>d&&(d=b);if(d<b)return B(-1,a,0,d);var c=F(d,0);null!=a&&System.arraycopy(a,0,c,0,b<d?b:d);return c},"~A,~N");b.arrayCopyRangeI=c(b,"arrayCopyRangeI",function(a,d,b){if(null==a)return null;
var c=a.length;-1==b&&(b=c);-2==b&&(b=w(c/2));return B(-1,a,d,b)},"~A,~N,~N");b.arrayCopyRangeRevI=c(b,"arrayCopyRangeRevI",function(a,d,b){return null==a?null:B(-1,a,d,b).reverse()},"~A,~N,~N");b.arrayCopyShort=c(b,"arrayCopyShort",function(a,d){var b=null==a?-1:a.length;0>d&&(d=b);if(d<b)return B(-1,a,0,d);var c=pa(d,0);null!=a&&System.arraycopy(a,0,c,0,b<d?b:d);return c},"~A,~N");b.arrayCopyByte=c(b,"arrayCopyByte",function(a,d){var b=null==a?-1:a.length;0>d&&(d=b);if(d<b)return B(-1,a,0,d);var c=
N(d,0);null!=a&&System.arraycopy(a,0,c,0,b<d?b:d);return c},"~A,~N");b.arrayCopyBool=c(b,"arrayCopyBool",function(a,d){var b=null==a?-1:a.length;0>d&&(d=b);if(d<b)return B(-1,a,0,d);var c=qa(d,!1);null!=a&&System.arraycopy(a,0,c,0,b<d?b:d);return c},"~A,~N");b.swapInt=c(b,"swapInt",function(a,d,b){var c=a[d];a[d]=a[b];a[b]=c},"~A,~N,~N");b.dumpArray=c(b,"dumpArray",function(a,d,b,c,f,g){a="dumpArray: "+a+"\n";for(var e=b;e<=c;e++)a+="\t*"+e+"*";for(;g>=f;g--){a+="\n*"+g+"*";for(e=b;e<=c;e++)a+="\t"+
(e<d.length&&g<d[e].length?d[e][g]:NaN)}return a},"~S,~A,~N,~N,~N,~N");b.dumpIntArray=c(b,"dumpIntArray",function(a,d){for(var b="",c=0;c<d;c++)b+=" "+a[c];return b},"~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 b=a.toArray(Array(a.size()));java.util.Arrays.sort(b);return b[d%b.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,b){var c=a[d];a[d]=a[b];a[b]=c},"~A,~N,~N");b.newFloat2=c(b,"newFloat2",function(a){return B(a,null)},"~N");b.newInt2=c(b,"newInt2",function(a){return B(a,null)},"~N");b.newInt3=c(b,"newInt3",function(a){return B(a,null)},"~N,~N");b.newFloat3=c(b,"newFloat3",function(a){return B(a,null)},"~N,~N");b.newInt4=c(b,"newInt4",function(a){return B(a,null)},"~N");b.newShort2=c(b,"newShort2",function(a){return B(a,null)},"~N");b.newByte2=c(b,
"newByte2",function(a){return B(a,null)},"~N");b.newDouble2=c(b,"newDouble2",function(a){return B(a,null)},"~N");b.newDouble3n=c(b,"newDouble3n",function(a){return O(a,0)},"~N");b.removeMapKeys=c(b,"removeMapKeys",function(a,d){for(var b=new JU.Lst,c,f=a.keySet().iterator();f.hasNext()&&((c=f.next())||1);)c.startsWith(d)&&b.addLast(c);for(c=b.size();0<=--c;)a.remove(b.get(c));return b.size()},"java.util.Map,~S");b.isAS=c(b,"isAS",function(a){return va(a)},"~O");b.isASS=c(b,"isASS",function(a){return wa(a)},
"~O");b.isAP=c(b,"isAP",function(a){return xa(a)},"~O");b.isAF=c(b,"isAF",function(a){return fa(a)},"~O");b.isAFloat=c(b,"isAFloat",function(a){return ya(a)},"~O");b.isAD=c(b,"isAD",function(a){return fa(a)},"~O");b.isADD=c(b,"isADD",function(a){return ga(a)},"~O");b.isADDD=c(b,"isADDD",function(a){return ha(a)},"~O");b.isAB=c(b,"isAB",function(a){return ta(a)},"~O");b.isAI=c(b,"isAI",function(a){return ua(a)},"~O");b.isAII=c(b,"isAII",function(a){return za(a)},"~O");b.isAFF=c(b,"isAFF",function(a){return ga(a)},
"~O");b.isAFFF=c(b,"isAFFF",function(a){return ha(a)},"~O");b.ensureSignedBytes=c(b,"ensureSignedBytes",function(a){if(null!=a)for(var d=a.length;0<=--d;){var b=a[d]&255;128<=b&&(b-=256);a[d]=b}return a},"~A")});r("JU");v(null,"JU.Base64",["JU.SB"],function(){var b=s(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,b=new JU.SB;if(0==d)return b;for(var c=0,f=0;c<d&&0==f;){0==c%75&&0!=
c&&b.append("\r\n");var f=c+2==d?1:c+1==d?2:0,g=a[c++]<<16&16711680|(2==f?0:a[c++]<<8)&65280|(1<=f?0:a[c++])&255;b.appendC(JU.Base64.base64.charAt(g>>18&63));b.appendC(JU.Base64.base64.charAt(g>>12&63));b.appendC(2==f?"=":JU.Base64.base64.charAt(g>>6&63));b.appendC(1<=f?"=":JU.Base64.base64.charAt(g&63))}return b},"~A");b.decodeBase64=c(b,"decodeBase64",function(a){var d=0,b,c=a.indexOf(";base64,")+1;0<c&&(c+=7);a=a.toCharArray();var f=a.length;if(0==f)return N(0,0);for(var g=f;--g>=c;)d+=65==(b=
a[g].charCodeAt(0)&127)||0<JU.Base64.decode64[b]?3:0;for(var d=d>>2,e=N(d,0),l=18,g=c,m=c=0;g<f;g++)if(0<JU.Base64.decode64[b=a[g].charCodeAt(0)&127]||65==b||61==b)m|=JU.Base64.decode64[b]<<l,l-=6,0>l&&(e[c++]=(m&16711680)>>16,c<d&&(e[c++]=(m&65280)>>8),c<d&&(e[c++]=m&255),l=18,m=0);return e},"~S");b.base64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";b.decode64=F(-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])});r("JU");v(["javajs.api.JSONEncodable"],"JU.BS",["JU.PT","$.SB"],function(){var b=p(function(){this.words=null;this.wordsInUse=0;this.sizeIsSticky=!1;q(this,arguments)},JU,"BS",null,[Cloneable,javajs.api.JSONEncodable]);n(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=F(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 b=JU.BS.wordIndex(a),c=JU.BS.wordIndex(d-1);this.expandTo(c);var f=-1<<a,g=-1>>>-d;if(b==
c)this.words[b]|=f&g;else{this.words[b]|=f;for(b+=1;b<c;b++)this.words[b]=-1;this.words[c]|=g}}},"~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 b=JU.BS.wordIndex(a);if(!(b>=this.wordsInUse)){var c=JU.BS.wordIndex(d-1);c>=this.wordsInUse&&(d=this.length(),c=this.wordsInUse-1);var f=-1<<a,g=-1>>>-d;if(b==
c)this.words[b]&=~(f&g);else{this.words[b]&=~f;for(b+=1;b<c;b++)this.words[b]=0;this.words[c]&=~g}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 b=0;b<d;b++)this.words[b]|=a.words[b];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 b=0;b<d;b++)this.words[b]^=a.words[b];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");e(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});e(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");e(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=B(-1,this.words,0,a):(a=F(a,0),System.arraycopy(this.words,0,
a,0,this.wordsInUse),this.words=a))},"~N");e(b,"toString",function(){return JU.BS.escape(this,"(",")")});b.copy=c(b,"copy",function(a){var d;d=ea(a);var b=a.wordsInUse;d.words=0==b?JU.BS.emptyBitmap:B(-1,a.words,0,d.wordsInUse=b);return d},"JU.BS");c(b,"cardinalityN",function(a){for(var d=this.cardinality(),b=this.length();--b>=a;)this.get(b)&&d--;return d},"~N");e(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 b=this.nextClearBit(d);do a.append(", ").appendI(d);while(++d<b)}}a.appendC("]");return a.toString()});b.escape=c(b,"escape",function(a,d,b){if(null==a)return d+"{}"+b;var c=new JU.SB;c.append(d+"{");d=a.length();for(var f=-1,g=-2,e=-1;++e<=d;){var l=a.get(e);if(e==d||0<=f&&!l){0<=f&&g!=f&&c.append((g==f-1?" ":":")+f);if(e==d)break;f=-1}a.get(e)&&(0>f&&(c.append((-2==g?"":" ")+e),g=e),f=e)}c.append("}").appendC(b);
return c.toString()},"JU.BS,~S,~S");b.unescape=c(b,"unescape",function(a){var d,b;if(null==a||4>(b=(a=a.trim()).length)||a.equalsIgnoreCase("({null})")||"("!=(d=a.charAt(0))&&"["!=d||a.charAt(b-1)!=("("==d?")":"]")||"{"!=a.charAt(1)||a.indexOf("}")!=b-2)return null;for(var c=b-=2;2<=--c;)if(!JU.PT.isDigit(d=a.charAt(c))&&" "!=d&&"\t"!=d&&":"!=d)return null;for(var f=b;JU.PT.isDigit(a.charAt(--f)););if(++f==b)f=0;else try{f=Integer.parseInt(a.substring(f,b))}catch(g){if(y(g,"NumberFormatException"))return null;
throw g;}for(var e=JU.BS.newN(f),l=f=-1,m=-2,c=2;c<=b;c++)switch((d=a.charAt(c)).charCodeAt(0)){case 9:case 32:case 125:if(0>m)break;if(m<f)return null;f=m;0>l&&(l=m);e.setBits(l,m+1);l=-1;m=-2;break;case 58:l=f=m;m=-2;break;default:JU.PT.isDigit(d)&&(0>m&&(m=0),m=10*m+(d.charCodeAt(0)-48))}return 0<=l?null:e},"~S");b.emptyBitmap=F(0,0)});r("JU");v(["java.util.Hashtable"],"JU.CU",["JU.P3","$.PT"],function(){var b=s(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 b="00"+Integer.toHexString(d>>8&255),b=b.substring(b.length-2),d="00"+Integer.toHexString(d&255),d=d.substring(d.length-2);return a+b+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 b;if(0<=a.indexOf(",")){b=JU.PT.split(a.substring(1,a.length-1),",");if(3!=b.length)return 0;a=JU.PT.parseFloat(b[0]);d=JU.PT.parseFloat(b[1]);b=JU.PT.parseFloat(b[2]);return JU.CU.colorTriadToFFRGB(a,d,b)}switch(d){case 9:b="x";break;case 10:b="0x";break;default:return 0}if(1!=a.indexOf(b))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(c){if(y(c,Exception))return 0;throw c;}a=JU.CU.mapJavaScriptColors.get(a);return null==a?0:a.intValue()},"~S");b.colorTriadToFFRGB=c(b,"colorTriadToFFRGB",function(a,d,b){1>=a&&(1>=d&&1>=b)&&(0<a&&(a=256*a-1),0<d&&(d=256*d-1),0<b&&(b=256*b-1));return JU.CU.rgb(I(a),I(d),I(b))},"~N,~N,~N");b.rgb=c(b,"rgb",function(a,d,b){return 4278190080|a<<16|d<<8|b},"~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=w((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 b=a.x/255,c=a.y/255,f=a.z/255,g=Math.min(b,Math.min(c,f)),e=Math.max(b,Math.max(c,f)),l=e+g,g=e-g,b=60*(0==g?0:e==b?(c-f)/g+6:e==c?(f-b)/g+2:(b-c)/g+4)%360,c=g/(0==g?1:1>=l?l:2-l);return d?JU.P3.new3(Math.round(10*b)/10,Math.round(1E3*c)/10,Math.round(500*l)/10):JU.P3.new3(b,100*c,50*l)},"JU.P3,~B");b.hslToRGB=c(b,"hslToRGB",function(a){var d=Math.max(0,Math.min(360,a.x))/60,b=Math.max(0,Math.min(100,a.y))/100;a=Math.max(0,Math.min(100,a.z))/100;var b=a-
(0.5>a?a:1-a)*b,c=2*(a-b);a=JU.CU.toRGB(b,c,d+2);var f=JU.CU.toRGB(b,c,d),d=JU.CU.toRGB(b,c,d-2);return JU.P3.new3(Math.round(255*a),Math.round(255*f),Math.round(255*d))},"JU.P3");b.toRGB=c(b,"toRGB",function(a,d,b){return 1>(b+=0>b?6:6<b?-6:0)?a+d*b:3>b?a+d:4>b?a+d*(4-b):a},"~N,~N,~N");b.colorNames=B(-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=F(-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]))});r("JU");v(null,"JU.DF",
["JU.PT","$.SB"],function(){var b=s(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 b=0>a;b&&(a=-a);var c;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 f;1>Math.abs(a)?(c=100,f=1E-100*a):(c=-100,f=1E100*a);f=(""+f).toUpperCase();var g=f.indexOf("E");0>g?f=""+a:(c=JU.PT.parseInt(f.substring(g+(f.indexOf("E+")==g?2:1)))+c,f=JU.PT.parseFloat(f.substring(0,g)),f=JU.DF.formatDecimal(f,d-1),f.startsWith("10.")&&(f=JU.DF.formatDecimal(1,d-1),c++));return(b?"-":"")+f+"E"+(0<=c?"+":"")+c}d>=JU.DF.formattingStrings.length&&(d=
JU.DF.formattingStrings.length-1);f=(""+a).toUpperCase();c=f.indexOf(".");if(0>c)return(b?"-":"")+f+JU.DF.formattingStrings[d].substring(1);g=f.indexOf("E-");0<g&&(c=JU.PT.parseInt(f.substring(g+1)),f="0."+"0000000000000000000000000000000000000000".substring(0,-c-1)+f.substring(0,1)+f.substring(2,g),c=1);g=f.indexOf("E");0<g&&(c=JU.PT.parseInt(f.substring(g+1)),f=f.substring(0,1)+f.substring(2,g)+"0000000000000000000000000000000000000000",f=f.substring(0,c+1)+"."+f.substring(c+1),c=f.indexOf("."));
var g=f.length,e=d+c+1;if(e<g&&"5"<=f.charAt(e))return JU.DF.formatDecimal((b?-1:1)*(a+JU.DF.formatAdds[d]),d);var l=f.substring(0,0==d?c:++c),e=JU.SB.newS(l);b&&(l.equals("0.")&&d+2<=g&&f.substring(2,2+d).equals("0000000000000000000000000000000000000000".substring(0,d)))&&(b=!1);for(l=0;l<d;l++,c++)c<g?e.appendC(f.charAt(c)):e.appendC("0");f=(b?"-":"")+e;return Boolean.TRUE.equals(JU.DF.useNumberLocalization[0])?f:f.$replace(",",".")},"~N,~N");b.formatDecimalTrimmed=c(b,"formatDecimalTrimmed",function(a,
d){for(var b=JU.DF.formatDecimalDbl(a,d),c=b.length-1;0<=c&&"0"==b.charAt(c);)c--;return b.substring(0,c+1)},"~N,~N");b.formatDecimalTrimmed0=c(b,"formatDecimalTrimmed0",function(a,d){for(var b=JU.DF.formatDecimalDbl(a,d),c=b.length-1,f=b.indexOf(".")+1;c>f&&"0"==b.charAt(c);)c--;return b.substring(0,c+1)},"~N,~N");b.formattingStrings=B(-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=O(-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=B(-1,[Boolean.TRUE])});r("JU");v(["java.lang.Enum"],"JU.Encoding",null,function(){var b=s(JU,"Encoding",Enum);j(b,"NONE",0,[]);j(b,"UTF8",1,[]);j(b,"UTF_16BE",2,[]);j(b,"UTF_16LE",3,[]);j(b,"UTF_32BE",4,[]);j(b,"UTF_32LE",5,[])});r("JU");v(["java.util.ArrayList"],"JU.Lst",null,function(){var b=s(JU,"Lst",java.util.ArrayList);c(b,"addLast",function(a){return this.add1(a)},"~O");e(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")});r("JU");u=p(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(u,"setAA33",function(b){var a=b.x,d=b.y,h=b.z;b=b.angle;var c=Math.sqrt(a*a+d*d+h*h),c=1/c,a=a*c,d=d*c,h=h*c,f=Math.cos(b);b=Math.sin(b);c=1-f;this.m00=f+a*a*c;this.m11=f+d*d*c;this.m22=f+h*h*c;var f=a*d*c,g=h*b;this.m01=
f-g;this.m10=f+g;f=a*h*c;g=d*b;this.m02=f+g;this.m20=f-g;f=d*h*c;g=a*b;this.m12=f-g;this.m21=f+g},"JU.A4");c(u,"rotate",function(b){this.rotate2(b,b)},"JU.T3");c(u,"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(u,"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(u,
"clear33",function(){this.m00=this.m01=this.m02=this.m10=this.m11=this.m12=this.m20=this.m21=this.m22=0});c(u,"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(u,"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(u,"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(u,"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(u,"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(u,"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(u,"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(u,"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(u,"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(u,"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(u,"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(u,"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(u,"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(u,"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(u,"err",
function(){throw new ArrayIndexOutOfBoundsException("matrix column/row out of bounds");});r("JU");v(["JU.M34"],"JU.M3",["JU.T3"],function(){var b=s(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,b){this.set33(a,d,b)},"~N,~N,~N");c(b,"getElement",function(a,d){return this.get33(a,d)},"~N,~N");c(b,"setRow",function(a,d,b,c){switch(a){case 0:this.m00=d;this.m01=b;this.m02=c;break;case 1:this.m10=d;this.m11=b;this.m12=c;break;
case 2:this.m20=d;this.m21=b;this.m22=c;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");e(b,"getRow",function(a,d){this.getRow33(a,d)},"~N,~A");c(b,"setColumn3",function(a,d,b,c){switch(a){case 0:this.m00=d;this.m10=b;this.m20=
c;break;case 1:this.m01=d;this.m11=b;this.m21=c;break;case 2:this.m02=d;this.m12=b;this.m22=c;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");e(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");e(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,b,c,f,g,e,l,m){this.m00=a;this.m01=d;this.m02=b;this.m10=c;this.m11=f;this.m12=g;this.m20=e;this.m21=l;this.m22=m},"~N,~N,~N,~N,~N,~N,~N,~N,~N");e(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,b){var c=Math.sqrt(d*d+b*b),f=c*a;if(0==f)return this.setScale(1),!1;a=Math.cos(f);f=Math.sin(f);b=-b/c;d/=c;c=a-1;this.m00=1+c*b*b;this.m01=this.m10=c*b*d;this.m20=-(this.m02=f*b);this.m11=1+c*d*d;this.m21=-(this.m12=f*d);this.m22=a;return!0},"~N,~N,~N");c(b,"isRotation",function(){return 0.001>Math.abs(this.determinant3()-1)})});r("JU");v(["JU.M34"],"JU.M4",["JU.T3"],function(){var b=p(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 b=new JU.M4;b.setMV(a,d);return b},"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,b){if(3>a&&3>d)this.set33(a,d,b);else{(3<a||3<d)&&this.err();switch(a){case 0:this.m03=b;return;case 1:this.m13=b;return;case 2:this.m23=b;return}switch(d){case 0:this.m30=b;break;case 1:this.m31=b;break;case 2:this.m32=b;break;case 3:this.m33=b}}},"~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");e(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,b,c,f){0==a?(this.m00=d,this.m10=b,this.m20=c,this.m30=f):1==a?(this.m01=d,this.m11=b,this.m21=c,this.m31=f):2==a?(this.m02=d,this.m12=b,this.m22=c,this.m32=f):3==a?(this.m03=d,this.m13=b,this.m23=c,this.m33=f):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,b,c,f,g,e,l,m,x,n,p,q,j,r,s){this.m00=a;this.m01=d;this.m02=b;this.m03=c;this.m10=f;this.m11=g;this.m12=e;this.m13=l;this.m20=m;this.m21=x;this.m22=n;this.m23=p;this.m30=q;this.m31=j;this.m32=r;this.m33=s},"~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");e(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");e(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)});e(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")});r("JU");v(["java.io.OutputStream",
"javajs.api.GenericOutputChannel"],"JU.OC",["java.io.BufferedWriter","$.ByteArrayOutputStream","$.OutputStreamWriter","JU.Base64","$.SB"],function(){var b=p(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);n(b,function(){A(this,JU.OC,[])});n(b,function(a){A(this,
JU.OC,[]);this.setParams(null,a,!1,null)},"~S");c(b,"setParams",function(a,d,b,c){this.bytePoster=a;if(this.$isBase64=";base64,".equals(d))d=null,this.os0=c,c=null;this.fileName=d;this.os=c;this.isLocalFile=null!=d&&!JU.OC.isRemote(d);b&&(!this.$isBase64&&null!=c)&&(this.bw=new java.io.BufferedWriter(new java.io.OutputStreamWriter(c)));return this},"javajs.api.BytePoster,~S,~B,java.io.OutputStream");e(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(b){if(!y(b,"java.io.IOException"))throw b;}this.byteCount+=a.length;return this},"~S");e(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(y(d,
Exception))System.out.println(d.toString());else throw d;}this.byteCount=0}});e(b,"writeByteAsInt",function(a){null==this.os&&this.initOS();this.os.writeByteAsInt(a);this.byteCount++},"~N");e(b,"write",function(a,d,b){null==this.os&&this.initOS();0>b&&(b=a.length-d);try{this.os.write(a,d,b)}catch(c){if(!y(c,"java.io.IOException"))throw c;}this.byteCount+=b},"~A,~N,~N");e(b,"writeShort",function(a){this.isBigEndian()?(this.writeByteAsInt(a>>8),this.writeByteAsInt(a)):(this.writeByteAsInt(a),this.writeByteAsInt(a>>
8))},"~N");e(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,"write",function(a){this.write(a,0,a.length)},"~A");c(b,"cancel",function(){this.isCanceled=!0;this.closeChannel()});e(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(!y(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 b=d=null,d=self.J2S||Jmol,b="function"==typeof this.fileName?this.fileName:null;if(null!=d){var c=null==this.sb?this.toByteArray():this.sb.toString();null==b?d.doAjax(this.fileName,null,c,null==this.sb):d.applyFunc(this.fileName,c)}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()});e(b,"toString",function(){if(null!=this.bw)try{this.bw.flush()}catch(a){if(!y(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");e(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=B(-1,"http: https: sftp: ftp: file: cache:".split(" "))});r("JU");v(["JU.T3"],"JU.P3",null,function(){var b=s(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,b){var c=new JU.P3;c.x=a;c.y=d;c.z=b;return c},"~N,~N,~N");b.newA=c(b,"newA",function(a){return JU.P3.new3(a[0],a[1],a[2])},"~A");b.unlikely=null});r("JU");v(["JU.T3i"],"JU.P3i",null,function(){var b=s(JU,"P3i",JU.T3i);b.new3=c(b,"new3",function(a,d,b){var c=new JU.P3i;c.x=a;c.y=d;c.z=b;return c},"~N,~N,~N")});r("JU");v(["JU.T4"],"JU.P4",null,function(){var b=s(JU,"P4",JU.T4);b.new4=c(b,
"new4",function(a,d,b,c){var f=new JU.P4;f.set4(a,d,b,c);return f},"~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,b=this.y-a.y,c=this.z-a.z;a=this.w-a.w;return Math.sqrt(d*d+b*b+c*c+a*a)},"JU.P4")});r("JU");v(null,"JU.PT",["java.util.Arrays","JU.AU","$.DF","$.SB"],function(){var b=s(JU,"PT",null);b.parseInt=c(b,"parseInt",function(a){return JU.PT.parseIntNext(a,F(-1,[0]))},"~S");b.parseIntNext=
c(b,"parseIntNext",function(a,d){var b=a.length;return 0>d[0]||d[0]>=b?-2147483648:JU.PT.parseIntChecked(a,b,d)},"~S,~A");b.parseIntChecked=c(b,"parseIntChecked",function(a,d,b){var c=!1,f=0,g=b[0];if(0>g)return-2147483648;for(var e;g<d&&JU.PT.isWhiteSpace(a,g);)++g;var l=!1;g<d&&45==a.charAt(g).charCodeAt(0)&&(l=!0,++g);for(;g<d&&48<=(e=a.charAt(g).charCodeAt(0))&&57>=e;)f=10*f+(e-48),c=!0,++g;c?l&&(f=-f):f=-2147483648;b[0]=g;return f},"~S,~N,~A");b.isWhiteSpace=c(b,"isWhiteSpace",function(a,d){var b;
return 0<=d&&(" "==(b=a.charAt(d))||"\t"==b||"\n"==b)},"~S,~N");b.parseFloatChecked=c(b,"parseFloatChecked",function(a,d,b,c){var f=!1,g=b[0];if(c&&a.indexOf("\n")!=a.lastIndexOf("\n"))return NaN;for(;g<d&&JU.PT.isWhiteSpace(a,g);)++g;var e=!1;g<d&&"-"==a.charAt(g)&&(++g,e=!0);for(var l=0,m=0,x=0;g<d&&48<=(l=a.charAt(g).charCodeAt(0))&&57>=l;)m=10*m+1*(l-48),++g,f=!0;var n=!1,p=0,q=0==m?-1:0;if(46==l)for(n=!0;++g<d&&48<=(l=a.charAt(g).charCodeAt(0))&&57>=l;){f=!0;if(0>q){if(48==l){q--;continue}q=
-q}p<JU.PT.decimalScale.length&&(x=10*x+1*(l-48),p++)}f?0<x?(f=x*JU.PT.decimalScale[p-1],f=1<q?q-2<JU.PT.decimalScale.length?f*JU.PT.decimalScale[q-2]:f*Math.pow(10,1-q):f+m):f=m:f=NaN;m=!1;if(g<d&&(69==l||101==l||68==l)){m=!0;if(++g>=d)return NaN;l=a.charAt(g).charCodeAt(0);if(43==l&&++g>=d)return NaN;b[0]=g;g=JU.PT.parseIntChecked(a,d,b);if(-2147483648==g)return NaN;0<g&&g<=JU.PT.tensScale.length?f*=JU.PT.tensScale[g-1]:0>g&&-g<=JU.PT.decimalScale.length?f*=JU.PT.decimalScale[-g-1]:0!=g&&(f*=Math.pow(10,
g))}else b[0]=g;e&&(f=-f);Infinity==f&&(f=3.4028235E38);return!c||(!m||n)&&JU.PT.checkTrailingText(a,b[0],d)?f:NaN},"~S,~N,~A,~B");b.checkTrailingText=c(b,"checkTrailingText",function(a,d,b){for(var c;d<b&&(JU.PT.isWhitespace(c=a.charAt(d))||";"==c);)++d;return d==b},"~S,~N,~N");b.parseFloatArray=c(b,"parseFloatArray",function(a){return JU.PT.parseFloatArrayNext(a,F(1,0),null,null,null)},"~S");b.parseFloatArrayInfested=c(b,"parseFloatArrayInfested",function(a,d){for(var b=d.length,c=a.length,f=0,
g=0,e=0;0<=e&&e<b&&f<c;e++){for(var l;Float.isNaN(l=JU.PT.parseFloat(a[f++]))&&f<c;);Float.isNaN(l)||(d[g=e]=l);if(f==c)break}return g+1},"~A,~A");b.parseFloatArrayNext=c(b,"parseFloatArrayNext",function(a,d,b,c,f){var g=0,e=d[0];0<=e&&(null!=c&&(g=a.indexOf(c,e),0<=g&&(d[0]=g+c.length)),a=a.substring(d[0]),e=null==f?-1:a.indexOf(f),0>e?e=a.length:a=a.substring(0,e),d[0]+=e+1,a=JU.PT.getTokens(a),null==b&&(b=V(a.length,0)),g=JU.PT.parseFloatArrayInfested(a,b));if(null==b)return V(0,0);for(a=g;a<b.length;a++)b[a]=
NaN;return b},"~S,~A,~A,~S,~S");b.parseFloatRange=c(b,"parseFloatRange",function(a,d,b){var c=a.length;d>c&&(d=c);return 0>b[0]||b[0]>=d?NaN:JU.PT.parseFloatChecked(a,d,b,!1)},"~S,~N,~A");b.parseFloatNext=c(b,"parseFloatNext",function(a,d){var b=null==a?-1:a.length;return 0>d[0]||d[0]>=b?NaN:JU.PT.parseFloatChecked(a,b,d,!1)},"~S,~A");b.parseFloatStrict=c(b,"parseFloatStrict",function(a){var d=a.length;return 0==d?NaN:JU.PT.parseFloatChecked(a,d,F(-1,[0]),!0)},"~S");b.parseFloat=c(b,"parseFloat",
function(a){return JU.PT.parseFloatNext(a,F(-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,F(-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,b){var c=a.length;b<c&&(c=b);return c<d?"":JU.PT.parseTrimmedChecked(a,d,c)},"~S,~N,~N");b.getTokensAt=c(b,"getTokensAt",function(a,d){if(null==a)return null;var b=a.length;if(0>d||d>b)return null;var c=JU.PT.countTokens(a,d),f=Array(c),g=F(1,0);g[0]=d;for(var e=0;e<c;++e)f[e]=JU.PT.parseTokenChecked(a,b,g);return f},"~S,~N");b.countChar=c(b,"countChar",function(a,d){for(var b=0,c=a.lastIndexOf(d)+1;0<=--c;)a.charAt(c)==
d&&b++;return b},"~S,~S");b.countTokens=c(b,"countTokens",function(a,d){var b=0;if(null!=a)for(var c=a.length;;){for(;d<c&&JU.PT.isWhiteSpace(a,d);)++d;if(d==c)break;++b;do++d;while(d<c&&!JU.PT.isWhiteSpace(a,d))}return b},"~S,~N");b.parseTokenNext=c(b,"parseTokenNext",function(a,d){var b=a.length;return 0>d[0]||d[0]>=b?null:JU.PT.parseTokenChecked(a,b,d)},"~S,~A");b.parseTokenRange=c(b,"parseTokenRange",function(a,d,b){var c=a.length;d>c&&(d=c);return 0>b[0]||b[0]>=d?null:JU.PT.parseTokenChecked(a,
d,b)},"~S,~N,~A");b.parseTokenChecked=c(b,"parseTokenChecked",function(a,d,b){for(var c=b[0];c<d&&JU.PT.isWhiteSpace(a,c);)++c;for(var f=c;c<d&&!JU.PT.isWhiteSpace(a,c);)++c;b[0]=c;return f==c?null:a.substring(f,c)},"~S,~N,~A");b.parseTrimmedChecked=c(b,"parseTrimmedChecked",function(a,d,b){for(;d<b&&JU.PT.isWhiteSpace(a,d);)++d;for(b-=1;b>=d&&JU.PT.isWhiteSpace(a,b);)--b;return b<d?"":a.substring(d,b+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,b){var c=a.length;d>c&&(d=c);return 0>b[0]||b[0]>=d?-2147483648:JU.PT.parseIntChecked(a,d,b)},"~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,b){for(;0<=--b;)d[b]=
b>=a.length?NaN:JU.PT.parseFloat(a[b])},"~A,~A,~N");b.split=c(b,"split",function(a,d){if(0==a.length)return[];var b=1,c=a.indexOf(d),f,g=d.length;if(0>c||0==g)return f=Array(1),f[0]=a,f;for(var e=a.length-g;0<=c&&c<e;b++)c=a.indexOf(d,c+g);f=Array(b);for(var l=c=0,m=0;0<=(l=a.indexOf(d,c))&&m+1<b;)f[m++]=a.substring(c,l),c=l+g;a.indexOf(d,e)!=e&&(e+=g);f[m]=a.substring(c,e);return f},"~S,~S");b.getQuotedStringAt=c(b,"getQuotedStringAt",function(a,d){var b=F(-1,[d]);return JU.PT.getQuotedStringNext(a,
b)},"~S,~N");b.getQuotedStringNext=c(b,"getQuotedStringNext",function(a,d){var b=d[0];if(0>b||0>(b=a.indexOf('"',b)))return"";for(var c=b+1,f=a.length;++b<f&&'"'!=a.charAt(b);)"\\"==a.charAt(b)&&b++;d[0]=b+1;return a.substring(c,b)},"~S,~A");b.getQuotedOrUnquotedAttribute=c(b,"getQuotedOrUnquotedAttribute",function(a,d){if(null==a||null==d)return null;var b=a.toLowerCase().indexOf(d.toLowerCase()+"=");if(0>b||(b=b+d.length+1)>=a.length)return"";var c=a.charAt(b);switch(c.charCodeAt(0)){case 39:case 34:b++;
break;default:c=" ",a+=" "}c=a.indexOf(c,b);return 0>c?null:a.substring(b,c)},"~S,~S");b.getCSVString=c(b,"getCSVString",function(a,d){var b=d[1];if(0>b||0>(b=a.indexOf('"',b)))return null;for(var c=d[0]=b,f=a.length,g=!1,e=!1;++b<f&&('"'!=a.charAt(b)||(g=b+1<f&&'"'==a.charAt(b+1)));)g&&(g=!1,e=!0,b++);if(b>=f)return d[1]=-1,null;d[1]=b+1;b=a.substring(c+1,b);return e?JU.PT.rep(JU.PT.rep(b,'""',"\x00"),"\x00",'"'):b},"~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 b=a.indexOf(d+"=");return 0>b?null:JU.PT.getQuotedStringAt(a,b)},"~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,b){if(null==a||0==d.length||0>a.indexOf(d))return a;var c=0<=b.indexOf(d);do a=a.$replace(d,b);while(!c&&0<=a.indexOf(d));return a},"~S,~S,~S");b.formatF=c(b,"formatF",function(a,d,b,c,f){return JU.PT.formatS(JU.DF.formatDecimal(a,
b),d,0,c,f)},"~N,~N,~N,~B,~B");b.formatD=c(b,"formatD",function(a,d,b,c,f){return JU.PT.formatS(JU.DF.formatDecimal(a,-1-b),d,0,c,f)},"~N,~N,~N,~B,~B");b.formatS=c(b,"formatS",function(a,d,b,c,f){if(null==a)return"";var g=a.length;2147483647!=b&&0<b&&b<g?a=a.substring(0,b):0>b&&0<=g+b&&(a=a.substring(g+b+1));b=d-a.length;if(0>=b)return a;d=f&&!c&&"-"==a.charAt(0);f=f?"0":" ";var e=d?"-":f,g=new JU.SB;c&&g.append(a);for(g.appendC(e);0<--b;)g.appendC(f);c||g.append(d?f+a.substring(1):a);return g.toString()},
"~S,~N,~N,~B,~B");b.replaceWithCharacter=c(b,"replaceWithCharacter",function(a,d,b){if(null==a)return null;for(var c=d.length;0<=--c;)a=a.$replace(d.charAt(c),b);return a},"~S,~S,~S");b.replaceAllCharacters=c(b,"replaceAllCharacters",function(a,d,b){for(var c=d.length;0<=--c;){var f=d.substring(c,c+1);a=JU.PT.rep(a,f,b)}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 b=a.length,c=0;c<b&&0<=d.indexOf(a.charAt(c));)c++;for(b=
a.length-1;b>c&&0<=d.indexOf(a.charAt(b));)b--;return a.substring(c,b+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 b=null,c=null;;){if("string"==typeof d){b=d;"undefined"==typeof b&&(b="null");0!=b.indexOf('{"')&&(b=JU.PT.esc(b));break}if(C(d,"javajs.api.JSONEncodable")){if(null==(b=d.toJSON()))b="null";break}c=new JU.SB;if(C(d,"java.util.Map")){c.append("{ ");var f="",g=d.keySet(),e=g.toArray(Array(g.size()));java.util.Arrays.sort(e);for(var g=0,l=e.length;g<l;g++){var m=e[g];null==m&&(m="null");c.append(f).append(JU.PT.packageJSON(m,JU.PT.toJSON(null,d.get(m))));f=","}c.append(" }");break}if(C(d,
"JU.Lst")){c.append("[ ");l=d.size();for(g=0;g<l;g++)0<g&&c.appendC(","),c.append(JU.PT.toJSON(null,d.get(g)));c.append(" ]");break}if(C(d,"JU.M34")){f=C(d,"JU.M4")?4:3;l=V(f,0);e=d;c.appendC("[");for(g=0;g<f;g++)0<g&&c.appendC(","),e.getRow(g,l),c.append(JU.PT.toJSON(null,l));c.appendC("]");break}b=JU.PT.nonArrayString(d);if(null==b){c.append("[");l=JU.AU.getLength(d);g=null;g=d[0];"number"!=typeof g&&(g=null);if(null!=g)c.appendO(d);else for(g=0;g<l;g++)0<g&&c.appendC(","),c.append(JU.PT.toJSON(null,
JU.PT.arrayGet(d,g)));c.append("]");break}d=d.toString()}return JU.PT.packageJSON(a,null==b?c.toString():b)},"~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 b=a.length,c=0;c<b;c++)0<c&&d.appendC(","),d.appendI(a[c]&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,b=0;10>b;b+=2)if(0<=a.indexOf('\\\\\tt\rr\nn""'.charAt(b))){d=!0;break}if(d)for(;10>b;){for(var d=-1,c='\\\\\tt\rr\nn""'.charAt(b++),
f='\\\\\tt\rr\nn""'.charAt(b++),g=new JU.SB,e=0;0<=(d=a.indexOf(c,d+1));)g.append(a.substring(e,d)).appendC("\\").appendC(f),e=d+1;g.append(a.substring(e,a.length));a=g.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 b="0000"+Integer.toHexString(a.charAt(d).charCodeAt(0));a=a.substring(0,d)+"\\u"+b.substring(b.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,b){if(a.length<b)return null;var c=new JU.SB;for(c.append(a[b++]);b<a.length;b++)c.appendC(d).append(a[b]);return c.toString()},"~A,~S,~N");b.isLike=c(b,"isLike",function(a,d){var b=a.equals(d);if(b)return!0;var c=d.startsWith("*"),f=d.endsWith("*");return!c&&!f?b:c&&f?1==d.length||a.contains(d.substring(1,d.length-1)):c?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 b=a.get(d);if(null==b)for(var c,f=a.entrySet().iterator();f.hasNext()&&((c=f.next())||1);)if(c.getKey().equalsIgnoreCase(d))return c.getValue();return b},"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,b){for(var c,f=0,g=d;1<=--g;)if(!JU.PT.isDigit(c=a.charAt(g)))switch(c.charCodeAt(0)){case 46:if(0!=
f++)return a;continue;case 45:if(1!=g&&"."!=a.charAt(g-1))return a;continue;default:return a}c=a.substring(0,d+1);f=new JU.SB;for(g=0;g<b;g++)f.append(c);f.append(a.substring(d+1));return f.toString()},"~S,~N,~N");b.formatString=c(b,"formatString",function(a,d,b,c,f,g){if(null==a)return null;if("".equals(a))return"";var e=d.length;if(0>a.indexOf("%")||0==e||0>a.indexOf(d))return a;var l="",m,x,n;for(m=0;0<=(x=a.indexOf("%",m))&&0<=(n=a.indexOf(d,x+1));)if(m!=x&&(l+=a.substring(m,x)),m=x+1,n>x+6)l+=
"%";else try{var p=!1;"-"==a.charAt(m)&&(p=!0,++m);var q=!1;"0"==a.charAt(m)&&(q=!0,++m);for(var j,r=0;"0"<=(j=a.charAt(m))&&"9">=j;)r=10*r+(j.charCodeAt(0)-48),++m;var s=2147483647,u=!1;if("."==a.charAt(m)){++m;if("-"==(j=a.charAt(m)))u=!0,++m;if("0"<=(j=a.charAt(m))&&"9">=j)if(s=j.charCodeAt(0)-48,++m,"0"<=(j=a.charAt(m))&&"9">=j)s=10*s+(j.charCodeAt(0)-48),++m;u&&(s=-s)}if(a.substring(m,m+e).equals(d)){if(m+=e,Float.isNaN(c)?null!=b?l+=JU.PT.formatS(b,r,0>s?s-1:s,p,q):Double.isNaN(f)||(l+=JU.PT.formatD(f,
r,s-1,p,q)):l+=JU.PT.formatF(c,r,s,p,q),g)break}else m=x+1,l+="%"}catch(v){if(y(v,"IndexOutOfBoundsException")){m=x;break}else throw v;}return l+=a.substring(m)},"~S,~S,~S,~N,~N,~B");b.formatStringS=c(b,"formatStringS",function(a,d,b){return JU.PT.formatString(a,d,b,NaN,NaN,!1)},"~S,~S,~S");b.formatStringF=c(b,"formatStringF",function(a,d,b){return JU.PT.formatString(a,d,null,b,NaN,!1)},"~S,~S,~N");b.formatStringI=c(b,"formatStringI",function(a,d,b){return JU.PT.formatString(a,d,""+b,NaN,NaN,!1)},
"~S,~S,~N");b.sprintf=c(b,"sprintf",function(a,d,b){if(null==b)return a;var c=d.length;if(c==b.length)try{for(var f=0;f<c;f++)if(null!=b[f])switch(d.charAt(f).charCodeAt(0)){case 115:a=JU.PT.formatString(a,"s",b[f],NaN,NaN,!0);break;case 102:a=JU.PT.formatString(a,"f",null,b[f].floatValue(),NaN,!0);break;case 105:a=JU.PT.formatString(a,"d",""+b[f],NaN,NaN,!0);a=JU.PT.formatString(a,"i",""+b[f],NaN,NaN,!0);break;case 100:a=JU.PT.formatString(a,"e",null,NaN,b[f].doubleValue(),!0);break;case 112:var g=
b[f];a=JU.PT.formatString(a,"p",null,g.x,NaN,!0);a=JU.PT.formatString(a,"p",null,g.y,NaN,!0);a=JU.PT.formatString(a,"p",null,g.z,NaN,!0);break;case 113:var e=b[f];a=JU.PT.formatString(a,"q",null,e.x,NaN,!0);a=JU.PT.formatString(a,"q",null,e.y,NaN,!0);a=JU.PT.formatString(a,"q",null,e.z,NaN,!0);a=JU.PT.formatString(a,"q",null,e.w,NaN,!0);break;case 83:for(var l=b[f],m=0;m<l.length;m++)a=JU.PT.formatString(a,"s",l[m],NaN,NaN,!0);break;case 70:for(var x=b[f],m=0;m<x.length;m++)a=JU.PT.formatString(a,
"f",null,x[m],NaN,!0);break;case 73:for(var n=b[f],m=0;m<n.length;m++)a=JU.PT.formatString(a,"d",""+n[m],NaN,NaN,!0);for(m=0;m<n.length;m++)a=JU.PT.formatString(a,"i",""+n[m],NaN,NaN,!0);break;case 68:for(var p=b[f],m=0;m<p.length;m++)a=JU.PT.formatString(a,"e",null,NaN,p[m],!0)}return JU.PT.rep(a,"%%","%")}catch(q){if(!y(q,Exception))throw q;}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 b=1;b<a.length;b++){var c="%"+a[b],f;if(3<=c.length){if(0<=(f=c.indexOf("p")))c=JU.PT.fdup(c,f,3);if(0<=(f=c.indexOf("q")))c=JU.PT.fdup(c,f,4)}d.append(c)}return d.toString().$replace("\u0001","%")},"~S");b.leftJustify=c(b,"leftJustify",function(a,d,b){a.append(b);b=d.length-b.length;0<b&&a.append(d.substring(0,b))},
"JU.SB,~S,~S");b.rightJustify=c(b,"rightJustify",function(a,d,b){var c=d.length-b.length;0<c&&a.append(d.substring(0,c));a.append(b)},"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,b,c){if(a.equals(d))return!0;var f=d.length;if(0==f)return!1;var g=b&&c?"*"==d.charAt(0):!1;if(1==f&&
g)return!0;var e=b&&d.endsWith("*");if(!(0<=d.indexOf("?"))){if(g)return e?3>f||0<=a.indexOf(d.substring(1,f-1)):a.endsWith(d.substring(1));if(e)return a.startsWith(d.substring(0,f-1))}for(var l=a.length,m="????",x=4;x<l;)m+=m,x*=2;b&&(g&&(d=m+d.substring(1),f+=x-1),e&&(d=d.substring(0,f-1)+m,f+=x-1));if(f<l)return!1;for(b=0;f>l;){if(c&&"?"==d.charAt(b))++b;else if("?"!=d.charAt(b+f-1))return!1;--f}for(c=l;0<=--c;)if(f=d.charAt(b+c),"?"!=f&&(l=a.charAt(c),f!=l&&("\u0001"!=f||"?"!=l)))return!1;return!0},
"~S,~S,~B,~B");b.replaceQuotedStrings=c(b,"replaceQuotedStrings",function(a,d,b){for(var c=d.size(),f=0;f<c;f++){var g=d.get(f),e=b.get(f);e.equals(g)||(a=JU.PT.rep(a,'"'+g+'"','"'+e+'"'))}return a},"~S,JU.Lst,JU.Lst");b.replaceStrings=c(b,"replaceStrings",function(a,d,b){for(var c=d.size(),f=0;f<c;f++){var g=d.get(f),e=b.get(f);e.equals(g)||(a=JU.PT.rep(a,g,e))}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=V(-1,[10,100,1E3,1E4,1E5,1E6]);b.decimalScale=V(-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])});r("JU");u=p(function(){this.s=this.sb=null;q(this,arguments)},JU,"SB",null);n(u,function(){this.s=""});u.newN=c(u,"newN",function(){return new JU.SB},"~N");u.newS=c(u,"newS",function(b){var a=new JU.SB;a.s=b;return a},"~S");c(u,"append",function(b){this.s+=b;return this},"~S");c(u,"appendC",function(b){this.s+=b;return this},"~S");c(u,"appendI",function(b){this.s+=b;return this},"~N");c(u,"appendB",function(b){this.s+=
b;return this},"~B");c(u,"appendF",function(b){b=""+b;0>b.indexOf(".")&&0>b.indexOf("e")&&(b+=".0");this.s+=b;return this},"~N");c(u,"appendD",function(b){b=""+b;0>b.indexOf(".")&&0>b.indexOf("e")&&(b+=".0");this.s+=b;return this},"~N");c(u,"appendSB",function(b){this.s+=b.s;return this},"JU.SB");c(u,"appendO",function(b){null!=b&&(this.s+=b.toString());return this},"~O");c(u,"appendCB",function(b,a,d){this.s+=b.slice(a,a+d).join("")},"~A,~N,~N");e(u,"toString",function(){return this.s});c(u,"length",
function(){return this.s.length});c(u,"indexOf",function(b){return this.s.indexOf(b)},"~S");c(u,"charAt",function(b){return this.s.charAt(b)},"~N");c(u,"charCodeAt",function(b){return this.s.charCodeAt(b)},"~N");c(u,"setLength",function(b){this.s=this.s.substring(0,b)},"~N");c(u,"lastIndexOf",function(b){return this.s.lastIndexOf(b)},"~S");c(u,"indexOf2",function(b,a){return this.s.indexOf(b,a)},"~S,~N");c(u,"substring",function(b){return this.s.substring(b)},"~N");c(u,"substring2",function(b,a){return this.s.substring(b,
a)},"~N,~N");c(u,"toBytes",function(b,a){return 0==a?N(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(u,"replace",function(b,a,d){this.s=this.s.substring(0,b)+d+this.s.substring(a)},"~N,~N,~S");c(u,"insert",function(b,a){this.replace(b,b,a)},"~N,~S");r("JU");v(["javajs.api.JSONEncodable"],"JU.T3",null,function(){var b=p(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,b){this.x=a;this.y=d;this.z=b},"~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,b=this.y-a.y;a=this.z-a.z;return d*d+b*b+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,b){this.x+=a;this.y+=d;this.z+=b},"~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,b){this.x=a*d.x+b.x;this.y=a*d.y+b.y;this.z=a*d.z+b.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");e(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");e(b,"equals",function(a){return!C(a,"JU.T3")?!1:this.x==a.x&&this.y==a.y&&this.z==a.z},"~O");e(b,"toString",function(){return"{"+this.x+", "+this.y+", "+this.z+"}"});e(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")});r("JU");u=p(function(){this.z=this.y=this.x=0;q(this,arguments)},JU,"T3i",null,java.io.Serializable);c(u,"set",function(b,a,d){this.x=b;this.y=a;this.z=d},"~N,~N,~N");c(u,"setT",function(b){this.x=b.x;this.y=b.y;this.z=b.z},"JU.T3i");c(u,"add",function(b){this.x+=b.x;this.y+=b.y;this.z+=b.z},"JU.T3i");c(u,"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");e(u,"hashCode",function(){return this.x^this.y^this.z});e(u,
"equals",function(b){return!C(b,"JU.T3i")?!1:this.x==b.x&&this.y==b.y&&this.z==b.z},"~O");c(u,"asString",function(){return"("+this.x+", "+this.y+", "+this.z+")"});e(u,"toString",function(){return this.asString()});r("JU");v(["JU.T3"],"JU.T4",null,function(){var b=p(function(){this.w=0;q(this,arguments)},JU,"T4",JU.T3);c(b,"set4",function(a,d,b,c){this.x=a;this.y=d;this.z=b;this.w=c},"~N,~N,~N,~N");c(b,"scale4",function(a){this.scale(a);this.w*=a},"~N");e(b,"hashCode",function(){return JU.T3.floatToIntBits(this.x)^
JU.T3.floatToIntBits(this.y)^JU.T3.floatToIntBits(this.z)^JU.T3.floatToIntBits(this.w)});e(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");e(b,"toString",function(){return"{"+this.x+", "+this.y+", "+this.z+", "+this.w+"}"});e(b,"toJSON",function(){return"["+this.x+", "+this.y+", "+this.z+", "+this.w+"]"})});r("JU");v(["JU.T3"],"JU.V3",null,function(){var b=s(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,b){var c=new JU.V3;c.x=a;c.y=d;c.z=b;return c},"~N,~N,~N");c(b,"angle",function(a){var d=this.y*a.z-this.z*a.y,b=this.z*a.x-this.x*a.z,c=this.x*a.y-this.y*a.x,d=Math.sqrt(d*d+b*b+c*c);return Math.abs(Math.atan2(d,this.dot(a)))},"JU.V3")});v(["java.util.AbstractMap","$.AbstractSet","$.Iterator","$.Map","$.MapEntry"],"java.util.HashMap",["java.util.AbstractCollection","$.Arrays",
"java.util.MapEntry.Type"],function(){var b=p(function(){this.elementCount=0;this.elementData=null;this.modCount=this.threshold=this.loadFactor=0;this.__m=this.$entrySet=null;this.__allowJS=!1;q(this,arguments)},java.util,"HashMap",java.util.AbstractMap,[java.util.Map,Cloneable,java.io.Serializable]);n(b,function(a,b){this.initHM(a||16,b||0.75)});c(b,"newElementArray",function(a){return Array(a)},"~N");c(b,"initHM",function(a,b){var c=null;"object"==typeof a?(c=a,this.__allowJS=c.__allowJS,a=6>c.size()?
11:2*c.size()):this.__allowJS=!0;!a&&(a=0);!b&&(b=0.75);0==a&&(a=16);if(0<=a)this.elementCount=0,this.elementData=this.newElementArray(0==a?1:a),this.loadFactor=b,this.computeMaxSize();else throw new IllegalArgumentException;this.__setJS();null!=c&&this.putAll(c)},"~N,~N");c(b,"putMapEntries",function(a,b){if(0!=a.size()){var c=null,f=null;if(java.util.HashMap.__isSimple(this)&&java.util.HashMap.__isSimple(a)){var g=this,e=java.util.HashMap.__hasKey(g,c);a.__m.forEach(function(a,d){g.putJSVal(0,d,
a,!1,b,e)})}else if(java.util.HashMap.__isSimple(a))g=this,a.__m.forEach(function(a,d){g.putJavaValue(d,a)});else{this.__m=null;for(var l,m=a.entrySet().iterator();m.hasNext()&&((l=m.next())||1);)c=l.getKey(),f=l.getValue(),this.putJavaValue(c,f)}}},"java.util.Map,~B");c(b,"reinitialize",function(){this.$values=this.$keySet=this.$entrySet=this.elementData=null;this.elementCount=this.threshold=this.modCount=0;this.__setJS()});e(b,"clear",function(){this.modCount++;java.util.HashMap.__isSimple(this)&&
this.__m.clear();this.__setJS();0<this.elementCount&&(this.elementCount=0,java.util.Arrays.fill(this.elementData,null),this.modCount++)});c(b,"clone",function(){var a;try{a=Q(this,java.util.HashMap,"clone",[])}catch(b){if(y(b,"CloneNotSupportedException"))return null;throw b;}a.reinitialize();a.putMapEntries(this,!1);return a});c(b,"computeMaxSize",function(){this.threshold=I(this.elementData.length*this.loadFactor)});e(b,"containsKey",function(a){switch(java.util.HashMap.__hasKey(this,a)){case 1:java.util.HashMap.__ensureJavaMap(this);
break;case 2:return!1;case 3:return!0}return null!=this.getJavaEntry(a)},"~O");c(b,"keysEqual",function(a,b){return(null==a?0:a.hashCode())!=b.origKeyHash?!1:null==a&&null==b.key?!0:a.equals(b.key)},"~O,java.util.HashMap.Entry");e(b,"containsValue",function(a){if(java.util.HashMap.__isSimple(this))for(var b=this.__m.values(),c=b.next();!c.done;c=b.next()){if(c.value==a||c.value.equals$O(a))return!0}else if(null!=a)for(b=this.elementData.length;0<=--b;)for(c=this.elementData[b];null!=c;){if(a.equals(c.value))return!0;
c=c.next}else for(b=this.elementData.length;0<=--b;)for(c=this.elementData[b];null!=c;){if(null==c.value)return!0;c=c.next}return!1},"~O");e(b,"entrySet",function(){var a;return null==(a=this.$entrySet)?this.$entrySet=new java.util.HashMap.HashMapEntrySet(this):a});e(b,"get",function(a){switch(java.util.HashMap.__hasKey(this,a)){case 1:java.util.HashMap.__ensureJavaMap(this);break;case 2:return null;case 3:var b=null;return b=this.__m.get(a)}a=this.getJavaEntry(a);return null==a?null:a.value},"~O");
c(b,"getJavaEntry",function(a){var b=this.getModuloHash(a);return this.findJavaEntry(a,b)},"~O");c(b,"getModuloHash",function(a){return null==a?0:(a.hashCode()&2147483647)%this.elementData.length},"~O");c(b,"findJavaEntry",function(a,b){var c;c=this.elementData[b];if(null!=a)for(;null!=c&&!this.keysEqual(a,c);)c=c.next;else for(;null!=c&&null!=c.key;)c=c.next;return c},"~O,~N");e(b,"isEmpty",function(){return 0==this.size()});e(b,"keySet",function(){null==this.$keySet&&(this.$keySet=(H("java.util.HashMap$1")?
0:java.util.HashMap.$HashMap$1$(),G(java.util.HashMap$1,this,null)));return this.$keySet});e(b,"put",function(a,b){var c=java.util.HashMap.__hasKey(this,a);switch(c){case 1:java.util.HashMap.__ensureJavaMap(this);break;case 2:case 3:return this.putJSVal(1,a,b,!1,!0,c)}return this.putJavaValue(a,b)},"~O,~O");c(b,"putJavaValue",function(a,b){var c=this.getModuloHash(a),f=this.findJavaEntry(a,c);if(null==f)return this.modCount++,++this.elementCount>this.threshold&&(this.rehash(),c=null==a?0:(a.hashCode()&
2147483647)%this.elementData.length),this.createEntry(a,c,b),null;c=f.value;f.value=b;return c},"~O,~O");c(b,"createEntry",function(a,b,c){a=new java.util.HashMap.Entry(a,c);a.next=this.elementData[b];return this.elementData[b]=a},"~O,~N,~O");e(b,"putAll",function(a){if(!a.isEmpty()){var b;for(a=a.entrySet().iterator();a.hasNext()&&((b=a.next())||1);)this.put(b.getKey(),b.getValue())}},"java.util.Map");c(b,"putJSVal",function(a,b,c,f,g,e){g=null;switch(e){case 2:this.__m.set(b,c);++this.modCount;
break;case 3:0!=a&&(g=this.__m.get(b)||null),(!f||null==g)&&this.__m.set(b,c)}return g},"~N,~O,~O,~B,~B,~N");c(b,"rehashImpl",function(a){a=0==a?1:a<<1;for(var b=this.newElementArray(a),c=0;c<this.elementData.length;c++)for(var f=this.elementData[c];null!=f;){var g=f.key,g=null==g?0:(g.hashCode()&2147483647)%a,e=f.next;f.next=b[g];b[g]=f;f=e}this.elementData=b;this.computeMaxSize()},"~N");c(b,"rehash",function(){this.rehashImpl(this.elementData.length)});e(b,"remove",function(a){switch(java.util.HashMap.__hasKey(this,
a)){case 1:java.util.HashMap.__ensureJavaMap(this);break;case 2:return null;case 3:return this.removeJSNode(1,a,null,!1,!0)}a=this.removeJavaEntry(a);return null==a?null:a.value},"~O");c(b,"removeJSNode",function(a,b,c,f){var g=null;if(1==a||f)g=this.__m.get(b)||null;if(!f||g===c||null!=c&&c.equals(g))switch(this.__m["delete"](b),++this.modCount,a){case 1:return g;case 3:return"true"}return null},"~N,~O,~O,~B,~B");c(b,"removeJavaEntry",function(a){var b=0,c,f=null;if(null!=a){b=(a.hashCode()&2147483647)%
this.elementData.length;for(c=this.elementData[b];null!=c&&!this.keysEqual(a,c);)f=c,c=c.next}else for(c=this.elementData[0];null!=c&&null!=c.key;)f=c,c=c.next;if(null==c)return null;null==f?this.elementData[b]=c.next:f.next=c.next;this.modCount++;this.elementCount--;return c},"~O");e(b,"size",function(){return this.__m?this.__m.size:this.elementCount});e(b,"values",function(){null==this.$values&&(this.$values=(H("java.util.HashMap$2")?0:java.util.HashMap.$HashMap$2$(),G(java.util.HashMap$2,this,
null)));return this.$values});c(b,"__setJS",function(){if(this.__allowJS&&java.util.HashMap.USE_SIMPLE){var a=null;this.__m=a=new Map}else this.__m=null});b.__get=c(b,"__get",function(a,b){return a.__m.get(null==b?null:b+"")},"~O,~O");b.__set=c(b,"__set",function(a,b,c){a.__m.set(null==b?null:b+"",c)},"java.util.Map,~O,~O");b.__hasKey=c(b,"__hasKey",function(a,b){return!a.__m?0:null!=b&&"string"!=typeof b?1:a.__m.has(b)?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 b=a.__m;a.__m=null;b.forEach(function(b,c){a.put(c,b)});b.clear()}},"java.util.Map");b.$HashMap$1$=function(){var a=M(java.util,"HashMap$1",java.util.AbstractSet);e(a,"contains",function(a){return this.b$["java.util.HashMap"].containsKey(a)},"~O");e(a,"size",function(){return this.b$["java.util.HashMap"].size()});e(a,"clear",function(){this.b$["java.util.HashMap"].clear()});e(a,"remove",function(a){if(!this.b$["java.util.HashMap"].containsKey(a))return!1;
this.b$["java.util.HashMap"].remove(a);return!0},"~O");e(a,"iterator",function(){return new java.util.HashMap.HashMapIterator((H("java.util.HashMap$1$1")?0:java.util.HashMap.$HashMap$1$1$(),G(java.util.HashMap$1$1,this,null)),this.b$["java.util.HashMap"])})};b.$HashMap$1$1$=function(){var a=M(java.util,"HashMap$1$1",null,java.util.MapEntry.Type);e(a,"get",function(a){return java.util.HashMap.__isSimple(this.b$["java.util.HashMap"])?null==a?null:a.value[0]:a.key},"java.util.MapEntry")};b.$HashMap$2$=
function(){var a=M(java.util,"HashMap$2",java.util.AbstractCollection);e(a,"contains",function(a){return this.b$["java.util.HashMap"].containsValue(a)},"~O");e(a,"size",function(){return this.b$["java.util.HashMap"].size()});e(a,"clear",function(){this.b$["java.util.HashMap"].clear()});e(a,"iterator",function(){return new java.util.HashMap.HashMapIterator((H("java.util.HashMap$2$1")?0:java.util.HashMap.$HashMap$2$1$(),G(java.util.HashMap$2$1,this,null)),this.b$["java.util.HashMap"])})};b.$HashMap$2$1$=
function(){var a=M(java.util,"HashMap$2$1",null,java.util.MapEntry.Type);e(a,"get",function(a){return java.util.HashMap.__isSimple(this.b$["java.util.HashMap"])?null==a?null:a.value[1]:a.value},"java.util.MapEntry")};var a=p(function(){this.origKeyHash=0;this.next=null;q(this,arguments)},java.util.HashMap,"Entry",java.util.MapEntry);n(a,function(a,b){A(this,java.util.HashMap.Entry,[a,b]);this.origKeyHash=null==a?0:a.hashCode()},"~O,~O");c(a,"clone",function(){var a=Q(this,java.util.HashMap.Entry,
"clone",[]);null!=this.next&&(a.next=this.next.clone());return a});a=p(function(){this.jsMapIterator=null;this.isSimple=!1;this.expectedModCount=this.index=0;this.type=null;this.canRemove=!1;this.associatedMap=this.lastEntry=this.entry=null;q(this,arguments)},java.util.HashMap,"HashMapIterator",null,java.util.Iterator);n(a,function(a,b){this.associatedMap=b;this.type=a;this.expectedModCount=b.modCount;this.lastEntry=this.entry=null;if(this.isSimple=java.util.HashMap.__isSimple(this.associatedMap))this.jsMapIterator=
this.associatedMap.__m.entries(),this.entry=this.jsMapIterator.next()},"java.util.MapEntry.Type,java.util.HashMap");e(a,"hasNext",function(){if(this.isSimple){if(null==this.entry)return!1;var a=!1,a=this.entry.done;return!a}if(null!=this.entry)return!0;for(;this.index<this.associatedMap.elementData.length;)if(null==this.associatedMap.elementData[this.index])this.index++;else return!0;return!1});c(a,"checkConcurrentMod",function(){if(this.expectedModCount!=this.associatedMap.modCount)throw new java.util.ConcurrentModificationException;
});e(a,"next",function(){this.checkConcurrentMod();if(!this.hasNext())throw new java.util.NoSuchElementException;var a=null;this.isSimple?(a=this.entry,this.entry=this.jsMapIterator.next()||null):null==this.entry?(a=this.lastEntry=this.associatedMap.elementData[this.index++],this.entry=this.lastEntry.next):(this.lastEntry.next!==this.entry&&(this.lastEntry=this.lastEntry.next),a=this.entry,this.entry=this.entry.next);this.canRemove=!0;return this.type.get(a)});e(a,"remove",function(){this.checkConcurrentMod();
if(!this.canRemove)throw new IllegalStateException;this.canRemove=!1;this.associatedMap.modCount++;if(this.lastEntry.next===this.entry){for(;null==this.associatedMap.elementData[--this.index];);this.associatedMap.elementData[this.index]=this.associatedMap.elementData[this.index].next;this.entry=null}else this.lastEntry.next=this.entry;this.associatedMap.elementCount--;this.expectedModCount++});a=p(function(){this.associatedMap=null;q(this,arguments)},java.util.HashMap,"HashMapEntrySet",java.util.AbstractSet);
n(a,function(a){A(this,java.util.HashMap.HashMapEntrySet,[]);this.associatedMap=a},"java.util.HashMap");c(a,"hashMap",function(){return this.associatedMap});e(a,"size",function(){return this.associatedMap.elementCount});e(a,"clear",function(){this.associatedMap.clear()});e(a,"remove",function(a){return this.contains(a)?(this.associatedMap.remove(a.getKey()),!0):!1},"~O");e(a,"contains",function(a){if(!C(a,"java.util.Map.Entry"))return!1;var b=a.getKey();if(!this.associatedMap.containsKey(b))return!1;
if(java.util.HashMap.__isSimple(this.associatedMap))return a=a.getValue(),b=this.associatedMap.get(b),a===b||null!=a&&a.equals(b);b=this.associatedMap.getJavaEntry(a.getKey());return a.equals(b)},"~O");e(a,"iterator",function(){return new java.util.HashMap.HashMapIterator((H("java.util.HashMap$HashMapEntrySet$1")?0:java.util.HashMap.HashMapEntrySet.$HashMap$HashMapEntrySet$1$(),G(java.util.HashMap$HashMapEntrySet$1,this,null)),this.associatedMap)});a.$HashMap$HashMapEntrySet$1$=function(){var a=M(java.util,
"HashMap$HashMapEntrySet$1",null,java.util.MapEntry.Type);e(a,"get",function(a){if(java.util.HashMap.__isSimple(this.b$["java.util.HashMap.HashMapEntrySet"].associatedMap)){var d=null,b=null,d=a.value[0],b=a.value[1];return new java.util.HashMap.Entry(d,b)}return a},"java.util.MapEntry")};b.USE_SIMPLE=!0});v(["java.util.HashMap"],"java.util.LinkedHashMap",["java.util.AbstractCollection","$.AbstractSet","java.util.MapEntry.Type"],function(){var b=p(function(){this.accessOrder=!1;this.tail=this.head=
null;q(this,arguments)},java.util,"LinkedHashMap",java.util.HashMap);n(b,function(){this.construct(16,0.75,!1)});n(b,function(a){this.construct(a,0.75,!1)},"~N");n(b,function(a,d){this.construct(a,d,!1)},"~N,~N");n(b,function(a,d,b){A(this,java.util.LinkedHashMap,[a,d]);this.accessOrder=b;this.tail=this.head=null},"~N,~N,~B");n(b,function(a){A(this,java.util.LinkedHashMap,[]);this.accessOrder=!1;this.tail=this.head=null;this.putAll(a)},"java.util.Map");e(b,"newElementArray",function(a){return Array(a)},
"~N");e(b,"get",function(a){a=this.getJavaEntry(a);if(null==a)return null;if(this.accessOrder&&this.tail!==a){var d=a.chainBackward,b=a.chainForward;b.chainBackward=d;null!=d?d.chainForward=b:this.head=b;a.chainForward=null;a.chainBackward=this.tail;this.tail=this.tail.chainForward=a}return a.value},"~O");e(b,"createEntry",function(a,d,b){a=new java.util.LinkedHashMap.LinkedHashMapEntry(a,b);a.next=this.elementData[d];this.elementData[d]=a;this.linkEntry(a);return a},"~O,~N,~O");e(b,"put",function(a,
d){var b=this.getModuloHash(a),c=this.findJavaEntry(a,b);null==c?(this.modCount++,++this.elementCount>this.threshold&&(this.rehash(),b=null==a?0:(a.hashCode()&2147483647)%this.elementData.length),c=this.createEntry(a,b,null)):this.linkEntry(c);b=c.value;c.value=d;this.removeEldestEntry(this.head)&&this.remove(this.head.key);return b},"~O,~O");c(b,"linkEntry",function(a){if(this.tail!==a)if(null==this.head)this.head=this.tail=a;else{var d=a.chainBackward,b=a.chainForward;null==d?null!=b?this.accessOrder&&
(this.head=b,b.chainBackward=null,a.chainBackward=this.tail,a.chainForward=null,this.tail=this.tail.chainForward=a):(a.chainBackward=this.tail,a.chainForward=null,this.tail=this.tail.chainForward=a):null!=b&&this.accessOrder&&(d.chainForward=b,b.chainBackward=d,a.chainForward=null,a.chainBackward=this.tail,this.tail=this.tail.chainForward=a)}},"java.util.LinkedHashMap.LinkedHashMapEntry");e(b,"entrySet",function(){return new java.util.LinkedHashMap.LinkedHashMapEntrySet(this)});e(b,"keySet",function(){null==
this.$keySet&&(this.$keySet=(H("java.util.LinkedHashMap$1")?0:java.util.LinkedHashMap.$LinkedHashMap$1$(),G(java.util.LinkedHashMap$1,this,null)));return this.$keySet});e(b,"values",function(){null==this.$values&&(this.$values=(H("java.util.LinkedHashMap$2")?0:java.util.LinkedHashMap.$LinkedHashMap$2$(),G(java.util.LinkedHashMap$2,this,null)));return this.$values});e(b,"remove",function(a){a=this.removeJavaEntry(a);if(null==a)return null;var d=a.chainBackward,b=a.chainForward;null!=d?d.chainForward=
b:this.head=b;null!=b?b.chainBackward=d:this.tail=d;return a.value},"~O");c(b,"removeEldestEntry",function(){return!1},"java.util.Map.Entry");c(b,"clear",function(){Q(this,java.util.LinkedHashMap,"clear",[]);this.head=this.tail=null});c(b,"clone",function(){var a=Q(this,java.util.LinkedHashMap,"clone",[]);a.clear();for(var d,b=this.entrySet().iterator();b.hasNext()&&((d=b.next())||1);)a.put(d.getKey(),d.getValue());return a});e(b,"__setJS",function(){this.__m=null});b.$LinkedHashMap$1$=function(){var a=
M(java.util,"LinkedHashMap$1",java.util.AbstractSet);e(a,"contains",function(a){return this.b$["java.util.LinkedHashMap"].containsKey(a)},"~O");e(a,"size",function(){return this.b$["java.util.LinkedHashMap"].size()});e(a,"clear",function(){this.b$["java.util.LinkedHashMap"].clear()});e(a,"remove",function(a){return this.b$["java.util.LinkedHashMap"].containsKey(a)?(this.b$["java.util.LinkedHashMap"].remove(a),!0):!1},"~O");e(a,"iterator",function(){return new java.util.LinkedHashMap.LinkedHashIterator((H("java.util.LinkedHashMap$1$1")?
0:java.util.LinkedHashMap.$LinkedHashMap$1$1$(),G(java.util.LinkedHashMap$1$1,this,null)),this.b$["java.util.LinkedHashMap"])})};b.$LinkedHashMap$1$1$=function(){var a=M(java.util,"LinkedHashMap$1$1",null,java.util.MapEntry.Type);e(a,"get",function(a){return a.key},"java.util.MapEntry")};b.$LinkedHashMap$2$=function(){var a=M(java.util,"LinkedHashMap$2",java.util.AbstractCollection);e(a,"contains",function(a){return this.b$["java.util.LinkedHashMap"].containsValue(a)},"~O");e(a,"size",function(){return this.b$["java.util.LinkedHashMap"].size()});
e(a,"clear",function(){this.b$["java.util.LinkedHashMap"].clear()});e(a,"iterator",function(){return new java.util.LinkedHashMap.LinkedHashIterator((H("java.util.LinkedHashMap$2$1")?0:java.util.LinkedHashMap.$LinkedHashMap$2$1$(),G(java.util.LinkedHashMap$2$1,this,null)),this.b$["java.util.LinkedHashMap"])})};b.$LinkedHashMap$2$1$=function(){var a=M(java.util,"LinkedHashMap$2$1",null,java.util.MapEntry.Type);e(a,"get",function(a){return a.value},"java.util.MapEntry")};b=s(java.util.LinkedHashMap,
"LinkedHashIterator",java.util.HashMap.HashMapIterator);n(b,function(a,d){A(this,java.util.LinkedHashMap.LinkedHashIterator,[a,d]);this.entry=d.head},"java.util.MapEntry.Type,java.util.LinkedHashMap");e(b,"hasNext",function(){return null!=this.entry});e(b,"next",function(){this.checkConcurrentMod();if(!this.hasNext())throw new java.util.NoSuchElementException;var a=this.type.get(this.entry);this.lastEntry=this.entry;this.entry=this.entry.chainForward;this.canRemove=!0;return a});e(b,"remove",function(){this.checkConcurrentMod();
if(!this.canRemove)throw new IllegalStateException;this.canRemove=!1;this.associatedMap.modCount++;var a=this.associatedMap.getModuloHash(this.lastEntry.key),d=this.associatedMap.elementData[a];if(d===this.lastEntry)this.associatedMap.elementData[a]=this.lastEntry.next;else{for(;null!=d.next&&d.next!==this.lastEntry;)d=d.next;d.next=this.lastEntry.next}var d=this.lastEntry,a=d.chainBackward,d=d.chainForward,b=this.associatedMap;null!=a?(a.chainForward=d,null!=d?d.chainBackward=a:b.tail=a):(b.head=
d,null!=d?d.chainBackward=null:b.tail=null);this.associatedMap.elementCount--;this.expectedModCount++});b=s(java.util.LinkedHashMap,"LinkedHashMapEntrySet",java.util.HashMap.HashMapEntrySet);e(b,"iterator",function(){return new java.util.LinkedHashMap.LinkedHashIterator((H("java.util.LinkedHashMap$LinkedHashMapEntrySet$1")?0:java.util.LinkedHashMap.LinkedHashMapEntrySet.$LinkedHashMap$LinkedHashMapEntrySet$1$(),G(java.util.LinkedHashMap$LinkedHashMapEntrySet$1,this,null)),this.hashMap())});b.$LinkedHashMap$LinkedHashMapEntrySet$1$=
function(){var a=M(java.util,"LinkedHashMap$LinkedHashMapEntrySet$1",null,java.util.MapEntry.Type);e(a,"get",function(a){return a},"java.util.MapEntry")};b=p(function(){this.chainBackward=this.chainForward=null;q(this,arguments)},java.util.LinkedHashMap,"LinkedHashMapEntry",java.util.HashMap.Entry);n(b,function(a,d){A(this,java.util.LinkedHashMap.LinkedHashMapEntry,[a,d]);this.chainBackward=this.chainForward=null},"~O,~O");c(b,"clone",function(){var a=Q(this,java.util.LinkedHashMap.LinkedHashMapEntry,
"clone",[]);a.chainBackward=this.chainBackward;a.chainForward=this.chainForward;var d=a.next;null!=d&&(a.next=d.clone());return a})});r("J.api");E(J.api,"JmolJDXMOLParser");r("J.api");E(J.api,"JmolJDXMOLReader");r("J.api");E(J.api,"GenericGraphics");r("J.jsv");v(["J.api.JmolJDXMOLParser","java.util.Hashtable"],"J.jsv.JDXMOLParser",["JU.BS","$.Lst","$.PT","$.SB","JU.Logger"],function(){var b=p(function(){this.line=null;this.lastModel="";this.baseModel=this.thisModelID=null;this.vibScale=0;this.mapDup=
this.firstModelWithPeaks=this.peakFilePath=this.peakIndex=this.loader=this.peakYLabel=this.peakXLabel=null;q(this,arguments)},J.jsv,"JDXMOLParser",null,J.api.JmolJDXMOLParser);K(b,function(){this.mapDup=new java.util.Hashtable});n(b,function(){});e(b,"set",function(a,d,b){this.loader=a;this.peakFilePath=d;this.peakIndex=F(1,0);null!=b&&(b.remove("modelNumber"),b.containsKey("zipSet")&&(this.peakIndex=b.get("peakIndex"),null==this.peakIndex&&(this.peakIndex=F(1,0),b.put("peakIndex",this.peakIndex)),
b.containsKey("subFileName")||(this.peakFilePath=JU.PT.split(d,"|")[0])));return this},"J.api.JmolJDXMOLReader,~S,java.util.Map");e(b,"getAttribute",function(a,d){var b=JU.PT.getQuotedAttribute(a,d);return null==b?"":b},"~S,~S");e(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");e(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});e(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","")});e(b,"readACDAssignments",function(a,d,b){var c=!1;try{(null==this.line||0<=this.line.indexOf("#"))&&
this.readLine();0>a&&(a=2147483647);for(var f=0;f<a;f++){var g=this.readLine();if(null==g||0==g.indexOf("#")){c=!0;break}if(d){for(;0>g.indexOf(">");)g+=" "+this.readLine();g=g.trim()}g=JU.PT.replaceAllCharacters(g,"()<>"," ").trim();if(0==g.length)break;var e=g.indexOf("'");if(0<=e)var l=g.indexOf("'",e+1),g=g.substring(0,e)+JU.PT.rep(g.substring(e+1,l),",",";")+g.substring(l+1);JU.Logger.info("Peak Assignment: "+g);var m=JU.PT.split(g,",");b.addLast(m)}}catch(x){if(y(x,Exception))JU.Logger.error("Error reading peak assignments at "+
this.line+": "+x);else throw x;}return!c},"~N,~B,JU.Lst");e(b,"setACDAssignments",function(a,d,b,c,f){try{0<=b&&(this.peakIndex=F(-1,[b]));var g=0==d.indexOf("MASS"),e=" file="+JU.PT.esc(this.peakFilePath.$replace("\\","/"));a=" model="+JU.PT.esc(a+" (assigned)");this.peakYLabel=this.peakXLabel="";var l=this.getACDPeakWidth(d)/2,m=new java.util.Hashtable,x=new JU.Lst;b=null;var n,p,q=0;if(g){b=new java.util.Hashtable;for(var j=JU.PT.split(f,"M  ZZC"),r=j.length;1<=--r;){var s=JU.PT.getTokens(j[r]),
q=Math.max(q,JU.PT.parseInt(s[0]));b.put(s[1],s[0])}n=4;p=0}else 0<=d.indexOf("NMR")?(n=0,p=3):(n=0,p=2);for(var u=c.size(),r=0;r<u;r++){var v=c.get(r),w=JU.PT.parseFloat(v[n]),z=v[p],z=g?this.fixACDAtomList(z,b,q):z.$replace(";",",");if(0<=z.indexOf("select")){var A=z.indexOf("select atomno=");if(0>A)continue;z=JU.PT.split(z.substring(A+14)," ")[0]}var B=g?"m/z="+Math.round(w)+": "+v[2]+" ("+v[1]+")":2==p?""+Math.round(10*w)/10:null;this.getStringInfo(e,B,d,a,z,m,""+w,x,' atoms="%ATOMS%" xMin="'+
(w-l)+'" xMax="'+(w+l)+'">')}return this.setPeakData(x,0)}catch(C){if(y(C,Exception))return 0;throw C;}},"~S,~S,~N,JU.Lst,~S");c(b,"fixACDAtomList",function(a,d,b){a=a.trim();a=JU.PT.getTokens(a.$replace(";"," "));for(var c=new JU.BS,f=!1,g=0;g<a.length;g++){var e=a[g];(f=0<=e.indexOf("M"))&&(e="1-"+b);var l=e.indexOf("-");if(0<=l)for(var m=JU.PT.parseInt(e.substring(0,l)),e=JU.PT.parseInt(e.substring(l+1))+1;m<e;m++)c.set(f?m:JU.PT.parseInt(d.get(""+m)));else c.set(JU.PT.parseInt(d.get(e)))}d=c.toJSON();
return d.substring(1,d.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");e(b,"readPeaks",function(a,d){try{0<=d&&(this.peakIndex=F(-1,[d]));var b=a?1:0,c=a?"Signals":"Peaks",f=a?"<Signal":"<PeakData";if(!this.findRecord(c))return 0;var g=" file="+JU.PT.esc(this.peakFilePath.$replace("\\","/")),e=JU.PT.getQuotedAttribute(this.line,"model"),e=this.fixModel(e,!0),e=" model="+JU.PT.esc(null==e?this.thisModelID:
e),l=JU.PT.getQuotedAttribute(this.line,"type");this.peakXLabel=JU.PT.getQuotedAttribute(this.line,"xLabel");this.peakYLabel=JU.PT.getQuotedAttribute(this.line,"yLabel");for(var m=new java.util.Hashtable,x=new JU.Lst;null!=this.readLine()&&!(this.line=this.line.trim()).startsWith("</"+c);)if(this.line.startsWith(f)){this.getRecord(f);JU.Logger.info(this.line);var n=JU.PT.getQuotedAttribute(this.line,"title");null==l&&(l=JU.PT.getQuotedAttribute(this.line,"type"));var p=JU.PT.getQuotedAttribute(this.line,
"atoms"),q=I(100*JU.PT.parseFloat(JU.PT.getQuotedAttribute(this.line,"xMin")))+"_"+I(100*JU.PT.parseFloat(JU.PT.getQuotedAttribute(this.line,"xMax"))),j=JU.PT.getQuotedAttribute(this.line,"model"),r=this.fixModel(j,!0);null==this.firstModelWithPeaks&&(this.firstModelWithPeaks=r);null!=r&&!r.equals(j)&&(this.line=JU.PT.rep(this.line,'model="'+j+'"','model="'+r+'"'),JU.Logger.error("peak model changed from "+j+" for "+this.line));var s=this.line.substring(f.length).trim();this.getStringInfo(g,n,l,null==
j?e:"",p,m,q,x,s)}return this.setPeakData(x,b)}catch(u){if(y(u,Exception))return 0;throw u;}},"~B,~N");c(b,"checkDuplicateModelID",function(){var a=this.mapDup.get(this.thisModelID);if(null==a)this.mapDup.put(this.thisModelID,Integer.$valueOf(1));else{var a=Integer.$valueOf(a.intValue()+1),d=this.thisModelID+a;JU.Logger.error("duplicate model id "+this.thisModelID+" now "+d);this.mapDup.put(this.thisModelID,a);this.thisModelID=d}});c(b,"fixModel",function(a,d){null!=a&&-2147483648!=JU.PT.parseInt(a)&&
(a="_"+a);var b=null==a||!d?null:this.mapDup.get(a);null!=b&&1<b.intValue()&&(a=this.thisModelID);return a},"~S,~B");c(b,"setPeakData",function(a,d){for(var b=0,c=a.size(),f=0;f<c;f++){var g=a.get(f),e=JU.PT.rep(g[0],"%INDEX%",""+ ++this.peakIndex[0]),l=g[1];if(null!=l){for(var g="",m=l.nextSetBit(0);0<=m;m=l.nextSetBit(m+1))g+=","+(m+d);l=l.cardinality();b+=l;e=JU.PT.rep(e,"%ATOMS%",g.substring(1));e=JU.PT.rep(e,"%S%",1==l?"":"s");e=JU.PT.rep(e,"%NATOMS%",""+l)}JU.Logger.info("adding PeakData "+
e);this.loader.addPeakData(e)}this.loader.setSpectrumPeaks(b,this.peakXLabel,this.peakYLabel);return c},"JU.Lst,~N");c(b,"getStringInfo",function(a,d,b,c,f,g,e,l,m){"HNMR".equals(b)?b="1HNMR":"CNMR".equals(b)&&(b="13CNMR");var x=null==b?"":" type="+JU.PT.esc(b);null==d&&(d="1HNMR".equals(b)?"atom%S%: %ATOMS%; integration: %NATOMS%":"");d=" title="+JU.PT.esc(d);a="<PeakData "+a+' index="%INDEX%"'+d+x+c+" "+m;null!=f&&(a=JU.PT.rep(a,'atoms="'+f+'"','atoms="%ATOMS%"'));d=g.get(e);null==d&&(d=B(-1,[a,
null==f?null:new JU.BS]),g.put(e,d),l.addLast(d));null!=f&&(g=d[1],f=f.$replace(","," "),f.equals("*")&&(f="0:1000"),g.or(JU.BS.unescape("({"+f+"})")))},"~S,~S,~S,~S,~S,java.util.Map,~S,JU.Lst,~S");c(b,"getModelData",function(a){this.baseModel=this.fixModel(this.getAttribute(this.line,"baseModel"),!0);this.lastModel=this.thisModelID;this.thisModelID=this.fixModel(this.getAttribute(this.line,"id"),!1);for(this.checkDuplicateModelID();0>this.line.indexOf(">")&&0>this.line.indexOf("type");)this.readLine();
var d=this.getAttribute(this.line,"type").toLowerCase();this.vibScale=JU.PT.parseFloat(this.getAttribute(this.line,"vibrationScale"));d.equals("xyzvib")?d="xyz":0==d.length&&(d=null);for(var b=new JU.SB;null!=this.readLine()&&!this.line.contains("</ModelData>");)b.append(this.line).appendC("\n");this.loader.processModelData(b.toString(),this.thisModelID,d,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()});e(b,"setLine",function(a){this.line=a},"~S");e(b,"getFirstModelWithPeaks",function(){return this.firstModelWithPeaks})});r("J.jsv");v(["J.api.JmolJSpecView"],"J.jsv.JSV","java.util.Hashtable JU.BS $.Lst $.PT JU.Escape $.Logger JV.FileManager".split(" "),function(){var b=p(function(){this.vwr=null;q(this,arguments)},
J.jsv,"JSV",null,J.api.JmolJSpecView);e(b,"setViewer",function(a){this.vwr=a;return this},"JV.Viewer");e(b,"atomPicked",function(a){0>a||(a=this.getPeakAtomRecord(a),null!=a&&this.sendJSpecView(a+' src="JmolAtomSelect"'))},"~N");c(b,"getPeakAtomRecord",function(a){var d=this.vwr.ms.at,b=d[a].mi,c=null;switch(d[a].getElementNumber()){case 1:c="1HNMR";break;case 6:c="13CNMR";break;default:return null}d=this.vwr.ms.getInfo(b,"jdxAtomSelect_"+c);if(null==d)return null;this.vwr.ms.htPeaks=new java.util.Hashtable;
b=this.vwr.ms.htPeaks;for(c=0;c<d.size();c++){var f=d.get(c);System.out.println("Jmol JSpecView.java peak="+f);var g=b.get(f);System.out.println("Jmol JSpecView.java bspeak="+g);if(null==g){b.put(f,g=new JU.BS);var e=JU.PT.getQuotedAttribute(f,"atoms"),l=JU.PT.getQuotedAttribute(f,"select");System.out.println("Jmol JSpecView.java satoms select "+e+" "+l);var m="";null!=e?m+="visible & (atomno="+JU.PT.rep(e,","," or atomno=")+")":null!=l&&(m+="visible & ("+l+")");System.out.println("Jmol JSpecView.java script : "+
m);g.or(this.vwr.getAtomBitSet(m))}System.out.println("Jmol JSpecView bsPeak now : "+g+" "+a);if(g.get(a))return f}return null},"~N");c(b,"sendJSpecView",function(a){var d=JU.PT.getQuotedAttribute(a,"title");null!=d&&this.vwr.scriptEcho(JU.Logger.debugging?a:d);a=this.vwr.fullName+"JSpecView: "+a;JU.Logger.info("Jmol>JSV "+a);this.vwr.sm.syncSend(a,">",0)},"~S");e(b,"setModel",function(a){if(1==(this.vwr.ms.getInfoM("_startJSpecView")===Boolean.TRUE?1:this.vwr.sm.getSyncMode()))a=this.vwr.ms.getInfo(a,
"jdxModelSelect"),null!=a&&this.sendJSpecView(a+' src="Jmol"')},"~N");e(b,"getBaseModelIndex",function(a){var d=this.vwr.ms.getInfo(a,"jdxBaseModel");if(null!=d)for(var b=this.vwr.ms.mc;0<=--b;)if(d.equals(this.vwr.ms.getInfo(b,"jdxModelID")))return b;return a},"~N");e(b,"processSync",function(a,d){JU.Logger.debugging&&JU.Logger.info("J.jsv.JSV jsvMode="+d+" script="+a);System.out.println("JSV processSync "+a+" "+d);switch(d){case 0:case 77:case 28:case 35:return a.startsWith("JSpecView:")||(a="JSpecView:"+
a),a=this.vwr.fullName+a,this.vwr.sm.syncSend(a,">",0),null}switch(d){default:return null;case 21:return null;case 14:var b=JU.PT.getQuotedAttribute(a,"file"),c=null!=b&&b.startsWith(JV.FileManager.SIMULATION_PROTOCOL),f=!c||this.vwr.isApplet?"":JU.PT.getQuotedAttribute(b.$replace("'",'"'),"id"),b=c&&!this.vwr.isApplet&&(b.startsWith(JV.FileManager.SIMULATION_PROTOCOL+"C13/MOL=")||b.startsWith(JV.FileManager.SIMULATION_PROTOCOL+"H1/MOL="))?null:JU.PT.rep(b,"#molfile",""),g=c?"molfile":JU.PT.getQuotedAttribute(a,
"model"),e=JU.PT.getQuotedAttribute(a,"baseModel"),l=JU.PT.getQuotedAttribute(a,"atoms"),m=JU.PT.getQuotedAttribute(a,"select"),x=JU.PT.getQuotedAttribute(a,"script");if(null==f||0==f.length)f=null==g?null:(null==b?"":b+"#")+g;"".equals(e)&&(f+=".baseModel");g=null==f?-3:this.vwr.getModelIndexFromId(f);if(-2==g)return null;if(-1!=g||null==b)a="";else{if(c&&!this.vwr.isApplet)return null;c&&(b+="#molfile");a=0<=g?"":"load "+JU.PT.esc(b)}null!=f&&(a+=";model "+JU.PT.esc(f));null!=l?a+=";select visible & (@"+
JU.PT.rep(l,","," or @")+")":null!=m&&(a+=";select visible & ("+m+")");null!=x&&(a+=";"+x);return a;case 7:b=JU.Escape.unescapeStringArray(a.substring(7));c=new JU.Lst;f="1HNMR";for(l=0;l<b.length;l++)0==l&&0<=b[l].indexOf(JV.FileManager.SIMULATION_PROTOCOL+"C13/")&&(f="13CNMR"),c.addLast(b[l]);this.vwr.ms.setInfo(this.vwr.am.cmi,"jdxAtomSelect_"+f,c);return null}},"~S,~N")});r("JSV.api");E(JSV.api,"AnnotationData");r("JSV.api");E(JSV.api,"AppletFrame");r("JSV.api");E(JSV.api,"JSVAppInterface",JSV.api.JSVAppletInterface);
r("JSV.api");E(JSV.api,"JSVAppletInterface");r("JSV.api");E(JSV.api,"JSVFileHelper");r("JSV.api");E(JSV.api,"JSVMainPanel",JSV.api.JSVViewPanel);r("JSV.api");E(JSV.api,"JSVPanel",JSV.api.JSVViewPanel);r("JSV.api");E(JSV.api,"JSVTree");r("JSV.api");E(JSV.api,"JSVTreeNode");r("JSV.api");E(JSV.api,"JSVTreePath");r("JSV.api");E(JSV.api,"JSVViewPanel");r("JSV.api");E(JSV.api,"JSVZipReader");r("JSV.api");E(JSV.api,"PanelListener");r("JSV.api");E(JSV.api,"ScriptInterface");r("JSV.app");v(["JSV.api.JSVAppInterface",
"$.PanelListener","$.ScriptInterface"],"JSV.app.JSVApp","JU.Lst $.PT JSV.common.Coordinate $.JSVFileManager $.JSVersion $.JSViewer $.ScriptToken JU.Logger".split(" "),function(){var b=p(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]);n(b,function(a,d){this.appletFrame=a;this.vwr=new JSV.common.JSViewer(this,!0,d,!0);a.setDropTargetListener(this.isSigned(),this.vwr);var b=a.getDocumentBase();JSV.common.JSVFileManager.setDocumentBase(this.vwr,b);this.initParams(a.getParameter("script"))},"JSV.api.AppletFrame,~B");e(b,"isPro",function(){return this.isSigned()});e(b,"isSigned",function(){return!0});c(b,"getAppletFrame",function(){return this.appletFrame});c(b,"dispose",function(){try{this.vwr.dispose()}catch(a){if(y(a,
Exception))a.printStackTrace();else throw a;}});e(b,"getPropertyAsJavaObject",function(a){return this.vwr.getPropertyAsJavaObject(a)},"~S");e(b,"getPropertyAsJSON",function(a){return JU.PT.toJSON(null,this.getPropertyAsJavaObject(a))},"~S");e(b,"getCoordinate",function(){return this.vwr.getCoordinate()});e(b,"loadInline",function(a){this.siOpenDataOrFile(a,"[inline]",null,null,-1,-1,!0,null,null);this.appletFrame.validateContent(3)},"~S");e(b,"exportSpectrum",function(a,d){return this.vwr.$export(a,
d)},"~S,~N");e(b,"setFilePath",function(a){this.runScript("load "+JU.PT.esc(a))},"~S");e(b,"setSpectrumNumber",function(a){this.runScript(JSV.common.ScriptToken.SPECTRUMNUMBER+" "+a)},"~N");e(b,"reversePlot",function(){this.toggle(JSV.common.ScriptToken.REVERSEPLOT)});e(b,"toggleGrid",function(){this.toggle(JSV.common.ScriptToken.GRIDON)});e(b,"toggleCoordinate",function(){this.toggle(JSV.common.ScriptToken.COORDINATESON)});e(b,"togglePointsOnly",function(){this.toggle(JSV.common.ScriptToken.POINTSONLY)});
e(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");e(b,"addHighlight",function(a,d,b,c,f,g){this.runScript("HIGHLIGHT "+a+" "+d+" "+b+" "+c+" "+f+" "+g)},"~N,~N,~N,~N,~N,~N");e(b,"removeHighlight",function(a,d){this.runScript("HIGHLIGHT "+a+" "+d+" OFF")},"~N,~N");e(b,"removeAllHighlights",function(){this.runScript("HIGHLIGHT OFF")});e(b,"syncScript",function(a){this.vwr.syncScript(a)},
"~S");e(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)});e(b,"repaint",function(){var a=null==this.vwr?null:this.vwr.html5Applet;
null==JSV.common.JSViewer.jsmolObject?this.appletFrame.repaint():null!=a&&JSV.common.JSViewer.jsmolObject.repaint(a,!0)});c(b,"updateJS",function(){},"~N,~N");e(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,d=null==this.peakCallbackFunctionName?null:new JSV.common.Coordinate;if(this.vwr.pd().getPickedCoordinates(a,d)){var b=this.vwr.mainPanel.getCurrentPanelIndex();
null==d?this.appletFrame.callToJavaScript(this.coordCallbackFunctionName,B(-1,[Double.$valueOf(a.getXVal()),Double.$valueOf(a.getYVal()),Integer.$valueOf(b+1)])):this.appletFrame.callToJavaScript(this.peakCallbackFunctionName,B(-1,[Double.$valueOf(a.getXVal()),Double.$valueOf(a.getYVal()),Double.$valueOf(d.getXVal()),Double.$valueOf(d.getYVal()),Integer.$valueOf(b+1)]))}}});c(b,"doAdvanced",function(){},"~S");e(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");e(b,"getSolnColour",function(){return this.vwr.getSolutionColorStr(!0)});c(b,"updateJSView",function(a){var d=this.vwr.html5Applet;d&&null!=d._viewSet&&d._updateView(null==d?null:this.vwr.selectedPanel,a)},"~S");e(b,"syncToJmol",function(a){this.updateJSView(a);null!=this.syncCallbackFunctionName&&(JU.Logger.info("JSVApp.syncToJmol JSV>Jmol "+a),this.appletFrame.callToJavaScript(this.syncCallbackFunctionName,B(-1,[this.vwr.fullName,
a])))},"~S");e(b,"setVisible",function(a){this.appletFrame.setPanelVisible(a)},"~B");e(b,"setCursor",function(a){this.vwr.apiPlatform.setCursor(a,this.appletFrame)},"~N");e(b,"runScript",function(a){this.vwr.runScript(a)},"~S");e(b,"getScriptQueue",function(){return this.vwr.scriptQueue});e(b,"siSetCurrentSource",function(a){this.vwr.currentSource=a},"JSV.source.JDXSource");e(b,"siSendPanelChange",function(){this.vwr.selectedPanel!==this.prevPanel&&(this.prevPanel=this.vwr.selectedPanel,this.vwr.sendPanelChange())});
e(b,"siNewWindow",function(a,d){this.isNewWindow=a;d?null!=this.vwr.jsvpPopupMenu&&this.vwr.jsvpPopupMenu.setSelected("Window",!1):this.appletFrame.newWindow(a)},"~B,~B");e(b,"siValidateAndRepaint",function(){var a=this.vwr.pd();null!=a&&a.setTaintedAll();this.appletFrame.validate();this.repaint()},"~B");e(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");
e(b,"siOpenDataOrFile",function(a,d,b,c,f,g,e,l,m){switch(this.vwr.openDataOrFile(a,d,b,c,f,g,e,m)){case 0:null!=l&&this.runScript(l);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");e(b,"siProcessCommand",function(a){this.vwr.runScriptNow(a)},"~S");e(b,"siSetSelectedPanel",function(a){this.vwr.mainPanel.setSelectedPanel(this.vwr,
a,this.vwr.panelNodes);this.vwr.spectraTree.setSelectedPanel(this,a);null==a&&(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");e(b,"siExecSetCallback",function(a,d){switch(a){case JSV.common.ScriptToken.APPLETREADYCALLBACKFUNCTIONNAME:this.appletReadyCallbackFunctionName=d;break;case JSV.common.ScriptToken.LOADFILECALLBACKFUNCTIONNAME:this.loadFileCallbackFunctionName=
d;break;case JSV.common.ScriptToken.PEAKCALLBACKFUNCTIONNAME:this.peakCallbackFunctionName=d;break;case JSV.common.ScriptToken.SYNCCALLBACKFUNCTIONNAME:this.syncCallbackFunctionName=d;break;case JSV.common.ScriptToken.COORDCALLBACKFUNCTIONNAME:this.coordCallbackFunctionName=d}},"JSV.common.ScriptToken,~S");e(b,"siLoaded",function(a){null!=this.loadFileCallbackFunctionName&&this.appletFrame.callToJavaScript(this.loadFileCallbackFunctionName,B(-1,[this.vwr.appletName,a]));this.updateJSView(null);return null},
"~S");e(b,"siExecHidden",function(){},"~B");e(b,"siExecScriptComplete",function(a,d){d||this.vwr.showMessage(a);this.siValidateAndRepaint(!1)},"~S,~B");e(b,"siUpdateBoolean",function(){},"JSV.common.ScriptToken,~B");e(b,"siCheckCallbacks",function(){this.checkCallbacks()},"~S");e(b,"siNodeSet",function(){this.appletFrame.validateContent(2);this.siValidateAndRepaint(!1)},"JSV.common.PanelNode");e(b,"siSourceClosed",function(){},"JSV.source.JDXSource");e(b,"siGetNewJSVPanel",function(a){if(null==a)return this.vwr.initialEndIndex=
this.vwr.initialStartIndex=-1,null;var d=new JU.Lst;d.addLast(a);a=this.appletFrame.getJSVPanel(this.vwr,d);a.getPanelData().addListener(this);this.vwr.parameters.setFor(a,null,!0);return a},"JSV.common.Spectrum");e(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");e(b,"siSetPropertiesFromPreferences",function(){this.vwr.checkAutoIntegrate()},"JSV.api.JSVPanel,~B");e(b,"siSetLoaded",function(){},"~S,~S");e(b,"siSetMenuEnables",function(){},"JSV.common.PanelNode,~B");e(b,"siUpdateRecentMenus",function(){},"~S");e(b,"siExecTest",function(){this.loadInline("")},"~S");e(b,"print",function(a){return this.vwr.print(a)},"~S");e(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."})});r("JSV.app");v(["J.api.GenericMouseInterface"],"JSV.app.GenericMouse",["JU.Logger"],function(){var b=p(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);n(b,function(a){this.jsvp=
a;this.pd=a.getPanelData()},"JSV.api.JSVPanel");e(b,"clear",function(){});e(b,"processEvent",function(a,d,b,c,f){if(null==this.pd)return!this.disposed&&(501==a&&0!=(c&4))&&this.jsvp.showMenu(d,b),!0;507!=a&&(c=JSV.app.GenericMouse.applyLeftMouse(c));switch(a){case 507:this.wheeled(f,d,c|32);break;case 501:this.xWhenPressed=d;this.yWhenPressed=b;this.modifiersWhenPressed10=c;this.pressed(f,d,b,c,!1);break;case 506:this.dragged(f,d,b,c);break;case 504:this.entered(f,d,b);break;case 505:this.exited(f,
d,b);break;case 503:this.moved(f,d,b,c);break;case 502:this.released(f,d,b,c);d==this.xWhenPressed&&(b==this.yWhenPressed&&c==this.modifiersWhenPressed10)&&this.clicked(f,d,b,c,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 d=a.getModifiers();0==(d&28)&&(d|=16);this.dragged(a.getWhen(),a.getX(),a.getY(),d)},"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 d=a.getKeyChar(),b=a.getModifiers();JU.Logger.info("MouseManager keyTyped: "+d+" "+(0+d.charCodeAt(0))+" "+b);this.pd.keyTyped(d.charCodeAt(0),b)&&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");e(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,d,b){null!=this.pd&&this.pd.mouseEnterExit(a,d,b,!1)},"~N,~N,~N");c(b,"exited",function(a,d,b){null!=this.pd&&
this.pd.mouseEnterExit(a,d,b,!0)},"~N,~N,~N");c(b,"clicked",function(a,d,b,c){null!=this.pd&&this.pd.mouseAction(2,a,d,b,1,c)},"~N,~N,~N,~N,~N");c(b,"moved",function(a,d,b,c){null!=this.pd&&(this.isMouseDown?this.pd.mouseAction(1,a,d,b,0,JSV.app.GenericMouse.applyLeftMouse(c)):this.pd.mouseAction(0,a,d,b,0,c&-29))},"~N,~N,~N,~N");c(b,"wheeled",function(a,d,b){null!=this.pd&&this.pd.mouseAction(3,a,0,d,0,b)},"~N,~N,~N");c(b,"pressed",function(a,d,b,c){null==this.pd?this.disposed||this.jsvp.showMenu(d,
b):(this.isMouseDown=!0,this.pd.mouseAction(4,a,d,b,0,c))},"~N,~N,~N,~N,~B");c(b,"released",function(a,d,b,c){null!=this.pd&&(this.isMouseDown=!1,this.pd.mouseAction(5,a,d,b,0,c))},"~N,~N,~N,~N");c(b,"dragged",function(a,d,b,c){null!=this.pd&&(20==(c&20)&&(c=c&-5|2),this.pd.mouseAction(1,a,d,b,0,c))},"~N,~N,~N,~N");b.applyLeftMouse=c(b,"applyLeftMouse",function(a){return 0==(a&28)?a|16:a},"~N");e(b,"processTwoPointGesture",function(){},"~A");e(b,"dispose",function(){this.jsvp=this.pd=null;this.disposed=
!0})});r("JSV.appletjs");v(["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=p(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]);n(b,function(a){null==a&&(a=new java.util.Hashtable);
this.viewerOptions=a;this.htParams=new java.util.Hashtable;var d;for(a=a.entrySet().iterator();a.hasNext()&&((d=a.next())||1);)this.htParams.put(d.getKey().toLowerCase(),d.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,B(-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,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.getParameter(a);System.out.println("getValue "+a+" = "+b);return null!=b?b:d},"~S,~S");e(b,"isPro",function(){return this.app.isPro()});e(b,"isSigned",function(){return this.app.isSigned()});e(b,"destroy",
function(){this.app.dispose();this.app=null});c(b,"getParameter",function(a,d){return this.isStandalone?System.getProperty(a,d):null!=this.getParameter(a)?this.getParameter(a):d},"~S,~S");e(b,"getAppletInfo",function(){return JSV.app.JSVApp.getAppletInfo()});e(b,"getSolnColour",function(){return this.app.getSolnColour()});e(b,"getCoordinate",function(){return this.app.getCoordinate()});e(b,"loadInline",function(a){this.app.loadInline(a)},"~S");c(b,"$export",function(a,d){return this.app.exportSpectrum(a,
d)},"~S,~N");e(b,"exportSpectrum",function(a,d){return this.app.exportSpectrum(a,d)},"~S,~N");e(b,"setFilePath",function(a){this.app.setFilePath(a)},"~S");e(b,"setSpectrumNumber",function(a){this.app.setSpectrumNumber(a)},"~N");e(b,"toggleGrid",function(){this.app.toggleGrid()});e(b,"toggleCoordinate",function(){this.app.toggleCoordinate()});e(b,"togglePointsOnly",function(){this.app.togglePointsOnly()});e(b,"toggleIntegration",function(){this.app.toggleIntegration()});e(b,"addHighlight",function(a,
d,b,c,f,g){this.app.addHighlight(a,d,b,c,f,g)},"~N,~N,~N,~N,~N,~N");e(b,"removeAllHighlights",function(){this.app.removeAllHighlights()});e(b,"removeHighlight",function(a,d){this.app.removeHighlight(a,d)},"~N,~N");e(b,"reversePlot",function(){this.app.reversePlot()});c(b,"script",function(a){this.app.initParams(a)},"~S");e(b,"runScript",function(a){this.app.runScript(a)},"~S");e(b,"syncScript",function(a){this.app.syncScript(a)},"~S");e(b,"writeStatus",function(a){this.app.writeStatus(a)},"~S");e(b,
"getPropertyAsJavaObject",function(a){return this.app.getPropertyAsJavaObject(a)},"~S");e(b,"getPropertyAsJSON",function(a){return this.app.getPropertyAsJSON(a)},"~S");e(b,"runScriptNow",function(a){return this.app.runScriptNow(a)},"~S");e(b,"print",function(a){return this.app.print(a)},"~S");e(b,"setDropTargetListener",function(){},"~B,JSV.common.JSViewer");e(b,"validateContent",function(){},"~N");e(b,"createMainPanel",function(a){a.mainPanel=new JSV.js2d.JsMainPanel},"JSV.common.JSViewer");e(b,
"newWindow",function(){},"~B");e(b,"callToJavaScript",function(a,d){var b=JU.PT.split(a,".");try{for(var c=window[b[0]],f=1;f<b.length;f++)c=c[b[f]];return c(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],d[9])}catch(g){System.out.println(a+" failed "+g)}},"~S,~A");e(b,"setPanelVisible",function(){},"~B");e(b,"getJSVPanel",function(a,d){return null==d?JSV.js2d.JsPanel.getEmptyPanel(a):JSV.js2d.JsPanel.getPanelMany(a,d)},"JSV.common.JSViewer,JU.Lst");e(b,"getDocumentBase",function(){try{return new java.net.URL(Y("java.net.URL"),
this.viewerOptions.get("documentBase"),null)}catch(a){if(y(a,"java.net.MalformedURLException"))return null;throw a;}});e(b,"repaint",function(){});e(b,"validate",function(){});e(b,"doExitJmol",function(){});e(b,"getApp",function(){return this.app});e(b,"setStatusDragDropped",function(){return!0},"~N,~N,~N,~S,~A");e(b,"cacheFileByName",function(){return 0},"~S,~B");e(b,"cachePut",function(){},"~S,~O");e(b,"getFullName",function(){return this.app.vwr.fullName});e(b,"processMouseEvent",function(a,d,
b,c,f){return this.app.vwr.processMouseEvent(a,d,b,c,f)},"~N,~N,~N,~N,~N");e(b,"setDisplay",function(a){this.app.vwr.setDisplay(a)},"~O");e(b,"startHoverWatcher",function(){},"~B");e(b,"update",function(){this.app.vwr.updateJS()});c(b,"openFile",function(a){this.app.vwr.openFile(a,!0);return null},"~S");e(b,"openFileAsyncSpecial",function(a,d){this.app.vwr.openFileAsyncSpecial(a,d)},"~S,~N");e(b,"openFileAsyncSpecialType",function(a,d){this.openFileAsyncSpecial(a,d)},"~S,~N,~S");e(b,"processTwoPointGesture",
function(a){this.app.vwr.processTwoPointGesture(a)},"~A");e(b,"setScreenDimension",function(a,d){this.app.vwr.setScreenDimension(a,d)},"~N,~N");e(b,"checkScript",function(a){a=this.app.checkScript(a);null!=a&&System.out.println(a);return a},"~S");e(b,"processKeyEvent",function(){},"~O")});r("JSV.common");v(["java.lang.Enum","JSV.common.Coordinate"],"JSV.common.Annotation",["JU.CU"],function(){var b=p(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,d,b,c,f,g,e,l){this.set(a,d);this.spec=b;this.text=c;this.$isPixels=f;this.is2D=g;this.offsetX=e;this.offsetY=l;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});e(b,"toString",function(){return"["+this.getXVal()+", "+this.getYVal()+
","+this.text+"]"});b.getColoredAnnotation=c(b,"getColoredAnnotation",function(a,d,b,c){var f,g=0,e=1,l=2,m=3,x=b.size();try{switch(x){default:return null;case 1:f=b.get(0);g=e=-1;'"'==f.charAt(0)?(m=0,l=-1):(l=0,m=-1);break;case 2:g=e=-1;f=b.get(0);'"'==f.charAt(0)?(m=0,l=1):(l=0,m=1);break;case 3:case 4:f=b.get(2),'"'==f.charAt(0)?(m=2,l=4==x?3:-1):(l=2,m=4==x?3:-1),f=b.get(2),'"'==f.charAt(0)?(m=2,l=-1):(l=2,m=-1)}if(null==c&&(0>g||0>e||0>m||0>l))return null;var n=0>g?c.getXVal():Double.$valueOf(b.get(g)).doubleValue(),
p=0>e?c.getYVal():Double.$valueOf(b.get(e)).doubleValue(),q=0>l?c.getColor():a.getColor1(JU.CU.getArgbFromString(b.get(l))),j;0>m?j=c.text:(j=b.get(m),'"'==j.charAt(0)&&(j=j.substring(1,j.length-1)));return(new JSV.common.ColoredAnnotation).setCA(n,p,d,j,q,!1,!1,0,0)}catch(r){if(y(r,Exception))return null;throw r;}},"J.api.GenericGraphics,JSV.common.Spectrum,JU.Lst,JSV.common.Annotation");b=s(JSV.common.Annotation,"AType",Enum);j(b,"Integration",0,[]);j(b,"PeakList",1,[]);j(b,"Measurements",2,[]);
j(b,"OverlayLegend",3,[]);j(b,"Views",4,[]);j(b,"NONE",5,[])});r("JSV.common");v(["JSV.common.Annotation"],"JSV.common.ColoredAnnotation",null,function(){var b=p(function(){this.color=null;q(this,arguments)},JSV.common,"ColoredAnnotation",JSV.common.Annotation);n(b,function(){A(this,JSV.common.ColoredAnnotation,[])});c(b,"getColor",function(){return this.color});c(b,"setCA",function(a,d,b,c,f,g,e,l,m){this.setA(a,d,b,c,g,e,l,m);this.color=f;return this},"~N,~N,JSV.common.Spectrum,~S,javajs.api.GenericColor,~B,~B,~N,~N")});
r("JSV.common");v(["JSV.common.Parameters"],"JSV.common.ColorParameters",["java.util.Hashtable","$.StringTokenizer","JU.CU","$.Lst","JSV.common.ScriptToken"],function(){var b=p(function(){this.plotColors=this.elementColors=this.displayFontName=this.titleFontName=null;this.isDefault=!1;q(this,arguments)},JSV.common,"ColorParameters",JSV.common.Parameters);n(b,function(){A(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.PEAKOVERCOLOR,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,d,b){null==d&&(d=this);b&&a.getPanelData().setBooleans(d,null);a=a.getPanelData();null!=a.getCurrentPlotColor(1)&&a.setPlotColors(this.plotColors);a.setColorOrFont(d,null)},"JSV.api.JSVPanel,JSV.common.ColorParameters,~B");c(b,"set",function(a,d,b){var c=null;switch(d){default:this.setP(a,d,b);return;case JSV.common.ScriptToken.PLOTCOLORS:null==a?this.getPlotColors(b):a.setPlotColors(this.getPlotColors(b));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.PEAKOVERCOLOR: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:c=
this.setColorFromString(d,b);break;case JSV.common.ScriptToken.TITLEFONTNAME:case JSV.common.ScriptToken.DISPLAYFONTNAME:c=this.getFontName(d,b)}null!=a&&null!=c&&a.setColorOrFont(this,d)},"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,d){null!=d&&this.elementColors.put(a,d);return d},"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 d;for(a=a.elementColors.entrySet().iterator();a.hasNext()&&((d=a.next())||1);)this.setColor(d.getKey(),d.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 d=new JU.Lst;try{for(;a.hasMoreTokens();)d.addLast(this.getColorFromString(a.nextToken()))}catch(b){if(y(b,Exception))return null;throw b;}return d.toArray(Array(d.size()))},"~S");c(b,"setColorFromString",function(a,d){return this.setColor(a,this.getColorFromString(d))},"JSV.common.ScriptToken,~S");c(b,"getFontName",function(a,d){var b=this.isValidFontName(d);switch(a){case JSV.common.ScriptToken.TITLEFONTNAME:return b?this.titleFontName=d:this.titleFontName;case JSV.common.ScriptToken.DISPLAYFONTNAME:return b?
this.displayFontName=d: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=B(-1,"black darkGreen darkred orange magenta cyan maroon darkGray".split(" "))});r("JSV.common");u=s(JSV.common,"CoordComparator",null,java.util.Comparator);e(u,"compare",function(b,a){return b.getXVal()>a.getXVal()?1:b.getXVal()<a.getXVal()?-1:0},"JSV.common.Coordinate,JSV.common.Coordinate");
r("JSV.common");v(["JSV.common.CoordComparator"],"JSV.common.Coordinate",["java.util.Arrays","$.StringTokenizer","JU.Lst"],function(){var b=p(function(){this.yVal=this.xVal=0;q(this,arguments)},JSV.common,"Coordinate",null);c(b,"set",function(a,d){this.xVal=a;this.yVal=d;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");e(b,"toString",function(){return"["+this.xVal+", "+this.yVal+"]"});b.isYInRange=c(b,"isYInRange",function(a,d,b){return JSV.common.Coordinate.getMinY(a,0,a.length-1)>=d&&JSV.common.Coordinate.getMaxY(a,0,a.length-1)>=b},"~A,~N,~N");b.normalise=c(b,"normalise",function(a,d,b){var c=Array(a.length),f=JSV.common.Coordinate.getMinY(a,0,a.length-1);b=(JSV.common.Coordinate.getMaxY(a,0,a.length-1)-
f)/(b-d);for(var g=0;g<a.length;g++)c[g]=(new JSV.common.Coordinate).set(a[g].getXVal(),(a[g].getYVal()-f)/b-d);return c},"~A,~N,~N");b.reverse=c(b,"reverse",function(a){for(var d=a.length,b=0;b<d;b++){var c=a[b];a[b]=a[--d];a[d]=c}return a},"~A");b.parseDSV=c(b,"parseDSV",function(a,d,b){var c,f=c=0,g=new JU.Lst;0<=a.indexOf("(")&&(a=a.$replace("("," ").$replace(")"," ").$replace(","," "));for(a=new java.util.StringTokenizer(a," \t\n\r\f,;");a.hasMoreTokens();)c=a.nextToken().trim(),f=a.nextToken().trim(),
c=Double.parseDouble(c),f=Double.parseDouble(f),c=(new JSV.common.Coordinate).set(c*d,f*b),g.addLast(c);d=Array(g.size());return g.toArray(d)},"~S,~N,~N");b.deltaX=c(b,"deltaX",function(a,d,b){return(a-d)/(b-1)},"~N,~N,~N");b.removeScale=c(b,"removeScale",function(a,d,b){JSV.common.Coordinate.applyScale(a,1/d,1/b)},"~A,~N,~N");b.applyScale=c(b,"applyScale",function(a,d,b){if(1!=d||1!=b)for(var c=0;c<a.length;c++)a[c].setXVal(a[c].getXVal()*d),a[c].setYVal(a[c].getYVal()*b)},"~A,~N,~N");b.getMinX=
c(b,"getMinX",function(a,d,b){for(var c=1.7976931348623157E308;d<=b;d++){var f=a[d].getXVal();f<c&&(c=f)}return c},"~A,~N,~N");b.getMinX=c(b,"getMinX",function(a,d){for(var b=1.7976931348623157E308,c=0;c<a.size();c++){var f=a.get(c).getXYCoords(),f=JSV.common.Coordinate.getMinX(f,d.getStartingPointIndex(c),d.getEndingPointIndex(c));f<b&&(b=f)}return b},"JU.Lst,JSV.common.ViewData");b.getMaxX=c(b,"getMaxX",function(a,d,b){for(var c=-1.7976931348623157E308;d<=b;d++){var f=a[d].getXVal();f>c&&(c=f)}return c},
"~A,~N,~N");b.getMaxX=c(b,"getMaxX",function(a,d){for(var b=-1.7976931348623157E308,c=0;c<a.size();c++){var f=a.get(c).getXYCoords(),f=JSV.common.Coordinate.getMaxX(f,d.getStartingPointIndex(c),d.getEndingPointIndex(c));f>b&&(b=f)}return b},"JU.Lst,JSV.common.ViewData");b.getMinY=c(b,"getMinY",function(a,d,b){for(var c=1.7976931348623157E308;d<=b;d++){var f=a[d].getYVal();f<c&&(c=f)}return c},"~A,~N,~N");b.getMinYUser=c(b,"getMinYUser",function(a,d){for(var b=1.7976931348623157E308,c=0;c<a.size();c++){var f=
a.get(c).getUserYFactor(),g=a.get(c).getYRef(),e=a.get(c).getXYCoords(),f=(JSV.common.Coordinate.getMinY(e,d.getStartingPointIndex(c),d.getEndingPointIndex(c))-g)*f+g;f<b&&(b=f)}return b},"JU.Lst,JSV.common.ViewData");b.getMaxY=c(b,"getMaxY",function(a,d,b){for(var c=-1.7976931348623157E308;d<=b;d++){var f=a[d].getYVal();f>c&&(c=f)}return c},"~A,~N,~N");b.getMaxYUser=c(b,"getMaxYUser",function(a,d){for(var b=-1.7976931348623157E308,c=0;c<a.size();c++){var f=a.get(c).getUserYFactor(),g=a.get(c).getYRef(),
e=a.get(c).getXYCoords(),f=(JSV.common.Coordinate.getMaxY(e,d.getStartingPointIndex(c),d.getEndingPointIndex(c))-g)*f+g;f>b&&(b=f)}return b},"JU.Lst,JSV.common.ViewData");b.getYValueAt=c(b,"getYValueAt",function(a,d){var b=JSV.common.Coordinate.getNearestIndexForX(a,d);if(0==b||b==a.length)return NaN;var c=a[b].getXVal(),f=a[b-1].getXVal(),g=a[b].getYVal(),b=a[b-1].getYVal();return c==f?g:b+(g-b)/(c-f)*(d-f)},"~A,~N");b.intoRange=c(b,"intoRange",function(a,d,b){return Math.max(Math.min(a,b),d)},"~N,~N,~N");
b.getNearestIndexForX=c(b,"getNearestIndexForX",function(a,d){var b=(new JSV.common.Coordinate).set(d,0),b=java.util.Arrays.binarySearch(a,b,JSV.common.Coordinate.c);0>b&&(b=-1-b);return 0>b?0:b>a.length-1?a.length-1:b},"~A,~N");b.findXForPeakNearest=c(b,"findXForPeakNearest",function(a,d,b){d=JSV.common.Coordinate.getNearestIndexForX(a,d);for(b=b?-1:1;d<a.length-1&&0<b*(a[d+1].yVal-a[d].yVal);)d++;for(;1<=d&&0<b*(a[d-1].yVal-a[d].yVal);)d--;return 0==d||d==a.length-1?a[d].xVal:JSV.common.Coordinate.parabolicInterpolation(a,
d)},"~A,~N,~B");b.parabolicInterpolation=c(b,"parabolicInterpolation",function(a,d){var b=a[d-1].yVal,c=a[d+1].yVal;return a[d].xVal+(b-c)/2/(b-2*a[d].yVal+c)*(a[d+1].xVal-a[d].xVal)},"~A,~N");b.getPickedCoordinates=c(b,"getPickedCoordinates",function(a,d,b,c){if(null==d)return!1;var f=d.getXVal();b.setXVal(f);b.setYVal(d.getYVal());if(null==c)return!0;d=JSV.common.Coordinate.getNearestIndexForX(a,f);c.setXVal(a[d].getXVal());c.setYVal(a[d].getYVal());return!0},"~A,JSV.common.Coordinate,JSV.common.Coordinate,JSV.common.Coordinate");
b.shiftX=c(b,"shiftX",function(a,d){for(var b=a.length;0<=--b;)a[b].xVal+=d},"~A,~N");b.getNearestXWithYAbove=c(b,"getNearestXWithYAbove",function(a,d,b,c,f){d=JSV.common.Coordinate.getNearestIndexForX(a,d);var g=c?-1:1;if(f)for(;d<a.length&&0>g*(a[d].yVal-b);)d++;else for(;0<=d&&0>g*(a[d].yVal-b);)d--;return-1==d||d==a.length?NaN:JSV.common.Coordinate.findXForPeakNearest(a,a[d].getXVal(),c)},"~A,~N,~N,~B,~B");b.c=new JSV.common.CoordComparator});r("JSV.common");v(["java.lang.Enum"],"JSV.common.ExportType",
null,function(){var b=s(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 d,b=0,c=JSV.common.ExportType.values();b<c.length&&((d=c[b])||1);b++)if(d.name().equals(a))return d;return JSV.common.ExportType.UNK},"~S");b.isExportMode=c(b,"isExportMode",function(a){return JSV.common.ExportType.getType(a)!==JSV.common.ExportType.UNK},"~S");
j(b,"UNK",0,[]);j(b,"SOURCE",1,[]);j(b,"DIF",2,[]);j(b,"FIX",3,[]);j(b,"SQZ",4,[]);j(b,"PAC",5,[]);j(b,"XY",6,[]);j(b,"DIFDUP",7,[]);j(b,"PNG",8,[]);j(b,"JPG",9,[]);j(b,"SVG",10,[]);j(b,"SVGI",11,[]);j(b,"CML",12,[]);j(b,"AML",13,[]);j(b,"PDF",14,[])});r("JSV.common");v(["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=p(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.iSpectrumMovedTo=-1;this.iSpectrumClicked=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.yHArrows=this.xHArrows=
this.xVArrows=this.xPixels0=this.xPixel10=this.yPixel000=this.yPixel11=this.xPixel11=this.yPixel00=this.xPixel00=this.yPixels=this.xPixels=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.isPrintingOrSaving=
!1;this.mapX=null;H("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);K(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});n(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 d=a!=this.iSpectrumSelected;this.iSpectrumSelected=a;d&&this.getCurrentView();return this.iSpectrumSelected},"~N");c(b,"closeDialogsExcept",function(a){if(null!=this.dialogs)for(var d,b=this.dialogs.entrySet().iterator();b.hasNext()&&((d=b.next())||1);){var c=d.getValue();JSV.common.GraphSet.isDialog(c)&&(a===JSV.common.Annotation.AType.NONE||c.getAType()!==a)&&c.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,d=this.dialogs.entrySet().iterator();d.hasNext()&&((a=d.next())||1);){var b=a.getValue();JSV.common.GraphSet.isDialog(b)&&b.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 d=this.spectra.size();0<=--d;)if(this.spectra.get(d)===a)return d;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 d=this.height-50;this.xPixel00=w(this.width*this.fX0);this.xPixel11=w(this.xPixel00+this.width*this.fracX-1);this.xHArrows=this.xPixel00+25;this.xVArrows=this.xPixel11-w(this.right/2);this.xPixel0=
this.xPixel00+w(this.left*(1-this.fX0));this.xPixel10=this.xPixel1=this.xPixel11-this.right;this.xPixels0=this.xPixels=this.xPixel1-this.xPixel0+1;this.yPixel000=(this.pd.isPrinting?100:!this.isPrintingOrSaving&&0==this.fY0?25:0)+w(this.height*this.fY0);this.yPixel00=this.yPixel000+w(d*this.fracY*a);this.yPixel11=this.yPixel00+w(d*this.fracY)-1;this.yHArrows=this.yPixel11-12;this.yPixel0=this.yPixel00+w(this.top/2);this.yPixel1=this.yPixel11-w(this.bottom/2);this.yPixels=this.yPixel1-this.yPixel0+
1;null!=this.imageView&&this.is2DSpectrum&&(this.setImageWindow(),this.pd.display1D?(this.xPixels=w(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,d){return a>=this.xPixel00&&a<=this.xPixel11&&d>=this.yPixel000&&d<=this.yPixel11*this.nSplit},"~N,~N");c(b,"isInPlotRegion",function(a,d){return a>=this.xPixel0&&
a<=this.xPixel1&&d>=this.yPixel0&&d<=this.yPixel1},"~N,~N");c(b,"getSplitPoint",function(a){return this.yPixel1==this.yPixel00?0:Math.max(0,Math.min(w((a-this.yPixel000)/(this.yPixel11-this.yPixel00)),this.nSplit-1))},"~N");c(b,"isSplitWidget",function(a,d){return this.isFrameBox(a,d,this.splitterX,this.splitterY)},"~N,~N");c(b,"isCloserWidget",function(a,d){return this.isFrameBox(a,d,this.closerX,this.closerY)},"~N,~N");c(b,"initGraphSet",function(a,d){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 b=F(this.nSpectra,0),c=F(this.nSpectra,0);this.bsSelected.setBits(0,this.nSpectra);this.allowStackedYScale=!0;0>=d&&(d=2147483647);this.isSplittable=1<this.nSpectra;this.showAllStacked=(this.allowStacking=this.spectra.get(0).isStackable())&&1<this.nSpectra;for(var f=0;f<this.nSpectra;f++){var g=this.spectra.get(f).getXYCoords().length-
1;b[f]=JSV.common.Coordinate.intoRange(a,0,g);c[f]=JSV.common.Coordinate.intoRange(d,0,g);this.allowStackedYScale=(new Boolean(this.allowStackedYScale&(this.spectra.get(f).getYUnits().equals(this.spectra.get(0).getYUnits())&&this.spectra.get(f).getUserYFactor()==this.spectra.get(0).getUserYFactor()))).valueOf()}this.getView(0,0,0,0,b,c,null,null);this.viewList=new JU.Lst;this.viewList.addLast(this.viewData)},"~N,~N");c(b,"getView",function(a,d,b,c,f,g,e,l){var m=0==this.graphsTemp.size()?this.spectra:
this.graphsTemp,x=this.getSpectrumAt(0).getSubSpectra(),n=null==x||2==x.size()&&x.get(1).isImaginary(),p=!this.getSpectrumAt(0).is1D();n&&b==c?m=this.spectra:b==c&&(this.viewData=new JSV.common.ViewData(x,b,c,this.getSpectrum().isContinuous()),m=null);null!=m&&(this.viewData=new JSV.common.ViewData(m,b,c,f,g,this.getSpectrumAt(0).isContinuous(),p),a!=d&&this.getScale().setXRange(a,d));null!=e&&(JSV.common.ScaleData.copyScaleFactors(e,this.viewData.getScaleData()),null!=l&&JSV.common.ScaleData.copyYScales(l,
this.viewData.getScaleData()),this.getCurrentView())},"~N,~N,~N,~N,~A,~A,~A,~A");c(b,"isNearby",function(a,d,b,c){var f=a.getXVal(),g=b.toPixelX(f);a=this.toPixelY(a.getYVal());f=d.getXVal();b=b.toPixelX(f);d=this.toPixelY(d.getYVal());return Math.abs(g-b)+Math.abs(a-d)<c},"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,d){return a==this.fixX(a)&&d>this.pin1Dx0.yPixel0-2&&d<this.pin1Dx0.yPixel1},"~N,~N");c(b,"isInTopBar2D",function(a,d){return null!=this.imageView&&a==this.imageView.fixX(a)&&d>this.pin2Dx0.yPixel0-2&&d<this.pin2Dx0.yPixel1},"~N,~N");c(b,"isInRightBar",function(a,
d){return d==this.fixY(d)&&a>this.pin1Dy0.xPixel1&&a<this.pin1Dy0.xPixel0+2},"~N,~N");c(b,"isInRightBar2D",function(a,d){return null!=this.imageView&&d==this.fixY(d)&&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");e(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");e(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});e(b,"getYPixels",function(){return this.yPixels});
c(b,"getScale",function(){return this.viewData.getScale()});c(b,"toPixelYint",function(a){return this.yPixel1-w(Double.isNaN(a)?-2147483648:this.yPixels*a)},"~N");c(b,"findAnnotation2D",function(a){for(var d=this.annotations.size();0<=--d;){var b=this.annotations.get(d);if(this.isNearby(b,a,this.imageView,10))return b}return null},"JSV.common.Coordinate");c(b,"addAnnotation",function(a,d){null==this.annotations&&(this.annotations=new JU.Lst);for(var b=!1,c=this.annotations.size();0<=--c;)if(a.is2D?
this.isNearby(this.annotations.get(c),a,this.imageView,10):a.equals(this.annotations.get(c)))b=!0,this.annotations.removeItemAt(c);0<a.text.length&&(!b||!d)&&this.annotations.addLast(a)},"JSV.common.Annotation,~B");c(b,"setImageWindow",function(){this.imageView.setPixelWidthHeight(w((this.pd.display1D?0.6:1)*this.xPixels0),this.yPixels);this.imageView.setXY0(this.getSpectrumAt(0),w(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,d,b,c){1.7976931348623157E308==a&&1.7976931348623157E308==d?(this.xPixelMovedTo=b,this.xPixelMovedTo2=c,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!=d&&(this.xPixelMovedTo2=this.toPixelX(d)))},"~N,~N,~N,~N");c(b,"processPendingMeasurement",function(a,d,b){if(!this.isInPlotRegion(a,d)||this.is2dClick(a,d))this.pendingMeasurement=null;else{var c=this.toX(a),f=this.toY(d),g=c;switch(b){case 0:this.pendingMeasurement.setPt2(this.toX(a),this.toY(d));
break;case 3:case 2:if(0>this.iSpectrumClicked)break;var e=this.spectra.get(this.iSpectrumClicked);this.setScale(this.iSpectrumClicked);3!=b&&(b=this.findMeasurement(this.selectedSpectrumMeasurements,a,d,1),null!=b?(c=b.getXVal(),f=b.getYVal()):null!=(b=this.findMeasurement(this.selectedSpectrumMeasurements,a,d,2))?(c=b.getXVal2(),f=b.getYVal2()):c=this.getNearestPeak(e,c,f));this.pendingMeasurement=(new JSV.common.Measurement).setM1(c,f,e);this.pendingMeasurement.setPt2(g,f);this.pd.setTaintedAll();
this.pd.repaint();break;case 1:case -2:case -3:for(g=null!=this.pendingMeasurement&&this.isVisible(this.getDialog(JSV.common.Annotation.AType.Measurements,-1));g;){this.setScale(this.getSpectrumIndex(this.pendingMeasurement.spec));if(3!=b){if(!this.findNearestMaxMin()){g=!1;break}a=this.xPixelMovedTo}c=this.toX(a);f=this.toY(d);this.pendingMeasurement.setPt2(c,f);if(0==this.pendingMeasurement.text.length){g=!1;break}this.setMeasurement(this.pendingMeasurement);if(1!=b){g=!1;break}this.setSpectrumClicked(this.getSpectrumIndex(this.pendingMeasurement.spec));
this.pendingMeasurement=(new JSV.common.Measurement).setM1(c,f,this.pendingMeasurement.spec);break}g||(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,d){if(null==this.selectedSpectrumIntegrals)return!1;var b=this.findMeasurement(this.selectedSpectrumIntegrals,a,d,-5);if(null==b)return!1;this.selectedIntegral=b;this.pd.normalizeIntegral();this.updateDialog(JSV.common.Annotation.AType.Integration,
-1);this.setSpectrumClicked(this.getSpectrumIndex(b.spec));return!0},"~N,~N");c(b,"getNearestPeak",function(a,d,b){var c=JSV.common.Coordinate.getNearestXWithYAbove(a.getXYCoords(),d,b,a.isInverted(),!1);a=JSV.common.Coordinate.getNearestXWithYAbove(a.getXYCoords(),d,b,a.isInverted(),!0);return Double.isNaN(c)?a:Double.isNaN(a)?c:Math.abs(c-d)<Math.abs(a-d)?c:a},"JSV.common.Spectrum,~N,~N");c(b,"findMeasurement",function(a,d,b,c){if(null==a||0==a.size())return null;if(0==c){var f=this.findMeasurement(a,
d,b,-1);return null!=f||C(a.get(0),"JSV.common.Integral")?f:this.findMeasurement(a,d,b,-2)}for(var g=a.size();0<=--g;){var f=a.get(g),e,l,m,x;C(f,"JSV.common.Integral")?(e=l=this.toPixelX(f.getXVal2()),m=this.toPixelYint(f.getYVal()),x=this.toPixelYint(f.getYVal2())):(e=this.toPixelX(f.getXVal()),l=this.toPixelX(f.getXVal2()),m=x=-2==c?this.yPixel1-2:this.toPixelY(f.getYVal()));switch(c){case 1:if(4>Math.abs(d-e)+Math.abs(b-m))return f;break;case 2:if(4>Math.abs(d-l)+Math.abs(b-x))return f;break;
case -5:m=x=w((m+x)/2),l=e+20;default:case -1:case -2:if(JSV.common.GraphSet.isOnLine(d,b,e,m,l,x))return f}}return null},"JSV.common.MeasurementData,~N,~N,~N");c(b,"setMeasurement",function(a){var d=this.getSpectrumIndex(a.spec),b=this.getDialog(JSV.common.Annotation.AType.Measurements,d);null==b&&this.addDialog(d,JSV.common.Annotation.AType.Measurements,b=new JSV.common.MeasurementData(JSV.common.Annotation.AType.Measurements,a.spec));b.getData().addLast(a.copyM());this.updateDialog(JSV.common.Annotation.AType.Measurements,
-1)},"JSV.common.Measurement");c(b,"checkArrowUpDownClick",function(a,d){var b=!1,c=this.isArrowClick(a,d,3)?JSV.common.GraphSet.RT2:this.isArrowClick(a,d,4)?1/JSV.common.GraphSet.RT2:0;if(0!=c){1<this.nSplit&&this.setSpectrumSelected(this.iSpectrumMovedTo);if((1==this.nSpectra||0<=this.iSpectrumSelected)&&this.spectra.get(this.getFixedSelectedSpectrumIndex()).isTransmittance())c=1/c;this.viewData.scaleSpectrum(null==this.imageView?this.iSpectrumSelected:-2,c);b=!0}else this.isArrowClick(a,d,-1)&&
(this.resetViewCompletely(),b=!0);b&&(null!=this.imageView&&(this.update2dImage(!1),this.resetPinsFromView()),this.pd.setTaintedAll());return b},"~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,d){if(this.haveLeftRightArrows){var b=this.isArrowClick(a,d,1)?-1:this.isArrowClick(a,d,2)?1:
0;if(0!=b)return this.setSpectrumClicked((this.iSpectrumSelected+b)%this.nSpectra),!0;if(this.isArrowClick(a,d,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,d,b){switch(b){case 3:case 4:case -1:return b=w((this.yPixel00+this.yPixel11)/2)+15*(3==b?-1:4==b?1:0),10>Math.abs(this.xVArrows-
a)&&10>Math.abs(b-d);case 1:case 2:case 0:return b=this.xHArrows+15*(1==b?-1:2==b?1:0),10>Math.abs(b-a)&&10>Math.abs(this.yHArrows-d)}return!1},"~N,~N,~N");c(b,"setWidgetValueByUser",function(a){var d;d=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?""+w(Math.min(this.pin2Dy0.getYVal(),this.pin2Dy1.getYVal()))+" - "+w(Math.max(this.pin2Dy0.getYVal(),this.pin2Dy1.getYVal())):""+a.getValue();d=this.pd.getInput("New value?","Set Slider",d);if(null!=d){d=d.trim();try{if(a===this.pin1Dx01||a===this.pin1Dy01||a===this.pin2Dx01||a===this.pin2Dy01){var b=d.indexOf("-",1);
if(!(0>b)){var c=Double.$valueOf(d.substring(0,b)).doubleValue(),f=Double.$valueOf(d.substring(b+1)).doubleValue();a===this.pin1Dx01?this.doZoom(c,this.pin1Dy0.getYVal(),f,this.pin1Dy1.getYVal(),!0,!1,!1,!0,!0):a===this.pin1Dy01?this.doZoom(this.pin1Dx0.getXVal(),c,this.pin1Dx1.getXVal(),f,null==this.imageView,null==this.imageView,!1,!1,!0):a===this.pin2Dx01?(this.imageView.setView0(this.imageView.toPixelX0(c),this.pin2Dy0.yPixel0,this.imageView.toPixelX0(f),this.pin2Dy1.yPixel0),this.doZoom(c,this.pin1Dy0.getYVal(),
f,this.pin1Dy1.getYVal(),!1,!1,!1,!0,!0)):a===this.pin2Dy01&&(this.imageView.setView0(this.pin2Dx0.xPixel0,this.imageView.toPixelY0(c),this.pin2Dx1.xPixel0,this.imageView.toPixelY0(f)),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 g=Double.$valueOf(d).doubleValue();a.isXtype?(f=a===this.pin1Dx0||a===this.cur2Dx0||a===this.pin2Dx0?this.pin1Dx1.getXVal():
this.pin1Dx0.getXVal(),this.doZoom(g,0,f,0,!a.is2D,!1,!1,!0,!0)):a===this.cur2Dy?this.setCurrentSubSpectrum(w(g)):a===this.pin2Dy0||a===this.pin2Dy1?(f=a===this.pin2Dy0?this.pin2Dy1.yPixel0:this.pin2Dy0.yPixel0,this.imageView.setView0(this.pin2Dx0.xPixel0,this.imageView.subIndexToPixelY(w(g)),this.pin2Dx1.xPixel0,f)):(f=a===this.pin1Dy0?this.pin1Dy1.getYVal():this.pin1Dy0.getYVal(),this.doZoom(this.pin1Dx0.getXVal(),g,this.pin1Dx1.getXVal(),f,null==this.imageView,null==this.imageView,!1,!1,!0))}}catch(e){if(!y(e,
Exception))throw e;}}},"JSV.common.PlotWidget");c(b,"removeAllHighlights",function(a){if(null==a)this.highlights.clear();else for(var d=this.highlights.size();0<=--d;)this.highlights.get(d).spectrum===a&&this.highlights.removeItemAt(d)},"JSV.common.Spectrum");c(b,"setCoordClicked",function(a,d,b){0==b&&(this.nextClickForSetPeak=null);if(Double.isNaN(d))return this.pd.coordClicked=null,this.pd.coordsClicked=null;this.pd.coordClicked=(new JSV.common.Coordinate).set(this.lastClickX=d,b);this.pd.coordsClicked=
this.getSpectrum().getXYCoords();this.pd.xPixelClicked=this.lastPixelX=a;return this.pd.coordClicked},"~N,~N,~N");c(b,"setWidgets",function(a,d,b){if(a||null==this.pin1Dx0)null==this.zoomBox1D?this.newPins():this.resetPinPositions();this.setDerivedPins(d);this.setPinSliderPositions(b)},"~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=B(-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,d){a.setX(d,this.toPixelX0(d))},"JSV.common.PlotWidget,~N");c(b,"setWidgetY",function(a,d){a.setY(d,this.toPixelY0(d))},"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?w((this.xPixel1+this.imageView.xPixel0)/2):this.imageView.xPixel0-6,this.cur2Dy.xPixel1=this.imageView.xPixel1+5)},"~B");c(b,"setDerivedPins",function(a){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,w((this.pin1Dx0.xPixel0+this.pin1Dx1.xPixel0)/2));this.pin1Dy01.setY(0,w((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 d=this.pin1Dx0.getXVal();this.cur2Dx0.setX(d,this.imageView.toPixelX(d));d=this.pin1Dx1.getXVal();this.cur2Dx1.setX(d,this.imageView.toPixelX(d));d=this.imageView.toX(this.imageView.xPixel0);this.pin2Dx0.setX(d,this.imageView.toPixelX0(d));d=this.imageView.toX(this.imageView.xPixel1);this.pin2Dx1.setX(d,
this.imageView.toPixelX0(d));this.pin2Dx01.setX(0,w((this.pin2Dx0.xPixel0+this.pin2Dx1.xPixel0)/2));d=this.imageView.imageHeight-1-this.imageView.yView1;this.pin2Dy0.setY(d,this.imageView.toPixelY0(d));d=this.imageView.imageHeight-1-this.imageView.yView2;this.pin2Dy1.setY(d,this.imageView.toPixelY0(d));this.pin2Dy01.setY(0,w((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,d,b,c,f,g,e,l,m){a==b?(a=this.getScale().minXOnScale,b=this.getScale().maxXOnScale):this.isLinked&&l&&this.pd.doZoomLinked(this,a,b,m,e,f);a>b&&(l=a,a=b,b=l);d>c&&(l=d,d=c,c=l);l=!f&&null!=
this.imageView&&(this.imageView.minZ!=d||this.imageView.maxZ!=c);if(this.zoomEnabled||l){if(e){if(!this.getScale().isInRangeX(a)&&!this.getScale().isInRangeX(b))return;this.getScale().isInRangeX(a)?this.getScale().isInRangeX(b)||(b=this.getScale().maxX):a=this.getScale().minX}this.pd.setTaintedAll();e=this.viewData.getScaleData();var x=F(this.nSpectra,0),n=F(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,b,3,x,n))return}else if(!JSV.common.ScaleData.setDataPointIndices(this.spectra,a,b,3,x,n))return;if(p=d==c)f=!l&&f?f=this.getScale().spectrumScaleFactor:1,1E-4>Math.abs(f-1)&&(d=this.getScale().minYOnScale,c=this.getScale().maxYOnScale);f=null;if(p||g)this.getCurrentView(),f=this.viewData.getNewScales(this.iSpectrumSelected,p,d,c);this.getView(a,b,d,c,x,n,e,f);this.setXPixelMovedTo(1E10,
1.7976931348623157E308,0,0);this.setWidgetX(this.pin1Dx0,a);this.setWidgetX(this.pin1Dx1,b);this.setWidgetY(this.pin1Dy0,d);this.setWidgetY(this.pin1Dy1,c);null==this.imageView?this.updateDialogs():(a=this.getSpectrumAt(0).getSubIndex(),b=this.imageView.fixSubIndex(a),b!=a&&this.setCurrentSubSpectrum(b),l&&this.update2dImage(!1));m&&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 d=this.getSpectrumAt(0);a=d.setCurrentSubSpectrum(a);d.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,d,b,c,f,g,e){this.setPositionForFrame(c);this.g2d=this.pd.g2d;this.gMain=a;var l=this.getSpectrumAt(0),m=l.getSubIndex();this.is2DSpectrum=!l.is1D()&&(this.isLinked||this.pd.getBoolean(JSV.common.ScriptToken.DISPLAY2D))&&
(null!=this.imageView||this.get2DImage(l));null!=this.imageView&&g&&(this.isPrintingOrSaving&&this.g2d.newGrayScaleImage(a,this.image2D,this.imageView.imageWidth,this.imageView.imageHeight,this.imageView.getBuffer()),this.is2DSpectrum&&this.setPositionForFrame(c),this.draw2DImage());var x=this.stackSelected||!this.showAllStacked?this.iSpectrumSelected:-1,n=!this.showAllStacked||1==this.nSpectra||0<=x,l=null==this.imageView||this.pd.display1D,p=0<=x?1:0,j=this.getFixedSelectedSpectrumIndex();if(l&&
g&&(this.fillBox(a,this.xPixel0,this.yPixel0,this.xPixel1,this.yPixel1,JSV.common.ScriptToken.PLOTAREACOLOR),0>x)){n=!0;for(x=0;x<this.nSpectra;x++)this.doPlot(x,c)&&0!=p++&&(n=(new Boolean(n&this.viewData.areYScalesSame(x-1,x))).valueOf())}var q=1==this.nSpectra?0:!this.showAllStacked?this.iSpectrumMovedTo:this.iSpectrumSelected;b=b===a?d:b;if(g){var x=this.pd.getCurrentGraphSet()===this&&!this.isLinked&&(!this.isSplittable||1==this.nSplit||this.pd.currentSplitPoint==c),r=this.zoomEnabled&&!this.isPrintingOrSaving&&
!this.isDrawNoSpectra()&&this.pd.isCurrentGraphSet(this)&&this.spectra.get(0).isScalable()&&(x||1==this.nSpectra)&&(1==this.nSplit||this.pd.currentSplitPoint==this.iSpectrumMovedTo);this.drawFrame(a,q,x,this.isSplittable,r)}if(this.pd.isCurrentGraphSet(this)&&c==this.pd.currentSplitPoint&&(2>p||0<=this.iSpectrumSelected))this.$haveSelectedSpectrum=!0;this.haveSingleYScale=this.showAllStacked&&1<this.nSpectra?this.allowStackedYScale&&n:!0;if(l){n=I(this.yPixels*(this.yStackOffsetPercent/100));this.haveLeftRightArrows=
!1;for(p=x=0;x<this.nSpectra;x++)if(this.doPlot(x,c)){var q=this.spectra.get(x),r=q.isContinuous(),s=!this.pd.isPrinting&&0<=this.iSpectrumMovedTo&&(1<this.nSplit?x==this.iSpectrumMovedTo:this.isLinked||x==j),u=this.stackSelected&&0<=this.iSpectrumSelected&&this.iSpectrumSelected!=x,v=!this.reversePlot&&this.getShowAnnotation(JSV.common.Annotation.AType.Integration,x)&&(!this.showAllStacked||this.iSpectrumSelected==x)?this.getDialog(JSV.common.Annotation.AType.Integration,x).getData():null;this.setScale(x);
1<this.nSplit&&(j=x);var w=!u&&(1==this.nSplit||this.showAllStacked||this.iSpectrumSelected==c),y=w&&this.$haveSelectedSpectrum&&x==j;w&&(this.widgetsAreSet=!0,this.resetPinsFromView(),this.drawWidgets(d,b,m,f,l,y,!1));this.haveSingleYScale&&(x==j&&g)&&(this.drawGrid(a),this.pd.isPrinting&&(1==this.nSplit&&1==this.pd.graphSets.size())&&this.drawSpectrumSource(a,x));w&&this.drawWidgets(d,b,m,!1,l,y,!0);!this.isDrawNoSpectra()&&(!this.isPrintingOrSaving&&(1==this.nSpectra||0<=this.iSpectrumSelected)&&
(this.haveSingleYScale&&x==j||this.showAllStacked&&this.stackSelected&&x==this.iSpectrumSelected))&&this.drawHighlightsAndPeakTabs(d,b,x);g&&((s||this.isPrintingOrSaving)&&!this.is2DSpectrum&&this.pd.titleOn&&!this.pd.titleDrawn&&this.drawTitle(x,a),this.haveSingleYScale&&x==j&&this.pd.getBoolean(JSV.common.ScriptToken.YSCALEON)&&this.drawYScale(a,this),this.haveSingleYScale&&30>this.yPixel00&&this.pd.getBoolean(JSV.common.ScriptToken.YUNITSON)&&this.drawYUnits(a));w=!u&&null!=this.pendingIntegral&&
q===this.pendingIntegral.spec;if(g||w)this.drawPlot(w&&!g?d:a,x,q,r,p,u,null,s,w,e);this.drawIntegration(d,x,p,u,v,r&&s);this.drawMeasurements(d,x);null!=this.pendingMeasurement&&this.pendingMeasurement.spec===q&&this.drawMeasurement(d,this.pendingMeasurement);r&&(s&&0<=this.xPixelMovedTo)&&this.drawSpectrumPointer(d,q,p,v);1<this.nSpectra&&(1==this.nSplit&&this.pd.isCurrentGraphSet(this)&&g)&&(this.haveLeftRightArrows=!0,this.isPrintingOrSaving||(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)));p-=n}g&&(this.pd.getBoolean(JSV.common.ScriptToken.XSCALEON)&&this.drawXScale(a,this),this.pd.getBoolean(JSV.common.ScriptToken.XUNITSON)&&this.drawXUnits(a))}else g&&(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<=m&&this.draw2DUnits(a)),this.drawWidgets(d,b,m,f,l,!0,!1),this.drawWidgets(d,b,m,f,l,!0,!0),this.widgetsAreSet=!0;null!=this.annotations&&
this.drawAnnotations(d,this.annotations,null);this.isPrintingOrSaving=!1},"~O,~O,~O,~N,~B,~B,~B");c(b,"drawTitle",function(a,d){var b=this.getSpectrumAt(a).getPeakTitle();0<b.length&&(this.pd.drawTitle(d,this.isPrintingOrSaving?this.yPixel11+20:this.height,this.width,b),this.pd.titleDrawn=!this.isPrintingOrSaving)},"~N,~O");c(b,"drawSpectrumSource",function(a,d){this.pd.printFilePath(a,this.pd.thisWidth-this.pd.right,this.yPixel0-20,this.spectra.get(d).getFilePath())},"~O,~N");c(b,"doPlot",function(a,
d){var b=this.stackSelected&&0<=this.iSpectrumSelected&&this.iSpectrumSelected!=a,c=this.showAllStacked||-1==this.iSpectrumSelected||this.iSpectrumSelected==a;return 1<this.nSplit?a==d:c&&(!this.pd.isPrinting||!b)},"~N,~N");c(b,"drawSpectrumPointer",function(a,d,b,c){if(!this.isPrintingOrSaving){this.setColorFromToken(a,JSV.common.ScriptToken.PEAKTABCOLOR);var f=this.pd.integralShiftMode;null!=c&&((!this.pd.ctrlPressed||this.pd.isIntegralDrag)&&!this.isOnSpectrum(this.pd.mouseX,this.pd.mouseY,-1)?
c=null:0==f&&(f=this.getShiftMode(this.pd.mouseX,this.pd.mouseY),0==f&&(f=2147483647)));var g=this.yValueMovedTo;this.yValueMovedTo=null==c?d.getYValueAt(this.xValueMovedTo):c.getPercentYValueAt(this.xValueMovedTo);this.setCoordStr(this.xValueMovedTo,this.yValueMovedTo);if(0!=f&&(this.setPlotColor(a,2147483647==f?-1:0),(0>f||2147483647==f)&&this.drawHandle(a,this.xPixelPlot1,this.yPixelPlot0,3,!1),0<f&&this.drawHandle(a,this.xPixelPlot0,this.yPixelPlot1,3,!1),2147483647!=f))return;null!=c&&this.g2d.setStrokeBold(a,
!0);Double.isNaN(g)||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):(d=null==c?b+this.toPixelY(this.yValueMovedTo):this.toPixelYint(this.yValueMovedTo/100),d==this.fixY(d)&&this.g2d.drawLine(a,this.xPixelMovedTo,d-10,this.xPixelMovedTo,d+10));null!=c&&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 d=this.getSpectrumAt(0).nucleusX,b=this.getSpectrumAt(0).nucleusY;this.setColorFromToken(a,JSV.common.ScriptToken.PLOTCOLOR);this.drawUnits(a,d,this.imageView.xPixel1+5*this.pd.scalingFactor,this.yPixel1,1,1);this.drawUnits(a,b,this.imageView.xPixel0-5*this.pd.scalingFactor,this.yPixel0,1,0)},"~O");c(b,"drawPeakTabs",function(a,d,b){if(!this.isPrintingOrSaving){var c=
1==this.nSpectra||0<=this.iSpectrumSelected?b.getPeakList():null;if(null!=c&&0<c.size()){null!=this.piMouseOver&&this.piMouseOver.spectrum===b&&this.pd.isMouseUp()?(this.setColorFromToken(d,JSV.common.ScriptToken.PEAKOVERCOLOR),this.drawPeak(d,this.piMouseOver,0),b.setHighlightedPeak(this.piMouseOver)):b.setHighlightedPeak(null);this.setColorFromToken(a,JSV.common.ScriptToken.PEAKTABCOLOR);for(d=c.size();0<=--d;){var f=c.get(d);this.drawPeak(a,f,f===b.getSelectedPeak()?14:7)}}}},"~O,~O,JSV.common.Spectrum");
c(b,"drawPeak",function(a,d,b){if(!this.isPrintingOrSaving){var c=d.getXMin(),f=d.getXMax();c!=f&&this.drawBar(a,d,c,f,null,b)}},"~O,JSV.common.PeakInfo,~N");c(b,"drawWidgets",function(a,d,b,c,f,g,e){this.setWidgets(c,b,f);if(!this.isPrintingOrSaving||!(null==this.imageView?!this.cur1D2Locked:this.sticky2Dcursor)){!this.pd.isPrinting&&!e&&(f?(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),g&&this.fillBox(a,this.pin1Dy0.xPixel1,this.pin1Dy0.yPixel1,this.pin1Dy1.xPixel1+2,this.pin1Dy1.yPixel0,JSV.common.ScriptToken.PLOTCOLOR));for(b=0;b<this.widgets.length;b++)if(c=this.widgets[b],!(null==c||!c.isPinOrCursor&&!this.zoomEnabled)){var l=c===this.cur1D2x1||c===this.cur1D2x2||
c===this.cur2Dx0||c===this.cur2Dx1||c===this.cur2Dy;if((c.isPin||!c.isPinOrCursor)!=e){if(c.is2D){if(c===this.cur2Dx0&&!f)continue}else{var m=c===this.pin1Dy0||c===this.pin1Dy1||c===this.pin1Dy01;if(null!=this.imageView&&f==m||m&&!g||c===this.cur1D2x1&&null==this.gs2dLinkedX||c===this.cur1D2x2&&null==this.gs2dLinkedY||c===this.zoomBox1D&&(this.pd.isIntegralDrag||0!=this.pd.integralShiftMode))if(!this.isLinked||null!=this.imageView)continue}if(!this.pd.isPrinting||l)c.isPinOrCursor?(this.setColorFromToken(a,
c.color),this.g2d.drawLine(a,c.xPixel0,c.yPixel0,c.xPixel1,c.yPixel1),c.isVisible=!0,c.isPin&&this.drawHandle(a,c.xPixel0,c.yPixel0,2,!c.isEnabled)):c.xPixel1!=c.xPixel0&&this.fillBox(d,c.xPixel0,c.yPixel0,c.xPixel1,c.yPixel1,c===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,d,b,c,f,g){b=this.toPixelX(b);c=this.toPixelX(c);if(b>c){var e=b;b=c;c=e}b=this.fixX(b);c=this.fixX(c);3>c-
b&&(b-=2,c+=2);null!=d&&d.setPixelRange(b,c);0==g?this.fillBox(a,b,this.yPixel0,c,this.yPixel0+this.yPixels,f):(this.fillBox(a,b,this.yPixel0+2,c,this.yPixel0+5,f),null!=d&&(b=w((b+c)/2),this.fillBox(a,b-1,this.yPixel0+2,b+1,this.yPixel0+2+g,f)))},"~O,JSV.common.PeakInfo,~N,~N,JSV.common.ScriptToken,~N");c(b,"drawIntegration",function(a,d,b,c,f){null!=f&&(this.haveIntegralDisplayed(d)&&this.drawPlot(a,d,this.spectra.get(d),!0,b,!1,f,!0,!1,!1),this.drawIntegralValues(a,d,b));d=this.getIntegrationRatios(d);
null!=d&&this.drawAnnotations(a,d,JSV.common.ScriptToken.INTEGRALPLOTCOLOR)},"~O,~N,~N,~B,JSV.common.IntegralData,~B");c(b,"getMeasurements",function(a,d){var b=this.getDialog(a,d);return null==b||0==b.getData().size()||!b.getState()?null:b.getData()},"JSV.common.Annotation.AType,~N");c(b,"drawPlot",function(a,d,b,c,f,g,e,l,m,x){var n=null==e?b.getXYCoords():this.getIntegrationGraph(d).getXYCoords(),p=null!=e;e=p?e.getBitSet():null;l=m||null!=b.fillColor&&l;g=g?-2:p?-1:!this.allowStacking?0:d;this.setPlotColor(a,
g);var q=!0,j=this.toPixelY(0);p?l=(new Boolean(l&j==this.fixY(j))).valueOf():j=this.fixY(j);var r=p||l?this.pd.getColor(JSV.common.ScriptToken.INTEGRALPLOTCOLOR):null;b=null==r||null==b.fillColor?r:b.fillColor;r=this.viewData.getStartingPointIndex(d);d=this.viewData.getEndingPointIndex(d);if(c&&!x){d--;(x=(p||null!=this.pendingIntegral)&&this.g2d.canDoLineTo())&&this.g2d.doStroke(a,!0);var s=!1;for(c=r;c<=d;c++){var u=n[c],w=n[c+1],v=p?this.toPixelYint(u.getYVal()):this.toPixelY(u.getYVal());if(-2147483648!=
v){var y=p?this.toPixelYint(w.getYVal()):this.toPixelY(w.getYVal());if(-2147483648!=y){var u=u.getXVal(),z=w.getXVal(),w=this.toPixelX(u),A=this.toPixelX(z),v=this.fixY(f+v),y=this.fixY(f+y);p&&(c==r&&(this.xPixelPlot1=w,this.yPixelPlot0=v),this.xPixelPlot0=A,this.yPixelPlot1=y);if(!(A==w&&v==y))if(l&&m&&this.pendingIntegral.overlaps(u,z))null!=b&&(this.g2d.doStroke(a,!1),this.g2d.setGraphicsColor(a,b)),this.g2d.fillRect(a,Math.min(w,A),Math.min(j,v),Math.max(1,Math.abs(A-w)),Math.abs(j-v)),null!=
b&&(this.g2d.doStroke(a,!1),this.g2d.doStroke(a,!0),s=!1,this.setPlotColor(a,g));else if(!(v==y&&v==this.yPixel0)&&(null!=e&&e.get(c)!=q&&(q=e.get(c),x&&s&&(this.g2d.doStroke(a,!1),this.g2d.doStroke(a,!0),s=!1),!this.pd.isPrinting&&0!=this.pd.integralShiftMode?this.setPlotColor(a,0):q?this.setColorFromToken(a,JSV.common.ScriptToken.INTEGRALPLOTCOLOR):this.setPlotColor(a,-3)),!this.pd.isPrinting||q))s?this.g2d.lineTo(a,A,y):(this.g2d.drawLine(a,w,v,A,y),s=x)}}}x&&this.g2d.doStroke(a,!1)}else{for(c=
r;c<=d;c++)m=n[c],y=this.toPixelY(m.getYVal()),-2147483648!=y&&(w=this.toPixelX(m.getXVal()),v=this.toPixelY(Math.max(this.getScale().minYOnScale,0)),v=this.fixY(f+v),y=this.fixY(f+y),v==y&&(v==this.yPixel0||v==this.yPixel1)||(x?this.g2d.fillRect(a,w-1,y-1,3,3):this.g2d.drawLine(a,w,v,w,y)));!x&&this.getScale().isYZeroOnScale()&&(f+=this.toPixelY(this.getScale().spectrumYRef),f==this.fixY(f)&&this.g2d.drawLine(a,this.xPixel1,f,this.xPixel0,f))}},"~O,~N,JSV.common.Spectrum,~B,~N,~B,JSV.common.IntegralData,~B,~B,~B");
c(b,"drawFrame",function(a,d,b,c,f){if(!this.pd.gridOn||this.isPrintingOrSaving)if(this.setColorFromToken(a,JSV.common.ScriptToken.GRIDCOLOR),this.g2d.drawRect(a,this.xPixel0,this.yPixel0,this.xPixels,this.yPixels),this.isPrintingOrSaving)return;this.setCurrentBoxColor(a);f&&(0<=d&&(this.setPlotColor(a,d),this.fillArrow(a,3,this.xVArrows,w((this.yPixel00+this.yPixel11)/2)-9,!0),this.fillArrow(a,4,this.xVArrows,w((this.yPixel00+this.yPixel11)/2)+9,!0),this.setCurrentBoxColor(a)),this.fillArrow(a,3,
this.xVArrows,w((this.yPixel00+this.yPixel11)/2)-9,!1),this.fillCircle(a,this.xVArrows,w((this.yPixel00+this.yPixel11)/2),!1),this.fillArrow(a,4,this.xVArrows,w((this.yPixel00+this.yPixel11)/2)+9,!1));if(null==this.imageView&&b){d=this.xPixel00+10;b=this.xPixel11-10;f=this.yPixel00+1;var g=this.yPixel11-2;this.g2d.drawLine(a,d,f,b,f);this.g2d.drawLine(a,b,f,b,g);this.g2d.drawLine(a,d,g,b,g);this.splitterX=this.closerX=-2147483648;this.drawBox(a,b-10,f,b,f+10,null);this.g2d.drawLine(a,b-10,f+10,b,
f);this.g2d.drawLine(a,b,f+10,b-10,f);this.closerX=b-10;this.closerY=f;c&&(b-=10,this.fillBox(a,b-10,f,b,f+10,null),this.splitterX=b-10,this.splitterY=f)}},"~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 d;if(Double.isNaN(this.getScale().firstX)){d=this.getScale().maxXOnScale+this.getScale().steps[0]/2;for(var b=this.getScale().minXOnScale;b<d;b+=this.getScale().steps[0]){var c=this.toPixelX(b);this.g2d.drawLine(a,
c,this.yPixel0,c,this.yPixel1)}}else{d=1.0001*this.getScale().maxXOnScale;for(b=this.getScale().firstX;b<=d;b+=this.getScale().steps[0])c=this.toPixelX(b),this.g2d.drawLine(a,c,this.yPixel0,c,this.yPixel1)}for(b=this.getScale().firstY;b<this.getScale().maxYOnScale+this.getScale().steps[1]/2;b+=this.getScale().steps[1])d=this.toPixelY(b),d==this.fixY(d)&&this.g2d.drawLine(a,this.xPixel0,d,this.xPixel1,d)}},"~O");c(b,"drawXScale",function(a,d){this.setColorFromToken(a,JSV.common.ScriptToken.SCALECOLOR);
this.pd.isPrinting&&this.g2d.drawLine(a,d.getXPixel0(),this.yPixel1,d.getXPixel0()+d.getXPixels()-1,this.yPixel1);for(var b=this.getScale().precision[0],c=this.pd.setFont(a,d.getXPixels(),0,this.pd.isPrinting?10:12,!1),f=this.yPixel1,g=this.yPixel1+4*this.pd.scalingFactor,e=this.yPixel1+2*this.pd.scalingFactor,c=c.getHeight(),l=d.toPixelX(this.getScale().steps[0])-d.toPixelX(0),m=Math.abs(0.95*l),x=this.getScale().firstX-this.getScale().steps[0],p=1.0001*(this.getScale().maxXOnScale+this.getScale().steps[0]),
n=0;2>n;n++){1==n&&JSV.common.ScaleData.fixScale(this.mapX);for(var q=1E10,j=x;j<=p;j+=this.getScale().steps[0]){var l=d.toPixelX(j),r=Double.$valueOf(j),s;switch(n){case 0:s=JU.DF.formatDecimalDbl(j,b);this.mapX.put(r,s);this.drawTick(a,l,f,g,d);l=Math.abs(q-j);q=this.getScale().minorTickCounts[0];if(0!=q){l/=q;for(s=1;s<q;s++)this.drawTick(a,d.toPixelX(j-s*l),f,e,d)}q=j;continue;case 1:s=this.mapX.get(r);if(null==s||l!=d.fixX(l))continue;var r=this.pd.getStringWidth(s),u=l+w(r/2)==d.fixX(l+w(r/
2))?2:0;0<u&&this.g2d.drawString(a,s,l-w(r/u),g+c);j+=Math.floor(r/m)*this.getScale().steps[0]}}}this.mapX.clear()},"~O,JSV.common.XYScaleConverter");c(b,"drawTick",function(a,d,b,c,f){d==f.fixX(d)&&this.g2d.drawLine(a,d,b,d,c)},"~O,~N,~N,~N,JSV.common.XYScaleConverter");c(b,"drawYScale",function(a,d){var b=d.getScale(),c=b.precision[1],f=this.pd.setFont(a,d.getXPixels(),0,this.pd.isPrinting?10:12,!1).getHeight(),g=b.maxYOnScale+b.steps[1]/2,e=-2147483648;this.setColorFromToken(a,JSV.common.ScriptToken.SCALECOLOR);
for(var l=0;2>l;l++){1==l&&JSV.common.ScaleData.fixScale(this.mapX);for(var m=b.firstY;m<g;m+=b.steps[1]){var x=Double.$valueOf(m),n=d.getXPixel0(),p=d.toPixelY(m);if(p==d.fixY(p)){var j;0==l&&this.g2d.drawLine(a,n,p,n-3*this.pd.scalingFactor,p);if(!(Math.abs(p-e)<=f))switch(e=p,l){case 0:j=JU.DF.formatDecimalDbl(m,c);this.mapX.put(x,j);break;case 1:j=this.mapX.get(x);if(null==j)continue;j.startsWith("0")&&j.contains("E")&&(j="0");this.g2d.drawString(a,j,n-4*this.pd.scalingFactor-this.pd.getStringWidth(j),
p+w(f/3))}}}}this.mapX.clear()},"~O,JSV.common.XYScaleConverter");c(b,"drawXUnits",function(a){var d=this.spectra.get(0).getAxisLabel(!0);null!=d&&this.drawUnits(a,d,this.xPixel1+25*this.pd.scalingFactor,this.yPixel1+5*this.pd.scalingFactor,1,1)},"~O");c(b,"drawUnits",function(a,d,b,c,f,g){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,d,w(b-this.pd.getStringWidth(d)*f),w(c+this.pd.getFontHeight()*
g))},"~O,~S,~N,~N,~N,~N");c(b,"drawYUnits",function(a){var d=this.spectra.get(0).getAxisLabel(!1);""===d&&(d="ARBITRARY UNITS");null!=d&&!this.pd.unitsDrawn&&this.drawUnits(a,d,(this.pd.isPrinting?30:5)*this.pd.scalingFactor,this.yPixel0+(this.pd.isPrinting?0:5)*this.pd.scalingFactor,0,-1);this.pd.unitsDrawn=!0},"~O");c(b,"drawHighlightsAndPeakTabs",function(a,d,b){var c=this.getMeasurements(JSV.common.Annotation.AType.PeakList,b),f=this.spectra.get(b);if(this.isPrintingOrSaving)null!=c&&(this.setColorFromToken(a,
JSV.common.ScriptToken.PEAKTABCOLOR),this.printPeakList(a,f,c));else{if(null==c){for(var g=0;g<this.highlights.size();g++){var e=this.highlights.get(g);e.spectrum===f&&(this.pd.setHighlightColor(e.color),this.drawBar(d,null,e.x1,e.x2,JSV.common.ScriptToken.HIGHLIGHTCOLOR,0))}this.pd.peakTabsOn&&this.drawPeakTabs(a,d,f)}if(null!=c){d=f.isInverted()?this.yPixel1-10*this.pd.scalingFactor:this.yPixel0;this.setColorFromToken(a,JSV.common.ScriptToken.PEAKTABCOLOR);for(g=c.size();0<=--g;)f=c.get(g),f=this.toPixelX(f.getXVal()),
this.g2d.drawLine(a,f,d,f,d+10*this.pd.scalingFactor);this.isVisible(this.getDialog(JSV.common.Annotation.AType.PeakList,b))&&(d=this.toPixelY(c.getThresh()),d==this.fixY(d)&&!this.pd.isPrinting&&this.g2d.drawLine(a,this.xPixel0,d,this.xPixel1,d))}}},"~O,~O,~N");c(b,"printPeakList",function(a,d,b){var c=b.getMeasurementListArray(null);if(0!=c.length){this.pd.setFont(a,this.xPixels,0,8,!1);for(var f=this.pd.getFontHeight(),g=F(b.size(),0),e=F(b.size(),0),l=0,m=5*this.pd.scalingFactor,x=10*this.pd.scalingFactor,
p=15*this.pd.scalingFactor,n=25*this.pd.scalingFactor,j=0;j<c.length;j++)e[j]=this.toPixelX(Double.parseDouble(c[j][1])),0==j?g[j]=e[j]:(g[j]=Math.max(g[j-1]+f,e[j]+f),l+=g[j]-e[j]);l/=2*c.length;g[0]-l<this.xPixel0+n&&(l=g[0]-(this.xPixel0+n));for(j=0;j<c.length;j++)g[j]-=l;j=d.isInverted();d=this.pd.getStringWidth("99.9999");for(var l=6<=c[0].length?this.pd.getStringWidth("99.99"):0,n=j?-1:1,q=(j?this.yPixel1:this.yPixel0)+n*(l+d+p),j=0;j<c.length;j++)this.g2d.drawLine(a,g[j],q,g[j],q+m*n),this.g2d.drawLine(a,
g[j],q+m*n,e[j],q+x*n),this.g2d.drawLine(a,e[j],q+x*n,e[j],q+p*n),0<l&&0<c[j][4].length&&this.g2d.drawLine(a,w((g[j]+g[j-1])/2),q-d+m,w((g[j]+g[j-1])/2),q-d-m);q-=2*n*this.pd.scalingFactor;0<l&&(this.drawStringRotated(a,-90,g[0]-p,q,"  ppm"),this.drawStringRotated(a,-90,g[0]-p,q-d-m," Hz"));for(j=b.size();0<=--j;)this.drawStringRotated(a,-90*n,g[j]+w(n*f/3),q,c[j][1]),0<l&&0<c[j][4].length&&(b=w((g[j]+g[j-1])/2)+w(f/3),this.drawStringRotated(a,-90,b,q-d-m,c[j][4]))}},"~O,JSV.common.Spectrum,JSV.common.PeakData");
c(b,"drawStringRotated",function(a,d,b,c,f){this.g2d.drawStringRotated(a,f,b,c,d)},"~O,~N,~N,~N,~S");c(b,"drawAnnotations",function(a,d,b){this.pd.setFont(a,this.xPixels,1,18,!1);for(var c=d.size();0<=--c;){var f=d.get(c);this.setAnnotationColor(a,f,b);var g=(f.is2D?this.imageView:this).toPixelX(f.getXVal()),e=f.isPixels()?w(this.yPixel0+10+10*this.pd.scalingFactor-f.getYVal()):f.is2D?this.imageView.subIndexToPixelY(w(f.getYVal())):this.toPixelY(f.getYVal());this.g2d.drawString(a,f.text,g+f.offsetX*
this.pd.scalingFactor,e-f.offsetY*this.pd.scalingFactor)}},"~O,JU.Lst,JSV.common.ScriptToken");c(b,"drawIntegralValues",function(a,d,b){var c=this.getMeasurements(JSV.common.Annotation.AType.Integration,d);if(null!=c){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 f=this.pd.getFontHeight();this.g2d.setStrokeBold(a,!0);for(var g=c.size();0<=--g;){var e=c.get(g);if(0!=e.getValue()){var l=
this.toPixelX(e.getXVal2()),m=b*this.pd.scalingFactor+this.toPixelYint(e.getYVal()),j=b*this.pd.scalingFactor+this.toPixelYint(e.getYVal2());l!=this.fixX(l)||(m!=this.fixY(m)||j!=this.fixY(j))||(this.pd.isPrinting||this.g2d.drawLine(a,l,m,l,j),this.g2d.drawString(a,"  "+e.text,l,w((m+j)/2)+w(f/3)))}}this.g2d.setStrokeBold(a,!1)}d==this.getFixedSelectedSpectrumIndex()&&(this.selectedSpectrumIntegrals=c)},"~O,~N,~N");c(b,"drawMeasurements",function(a,d){var b=this.getMeasurements(JSV.common.Annotation.AType.Measurements,
d);if(null!=b)for(var c=b.size();0<=--c;)this.drawMeasurement(a,b.get(c));d==this.getFixedSelectedSpectrumIndex()&&(this.selectedSpectrumMeasurements=b)},"~O,~N");c(b,"drawMeasurement",function(a,d){if(!(0==d.text.length&&d!==this.pendingMeasurement)){this.pd.setFont(a,this.xPixels,1,12,!1);this.g2d.setGraphicsColor(a,d===this.pendingMeasurement?this.pd.getColor(JSV.common.ScriptToken.PEAKTABCOLOR):this.pd.BLACK);var b=this.toPixelX(d.getXVal()),c=this.toPixelY(d.getYVal()),f=this.toPixelX(d.getXVal2());
if(!Double.isNaN(d.getXVal())&&!(b!=this.fixX(b)||f!=this.fixX(f))){var g=2<=Math.abs(b-f),e=this.getScale().isYZeroOnScale()&&d.spec.isHNMR(),l=w((b+f)/2);this.g2d.setStrokeBold(a,!0);g&&this.g2d.drawLine(a,b,c,f,c);e&&this.g2d.drawLine(a,b+1,this.yPixel1-1,f,this.yPixel1-1);this.g2d.setStrokeBold(a,!1);g&&this.g2d.drawString(a,d.text,l+d.offsetX,c-d.offsetY);e&&(this.g2d.drawLine(a,b,this.yPixel1,b,this.yPixel1-6*this.pd.scalingFactor),this.g2d.drawLine(a,f,this.yPixel1,f,this.yPixel1-6*this.pd.scalingFactor))}}},
"~O,JSV.common.Measurement");c(b,"getPinSelected",function(a,d){if(null!=this.widgets)for(var b=0;b<this.widgets.length;b++)if(null!=this.widgets[b]&&this.widgets[b].isPinOrCursor&&this.widgets[b].selected(a,d))return this.widgets[b];return null},"~N,~N");c(b,"set2DCrossHairs",function(a,d){var b;if(a==this.imageView.fixX(a)&&d==this.fixY(d)&&(this.pin1Dx1.setX(b=this.imageView.toX(a),this.toPixelX(b)),this.cur2Dx1.setX(b,a),this.setCurrentSubSpectrum(this.imageView.toSubspectrumIndex(d)),this.isLinked)){var c=
this.imageView.toY(d);this.pd.set2DCrossHairsLinked(this,b,c,!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 d=this.pd.getInput("New text?",
"Set Label",a.text);if(null==d)return!1;0==d.length?this.annotations.removeObj(a):a.text=d;return!0},"JSV.common.Annotation");c(b,"checkIntegral",function(a,d,b){var c=this.getDialog(JSV.common.Annotation.AType.Integration,-1);if(null==c)return!1;a=c.getData().addIntegralRegion(a,d);b&&JSV.common.GraphSet.isDialog(c)&&c.update(null,0,0);if(Double.isNaN(d))return!1;this.pendingIntegral=b?null:a;this.pd.isIntegralDrag=!b;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),k=this.getScale().precision[0],f=this.getScale().precision[1];if(null!=c)this.setStartupPinTip()||(c===this.pin1Dx01||c===this.pin2Dx01?k=
JU.DF.formatDecimalDbl(Math.min(this.pin1Dx0.getXVal(),this.pin1Dx1.getXVal()),k)+" - "+JU.DF.formatDecimalDbl(Math.max(this.pin1Dx0.getXVal(),this.pin1Dx1.getXVal()),k):c===this.pin1Dy01?k=JU.DF.formatDecimalDbl(Math.min(this.pin1Dy0.getYVal(),this.pin1Dy1.getYVal()),f)+" - "+JU.DF.formatDecimalDbl(Math.max(this.pin1Dy0.getYVal(),this.pin1Dy1.getYVal()),f):c===this.cur2Dy?(c=this.imageView.toSubspectrumIndex(c.yPixel0),k=this.get2DYLabel(c,k)):k=c===this.pin2Dy01?""+w(Math.min(this.pin2Dy0.getYVal(),
this.pin2Dy1.getYVal()))+" - "+w(Math.max(this.pin2Dy0.getYVal(),this.pin2Dy1.getYVal())):c.isXtype?JU.DF.formatDecimalDbl(c.getXVal(),k):c.is2D?""+w(c.getYVal()):JU.DF.formatDecimalDbl(c.getYVal(),f),this.pd.setToolTipText(k));else{if(null!=this.imageView){if(this.imageView.fixX(a)==a&&this.fixY(b)==b){c=this.imageView.toSubspectrumIndex(b);k="y="+this.get2DYLabel(c,k)+" / x="+JU.DF.formatDecimalDbl(this.imageView.toX(a),k)+" "+this.getSpectrum().getAxisLabel(!0);this.pd.setToolTipText(k);this.pd.coordStr=
k;return}if(!this.pd.display1D){this.pd.setToolTipText("");this.pd.coordStr="";return}}var c=this.toX(this.fixX(a)),k=null!=this.imageView&&this.imageView.isXWithinRange(a)?this.imageView.toSubspectrumIndex(this.fixY(b)):this.toY(this.fixY(b)),f=this.setCoordStr(c,k),g=this.getFixedSelectedSpectrumIndex();this.isInPlotRegion(a,b)?1!=this.nSpectra&&this.haveIntegralDisplayed(g)&&(k=this.getIntegrationGraph(g).getPercentYValueAt(c),f+=", "+JU.DF.formatDecimalDbl(k,1)):k=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(k)?null:f)}}},"~N,~N");c(b,"isFrameBox",function(a,b,c,k){return 5>Math.abs(a-(c+5))&&5>Math.abs(b-(k+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 k=null,f=!0,g=0>c;if(g){k=this.getDialog(JSV.common.Annotation.AType.Integration,-1);if(null==k)return!1;k=k.getData().getXYCoords();c=this.getFixedSelectedSpectrumIndex()}else{this.setScale(c);var e=this.spectra.get(c),k=e.xyCoords,f=e.isContinuous()}var e=c*I(this.yPixels*(this.yStackOffsetPercent/100)),l=this.viewData.getStartingPointIndex(c);c=this.viewData.getEndingPointIndex(c);
if(f)for(f=l;f<c;f++){var m=k[f],j=k[f+1],l=this.toPixelX(m.getXVal()),n=this.toPixelX(j.getXVal()),m=g?this.toPixelYint(m.getYVal()):this.toPixelY(m.getYVal()),j=g?this.toPixelYint(j.getYVal()):this.toPixelY(j.getYVal());if(!(-2147483648==m||-2147483648==j))if(m=this.fixY(m)-e,j=this.fixY(j)-e,JSV.common.GraphSet.isOnLine(a,b,l,m,n,j))return!0}else for(f=l;f<=c;f++)if(g=k[f],j=this.toPixelY(g.getYVal()),-2147483648!=j&&(l=this.toPixelX(g.getXVal()),m=this.toPixelY(Math.max(this.getScale().minYOnScale,
0)),m=this.fixY(m),j=this.fixY(j),!(m==j&&(m==this.yPixel0||m==this.yPixel1))&&JSV.common.GraphSet.isOnLine(a,b,l,m,l,j)))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,k,f,g){var e=Math.abs(c-a);if(2>e&&2>Math.abs(k-b))return!0;var l=f-a;if(2>Math.abs(l)&&2>Math.abs(g-b))return!0;var m=k-g;if(2<Math.abs(m)&&k<b==g<b)return!1;var j=c-f;return 2<Math.abs(j)&&c<a==f<a?!1:JSV.common.GraphSet.distance(e,k-b)+JSV.common.GraphSet.distance(l,
b-g)<JSV.common.GraphSet.distance(j,m)+2},"~N,~N,~N,~N,~N,~N");b.setFractionalPositions=c(b,"setFractionalPositions",function(a,b,c){var k=b.size(),f=0,g=0;a.isLinked=c!==JSV.common.PanelData.LinkMode.NONE;if(c===JSV.common.PanelData.LinkMode.NONE){for(var e=0;e<k;e++)c=b.get(e),f+=(c.getSpectrumAt(0).is1D(),1)*c.nSplit;f=1/f;for(e=0;e<k;e++)c=b.get(e),c.isLinked=!1,a=c.getSpectrumAt(0).is1D()?f:1*f,c.fX0=0,c.fY0=g,c.fracX=1,c.fracY=a,g+=a*c.nSplit}else{var f=null,l=-1;if(2==k||3==k)for(e=0;e<k;e++)if(c=
b.get(e),!c.getSpectrum().is1D()){f=c;0<=l&&(e=-2);l=e;break}if(-2==l||-1==l&&2!=k)JSV.common.GraphSet.setFractionalPositions(a,b,JSV.common.PanelData.LinkMode.NONE);else for(e=0;e<k;e++)c=b.get(e),c.isLinked=!0,a=c.getSpectrumAt(0),a.is1D()?(null!=f&&(l=f.getSpectrumAt(0),JSV.common.Spectrum.areLinkableX(a,l)&&(c.gs2dLinkedX=f),JSV.common.Spectrum.areLinkableY(a,l)&&(c.gs2dLinkedY=f)),c.fX0=0,c.fY0=g,c.fracX=null==f?1:0.5,c.fracY=3==k||null==f?0.5:1,g+=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,k){null==c&&(c=this.getSpectrumAt(0));a=G(JSV.common.GraphSet.Highlight,this,null,a,b,c,null==k?this.pd.getColor(JSV.common.ScriptToken.HIGHLIGHTCOLOR):k);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 k=a.toString();if(null!=k){var f=JU.PT.getQuotedAttribute(k,"xMin"),k=JU.PT.getQuotedAttribute(k,"xMax");if(null==f||null==k)break;f=JU.PT.parseFloat(f);k=JU.PT.parseFloat(k);if(Float.isNaN(f)||Float.isNaN(k))break;this.pd.addHighlight(this,f,k,c,200,140,140,100);c.setSelectedPeak(a);!this.getScale().isInRangeX(f)&&!(this.getScale().isInRangeX(k)||f<this.getScale().minX&&
this.getScale().maxX<k)&&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-w((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-w((this.pin1Dy0.yPixel0+this.pin1Dy1.yPixel0)/2)+1;b=this.pin1Dy0.yPixel0+c;a=this.pin1Dy1.yPixel0+c;c=this.toY0(b);var k=this.toY0(a);if(Math.min(c,
k)==this.getScale().minY||Math.max(c,k)==this.getScale().maxY)return!0;this.pin1Dy0.setY(c,b);this.pin1Dy1.setY(k,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-w((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-w((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,k,f,e){for(var D=new JU.Lst,l=0;l<c.size();l++){var m=c.get(l),j=e===JSV.common.PanelData.LinkMode.NONE?JSV.common.GraphSet.findCompatibleGraphSet(D,
m):null;null==j&&D.addLast(j=new JSV.common.GraphSet(b.getPanelData()));j.addSpec(m)}JSV.common.GraphSet.setFractionalPositions(a,D,e);for(l=D.size();0<=--l;)D.get(l).initGraphSet(k,f),JU.Logger.info("JSVGraphSet "+(l+1)+" nSpectra = "+D.get(l).nSpectra);return D},"JSV.common.PanelData,JSV.api.JSVPanel,JU.Lst,~N,~N,JSV.common.PanelData.LinkMode");c(b,"drawGraphSet",function(a,b,c,k,f,e,D,l,m,j,n,p){this.zoomEnabled=this.pd.getBoolean(JSV.common.ScriptToken.ENABLEZOOM);this.isPrintingOrSaving=this.pd.isPrinting||
this.pd.creatingImage;this.height=(f-(this.pd.isPrinting?20:0))*this.pd.scalingFactor;this.width=k*this.pd.scalingFactor;this.left=e*this.pd.scalingFactor;this.right=D*this.pd.scalingFactor;this.top=l*this.pd.scalingFactor;this.bottom=m*this.pd.scalingFactor;this.$haveSelectedSpectrum=!1;this.selectedSpectrumMeasurements=this.selectedSpectrumIntegrals=null;if(!this.isPrintingOrSaving&&null!=this.widgets)for(k=0;k<this.widgets.length;k++)null!=this.widgets[k]&&(this.widgets[k].isVisible=!1);for(k=
0;k<this.nSplit;k++)this.drawAll(a,b,c,k,j||1<this.nSplit,n,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 k=a.size();0<=--k;)if(a.get(k).hasPoint(b,c))return a.get(k);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,k){this.selectedIntegral=this.selectedMeasurement=
null;var f=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 e=this.getPinSelected(a,b);if(null!=e)this.setWidgetValueByUser(e);else if(e=this.is2dClick(a,b),2==c&&(-1==this.iSpectrumClicked&&0<=this.iPreviousSpectrumClicked)&&this.setSpectrumClicked(this.iPreviousSpectrumClicked),
!e&&k)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)e?(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(e){if(null!=this.annotations&&(k=(new JSV.common.Coordinate).set(this.imageView.toX(a),
this.imageView.toSubspectrumIndex(b)),k=this.findAnnotation2D(k),null!=k&&this.setAnnotationText(k)))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!=f){this.nextClickForSetPeak=
f;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 k=this.toX(this.xPixel1)-this.toX(this.xPixel0),f=this.getSpectrum().isInverted()?this.yPixel1-this.pd.mouseY:this.pd.mouseY-this.yPixel0;
c.update(this.pd.coordClicked,k,f)}},"JSV.common.Annotation.AType,~N");c(b,"isVisible",function(a){return JSV.common.GraphSet.isDialog(a)&&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,k=this.pd.shiftPressed;this.doZoom(this.toX(this.zoomBox1D.xPixel0),
k?this.toY(this.zoomBox1D.yPixel0):0,this.toX(c),k?this.toY(this.zoomBox1D.yPixel1):0,!0,k,!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(2147483647==a)return this.iSpectrumMovedTo=-1,this.piMouseOver=null;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)}else this.iSpectrumMovedTo=this.iSpectrumSelected=0;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),k=c.getData().getXYCoords(),
k=k[0<this.pd.integralShiftMode?k.length-1:0].getYVal();c.getData().shiftY(this.pd.integralShiftMode,this.toPixelYint(k)+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)));return this.piMouseOver},"~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 k=this.highlights.get(c);k.x1==a&&k.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 k=!1,f=this.spectra.size();0<=--f;)if((null==a||this.getSpectrumAt(f).getFilePathForwardSlash().equals(a))&&this.getSpectrumAt(f).matchesPeakTypeModel(b,c))this.setSpectrumSelected(f),1<this.nSplit&&this.splitStack(!0),k=!0;1<this.nSpectra&&(!k&&0<=this.iSpectrumSelected&&!this.pd.isCurrentGraphSet(this))&&this.setSpectrumSelected(-2147483648);return k},"~S,~S,~S");c(b,"selectPeakByFileIndex",function(a,b,c){for(var k,f=this.spectra.size();0<=
--f;)if(null!=(k=this.getSpectrumAt(f).selectPeakByFileIndex(a,b,c)))return k;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)JSV.common.GraphSet.isDialog(c)?c.setVisible(!c.isVisible()):this.pd.showDialog(a);else{var k=b.booleanValue();k&&c.setState(k);(k||JSV.common.GraphSet.isDialog(c))&&this.pd.showDialog(a);!k&&JSV.common.GraphSet.isDialog(c)&&
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(),k=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==
k?this.integrate(c,a):k.setState(!0);break;case JSV.common.IntegralData.IntMode.OFF:null!=k&&k.setState(!1);break;case JSV.common.IntegralData.IntMode.TOGGLE:null==k?this.integrate(c,a):k.setState(!k.getState());break;case JSV.common.IntegralData.IntMode.AUTO:null==k&&(this.checkIntegralParams(a,"ON"),k=this.getDialog(JSV.common.Annotation.AType.Integration,-1));null!=k&&k.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==k&&(this.checkIntegralParams(a,"ON"),k=this.getDialog(JSV.common.Annotation.AType.Integration,-1));null!=k&&k.getData().addMarks(b.substring(4).trim());break;case JSV.common.IntegralData.IntMode.MIN:if(null!=k)try{var f=Double.parseDouble(JSV.common.ScriptToken.getTokens(b).get(1));k.getData().setMinimumIntegral(f)}catch(e){if(!y(e,Exception))throw e;}break;case JSV.common.IntegralData.IntMode.UPDATE:null!=k&&k.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,k){this.setZoomTo(0);0==a&&0==c&&0==b&&0==k?(this.newPins(),this.imageView=null,this.getScale(),this.getScale()):this.doZoom(a,b,c,k,!0,b!=k,!1,!0,!0)},"~N,~N,~N,~N");c(b,"shiftSpectrum",function(a,b,c){var k=this.getSpectrum();if(!k.isNMR()||!k.is1D())return!1;var f=null,f=0;if(1.7976931348623157E308==c)f=-k.addSpecShift(0);else switch(a){case 3:f=c;break;case 1:case 2:this.nextClickMode=a;if(Double.isNaN(b))return f=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(f)?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(k,b,this.toY(this.pd.mouseY)));if(Double.isNaN(c))try{var e=this.pd.getInput("New chemical shift (set blank to reset)",
"Set Reference",JU.DF.formatDecimalDbl(b,this.getScale().precision[0])).trim();c=0==e.length?b-k.addSpecShift(0):Double.parseDouble(e)}catch(D){if(y(D,Exception))return!1;throw D;}f=c-b}if(0==f)return!1;k.addSpecShift(f);if(null!=this.annotations)for(a=this.annotations.size();0<=--a;)this.annotations.get(a).spec===k&&this.annotations.get(a).addSpecShift(f);if(null!=this.dialogs){var l;for(a=this.dialogs.entrySet().iterator();a.hasNext()&&((l=a.next())||1);)l.getValue().getSpectrum()===k&&l.getValue().setSpecShift(f)}this.getScale().addSpecShift(f);
Double.isNaN(this.lastClickX)||(this.lastClickX+=f);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");e(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 k=this.getDialog(JSV.common.Annotation.AType.PeakList,-1);if(null==k){if(!c)return null;this.addDialog(a,JSV.common.Annotation.AType.PeakList,k=new JSV.common.PeakData(JSV.common.Annotation.AType.PeakList,this.getSpectrum()))}k.getData().setPeakList(b,
-2147483648,this.viewData.getScale());JSV.common.GraphSet.isDialog(k)&&k.setFields();return k.getData()},"~N,JSV.common.Parameters,~B");c(b,"setPeakListing",function(a){var b=this.getDialog(JSV.common.Annotation.AType.PeakList,-1),c=JSV.common.GraphSet.isDialog(b)?b:null;(null==a?null==c||!c.isVisible():a.booleanValue())?this.pd.showDialog(JSV.common.Annotation.AType.PeakList):JSV.common.GraphSet.isDialog(b)&&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 k=this.getDialog(JSV.common.Annotation.AType.Integration,-1);if(null==k){if(!c)return null;
k=this.addDialog(a,JSV.common.Annotation.AType.Integration,new JSV.common.IntegralData(this.getSpectrum(),b))}return k.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 k=new java.util.Hashtable;c.getInfo(k);return k},"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 k=new JU.Lst;c.put("spectra",k);for(var f=0;f<this.nSpectra;f++)if(!(0<=b&&f!=b)){var e=this.spectra.get(f),D=e.getInfo(a);if(0<=b&&null!=a&&(2==D.size()||a.equalsIgnoreCase("id")))return 2==D.size()&&D.remove("id"),D;JSV.common.Parameters.putInfo(a,D,"type",e.getDataType());JSV.common.Parameters.putInfo(a,D,"titleLabel",
e.getTitleLabel());JSV.common.Parameters.putInfo(a,D,"filePath",e.getFilePath().$replace("\\","/"));JSV.common.Parameters.putInfo(a,D,"PeakList",JSV.common.Parameters.isMatch(a,"PeakList")?this.getMeasurementInfo(JSV.common.Annotation.AType.PeakList,f):null);JSV.common.Parameters.putInfo(a,D,"Integration",JSV.common.Parameters.isMatch(a,"Integration")?this.getMeasurementInfo(JSV.common.Annotation.AType.Integration,f):null);if(0<=b)return D;k.addLast(D)}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 k;null!=this.gs2dLinkedX&&(k=this.toPixelX(a),k!=this.fixX(k)&&(k=-2147483648,a=1.7976931348623157E308),this.cur1D2x1.setX(a,k));null!=this.gs2dLinkedY&&(k=this.toPixelX(b),k!=this.fixX(k)&&(k=-2147483648,b=1.7976931348623157E308),this.cur1D2x2.setX(b,
k));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 k=b.getValue();this.isVisible(k)&&(null==a?k.setVisible(!0):k.setFocus(k.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 k=0,b=b.length;k<c;k++,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=w(255*Math.random()),b=w(255*Math.random()),c=w(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,k,f,e,D){return(new JSV.common.ColoredAnnotation).setCA(a,b,this.getSpectrum(),c,this.pd.BLACK,k,f,e,D)},"~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,k,f,e){this.setColorFromToken(a,e);this.g2d.fillRect(a,Math.min(b,k),Math.min(c,f),Math.abs(b-k),Math.abs(c-f))},"~O,~N,~N,~N,~N,JSV.common.ScriptToken");
c(b,"drawBox",function(a,b,c,k,f,e){this.setColorFromToken(a,e);this.g2d.drawRect(a,Math.min(b,k),Math.min(c,f),Math.abs(b-k)-1,Math.abs(c-f)-1)},"~O,~N,~N,~N,~N,JSV.common.ScriptToken");c(b,"drawHandle",function(a,b,c,k,f){f?this.g2d.drawRect(a,b-k,c-k,2*k,2*k):this.g2d.fillRect(a,b-k,c-k,2*k+1,2*k+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,k,f){var e=1;switch(b){case 1:case 3:e=-1}c=F(-1,[c-5,c-5,c+
5,c+5,c+8,c,c-8]);k=F(-1,[k+5*e,k-e,k-e,k+5*e,k+5*e,k+10*e,k+5*e]);switch(b){case 1:case 2:f?this.g2d.fillPolygon(a,k,c,7):this.g2d.drawPolygon(a,k,c,7);break;case 3:case 4:f?this.g2d.fillPolygon(a,c,k,7):this.g2d.drawPolygon(a,c,k,7)}},"~O,~N,~N,~N,~B");c(b,"fillCircle",function(a,b,c,k){k?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 k=0;k<this.nSpectra;k++){var f=this.spectra.get(k),e=b||!f.canShowSolutionColor()?-1:a.getColour(f,c);f.setFillColor(-1==e?null:this.pd.vwr.parameters.getColor1(e))}},"JSV.api.VisibleInterface,~B,~B");c(b,"setIRMode",function(a,b){for(var c=0;c<this.nSpectra;c++){var k=this.spectra.get(c);if(k.dataType.equals(b)){var f=JSV.common.Spectrum.taConvert(k,
a);f!==k&&this.pd.setSpecForIRMode(f)}}},"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.isDialog=c(b,"isDialog",function(a){return null!=a&&a.isDialog()},"JSV.api.AnnotationData");b.$GraphSet$Highlight$=function(){var a=p(function(){U(this,arguments);this.x2=this.x1=0;this.spectrum=this.color=null;q(this,arguments)},JSV.common.GraphSet,
"Highlight",null);n(a,function(a,b,c,f){this.x1=a;this.x2=b;this.color=f;this.spectrum=c},"~N,~N,JSV.common.Spectrum,javajs.api.GenericColor");e(a,"toString",function(){return"highlight "+this.x1+" "+this.x2+" "+this.spectrum});e(a,"equals",function(a){return!C(a,"JSV.common.GraphSet.Highlight")?!1:a.x1==this.x1&&a.x2==this.x2},"~O");e(a,"hashCode",function(){return w(1E3*this.x1+1E6*this.x2)})};b.RT2=Math.sqrt(2);b.veryLightGrey=null});r("JSV.common");v(["JSV.common.XYScaleConverter"],"JSV.common.ImageView",
["JSV.common.Coordinate","$.ScaleData"],function(){var b=p(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,k){this.xPixelZoom1=Math.min(a,c);this.yPixelZoom1=Math.min(b,k);this.xPixelZoom2=Math.max(a,c);this.yPixelZoom2=Math.max(b,k);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),k=this.toImageY(this.yPixelZoom2);this.xView1=Math.min(a,c);this.yView1=Math.min(b,k);
this.xView2=Math.max(a,c);this.yView2=Math.max(b,k);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+w(Math.floor((a-this.xPixel0)/(this.xPixels-1)*(this.xView2-this.xView1)))},"~N");c(b,"toImageY",function(a){return this.yView1+w(Math.floor((a-this.yPixel0)/(this.yPixels-1)*(this.yView2-this.yView1)))},"~N");c(b,"toImageX0",
function(a){return JSV.common.Coordinate.intoRange(w((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(w((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-w((a-this.minX)/(this.maxX-this.minX)*(this.xPixels-1))},"~N");c(b,"toPixelY0",function(a){return this.yPixel1-w(a/(this.imageHeight-1)*(this.yPixels-1))},"~N");c(b,"subIndexToPixelY",function(a){return this.yPixel0+w(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,k){a=this.toImageX0(a);b=this.toImageY0(b);c=this.toImageX0(c);k=this.toImageY0(k);this.xView1=Math.min(a,c);this.yView1=Math.min(b,k);this.xView2=Math.max(a,c);this.yView2=Math.max(b,k);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 k=a.getXYCoords(),
f=c.size();this.imageWidth=k.length;this.imageHeight=f;var e=255/(this.maxZ-this.minZ);if(!b&&null!=this.buf2d&&e==this.grayFactorLast)return this.buf2d;this.grayFactorLast=e;for(var D=this.imageWidth*this.imageHeight,l=null==this.buf2d||this.buf2d.length!=D?F(D,0):this.buf2d,m=0,j=0;j<f;j++){var n=c.get(j).xyCoords;if(n.length!=k.length)return null;for(var p=0;p<k.length;p++){var q=n[p].getYVal(),q=255-JSV.common.Coordinate.intoRange(w((q-this.minZ)*e),0,255);l[--D]=q;m+=q}}this.averageGray=1-m/
(this.imageWidth*this.imageHeight)/255;System.out.println("Average gray = "+this.averageGray);return this.buf2d=l},"JSV.common.Spectrum,~B");c(b,"adjustView",function(a,b){for(var c=0,k=!1;((k=0.05>this.averageGray)||0.3<this.averageGray)&&10>c++;)b.scaleSpectrum(-2,k?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)});e(b,"fixX",function(a){return a<this.xPixel0?this.xPixel0:a>this.xPixel1?this.xPixel1:a},"~N");e(b,"fixY",function(a){return JSV.common.Coordinate.intoRange(a,this.yPixel0,
this.yPixel1)},"~N");e(b,"getScale",function(){return this.scaleData});e(b,"toX",function(a){return this.maxX+(this.minX-this.maxX)*this.toImageX(this.fixX(a))/(this.imageWidth-1)},"~N");e(b,"toY",function(a){a=this.toSubspectrumIndex(a);return this.maxY+(this.minY-this.maxY)*a/(this.imageHeight-1)},"~N");e(b,"toPixelX",function(a){var b=this.toX(this.xPixel0),c=this.toX(this.xPixel1);return this.xPixel0+w((a-b)/(c-b)*(this.xPixels-1))},"~N");e(b,"toPixelY",function(a){return w(this.yPixel0+(a-this.scaleData.minYOnScale)/
(this.scaleData.maxYOnScale-this.scaleData.minYOnScale)*this.yPixels)},"~N");e(b,"getXPixels",function(){return this.xPixels});e(b,"getYPixels",function(){return this.yPixels});e(b,"getXPixel0",function(){return this.xPixel0})});r("JSV.common");v(["JSV.common.Measurement"],"JSV.common.Integral",null,function(){var b=s(JSV.common,"Integral",JSV.common.Measurement);c(b,"setInt",function(a,b,c,k,f,e){this.setA(a,b,c,"",!1,!1,0,6);this.setPt2(f,e);this.setValue(k);return this},"~N,~N,JSV.common.Spectrum,~N,~N,~N")});
r("JSV.common");u=s(JSV.common,"IntegralComparator",null,java.util.Comparator);e(u,"compare",function(b,a){return b.getXVal()<a.getXVal()?-1:b.getXVal()>a.getXVal()?1:0},"JSV.common.Measurement,JSV.common.Measurement");r("JSV.common");v(["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=p(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);n(b,function(a,b,c,f){A(this,JSV.common.IntegralData,[JSV.common.Annotation.AType.Integration,f]);this.percentMinY=a;this.percentOffset=b;this.percentRange=c;this.calculateIntegral()},"~N,~N,~N,JSV.common.Spectrum");n(b,function(a,b){A(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 f=
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 e=0;e<this.xyCoords.length;e++){var D=this.xyCoords[e].getYVal(),D=(D-this.offset)/this.intRange;this.xyCoords[e].setYVal(D*a+b)}1!=this.normalizationFactor&&(this.normalizationFactor*=f/c);if(this.haveRegions)for(e=this.size();0<=--e;)c=this.get(e),f=this.getYValueAt(c.getXVal()),D=this.getYValueAt(c.getXVal2()),c.setYVal(f),
c.setYVal2(D),c.setValue(100*Math.abs(D-f)*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),f=this.getYValueAt(b);this.haveRegions=!0;c=(new JSV.common.Integral).setInt(a,
c,this.spec,100*Math.abs(f-c)*this.normalizationFactor,b,f);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");e(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),f=0,e=c.indexOf("^");if(!(0>e)){var D=c.indexOf(":");D>e&&(f=Double.$valueOf(c.substring(D+1).trim()).doubleValue(),c=c.substring(0,D).trim());var l=Double.$valueOf(c.substring(0,e).trim()).doubleValue(),m=Double.$valueOf(c.substring(e+1).trim()).doubleValue();0==
m&&0==l&&this.clear();if(m!=l){var j=this.addIntegralRegion(Math.max(m,l),Math.min(m,l));null!=j&&0<f&&this.setSelectedIntegral(j,f)}}}catch(n){if(!y(n,Exception))throw n;}},"~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 f=a[c].getYVal();f<b&&0<=f&&(b=f)}for(var e=1E100,D=-1E100,c=0;c<a.length;c++)f=a[c].getYVal(),this.integralTotal+=f-b,this.integralTotal<e&&(e=this.integralTotal),
this.integralTotal>D&&(D=this.integralTotal);this.integralTotal=D-e;this.intRange=this.percentRange/100/this.integralTotal;this.offset=this.percentOffset/100;e=0;for(c=a.length;0<=--c;)f=a[c].getYVal(),e+=f-b,this.xyCoords[c]=(new JSV.common.Coordinate).set(a[c].getXVal(),e*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,f=new java.util.StringTokenizer(b,",");f.hasMoreTokens();){var e=f.nextToken(),e=new java.util.StringTokenizer(e,":"),e=(new JSV.common.Annotation).setA(Double.parseDouble(e.nextToken()),0,a,e.nextToken(),!0,!1,0,0);c.addLast(e)}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 f=this.get(c);f.setValue(a*f.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),f=JSV.common.Coordinate.getNearestIndexForX(this.xyCoords,c.getXVal()),c=JSV.common.Coordinate.getNearestIndexForX(this.xyCoords,c.getXVal2());a.setBits(Math.min(f,c),Math.max(f,c))}return a});e(b,"getMeasurementListArray",function(){for(var a=Array(this.size()),b=0,c=this.size();0<=--c;)a[b++]=B(-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");e(b,"getMeasurementListArrayReal",
function(){for(var a=JU.AU.newDouble2(this.size()),b=0,c=this.size();0<=--c;b++)a[b]=O(-1,[this.get(c).getXVal(),this.get(c).getXVal2(),this.get(c).getValue()]);return a},"~S");e(b,"getDataHeader",function(){return JSV.common.IntegralData.$HEADER});c(b,"shiftY",function(a,b,c,f){b=w(100*(c+f-b)/f);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(),f=this.xyCoords.length-1;0<=--f;){var e=this.xyCoords[f].getYVal();b++;1E-4>e-c&&0>a?e<c&&(c=e,b=0):0>a?(a=f+Math.min(b,20),c=e,b=0):1E-4>e-c?(1==b&&(c=e),20<=b&&(this.addIntegralRegion(this.xyCoords[a].getXVal(),this.xyCoords[f].getXVal()),a=-1,c=e,b=0)):(b=0,c=e)}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));Q(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=s(JSV.common.IntegralData,"IntMode",Enum);a.getMode=c(a,"getMode",function(a){for(var b,c=0,f=JSV.common.IntegralData.IntMode.values();c<
f.length&&((b=f[c])||1);c++)if(a.startsWith(b.name()))return b;return JSV.common.IntegralData.IntMode.NA},"~S");j(a,"OFF",0,[]);j(a,"ON",1,[]);j(a,"TOGGLE",2,[]);j(a,"AUTO",3,[]);j(a,"LIST",4,[]);j(a,"MARK",5,[]);j(a,"MIN",6,[]);j(a,"UPDATE",7,[]);j(a,"CLEAR",8,[]);j(a,"NA",9,[]);b.c=new JSV.common.IntegralComparator;b.$HEADER=B(-1,["peak","start/ppm","end/ppm","value"])});r("JSV.common");v(["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=p(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);K(b,function(){this.peakList=new JU.Lst});n(b,function(){A(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 k=0;k<this.peakList.size();k++)if(this.peakList.get(k).checkFileIndex(a,b,c))return System.out.println("JSV.Spectrum selecting peak by FileIndex "+this+" "+this.peakList.get(k)),
this.selectedPeak=this.peakList.get(k);return null},"~S,~S,~S");c(b,"selectPeakByFilePathTypeModel",function(a,b,c){if(null!=this.peakList&&0<this.peakList.size())for(var k=0;k<this.peakList.size();k++)if(this.peakList.get(k).checkFileTypeModel(a,b,c))return System.out.println("JSV.Spectrum selecting peak byFilePathTypeModel "+this+" "+this.peakList.get(k)),this.selectedPeak=this.peakList.get(k);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(),k=-1,f=1E100,e=0;e<this.peakList.size();e++){var D=this.peakList.get(e).checkRange(a,c);D<f&&(f=D,k=e)}if(0<=k)return this.peakList.get(k)}return null},"~N,JSV.common.Coordinate");c(b,"getPeakTitle",
function(){var a=null;null!=this.highlightedPeak&&(a=this.highlightedPeak.getTitle());if((null==a||0==a.length)&&null!=this.selectedPeak)a=this.selectedPeak.getTitle();if(null==a||0==a.length)a=this.getTitleLabel();return a});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,k=-1,f=-1,e=1.7976931348623157E308*b,D=0,l=this.peakList.size();0<=--l;){var m=this.peakList.get(l).getX();0<b?m>c&&m<e?(k=l,e=m):m<c&&m-c<D&&(f=l,D=m-c):m<c&&m>e?(k=l,e=m):m>c&&m-c>D&&(f=l,D=m-c)}if(0>
k){if(0>f)return-1;k=f}return k},"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 k=0;k<b.length;k++)c[k]=(new JSV.common.Coordinate).set(b[k].getXVal(),JSV.common.Spectrum.toTransmittance(b[k].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),k=JSV.common.Coordinate.isYInRange(b,-2,2),f=0;f<b.length;f++)c[f]=
(new JSV.common.Coordinate).set(b[f].getXVal(),JSV.common.Spectrum.toAbsorbance(b[f].getYVal(),k));return JSV.common.Spectrum.newSpectrum(a,c,"ABSORBANCE")},"JSV.common.Spectrum");b.newSpectrum=c(b,"newSpectrum",function(a,b,c){var k=a.copy();k.setOrigin("JSpecView Converted");k.setOwner("JSpecView Generated");k.setXYCoords(b);k.setYUnits(c);a.setConvertedSpectrum(k);k.setConvertedSpectrum(a);return k},"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 k="header".equals(a);if(!k&&null!=a&&null==c)for(var f=this.headerTable.size();0<=--f;){var e=this.headerTable.get(f);if(e[0].equalsIgnoreCase(a)||e[2].equalsIgnoreCase(a))return b.put(a,e[1]),b}for(var e=new java.util.Hashtable,D=this.getHeaderRowDataAsArray(),f=0;f<D.length;f++){var l=JSV.source.JDXSourceStreamTokenizer.cleanLabel(D[f][0]);
if(null!=c)c+=" "+l;else if(!(null!=a&&!k&&!l.equals(a))){var m=JSV.common.Spectrum.fixInfoValue(D[f][1]);if(null==a){var j=new java.util.Hashtable;j.put("value",m);j.put("index",Integer.$valueOf(f+1));b.put(l,j)}else b.put(l,m)}}0<e.size()&&b.put("header",e);k||(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(!y(b,Exception))throw b;}try{return Double.$valueOf(a)}catch(c){if(!y(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,k){var f=a.isNMR();if(f!=b.isNMR()||a.isContinuous()!=b.isContinuous()||!k&&!JSV.common.Spectrum.areUnitsCompatible(a.xUnits,b.xUnits))return!1;if(c){if(a.is1D()!=b.is1D())return!1}else if(k){if(!f)return!0}else if(!a.is1D()||!b.is1D())return!1;return!f||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");e(b,"toString",function(){return this.getTitleLabel()+(null==this.xyCoords?"":" xyCoords.length="+this.xyCoords.length)});b=s(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");j(b,"NO_CONVERT",0,[]);j(b,"TO_TRANS",1,[]);j(b,"TO_ABS",2,[]);j(b,"TOGGLE",3,[])});r("JSV.common");s(JSV.common,"JSVersion",null);L=T=null;T=Jmol.___JmolVersion;L=Jmol.___JmolDate;
null!=L&&(L=L.substring(7,23));JSV.common.JSVersion.VERSION_SHORT=null!=T?T:"(Unknown_version)";u=null!=T?T:"(Unknown_version)";JSV.common.JSVersion.date=null!=L?L:"";JSV.common.JSVersion.VERSION=JSV.common.JSVersion.VERSION_SHORT+(null==JSV.common.JSVersion.date?"":" "+JSV.common.JSVersion.date);L=-1;if(null!=T)try{var z=JSV.common.JSVersion.VERSION_SHORT;T="";var P=z.indexOf(".");0>P&&(L=1E5*Integer.parseInt(z),z=null);if(null!=z&&(L=1E5*Integer.parseInt(T=z.substring(0,P)),z=z.substring(P+1),P=
z.indexOf("."),0>P&&(L+=1E3*Integer.parseInt(z),z=null),null!=z)){var na=z.substring(0,P);u=T+("."+na);L+=1E3*Integer.parseInt(na);z=z.substring(P+1);P=z.indexOf("_");0<=P&&(z=z.substring(0,P));P=z.indexOf(" ");0<=P&&(z=z.substring(0,P));L+=Integer.parseInt(z)}}catch(oa){if(!y(oa,"NumberFormatException"))throw oa;}JSV.common.JSVersion.majorVersion=u;JSV.common.JSVersion.versionInt=L;r("JSV.common");v(["java.util.Hashtable"],"JSV.common.JSVFileManager","java.io.BufferedInputStream $.BufferedReader $.File $.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=s(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 k;null!=(k=b.readLine());)c.append(k),c.appendC("\n");b.close()}catch(f){if(y(f,Exception))return null;throw f;}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(y(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(Y("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(y(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 k=new java.io.BufferedInputStream(c);a=k;JSV.common.JSVFileManager.isGzip(k)&&(a=JSV.common.JSViewer.getInterface("JSV.common.JSVZipUtil").newGZIPInputStream(a));return new java.io.BufferedReader(new java.io.InputStreamReader(a,
"UTF-8"))}catch(f){throw y(f,Exception),f;}},"~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);if(null!=b&&(JSV.common.JSVFileManager.htCorrelationCache.put(a,b),null!=JSV.common.JSVFileManager.cacheDir&&0>a.indexOf(":")))try{(new java.io.File(JSV.common.JSVFileManager.cacheDir)).mkdirs();var c=new java.io.File(JSV.common.JSVFileManager.cacheDir,a),k=new java.io.FileOutputStream(c);k.write(b.getBytes());k.close()}catch(f){if(y(f,"java.io.IOException"))f.printStackTrace();else throw f;}},"~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=N(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(k){if(y(k,Exception))throw new JSV.exception.JSVException(k.toString());throw k;}},"java.io.InputStream");b.isGzip=c(b,"isGzip",function(a){try{var b=N(4,0);a.mark(5);var c=a.read(b,0,4);a.reset();return 4==c&&31==b[0]&&139==b[1]}catch(k){if(y(k,Exception))throw new JSV.exception.JSVException(k.toString());throw k;}},"java.io.InputStream");b.getStreamAsBytes=c(b,"getStreamAsBytes",function(a,b){try{for(var c=
N(1024,0),k=null==b?N(4096,0):null,f=0,e=0;0<(f=a.read(c,0,1024));)e+=f,null==b?(e>=k.length&&(k=JU.AU.ensureLengthByte(k,2*e)),System.arraycopy(c,0,k,e-f,f)):b.write(c,0,f);a.close();return null==b?JU.AU.arrayCopyByte(k,e):e+" bytes"}catch(j){if(y(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(k){if(y(k,Exception))c=
k.toString();else throw k;}if("string"==typeof c)return c;try{c=JSV.common.JSVFileManager.getStreamAsBytes(c,null)}catch(f){if(y(f,"JSV.exception.JSVException"))try{c.close()}catch(e){if(!y(e,Exception))throw e;}else throw f;}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(k){if(y(k,"java.io.IOException"))JU.Logger.error("fixUTF error "+
k);else throw k;}return String.instantialize(a)},"~A");b.getInputStream=c(b,"getInputStream",function(a,b,c){var k=JSV.common.JSVFileManager.isURL(a),f=null!=JSV.common.JSVFileManager.appletDocumentBase,e=null,e=null,j;if(k&&0<=(j=a.indexOf("?POST?")))e=a.substring(j+6),a=a.substring(0,j);if(f||k){var l;try{l=new java.net.URL(JSV.common.JSVFileManager.appletDocumentBase,a,null)}catch(m){if(y(m,Exception))throw new JSV.exception.JSVException("Cannot read "+a);throw m;}JU.Logger.info("JSVFileManager opening URL "+
l+(null==e?"":" with POST of "+e.length+" bytes"));e=JSV.common.JSVFileManager.viewer.apiPlatform.getURLContents(l,c,e,!1)}else b&&JU.Logger.info("JSVFileManager opening file "+a),e=JSV.common.JSVFileManager.viewer.apiPlatform.getBufferedFileInputStream(a);if("string"==typeof e)throw new JSV.exception.JSVException("\n"+e);return e},"~S,~B,~A");b.getNMRSimulationJCampDX=c(b,"getNMRSimulationJCampDX",function(a){var b=0,b=null,c=JSV.common.JSVFileManager.getSimulationType(a);a.startsWith(c)&&(a=a.substring(c.length+
1));var k=a.startsWith("MOL=");k&&(a=a.substring(4),b=a.indexOf("/n__Jmol"),0<b&&(a=a.substring(0,b)+JU.PT.rep(a.substring(b),"/n","\n")),b=a=JU.PT.rep(a,"\\n","\n"));var f=""+JSV.common.JSVFileManager.getSimulationHash(a,c);JU.Logger.debugging&&JU.Logger.info("JSVFileManager type="+c+" key="+f+" name="+a);var e=JSV.common.JSVFileManager.cacheGet(f);if(null!=e)return e;e=k?null:JU.PT.rep(JSV.common.JSVFileManager.nciResolver,"%FILE",JU.PT.escapeUrl(a));if(!k&&null==(b=JSV.common.JSVFileManager.getFileAsString(e))||
0<=b.indexOf("<html"))return JU.Logger.error("no MOL data returned by NCI"),null;var j=c.equals("C13"),l;l=j?JSV.common.JSVFileManager.nmrdbServerC13:JSV.common.JSVFileManager.nmrdbServerH1;l=l.$replace("$MOLFILE",b);JSV.common.JSVFileManager.cachePut("url",l);var m=JSV.common.JSVFileManager.getFileAsString(l);if(0<=(null==m?m="Error: Error fetching simulation":m).indexOf("Error:"))return m;var n=(new JU.JSJSONParser).parseMap(m,!0);JSV.common.JSVFileManager.cachePut("json",m);return JSV.common.JSVFileManager.processJSON(f,
e,l,a,c,b,n,j,k)},"~S");b.processJSON=c(b,"processJSON",function(a,b,c,e,f,g,j,l,m){var n=j.get("data");j=n.get("molfile");null==j&&(System.out.println("JSVFileManager: no MOL file returned from EPFL"),j=g);var p=JSV.common.JSVFileManager.getAtomMap(j,g);JSV.common.JSVFileManager.cachePut("mol",g);(j=m||!JSV.common.JSViewer.isJS?null:g.getBytes())&&Jmol.Cache.put("http://SIMULATION/"+f+"/"+e+"#molfile",j);c="<Signals src="+JU.PT.esc(c.substring(0,c.indexOf("?")))+">\n";f=l?"13C":"1HNMR";j=n.get("jcamp");
j=JSV.common.JSVFileManager.hackNewNmriumSimulationJCAMP(j);for(var n=n.get("signals"),q=JSV.common.JSVFileManager.getval(j,"##$BF1"),q=null==q?l?100:400:Float.parseFloat(q),r=new JU.SB,s=n.size();0<=--s;){var u=n.get(s);r.append("<Signal ");JSV.common.JSVFileManager.setAttr(r,"type",f,null);var v=u.get("atoms").get(0);null==p?JSV.common.JSVFileManager.setAttr(r,"atoms",v,null):r.append('atoms="').appendI(p[v.intValue()]).append('" ');JSV.common.JSVFileManager.setAttr(r,"multiplicity","multiplicity",
u);v=u.get("delta");v=JSV.common.JSVFileManager.getSignalMinMax(u,v.floatValue(),q,l);JSV.common.JSVFileManager.setAttr(r,"xMin",""+v[0],null);JSV.common.JSVFileManager.setAttr(r,"xMax",""+v[1],null);JSV.common.JSVFileManager.setAttr(r,"integral","nbAtoms",u);r.append("></Signal>\n")}r.append("</Signals>");c+=r.toString();JU.Logger.debugging&&JU.Logger.info(c);JSV.common.JSVFileManager.cachePut("xml",c);j="##TITLE="+(m?"JMOL SIMULATION/"+f:e)+"\n"+j.substring(j.indexOf("\n##")+1);l=g.indexOf("\n");
l=g.indexOf("\n",l+1);0<l&&l==g.indexOf("\n \n")&&(g=g.substring(0,l+1)+"Created "+JSV.common.JSVFileManager.viewer.apiPlatform.getDateFormat("8824")+" by JSpecView "+JSV.common.JSVersion.VERSION+g.substring(l+1));l=j.indexOf("##.");e=JSV.common.JSVFileManager.getAbbreviatedSimulationName(e,f,!1);p=e.indexOf("id='");m&&0<p&&(e=e.substring(p+4,(e+"'").indexOf("'",p+4)));JSV.common.JSVFileManager.cachePut(f+"-json.jcamp",j);j=j.substring(0,l)+"##$MODELS=\n<Models>\n<ModelData id="+JU.PT.esc(e)+' type="MOL" src='+
JU.PT.esc(b)+">\n"+g+"</ModelData>\n</Models>\n##$SIGNALS=\n"+c+"\n"+j.substring(l);JSV.common.JSVFileManager.cachePut("jcamp",j);JSV.common.JSVFileManager.cachePut(a,j);return j},"~S,~S,~S,~S,~S,~S,java.util.Map,~B,~B");b.getSignalMinMax=c(b,"getSignalMinMax",function(a,b,c,e){var f=V(2,0);if(e)f[0]=b-0.5,f[1]=b+0.5;else{a=a.get("js");e=1;for(var g=a.size();0<=--g;){var j=a.get(g),l=j.get("coupling").floatValue();switch(j.get("multiplicity")){case "d":e+=l/2;break;default:case "t":e+=l}}f[0]=b-e/
c;f[1]=b+e/c}return f},"java.util.Map,~N,~N,~B");b.hackNewNmriumSimulationJCAMP=c(b,"hackNewNmriumSimulationJCAMP",function(a){var b=JSV.common.JSVFileManager.getline(a,"##.SHIFT REFERENCE=INTERNAL"),c=JSV.common.JSVFileManager.getval(a,"##$OFFSET");null!=b&&null!=c&&(b=b.substring(0,b.lastIndexOf(", ")+2)+c,a=JSV.common.JSVFileManager.setline(a,"##$OFFSET",null),a=JSV.common.JSVFileManager.setline(a,"##.SHIFT REFERENCE=INTERNAL",b));return a},"~S");b.getline=c(b,"getline",function(a,b){var c=a.indexOf(b);
return 0>c?null:a.substring(c,a.indexOf("\n",c))},"~S,~S");b.getval=c(b,"getval",function(a,b){var c=a.indexOf(b);if(0>c)return null;var e=a.substring(a.indexOf("=",c)+1,a.indexOf("\n",c)),c=e.indexOf("$$");0<=c&&(e=e.substring(c));return e.trim()},"~S,~S");b.setline=c(b,"setline",function(a,b,c){b=a.indexOf(b);return 0>b?a:null==c?a.substring(0,b)+a.substring(a.indexOf("\n",b)+1):a.substring(0,b)+c+a.substring(a.indexOf("\n",b))},"~S,~S,~S");b.getAtomMap=c(b,"getAtomMap",function(a,b){var c=JSV.common.JSVFileManager.getCoord(a),
e=JSV.common.JSVFileManager.getCoord(b),f=c.length;if(f!=e.length)return null;var g=F(f,0),j=new JU.BS;j.setBits(0,f);for(var l=!1,m=0;m<f;m++)for(var n=c[m],p=j.nextSetBit(0);0<=p;p=j.nextSetBit(p+1))if(0.1>n.distanceSquared(e[p])){j.clear(p);g[m]=p;m!=p&&(l=!0);break}return l?g:null},"~S,~S");b.getCoord=c(b,"getCoord",function(a){a=JU.PT.split(a,"\n");for(var b=V(3,0),c=Integer.parseInt(a[3].substring(0,3).trim()),e=Array(c),f=0;f<c;f++)JU.PT.parseFloatArrayInfested(JU.PT.getTokens(a[4+f].substring(0,
31)),b),e[f]=JU.P3.new3(b[0],b[1],b[2]);return e},"~S");b.setAttr=c(b,"setAttr",function(a,b,c,e){a.append(b+'="').appendO(null==e?c:e.get(c)).append('" ')},"JU.SB,~S,~O,java.util.Map");b.getResource=c(b,"getResource",function(a,b,c){var e=null;try{if(null==(e=a.getClass().getResource(b)))c[0]="Couldn't find file: "+b}catch(f){if(y(f,Exception))c[0]="Exception "+f+" in getResource "+b;else throw f;}return e},"~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 e=new java.io.BufferedReader(new java.io.InputStreamReader(a.getContent(),"UTF-8")),f;null!=(f=e.readLine());)b.append(f).append("\n");e.close()}catch(g){if(y(g,Exception))c[0]=g.toString();else throw g;}return b.toString()},"~O,~S,~A");b.getJmolFilePath=c(b,"getJmolFilePath",function(a){try{a=JSV.common.JSVFileManager.getFullPathName(a)}catch(b){if(y(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(Y("java.net.URL"),a,null)).getFile();return b.substring(b.lastIndexOf("/")+1)}catch(c){if(y(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=B(-1,["http:","https:","ftp:","http://SIMULATION/","file:"]);b.htCorrelationCache=new java.util.Hashtable;b.cacheDir=null;b.nciResolver="https://cactus.nci.nih.gov/chemical/structure/%FILE/file?format=sdf&get3d=True";b.nmrdbServerH1='https://nmr-prediction.service.zakodium.com/v1/predict/proton?POST?{"molfile":"$MOLFILE","includeJDX":true}';b.nmrdbServerC13='https://nmr-prediction.service.zakodium.com/v1/predict/carbon?POST?{"molfile":"$MOLFILE","includeJDX":true}';
b.stringCount=0});r("JSV.common");v(["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 $.SyncManager JSV.source.JDXReader $.JDXSource JSV.tree.SimpleTree JU.Logger".split(" "),function(){var b=p(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=this.parentFrame=null;this.autoShowLegend=this.autoIntegrate=this.interfaceOverlaid=this.loadImaginary=this.isEmbedded=!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=null;this.hasDisplay=!1;this.peakInfoModelSentToJmol=null;this.popupZoomEnabled=this.popupAllowMenu=!0;this.defaultLoadScript=null;this.nmrMaxY=NaN;this.recentStackPercent=5;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]);K(b,function(){this.irMode=JSV.common.Spectrum.IRMode.NO_CONVERT});n(b,function(a,b,c,e){this.si=a;this.isApplet=b;this.hasDisplay=e;JSV.common.JSViewer.isJS=b&&c;c=null;self.Jmol&&(c=Jmol);JSV.common.JSViewer.jsmolObject=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,~B");c(b,"setParentFrame",function(a){this.parentFrame=a},"javax.swing.JFrame");
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(y(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));var b=a.indexOf("JSpecView:");0<=b&&(a=a.substring(b+10));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 e=null;null!=a&&a.hasMoreTokens()&&0<c&&b;){var f=a.nextToken(),g=new JSV.common.ScriptTokenizer(f,!1),j=JSV.common.ScriptToken.getKey(g);if(null!=j){var l=JSV.common.ScriptToken.getScriptToken(j),g=JSV.common.ScriptToken.getValue(l,g,f);try{switch(l){case JSV.common.ScriptToken.UNKNOWN:JU.Logger.info("Unrecognized parameter: "+j);--c;break;default:if(null==
this.selectedPanel)break;this.parameters.set(this.pd(),l,g);this.si.siUpdateBoolean(l,JSV.common.Parameters.isTrue(g));break;case JSV.common.ScriptToken.PEAKCALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.SYNCCALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.COORDCALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.LOADFILECALLBACKFUNCTIONNAME:this.si.siExecSetCallback(l,g);break;case JSV.common.ScriptToken.DEFAULTLOADSCRIPT:g=JU.PT.rep(g,"''",'"');this.defaultLoadScript=0<g.length?g:null;break;case JSV.common.ScriptToken.DEFAULTNMRNORMALIZATION:this.nmrMaxY=
JU.PT.parseFloat(g);break;case JSV.common.ScriptToken.AUTOINTEGRATE:this.autoIntegrate=JSV.common.Parameters.isTrue(g);break;case JSV.common.ScriptToken.CLOSE:this.execClose(g);break;case JSV.common.ScriptToken.DEBUG:JU.Logger.setLogLevel(g.toLowerCase().equals("high")?6:JSV.common.Parameters.isTrue(g)?5:4);break;case JSV.common.ScriptToken.GETPROPERTY:var m=null==this.selectedPanel?null:this.getPropertyAsJavaObject(g);null!=m&&this.selectedPanel.showMessage(JU.PT.toJSON(null,m),g);break;case JSV.common.ScriptToken.HELP:this.execHelp(g);
break;case JSV.common.ScriptToken.HIDDEN:this.si.siExecHidden(JSV.common.Parameters.isTrue(g));break;case JSV.common.ScriptToken.INTEGRATIONRATIOS:this.integrationRatios=g;this.execIntegrate(null);break;case JSV.common.ScriptToken.INTERFACE:this.interfaceOverlaid=this.checkOvelayInterface(g);break;case JSV.common.ScriptToken.INTEGRALOFFSET:case JSV.common.ScriptToken.INTEGRALRANGE:this.execSetIntegralParameter(l,Double.parseDouble(g));break;case JSV.common.ScriptToken.INVERTY:this.execZoom("invertY");
break;case JSV.common.ScriptToken.JMOL:this.syncToJmol(g);break;case JSV.common.ScriptToken.JSV:this.syncScript(JU.PT.trimQuotes(g));break;case JSV.common.ScriptToken.LOAD:if(0==g.length){null!=this.defaultLoadScript&&this.runScriptNow(this.defaultLoadScript);break}this.execLoad(g,(null==this.defaultLoadScript?"":this.defaultLoadScript+";")+a.getRemainingScript());e=null==this.selectedPanel?null:this.si.siLoaded(g);a=null;break;case JSV.common.ScriptToken.LOADIMAGINARY:this.loadImaginary=JSV.common.Parameters.isTrue(g);
break;case JSV.common.ScriptToken.PEAK:this.execPeak(g);break;case JSV.common.ScriptToken.PEAKLIST:this.execPeakList(g);break;case JSV.common.ScriptToken.SCALEBY:this.scaleSelectedBy(this.panelNodes,g);break;case JSV.common.ScriptToken.SCRIPT:if(g.equals("")||g.toLowerCase().startsWith("inline"))this.execScriptInline(g);else{var n=JSV.common.JSVFileManager.getFileAsString(g);null!=n&&100>this.scriptLevelCount&&this.runScriptNow(n)}break;case JSV.common.ScriptToken.SELECT:this.execSelect(g);break;
case JSV.common.ScriptToken.SPECTRUM:case JSV.common.ScriptToken.SPECTRUMNUMBER:this.setSpectrum(g)||(b=!1);break;case JSV.common.ScriptToken.STACKOFFSETY:this.execOverlayOffsetY(JU.PT.parseInt(""+JU.PT.parseFloat(g)));break;case JSV.common.ScriptToken.TEST:this.si.siExecTest(g);break;case JSV.common.ScriptToken.OVERLAY:case JSV.common.ScriptToken.VIEW:this.execView(g,!0);break;case JSV.common.ScriptToken.HIGHLIGHT:b=this.highlight(f);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.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(l){case JSV.common.ScriptToken.FINDX:this.pd().findX(null,Double.parseDouble(g));break;case JSV.common.ScriptToken.GETSOLUTIONCOLOR:this.show("solutioncolor"+g.toLowerCase());break;case JSV.common.ScriptToken.INTEGRATION:case JSV.common.ScriptToken.INTEGRATE:this.execIntegrate(g);break;case JSV.common.ScriptToken.IRMODE:this.execIRMode(g);break;case JSV.common.ScriptToken.LABEL:this.pd().addAnnotation(JSV.common.ScriptToken.getTokens(g));break;case JSV.common.ScriptToken.LINK:this.pd().linkSpectra(JSV.common.PanelData.LinkMode.getMode(g));
break;case JSV.common.ScriptToken.OVERLAYSTACKED:this.pd().splitStack(!JSV.common.Parameters.isTrue(g));break;case JSV.common.ScriptToken.PRINT:e=this.execWrite(null);break;case JSV.common.ScriptToken.SETPEAK:case JSV.common.ScriptToken.SETX:case JSV.common.ScriptToken.SHIFTX:this.execShiftSpectrum(l,f);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(g));
break;case JSV.common.ScriptToken.SHOWMEASUREMENTS:this.pd().showAnnotation(JSV.common.Annotation.AType.Measurements,JSV.common.Parameters.getTFToggle(g));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(g));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(g);break;case JSV.common.ScriptToken.WINDOW:this.si.siNewWindow(JSV.common.Parameters.isTrue(g),!1);break;case JSV.common.ScriptToken.WRITE:e=this.execWrite(g);break;case JSV.common.ScriptToken.ZOOM:b=this.execZoom(g)}}}catch(p){if(y(p,Exception))e=p.toString(),JU.Logger.error(p.toString()),b=!1,--c;else throw p;}}}this.scriptLevelCount--;this.si.siExecScriptComplete(e,!0);return b},"~S");c(b,"execShiftSpectrum",function(a,b){var c=JSV.common.ScriptToken.getTokens(b),
e=NaN,f=NaN;switch(c.size()){case 2:f=c.get(1);f.equals("")&&(f="?");f=f.equalsIgnoreCase("NONE")?1.7976931348623157E308:f.equalsIgnoreCase("?")?NaN:Double.parseDouble(f);break;case 3:e=Double.parseDouble(c.get(1));f=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(f)&&Double.parseDouble("");break;default:return}this.pd().shiftSpectrum(c,
e,f)},"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(!y(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),e=b.peakListThreshold,f=b.peakListInterpolation;try{for(var g=c.size();0<=--g;){var j=c.get(g),l=j.indexOf("=");if(!(0>=
l)){var m=j.substring(0,l);a=j.substring(l+1);m.startsWith("thr")?e=Double.$valueOf(a).doubleValue():m.startsWith("int")&&(f=a.equalsIgnoreCase("none")?"NONE":"parabolic")}}b.peakListThreshold=e;b.peakListInterpolation=f;this.isClosed()||this.pd().getPeakListing(b,Boolean.TRUE)}catch(n){if(!y(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 e=JU.PT.parseFloat(2<c?b.get(2):""),f=this.getRGB(3<c?b.get(3):"100"),g=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(e)?this.pd().removeAllHighlights():(this.pd().removeHighlight(a,e),0>b&&(b=150),0<=f&&(0<=g&&0<=j)&&this.pd().addHighlight(null,a,e,null,f,g,j,b));this.repaint(!0)}return!0},"~S");c(b,"getRGB",function(a){a=JU.PT.parseFloat(a);
return I(Float.isNaN(a)?-1:1<a?a:255*a)},"~S");c(b,"execZoom",function(a){var b=0,c=0,e=0,f=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 g=a.get(0);g.equalsIgnoreCase("X")?(b=Double.parseDouble(a.get(1)),c=Double.parseDouble(a.get(2))):g.equalsIgnoreCase("Y")&&(e=Double.parseDouble(a.get(1)),f=Double.parseDouble(a.get(2)));
break;case 4:b=Double.parseDouble(a.get(0)),e=Double.parseDouble(a.get(1)),c=Double.parseDouble(a.get(2)),f=Double.parseDouble(a.get(3))}this.pd().setZoom(b,e,c,f);return!0},"~S");c(b,"scaleSelectedBy",function(a,b){try{for(var c=Double.parseDouble(b),e=a.size();0<=--e;)a.get(e).pd().scaleSelectedBy(c)}catch(f){if(!y(f,Exception))throw f;}},"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(!y(b,Exception))throw b;}}else{var c=a.equalsIgnoreCase("first"),e=a.equalsIgnoreCase("last");if(c||e)a=this.selectedPanel.getPanelData(),e=a.graphSets,null==e||0==e.size()||(c=e.get(c?0:e.size()-1),a.setCurrentGraphSet(c,-1));else{c=this.panelNodes;for(e=c.size();0<=--e;)c.get(e).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,e=this.fillSpecList(a,c,!0);0<c.size()&&this.si.siOpenDataOrFile(null,e,c,e,-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,e=this.panelNodes.size();0<=--e;)this.panelNodes.get(e).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,e=!1;1<b.size()&&b.get(0).equalsIgnoreCase("ALL")&&(e=!0,c++);a=Double.parseDouble(b.get(c++));b=Double.parseDouble(b.get(c));if(e){e=this.pd().getSpectrum();for(c=this.panelNodes.size();0<=--c;){var f=this.panelNodes.get(c);f.source===this.currentSource&&JSV.common.Spectrum.areXScalesCompatible(e,f.getSpectrum(),!1,!1)&&f.pd().setZoom(0,a,0,b)}}else this.pd().setZoom(0,a,0,b)},"~S");
c(b,"newStructToJmol",function(a){JU.Logger.info("sending new structure to Jmol:\n"+a);this.syncToJmol("struct:"+a)},"~S");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.notifyJmol(c)});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 e=this.pd().getInfo(!0,a);if(!c&&null!=e)return e;null!=e&&b.put("current",e);c=new JU.Lst;for(e=0;e<this.panelNodes.size();e++)null!=this.panelNodes.get(e).jsvp&&
c.addLast(this.panelNodes.get(e).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 e,f=null,g=a.equalsIgnoreCase("NONE");if(g||a.equalsIgnoreCase("all"))a="*";if(0>a.indexOf("*")){e=a.$plit(" ");a=new JU.SB;for(var j=0;j<e.length;j++){var l=e[j].indexOf(".");l!=e[j].lastIndexOf(".")&&(e[j]=e[j].substring(0,l+1)+e[j].substring(l+
1).$replace(".","_"));a.append(e[j]).append(" ")}a=a.toString().trim()}if(a.equals("*"))e=JSV.common.ScriptToken.getTokens(JSV.common.PanelNode.getSpectrumListAsString(this.panelNodes));else if(a.startsWith('"')||a.startsWith("'"))e=JSV.common.ScriptToken.getTokens(a);else if(a=JU.PT.rep(a,"_"," _ "),a=JU.PT.rep(a,"-"," - "),e=JSV.common.ScriptToken.getTokens(a),f=JSV.common.ScriptToken.getTokens(JSV.common.PanelNode.getSpectrumListAsString(this.panelNodes)),0==f.size())return null;var m=this.isClosed()?
"1.":JSV.common.PanelNode.findNode(this.selectedPanel,this.panelNodes).id,m=m.substring(0,m.indexOf(".")+1);a=new JU.SB;for(var n=e.size(),p=null,j=0;j<n;j++){var q=e.get(j),l=NaN,r=-1;j+1<n&&e.get(j+1).equals("*")?(j+=2,l=Double.parseDouble(e.get(j))):j+1<n&&e.get(j+1).equals("_")&&(j+=2,r=Integer.parseInt(e.get(j)));if(q.equals("-")){null==p&&(p=f.get(0));q=j+1==n?f.get(f.size()-1):e.get(++j);q.contains(".")||(q=m+q);for(l=0;l<f.size()&&!f.get(l).equals(p);)l++;for(l++;l<f.size()&&!p.equals(q);){var s=
JSV.common.PanelNode.findNodeById(p=f.get(l++),this.panelNodes);b.addLast(s.pd().getSpectrumAt(0));a.append(",").append(p)}}else if(q.startsWith("'")&&q.endsWith("'")&&(q='"'+JU.PT.trim(q,"'")+'"'),q.startsWith('"'))for(var q=JU.PT.trim(q,'"'),r=this.panelNodes.size(),u=0;u<r;u++){if(s=this.panelNodes.get(u),null!=s.fileName&&s.fileName.startsWith(q)||null!=s.frameTitle&&s.frameTitle.startsWith(q))this.addSpecToList(s.pd(),l,-1,b,c),a.append(",").append(s.id)}else q.contains(".")||(q=m+q),s=JSV.common.PanelNode.findNodeById(q,
this.panelNodes),null!=s&&(p=q,this.addSpecToList(s.pd(),l,r,b,c),a.append(",").append(q),0<r&&a.append(".").appendI(r))}c&&0<b.size()&&(s=JSV.common.PanelNode.findNodeById(a.substring(1),this.panelNodes),null!=s&&(this.setNode(s),b.clear()));return g?"NONE":0<a.length()?a.toString().substring(1):null},"~S,JU.Lst,~B");c(b,"addSpecToList",function(a,b,c,e,f){f?(a.getSpectrumAt(0).setUserYFactor(Double.isNaN(b)?1:b),a.addToList(c-1,e)):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,e,f,g,j,l){if("NONE".equals(b))return this.close("View*"),0;this.si.writeStatus("");var m=null,n=null,p=null,q=!1;null!=e&&e.startsWith("cache://")&&(a=Jmol.Cache.get(b=e));var r=null;if(null!=a)try{p=b,n=m=JSV.common.JSVFileManager.getFullPathName(b)}catch(s){if(!y(s,"JSV.exception.JSVException"))throw s;
}else if(null!=c)q=!0,n=p=m="View"+ ++this.nViews;else if(null!=e)try{r=this.apiPlatform.newFile(e),this.recentURL=m=(new java.net.URL(JSV.common.JSVFileManager.appletDocumentBase,e,null)).toString(),p=JSV.common.JSVFileManager.getTagName(m)}catch(u){if(y(u,"java.net.MalformedURLException"))p=r.getName(),n=m=r.getFullPath(),this.recentURL=null;else throw u;}b=-1;if(0<=(b=JSV.common.PanelNode.isOpen(this.panelNodes,m))||0<=(b=JSV.common.PanelNode.isOpen(this.panelNodes,e)))return q?(--this.nViews,
this.setNode(this.panelNodes.get(b))):this.si.writeStatus(m+" is already open"),-1;!j&&!q&&this.close("all");this.si.setCursor(3);try{this.si.siSetCurrentSource(q?JSV.source.JDXSource.createView(c):JSV.source.JDXReader.createJDXSource(r,a,m,this.obscureTitleFromUser===Boolean.TRUE,this.loadImaginary,f,g,this.nmrMaxY))}catch(v){if(y(v,Exception))return alert(v.toString()),this.si.setCursor(0),this.isApplet&&this.selectedPanel.showMessage(v.toString(),"Error Opening File"),-3;throw v;}this.si.setCursor(0);
System.gc();null==n?(n=this.currentSource.getFilePath(),null!=n&&(p=n.substring(n.lastIndexOf("/")+1))):this.currentSource.setFilePath(n);null==l&&!q&&(l=n);null!=l&&this.currentSource.setID(l);this.si.siSetLoaded(p,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();q||c&&this.currentSource.isCompoundSource?this.combineSpectra(q?e:null):this.splitSpectra();
this.pd().setTaintedAll();q||this.si.siUpdateRecentMenus(m);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 e="all"===a;if(null==a||0==b&&a.equalsIgnoreCase("all"))this.closeSource(null);else{var f=a.equalsIgnoreCase("views"),c=new JU.Lst;a=a.$replace("\\","/");var g=this.panelNodes.size(),b=g-b;if(a.endsWith("*"))for(a=a.substring(0,a.length-
1);0<=--g;)this.panelNodes.get(g).fileName.startsWith(a)&&c.addLast(this.panelNodes.get(g).source);else if(a.equalsIgnoreCase("selected"))for(a=null;0<=--g;)e=this.panelNodes.get(g).source,this.panelNodes.get(g).isSelected&&(null==a||a!==e)&&c.addLast(e),a=e;else if(e||f||a.equalsIgnoreCase("simulations"))for(a=0;0<=--g&&a<b;){if(e||(f?this.panelNodes.get(g).isView:this.panelNodes.get(g).isSimulation))c.addLast(this.panelNodes.get(g).source),a++}else e=0==a.length?this.currentSource:JSV.common.PanelNode.findSourceByNameOrId(a,
this.panelNodes),null!=e&&c.addLast(e);for(g=c.size();0<=--g;)this.closeSource(c.get(g));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),e=c.get(0),f=null,g=0;e.equalsIgnoreCase("ID")&&(f=JU.PT.trimQuotes(c.get(1)),e=c.get(2),g=2);var j=e.equalsIgnoreCase("APPEND");j&&(g++,0<g&&(e=c.get(g)));var l=e.equalsIgnoreCase("CHECK");l&&g++;
0<g&&(e=c.get(g));null==b&&(b=this.defaultLoadScript);if(e.equals("?"))this.openFileFromDialog(j,!1,null,b);else if(e.equals("http://?"))this.openFileFromDialog(j,!0,null,null);else if(e.equals("$?")||e.equals("$H1?"))this.openFileFromDialog(j,!0,"H1",null);else if(e.equals("$C13?"))this.openFileFromDialog(j,!0,"C13",null);else{var m=e.equalsIgnoreCase("MOL")||e.equalsIgnoreCase("H1"),n=e.equalsIgnoreCase("C13");if(m||n)e="http://SIMULATION/"+(m?"H1/":"C13/")+"MOL="+JU.PT.trimQuotes(c.get(++g));!l&&
!j&&(e.equals('""')&&null!=this.currentSource&&(e=this.currentSource.getFilePath()),this.close("all"));e=JU.PT.trimQuotes(e);if(l=e.startsWith("$"))!e.startsWith("$H1")&&!e.startsWith("$C13")&&(e="$H1/"+e.substring(1)),e="http://SIMULATION/"+e.substring(1);m=g+1<c.size()?Integer.$valueOf(c.get(++g)).intValue():-1;c=g+1<c.size()?Integer.$valueOf(c.get(++g)).intValue():m;this.si.siOpenDataOrFile(null,null,null,e,m,c,j,b,f);l&&(this.close("views"),this.execView("*",!0))}},"~S,~S");c(b,"combineSpectra",
function(a){for(var b=this.currentSource,c=b.getSpectra(),e=!1,f=c.size();0<=--f;)if(c.get(f).isSimulation){e=!0;break}c=this.si.siGetNewJSVPanel2(c);c.setTitle(b.getTitle());c.getTitle().equals("")&&(c.getPanelData().setViewTitle(""),c.setTitle(a));this.si.siSetPropertiesFromPreferences(c,!0);this.spectraTree.createTree(++this.fileCount,b,B(-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);e&&this.pd().splitStack(!0)},"~S");c(b,"closeSource",function(a){for(var b=this.spectraTree.getRootNode(),c=null==a?null:a.getFilePath(),e=new JU.Lst,b=b.children();b.hasMoreElements();){var f=b.nextElement();if(null==c||f.getPanelNode().source.matchesFilePath(c)){JU.Logger.info("Closing "+f.getPanelNode().source.getFilePath());for(var g=f.children();g.hasMoreElements();){var j=
g.nextElement();e.addLast(j);this.panelNodes.removeObj(j.getPanelNode())}e.addLast(f);if(null!=c)break}}this.spectraTree.deleteNodes(e);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(e=c=0;e<this.panelNodes.size();e++)b=JU.PT.parseFloat(this.panelNodes.get(e).id),b>=c+1&&(c=w(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()));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()),e=null,f=0;f<b.size();f++)e=b.get(f),e=this.si.siGetNewJSVPanel(e),this.si.siSetPropertiesFromPreferences(e,!0),c[f]=e;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=I(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=F(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,e,f){return null!=this.selectedPanel&&this.selectedPanel.processMouseEvent(a,b,c,e,f)},"~N,~N,~N,~N,~N");c(b,"processTwoPointGesture",function(a){this.isClosed()||this.selectedPanel.processTwoPointGesture(a)},"~A");c(b,"processKeyEvent",function(a){this.isClosed()||this.selectedPanel.processKeyEvent(a)},"~O");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,"getPrintLayout",function(a){if(!JSV.common.JSViewer.isJS&&this.hasDisplay)try{var b=this.getPlatformInterface("PrintDialog").set(this.parentFrame,
this.lastPrintLayout,a).getPrintLayout();null!=b&&(this.lastPrintLayout=b);return b}catch(c){if(!y(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(),e=c.getNumberOfSpectraInCurrentSet();if(-1>b||b>=e)return"Maximum spectrum index (0-based) is "+(e-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(f){if(y(f,Exception))return JU.Logger.error(f.toString()),null;throw f;}},"~S,~N");e(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=$._4Name(a);return null==b?null:b.newInstance()}catch(c){if(y(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,e){var f=null;if(null!=c){f=this.fileHelper.getUrlFromDialog("Enter the name or identifier of a compound",this.recentSimulation);
if(null==f)return!1;this.recentSimulation=f;if(f.equals("<this structure>"))return this.isEmbedded?(this.syncToJmol('sync . "'+c+'Simulate:";'),!0):!1;f="$"+c+"/"+f}else if(b){f=this.fileHelper.getUrlFromDialog("Enter the URL of a JCAMP-DX File",null==this.recentURL?this.recentOpenURL:this.recentURL);if(null==f)return!1;this.recentOpenURL=f}else b=B(-1,[Boolean.$valueOf(a),e]),b=this.hasDisplay?this.fileHelper.showFileOpenDialog(this.mainPanel,b):null,null!=b&&(f=b.getFullPath());return null!=f?(this.runScriptNow("load "+
(a?"APPEND ":"")+'"'+f+'"'+(null==e?"":";"+e)),!0):!1},"~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 e=b.size();0<=--e;){var f=b.get(e).jsvp;f===a?c=e:(f.setEnabled(!1),f.setFocusable(!1),f.getPanelData().closeAllDialogsExcept(JSV.common.Annotation.AType.NONE))}this.markSelectedPanels(b,
c);this.selectedPanel=a;null!=a&&a.getPanelData().clearMouseSet(null)}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),e=c.nextToken();e.equalsIgnoreCase("SET")&&(e=c.nextToken());var e=
e.toUpperCase(),f=JSV.common.ScriptToken.getScriptToken(e),b=JSV.common.ScriptToken.getValue(f,c,b);JU.Logger.info("KEY-> "+e+" VALUE-> "+b+" : "+f);try{switch(f){default:this.parameters.set(null,f,b);break;case JSV.common.ScriptToken.UNKNOWN:break;case JSV.common.ScriptToken.APPLETID:this.fullName=this.appletName+"__"+(this.appletName=b)+"__";e=null;self.Jmol&&(e=Jmol._applets[b]);this.html5Applet=e;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(f,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(g){if(!y(g,Exception))throw g;}}},"~S");c(b,"getSolutionColorStr",
function(a){a=JU.CU.colorPtFromInt(this.getSolutionColor(a),null);return I(a.x)+","+I(a.y)+","+I(a.z)},"~B");c(b,"checkCommandLineForTip",function(a,b,c){var e="\u0001"==a;if(!e&&"\x00"!=a){if("\t"!=a&&("\n"==a||32>a.charCodeAt(0)||126<a.charCodeAt(0)))return null;b+=Character.isISOControl(a)?"":""+a}var f;0<=b.indexOf(";")&&(b=b.substring(b.lastIndexOf(";")+1));for(var g=null;b.startsWith(" ");)b=b.substring(1);if(0==b.length&&!e)f="";else{f=JSV.common.ScriptToken.getTokens(b);if(0==f.size()&&!e)return"";
b=b.endsWith(" ")||1<f.size()&&c;f=JSV.common.ScriptToken.getScriptTokenList(0==f.size()?null:f.get(0),b);switch(f.size()){case 0:f="?";break;case 1:e=f.get(0);f=e.getTip();try{f=0<=f.indexOf("TRUE")?" ("+this.parameters.getBoolean(e)+")":0<=e.name().indexOf("COLOR")?" ("+JU.CU.toRGBHexString(this.parameters.getElementColor(e))+")":""}catch(j){if(y(j,Exception))return null;throw j;}if("\t"==a||b||!c){f=e.name()+" "+e.getTip()+f+" "+e.getDescription();"\t"==a&&(g=e.name()+" ");break}f=e.name()+" "+
f;break;default:f=JSV.common.ScriptToken.getNameList(f)}}c?this.si.writeStatus(f):g=f;return g},"~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="",e=0;e<c.length;e++)var f=JSV.common.ScriptToken.getScriptToken(c[e]),b=b+(c[e]+" "+f.getTip()+"\n  "+f.getDescription()+"\n\n");this.getDialogManager().showMessage(null,
b,"HELP "+a)}else this.selectedPanel.showMessage(b,"Help "+a);System.out.println(b)},"~S");c(b,"setRecentSimulation",function(a){null==a&&(a="<this structure>");this.recentSimulation=a},"~S");c(b,"setCreatingImage",function(a){this.pd().creatingImage=a},"~B");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,"advanceSpectrumBy",function(a){for(var b=this.panelNodes.size();0<=--b&&this.panelNodes.get(b).jsvp!==this.selectedPanel;);this.setFrameAndTreeNode(b+a);this.selectedPanel.getFocusNow(!1)},"~N");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,e=0;e<this.panelNodes.size();e++)if(null!=(b=this.panelNodes.get(e).pd().findMatchingPeakInfo(a))){c=this.panelNodes.get(e);
break}if(null==c)return;this.setNode(c)}a=b}else this.si.siSetSelectedPanel(a.getSource()),a=a.getPeakInfo();this.pd().addPeakHighlight(a);this.notifyJmol(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,"syncScript",function(a){JSV.common.SyncManager.syncFromJmol(this,a)},"~S");c(b,"syncToJmol",function(a){this.si.syncToJmol(a)},"~S");c(b,"notifyJmol",function(a){this.repaint(!0);JSV.common.SyncManager.syncToJmol(this,
a)},"JSV.common.PeakInfo");b.isJS=!1;b.isSwingJS=!1;b.jsmolObject=null});r("JSV.common");v(["JSV.common.Annotation","$.Coordinate"],"JSV.common.Measurement",null,function(){var b=p(function(){this.pt2=null;this.value=0;q(this,arguments)},JSV.common,"Measurement",JSV.common.Annotation);K(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()});e(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");e(b,"toString",function(){return"["+this.getXVal()+","+this.pt2.getXVal()+"]"})});r("JSV.common");v(["JU.Lst","JSV.api.AnnotationData"],"JSV.common.MeasurementData",["JU.AU","$.DF","JSV.common.Annotation","$.Parameters"],function(){var b=p(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);n(b,function(a,b){A(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});e(b,"getAType",function(){return this.type});e(b,"getState",function(){return this.isON});e(b,"setState",function(a){this.isON=a},"~B");c(b,"setMeasurements",function(){},"JU.Lst");e(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 e=Array(this.size()),f=this.size();0<=--f;)e[f]=B(-1,[""+(f+1),JU.DF.formatDecimalDbl(b[f][0],c),JU.DF.formatDecimalDbl(b[f][1],c),JU.DF.formatDecimalDbl(b[f][2],a)]);return e},"~S");c(b,"getMeasurementListArrayReal",function(a){a=this.spec.isNMR()&&a.equalsIgnoreCase("HZ");for(var b=JU.AU.newDouble2(this.size()),c=0,e=this.size();0<=
--e;){var f=this.get(e).getValue();a&&(f*=this.spec.getObservedFreq());b[c++]=O(-1,[this.get(e).getXVal(),this.get(e).getXVal2(),f])}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");e(b,"getSpectrum",
function(){return this.spec});e(b,"getData",function(){return this});c(b,"clear",function(a,b){for(var c=this.size();0<=--c;){var e=this.get(c);(0==e.text.length||e.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");e(b,"setSpecShift",function(a){for(var b=this.size();0<=--b;){var c=this.get(b),e=c.getXVal()+a;c.setXVal(e);c.setValue(e);c.text=JU.DF.formatDecimalDbl(e,this.precision)}},"~N");e(b,
"getGraphSetKey",function(){return this.key});e(b,"setGraphSetKey",function(a){this.key=a},"~S");e(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");e(b,"isDialog",function(){return!1});b.HEADER=B(-1,["","start","end","value"])});r("JSV.common");v(["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=p(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.creatingImage=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=!0;this.mouseY=this.mouseX=0;this.mousePeak=this.mouseSet=null;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.peakOverColor=this.peakTabColor=this.integralPlotColor=
this.gridColor=this.coordinatesColor=null;this.unitsDrawn=!1;q(this,arguments)},JSV.common,"PanelData",null,J.api.EventManager);K(b,function(){this.listeners=new JU.Lst;this.options=new java.util.Hashtable});n(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,e=null;if(a)return this.currentGraphSet.getInfo(b,this.getCurrentSpectrumIndex());var f=this.options.entrySet();if("".equals(b)){for(var e="type title nSets ",g,f=f.iterator();f.hasNext()&&((g=f.next())||1);)e+=g.getKey().name()+" ";c.put("KEYS",e)}else{for(f=f.iterator();f.hasNext()&&((g=f.next())||1);)JSV.common.Parameters.putInfo(b,c,g.getKey().name(),g.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()))}e=new JU.Lst;for(g=this.graphSets.size();0<=--g;)e.addLast(this.graphSets.get(g).getInfo(b,-1));c.put("sets",e);return c},"~B,~S");c(b,"setBooleans",function(a,b){if(null==b)for(var c,e=a.getBooleans().entrySet().iterator();e.hasNext()&&((c=e.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.setTitle(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,"setTitle",function(a){this.title=a},"~S");c(b,"addAnnotation",function(a){a=this.currentGraphSet.addAnnotation(a,this.getTitle());null!=a&&this.setTitle(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 e=this.currentGraphSet.selectPeakByFileIndex(a,b,c);if(null==e)for(var f=this.graphSets.size();0<=--f&&!(this.graphSets.get(f)!==this.currentGraphSet&&null!=(e=this.graphSets.get(f).selectPeakByFileIndex(a,b,c))););return e},"~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,e){e&&this.currentGraphSet.selectSpectrum(a,b,c);if("ID".equals(b))this.jumpToSpectrumIndex(this.getCurrentSpectrumIndex(),
!0);else for(e=0;e<this.graphSets.size();e++)this.graphSets.get(e)!==this.currentGraphSet&&this.graphSets.get(e).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,e,f,g,j){this.gMain=a;this.display1D=!this.isLinked&&this.getBoolean(JSV.common.ScriptToken.DISPLAY1D);
var l=50,m=this.isPrinting||this.doReset||this.thisWidth!=e||this.thisHeight!=f;m&&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.scalingFactor=1;this.isPrinting?(this.scalingFactor=10,j=!1):j?(l*=2,j=!1):(j=!this.creatingImage&&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 n=this.getBoolean(JSV.common.ScriptToken.POINTSONLY);this.unitsDrawn=this.titleDrawn=this.doReset=!1;this.thisWidth=e;this.thisHeight=f;for(var p=this.graphSets.size();0<=--p;)this.graphSets.get(p).drawGraphSet(a,b,c,e,f,this.left,this.right,40,l,m,this.taintedAll,n);if(this.isPrinting||this.creatingImage)this.titleDrawn=!0;this.isPrinting&&(this.titleOn&&!this.titleDrawn&&this.taintedAll)&&
this.drawTitle(a,(f+20)*this.scalingFactor,e*this.scalingFactor,this.getDrawTitle(!0,-1));j&&null!=this.coordStr&&this.drawCoordinates(b,40,this.thisWidth-this.right,20);g&&this.taintedAll&&this.printFilePath(a,this.left,f,null!=this.commonFilePath?this.commonFilePath:1==this.graphSets.size()&&null!=this.currentGraphSet.getTitle(!0)?this.getSpectrum().getFilePath():null);this.isPrinting&&this.printVersion(a,f);!this.testingJavaScript&&(this.isPrinting||a===b)?this.setTaintedAll():this.taintedAll=
!1},"~O,~O,~O,~N,~N,~B,~B");c(b,"drawCoordinates",function(a,b,c,e){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),e)},"~O,~N,~N,~N");c(b,"setFont",function(a,b,c,e,f){return this.g2d.setFont(a,this.getFont(a,b,c,e,f))},"~O,~N,~N,~N,~B");c(b,"printFilePath",function(a,b,c,e){if(null!=e){b*=this.scalingFactor;c*=this.scalingFactor;0<e.indexOf("?")&&(e=e.substring(e.indexOf("?")+1));
e=e.substring(e.lastIndexOf("/")+1);e=e.substring(e.lastIndexOf("\\")+1);this.g2d.setGraphicsColor(a,this.BLACK);var f=this.setFont(a,1E3,0,9,!0);b!=this.left*this.scalingFactor&&(b-=f.stringWidth(e));this.g2d.drawString(a,e,b,c-f.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),e=this.jsvp.getApiPlatform().getDateFormat(null)+" JSpecView "+JSV.common.JSVersion.VERSION_SHORT,f=c.stringWidth(e);this.g2d.drawString(a,
e,(this.thisWidth-this.right)*this.scalingFactor-f,b*this.scalingFactor+3*c.getHeight())},"~O,~N");c(b,"drawTitle",function(a,b,c,e){var f=this.getFont(a,c,this.isPrinting||this.getBoolean(JSV.common.ScriptToken.TITLEBOLDON)?1:0,14,!0),g=f.stringWidth(e);g>0.5*c&&(f=w(7*c/g),10>f&&(f=10),f=this.getFont(a,c,this.isPrinting||this.getBoolean(JSV.common.ScriptToken.TITLEBOLDON)?1:0,f,!0));this.g2d.setGraphicsColor(a,this.titleColor);this.setCurrentFont(this.g2d.setFont(a,f));b-=w(f.getHeight()*(this.isPrinting?
-0.2:this.creatingImage?1.2:0.4));this.g2d.drawString(a,e,this.isPrinting?this.left*this.scalingFactor:5,b)},"~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 e=this.graphSets.get(b).spectra,
f=0;f<e.size();f++,c++)(0>a||a==c)&&this.graphSets.get(b).setSelected(f)},"~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(),e=this.currentGraphSet!==a,f=e||this.currentSplitPoint!=c;this.currentGraphSet=
a;this.currentSplitPoint=c;(e||1<a.nSplit&&f)&&this.setSpectrum(c,!0);if(!e){e=a.checkSpectrumClickedEvent(this.mouseX,this.mouseY,this.clickCount);if(!e)return!1;this.currentSplitPoint=c=a.getCurrentSpectrumIndex();this.setSpectrum(c,!0)}this.jumpToSpectrumIndex(c,e||1<a.nSplit&&f);return e},"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,e,f,g,j,l){(null==a?this.currentGraphSet:a).addHighlight(b,c,e,this.g2d.getColor4(f,g,j,l))},"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,e){this.currentGraphSet.setZoom(a,b,c,e);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,e){this.currentGraphSet.setXPointer(a,b);this.currentGraphSet.setXPointer2(c,e)},"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,e,f){e*=this.scalingFactor;f?400>b&&(e=b*e/400):250>b&&(e=b*e/250);b=this.jsvp.getFontFaceID(this.isPrinting?this.printingFontName:this.displayFontName);return this.currentFont=
JU.Font.createFont3D(b,c,e,e,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,"clearMouseSet",function(a){null==a&&(this.mousePeak=null);null!=this.mouseSet&&this.mouseSet!==a&&this.mouseSet.mouseMovedEvent(2147483647,0);this.mouseSet=
a;null==a&&0<this.graphSets.size()&&(this.mouseSet=a=this.graphSets.get(this.graphSets.size()-1)).setSpectrumMovedTo(a.nSpectra-1)},"JSV.common.GraphSet");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&&(this.clearMouseSet(c),c=c.mouseMovedEvent(a,b),this.mousePeak!==c&&(this.mousePeak=c,this.setTaintedAll()))},"~N,~N");c(b,"doMouseClicked",function(a,b,
c){var e=JSV.common.GraphSet.findGraphSet(this.graphSets,a,b);null!=e&&(this.setCurrentGraphSet(e,b),e.mouseClickedEvent(a,b,this.clickCount,c),this.setTaintedAll(),this.repaint())},"~N,~N,~B");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.clearMouseSet(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,"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(!y(c,Exception))throw c;}}});c(b,"getDrawTitle",function(a,b){var c=null;a?c=this.printJobTitle:1==this.nSpectra?
c=this.getSpectrum().getPeakTitle():0<=b?c=this.getSpectrumAt(b).getPeakTitle():null!=this.viewTitle?(null!=this.currentGraphSet.getTitle(!1)&&(c=this.getSpectrum().getPeakTitle()),null==c&&(c=this.viewTitle)):c=this.jsvp.getTitle().trim();0<=c.indexOf("\n")&&(c=c.substring(0,c.indexOf("\n")).trim());return c},"~B,~N");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,e,f,g){if(!this.linking){this.linking=!0;for(var j=a.getSpectrumAt(0),l=this.graphSets.size();0<=--l;){var m=this.graphSets.get(l);m!==a&&JSV.common.Spectrum.areXScalesCompatible(j,this.graphSets.get(l).getSpectrumAt(0),!1,!0)&&m.doZoom(b,0,c,0,g,!1,f,!1,e)}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 e=this.graphSets.get(c);e!==a&&JSV.common.Spectrum.areXScalesCompatible(b,this.graphSets.get(c).getSpectrum(),!1,!0)&&e.clearViews()}this.linking=!1}},"JSV.common.GraphSet");c(b,"setlinkedXMove",function(a,b,c){if(!this.linking){this.linking=!0;for(var e=a.getSpectrum(),f=this.graphSets.size();0<=--f;){var g=this.graphSets.get(f);g!==a&&JSV.common.Spectrum.areXScalesCompatible(e,this.graphSets.get(f).getSpectrum(),!1,!0)&&null==g.imageView&&
(c?g.setXPixelMovedTo(1.7976931348623157E308,b,0,0):g.setXPixelMovedTo(b,1.7976931348623157E308,0,0))}this.linking=!1}},"JSV.common.GraphSet,~N,~B");c(b,"set2DCrossHairsLinked",function(a,b,c,e){for(var f=this.graphSets.size();0<=--f;){var g=this.graphSets.get(f);g!==a&&g.set2DXY(b,c,e)}},"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.addAlpha(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.PEAKOVERCOLOR:this.peakOverColor=
b.addAlpha(30);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.PEAKOVERCOLOR:return this.peakOverColor;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(),e=this.getSpectrumAt(a-1).getFilePath(),c=null!=c&&null!=e&&!c.equals(e),e=0;e<a;e++){var f=Array(3),g=this.getSpectrumAt(e),j=g.getTitle();c&&(j=JSV.common.JSVFileManager.getTagName(g.getFilePath())+" - "+j);g=this.getCurrentPlotColor(e);f[0]=new Integer(e+1);f[1]=g;f[2]=" "+j;b[e]=f}return b});c(b,"setColorOrFont",function(a,b){if(null==b){for(var c,e=a.elementColors.entrySet().iterator();e.hasNext()&&((c=e.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.showTitles,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.showTitles=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 e=this.getSpectrum(),f=this.vwr.getDialog(a,e);null==b&&a===JSV.common.Annotation.AType.Measurements&&(b=new JSV.common.MeasurementData(JSV.common.Annotation.AType.Measurements,e));null!=b&&f.setData(b);this.addDialog(c,a,f);f.reEnable();return f},"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,e,f,g,j,l,m){if(0!=m)return 1;this.g2d=this.g2d0;this.isPrinting=!0;C(a,"J.api.GenericGraphics")&&(this.g2d=a,a=this.gMain);this.printGraphPosition.equals("default")?l?(b=450,c=280):(b=280,c=450):this.printGraphPosition.equals("fit to page")||(l?(b=450,c=280,e=w(w(j-c)/2),f=w(w(g-b)/2)):(b=280,c=450,f=w(w(j-280)/2),e=w(w(g-450)/2)));this.setTaintedAll();this.g2d.translateScale(null,
e,f,0.1);null==a&&(a=(new java.awt.image.BufferedImage(w(c),w(b),2)).getGraphics());this.drawGraph(a,a,a,w(c),w(b),!1,!1);this.g2d!==this.g2d0&&a!==this.gMain&&a.dispose();this.g2d=this.g2d0;this.isPrinting=!1;return 0},"~O,~N,~N,~N,~N,~N,~N,~B,~N");e(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,e=!1;if(0==b)switch(a){case 37:case 39:this.doMouseMoved(39==
a?++this.mouseX:--this.mouseX,this.mouseY);this.repaint();e=!0;break;case 33:case 34:c=33==a?JSV.common.GraphSet.RT2:1/JSV.common.GraphSet.RT2;e=!0;break;case 40:case 38:e=40==a?-1:1,null==this.getSpectrumAt(0).getSubSpectra()?this.notifySubSpectrumChange(e,null):(this.advanceSubSpectrum(e),this.setTaintedAll(),this.repaint()),e=!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;e=!0;break;case 37:case 39:this.toPeak(39==
a?1:-1),e=!0}0!=c&&(this.scaleYBy(c),this.setTaintedAll(),this.repaint());return e},"~N,~N");e(b,"keyReleased",function(a){this.isPrinting||this.checkKeyControl(a,!1)},"~N");e(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");e(b,"mouseAction",
function(a,b,c,e,f,g){if(!this.isPrinting)switch(a){case 4:if(!this.checkMod(g,16))break;this.doMousePressed(c,e);break;case 5:this.doMouseReleased(c,e,this.checkMod(g,16));this.setTaintedAll();this.repaint();break;case 1:this.doMouseDragged(c,e);this.repaint();break;case 0:this.jsvp.getFocusNow(!1);if(0!=(g&28)){this.doMouseDragged(c,e);this.repaint();break}this.doMouseMoved(c,e);null!=this.coordStr&&this.repaint();break;case 2:if(this.checkMod(g,4)){this.jsvp.showMenu(c,e);break}this.ctrlPressed=
!1;this.doMouseClicked(c,e,this.updateControlPressed(g))}},"~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");e(b,"mouseEnterExit",function(a,b,c,e){if(e)this.thisWidget=null,this.isIntegralDrag=!1,
this.integralShiftMode=0;else try{this.jsvp.getFocusNow(!1)}catch(f){if(y(f,Exception))System.out.println("pd "+this+" cannot focus");else throw f;}},"~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 e=this.graphSets.size();0<=--e;)this.graphSets.get(e).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=s(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,e=JSV.common.PanelData.LinkMode.values();c<e.length&&((b=e[c])||1);c++)if(b.name().equalsIgnoreCase(a))return b;
return JSV.common.PanelData.LinkMode.NONE},"~S");j(b,"ALL",0,[]);j(b,"NONE",1,[]);j(b,"AB",2,[]);j(b,"ABC",3,[]);b=s(JSV.common.PanelData,"Mouse",Enum);j(b,"UP",0,[]);j(b,"DOWN",1,[])});r("JSV.common");v(null,"JSV.common.PanelNode",["JU.SB","JSV.common.Parameters"],function(){var b=p(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);n(b,function(a,
b,c,e){this.id=a;this.source=c;this.fileName=b;this.isSimulation=0<=c.getFilePath().indexOf("http://SIMULATION/");this.jsvp=e;null!=e&&(this.pd().getSpectrumAt(0).setId(a),this.frameTitle=e.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");e(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 e=b.get(c);if(a.equals(e.id)||a.equals(e.source.getSpectra().get(0).sourceID)||
e.source.matchesFilePath(a))return e.source}for(c=b.size();0<=--c;)if(e=b.get(c),a.equals(e.fileName))return e.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 e=a.get(c);e.isView||b.append(" ").append(e.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;)if(a.get(c).source.matchesFilePath(b)||b.equals(a.get(c).frameTitle))return c;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")});r("JSV.common");v(null,"JSV.common.Parameters",["java.util.Hashtable","JSV.common.ScriptToken"],function(){var b=p(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);n(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,e){null!=e&&JSV.common.Parameters.isMatch(a,c)&&b.put(null==a?c:a,e)},"~S,java.util.Map,~S,~O")});r("JSV.common");v(["JSV.common.MeasurementData"],"JSV.common.PeakData",["JU.DF","JSV.common.Coordinate","$.PeakPick"],function(){var b=p(function(){this.maxY=this.minY=this.thresh=0;q(this,arguments)},JSV.common,"PeakData",JSV.common.MeasurementData);c(b,"getThresh",function(){return this.thresh});
e(b,"getDataHeader",function(){return this.spec.isHNMR()?JSV.common.PeakData.HNMR_HEADER:B(-1,["peak",this.spec.getXUnits(),this.spec.getYUnits()])});e(b,"getMeasurementListArray",function(){for(var a=Array(this.size()),b=O(-1,[-1E100,1E100,1E100]),c,e=0,f=this.size();0<=--f;e++)c=this.spec.getPeakListArray(this.get(f),b,this.maxY),a[e]=2==c.length?B(-1,[""+(e+1),JU.DF.formatDecimalDbl(c[0],2),JU.DF.formatDecimalDbl(c[1],4)]):B(-1,[""+(e+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");e(b,"getMeasurementListArrayReal",function(){for(var a=O(this.size(),0),b=O(-1,[-1E100,1E100,1E100]),c=0,e=this.size();0<=--e;c++)a[c]=this.spec.getPeakListArray(this.get(e),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));
Q(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 e=this.spec.getXYCoords();if(!(3>e.length)){this.clear();null!=a&&(this.myParams.peakListInterpolation=a.peakListInterpolation,this.myParams.peakListThreshold=a.peakListThreshold);a=this.myParams.peakListInterpolation.equals("parabolic");var f=this.spec.isInverted();this.minY=c.minYOnScale;this.maxY=c.maxYOnScale;var g=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,l=O(-1,[e[0].getYVal(),j=e[1].getYVal(),0]),m=0;if(f)for(f=2;f<e.length;f++){var n=l[f%3]=e[f].getYVal();if(j<this.thresh&&(l[(f-2)%3]>j&&j<n)&&(j=a?JSV.common.Coordinate.parabolicInterpolation(e,f-1):e[f-1].getXVal(),j>=g||j<=c))if(j=(new JSV.common.PeakPick).setValue(j,n,this.spec,null,0),this.addLast(j),100==++m)break;j=n}else for(f=
2;f<e.length;f++){n=l[f%3]=e[f].getYVal();if(j>this.thresh&&(l[(f-2)%3]<j&&j>n)&&(j=a?JSV.common.Coordinate.parabolicInterpolation(e,f-1):e[f-1].getXVal(),j>=g&&j<=c&&(j=(new JSV.common.PeakPick).setValue(j,n,this.spec,JU.DF.formatDecimalDbl(j,b),j),this.addLast(j),100==++m)))break;j=n}}},"JSV.common.Parameters,~N,JSV.common.ScaleData");b.HNMR_HEADER=B(-1,"peak shift/ppm intens shift/hz diff/hz 2-diff 3-diff".split(" "))});r("JSV.common");v(null,"JSV.common.PeakInfo",["JU.PT"],function(){var b=p(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);n(b,function(a){if(null!=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("PeakInfo 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");e(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 w((this.px0+this.px1)/2)})});r("JSV.common");v(["JSV.common.Measurement"],"JSV.common.PeakPick",
null,function(){var b=s(JSV.common,"PeakPick",JSV.common.Measurement);c(b,"setValue",function(a,b,c,e,f){null==e?(this.set(a,b),this.setPt2(c,!1)):(this.setA(a,b,c,e,!1,!1,0,6),this.value=f,this.setPt2(this.getXVal(),this.getYVal()));return this},"~N,~N,JSV.common.Spectrum,~S,~N")});r("JSV.common");v(["java.util.EventObject"],"JSV.common.PeakPickEvent",null,function(){var b=p(function(){this.peakInfo=this.coord=null;q(this,arguments)},JSV.common,"PeakPickEvent",java.util.EventObject);n(b,function(a,
b,c){A(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});e(b,"toString",function(){return null==this.peakInfo?null:this.peakInfo.toString()})});r("JSV.common");v(["JSV.common.Coordinate","$.ScriptToken"],"JSV.common.PlotWidget",null,function(){var b=p(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);K(b,function(){this.color=JSV.common.ScriptToken.PLOTCOLOR});n(b,function(a){A(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");e(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")});r("JSV.common");z=p(function(){this.imageableWidth=this.imageableHeight=this.paperWidth=this.paperHeight=this.imageableY=this.imageableX=0;this.layout="landscape";this.position="fit to page";this.showTitles=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);K(z,function(){this.paperHeight=I(72*Math.min(11,
11.69));this.paperWidth=I(72*Math.min(8.5,8.27));this.imageableHeight=this.paperHeight;this.imageableWidth=this.paperWidth});n(z,function(b){null!=b&&(this.asPDF=!0,b.setDefaultPrintOptions(this))},"JSV.common.PanelData");r("JSV.common");v(null,"JSV.common.RepaintManager",["JSV.common.JSViewer"],function(){var b=p(function(){this.repaintPending=!1;this.vwr=null;q(this,arguments)},JSV.common,"RepaintManager",null);n(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.jsmolObject:null;null==b?this.vwr.selectedPanel.repaint():(b.repaint(a,!1),this.repaintDone());return!0});c(b,"repaintDone",function(){this.repaintPending=!1;this.notify()})});r("JSV.common");v(null,"JSV.common.ScaleData",["JSV.common.Coordinate"],function(){var b=p(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);K(b,function(){this.precision=
F(2,0);this.exportPrecision=F(2,0);this.steps=O(2,0);this.minorTickCounts=F(2,0)});n(b,function(){});n(b,function(a,b){this.startDataPointIndex=a;this.endDataPointIndex=b;this.pointCount=this.endDataPointIndex-this.startDataPointIndex+1},"~N,~N");n(b,function(a,b,c,e,f){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&&!e&&(this.minY=0);this.maxY=JSV.common.Coordinate.getMaxY(a,b,c);this.setScale(e,
f)},"~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,e){0==a&&0==b&&(b=1);this.isShiftZoomedY&&(a=this.minYOnScale,b=this.maxYOnScale);var f=this.setScaleParams(a,b,1),g=e?f/2:f/4;e=e?f/4:f/2;this.isShiftZoomedY||(this.minYOnScale=0==a?0:c?g*Math.floor(a/g):a,this.maxYOnScale=c?e*Math.ceil(1.05*b/e):b);this.firstY=0==a?0:Math.floor(a/g)*g;if(0>this.minYOnScale&&0<this.maxYOnScale)for(this.firstY=0;this.firstY-f>this.minYOnScale;)this.firstY-=f;else 0!=this.minYOnScale&&1E-4<Math.abs((a-this.firstY)/g)&&(this.firstY+=g);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,e,f,g,j,l){for(var m=0,n=0,m=f;m<=g;m++)if(b[m].getXVal()>=c){j[a]=m;n=1;break}for(;++m<=g&&b[m].getXVal()<=e;)n++;
l[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 e=Math.log10(Math.abs(a));b=w(Math.floor(e));this.exportPrecision[c]=b;this.precision[c]=0>=b?Math.min(8,1-b):3<b?-2:0;a=0;for(e=Math.pow(10,e-b);e>JSV.common.ScaleData.NTICKS[a];)a++;this.steps[c]=Math.pow(10,b)*JSV.common.ScaleData.NTICKS[a];e=Math.log10(Math.abs(100010*this.steps[c]));b=e-Math.floor(e);for(a=e=0;a<JSV.common.ScaleData.NTICKS.length;a++)if(0.001>Math.abs(b-JSV.common.ScaleData.LOGTICKS[a])){e=
JSV.common.ScaleData.NTICKS[a];break}this.minorTickCounts[c]=e;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,e){this.minX=a;this.maxX=b;this.minY=c;this.maxY=e},"~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,e){return this.toXScaled(a,c,e,(this.maxXOnScale-this.minXOnScale)/(c-b))},"~N,~N,~N,~B");c(b,"toXScaled",function(a,b,c,e){return c?this.maxXOnScale-(b-a)*e:this.minXOnScale+(b-a)*e},"~N,~N,~B,~N");c(b,"toPixelX",function(a,b,c,e){return this.toPixelXScaled(a,b,c,e,this.xFactorForScale)},"~N,~N,~N,~B");c(b,"toPixelX0",function(a,b,c,e){return this.toPixelXScaled(a,b,c,e,(this.maxXOnScale-this.minXOnScale)/
(c-b))},"~N,~N,~N,~B");c(b,"toPixelXScaled",function(a,b,c,e,f){a=w((a-this.minXOnScale)/f);return e?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-w(((a-this.spectrumYRef)*this.userYFactor+this.spectrumYRef-
this.minYOnScale)/this.yFactorForScale)},"~N,~N");c(b,"toPixelY0",function(a,b,c){return w(b+(this.maxYOnScale-a)/((this.maxYOnScale-this.minYOnScale)/(c-b)))},"~N,~N,~N");c(b,"setXYScale",function(a,b,c){var e=this.spectrumYRef,f=this.spectrumScaleFactor,g=1!=f||this.isShiftZoomedY,j=g?this.initMinYOnScale:this.minY,l=g?this.initMaxYOnScale:this.maxY;g&&e<j&&(e=j);g&&e>l&&(e=l);this.setYScale((j-e)/f+e,(l-e)/f+e,1==f,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,e,f,g){for(var j=0,l=a.size(),m=0;m<l;m++){var n=a.get(m).getXYCoords();JSV.common.ScaleData.getXRange(m,n,b,c,0,n.length-1,f,g)>=e&&j++}return j==l},"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 e=b.getValue(),f=e.indexOf("E");0<=f&&(e=e.substring(0,f));if(0>e.indexOf(".")||!e.endsWith("0")&&!e.endsWith("."))return}for(c=a.entrySet().iterator();c.hasNext()&&((b=c.next())||1);)e=b.getValue(),f=e.indexOf("E"),0<=f?b.setValue(e.substring(0,f-1)+e.substring(f)):b.setValue(e.substring(0,e.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=F(-1,[2,5,10,10]);b.LOGTICKS=O(-1,[Math.log10(2),Math.log10(5),0,1])});r("JSV.common");v(["java.lang.Enum"],"JSV.common.ScriptToken",["java.util.Hashtable","JU.Lst","$.PT","$.SB","JSV.common.ScriptTokenizer"],function(){var b=p(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)});n(b,function(){});n(b,function(a){this.tip=a;this.description=""},"~S");n(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 e=JSV.common.ScriptToken.getScriptToken(a);null!=e&&c.addLast(e)}else for(var f=JSV.common.ScriptToken.getParams().entrySet().iterator();f.hasNext()&&((e=f.next())||1);)(null==a||e.getKey().startsWith(a))&&null!=e.getValue().tip&&
c.addLast(e.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;j(b,"UNKNOWN",0,[]);j(b,"APPLETID",1,[]);j(b,"APPLETREADYCALLBACKFUNCTIONNAME",2,[]);j(b,"AUTOINTEGRATE",3,["TF","automatically integrate an NMR spectrum"]);j(b,"BACKGROUNDCOLOR",4,["C","set the background color"]);j(b,"CLOSE",5,["spectrumId or fileName or ALL or VIEWS or SIMULATIONS","close one or more views or simulations"]);j(b,"COMPOUNDMENUON",6,[]);j(b,"COORDCALLBACKFUNCTIONNAME",
7,[]);j(b,"COORDINATESCOLOR",8,["C","set the color of the coordinates shown in the upper right-hand corner"]);j(b,"COORDINATESON",9,["T","turn on or off the coordinates shown in the upper right-hand corner"]);j(b,"DEBUG",10,["TF","turn debugging on and off"]);j(b,"DEFAULTLOADSCRIPT",11,['"script..."',"set the script to be run after each file is loaded"]);j(b,"DEFAULTNMRNORMALIZATION",12,["maxYvalue","set the value to be given the largest peak in an HMR spectrum"]);j(b,"DISPLAYFONTNAME",13,[]);j(b,
"DISPLAY1D",14,["T","turn on or off display of 1D spectra when 1D and 2D spectra are loaded"]);j(b,"DISPLAY2D",15,["T","turn on or off display of the 2D spectrum when 1D and 2D spectra are loaded"]);j(b,"ENABLEZOOM",16,["T","allow or disallow zooming"]);j(b,"ENDINDEX",17,[]);j(b,"FINDX",18,["value","move the vertical-line cursor to a specific x-axis value"]);j(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"]);
j(b,"GETSOLUTIONCOLOR",20,[" FILL or FILLNONE or FILLALL or FILLALLNONE","estimate the solution color for UV/VIS spectra"]);j(b,"GRIDCOLOR",21,["C","color of the grid"]);j(b,"GRIDON",22,["T","turn the grid lines on or off"]);j(b,"HELP",23,["[command]","get this listing or help for a specific command"]);j(b,"HIDDEN",24,[]);j(b,"HIGHLIGHTCOLOR",25,["C","set the highlight color"]);j(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"]);
j(b,"INTEGRALOFFSET",27,["percent","sets the integral offset from baseline"]);j(b,"INTEGRALRANGE",28,["percent","sets the height of the total integration"]);j(b,"INTEGRATE",29,["","see INTEGRATION"]);j(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)"]);j(b,"INTEGRALPLOTCOLOR",31,["C","color of the integration line"]);j(b,"INTEGRATIONRATIOS",32,["'x:value,x:value,..'","annotate the spectrum with numbers or text at specific x values"]);
j(b,"INTERFACE",33,["SINGLE or OVERLAY","set how multiple spectra are displayed"]);j(b,"INVERTY",34,["","invert the Y axis"]);j(b,"IRMODE",35,["A or T or TOGGLE","set the IR mode to absorption or transmission"]);j(b,"JMOL",36,["...Jmol command...","send a command to Jmol (if present)"]);j(b,"JSV",37,[]);j(b,"LABEL",38,['x y [color and/or "text"]',"add a text label"]);j(b,"LINK",39,["AB or ABC or NONE or ALL","synchronize the crosshair of a 2D spectrum with 1D cursors"]);j(b,"LOAD",40,['[APPEND] "fileName" [first] [last]; use "" for current file; $H1/name or $C13/name for simulation',
"load a specturm"]);j(b,"LOADFILECALLBACKFUNCTIONNAME",41,[]);j(b,"LOADIMAGINARY",42,["TF","set TRUE to load imaginary NMR component"]);j(b,"MENUON",43,[]);j(b,"OBSCURE",44,[]);j(b,"OVERLAY",45,[]);j(b,"OVERLAYSTACKED",46,["TF","whether viewed spectra are shown separately, in a stack"]);j(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"]);j(b,"PEAKCALLBACKFUNCTIONNAME",
48,[]);j(b,"PEAKLIST",49,["[THRESHOLD=n] [INTERPOLATE=PARABOLIC or NONE]","creates a peak list based on a threshold value and parabolic or no interpolation"]);j(b,"PEAKOVERCOLOR",50,["C","sets the color of peak backgrounds when moused over"]);j(b,"PEAKTABCOLOR",51,["C","sets the color of peak marks for a peak listing"]);j(b,"PEAKTABSON",52,["T","show peak tabs for simulated spectra"]);j(b,"PLOTAREACOLOR",53,["C","sets the color of the plot background"]);j(b,"PLOTCOLOR",54,["C","sets the color of the graph line"]);
j(b,"PLOTCOLORS",55,["color,color,color,...","sets the colors of multiple plots"]);j(b,"POINTSONLY",56,["TF","show points only for all data"]);j(b,"PRINT",57,["","prints the current spectrum"]);j(b,"REVERSEPLOT",58,["T","reverses the x-axis of a spectrum"]);j(b,"SCALEBY",59,["factor","multiplies the y-scale of the spectrum by a factor"]);j(b,"SCALECOLOR",60,["C","sets the color of the x-axis and y-axis scales"]);j(b,"SCRIPT",61,["filename.jsv","runs a script from a file"]);j(b,"SELECT",62,["spectrumID, spectrumID,...",
"selects one or more spectra based on IDs"]);j(b,"SETPEAK",63,["xNew, xOld xNew, ?, or NONE","sets nearest peak to xOld ppm to a new value; NONE resets (1D NMR only)"]);j(b,"SETX",64,["xNew, xOld xNew, ?, or NONE","sets an old ppm position in the spectrum to a new value; NONE resets (1D NMR only)"]);j(b,"SHIFTX",65,["dx or NONE","shifts the x-axis of a 1D NMR spectrum by the given ppm; NONE resets (1D NMR only)"]);j(b,"SHOWERRORS",66,["shows recent errors"]);j(b,"SHOWINTEGRATION",67,["T","shows an integration listing"]);
j(b,"SHOWMEASUREMENTS",68,["T","shows a listing of measurements"]);j(b,"SHOWMENU",69,["displays the popup menu"]);j(b,"SHOWPEAKLIST",70,["T","shows a listing for peak picking"]);j(b,"SHOWPROPERTIES",71,["displays the header information of a JDX file"]);j(b,"SHOWSOURCE",72,["displays the source JDX file associated with the selected data"]);j(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"]);j(b,"SPECTRUMNUMBER",74,["n","displays the nth spectrum loaded"]);
j(b,"STACKOFFSETY",75,["percent","sets the y-axis offset of stacked spectra"]);j(b,"STARTINDEX",76,[]);j(b,"SYNCCALLBACKFUNCTIONNAME",77,[]);j(b,"SYNCID",78,[]);j(b,"TEST",79,[]);j(b,"TITLEON",80,["T","turns the title in the bottom left corner on or off"]);j(b,"TITLEBOLDON",81,["T","makes the title bold"]);j(b,"TITLECOLOR",82,["C","sets the color of the title"]);j(b,"TITLEFONTNAME",83,["fontName","sets the title font"]);j(b,"UNITSCOLOR",84,["C","sets the color of the x-axis and y-axis units"]);j(b,
"VERSION",85,[]);j(b,"VIEW",86,['spectrumID, spectrumID, ... Example: VIEW 3.1, 3.2  or  VIEW "acetophenone"',"creates a view of one or more spectra"]);j(b,"XSCALEON",87,["T","set FALSE to turn off the x-axis scale"]);j(b,"XUNITSON",88,["T","set FALSE to turn off the x-axis units"]);j(b,"YSCALE",89,["[ALL] lowValue highValue"]);j(b,"YSCALEON",90,["T","set FALSE to turn off the y-axis scale"]);j(b,"YUNITSON",91,["T","set FALSE to turn off the y-axis units"]);j(b,"WINDOW",92,[]);j(b,"WRITE",93,['[XY,DIF,DIFDUP,PAC,FIX,SQZ,AML,CML,JPG,PDF,PNG,SVG] "filename"',
"writes a file in the specified format"]);j(b,"ZOOM",94,["OUT or PREVIOUS or NEXT or x1,x2 or x1,y1 x2,y2","sets the zoom"]);j(b,"ZOOMBOXCOLOR",95,[]);j(b,"ZOOMBOXCOLOR2",96,[])});r("JSV.common");v(null,"JSV.common.ScriptTokenizer",["JU.PT"],function(){var b=p(function(){this.str=null;this.pt=-1;this.len=0;this.isCmd=!1;this.doCheck=!0;q(this,arguments)},JSV.common,"ScriptTokenizer",null);n(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)})});r("JSV.common");z=p(function(){this.isub=0;this.title=null;q(this,arguments)},JSV.common,"SubSpecChangeEvent",null);n(z,function(b,a){this.isub=b;this.title=a},"~N,~S");
c(z,"isValid",function(){return null!=this.title});c(z,"getSubIndex",function(){return this.isub});e(z,"toString",function(){return this.title});r("JSV.common");v(null,"JSV.common.SyncManager",["JU.PT","$.SB","JSV.common.PanelNode","JU.Logger"],function(){var b=s(JSV.common,"SyncManager",null);b.syncToJmol=c(b,"syncToJmol",function(a,b){a.peakInfoModelSentToJmol=b.getModel();a.si.syncToJmol(JSV.common.SyncManager.jmolSelect(a.pd(),b))},"JSV.common.JSViewer,JSV.common.PeakInfo");b.syncFromJmol=c(b,
"syncFromJmol",function(a,b){b.equals("TEST")&&(b=JSV.common.SyncManager.testScript);if(0>b.indexOf("<PeakData"))b.startsWith("JSVSTR:")?a.si.syncToJmol(b):(a.runScriptNow(b),0<=b.indexOf("#SYNC_PEAKS")&&JSV.common.SyncManager.syncToJmolPeaksAfterSyncScript(a));else{var c=JU.PT.getQuotedAttribute(b,"sourceID"),e,f,g,j,l;if(null==c){g=JU.PT.getQuotedAttribute(b,"file");j=JU.PT.getQuotedAttribute(b,"index");if(null==g||null==j)return;g=JU.PT.rep(g,"#molfile","");f=JU.PT.getQuotedAttribute(b,"model");
c=JU.PT.getQuotedAttribute(b,"src");e=null!=c&&c.startsWith("Jmol")?null:a.peakInfoModelSentToJmol;if(null!=f&&null!=e&&!f.equals(e)){JU.Logger.info("JSV ignoring model "+f+"; should be "+e);return}a.peakInfoModelSentToJmol=null;if(0==a.panelNodes.size()||!a.checkFileAlreadyLoaded(g))JU.Logger.info("file "+g+" not found -- JSViewer closing all and reopening"),a.si.siSyncLoad(g);e=JU.PT.getQuotedAttribute(b,"type");l=null}else g=null,j=f=c,l=","+JU.PT.getQuotedAttribute(b,"atom")+",",e="ID";j=JSV.common.SyncManager.selectPanelByPeak(a,
g,j,l);l=a.pd();l.selectSpectrum(g,e,f,!0);a.si.siSendPanelChange();l.addPeakHighlight(j);a.repaint(!0);(null==c||null!=j&&null!=j.getAtoms())&&a.si.syncToJmol(JSV.common.SyncManager.jmolSelect(a.pd(),j))}},"JSV.common.JSViewer,~S");b.syncToJmolPeaksAfterSyncScript=c(b,"syncToJmolPeaksAfterSyncScript",function(a){var b=a.currentSource;if(null!=b)try{var c="file="+JU.PT.esc(b.getFilePath()),e=b.getSpectra(),f=e.get(e.size()-1).getPeakList(),g=new JU.SB;g.append("[");for(var j=f.size(),b=0;b<j;b++){var l=
f.get(b).toString(),l=l+" "+c;g.append(JU.PT.esc(l));0<b&&g.append(",")}g.append("]");a.si.syncToJmol("Peaks: "+g)}catch(m){if(!y(m,Exception))throw m;}},"JSV.common.JSViewer");b.selectPanelByPeak=c(b,"selectPanelByPeak",function(a,b,c,e){var f=a.panelNodes;if(null==f)return null;for(var g=null,j=f.size();0<=--j;)f.get(j).pd().addPeakHighlight(null);g=a.pd().selectPeakByFileIndex(b,c,e);if(null!=g)a.setNode(JSV.common.PanelNode.findNode(a.selectedPanel,f));else for(j=f.size();0<=--j;){var l=f.get(j);
if(null!=(g=l.pd().selectPeakByFileIndex(b,c,e))){a.setNode(l);break}}return g},"JSV.common.JSViewer,~S,~S,~S");b.jmolSelect=c(b,"jmolSelect",function(a,b){var c="IR".equals(b.getType())||"RAMAN".equals(b.getType())?"vibration ON; selectionHalos OFF;":"vibration OFF; selectionhalos "+(null==b.getAtoms()?"OFF":"ON");return"Select: "+b+' script="'+c+' " sourceID="'+a.getSpectrum().sourceID+'"'},"JSV.common.PanelData,JSV.common.PeakInfo");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"'});
r("JSV.common");v(null,"JSV.common.ViewData",["JSV.common.Coordinate","$.ScaleData"],function(){var b=p(function(){this.thisScale=this.scaleData=null;this.iThisScale=this.nSpectra=0;this.spectra=null;q(this,arguments)},JSV.common,"ViewData",null);n(b,function(a,b,c,e,f,g,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(e[j],f[j]);this.init(a,b,c,g)},"JU.Lst,~N,~N,~A,~A,~B,~B");n(b,function(a,b,c,e){this.nSpectra=
a.size();var f=a.get(0).getXYCoords().length;this.scaleData=Array(1);this.scaleData[0]=new JSV.common.ScaleData(0,f-1);this.init(a,b,c,e)},"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,e){null==a?a=this.spectra:this.spectra=a;this.thisScale=this.scaleData[this.iThisScale=0];for(var f=0;f<this.scaleData.length;f++)this.scaleData[f].userYFactor=a.get(f).getUserYFactor(),this.scaleData[f].spectrumYRef=
a.get(f).getYRef();this.resetScaleFactors();var g=JSV.common.Coordinate.getMinX(a,this),j=JSV.common.Coordinate.getMaxX(a,this),l=JSV.common.Coordinate.getMinYUser(a,this),m=JSV.common.Coordinate.getMaxYUser(a,this);b!=c&&(l=b,m=c,l>m&&(f=l,l=m,m=f));a=a.get(0).isInverted();for(f=0;f<this.scaleData.length;f++)this.scaleData[f].setMinMax(g,j,l,m),this.scaleData[f].setScale(e,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,e,f,g){for(var j=0,l=0,j=f;j<=g;j++)if(f=b[j].getXVal(),f>=c){this.scaleData[a%this.scaleData.length].startDataPointIndex=j;break}for(;j<=g&&!(f=b[j].getXVal(),l++,f>=e);j++);this.scaleData[a%this.scaleData.length].endDataPointIndex=j;return l},"~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,e){this.iThisScale=a%this.scaleData.length;this.thisScale=this.scaleData[this.iThisScale];this.thisScale.setXYScale(b,c,e)},"~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,e){if(b)return this.scaleData;a%=this.scaleData.length;b=(c-this.thisScale.minYOnScale)/(this.thisScale.maxYOnScale-this.thisScale.minYOnScale);
e=(e-this.thisScale.minYOnScale)/(this.thisScale.maxYOnScale-this.thisScale.minYOnScale);c=Array(this.scaleData.length);for(var f=0;f<this.scaleData.length;f++)c[f]=0<=a&&f!=a?this.scaleData[f]:new JSV.common.ScaleData;JSV.common.ScaleData.copyScaleFactors(this.scaleData,c);JSV.common.ScaleData.copyYScales(this.scaleData,c);for(f=0;f<this.scaleData.length;f++)0<=a&&f!=a||(c[f].isShiftZoomedY=!0,c[f].minYOnScale=this.scaleData[f].minYOnScale*(1-b)+b*this.scaleData[f].maxYOnScale,c[f].maxYOnScale=this.scaleData[f].minYOnScale*
(1-e)+e*this.scaleData[f].maxYOnScale);return c},"~N,~B,~N,~N")});r("JSV.common");E(JSV.common,"XYScaleConverter");r("JSV.common");s(JSV.common,"ZoomEvent",null);r("JSV.dialog");v(["JSV.api.AnnotationData","JSV.common.Annotation"],"JSV.dialog.JSVDialog",["JU.DF","$.PT","JSV.common.IntegralData","$.PeakData","JSV.dialog.DialogManager"],function(){var b=p(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.iSelected=this.iRowColSelected=-1;this.skipCreate=!1;this.iColSelected=this.iRowSelected=-1;q(this,arguments)},JSV.dialog,"JSVDialog",JSV.common.Annotation,JSV.api.AnnotationData);e(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");e(b,"getAType",function(){return this.type});e(b,"getGraphSetKey",function(){return this.graphSetKey});e(b,
"setGraphSetKey",function(a){this.graphSetKey=a},"~S");e(b,"getSpectrum",function(){return this.$spec});e(b,"getState",function(){return this.isON});e(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,"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");e(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.dialog.setSelectedIndex(this.combo1,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 e=1E100;a=a.getXVal();var f=this.xyData;b=Math.abs(b/20);for(var g=f.size();0<=--g;){var j=Math.abs(a-f.get(g).getXVal());j<e&&(e=j,c=g)}e<b&&(this.selectTableRow(f.size()-
2-c),this.repaint())}},"JSV.common.Coordinate,~N,~N");e(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");e(b,"setSpecShift",function(a){null!=this.xyData&&this.xyData.setSpecShift(a)},"~N");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(e){if(!y(e,Exception))throw e;}},"~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]=50,b[1]=50);var c=this.manager.getLocationOnScreen(a);a.getHeight();this.loc=F(-1,[Math.max(0,c[0]+b[0]),Math.max(0,c[1]+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(!y(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=w(this.iRowColSelected/1E3),b=this.iRowColSelected%1E3,this.iRowColSelected=-1);var c=this.tableData[a][1],e=1E3*a+b;if(e!=this.iRowColSelected){this.iRowColSelected=e;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 f=Double.parseDouble(c),g=Double.parseDouble(this.tableData[a+3-b][1]);this.jsvp.getPanelData().setXPointers(this.$spec,f,this.$spec,g);break;default:this.jsvp.getPanelData().findX(this.$spec,Double.parseDouble(c))}}catch(j){if(y(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(l){if(!y(l,Exception))throw l;}}},"~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=F(-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=F(-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=F(-1,[40,65,50,50,50,50,50]);this.createTable(a,b,c);this.setTableSelectionEnabled(!0);break;case JSV.common.Annotation.AType.OverlayLegend:b=B(-1,["No.","Plot Color","Title"]),a=this.vwr.selectedPanel.getPanelData().getOverlayLegendData(),c=F(-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(!y(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+"=",e=a.indexOf(c);return 0>e?null:a.substring(e+c.length,a.indexOf("&",e+1))},"~S,~S")});r("JSV.exception");v(["java.lang.Exception"],"JSV.exception.JSVException",null,function(){s(JSV.exception,
"JSVException",Exception)});r("JSV.js2d");z=s(JSV.js2d,"Display",null);z.getFullScreenDimensions=c(z,"getFullScreenDimensions",function(b,a){a[0]=b.width;a[1]=b.height},"~O,~A");z.hasFocus=c(z,"hasFocus",function(){return!0},"~O");z.requestFocusInWindow=c(z,"requestFocusInWindow",function(){},"~O");z.repaint=c(z,"repaint",function(){},"~O");z.renderScreenImage=c(z,"renderScreenImage",function(){},"J.api.PlatformViewer,~O,~O");z.setTransparentCursor=c(z,"setTransparentCursor",function(){},"~O");z.setCursor=
c(z,"setCursor",function(){},"~N,~O");z.prompt=c(z,"prompt",function(b,a){var c=prompt(b,a);return null!=c?c:"null"},"~S,~S,~A,~B");z.convertPointFromScreen=c(z,"convertPointFromScreen",function(){},"~O,JU.P3");r("JSV.js2d");z=s(JSV.js2d,"Image",null);z.getWidth=c(z,"getWidth",function(b){return b.imageWidth?b.imageWidth:b.width},"~O");z.getHeight=c(z,"getHeight",function(b){return b.imageHeight?b.imageHeight:b.height},"~O");z.grabPixels=c(z,"grabPixels",function(b,a,c){var e=null;if(b._buf32)return b._buf32;
e=b.getImageData(0,0,a,c).data;return JSV.js2d.Image.toIntARGB(e)},"~O,~N,~N");z.toIntARGB=c(z,"toIntARGB",function(b){for(var a=w(b.length/4),c=F(a,0),e=0,k=0;e<a;k++)c[e++]=b[k++]<<16|b[k++]<<8|b[k++]|4278190080;return c},"~A");z.fromIntARGB=c(z,"fromIntARGB",function(b,a){for(var c=a.length>>2,e=0,k=0;e<c;e++)a[k++]=b[e]>>16&255,a[k++]=b[e]>>8&255,a[k++]=b[e]&255,a[k++]=255},"~A,~A");z.getTextPixels=c(z,"getTextPixels",function(b,a,c,e,k,f){c.fillStyle="#000000";c.fillRect(0,0,e,k);c.fillStyle=
"#FFFFFF";c.font=a.font;c.fillText(b,0,f);return JSV.js2d.Image.grabPixels(c,e,k)},"~S,JU.Font,~O,~N,~N,~N");z.allocateRgbImage=c(z,"allocateRgbImage",function(b,a,c,e,k,f){null==f&&(f={width:b,height:a});f.buf32=c},"~N,~N,~A,~N,~B,~O");z.getStaticGraphics=c(z,"getStaticGraphics",function(b){return JSV.js2d.Image.getGraphics(b)},"~O,~B");z.getGraphics=c(z,"getGraphics",function(b){return b.getContext("2d")},"~O");z.drawImage=c(z,"drawImage",function(b,a,c,e){this.fromIntARGB(a.buf32,a.buf8);b.putImageData(a.imgdata,
c,e)},"~O,~O,~N,~N,~N,~N");r("JSV.js2d");v(["J.api.GenericFileInterface"],"JSV.js2d.JsFile",["JU.PT","JSV.common.JSVFileManager"],function(){var b=p(function(){this.fullName=this.name=null;q(this,arguments)},JSV.js2d,"JsFile",null,J.api.GenericFileInterface);n(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");e(b,"getParentAsFile",function(){var a=this.fullName.lastIndexOf("/");return 0>a?null:new JSV.js2d.JsFile(this.fullName.substring(0,a))});e(b,"getFullPath",function(){return this.fullName});e(b,"getName",function(){return this.name});e(b,"isDirectory",function(){return this.fullName.endsWith("/")});e(b,"length",function(){return 0});b.getURLContents=c(b,"getURLContents",function(a,
b,c){try{var e=a.openConnection();null!=b?e.outputBytes(b):null!=c&&("{"==c.charAt(0)&&(c=c.$replace("\n","\\n")),e.outputString(c));return e.getContents()}catch(f){if(y(f,Exception))return f.toString();throw f;}},"java.net.URL,~A,~S")});r("JSV.js2d");v(["JSV.api.JSVFileHelper"],"JSV.js2d.JsFileHelper",["JU.PT","JSV.common.JSViewer","JSV.js2d.JsFile"],function(){var b=p(function(){this.vwr=null;q(this,arguments)},JSV.js2d,"JsFileHelper",null,JSV.api.JSVFileHelper);e(b,"set",function(a){this.vwr=a;
return this},"JSV.common.JSViewer");e(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");e(b,"setDirLastExported",function(a){return a},"~S");e(b,"setFileChooser",function(){},"JSV.common.ExportType");e(b,"showFileOpenDialog",function(a,b){JSV.common.JSViewer.jsmolObject.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 e=null==c?null:"",f=!1,f=c[0],e=c[1];this.vwr.si.siOpenDataOrFile(String.instantialize(b),"cache://"+a,null,null,-1,-1,f,null,null);null!=e&&this.vwr.runScript(e)}},"~S,~O,~A");e(b,"getUrlFromDialog",function(a,b){return prompt(a,b)},"~S,~S")});r("JSV.js2d");z=s(JSV.js2d,"JsFont",null);z.newFont=c(z,"newFont",function(b,a,c,e,k){b=b.equals("Monospaced")?"Courier":b.startsWith("Sans")?"Sans-Serif":"Serif";return(a?"bold ":"")+(c?"italic ":"")+e+k+" "+b},"~S,~B,~B,~N,~S");
z.getFontMetrics=c(z,"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");z.getAscent=c(z,"getAscent",function(b){return Math.ceil(b._fontAscent)},"~O");z.getDescent=c(z,"getDescent",function(b){return Math.ceil(b._fontDescent)},"~O");z.stringWidth=c(z,"stringWidth",function(b,a){b.fontMetrics.font=b.font;return Math.ceil(b.fontMetrics.measureText(a).width)},"JU.Font,~S");
r("JSV.js2d");v(["J.api.GenericGraphics"],"JSV.js2d.JsG2D",["JU.CU","JSV.common.JSViewer","JS.Color"],function(){var b=p(function(){this.windowHeight=this.windowWidth=0;this.inPath=this.isShifted=!1;q(this,arguments)},JSV.js2d,"JsG2D",null,J.api.GenericGraphics);e(b,"getColor4",function(a,b,c,e){return JS.Color.get4(a,b,c,e)},"~N,~N,~N,~N");e(b,"getColor3",function(a,b,c){return JS.Color.get3(a,b,c)},"~N,~N,~N");e(b,"getColor1",function(a){return JS.Color.get1(a)},"~N");e(b,"newGrayScaleImage",function(a,
b,c,e,f){return JSV.common.JSViewer.jsmolObject.newGrayScaleImage(a,b,c,e,f)},"~O,~O,~N,~N,~A");e(b,"drawGrayScaleImage",function(a,b,c,e,f,g,j,l,m,n){a=f-c+1;g=g-e+1;m=m-j+1;n=n-l+1;f=b.w*a/m;var p=b.h*g/n;b.width=f;b.height=p;var q=b.div;b=b.layer;b.style.left=c+"px";b.style.top=e+"px";b.style.width=a+"px";b.style.height=g+"px";q.style.left=-j*a/m+"px";q.style.top=-l*g/n+"px";q.style.width=f+"px";q.style.height=p+"px"},"~O,~O,~N,~N,~N,~N,~N,~N,~N,~N");e(b,"drawLine",function(a,b,c,e,f){var g=this.inPath;
g||a.beginPath();a.moveTo(b,c);a.lineTo(e,f);g||a.stroke()},"~O,~N,~N,~N,~N");e(b,"drawCircle",function(a,b,c,e){e/=2;a.beginPath();a.arc(b+e,c+e,e,0,2*Math.PI,!1);a.stroke()},"~O,~N,~N,~N");e(b,"drawPolygon",function(a,b,c,e){this.doPoly(a,b,c,e,!1)},"~O,~A,~A,~N");c(b,"doPoly",function(a,b,c,e,f){a.beginPath();a.moveTo(b[0],c[0]);for(var g=1;g<e;g++)a.lineTo(b[g],c[g]);f?a.fill():a.stroke()},"~O,~A,~A,~N,~B");e(b,"drawRect",function(a,b,c,e,f){a.beginPath();a.rect(b,c,e,f);a.stroke()},"~O,~N,~N,~N,~N");
e(b,"drawString",function(a,b,c,e){a.fillText(b,c,e)},"~O,~S,~N,~N");e(b,"drawStringRotated",function(){},"~O,~S,~N,~N,~N");e(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");e(b,"fillCircle",function(a,b,c,e){e/=2;a.beginPath();a.arc(b+e,c+e,e,0,2*Math.PI,!1);a.fill()},"~O,~N,~N,~N");
e(b,"fillPolygon",function(a,b,c,e){this.doPoly(a,b,c,e,!0)},"~O,~A,~A,~N");e(b,"fillRect",function(a,b,c,e,f){a.fillRect(b,c,e,f)},"~O,~N,~N,~N,~N");e(b,"setGraphicsColor",function(a,b){var c=JU.CU.toCSSString(b);a.fillStyle=a.strokeStyle=c},"~O,javajs.api.GenericColor");e(b,"setFont",function(a,b){var c=b.getInfo(),e=c.indexOf(" "),c=c.substring(0,e)+"px"+c.substring(e);a.font=c;return b},"~O,JU.Font");e(b,"setStrokeBold",function(a,b){a.lineWidth=b?2:1},"~O,~B");e(b,"setWindowParameters",function(a,
b){this.windowWidth=a;this.windowHeight=b},"~N,~N");e(b,"translateScale",function(){},"~O,~N,~N,~N");e(b,"canDoLineTo",function(){return!0});e(b,"doStroke",function(a,b){(this.inPath=b)?a.beginPath():a.stroke()},"~O,~B");e(b,"lineTo",function(a,b,c){a.lineTo(b,c)},"~O,~N,~N")});r("JSV.js2d");v(["JSV.api.JSVPanel"],"JSV.js2d.JsPanel",["JSV.common.JSViewer","$.PanelData","JU.Font","$.Logger"],function(){var b=p(function(){this.bgcolor=this.name=this.vwr=this.mouse=this.pd=this.apiPlatform=null;q(this,
arguments)},JSV.js2d,"JsPanel",null,JSV.api.JSVPanel);n(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");e(b,"getApiPlatform",function(){return this.apiPlatform});e(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");e(b,"getTitle",function(){return this.pd.getTitle()});e(b,"dispose",function(){null!=this.pd&&this.pd.dispose();this.pd=null;this.mouse.dispose();this.mouse=null});e(b,"setTitle",function(a){this.pd.setTitle(a);this.name=a},"~S");c(b,"setColorOrFont",function(a,b){this.pd.setColorOrFont(a,b)},"JSV.common.ColorParameters,JSV.common.ScriptToken");e(b,"setBackgroundColor",
function(a){this.bgcolor=a},"javajs.api.GenericColor");e(b,"getInput",function(a,b,c){b=null;b=prompt(a,c);this.getFocusNow(!0);return b},"~S,~S,~S");e(b,"showMessage",function(a,b){JU.Logger.info(a);this.vwr.html5Applet._showStatus(a,b);this.getFocusNow(!0)},"~S,~S");e(b,"getFocusNow",function(){null!=this.pd&&this.pd.dialogsToFront(null)},"~B");e(b,"getFontFaceID",function(){return JU.Font.getFontFaceID("SansSerif")},"~S");e(b,"doRepaint",function(a){null!=this.pd&&(a&&this.pd.setTaintedAll(),this.pd.isPrinting||
this.vwr.requestRepaint())},"~B");e(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,!1),this.vwr.repaintDone()))},
"~O");e(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(e){if(y(e,Exception))this.showMessage(e.toString(),"creating PDF");else throw e;}finally{this.pd.setPrint(null,null)}},"JSV.common.PrintLayout,java.io.OutputStream,~S");e(b,"saveImage",function(a,b,c){a=b.getName();null!=c&&c.cancel();JSV.common.JSViewer.jsmolObject.saveImage(this.vwr.html5Applet,
"png",a);return"OK"},"~S,J.api.GenericFileInterface,JU.OC,~N,~N");e(b,"hasFocus",function(){return!1});e(b,"repaint",function(){});e(b,"setToolTipText",function(a){var b=this.pd.mouseX,c=this.pd.mouseY,e=this.vwr.html5Applet;e._showTooltip&&e._showTooltip(a,b,c)},"~S");e(b,"getHeight",function(){return this.vwr.getHeight()});e(b,"getWidth",function(){return this.vwr.getWidth()});e(b,"isEnabled",function(){return!1});e(b,"isFocusable",function(){return!1});e(b,"isVisible",function(){return!1});e(b,
"setEnabled",function(){},"~B");e(b,"setFocusable",function(){},"~B");e(b,"toString",function(){return null==this.pd?"<closed>":""+this.pd.getSpectrumAt(0)});e(b,"processMouseEvent",function(a,b,c,e,f){return null!=this.mouse&&this.mouse.processEvent(a,b,c,e,f)},"~N,~N,~N,~N,~N");e(b,"processTwoPointGesture",function(a){null!=this.mouse&&this.mouse.processTwoPointGesture(a)},"~A");e(b,"processKeyEvent",function(a){null!=this.mouse&&this.mouse.processKeyEvent(a)},"~O");e(b,"showMenu",function(a,b){this.vwr.showMenu(a,
b)},"~N,~N")});r("JSV.js2d");v(["JSV.common.ColorParameters"],"JSV.js2d.JsParameters",["JS.Color"],function(){var b=s(JSV.js2d,"JsParameters",JSV.common.ColorParameters);n(b,function(){A(this,JSV.js2d.JsParameters,[])});e(b,"isValidFontName",function(){return!0},"~S");e(b,"getColor1",function(a){return JS.Color.get1(a)},"~N");e(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")});
r("JSV.js2d");v(["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=p(function(){this.context=this.viewer=this.canvas=null;q(this,arguments)},JSV.js2d,"JsPlatform",null,J.api.GenericPlatform);e(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(e){}},"J.api.PlatformViewer,~O");e(b,"isSingleThreaded",function(){return!0});e(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");e(b,"isHeadless",function(){return!1});e(b,"getMouseManager",function(a,b){return new JSV.app.GenericMouse(b)},"~N,~O");e(b,"convertPointFromScreen",function(a,b){JSV.js2d.Display.convertPointFromScreen(a,
b)},"~O,JU.P3");e(b,"getFullScreenDimensions",function(a,b){JSV.js2d.Display.getFullScreenDimensions(a,b)},"~O,~A");e(b,"getMenuPopup",function(){return null},"~S,~S");e(b,"hasFocus",function(a){return JSV.js2d.Display.hasFocus(a)},"~O");e(b,"prompt",function(a,b,c,e){return JSV.js2d.Display.prompt(a,b,c,e)},"~S,~S,~A,~B");e(b,"renderScreenImage",function(a,b){JSV.js2d.Display.renderScreenImage(this.viewer,a,b)},"~O,~O");e(b,"drawImage",function(a,b,c,e,f,g){JSV.js2d.Image.drawImage(a,b,c,e,f,g)},
"~O,~O,~N,~N,~N,~N,~B");e(b,"requestFocusInWindow",function(a){JSV.js2d.Display.requestFocusInWindow(a)},"~O");e(b,"repaint",function(a){JSV.js2d.Display.repaint(a)},"~O");e(b,"setTransparentCursor",function(a){JSV.js2d.Display.setTransparentCursor(a)},"~O");e(b,"setCursor",function(a,b){JSV.js2d.Display.setCursor(a,b)},"~N,~O");e(b,"allocateRgbImage",function(a,b,c,e,f,g){return JSV.js2d.Image.allocateRgbImage(a,b,c,e,f,g?null:this.canvas)},"~N,~N,~A,~N,~B,~B");e(b,"notifyEndOfRendering",function(){});
e(b,"createImage",function(){return null},"~O");e(b,"disposeGraphics",function(){},"~O");e(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");e(b,"drawImageToBuffer",function(a,b,c,e,f){return this.grabPixels(c,e,f,null)},"~O,~O,~O,~N,~N,~N");e(b,"getTextPixels",function(a,b,c,e,f,g,j){return JSV.js2d.Image.getTextPixels(a,b,c,f,g,j)},
"~S,JU.Font,~O,~O,~N,~N,~N");e(b,"flushImage",function(){},"~O");e(b,"getGraphics",function(a){return null==a?this.context:this.context=JSV.js2d.Image.getGraphics(this.canvas=a)},"~O");e(b,"getImageHeight",function(a){return null==a?-1:JSV.js2d.Image.getHeight(a)},"~O");e(b,"getImageWidth",function(a){return null==a?-1:JSV.js2d.Image.getWidth(a)},"~O");e(b,"getStaticGraphics",function(a,b){return JSV.js2d.Image.getStaticGraphics(a,b)},"~O,~B");e(b,"newBufferedImage",function(a,b,c){return self.Jmol&&
Jmol._getHiddenCanvas?Jmol._getHiddenCanvas(this.vwr.html5Applet,"stereoImage",b,c):null},"~O,~N,~N");e(b,"newOffScreenImage",function(a,b){return self.Jmol&&Jmol._getHiddenCanvas?Jmol._getHiddenCanvas(this.vwr.html5Applet,"textImage",a,b):null},"~N,~N");e(b,"waitForDisplay",function(){return!1},"~O,~O");e(b,"fontStringWidth",function(a,b){return JSV.js2d.JsFont.stringWidth(a,b)},"JU.Font,~S");e(b,"getFontAscent",function(a){return JSV.js2d.JsFont.getAscent(a)},"~O");e(b,"getFontDescent",function(a){return JSV.js2d.JsFont.getDescent(a)},
"~O");e(b,"getFontMetrics",function(a,b){return JSV.js2d.JsFont.getFontMetrics(a,b)},"JU.Font,~O");e(b,"newFont",function(a,b,c,e){return JSV.js2d.JsFont.newFont(a,b,c,e,"px")},"~S,~B,~B,~N");e(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");e(b,"newFile",function(a){return new JSV.js2d.JsFile(a)},"~S");e(b,"getBufferedFileInputStream",function(){return null},"~S");e(b,"getURLContents",function(a,b,c,e){a=JSV.js2d.JsFile.getURLContents(a,b,c);try{return!e?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(f){if(y(f,Exception))return""+f;throw f;}},"java.net.URL,~A,~S,~B");e(b,"getLocalUrl",function(){return null},"~S");e(b,"getImageDialog",function(){return null},"~S,java.util.Map");e(b,"forceAsyncLoad",function(){return!1},"~S");e(b,"getInChI",function(){return null});e(b,"confirm",function(a,b){var c=!1;null!=b&&(c=!1);return c?1:2},"~S,~S")});r("JSV.js2d");v(["JSV.api.JSVMainPanel"],"JSV.js2d.JsMainPanel",
null,function(){var b=p(function(){this.mainSelectedPanel=null;this.currentPanelIndex=0;this.title=null;this.enabled=this.focusable=this.visible=!1;q(this,arguments)},JSV.js2d,"JsMainPanel",null,JSV.api.JSVMainPanel);e(b,"getCurrentPanelIndex",function(){return this.currentPanelIndex});e(b,"dispose",function(){});e(b,"getTitle",function(){return this.title});e(b,"setTitle",function(a){this.title=a},"~S");c(b,"getHeight",function(){return null==this.mainSelectedPanel?0:this.mainSelectedPanel.getHeight()});
c(b,"getWidth",function(){return null==this.mainSelectedPanel?0:this.mainSelectedPanel.getWidth()});e(b,"isEnabled",function(){return this.enabled});e(b,"isFocusable",function(){return this.focusable});e(b,"isVisible",function(){return this.visible});e(b,"setEnabled",function(a){this.enabled=a},"~B");e(b,"setFocusable",function(a){this.focusable=a},"~B");e(b,"setSelectedPanel",function(a,b,c){b!==this.mainSelectedPanel&&(this.mainSelectedPanel=b);a=a.selectPanel(b,c);0<=a&&(this.currentPanelIndex=
a);this.visible=!0},"JSV.common.JSViewer,JSV.api.JSVPanel,JU.Lst")});r("JSV.source");v(["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=p(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(!y(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++]=B(-1,["##.OBSERVE FREQUENCY",""+this.observedFreq]));""!==this.observedNucl&&(b[a++]=B(-1,["##.OBSERVE NUCLEUS",this.observedNucl]));b[a++]=B(-1,["##XUNITS",this.$isHZtoPPM?"HZ":this.xUnits]);b[a++]=B(-1,["##YUNITS",this.yUnits]);var c=this.xIncreases?this.getFirstX():this.getLastX();b[a++]=B(-1,["##FIRSTX",String.valueOf(this.isHZtoPPM()?c*this.observedFreq:
c)]);c=this.xIncreases?this.getLastX():this.getFirstX();b[a++]=B(-1,["##FIRSTY",String.valueOf(this.xIncreases?this.getFirstY():this.getLastY())]);b[a++]=B(-1,["##LASTX",String.valueOf(this.isHZtoPPM()?c*this.observedFreq:c)]);b[a++]=B(-1,["##XFACTOR",String.valueOf(this.getXFactor())]);b[a++]=B(-1,["##YFACTOR",String.valueOf(this.getYFactor())]);b[a++]=B(-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 B(-1,[null,F(-1,[1]),null]);case JSV.common.Annotation.AType.Measurements:return a=
c?B(-1,["Hz","ppm"]):B(-1,[""]),b=this.isHNMR()?F(-1,[1,4]):F(-1,[1,3]),B(-1,[a,b,Integer.$valueOf(0)]);case JSV.common.Annotation.AType.PeakList:return a=c?B(-1,["Hz","ppm"]):B(-1,[""]),b=this.isHNMR()?F(-1,[1,2]):F(-1,[1,1]),B(-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 g=c+b[1];b[1]=c;var j=g+b[2];b[2]=g;return this.isNMR()?O(-1,[e,a,e*this.observedFreq,
20<c*this.observedFreq?0:c*this.observedFreq,20<g*this.observedFreq?0:g*this.observedFreq,20<j*this.observedFreq?0:j*this.observedFreq]):O(-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=O(-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(""+w(JSV.source.JDXDataObject.gyroData[b]),Double.$valueOf(JSV.source.JDXDataObject.gyroData[b+
1]))});r("JSV.source");v(["java.util.Iterator"],"JSV.source.JDXDecompressor",["JSV.common.Coordinate","JU.Logger"],function(){var b=p(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);
n(b,function(a,b,c,e,f,g){this.t=a;this.firstX=b;this.lastX=c;this.xFactor=e;this.yFactor=f;this.nPoints=g;this.debugging=JU.Logger.isActiveLevel(6)},"JSV.source.JDXSourceStreamTokenizer,~N,~N,~N,~N,~N");n(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,e=this.lastX,f=this.lastX=this.firstX,g=null,j=0,l=0,m=!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 p=this.isDIF,q=this.readSignedFloat()*this.xFactor,l=this.nextValue(l);!p&&0<j&&(f+=a);this.debugging&&
this.logError("Line: "+n+" isCP="+p+"\t>>"+this.line+"<<\n x, xcheck "+f+" "+f/this.xFactor+" "+q/this.xFactor+" "+a/this.xFactor);var r=l*this.yFactor,s=(new JSV.common.Coordinate).set(f,r);if(0==j||!p)this.addPoint(s,j++);else if(j<this.nPoints){var u=this.xyCoords[j-1].getYVal();r!=u&&(this.xyCoords[j-1]=s,this.logError(g+"\n"+this.line+"\nY-value Checkpoint Error! Line "+n+" for y="+r+" yLast="+u));(q==b||q<b!=0>a)&&this.logError(g+"\n"+this.line+"\nX-sequence Checkpoint Error! Line "+n+" order for xCheck="+
q+" after prevXCheck="+b);var v=Math.abs(q-b),w=Math.abs((j-c)*a),z=Math.abs(v-w)/v;this.debugging&&System.err.println("JDXD fracDif = "+q+"\t"+b+"\txcheckDif="+v+"\txiptDif="+w+"\tf="+z);0.5<z&&this.logError(g+"\n"+this.line+"\nX-value Checkpoint Error! Line "+n+" expected "+w+" but X-Sequence Check difference reads "+v)}for(var c=1==j?0:j,b=q,A=0;this.hasNext();){var B=this.ich;this.debugging&&this.logError("line "+n+" char "+B+":"+this.line.substring(0,B)+">>>>"+this.line.substring(this.ich));
Double.isNaN(l=this.nextValue(l))?this.logError("There was an error reading line "+n+" char "+B+":"+this.line.substring(0,B)+">>>>"+this.line.substring(B)):(f+=a,1.7976931348623157E308==l&&(l=0,this.logError("Point marked invalid '?' for line "+n+" char "+B+":"+this.line.substring(0,B)+">>>>"+this.line.substring(B))),this.addPoint((new JSV.common.Coordinate).set(f,l*this.yFactor),j++),this.debugging&&this.logError("nx="+ ++A+" "+f+" "+f/this.xFactor+" yval="+l))}this.lastX=f;!m&&j>this.nPoints&&(this.logError("! points overflow nPoints!"),
m=!0);g=this.line}}catch(C){if(y(C,"java.io.IOException"))C.printStackTrace();else throw C;}this.checkZeroFill(j,e);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});e(b,"hasNext",function(){return this.ich<this.lineLen||0<this.dupCount});e(b,"next",function(){return this.hasNext()?Double.$valueOf(this.lastY=
this.nextValue(this.lastY)):null});e(b,"remove",function(){});b.actions=F(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}});r("JSV.source");v(["JU.Lst"],"JSV.source.JDXHeader",["java.util.Hashtable","JSV.source.JDXSourceStreamTokenizer"],function(){var b=
p(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);K(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++]=B(-1,["##TITLE",this.title]);c[e++]=B(-1,["##JCAMP-DX",this.jcampdx]);c[e++]=B(-1,["##DATA TYPE",this.dataType]);a&&(c[e++]=B(-1,["##DATA CLASS",this.dataClass]));c[e++]=B(-1,["##ORIGIN",this.origin]);c[e++]=B(-1,["##OWNER",this.owner]);
for(var g=0;g<this.headerTable.size();g++)c[e++]=this.getRow(g);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=p(function(){this.map=this.table=null;q(this,arguments)},JSV.source.JDXHeader,"DataLDRTable",null);n(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(B(-1,[a,b,JSV.source.JDXSourceStreamTokenizer.cleanLabel(a)])),
this.map.put(a,c)):this.table.get(c.intValue())[1]=b},"~S,~S");b.typeNames=B(-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(";"))});r("JSV.source");v(["J.api.JmolJDXMOLReader"],"JSV.source.JDXReader","java.io.BufferedReader $.FileInputStream $.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=p(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);n(b,function(a,b,c,e,f,g){a=JU.PT.trimQuotes(a);if(this.isSimulation=null!=a&&a.startsWith("http://SIMULATION/"))this.nmrMaxY=Double.isNaN(g)?1E4:g;this.filePath=a;this.obscure=b;this.firstSpec=e;this.lastSpec=f;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,e){return JSV.source.JDXReader.createJDXSource(null,a,"stream",b,c,-1,-1,e)},"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,e){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 f=a.size();c<f;c++){var g=a.get(c);
b.put(null==e?g[2]:g[2]+e,g[1])}return b},"java.io.InputStream,java.util.Map,~N,~S");b.createJDXSource=c(b,"createJDXSource",function(a,b,c,e,f,g,j,l){var m=j<g,n=null,p=null;if(JU.AU.isAB(b)&&(p=b,JU.Rdr.isZipB(p)))return JSV.source.JDXReader.readBrukerFileZip(p,null==a?c:a.getFullPath());"string"==typeof b||null!=p?("string"==typeof b&&(n=b),b=JSV.common.JSVFileManager.getBufferedReaderForStringOrBytes(b)):b=C(b,"java.io.InputStream")?JSV.common.JSVFileManager.getBufferedReaderForInputStream(b):
b;var q=p=null;try{if(null==b){if(null!=a&&a.isDirectory())return JSV.source.JDXReader.readBrukerFileDir(a.getFullPath());b=JSV.common.JSVFileManager.getBufferedReaderFromName(c)}if(!m){b.mark(400);var r=R(400,"\x00");b.read(r,0,400);b.reset();p=String.instantialize(r);if(p.startsWith("PK"))return b.close(),JSV.source.JDXReader.readBrukerFileZip(null,a.getFullPath());if(0<=p.indexOf("\x00")||0==p.indexOf("##TITLE= Parameter file")||0==p.indexOf("##TITLE= Audit trail"))return b.close(),JSV.source.JDXReader.readBrukerFileDir(a.getParentAsFile().getFullPath());
var s=p.indexOf("#"),u=p.indexOf("<");if(0>s||0<=u&&u<s){var v=p.toLowerCase(),v=v.contains("<animl")||v.contains("<!doctype technique")?"AnIML":v.contains("xml-cml")?"CML":v.contains("<nmrml")?"NMRML":null;if(null==v)return JSV.source.JDXReader.readBrukerFileDir(a.getFullPath());q=JSV.common.JSViewer.getInterface("JSV.source."+v+"Reader").getSource(c,b);b.close();if(null==q)throw JU.Logger.error(p+"..."),new JSV.exception.JSVException("File type not recognized");}}null==q&&(q=(new JSV.source.JDXReader(c,
e,f,g,j,l)).getJDXSource(b,m));null!=n&&q.setInlineData(n);return q}catch(w){if(y(w,Exception))throw JSV.common.JSViewer.isJS||w.printStackTrace(),null!=b&&b.close(),null!=p&&JU.Logger.error(p+"..."),a=w.getMessage(),new JSV.exception.JSVException("Error reading data: "+a);throw w;}},"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,e=null,f=!1;!this.done&&"##TITLE".equals(this.t.peakLabel());){f=!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 g=new JSV.common.Spectrum,j=new JSV.source.JDXHeader.DataLDRTable;for(b&&g.setHeaderTable(j.table);!this.done&&null!=(c=this.t.getLabel())&&null!=(e=this.getValue(c));)if(this.isTabularData){if(b){j.addHeader(this.t.rawLabel,"<data>");break}this.processTabularData(g,j,c,b);this.addSpectrum(g,!1);this.isSimulation&&g.getXUnits().equals("PPM")&&g.setHZtoPPM(!0);g=null}else{if(!b){if(c.equals("##DATATYPE")&&e.toUpperCase().equals("LINK")){this.getBlockSpectra(j);g=null;continue}if(c.equals("##NTUPLES")||
c.equals("##VARNAME")){this.getNTupleSpectra(j,g,c);g=null;continue}}c.equals("##JCAMPDX")&&this.setVenderSpecificValues(this.t.rawLine);null==g&&(g=new JSV.common.Spectrum);this.processLabel(g,j,c,e,b)}b&&null!=g&&this.addSpectrum(g,!1)}if(!f)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,e,f){if(this.readDataLabel(a,c,e,this.errorLog,this.obscure,f)||f){if(null!=this.mnovaParamValue){var g;
if(e.startsWith("(")&&0<=(g=e.indexOf(","))){var j=e.substring(1,g).trim();g=e.indexOf(")",g+1);0<g&&(e=e.substring(g+1).trim());b.addHeader(j,e)}this.mnovaParamValue=null}else b.addHeader(this.t.rawLabel,e);f||this.checkCustomTags(a,c,e)}},"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(y(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,e=0==this.source.type,f=!1;null!=(b=this.t.getLabel())&&!b.equals("##TITLE");)c=this.getValue(b),e&&!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&&(f=!0);c=this.getValue(b);if(!"##TITLE".equals(b))throw new JSV.exception.JSVException("Unable to read block source");e&&this.source.setHeaderTable(a.table);this.source.type=
1;this.source.isCompoundSource=!0;a=new JSV.common.Spectrum;e=new JSV.source.JDXHeader.DataLDRTable;this.readDataLabel(a,b,c,this.errorLog,this.obscure,!1);try{for(var g;null!=(g=this.t.getLabel());){if(null==(c=this.getValue(g))&&"##END".equals(b)){JU.Logger.debug("##END= "+this.t.getValue());break}b=g;if(this.isTabularData)this.processTabularData(a,e,b,!1);else{if(b.equals("##DATATYPE"))if(c.toUpperCase().equals("LINK"))this.getBlockSpectra(e),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(e,a,b),a=null,b="";if(this.done)break;if(null==a){a=new JSV.common.Spectrum;e=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,f))return this.source;a=new JSV.common.Spectrum;e=new JSV.source.JDXHeader.DataLDRTable}else this.processLabel(a,e,b,c,!1)}}}catch(j){if(y(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 e=O(-1,[1.7976931348623157E308,
4.9E-324]);this.blockID=Math.random();0<this.firstSpec&&b.setNumDim(1);var f=c.equals("##VARNAME");f||(c="");var g=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=f?c:this.t.getLabel()).equals("##PAGE");){for(var f=!1,l=new java.util.StringTokenizer(this.t.getValue(),","),m=new JU.Lst;l.hasMoreTokens();)m.addLast(l.nextToken().trim());g.put(c,m)}f=g.get("##SYMBOL");if(!c.equals("##PAGE"))throw new JSV.exception.JSVException("Error Reading NTuple Source");
for(var l=this.t.getValue(),m=null,n=!0;!this.done;){if((c=this.t.getLabel()).equals("##ENDNTUPLES")){this.t.getValue();break}if(c.equals("##PAGE"))l=this.t.getValue();else{if(null==m&&(m=new JSV.common.Spectrum,b.copyTo(m),m.setTitle(b.getTitle()),!m.is1D())){var p=l.indexOf("=");if(0<=p)try{m.setY2D(this.parseAFFN(l.substring(0,p),l.substring(p+1).trim()));var q=l.substring(0,p).trim(),r=f.indexOf(q);0<=r&&m.setY2DUnits(g.get("##UNITS").get(r))}catch(s){if(!y(s,Exception))throw s;}}p=new JSV.source.JDXHeader.DataLDRTable;
for(m.setHeaderTable(p.table);!c.equals("##DATATABLE");)p.addHeader(this.t.rawLabel,this.t.getValue()),c=this.t.getLabel();c=!0;r=this.t.flushLine();0<r.trim().indexOf("PEAKS")&&(c=!1);var v=r.indexOf("("),u=r.lastIndexOf(")");if(-1==v||-1==u)throw new JSV.exception.JSVException("Variable List not Found");v=r.substring(v,u+1);for(r=u=0;r<f.size();r++){var w=f.get(r).trim();-1!=v.indexOf(w)&&(j[u++]=w);if(2==u)break}this.setTabularDataType(m,"##"+(c?"XYDATA":"PEAKTABLE"));if(!this.readNTUPLECoords(m,
g,j,e))throw new JSV.exception.JSVException("Unable to read Ntuple Source");m.nucleusX.equals("?")||(b.nucleusX=m.nucleusX);b.nucleusY=m.nucleusY;b.freq2dX=m.freq2dX;b.freq2dY=m.freq2dY;b.y2DUnits=m.y2DUnits;r=0;for(c=a.table.size();r<c;r++)v=a.table.get(r),u=JSV.source.JDXSourceStreamTokenizer.cleanLabel(v[0]),!u.equals("##TITLE")&&(!u.equals("##DATACLASS")&&!u.equals("##NTUPLES"))&&p.table.addLast(v);this.addSpectrum(m,!n);n=!1;m=null}}this.addErrorLogSeparator();this.source.setErrorLog(this.errorLog.toString());
JU.Logger.info("NTUPLE MIN/MAX Y = "+e[0]+" "+e[1]);return this.source},"JSV.source.JDXHeader.DataLDRTable,JSV.source.JDXDataObject,~S");c(b,"readDataLabel",function(a,b,c,e,f,g){if(!this.readHeaderLabel(a,b,c,e,f))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||g&&0<=c.indexOf(","))return!g;
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 j=c.indexOf(" ");0<j&&(c=c.substring(0,j));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 j=I(Float.parseFloat(c.nextToken().trim())),l=this.parseAFFN(b,c.nextToken().trim());a.setShiftReference(l,j,0)}catch(m){if(!y(m,Exception))throw m;}return!1}return!0}},"JSV.source.JDXDataObject,~S,~S,JU.SB,~B,~B");c(b,"readHeaderLabel",function(a,b,c,e,f){switch(b){case "##TITLE":return a.setTitle(f||null==c||c.equals("")?"Unknown":c),!1;case "##JCAMPDX":return a.jcampdx=c,a=JU.PT.parseFloat(c),(6<=a||Float.isNaN(a))&&null!=
e&&e.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,e){this.setTabularDataType(a,c);a.setHeaderTable(b.table);if(a.dataClass.equals("XYDATA"))a.checkJDXRequiredTokens(),e||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(f){if(!y(f,"java.io.IOException"))throw f;}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,e){var f;if(a.dataClass.equals("XYDATA")){f=b.get("##SYMBOL");var g=f.indexOf(c[0]),j=f.indexOf(c[1]);f=b.get("##VARNAME");a.setVarName(f.get(j).toUpperCase());f=b.get(c="##FACTOR");a.setXFactor(this.parseAFFN(c,f.get(g)));a.setYFactor(this.parseAFFN(c,f.get(j)));f=b.get(c="##LAST");a.fileLastX=this.parseAFFN(c,f.get(g));f=b.get(c="##FIRST");a.fileFirstX=this.parseAFFN(c,f.get(g));f=b.get("##VARDIM");
a.fileNPoints=Integer.parseInt(f.get(g));f=b.get("##UNITS");a.setXUnits(f.get(g));a.setYUnits(f.get(j));null==a.nucleusX&&null!=(f=b.get("##.NUCLEUS"))?(a.setNucleusAndFreq(f.get(0),!1),a.setNucleusAndFreq(f.get(g),!0)):null==a.nucleusX&&(a.nucleusX="?");this.decompressData(a,e);return!0}return a.dataClass.equals("PEAKTABLE")||a.dataClass.equals("XYPOINTS")?(a.setContinuous(a.dataClass.equals("XYPOINTS")),f=b.get("##SYMBOL"),g=f.indexOf(c[0]),j=f.indexOf(c[1]),f=b.get("##UNITS"),a.setXUnits(f.get(g)),
a.setYUnits(f.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 e;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("+"==(e=b.charAt(c+1))||"-"==e)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 e=new JSV.source.JDXDecompressor(this.t,a.fileFirstX,a.fileLastX,a.xFactor,a.yFactor,a.fileNPoints),f=System.currentTimeMillis(),g=e.decompressData(this.errorLog);JU.Logger.debugging&&JU.Logger.debug("decompression time = "+
(System.currentTimeMillis()-f)+" ms");a.setXYCoords(g);f=e.getMinY();null!=b&&(f<b[0]&&(b[0]=f),f=e.getMaxY(),f>b[1]&&(b[1]=f));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 "+e.lastX),this.logError("deltaX from Header "+c),this.logError("Number of points in Header "+a.fileNPoints+" Found "+
e.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:return this.acdAssignments=new JU.Lst,this.mpr.readACDAssignments(a.fileNPoints,40==b,this.acdAssignments)}}catch(e){if(y(e,Exception))throw new JSV.exception.JSVException(e.getMessage());throw e;}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});e(b,"rd",function(){return this.reader.readLine()});e(b,"setSpectrumPeaks",function(a,b,c){this.modelSpectrum.setPeakList(this.peakData,b,c);this.modelSpectrum.isNMR()&&this.modelSpectrum.setHydrogenCount(a)},"~N,~S,~S");e(b,"addPeakData",function(a){null==this.peakData&&(this.peakData=new JU.Lst);this.peakData.addLast(new JSV.common.PeakInfo(a))},"~S");e(b,"processModelData",function(){},
"~S,~S,~S,~S,~S,~N,~N,~B");e(b,"discardLinesUntilContains",function(a){for(var b;null!=(b=this.rd())&&0>b.indexOf(a););return b},"~S");e(b,"discardLinesUntilContains2",function(a,b){for(var c;null!=(c=this.rd())&&0>c.indexOf(a)&&0>c.indexOf(b););return c},"~S,~S");e(b,"discardLinesUntilNonBlank",function(){for(var a;null!=(a=this.rd())&&0==a.trim().length;);return a});b.main=c(b,"main",function(){try{for(var a=JSV.source.JDXReader.getHeaderMap(new java.io.FileInputStream("c:/temp/t6.jdx"),null),b,
c=a.keySet().iterator();c.hasNext()&&((b=c.next())||1);)if(!b.startsWith("##")){var e=a.get(b);30<e.length&&(e=e.substring(0,30)+"...");System.out.println(b+"="+e)}}catch(f){if(y(f,Exception))f.printStackTrace();else throw f;}System.out.println("done")},"~A");b.VAR_LIST_TABLE=B(-1,["PEAKTABLE   XYDATA      XYPOINTS"," (XY..XY)    (X++(Y..Y)) (XY..XY)    "])});r("JSV.source");v(["JSV.source.JDXHeader"],"JSV.source.JDXSource",["JU.Lst"],function(){var b=p(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);n(b,function(a,b){A(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=B(0,0,null));for(var c=
this.getHeaderRowDataAsArray(a,b.length),e=b.length;0<=--e;)c[c.length-b.length+e]=b[e];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")});r("JSV.source");v(null,"JSV.source.JDXSourceStreamTokenizer",
["JU.SB","JU.Logger"],function(){var b=p(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);n(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(y(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(y(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,e=JSV.source.JDXSourceStreamTokenizer.ptNonWhite(a,0,b);if(e>=b)return"";for(var f=R(b-e,"\x00"),g=0;e<b;e++){var j;switch((j=
a.charAt(e)).charCodeAt(0)){case 13:if(e<c&&"\n"==a.charAt(e+1))continue;j="\n";break;case 10:0<g&&"\n"!=f[g-1]&&(g-=e-JSV.source.JDXSourceStreamTokenizer.ptNonSpaceRev(a,e)-1);e=JSV.source.JDXSourceStreamTokenizer.ptNonSpace(a,++e,b)-1;break;case 36:if(e<c&&"$"==a.charAt(e+1)){for(e++;++e<b&&0>"\n\r".indexOf(a.charAt(e)););continue}}"\n"==j&&0<g&&"\n"==f[g-1]||(f[g++]=j)}0<g&&"\n"==f[g-1]&&--g;return String.instantialize(f).substring(0,g).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")});r("JSV.tree");v(["JSV.api.JSVTree"],"JSV.tree.SimpleTree",["JSV.common.JSVFileManager","$.PanelNode","JSV.tree.SimpleTreeModel","$.SimpleTreeNode","$.SimpleTreePath"],function(){var b=
p(function(){this.selectedPath=this.vwr=this.spectraTreeModel=this.rootNode=this.si=null;q(this,arguments)},JSV.tree,"SimpleTree",null,JSV.api.JSVTree);n(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");e(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()});e(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");e(b,"createTree",function(a,b,c){var e=this.vwr.spectraTree,f=e.getRootNode(),g=
this.vwr.panelNodes,j=JSV.common.JSVFileManager.getTagName(b.getFilePath()),l=new JSV.common.PanelNode(null,j,b,null),m=new JSV.tree.SimpleTreeNode(j,l);l.setTreeNode(m);e.spectraTreeModel.insertNodeInto(m,f,f.getChildCount());for(f=0;f<c.length;f++){var l=new JSV.common.PanelNode(a+"."+(f+1),j,b,c[f]),n=new JSV.tree.SimpleTreeNode(l.toString(),l);l.setTreeNode(n);g.addLast(l);e.spectraTreeModel.insertNodeInto(n,m,m.getChildCount())}this.vwr.selectFrameNode(c[0]);return m},"~N,JSV.source.JDXSource,~A");
e(b,"setPath",function(a){this.setSelectionPath(a)},"JSV.api.JSVTreePath");c(b,"newTreePath",function(a){return new JSV.tree.SimpleTreePath(a)},"~A");e(b,"deleteNodes",function(a){for(var b=0;b<a.size();b++)this.spectraTreeModel.removeNodeFromParent(a.get(b))},"JU.Lst")});r("JSV.tree");v(["java.util.Enumeration"],"JSV.tree.SimpleTreeEnumeration",null,function(){var b=p(function(){this.node=null;this.pt=0;q(this,arguments)},JSV.tree,"SimpleTreeEnumeration",null,java.util.Enumeration);n(b,function(a){this.node=
a},"JSV.tree.SimpleTreeNode");e(b,"hasMoreElements",function(){return this.pt<this.node.$children.size()});e(b,"nextElement",function(){return this.node.$children.get(this.pt++)})});r("JSV.tree");z=p(function(){this.rootNode=null;q(this,arguments)},JSV.tree,"SimpleTreeModel",null);n(z,function(b){this.rootNode=b},"JSV.api.JSVTreeNode");c(z,"insertNodeInto",function(b,a,c){a.$children.add(c,b);b.prevNode=a},"JSV.api.JSVTreeNode,JSV.api.JSVTreeNode,~N");c(z,"removeNodeFromParent",function(b){b.prevNode.$children.removeObj(b)},
"JSV.api.JSVTreeNode");r("JSV.tree");v(["JSV.api.JSVTreeNode"],"JSV.tree.SimpleTreeNode",["JU.Lst","JSV.tree.SimpleTreeEnumeration"],function(){var b=p(function(){this.panelNode=null;this.index=0;this.text=this.$children=this.prevNode=null;q(this,arguments)},JSV.tree,"SimpleTreeNode",null,JSV.api.JSVTreeNode);n(b,function(a,b){this.text=a;this.panelNode=b;this.$children=new JU.Lst},"~S,JSV.common.PanelNode");e(b,"getPanelNode",function(){return this.panelNode});e(b,"getIndex",function(){return this.index});
e(b,"setIndex",function(a){this.index=a},"~N");e(b,"children",function(){return new JSV.tree.SimpleTreeEnumeration(this)});e(b,"getChildCount",function(){return this.$children.size()});e(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()});e(b,"isLeaf",function(){return null!=this.prevNode&&null!=this.prevNode.prevNode});e(b,"toString",function(){return this.text})});r("JSV.tree");v(["JSV.api.JSVTreePath"],"JSV.tree.SimpleTreePath",
null,function(){var b=p(function(){this.path=null;q(this,arguments)},JSV.tree,"SimpleTreePath",null,JSV.api.JSVTreePath);n(b,function(a){this.path=a},"~A");e(b,"getLastPathComponent",function(){return null==this.path||0==this.path.length?null:this.path[this.path.length-1]})})}$._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);
