(function($,qa,da,P,v,G,r,w,s,n,q,I,Fa,m,k,z,E,D,U,t,H,y,K,C,A,B,ra,L,M,R,x,W,Ga,Q,V,fa,X,aa,N,S,ga,Ha,sa,ta,ha,ua,va,wa,xa,ya,za,Aa,ia,ja,Ba,ka,Ca,Da,c,e,Y){Jmol.___JmolDate="$Date: 2022-11-02 13:44:03 -0500 (Wed, 02 Nov 2022) $";Jmol.___fullJmolProperties="src/org/jmol/viewer/Jmol.properties";Jmol.___JmolVersion="14.32.80";(function(a){a._Loader.registerPackages("java",["io","lang","lang.reflect","util"]);var b=java.util;a._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(a._supportsNativeObject)for(var d=0;d<a._extendedObjectMethods.length-2;d++){var g=a._extendedObjectMethods[d];Array.prototype[g]=a._O.prototype[g];Number.prototype[g]=a._O.prototype[g]}java.lang.Number=Number;Number.__CLASS_NAME__="Number";aa(Number,java.io.Serializable);Number.equals=a._innerFunctions.equals;Number.getName=a._innerFunctions.getName;
Number.prototype.compareTo=function(a){var b=this.value;a=a.value;return b<a?-1:b==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(){n(this,arguments)};V(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()};S(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,b){return a<b?-1:a>b?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 b=1;0==a>>>
16&&(b+=16,a<<=16);0==a>>>24&&(b+=8,a<<=8);0==a>>>28&&(b+=4,a<<=4);0==a>>>30&&(b+=2,a<<=2);return b-(a>>>31)},"Number");Integer.numberOfLeadingZeros=Integer.prototype.numberOfLeadingZeros;c(Integer,"numberOfTrailingZeros",function(a){if(0==a)return 32;var b=31,d=a<<16;0!=d&&(b-=16,a=d);d=a<<8;0!=d&&(b-=8,a=d);d=a<<4;0!=d&&(b-=4,a=d);d=a<<2;0!=d&&(b-=2,a=d);return b-(a<<1>>>31)},"Number");Integer.numberOfTrailingZeros=Integer.prototype.numberOfTrailingZeros;c(Integer,"parseIntRadix",function(a,b){if(null==
a)throw new NumberFormatException("null");if(2>b)throw new NumberFormatException("radix "+b+" less than Character.MIN_RADIX");if(36<b)throw new NumberFormatException("radix "+b+" greater than Character.MAX_RADIX");if(10==b)for(var d=a.length;0<=--d;){var g=a.charCodeAt(d);if(!(48<=g&&57>=g)&&(0<d||43!=g&&45!=g))throw new NumberFormatException("Not a Number : "+a);}d=parseInt(a,b);if(isNaN(d))throw new NumberFormatException("Not a Number : "+a);return d},"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||!w(a,Integer)?!1:a.valueOf()==this.valueOf()},"Object");Integer.toHexString=Integer.prototype.toHexString=function(a){a.valueOf&&(a=a.valueOf());if(0>a){var b=a&16777215;return(a>>24&255)._numberToString(16)+(b="000000"+b._numberToString(16)).substring(b.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 b=a.startsWith("-")?1:0;a=a.replace(/\#/,"0x").toLowerCase();b=a.startsWith("0x",b)?16:a.startsWith("0",b)?8:10;a=Number(a)&4294967295;return 8==
b?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(){n(this,arguments)};V(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()};S(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,b){return Integer.parseInt(a,b||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||!w(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(){n(this,arguments)};V(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()};S(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,b){return Integer.parseIntRadix(a,
b).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||!w(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(){n(this,arguments)};V(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()};m(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,b){return Integer.parseIntRadix(a,
b).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||!w(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");a._floatToString=function(a){a=""+a;0>a.indexOf(".")&&0>a.indexOf("e")&&(a+=".0");return a};java.lang.Float=Float=function(){n(this,arguments)};V(Float,"Float",Number,Comparable,null,!0);Float.prototype.valueOf=function(){return 0};
Float.toString=Float.prototype.toString=function(){return 0!=arguments.length?a._floatToString(arguments[0]):this===Float?"class java.lang.Float":a._floatToString(this.valueOf())};a._a32=null;Float.floatToIntBits=function(b){var d=a._a32||(a._a32=new Float32Array(1));d[0]=b;return(new Int32Array(d.buffer))[0]};S(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 b=Number(a);if(isNaN(b))throw new NumberFormatException("Not a Number : "+a);return b},"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||!w(a,Float)?!1:a.valueOf()==this.valueOf()},"Object");java.lang.Double=Double=function(){n(this,arguments)};
V(Double,"Double",Number,Comparable,null,!0);Double.prototype.valueOf=function(){return 0};Double.toString=Double.prototype.toString=function(){return 0!=arguments.length?a._floatToString(arguments[0]):this===Double?"class java.lang.Double":a._floatToString(this.valueOf())};S(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 b=Number(a);if(isNaN(b))throw new NumberFormatException("Not a Number : "+a);return b},"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||!w(a,Double)?!1:a.valueOf()==this.valueOf()},"Object");Boolean=java.lang.Boolean=Boolean||
function(){n(this,arguments)};if(a._supportsNativeObject)for(d=0;d<a._extendedObjectMethods.length;d++)g=a._extendedObjectMethods[d],Boolean.prototype[g]=a._O.prototype[g];Boolean.__CLASS_NAME__="Boolean";aa(Boolean,[java.io.Serializable,java.lang.Comparable]);Boolean.equals=a._innerFunctions.equals;Boolean.getName=a._innerFunctions.getName;Boolean.serialVersionUID=Boolean.prototype.serialVersionUID=-0x32df8d7f2a630600;S(Boolean,function(a){var b=("string"==typeof a?Boolean.toBoolean(a):a)?!0:!1;
this.valueOf=function(){return b}},"~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 w(a,
Boolean)?this.booleanValue()==a.booleanValue():!1},"~O");Boolean.getBoolean=c(Boolean,"getBoolean",function(a){var b=!1;try{b=Boolean.toBoolean(System.getProperty(a))}catch(d){if(!w(d,IllegalArgumentException)&&!w(d,NullPointerException))throw d;}return b},"~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;a._Encoding={};(function(b){b.UTF8="utf-8";b.UTF16="utf-16";b.ASCII="ascii";b.guessEncoding=function(a){return 239==a.charCodeAt(0)&&187==a.charCodeAt(1)&&191==a.charCodeAt(2)?b.UTF8:255==a.charCodeAt(0)&&254==a.charCodeAt(1)?b.UTF16:b.ASCII};b.guessEncodingArray=function(a){return 239==a[0]&&187==a[1]&&191==a[2]?b.UTF8:255==a[0]&&254==a[1]?b.UTF16:b.ASCII};b.readUTF8=function(a){if("string"!=
typeof a)return b.readUTF8Array(a);var d=b.guessEncoding(a),g=0;d==b.UTF8?g=3:d==b.UTF16&&(g=2);for(d=[];g<a.length;g++){var c=a.charCodeAt(g);if(128>c)d[d.length]=a.charAt(g);else if(192<c&&224>c){c&=31;g++;var h=a.charCodeAt(g)&63,c=(c<<6)+h;d[d.length]=String.fromCharCode(c)}else if(224<=c){c&=15;g++;h=a.charCodeAt(g)&63;g++;var e=a.charCodeAt(g)&63,c=(c<<12)+(h<<6)+e;d[d.length]=String.fromCharCode(c)}}return d.join("")};b.readUTF8Array=function(a){var d=b.guessEncodingArray(a),g=0;d==b.UTF8?
g=3:d==b.UTF16&&(g=2);for(d=[];g<a.length;g++){var c=a[g];if(128>c)d[d.length]=String.fromCharCode(c);else if(192<c&&224>c){var c=c&31,h=a[++g]&63,c=(c<<6)+h;d[d.length]=String.fromCharCode(c)}else if(224<=c){var c=c&15,h=a[++g]&63,e=a[++g]&63,c=(c<<12)+(h<<6)+e;d[d.length]=String.fromCharCode(c)}}return d.join("")};b.convert2UTF8=function(a){var d=this.guessEncoding(a),g=0;if(d==b.UTF8)return a;d==b.UTF16&&(g=2);for(var d=Array(0+a.length-g),c=g;c<a.length;c++){var h=a.charCodeAt(c);if(128>h)d[0+
c-g]=a.charAt(c);else if(2047>=h){var e=192+((h&1984)>>6),u=128+(h&63);d[0+c-g]=String.fromCharCode(e)+String.fromCharCode(u)}else e=224+((h&61440)>>12),u=128+((h&4032)>>6),h=128+(h&63),d[0+c-g]=String.fromCharCode(e)+String.fromCharCode(u)+String.fromCharCode(h)}return d.join("")};b.base64Chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");b.encodeBase64=function(a){if(null==a||0==a.length)return a;for(var d=b.base64Chars,g=a.length,c=0,h=[],e,u;c<g;)e=a.charCodeAt(c++),
h[h.length]=d[e>>2],c<g?(u=a.charCodeAt(c++),h[h.length]=d[e<<4&48|u>>4],c<g?(e=a.charCodeAt(c++),h[h.length]=d[u<<2&60|e>>6],h[h.length]=d[e&63]):(h[h.length]=d[u<<2&60],h[h.length]="=")):(h[h.length]=d[e<<4&48],h[h.length]="=",h[h.length]="=");return h.join("")};b.decodeBase64=function(a){if(null==a||0==a.length)return a;var d=b.base64Chars,g=b.xBase64Chars;if(null==b.xBase64Chars){for(var g={},c=0;c<d.length;c++)g[d[c]]=c;b.xBase64Chars=g}for(var d=a.length,c=0,h=[],e,u,j,m,n=0;c<d&&6E4>n++;)e=
g[a.charAt(c++)],u=g[a.charAt(c++)],j=g[a.charAt(c++)],m=g[a.charAt(c++)],h[h.length]=String.fromCharCode(e<<2&255|u>>4),null!=j&&(h[h.length]=String.fromCharCode(u<<4&255|j>>2),null!=m&&(h[h.length]=String.fromCharCode(j<<6&255|m)));return h.join("")};if(null==String.prototype.$replace){java.lang.String=String;if(a._supportsNativeObject)for(var d=0;d<a._extendedObjectMethods.length;d++){var g=a._extendedObjectMethods[d];"to$tring"==g||("toString"==g||"equals"==g||"hashCode"==g)||(String.prototype[g]=
a._O.prototype[g])}aa(String,[java.io.Serializable,CharSequence,Comparable]);String.getName=a._innerFunctions.getName;String.serialVersionUID=String.prototype.serialVersionUID=-0x5f0f5bc785c44c00;(function(a){a.$replace=function(a,b){if(a==b||0>this.indexOf(a))return""+this;1==a.length?0<="\\$.*+|?^{}()[]".indexOf(a)&&(a="\\"+a):a=a.replace(/([\\\$\.\*\+\|\?\^\{\}\(\)\[\]])/g,function(a,b){return"\\"+b});return this.replace(RegExp(a,"gm"),b)};a.$generateExpFunction=function(a){var b=[],d=[],g=0;b[0]=
"";for(var c=0;c<a.length;c++){var f=a.charAt(c);c!=a.length-1&&"\\"==f?(c++,f=a.charAt(c),"\\"==f&&(b[g]+="\\"),b[g]+=f):c!=a.length-1&&"$"==f?(c++,d[g]=parseInt(a.charAt(c)),g++,b[g]=""):b[g]="\r"==f?b[g]+"\\r":"\n"==f?b[g]+"\\n":"\t"==f?b[g]+"\\t":'"'==f?b[g]+'\\"':b[g]+f}a="f = function (";g=Math.max.apply({},d);for(c=0;c<=g;c++)a+="$"+c,c!=g&&(a+=", ");a+=") { return ";for(c=0;c<b.length-1;c++)a+='"'+b[c]+'" + $'+d[c]+" + ";a+='"'+b[c]+'"; }';eval(a);return null};a.replaceAll=function(a,b){return this.replace(RegExp(a,
"gm"),this.$generateExpFunction(b))};a.replaceFirst=function(a,b){return this.replace(RegExp(a,"m"),this.$generateExpFunction(b))};a.matches=function(a){null!=a&&(a="^("+a+")$");a=this.match(RegExp(a,"gm"));return null!=a&&0!=a.length};a.regionMatches=function(a,b,d,g,c){if("number"==typeof a||!0!=a&&!1!=a)c=g,g=d,d=b,b=a,a=!1;if(0>g||0>b||b>this.length-c||g>d.length-c)return!1;b=this.substring(b,b+c);d=d.substring(g,g+c);a&&(b=b.toLowerCase(),d=d.toLowerCase());return b==d};a.$plit=function(a,b){if(!b&&
" "==a)return this.split(a);if(null!=b&&0<b){if(1==b)return this;var d=RegExp("("+a+")","gm"),g=1,c=this.replace(d,function(a){g++;return g==b?"@@_@@":a}),d=RegExp(a,"gm"),d=this.split(d);d.length>b&&(d[b-1]=c.substring(c.indexOf("@@_@@")+5),d.length=b);return d}d=RegExp(a,"gm");return this.split(d)};a.trim||(a.trim=function(){return this.replace(/^\s+/g,"").replace(/\s+$/g,"")});if(!a.startsWith||!a.endsWith){var d=function(a,b,d){var g=d,c=0,f=b.length;if(0>d||d>a.length-f)return!1;for(;0<=--f;)if(a.charAt(g++)!=
b.charAt(c++))return!1;return!0};a.startsWith=function(a){return 1==arguments.length?d(this,arguments[0],0):2==arguments.length?d(this,arguments[0],arguments[1]):!1};a.endsWith=function(a){return d(this,a,this.length-a.length)}}a.equals=function(a){return this.valueOf()==a};a.equalsIgnoreCase=function(a){return null==a?!1:this==a||this.toLowerCase()==a.toLowerCase()};a.hash=0;a.hashCode=function(){var a=this.hash;if(0==a){for(var b=0,d=this.length,g=0;g<d;g++)a=31*a+this.charCodeAt(b++),a&=4294967295;
this.hash=a}return a};a.getBytes=function(){if(4==arguments.length)return this.getChars(arguments[0],arguments[1],arguments[2],arguments[3]);var a=this;if(1==arguments.length){for(var d=arguments[0].toString().toLowerCase(),g="utf-8 UTF8 us-ascii iso-8859-1 8859_1 gb2312 gb18030 gbk".split(" "),c=!1,h=0;h<g.length;h++)if(g[h]==d){c=!0;break}if(!c)throw new java.io.UnsupportedEncodingException;if("utf-8"==d||"utf8"==d)a=b.convert2UTF8(this)}d=Array(a.length);for(h=c=g=0;h<a.length;h++)g=a.charCodeAt(h),
255<g?(d[c]=26,d[c+1]=g&255,d[c+2]=(g&65280)>>8,c+=2):d[c]=g,c++;return K(d)};a.contains=function(a){return 0<=this.indexOf(a)};a.compareTo=function(a){return this>a?1:this<a?-1:0};a.toCharArray=function(){for(var a=Array(this.length),b=0;b<this.length;b++)a[b]=this.charAt(b);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 b=arguments[1],d=arguments[2],g=Array(d),c=
0;c<d;c++)g[c]=a[b+c];return g.join("")}return""+a};a.subSequence=function(a,b){return this.substring(a,b)};a.compareToIgnoreCase=function(a){if(null==a)throw new NullPointerException;var b=this.toUpperCase(),d=a.toUpperCase();if(b==d)return 0;b=this.toLowerCase();d=a.toLowerCase();return b==d?0:b>d?1:-1};a.contentEquals=function(a){if(this.length!=a.length())return!1;a=a.getValue();for(var b=0,d=0,g=this.length;0!=g--;)if(this.charCodeAt(b++)!=a[d++])return!1;return!0};a.getChars=function(a,b,d,
g){if(0>a)throw new StringIndexOutOfBoundsException(a);if(b>this.length)throw new StringIndexOutOfBoundsException(b);if(a>b)throw new StringIndexOutOfBoundsException(b-a);if(null==d)throw new NullPointerException;for(var c=0;c<b-a;c++)d[g+c]=this.charAt(a+c)};a.$concat=a.concat;a.concat=function(a){if(null==a)throw new NullPointerException;return this.$concat(a)};a.$lastIndexOf=a.lastIndexOf;a.lastIndexOf=function(a,b){return null!=b&&0>=b+this.length?-1:null!=b?this.$lastIndexOf(a,b):this.$lastIndexOf(a)};
a.intern=function(){return this.valueOf()};String.copyValueOf=a.copyValueOf=function(){return 1==arguments.length?String.instantialize(arguments[0]):String.instantialize(arguments[0],arguments[1],arguments[2])};a.codePointAt||(a.codePointAt=a.charCodeAt)})(String.prototype);var c=new TextDecoder;String.instantialize=function(){switch(arguments.length){case 0:return new String;case 1:var a=arguments[0];if(a.BYTES_PER_ELEMENT)return 0==a.length?"":"number"==typeof a[0]?c.decode(a):a.join("");if(a instanceof
Array)return 0==a.length?"":"number"==typeof a[0]?c.decode(new Uint8Array(a)):a.join("");if("string"==typeof a||a instanceof String)return new String(a);if("StringBuffer"==a.__CLASS_NAME__||"java.lang.StringBuffer"==a.__CLASS_NAME__){for(var b=a.shareValue(),d=a.length(),g=Array(d),a=0;a<d;a++)g[a]=b[a];return g.join("")}return""+a;case 2:return a=arguments[0],d=arguments[1],"string"==typeof d?String.instantialize(a,0,a.length,d):String.instantialize(a,d,0,a.length);case 3:var g=arguments[0],f=arguments[1],
d=arguments[2];arguments[2]instanceof Array&&(g=arguments[2],f=arguments[0],d=arguments[1]);b=Array(d);if(0>f||d+f>g.length)throw new IndexOutOfBoundsException;if(0<d)if(null!=g[f].length)for(a=0;a<d;a++)b[a]=g[f+a];else for(a=0;a<d;a++)b[a]=String.fromCharCode(g[f+a]);return b.join("");case 4:g=arguments[0];b=arguments[3];if("string"==typeof b||b instanceof String){f=arguments[1];d=arguments[2];b=new Uint8Array(d);for(a=0;a<d;a++)b[a]=g[f+a];return c.decode(b)}a=arguments[3];f=arguments[2];d=arguments[1];
b=Array(a);if(0==d)for(;0<a--;)b[a]=String.fromCharCode(g[a+f]&255);else for(d<<=8;0<a--;)b[a]=String.fromCharCode(d|g[a+f]&255);return b.join("");default:b="";for(a=0;a<arguments.length;a++)b+=arguments[a];return b}};-1!=navigator.userAgent.toLowerCase().indexOf("chrome")&&(String.prototype.toString=function(){return this.valueOf()})}})(a._Encoding);c$=q(function(){this.value=0;n(this,arguments)},java.lang,"Character",null,[java.io.Serializable,Comparable]);m(c$,function(a){this.value=a},"~N");c(c$,
"charValue",function(){return this.value});e(c$,"hashCode",function(){return this.value.charCodeAt(0)});e(c$,"equals",function(a){return w(a,Character)?this.value.charCodeAt(0)==a.charValue().charCodeAt(0):!1},"~O");e(c$,"compareTo",function(a){return this.value.charCodeAt(0)-a.value.charCodeAt(0)},"Character");c$.toLowerCase=c(c$,"toLowerCase",function(a){return(""+a).toLowerCase().charAt(0)},"~N");c$.toUpperCase=c(c$,"toUpperCase",function(a){return(""+a).toUpperCase().charAt(0)},"~N");c$.isDigit=
c(c$,"isDigit",function(a){a=a.charCodeAt(0);return 48<=a&&57>=a},"~N");c$.isUpperCase=c(c$,"isUpperCase",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a},"~N");c$.isLowerCase=c(c$,"isLowerCase",function(a){a=a.charCodeAt(0);return 97<=a&&122>=a},"~N");c$.isWhitespace=c(c$,"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");c$.isLetter=c(c$,"isLetter",function(a){a=a.charCodeAt(0);return 65<=a&&90>=
a||97<=a&&122>=a},"~N");c$.isLetterOrDigit=c(c$,"isLetterOrDigit",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a||97<=a&&122>=a||48<=a&&57>=a},"~N");c$.isSpaceChar=c(c$,"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");c$.digit=c(c$,"digit",function(a,b){var d=a.charCodeAt(0);if(2<=b&&36>=b&&128>d){var g=-1;48<=d&&57>=d?g=d-48:97<=d&&122>=d?g=d-87:65<=d&&90>=d&&(g=d-55);return g<b?g:-1}return-1},"~N,~N");e(c$,
"toString",function(){return String.valueOf([this.value])});c$.toString=e(c$,"toString",function(a){return this===Character?"class java.lang.Character":String.valueOf(a)},"~N");D(c$,"MIN_VALUE","\x00","MAX_VALUE","\uffff","MIN_RADIX",2,"MAX_RADIX",36,"TYPE",null);java.lang.Character.TYPE=java.lang.Character.prototype.TYPE=java.lang.Character;a._ArrayWrapper=function(a,b){return{a:a,__CLASS_NAME__:"Array",superClazz:Array,getComponentType:function(){return b},instanceOf:function(a){return w(b,a)},
getName:function(){return this.__CLASS_NAME__}}};c$=t(java.lang.reflect,"Array");c$.newInstance=c(c$,"newInstance",function(b,d){var g=x(d);g.getClass=function(){return new a._ArrayWrapper(this,b)};return g},"Class,~N");b.Date=Date;Date.TYPE="javautil.Date";Date.__CLASS_NAME__="Date";aa(Date,[java.io.Serializable,java.lang.Comparable]);c(b.Date,"clone",function(){return new Date(this.getTime())});c(b.Date,"before",function(a){return this.getTime()<a.getTime()},"javautil.Date");c(b.Date,"after",function(a){return this.getTime()>
a.getTime()},"javautil.Date");c(b.Date,"equals",function(a){return w(a,b.Date)&&this.getTime()==a.getTime()},"Object");c(b.Date,"compareTo",function(a){var b=this.getTime();a=a.getTime();return b<a?-1:b==a?0:1},"javautil.Date");c(b.Date,"compareTo",function(a){return this.compareTo(a)},"Object");e(b.Date,"hashCode",function(){var a=this.getTime();return parseInt(a)^parseInt(a>>32)});c$=q(function(){this.source=null;n(this,arguments)},b,"EventObject",null,java.io.Serializable);m(c$,function(a){if(null!=
a)this.source=a;else throw new IllegalArgumentException;},"~O");c(c$,"getSource",function(){return this.source});e(c$,"toString",function(){return this.getClass().getName()+"[source="+String.valueOf(this.source)+"]"});C(b,"EventListener");c$=q(function(){this.listener=null;n(this,arguments)},b,"EventListenerProxy",null,b.EventListener);m(c$,function(a){this.listener=a},"javautil.EventListener");c(c$,"getListener",function(){return this.listener});C(b,"Iterator");C(b,"ListIterator",b.Iterator);C(b,
"Enumeration");C(b,"Collection",Iterable);C(b,"Set",b.Collection);C(b,"Map");C(b.Map,"Entry");C(b,"List",b.Collection);C(b,"Queue",b.Collection);C(b,"RandomAccess");c$=q(function(){this.stackTrace=this.cause=this.detailMessage=null;n(this,arguments)},java.lang,"Throwable",null,java.io.Serializable);H(c$,function(){this.cause=this});m(c$,function(){this.fillInStackTrace()});m(c$,function(a){this.fillInStackTrace();this.detailMessage=a},"~S");m(c$,function(a,b){this.fillInStackTrace();this.detailMessage=
a;this.cause=b},"~S,Throwable");m(c$,function(a){this.fillInStackTrace();this.detailMessage=null==a?null:a.toString();this.cause=a},"Throwable");c(c$,"getMessage",function(){return this.message||this.detailMessage||this.toString()});c(c$,"getLocalizedMessage",function(){return this.getMessage()});c(c$,"getCause",function(){return this.cause===this?null:this.cause});c(c$,"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(c$,"toString",function(){var a=this.getClass().getName(),b=this.message||this.detailMessage;return b?a+": "+b:a});c(c$,"printStackTrace",function(){System.err.println(this.getStackTrace?this.getStackTrace():this.message+" "+ka())});c(c$,"getStackTrace",function(){for(var a=""+this+"\n",b=0;b<this.stackTrace.length;b++){var d=this.stackTrace[b],g=d.methodName.indexOf("(");if("construct"!=d.methodName.substring(0,g).replace(/\s+/g,"")||null==d.nativeClazz||0>
sa(d.nativeClazz,Throwable))a+=d+"\n"}return a});c(c$,"printStackTrace",function(){this.printStackTrace()},"java.io.PrintStream");c(c$,"printStackTrace",function(){this.printStackTrace()},"java.io.PrintWriter");c(c$,"fillInStackTrace",function(){this.stackTrace=[];for(var b=arguments.callee.caller,d=null,g=[],c=a._callingStackTraces.length-1,e=!0;-1<c||null!=b;){var p=null;if(!e||b==Ba||b==Q||null==b){if(0>c)break;e=!0;d=a._callingStackTraces[c].caller;p=a._callingStackTraces[c].owner;c--}else d=
b,null!=d.claxxOwner?p=d.claxxOwner:null!=d.exClazz&&(p=d.exClazz);b=new StackTraceElement(null!=p&&0!=p.__CLASS_NAME__.length?p.__CLASS_NAME__:"anonymous",(null==d.exName?"anonymous":d.exName)+" ("+ta(d.arguments)+")",null,-1);b.nativeClazz=p;this.stackTrace[this.stackTrace.length]=b;for(p=0;p<g.length;p++)g[p]==d&&(b=new StackTraceElement("lost","missing",null,-3),b.nativeClazz=null,this.stackTrace[this.stackTrace.length]=b,e=!1);null!=d&&(g[g.length]=d);b=d.arguments.callee.caller}a._initializingException=
!1;return this});c(c$,"setStackTrace",function(a){a=a.clone();for(var b=0;b<a.length;b++)if(null==a[b])throw new NullPointerException("stackTrace["+b+"]");this.stackTrace=a},"~A");c$=q(function(){this.fileName=this.methodName=this.declaringClass=null;this.lineNumber=0;n(this,arguments)},java.lang,"StackTraceElement",null,java.io.Serializable);m(c$,function(a,b,d,g){if(null==a||null==b)throw new NullPointerException;this.declaringClass=a;this.methodName=b;this.fileName=d;this.lineNumber=g},"~S,~S,~S,~N");
e(c$,"equals",function(a){if(!w(a,StackTraceElement)||(null==this.methodName||null==a.methodName)||!this.getMethodName().equals(a.getMethodName())||!this.getClassName().equals(a.getClassName()))return!1;var b=this.getFileName();if(null==b){if(null!=a.getFileName())return!1}else if(!b.equals(a.getFileName()))return!1;return this.getLineNumber()!=a.getLineNumber()?!1:!0},"~O");c(c$,"getClassName",function(){return null==this.declaringClass?"<unknown class>":this.declaringClass});c(c$,"getFileName",
function(){return this.fileName});c(c$,"getLineNumber",function(){return this.lineNumber});c(c$,"getMethodName",function(){return null==this.methodName?"<unknown method>":this.methodName});e(c$,"hashCode",function(){return null==this.methodName?0:this.methodName.hashCode()^this.declaringClass.hashCode()});c(c$,"isNativeMethod",function(){return-2==this.lineNumber});e(c$,"toString",function(){var a=new StringBuilder(80);a.append(this.getClassName());a.append(".");a.append(this.getMethodName());if(this.isNativeMethod())a.append("(Native Method)");
else{var b=this.getFileName();if(null==b)a.append("(Unknown Source)");else{var d=this.getLineNumber();a.append("(");a.append(b);0<=d&&(a.append(":"),a.append(d));a.append(")")}}return a.toString()});TypeError.prototype.getMessage||(TypeError.prototype.getMessage=function(){return(this.message||this.toString())+(this.getStackTrace?this.getStackTrace():ka())});Clazz_Error=Error;Clazz_declareTypeError=function(a,b,d,g,c){return q(function(){n(this,arguments);return Clazz_Error()},a,b,d,g,c)};a._Error||
(a._Error=Error);q(function(){n(this,arguments);return a._Error()},java.lang,"Error",Throwable);c$=t(java.lang,"LinkageError",Error);c$=t(java.lang,"IncompatibleClassChangeError",LinkageError);c$=t(java.lang,"AbstractMethodError",IncompatibleClassChangeError);c$=t(java.lang,"AssertionError",Error);m(c$,function(a){y(this,AssertionError,[String.valueOf(a),w(a,Throwable)?a:null])},"~O");m(c$,function(a){this.construct(""+a)},"~B");m(c$,function(a){this.construct(""+a)},"~N");c$=t(java.lang,"ClassCircularityError",
LinkageError);c$=t(java.lang,"ClassFormatError",LinkageError);c$=q(function(){this.exception=null;n(this,arguments)},java.lang,"ExceptionInInitializerError",LinkageError);m(c$,function(){y(this,ExceptionInInitializerError);this.initCause(null)});m(c$,function(a){y(this,ExceptionInInitializerError,[a]);this.initCause(null)},"~S");m(c$,function(a){y(this,ExceptionInInitializerError);this.exception=a;this.initCause(a)},"Throwable");c(c$,"getException",function(){return this.exception});e(c$,"getCause",
function(){return this.exception});c$=t(java.lang,"IllegalAccessError",IncompatibleClassChangeError);c$=t(java.lang,"InstantiationError",IncompatibleClassChangeError);c$=t(java.lang,"VirtualMachineError",Error);c$=t(java.lang,"InternalError",VirtualMachineError);c$=t(java.lang,"NoClassDefFoundError",LinkageError);c$=t(java.lang,"NoSuchFieldError",IncompatibleClassChangeError);c$=t(java.lang,"NoSuchMethodError",IncompatibleClassChangeError);c$=t(java.lang,"OutOfMemoryError",VirtualMachineError);c$=
t(java.lang,"StackOverflowError",VirtualMachineError);c$=t(java.lang,"UnknownError",VirtualMachineError);c$=t(java.lang,"UnsatisfiedLinkError",LinkageError);c$=t(java.lang,"UnsupportedClassVersionError",ClassFormatError);c$=t(java.lang,"VerifyError",LinkageError);c$=t(java.lang,"ThreadDeath",Error);m(c$,function(){y(this,ThreadDeath,[])});c$=t(java.lang,"Exception",Throwable);c$=t(java.lang,"RuntimeException",Exception);c$=t(java.lang,"ArithmeticException",RuntimeException);c$=t(java.lang,"IndexOutOfBoundsException",
RuntimeException);c$=t(java.lang,"ArrayIndexOutOfBoundsException",IndexOutOfBoundsException);m(c$,function(a){y(this,ArrayIndexOutOfBoundsException,["Array index out of range: "+a])},"~N");c$=t(java.lang,"ArrayStoreException",RuntimeException);c$=t(java.lang,"ClassCastException",RuntimeException);c$=q(function(){this.ex=null;n(this,arguments)},java.lang,"ClassNotFoundException",Exception);m(c$,function(){y(this,ClassNotFoundException,[W("Throwable")])});m(c$,function(a){y(this,ClassNotFoundException,
[a,null])},"~S");m(c$,function(a,b){y(this,ClassNotFoundException,[a]);this.ex=b},"~S,Throwable");c(c$,"getException",function(){return this.ex});e(c$,"getCause",function(){return this.ex});c$=t(java.lang,"CloneNotSupportedException",Exception);c$=t(java.lang,"IllegalAccessException",Exception);c$=t(java.lang,"IllegalArgumentException",RuntimeException);m(c$,function(a){y(this,IllegalArgumentException,[null==a?null:a.toString(),a])},"Throwable");c$=t(java.lang,"IllegalMonitorStateException",RuntimeException);
c$=t(java.lang,"IllegalStateException",RuntimeException);m(c$,function(a){y(this,IllegalStateException,[null==a?null:a.toString(),a])},"Throwable");c$=t(java.lang,"IllegalThreadStateException",IllegalArgumentException);c$=t(java.lang,"InstantiationException",Exception);c$=t(java.lang,"InterruptedException",Exception);c$=t(java.lang,"NegativeArraySizeException",RuntimeException);c$=t(java.lang,"NoSuchFieldException",Exception);c$=t(java.lang,"NoSuchMethodException",Exception);c$=t(java.lang,"NullPointerException",
RuntimeException);c$=t(java.lang,"NumberFormatException",IllegalArgumentException);c$=t(java.lang,"SecurityException",RuntimeException);m(c$,function(a){y(this,SecurityException,[null==a?null:a.toString(),a])},"Throwable");c$=t(java.lang,"StringIndexOutOfBoundsException",IndexOutOfBoundsException);m(c$,function(a){y(this,StringIndexOutOfBoundsException,["String index out of range: "+a])},"~N");c$=t(java.lang,"UnsupportedOperationException",RuntimeException);m(c$,function(){y(this,UnsupportedOperationException,
[])});m(c$,function(a){y(this,UnsupportedOperationException,[null==a?null:a.toString(),a])},"Throwable");c$=q(function(){this.target=null;n(this,arguments)},java.lang.reflect,"InvocationTargetException",Exception);m(c$,function(){y(this,java.lang.reflect.InvocationTargetException,[W("Throwable")])});m(c$,function(a){y(this,java.lang.reflect.InvocationTargetException,[null,a]);this.target=a},"Throwable");m(c$,function(a,b){y(this,java.lang.reflect.InvocationTargetException,[b,a]);this.target=a},"Throwable,~S");
c(c$,"getTargetException",function(){return this.target});e(c$,"getCause",function(){return this.target});c$=q(function(){this.undeclaredThrowable=null;n(this,arguments)},java.lang.reflect,"UndeclaredThrowableException",RuntimeException);m(c$,function(a){y(this,java.lang.reflect.UndeclaredThrowableException);this.undeclaredThrowable=a;this.initCause(a)},"Throwable");m(c$,function(a,b){y(this,java.lang.reflect.UndeclaredThrowableException,[b]);this.undeclaredThrowable=a;this.initCause(a)},"Throwable,~S");
c(c$,"getUndeclaredThrowable",function(){return this.undeclaredThrowable});e(c$,"getCause",function(){return this.undeclaredThrowable});c$=t(java.io,"IOException",Exception);c$=t(java.io,"CharConversionException",java.io.IOException);c$=t(java.io,"EOFException",java.io.IOException);c$=t(java.io,"FileNotFoundException",java.io.IOException);c$=q(function(){this.bytesTransferred=0;n(this,arguments)},java.io,"InterruptedIOException",java.io.IOException);c$=t(java.io,"ObjectStreamException",java.io.IOException);
c$=q(function(){this.classname=null;n(this,arguments)},java.io,"InvalidClassException",java.io.ObjectStreamException);m(c$,function(a,b){y(this,java.io.InvalidClassException,[b]);this.classname=a},"~S,~S");c(c$,"getMessage",function(){var a=Q(this,java.io.InvalidClassException,"getMessage",[]);null!=this.classname&&(a=this.classname+"; "+a);return a});c$=t(java.io,"InvalidObjectException",java.io.ObjectStreamException);c$=t(java.io,"NotActiveException",java.io.ObjectStreamException);c$=t(java.io,
"NotSerializableException",java.io.ObjectStreamException);c$=q(function(){this.eof=!1;this.length=0;n(this,arguments)},java.io,"OptionalDataException",java.io.ObjectStreamException);c$=t(java.io,"StreamCorruptedException",java.io.ObjectStreamException);c$=t(java.io,"SyncFailedException",java.io.IOException);c$=t(java.io,"UnsupportedEncodingException",java.io.IOException);c$=t(java.io,"UTFDataFormatException",java.io.IOException);c$=q(function(){this.detail=null;n(this,arguments)},java.io,"WriteAbortedException",
java.io.ObjectStreamException);m(c$,function(a,b){y(this,java.io.WriteAbortedException,[a]);this.detail=b;this.initCause(b)},"~S,Exception");c(c$,"getMessage",function(){var a=Q(this,java.io.WriteAbortedException,"getMessage",[]);return this.detail?a+"; "+this.detail.toString():a});e(c$,"getCause",function(){return this.detail});c$=t(b,"ConcurrentModificationException",RuntimeException);m(c$,function(){y(this,b.ConcurrentModificationException,[])});c$=t(b,"EmptyStackException",RuntimeException);c$=
q(function(){this.key=this.className=null;n(this,arguments)},b,"MissingResourceException",RuntimeException);m(c$,function(a,d,g){y(this,b.MissingResourceException,[a]);this.className=d;this.key=g},"~S,~S,~S");c(c$,"getClassName",function(){return this.className});c(c$,"getKey",function(){return this.key});c$=t(b,"NoSuchElementException",RuntimeException);c$=t(b,"TooManyListenersException",Exception);c$=t(java.lang,"Void");D(c$,"TYPE",null);java.lang.Void.TYPE=java.lang.Void;C(java.lang.reflect,"GenericDeclaration");
C(java.lang.reflect,"AnnotatedElement");c$=t(java.lang.reflect,"AccessibleObject",null,java.lang.reflect.AnnotatedElement);m(c$,function(){});c(c$,"isAccessible",function(){return!1});c$.setAccessible=c(c$,"setAccessible",function(){},"~A,~B");c(c$,"setAccessible",function(){},"~B");e(c$,"isAnnotationPresent",function(){return!1},"Class");e(c$,"getDeclaredAnnotations",function(){return[]});e(c$,"getAnnotations",function(){return[]});e(c$,"getAnnotation",function(){return null},"Class");c$.marshallArguments=
c(c$,"marshallArguments",function(){return null},"~A,~A");c(c$,"invokeV",function(){},"~O,~A");c(c$,"invokeL",function(){return null},"~O,~A");c(c$,"invokeI",function(){return 0},"~O,~A");c(c$,"invokeJ",function(){return 0},"~O,~A");c(c$,"invokeF",function(){return 0},"~O,~A");c(c$,"invokeD",function(){return 0},"~O,~A");c$.emptyArgs=c$.prototype.emptyArgs=[];C(java.lang.reflect,"InvocationHandler");c$=C(java.lang.reflect,"Member");D(c$,"PUBLIC",0,"DECLARED",1);c$=t(java.lang.reflect,"Modifier");
m(c$,function(){});c$.isAbstract=c(c$,"isAbstract",function(a){return 0!=(a&1024)},"~N");c$.isFinal=c(c$,"isFinal",function(a){return 0!=(a&16)},"~N");c$.isInterface=c(c$,"isInterface",function(a){return 0!=(a&512)},"~N");c$.isNative=c(c$,"isNative",function(a){return 0!=(a&256)},"~N");c$.isPrivate=c(c$,"isPrivate",function(a){return 0!=(a&2)},"~N");c$.isProtected=c(c$,"isProtected",function(a){return 0!=(a&4)},"~N");c$.isPublic=c(c$,"isPublic",function(a){return 0!=(a&1)},"~N");c$.isStatic=c(c$,
"isStatic",function(a){return 0!=(a&8)},"~N");c$.isStrict=c(c$,"isStrict",function(a){return 0!=(a&2048)},"~N");c$.isSynchronized=c(c$,"isSynchronized",function(a){return 0!=(a&32)},"~N");c$.isTransient=c(c$,"isTransient",function(a){return 0!=(a&128)},"~N");c$.isVolatile=c(c$,"isVolatile",function(a){return 0!=(a&64)},"~N");c$.toString=c(c$,"toString",function(a){var b=[];java.lang.reflect.Modifier.isPublic(a)&&(b[b.length]="public");java.lang.reflect.Modifier.isProtected(a)&&(b[b.length]="protected");
java.lang.reflect.Modifier.isPrivate(a)&&(b[b.length]="private");java.lang.reflect.Modifier.isAbstract(a)&&(b[b.length]="abstract");java.lang.reflect.Modifier.isStatic(a)&&(b[b.length]="static");java.lang.reflect.Modifier.isFinal(a)&&(b[b.length]="final");java.lang.reflect.Modifier.isTransient(a)&&(b[b.length]="transient");java.lang.reflect.Modifier.isVolatile(a)&&(b[b.length]="volatile");java.lang.reflect.Modifier.isSynchronized(a)&&(b[b.length]="synchronized");java.lang.reflect.Modifier.isNative(a)&&
(b[b.length]="native");java.lang.reflect.Modifier.isStrict(a)&&(b[b.length]="strictfp");java.lang.reflect.Modifier.isInterface(a)&&(b[b.length]="interface");return 0<b.length?b.join(" "):""},"~N");D(c$,"PUBLIC",1,"PRIVATE",2,"PROTECTED",4,"STATIC",8,"FINAL",16,"SYNCHRONIZED",32,"VOLATILE",64,"TRANSIENT",128,"NATIVE",256,"INTERFACE",512,"ABSTRACT",1024,"STRICT",2048,"BRIDGE",64,"VARARGS",128,"SYNTHETIC",4096,"ANNOTATION",8192,"ENUM",16384);c$=q(function(){this.exceptionTypes=this.parameterTypes=this.clazz=
null;this.modifiers=0;n(this,arguments)},java.lang.reflect,"Constructor",java.lang.reflect.AccessibleObject,[java.lang.reflect.GenericDeclaration,java.lang.reflect.Member]);m(c$,function(a,b,d,g){y(this,java.lang.reflect.Constructor,[]);this.clazz=a;this.parameterTypes=b;this.exceptionTypes=d;this.modifiers=g},"Class,~A,~A,~N");e(c$,"getTypeParameters",function(){return null});c(c$,"toGenericString",function(){return null});c(c$,"getGenericParameterTypes",function(){return null});c(c$,"getGenericExceptionTypes",
function(){return null});c(c$,"getParameterAnnotations",function(){return null});c(c$,"isVarArgs",function(){return!1});e(c$,"isSynthetic",function(){return!1});e(c$,"equals",function(a){if(null!=a&&w(a,java.lang.reflect.Constructor)&&this.getDeclaringClass()===a.getDeclaringClass()){var b=this.parameterTypes;a=a.parameterTypes;if(b.length==a.length){for(var d=0;d<b.length;d++)if(b[d]!==a[d])return!1;return!0}}return!1},"~O");e(c$,"getDeclaringClass",function(){return this.clazz});c(c$,"getExceptionTypes",
function(){return this.exceptionTypes});e(c$,"getModifiers",function(){return this.modifiers});e(c$,"getName",function(){return this.getDeclaringClass().getName()});c(c$,"getParameterTypes",function(){return this.parameterTypes});e(c$,"hashCode",function(){return this.getDeclaringClass().getName().hashCode()});c(c$,"newInstance",function(a){var b=new this.clazz(Ca);n(b,a);return b},"~A");e(c$,"toString",function(){return null});c$=t(java.lang.reflect,"Field",java.lang.reflect.AccessibleObject,java.lang.reflect.Member);
e(c$,"isSynthetic",function(){return!1});c(c$,"toGenericString",function(){return null});c(c$,"isEnumConstant",function(){return!1});c(c$,"getGenericType",function(){return null});e(c$,"equals",function(){return!1},"~O");e(c$,"getDeclaringClass",function(){return null});e(c$,"getName",function(){return null});c(c$,"getType",function(){return null});e(c$,"hashCode",function(){return 0});e(c$,"toString",function(){return null});c$=q(function(){this.exceptionTypes=this.parameterTypes=this.returnType=
this.name=this.clazz=null;this.modifiers=0;n(this,arguments)},java.lang.reflect,"Method",java.lang.reflect.AccessibleObject,[java.lang.reflect.GenericDeclaration,java.lang.reflect.Member]);m(c$,function(a,b,d,g,c,e){y(this,java.lang.reflect.Method,[]);this.clazz=a;this.name=b;this.parameterTypes=d;this.returnType=g;this.exceptionTypes=c;this.modifiers=e},"Class,~S,~A,Class,~A,~N");e(c$,"getTypeParameters",function(){return null});c(c$,"toGenericString",function(){return null});c(c$,"getGenericParameterTypes",
function(){return null});c(c$,"getGenericExceptionTypes",function(){return null});c(c$,"getGenericReturnType",function(){return null});c(c$,"getParameterAnnotations",function(){return null});c(c$,"isVarArgs",function(){return!1});c(c$,"isBridge",function(){return!1});e(c$,"isSynthetic",function(){return!1});c(c$,"getDefaultValue",function(){return null});e(c$,"equals",function(a){if(null!=a&&w(a,java.lang.reflect.Method)&&this.getDeclaringClass()===a.getDeclaringClass()&&this.getName()===a.getName()){var b=
this.parameterTypes;a=a.parameterTypes;if(b.length==a.length){for(var d=0;d<b.length;d++)if(b[d]!==a[d])return!1;return!0}}return!1},"~O");e(c$,"getDeclaringClass",function(){return this.clazz});c(c$,"getExceptionTypes",function(){return this.exceptionTypes});e(c$,"getModifiers",function(){return this.modifiers});e(c$,"getName",function(){return this.name});c(c$,"getParameterTypes",function(){return this.parameterTypes});c(c$,"getReturnType",function(){return this.returnType});e(c$,"hashCode",function(){return this.getDeclaringClass().getName().hashCode()^
this.getName().hashCode()});c(c$,"invoke",function(a,b){var d=this.clazz.prototype[this.getName()];null==d&&(d=this.clazz[this.getName()]);null!=d&&d.apply(a,b)},"~O,~A");e(c$,"toString",function(){return null})})($);if(!Jmol._debugCode){s(null,"java.lang.AbstractStringBuilder","java.io.InvalidObjectException java.lang.ArrayIndexOutOfBoundsException $.IndexOutOfBoundsException $.NegativeArraySizeException $.NullPointerException $.StringIndexOutOfBoundsException".split(" "),function(){c$=q(function(){this.value=
null;this.count=0;this.shared=!1;n(this,arguments)},java.lang,"AbstractStringBuilder");c(c$,"getValue",function(){return this.value});c(c$,"shareValue",function(){this.shared=!0;return this.value});c(c$,"set",function(a,b){null==a&&(a=x(0,"\x00"));if(a.length<b)throw new java.io.InvalidObjectException("K0199");this.shared=!1;this.value=a;this.count=b},"~A,~N");m(c$,function(){this.value=x(16,"\x00")});m(c$,function(a){if(0>a)throw new NegativeArraySizeException;this.value=x(a,"\x00")},"~N");m(c$,
function(a){this.count=a.length;this.shared=!1;this.value=x(this.count+16,"\x00");a.getChars(0,this.count,this.value,0)},"~S");c(c$,"enlargeBuffer",($fz=function(a){var b=(this.value.length<<1)+2;a=x(a>b?a:b,"\x00");System.arraycopy(this.value,0,a,0,this.count);this.value=a;this.shared=!1},$fz.isPrivate=!0,$fz),"~N");c(c$,"appendNull",function(){var a=this.count+4;a>this.value.length?this.enlargeBuffer(a):this.shared&&(this.value=this.value.clone(),this.shared=!1);this.value[this.count++]="n";this.value[this.count++]=
"u";this.value[this.count++]="l";this.value[this.count++]="l"});c(c$,"append0",function(a){var b=this.count+a.length;b>this.value.length?this.enlargeBuffer(b):this.shared&&(this.value=this.value.clone(),this.shared=!1);System.arraycopy(a,0,this.value,this.count,a.length);this.count=b},"~A");c(c$,"append0",function(a,b,d){if(null==a)throw new NullPointerException;if(0<=b&&0<=d&&d<=a.length-b){var g=this.count+d;g>this.value.length?this.enlargeBuffer(g):this.shared&&(this.value=this.value.clone(),this.shared=
!1);System.arraycopy(a,b,this.value,this.count,d);this.count=g}else throw new ArrayIndexOutOfBoundsException;},"~A,~N,~N");c(c$,"append0",function(a){this.count==this.value.length&&this.enlargeBuffer(this.count+1);this.shared&&(this.value=this.value.clone(),this.shared=!1);this.value[this.count++]=a},"~N");c(c$,"append0",function(a){if(null==a)this.appendNull();else{var b=a.length,d=this.count+b;d>this.value.length?this.enlargeBuffer(d):this.shared&&(this.value=this.value.clone(),this.shared=!1);
a.getChars(0,b,this.value,this.count);this.count=d}},"~S");c(c$,"append0",function(a,b,d){null==a&&(a="null");if(0>b||0>d||b>d||d>a.length())throw new IndexOutOfBoundsException;this.append0(a.subSequence(b,d).toString())},"CharSequence,~N,~N");c(c$,"capacity",function(){return this.value.length});c(c$,"charAt",function(a){if(0>a||a>=this.count)throw new StringIndexOutOfBoundsException(a);return this.value[a]},"~N");c(c$,"delete0",function(a,b){if(0<=a){b>this.count&&(b=this.count);if(b==a)return;
if(b>a){var d=this.count-b;if(0<d)if(this.shared){var g=x(this.value.length,"\x00");System.arraycopy(this.value,0,g,0,a);System.arraycopy(this.value,b,g,a,d);this.value=g;this.shared=!1}else System.arraycopy(this.value,b,this.value,a,d);this.count-=b-a;return}}throw new StringIndexOutOfBoundsException;},"~N,~N");c(c$,"deleteCharAt0",function(a){if(0>a||a>=this.count)throw new StringIndexOutOfBoundsException(a);var b=this.count-a-1;if(0<b)if(this.shared){var d=x(this.value.length,"\x00");System.arraycopy(this.value,
0,d,0,a);System.arraycopy(this.value,a+1,d,a,b);this.value=d;this.shared=!1}else System.arraycopy(this.value,a+1,this.value,a,b);this.count--},"~N");c(c$,"ensureCapacity",function(a){a>this.value.length&&this.enlargeBuffer(a)},"~N");c(c$,"getChars",function(a,b,d,g){if(a>this.count||b>this.count||a>b)throw new StringIndexOutOfBoundsException;System.arraycopy(this.value,a,d,g,b-a)},"~N,~N,~A,~N");c(c$,"insert0",function(a,b){if(0>a||a>this.count)throw new StringIndexOutOfBoundsException(a);0!=b.length&&
(this.move(b.length,a),System.arraycopy(b,0,this.value,a,b.length),this.count+=b.length)},"~N,~A");c(c$,"insert0",function(a,b,d,g){if(0<=a&&a<=this.count){if(0<=d&&0<=g&&g<=b.length-d){0!=g&&(this.move(g,a),System.arraycopy(b,d,this.value,a,g),this.count+=g);return}throw new StringIndexOutOfBoundsException("offset "+d+", len "+g+", array.length "+b.length);}throw new StringIndexOutOfBoundsException(a);},"~N,~A,~N,~N");c(c$,"insert0",function(a,b){if(0>a||a>this.count)throw new ArrayIndexOutOfBoundsException(a);
this.move(1,a);this.value[a]=b;this.count++},"~N,~N");c(c$,"insert0",function(a,b){if(0<=a&&a<=this.count){null==b&&(b="null");var d=b.length;0!=d&&(this.move(d,a),b.getChars(0,d,this.value,a),this.count+=d)}else throw new StringIndexOutOfBoundsException(a);},"~N,~S");c(c$,"insert0",function(a,b,d,g){null==b&&(b="null");if(0>a||a>this.count||0>d||0>g||d>g||g>b.length())throw new IndexOutOfBoundsException;this.insert0(a,b.subSequence(d,g).toString())},"~N,CharSequence,~N,~N");c(c$,"length",function(){return this.count});
c(c$,"move",($fz=function(a,b){var d;if(this.value.length-this.count>=a){if(!this.shared){System.arraycopy(this.value,b,this.value,b+a,this.count-b);return}d=this.value.length}else{d=this.count+a;var g=(this.value.length<<1)+2;d=d>g?d:g}d=x(d,"\x00");System.arraycopy(this.value,0,d,0,b);System.arraycopy(this.value,b,d,b+a,this.count-b);this.value=d;this.shared=!1},$fz.isPrivate=!0,$fz),"~N,~N");c(c$,"replace0",function(a,b,d){if(0<=a){b>this.count&&(b=this.count);if(b>a){var g=d.length,c=b-a-g;if(0<
c)if(this.shared){var h=x(this.value.length,"\x00");System.arraycopy(this.value,0,h,0,a);System.arraycopy(this.value,b,h,a+g,this.count-b);this.value=h;this.shared=!1}else System.arraycopy(this.value,b,this.value,a+g,this.count-b);else 0>c?this.move(-c,b):this.shared&&(this.value=this.value.clone(),this.shared=!1);d.getChars(0,g,this.value,a);this.count-=c;return}if(a==b){if(null==d)throw new NullPointerException;this.insert0(a,d);return}}throw new StringIndexOutOfBoundsException;},"~N,~N,~S");c(c$,
"reverse0",function(){if(!(2>this.count))if(this.shared){for(var a=x(this.value.length,"\x00"),b=0,d=this.count;b<this.count;b++)a[--d]=this.value[b];this.value=a;this.shared=!1}else for(var b=0,d=this.count,a=Math.floor(this.count/2);b<a;b++){var g=this.value[--d];this.value[d]=this.value[b];this.value[b]=g}});c(c$,"setCharAt",function(a,b){if(0>a||a>=this.count)throw new StringIndexOutOfBoundsException(a);this.shared&&(this.value=this.value.clone(),this.shared=!1);this.value[a]=b},"~N,~N");c(c$,
"setLength",function(a){if(0>a)throw new StringIndexOutOfBoundsException(a);if(this.count<a)if(a>this.value.length)this.enlargeBuffer(a);else if(this.shared){var b=x(this.value.length,"\x00");System.arraycopy(this.value,0,b,0,this.count);this.value=b;this.shared=!1}else for(b=this.count;b<a;b++)this.value[b]=String.fromCharCode(0);this.count=a},"~N");c(c$,"substring",function(a){if(0<=a&&a<=this.count){if(a==this.count)return"";this.shared=!0;return String.instantialize(a,this.count-a,this.value)}throw new StringIndexOutOfBoundsException(a);
},"~N");c(c$,"substring",function(a,b){if(0<=a&&a<=b&&b<=this.count){if(a==b)return"";this.shared=!0;return String.instantialize(this.value,a,b-a)}throw new StringIndexOutOfBoundsException;},"~N,~N");e(c$,"toString",function(){if(0==this.count)return"";if(256<=this.count&&this.count<=this.value.length>>1)return String.instantialize(this.value,0,this.count);this.shared=!0;return String.instantialize(0,this.count,this.value)});c(c$,"subSequence",function(a,b){return this.substring(a,b)},"~N,~N");c(c$,
"indexOf",function(a){return this.indexOf(a,0)},"~S");c(c$,"indexOf",function(a,b){0>b&&(b=0);var d=a.length;if(0<d){if(d+b>this.count)return-1;for(var g=a.charAt(0);;){for(var c=b,h=!1;c<this.count;c++)if(this.value[c].charCodeAt(0)==g.charCodeAt(0)){h=!0;break}if(!h||d+c>this.count)return-1;for(var h=c,e=0;++e<d&&this.value[++h].charCodeAt(0)==a.charAt(e).charCodeAt(0););if(e==d)return c;b=c+1}}return b<this.count||0==b?b:this.count},"~S,~N");c(c$,"lastIndexOf",function(a){return this.lastIndexOf(a,
this.count)},"~S");c(c$,"lastIndexOf",function(a,b){var d=a.length;if(d<=this.count&&0<=b){if(0<d){b>this.count-d&&(b=this.count-d);for(var g=a.charAt(0);;){for(var c=b,h=!1;0<=c;--c)if(this.value[c].charCodeAt(0)==g.charCodeAt(0)){h=!0;break}if(!h)return-1;for(var h=c,e=0;++e<d&&this.value[++h].charCodeAt(0)==a.charAt(e).charCodeAt(0););if(e==d)return c;b=c-1}}return b<this.count?b:this.count}return-1},"~S,~N");c(c$,"trimToSize",function(){if(this.count<this.value.length){var a=x(this.count,"\x00");
System.arraycopy(this.value,0,a,0,this.count);this.value=a;this.shared=!1}});D(c$,"INITIAL_CAPACITY",16)});s(null,"java.lang.Enum",["java.lang.CloneNotSupportedException","$.IllegalArgumentException","$.NullPointerException"],function(){c$=q(function(){this.$name=null;this.$ordinal=0;n(this,arguments)},java.lang,"Enum",null,[java.io.Serializable,Comparable]);m(c$,function(a,b){this.$name=a;this.$ordinal=b},"~S,~N");c(c$,"name",function(){return this.$name});c(c$,"ordinal",function(){return this.$ordinal});
e(c$,"toString",function(){return this.$name});e(c$,"equals",function(a){return this===a},"~O");e(c$,"hashCode",function(){return this.$ordinal+(null==this.$name?0:this.$name.hashCode())});e(c$,"clone",function(){throw new CloneNotSupportedException("KA004");});e(c$,"compareTo",function(a){return this.$ordinal-a.$ordinal},"~O");c(c$,"getDeclaringClass",function(){var a=this.getClass(),b=a.getSuperclass();return Enum===b?a:b});c$.$valueOf=c(c$,"$valueOf",function(a,b){if(null==a||null==b)throw new NullPointerException("KA001");
var d=Enum.getValues(a);if(null==d)throw new IllegalArgumentException("KA005");for(var g,c=0;c<d.length&&((g=d[c])||1);c++)if(g.$name.equals(b))return g;throw new IllegalArgumentException("KA006");},"Class,~S");c$.getValues=c(c$,"getValues",function(a){return a.values()},"Class")});s(["java.lang.AbstractStringBuilder","$.Appendable"],"java.lang.StringBuffer",["java.lang.Character","$.Double","$.Float","$.Long"],function(){c$=t(java.lang,"StringBuffer",AbstractStringBuilder,[Appendable,java.io.Serializable,
CharSequence]);m(c$,function(a){if(null==a)throw new NullPointerException;y(this,StringBuffer,[a.toString()])},"CharSequence");c(c$,"append",function(a){return this.append(a?"true":"false")},"~B");c(c$,"append",function(a){this.append0(a);return this},"~N");c(c$,"append",function(a){return this.append(Double.toString(a))},"~N");c(c$,"append",function(a){null==a?this.appendNull():this.append0(a.toString());return this},"~O");c(c$,"append",function(a){this.append0(a);return this},"~S");c(c$,"append",
function(a){null==a?this.appendNull():this.append0(a.getValue(),0,a.length());return this},"StringBuffer");c(c$,"append",function(a){this.append0(a);return this},"~A");c(c$,"append",function(a,b,d){this.append0(a,b,d);return this},"~A,~N,~N");c(c$,"append",function(a){null==a?this.appendNull():this.append0(a.toString());return this},"CharSequence");c(c$,"append",function(a,b,d){this.append0(a,b,d);return this},"CharSequence,~N,~N");c(c$,"appendCodePoint",function(a){return this.append(Character.toChars(a))},
"~N");c(c$,"$delete",function(a,b){this.delete0(a,b);return this},"~N,~N");c(c$,"deleteCharAt",function(a){this.deleteCharAt0(a);return this},"~N");c(c$,"insert",function(a,b){this.insert0(a,b);return this},"~N,~N");c(c$,"insert",function(a,b){return this.insert(a,b?"true":"false")},"~N,~B");c(c$,"insert",function(a,b){return this.insert(a,Integer.toString(b))},"~N,~N");c(c$,"insert",function(a,b){return this.insert(a,Long.toString(b))},"~N,~N");c(c$,"insert",function(a,b){return this.insert(a,Double.toString(b))},
"~N,~N");c(c$,"insert",function(a,b){return this.insert(a,Float.toString(b))},"~N,~N");c(c$,"insert",function(a,b){return this.insert(a,null==b?"null":b.toString())},"~N,~O");c(c$,"insert",function(a,b){this.insert0(a,b);return this},"~N,~S");c(c$,"insert",function(a,b){this.insert0(a,b);return this},"~N,~A");c(c$,"insert",function(a,b,d,g){this.insert0(a,b,d,g);return this},"~N,~A,~N,~N");c(c$,"insert",function(a,b){this.insert0(a,null==b?"null":b.toString());return this},"~N,CharSequence");c(c$,
"insert",function(a,b,d,g){this.insert0(a,b,d,g);return this},"~N,CharSequence,~N,~N");c(c$,"replace",function(a,b,d){this.replace0(a,b,d);return this},"~N,~N,~S");c(c$,"reverse",function(){this.reverse0();return this});e(c$,"subSequence",function(a,b){return Q(this,StringBuffer,"substring",[a,b])},"~N,~N")});s(["java.lang.AbstractStringBuilder","$.Appendable"],"java.lang.StringBuilder",["java.lang.Double","$.Float","$.Long"],function(){c$=t(java.lang,"StringBuilder",AbstractStringBuilder,[Appendable,
CharSequence,java.io.Serializable]);m(c$,function(a){y(this,StringBuilder,[a.toString()])},"CharSequence");c(c$,"append",function(a){this.append0(a?"true":"false");return this},"~B");c(c$,"append",function(a){this.append0(a);return this},"~N");c(c$,"append",function(a){this.append0(Integer.toString(a));return this},"~N");c(c$,"append",function(a){this.append0(Long.toString(a));return this},"~N");c(c$,"append",function(a){this.append0(Float.toString(a));return this},"~N");c(c$,"append",function(a){this.append0(Double.toString(a));
return this},"~N");c(c$,"append",function(a){null==a?this.appendNull():this.append0(a.toString());return this},"~O");c(c$,"append",function(a){this.append0(a);return this},"~S");c(c$,"append",function(a){null==a?this.appendNull():this.append0(a.getValue(),0,a.length());return this},"StringBuffer");c(c$,"append",function(a){this.append0(a);return this},"~A");c(c$,"append",function(a,b,d){this.append0(a,b,d);return this},"~A,~N,~N");c(c$,"append",function(a){null==a?this.appendNull():this.append0(a.toString());
return this},"CharSequence");c(c$,"append",function(a,b,d){this.append0(a,b,d);return this},"CharSequence,~N,~N");c(c$,"$delete",function(a,b){this.delete0(a,b);return this},"~N,~N");c(c$,"deleteCharAt",function(a){this.deleteCharAt0(a);return this},"~N");c(c$,"insert",function(a,b){this.insert0(a,b?"true":"false");return this},"~N,~B");c(c$,"insert",function(a,b){this.insert0(a,b);return this},"~N,~N");c(c$,"insert",function(a,b){this.insert0(a,Integer.toString(b));return this},"~N,~N");c(c$,"insert",
function(a,b){this.insert0(a,Long.toString(b));return this},"~N,~N");c(c$,"insert",function(a,b){this.insert0(a,Float.toString(b));return this},"~N,~N");c(c$,"insert",function(a,b){this.insert0(a,Double.toString(b));return this},"~N,~N");c(c$,"insert",function(a,b){this.insert0(a,null==b?"null":b.toString());return this},"~N,~O");c(c$,"insert",function(a,b){this.insert0(a,b);return this},"~N,~S");c(c$,"insert",function(a,b){this.insert0(a,b);return this},"~N,~A");c(c$,"insert",function(a,b,d,g){this.insert0(a,
b,d,g);return this},"~N,~A,~N,~N");c(c$,"insert",function(a,b){this.insert0(a,null==b?"null":b.toString());return this},"~N,CharSequence");c(c$,"insert",function(a,b,d,g){this.insert0(a,b,d,g);return this},"~N,CharSequence,~N,~N");c(c$,"replace",function(a,b,d){this.replace0(a,b,d);return this},"~N,~N,~S");c(c$,"reverse",function(){this.reverse0();return this})});s(null,"java.lang.Thread",["java.lang.IllegalArgumentException","$.ThreadGroup","java.util.Date"],function(){c$=q(function(){this.name=
this.group=this.target=null;this.priority=0;n(this,arguments)},java.lang,"Thread",null,Runnable);c$.currentThread=c(c$,"currentThread",function(){null==Thread.J2S_THREAD&&(Thread.J2S_THREAD=new Thread,Thread.prototype.J2S_THREAD=Thread.J2S_THREAD);return Thread.J2S_THREAD});c$.sleep=c(c$,"sleep",function(){Da("Thread.sleep is not implemented in Java2Script!")},"~N");m(c$,function(){});m(c$,function(a){this.init(null,a,"Thread-"+(new java.util.Date).getTime()+Math.random(),0)},"Runnable");m(c$,function(a,
b){this.init(a,b,"Thread-"+(new java.util.Date).getTime()+Math.random(),0)},"ThreadGroup,Runnable");m(c$,function(a){this.init(null,null,a,0)},"~S");m(c$,function(a,b){this.init(a,null,b,0)},"ThreadGroup,~S");m(c$,function(a,b){this.init(null,a,b,0)},"Runnable,~S");m(c$,function(a,b,d){this.init(a,b,d,0)},"ThreadGroup,Runnable,~S");m(c$,function(a,b,d,g){this.init(a,b,d,g)},"ThreadGroup,Runnable,~S,~N");c(c$,"init",($fz=function(a,b,d){null==a&&(a=new ThreadGroup);this.group=a;this.target=b;this.name=
d;this.priority=5},$fz.isPrivate=!0,$fz),"ThreadGroup,Runnable,~S,~N");c(c$,"start",function(){window.setTimeout(function(a){return function(){a.run()}}(this),0)});c(c$,"run",function(){null!=this.target&&this.target.run()});c(c$,"setPriority",function(a){if(10<a||1>a)throw new IllegalArgumentException;this.priority=a},"~N");c(c$,"getPriority",function(){return this.priority});c(c$,"interrupt",function(){});c(c$,"setName",function(a){this.name=a},"~S");c(c$,"getName",function(){return String.valueOf(this.name)});
c(c$,"getThreadGroup",function(){return this.group});e(c$,"toString",function(){var a=this.getThreadGroup();return null!=a?"Thread["+this.getName()+","+this.getPriority()+","+a.getName()+"]":"Thread["+this.getName()+","+this.getPriority()+",]"});D(c$,"MIN_PRIORITY",1,"NORM_PRIORITY",5,"MAX_PRIORITY",10,"J2S_THREAD",null)});s(null,"java.lang.ThreadGroup",["java.lang.NullPointerException","$.Thread"],function(){c$=q(function(){this.name=this.parent=null;this.maxPriority=0;n(this,arguments)},java.lang,
"ThreadGroup");m(c$,function(){this.name="system";this.maxPriority=10});m(c$,function(a){this.construct(Thread.currentThread().getThreadGroup(),a)},"~S");m(c$,function(a,b){if(null==a)throw new NullPointerException;this.name=b;this.parent=a;this.maxPriority=10},"ThreadGroup,~S");c(c$,"getName",function(){return this.name});c(c$,"getParent",function(){return this.parent});c(c$,"getMaxPriority",function(){return this.maxPriority})});s(["java.io.FilterInputStream"],"java.io.BufferedInputStream",["java.io.IOException",
"java.lang.IndexOutOfBoundsException"],function(){c$=q(function(){this.buf=null;this.pos=this.count=0;this.markpos=-1;this.marklimit=0;n(this,arguments)},java.io,"BufferedInputStream",java.io.FilterInputStream);c(c$,"getInIfOpen",function(){var a=this.$in;if(null==a)throw new java.io.IOException("Stream closed");return a});c(c$,"getBufIfOpen",function(){var a=this.buf;if(null==a)throw new java.io.IOException("Stream closed");return a});e(c$,"resetStream",function(){});m(c$,function(a){y(this,java.io.BufferedInputStream,
[a]);this.buf=K(8192,0)},"java.io.InputStream");c(c$,"fill",function(){var a=this.getBufIfOpen();if(0>this.markpos)this.pos=0;else if(this.pos>=a.length)if(0<this.markpos){var b=this.pos-this.markpos;System.arraycopy(a,this.markpos,a,0,b);this.pos=b;this.markpos=0}else a.length>=this.marklimit?(this.markpos=-1,this.pos=0):(b=2*this.pos,b>this.marklimit&&(b=this.marklimit),b=K(b,0),System.arraycopy(a,0,b,0,this.pos),a=this.buf=b);this.count=this.pos;a=this.getInIfOpen().read(a,this.pos,a.length-this.pos);
0<a&&(this.count=a+this.pos)});e(c$,"readByteAsInt",function(){return this.pos>=this.count&&(this.fill(),this.pos>=this.count)?-1:this.getBufIfOpen()[this.pos++]&255});c(c$,"read1",function(a,b,d){var g=this.count-this.pos;if(0>=g){if(d>=this.getBufIfOpen().length&&0>this.markpos)return this.getInIfOpen().read(a,b,d);this.fill();g=this.count-this.pos;if(0>=g)return-1}d=g<d?g:d;System.arraycopy(this.getBufIfOpen(),this.pos,a,b,d);this.pos+=d;return d},"~A,~N,~N");c(c$,"read",function(a,b,d){this.getBufIfOpen();
if(0>(b|d|b+d|a.length-(b+d)))throw new IndexOutOfBoundsException;if(0==d)return 0;for(var g=0;;){var c=this.read1(a,b+g,d-g);if(0>=c)return 0==g?c:g;g+=c;if(g>=d)return g;c=this.$in;if(null!=c&&0>=c.available())return g}},"~A,~N,~N");e(c$,"skip",function(a){this.getBufIfOpen();if(0>=a)return 0;var b=this.count-this.pos;if(0>=b){if(0>this.markpos)return this.getInIfOpen().skip(a);this.fill();b=this.count-this.pos;if(0>=b)return 0}a=b<a?b:a;this.pos+=a;return a},"~N");e(c$,"available",function(){var a=
this.count-this.pos,b=this.getInIfOpen().available();return a>2147483647-b?2147483647:a+b});e(c$,"mark",function(a){this.marklimit=a;this.markpos=this.pos},"~N");e(c$,"reset",function(){this.getBufIfOpen();if(0>this.markpos)throw new java.io.IOException("Resetting to invalid mark");this.pos=this.markpos});e(c$,"markSupported",function(){return!0});e(c$,"close",function(){var a=this.$in;this.$in=null;null!=a&&a.close()});D(c$,"DEFAULT_BUFFER_SIZE",8192)});s(["java.io.Reader"],"java.io.BufferedReader",
["java.io.IOException","java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","JU.SB"],function(){c$=q(function(){this.cb=this.$in=null;this.nextChar=this.nChars=0;this.markedChar=-1;this.readAheadLimit=0;this.markedSkipLF=this.skipLF=!1;n(this,arguments)},java.io,"BufferedReader",java.io.Reader);c(c$,"setSize",function(a){if(0>=a)throw new IllegalArgumentException("Buffer size <= 0");this.cb=X(a,"\x00");this.nextChar=this.nChars=0},"~N");m(c$,function(a){y(this,java.io.BufferedReader,
[a]);this.$in=a;this.setSize(8192)},"java.io.Reader");c(c$,"ensureOpen",function(){if(null==this.$in)throw new java.io.IOException("Stream closed");});c(c$,"fill",function(){var a;if(-1>=this.markedChar)a=0;else{var b=this.nextChar-this.markedChar;b>=this.readAheadLimit?(this.markedChar=-2,a=this.readAheadLimit=0):(this.readAheadLimit<=this.cb.length?System.arraycopy(this.cb,this.markedChar,this.cb,0,b):(a=X(this.readAheadLimit,"\x00"),System.arraycopy(this.cb,this.markedChar,a,0,b),this.cb=a),this.markedChar=
0,this.nextChar=this.nChars=a=b)}do b=this.$in.read(this.cb,a,this.cb.length-a);while(0==b);0<b&&(this.nChars=a+b,this.nextChar=a)});c(c$,"read1",function(a,b,d){if(this.nextChar>=this.nChars){if(d>=this.cb.length&&-1>=this.markedChar&&!this.skipLF)return this.$in.read(a,b,d);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;d=Math.min(d,this.nChars-this.nextChar);
System.arraycopy(this.cb,this.nextChar,a,b,d);this.nextChar+=d;return d},"~A,~N,~N");c(c$,"read",function(a,b,d){this.ensureOpen();if(0>b||b>a.length||0>d||b+d>a.length||0>b+d)throw new IndexOutOfBoundsException;if(0==d)return 0;var g=this.read1(a,b,d);if(0>=g)return g;for(;g<d&&this.$in.ready();){var c=this.read1(a,b+g,d-g);if(0>=c)break;g+=c}return g},"~A,~N,~N");c(c$,"readLine1",function(a){var b=null,d;this.ensureOpen();for(var g=a||this.skipLF;;){this.nextChar>=this.nChars&&this.fill();if(this.nextChar>=
this.nChars)return null!=b&&0<b.length()?b.toString():null;var c=!1;a=String.fromCharCode(0);var h;g&&"\n"==this.cb[this.nextChar]&&this.nextChar++;g=this.skipLF=!1;h=this.nextChar;a:for(;h<this.nChars;h++)if(a=this.cb[h],"\n"==a||"\r"==a){c=!0;break a}d=this.nextChar;this.nextChar=h;if(c)return null==b?b=String.instantialize(this.cb,d,h-d):(b.appendCB(this.cb,d,h-d),b=b.toString()),this.nextChar++,"\r"==a&&(this.skipLF=!0),b;null==b&&(b=JU.SB.newN(80));b.appendCB(this.cb,d,h-d)}},"~B");c(c$,"readLine",
function(){return this.readLine1(!1)});e(c$,"skip",function(a){if(0>a)throw new IllegalArgumentException("skip value is negative");this.ensureOpen();for(var b=a;0<b;){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 d=this.nChars-this.nextChar;if(b<=d){this.nextChar+=b;b=0;break}b-=d;this.nextChar=this.nChars}return a-b},"~N");c(c$,"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(c$,"markSupported",function(){return!0});e(c$,"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(c$,"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(c$,"close",function(){null!=this.$in&&(this.$in.close(),this.cb=this.$in=null)});D(c$,"INVALIDATED",-2,"UNMARKED",-1,"DEFAULT_CHAR_BUFFER_SIZE",8192,"DEFAULT_EXPECTED_LINE_LENGTH",80)});s(["java.io.Writer"],"java.io.BufferedWriter",["java.io.IOException","java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","$.StringIndexOutOfBoundsException"],function(){c$=q(function(){this.buf=
this.out=null;this.pos=0;this.lineSeparator="\r\n";n(this,arguments)},java.io,"BufferedWriter",java.io.Writer);m(c$,function(a){y(this,java.io.BufferedWriter,[a]);this.out=a;this.buf=x(8192,"\x00")},"java.io.Writer");m(c$,function(a,b){y(this,java.io.BufferedWriter,[a]);if(0<b)this.out=a,this.buf=x(b,"\x00");else throw new IllegalArgumentException("K0058");},"java.io.Writer,~N");c(c$,"close",function(){this.isOpen()&&(this.flush(),this.out.close(),this.out=this.buf=null)});c(c$,"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(c$,"isOpen",($fz=function(){return null!=this.out},$fz.isPrivate=!0,$fz));c(c$,"newLine",function(){this.write("\r\n",0,2)});c(c$,"write",function(a,b,d){if(!this.isOpen())throw new java.io.IOException("K005d");if(0>b||b>a.length-d||0>d)throw new IndexOutOfBoundsException;if(0==this.pos&&d>=this.buf.length)this.out.write(a,b,d);else{var g=this.buf.length-this.pos;d<g&&(g=d);0<
g&&(System.arraycopy(a,b,this.buf,this.pos,g),this.pos+=g);this.pos==this.buf.length&&(this.out.write(this.buf,0,this.buf.length),this.pos=0,d>g&&(b+=g,g=d-g,g>=this.buf.length?this.out.write(a,b,g):(System.arraycopy(a,b,this.buf,this.pos,g),this.pos+=g)))}},"~A,~N,~N");c(c$,"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(c$,"write",
function(a,b,d){if(!this.isOpen())throw new java.io.IOException("K005d");if(!(0>=d)){if(b>a.length-d||0>b)throw new StringIndexOutOfBoundsException;if(0==this.pos&&d>=this.buf.length){var g=x(d,"\x00");a.getChars(b,b+d,g,0);this.out.write(g,0,d)}else{var c=this.buf.length-this.pos;d<c&&(c=d);0<c&&(a.getChars(b,b+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,d>c&&(b+=c,c=d-c,c>=this.buf.length?(g=x(d,"\x00"),a.getChars(b,b+c,g,0),
this.out.write(g,0,c)):(a.getChars(b,b+c,this.buf,this.pos),this.pos+=c)))}}},"~S,~N,~N")});s(["java.io.InputStream"],"java.io.ByteArrayInputStream",["java.lang.IndexOutOfBoundsException","$.NullPointerException"],function(){c$=q(function(){this.buf=null;this.count=this.$mark=this.pos=0;n(this,arguments)},java.io,"ByteArrayInputStream",java.io.InputStream);m(c$,function(a){y(this,java.io.ByteArrayInputStream,[]);this.buf=a;this.pos=0;this.count=a.length},"~A");e(c$,"readByteAsInt",function(){return this.pos<
this.count?this.buf[this.pos++]&255:-1});c(c$,"read",function(a,b,d){if(null==a)throw new NullPointerException;if(0>b||0>d||d>a.length-b)throw new IndexOutOfBoundsException;if(this.pos>=this.count)return-1;var g=this.count-this.pos;d>g&&(d=g);if(0>=d)return 0;System.arraycopy(this.buf,this.pos,a,b,d);this.pos+=d;return d},"~A,~N,~N");e(c$,"skip",function(a){var b=this.count-this.pos;a<b&&(b=0>a?0:a);this.pos+=b;return b},"~N");e(c$,"available",function(){return this.count-this.pos});e(c$,"markSupported",
function(){return!0});e(c$,"mark",function(){this.$mark=this.pos},"~N");e(c$,"resetStream",function(){});e(c$,"reset",function(){this.pos=this.$mark});e(c$,"close",function(){})});s(["java.io.OutputStream"],"java.io.ByteArrayOutputStream",["java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","$.OutOfMemoryError"],function(){c$=q(function(){this.buf=null;this.count=0;n(this,arguments)},java.io,"ByteArrayOutputStream",java.io.OutputStream);m(c$,function(){this.construct(32)});m(c$,function(a){y(this,
java.io.ByteArrayOutputStream,[]);if(0>a)throw new IllegalArgumentException("Negative initial size: "+a);this.buf=K(a,0)},"~N");c(c$,"ensureCapacity",function(a){0<a-this.buf.length&&this.grow(a)},"~N");c(c$,"grow",function(a){var b=this.buf.length<<1;0>b-a&&(b=a);if(0>b){if(0>a)throw new OutOfMemoryError;b=a}this.buf=java.io.ByteArrayOutputStream.arrayCopyByte(this.buf,b)},"~N");c$.arrayCopyByte=c(c$,"arrayCopyByte",function(a,b){var d=K(b,0);System.arraycopy(a,0,d,0,a.length<b?a.length:b);return d},
"~A,~N");e(c$,"writeByteAsInt",function(a){this.ensureCapacity(this.count+1);this.buf[this.count]=a;this.count+=1},"~N");c(c$,"write",function(a,b,d){if(0>b||b>a.length||0>d||0<b+d-a.length)throw new IndexOutOfBoundsException;this.ensureCapacity(this.count+d);System.arraycopy(a,b,this.buf,this.count,d);this.count+=d},"~A,~N,~N");c(c$,"writeTo",function(a){a.write(this.buf,0,this.count)},"java.io.OutputStream");c(c$,"reset",function(){this.count=0});c(c$,"toByteArray",function(){return this.count==
this.buf.length?this.buf:java.io.ByteArrayOutputStream.arrayCopyByte(this.buf,this.count)});c(c$,"size",function(){return this.count});e(c$,"toString",function(){return String.instantialize(this.buf,0,this.count)});e(c$,"close",function(){})});s(["java.io.InputStream"],"java.io.FilterInputStream",null,function(){c$=q(function(){this.$in=null;n(this,arguments)},java.io,"FilterInputStream",java.io.InputStream);m(c$,function(a){y(this,java.io.FilterInputStream,[]);this.$in=a},"java.io.InputStream");
c(c$,"readByteAsInt",function(){return this.$in.readByteAsInt()});c(c$,"read",function(a,b,d){return this.$in.read(a,b,d)},"~A,~N,~N");c(c$,"skip",function(a){return this.$in.skip(a)},"~N");c(c$,"available",function(){return this.$in.available()});c(c$,"close",function(){this.$in.close()});c(c$,"mark",function(a){this.$in.mark(a)},"~N");c(c$,"reset",function(){this.$in.reset()});c(c$,"markSupported",function(){return this.$in.markSupported()})});s(null,"java.io.InputStream",["java.io.IOException",
"java.lang.IndexOutOfBoundsException","$.NullPointerException"],function(){c$=t(java.io,"InputStream");c(c$,"read",function(a,b,d){if(null==a)throw new NullPointerException;if(0>b||0>d||d>a.length-b)throw new IndexOutOfBoundsException;if(0==d)return 0;var g=this.readByteAsInt();if(-1==g)return-1;a[b]=g;var c=1;try{for(;c<d;c++){g=this.readByteAsInt();if(-1==g)break;a[b+c]=g}}catch(h){if(!z(h,java.io.IOException))throw h;}return c},"~A,~N,~N");c(c$,"skip",function(a){var b=a,d;null==java.io.InputStream.skipBuffer&&
(java.io.InputStream.skipBuffer=K(2048,0));var g=java.io.InputStream.skipBuffer;if(0>=a)return 0;for(;0<b;){d=this.read(g,0,Math.min(2048,b));if(0>d)break;b-=d}return a-b},"~N");c(c$,"available",function(){return 0});c(c$,"close",function(){});c(c$,"mark",function(){},"~N");c(c$,"reset",function(){throw new java.io.IOException("mark/reset not supported");});c(c$,"markSupported",function(){return!1});c(c$,"resetStream",function(){});D(c$,"SKIP_BUFFER_SIZE",2048,"skipBuffer",null)});s(["java.io.Reader"],
"java.io.InputStreamReader",["java.lang.NullPointerException"],function(){c$=q(function(){this.$in=null;this.isOpen=!0;this.charsetName=null;this.isUTF8=!1;this.bytearr=null;this.pos=0;n(this,arguments)},java.io,"InputStreamReader",java.io.Reader);m(c$,function(a,b){y(this,java.io.InputStreamReader,[a]);this.$in=a;this.charsetName=b;if(!(this.isUTF8="UTF-8".equals(b))&&!"ISO-8859-1".equals(b))throw new NullPointerException("charsetName");},"java.io.InputStream,~S");c(c$,"getEncoding",function(){return this.charsetName});
e(c$,"read",function(a,b,d){if(null==this.bytearr||this.bytearr.length<d)this.bytearr=K(d,0);var g,c,h=0,e=b,j=this.$in.read(this.bytearr,this.pos,d-this.pos),l=this.$in.available();if(0>j)return-1;for(var p=j;h<p;){d=this.bytearr[h]&255;if(this.isUTF8)switch(d>>4){case 12:case 13:if(h+1>=j){if(1<=l){p=h;continue}}else if(128==((g=this.bytearr[h+1])&192)){a[e++]=String.fromCharCode((d&31)<<6|g&63);h+=2;continue}this.isUTF8=!1;break;case 14:if(h+2>=j){if(2<=l){p=h;continue}}else if(128==((g=this.bytearr[h+
1])&192)&&128==((c=this.bytearr[h+2])&192)){a[e++]=String.fromCharCode((d&15)<<12|(g&63)<<6|c&63);h+=3;continue}this.isUTF8=!1}h++;a[e++]=String.fromCharCode(d)}this.pos=j-h;for(a=0;a<this.pos;a++)this.bytearr[a]=this.bytearr[h++];return e-b},"~A,~N,~N");e(c$,"ready",function(){return this.isOpen});e(c$,"close",function(){this.$in.close();this.isOpen=!1})});s(["java.io.Closeable","$.Flushable"],"java.io.OutputStream",["java.lang.IndexOutOfBoundsException","$.NullPointerException"],function(){c$=t(java.io,
"OutputStream",null,[java.io.Closeable,java.io.Flushable]);c(c$,"write",function(a,b,d){if(null==a)throw new NullPointerException;if(0>b||b>a.length||0>d||b+d>a.length||0>b+d)throw new IndexOutOfBoundsException;if(0!=d)for(var g=0;g<d;g++)this.writeByteAsInt(a[b+g])},"~A,~N,~N");e(c$,"flush",function(){});e(c$,"close",function(){})});s(["java.io.Closeable"],"java.io.Reader",["java.io.IOException","java.lang.IllegalArgumentException","$.NullPointerException"],function(){c$=q(function(){this.skipBuffer=
this.lock=null;n(this,arguments)},java.io,"Reader",null,java.io.Closeable);m(c$,function(a){if(null==a)throw new NullPointerException;this.lock=a},"~O");c(c$,"skip",function(a){if(0>a)throw new IllegalArgumentException("skip value is negative");var b=Math.min(a,8192);if(null==this.skipBuffer||this.skipBuffer.length<b)this.skipBuffer=X(b,"\x00");for(var d=a;0<d;){var g=this.read(this.skipBuffer,0,Math.min(d,b));if(-1==g)break;d-=g}return a-d},"~N");c(c$,"ready",function(){return!1});c(c$,"markSupported",
function(){return!1});c(c$,"mark",function(){throw new java.io.IOException("mark() not supported");},"~N");c(c$,"reset",function(){throw new java.io.IOException("reset() not supported");});D(c$,"MAX_SKIP_BUFFE_SIZE",8192)});s(["java.io.Reader"],"java.io.StringReader",["java.io.IOException","java.lang.IllegalArgumentException","$.IndexOutOfBoundsException"],function(){c$=q(function(){this.str=null;this.$mark=this.next=this.length=0;n(this,arguments)},java.io,"StringReader",java.io.Reader);m(c$,function(a){y(this,
java.io.StringReader,[a]);this.str=a;this.length=a.length},"~S");c(c$,"ensureOpen",function(){if(null==this.str)throw new java.io.IOException("Stream closed");});e(c$,"read",function(a,b,d){this.ensureOpen();if(0>b||b>a.length||0>d||b+d>a.length||0>b+d)throw new IndexOutOfBoundsException;if(0==d)return 0;if(this.next>=this.length)return-1;d=Math.min(this.length-this.next,d);this.str.getChars(this.next,this.next+d,a,b);this.next+=d;return d},"~A,~N,~N");e(c$,"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(c$,"ready",function(){this.ensureOpen();return!0});e(c$,"markSupported",function(){return!0});e(c$,"mark",function(a){if(0>a)throw new IllegalArgumentException("Read-ahead limit < 0");this.ensureOpen();this.$mark=this.next},"~N");e(c$,"reset",function(){this.ensureOpen();this.next=this.$mark});e(c$,"close",function(){this.str=null})});s(["java.io.Closeable","$.Flushable","java.lang.Appendable"],
"java.io.Writer",["java.lang.NullPointerException","$.StringIndexOutOfBoundsException"],function(){c$=q(function(){this.lock=null;n(this,arguments)},java.io,"Writer",null,[Appendable,java.io.Closeable,java.io.Flushable]);m(c$,function(){this.lock=this});m(c$,function(a){if(null!=a)this.lock=a;else throw new NullPointerException;},"~O");c(c$,"write",function(a){this.write(a,0,a.length)},"~A");c(c$,"write",function(a){var b=x(1,"\x00");b[0]=String.fromCharCode(a);this.write(b)},"~N");c(c$,"write",function(a){var b=
x(a.length,"\x00");a.getChars(0,b.length,b,0);this.write(b)},"~S");c(c$,"write",function(a,b,d){if(0<=d){var g=x(d,"\x00");a.getChars(b,b+d,g,0);this.write(g)}else throw new StringIndexOutOfBoundsException;},"~S,~N,~N");c(c$,"append",function(a){this.write(a.charCodeAt(0));return this},"~N");c(c$,"append",function(a){null==a?this.write("null"):this.write(a.toString());return this},"CharSequence");c(c$,"append",function(a,b,d){null==a?this.write("null".substring(b,d)):this.write(a.subSequence(b,d).toString());
return this},"CharSequence,~N,~N");D(c$,"TOKEN_NULL","null")});r("java.net");s(["java.io.IOException"],"java.net.MalformedURLException",null,function(){c$=t(java.net,"MalformedURLException",java.io.IOException);m(c$,function(){y(this,java.net.MalformedURLException,[])})});r("java.net");s(["java.io.IOException"],"java.net.UnknownServiceException",null,function(){c$=t(java.net,"UnknownServiceException",java.io.IOException);m(c$,function(){y(this,java.net.UnknownServiceException,[])})});r("java.net");
s(["java.util.Hashtable"],"java.net.URL",["java.lang.Character","$.Error","java.net.MalformedURLException"],function(){c$=q(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;n(this,arguments)},java.net,"URL");m(c$,function(a,b,d){switch(arguments.length){case 1:b=a;a=d=null;break;case 2:d=null;break;case 3:if(null==a||w(a,java.net.URL))break;default:alert("java.net.URL constructor format not supported")}a&&
a.valueOf&&null==a.valueOf()&&(a=null);var g=b,c,h,e,j=0,l=null,p=!1,m=!1;try{for(h=b.length;0<h&&" ">=b.charAt(h-1);)h--;for(;j<h&&" ">=b.charAt(j);)j++;b.regionMatches(!0,j,"url:",0,4)&&(j+=4);j<b.length&&"#"==b.charAt(j)&&(p=!0);for(c=j;!p&&c<h&&47!=(e=b.charCodeAt(c));c++)if(58==e){var n=b.substring(j,c).toLowerCase();this.isValidProtocol(n)&&(l=n,j=c+1);break}this.protocol=l;if(null!=a&&(null==l||l.equalsIgnoreCase(a.protocol)))null==d&&(d=a.handler),null!=a.path&&a.path.startsWith("/")&&(l=
null),null==l&&(this.protocol=a.protocol,this.authority=a.authority,this.userInfo=a.userInfo,this.host=a.host,this.port=a.port,this.file=a.file,this.path=a.path,m=!0);if(null==this.protocol)throw new java.net.MalformedURLException("no protocol: "+g);if(null==d&&null==(d=java.net.URL.getURLStreamHandler(this.protocol)))throw new java.net.MalformedURLException("unknown protocol: "+this.protocol);this.handler=d;c=b.indexOf("#",j);0<=c&&(this.ref=b.substring(c+1,h),h=c);m&&j==h&&(this.query=a.query,null==
this.ref&&(this.ref=a.ref));d.parseURL(this,b,j,h)}catch(T){if(z(T,java.net.MalformedURLException))throw T;if(z(T,Exception))throw g=T,c=new java.net.MalformedURLException(g.getMessage()),c.initCause(g),c;throw T;}},"java.net.URL,~S,java.net.URLStreamHandler");c(c$,"isValidProtocol",function(a){var b=a.length;if(1>b)return!1;var d=a.charAt(0);if(!Character.isLetter(d))return!1;for(var g=1;g<b;g++)if(d=a.charAt(g),!Character.isLetterOrDigit(d)&&"."!=d&&"+"!=d&&"-"!=d)return!1;return!0},"~S");c(c$,
"set5",function(a,b,d,g,c){this.protocol=a;this.host=b;this.authority=-1==d?b:b+":"+d;this.port=d;this.file=g;this.ref=c;this.$hashCode=-1;a=g.lastIndexOf("?");-1!=a?(this.query=g.substring(a+1),this.path=g.substring(0,a)):this.path=g},"~S,~S,~N,~S,~S");c(c$,"set",function(a,b,d,g,c,h,e,j){this.protocol=a;this.host=b;this.port=d;this.file=null==e?h:h+"?"+e;this.userInfo=c;this.path=h;this.ref=j;this.$hashCode=-1;this.query=e;this.authority=g},"~S,~S,~N,~S,~S,~S,~S,~S");c(c$,"getQuery",function(){return this.query});
c(c$,"getPath",function(){return this.path});c(c$,"getUserInfo",function(){return this.userInfo});c(c$,"getAuthority",function(){return this.authority});c(c$,"getPort",function(){return this.port});c(c$,"getDefaultPort",function(){return this.handler.getDefaultPort()});c(c$,"getProtocol",function(){return this.protocol});c(c$,"getHost",function(){return this.host});c(c$,"getFile",function(){return this.file});c(c$,"getRef",function(){return this.ref});e(c$,"equals",function(a){return!w(a,java.net.URL)?
!1:this.handler.equals2(this,a)},"~O");e(c$,"hashCode",function(){return-1!=this.$hashCode?this.$hashCode:this.$hashCode=this.handler.hashCode(this)});c(c$,"sameFile",function(a){return this.handler.sameFile(this,a)},"java.net.URL");e(c$,"toString",function(){return this.toExternalForm()});c(c$,"toExternalForm",function(){return this.handler.toExternalForm(this)});c(c$,"openConnection",function(){return this.handler.openConnection(this)});c(c$,"openStream",function(){return this.openConnection().getInputStream()});
c(c$,"getContent",function(){return this.openConnection().getInputStream()});c$.setURLStreamHandlerFactory=c(c$,"setURLStreamHandlerFactory",function(a){if(null!=java.net.URL.factory)throw Error("factory already defined");var b=System.getSecurityManager();null!=b&&b.checkSetFactory();java.net.URL.handlers.clear();java.net.URL.factory=a},"java.net.URLStreamHandlerFactory");c$.getURLStreamHandler=c(c$,"getURLStreamHandler",function(a){var b=java.net.URL.handlers.get(a);null==b&&null!=java.net.URL.factory&&
(b=java.net.URL.factory.createURLStreamHandler(a));return b},"~S");D(c$,"factory",null);c$.handlers=c$.prototype.handlers=new java.util.Hashtable;c$.streamHandlerLock=c$.prototype.streamHandlerLock=new $._O});r("java.net");s(null,"java.net.URLConnection",["java.lang.IllegalStateException","$.NullPointerException","java.net.UnknownServiceException","JU.Lst"],function(){c$=q(function(){this.url=null;this.doInput=!0;this.connected=this.doOutput=!1;this.requests=null;n(this,arguments)},java.net,"URLConnection");
c(c$,"setDoInput",function(a){if(this.connected)throw new IllegalStateException("Already connected");this.doInput=a},"~B");c(c$,"getDoInput",function(){return this.doInput});c(c$,"setDoOutput",function(a){if(this.connected)throw new IllegalStateException("Already connected");this.doOutput=a},"~B");c(c$,"getDoOutput",function(){return this.doOutput});m(c$,function(a){this.url=a},"java.net.URL");c(c$,"getURL",function(){return this.url});c(c$,"getInputStream",function(){throw new java.net.UnknownServiceException("protocol doesn't support input");
});c(c$,"getOutputStream",function(){throw new java.net.UnknownServiceException("protocol doesn't support output");});c(c$,"setRequestProperty",function(a,b){if(this.connected)throw new IllegalStateException("Already connected");if(null==a)throw new NullPointerException("key is null");null==this.requests&&(this.requests=new JU.Lst);for(var d=this.requests.size();0<=--d;)if(this.requests.get(d)[0].equals(a)){this.requests.get(d)[1]=b;return}this.requests.addLast(x(-1,[a,b]))},"~S,~S")});r("java.net");
c$=t(java.net,"URLEncoder");c$.encode=c(c$,"encode",function(a){return encodeURIComponent(a)},"~S");c$.encode=c(c$,"encode",function(a){return encodeURIComponent(a)},"~S,~S");D(c$,"digits","0123456789ABCDEF");r("java.net");s(null,"java.net.URLStreamHandler",["java.lang.IllegalArgumentException","$.SecurityException","$.UnsupportedOperationException"],function(){c$=t(java.net,"URLStreamHandler");c(c$,"openConnectionProxy",function(){throw new UnsupportedOperationException("Method not implemented.");
},"java.net.URL,java.net.Proxy");c(c$,"parseURL",function(a,b,d,g){var c=a.getProtocol(),h=a.getAuthority(),e=a.getUserInfo(),j=a.getHost(),l=a.getPort(),p=a.getPath(),m=a.getQuery(),n=a.getRef(),T=!1,q=!1;if(d<g){var k=b.indexOf("?"),q=k==d;-1!=k&&k<g&&(m=b.substring(k+1,g),g>k&&(g=k),b=b.substring(0,k))}var r=0;if(!(d<=g-4&&"/"==b.charAt(d)&&"/"==b.charAt(d+1)&&"/"==b.charAt(d+2)&&"/"==b.charAt(d+3))&&d<=g-2&&"/"==b.charAt(d)&&"/"==b.charAt(d+1)){d+=2;r=b.indexOf("/",d);0>r&&(r=b.indexOf("?",d),
0>r&&(r=g));j=h=b.substring(d,r);k=h.indexOf("@");-1!=k?(e=h.substring(0,k),j=h.substring(k+1)):e=null;if(null!=j){if(0<j.length&&"["==j.charAt(0))throw new IllegalArgumentException("Invalid host: "+j);k=j.indexOf(":");l=-1;0<=k&&(j.length>k+1&&(l=Integer.parseInt(j.substring(k+1))),j=j.substring(0,k))}else j="";if(-1>l)throw new IllegalArgumentException("Invalid port number :"+l);d=r;0<h.length&&(p="")}null==j&&(j="");d<g?"/"==b.charAt(d)?p=b.substring(d,g):null!=p&&0<p.length?(T=!0,k=p.lastIndexOf("/"),
q="",-1==k&&null!=h&&(q="/"),p=p.substring(0,k+1)+q+b.substring(d,g)):p=(null!=h?"/":"")+b.substring(d,g):q&&null!=p&&(k=p.lastIndexOf("/"),0>k&&(k=0),p=p.substring(0,k)+"/");null==p&&(p="");if(T){for(;0<=(r=p.indexOf("/./"));)p=p.substring(0,r)+p.substring(r+2);for(r=0;0<=(r=p.indexOf("/../",r));)0<r&&0<=(g=p.lastIndexOf("/",r-1))&&0!=p.indexOf("/../",g)?(p=p.substring(0,g)+p.substring(r+3),r=0):r+=3;for(;p.endsWith("/..");)if(r=p.indexOf("/.."),0<=(g=p.lastIndexOf("/",r-1)))p=p.substring(0,g+1);
else break;p.startsWith("./")&&2<p.length&&(p=p.substring(2));p.endsWith("/.")&&(p=p.substring(0,p.length-1))}this.setURL(a,c,j,l,h,e,p,m,n)},"java.net.URL,~S,~N,~N");c(c$,"getDefaultPort",function(){return-1});c(c$,"equals2",function(a,b){var d=a.getRef(),g=b.getRef();return(d===g||null!=d&&d.equals(g))&&this.sameFile(a,b)},"java.net.URL,java.net.URL");c(c$,"hashCode",function(a){var b=0,d=a.getProtocol();null!=d&&(b+=d.hashCode());b+=a.toString().hashCode();d=a.getFile();null!=d&&(b+=d.hashCode());
b=-1==a.getPort()?b+this.getDefaultPort():b+a.getPort();a=a.getRef();null!=a&&(b+=a.hashCode());return b},"java.net.URL");c(c$,"sameFile",function(a,b){if(!(a.getProtocol()===b.getProtocol()||null!=a.getProtocol()&&a.getProtocol().equalsIgnoreCase(b.getProtocol()))||!(a.getFile()===b.getFile()||null!=a.getFile()&&a.getFile().equals(b.getFile())))return!1;var d,g;d=-1!=a.getPort()?a.getPort():a.handler.getDefaultPort();g=-1!=b.getPort()?b.getPort():b.handler.getDefaultPort();return d!=g||!this.hostsEqual(a,
b)?!1:!0},"java.net.URL,java.net.URL");c(c$,"hostsEqual",function(a,b){return null!=a.getHost()&&null!=b.getHost()?a.getHost().equalsIgnoreCase(b.getHost()):null==a.getHost()&&null==b.getHost()},"java.net.URL,java.net.URL");c(c$,"toExternalForm",function(){return""},"java.net.URL");c(c$,"setURL",function(a,b,d,g,c,h,e,j,l){if(this!==a.handler)throw new SecurityException("handler for url different from this handler");a.set(a.getProtocol(),d,g,c,h,e,j,l)},"java.net.URL,~S,~S,~N,~S,~S,~S,~S,~S");c(c$,
"setURLDeprecated",function(a,b,d,g,c,h){var e=null,j=null;if(null!=d&&0!=d.length){var e=-1==g?d:d+":"+g,l=d.lastIndexOf("@");-1!=l&&(j=d.substring(0,l),d=d.substring(l+1))}var p=null,l=null;null!=c&&(p=c.lastIndexOf("?"),-1!=p?(l=c.substring(p+1),p=c.substring(0,p)):p=c);this.setURL(a,b,d,g,e,j,p,l,h)},"java.net.URL,~S,~S,~N,~S,~S")});r("java.net");C(java.net,"URLStreamHandlerFactory");r("java.text");c$=q(function(){this.pattern=null;n(this,arguments)},java.text,"MessageFormat");m(c$,function(a){this.pattern=
a},"~S");m(c$,function(a){this.pattern=a},"~S,java.util.Locale");c$.format=c(c$,"format",function(a,b){return a.replace(/\{(\d+)\}/g,function(a,g){var c=parseInt(g);return null==b?null:b[c]})},"~S,~A");c(c$,"format",function(a){return java.text.MessageFormat.format(this.pattern,[a])},"~O");s(null,"java.util.Random",["java.lang.IllegalArgumentException"],function(){c$=q(function(){this.haveNextNextGaussian=!1;this.nextNextGaussian=this.seed=0;n(this,arguments)},java.util,"Random",null,java.io.Serializable);
m(c$,function(){this.setSeed(System.currentTimeMillis())});m(c$,function(a){this.setSeed(a)},"~N");c(c$,"next",function(a){this.seed=25214903917*this.seed+11&0xffffffffffff;return this.seed>>>48-a},"~N");c(c$,"nextBoolean",function(){return 0.5<Math.random()});c(c$,"nextBytes",function(){for(var a=0;a<bytes.length;a++)bytes[a]=Math.round(256*Math.random())},"~A");c(c$,"nextDouble",function(){return Math.random()});c(c$,"nextFloat",function(){return Math.random()});c(c$,"nextGaussian",function(){if(this.haveNextNextGaussian)return this.haveNextNextGaussian=
!1,this.nextNextGaussian;var a,b,d;do a=2*this.nextDouble()-1,b=2*this.nextDouble()-1,d=a*a+b*b;while(1<=d);d=Math.sqrt(-2*Math.log(d)/d);this.nextNextGaussian=b*d;this.haveNextNextGaussian=!0;return a*d});c(c$,"nextInt",function(){return Math.ceil(65535*Math.random())-32768});c(c$,"nextInt",function(a){if(0<a)return a=Math.min(a,31),Math.floor((2<<a-1)*Math.random());throw new IllegalArgumentException;},"~N");c(c$,"nextLong",function(){return Math.ceil(4294967295*Math.random())-2147483648});c(c$,
"setSeed",function(a){Math.seedrandom(a)},"~N");D(c$,"multiplier",25214903917)});var ba=[],Z=Math,ca=52,la=void 0,ma=void 0,Ea=function(a){var b,d,g=this,c=a.length,h=0,e=g.i=g.j=g.m=0;g.S=[];g.c=[];for(c||(a=[c++]);256>h;)g.S[h]=h++;for(h=0;256>h;h++)b=g.S[h],e=e+b+a[h%c]&255,d=g.S[e],g.S[h]=d,g.S[e]=b;g.g=function(a){var b=g.S,d=g.i+1&255,c=b[d],f=g.j+c&255,h=b[f];b[d]=h;b[f]=c;for(var e=b[c+h&255];--a;)d=d+1&255,c=b[d],f=f+c&255,h=b[f],b[d]=h,b[f]=c,e=256*e+b[c+h&255];g.i=d;g.j=f;return e};g.g(256)},
na=function(a,b,d,g){d=[];if(b&&"object"==typeof a)for(g in a)if(5>g.indexOf("S"))try{d.push(na(a[g],b-1))}catch(c){}return d.length?d:""+a},ea=function(a,b,d,g){a+="";for(g=d=0;g<a.length;g++){var c=b,h=g&255,e=(d^=19*b[g&255])+a.charCodeAt(g);c[h]=e&255}a="";for(g in b)a+=String.fromCharCode(b[g]);return a};Z.seedrandom=function(a,b){var d=[],g;a=ea(na(b?[a,ba]:arguments.length?a:[(new Date).getTime(),ba,window],3),d);g=new Ea(d);ea(g.S,ba);Z.random=function(){for(var a=g.g(6),b=ma,d=0;a<ca;)a=
256*(a+d),b*=256,d=g.g(1);for(;a>=la;)a/=2,b/=2,d>>>=1;return(a+d)/b};return a};ma=Z.pow(256,6);ca=Z.pow(2,ca);la=2*ca;ea(Z.random(),ba);s(["java.util.Collection"],"java.util.AbstractCollection",["java.lang.StringBuilder","$.UnsupportedOperationException","java.lang.reflect.Array"],function(){c$=t(java.util,"AbstractCollection",null,java.util.Collection);m(c$,function(){});e(c$,"add",function(){throw new UnsupportedOperationException;},"~O");e(c$,"addAll",function(a){var b=!1;for(a=a.iterator();a.hasNext();)this.add(a.next())&&
(b=!0);return b},"java.util.Collection");e(c$,"clear",function(){for(var a=this.iterator();a.hasNext();)a.next(),a.remove()});e(c$,"contains",function(a){var b=this.iterator();if(null!=a)for(;b.hasNext();){if(a.equals(b.next()))return!0}else for(;b.hasNext();)if(null==b.next())return!0;return!1},"~O");e(c$,"containsAll",function(a){for(a=a.iterator();a.hasNext();)if(!this.contains(a.next()))return!1;return!0},"java.util.Collection");e(c$,"isEmpty",function(){return 0==this.size()});e(c$,"remove",
function(a){var b=this.iterator();if(null!=a)for(;b.hasNext();){if(a.equals(b.next()))return b.remove(),!0}else for(;b.hasNext();)if(null==b.next())return b.remove(),!0;return!1},"~O");e(c$,"removeAll",function(a){for(var b=!1,d=this.iterator();d.hasNext();)a.contains(d.next())&&(d.remove(),b=!0);return b},"java.util.Collection");e(c$,"retainAll",function(a){for(var b=!1,d=this.iterator();d.hasNext();)a.contains(d.next())||(d.remove(),b=!0);return b},"java.util.Collection");c(c$,"toArray",function(){for(var a=
this.size(),b=0,d=this.iterator(),g=Array(a);b<a;)g[b++]=d.next();return g});c(c$,"toArray",function(a){var b=this.size(),d=0;b>a.length&&(a=a.getClass().getComponentType(),a=java.lang.reflect.Array.newInstance(a,b));for(var g,b=this.iterator();b.hasNext()&&((g=b.next())||1);)a[d++]=g;d<a.length&&(a[d]=null);return a},"~A");e(c$,"toString",function(){if(this.isEmpty())return"[]";var a=new StringBuilder(16*this.size());a.append("[");for(var b=this.iterator();b.hasNext();){var d=b.next();d!==this?a.append(d):
a.append("(this Collection)");b.hasNext()&&a.append(", ")}a.append("]");return a.toString()})});s("java.util.AbstractCollection $.Iterator $.List $.ListIterator $.RandomAccess $.NoSuchElementException".split(" "),"java.util.AbstractList",["java.lang.IllegalArgumentException","$.IllegalStateException","$.IndexOutOfBoundsException","$.UnsupportedOperationException","java.util.ConcurrentModificationException"],function(){c$=q(function(){this.modCount=0;n(this,arguments)},java.util,"AbstractList",java.util.AbstractCollection,
java.util.List);c(c$,"add",function(){throw new UnsupportedOperationException;},"~N,~O");c(c$,"add",function(a){this.add(this.size(),a);return!0},"~O");c(c$,"addAll",function(a,b){for(var d=b.iterator();d.hasNext();)this.add(a++,d.next());return!b.isEmpty()},"~N,java.util.Collection");e(c$,"clear",function(){this.removeRange(0,this.size())});e(c$,"equals",function(a){if(this===a)return!0;if(w(a,java.util.List)){if(a.size()!=this.size())return!1;var b=this.iterator();for(a=a.iterator();b.hasNext();){var d=
b.next(),g=a.next();if(!(null==d?null==g:d.equals(g)))return!1}return!0}return!1},"~O");e(c$,"hashCode",function(){for(var a=1,b=this.iterator();b.hasNext();)var d=b.next(),a=31*a+(null==d?0:d.hashCode());return a});e(c$,"indexOf",function(a){var b=this.listIterator();if(null!=a)for(;b.hasNext();){if(a.equals(b.next()))return b.previousIndex()}else for(;b.hasNext();)if(null==b.next())return b.previousIndex();return-1},"~O");e(c$,"iterator",function(){return new java.util.AbstractListSimpleListIterator(this)});
e(c$,"lastIndexOf",function(a){var b=this.listIterator(this.size());if(null!=a)for(;b.hasPrevious();){if(a.equals(b.previous()))return b.nextIndex()}else for(;b.hasPrevious();)if(null==b.previous())return b.nextIndex();return-1},"~O");c(c$,"listIterator",function(a){a||(a=0);return new java.util.AbstractListFullListIterator(this,a)},"~N");c(c$,"remove",function(){throw new UnsupportedOperationException;},"~N");c(c$,"removeRange",function(a,b){for(var d=this.listIterator(a),g=a;g<b;g++)d.next(),d.remove()},
"~N,~N");e(c$,"set",function(){throw new UnsupportedOperationException;},"~N,~O");e(c$,"subList",function(a,b){if(0<=a&&b<=this.size()){if(a<=b)return w(this,java.util.RandomAccess)?new java.util.AbstractList.SubAbstractListRandomAccess(this,a,b):new java.util.AbstractList.SubAbstractList(this,a,b);throw new IllegalArgumentException;}throw new IndexOutOfBoundsException;},"~N,~N");B(self.c$);c$=q(function(){this.pos=-1;this.expectedModCount=0;this.lastPosition=-1;n(this,arguments)},java.util,"AbstractListSimpleListIterator",
null,java.util.Iterator);m(c$,function(a){this._list=a;this.expectedModCount=a.modCount},"java.util.AbstractList");e(c$,"hasNext",function(){return this.pos+1<this._list.size()});e(c$,"next",function(){if(this.expectedModCount==this._list.modCount)try{var a=this._list.get(this.pos+1);this.lastPosition=++this.pos;return a}catch(b){if(w(b,IndexOutOfBoundsException))throw new java.util.NoSuchElementException;throw b;}throw new java.util.ConcurrentModificationException;});e(c$,"remove",function(){if(this.expectedModCount==
this._list.modCount){try{this._list.remove(this.lastPosition)}catch(a){if(w(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;});c$=A();B(self.c$);c$=q(function(){n(this,arguments)},java.util,"AbstractListFullListIterator",java.util.AbstractListSimpleListIterator,java.util.ListIterator);m(c$,function(a,
b){y(this,java.util.AbstractListFullListIterator,[a]);if(0<=b&&b<=this._list.size())this.pos=b-1;else throw new IndexOutOfBoundsException;},"java.util.AbstractList,~N");e(c$,"add",function(a){if(this.expectedModCount==this._list.modCount){try{this._list.add(this.pos+1,a)}catch(b){if(w(b,IndexOutOfBoundsException))throw new java.util.NoSuchElementException;throw b;}this.pos++;this.lastPosition=-1;this._list.modCount!=this.expectedModCount&&this.expectedModCount++}else throw new java.util.ConcurrentModificationException;
},"~O");e(c$,"hasPrevious",function(){return 0<=this.pos});e(c$,"nextIndex",function(){return this.pos+1});e(c$,"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(b){if(w(b,IndexOutOfBoundsException))throw new java.util.NoSuchElementException;throw b;}throw new java.util.ConcurrentModificationException;});e(c$,"previousIndex",function(){return this.pos});e(c$,"set",function(a){if(this.expectedModCount==
this._list.modCount)try{this._list.set(this.lastPosition,a)}catch(b){if(w(b,IndexOutOfBoundsException))throw new IllegalStateException;throw b;}else throw new java.util.ConcurrentModificationException;},"~O");c$=A();B(self.c$);c$=t(java.util.AbstractList,"SubAbstractListRandomAccess",java.util.AbstractList.SubAbstractList,java.util.RandomAccess);c$=A();B(self.c$);c$=q(function(){this.fullList=null;this.$size=this.offset=0;n(this,arguments)},java.util.AbstractList,"SubAbstractList",java.util.AbstractList);
m(c$,function(a,b,d){y(this,java.util.AbstractList.SubAbstractList);this.fullList=a;this.modCount=this.fullList.modCount;this.offset=b;this.$size=d-b},"java.util.AbstractList,~N,~N");c(c$,"add",function(a,b){if(this.modCount==this.fullList.modCount)if(0<=a&&a<=this.$size)this.fullList.add(a+this.offset,b),this.$size++,this.modCount=this.fullList.modCount;else throw new IndexOutOfBoundsException;else throw new java.util.ConcurrentModificationException;},"~N,~O");c(c$,"addAll",function(a,b){if(this.modCount==
this.fullList.modCount){if(0<=a&&a<=this.$size){var d=this.fullList.addAll(a+this.offset,b);d&&(this.$size+=b.size(),this.modCount=this.fullList.modCount);return d}throw new IndexOutOfBoundsException;}throw new java.util.ConcurrentModificationException;},"~N,java.util.Collection");c(c$,"addAll",function(a){if(this.modCount==this.fullList.modCount){var b=this.fullList.addAll(this.offset+this.$size,a);b&&(this.$size+=a.size(),this.modCount=this.fullList.modCount);return b}throw new java.util.ConcurrentModificationException;
},"java.util.Collection");c(c$,"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(c$,"iterator",function(){return this.listIterator(0)});c(c$,"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(c$,"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(c$,"removeRange",function(a,b){if(a!=b)if(this.modCount==this.fullList.modCount)this.fullList.removeRange(a+
this.offset,b+this.offset),this.$size-=b-a,this.modCount=this.fullList.modCount;else throw new java.util.ConcurrentModificationException;},"~N,~N");c(c$,"set",function(a,b){if(this.modCount==this.fullList.modCount){if(0<=a&&a<this.$size)return this.fullList.set(a+this.offset,b);throw new IndexOutOfBoundsException;}throw new java.util.ConcurrentModificationException;},"~N,~O");e(c$,"size",function(){return this.$size});c(c$,"sizeChanged",function(a){a?this.$size++:this.$size--;this.modCount=this.fullList.modCount},
"~B");B(self.c$);c$=q(function(){this.iterator=this.subList=null;this.end=this.start=0;n(this,arguments)},java.util.AbstractList.SubAbstractList,"SubAbstractListIterator",null,java.util.ListIterator);m(c$,function(a,b,d,g){this.iterator=a;this.subList=b;this.start=d;this.end=this.start+g},"java.util.ListIterator,java.util.AbstractList.SubAbstractList,~N,~N");c(c$,"add",function(a){this.iterator.add(a);this.subList.sizeChanged(!0);this.end++},"~O");e(c$,"hasNext",function(){return this.iterator.nextIndex()<
this.end});e(c$,"hasPrevious",function(){return this.iterator.previousIndex()>=this.start});c(c$,"next",function(){if(this.iterator.nextIndex()<this.end)return this.iterator.next();throw new java.util.NoSuchElementException;});c(c$,"nextIndex",function(){return this.iterator.nextIndex()-this.start});c(c$,"previous",function(){if(this.iterator.previousIndex()>=this.start)return this.iterator.previous();throw new java.util.NoSuchElementException;});c(c$,"previousIndex",function(){var a=this.iterator.previousIndex();
return a>=this.start?a-this.start:-1});c(c$,"remove",function(){this.iterator.remove();this.subList.sizeChanged(!1);this.end--});c(c$,"set",function(a){this.iterator.set(a)},"~O");c$=A();c$=A()});s(["java.util.Map"],"java.util.AbstractMap",["java.lang.StringBuilder","$.UnsupportedOperationException","java.util.AbstractCollection","$.AbstractSet","$.Iterator"],function(){c$=q(function(){this.valuesCollection=this.$keySet=null;n(this,arguments)},java.util,"AbstractMap",null,java.util.Map);m(c$,function(){});
e(c$,"clear",function(){this.entrySet().clear()});e(c$,"containsKey",function(a){var b=this.entrySet().iterator();if(null!=a)for(;b.hasNext();){if(a.equals(b.next().getKey()))return!0}else for(;b.hasNext();)if(null==b.next().getKey())return!0;return!1},"~O");e(c$,"containsValue",function(a){var b=this.entrySet().iterator();if(null!=a)for(;b.hasNext();){if(a.equals(b.next().getValue()))return!0}else for(;b.hasNext();)if(null==b.next().getValue())return!0;return!1},"~O");e(c$,"equals",function(a){if(this===
a)return!0;if(w(a,java.util.Map)){if(this.size()!=a.size())return!1;a=a.entrySet();for(var b=this.entrySet().iterator();b.hasNext();)if(!a.contains(b.next()))return!1;return!0}return!1},"~O");e(c$,"get",function(a){var b=this.entrySet().iterator();if(null!=a)for(;b.hasNext();){var d=b.next();if(a.equals(d.getKey()))return d.getValue()}else for(;b.hasNext();)if(d=b.next(),null==d.getKey())return d.getValue();return null},"~O");e(c$,"hashCode",function(){for(var a=0,b=this.entrySet().iterator();b.hasNext();)a+=
b.next().hashCode();return a});e(c$,"isEmpty",function(){return 0==this.size()});e(c$,"keySet",function(){null==this.$keySet&&(this.$keySet=(M("java.util.AbstractMap$1")?0:java.util.AbstractMap.$AbstractMap$1$(),L(java.util.AbstractMap$1,this,null)));return this.$keySet});e(c$,"put",function(){throw new UnsupportedOperationException;},"~O,~O");e(c$,"putAll",function(a){this.putAllAM(a)},"java.util.Map");e(c$,"putAllAM",function(a){var b;for(a=a.entrySet().iterator();a.hasNext()&&((b=a.next())||1);)this.put(b.getKey(),
b.getValue())},"java.util.Map");e(c$,"remove",function(a){var b=this.entrySet().iterator();if(null!=a)for(;b.hasNext();){var d=b.next();if(a.equals(d.getKey()))return b.remove(),d.getValue()}else for(;b.hasNext();)if(d=b.next(),null==d.getKey())return b.remove(),d.getValue();return null},"~O");e(c$,"size",function(){return this.entrySet().size()});e(c$,"toString",function(){if(this.isEmpty())return"{}";var a=new StringBuilder(28*this.size());a.append("{");for(var b=this.entrySet().iterator();b.hasNext();){var d=
b.next(),g=d.getKey();g!==this?a.append(g):a.append("(this Map)");a.append("=");d=d.getValue();d!==this?a.append(d):a.append("(this Map)");b.hasNext()&&a.append(", ")}a.append("}");return a.toString()});e(c$,"values",function(){null==this.valuesCollection&&(this.valuesCollection=(M("java.util.AbstractMap$2")?0:java.util.AbstractMap.$AbstractMap$2$(),L(java.util.AbstractMap$2,this,null)));return this.valuesCollection});c(c$,"clone",function(){return this.cloneAM()});c(c$,"cloneAM",function(){var a=
ga(this);a.$keySet=null;a.valuesCollection=null;return a});c$.$AbstractMap$1$=function(){B(self.c$);c$=Y(java.util,"AbstractMap$1",java.util.AbstractSet);e(c$,"contains",function(a){return this.b$["java.util.AbstractMap"].containsKey(a)},"~O");e(c$,"size",function(){return this.b$["java.util.AbstractMap"].size()});e(c$,"iterator",function(){return M("java.util.AbstractMap$1$1")?0:java.util.AbstractMap.$AbstractMap$1$1$(),L(java.util.AbstractMap$1$1,this,null)});c$=A()};c$.$AbstractMap$1$1$=function(){B(self.c$);
c$=q(function(){R(this,arguments);this.setIterator=null;n(this,arguments)},java.util,"AbstractMap$1$1",null,java.util.Iterator);H(c$,function(){this.setIterator=this.b$["java.util.AbstractMap"].entrySet().iterator()});e(c$,"hasNext",function(){return this.setIterator.hasNext()});e(c$,"next",function(){return this.setIterator.next().getKey()});e(c$,"remove",function(){this.setIterator.remove()});c$=A()};c$.$AbstractMap$2$=function(){B(self.c$);c$=Y(java.util,"AbstractMap$2",java.util.AbstractCollection);
e(c$,"size",function(){return this.b$["java.util.AbstractMap"].size()});e(c$,"contains",function(a){return this.b$["java.util.AbstractMap"].containsValue(a)},"~O");e(c$,"iterator",function(){return M("java.util.AbstractMap$2$1")?0:java.util.AbstractMap.$AbstractMap$2$1$(),L(java.util.AbstractMap$2$1,this,null)});c$=A()};c$.$AbstractMap$2$1$=function(){B(self.c$);c$=q(function(){R(this,arguments);this.setIterator=null;n(this,arguments)},java.util,"AbstractMap$2$1",null,java.util.Iterator);H(c$,function(){this.setIterator=
this.b$["java.util.AbstractMap"].entrySet().iterator()});e(c$,"hasNext",function(){return this.setIterator.hasNext()});e(c$,"next",function(){return this.setIterator.next().getValue()});e(c$,"remove",function(){this.setIterator.remove()});c$=A()}});s(["java.util.AbstractCollection","$.Set"],"java.util.AbstractSet",null,function(){c$=t(java.util,"AbstractSet",java.util.AbstractCollection,java.util.Set);e(c$,"equals",function(a){return this===a?!0:w(a,java.util.Set)?this.size()==a.size()&&this.containsAll(a):
!1},"~O");e(c$,"hashCode",function(){for(var a=0,b=this.iterator();b.hasNext();)var d=b.next(),a=a+(null==d?0:d.hashCode());return a});e(c$,"removeAll",function(a){var b=!1;if(this.size()<=a.size())for(var d=this.iterator();d.hasNext();)a.contains(d.next())&&(d.remove(),b=!0);else for(d=a.iterator();d.hasNext();)b=this.remove(d.next())||b;return b},"java.util.Collection")});s(["java.util.AbstractList","$.List","$.RandomAccess"],"java.util.ArrayList",["java.lang.IllegalArgumentException","$.IndexOutOfBoundsException",
"java.lang.reflect.Array","java.util.Arrays"],function(){c$=q(function(){this.lastIndex=this.firstIndex=0;this.array=null;n(this,arguments)},java.util,"ArrayList",java.util.AbstractList,[java.util.List,Cloneable,java.io.Serializable,java.util.RandomAccess]);S(c$,function(){this.setup(0)});c(c$,"setup",function(a){this.firstIndex=this.lastIndex=0;try{this.array=this.newElementArray(a)}catch(b){if(w(b,NegativeArraySizeException))throw new IllegalArgumentException;throw b;}},"~N");c(c$,"newElementArray",
($fz=function(a){return Array(a)},$fz.isPrivate=!0,$fz),"~N");e(c$,"add",function(a,b){if(1==arguments.length)return this.add1(a);var d=this.size();if(0<a&&a<d){if(0==this.firstIndex&&this.lastIndex==this.array.length)this.growForInsert(a,1);else if(a<Math.floor(d/2)&&0<this.firstIndex||this.lastIndex==this.array.length)System.arraycopy(this.array,this.firstIndex,this.array,--this.firstIndex,a);else{var g=a+this.firstIndex;System.arraycopy(this.array,g,this.array,g+1,d-a);this.lastIndex++}this.array[a+
this.firstIndex]=b}else if(0==a)0==this.firstIndex&&this.growAtFront(1),this.array[--this.firstIndex]=b;else if(a==d)this.lastIndex==this.array.length&&this.growAtEnd(1),this.array[this.lastIndex++]=b;else throw new IndexOutOfBoundsException;this.modCount++},"~N,~O");e(c$,"add1",function(a){this.lastIndex==this.array.length&&this.growAtEnd(1);this.array[this.lastIndex++]=a;this.modCount++;return!0},"~O");e(c$,"addAll",function(a){var b=a.size();if(0<b){this.lastIndex>this.array.length-b&&this.growAtEnd(b);
a=a.iterator();for(b=this.lastIndex+b;this.lastIndex<b;)this.array[this.lastIndex++]=a.next();this.modCount++;return!0}return!1},"java.util.Collection");e(c$,"clear",function(){this.firstIndex!=this.lastIndex&&(this.fill(this.firstIndex,this.lastIndex),this.firstIndex=this.lastIndex=0,this.modCount++)});c(c$,"fill",function(a,b){for(var d=b;--d>=a;)this.array[d]=null},"~N,~N");c(c$,"clone",function(){try{var a=Q(this,java.util.ArrayList,"clone",[]);a.array=this.array.clone();return a}catch(b){if(w(b,
CloneNotSupportedException))return null;throw b;}});e(c$,"contains",function(a){if(null!=a)for(var b=this.firstIndex;b<this.lastIndex;b++){if(a.equals(this.array[b]))return!0}else for(b=this.firstIndex;b<this.lastIndex;b++)if(null==this.array[b])return!0;return!1},"~O");c(c$,"ensureCapacity",function(a){this.array.length<a&&(0<this.firstIndex?this.growAtFront(a-this.array.length):this.growAtEnd(a-this.array.length))},"~N");e(c$,"get",function(a){if(0<=a&&a<this.size())return this.array[this.firstIndex+
a];throw new IndexOutOfBoundsException;},"~N");c(c$,"growAtEnd",($fz=function(a){var b=this.size();if(this.firstIndex>=a-(this.array.length-this.lastIndex))a=this.lastIndex-this.firstIndex,0<b&&(System.arraycopy(this.array,this.firstIndex,this.array,0,b),this.fill(a<this.firstIndex?this.firstIndex:a,this.array.length)),this.firstIndex=0,this.lastIndex=a;else{var d=Math.floor(b/2);a>d&&(d=a);12>d&&(d=12);a=this.newElementArray(b+d);0<b&&System.arraycopy(this.array,this.firstIndex,a,this.firstIndex,
b);this.array=a}},$fz.isPrivate=!0,$fz),"~N");c(c$,"growAtFront",($fz=function(a){var b=this.size();if(this.array.length-this.lastIndex>=a)a=this.array.length-b,0<b&&(System.arraycopy(this.array,this.firstIndex,this.array,a,b),this.fill(this.firstIndex,this.firstIndex+b>a?a:this.firstIndex+b)),this.firstIndex=a,this.lastIndex=this.array.length;else{var d=Math.floor(b/2);a>d&&(d=a);12>d&&(d=12);a=this.newElementArray(b+d);0<b&&System.arraycopy(this.array,this.firstIndex,a,a.length-b,b);this.firstIndex=
a.length-b;this.lastIndex=a.length;this.array=a}},$fz.isPrivate=!0,$fz),"~N");c(c$,"growForInsert",($fz=function(a,b){var d=this.size(),g=Math.floor(d/2);b>g&&(g=b);12>g&&(g=12);var c=this.newElementArray(d+g);if(a<Math.floor(d/2)){var h=c.length-(d+b);System.arraycopy(this.array,a,c,a+g,d-a);System.arraycopy(this.array,this.firstIndex,c,h,a);this.firstIndex=h;this.lastIndex=c.length}else System.arraycopy(this.array,this.firstIndex,c,0,a),System.arraycopy(this.array,a,c,a+b,d-a),this.firstIndex=0,
this.lastIndex+=b;this.array=c},$fz.isPrivate=!0,$fz),"~N,~N");e(c$,"indexOf",function(a){if(null!=a)for(var b=this.firstIndex;b<this.lastIndex;b++){if(a.equals(this.array[b]))return b-this.firstIndex}else for(b=this.firstIndex;b<this.lastIndex;b++)if(null==this.array[b])return b-this.firstIndex;return-1},"~O");e(c$,"isEmpty",function(){return this.lastIndex==this.firstIndex});e(c$,"lastIndexOf",function(a){if(null!=a)for(var b=this.lastIndex-1;b>=this.firstIndex;b--){if(a.equals(this.array[b]))return b-
this.firstIndex}else for(b=this.lastIndex-1;b>=this.firstIndex;b--)if(null==this.array[b])return b-this.firstIndex;return-1},"~O");e(c$,"remove",function(a){return"number"==typeof a?this._removeItemAt(a):this._removeObject(a)},"~N");e(c$,"_removeItemAt",function(a){var b,d=this.size();if(0<=a&&a<d)if(a==d-1)b=this.array[--this.lastIndex],this.array[this.lastIndex]=null;else if(0==a)b=this.array[this.firstIndex],this.array[this.firstIndex++]=null;else{var g=this.firstIndex+a;b=this.array[g];a<Math.floor(d/
2)?(System.arraycopy(this.array,this.firstIndex,this.array,this.firstIndex+1,a),this.array[this.firstIndex++]=null):(System.arraycopy(this.array,g+1,this.array,g,d-a-1),this.array[--this.lastIndex]=null)}else throw new IndexOutOfBoundsException;this.modCount++;return b},"~N");c(c$,"_removeObject",function(a){a=this.indexOf(a);return 0>a?null:this._removeItemAt(a)},"~O");e(c$,"removeRange",function(a,b){if(0<=a&&a<=b&&b<=this.size()){if(a!=b){var d=this.size();b==d?(this.fill(this.firstIndex+a,this.lastIndex),
this.lastIndex=this.firstIndex+a):0==a?(this.fill(this.firstIndex,this.firstIndex+b),this.firstIndex+=b):(System.arraycopy(this.array,this.firstIndex+b,this.array,this.firstIndex+a,d-b),d=this.lastIndex+a-b,this.fill(d,this.lastIndex),this.lastIndex=d);this.modCount++}}else throw new IndexOutOfBoundsException;},"~N,~N");e(c$,"set",function(a,b){if(0<=a&&a<this.size()){var d=this.array[this.firstIndex+a];this.array[this.firstIndex+a]=b;return d}throw new IndexOutOfBoundsException;},"~N,~O");e(c$,"size",
function(){return this.lastIndex-this.firstIndex});e(c$,"toArray",function(a){var b=this.size();if(!a||b>a.length)return this.array.slice(this.firstIndex,this.firstIndex+b);System.arraycopy(this.array,this.firstIndex,a,0,b);b<a.length&&(a[b]=null);return a},"~O");c(c$,"trimToSize",function(){var a=this.size(),b=this.newElementArray(a);System.arraycopy(this.array,this.firstIndex,b,0,a);this.array=b;this.firstIndex=0;this.lastIndex=this.array.length})});s(["java.util.AbstractList","$.RandomAccess"],
"java.util.Arrays",["java.lang.ArrayIndexOutOfBoundsException","$.IllegalArgumentException","$.NullPointerException"],function(){c$=t(java.util,"Arrays");c$.sort=e(c$,"sort",function(a,b,d,g){switch(arguments.length){case 1:for(var c=a.sort(function(a,b){return"string"==typeof a||w(a,Comparable)?a.compareTo(b):a-b}),h=0;h<a.length;h++)a[h]=c[h];break;case 2:c=a.sort(function(a,d){return null!=b?b.compare(a,d):"string"==typeof a||w(a,Comparable)?a.compareTo(d):a-d});for(h=0;h<a.length;h++)a[h]=c[h];
break;case 3:var e=b,j=d;this.rangeCheck(a.length,e,j);c=[];for(h=e;h<j;h++)c[h-e]=a[h];c=c.sort(function(a,b){return"string"==typeof a||w(a,Comparable)?a.compareTo(b):a-b});for(h=e;h<j;h++)a[h]=c[h-e];break;case 4:e=b;j=d;b=g;this.rangeCheck(a.length,e,j);c=[];for(h=e;h<j;h++)c[h-e]=a[h];c=c.sort(function(a,d){return null!=b?b.compare(a,d):"string"==typeof a||w(a,Comparable)?a.compareTo(d):a-d});for(h=e;h<j;h++)a[h]=c[h-e]}});c$.rangeCheck=c(c$,"rangeCheck",($fz=function(a,b,d){if(b>d)throw new IllegalArgumentException("fromIndex("+
b+") > toIndex("+d+")");if(0>b)throw new ArrayIndexOutOfBoundsException(b);if(d>a)throw new ArrayIndexOutOfBoundsException(d);},$fz.isPrivate=!0,$fz),"~N,~N,~N");c$.binarySearch=c(c$,"binarySearch",function(a,b){for(var d=0,g=a.length-1;d<=g;){var c=d+g>>1,h=a[c];if(h<b)d=c+1;else if(h>b)g=c-1;else return c}return-(d+1)},"~A,~N");c$.binarySearch=c(c$,"binarySearch",function(a,b){for(var d=0,g=a.length-1;d<=g;){var c=d+g>>1,h=a[c].compareTo(b);if(0>h)d=c+1;else if(0<h)g=c-1;else return c}return-(d+
1)},"~A,~O");c$.binarySearch=c(c$,"binarySearch",function(a,b,d){if(null==d)return java.util.Arrays.binarySearch(a,b);for(var g=0,c=a.length-1;g<=c;){var h=g+c>>1,e=d.compare(a[h],b);if(0>e)g=h+1;else if(0<e)c=h-1;else return h}return-(g+1)},"~A,~O,java.util.Comparator");c$.equals=c(c$,"equals",function(a,b){if(a===b)return!0;if(null==a||null==b)return!1;var d=a.length;if(b.length!=d)return!1;for(var g=0;g<d;g++){var c=a[g],h=b[g];if(!(null==c?null==h:null==c.equals?c==h:c.equals(h)))return!1}return!0},
"~A,~A");c$.fill=e(c$,"fill",function(a,b,d,g){2==arguments.length&&(g=b,b=0,d=a.length);java.util.Arrays.rangeCheck(a.length,b,d);for(var c=b;c<d;c++)a[c]=g});c$.copyOf=e(c$,"copyOf",function(a,b){for(var d=x(b,null),g=Math.min(a.length,b);0<=--g;)d[g]=a[g];return d});c$.asList=c(c$,"asList",function(a){return new java.util.Arrays.ArrayList(1==arguments.length&&"Array"==qa(a)?a:arguments)},"~A");B(self.c$);c$=q(function(){this.a=null;n(this,arguments)},java.util.Arrays,"ArrayList",java.util.AbstractList,
[java.util.RandomAccess,java.io.Serializable]);m(c$,function(a){y(this,java.util.Arrays.ArrayList,[]);if(null==a)throw new NullPointerException;this.a=a},"~A");e(c$,"size",function(){return this.a.length});c(c$,"toArray",function(){return this.a.clone()});e(c$,"get",function(a){return this.a[a]},"~N");e(c$,"set",function(a,b){var d=this.a[a];this.a[a]=b;return d},"~N,~O");e(c$,"indexOf",function(a){if(null==a)for(var b=0;b<this.a.length;b++){if(null==this.a[b])return b}else for(b=0;b<this.a.length;b++)if(a.equals(this.a[b]))return b;
return-1},"~O");e(c$,"contains",function(a){return-1!=this.indexOf(a)},"~O");c$=A();D(c$,"INSERTIONSORT_THRESHOLD",7)});s("java.util.AbstractList $.AbstractMap $.AbstractSet $.Collection $.Iterator $.List $.ListIterator $.Map $.RandomAccess $.Set $.SortedMap $.SortedSet java.lang.NullPointerException $.UnsupportedOperationException java.lang.reflect.Array".split(" "),"java.util.Collections","java.lang.ArrayIndexOutOfBoundsException $.ClassCastException $.IllegalArgumentException $.IndexOutOfBoundsException java.util.ArrayList $.Arrays $.Enumeration java.util.Map.Entry java.util.NoSuchElementException $.Random".split(" "),
function(){c$=t(java.util,"Collections");c$.binarySearch=c(c$,"binarySearch",function(a,b){if(null==a)throw new NullPointerException;if(a.isEmpty())return-1;if(!w(a,java.util.RandomAccess)){for(var d=a.listIterator();d.hasNext();){var g;if(0>=(g=b.compareTo(d.next())))return 0==g?d.previousIndex():-d.previousIndex()-1}return-a.size()-1}var d=0,c=a.size(),h=c-1;for(g=-1;d<=h;)if(c=d+h>>1,0<(g=b.compareTo(a.get(c))))d=c+1;else{if(0==g)return c;h=c-1}return-c-(0>g?1:2)},"java.util.List,~O");c$.binarySearch=
c(c$,"binarySearch",function(a,b,d){if(null==d)return java.util.Collections.binarySearch(a,b);if(!w(a,java.util.RandomAccess)){for(var g=a.listIterator();g.hasNext();){var c;if(0>=(c=d.compare(b,g.next())))return 0==c?g.previousIndex():-g.previousIndex()-1}return-a.size()-1}var g=0,h=a.size(),e=h-1;for(c=-1;g<=e;)if(h=g+e>>1,0<(c=d.compare(b,a.get(h))))g=h+1;else{if(0==c)return h;e=h-1}return-h-(0>c?1:2)},"java.util.List,~O,java.util.Comparator");c$.copy=c(c$,"copy",function(a,b){if(a.size()<b.size())throw new ArrayIndexOutOfBoundsException;
for(var d=b.iterator(),g=a.listIterator();d.hasNext();){try{g.next()}catch(c){if(w(c,java.util.NoSuchElementException))throw new ArrayIndexOutOfBoundsException;throw c;}g.set(d.next())}},"java.util.List,java.util.List");c$.enumeration=c(c$,"enumeration",function(a){M("java.util.Collections$1")||java.util.Collections.$Collections$1$(a);return L(java.util.Collections$1,this,null)},"java.util.Collection");c$.fill=c(c$,"fill",function(a,b){for(var d=a.listIterator();d.hasNext();)d.next(),d.set(b)},"java.util.List,~O");
c$.max=c(c$,"max",function(a){a=a.iterator();for(var b=a.next();a.hasNext();){var d=a.next();0>b.compareTo(d)&&(b=d)}return b},"java.util.Collection");c$.max=c(c$,"max",function(a,b){for(var d=a.iterator(),g=d.next();d.hasNext();){var c=d.next();0>b.compare(g,c)&&(g=c)}return g},"java.util.Collection,java.util.Comparator");c$.min=c(c$,"min",function(a){a=a.iterator();for(var b=a.next();a.hasNext();){var d=a.next();0<b.compareTo(d)&&(b=d)}return b},"java.util.Collection");c$.min=c(c$,"min",function(a,
b){for(var d=a.iterator(),g=d.next();d.hasNext();){var c=d.next();0<b.compare(g,c)&&(g=c)}return g},"java.util.Collection,java.util.Comparator");c$.nCopies=c(c$,"nCopies",function(a,b){return new java.util.Collections.CopiesList(a,b)},"~N,~O");c$.reverse=c(c$,"reverse",function(a){var b=a.size(),d=a.listIterator();a=a.listIterator(b);for(var g=0;g<Math.floor(b/2);g++){var c=d.next(),h=a.previous();d.set(h);a.set(c)}},"java.util.List");c$.reverseOrder=c(c$,"reverseOrder",function(){return new java.util.Collections.ReverseComparator});
c$.reverseOrder=c(c$,"reverseOrder",function(a){return null==a?java.util.Collections.reverseOrder():new java.util.Collections.ReverseComparatorWithComparator(a)},"java.util.Comparator");c$.shuffle=c(c$,"shuffle",function(a){java.util.Collections.shuffle(a,new java.util.Random)},"java.util.List");c$.shuffle=c(c$,"shuffle",function(a,b){if(w(a,java.util.RandomAccess))for(g=a.size()-1;0<g;g--)c=b.nextInt()%(g+1),0>c&&(c=-c),a.set(c,a.set(g,a.get(c)));else{for(var d=a.toArray(),g=d.length-1;0<g;g--){var c=
b.nextInt()%(g+1);0>c&&(c=-c);var h=d[g];d[g]=d[c];d[c]=h}g=0;for(c=a.listIterator();c.hasNext();)c.next(),c.set(d[g++])}},"java.util.List,java.util.Random");c$.singleton=c(c$,"singleton",function(a){return new java.util.Collections.SingletonSet(a)},"~O");c$.singletonList=c(c$,"singletonList",function(a){return new java.util.Collections.SingletonList(a)},"~O");c$.singletonMap=c(c$,"singletonMap",function(a,b){return new java.util.Collections.SingletonMap(a,b)},"~O,~O");c$.sort=c(c$,"sort",function(a){var b=
a.toArray();java.util.Arrays.sort(b);var d=0;for(a=a.listIterator();a.hasNext();)a.next(),a.set(b[d++])},"java.util.List");c$.sort=c(c$,"sort",function(a,b){var d=a.toArray(Array(a.size()));java.util.Arrays.sort(d,b);for(var g=0,c=a.listIterator();c.hasNext();)c.next(),c.set(d[g++])},"java.util.List,java.util.Comparator");c$.swap=c(c$,"swap",function(a,b,d){if(null==a)throw new NullPointerException;b!=d&&a.set(d,a.set(b,a.get(d)))},"java.util.List,~N,~N");c$.replaceAll=c(c$,"replaceAll",function(a,
b,d){for(var g,c=!1;-1<(g=a.indexOf(b));)c=!0,a.set(g,d);return c},"java.util.List,~O,~O");c$.rotate=c(c$,"rotate",function(a,b){var d=a.size();if(0!=d){var g;g=0<b?b%d:d- -1*(b%d);if(!(0==g||g==d))if(w(a,java.util.RandomAccess))for(var c=a.get(0),h=0,e=0,j=0;j<d;j++)h=(h+g)%d,c=a.set(h,c),h==e&&(h=++e,c=a.get(e));else c=(d-g)%d,g=a.subList(0,c),d=a.subList(c,d),java.util.Collections.reverse(g),java.util.Collections.reverse(d),java.util.Collections.reverse(a)}},"java.util.List,~N");c$.indexOfSubList=
c(c$,"indexOfSubList",function(a,b){var d=a.size(),g=b.size();if(g>d)return-1;if(0==g)return 0;var c=b.get(0),h=a.indexOf(c);if(-1==h)return-1;for(;h<d&&d-h>=g;){var e=a.listIterator(h);if(null==c?null==e.next():c.equals(e.next())){for(var j=b.listIterator(1),l=!1;j.hasNext();){var p=j.next();if(!e.hasNext())return-1;if(null==p?null!=e.next():!p.equals(e.next())){l=!0;break}}if(!l)return h}h++}return-1},"java.util.List,java.util.List");c$.lastIndexOfSubList=c(c$,"lastIndexOfSubList",function(a,b){var d=
b.size(),g=a.size();if(d>g)return-1;if(0==d)return g;for(var g=b.get(d-1),c=a.lastIndexOf(g);-1<c&&c+1>=d;){var h=a.listIterator(c+1);if(null==g?null==h.previous():g.equals(h.previous())){for(var e=b.listIterator(d-1),j=!1;e.hasPrevious();){var l=e.previous();if(!h.hasPrevious())return-1;if(null==l?null!=h.previous():!l.equals(h.previous())){j=!0;break}}if(!j)return h.nextIndex()}c--}return-1},"java.util.List,java.util.List");c$.list=c(c$,"list",function(a){for(var b=new java.util.ArrayList;a.hasMoreElements();)b.add(a.nextElement());
return b},"java.util.Enumeration");c$.synchronizedCollection=c(c$,"synchronizedCollection",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedCollection(a)},"java.util.Collection");c$.synchronizedList=c(c$,"synchronizedList",function(a){if(null==a)throw new NullPointerException;return w(a,java.util.RandomAccess)?new java.util.Collections.SynchronizedRandomAccessList(a):new java.util.Collections.SynchronizedList(a)},"java.util.List");c$.synchronizedMap=
c(c$,"synchronizedMap",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedMap(a)},"java.util.Map");c$.synchronizedSet=c(c$,"synchronizedSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedSet(a)},"java.util.Set");c$.synchronizedSortedMap=c(c$,"synchronizedSortedMap",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedSortedMap(a)},"java.util.SortedMap");
c$.synchronizedSortedSet=c(c$,"synchronizedSortedSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedSortedSet(a)},"java.util.SortedSet");c$.unmodifiableCollection=c(c$,"unmodifiableCollection",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableCollection(a)},"java.util.Collection");c$.unmodifiableList=c(c$,"unmodifiableList",function(a){if(null==a)throw new NullPointerException;return w(a,java.util.RandomAccess)?
new java.util.Collections.UnmodifiableRandomAccessList(a):new java.util.Collections.UnmodifiableList(a)},"java.util.List");c$.unmodifiableMap=c(c$,"unmodifiableMap",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableMap(a)},"java.util.Map");c$.unmodifiableSet=c(c$,"unmodifiableSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableSet(a)},"java.util.Set");c$.unmodifiableSortedMap=c(c$,"unmodifiableSortedMap",
function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableSortedMap(a)},"java.util.SortedMap");c$.unmodifiableSortedSet=c(c$,"unmodifiableSortedSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableSortedSet(a)},"java.util.SortedSet");c$.frequency=c(c$,"frequency",function(a,b){if(null==a)throw new NullPointerException;if(a.isEmpty())return 0;for(var d=0,g=a.iterator();g.hasNext();){var c=g.next();(null==b?
null==c:b.equals(c))&&d++}return d},"java.util.Collection,~O");c$.emptyList=c(c$,"emptyList",function(){return java.util.Collections.EMPTY_LIST});c$.emptySet=c(c$,"emptySet",function(){return java.util.Collections.EMPTY_SET});c$.emptyMap=c(c$,"emptyMap",function(){return java.util.Collections.EMPTY_MAP});c$.checkedCollection=c(c$,"checkedCollection",function(a,b){return new java.util.Collections.CheckedCollection(a,b)},"java.util.Collection,Class");c$.checkedMap=c(c$,"checkedMap",function(a,b,d){return new java.util.Collections.CheckedMap(a,
b,d)},"java.util.Map,Class,Class");c$.checkedList=c(c$,"checkedList",function(a,b){return w(a,java.util.RandomAccess)?new java.util.Collections.CheckedRandomAccessList(a,b):new java.util.Collections.CheckedList(a,b)},"java.util.List,Class");c$.checkedSet=c(c$,"checkedSet",function(a,b){return new java.util.Collections.CheckedSet(a,b)},"java.util.Set,Class");c$.checkedSortedMap=c(c$,"checkedSortedMap",function(a,b,d){return new java.util.Collections.CheckedSortedMap(a,b,d)},"java.util.SortedMap,Class,Class");
c$.checkedSortedSet=c(c$,"checkedSortedSet",function(a,b){return new java.util.Collections.CheckedSortedSet(a,b)},"java.util.SortedSet,Class");c$.addAll=c(c$,"addAll",function(a,b){for(var d=!1,g=0;g<b.length;g++)d=(new Boolean(d|a.add(b[g]))).valueOf();return d},"java.util.Collection,~A");c$.disjoint=c(c$,"disjoint",function(a,b){if(w(a,java.util.Set)&&!w(b,java.util.Set)||b.size()>a.size()){var d=a;a=b;b=d}for(d=a.iterator();d.hasNext();)if(b.contains(d.next()))return!1;return!0},"java.util.Collection,java.util.Collection");
c$.checkType=c(c$,"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");c$.$Collections$1$=function(a){B(self.c$);c$=q(function(){R(this,arguments);this.it=null;n(this,arguments)},java.util,"Collections$1",null,java.util.Enumeration);H(c$,function(){this.it=a.iterator()});c(c$,"hasMoreElements",function(){return this.it.hasNext()});c(c$,"nextElement",function(){return this.it.next()});
c$=A()};B(self.c$);c$=q(function(){this.n=0;this.element=null;n(this,arguments)},java.util.Collections,"CopiesList",java.util.AbstractList,java.io.Serializable);m(c$,function(a,b){y(this,java.util.Collections.CopiesList,[]);if(0>a)throw new IllegalArgumentException;this.n=a;this.element=b},"~N,~O");e(c$,"contains",function(a){return null==this.element?null==a:this.element.equals(a)},"~O");e(c$,"size",function(){return this.n});e(c$,"get",function(a){if(0<=a&&a<this.n)return this.element;throw new IndexOutOfBoundsException;
},"~N");c$=A();B(self.c$);c$=t(java.util.Collections,"EmptyList",java.util.AbstractList,java.io.Serializable);e(c$,"contains",function(){return!1},"~O");e(c$,"size",function(){return 0});e(c$,"get",function(){throw new IndexOutOfBoundsException;},"~N");c$=A();B(self.c$);c$=t(java.util.Collections,"EmptySet",java.util.AbstractSet,java.io.Serializable);e(c$,"contains",function(){return!1},"~O");e(c$,"size",function(){return 0});e(c$,"iterator",function(){return M("java.util.Collections$EmptySet$1")?
0:java.util.Collections.EmptySet.$Collections$EmptySet$1$(),L(java.util.Collections$EmptySet$1,this,null)});c$.$Collections$EmptySet$1$=function(){B(self.c$);c$=Y(java.util,"Collections$EmptySet$1",null,java.util.Iterator);e(c$,"hasNext",function(){return!1});e(c$,"next",function(){throw new java.util.NoSuchElementException;});e(c$,"remove",function(){throw new UnsupportedOperationException;});c$=A()};c$=A();B(self.c$);c$=t(java.util.Collections,"EmptyMap",java.util.AbstractMap,java.io.Serializable);
e(c$,"containsKey",function(){return!1},"~O");e(c$,"containsValue",function(){return!1},"~O");e(c$,"entrySet",function(){return java.util.Collections.EMPTY_SET});e(c$,"get",function(){return null},"~O");e(c$,"keySet",function(){return java.util.Collections.EMPTY_SET});e(c$,"values",function(){return java.util.Collections.EMPTY_LIST});c$=A();B(self.c$);c$=t(java.util.Collections,"ReverseComparator",null,[java.util.Comparator,java.io.Serializable]);e(c$,"compare",function(a,b){return b.compareTo(a)},
"~O,~O");c$=A();B(self.c$);c$=q(function(){this.comparator=null;n(this,arguments)},java.util.Collections,"ReverseComparatorWithComparator",null,[java.util.Comparator,java.io.Serializable]);m(c$,function(a){this.comparator=a},"java.util.Comparator");c(c$,"compare",function(a,b){return this.comparator.compare(b,a)},"~O,~O");c$=A();B(self.c$);c$=q(function(){this.element=null;n(this,arguments)},java.util.Collections,"SingletonSet",java.util.AbstractSet,java.io.Serializable);m(c$,function(a){y(this,java.util.Collections.SingletonSet,
[]);this.element=a},"~O");e(c$,"contains",function(a){return null==this.element?null==a:this.element.equals(a)},"~O");e(c$,"size",function(){return 1});e(c$,"iterator",function(){return M("java.util.Collections$SingletonSet$1")?0:java.util.Collections.SingletonSet.$Collections$SingletonSet$1$(),L(java.util.Collections$SingletonSet$1,this,null)});c$.$Collections$SingletonSet$1$=function(){B(self.c$);c$=q(function(){R(this,arguments);this.$hasNext=!0;n(this,arguments)},java.util,"Collections$SingletonSet$1",
null,java.util.Iterator);e(c$,"hasNext",function(){return this.$hasNext});e(c$,"next",function(){if(this.$hasNext)return this.$hasNext=!1,this.b$["java.util.Collections.SingletonSet"].element;throw new java.util.NoSuchElementException;});e(c$,"remove",function(){throw new UnsupportedOperationException;});c$=A()};c$=A();B(self.c$);c$=q(function(){this.element=null;n(this,arguments)},java.util.Collections,"SingletonList",java.util.AbstractList,java.io.Serializable);m(c$,function(a){y(this,java.util.Collections.SingletonList,
[]);this.element=a},"~O");e(c$,"contains",function(a){return null==this.element?null==a:this.element.equals(a)},"~O");e(c$,"get",function(a){if(0==a)return this.element;throw new IndexOutOfBoundsException;},"~N");e(c$,"size",function(){return 1});c$=A();B(self.c$);c$=q(function(){this.v=this.k=null;n(this,arguments)},java.util.Collections,"SingletonMap",java.util.AbstractMap,java.io.Serializable);m(c$,function(a,b){y(this,java.util.Collections.SingletonMap,[]);this.k=a;this.v=b},"~O,~O");e(c$,"containsKey",
function(a){return null==this.k?null==a:this.k.equals(a)},"~O");e(c$,"containsValue",function(a){return null==this.v?null==a:this.v.equals(a)},"~O");e(c$,"get",function(a){return this.containsKey(a)?this.v:null},"~O");e(c$,"size",function(){return 1});e(c$,"entrySet",function(){return M("java.util.Collections$SingletonMap$1")?0:java.util.Collections.SingletonMap.$Collections$SingletonMap$1$(),L(java.util.Collections$SingletonMap$1,this,null)});c$.$Collections$SingletonMap$1$=function(){B(self.c$);
c$=Y(java.util,"Collections$SingletonMap$1",java.util.AbstractSet);e(c$,"contains",function(a){return w(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(c$,"size",function(){return 1});e(c$,"iterator",function(){return M("java.util.Collections$SingletonMap$1$1")?0:java.util.Collections.$Collections$SingletonMap$1$1$(),L(java.util.Collections$SingletonMap$1$1,this,null)});
c$=A()};c$.$Collections$SingletonMap$1$1$=function(){B(self.c$);c$=q(function(){R(this,arguments);this.$hasNext=!0;n(this,arguments)},java.util,"Collections$SingletonMap$1$1",null,java.util.Iterator);e(c$,"hasNext",function(){return this.$hasNext});e(c$,"next",function(){if(this.$hasNext)return this.$hasNext=!1,M("java.util.Collections$SingletonMap$1$1$1")?0:java.util.Collections.$Collections$SingletonMap$1$1$1$(),L(java.util.Collections$SingletonMap$1$1$1,this,null);throw new java.util.NoSuchElementException;
});e(c$,"remove",function(){throw new UnsupportedOperationException;});c$=A()};c$.$Collections$SingletonMap$1$1$1$=function(){B(self.c$);c$=Y(java.util,"Collections$SingletonMap$1$1$1",null,java.util.Map.Entry);e(c$,"equals",function(a){return this.b$["java.util.Collections$SingletonMap$1"].contains(a)},"~O");e(c$,"getKey",function(){return this.b$["java.util.Collections.SingletonMap"].k});e(c$,"getValue",function(){return this.b$["java.util.Collections.SingletonMap"].v});e(c$,"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(c$,"setValue",function(){throw new UnsupportedOperationException;},"~O");c$=A()};c$=A();B(self.c$);c$=q(function(){this.mutex=this.c=null;n(this,arguments)},java.util.Collections,"SynchronizedCollection",null,[java.util.Collection,java.io.Serializable]);m(c$,function(a){this.c=
a;this.mutex=this},"java.util.Collection");m(c$,function(a,b){this.c=a;this.mutex=b},"java.util.Collection,~O");c(c$,"add",function(a){return this.c.add(a)},"~O");c(c$,"addAll",function(a){return this.c.addAll(a)},"java.util.Collection");c(c$,"clear",function(){this.c.clear()});c(c$,"contains",function(a){return this.c.contains(a)},"~O");c(c$,"containsAll",function(a){return this.c.containsAll(a)},"java.util.Collection");c(c$,"isEmpty",function(){return this.c.isEmpty()});c(c$,"iterator",function(){return this.c.iterator()});
c(c$,"remove",function(a){return this.c.remove(a)},"~O");c(c$,"removeAll",function(a){return this.c.removeAll(a)},"java.util.Collection");c(c$,"retainAll",function(a){return this.c.retainAll(a)},"java.util.Collection");c(c$,"size",function(){return this.c.size()});c(c$,"toArray",function(){return this.c.toArray()});c(c$,"toString",function(){return this.c.toString()});c(c$,"toArray",function(a){return this.c.toArray(a)},"~A");c$=A();B(self.c$);c$=q(function(){this.list=null;n(this,arguments)},java.util.Collections,
"SynchronizedList",java.util.Collections.SynchronizedCollection,java.util.List);m(c$,function(a){y(this,java.util.Collections.SynchronizedList,[a]);this.list=a},"java.util.List");m(c$,function(a,b){y(this,java.util.Collections.SynchronizedList,[a,b]);this.list=a},"java.util.List,~O");c(c$,"add",function(a,b){this.list.add(a,b)},"~N,~O");c(c$,"addAll",function(a,b){return this.list.addAll(a,b)},"~N,java.util.Collection");e(c$,"equals",function(a){return this.list.equals(a)},"~O");c(c$,"get",function(a){return this.list.get(a)},
"~N");e(c$,"hashCode",function(){return this.list.hashCode()});c(c$,"indexOf",function(a){return this.list.indexOf(a)},"~O");c(c$,"lastIndexOf",function(a){return this.list.lastIndexOf(a)},"~O");c(c$,"listIterator",function(a){a||(a=0);return this.list.listIterator(a)},"~N");c(c$,"remove",function(a){return this.list.remove(a)},"~N");c(c$,"set",function(a,b){return this.list.set(a,b)},"~N,~O");c(c$,"subList",function(a,b){return new java.util.Collections.SynchronizedList(this.list.subList(a,b),this.mutex)},
"~N,~N");c$=A();B(self.c$);c$=t(java.util.Collections,"SynchronizedRandomAccessList",java.util.Collections.SynchronizedList,java.util.RandomAccess);e(c$,"subList",function(a,b){return new java.util.Collections.SynchronizedRandomAccessList(this.list.subList(a,b),this.mutex)},"~N,~N");c$=A();B(self.c$);c$=q(function(){this.mutex=this.m=null;n(this,arguments)},java.util.Collections,"SynchronizedMap",null,[java.util.Map,java.io.Serializable]);m(c$,function(a){this.m=a;this.mutex=this},"java.util.Map");
m(c$,function(a,b){this.m=a;this.mutex=b},"java.util.Map,~O");c(c$,"clear",function(){this.m.clear()});c(c$,"containsKey",function(a){return this.m.containsKey(a)},"~O");c(c$,"containsValue",function(a){return this.m.containsValue(a)},"~O");c(c$,"entrySet",function(){return new java.util.Collections.SynchronizedSet(this.m.entrySet(),this.mutex)});e(c$,"equals",function(a){return this.m.equals(a)},"~O");c(c$,"get",function(a){return this.m.get(a)},"~O");e(c$,"hashCode",function(){return this.m.hashCode()});
c(c$,"isEmpty",function(){return this.m.isEmpty()});c(c$,"keySet",function(){return new java.util.Collections.SynchronizedSet(this.m.keySet(),this.mutex)});c(c$,"put",function(a,b){return this.m.put(a,b)},"~O,~O");c(c$,"putAll",function(a){this.m.putAll(a)},"java.util.Map");c(c$,"remove",function(a){return this.m.remove(a)},"~O");c(c$,"size",function(){return this.m.size()});c(c$,"values",function(){return new java.util.Collections.SynchronizedCollection(this.m.values(),this.mutex)});c(c$,"toString",
function(){return this.m.toString()});c$=A();B(self.c$);c$=t(java.util.Collections,"SynchronizedSet",java.util.Collections.SynchronizedCollection,java.util.Set);e(c$,"equals",function(a){return this.c.equals(a)},"~O");e(c$,"hashCode",function(){return this.c.hashCode()});c$=A();B(self.c$);c$=q(function(){this.sm=null;n(this,arguments)},java.util.Collections,"SynchronizedSortedMap",java.util.Collections.SynchronizedMap,java.util.SortedMap);m(c$,function(a){y(this,java.util.Collections.SynchronizedSortedMap,
[a]);this.sm=a},"java.util.SortedMap");m(c$,function(a,b){y(this,java.util.Collections.SynchronizedSortedMap,[a,b]);this.sm=a},"java.util.SortedMap,~O");c(c$,"comparator",function(){return this.sm.comparator()});c(c$,"firstKey",function(){return this.sm.firstKey()});c(c$,"headMap",function(a){return new java.util.Collections.SynchronizedSortedMap(this.sm.headMap(a),this.mutex)},"~O");c(c$,"lastKey",function(){return this.sm.lastKey()});c(c$,"subMap",function(a,b){return new java.util.Collections.SynchronizedSortedMap(this.sm.subMap(a,
b),this.mutex)},"~O,~O");c(c$,"tailMap",function(a){return new java.util.Collections.SynchronizedSortedMap(this.sm.tailMap(a),this.mutex)},"~O");c$=A();B(self.c$);c$=q(function(){this.ss=null;n(this,arguments)},java.util.Collections,"SynchronizedSortedSet",java.util.Collections.SynchronizedSet,java.util.SortedSet);m(c$,function(a){y(this,java.util.Collections.SynchronizedSortedSet,[a]);this.ss=a},"java.util.SortedSet");m(c$,function(a,b){y(this,java.util.Collections.SynchronizedSortedSet,[a,b]);this.ss=
a},"java.util.SortedSet,~O");c(c$,"comparator",function(){return this.ss.comparator()});c(c$,"first",function(){return this.ss.first()});c(c$,"headSet",function(a){return new java.util.Collections.SynchronizedSortedSet(this.ss.headSet(a),this.mutex)},"~O");c(c$,"last",function(){return this.ss.last()});c(c$,"subSet",function(a,b){return new java.util.Collections.SynchronizedSortedSet(this.ss.subSet(a,b),this.mutex)},"~O,~O");c(c$,"tailSet",function(a){return new java.util.Collections.SynchronizedSortedSet(this.ss.tailSet(a),
this.mutex)},"~O");c$=A();B(self.c$);c$=q(function(){this.c=null;n(this,arguments)},java.util.Collections,"UnmodifiableCollection",null,[java.util.Collection,java.io.Serializable]);m(c$,function(a){this.c=a},"java.util.Collection");e(c$,"add",function(){throw new UnsupportedOperationException;},"~O");e(c$,"addAll",function(){throw new UnsupportedOperationException;},"java.util.Collection");e(c$,"clear",function(){throw new UnsupportedOperationException;});c(c$,"contains",function(a){return this.c.contains(a)},
"~O");c(c$,"containsAll",function(a){return this.c.containsAll(a)},"java.util.Collection");c(c$,"isEmpty",function(){return this.c.isEmpty()});c(c$,"iterator",function(){return M("java.util.Collections$UnmodifiableCollection$1")?0:java.util.Collections.UnmodifiableCollection.$Collections$UnmodifiableCollection$1$(),L(java.util.Collections$UnmodifiableCollection$1,this,null)});e(c$,"remove",function(){throw new UnsupportedOperationException;},"~O");e(c$,"removeAll",function(){throw new UnsupportedOperationException;
},"java.util.Collection");e(c$,"retainAll",function(){throw new UnsupportedOperationException;},"java.util.Collection");c(c$,"size",function(){return this.c.size()});c(c$,"toArray",function(){return this.c.toArray()});c(c$,"toArray",function(a){return this.c.toArray(a)},"~A");c(c$,"toString",function(){return this.c.toString()});c$.$Collections$UnmodifiableCollection$1$=function(){B(self.c$);c$=q(function(){R(this,arguments);this.iterator=null;n(this,arguments)},java.util,"Collections$UnmodifiableCollection$1",
null,java.util.Iterator);H(c$,function(){this.iterator=this.b$["java.util.Collections.UnmodifiableCollection"].c.iterator()});c(c$,"hasNext",function(){return this.iterator.hasNext()});c(c$,"next",function(){return this.iterator.next()});e(c$,"remove",function(){throw new UnsupportedOperationException;});c$=A()};c$=A();B(self.c$);c$=q(function(){this.list=null;n(this,arguments)},java.util.Collections,"UnmodifiableList",java.util.Collections.UnmodifiableCollection,java.util.List);m(c$,function(a){y(this,
java.util.Collections.UnmodifiableList,[a]);this.list=a},"java.util.List");c(c$,"add",function(){throw new UnsupportedOperationException;},"~N,~O");c(c$,"addAll",function(){throw new UnsupportedOperationException;},"~N,java.util.Collection");e(c$,"equals",function(a){return this.list.equals(a)},"~O");c(c$,"get",function(a){return this.list.get(a)},"~N");e(c$,"hashcode",function(){return this.list.hashCode()});c(c$,"indexOf",function(a){return this.list.indexOf(a)},"~O");c(c$,"lastIndexOf",function(a){return this.list.lastIndexOf(a)},
"~O");c(c$,"listIterator",function(){return M("java.util.Collections$UnmodifiableList$1")?0:java.util.Collections.UnmodifiableList.$Collections$UnmodifiableList$1$(),L(java.util.Collections$UnmodifiableList$1,this,null)},"~N");c(c$,"remove",function(){throw new UnsupportedOperationException;},"~N");e(c$,"set",function(){throw new UnsupportedOperationException;},"~N,~O");c(c$,"subList",function(a,b){return new java.util.Collections.UnmodifiableList(this.list.subList(a,b))},"~N,~N");c$.$Collections$UnmodifiableList$1$=
function(){B(self.c$);c$=q(function(){R(this,arguments);this.iterator=null;n(this,arguments)},java.util,"Collections$UnmodifiableList$1",null,java.util.ListIterator);H(c$,function(){this.iterator=this.b$["java.util.Collections.UnmodifiableList"].list.listIterator(location)});e(c$,"add",function(){throw new UnsupportedOperationException;},"~O");c(c$,"hasNext",function(){return this.iterator.hasNext()});c(c$,"hasPrevious",function(){return this.iterator.hasPrevious()});c(c$,"next",function(){return this.iterator.next()});
c(c$,"nextIndex",function(){return this.iterator.nextIndex()});c(c$,"previous",function(){return this.iterator.previous()});c(c$,"previousIndex",function(){return this.iterator.previousIndex()});e(c$,"remove",function(){throw new UnsupportedOperationException;});e(c$,"set",function(){throw new UnsupportedOperationException;},"~O");c$=A()};c$=A();B(self.c$);c$=t(java.util.Collections,"UnmodifiableRandomAccessList",java.util.Collections.UnmodifiableList,java.util.RandomAccess);e(c$,"subList",function(a,
b){return new java.util.Collections.UnmodifiableRandomAccessList(this.list.subList(a,b))},"~N,~N");c$=A();B(self.c$);c$=t(java.util.Collections,"UnmodifiableSet",java.util.Collections.UnmodifiableCollection,java.util.Set);e(c$,"equals",function(a){return this.c.equals(a)},"~O");e(c$,"hashCode",function(){return this.c.hashCode()});c$=A();B(self.c$);c$=q(function(){this.m=null;n(this,arguments)},java.util.Collections,"UnmodifiableMap",null,[java.util.Map,java.io.Serializable]);m(c$,function(a){this.m=
a},"java.util.Map");e(c$,"clear",function(){throw new UnsupportedOperationException;});c(c$,"containsKey",function(a){return this.m.containsKey(a)},"~O");c(c$,"containsValue",function(a){return this.m.containsValue(a)},"~O");c(c$,"entrySet",function(){return new java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet(this.m.entrySet())});e(c$,"equals",function(a){return this.m.equals(a)},"~O");c(c$,"get",function(a){return this.m.get(a)},"~O");e(c$,"hashcode",function(){return this.m.hashCode()});
c(c$,"isEmpty",function(){return this.m.isEmpty()});c(c$,"keySet",function(){return new java.util.Collections.UnmodifiableSet(this.m.keySet())});e(c$,"put",function(){throw new UnsupportedOperationException;},"~O,~O");e(c$,"putAll",function(){throw new UnsupportedOperationException;},"java.util.Map");e(c$,"remove",function(){throw new UnsupportedOperationException;},"~O");c(c$,"size",function(){return this.m.size()});c(c$,"values",function(){return new java.util.Collections.UnmodifiableCollection(this.m.values())});
c(c$,"toString",function(){return this.m.toString()});B(self.c$);c$=t(java.util.Collections.UnmodifiableMap,"UnmodifiableEntrySet",java.util.Collections.UnmodifiableSet);e(c$,"iterator",function(){return M("java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1")?0:java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet.$Collections$UnmodifiableMap$UnmodifiableEntrySet$1$(),L(java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1,this,null)});c(c$,"toArray",function(){for(var a=this.c.size(),
b=Array(a),d=this.iterator();0<=--a;)b[a]=d.next();return b});c(c$,"toArray",function(a){var b=this.c.size(),d=0,g=this.iterator();b>a.length&&(a=a.getClass().getComponentType(),a=java.lang.reflect.Array.newInstance(a,b));for(;d<b;)a[d++]=g.next();d<a.length&&(a[d]=null);return a},"~A");c$.$Collections$UnmodifiableMap$UnmodifiableEntrySet$1$=function(){B(self.c$);c$=q(function(){R(this,arguments);this.iterator=null;n(this,arguments)},java.util,"Collections$UnmodifiableMap$UnmodifiableEntrySet$1",
null,java.util.Iterator);H(c$,function(){this.iterator=this.b$["java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet"].c.iterator()});c(c$,"hasNext",function(){return this.iterator.hasNext()});c(c$,"next",function(){return new java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableMapEntry(this.iterator.next())});e(c$,"remove",function(){throw new UnsupportedOperationException;});c$=A()};B(self.c$);c$=q(function(){this.mapEntry=null;n(this,arguments)},java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet,
"UnmodifiableMapEntry",null,java.util.Map.Entry);m(c$,function(a){this.mapEntry=a},"java.util.Map.Entry");e(c$,"equals",function(a){return this.mapEntry.equals(a)},"~O");c(c$,"getKey",function(){return this.mapEntry.getKey()});c(c$,"getValue",function(){return this.mapEntry.getValue()});e(c$,"hashcode",function(){return this.mapEntry.hashCode()});e(c$,"setValue",function(){throw new UnsupportedOperationException;},"~O");c(c$,"toString",function(){return this.mapEntry.toString()});c$=A();c$=A();c$=
A();B(self.c$);c$=q(function(){this.sm=null;n(this,arguments)},java.util.Collections,"UnmodifiableSortedMap",java.util.Collections.UnmodifiableMap,java.util.SortedMap);m(c$,function(a){y(this,java.util.Collections.UnmodifiableSortedMap,[a]);this.sm=a},"java.util.SortedMap");c(c$,"comparator",function(){return this.sm.comparator()});c(c$,"firstKey",function(){return this.sm.firstKey()});c(c$,"headMap",function(a){return new java.util.Collections.UnmodifiableSortedMap(this.sm.headMap(a))},"~O");c(c$,
"lastKey",function(){return this.sm.lastKey()});c(c$,"subMap",function(a,b){return new java.util.Collections.UnmodifiableSortedMap(this.sm.subMap(a,b))},"~O,~O");c(c$,"tailMap",function(a){return new java.util.Collections.UnmodifiableSortedMap(this.sm.tailMap(a))},"~O");c$=A();B(self.c$);c$=q(function(){this.ss=null;n(this,arguments)},java.util.Collections,"UnmodifiableSortedSet",java.util.Collections.UnmodifiableSet,java.util.SortedSet);m(c$,function(a){y(this,java.util.Collections.UnmodifiableSortedSet,
[a]);this.ss=a},"java.util.SortedSet");c(c$,"comparator",function(){return this.ss.comparator()});c(c$,"first",function(){return this.ss.first()});c(c$,"headSet",function(a){return new java.util.Collections.UnmodifiableSortedSet(this.ss.headSet(a))},"~O");c(c$,"last",function(){return this.ss.last()});c(c$,"subSet",function(a,b){return new java.util.Collections.UnmodifiableSortedSet(this.ss.subSet(a,b))},"~O,~O");c(c$,"tailSet",function(a){return new java.util.Collections.UnmodifiableSortedSet(this.ss.tailSet(a))},
"~O");c$=A();B(self.c$);c$=q(function(){this.type=this.c=null;n(this,arguments)},java.util.Collections,"CheckedCollection",null,[java.util.Collection,java.io.Serializable]);m(c$,function(a,b){if(null==a||null==b)throw new NullPointerException;this.c=a;this.type=b},"java.util.Collection,Class");c(c$,"size",function(){return this.c.size()});c(c$,"isEmpty",function(){return this.c.isEmpty()});c(c$,"contains",function(a){return this.c.contains(a)},"~O");c(c$,"iterator",function(){var a=this.c.iterator();
w(a,java.util.ListIterator)&&(a=new java.util.Collections.CheckedListIterator(a,this.type));return a});c(c$,"toArray",function(){return this.c.toArray()});c(c$,"toArray",function(a){return this.c.toArray(a)},"~A");c(c$,"add",function(a){return this.c.add(java.util.Collections.checkType(a,this.type))},"~O");c(c$,"remove",function(a){return this.c.remove(a)},"~O");c(c$,"containsAll",function(a){return this.c.containsAll(a)},"java.util.Collection");e(c$,"addAll",function(a){var b=a.size();if(0==b)return!1;
var d=Array(b);a=a.iterator();for(var g=0;g<b;g++)d[g]=java.util.Collections.checkType(a.next(),this.type);a=!1;for(g=0;g<b;g++)a=(new Boolean(a|this.c.add(d[g]))).valueOf();return a},"java.util.Collection");c(c$,"removeAll",function(a){return this.c.removeAll(a)},"java.util.Collection");c(c$,"retainAll",function(a){return this.c.retainAll(a)},"java.util.Collection");c(c$,"clear",function(){this.c.clear()});c(c$,"toString",function(){return this.c.toString()});c$=A();B(self.c$);c$=q(function(){this.type=
this.i=null;n(this,arguments)},java.util.Collections,"CheckedListIterator",null,java.util.ListIterator);m(c$,function(a,b){this.i=a;this.type=b},"java.util.ListIterator,Class");c(c$,"hasNext",function(){return this.i.hasNext()});c(c$,"next",function(){return this.i.next()});c(c$,"remove",function(){this.i.remove()});c(c$,"hasPrevious",function(){return this.i.hasPrevious()});c(c$,"previous",function(){return this.i.previous()});c(c$,"nextIndex",function(){return this.i.nextIndex()});c(c$,"previousIndex",
function(){return this.i.previousIndex()});c(c$,"set",function(a){this.i.set(java.util.Collections.checkType(a,this.type))},"~O");c(c$,"add",function(a){this.i.add(java.util.Collections.checkType(a,this.type))},"~O");c$=A();B(self.c$);c$=q(function(){this.l=null;n(this,arguments)},java.util.Collections,"CheckedList",java.util.Collections.CheckedCollection,java.util.List);m(c$,function(a,b){y(this,java.util.Collections.CheckedList,[a,b]);this.l=a},"java.util.List,Class");c(c$,"addAll",function(a,b){var d=
b.size();if(0==d)return!1;for(var g=Array(d),c=b.iterator(),h=0;h<d;h++)g[h]=java.util.Collections.checkType(c.next(),this.type);return this.l.addAll(a,java.util.Arrays.asList(g))},"~N,java.util.Collection");c(c$,"get",function(a){return this.l.get(a)},"~N");c(c$,"set",function(a,b){return this.l.set(a,java.util.Collections.checkType(b,this.type))},"~N,~O");c(c$,"add",function(a,b){this.l.add(a,java.util.Collections.checkType(b,this.type))},"~N,~O");c(c$,"remove",function(a){return this.l.remove(a)},
"~N");c(c$,"indexOf",function(a){return this.l.indexOf(a)},"~O");c(c$,"lastIndexOf",function(a){return this.l.lastIndexOf(a)},"~O");c(c$,"listIterator",function(a){a||(a=0);return new java.util.Collections.CheckedListIterator(this.l.listIterator(a),this.type)},"~N");c(c$,"subList",function(a,b){return java.util.Collections.checkedList(this.l.subList(a,b),this.type)},"~N,~N");e(c$,"equals",function(a){return this.l.equals(a)},"~O");e(c$,"hashcode",function(){return this.l.hashCode()});c$=A();B(self.c$);
c$=t(java.util.Collections,"CheckedRandomAccessList",java.util.Collections.CheckedList,java.util.RandomAccess);c$=A();B(self.c$);c$=t(java.util.Collections,"CheckedSet",java.util.Collections.CheckedCollection,java.util.Set);e(c$,"equals",function(a){return this.c.equals(a)},"~O");e(c$,"hashCode",function(){return this.c.hashCode()});c$=A();B(self.c$);c$=q(function(){this.valueType=this.keyType=this.m=null;n(this,arguments)},java.util.Collections,"CheckedMap",null,[java.util.Map,java.io.Serializable]);
m(c$,($fz=function(a,b,d){if(null==a||null==b||null==d)throw new NullPointerException;this.m=a;this.keyType=b;this.valueType=d},$fz.isPrivate=!0,$fz),"java.util.Map,Class,Class");c(c$,"size",function(){return this.m.size()});c(c$,"isEmpty",function(){return this.m.isEmpty()});c(c$,"containsKey",function(a){return this.m.containsKey(a)},"~O");c(c$,"containsValue",function(a){return this.m.containsValue(a)},"~O");c(c$,"get",function(a){return this.m.get(a)},"~O");c(c$,"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(c$,"remove",function(a){return this.m.remove(a)},"~O");e(c$,"putAll",function(a){var b=a.size();if(0!=b){var d=Array(b);a=a.entrySet().iterator();for(var g=0;g<b;g++){var c=a.next();java.util.Collections.checkType(c.getKey(),this.keyType);java.util.Collections.checkType(c.getValue(),this.valueType);d[g]=c}for(c=0;c<b;c++)this.m.put(d[c].getKey(),d[c].getValue())}},"java.util.Map");c(c$,"clear",function(){this.m.clear()});
c(c$,"keySet",function(){return this.m.keySet()});c(c$,"values",function(){return this.m.values()});c(c$,"entrySet",function(){return new java.util.Collections.CheckedMap.CheckedEntrySet(this.m.entrySet(),this.valueType)});e(c$,"equals",function(a){return this.m.equals(a)},"~O");e(c$,"hashcode",function(){return this.m.hashCode()});c(c$,"toString",function(){return this.m.toString()});B(self.c$);c$=q(function(){this.valueType=this.e=null;n(this,arguments)},java.util.Collections.CheckedMap,"CheckedEntry",
null,java.util.Map.Entry);m(c$,function(a,b){if(null==a)throw new NullPointerException;this.e=a;this.valueType=b},"java.util.Map.Entry,Class");c(c$,"getKey",function(){return this.e.getKey()});c(c$,"getValue",function(){return this.e.getValue()});c(c$,"setValue",function(a){return this.e.setValue(java.util.Collections.checkType(a,this.valueType))},"~O");e(c$,"equals",function(a){return this.e.equals(a)},"~O");e(c$,"hashcode",function(){return this.e.hashCode()});c$=A();B(self.c$);c$=q(function(){this.valueType=
this.s=null;n(this,arguments)},java.util.Collections.CheckedMap,"CheckedEntrySet",null,java.util.Set);m(c$,function(a,b){this.s=a;this.valueType=b},"java.util.Set,Class");c(c$,"iterator",function(){return new java.util.Collections.CheckedMap.CheckedEntrySet.CheckedEntryIterator(this.s.iterator(),this.valueType)});c(c$,"toArray",function(){for(var a=this.size(),b=Array(a),d=this.iterator(),g=0;g<a;g++)b[g]=d.next();return b});c(c$,"toArray",function(a){var b=this.size();if(a.length<b){var d=a.getClass().getComponentType();
a=java.lang.reflect.Array.newInstance(d,b)}for(var d=this.iterator(),g=0;g<b;g++)a[g]=d.next();b<a.length&&(a[b]=null);return a},"~A");c(c$,"retainAll",function(a){return this.s.retainAll(a)},"java.util.Collection");c(c$,"removeAll",function(a){return this.s.removeAll(a)},"java.util.Collection");c(c$,"containsAll",function(a){return this.s.containsAll(a)},"java.util.Collection");e(c$,"addAll",function(){throw new UnsupportedOperationException;},"java.util.Collection");c(c$,"remove",function(a){return this.s.remove(a)},
"~O");c(c$,"contains",function(a){return this.s.contains(a)},"~O");e(c$,"add",function(){throw new UnsupportedOperationException;},"java.util.Map.Entry");c(c$,"isEmpty",function(){return this.s.isEmpty()});c(c$,"clear",function(){this.s.clear()});c(c$,"size",function(){return this.s.size()});e(c$,"hashcode",function(){return this.s.hashCode()});e(c$,"equals",function(a){return this.s.equals(a)},"~O");B(self.c$);c$=q(function(){this.valueType=this.i=null;n(this,arguments)},java.util.Collections.CheckedMap.CheckedEntrySet,
"CheckedEntryIterator",null,java.util.Iterator);m(c$,function(a,b){this.i=a;this.valueType=b},"java.util.Iterator,Class");c(c$,"hasNext",function(){return this.i.hasNext()});c(c$,"remove",function(){this.i.remove()});c(c$,"next",function(){return new java.util.Collections.CheckedMap.CheckedEntry(this.i.next(),this.valueType)});c$=A();c$=A();c$=A();B(self.c$);c$=q(function(){this.ss=null;n(this,arguments)},java.util.Collections,"CheckedSortedSet",java.util.Collections.CheckedSet,java.util.SortedSet);
m(c$,function(a,b){y(this,java.util.Collections.CheckedSortedSet,[a,b]);this.ss=a},"java.util.SortedSet,Class");c(c$,"comparator",function(){return this.ss.comparator()});c(c$,"subSet",function(a,b){return new java.util.Collections.CheckedSortedSet(this.ss.subSet(a,b),this.type)},"~O,~O");c(c$,"headSet",function(a){return new java.util.Collections.CheckedSortedSet(this.ss.headSet(a),this.type)},"~O");c(c$,"tailSet",function(a){return new java.util.Collections.CheckedSortedSet(this.ss.tailSet(a),this.type)},
"~O");c(c$,"first",function(){return this.ss.first()});c(c$,"last",function(){return this.ss.last()});c$=A();B(self.c$);c$=q(function(){this.sm=null;n(this,arguments)},java.util.Collections,"CheckedSortedMap",java.util.Collections.CheckedMap,java.util.SortedMap);m(c$,function(a,b,d){y(this,java.util.Collections.CheckedSortedMap,[a,b,d]);this.sm=a},"java.util.SortedMap,Class,Class");c(c$,"comparator",function(){return this.sm.comparator()});c(c$,"subMap",function(a,b){return new java.util.Collections.CheckedSortedMap(this.sm.subMap(a,
b),this.keyType,this.valueType)},"~O,~O");c(c$,"headMap",function(a){return new java.util.Collections.CheckedSortedMap(this.sm.headMap(a),this.keyType,this.valueType)},"~O");c(c$,"tailMap",function(a){return new java.util.Collections.CheckedSortedMap(this.sm.tailMap(a),this.keyType,this.valueType)},"~O");c(c$,"firstKey",function(){return this.sm.firstKey()});c(c$,"lastKey",function(){return this.sm.lastKey()});c$=A();c$.EMPTY_LIST=c$.prototype.EMPTY_LIST=new java.util.Collections.EmptyList;c$.EMPTY_SET=
c$.prototype.EMPTY_SET=new java.util.Collections.EmptySet;c$.EMPTY_MAP=c$.prototype.EMPTY_MAP=new java.util.Collections.EmptyMap});c$=t(java.util,"Dictionary");m(c$,function(){});s([],"java.util.HashtableIterator",[],function(){c$=q(function(){this.expectedModCount=this.position=0;this.lastEntry=this.type=null;this.lastPosition=0;this.canRemove=!1;n(this,arguments)},java.util,"HashtableIterator",null,java.util.Iterator);m(c$,function(a){this.type=a;this.h$=a.h$;this.position=this.h$.lastSlot;this.expectedModCount=
this.h$.modCount},"java.util.AbstractSet");e(c$,"hasNext",function(){if(this.lastEntry&&this.lastEntry.next)return!0;for(;this.position>=this.h$.firstSlot;)if(null==this.h$.elementData[this.position])this.position--;else return!0;return!1});e(c$,"next",function(){if(this.expectedModCount==this.h$.modCount){this.lastEntry&&(this.lastEntry=this.lastEntry.next);if(null==this.lastEntry){for(;this.position>=this.h$.firstSlot&&null==(this.lastEntry=this.h$.elementData[this.position]);)this.position--;this.lastEntry&&
(this.lastPosition=this.position,this.position--)}if(this.lastEntry)return this.canRemove=!0,this.type.get(this.lastEntry);throw new java.util.NoSuchElementException;}throw new java.util.ConcurrentModificationException;});e(c$,"remove",function(){if(this.expectedModCount==this.h$.modCount)if(this.canRemove){var a=this.canRemove=!1,b=this.h$.elementData[this.lastPosition];if(b===this.lastEntry)this.h$.elementData[this.lastPosition]=b.next,a=!0;else{for(;b&&b.next!==this.lastEntry;)b=b.next;b&&(b.next=
this.lastEntry.next,a=!0)}if(a){this.h$.modCount++;this.h$.elementCount--;this.expectedModCount++;return}}else throw new IllegalStateException;throw new java.util.ConcurrentModificationException;})});s([],"java.util.HashtableEnumerator",[],function(){c$=q(function(){this.key=!1;this.start=0;this.entry=null;n(this,arguments)},java.util,"HashtableEnumerator",null,java.util.Enumeration);m(c$,function(a,b){this.key=a;if(this.h$=b)this.start=this.h$.lastSlot+1},"~B,java.util.Hashtable");e(c$,"hasMoreElements",
function(){if(!this.h$)return!1;if(this.entry)return!0;for(;--this.start>=this.h$.firstSlot;)if(this.h$.elementData[this.start])return this.entry=this.h$.elementData[this.start],!0;return!1});e(c$,"nextElement",function(){if(this.hasMoreElements()){var a=this.key?this.entry.key:this.entry.value;this.entry=this.entry.next;return a}throw new java.util.NoSuchElementException;})});s(["java.util.AbstractSet"],"java.util.HashtableEntrySet",[],function(){c$=q(function(){n(this,arguments)},java.util,"HashtableEntrySet",
java.util.AbstractSet,null);m(c$,function(a){this.h$=a},"java.util.Hashtable");e(c$,"size",function(){return this.h$.elementCount});e(c$,"clear",function(){this.h$.clear()});e(c$,"remove",function(a){return this.contains(a)?(this.h$.remove(a.getKey()),!0):!1},"~O");c(c$,"contains",function(a){var b=this.h$.getEntry(a.getKey());return a.equals(b)},"~O");e(c$,"get",function(a){return a},"java.util.MapEntry");c(c$,"iterator",function(){return new java.util.HashtableIterator(this)})});s(["java.util.AbstractSet"],
"java.util.HashtableKeySet",[],function(){c$=q(function(){n(this,arguments)},java.util,"HashtableKeySet",java.util.AbstractSet,null);m(c$,function(a){this.h$=a},"java.util.Hashtable");e(c$,"contains",function(a){return this.h$.containsKey(a)},"~O");e(c$,"size",function(){return this.h$.elementCount});e(c$,"clear",function(){this.h$.clear()});e(c$,"remove",function(a){return this.h$.containsKey(a)?(this.h$.remove(a),!0):!1},"~O");e(c$,"get",function(a){return a.key},"java.util.MapEntry");e(c$,"iterator",
function(){return new java.util.HashtableIterator(this)})});s(["java.util.AbstractCollection"],"java.util.HashtableValueCollection",[],function(){c$=q(function(){n(this,arguments)},java.util,"HashtableValueCollection",java.util.AbstractCollection,null);m(c$,function(a){this.h$=a},"java.util.Hashtable");e(c$,"contains",function(a){return this.h$.contains(a)},"~O");e(c$,"size",function(){return this.h$.elementCount});e(c$,"clear",function(){this.h$.clear()});e(c$,"get",function(a){return a.value},"java.util.MapEntry");
e(c$,"iterator",function(){return new java.util.HashtableIterator(this)})});s(["java.util.MapEntry"],"java.util.HashtableEntry",[],function(){c$=q(function(){this.next=null;this.hashcode=0;n(this,arguments)},java.util,"HashtableEntry",java.util.MapEntry);S(c$,function(a,b){this.key=a;this.value=b;this.hashcode=a.hashCode()});c(c$,"clone",function(){var a=Q(this,java.util.HashtableEntry,"clone",[]);null!=this.next&&(a.next=this.next.clone());return a});e(c$,"setValue",function(a){if(null==a)throw new NullPointerException;
var b=this.value;this.value=a;return b},"~O");c(c$,"getKeyHash",function(){return this.key.hashCode()});c(c$,"equalsKey",function(a){return this.hashcode==(!a.hashCode||a.hashCode())&&this.key.equals(a)},"~O,~N");e(c$,"toString",function(){return this.key+"="+this.value})});s("java.util.Dictionary $.Enumeration $.HashtableEnumerator $.Iterator $.Map $.MapEntry $.NoSuchElementException".split(" "),"java.util.Hashtable","java.lang.IllegalArgumentException $.IllegalStateException $.NullPointerException $.StringBuilder java.util.AbstractCollection $.AbstractSet $.Arrays $.Collections $.ConcurrentModificationException java.util.MapEntry.Type java.util.HashtableEntry".split(" "),
function(){c$=q(function(){this.elementCount=0;this.elementData=null;this.firstSlot=this.threshold=this.loadFactor=0;this.lastSlot=-1;this.modCount=0;n(this,arguments)},java.util,"Hashtable",java.util.Dictionary,[java.util.Map,Cloneable,java.io.Serializable]);c$.newEntry=c(c$,"newEntry",($fz=function(a,b){return new java.util.HashtableEntry(a,b)},$fz.isPrivate=!0,$fz),"~O,~O,~N");S(c$,function(){this.elementCount=0;this.elementData=this.newElementArray(11);this.firstSlot=this.elementData.length;this.loadFactor=
0.75;this.computeMaxSize()});c(c$,"newElementArray",($fz=function(a){return Array(a)},$fz.isPrivate=!0,$fz),"~N");e(c$,"clear",function(){this.elementCount=0;for(var a=this.elementData.length;0<=--a;)this.elementData[a]=null;this.modCount++});c(c$,"clone",function(){try{var a=Q(this,java.util.Hashtable,"clone",[]);a.elementData=Array(this.elementData.length);for(var b=this.elementData.length;0<=--b;)null!=this.elementData[b]&&(a.elementData[b]=this.elementData[b].clone());return a}catch(d){if(w(d,
CloneNotSupportedException))return null;throw d;}});c(c$,"computeMaxSize",($fz=function(){this.threshold=Math.round(this.elementData.length*this.loadFactor)},$fz.isPrivate=!0,$fz));c(c$,"contains",function(a){if(null==a)throw new NullPointerException;for(var b=this.elementData.length;0<=--b;)for(var d=this.elementData[b];d;){if(a.equals(d.value))return!0;d=d.next}return!1},"~O");e(c$,"containsKey",function(a){a.hashCode||(a.hashCode=function(){return 1},a.equals||(a.equals=function(a){return this==
a}));return null!=this.getEntry(a)},"~O");e(c$,"containsValue",function(a){return this.contains(a)},"~O");e(c$,"elements",function(){return 0==this.elementCount?java.util.Hashtable.EMPTY_ENUMERATION:new java.util.HashtableEnumerator(!1,this)});e(c$,"entrySet",function(){return new java.util.HashtableEntrySet(this)});e(c$,"equals",function(a){if(this===a)return!0;if(w(a,java.util.Map)){if(this.size()!=a.size())return!1;var b=this.entrySet(),d;for(a=a.entrySet().iterator();a.hasNext()&&((d=a.next())||
1);)if(!b.contains(d))return!1;return!0}return!1},"~O");e(c$,"get",function(a){a.hashCode||(a.hashCode=function(){return 1},a.equals||(a.equals=function(a){return this==a}));for(var b=a.hashCode(),d=this.elementData[(b&2147483647)%this.elementData.length];d;){if(d.equalsKey(a,b))return d.value;d=d.next}return null},"~O");c(c$,"getEntry",function(a){for(var b=a.hashCode(),d=this.elementData[(b&2147483647)%this.elementData.length];d;){if(d.equalsKey(a,b))return d;d=d.next}return null},"~O");e(c$,"hashCode",
function(){for(var a=0,b=this.entrySet().iterator();b.hasNext();)var d=b.next(),g=d.getKey(),d=d.getValue(),g=(g!==this?g.hashCode():0)^(d!==this?null!=d?d.hashCode():0:0),a=a+g;return a});e(c$,"isEmpty",function(){return 0==this.elementCount});e(c$,"keys",function(){return 0==this.elementCount?java.util.Hashtable.EMPTY_ENUMERATION:new java.util.HashtableEnumerator(!0,this)});e(c$,"keySet",function(){return new java.util.HashtableKeySet(this)});e(c$,"put",function(a,b){if(null!=a&&null!=b){a.hashCode||
(a.hashCode=function(){return 1},a.equals||(a.equals=function(a){return this==a}));for(var d=a.hashCode(),g=(d&2147483647)%this.elementData.length,c=this.elementData[g];null!=c&&!c.equalsKey(a,d);)c=c.next;if(null==c)return this.modCount++,++this.elementCount>this.threshold&&(this.rehash(),g=(d&2147483647)%this.elementData.length),g<this.firstSlot&&(this.firstSlot=g),g>this.lastSlot&&(this.lastSlot=g),c=java.util.Hashtable.newEntry(a,b,d),c.next=this.elementData[g],this.elementData[g]=c,null;d=c.value;
c.value=b;return d}throw new NullPointerException;},"~O,~O");e(c$,"putAll",function(a){var b;for(a=a.entrySet().iterator();a.hasNext()&&((b=a.next())||1);)this.put(b.getKey(),b.getValue())},"java.util.Map");c(c$,"rehash",function(){var a=(this.elementData.length<<1)+1;0==a&&(a=1);for(var b=a,d=-1,g=this.newElementArray(a),c=this.lastSlot+1;--c>=this.firstSlot;)for(var h=this.elementData[c];null!=h;){var e=(h.getKeyHash()&2147483647)%a;e<b&&(b=e);e>d&&(d=e);var j=h.next;h.next=g[e];g[e]=h;h=j}this.firstSlot=
b;this.lastSlot=d;this.elementData=g;this.computeMaxSize()});e(c$,"remove",function(a){for(var b=a.hashCode(),d=(b&2147483647)%this.elementData.length,g=null,c=this.elementData[d];null!=c&&!c.equalsKey(a,b);)g=c,c=c.next;return null!=c?(this.modCount++,null==g?this.elementData[d]=c.next:g.next=c.next,this.elementCount--,a=c.value,c.value=null,a):null},"~O");e(c$,"size",function(){return this.elementCount});e(c$,"toString",function(){if(this.isEmpty())return"{}";var a=new StringBuilder(28*this.size());
a.append("{");for(var b=this.lastSlot;b>=this.firstSlot;b--)for(var d=this.elementData[b];null!=d;)d.key!==this?a.append(d.key):a.append("(this Map)"),a.append("="),d.value!==this?a.append(d.value):a.append("(this Map)"),a.append(", "),d=d.next;0<this.elementCount&&a.setLength(a.length()-2);a.append("}");return a.toString()});e(c$,"values",function(){return new java.util.HashtableValueCollection(this)});java.util.Hashtable.EMPTY_ENUMERATION=new java.util.HashtableEnumerator});s(["java.util.Map"],
"java.util.MapEntry",null,function(){c$=q(function(){this.value=this.key=null;n(this,arguments)},java.util,"MapEntry",null,[java.util.Map.Entry,Cloneable]);m(c$,function(a){this.key=a},"~O");m(c$,function(a,b){this.key=a;this.value=b},"~O,~O");c(c$,"clone",function(){try{return Q(this,java.util.MapEntry,"clone",[])}catch(a){if(w(a,CloneNotSupportedException))return null;throw a;}});e(c$,"equals",function(a){return this===a?!0:w(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(c$,"getKey",function(){return this.key});e(c$,"getValue",function(){return this.value});e(c$,"hashCode",function(){return(null==this.key?0:this.key.hashCode())^(null==this.value?0:this.value.hashCode())});e(c$,"setValue",function(a){var b=this.value;this.value=a;return b},"~O");e(c$,"toString",function(){return this.key+"="+this.value});C(java.util.MapEntry,"Type")});s(["java.util.Hashtable"],"java.util.Properties",
["java.lang.NullPointerException","$.StringBuffer"],function(){c$=q(function(){this.defaults=this.builder=null;n(this,arguments)},java.util,"Properties",java.util.Hashtable);m(c$,function(a){y(this,java.util.Properties,[]);this.defaults=a},"java.util.Properties");c(c$,"dumpString",($fz=function(a,b,d){var g=0;!d&&(g<b.length&&32==b.charAt(g).charCodeAt(0))&&(a.append("\\ "),g++);for(;g<b.length;g++){var c=b.charAt(g);switch(c){case "\t":a.append("\\t");break;case "\n":a.append("\\n");break;case "\f":a.append("\\f");
break;case "\r":a.append("\\r");break;default:(0<="\\#!=:".indexOf(c)||d&&32==c.charCodeAt(0))&&a.append("\\");if(!(32<=c.charCodeAt(0)&&126>=c.charCodeAt(0))){c=Integer.toHexString(c.charCodeAt(0));a.append("\\u");for(var h=0;h<4-c.length;h++)a.append("0")}a.append(c)}}},$fz.isPrivate=!0,$fz),"StringBuilder,~S,~B");c(c$,"getProperty",function(a){var b=this.get(a),b=w(b,String)?b:null;null==b&&null!=this.defaults&&(b=this.defaults.getProperty(a));return b},"~S");c(c$,"getProperty",function(a,b){var d=
this.get(a),d=w(d,String)?d:null;null==d&&null!=this.defaults&&(d=this.defaults.getProperty(a));return null==d?b:d},"~S,~S");c(c$,"list",function(a){if(null==a)throw new NullPointerException;for(var b=new StringBuffer(80),d=this.propertyNames();d.hasMoreElements();){var g=d.nextElement();b.append(g);b.append("=");for(var c=this.get(g),h=this.defaults;null==c;)c=h.get(g),h=h.defaults;40<c.length?(b.append(c.substring(0,37)),b.append("...")):b.append(c);a.println(b.toString());b.setLength(0)}},"java.io.PrintStream");
c(c$,"list",function(a){if(null==a)throw new NullPointerException;for(var b=new StringBuffer(80),d=this.propertyNames();d.hasMoreElements();){var g=d.nextElement();b.append(g);b.append("=");for(var c=this.get(g),h=this.defaults;null==c;)c=h.get(g),h=h.defaults;40<c.length?(b.append(c.substring(0,37)),b.append("...")):b.append(c);a.println(b.toString());b.setLength(0)}},"java.io.PrintWriter");c(c$,"load",function(){},"java.io.InputStream");c(c$,"propertyNames",function(){if(null==this.defaults)return this.keys();
for(var a=new java.util.Hashtable(this.defaults.size()+this.size()),b=this.defaults.propertyNames();b.hasMoreElements();)a.put(b.nextElement(),a);for(b=this.keys();b.hasMoreElements();)a.put(b.nextElement(),a);return a.keys()});c(c$,"save",function(a,b){try{this.store(a,b)}catch(d){if(!w(d,java.io.IOException))throw d;}},"java.io.OutputStream,~S");c(c$,"setProperty",function(a,b){return this.put(a,b)},"~S,~S");c(c$,"store",function(){},"java.io.OutputStream,~S");c(c$,"loadFromXML",function(){},"java.io.InputStream");
c(c$,"storeToXML",function(){},"java.io.OutputStream,~S");c(c$,"storeToXML",function(){},"java.io.OutputStream,~S,~S");c(c$,"substitutePredefinedEntries",($fz=function(a){return a.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll("'","&apos;").replaceAll('"',"&quot;")},$fz.isPrivate=!0,$fz),"~S");D(c$,"PROP_DTD_NAME","http://java.sun.com/dtd/properties.dtd","PROP_DTD",'<?xml version="1.0" encoding="UTF-8"?>    <!ELEMENT properties (comment?, entry*) >    <!ATTLIST properties version CDATA #FIXED "1.0" >    <!ELEMENT comment (#PCDATA) >    <!ELEMENT entry (#PCDATA) >    <!ATTLIST entry key CDATA #REQUIRED >',
"NONE",0,"SLASH",1,"UNICODE",2,"CONTINUE",3,"KEY_DONE",4,"IGNORE",5,"lineSeparator",null)});s(["java.util.Map"],"java.util.SortedMap",null,function(){C(java.util,"SortedMap",java.util.Map)});s(["java.util.Set"],"java.util.SortedSet",null,function(){C(java.util,"SortedSet",java.util.Set)});s(["java.util.Enumeration"],"java.util.StringTokenizer",["java.lang.NullPointerException","java.util.NoSuchElementException"],function(){c$=q(function(){this.delimiters=this.string=null;this.returnDelimiters=!1;
this.position=0;n(this,arguments)},java.util,"StringTokenizer",null,java.util.Enumeration);m(c$,function(a){this.construct(a," \t\n\r\f",!1)},"~S");m(c$,function(a,b){this.construct(a,b,!1)},"~S,~S");m(c$,function(a,b,d){if(null!=a)this.string=a,this.delimiters=b,this.returnDelimiters=d,this.position=0;else throw new NullPointerException;},"~S,~S,~B");c(c$,"countTokens",function(){for(var a=0,b=!1,d=this.position,g=this.string.length;d<g;d++)0<=this.delimiters.indexOf(this.string.charAt(d),0)?(this.returnDelimiters&&
a++,b&&(a++,b=!1)):b=!0;b&&a++;return a});e(c$,"hasMoreElements",function(){return this.hasMoreTokens()});c(c$,"hasMoreTokens",function(){var a=this.string.length;if(this.position<a){if(this.returnDelimiters)return!0;for(var b=this.position;b<a;b++)if(-1==this.delimiters.indexOf(this.string.charAt(b),0))return!0}return!1});e(c$,"nextElement",function(){return this.nextToken()});c(c$,"nextToken",function(){var a=this.position,b=this.string.length;if(a<b){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<b;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<b&&0<=this.delimiters.indexOf(this.string.charAt(a),0);)a++;this.position=a;if(a<b){for(this.position++;this.position<b;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;});c(c$,"nextToken",function(a){this.delimiters=a;return this.nextToken()},"~S")});r("javajs.api");C(javajs.api,"BytePoster");r("javajs.api");C(javajs.api,"GenericColor");r("J.api");C(J.api,"GenericFileInterface");r("javajs.api");C(javajs.api,"GenericOutputChannel");r("javajs.api");C(javajs.api,"JSInterface");r("javajs.api");C(javajs.api,"JSONEncodable");r("javajs.api");C(javajs.api,"ZInputStream");r("javajs.api.js");C(javajs.api.js,
"J2SObjectInterface");r("J.api");C(J.api,"GenericMouseInterface");r("J.api");s(["J.api.FontManager"],"J.api.GenericPlatform",null,function(){c$=C(J.api,"GenericPlatform",J.api.FontManager);D(c$,"CURSOR_DEFAULT",0,"CURSOR_CROSSHAIR",1,"CURSOR_WAIT",3,"CURSOR_ZOOM",8,"CURSOR_HAND",12,"CURSOR_MOVE",13)});r("J.api");C(J.api,"PlatformViewer");r("J.api");C(J.api,"EventManager");r("J.api");C(J.api,"FontManager");r("JU");s(null,"JU.Font",["JU.AU"],function(){c$=q(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;n(this,arguments)},JU,"Font");m(c$,function(a,b,d,g,c,h,e){this.manager=a;this.fid=b;this.fontFace=JU.Font.fontFaces[d];this.fontStyle=JU.Font.fontStyles[g];this.idFontFace=d;this.idFontStyle=g;this.fontSize=c;this.isBold=1==(g&1);this.isItalic=2==(g&2);this.fontSizeNominal=h;this.font=a.newFont(JU.Font.fontFaces[d],this.isBold,
this.isItalic,c);this.fontMetrics=a.getFontMetrics(this,e);this.descent=a.getFontDescent(this.fontMetrics);this.ascent=a.getFontAscent(this.fontMetrics)},"J.api.FontManager,~N,~N,~N,~N,~N,~O");c$.getFont3D=c(c$,"getFont3D",function(a){return JU.Font.font3ds[a]},"~N");c$.createFont3D=c(c$,"createFont3D",function(a,b,d,g,c,h){255<d&&(d=255);for(var e=I(d)<<4,e=a&3|(b&3)<<2|e<<4,j=JU.Font.fontkeyCount;0<--j;)if(e==JU.Font.fontkeys[j]&&JU.Font.font3ds[j].fontSizeNominal==g)return JU.Font.font3ds[j];j=
JU.Font.fontkeyCount++;j==JU.Font.fontkeys.length&&(JU.Font.fontkeys=JU.AU.arrayCopyI(JU.Font.fontkeys,j+8),JU.Font.font3ds=JU.AU.arrayCopyObject(JU.Font.font3ds,j+8));a=new JU.Font(c,j,a,b,d,g,h);JU.Font.font3ds[j]=a;JU.Font.fontkeys[j]=e;return a},"~N,~N,~N,~N,J.api.FontManager,~O");c$.getFontFaceID=c(c$,"getFontFaceID",function(a){return"Monospaced".equalsIgnoreCase(a)?2:"Serif".equalsIgnoreCase(a)?1:0},"~S");c$.getFontStyleID=c(c$,"getFontStyleID",function(a){for(var b=4;0<=--b;)if(JU.Font.fontStyles[b].equalsIgnoreCase(a))return b;
return-1},"~S");c(c$,"getAscent",function(){return this.ascent});c(c$,"getDescent",function(){return this.descent});c(c$,"getHeight",function(){return this.getAscent()+this.getDescent()});c(c$,"getFontMetrics",function(){return this.fontMetrics});c(c$,"stringWidth",function(a){return this.manager.fontStringWidth(this,a)},"~S");c(c$,"getInfo",function(){return this.fontSizeNominal+" "+this.fontFace+" "+this.fontStyle});e(c$,"toString",function(){return"["+this.getInfo()+"]"});D(c$,"FONT_ALLOCATION_UNIT",
8,"fontkeyCount",1,"fontkeys",E(8,0));c$.font3ds=c$.prototype.font3ds=Array(8);D(c$,"FONT_FACE_SANS",0,"FONT_FACE_SERIF",1,"FONT_FACE_MONO",2,"fontFaces",x(-1,["SansSerif","Serif","Monospaced",""]),"FONT_STYLE_PLAIN",0,"FONT_STYLE_BOLD",1,"FONT_STYLE_ITALIC",2,"FONT_STYLE_BOLDITALIC",3,"fontStyles",x(-1,["Plain","Bold","Italic","BoldItalic"]))});r("JS");s(["javajs.api.GenericColor"],"JS.Color",null,function(){c$=q(function(){this.argb=0;n(this,arguments)},JS,"Color",null,javajs.api.GenericColor);
e(c$,"getRGB",function(){return this.argb&16777215});e(c$,"getOpacity255",function(){return this.argb>>24&255});e(c$,"setOpacity255",function(a){this.argb=this.argb&16777215|(a&255)<<24},"~N");c$.get1=c(c$,"get1",function(a){var b=new JS.Color;b.argb=a|4278190080;return b},"~N");c$.get3=c(c$,"get3",function(a,b,d){return(new JS.Color).set4(a,b,d,255)},"~N,~N,~N");c$.get4=c(c$,"get4",function(a,b,d,g){return(new JS.Color).set4(a,b,d,g)},"~N,~N,~N,~N");c(c$,"set4",function(a,b,d,g){this.argb=(g<<24|
a<<16|b<<8|d)&4294967295;return this},"~N,~N,~N,~N");e(c$,"toString",function(){var a="00000000"+Integer.toHexString(this.argb);return"[0x"+a.substring(a.length-8,a.length)+"]"})});r("JS");c$=q(function(){this.height=this.width=0;n(this,arguments)},JS,"Dimension");m(c$,function(a,b){this.set(a,b)},"~N,~N");c(c$,"set",function(a,b){this.width=a;this.height=b;return this},"~N,~N");r("J.awtjs");c$=t(J.awtjs,"Event");D(c$,"MOUSE_LEFT",16,"MOUSE_MIDDLE",8,"MOUSE_RIGHT",4,"MOUSE_WHEEL",32,"MAC_COMMAND",
20,"BUTTON_MASK",28,"MOUSE_DOWN",501,"MOUSE_UP",502,"MOUSE_MOVE",503,"MOUSE_ENTER",504,"MOUSE_EXIT",505,"MOUSE_DRAG",506,"SHIFT_MASK",1,"ALT_MASK",8,"CTRL_MASK",2,"CTRL_ALT",10,"CTRL_SHIFT",3,"META_MASK",4,"VK_SHIFT",16,"VK_ALT",18,"VK_CONTROL",17,"VK_META",157,"VK_LEFT",37,"VK_RIGHT",39,"VK_PERIOD",46,"VK_SPACE",32,"VK_DOWN",40,"VK_UP",38,"VK_ESCAPE",27,"VK_DELETE",127,"VK_BACK_SPACE",8,"VK_PAGE_DOWN",34,"VK_PAGE_UP",33,"MOVED",0,"DRAGGED",1,"CLICKED",2,"WHEELED",3,"PRESSED",4,"RELEASED",5);r("J.api");
C(J.api,"GenericMenuInterface");r("JU");s(["javajs.api.JSONEncodable"],"JU.A4",["JU.T3"],function(){c$=q(function(){this.angle=this.z=this.y=this.x=0;n(this,arguments)},JU,"A4",null,[javajs.api.JSONEncodable,java.io.Serializable]);m(c$,function(){this.z=1});c$.new4=c(c$,"new4",function(a,b,d,g){var c=new JU.A4;c.set4(a,b,d,g);return c},"~N,~N,~N,~N");c$.newAA=c(c$,"newAA",function(a){var b=new JU.A4;b.set4(a.x,a.y,a.z,a.angle);return b},"JU.A4");c$.newVA=c(c$,"newVA",function(a,b){var d=new JU.A4;
d.setVA(a,b);return d},"JU.V3,~N");c(c$,"setVA",function(a,b){this.x=a.x;this.y=a.y;this.z=a.z;this.angle=b},"JU.V3,~N");c(c$,"set4",function(a,b,d,c){this.x=a;this.y=b;this.z=d;this.angle=c},"~N,~N,~N,~N");c(c$,"setAA",function(a){this.x=a.x;this.y=a.y;this.z=a.z;this.angle=a.angle},"JU.A4");c(c$,"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(c$,"setFromMat",function(a,b,d,c,f,h,e,j,l){a=0.5*(a+f+l-1);this.x=j-h;this.y=d-e;this.z=c-b;b=0.5*Math.sqrt(this.x*
this.x+this.y*this.y+this.z*this.z);0==b&&1==a?(this.x=this.y=0,this.z=1,this.angle=0):this.angle=Math.atan2(b,a)},"~N,~N,~N,~N,~N,~N,~N,~N,~N");e(c$,"hashCode",function(){return JU.T3.floatToIntBits(this.x)^JU.T3.floatToIntBits(this.y)^JU.T3.floatToIntBits(this.z)^JU.T3.floatToIntBits(this.angle)});e(c$,"equals",function(a){return!w(a,JU.A4)?!1:this.x==a.x&&this.y==a.y&&this.z==a.z&&this.angle==a.angle},"~O");e(c$,"toString",function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.angle+")"});
e(c$,"toJSON",function(){return"["+this.x+","+this.y+","+this.z+","+180*this.angle/3.141592653589793+"]"})});r("JU");s(["java.net.URLConnection"],"JU.AjaxURLConnection",["JU.AU","$.Rdr","$.SB"],function(){c$=q(function(){this.bytesOut=null;this.postOut="";n(this,arguments)},JU,"AjaxURLConnection",java.net.URLConnection);c(c$,"doAjax",function(){var a=null,a=Jmol;return a.doAjax(this.url,this.postOut,this.bytesOut,!1)});e(c$,"connect",function(){});c(c$,"outputBytes",function(a){this.bytesOut=a},"~A");
c(c$,"outputString",function(a){this.postOut=a},"~S");e(c$,"getInputStream",function(){var a=null,b=this.doAjax();JU.AU.isAB(b)?a=JU.Rdr.getBIS(b):w(b,JU.SB)?a=JU.Rdr.getBIS(JU.Rdr.getBytesFromSB(b)):w(b,String)&&(a=JU.Rdr.getBIS(b.getBytes()));return a});c(c$,"getContents",function(){return this.doAjax()})});r("JU");s(["java.net.URLStreamHandler"],"JU.AjaxURLStreamHandler",["JU.AjaxURLConnection","$.SB"],function(){c$=q(function(){this.protocol=null;n(this,arguments)},JU,"AjaxURLStreamHandler",java.net.URLStreamHandler);
m(c$,function(a){y(this,JU.AjaxURLStreamHandler,[]);this.protocol=a},"~S");e(c$,"openConnection",function(a){return new JU.AjaxURLConnection(a)},"java.net.URL");e(c$,"toExternalForm",function(a){var b=new JU.SB;b.append(a.getProtocol());b.append(":");null!=a.getAuthority()&&0<a.getAuthority().length&&(b.append("//"),b.append(a.getAuthority()));null!=a.getPath()&&b.append(a.getPath());null!=a.getQuery()&&(b.append("?"),b.append(a.getQuery()));null!=a.getRef()&&(b.append("#"),b.append(a.getRef()));
return b.toString()},"java.net.URL")});r("JU");s(["java.net.URLStreamHandlerFactory","java.util.Hashtable"],"JU.AjaxURLStreamHandlerFactory",["JU.AjaxURLStreamHandler"],function(){c$=q(function(){this.htFactories=null;n(this,arguments)},JU,"AjaxURLStreamHandlerFactory",null,java.net.URLStreamHandlerFactory);H(c$,function(){this.htFactories=new java.util.Hashtable});e(c$,"createURLStreamHandler",function(a){var b=this.htFactories.get(a);null==b&&this.htFactories.put(a,b=new JU.AjaxURLStreamHandler(a));
return null==b.protocol?null:b},"~S")});r("JU");s(null,"JU.AU",["java.lang.reflect.Array","java.util.Arrays","JU.Lst"],function(){c$=t(JU,"AU");c$.ensureLength=c(c$,"ensureLength",function(a,b){return null!=a&&JU.AU.getLength(a)>=b?a:JU.AU.arrayCopyObject(a,b)},"~O,~N");c$.ensureLengthS=c(c$,"ensureLengthS",function(a,b){return null!=a&&a.length>=b?a:JU.AU.arrayCopyS(a,b)},"~A,~N");c$.ensureLengthA=c(c$,"ensureLengthA",function(a,b){return null!=a&&a.length>=b?a:JU.AU.arrayCopyF(a,b)},"~A,~N");c$.ensureLengthI=
c(c$,"ensureLengthI",function(a,b){return null!=a&&a.length>=b?a:JU.AU.arrayCopyI(a,b)},"~A,~N");c$.ensureLengthShort=c(c$,"ensureLengthShort",function(a,b){return null!=a&&a.length>=b?a:JU.AU.arrayCopyShort(a,b)},"~A,~N");c$.ensureLengthByte=c(c$,"ensureLengthByte",function(a,b){return null!=a&&a.length>=b?a:JU.AU.arrayCopyByte(a,b)},"~A,~N");c$.doubleLength=c(c$,"doubleLength",function(a){return JU.AU.arrayCopyObject(a,null==a?16:2*JU.AU.getLength(a))},"~O");c$.doubleLengthS=c(c$,"doubleLengthS",
function(a){return JU.AU.arrayCopyS(a,null==a?16:2*a.length)},"~A");c$.doubleLengthF=c(c$,"doubleLengthF",function(a){return JU.AU.arrayCopyF(a,null==a?16:2*a.length)},"~A");c$.doubleLengthI=c(c$,"doubleLengthI",function(a){return JU.AU.arrayCopyI(a,null==a?16:2*a.length)},"~A");c$.doubleLengthShort=c(c$,"doubleLengthShort",function(a){return JU.AU.arrayCopyShort(a,null==a?16:2*a.length)},"~A");c$.doubleLengthByte=c(c$,"doubleLengthByte",function(a){return JU.AU.arrayCopyByte(a,null==a?16:2*a.length)},
"~A");c$.doubleLengthBool=c(c$,"doubleLengthBool",function(a){return JU.AU.arrayCopyBool(a,null==a?16:2*a.length)},"~A");c$.deleteElements=c(c$,"deleteElements",function(a,b,d){if(0==d||null==a)return a;var c=JU.AU.getLength(a);if(b>=c)return a;c-=b+d;0>c&&(c=0);var f=JU.AU.newInstanceO(a,b+c);0<b&&System.arraycopy(a,0,f,0,b);0<c&&System.arraycopy(a,b+d,f,b,c);return f},"~O,~N,~N");c$.arrayCopyObject=c(c$,"arrayCopyObject",function(a,b){var d=null==a?-1:JU.AU.getLength(a);0>b&&(b=d);if(b==d)return a;
if(b<d)return x(-1,a,0,b);var c=JU.AU.newInstanceO(a,b);0<d&&System.arraycopy(a,0,c,0,d<b?d:b);return c},"~O,~N");c$.newInstanceO=c(c$,"newInstanceO",function(a,b){return JU.AU.isAI(a)?E(b,0):!a.getClass||!a.getClass().getComponentType?Array(b):java.lang.reflect.Array.newInstance(a.getClass().getComponentType(),b)},"~O,~N");c$.getLength=c(c$,"getLength",function(a){return a.length},"~O");c$.arrayCopyS=c(c$,"arrayCopyS",function(a,b){var d=null==a?-1:a.length;0>b&&(b=d);if(b<d)return x(-1,a,0,b);var c=
Array(b);null!=a&&System.arraycopy(a,0,c,0,d<b?d:b);return c},"~A,~N");c$.arrayCopyII=c(c$,"arrayCopyII",function(a,b){var d=JU.AU.newInt2(b);if(null!=a){var c=a.length;System.arraycopy(a,0,d,0,c<b?c:b)}return d},"~A,~N");c$.arrayCopyPt=c(c$,"arrayCopyPt",function(a,b){0>b&&(b=a.length);var d=Array(b);if(null!=a){var c=a.length;System.arraycopy(a,0,d,0,c<b?c:b)}return d},"~A,~N");c$.arrayCopyF=c(c$,"arrayCopyF",function(a,b){var d=null==a?-1:a.length;0>b&&(b=d);if(b<d)return x(-1,a,0,b);var c=U(b,
0);null!=a&&System.arraycopy(a,0,c,0,d<b?d:b);return c},"~A,~N");c$.arrayCopyI=c(c$,"arrayCopyI",function(a,b){var d=null==a?-1:a.length;0>b&&(b=d);if(b<d)return x(-1,a,0,b);var c=E(b,0);null!=a&&System.arraycopy(a,0,c,0,d<b?d:b);return c},"~A,~N");c$.arrayCopyRangeI=c(c$,"arrayCopyRangeI",function(a,b,d){if(null==a)return null;var c=a.length;-1==d&&(d=c);-2==d&&(d=v(c/2));return x(-1,a,b,d)},"~A,~N,~N");c$.arrayCopyRangeRevI=c(c$,"arrayCopyRangeRevI",function(a,b,d){return null==a?null:x(-1,a,b,
d).reverse()},"~A,~N,~N");c$.arrayCopyShort=c(c$,"arrayCopyShort",function(a,b){var d=null==a?-1:a.length;0>b&&(b=d);if(b<d)return x(-1,a,0,b);var c=ra(b,0);null!=a&&System.arraycopy(a,0,c,0,d<b?d:b);return c},"~A,~N");c$.arrayCopyByte=c(c$,"arrayCopyByte",function(a,b){var d=null==a?-1:a.length;0>b&&(b=d);if(b<d)return x(-1,a,0,b);var c=K(b,0);null!=a&&System.arraycopy(a,0,c,0,d<b?d:b);return c},"~A,~N");c$.arrayCopyBool=c(c$,"arrayCopyBool",function(a,b){var d=null==a?-1:a.length;0>b&&(b=d);if(b<
d)return x(-1,a,0,b);var c=fa(b,!1);null!=a&&System.arraycopy(a,0,c,0,d<b?d:b);return c},"~A,~N");c$.swapInt=c(c$,"swapInt",function(a,b,d){var c=a[b];a[b]=a[d];a[d]=c},"~A,~N,~N");c$.dumpArray=c(c$,"dumpArray",function(a,b,d,c,f,h){a="dumpArray: "+a+"\n";for(var e=d;e<=c;e++)a+="\t*"+e+"*";for(;h>=f;h--){a+="\n*"+h+"*";for(e=d;e<=c;e++)a+="\t"+(e<b.length&&h<b[e].length?b[e][h]:NaN)}return a},"~S,~A,~N,~N,~N,~N");c$.dumpIntArray=c(c$,"dumpIntArray",function(a,b){for(var d="",c=0;c<b;c++)d+=" "+a[c];
return d},"~A,~N");c$.sortedItem=c(c$,"sortedItem",function(a,b){if(0==a.size())return null;if(1==a.size())return a.get(0);var d=a.toArray(Array(a.size()));java.util.Arrays.sort(d);return d[b%d.length]},"JU.Lst,~N");c$.createArrayOfArrayList=c(c$,"createArrayOfArrayList",function(a){return Array(a)},"~N");c$.createArrayOfHashtable=c(c$,"createArrayOfHashtable",function(a){return Array(a)},"~N");c$.swap=c(c$,"swap",function(a,b,d){var c=a[b];a[b]=a[d];a[d]=c},"~A,~N,~N");c$.newFloat2=c(c$,"newFloat2",
function(a){return x(a,null)},"~N");c$.newInt2=c(c$,"newInt2",function(a){return x(a,null)},"~N");c$.newInt3=c(c$,"newInt3",function(a){return x(a,null)},"~N,~N");c$.newFloat3=c(c$,"newFloat3",function(a){return x(a,null)},"~N,~N");c$.newInt4=c(c$,"newInt4",function(a){return x(a,null)},"~N");c$.newShort2=c(c$,"newShort2",function(a){return x(a,null)},"~N");c$.newByte2=c(c$,"newByte2",function(a){return x(a,null)},"~N");c$.newDouble2=c(c$,"newDouble2",function(a){return x(a,null)},"~N");c$.newDouble3n=
c(c$,"newDouble3n",function(a){return N(a,0)},"~N");c$.removeMapKeys=c(c$,"removeMapKeys",function(a,b){for(var d=new JU.Lst,c,f=a.keySet().iterator();f.hasNext()&&((c=f.next())||1);)c.startsWith(b)&&d.addLast(c);for(c=d.size();0<=--c;)a.remove(d.get(c));return d.size()},"java.util.Map,~S");c$.isAS=c(c$,"isAS",function(a){return wa(a)},"~O");c$.isASS=c(c$,"isASS",function(a){return xa(a)},"~O");c$.isAP=c(c$,"isAP",function(a){return ya(a)},"~O");c$.isAF=c(c$,"isAF",function(a){return ha(a)},"~O");
c$.isAFloat=c(c$,"isAFloat",function(a){return za(a)},"~O");c$.isAD=c(c$,"isAD",function(a){return ha(a)},"~O");c$.isADD=c(c$,"isADD",function(a){return ia(a)},"~O");c$.isADDD=c(c$,"isADDD",function(a){return ja(a)},"~O");c$.isAB=c(c$,"isAB",function(a){return ua(a)},"~O");c$.isAI=c(c$,"isAI",function(a){return va(a)},"~O");c$.isAII=c(c$,"isAII",function(a){return Aa(a)},"~O");c$.isAFF=c(c$,"isAFF",function(a){return ia(a)},"~O");c$.isAFFF=c(c$,"isAFFF",function(a){return ja(a)},"~O");c$.ensureSignedBytes=
c(c$,"ensureSignedBytes",function(a){if(null!=a)for(var b=a.length;0<=--b;){var d=a[b]&255;128<=d&&(d-=256);a[b]=d}return a},"~A")});r("JU");s(null,"JU.Base64",["JU.SB"],function(){c$=t(JU,"Base64");c$.getBytes64=c(c$,"getBytes64",function(a){return JU.Base64.getBase64(a).toBytes(0,-1)},"~A");c$.getBase64=c(c$,"getBase64",function(a){var b=a.length,d=new JU.SB;if(0==b)return d;for(var c=0,f=0;c<b&&0==f;){0==c%75&&0!=c&&d.append("\r\n");var f=c+2==b?1:c+1==b?2:0,h=a[c++]<<16&16711680|(2==f?0:a[c++]<<
8)&65280|(1<=f?0:a[c++])&255;d.appendC(JU.Base64.base64.charAt(h>>18&63));d.appendC(JU.Base64.base64.charAt(h>>12&63));d.appendC(2==f?"=":JU.Base64.base64.charAt(h>>6&63));d.appendC(1<=f?"=":JU.Base64.base64.charAt(h&63))}return d},"~A");c$.decodeBase64=c(c$,"decodeBase64",function(a){var b=0,d,c=a.indexOf(";base64,")+1;0<c&&(c+=7);a=a.toCharArray();var f=a.length;if(0==f)return K(0,0);for(var h=f;--h>=c;)b+=65==(d=a[h].charCodeAt(0)&127)||0<JU.Base64.decode64[d]?3:0;for(var b=b>>2,e=K(b,0),j=18,
h=c,l=c=0;h<f;h++)if(0<JU.Base64.decode64[d=a[h].charCodeAt(0)&127]||65==d||61==d)l|=JU.Base64.decode64[d]<<j,j-=6,0>j&&(e[c++]=(l&16711680)>>16,c<b&&(e[c++]=(l&65280)>>8),c<b&&(e[c++]=l&255),j=18,l=0);return e},"~S");D(c$,"base64","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/","decode64",E(-1,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,0,62,0,63,52,53,54,55,56,57,58,59,60,61,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,
18,19,20,21,22,23,24,25,0,0,0,0,63,0,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,0,0,0,0,0]))});r("JU");s(["javajs.api.JSONEncodable"],"JU.BS",["java.lang.IndexOutOfBoundsException","$.NegativeArraySizeException","JU.PT","$.SB"],function(){c$=q(function(){this.words=null;this.wordsInUse=0;this.sizeIsSticky=!1;n(this,arguments)},JU,"BS",null,[Cloneable,javajs.api.JSONEncodable]);c$.wordIndex=c(c$,"wordIndex",function(a){return a>>5},"~N");c(c$,"recalculateWordsInUse",
function(){var a;for(a=this.wordsInUse-1;0<=a&&0==this.words[a];a--);this.wordsInUse=a+1});m(c$,function(){this.initWords(32);this.sizeIsSticky=!1});c$.newN=c(c$,"newN",function(a){var b=new JU.BS;b.init(a);return b},"~N");c(c$,"init",function(a){if(0>a)throw new NegativeArraySizeException("nbits < 0: "+a);this.initWords(a);this.sizeIsSticky=!0},"~N");c(c$,"initWords",function(a){this.words=E(JU.BS.wordIndex(a-1)+1,0)},"~N");c(c$,"ensureCapacity",function(a){this.words.length<a&&(a=Math.max(2*this.words.length,
a),this.setLength(a),this.sizeIsSticky=!1)},"~N");c(c$,"expandTo",function(a){a+=1;this.wordsInUse<a&&(this.ensureCapacity(a),this.wordsInUse=a)},"~N");c(c$,"set",function(a){if(0>a)throw new IndexOutOfBoundsException("bitIndex < 0: "+a);var b=JU.BS.wordIndex(a);this.expandTo(b);this.words[b]|=1<<a},"~N");c(c$,"setBitTo",function(a,b){b?this.set(a):this.clear(a)},"~N,~B");c(c$,"setBits",function(a,b){if(a!=b){var d=JU.BS.wordIndex(a),c=JU.BS.wordIndex(b-1);this.expandTo(c);var f=-1<<a,h=-1>>>-b;if(d==
c)this.words[d]|=f&h;else{this.words[d]|=f;for(d+=1;d<c;d++)this.words[d]=-1;this.words[c]|=h}}},"~N,~N");c(c$,"clear",function(a){if(0>a)throw new IndexOutOfBoundsException("bitIndex < 0: "+a);var b=JU.BS.wordIndex(a);b>=this.wordsInUse||(this.words[b]&=~(1<<a),this.recalculateWordsInUse())},"~N");c(c$,"clearBits",function(a,b){if(a!=b){var d=JU.BS.wordIndex(a);if(!(d>=this.wordsInUse)){var c=JU.BS.wordIndex(b-1);c>=this.wordsInUse&&(b=this.length(),c=this.wordsInUse-1);var f=-1<<a,h=-1>>>-b;if(d==
c)this.words[d]&=~(f&h);else{this.words[d]&=~f;for(d+=1;d<c;d++)this.words[d]=0;this.words[c]&=~h}this.recalculateWordsInUse()}}},"~N,~N");c(c$,"clearAll",function(){for(;0<this.wordsInUse;)this.words[--this.wordsInUse]=0});c(c$,"get",function(a){if(0>a)throw new IndexOutOfBoundsException("bitIndex < 0: "+a);var b=JU.BS.wordIndex(a);return b<this.wordsInUse&&0!=(this.words[b]&1<<a)},"~N");c(c$,"nextSetBit",function(a){if(0>a)throw new IndexOutOfBoundsException("fromIndex < 0: "+a);var b=JU.BS.wordIndex(a);
if(b>=this.wordsInUse)return-1;for(a=this.words[b]&-1<<a;;){if(0!=a)return 32*b+Integer.numberOfTrailingZeros(a);if(++b==this.wordsInUse)return-1;a=this.words[b]}},"~N");c(c$,"nextClearBit",function(a){if(0>a)throw new IndexOutOfBoundsException("fromIndex < 0: "+a);var b=JU.BS.wordIndex(a);if(b>=this.wordsInUse)return a;for(a=~this.words[b]&-1<<a;;){if(0!=a)return 32*b+Integer.numberOfTrailingZeros(a);if(++b==this.wordsInUse)return 32*this.wordsInUse;a=~this.words[b]}},"~N");c(c$,"length",function(){return 0==
this.wordsInUse?0:32*(this.wordsInUse-1)+(32-Integer.numberOfLeadingZeros(this.words[this.wordsInUse-1]))});c(c$,"isEmpty",function(){return 0==this.wordsInUse});c(c$,"intersects",function(a){for(var b=Math.min(this.wordsInUse,a.wordsInUse)-1;0<=b;b--)if(0!=(this.words[b]&a.words[b]))return!0;return!1},"JU.BS");c(c$,"cardinality",function(){for(var a=0,b=0;b<this.wordsInUse;b++)a+=Integer.bitCount(this.words[b]);return a});c(c$,"and",function(a){if(this!==a){for(;this.wordsInUse>a.wordsInUse;)this.words[--this.wordsInUse]=
0;for(var b=0;b<this.wordsInUse;b++)this.words[b]&=a.words[b];this.recalculateWordsInUse()}},"JU.BS");c(c$,"or",function(a){if(this!==a){var b=Math.min(this.wordsInUse,a.wordsInUse);this.wordsInUse<a.wordsInUse&&(this.ensureCapacity(a.wordsInUse),this.wordsInUse=a.wordsInUse);for(var d=0;d<b;d++)this.words[d]|=a.words[d];b<a.wordsInUse&&System.arraycopy(a.words,b,this.words,b,this.wordsInUse-b)}},"JU.BS");c(c$,"xor",function(a){var b=Math.min(this.wordsInUse,a.wordsInUse);this.wordsInUse<a.wordsInUse&&
(this.ensureCapacity(a.wordsInUse),this.wordsInUse=a.wordsInUse);for(var d=0;d<b;d++)this.words[d]^=a.words[d];b<a.wordsInUse&&System.arraycopy(a.words,b,this.words,b,a.wordsInUse-b);this.recalculateWordsInUse()},"JU.BS");c(c$,"andNot",function(a){for(var b=Math.min(this.wordsInUse,a.wordsInUse)-1;0<=b;b--)this.words[b]&=~a.words[b];this.recalculateWordsInUse()},"JU.BS");e(c$,"hashCode",function(){for(var a=1234,b=this.wordsInUse;0<=--b;)a^=this.words[b]*(b+1);return a>>32^a});c(c$,"size",function(){return 32*
this.words.length});e(c$,"equals",function(a){if(!w(a,JU.BS))return!1;if(this===a)return!0;if(this.wordsInUse!=a.wordsInUse)return!1;for(var b=0;b<this.wordsInUse;b++)if(this.words[b]!=a.words[b])return!1;return!0},"~O");e(c$,"clone",function(){!this.sizeIsSticky&&this.wordsInUse!=this.words.length&&this.setLength(this.wordsInUse);return JU.BS.copy(this)});c(c$,"setLength",function(a){a!=this.words.length&&(a==this.wordsInUse?this.words=x(-1,this.words,0,a):(a=E(a,0),System.arraycopy(this.words,0,
a,0,this.wordsInUse),this.words=a))},"~N");e(c$,"toString",function(){return JU.BS.escape(this,"(",")")});c$.copy=c(c$,"copy",function(a){var b;b=ga(a);var d=a.wordsInUse;b.words=0==d?JU.BS.emptyBitmap:x(-1,a.words,0,b.wordsInUse=d);return b},"JU.BS");c(c$,"cardinalityN",function(a){for(var b=this.cardinality(),d=this.length();--d>=a;)this.get(d)&&b--;return b},"~N");e(c$,"toJSON",function(){var a=128<this.wordsInUse?this.cardinality():32*this.wordsInUse,a=JU.SB.newN(6*a+2);a.appendC("[");var b=this.nextSetBit(0);
if(-1!=b){a.appendI(b);for(b=this.nextSetBit(b+1);0<=b;b=this.nextSetBit(b+1)){var d=this.nextClearBit(b);do a.append(", ").appendI(b);while(++b<d)}}a.appendC("]");return a.toString()});c$.escape=c(c$,"escape",function(a,b,d){if(null==a)return b+"{}"+d;var c=new JU.SB;c.append(b+"{");b=a.length();for(var f=-1,h=-2,e=-1;++e<=b;){var j=a.get(e);if(e==b||0<=f&&!j){0<=f&&h!=f&&c.append((h==f-1?" ":":")+f);if(e==b)break;f=-1}a.get(e)&&(0>f&&(c.append((-2==h?"":" ")+e),h=e),f=e)}c.append("}").appendC(d);
return c.toString()},"JU.BS,~S,~S");c$.unescape=c(c$,"unescape",function(a){var b,d;if(null==a||4>(d=(a=a.trim()).length)||a.equalsIgnoreCase("({null})")||"("!=(b=a.charAt(0))&&"["!=b||a.charAt(d-1)!=("("==b?")":"]")||"{"!=a.charAt(1)||a.indexOf("}")!=d-2)return null;for(var c=d-=2;2<=--c;)if(!JU.PT.isDigit(b=a.charAt(c))&&" "!=b&&"\t"!=b&&":"!=b)return null;for(var f=d;JU.PT.isDigit(a.charAt(--f)););if(++f==d)f=0;else try{f=Integer.parseInt(a.substring(f,d))}catch(h){if(z(h,NumberFormatException))return null;
throw h;}for(var e=JU.BS.newN(f),j=f=-1,l=-2,c=2;c<=d;c++)switch(b=a.charAt(c)){case "\t":case " ":case "}":if(0>l)break;if(l<f)return null;f=l;0>j&&(j=l);e.setBits(j,l+1);j=-1;l=-2;break;case ":":j=f=l;l=-2;break;default:JU.PT.isDigit(b)&&(0>l&&(l=0),l=10*l+(b.charCodeAt(0)-48))}return 0<=j?null:e},"~S");D(c$,"ADDRESS_BITS_PER_WORD",5,"BITS_PER_WORD",32,"WORD_MASK",4294967295,"emptyBitmap",E(0,0))});r("JU");s(["java.util.Hashtable"],"JU.CU",["JU.P3","$.PT"],function(){c$=t(JU,"CU");c$.toRGBHexString=
c(c$,"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 c="00"+Integer.toHexString(d>>8&255),c=c.substring(c.length-2),d="00"+Integer.toHexString(d&255),d=d.substring(d.length-2);return a+c+d},"javajs.api.GenericColor");c$.toCSSString=c(c$,"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");c$.getArgbFromString=c(c$,"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 c;if(0<=a.indexOf(",")){c=JU.PT.split(a.substring(1,a.length-1),",");if(3!=c.length)return 0;a=JU.PT.parseFloat(c[0]);d=JU.PT.parseFloat(c[1]);c=JU.PT.parseFloat(c[2]);return JU.CU.colorTriadToFFRGB(a,d,c)}switch(d){case 9:c="x";break;case 10:c="0x";break;default:return 0}if(1!=a.indexOf(c))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(f){if(z(f,Exception))return 0;throw f;}a=JU.CU.mapJavaScriptColors.get(a);return null==a?0:a.intValue()},"~S");c$.colorTriadToFFRGB=c(c$,"colorTriadToFFRGB",function(a,d,c){1>=a&&(1>=d&&1>=c)&&(0<a&&(a=256*a-1),0<d&&(d=256*d-1),0<c&&(c=256*c-1));return JU.CU.rgb(I(a),I(d),I(c))},"~N,~N,~N");c$.rgb=c(c$,"rgb",function(a,d,c){return 4278190080|a<<16|d<<8|c},"~N,~N,~N");c$.colorPtFromString=c(c$,
"colorPtFromString",function(a){return JU.CU.colorPtFromInt(JU.CU.getArgbFromString(a),null)},"~S");c$.colorPtFromInt=c(c$,"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");c$.colorPtToFFRGB=c(c$,"colorPtToFFRGB",function(a){return JU.CU.colorTriadToFFRGB(a.x,a.y,a.z)},"JU.T3");c$.toRGB3f=c(c$,"toRGB3f",function(a,d){d[0]=(a>>16&255)/255;d[1]=(a>>8&255)/255;d[2]=(a&255)/255},"~N,~A");c$.toFFGGGfromRGB=c(c$,"toFFGGGfromRGB",function(a){a=v((2989*
(a>>16&255)+5870*(a>>8&255)+1140*(a&255)+5E3)/1E4)&16777215;return JU.CU.rgb(a,a,a)},"~N");c$.rgbToHSL=c(c$,"rgbToHSL",function(a,d){var c=a.x/255,f=a.y/255,h=a.z/255,e=Math.min(c,Math.min(f,h)),j=Math.max(c,Math.max(f,h)),l=j+e,e=j-e,c=60*(0==e?0:j==c?(f-h)/e+6:j==f?(h-c)/e+2:(c-f)/e+4)%360,f=e/(0==e?1:1>=l?l:2-l);return d?JU.P3.new3(Math.round(10*c)/10,Math.round(1E3*f)/10,Math.round(500*l)/10):JU.P3.new3(c,100*f,50*l)},"JU.P3,~B");c$.hslToRGB=c(c$,"hslToRGB",function(a){var d=Math.max(0,Math.min(360,
a.x))/60,c=Math.max(0,Math.min(100,a.y))/100;a=Math.max(0,Math.min(100,a.z))/100;var c=a-(0.5>a?a:1-a)*c,f=2*(a-c);a=JU.CU.toRGB(c,f,d+2);var h=JU.CU.toRGB(c,f,d),d=JU.CU.toRGB(c,f,d-2);return JU.P3.new3(Math.round(255*a),Math.round(255*h),Math.round(255*d))},"JU.P3");c$.toRGB=c(c$,"toRGB",function(a,d,c){return 1>(c+=0>c?6:6<c?-6:0)?a+d*c:3>c?a+d:4>c?a+d*(4-c):a},"~N,~N,~N");D(c$,"colorNames",x(-1,"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(" ")),
"colorArgbs",E(-1,[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]));c$.mapJavaScriptColors=c$.prototype.mapJavaScriptColors=new java.util.Hashtable;for(var a=JU.CU.colorNames.length;0<=--a;)JU.CU.mapJavaScriptColors.put(JU.CU.colorNames[a],Integer.$valueOf(JU.CU.colorArgbs[a]))});
r("JU");s(["java.lang.Boolean"],"JU.DF",["java.lang.Double","JU.PT","$.SB"],function(){c$=t(JU,"DF");c$.setUseNumberLocalization=c(c$,"setUseNumberLocalization",function(a){JU.DF.useNumberLocalization[0]=a?Boolean.TRUE:Boolean.FALSE},"~B");c$.formatDecimalDbl=c(c$,"formatDecimalDbl",function(a,b){return 2147483647==b||-Infinity==a||Infinity==a||Double.isNaN(a)?""+a:JU.DF.formatDecimal(a,b)},"~N,~N");c$.formatDecimal=c(c$,"formatDecimal",function(a,b){if(-Infinity==a||(Infinity==a||Double.isNaN(a))||
2147483647==b)return""+a;var d=0>a;d&&(a=-a);var c;if(0>b){b=-b;b>JU.DF.formattingStrings.length&&(b=JU.DF.formattingStrings.length);if(0==a)return JU.DF.formattingStrings[b-1]+"E+0";var f;1>Math.abs(a)?(c=100,f=1E-100*a):(c=-100,f=1E100*a);f=(""+f).toUpperCase();var h=f.indexOf("E");0>h?f=""+a:(c=JU.PT.parseInt(f.substring(h+(f.indexOf("E+")==h?2:1)))+c,f=JU.PT.parseFloat(f.substring(0,h)),f=JU.DF.formatDecimal(f,b-1),f.startsWith("10.")&&(f=JU.DF.formatDecimal(1,b-1),c++));return(d?"-":"")+f+"E"+
(0<=c?"+":"")+c}b>=JU.DF.formattingStrings.length&&(b=JU.DF.formattingStrings.length-1);f=(""+a).toUpperCase();c=f.indexOf(".");if(0>c)return(d?"-":"")+f+JU.DF.formattingStrings[b].substring(1);h=f.indexOf("E-");0<h&&(c=JU.PT.parseInt(f.substring(h+1)),f="0."+"0000000000000000000000000000000000000000".substring(0,-c-1)+f.substring(0,1)+f.substring(2,h),c=1);h=f.indexOf("E");0<h&&(c=JU.PT.parseInt(f.substring(h+1)),f=f.substring(0,1)+f.substring(2,h)+"0000000000000000000000000000000000000000",f=f.substring(0,
c+1)+"."+f.substring(c+1),c=f.indexOf("."));var h=f.length,e=b+c+1;if(e<h&&"5"<=f.charAt(e))return JU.DF.formatDecimal((d?-1:1)*(a+JU.DF.formatAdds[b]),b);var j=f.substring(0,0==b?c:++c),e=JU.SB.newS(j);d&&(j.equals("0.")&&b+2<=h&&f.substring(2,2+b).equals("0000000000000000000000000000000000000000".substring(0,b)))&&(d=!1);for(j=0;j<b;j++,c++)c<h?e.appendC(f.charAt(c)):e.appendC("0");f=(d?"-":"")+e;return Boolean.TRUE.equals(JU.DF.useNumberLocalization[0])?f:f.$replace(",",".")},"~N,~N");c$.formatDecimalTrimmed=
c(c$,"formatDecimalTrimmed",function(a,b){for(var d=JU.DF.formatDecimalDbl(a,b),c=d.length-1;0<=c&&"0"==d.charAt(c);)c--;return d.substring(0,c+1)},"~N,~N");c$.formatDecimalTrimmed0=c(c$,"formatDecimalTrimmed0",function(a,b){for(var d=JU.DF.formatDecimalDbl(a,b),c=d.length-1,f=d.indexOf(".")+1;c>f&&"0"==d.charAt(c);)c--;return d.substring(0,c+1)},"~N,~N");D(c$,"formattingStrings",x(-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(" ")),
"zeros","0000000000000000000000000000000000000000","formatAdds",N(-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]));c$.useNumberLocalization=c$.prototype.useNumberLocalization=x(-1,[Boolean.TRUE])});r("JU");s(["java.lang.Enum"],"JU.Encoding",null,function(){c$=t(JU,"Encoding",Enum);k(c$,"NONE",0,[]);k(c$,"UTF8",1,[]);k(c$,"UTF_16BE",2,[]);k(c$,"UTF_16LE",3,[]);k(c$,"UTF_32BE",4,[]);k(c$,"UTF_32LE",5,[])});r("JU");s(["java.util.ArrayList"],"JU.Lst",null,function(){c$=t(JU,
"Lst",java.util.ArrayList);c(c$,"addLast",function(a){return this.add1(a)},"~O");c(c$,"removeItemAt",function(a){return this._removeItemAt(a)},"~N");c(c$,"removeObj",function(a){return this._removeObject(a)},"~O")});r("JU");s(null,"JU.M34",["java.lang.ArrayIndexOutOfBoundsException"],function(){c$=q(function(){this.m22=this.m21=this.m20=this.m12=this.m11=this.m10=this.m02=this.m01=this.m00=0;n(this,arguments)},JU,"M34");c(c$,"setAA33",function(a){var b=a.x,d=a.y,c=a.z;a=a.angle;var f=Math.sqrt(b*
b+d*d+c*c),f=1/f,b=b*f,d=d*f,c=c*f,h=Math.cos(a);a=Math.sin(a);f=1-h;this.m00=h+b*b*f;this.m11=h+d*d*f;this.m22=h+c*c*f;var h=b*d*f,e=c*a;this.m01=h-e;this.m10=h+e;h=b*c*f;e=d*a;this.m02=h+e;this.m20=h-e;h=d*c*f;e=b*a;this.m12=h-e;this.m21=h+e},"JU.A4");c(c$,"rotate",function(a){this.rotate2(a,a)},"JU.T3");c(c$,"rotate2",function(a,b){b.set(this.m00*a.x+this.m01*a.y+this.m02*a.z,this.m10*a.x+this.m11*a.y+this.m12*a.z,this.m20*a.x+this.m21*a.y+this.m22*a.z)},"JU.T3,JU.T3");c(c$,"setM33",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.M34");c(c$,"clear33",function(){this.m00=this.m01=this.m02=this.m10=this.m11=this.m12=this.m20=this.m21=this.m22=0});c(c$,"set33",function(a,b,d){switch(a){case 0:switch(b){case 0:this.m00=d;return;case 1:this.m01=d;return;case 2:this.m02=d;return}break;case 1:switch(b){case 0:this.m10=d;return;case 1:this.m11=d;return;case 2:this.m12=d;return}break;case 2:switch(b){case 0:this.m20=
d;return;case 1:this.m21=d;return;case 2:this.m22=d;return}}this.err()},"~N,~N,~N");c(c$,"get33",function(a,b){switch(a){case 0:switch(b){case 0:return this.m00;case 1:return this.m01;case 2:return this.m02}break;case 1:switch(b){case 0:return this.m10;case 1:return this.m11;case 2:return this.m12}break;case 2:switch(b){case 0:return this.m20;case 1:return this.m21;case 2:return this.m22}}this.err();return 0},"~N,~N");c(c$,"setRow33",function(a,b){switch(a){case 0:this.m00=b[0];this.m01=b[1];this.m02=
b[2];break;case 1:this.m10=b[0];this.m11=b[1];this.m12=b[2];break;case 2:this.m20=b[0];this.m21=b[1];this.m22=b[2];break;default:this.err()}},"~N,~A");c(c$,"getRow33",function(a,b){switch(a){case 0:b[0]=this.m00;b[1]=this.m01;b[2]=this.m02;return;case 1:b[0]=this.m10;b[1]=this.m11;b[2]=this.m12;return;case 2:b[0]=this.m20;b[1]=this.m21;b[2]=this.m22;return}this.err()},"~N,~A");c(c$,"setColumn33",function(a,b){switch(a){case 0:this.m00=b[0];this.m10=b[1];this.m20=b[2];break;case 1:this.m01=b[0];this.m11=
b[1];this.m21=b[2];break;case 2:this.m02=b[0];this.m12=b[1];this.m22=b[2];break;default:this.err()}},"~N,~A");c(c$,"getColumn33",function(a,b){switch(a){case 0:b[0]=this.m00;b[1]=this.m10;b[2]=this.m20;break;case 1:b[0]=this.m01;b[1]=this.m11;b[2]=this.m21;break;case 2:b[0]=this.m02;b[1]=this.m12;b[2]=this.m22;break;default:this.err()}},"~N,~A");c(c$,"add33",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.M34");c(c$,"sub33",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.M34");c(c$,"mul33",function(a){this.m00*=a;this.m01*=a;this.m02*=a;this.m10*=a;this.m11*=a;this.m12*=a;this.m20*=a;this.m21*=a;this.m22*=a},"~N");c(c$,"transpose33",function(){var a=this.m01;this.m01=this.m10;this.m10=a;a=this.m02;this.m02=this.m20;this.m20=a;a=this.m12;this.m12=this.m21;this.m21=a});
c(c$,"setXRot",function(a){var b=Math.cos(a);a=Math.sin(a);this.m00=1;this.m10=this.m02=this.m01=0;this.m11=b;this.m12=-a;this.m20=0;this.m21=a;this.m22=b},"~N");c(c$,"setYRot",function(a){var b=Math.cos(a);a=Math.sin(a);this.m00=b;this.m01=0;this.m02=a;this.m10=0;this.m11=1;this.m12=0;this.m20=-a;this.m21=0;this.m22=b},"~N");c(c$,"setZRot",function(a){var b=Math.cos(a);a=Math.sin(a);this.m00=b;this.m01=-a;this.m02=0;this.m10=a;this.m11=b;this.m21=this.m20=this.m12=0;this.m22=1},"~N");c(c$,"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(c$,"err",function(){throw new ArrayIndexOutOfBoundsException("matrix column/row out of bounds");})});r("JU");s(["JU.M34"],"JU.M3",["JU.T3"],function(){c$=t(JU,"M3",JU.M34,java.io.Serializable);c$.newA9=c(c$,"newA9",function(a){var b=new JU.M3;b.setA(a);return b},"~A");c$.newM3=c(c$,"newM3",function(a){var b=new JU.M3;if(null==a)return b.setScale(1),
b;b.m00=a.m00;b.m01=a.m01;b.m02=a.m02;b.m10=a.m10;b.m11=a.m11;b.m12=a.m12;b.m20=a.m20;b.m21=a.m21;b.m22=a.m22;return b},"JU.M3");c(c$,"setScale",function(a){this.clear33();this.m00=this.m11=this.m22=a},"~N");c(c$,"setM3",function(a){this.setM33(a)},"JU.M34");c(c$,"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(c$,"setElement",function(a,b,d){this.set33(a,b,d)},"~N,~N,~N");c(c$,"getElement",function(a,
b){return this.get33(a,b)},"~N,~N");c(c$,"setRow",function(a,b,d,c){switch(a){case 0:this.m00=b;this.m01=d;this.m02=c;break;case 1:this.m10=b;this.m11=d;this.m12=c;break;case 2:this.m20=b;this.m21=d;this.m22=c;break;default:this.err()}},"~N,~N,~N,~N");c(c$,"setRowV",function(a,b){switch(a){case 0:this.m00=b.x;this.m01=b.y;this.m02=b.z;break;case 1:this.m10=b.x;this.m11=b.y;this.m12=b.z;break;case 2:this.m20=b.x;this.m21=b.y;this.m22=b.z;break;default:this.err()}},"~N,JU.T3");c(c$,"setRowA",function(a,
b){this.setRow33(a,b)},"~N,~A");e(c$,"getRow",function(a,b){this.getRow33(a,b)},"~N,~A");c(c$,"setColumn3",function(a,b,d,c){switch(a){case 0:this.m00=b;this.m10=d;this.m20=c;break;case 1:this.m01=b;this.m11=d;this.m21=c;break;case 2:this.m02=b;this.m12=d;this.m22=c;break;default:this.err()}},"~N,~N,~N,~N");c(c$,"setColumnV",function(a,b){switch(a){case 0:this.m00=b.x;this.m10=b.y;this.m20=b.z;break;case 1:this.m01=b.x;this.m11=b.y;this.m21=b.z;break;case 2:this.m02=b.x;this.m12=b.y;this.m22=b.z;
break;default:this.err()}},"~N,JU.T3");c(c$,"getColumnV",function(a,b){switch(a){case 0:b.x=this.m00;b.y=this.m10;b.z=this.m20;break;case 1:b.x=this.m01;b.y=this.m11;b.z=this.m21;break;case 2:b.x=this.m02;b.y=this.m12;b.z=this.m22;break;default:this.err()}},"~N,JU.T3");c(c$,"setColumnA",function(a,b){this.setColumn33(a,b)},"~N,~A");c(c$,"getColumn",function(a,b){this.getColumn33(a,b)},"~N,~A");c(c$,"add",function(a){this.add33(a)},"JU.M3");c(c$,"sub",function(a){this.sub33(a)},"JU.M3");c(c$,"transpose",
function(){this.transpose33()});c(c$,"transposeM",function(a){this.setM33(a);this.transpose33()},"JU.M3");c(c$,"invertM",function(a){this.setM33(a);this.invert()},"JU.M3");c(c$,"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(c$,"setAsXRotation",function(a){this.setXRot(a);return this},"~N");c(c$,"setAsYRotation",function(a){this.setYRot(a);return this},"~N");c(c$,"setAsZRotation",function(a){this.setZRot(a);return this},"~N");c(c$,"scale",function(a){this.mul33(a)},"~N");c(c$,"mul",function(a){this.mul2(this,a)},"JU.M3");c(c$,"mul2",function(a,b){this.set9(a.m00*b.m00+a.m01*b.m10+a.m02*b.m20,a.m00*b.m01+a.m01*b.m11+a.m02*b.m21,a.m00*b.m02+
a.m01*b.m12+a.m02*b.m22,a.m10*b.m00+a.m11*b.m10+a.m12*b.m20,a.m10*b.m01+a.m11*b.m11+a.m12*b.m21,a.m10*b.m02+a.m11*b.m12+a.m12*b.m22,a.m20*b.m00+a.m21*b.m10+a.m22*b.m20,a.m20*b.m01+a.m21*b.m11+a.m22*b.m21,a.m20*b.m02+a.m21*b.m12+a.m22*b.m22)},"JU.M3,JU.M3");e(c$,"equals",function(a){return!w(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(c$,"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(c$,"setZero",function(){this.clear33()});c(c$,"set9",function(a,b,d,c,f,h,e,j,l){this.m00=a;this.m01=b;this.m02=d;this.m10=c;this.m11=f;this.m12=h;this.m20=e;this.m21=j;this.m22=l},"~N,~N,~N,~N,~N,~N,~N,~N,~N");e(c$,"toString",function(){return"[\n  ["+
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(c$,"setAA",function(a){this.setAA33(a);return this},"JU.A4");c(c$,"setAsBallRotation",function(a,b,d){var c=Math.sqrt(b*b+d*d),f=c*a;if(0==f)return this.setScale(1),!1;a=Math.cos(f);f=Math.sin(f);d=-d/c;b/=c;c=a-1;this.m00=1+c*d*d;this.m01=this.m10=c*d*b;this.m20=-(this.m02=f*d);this.m11=1+c*b*b;this.m21=-(this.m12=f*b);this.m22=a;return!0},"~N,~N,~N");c(c$,"isRotation",
function(){return 0.001>Math.abs(this.determinant3()-1)})});r("JU");s(["JU.M34"],"JU.M4",["JU.T3"],function(){c$=q(function(){this.m33=this.m32=this.m31=this.m30=this.m23=this.m13=this.m03=0;n(this,arguments)},JU,"M4",JU.M34);c$.newA16=c(c$,"newA16",function(a){var b=new JU.M4;b.m00=a[0];b.m01=a[1];b.m02=a[2];b.m03=a[3];b.m10=a[4];b.m11=a[5];b.m12=a[6];b.m13=a[7];b.m20=a[8];b.m21=a[9];b.m22=a[10];b.m23=a[11];b.m30=a[12];b.m31=a[13];b.m32=a[14];b.m33=a[15];return b},"~A");c$.newM4=c(c$,"newM4",function(a){var b=
new JU.M4;if(null==a)return b.setIdentity(),b;b.setToM3(a);b.m03=a.m03;b.m13=a.m13;b.m23=a.m23;b.m30=a.m30;b.m31=a.m31;b.m32=a.m32;b.m33=a.m33;return b},"JU.M4");c$.newMV=c(c$,"newMV",function(a,b){var d=new JU.M4;d.setMV(a,b);return d},"JU.M3,JU.T3");c(c$,"setZero",function(){this.clear33();this.m03=this.m13=this.m23=this.m30=this.m31=this.m32=this.m33=0});c(c$,"setIdentity",function(){this.setZero();this.m00=this.m11=this.m22=this.m33=1});c(c$,"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(c$,"setMV",function(a,b){this.setM33(a);this.setTranslation(b);this.m33=1},"JU.M3,JU.T3");c(c$,"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(c$,"setToAA",function(a){this.setIdentity();this.setAA33(a)},"JU.A4");c(c$,"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(c$,"setTranslation",function(a){this.m03=a.x;this.m13=a.y;this.m23=a.z},"JU.T3");c(c$,"setElement",function(a,b,d){if(3>a&&3>b)this.set33(a,b,d);else{(3<a||3<b)&&this.err();switch(a){case 0:this.m03=d;return;case 1:this.m13=d;return;case 2:this.m23=d;return}switch(b){case 0:this.m30=d;break;case 1:this.m31=d;break;case 2:this.m32=d;break;case 3:this.m33=
d}}},"~N,~N,~N");c(c$,"getElement",function(a,b){if(3>a&&3>b)return this.get33(a,b);if(3<a||3<b)return this.err(),0;switch(a){case 0:return this.m03;case 1:return this.m13;case 2:return this.m23;default:switch(b){case 0:return this.m30;case 1:return this.m31;case 2:return this.m32;default:return this.m33}}},"~N,~N");c(c$,"getTranslation",function(a){a.x=this.m03;a.y=this.m13;a.z=this.m23},"JU.T3");c(c$,"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(c$,"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(c$,"setRowA",function(a,b){3>a&&this.setRow33(a,b);switch(a){case 0:this.m03=b[3];return;case 1:this.m13=b[3];return;case 2:this.m23=b[3];return;case 3:this.m30=b[0];this.m31=b[1];this.m32=b[2];this.m33=b[3];return}this.err()},"~N,~A");e(c$,
"getRow",function(a,b){3>a&&this.getRow33(a,b);switch(a){case 0:b[3]=this.m03;return;case 1:b[3]=this.m13;return;case 2:b[3]=this.m23;return;case 3:b[0]=this.m30;b[1]=this.m31;b[2]=this.m32;b[3]=this.m33;return}this.err()},"~N,~A");c(c$,"setColumn4",function(a,b,d,c,f){0==a?(this.m00=b,this.m10=d,this.m20=c,this.m30=f):1==a?(this.m01=b,this.m11=d,this.m21=c,this.m31=f):2==a?(this.m02=b,this.m12=d,this.m22=c,this.m32=f):3==a?(this.m03=b,this.m13=d,this.m23=c,this.m33=f):this.err()},"~N,~N,~N,~N,~N");
c(c$,"setColumnA",function(a,b){3>a&&this.setColumn33(a,b);switch(a){case 0:this.m30=b[3];break;case 1:this.m31=b[3];break;case 2:this.m32=b[3];break;case 3:this.m03=b[0];this.m13=b[1];this.m23=b[2];this.m33=b[3];break;default:this.err()}},"~N,~A");c(c$,"getColumn",function(a,b){3>a&&this.getColumn33(a,b);switch(a){case 0:b[3]=this.m30;break;case 1:b[3]=this.m31;break;case 2:b[3]=this.m32;break;case 3:b[0]=this.m03;b[1]=this.m13;b[2]=this.m23;b[3]=this.m33;break;default:this.err()}},"~N,~A");c(c$,
"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(c$,"add",function(a){this.m03+=a.x;this.m13+=a.y;this.m23+=a.z},"JU.T3");c(c$,"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(c$,"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(c$,"set",function(a,b,d,c,f,h,e,j,l,p,m,k,n,q,r,s){this.m00=a;this.m01=b;this.m02=d;this.m03=c;this.m10=f;this.m11=h;this.m12=e;this.m13=j;this.m20=l;this.m21=p;this.m22=m;this.m23=k;this.m30=n;this.m31=q;this.m32=r;this.m33=s},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");
c(c$,"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(c$,"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(c$,"mul",function(a){this.mul2(this,a)},"JU.M4");c(c$,"mul2",function(a,b){this.set(a.m00*b.m00+a.m01*b.m10+a.m02*b.m20+a.m03*b.m30,a.m00*b.m01+a.m01*b.m11+a.m02*b.m21+a.m03*b.m31,a.m00*b.m02+a.m01*b.m12+a.m02*b.m22+a.m03*b.m32,a.m00*b.m03+a.m01*b.m13+a.m02*b.m23+a.m03*b.m33,a.m10*b.m00+a.m11*b.m10+a.m12*b.m20+a.m13*b.m30,a.m10*b.m01+a.m11*b.m11+a.m12*b.m21+a.m13*b.m31,a.m10*b.m02+
a.m11*b.m12+a.m12*b.m22+a.m13*b.m32,a.m10*b.m03+a.m11*b.m13+a.m12*b.m23+a.m13*b.m33,a.m20*b.m00+a.m21*b.m10+a.m22*b.m20+a.m23*b.m30,a.m20*b.m01+a.m21*b.m11+a.m22*b.m21+a.m23*b.m31,a.m20*b.m02+a.m21*b.m12+a.m22*b.m22+a.m23*b.m32,a.m20*b.m03+a.m21*b.m13+a.m22*b.m23+a.m23*b.m33,a.m30*b.m00+a.m31*b.m10+a.m32*b.m20+a.m33*b.m30,a.m30*b.m01+a.m31*b.m11+a.m32*b.m21+a.m33*b.m31,a.m30*b.m02+a.m31*b.m12+a.m32*b.m22+a.m33*b.m32,a.m30*b.m03+a.m31*b.m13+a.m32*b.m23+a.m33*b.m33)},"JU.M4,JU.M4");c(c$,"transform",
function(a){this.transform2(a,a)},"JU.T4");c(c$,"transform2",function(a,b){b.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(c$,"rotTrans",function(a){this.rotTrans2(a,a)},"JU.T3");c(c$,"rotTrans2",function(a,b){b.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 b},"JU.T3,JU.T3");c(c$,"setAsXYRotation",function(a){this.setIdentity();var b=Math.cos(a);a=Math.sin(a);this.m22=b;this.m23=-a;this.m32=a;this.m33=b;return this},"~N");c(c$,"setAsYZRotation",function(a){this.setIdentity();var b=Math.cos(a);a=Math.sin(a);this.m00=b;this.m03=-a;this.m30=a;this.m33=b;return this},"~N");c(c$,"setAsXZRotation",function(a){this.setIdentity();var b=Math.cos(a);a=Math.sin(a);this.m11=b;this.m13=-a;this.m31=a;this.m33=b;return this},
"~N");e(c$,"equals",function(a){return!w(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(c$,"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(c$,"toString",function(){return"[\n  ["+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(c$,"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(c$,"rnd",function(a,b){return Math.abs(a)<b?0:a},"~N,~N")});r("JU");s(["java.io.OutputStream","javajs.api.GenericOutputChannel"],"JU.OC","java.io.BufferedWriter $.ByteArrayOutputStream $.OutputStreamWriter java.lang.Float JU.Base64 $.SB".split(" "),function(){c$=q(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;n(this,arguments)},JU,"OC",java.io.OutputStream,javajs.api.GenericOutputChannel);m(c$,function(){y(this,JU.OC,[])});m(c$,function(a){y(this,JU.OC,[]);this.setParams(null,a,!1,null)},"~S");c(c$,"setParams",function(a,b,d,c){this.bytePoster=a;if(this.$isBase64=";base64,".equals(b))b=null,this.os0=c,c=null;this.fileName=b;this.os=c;this.isLocalFile=null!=b&&!JU.OC.isRemote(b);d&&(!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(c$,"isBigEndian",function(){return this.bigEndian});c(c$,"setBigEndian",function(a){this.bigEndian=a},"~B");c(c$,"setBytes",function(a){this.bytes=a;return this},"~A");c(c$,"getFileName",function(){return this.fileName});c(c$,"getName",function(){return null==this.fileName?null:this.fileName.substring(this.fileName.lastIndexOf("/")+1)});c(c$,"getByteCount",
function(){return this.byteCount});c(c$,"setType",function(a){this.type=a},"~S");c(c$,"getType",function(){return this.type});c(c$,"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 b=a.getBytes();this.os.write(b,0,b.length);this.byteCount+=b.length;return this}}catch(d){if(!z(d,java.io.IOException))throw d;}this.byteCount+=a.length;return this},"~S");e(c$,"reset",function(){this.sb=null;this.initOS()});c(c$,
"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(b){if(z(b,Exception))System.out.println(b.toString());else throw b;}this.byteCount=0}});e(c$,"writeByteAsInt",function(a){null==this.os&&this.initOS();this.os.writeByteAsInt(a);this.byteCount++},"~N");e(c$,"write",
function(a,b,d){null==this.os&&this.initOS();0>d&&(d=a.length-b);try{this.os.write(a,b,d)}catch(c){if(!z(c,java.io.IOException))throw c;}this.byteCount+=d},"~A,~N,~N");e(c$,"writeShort",function(a){this.isBigEndian()?(this.writeByteAsInt(a>>8),this.writeByteAsInt(a)):(this.writeByteAsInt(a),this.writeByteAsInt(a>>8))},"~N");e(c$,"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(c$,"cancel",function(){this.isCanceled=!0;this.closeChannel()});e(c$,"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(!z(a,Exception))throw a;}if(this.isCanceled)return this.closed=
!0,null;if(null==this.fileName){if(this.$isBase64){var b=this.getBase64();null!=this.os0&&(this.os=this.os0,this.append(b));this.sb=new JU.SB;this.sb.append(b);this.$isBase64=!1;return this.closeChannel()}return null==this.sb?null:this.sb.toString()}this.closed=!0;if(!this.isLocalFile){b=this.postByteArray();if(null==b||b.startsWith("java.net"))this.byteCount=-1;return b}var d=b=null,b=self.J2S||Jmol,d="function"==typeof this.fileName?this.fileName:null;if(null!=b){var c=null==this.sb?this.toByteArray():
this.sb.toString();null==d?b.doAjax(this.fileName,null,c,null==this.sb):b.applyFunc(this.fileName,c)}return null});c(c$,"isBase64",function(){return this.$isBase64});c(c$,"getBase64",function(){return JU.Base64.getBase64(this.toByteArray()).toString()});c(c$,"toByteArray",function(){return null!=this.bytes?this.bytes:w(this.os,java.io.ByteArrayOutputStream)?this.os.toByteArray():null});c(c$,"close",function(){this.closeChannel()});e(c$,"toString",function(){if(null!=this.bw)try{this.bw.flush()}catch(a){if(!z(a,
java.io.IOException))throw a;}return null!=this.sb?this.closeChannel():this.byteCount+" bytes"});c(c$,"postByteArray",function(){var a=null==this.sb?this.toByteArray():this.sb.toString().getBytes();return this.bytePoster.postByteArray(this.fileName,a)});c$.isRemote=c(c$,"isRemote",function(a){if(null==a)return!1;a=JU.OC.urlTypeIndex(a);return 0<=a&&4>a},"~S");c$.isLocal=c(c$,"isLocal",function(a){return null!=a&&!JU.OC.isRemote(a)},"~S");c$.urlTypeIndex=c(c$,"urlTypeIndex",function(a){if(null==a)return-2;
for(var b=0;b<JU.OC.urlPrefixes.length;++b)if(a.startsWith(JU.OC.urlPrefixes[b]))return b;return-1},"~S");e(c$,"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(c$,"writeFloat",function(a){this.writeInt(0==a?0:Float.floatToIntBits(a))},"~N");D(c$,"urlPrefixes",x(-1,"http: https: sftp: ftp: file: cache:".split(" ")),
"URL_LOCAL",4,"URL_CACHE",5)});r("JU");s(["JU.T3"],"JU.P3",null,function(){c$=t(JU,"P3",JU.T3);c$.newP=c(c$,"newP",function(a){var b=new JU.P3;b.x=a.x;b.y=a.y;b.z=a.z;return b},"JU.T3");c$.getUnlikely=c(c$,"getUnlikely",function(){return null==JU.P3.unlikely?JU.P3.unlikely=JU.P3.new3(3.141592653589793,2.718281828459045,8.539734222673566):JU.P3.unlikely});c$.new3=c(c$,"new3",function(a,b,d){var c=new JU.P3;c.x=a;c.y=b;c.z=d;return c},"~N,~N,~N");c$.newA=c(c$,"newA",function(a){return JU.P3.new3(a[0],
a[1],a[2])},"~A");D(c$,"unlikely",null)});r("JU");s(["JU.T3i"],"JU.P3i",null,function(){c$=t(JU,"P3i",JU.T3i);c$.new3=c(c$,"new3",function(a,b,d){var c=new JU.P3i;c.x=a;c.y=b;c.z=d;return c},"~N,~N,~N")});r("JU");s(["JU.T4"],"JU.P4",null,function(){c$=t(JU,"P4",JU.T4);c$.new4=c(c$,"new4",function(a,b,d,c){var f=new JU.P4;f.set4(a,b,d,c);return f},"~N,~N,~N,~N");c$.newPt=c(c$,"newPt",function(a){var b=new JU.P4;b.set4(a.x,a.y,a.z,a.w);return b},"JU.P4");c(c$,"distance4",function(a){var b=this.x-a.x,
d=this.y-a.y,c=this.z-a.z;a=this.w-a.w;return Math.sqrt(b*b+d*d+c*c+a*a)},"JU.P4")});r("JU");s(null,"JU.PT","java.lang.Boolean $.Double $.Float $.Number java.util.Map javajs.api.JSONEncodable JU.AU $.DF $.Lst $.M34 $.M4 $.SB".split(" "),function(){c$=t(JU,"PT");c$.parseInt=c(c$,"parseInt",function(a){return JU.PT.parseIntNext(a,E(-1,[0]))},"~S");c$.parseIntNext=c(c$,"parseIntNext",function(a,b){var d=a.length;return 0>b[0]||b[0]>=d?-2147483648:JU.PT.parseIntChecked(a,d,b)},"~S,~A");c$.parseIntChecked=
c(c$,"parseIntChecked",function(a,b,d){var c=!1,f=0,h=d[0];if(0>h)return-2147483648;for(var e;h<b&&JU.PT.isWhiteSpace(a,h);)++h;var j=!1;h<b&&45==a.charCodeAt(h)&&(j=!0,++h);for(;h<b&&48<=(e=a.charCodeAt(h))&&57>=e;)f=10*f+(e-48),c=!0,++h;c?j&&(f=-f):f=-2147483648;d[0]=h;return f},"~S,~N,~A");c$.isWhiteSpace=c(c$,"isWhiteSpace",function(a,b){var d;return 0<=b&&(" "==(d=a.charAt(b))||"\t"==d||"\n"==d)},"~S,~N");c$.parseFloatChecked=c(c$,"parseFloatChecked",function(a,b,d,c){var f=!1,h=d[0];if(c&&a.indexOf("\n")!=
a.lastIndexOf("\n"))return NaN;for(;h<b&&JU.PT.isWhiteSpace(a,h);)++h;var e=!1;h<b&&"-"==a.charAt(h)&&(++h,e=!0);for(var j=0,l=0,p=0;h<b&&48<=(j=a.charCodeAt(h))&&57>=j;)l=10*l+1*(j-48),++h,f=!0;var m=!1,k=0,n=0==l?-1:0;if(46==j)for(m=!0;++h<b&&48<=(j=a.charCodeAt(h))&&57>=j;){f=!0;if(0>n){if(48==j){n--;continue}n=-n}k<JU.PT.decimalScale.length&&(p=10*p+1*(j-48),k++)}f?0<p?(f=p*JU.PT.decimalScale[k-1],f=1<n?n-2<JU.PT.decimalScale.length?f*JU.PT.decimalScale[n-2]:f*Math.pow(10,1-n):f+l):f=l:f=NaN;
l=!1;if(h<b&&(69==j||101==j||68==j)){l=!0;if(++h>=b)return NaN;j=a.charCodeAt(h);if(43==j&&++h>=b)return NaN;d[0]=h;h=JU.PT.parseIntChecked(a,b,d);if(-2147483648==h)return NaN;0<h&&h<=JU.PT.tensScale.length?f*=JU.PT.tensScale[h-1]:0>h&&-h<=JU.PT.decimalScale.length?f*=JU.PT.decimalScale[-h-1]:0!=h&&(f*=Math.pow(10,h))}else d[0]=h;e&&(f=-f);Infinity==f&&(f=3.4028235E38);return!c||(!l||m)&&JU.PT.checkTrailingText(a,d[0],b)?f:NaN},"~S,~N,~A,~B");c$.checkTrailingText=c(c$,"checkTrailingText",function(a,
b,d){for(var c;b<d&&(JU.PT.isWhitespace(c=a.charAt(b))||";"==c);)++b;return b==d},"~S,~N,~N");c$.parseFloatArray=c(c$,"parseFloatArray",function(a){return JU.PT.parseFloatArrayNext(a,E(1,0),null,null,null)},"~S");c$.parseFloatArrayInfested=c(c$,"parseFloatArrayInfested",function(a,b){for(var d=b.length,c=a.length,f=0,h=0,e=0;0<=e&&e<d&&f<c;e++){for(var j;Float.isNaN(j=JU.PT.parseFloat(a[f++]))&&f<c;);Float.isNaN(j)||(b[h=e]=j);if(f==c)break}return h+1},"~A,~A");c$.parseFloatArrayNext=c(c$,"parseFloatArrayNext",
function(a,b,d,c,f){var h=0,e=b[0];0<=e&&(null!=c&&(h=a.indexOf(c,e),0<=h&&(b[0]=h+c.length)),a=a.substring(b[0]),e=null==f?-1:a.indexOf(f),0>e?e=a.length:a=a.substring(0,e),b[0]+=e+1,a=JU.PT.getTokens(a),null==d&&(d=U(a.length,0)),h=JU.PT.parseFloatArrayInfested(a,d));if(null==d)return U(0,0);for(a=h;a<d.length;a++)d[a]=NaN;return d},"~S,~A,~A,~S,~S");c$.parseFloatRange=c(c$,"parseFloatRange",function(a,b,d){var c=a.length;b>c&&(b=c);return 0>d[0]||d[0]>=b?NaN:JU.PT.parseFloatChecked(a,b,d,!1)},
"~S,~N,~A");c$.parseFloatNext=c(c$,"parseFloatNext",function(a,b){var d=null==a?-1:a.length;return 0>b[0]||b[0]>=d?NaN:JU.PT.parseFloatChecked(a,d,b,!1)},"~S,~A");c$.parseFloatStrict=c(c$,"parseFloatStrict",function(a){var b=a.length;return 0==b?NaN:JU.PT.parseFloatChecked(a,b,E(-1,[0]),!0)},"~S");c$.parseFloat=c(c$,"parseFloat",function(a){return JU.PT.parseFloatNext(a,E(-1,[0]))},"~S");c$.parseIntRadix=c(c$,"parseIntRadix",function(a,b){return Integer.parseIntRadix(a,b)},"~S,~N");c$.getTokens=c(c$,
"getTokens",function(a){return JU.PT.getTokensAt(a,0)},"~S");c$.parseToken=c(c$,"parseToken",function(a){return JU.PT.parseTokenNext(a,E(-1,[0]))},"~S");c$.parseTrimmed=c(c$,"parseTrimmed",function(a){return JU.PT.parseTrimmedRange(a,0,a.length)},"~S");c$.parseTrimmedAt=c(c$,"parseTrimmedAt",function(a,b){return JU.PT.parseTrimmedRange(a,b,a.length)},"~S,~N");c$.parseTrimmedRange=c(c$,"parseTrimmedRange",function(a,b,d){var c=a.length;d<c&&(c=d);return c<b?"":JU.PT.parseTrimmedChecked(a,b,c)},"~S,~N,~N");
c$.getTokensAt=c(c$,"getTokensAt",function(a,b){if(null==a)return null;var d=a.length;if(0>b||b>d)return null;var c=JU.PT.countTokens(a,b),f=Array(c),h=E(1,0);h[0]=b;for(var e=0;e<c;++e)f[e]=JU.PT.parseTokenChecked(a,d,h);return f},"~S,~N");c$.countChar=c(c$,"countChar",function(a,b){for(var d=0,c=a.lastIndexOf(b)+1;0<=--c;)a.charAt(c)==b&&d++;return d},"~S,~S");c$.countTokens=c(c$,"countTokens",function(a,b){var d=0;if(null!=a)for(var c=a.length;;){for(;b<c&&JU.PT.isWhiteSpace(a,b);)++b;if(b==c)break;
++d;do++b;while(b<c&&!JU.PT.isWhiteSpace(a,b))}return d},"~S,~N");c$.parseTokenNext=c(c$,"parseTokenNext",function(a,b){var d=a.length;return 0>b[0]||b[0]>=d?null:JU.PT.parseTokenChecked(a,d,b)},"~S,~A");c$.parseTokenRange=c(c$,"parseTokenRange",function(a,b,d){var c=a.length;b>c&&(b=c);return 0>d[0]||d[0]>=b?null:JU.PT.parseTokenChecked(a,b,d)},"~S,~N,~A");c$.parseTokenChecked=c(c$,"parseTokenChecked",function(a,b,d){for(var c=d[0];c<b&&JU.PT.isWhiteSpace(a,c);)++c;for(var f=c;c<b&&!JU.PT.isWhiteSpace(a,
c);)++c;d[0]=c;return f==c?null:a.substring(f,c)},"~S,~N,~A");c$.parseTrimmedChecked=c(c$,"parseTrimmedChecked",function(a,b,d){for(;b<d&&JU.PT.isWhiteSpace(a,b);)++b;for(d-=1;d>=b&&JU.PT.isWhiteSpace(a,d);)--d;return d<b?"":a.substring(b,d+1)},"~S,~N,~N");c$.dVal=c(c$,"dVal",function(a){if(null==a)throw new NumberFormatException("null");var b=parseFloat(a);if(isNaN(b))throw new NumberFormatException("Not a Number : "+a);return b},"~S");c$.fVal=c(c$,"fVal",function(a){return this.dVal(a)},"~S");c$.parseIntRange=
c(c$,"parseIntRange",function(a,b,d){var c=a.length;b>c&&(b=c);return 0>d[0]||d[0]>=b?-2147483648:JU.PT.parseIntChecked(a,b,d)},"~S,~N,~A");c$.parseFloatArrayData=c(c$,"parseFloatArrayData",function(a,b){JU.PT.parseFloatArrayDataN(a,b,b.length)},"~A,~A");c$.parseFloatArrayDataN=c(c$,"parseFloatArrayDataN",function(a,b,d){for(;0<=--d;)b[d]=d>=a.length?NaN:JU.PT.parseFloat(a[d])},"~A,~A,~N");c$.split=c(c$,"split",function(a,b){if(0==a.length)return[];var d=1,c=a.indexOf(b),f,h=b.length;if(0>c||0==h)return f=
Array(1),f[0]=a,f;for(var e=a.length-h;0<=c&&c<e;d++)c=a.indexOf(b,c+h);f=Array(d);for(var j=c=0,l=0;0<=(j=a.indexOf(b,c))&&l+1<d;)f[l++]=a.substring(c,j),c=j+h;a.indexOf(b,e)!=e&&(e+=h);f[l]=a.substring(c,e);return f},"~S,~S");c$.getQuotedStringAt=c(c$,"getQuotedStringAt",function(a,b){var d=E(-1,[b]);return JU.PT.getQuotedStringNext(a,d)},"~S,~N");c$.getQuotedStringNext=c(c$,"getQuotedStringNext",function(a,b){var d=b[0];if(0>d||0>(d=a.indexOf('"',d)))return"";for(var c=d+1,f=a.length;++d<f&&'"'!=
a.charAt(d);)"\\"==a.charAt(d)&&d++;b[0]=d+1;return a.substring(c,d)},"~S,~A");c$.getQuotedOrUnquotedAttribute=c(c$,"getQuotedOrUnquotedAttribute",function(a,b){if(null==a||null==b)return null;var d=a.toLowerCase().indexOf(b.toLowerCase()+"=");if(0>d||(d=d+b.length+1)>=a.length)return"";var c=a.charAt(d);switch(c){case "'":case '"':d++;break;default:c=" ",a+=" "}c=a.indexOf(c,d);return 0>c?null:a.substring(d,c)},"~S,~S");c$.getCSVString=c(c$,"getCSVString",function(a,b){var d=b[1];if(0>d||0>(d=a.indexOf('"',
d)))return null;for(var c=b[0]=d,f=a.length,h=!1,e=!1;++d<f&&('"'!=a.charAt(d)||(h=d+1<f&&'"'==a.charAt(d+1)));)h&&(h=!1,e=!0,d++);if(d>=f)return b[1]=-1,null;b[1]=d+1;d=a.substring(c+1,d);return e?JU.PT.rep(JU.PT.rep(d,'""',"\x00"),"\x00",'"'):d},"~S,~A");c$.isOneOf=c(c$,"isOneOf",function(a,b){if(0==b.length)return!1;";"!=b.charAt(0)&&(b=";"+b+";");return 0>a.indexOf(";")&&0<=b.indexOf(";"+a+";")},"~S,~S");c$.getQuotedAttribute=c(c$,"getQuotedAttribute",function(a,b){var d=a.indexOf(b+"=");return 0>
d?null:JU.PT.getQuotedStringAt(a,d)},"~S,~S");c$.approx=c(c$,"approx",function(a,b){return Math.round(a*b)/b},"~N,~N");c$.rep=c(c$,"rep",function(a,b,d){if(null==a||0==b.length||0>a.indexOf(b))return a;var c=0<=d.indexOf(b);do a=a.$replace(b,d);while(!c&&0<=a.indexOf(b));return a},"~S,~S,~S");c$.formatF=c(c$,"formatF",function(a,b,d,c,f){return JU.PT.formatS(JU.DF.formatDecimal(a,d),b,0,c,f)},"~N,~N,~N,~B,~B");c$.formatD=c(c$,"formatD",function(a,b,d,c,f){return JU.PT.formatS(JU.DF.formatDecimal(a,
-1-d),b,0,c,f)},"~N,~N,~N,~B,~B,~B");c$.formatS=c(c$,"formatS",function(a,b,d,c,f){if(null==a)return"";var h=a.length;2147483647!=d&&0<d&&d<h?a=a.substring(0,d):0>d&&0<=h+d&&(a=a.substring(h+d+1));d=b-a.length;if(0>=d)return a;b=f&&!c&&"-"==a.charAt(0);f=f?"0":" ";var e=b?"-":f,h=new JU.SB;c&&h.append(a);for(h.appendC(e);0<--d;)h.appendC(f);c||h.append(b?f+a.substring(1):a);return h.toString()},"~S,~N,~N,~B,~B");c$.replaceWithCharacter=c(c$,"replaceWithCharacter",function(a,b,d){if(null==a)return null;
for(var c=b.length;0<=--c;)a=a.$replace(b.charAt(c),d);return a},"~S,~S,~S");c$.replaceAllCharacters=c(c$,"replaceAllCharacters",function(a,b,d){for(var c=b.length;0<=--c;){var f=b.substring(c,c+1);a=JU.PT.rep(a,f,d)}return a},"~S,~S,~S");c$.trim=c(c$,"trim",function(a,b){if(null==a||0==a.length)return a;if(0==b.length)return a.trim();for(var d=a.length,c=0;c<d&&0<=b.indexOf(a.charAt(c));)c++;for(d=a.length-1;d>c&&0<=b.indexOf(a.charAt(d));)d--;return a.substring(c,d+1)},"~S,~S");c$.trimQuotes=c(c$,
"trimQuotes",function(a){return null!=a&&1<a.length&&a.startsWith('"')&&a.endsWith('"')?a.substring(1,a.length-1):a},"~S");c$.isNonStringPrimitive=c(c$,"isNonStringPrimitive",function(a){return"number"==typeof a||"boolean"==typeof a?!0:w(a,Number)||w(a,Boolean)},"~O");c$.toJSON=c(c$,"toJSON",function(a,b){if(null==b)return JU.PT.packageJSON(a,null);if(JU.PT.isNonStringPrimitive(b))return JU.PT.packageJSON(a,b.toString());for(var d=null,c=null;;){if(w(b,String)){d=b;"undefined"==typeof d&&(d="null");
0!=d.indexOf('{"')&&(d=JU.PT.esc(d));break}if(w(b,javajs.api.JSONEncodable)){if(null==(d=b.toJSON()))d="null";break}c=new JU.SB;if(w(b,java.util.Map)){c.append("{ ");for(var f="",h,e=b.keySet().iterator();e.hasNext()&&((h=e.next())||1);)null==h&&(h="null"),c.append(f).append(JU.PT.packageJSON(h,JU.PT.toJSON(null,b.get(h)))),f=",";c.append(" }");break}if(w(b,JU.Lst)){c.append("[ ");h=b.size();for(f=0;f<h;f++)0<f&&c.appendC(","),c.append(JU.PT.toJSON(null,b.get(f)));c.append(" ]");break}if(w(b,JU.M34)){h=
w(b,JU.M4)?4:3;var e=U(h,0),j=b;c.appendC("[");for(f=0;f<h;f++)0<f&&c.appendC(","),j.getRow(f,e),c.append(JU.PT.toJSON(null,e));c.appendC("]");break}d=JU.PT.nonArrayString(b);if(null==d){c.append("[");h=JU.AU.getLength(b);f=null;f=b[0];"number"!=typeof f&&(f=null);if(null!=f)c.appendO(b);else for(f=0;f<h;f++)0<f&&c.appendC(","),c.append(JU.PT.toJSON(null,JU.PT.arrayGet(b,f)));c.append("]");break}b=b.toString()}return JU.PT.packageJSON(a,null==d?c.toString():d)},"~S,~O");c$.arrayGet=c(c$,"arrayGet",
function(a,b){return a[b]},"~O,~N");c$.nonArrayString=c(c$,"nonArrayString",function(a){return a.constructor==Array||a.BYTES_PER_ELEMENT?null:a.toString()},"~O");c$.byteArrayToJSON=c(c$,"byteArrayToJSON",function(a){var b=new JU.SB;b.append("[");for(var d=a.length,c=0;c<d;c++)0<c&&b.appendC(","),b.appendI(a[c]&255);b.append("]");return b.toString()},"~A");c$.packageJSON=c(c$,"packageJSON",function(a,b){return null==a?b:'"'+a+'": '+b},"~S,~S");c$.escapeUrl=c(c$,"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");c$.esc=c(c$,"esc",function(a){if(null==a||0==a.length)return'""';for(var b=!1,d=0;10>d;d+=2)if(0<=a.indexOf('\\\\\tt\rr\nn""'.charAt(d))){b=!0;break}if(b)for(;10>d;){for(var b=-1,c='\\\\\tt\rr\nn""'.charAt(d++),f='\\\\\tt\rr\nn""'.charAt(d++),h=new JU.SB,e=0;0<=(b=a.indexOf(c,b+1));)h.append(a.substring(e,b)).appendC("\\").appendC(f),
e=b+1;h.append(a.substring(e,a.length));a=h.toString()}return'"'+JU.PT.escUnicode(a)+'"'},"~S");c$.escUnicode=c(c$,"escUnicode",function(a){for(var b=a.length;0<=--b;)if(127<a.charCodeAt(b)){var d="0000"+Integer.toHexString(a.charCodeAt(b));a=a.substring(0,b)+"\\u"+d.substring(d.length-4)+a.substring(b+1)}return a},"~S");c$.escF=c(c$,"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");c$.join=c(c$,"join",function(a,b,d){if(a.length<
d)return null;var c=new JU.SB;for(c.append(a[d++]);d<a.length;d++)c.appendC(b).append(a[d]);return c.toString()},"~A,~S,~N");c$.isLike=c(c$,"isLike",function(a,b){var d=a.equals(b);if(d)return!0;var c=b.startsWith("*"),f=b.endsWith("*");return!c&&!f?d:c&&f?1==b.length||a.contains(b.substring(1,b.length-1)):c?a.endsWith(b.substring(1)):a.startsWith(b.substring(0,b.length-1))},"~S,~S");c$.getMapValueNoCase=c(c$,"getMapValueNoCase",function(a,b){if("this".equals(b))return a;var d=a.get(b);if(null==d)for(var c,
f=a.entrySet().iterator();f.hasNext()&&((c=f.next())||1);)if(c.getKey().equalsIgnoreCase(b))return c.getValue();return d},"java.util.Map,~S");c$.clean=c(c$,"clean",function(a){return JU.PT.rep(JU.PT.replaceAllCharacters(a," \t\n\r"," "),"  "," ").trim()},"~S");c$.fdup=c(c$,"fdup",function(a,b,d){for(var c,f=0,h=b;1<=--h;)if(!JU.PT.isDigit(c=a.charAt(h)))switch(c){case ".":if(0!=f++)return a;continue;case "-":if(1!=h&&"."!=a.charAt(h-1))return a;continue;default:return a}c=a.substring(0,b+1);f=new JU.SB;
for(h=0;h<d;h++)f.append(c);f.append(a.substring(b+1));return f.toString()},"~S,~N,~N");c$.formatString=c(c$,"formatString",function(a,b,d,c,f,h){if(null==a)return null;if("".equals(a))return"";var e=b.length;if(0>a.indexOf("%")||0==e||0>a.indexOf(b))return a;var j="",l,p,m;for(l=0;0<=(p=a.indexOf("%",l))&&0<=(m=a.indexOf(b,p+1));)if(l!=p&&(j+=a.substring(l,p)),l=p+1,m>p+6)j+="%";else try{var n=!1;"-"==a.charAt(l)&&(n=!0,++l);var k=!1;"0"==a.charAt(l)&&(k=!0,++l);for(var q,r=0;"0"<=(q=a.charAt(l))&&
"9">=q;)r=10*r+(q.charCodeAt(0)-48),++l;var s=2147483647,t=!1;if("."==a.charAt(l)){++l;if("-"==(q=a.charAt(l)))t=!0,++l;if("0"<=(q=a.charAt(l))&&"9">=q)if(s=q.charCodeAt(0)-48,++l,"0"<=(q=a.charAt(l))&&"9">=q)s=10*s+(q.charCodeAt(0)-48),++l;t&&(s=-s)}if(a.substring(l,l+e).equals(b)){if(l+=e,Float.isNaN(c)?null!=d?j+=JU.PT.formatS(d,r,0>s?s-1:s,n,k):Double.isNaN(f)||(j+=JU.PT.formatD(f,r,s-1,n,k,!0)):j+=JU.PT.formatF(c,r,s,n,k),h)break}else l=p+1,j+="%"}catch(w){if(z(w,IndexOutOfBoundsException)){l=
p;break}else throw w;}return j+=a.substring(l)},"~S,~S,~S,~N,~N,~B");c$.formatStringS=c(c$,"formatStringS",function(a,b,d){return JU.PT.formatString(a,b,d,NaN,NaN,!1)},"~S,~S,~S");c$.formatStringF=c(c$,"formatStringF",function(a,b,d){return JU.PT.formatString(a,b,null,d,NaN,!1)},"~S,~S,~N");c$.formatStringI=c(c$,"formatStringI",function(a,b,d){return JU.PT.formatString(a,b,""+d,NaN,NaN,!1)},"~S,~S,~N");c$.sprintf=c(c$,"sprintf",function(a,b,d){if(null==d)return a;var c=b.length;if(c==d.length)try{for(var f=
0;f<c;f++)if(null!=d[f])switch(b.charAt(f)){case "s":a=JU.PT.formatString(a,"s",d[f],NaN,NaN,!0);break;case "f":a=JU.PT.formatString(a,"f",null,d[f].floatValue(),NaN,!0);break;case "i":a=JU.PT.formatString(a,"d",""+d[f],NaN,NaN,!0);a=JU.PT.formatString(a,"i",""+d[f],NaN,NaN,!0);break;case "d":a=JU.PT.formatString(a,"e",null,NaN,d[f].doubleValue(),!0);break;case "p":var h=d[f];a=JU.PT.formatString(a,"p",null,h.x,NaN,!0);a=JU.PT.formatString(a,"p",null,h.y,NaN,!0);a=JU.PT.formatString(a,"p",null,h.z,
NaN,!0);break;case "q":var e=d[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 "S":for(var j=d[f],l=0;l<j.length;l++)a=JU.PT.formatString(a,"s",j[l],NaN,NaN,!0);break;case "F":for(var p=d[f],l=0;l<p.length;l++)a=JU.PT.formatString(a,"f",null,p[l],NaN,!0);break;case "I":for(var m=d[f],l=0;l<m.length;l++)a=JU.PT.formatString(a,"d",""+m[l],NaN,NaN,!0);for(l=0;l<
m.length;l++)a=JU.PT.formatString(a,"i",""+m[l],NaN,NaN,!0);break;case "D":for(var n=d[f],l=0;l<n.length;l++)a=JU.PT.formatString(a,"e",null,NaN,n[l],!0)}return JU.PT.rep(a,"%%","%")}catch(k){if(!z(k,Exception))throw k;}System.out.println("TextFormat.sprintf error "+b+" "+a);return JU.PT.rep(a,"%","?")},"~S,~S,~A");c$.formatCheck=c(c$,"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 b=new JU.SB;b.append(a[0]);for(var d=1;d<a.length;d++){var c="%"+a[d],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)}b.append(c)}return b.toString().$replace("\u0001","%")},"~S");c$.leftJustify=c(c$,"leftJustify",function(a,b,d){a.append(d);d=b.length-d.length;0<d&&a.append(b.substring(0,d))},"JU.SB,~S,~S");c$.rightJustify=c(c$,"rightJustify",function(a,b,d){var c=b.length-d.length;0<c&&a.append(b.substring(0,c));
a.append(d)},"JU.SB,~S,~S");c$.safeTruncate=c(c$,"safeTruncate",function(a,b){-0.001<a&&0.001>a&&(a=0);return(a+"         ").substring(0,b)},"~N,~N");c$.isWild=c(c$,"isWild",function(a){return null!=a&&(0<=a.indexOf("*")||0<=a.indexOf("?"))},"~S");c$.isMatch=c(c$,"isMatch",function(a,b,d,c){if(a.equals(b))return!0;var f=b.length;if(0==f)return!1;var h=d&&c?"*"==b.charAt(0):!1;if(1==f&&h)return!0;var e=d&&b.endsWith("*");if(!(0<=b.indexOf("?"))){if(h)return e?3>f||0<=a.indexOf(b.substring(1,f-1)):
a.endsWith(b.substring(1));if(e)return a.startsWith(b.substring(0,f-1))}for(var j=a.length,l="????",p=4;p<j;)l+=l,p+=4;d&&(h&&(b=l+b.substring(1),f+=p-1),e&&(b=b.substring(0,f-1)+l,f+=p-1));if(f<j)return!1;for(d=0;f>j;){if(c&&"?"==b.charAt(d))++d;else if("?"!=b.charAt(d+f-1))return!1;--f}for(c=j;0<=--c;)if(f=b.charAt(d+c),"?"!=f&&(j=a.charAt(c),f!=j&&("\u0001"!=f||"?"!=j)))return!1;return!0},"~S,~S,~B,~B");c$.replaceQuotedStrings=c(c$,"replaceQuotedStrings",function(a,b,d){for(var c=b.size(),f=0;f<
c;f++){var h=b.get(f),e=d.get(f);e.equals(h)||(a=JU.PT.rep(a,'"'+h+'"','"'+e+'"'))}return a},"~S,JU.Lst,JU.Lst");c$.replaceStrings=c(c$,"replaceStrings",function(a,b,d){for(var c=b.size(),f=0;f<c;f++){var h=b.get(f),e=d.get(f);e.equals(h)||(a=JU.PT.rep(a,h,e))}return a},"~S,JU.Lst,JU.Lst");c$.isDigit=c(c$,"isDigit",function(a){a=a.charCodeAt(0);return 48<=a&&57>=a},"~S");c$.isUpperCase=c(c$,"isUpperCase",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a},"~S");c$.isLowerCase=c(c$,"isLowerCase",function(a){a=
a.charCodeAt(0);return 97<=a&&122>=a},"~S");c$.isLetter=c(c$,"isLetter",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a||97<=a&&122>=a},"~S");c$.isLetterOrDigit=c(c$,"isLetterOrDigit",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a||97<=a&&122>=a||48<=a&&57>=a},"~S");c$.isWhitespace=c(c$,"isWhitespace",function(a){a=a.charCodeAt(0);return 28<=a&&32>=a||9<=a&&13>=a},"~S");c$.fixPtFloats=c(c$,"fixPtFloats",function(a,b){a.x=Math.round(a.x*b)/b;a.y=Math.round(a.y*b)/b;a.z=Math.round(a.z*b)/b},"JU.T3,~N");
c$.fixDouble=c(c$,"fixDouble",function(a,b){return Math.round(a*b)/b},"~N,~N");c$.parseFloatFraction=c(c$,"parseFloatFraction",function(a){var b=a.indexOf("/");return 0>b?JU.PT.parseFloat(a):JU.PT.parseFloat(a.substring(0,b))/JU.PT.parseFloat(a.substring(b+1))},"~S");D(c$,"tensScale",U(-1,[10,100,1E3,1E4,1E5,1E6]),"decimalScale",U(-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]),"FLOAT_MIN_SAFE",2E-45,"escapable",'\\\\\tt\rr\nn""',"FRACTIONAL_PRECISION",1E5,"CARTESIAN_PRECISION",
1E4)});r("JU");c$=q(function(){this.s=this.sb=null;n(this,arguments)},JU,"SB");m(c$,function(){this.s=""});c$.newN=c(c$,"newN",function(){return new JU.SB},"~N");c$.newS=c(c$,"newS",function(a){var b=new JU.SB;b.s=a;return b},"~S");c(c$,"append",function(a){this.s+=a;return this},"~S");c(c$,"appendC",function(a){this.s+=a;return this},"~S");c(c$,"appendI",function(a){this.s+=a;return this},"~N");c(c$,"appendB",function(a){this.s+=a;return this},"~B");c(c$,"appendF",function(a){a=""+a;0>a.indexOf(".")&&
0>a.indexOf("e")&&(a+=".0");this.s+=a;return this},"~N");c(c$,"appendD",function(a){a=""+a;0>a.indexOf(".")&&0>a.indexOf("e")&&(a+=".0");this.s+=a;return this},"~N");c(c$,"appendSB",function(a){this.s+=a.s;return this},"JU.SB");c(c$,"appendO",function(a){null!=a&&(this.s+=a.toString());return this},"~O");c(c$,"appendCB",function(a,b,d){this.s+=a.slice(b,b+d).join("")},"~A,~N,~N");e(c$,"toString",function(){return this.s});c(c$,"length",function(){return this.s.length});c(c$,"indexOf",function(a){return this.s.indexOf(a)},
"~S");c(c$,"charAt",function(a){return this.s.charAt(a)},"~N");c(c$,"charCodeAt",function(a){return this.s.charCodeAt(a)},"~N");c(c$,"setLength",function(a){this.s=this.s.substring(0,a)},"~N");c(c$,"lastIndexOf",function(a){return this.s.lastIndexOf(a)},"~S");c(c$,"indexOf2",function(a,b){return this.s.indexOf(a,b)},"~S,~N");c(c$,"substring",function(a){return this.s.substring(a)},"~N");c(c$,"substring2",function(a,b){return this.s.substring(a,b)},"~N,~N");c(c$,"toBytes",function(a,b){return 0==b?
K(0,0):(0<b?this.substring2(a,a+b):0==a?this.toString():this.substring2(a,this.length()-a)).getBytes("UTF-8")},"~N,~N");c(c$,"replace",function(a,b,d){this.s=this.s.substring(0,a)+d+this.s.substring(b)},"~N,~N,~S");c(c$,"insert",function(a,b){this.replace(a,a,b)},"~N,~S");r("JU");s(["javajs.api.JSONEncodable"],"JU.T3",["java.lang.Float"],function(){c$=q(function(){this.z=this.y=this.x=0;n(this,arguments)},JU,"T3",null,[javajs.api.JSONEncodable,java.io.Serializable]);c(c$,"set",function(a,b,d){this.x=
a;this.y=b;this.z=d},"~N,~N,~N");c(c$,"setA",function(a){this.x=a[0];this.y=a[1];this.z=a[2]},"~A");c(c$,"setT",function(a){this.x=a.x;this.y=a.y;this.z=a.z},"JU.T3");c(c$,"add2",function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z},"JU.T3,JU.T3");c(c$,"add",function(a){this.x+=a.x;this.y+=a.y;this.z+=a.z},"JU.T3");c(c$,"distanceSquared",function(a){var b=this.x-a.x,d=this.y-a.y;a=this.z-a.z;return b*b+d*d+a*a},"JU.T3");c(c$,"distance",function(a){return Math.sqrt(this.distanceSquared(a))},
"JU.T3");c(c$,"sub2",function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z},"JU.T3,JU.T3");c(c$,"sub",function(a){this.x-=a.x;this.y-=a.y;this.z-=a.z},"JU.T3");c(c$,"scale",function(a){this.x*=a;this.y*=a;this.z*=a},"~N");c(c$,"add3",function(a,b,d){this.x+=a;this.y+=b;this.z+=d},"~N,~N,~N");c(c$,"scaleT",function(a){this.x*=a.x;this.y*=a.y;this.z*=a.z},"JU.T3");c(c$,"scaleAdd2",function(a,b,d){this.x=a*b.x+d.x;this.y=a*b.y+d.y;this.z=a*b.z+d.z},"~N,JU.T3,JU.T3");c(c$,"ave",function(a,b){this.x=
(a.x+b.x)/2;this.y=(a.y+b.y)/2;this.z=(a.z+b.z)/2},"JU.T3,JU.T3");c(c$,"dot",function(a){return this.x*a.x+this.y*a.y+this.z*a.z},"JU.T3");c(c$,"lengthSquared",function(){return this.x*this.x+this.y*this.y+this.z*this.z});c(c$,"length",function(){return Math.sqrt(this.lengthSquared())});c(c$,"normalize",function(){var a=this.length();this.x/=a;this.y/=a;this.z/=a});c(c$,"cross",function(a,b){this.set(a.y*b.z-a.z*b.y,a.z*b.x-a.x*b.z,a.x*b.y-a.y*b.x)},"JU.T3,JU.T3");e(c$,"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});c$.floatToIntBits=c(c$,"floatToIntBits",function(a){return 0==a?0:Float.floatToIntBits(a)},"~N");e(c$,"equals",function(a){return!w(a,JU.T3)?!1:this.x==a.x&&this.y==a.y&&this.z==a.z},"~O");e(c$,"toString",function(){return"{"+this.x+", "+this.y+", "+this.z+"}"});e(c$,"toJSON",function(){return"["+this.x+","+this.y+","+this.z+"]"})});r("JU");c$=q(function(){this.z=this.y=this.x=
0;n(this,arguments)},JU,"T3i",null,java.io.Serializable);m(c$,function(){});c(c$,"set",function(a,b,d){this.x=a;this.y=b;this.z=d},"~N,~N,~N");c(c$,"setT",function(a){this.x=a.x;this.y=a.y;this.z=a.z},"JU.T3i");c(c$,"add",function(a){this.x+=a.x;this.y+=a.y;this.z+=a.z},"JU.T3i");c(c$,"scaleAdd",function(a,b,d){this.x=a*b.x+d.x;this.y=a*b.y+d.y;this.z=a*b.z+d.z},"~N,JU.T3i,JU.T3i");e(c$,"hashCode",function(){return this.x^this.y^this.z});e(c$,"equals",function(a){return!w(a,JU.T3i)?!1:this.x==a.x&&
this.y==a.y&&this.z==a.z},"~O");e(c$,"toString",function(){return"("+this.x+", "+this.y+", "+this.z+")"});r("JU");s(["JU.T3"],"JU.T4",null,function(){c$=q(function(){this.w=0;n(this,arguments)},JU,"T4",JU.T3);c(c$,"set4",function(a,b,d,c){this.x=a;this.y=b;this.z=d;this.w=c},"~N,~N,~N,~N");c(c$,"scale4",function(a){this.scale(a);this.w*=a},"~N");e(c$,"hashCode",function(){return JU.T3.floatToIntBits(this.x)^JU.T3.floatToIntBits(this.y)^JU.T3.floatToIntBits(this.z)^JU.T3.floatToIntBits(this.w)});e(c$,
"equals",function(a){return!w(a,JU.T4)?!1:this.x==a.x&&this.y==a.y&&this.z==a.z&&this.w==a.w},"~O");e(c$,"toString",function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"});e(c$,"toJSON",function(){return"["+this.x+", "+this.y+", "+this.z+", "+this.w+"]"})});r("JU");s(["JU.T3"],"JU.V3",null,function(){c$=t(JU,"V3",JU.T3);m(c$,function(){});c$.newV=c(c$,"newV",function(a){return JU.V3.new3(a.x,a.y,a.z)},"JU.T3");c$.newVsub=c(c$,"newVsub",function(a,b){return JU.V3.new3(a.x-b.x,a.y-b.y,
a.z-b.z)},"JU.T3,JU.T3");c$.new3=c(c$,"new3",function(a,b,d){var c=new JU.V3;c.x=a;c.y=b;c.z=d;return c},"~N,~N,~N");c(c$,"angle",function(a){var b=this.y*a.z-this.z*a.y,d=this.z*a.x-this.x*a.z,c=this.x*a.y-this.y*a.x,b=Math.sqrt(b*b+d*d+c*c);return Math.abs(Math.atan2(b,this.dot(a)))},"JU.V3")});r("JU");s(["JU.LoggerInterface"],"JU.DefaultLogger",["JU.Logger"],function(){c$=t(JU,"DefaultLogger",null,JU.LoggerInterface);c(c$,"log",function(a,b,d,c){a===System.err&&System.out.flush();if(null!=a&&(null!=
d||null!=c))if(a.println((JU.Logger.logLevel()?"["+JU.Logger.getLevel(b)+"] ":"")+(null!=d?d:"")+(null!=c?": "+c.toString():"")),null!=c&&(b=c.getStackTrace(),null!=b))for(d=0;d<b.length;d++)a.println(b[d].getClassName()+" - "+b[d].getLineNumber()+" - "+b[d].getMethodName());a===System.err&&System.err.flush()},"java.io.PrintStream,~N,~S,Throwable");e(c$,"debug",function(a){this.log(System.out,5,a,null)},"~S");e(c$,"info",function(a){this.log(System.out,4,a,null)},"~S");e(c$,"warn",function(a){this.log(System.out,
3,a,null)},"~S");e(c$,"warnEx",function(a,b){this.log(System.out,3,a,b)},"~S,Throwable");e(c$,"error",function(a){this.log(System.err,2,a,null)},"~S");e(c$,"errorEx",function(a,b){this.log(System.err,2,a,b)},"~S,Throwable");e(c$,"fatal",function(a){this.log(System.err,1,a,null)},"~S");e(c$,"fatalEx",function(a,b){this.log(System.err,1,a,b)},"~S,Throwable")});r("JU");s(["java.util.Hashtable","JU.DefaultLogger"],"JU.Logger",["java.lang.Long"],function(){c$=t(JU,"Logger");c$.getProperty=c(c$,"getProperty",
function(a,b){try{var d=System.getProperty("jmol.logger."+a,null);if(null!=d)return d.equalsIgnoreCase("true")}catch(c){if(!z(c,Exception))throw c;}return b},"~S,~B");c$.setLogger=c(c$,"setLogger",function(a){JU.Logger._logger=a;JU.Logger.debugging=JU.Logger.isActiveLevel(5)||JU.Logger.isActiveLevel(6);JU.Logger.debuggingHigh=JU.Logger.debugging&&JU.Logger._activeLevels[6]},"JU.LoggerInterface");c$.isActiveLevel=c(c$,"isActiveLevel",function(a){return null!=JU.Logger._logger&&0<=a&&7>a&&JU.Logger._activeLevels[a]},
"~N");c$.setActiveLevel=c(c$,"setActiveLevel",function(a,b){0>a&&(a=0);7<=a&&(a=6);JU.Logger._activeLevels[a]=b;JU.Logger.debugging=JU.Logger.isActiveLevel(5)||JU.Logger.isActiveLevel(6);JU.Logger.debuggingHigh=JU.Logger.debugging&&JU.Logger._activeLevels[6]},"~N,~B");c$.setLogLevel=c(c$,"setLogLevel",function(a){for(var b=7;0<=--b;)JU.Logger.setActiveLevel(b,b<=a)},"~N");c$.getLevel=c(c$,"getLevel",function(a){switch(a){case 6:return"DEBUGHIGH";case 5:return"DEBUG";case 4:return"INFO";case 3:return"WARN";
case 2:return"ERROR";case 1:return"FATAL"}return"????"},"~N");c$.logLevel=c(c$,"logLevel",function(){return JU.Logger._logLevel});c$.doLogLevel=c(c$,"doLogLevel",function(a){JU.Logger._logLevel=a},"~B");c$.debug=c(c$,"debug",function(a){if(JU.Logger.debugging)try{JU.Logger._logger.debug(a)}catch(b){}},"~S");c$.info=c(c$,"info",function(a){try{JU.Logger.isActiveLevel(4)&&JU.Logger._logger.info(a)}catch(b){}},"~S");c$.warn=c(c$,"warn",function(a){try{JU.Logger.isActiveLevel(3)&&JU.Logger._logger.warn(a)}catch(b){}},
"~S");c$.warnEx=c(c$,"warnEx",function(a,b){try{JU.Logger.isActiveLevel(3)&&JU.Logger._logger.warnEx(a,b)}catch(d){}},"~S,Throwable");c$.error=c(c$,"error",function(a){try{JU.Logger.isActiveLevel(2)&&JU.Logger._logger.error(a)}catch(b){}},"~S");c$.errorEx=c(c$,"errorEx",function(a,b){try{JU.Logger.isActiveLevel(2)&&JU.Logger._logger.errorEx(a,b)}catch(d){}},"~S,Throwable");c$.getLogLevel=c(c$,"getLogLevel",function(){for(var a=7;0<=--a;)if(JU.Logger.isActiveLevel(a))return a;return 0});c$.fatal=c(c$,
"fatal",function(a){try{JU.Logger.isActiveLevel(1)&&JU.Logger._logger.fatal(a)}catch(b){}},"~S");c$.fatalEx=c(c$,"fatalEx",function(a,b){try{JU.Logger.isActiveLevel(1)&&JU.Logger._logger.fatalEx(a,b)}catch(d){}},"~S,Throwable");c$.startTimer=c(c$,"startTimer",function(a){null!=a&&JU.Logger.htTiming.put(a,Long.$valueOf(System.currentTimeMillis()))},"~S");c$.getTimerMsg=c(c$,"getTimerMsg",function(a,b){0==b&&(b=JU.Logger.getTimeFrom(a));return"Time for "+a+": "+b+" ms"},"~S,~N");c$.getTimeFrom=c(c$,
"getTimeFrom",function(a){var b;return null==a||null==(b=JU.Logger.htTiming.get(a))?-1:System.currentTimeMillis()-b.longValue()},"~S");c$.checkTimer=c(c$,"checkTimer",function(a,b){var d=JU.Logger.getTimeFrom(a);0<=d&&!a.startsWith("(")&&JU.Logger.info(JU.Logger.getTimerMsg(a,d));b&&JU.Logger.startTimer(a);return d},"~S,~B");c$.checkMemory=c(c$,"checkMemory",function(){JU.Logger.info("Memory: Total-Free=0; Total=0; Free=0; Max=0")});c$._logger=c$.prototype._logger=new JU.DefaultLogger;D(c$,"LEVEL_FATAL",
1,"LEVEL_ERROR",2,"LEVEL_WARN",3,"LEVEL_INFO",4,"LEVEL_DEBUG",5,"LEVEL_DEBUGHIGH",6,"LEVEL_MAX",7,"_activeLevels",fa(7,!1),"_logLevel",!1,"debugging",!1,"debuggingHigh",!1);JU.Logger._activeLevels[6]=JU.Logger.getProperty("debugHigh",!1);JU.Logger._activeLevels[5]=JU.Logger.getProperty("debug",!1);JU.Logger._activeLevels[4]=JU.Logger.getProperty("info",!0);JU.Logger._activeLevels[3]=JU.Logger.getProperty("warn",!0);JU.Logger._activeLevels[2]=JU.Logger.getProperty("error",!0);JU.Logger._activeLevels[1]=
JU.Logger.getProperty("fatal",!0);JU.Logger._logLevel=JU.Logger.getProperty("logLevel",!1);JU.Logger.debugging=null!=JU.Logger._logger&&(JU.Logger._activeLevels[5]||JU.Logger._activeLevels[6]);JU.Logger.debuggingHigh=JU.Logger.debugging&&JU.Logger._activeLevels[6];c$.htTiming=c$.prototype.htTiming=new java.util.Hashtable});r("JU");C(JU,"LoggerInterface");r("J.api");C(J.api,"JmolJDXMOLParser");r("J.api");C(J.api,"JmolJDXMOLReader");r("J.jsv");s(["J.api.JmolJDXMOLParser"],"J.jsv.JDXMOLParser","java.util.Hashtable JU.BS $.Lst $.PT $.SB JU.Logger".split(" "),
function(){c$=q(function(){this.line=null;this.lastModel="";this.baseModel=this.thisModelID=null;this.vibScale=0;this.loader=this.piUnitsY=this.piUnitsX=null;this.modelIdList="";this.peakFilePath=this.peakIndex=null;n(this,arguments)},J.jsv,"JDXMOLParser",null,J.api.JmolJDXMOLParser);m(c$,function(){});e(c$,"set",function(a,b,d){this.loader=a;this.peakFilePath=b;this.peakIndex=E(1,0);null!=d&&(d.remove("modelNumber"),d.containsKey("zipSet")&&(this.peakIndex=d.get("peakIndex"),null==this.peakIndex&&
(this.peakIndex=E(1,0),d.put("peakIndex",this.peakIndex)),d.containsKey("subFileName")||(this.peakFilePath=JU.PT.split(b,"|")[0])));return this},"J.api.JmolJDXMOLReader,~S,java.util.Map");e(c$,"getAttribute",function(a,b){var d=JU.PT.getQuotedAttribute(a,b);return null==d?"":d},"~S,~S");e(c$,"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(c$,"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(c$,"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(c$,"readACDAssignments",function(a,b){var d=new JU.Lst;try{this.readLine();
0>a&&(a=2147483647);for(var c=0;c<a;c++){var f=this.readLine();if(null==f||0==f.indexOf("#"))break;if(b){for(;0>f.indexOf(">");)f+=" "+this.readLine();f=f.trim()}f=JU.PT.replaceAllCharacters(f,"()<>"," ").trim();if(0==f.length)break;var h=f.indexOf("'");if(0<=h)var e=f.indexOf("'",h+1),f=f.substring(0,h)+JU.PT.rep(f.substring(h+1,e),",",";")+f.substring(e+1);JU.Logger.info("Peak Assignment: "+f);var j=JU.PT.split(f,",");d.addLast(j)}}catch(l){if(z(l,Exception))JU.Logger.error("Error reading peak assignments at "+
this.line+": "+l);else throw l;}return d},"~N,~B");e(c$,"setACDAssignments",function(a,b,d,c,f){try{0<=d&&(this.peakIndex=E(-1,[d]));var h=0==b.indexOf("MASS"),e=" file="+JU.PT.esc(this.peakFilePath.$replace("\\","/"));a=" model="+JU.PT.esc(a+" (assigned)");this.piUnitsY=this.piUnitsX="";var j=this.getACDPeakWidth(b)/2,l=new java.util.Hashtable,p=new JU.Lst;d=null;var m,n,k=0;if(h){d=new java.util.Hashtable;for(var q=JU.PT.split(f,"M  ZZC"),r=q.length;1<=--r;){var s=JU.PT.getTokens(q[r]),k=Math.max(k,
JU.PT.parseInt(s[0]));d.put(s[1],s[0])}m=4;n=0}else 0<=b.indexOf("NMR")?(m=0,n=3):(m=0,n=2);for(var t=c.size(),r=0;r<t;r++){var w=c.get(r),x=JU.PT.parseFloat(w[m]),v=w[n],v=h?this.fixACDAtomList(v,d,k):v.$replace(";",",");if(0<=v.indexOf("select")){var y=v.indexOf("select atomno=");if(0>y)continue;v=JU.PT.split(v.substring(y+14)," ")[0]}var A=h?"m/z="+Math.round(x)+": "+w[2]+" ("+w[1]+")":2==n?""+Math.round(10*x)/10:null;this.getStringInfo(e,A,b,a,v,l,""+x,p,' atoms="%ATOMS%" xMin="'+(x-j)+'" xMax="'+
(x+j)+'">')}return this.setPeakData(p,0)}catch(B){if(z(B,Exception))return 0;throw B;}},"~S,~S,~N,JU.Lst,~S");c(c$,"fixACDAtomList",function(a,b,d){a=a.trim();a=JU.PT.getTokens(a.$replace(";"," "));for(var c=new JU.BS,f=!1,h=0;h<a.length;h++){var e=a[h];(f=0<=e.indexOf("M"))&&(e="1-"+d);var j=e.indexOf("-");if(0<=j)for(var l=JU.PT.parseInt(e.substring(0,j)),e=JU.PT.parseInt(e.substring(j+1))+1;l<e;l++)c.set(f?l:JU.PT.parseInt(b.get(""+l)));else c.set(JU.PT.parseInt(b.get(e)))}b=c.toJSON();return b.substring(1,
b.length-1)},"~S,java.util.Map,~N");c(c$,"getACDPeakWidth",function(a){return 0<=a.indexOf("HNMR")?0.05:0<=a.indexOf("CNMR")?1:0<=a.indexOf("MASS")?1:10},"~S");e(c$,"readPeaks",function(a,b){try{0<=b&&(this.peakIndex=E(-1,[b]));var d=a?1:0,c=a?"Signals":"Peaks",f=a?"<Signal":"<PeakData";if(!this.findRecord(c))return 0;var h=" file="+JU.PT.esc(this.peakFilePath.$replace("\\","/")),e=JU.PT.getQuotedAttribute(this.line,"model"),e=" model="+JU.PT.esc(null==e?this.thisModelID:e),j=JU.PT.getQuotedAttribute(this.line,
"type");this.piUnitsX=JU.PT.getQuotedAttribute(this.line,"xLabel");this.piUnitsY=JU.PT.getQuotedAttribute(this.line,"yLabel");for(var l=new java.util.Hashtable,p=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 m=JU.PT.getQuotedAttribute(this.line,"title");null==j&&(j=JU.PT.getQuotedAttribute(this.line,"type"));var n=JU.PT.getQuotedAttribute(this.line,"atoms"),k=I(100*JU.PT.parseFloat(JU.PT.getQuotedAttribute(this.line,
"xMin")))+"_"+I(100*JU.PT.parseFloat(JU.PT.getQuotedAttribute(this.line,"xMax")));this.getStringInfo(h,m,j,null==JU.PT.getQuotedAttribute(this.line,"model")?e:"",n,l,k,p,this.line.substring(f.length).trim())}return this.setPeakData(p,d)}catch(q){if(z(q,Exception))return 0;throw q;}},"~B,~N");c(c$,"setPeakData",function(a,b){for(var d=0,c=a.size(),f=0;f<c;f++){var h=a.get(f),e=JU.PT.rep(h[0],"%INDEX%",""+ ++this.peakIndex[0]),j=h[1];if(null!=j){for(var h="",l=j.nextSetBit(0);0<=l;l=j.nextSetBit(l+
1))h+=","+(l+b);j=j.cardinality();d+=j;e=JU.PT.rep(e,"%ATOMS%",h.substring(1));e=JU.PT.rep(e,"%S%",1==j?"":"s");e=JU.PT.rep(e,"%NATOMS%",""+j)}JU.Logger.info("adding PeakData "+e);this.loader.addPeakData(e)}this.loader.setSpectrumPeaks(d,this.piUnitsX,this.piUnitsY);return c},"JU.Lst,~N");c(c$,"getStringInfo",function(a,b,d,c,f,h,e,j,l){"HNMR".equals(d)?d="1HNMR":"CNMR".equals(d)&&(d="13CNMR");var p=null==d?"":" type="+JU.PT.esc(d);null==b&&(b="1HNMR".equals(d)?"atom%S%: %ATOMS%; integration: %NATOMS%":
"");b=" title="+JU.PT.esc(b);a="<PeakData "+a+' index="%INDEX%"'+b+p+c+" "+l;null!=f&&(a=JU.PT.rep(a,'atoms="'+f+'"','atoms="%ATOMS%"'));b=h.get(e);null==b&&(b=x(-1,[a,null==f?null:new JU.BS]),h.put(e,b),j.addLast(b));null!=f&&(h=b[1],f=f.$replace(","," "),f.equals("*")&&(f="0:1000"),h.or(JU.BS.unescape("({"+f+"})")))},"~S,~S,~S,~S,~S,java.util.Map,~S,JU.Lst,~S");c(c$,"getModelData",function(a){this.lastModel=this.thisModelID;this.thisModelID=this.getAttribute(this.line,"id");var b=";"+this.thisModelID+
";";if(0<=this.modelIdList.indexOf(b))this.line=this.loader.discardLinesUntilContains("</ModelData>");else{this.modelIdList+=b;for(this.baseModel=this.getAttribute(this.line,"baseModel");0>this.line.indexOf(">")&&0>this.line.indexOf("type");)this.readLine();b=this.getAttribute(this.line,"type").toLowerCase();this.vibScale=JU.PT.parseFloat(this.getAttribute(this.line,"vibrationScale"));b.equals("xyzvib")?b="xyz":0==b.length&&(b=null);for(var d=new JU.SB;null!=this.readLine()&&!this.line.contains("</ModelData>");)d.append(this.line).appendC("\n");
this.loader.processModelData(d.toString(),this.thisModelID,b,this.baseModel,this.lastModel,NaN,this.vibScale,a)}},"~B");c(c$,"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(c$,"readLine",function(){return this.line=this.loader.rd()});e(c$,"setLine",function(a){this.line=a},"~S")});r("JSV.api");C(JSV.api,"AnnotationData");
r("JSV.api");C(JSV.api,"AppletFrame");r("JSV.api");s(["JSV.api.JSVAppletInterface"],"JSV.api.JSVAppInterface",null,function(){C(JSV.api,"JSVAppInterface",JSV.api.JSVAppletInterface)});r("JSV.api");C(JSV.api,"JSVAppletInterface");r("JSV.api");C(JSV.api,"JSVFileHelper");r("JSV.api");s(["JSV.api.JSVViewPanel"],"JSV.api.JSVMainPanel",null,function(){C(JSV.api,"JSVMainPanel",JSV.api.JSVViewPanel)});r("JSV.api");s(["JSV.api.JSVViewPanel"],"JSV.api.JSVPanel",null,function(){C(JSV.api,"JSVPanel",JSV.api.JSVViewPanel)});
r("JSV.api");C(JSV.api,"JSVTree");r("JSV.api");C(JSV.api,"JSVTreeNode");r("JSV.api");C(JSV.api,"JSVTreePath");r("JSV.api");C(JSV.api,"JSVViewPanel");r("JSV.api");C(JSV.api,"JSVZipReader");r("JSV.api");C(JSV.api,"PanelListener");r("JSV.api");C(JSV.api,"ScriptInterface");r("JSV.app");s(["JSV.api.JSVAppInterface","$.PanelListener","$.ScriptInterface"],"JSV.app.JSVApp","java.lang.Double JU.Lst $.PT JSV.common.Coordinate $.JSVFileManager $.JSVersion $.JSViewer $.PeakPickEvent $.ScriptToken $.SubSpecChangeEvent $.ZoomEvent JU.Logger".split(" "),
function(){c$=q(function(){this.appletFrame=null;this.isNewWindow=!1;this.prevPanel=this.vwr=this.syncCallbackFunctionName=this.peakCallbackFunctionName=this.loadFileCallbackFunctionName=this.coordCallbackFunctionName=this.appletReadyCallbackFunctionName=null;n(this,arguments)},JSV.app,"JSVApp",null,[JSV.api.PanelListener,JSV.api.JSVAppInterface,JSV.api.ScriptInterface]);m(c$,function(a,b){this.appletFrame=a;this.initViewer(b);this.initParams(a.getParameter("script"))},"JSV.api.AppletFrame,~B");c(c$,
"initViewer",function(a){this.vwr=new JSV.common.JSViewer(this,!0,a);this.appletFrame.setDropTargetListener(this.isSigned(),this.vwr);a=this.appletFrame.getDocumentBase();JSV.common.JSVFileManager.setDocumentBase(this.vwr,a)},"~B");e(c$,"isPro",function(){return this.isSigned()});e(c$,"isSigned",function(){return!0});c(c$,"getAppletFrame",function(){return this.appletFrame});c(c$,"dispose",function(){try{this.vwr.dispose()}catch(a){if(z(a,Exception))a.printStackTrace();else throw a;}});e(c$,"getPropertyAsJavaObject",
function(a){return this.vwr.getPropertyAsJavaObject(a)},"~S");e(c$,"getPropertyAsJSON",function(a){return JU.PT.toJSON(null,this.getPropertyAsJavaObject(a))},"~S");e(c$,"getCoordinate",function(){return this.vwr.getCoordinate()});e(c$,"loadInline",function(a){this.siOpenDataOrFile(a,"[inline]",null,null,-1,-1,!0,null,null);this.appletFrame.validateContent(3)},"~S");e(c$,"exportSpectrum",function(a,b){return this.vwr.$export(a,b)},"~S,~N");e(c$,"setFilePath",function(a){this.runScript("load "+JU.PT.esc(a))},
"~S");e(c$,"setSpectrumNumber",function(a){this.runScript(JSV.common.ScriptToken.SPECTRUMNUMBER+" "+a)},"~N");e(c$,"reversePlot",function(){this.toggle(JSV.common.ScriptToken.REVERSEPLOT)});e(c$,"toggleGrid",function(){this.toggle(JSV.common.ScriptToken.GRIDON)});e(c$,"toggleCoordinate",function(){this.toggle(JSV.common.ScriptToken.COORDINATESON)});e(c$,"togglePointsOnly",function(){this.toggle(JSV.common.ScriptToken.POINTSONLY)});e(c$,"toggleIntegration",function(){this.toggle(JSV.common.ScriptToken.INTEGRATE)});
c(c$,"toggle",function(a){null!=this.vwr.selectedPanel&&this.runScript(a+" TOGGLE")},"JSV.common.ScriptToken");e(c$,"addHighlight",function(a,b,d,c,f,h){this.runScript("HIGHLIGHT "+a+" "+b+" "+d+" "+c+" "+f+" "+h)},"~N,~N,~N,~N,~N,~N");e(c$,"removeHighlight",function(a,b){this.runScript("HIGHLIGHT "+a+" "+b+" OFF")},"~N,~N");e(c$,"removeAllHighlights",function(){this.runScript("HIGHLIGHT OFF")});e(c$,"syncScript",function(a){this.vwr.syncScript(a)},"~S");e(c$,"writeStatus",function(a){JU.Logger.info(a)},
"~S");c(c$,"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(c$,"newAppletPanel",function(){JU.Logger.info("newAppletPanel");this.appletFrame.createMainPanel(this.vwr)});e(c$,"repaint",function(){var a=null==this.vwr?null:this.vwr.html5Applet;null==JSV.common.JSViewer.jmolObject?this.appletFrame.repaint():
null!=a&&JSV.common.JSViewer.jmolObject.repaint(a,!0)});c(c$,"updateJS",function(){},"~N,~N");e(c$,"runScriptNow",function(a){return this.vwr.runScriptNow(a)},"~S");c(c$,"checkCallbacks",function(){if(!(null==this.coordCallbackFunctionName&&null==this.peakCallbackFunctionName)){var a=new JSV.common.Coordinate,b=null==this.peakCallbackFunctionName?null:new JSV.common.Coordinate;if(this.vwr.pd().getPickedCoordinates(a,b)){var d=this.vwr.mainPanel.getCurrentPanelIndex();null==b?this.appletFrame.callToJavaScript(this.coordCallbackFunctionName,
x(-1,[Double.$valueOf(a.getXVal()),Double.$valueOf(a.getYVal()),Integer.$valueOf(d+1)])):this.appletFrame.callToJavaScript(this.peakCallbackFunctionName,x(-1,[Double.$valueOf(a.getXVal()),Double.$valueOf(a.getYVal()),Double.$valueOf(b.getXVal()),Double.$valueOf(b.getYVal()),Integer.$valueOf(d+1)]))}}});c(c$,"doAdvanced",function(){},"~S");e(c$,"panelEvent",function(a){w(a,JSV.common.PeakPickEvent)?this.vwr.processPeakPickEvent(a,!1):w(a,JSV.common.ZoomEvent)||w(a,JSV.common.SubSpecChangeEvent)},"~O");
e(c$,"getSolnColour",function(){return this.vwr.getSolutionColorStr(!0)});c(c$,"updateJSView",function(a){var b=this.vwr.html5Applet,d=null==b?null:this.vwr.selectedPanel;b&&null!=b._viewSet&&b._updateView(d,a);b._updateView(d,a)},"~S");e(c$,"syncToJmol",function(a){this.updateJSView(a);null!=this.syncCallbackFunctionName&&(JU.Logger.info("JSVApp.syncToJmol JSV>Jmol "+a),this.appletFrame.callToJavaScript(this.syncCallbackFunctionName,x(-1,[this.vwr.fullName,a])))},"~S");e(c$,"setVisible",function(a){this.appletFrame.setPanelVisible(a)},
"~B");e(c$,"setCursor",function(a){this.vwr.apiPlatform.setCursor(a,this.appletFrame)},"~N");e(c$,"runScript",function(a){this.vwr.runScript(a)},"~S");e(c$,"getScriptQueue",function(){return this.vwr.scriptQueue});e(c$,"siSetCurrentSource",function(a){this.vwr.currentSource=a},"JSV.source.JDXSource");e(c$,"siSendPanelChange",function(){this.vwr.selectedPanel!==this.prevPanel&&(this.prevPanel=this.vwr.selectedPanel,this.vwr.sendPanelChange())});e(c$,"siNewWindow",function(a,b){this.isNewWindow=a;b?
null!=this.vwr.jsvpPopupMenu&&this.vwr.jsvpPopupMenu.setSelected("Window",!1):this.appletFrame.newWindow(a)},"~B,~B");e(c$,"siValidateAndRepaint",function(){var a=this.vwr.pd();null!=a&&a.setTaintedAll();this.appletFrame.validate();this.repaint()},"~B");e(c$,"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(c$,"siOpenDataOrFile",function(a,b,d,c,f,h,e,j,l){switch(this.vwr.openDataOrFile(a,
b,d,c,f,h,e,l)){case 0:null!=j&&this.runScript(j);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(c$,"siProcessCommand",function(a){this.vwr.runScriptNow(a)},"~S");e(c$,"siSetSelectedPanel",function(a){this.vwr.mainPanel.setSelectedPanel(this.vwr,a,this.vwr.panelNodes);this.vwr.selectedPanel=a;this.vwr.spectraTree.setSelectedPanel(this,
a);null==a&&(this.vwr.selectedPanel=a=this.appletFrame.getJSVPanel(this.vwr,null),this.vwr.mainPanel.setSelectedPanel(this.vwr,a,null));this.appletFrame.validate();null!=a&&(a.setEnabled(!0),a.setFocusable(!0))},"JSV.api.JSVPanel");e(c$,"siExecSetCallback",function(a,b){switch(a){case JSV.common.ScriptToken.APPLETREADYCALLBACKFUNCTIONNAME:this.appletReadyCallbackFunctionName=b;break;case JSV.common.ScriptToken.LOADFILECALLBACKFUNCTIONNAME:this.loadFileCallbackFunctionName=b;break;case JSV.common.ScriptToken.PEAKCALLBACKFUNCTIONNAME:this.peakCallbackFunctionName=
b;break;case JSV.common.ScriptToken.SYNCCALLBACKFUNCTIONNAME:this.syncCallbackFunctionName=b;break;case JSV.common.ScriptToken.COORDCALLBACKFUNCTIONNAME:this.coordCallbackFunctionName=b}},"JSV.common.ScriptToken,~S");e(c$,"siLoaded",function(a){null!=this.loadFileCallbackFunctionName&&this.appletFrame.callToJavaScript(this.loadFileCallbackFunctionName,x(-1,[this.vwr.appletName,a]));this.updateJSView(null);return null},"~S");e(c$,"siExecHidden",function(){},"~B");e(c$,"siExecScriptComplete",function(a,
b){b||this.vwr.showMessage(a);this.siValidateAndRepaint(!1)},"~S,~B");e(c$,"siUpdateBoolean",function(){},"JSV.common.ScriptToken,~B");e(c$,"siCheckCallbacks",function(){this.checkCallbacks()},"~S");e(c$,"siNodeSet",function(){this.appletFrame.validateContent(2);this.siValidateAndRepaint(!1)},"JSV.common.PanelNode");e(c$,"siSourceClosed",function(){},"JSV.source.JDXSource");e(c$,"siGetNewJSVPanel",function(a){if(null==a)return this.vwr.initialEndIndex=this.vwr.initialStartIndex=-1,null;var b=new JU.Lst;
b.addLast(a);a=this.appletFrame.getJSVPanel(this.vwr,b);a.getPanelData().addListener(this);this.vwr.parameters.setFor(a,null,!0);return a},"JSV.common.Spectrum");e(c$,"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(c$,"siSetPropertiesFromPreferences",function(){this.vwr.checkAutoIntegrate()},"JSV.api.JSVPanel,~B");e(c$,"siSetLoaded",function(){},"~S,~S");e(c$,"siSetMenuEnables",function(){},"JSV.common.PanelNode,~B");e(c$,"siUpdateRecentMenus",function(){},"~S");e(c$,"siExecTest",function(){this.loadInline("")},"~S");e(c$,"print",function(a){return this.vwr.print(a)},"~S");e(c$,"checkScript",function(a){return this.vwr.checkScript(a)},"~S");c$.getAppletInfo=c(c$,"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."});D(c$,"CREDITS","Authors:\nProf. Robert M. Hanson,\nD. Facey, K. Bryan, C. Walters, Prof. Robert J. Lancashire and\nvolunteer developers through sourceforge.")});r("JSV.app");s(["J.api.GenericMouseInterface"],"JSV.app.GenericMouse",["JU.Logger"],function(){c$=q(function(){this.jsvp=this.pd=null;this.modifiersWhenPressed10=
this.yWhenPressed=this.xWhenPressed=0;this.disposed=this.isMouseDown=!1;n(this,arguments)},JSV.app,"GenericMouse",null,J.api.GenericMouseInterface);m(c$,function(a){this.jsvp=a;this.pd=a.getPanelData()},"JSV.api.JSVPanel");e(c$,"clear",function(){});e(c$,"processEvent",function(a,b,d,c,f){if(null==this.pd)return!this.disposed&&(501==a&&0!=(c&4))&&this.jsvp.showMenu(b,d),!0;507!=a&&(c=JSV.app.GenericMouse.applyLeftMouse(c));switch(a){case 507:this.wheeled(f,b,c|32);break;case 501:this.xWhenPressed=
b;this.yWhenPressed=d;this.modifiersWhenPressed10=c;this.pressed(f,b,d,c,!1);break;case 506:this.dragged(f,b,d,c);break;case 504:this.entered(f,b,d);break;case 505:this.exited(f,b,d);break;case 503:this.moved(f,b,d,c);break;case 502:this.released(f,b,d,c);b==this.xWhenPressed&&(d==this.yWhenPressed&&c==this.modifiersWhenPressed10)&&this.clicked(f,b,d,c,1);break;default:return!1}return!0},"~N,~N,~N,~N,~N");c(c$,"mouseEntered",function(a){this.entered(a.getWhen(),a.getX(),a.getY())},"java.awt.event.MouseEvent");
c(c$,"mouseExited",function(a){this.exited(a.getWhen(),a.getX(),a.getY())},"java.awt.event.MouseEvent");c(c$,"mouseMoved",function(a){this.moved(a.getWhen(),a.getX(),a.getY(),a.getModifiers())},"java.awt.event.MouseEvent");c(c$,"mousePressed",function(a){this.pressed(a.getWhen(),a.getX(),a.getY(),a.getModifiers(),a.isPopupTrigger())},"java.awt.event.MouseEvent");c(c$,"mouseDragged",function(a){var b=a.getModifiers();0==(b&28)&&(b|=16);this.dragged(a.getWhen(),a.getX(),a.getY(),b)},"java.awt.event.MouseEvent");
c(c$,"mouseReleased",function(a){this.released(a.getWhen(),a.getX(),a.getY(),a.getModifiers())},"java.awt.event.MouseEvent");c(c$,"mouseClicked",function(a){this.clicked(a.getWhen(),a.getX(),a.getY(),a.getModifiers(),a.getClickCount())},"java.awt.event.MouseEvent");c(c$,"mouseWheelMoved",function(a){a.consume();this.wheeled(a.getWhen(),a.getWheelRotation(),a.getModifiers()|32)},"java.awt.event.MouseWheelEvent");c(c$,"keyTyped",function(a){if(null!=this.pd){var b=a.getKeyChar(),d=a.getModifiers();
JU.Logger.info("MouseManager keyTyped: "+b+" "+(0+b.charCodeAt(0))+" "+d);this.pd.keyTyped(b.charCodeAt(0),d)&&a.consume()}},"java.awt.event.KeyEvent");c(c$,"keyPressed",function(a){null!=this.pd&&this.pd.keyPressed(a.getKeyCode(),a.getModifiers())&&a.consume()},"java.awt.event.KeyEvent");c(c$,"keyReleased",function(a){null!=this.pd&&this.pd.keyReleased(a.getKeyCode())},"java.awt.event.KeyEvent");c(c$,"entered",function(a,b,d){null!=this.pd&&this.pd.mouseEnterExit(a,b,d,!1)},"~N,~N,~N");c(c$,"exited",
function(a,b,d){null!=this.pd&&this.pd.mouseEnterExit(a,b,d,!0)},"~N,~N,~N");c(c$,"clicked",function(a,b,d,c){null!=this.pd&&this.pd.mouseAction(2,a,b,d,1,c)},"~N,~N,~N,~N,~N");c(c$,"moved",function(a,b,d,c){null!=this.pd&&(this.isMouseDown?this.pd.mouseAction(1,a,b,d,0,JSV.app.GenericMouse.applyLeftMouse(c)):this.pd.mouseAction(0,a,b,d,0,c&-29))},"~N,~N,~N,~N");c(c$,"wheeled",function(a,b,d){null!=this.pd&&this.pd.mouseAction(3,a,0,b,0,d)},"~N,~N,~N");c(c$,"pressed",function(a,b,d,c){null==this.pd?
this.disposed||this.jsvp.showMenu(b,d):(this.isMouseDown=!0,this.pd.mouseAction(4,a,b,d,0,c))},"~N,~N,~N,~N,~B");c(c$,"released",function(a,b,d,c){null!=this.pd&&(this.isMouseDown=!1,this.pd.mouseAction(5,a,b,d,0,c))},"~N,~N,~N,~N");c(c$,"dragged",function(a,b,d,c){null!=this.pd&&(20==(c&20)&&(c=c&-5|2),this.pd.mouseAction(1,a,b,d,0,c))},"~N,~N,~N,~N");c$.applyLeftMouse=c(c$,"applyLeftMouse",function(a){return 0==(a&28)?a|16:a},"~N");e(c$,"processTwoPointGesture",function(){},"~A");e(c$,"dispose",
function(){this.jsvp=this.pd=null;this.disposed=!0})});r("JSV.appletjs");s(["javajs.api.JSInterface","JSV.api.AppletFrame","$.JSVAppletInterface"],"JSV.appletjs.JSVApplet","java.lang.Boolean java.net.URL java.util.Hashtable JU.PT JSV.app.JSVApp JSV.js2d.JsMainPanel $.JsPanel JU.Logger".split(" "),function(){c$=q(function(){this.viewer=this.app=null;this.isStandalone=!1;this.htParams=this.viewerOptions=null;n(this,arguments)},JSV.appletjs,"JSVApplet",null,[JSV.api.JSVAppletInterface,JSV.api.AppletFrame,
javajs.api.JSInterface]);m(c$,function(a){null==a&&(a=new java.util.Hashtable);this.viewerOptions=a;this.htParams=new java.util.Hashtable;var b;for(a=a.entrySet().iterator();a.hasNext()&&((b=a.next())||1);)this.htParams.put(b.getKey().toLowerCase(),b.getValue());this.init()},"java.util.Map");c(c$,"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,
x(-1,[this.viewer.appletName,this.viewer.fullName,Boolean.TRUE,this]))});c(c$,"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(c$,"setLogging",function(){var a=this.getValue("logLevel",this.getBooleanValue("debug",!1)?"5":"4").charCodeAt(0)-48;4!=a&&System.out.println("setting logLevel="+a+' -- To change, use script "set logLevel [0-5]"');
JU.Logger.setLogLevel(a)});c(c$,"getParameter",function(a){a=this.htParams.get(a.toLowerCase());return null==a?null:String.instantialize(a.toString())},"~S");c(c$,"getBooleanValue",function(a,b){var d=this.getValue(a,b?"true":"");return d.equalsIgnoreCase("true")||d.equalsIgnoreCase("on")||d.equalsIgnoreCase("yes")},"~S,~B");c(c$,"getValue",function(a,b){var d=this.getParameter(a);System.out.println("getValue "+a+" = "+d);return null!=d?d:b},"~S,~S");e(c$,"isPro",function(){return this.app.isPro()});
e(c$,"isSigned",function(){return this.app.isSigned()});e(c$,"destroy",function(){this.app.dispose();this.app=null});c(c$,"getParameter",function(a,b){return this.isStandalone?System.getProperty(a,b):null!=this.getParameter(a)?this.getParameter(a):b},"~S,~S");e(c$,"getAppletInfo",function(){return JSV.app.JSVApp.getAppletInfo()});e(c$,"getSolnColour",function(){return this.app.getSolnColour()});e(c$,"getCoordinate",function(){return this.app.getCoordinate()});e(c$,"loadInline",function(a){this.app.loadInline(a)},
"~S");c(c$,"$export",function(a,b){return this.app.exportSpectrum(a,b)},"~S,~N");e(c$,"exportSpectrum",function(a,b){return this.app.exportSpectrum(a,b)},"~S,~N");e(c$,"setFilePath",function(a){this.app.setFilePath(a)},"~S");e(c$,"setSpectrumNumber",function(a){this.app.setSpectrumNumber(a)},"~N");e(c$,"toggleGrid",function(){this.app.toggleGrid()});e(c$,"toggleCoordinate",function(){this.app.toggleCoordinate()});e(c$,"togglePointsOnly",function(){this.app.togglePointsOnly()});e(c$,"toggleIntegration",
function(){this.app.toggleIntegration()});e(c$,"addHighlight",function(a,b,d,c,f,h){this.app.addHighlight(a,b,d,c,f,h)},"~N,~N,~N,~N,~N,~N");e(c$,"removeAllHighlights",function(){this.app.removeAllHighlights()});e(c$,"removeHighlight",function(a,b){this.app.removeHighlight(a,b)},"~N,~N");e(c$,"reversePlot",function(){this.app.reversePlot()});c(c$,"script",function(a){this.app.initParams(a)},"~S");e(c$,"runScript",function(a){this.app.runScript(a)},"~S");e(c$,"syncScript",function(a){this.app.syncScript(a)},
"~S");e(c$,"writeStatus",function(a){this.app.writeStatus(a)},"~S");e(c$,"getPropertyAsJavaObject",function(a){return this.app.getPropertyAsJavaObject(a)},"~S");e(c$,"getPropertyAsJSON",function(a){return this.app.getPropertyAsJSON(a)},"~S");e(c$,"runScriptNow",function(a){return this.app.runScriptNow(a)},"~S");e(c$,"print",function(a){return this.app.print(a)},"~S");e(c$,"setDropTargetListener",function(){},"~B,JSV.common.JSViewer");e(c$,"validateContent",function(){},"~N");e(c$,"createMainPanel",
function(a){a.mainPanel=new JSV.js2d.JsMainPanel},"JSV.common.JSViewer");e(c$,"newWindow",function(){},"~B");e(c$,"callToJavaScript",function(a,b){var d=JU.PT.split(a,".");try{for(var c=window[d[0]],f=1;f<d.length;f++)c=c[d[f]];return c(b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7],b[8],b[9])}catch(h){System.out.println(a+" failed "+h)}},"~S,~A");e(c$,"setPanelVisible",function(){},"~B");e(c$,"getJSVPanel",function(a,b){return null==b?JSV.js2d.JsPanel.getEmptyPanel(a):JSV.js2d.JsPanel.getPanelMany(a,b)},
"JSV.common.JSViewer,JU.Lst");e(c$,"setVisible",function(){},"~B");e(c$,"getDocumentBase",function(){try{return new java.net.URL(W("java.net.URL"),this.viewerOptions.get("documentBase"),null)}catch(a){if(z(a,java.net.MalformedURLException))return null;throw a;}});e(c$,"repaint",function(){});e(c$,"validate",function(){});e(c$,"doExitJmol",function(){});e(c$,"getApp",function(){return this.app});e(c$,"setStatusDragDropped",function(){return!0},"~N,~N,~N,~S,~A");e(c$,"cacheFileByName",function(){return 0},
"~S,~B");e(c$,"cachePut",function(){},"~S,~O");e(c$,"getFullName",function(){return this.app.vwr.fullName});e(c$,"processMouseEvent",function(a,b,d,c,f){return this.app.vwr.processMouseEvent(a,b,d,c,f)},"~N,~N,~N,~N,~N");e(c$,"setDisplay",function(a){this.app.vwr.setDisplay(a)},"~O");e(c$,"startHoverWatcher",function(){},"~B");e(c$,"update",function(){this.app.vwr.updateJS()});c(c$,"openFile",function(a){this.app.vwr.openFile(a,!0);return null},"~S");e(c$,"openFileAsyncSpecial",function(a,b){this.app.vwr.openFileAsyncSpecial(a,
b)},"~S,~N");e(c$,"openFileAsyncSpecialType",function(a,b){this.openFileAsyncSpecial(a,b)},"~S,~N,~S");e(c$,"processTwoPointGesture",function(a){this.app.vwr.processTwoPointGesture(a)},"~A");e(c$,"setScreenDimension",function(a,b){this.app.vwr.setScreenDimension(a,b)},"~N,~N");e(c$,"checkScript",function(a){a=this.app.checkScript(a);null!=a&&System.out.println(a);return a},"~S")});r("JSV.common");s(["java.lang.Enum","JSV.common.Coordinate"],"JSV.common.Annotation",["java.lang.Double","JU.CU"],function(){c$=
q(function(){this.text="";this.is2D=this.$isPixels=!1;this.offsetY=this.offsetX=0;this.spec=null;n(this,arguments)},JSV.common,"Annotation",JSV.common.Coordinate);c(c$,"setA",function(a,b,d,c,f,h,e,j){this.set(a,b);this.spec=d;this.text=c;this.$isPixels=f;this.is2D=h;this.offsetX=e;this.offsetY=j;return this},"~N,~N,JSV.common.Spectrum,~S,~B,~B,~N,~N");c(c$,"setSpec",function(a){this.spec=a;return this},"JSV.common.Spectrum");c(c$,"addSpecShift",function(a){this.setXVal(this.getXVal()+a)},"~N");c(c$,
"isPixels",function(){return this.$isPixels});e(c$,"toString",function(){return"["+this.getXVal()+", "+this.getYVal()+","+this.text+"]"});c$.getColoredAnnotation=c(c$,"getColoredAnnotation",function(a,b,d,c){var f,h=0,e=1,j=2,l=3,p=d.size();try{switch(p){default:return null;case 1:f=d.get(0);h=e=-1;'"'==f.charAt(0)?(l=0,j=-1):(j=0,l=-1);break;case 2:h=e=-1;f=d.get(0);'"'==f.charAt(0)?(l=0,j=1):(j=0,l=1);break;case 3:case 4:f=d.get(2),'"'==f.charAt(0)?(l=2,j=4==p?3:-1):(j=2,l=4==p?3:-1),f=d.get(2),
'"'==f.charAt(0)?(l=2,j=-1):(j=2,l=-1)}if(null==c&&(0>h||0>e||0>l||0>j))return null;var m=0>h?c.getXVal():Double.$valueOf(d.get(h)).doubleValue(),n=0>e?c.getYVal():Double.$valueOf(d.get(e)).doubleValue(),k=0>j?c.getColor():a.getColor1(JU.CU.getArgbFromString(d.get(j))),q;0>l?q=c.text:(q=d.get(l),'"'==q.charAt(0)&&(q=q.substring(1,q.length-1)));return(new JSV.common.ColoredAnnotation).setCA(m,n,b,q,k,!1,!1,0,0)}catch(r){if(z(r,Exception))return null;throw r;}},"J.api.GenericGraphics,JSV.common.Spectrum,JU.Lst,JSV.common.Annotation");
B(self.c$);c$=t(JSV.common.Annotation,"AType",Enum);k(c$,"Integration",0,[]);k(c$,"PeakList",1,[]);k(c$,"Measurements",2,[]);k(c$,"OverlayLegend",3,[]);k(c$,"Views",4,[]);k(c$,"NONE",5,[]);c$=A()});r("JSV.common");s(["JSV.common.Annotation"],"JSV.common.ColoredAnnotation",null,function(){c$=q(function(){this.color=null;n(this,arguments)},JSV.common,"ColoredAnnotation",JSV.common.Annotation);c(c$,"getColor",function(){return this.color});m(c$,function(){y(this,JSV.common.ColoredAnnotation,[])});c(c$,
"setCA",function(a,b,d,c,f,h,e,j,l){this.setA(a,b,d,c,h,e,j,l);this.color=f;return this},"~N,~N,JSV.common.Spectrum,~S,javajs.api.GenericColor,~B,~B,~N,~N")});r("JSV.common");s(["JSV.common.Parameters"],"JSV.common.ColorParameters",["java.util.Hashtable","$.StringTokenizer","JU.CU","$.Lst","JSV.common.ScriptToken"],function(){c$=q(function(){this.plotColors=this.elementColors=this.displayFontName=this.titleFontName=null;this.isDefault=!1;n(this,arguments)},JSV.common,"ColorParameters",JSV.common.Parameters);
m(c$,function(){y(this,JSV.common.ColorParameters,[]);JSV.common.ColorParameters.BLACK=this.getColor3(0,0,0);JSV.common.ColorParameters.RED=this.getColor3(255,0,0);JSV.common.ColorParameters.LIGHT_GRAY=this.getColor3(200,200,200);JSV.common.ColorParameters.DARK_GRAY=this.getColor3(80,80,80);JSV.common.ColorParameters.BLUE=this.getColor3(0,0,255);JSV.common.ColorParameters.WHITE=this.getColor3(255,255,255);this.elementColors=new java.util.Hashtable;this.setColor(JSV.common.ScriptToken.TITLECOLOR,JSV.common.ColorParameters.BLACK);
this.setColor(JSV.common.ScriptToken.UNITSCOLOR,JSV.common.ColorParameters.RED);this.setColor(JSV.common.ScriptToken.SCALECOLOR,JSV.common.ColorParameters.BLACK);this.setColor(JSV.common.ScriptToken.COORDINATESCOLOR,JSV.common.ColorParameters.RED);this.setColor(JSV.common.ScriptToken.GRIDCOLOR,JSV.common.ColorParameters.LIGHT_GRAY);this.setColor(JSV.common.ScriptToken.PLOTCOLOR,JSV.common.ColorParameters.BLUE);this.setColor(JSV.common.ScriptToken.PLOTAREACOLOR,JSV.common.ColorParameters.WHITE);this.setColor(JSV.common.ScriptToken.BACKGROUNDCOLOR,
this.getColor3(192,192,192));this.setColor(JSV.common.ScriptToken.INTEGRALPLOTCOLOR,JSV.common.ColorParameters.RED);this.setColor(JSV.common.ScriptToken.PEAKTABCOLOR,JSV.common.ColorParameters.RED);this.setColor(JSV.common.ScriptToken.HIGHLIGHTCOLOR,JSV.common.ColorParameters.DARK_GRAY);for(var a=0;8>a;a++)JSV.common.ColorParameters.defaultPlotColors[a]=this.getColorFromString(JSV.common.ColorParameters.defaultPlotColorNames[a]);this.plotColors=Array(8);System.arraycopy(JSV.common.ColorParameters.defaultPlotColors,
0,this.plotColors,0,8)});c(c$,"setFor",function(a,b,d){null==b&&(b=this);d&&a.getPanelData().setBooleans(b,null);a=a.getPanelData();null!=a.getCurrentPlotColor(1)&&a.setPlotColors(this.plotColors);a.setColorOrFont(b,null)},"JSV.api.JSVPanel,JSV.common.ColorParameters,~B");c(c$,"set",function(a,b,d){var c=null;switch(b){default:this.setP(a,b,d);return;case JSV.common.ScriptToken.PLOTCOLORS:null==a?this.getPlotColors(d):a.setPlotColors(this.getPlotColors(d));return;case JSV.common.ScriptToken.BACKGROUNDCOLOR:case JSV.common.ScriptToken.COORDINATESCOLOR:case JSV.common.ScriptToken.GRIDCOLOR:case JSV.common.ScriptToken.HIGHLIGHTCOLOR:case JSV.common.ScriptToken.INTEGRALPLOTCOLOR:case JSV.common.ScriptToken.PEAKTABCOLOR:case JSV.common.ScriptToken.PLOTAREACOLOR:case JSV.common.ScriptToken.PLOTCOLOR:case JSV.common.ScriptToken.SCALECOLOR:case JSV.common.ScriptToken.TITLECOLOR:case JSV.common.ScriptToken.UNITSCOLOR:c=
this.setColorFromString(b,d);break;case JSV.common.ScriptToken.TITLEFONTNAME:case JSV.common.ScriptToken.DISPLAYFONTNAME:c=this.getFontName(b,d)}null!=a&&null!=c&&a.setColorOrFont(this,b)},"JSV.common.PanelData,JSV.common.ScriptToken,~S");c(c$,"getElementColor",function(a){return this.elementColors.get(a)},"JSV.common.ScriptToken");c(c$,"setColor",function(a,b){null!=b&&this.elementColors.put(a,b);return b},"JSV.common.ScriptToken,javajs.api.GenericColor");c(c$,"copy",function(){return this.copy(this.name)});
c(c$,"setElementColors",function(a){this.displayFontName=a.displayFontName;var b;for(a=a.elementColors.entrySet().iterator();a.hasNext()&&((b=a.next())||1);)this.setColor(b.getKey(),b.getValue());return this},"JSV.common.ColorParameters");c(c$,"getColorFromString",function(a){return this.getColor1(JU.CU.getArgbFromString(a))},"~S");c(c$,"getPlotColors",function(a){if(null==a)return this.plotColors[0]=this.getElementColor(JSV.common.ScriptToken.PLOTCOLOR),this.plotColors;a=new java.util.StringTokenizer(a,
",;.- ");var b=new JU.Lst;try{for(;a.hasMoreTokens();)b.addLast(this.getColorFromString(a.nextToken()))}catch(d){if(z(d,Exception))return null;throw d;}return b.toArray(Array(b.size()))},"~S");c(c$,"setColorFromString",function(a,b){return this.setColor(a,this.getColorFromString(b))},"JSV.common.ScriptToken,~S");c(c$,"getFontName",function(a,b){var d=this.isValidFontName(b);switch(a){case JSV.common.ScriptToken.TITLEFONTNAME:return d?this.titleFontName=b:this.titleFontName;case JSV.common.ScriptToken.DISPLAYFONTNAME:return d?
this.displayFontName=b:this.displayFontName}return null},"JSV.common.ScriptToken,~S");D(c$,"BLACK",null,"RED",null,"LIGHT_GRAY",null,"DARK_GRAY",null,"BLUE",null,"WHITE",null);c$.defaultPlotColors=c$.prototype.defaultPlotColors=Array(8);c$.defaultPlotColorNames=c$.prototype.defaultPlotColorNames=x(-1,"black darkGreen darkred orange magenta cyan maroon darkGray".split(" "))});r("JSV.common");c$=t(JSV.common,"CoordComparator",null,java.util.Comparator);e(c$,"compare",function(a,b){return a.getXVal()>
b.getXVal()?1:a.getXVal()<b.getXVal()?-1:0},"JSV.common.Coordinate,JSV.common.Coordinate");r("JSV.common");s(["JSV.common.CoordComparator"],"JSV.common.Coordinate",["java.lang.Double","java.util.Arrays","$.StringTokenizer","JU.Lst"],function(){c$=q(function(){this.yVal=this.xVal=0;n(this,arguments)},JSV.common,"Coordinate");m(c$,function(){});c(c$,"set",function(a,b){this.xVal=a;this.yVal=b;return this},"~N,~N");c(c$,"getXVal",function(){return this.xVal});c(c$,"getYVal",function(){return this.yVal});
c(c$,"setXVal",function(a){this.xVal=a},"~N");c(c$,"setYVal",function(a){this.yVal=a},"~N");c(c$,"copy",function(){return(new JSV.common.Coordinate).set(this.xVal,this.yVal)});c(c$,"equals",function(a){return a.xVal==this.xVal&&a.yVal==this.yVal},"JSV.common.Coordinate");e(c$,"toString",function(){return"["+this.xVal+", "+this.yVal+"]"});c$.isYInRange=c(c$,"isYInRange",function(a,b,d){return JSV.common.Coordinate.getMinY(a,0,a.length-1)>=b&&JSV.common.Coordinate.getMaxY(a,0,a.length-1)>=d},"~A,~N,~N");
c$.normalise=c(c$,"normalise",function(a,b,d){var c=Array(a.length),f=JSV.common.Coordinate.getMinY(a,0,a.length-1);d=(JSV.common.Coordinate.getMaxY(a,0,a.length-1)-f)/(d-b);for(var h=0;h<a.length;h++)c[h]=(new JSV.common.Coordinate).set(a[h].getXVal(),(a[h].getYVal()-f)/d-b);return c},"~A,~N,~N");c$.reverse=c(c$,"reverse",function(a){for(var b=a.length,d=0;d<b;d++){var c=a[d];a[d]=a[--b];a[b]=c}return a},"~A");c$.parseDSV=c(c$,"parseDSV",function(a,b,d){var c,f=c=0,h=new JU.Lst;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*b,f*d),h.addLast(c);b=Array(h.size());return h.toArray(b)},"~S,~N,~N");c$.deltaX=c(c$,"deltaX",function(a,b,d){return(a-b)/(d-1)},"~N,~N,~N");c$.removeScale=c(c$,"removeScale",function(a,b,d){JSV.common.Coordinate.applyScale(a,1/b,1/d)},"~A,~N,~N");c$.applyScale=c(c$,"applyScale",function(a,b,d){if(1!=b||1!=d)for(var c=0;c<a.length;c++)a[c].setXVal(a[c].getXVal()*
b),a[c].setYVal(a[c].getYVal()*d)},"~A,~N,~N");c$.getMinX=c(c$,"getMinX",function(a,b,d){for(var c=1.7976931348623157E308;b<=d;b++){var f=a[b].getXVal();f<c&&(c=f)}return c},"~A,~N,~N");c$.getMinX=c(c$,"getMinX",function(a,b){for(var d=1.7976931348623157E308,c=0;c<a.size();c++){var f=a.get(c).getXYCoords(),f=JSV.common.Coordinate.getMinX(f,b.getStartingPointIndex(c),b.getEndingPointIndex(c));f<d&&(d=f)}return d},"JU.Lst,JSV.common.ViewData");c$.getMaxX=c(c$,"getMaxX",function(a,b,d){for(var c=-1.7976931348623157E308;b<=
d;b++){var f=a[b].getXVal();f>c&&(c=f)}return c},"~A,~N,~N");c$.getMaxX=c(c$,"getMaxX",function(a,b){for(var d=-1.7976931348623157E308,c=0;c<a.size();c++){var f=a.get(c).getXYCoords(),f=JSV.common.Coordinate.getMaxX(f,b.getStartingPointIndex(c),b.getEndingPointIndex(c));f>d&&(d=f)}return d},"JU.Lst,JSV.common.ViewData");c$.getMinY=c(c$,"getMinY",function(a,b,d){for(var c=1.7976931348623157E308;b<=d;b++){var f=a[b].getYVal();f<c&&(c=f)}return c},"~A,~N,~N");c$.getMinYUser=c(c$,"getMinYUser",function(a,
b){for(var d=1.7976931348623157E308,c=0;c<a.size();c++){var f=a.get(c).getUserYFactor(),h=a.get(c).getYRef(),e=a.get(c).getXYCoords(),f=(JSV.common.Coordinate.getMinY(e,b.getStartingPointIndex(c),b.getEndingPointIndex(c))-h)*f+h;f<d&&(d=f)}return d},"JU.Lst,JSV.common.ViewData");c$.getMaxY=c(c$,"getMaxY",function(a,b,d){for(var c=-1.7976931348623157E308;b<=d;b++){var f=a[b].getYVal();f>c&&(c=f)}return c},"~A,~N,~N");c$.getMaxYUser=c(c$,"getMaxYUser",function(a,b){for(var d=-1.7976931348623157E308,
c=0;c<a.size();c++){var f=a.get(c).getUserYFactor(),h=a.get(c).getYRef(),e=a.get(c).getXYCoords(),f=(JSV.common.Coordinate.getMaxY(e,b.getStartingPointIndex(c),b.getEndingPointIndex(c))-h)*f+h;f>d&&(d=f)}return d},"JU.Lst,JSV.common.ViewData");c$.getYValueAt=c(c$,"getYValueAt",function(a,b){var d=JSV.common.Coordinate.getNearestIndexForX(a,b);if(0==d||d==a.length)return NaN;var c=a[d].getXVal(),f=a[d-1].getXVal(),h=a[d].getYVal(),d=a[d-1].getYVal();return c==f?h:d+(h-d)/(c-f)*(b-f)},"~A,~N");c$.intoRange=
c(c$,"intoRange",function(a,b,d){return Math.max(Math.min(a,d),b)},"~N,~N,~N");c$.getNearestIndexForX=c(c$,"getNearestIndexForX",function(a,b){var d=(new JSV.common.Coordinate).set(b,0),d=java.util.Arrays.binarySearch(a,d,JSV.common.Coordinate.c);0>d&&(d=-1-d);return 0>d?0:d>a.length-1?a.length-1:d},"~A,~N");c$.findXForPeakNearest=c(c$,"findXForPeakNearest",function(a,b,d){b=JSV.common.Coordinate.getNearestIndexForX(a,b);for(d=d?-1:1;b<a.length-1&&0<d*(a[b+1].yVal-a[b].yVal);)b++;for(;1<=b&&0<d*(a[b-
1].yVal-a[b].yVal);)b--;return 0==b||b==a.length-1?a[b].xVal:JSV.common.Coordinate.parabolicInterpolation(a,b)},"~A,~N,~B");c$.parabolicInterpolation=c(c$,"parabolicInterpolation",function(a,b){var d=a[b-1].yVal,c=a[b+1].yVal;return a[b].xVal+(d-c)/2/(d-2*a[b].yVal+c)*(a[b+1].xVal-a[b].xVal)},"~A,~N");c$.getPickedCoordinates=c(c$,"getPickedCoordinates",function(a,b,d,c){if(null==b)return!1;var f=b.getXVal();d.setXVal(f);d.setYVal(b.getYVal());if(null==c)return!0;b=JSV.common.Coordinate.getNearestIndexForX(a,
f);c.setXVal(a[b].getXVal());c.setYVal(a[b].getYVal());return!0},"~A,JSV.common.Coordinate,JSV.common.Coordinate,JSV.common.Coordinate");c$.shiftX=c(c$,"shiftX",function(a,b){for(var d=a.length;0<=--d;)a[d].xVal+=b},"~A,~N");c$.getNearestXWithYAbove=c(c$,"getNearestXWithYAbove",function(a,b,d,c,f){b=JSV.common.Coordinate.getNearestIndexForX(a,b);var h=c?-1:1;if(f)for(;b<a.length&&0>h*(a[b].yVal-d);)b++;else for(;0<=b&&0>h*(a[b].yVal-d);)b--;return-1==b||b==a.length?NaN:JSV.common.Coordinate.findXForPeakNearest(a,
a[b].getXVal(),c)},"~A,~N,~N,~B,~B");c$.c=c$.prototype.c=new JSV.common.CoordComparator});r("JSV.common");s(["java.lang.Enum"],"JSV.common.ExportType",null,function(){c$=t(JSV.common,"ExportType",Enum);c$.getType=c(c$,"getType",function(a){a=a.toUpperCase();if(a.equalsIgnoreCase("Original..."))return JSV.common.ExportType.SOURCE;if(a.startsWith("XML"))return JSV.common.ExportType.AML;for(var b,d=0,c=JSV.common.ExportType.values();d<c.length&&((b=c[d])||1);d++)if(b.name().equals(a))return b;return JSV.common.ExportType.UNK},
"~S");c$.isExportMode=c(c$,"isExportMode",function(a){return JSV.common.ExportType.getType(a)!==JSV.common.ExportType.UNK},"~S");k(c$,"UNK",0,[]);k(c$,"SOURCE",1,[]);k(c$,"DIF",2,[]);k(c$,"FIX",3,[]);k(c$,"SQZ",4,[]);k(c$,"PAC",5,[]);k(c$,"XY",6,[]);k(c$,"DIFDUP",7,[]);k(c$,"PNG",8,[]);k(c$,"JPG",9,[]);k(c$,"SVG",10,[]);k(c$,"SVGI",11,[]);k(c$,"CML",12,[]);k(c$,"AML",13,[]);k(c$,"PDF",14,[])});r("JSV.common");s(["JSV.common.XYScaleConverter","java.util.Hashtable","JU.BS","$.Lst","JSV.common.Coordinate"],
"JSV.common.GraphSet","java.lang.Boolean $.Double $.Float JU.DF $.PT JSV.common.Annotation $.ColorParameters $.ColoredAnnotation $.ImageView $.Integral $.IntegralData $.Measurement $.MeasurementData $.PanelData $.Parameters $.PeakData $.PeakPickEvent $.PlotWidget $.ScaleData $.ScriptToken $.Spectrum $.ViewData JU.Logger".split(" "),function(){c$=q(function(){this.gs2dLinkedY=this.gs2dLinkedX=null;this.cur1D2Locked=!1;this.spectra=this.highlights=null;this.allowStacking=this.isSplittable=!0;this.widgets=
this.graphsTemp=this.pendingIntegral=this.pendingMeasurement=this.lastAnnotation=this.selectedSpectrumIntegrals=this.selectedSpectrumMeasurements=this.annotations=null;this.haveSingleYScale=this.isLinked=!1;this.iSpectrumClicked=this.iSpectrumMovedTo=0;this.iSpectrumSelected=-1;this.stackSelected=!1;this.viewData=this.bsSelected=null;this.reversePlot=!1;this.nSplit=1;this.yStackOffsetPercent=0;this.showAllStacked=!0;this.pd=this.imageView=this.viewList=null;this.sticky2Dcursor=!1;this.nSpectra=0;
this.fracY=this.fracX=1;this.fY0=this.fX0=0;this.cur2Dy=this.cur1D2x2=this.cur1D2x1=this.cur2Dx1=this.cur2Dx0=this.pin2Dy01=this.pin2Dx01=this.pin2Dy1=this.pin2Dy0=this.pin2Dx1=this.pin2Dx0=this.pin1Dy01=this.pin1Dx01=this.pin1Dy1=this.pin1Dy0=this.pin1Dx1=this.pin1Dx0=this.zoomBox2D=this.zoomBox1D=null;this.xPixels0=this.xPixel10=this.yPixels=this.xPixels=this.yPixel000=this.yPixel11=this.xPixel11=this.yPixel00=this.xPixel00=this.yHArrows=this.xHArrows=this.xVArrows=this.yPixel1=this.xPixel1=this.yPixel0=
this.xPixel0=0;this.allowStackedYScale=!0;this.drawXAxisLeftToRight=!1;this.xAxisLeftToRight=!0;this.iPreviousSpectrumClicked=-1;this.zoomEnabled=this.$haveSelectedSpectrum=!1;this.currentZoomIndex=0;this.lastClickX=NaN;this.lastPixelX=2147483647;this.bottom=this.left=this.top=this.right=this.width=this.height=0;this.coordTemp=this.piMouseOver=null;this.FONT_PLAIN=0;this.FONT_BOLD=1;this.FONT_ITALIC=2;this.is2DSpectrum=!1;this.selectedIntegral=this.selectedMeasurement=null;this.lastXMax=NaN;this.lastSpecClicked=
-1;this.inPlotMove=!1;this.xPixelMovedTo2=this.xPixelMovedTo=-1;this.xValueMovedTo=this.yValueMovedTo=0;this.haveLeftRightArrows=!1;this.yPixelPlot1=this.yPixelPlot0=this.xPixelPlot0=this.xPixelPlot1=0;this.nextClickForSetPeak=null;this.splitterY=this.splitterX=this.closerY=this.closerX=0;this.mapX=null;M("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;n(this,arguments)},JSV.common,"GraphSet",null,JSV.common.XYScaleConverter);H(c$,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});m(c$,function(a){this.pd=a;this.jsvp=a.jsvp;this.g2d=a.g2d},"JSV.common.PanelData");c(c$,"setSpectrumMovedTo",function(a){return this.iSpectrumMovedTo=
a},"~N");c(c$,"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(c$,"setSpectrumSelected",function(a){var b=a!=this.iSpectrumSelected;this.iSpectrumSelected=a;b&&this.getCurrentView();return this.iSpectrumSelected},"~N");c(c$,"closeDialogsExcept",function(a){if(null!=this.dialogs)for(var b,d=this.dialogs.entrySet().iterator();d.hasNext()&&
((b=d.next())||1);){var c=b.getValue();c.isDialog()&&(a===JSV.common.Annotation.AType.NONE||c.getAType()!==a)&&c.setVisible(!1)}},"JSV.common.Annotation.AType");c(c$,"dispose",function(){this.widgets=this.graphsTemp=this.imageView=this.pendingMeasurement=this.lastAnnotation=this.annotations=this.viewList=this.viewData=this.spectra=null;this.disposeImage();if(null!=this.dialogs)for(var a,b=this.dialogs.entrySet().iterator();b.hasNext()&&((a=b.next())||1);){var d=a.getValue();d.isDialog()&&d.dispose()}this.dialogs=
null});c(c$,"isDrawNoSpectra",function(){return-2147483648==this.iSpectrumSelected});c(c$,"getFixedSelectedSpectrumIndex",function(){return Math.max(this.iSpectrumSelected,0)});c(c$,"getSpectrum",function(){return this.getSpectrumAt(this.getFixedSelectedSpectrumIndex()).getCurrentSubSpectrum()});c(c$,"getSpectrumAt",function(a){return this.spectra.get(a)},"~N");c(c$,"getSpectrumIndex",function(a){for(var b=this.spectra.size();0<=--b;)if(this.spectra.get(b)===a)return b;return-1},"JSV.common.Spectrum");
c(c$,"addSpec",function(a){this.spectra.addLast(a);this.nSpectra++},"JSV.common.Spectrum");c(c$,"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(c$,"setPositionForFrame",function(a){0>a&&(a=0);var b=this.height-50;this.xPixel00=v(this.width*this.fX0);this.xPixel11=v(this.xPixel00+this.width*this.fracX-1);this.xHArrows=this.xPixel00+25;this.xVArrows=this.xPixel11-v(this.right/2);this.xPixel0=this.xPixel00+v(this.left*(1-this.fX0));this.xPixel10=this.xPixel1=this.xPixel11-this.right;this.xPixels0=this.xPixels=this.xPixel1-this.xPixel0+1;this.yPixel000=(0==this.fY0?25:0)+v(this.height*this.fY0);this.yPixel00=
this.yPixel000+v(b*this.fracY*a);this.yPixel11=this.yPixel00+v(b*this.fracY)-1;this.yHArrows=this.yPixel11-12;this.yPixel0=this.yPixel00+v(this.top/2);this.yPixel1=this.yPixel11-v(this.bottom/2);this.yPixels=this.yPixel1-this.yPixel0+1;null!=this.imageView&&this.is2DSpectrum&&(this.setImageWindow(),this.pd.display1D?(this.xPixels=v(Math.floor(0.8*(this.pd.display1D?1*(this.xPixels0-this.imageView.xPixels)/this.xPixels0:1)*this.xPixels0)),this.xPixel1=this.xPixel0+this.xPixels-1):(this.xPixels=0,this.xPixel1=
this.imageView.xPixel0-30))},"~N");c(c$,"hasPoint",function(a,b){return a>=this.xPixel00&&a<=this.xPixel11&&b>=this.yPixel000&&b<=this.yPixel11*this.nSplit},"~N,~N");c(c$,"isInPlotRegion",function(a,b){return a>=this.xPixel0&&a<=this.xPixel1&&b>=this.yPixel0&&b<=this.yPixel1},"~N,~N");c(c$,"getSplitPoint",function(a){return Math.max(0,Math.min(v((a-this.yPixel000)/(this.yPixel11-this.yPixel00)),this.nSplit-1))},"~N");c(c$,"isSplitWidget",function(a,b){return this.isFrameBox(a,b,this.splitterX,this.splitterY)},
"~N,~N");c(c$,"isCloserWidget",function(a,b){return this.isFrameBox(a,b,this.closerX,this.closerY)},"~N,~N");c(c$,"initGraphSet",function(a,b){null==JSV.common.GraphSet.veryLightGrey&&(JSV.common.GraphSet.veryLightGrey=this.g2d.getColor3(200,200,200));this.setPlotColors(JSV.common.ColorParameters.defaultPlotColors);this.xAxisLeftToRight=this.getSpectrumAt(0).shouldDisplayXAxisIncreasing();this.setDrawXAxis();var d=E(this.nSpectra,0),c=E(this.nSpectra,0);this.bsSelected.setBits(0,this.nSpectra);this.allowStackedYScale=
!0;0>=b&&(b=2147483647);this.isSplittable=1<this.nSpectra;this.showAllStacked=(this.allowStacking=this.spectra.get(0).isStackable())&&1<this.nSpectra;for(var f=0;f<this.nSpectra;f++){var h=this.spectra.get(f).getXYCoords().length-1;d[f]=JSV.common.Coordinate.intoRange(a,0,h);c[f]=JSV.common.Coordinate.intoRange(b,0,h);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,d,c,null,null);this.viewList=new JU.Lst;this.viewList.addLast(this.viewData)},"~N,~N");c(c$,"getView",function(a,b,d,c,f,h,e,j){var l=0==this.graphsTemp.size()?this.spectra:this.graphsTemp,p=this.getSpectrumAt(0).getSubSpectra(),m=null==p||2==p.size()&&p.get(1).isImaginary(),n=!this.getSpectrumAt(0).is1D();m&&d==c?l=this.spectra:d==c&&(this.viewData=new JSV.common.ViewData(p,d,c,this.getSpectrum().isContinuous()),l=null);null!=l&&(this.viewData=new JSV.common.ViewData(l,d,c,f,h,this.getSpectrumAt(0).isContinuous(),
n),a!=b&&this.getScale().setXRange(a,b));null!=e&&(JSV.common.ScaleData.copyScaleFactors(e,this.viewData.getScaleData()),null!=j&&JSV.common.ScaleData.copyYScales(j,this.viewData.getScaleData()),this.getCurrentView())},"~N,~N,~N,~N,~A,~A,~A,~A");c(c$,"isNearby",function(a,b,d,c){var f=a.getXVal(),h=d.toPixelX(f);a=this.toPixelY(a.getYVal());f=b.getXVal();d=d.toPixelX(f);b=this.toPixelY(b.getYVal());return Math.abs(h-d)+Math.abs(a-b)<c},"JSV.common.Coordinate,JSV.common.Coordinate,JSV.common.XYScaleConverter,~N");
c(c$,"setReversePlot",function(a){(this.reversePlot=a)&&this.closeDialogsExcept(JSV.common.Annotation.AType.NONE);this.setDrawXAxis()},"~B");c(c$,"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(c$,"isInTopBar",function(a,b){return a==this.fixX(a)&&b>this.pin1Dx0.yPixel0-2&&b<this.pin1Dx0.yPixel1},"~N,~N");c(c$,"isInTopBar2D",
function(a,b){return null!=this.imageView&&a==this.imageView.fixX(a)&&b>this.pin2Dx0.yPixel0-2&&b<this.pin2Dx0.yPixel1},"~N,~N");c(c$,"isInRightBar",function(a,b){return b==this.fixY(b)&&a>this.pin1Dy0.xPixel1&&a<this.pin1Dy0.xPixel0+2},"~N,~N");c(c$,"isInRightBar2D",function(a,b){return null!=this.imageView&&b==this.fixY(b)&&a>this.pin2Dy0.xPixel1&&a<this.pin2Dy0.xPixel0+2},"~N,~N");c(c$,"toX0",function(a){return this.viewList.get(0).getScale().toX0(this.fixX(a),this.xPixel0,this.xPixel1,this.drawXAxisLeftToRight)},
"~N");c(c$,"toY0",function(a){return this.viewList.get(0).getScale().toY0(this.fixY(a),this.yPixel0,this.yPixel1)},"~N");e(c$,"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(c$,"toY",function(a){return this.getScale().toY(a,this.yPixel0)},"~N");c(c$,"toPixelX",function(a){return this.getScale().toPixelX(a,this.xPixel0,this.xPixel1,this.drawXAxisLeftToRight)},"~N");
c(c$,"toPixelY",function(a){return this.getScale().toPixelY(a,this.yPixel1)},"~N");c(c$,"toPixelX0",function(a){return this.viewList.get(0).getScale().toPixelX0(a,this.xPixel0,this.xPixel1,this.drawXAxisLeftToRight)},"~N");c(c$,"toPixelY0",function(a){return this.fixY(this.viewList.get(0).getScale().toPixelY0(a,this.yPixel0,this.yPixel1))},"~N");c(c$,"fixX",function(a){return JSV.common.Coordinate.intoRange(a,this.xPixel0,this.xPixel1)},"~N");c(c$,"fixY",function(a){return JSV.common.Coordinate.intoRange(a,
this.yPixel0,this.yPixel1)},"~N");c(c$,"getXPixel0",function(){return this.xPixel0});c(c$,"getXPixels",function(){return this.xPixels});e(c$,"getYPixels",function(){return this.yPixels});c(c$,"getScale",function(){return this.viewData.getScale()});c(c$,"toPixelYint",function(a){return this.yPixel1-v(Double.isNaN(a)?-2147483648:this.yPixels*a)},"~N");c(c$,"findAnnotation2D",function(a){for(var b=this.annotations.size();0<=--b;){var d=this.annotations.get(b);if(this.isNearby(d,a,this.imageView,10))return d}return null},
"JSV.common.Coordinate");c(c$,"addAnnotation",function(a,b){null==this.annotations&&(this.annotations=new JU.Lst);for(var d=!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)))d=!0,this.annotations.removeItemAt(c);0<a.text.length&&(!d||!b)&&this.annotations.addLast(a)},"JSV.common.Annotation,~B");c(c$,"setImageWindow",function(){this.imageView.setPixelWidthHeight(v((this.pd.display1D?0.6:1)*this.xPixels0),this.yPixels);
this.imageView.setXY0(this.getSpectrumAt(0),v(Math.floor(this.xPixel10-this.imageView.xPixels)),this.yPixel0)});c(c$,"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(c$,"setXPixelMovedTo",function(a,b,d,c){1.7976931348623157E308==a&&1.7976931348623157E308==b?(this.xPixelMovedTo=
d,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!=b&&(this.xPixelMovedTo2=this.toPixelX(b)))},"~N,~N,~N,~N");c(c$,"processPendingMeasurement",function(a,b,d){if(!this.isInPlotRegion(a,
b)||this.is2dClick(a,b))this.pendingMeasurement=null;else{var c=this.toX(a),f=this.toY(b),h=c;switch(d){case 0:this.pendingMeasurement.setPt2(this.toX(a),this.toY(b));break;case 3:case 2:if(0>this.iSpectrumClicked)break;var e=this.spectra.get(this.iSpectrumClicked);this.setScale(this.iSpectrumClicked);3!=d&&(d=this.findMeasurement(this.selectedSpectrumMeasurements,a,b,1),null!=d?(c=d.getXVal(),f=d.getYVal()):null!=(d=this.findMeasurement(this.selectedSpectrumMeasurements,a,b,2))?(c=d.getXVal2(),f=
d.getYVal2()):c=this.getNearestPeak(e,c,f));this.pendingMeasurement=(new JSV.common.Measurement).setM1(c,f,e);this.pendingMeasurement.setPt2(h,f);this.pd.setTaintedAll();this.pd.repaint();break;case 1:case -2:case -3:for(h=null!=this.pendingMeasurement&&this.isVisible(this.getDialog(JSV.common.Annotation.AType.Measurements,-1));h;){this.setScale(this.getSpectrumIndex(this.pendingMeasurement.spec));if(3!=d){if(!this.findNearestMaxMin()){h=!1;break}a=this.xPixelMovedTo}c=this.toX(a);f=this.toY(b);this.pendingMeasurement.setPt2(c,
f);if(0==this.pendingMeasurement.text.length){h=!1;break}this.setMeasurement(this.pendingMeasurement);if(1!=d){h=!1;break}this.setSpectrumClicked(this.getSpectrumIndex(this.pendingMeasurement.spec));this.pendingMeasurement=(new JSV.common.Measurement).setM1(c,f,this.pendingMeasurement.spec);break}h||(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(c$,"checkIntegralNormalizationClick",function(a,b){if(null==
this.selectedSpectrumIntegrals)return!1;var d=this.findMeasurement(this.selectedSpectrumIntegrals,a,b,-5);if(null==d)return!1;this.selectedIntegral=d;this.pd.normalizeIntegral();this.updateDialog(JSV.common.Annotation.AType.Integration,-1);this.setSpectrumClicked(this.getSpectrumIndex(d.spec));return!0},"~N,~N");c(c$,"getNearestPeak",function(a,b,d){var c=JSV.common.Coordinate.getNearestXWithYAbove(a.getXYCoords(),b,d,a.isInverted(),!1);a=JSV.common.Coordinate.getNearestXWithYAbove(a.getXYCoords(),
b,d,a.isInverted(),!0);return Double.isNaN(c)?a:Double.isNaN(a)?c:Math.abs(c-b)<Math.abs(a-b)?c:a},"JSV.common.Spectrum,~N,~N");c(c$,"findMeasurement",function(a,b,d,c){if(null==a||0==a.size())return null;if(0==c){var f=this.findMeasurement(a,b,d,-1);return null!=f||w(a.get(0),JSV.common.Integral)?f:this.findMeasurement(a,b,d,-2)}for(var h=a.size();0<=--h;){var f=a.get(h),e,j,l,p;w(f,JSV.common.Integral)?(e=j=this.toPixelX(f.getXVal2()),l=this.toPixelYint(f.getYVal()),p=this.toPixelYint(f.getYVal2())):
(e=this.toPixelX(f.getXVal()),j=this.toPixelX(f.getXVal2()),l=p=-2==c?this.yPixel1-2:this.toPixelY(f.getYVal()));switch(c){case 1:if(4>Math.abs(b-e)+Math.abs(d-l))return f;break;case 2:if(4>Math.abs(b-j)+Math.abs(d-p))return f;break;case -5:l=p=v((l+p)/2),j=e+20;default:case -1:case -2:if(JSV.common.GraphSet.isOnLine(b,d,e,l,j,p))return f}}return null},"JSV.common.MeasurementData,~N,~N,~N");c(c$,"setMeasurement",function(a){var b=this.getSpectrumIndex(a.spec),d=this.getDialog(JSV.common.Annotation.AType.Measurements,
b);null==d&&this.addDialog(b,JSV.common.Annotation.AType.Measurements,d=new JSV.common.MeasurementData(JSV.common.Annotation.AType.Measurements,a.spec));d.getData().addLast(a.copyM());this.updateDialog(JSV.common.Annotation.AType.Measurements,-1)},"JSV.common.Measurement");c(c$,"checkArrowUpDownClick",function(a,b){var d=!1,c=this.isArrowClick(a,b,3)?JSV.common.GraphSet.RT2:this.isArrowClick(a,b,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);d=!0}else this.isArrowClick(a,b,-1)&&(this.resetViewCompletely(),d=!0);d&&(null!=this.imageView&&(this.update2dImage(!1),this.resetPinsFromView()),this.pd.setTaintedAll());return d},"~N,~N");c(c$,"resetViewCompletely",function(){this.clearViews();this.showAllStacked&&!this.stackSelected&&this.closeDialogsExcept(JSV.common.Annotation.AType.NONE);
this.viewData.resetScaleFactors();this.updateDialogs()});c(c$,"checkArrowLeftRightClick",function(a,b){if(this.haveLeftRightArrows){var d=this.isArrowClick(a,b,1)?-1:this.isArrowClick(a,b,2)?1:0;if(0!=d)return d=this.iSpectrumSelected+d,0>d&&(d=this.nSpectra-1),this.setSpectrumClicked(d%this.nSpectra),!0;if(this.isArrowClick(a,b,0)){if(this.showAllStacked)return this.showAllStacked=!1,this.setSpectrumClicked(this.getFixedSelectedSpectrumIndex()),!0;this.showAllStacked=this.allowStacking;this.setSpectrumSelected(-1);
this.stackSelected=!1}}return!1},"~N,~N");c(c$,"isArrowClick",function(a,b,d){switch(d){case 3:case 4:case -1:return d=v((this.yPixel00+this.yPixel11)/2)+15*(3==d?-1:4==d?1:0),10>Math.abs(this.xVArrows-a)&&10>Math.abs(d-b);case 1:case 2:case 0:return d=this.xHArrows+15*(1==d?-1:2==d?1:0),10>Math.abs(d-a)&&10>Math.abs(this.yHArrows-b)}return!1},"~N,~N,~N");c(c$,"setWidgetValueByUser",function(a){var b;b=a===this.cur2Dy?""+this.imageView.toSubspectrumIndex(a.yPixel0):a===this.pin1Dx01?""+Math.min(this.pin1Dx0.getXVal(),
this.pin1Dx1.getXVal())+" - "+Math.max(this.pin1Dx0.getXVal(),this.pin1Dx1.getXVal()):a===this.pin1Dy01?""+Math.min(this.pin1Dy0.getYVal(),this.pin1Dy1.getYVal())+" - "+Math.max(this.pin1Dy0.getYVal(),this.pin1Dy1.getYVal()):a===this.pin2Dx01?""+Math.min(this.pin2Dx0.getXVal(),this.pin2Dx1.getXVal())+" - "+Math.max(this.pin2Dx0.getXVal(),this.pin2Dx1.getXVal()):a===this.pin2Dy01?""+v(Math.min(this.pin2Dy0.getYVal(),this.pin2Dy1.getYVal()))+" - "+v(Math.max(this.pin2Dy0.getYVal(),this.pin2Dy1.getYVal())):
""+a.getValue();b=this.pd.getInput("New value?","Set Slider",b);if(null!=b){b=b.trim();try{if(a===this.pin1Dx01||a===this.pin1Dy01||a===this.pin2Dx01||a===this.pin2Dy01){var d=b.indexOf("-",1);if(!(0>d)){var c=Double.$valueOf(b.substring(0,d)).doubleValue(),f=Double.$valueOf(b.substring(d+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 h=Double.$valueOf(b).doubleValue();a.isXtype?(f=a===this.pin1Dx0||a===this.cur2Dx0||a===this.pin2Dx0?this.pin1Dx1.getXVal():this.pin1Dx0.getXVal(),this.doZoom(h,0,f,0,!a.is2D,!1,!1,!0,!0)):a===this.cur2Dy?this.setCurrentSubSpectrum(v(h)):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(v(h)),this.pin2Dx1.xPixel0,
f)):(f=a===this.pin1Dy0?this.pin1Dy1.getYVal():this.pin1Dy0.getYVal(),this.doZoom(this.pin1Dx0.getXVal(),h,this.pin1Dx1.getXVal(),f,null==this.imageView,null==this.imageView,!1,!1,!0))}}catch(e){if(!z(e,Exception))throw e;}}},"JSV.common.PlotWidget");c(c$,"removeAllHighlights",function(a){if(null==a)this.highlights.clear();else for(var b=this.highlights.size();0<=--b;)this.highlights.get(b).spectrum===a&&this.highlights.removeItemAt(b)},"JSV.common.Spectrum");c(c$,"setCoordClicked",function(a,b,d){0==
d&&(this.nextClickForSetPeak=null);if(Double.isNaN(b))return this.pd.coordClicked=null,this.pd.coordsClicked=null;this.pd.coordClicked=(new JSV.common.Coordinate).set(this.lastClickX=b,d);this.pd.coordsClicked=this.getSpectrum().getXYCoords();this.pd.xPixelClicked=this.lastPixelX=a;return this.pd.coordClicked},"~N,~N,~N");c(c$,"setWidgets",function(a,b,d){if(a||null==this.pin1Dx0)null==this.zoomBox1D?this.newPins():this.resetPinPositions();this.setDerivedPins(b);this.setPinSliderPositions(d)},"~B,~N,~B");
c(c$,"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=x(-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(c$,"setWidgetX",function(a,b){a.setX(b,this.toPixelX0(b))},"JSV.common.PlotWidget,~N");c(c$,"setWidgetY",function(a,b){a.setY(b,this.toPixelY0(b))},"JSV.common.PlotWidget,~N");c(c$,"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(c$,"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(c$,"resetX",function(a){this.setWidgetX(a,a.getXVal())},"JSV.common.PlotWidget");c(c$,"resetY",function(a){this.setWidgetY(a,a.getYVal())},"JSV.common.PlotWidget");c(c$,"setPinSliderPositions",function(a){this.pin1Dx0.yPixel0=this.pin1Dx1.yPixel0=this.pin1Dx01.yPixel0=this.yPixel0-5;this.pin1Dx0.yPixel1=this.pin1Dx1.yPixel1=this.pin1Dx01.yPixel1=this.yPixel0;this.cur1D2x1.yPixel1=this.cur1D2x2.yPixel1=
this.yPixel0-5;this.cur1D2x1.yPixel0=this.cur1D2x2.yPixel0=this.yPixel1+6;null==this.imageView?(this.pin1Dy0.xPixel0=this.pin1Dy1.xPixel0=this.pin1Dy01.xPixel0=this.xPixel1+5,this.pin1Dy0.xPixel1=this.pin1Dy1.xPixel1=this.pin1Dy01.xPixel1=this.xPixel1):(this.pin1Dy0.xPixel0=this.pin1Dy1.xPixel0=this.pin1Dy01.xPixel0=this.imageView.xPixel1+15,this.pin1Dy0.xPixel1=this.pin1Dy1.xPixel1=this.pin1Dy01.xPixel1=this.imageView.xPixel1+10,this.pin2Dx0.yPixel0=this.pin2Dx1.yPixel0=this.pin2Dx01.yPixel0=this.yPixel0-
5,this.pin2Dx0.yPixel1=this.pin2Dx1.yPixel1=this.pin2Dx01.yPixel1=this.yPixel0,this.pin2Dy0.xPixel0=this.pin2Dy1.xPixel0=this.pin2Dy01.xPixel0=this.imageView.xPixel1+5,this.pin2Dy0.xPixel1=this.pin2Dy1.xPixel1=this.pin2Dy01.xPixel1=this.imageView.xPixel1,this.cur2Dx0.yPixel0=this.cur2Dx1.yPixel0=this.yPixel1+6,this.cur2Dx0.yPixel1=this.cur2Dx1.yPixel1=this.yPixel0-5,this.cur2Dx0.yPixel0=this.cur2Dx1.yPixel0=this.yPixel1+6,this.cur2Dx1.yPixel1=this.cur2Dx1.yPixel1=this.yPixel0-5,this.cur2Dy.xPixel0=
a?v((this.xPixel1+this.imageView.xPixel0)/2):this.imageView.xPixel0-6,this.cur2Dy.xPixel1=this.imageView.xPixel1+5)},"~B");c(c$,"setDerivedPins",function(a){this.widgetsAreSet=!0;null!=this.gs2dLinkedX&&this.cur1D2x1.setX(this.cur1D2x1.getXVal(),this.toPixelX(this.cur1D2x1.getXVal()));null!=this.gs2dLinkedY&&this.cur1D2x2.setX(this.cur1D2x2.getXVal(),this.toPixelX(this.cur1D2x2.getXVal()));this.pin1Dx01.setX(0,v((this.pin1Dx0.xPixel0+this.pin1Dx1.xPixel0)/2));this.pin1Dy01.setY(0,v((this.pin1Dy0.yPixel0+
this.pin1Dy1.yPixel0)/2));this.pin1Dx01.setEnabled(Math.min(this.pin1Dx0.xPixel0,this.pin1Dx1.xPixel0)>this.xPixel0||Math.max(this.pin1Dx0.xPixel0,this.pin1Dx1.xPixel0)<this.xPixel1);this.pin1Dy01.setEnabled(Math.min(this.pin1Dy0.yPixel0,this.pin1Dy1.yPixel0)>Math.min(this.toPixelY(this.getScale().minY),this.toPixelY(this.getScale().maxY))||Math.max(this.pin1Dy0.yPixel0,this.pin1Dy1.yPixel0)<Math.max(this.toPixelY(this.getScale().minY),this.toPixelY(this.getScale().maxY)));if(null!=this.imageView){var b=
this.pin1Dx0.getXVal();this.cur2Dx0.setX(b,this.imageView.toPixelX(b));b=this.pin1Dx1.getXVal();this.cur2Dx1.setX(b,this.imageView.toPixelX(b));b=this.imageView.toX(this.imageView.xPixel0);this.pin2Dx0.setX(b,this.imageView.toPixelX0(b));b=this.imageView.toX(this.imageView.xPixel1);this.pin2Dx1.setX(b,this.imageView.toPixelX0(b));this.pin2Dx01.setX(0,v((this.pin2Dx0.xPixel0+this.pin2Dx1.xPixel0)/2));b=this.imageView.imageHeight-1-this.imageView.yView1;this.pin2Dy0.setY(b,this.imageView.toPixelY0(b));
b=this.imageView.imageHeight-1-this.imageView.yView2;this.pin2Dy1.setY(b,this.imageView.toPixelY0(b));this.pin2Dy01.setY(0,v((this.pin2Dy0.yPixel0+this.pin2Dy1.yPixel0)/2));this.cur2Dy.yPixel0=this.cur2Dy.yPixel1=this.imageView.subIndexToPixelY(a);this.pin2Dx01.setEnabled(Math.min(this.pin2Dx0.xPixel0,this.pin2Dx1.xPixel0)!=this.imageView.xPixel0||Math.max(this.pin2Dx0.xPixel0,this.pin2Dx1.xPixel1)!=this.imageView.xPixel1);this.pin2Dy01.setEnabled(Math.min(this.pin2Dy0.yPixel0,this.pin2Dy1.yPixel0)!=
this.yPixel0||Math.max(this.pin2Dy0.yPixel0,this.pin2Dy1.yPixel1)!=this.yPixel1)}},"~N");c(c$,"doZoom",function(a,b,d,c,f,h,e,j,l){a==d?(a=this.getScale().minXOnScale,d=this.getScale().maxXOnScale):this.isLinked&&j&&this.pd.doZoomLinked(this,a,d,l,e,f);a>d&&(j=a,a=d,d=j);b>c&&(j=b,b=c,c=j);j=!f&&null!=this.imageView&&(this.imageView.minZ!=b||this.imageView.maxZ!=c);if(this.zoomEnabled||j){if(e){if(!this.getScale().isInRangeX(a)&&!this.getScale().isInRangeX(d))return;this.getScale().isInRangeX(a)?
this.getScale().isInRangeX(d)||(d=this.getScale().maxX):a=this.getScale().minX}this.pd.setTaintedAll();e=this.viewData.getScaleData();var p=E(this.nSpectra,0),m=E(this.nSpectra,0);this.graphsTemp.clear();var n=this.getSpectrumAt(0).getSubSpectra(),n=null==n||2==n.size();if(this.getSpectrumAt(0).is1D()&&!n){if(this.graphsTemp.addLast(this.getSpectrum()),!JSV.common.ScaleData.setDataPointIndices(this.graphsTemp,a,d,3,p,m))return}else if(!JSV.common.ScaleData.setDataPointIndices(this.spectra,a,d,3,p,
m))return;if(n=b==c)f=!j&&f?f=this.getScale().spectrumScaleFactor:1,1E-4>Math.abs(f-1)&&(b=this.getScale().minYOnScale,c=this.getScale().maxYOnScale);f=null;if(n||h)this.getCurrentView(),f=this.viewData.getNewScales(this.iSpectrumSelected,n,b,c);this.getView(a,d,b,c,p,m,e,f);this.setXPixelMovedTo(1E10,1.7976931348623157E308,0,0);this.setWidgetX(this.pin1Dx0,a);this.setWidgetX(this.pin1Dx1,d);this.setWidgetY(this.pin1Dy0,b);this.setWidgetY(this.pin1Dy1,c);null==this.imageView?this.updateDialogs():
(a=this.getSpectrumAt(0).getSubIndex(),d=this.imageView.fixSubIndex(a),d!=a&&this.setCurrentSubSpectrum(d),j&&this.update2dImage(!1));l&&this.addCurrentZoom()}},"~N,~N,~N,~N,~B,~B,~B,~B,~B");c(c$,"updateDialogs",function(){this.updateDialog(JSV.common.Annotation.AType.PeakList,-1);this.updateDialog(JSV.common.Annotation.AType.Measurements,-1)});c(c$,"setCurrentSubSpectrum",function(a){var b=this.getSpectrumAt(0);a=b.setCurrentSubSpectrum(a);b.isForcedSubset()&&this.viewData.setXRangeForSubSpectrum(this.getSpectrum().getXYCoords());
this.pd.notifySubSpectrumChange(a,this.getSpectrum())},"~N");c(c$,"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(c$,"setZoomTo",function(a){this.currentZoomIndex=a;this.viewData=this.viewList.get(a);this.resetPinsFromView()},"~N");c(c$,"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(c$,"drawAll",function(a,b,d,c,f,h,e){this.g2d=this.pd.g2d;this.gMain=a;var j=this.getSpectrumAt(0),l=j.getSubIndex();this.is2DSpectrum=!j.is1D()&&(this.isLinked||this.pd.getBoolean(JSV.common.ScriptToken.DISPLAY2D))&&(null!=this.imageView||this.get2DImage(j));null!=this.imageView&&h&&(this.pd.isPrinting&&this.g2d!==this.pd.g2d0&&this.g2d.newGrayScaleImage(a,this.image2D,this.imageView.imageWidth,this.imageView.imageHeight,
this.imageView.getBuffer()),this.is2DSpectrum&&this.setPositionForFrame(c),this.draw2DImage());var p=this.stackSelected||!this.showAllStacked?this.iSpectrumSelected:-1,m=!this.showAllStacked||1==this.nSpectra||0<=p,j=null==this.imageView||this.pd.display1D,n=0<=p?1:0,k=this.getFixedSelectedSpectrumIndex();if(j&&h&&(this.fillBox(a,this.xPixel0,this.yPixel0,this.xPixel1,this.yPixel1,JSV.common.ScriptToken.PLOTAREACOLOR),0>p)){m=!0;for(p=0;p<this.nSpectra;p++)this.doPlot(p,c)&&0!=n++&&(m=(new Boolean(m&
this.viewData.areYScalesSame(p-1,p))).valueOf())}var q=1==this.nSpectra?0:!this.showAllStacked?this.iSpectrumMovedTo:this.iSpectrumSelected;d=d===a?b:d;if(h){var p=this.pd.getCurrentGraphSet()===this&&!this.isLinked&&(!this.isSplittable||1==this.nSplit||this.pd.currentSplitPoint==c),r=this.zoomEnabled&&!this.isDrawNoSpectra()&&this.pd.isCurrentGraphSet(this)&&this.spectra.get(0).isScalable()&&(p||1==this.nSpectra)&&(1==this.nSplit||this.pd.currentSplitPoint==this.iSpectrumMovedTo);this.drawFrame(a,
q,p,this.isSplittable,r)}if(this.pd.isCurrentGraphSet(this)&&c==this.pd.currentSplitPoint&&(2>n||0<=this.iSpectrumSelected))this.$haveSelectedSpectrum=!0;this.haveSingleYScale=this.showAllStacked&&1<this.nSpectra?this.allowStackedYScale&&m:!0;if(j){m=I(this.yPixels*(this.yStackOffsetPercent/100));this.haveLeftRightArrows=!1;for(r=p=0;p<this.nSpectra;p++)if(this.doPlot(p,c)){var q=this.stackSelected&&0<=this.iSpectrumSelected&&this.iSpectrumSelected!=p,s=!this.reversePlot&&this.getShowAnnotation(JSV.common.Annotation.AType.Integration,
p)&&(!this.showAllStacked||this.iSpectrumSelected==p)?this.getDialog(JSV.common.Annotation.AType.Integration,p).getData():null;this.setScale(p);var t=this.spectra.get(p);1<this.nSplit&&(k=p);var w=!q&&(1==this.nSplit||this.showAllStacked||this.iSpectrumSelected==c),v=w&&this.$haveSelectedSpectrum&&p==k;w&&(this.resetPinsFromView(),this.drawWidgets(b,d,l,f,j,v,!1));this.haveSingleYScale&&(p==k&&h)&&(this.drawGrid(a),this.pd.isPrinting&&1<this.nSplit&&this.drawSpectrumSource(a,p));w&&this.drawWidgets(b,
d,l,!1,j,v,!0);!this.isDrawNoSpectra()&&((1==this.nSpectra||0<=this.iSpectrumSelected)&&(this.haveSingleYScale&&p==k||this.showAllStacked&&this.stackSelected&&p==this.iSpectrumSelected))&&this.drawHighlightsAndPeakTabs(b,d,p);if(h){if((1==n&&0>this.iSpectrumSelected||this.iSpectrumSelected==p&&this.pd.isCurrentGraphSet(this))&&this.pd.titleOn&&!this.pd.titleDrawn)this.pd.drawTitle(a,this.height,this.width,this.pd.getDrawTitle(this.pd.isPrinting)),this.pd.titleDrawn=!0;this.haveSingleYScale&&p==k&&
(this.pd.getBoolean(JSV.common.ScriptToken.YSCALEON)&&this.drawYScale(a,this),this.pd.getBoolean(JSV.common.ScriptToken.YUNITSON)&&this.drawYUnits(a))}var w=t.isContinuous(),v=(1<this.nSplit?p==this.iSpectrumMovedTo:this.isLinked||p==k)&&!this.pd.isPrinting&&w,x=!q&&null!=this.pendingIntegral&&t===this.pendingIntegral.spec;if(h||x)this.drawPlot(x&&!h?b:a,p,t,w,r,q,null,v,x,e);this.drawIntegration(b,p,r,q,s,w,v);this.drawMeasurements(b,p);null!=this.pendingMeasurement&&this.pendingMeasurement.spec===
t&&this.drawMeasurement(b,this.pendingMeasurement);v&&0<=this.xPixelMovedTo&&this.drawSpectrumPointer(b,t,r,s);1<this.nSpectra&&(1==this.nSplit&&this.pd.isCurrentGraphSet(this)&&h)&&(this.haveLeftRightArrows=!0,this.pd.isPrinting||(this.setScale(0),q=this.iSpectrumSelected,2!=this.nSpectra&&(this.setPlotColor(a,(q+this.nSpectra-1)%this.nSpectra),this.fillArrow(a,1,this.yHArrows,this.xHArrows-9,!0),this.setCurrentBoxColor(a),this.fillArrow(a,1,this.yHArrows,this.xHArrows-9,!1)),0<=q&&(this.setPlotColor(a,
q),this.fillCircle(a,this.xHArrows,this.yHArrows,!0)),this.setCurrentBoxColor(a),this.fillCircle(a,this.xHArrows,this.yHArrows,!1),this.setPlotColor(a,(q+1)%this.nSpectra),this.fillArrow(a,2,this.yHArrows,this.xHArrows+9,!0),this.setCurrentBoxColor(a),this.fillArrow(a,2,this.yHArrows,this.xHArrows+9,!1)));r-=m}h&&(this.pd.getBoolean(JSV.common.ScriptToken.XSCALEON)&&this.drawXScale(a,this),this.pd.getBoolean(JSV.common.ScriptToken.XUNITSON)&&this.drawXUnits(a))}else h&&(this.pd.getBoolean(JSV.common.ScriptToken.XSCALEON)&&
this.drawXScale(a,this.imageView),this.pd.getBoolean(JSV.common.ScriptToken.YSCALEON)&&this.drawYScale(a,this.imageView),0<=l&&this.draw2DUnits(a)),this.drawWidgets(b,d,l,f,j,!0,!1),this.drawWidgets(b,d,l,f,j,!0,!0),this.widgetsAreSet=!0;null!=this.annotations&&this.drawAnnotations(b,this.annotations,null)},"~O,~O,~O,~N,~B,~B,~B");c(c$,"drawSpectrumSource",function(a,b){this.pd.printFilePath(a,this.pd.thisWidth-this.pd.right,this.yPixel0,this.spectra.get(b).getFilePath())},"~O,~N");c(c$,"doPlot",
function(a,b){var d=this.stackSelected&&0<=this.iSpectrumSelected&&this.iSpectrumSelected!=a,c=this.showAllStacked||-1==this.iSpectrumSelected||this.iSpectrumSelected==a;return 1<this.nSplit?a==b:c&&(!this.pd.isPrinting||!d)},"~N,~N");c(c$,"drawSpectrumPointer",function(a,b,d,c){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 h=this.yValueMovedTo;this.yValueMovedTo=null==c?b.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(h)||null!=this.pendingMeasurement?(this.g2d.drawLine(a,this.xPixelMovedTo,this.yPixel0,this.xPixelMovedTo,this.yPixel1),0<=this.xPixelMovedTo2&&this.g2d.drawLine(a,this.xPixelMovedTo2,this.yPixel0,this.xPixelMovedTo2,this.yPixel1),this.yValueMovedTo=NaN):(b=null==c?d+this.toPixelY(this.yValueMovedTo):this.toPixelYint(this.yValueMovedTo/100),b==this.fixY(b)&&this.g2d.drawLine(a,this.xPixelMovedTo,b-10,this.xPixelMovedTo,b+10));null!=c&&this.g2d.setStrokeBold(a,!1)},"~O,JSV.common.Spectrum,~N,JSV.common.IntegralData");
c(c$,"setScale",function(a){this.viewData.setScale(a,this.xPixels,this.yPixels,this.spectra.get(a).isInverted())},"~N");c(c$,"draw2DUnits",function(a){var b=this.getSpectrumAt(0).nucleusX,d=this.getSpectrumAt(0).nucleusY;this.setColorFromToken(a,JSV.common.ScriptToken.PLOTCOLOR);this.drawUnits(a,b,this.imageView.xPixel1+5*this.pd.scalingFactor,this.yPixel1,1,1);this.drawUnits(a,d,this.imageView.xPixel0-5*this.pd.scalingFactor,this.yPixel0,1,0)},"~O");c(c$,"drawPeakTabs",function(a,b,d){var c=1==this.nSpectra||
0<=this.iSpectrumSelected?d.getPeakList():null;if(null!=c&&0<c.size()){null!=this.piMouseOver&&this.piMouseOver.spectrum===d&&this.pd.isMouseUp()?(this.g2d.setGraphicsColor(b,this.g2d.getColor4(240,240,240,140)),this.drawPeak(b,this.piMouseOver,0),d.setHighlightedPeak(this.piMouseOver)):d.setHighlightedPeak(null);this.setColorFromToken(a,JSV.common.ScriptToken.PEAKTABCOLOR);for(b=c.size();0<=--b;){var f=c.get(b);this.drawPeak(a,f,f===d.getSelectedPeak()?14:7)}}},"~O,~O,JSV.common.Spectrum");c(c$,
"drawPeak",function(a,b,d){if(!this.pd.isPrinting){var c=b.getXMin(),f=b.getXMax();c!=f&&this.drawBar(a,b,c,f,null,d)}},"~O,JSV.common.PeakInfo,~N");c(c$,"drawWidgets",function(a,b,d,c,f,h,e){this.setWidgets(c,d,f);if(!this.pd.isPrinting||!(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),h&&this.fillBox(a,this.pin1Dy0.xPixel1,this.pin1Dy0.yPixel1,this.pin1Dy1.xPixel1+2,this.pin1Dy1.yPixel0,JSV.common.ScriptToken.PLOTCOLOR));for(d=0;d<this.widgets.length;d++)if(c=this.widgets[d],!(null==c||!c.isPinOrCursor&&!this.zoomEnabled)){var j=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 l=c===this.pin1Dy0||c===this.pin1Dy1||c===this.pin1Dy01;if(null!=this.imageView&&f==l||l&&!h||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||j)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(b,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(c$,"drawBar",function(a,b,d,c,f,h){Math.abs(c-d);Math.abs(this.toX(this.xPixel1)-this.toX(this.xPixel0));d=this.toPixelX(d);c=this.toPixelX(c);
if(d>c){var e=d;d=c;c=e}d=this.fixX(d);c=this.fixX(c);3>c-d&&(d-=2,c+=2);null!=b&&b.setPixelRange(d,c);0==h?this.fillBox(a,d,this.yPixel0,c,this.yPixel0+this.yPixels,f):(this.fillBox(a,d,this.yPixel0+2,c,this.yPixel0+5,f),null!=b&&(d=v((d+c)/2),this.fillBox(a,d-1,this.yPixel0+2,d+1,this.yPixel0+2+h,f)))},"~O,JSV.common.PeakInfo,~N,~N,JSV.common.ScriptToken,~N");c(c$,"drawIntegration",function(a,b,d,c,f){null!=f&&(this.haveIntegralDisplayed(b)&&this.drawPlot(a,b,this.spectra.get(b),!0,d,!1,f,!0,!1,
!1),this.drawIntegralValues(a,b,d));b=this.getIntegrationRatios(b);null!=b&&this.drawAnnotations(a,b,JSV.common.ScriptToken.INTEGRALPLOTCOLOR)},"~O,~N,~N,~B,JSV.common.IntegralData,~B,~B");c(c$,"getMeasurements",function(a,b){var d=this.getDialog(a,b);return null==d||0==d.getData().size()||!d.getState()?null:d.getData()},"JSV.common.Annotation.AType,~N");c(c$,"drawPlot",function(a,b,d,c,f,h,e,j,l,p){var m=null==e?d.getXYCoords():this.getIntegrationGraph(b).getXYCoords(),n=null!=e;e=n?e.getBitSet():
null;j=l||null!=d.fillColor&&j;h=h?-2:n?-1:!this.allowStacking?0:b;this.setPlotColor(a,h);var k=!0,q=this.toPixelY(0);n?j=(new Boolean(j&q==this.fixY(q))).valueOf():q=this.fixY(q);var r=n||j?this.pd.getColor(JSV.common.ScriptToken.INTEGRALPLOTCOLOR):null;d=null==r||null==d.fillColor?r:d.fillColor;r=this.viewData.getStartingPointIndex(b);b=this.viewData.getEndingPointIndex(b);if(c&&!p){b--;(p=(n||null!=this.pendingIntegral)&&this.g2d.canDoLineTo())&&this.g2d.doStroke(a,!0);var s=!1;for(c=r;c<=b;c++){var t=
m[c],w=m[c+1],v=n?this.toPixelYint(t.getYVal()):this.toPixelY(t.getYVal());if(-2147483648!=v){var x=n?this.toPixelYint(w.getYVal()):this.toPixelY(w.getYVal());if(-2147483648!=x){var t=t.getXVal(),z=w.getXVal(),w=this.toPixelX(t),y=this.toPixelX(z),v=this.fixY(f+v),x=this.fixY(f+x);n&&(c==r&&(this.xPixelPlot1=w,this.yPixelPlot0=v),this.xPixelPlot0=y,this.yPixelPlot1=x);if(!(y==w&&v==x))if(j&&l&&this.pendingIntegral.overlaps(t,z))null!=d&&(this.g2d.doStroke(a,!1),this.g2d.setGraphicsColor(a,d)),this.g2d.fillRect(a,
Math.min(w,y),Math.min(q,v),Math.max(1,Math.abs(y-w)),Math.abs(q-v)),null!=d&&(this.g2d.doStroke(a,!1),this.g2d.doStroke(a,!0),s=!1,this.setPlotColor(a,h));else if(!(v==x&&v==this.yPixel0)&&(null!=e&&e.get(c)!=k&&(k=e.get(c),p&&s&&(this.g2d.doStroke(a,!1),this.g2d.doStroke(a,!0),s=!1),!this.pd.isPrinting&&0!=this.pd.integralShiftMode?this.setPlotColor(a,0):k?this.setColorFromToken(a,JSV.common.ScriptToken.INTEGRALPLOTCOLOR):this.setPlotColor(a,-3)),!this.pd.isPrinting||k))s?this.g2d.lineTo(a,y,x):
(this.g2d.drawLine(a,w,v,y,x),s=p)}}}p&&this.g2d.doStroke(a,!1)}else{for(c=r;c<=b;c++)l=m[c],x=this.toPixelY(l.getYVal()),-2147483648!=x&&(w=this.toPixelX(l.getXVal()),v=this.toPixelY(Math.max(this.getScale().minYOnScale,0)),v=this.fixY(f+v),x=this.fixY(f+x),v==x&&(v==this.yPixel0||v==this.yPixel1)||(p?this.g2d.fillRect(a,w-1,x-1,3,3):this.g2d.drawLine(a,w,v,w,x)));!p&&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(c$,"drawFrame",function(a,b,d,c,f){if(!this.pd.gridOn||this.pd.isPrinting)if(this.setColorFromToken(a,JSV.common.ScriptToken.GRIDCOLOR),this.g2d.drawRect(a,this.xPixel0,this.yPixel0,this.xPixels,this.yPixels),this.pd.isPrinting)return;this.setCurrentBoxColor(a);f&&(0<=b&&(this.setPlotColor(a,b),this.fillArrow(a,3,this.xVArrows,v((this.yPixel00+this.yPixel11)/2)-9,!0),this.fillArrow(a,4,this.xVArrows,v((this.yPixel00+
this.yPixel11)/2)+9,!0),this.setCurrentBoxColor(a)),this.fillArrow(a,3,this.xVArrows,v((this.yPixel00+this.yPixel11)/2)-9,!1),this.fillCircle(a,this.xVArrows,v((this.yPixel00+this.yPixel11)/2),!1),this.fillArrow(a,4,this.xVArrows,v((this.yPixel00+this.yPixel11)/2)+9,!1));if(null==this.imageView&&d){b=this.xPixel00+10;d=this.xPixel11-10;f=this.yPixel00+1;var h=this.yPixel11-2;this.g2d.drawLine(a,b,f,d,f);this.g2d.drawLine(a,d,f,d,h);this.g2d.drawLine(a,b,h,d,h);this.splitterX=this.closerX=-2147483648;
this.drawBox(a,d-10,f,d,f+10,null);this.g2d.drawLine(a,d-10,f+10,d,f);this.g2d.drawLine(a,d,f+10,d-10,f);this.closerX=d-10;this.closerY=f;c&&(d-=10,this.fillBox(a,d-10,f,d,f+10,null),this.splitterX=d-10,this.splitterY=f)}},"~O,~N,~B,~B,~B");c(c$,"drawGrid",function(a){if(this.pd.gridOn&&null==this.imageView){this.setColorFromToken(a,JSV.common.ScriptToken.GRIDCOLOR);var b;if(Double.isNaN(this.getScale().firstX)){b=this.getScale().maxXOnScale+this.getScale().steps[0]/2;for(var d=this.getScale().minXOnScale;d<
b;d+=this.getScale().steps[0]){var c=this.toPixelX(d);this.g2d.drawLine(a,c,this.yPixel0,c,this.yPixel1)}}else{b=1.0001*this.getScale().maxXOnScale;for(d=this.getScale().firstX;d<=b;d+=this.getScale().steps[0])c=this.toPixelX(d),this.g2d.drawLine(a,c,this.yPixel0,c,this.yPixel1)}for(d=this.getScale().firstY;d<this.getScale().maxYOnScale+this.getScale().steps[1]/2;d+=this.getScale().steps[1])b=this.toPixelY(d),b==this.fixY(b)&&this.g2d.drawLine(a,this.xPixel0,b,this.xPixel1,b)}},"~O");c(c$,"drawXScale",
function(a,b){this.setColorFromToken(a,JSV.common.ScriptToken.SCALECOLOR);this.pd.isPrinting&&this.g2d.drawLine(a,b.getXPixel0(),this.yPixel1,b.getXPixel0()+b.getXPixels()-1,this.yPixel1);for(var d=this.getScale().precision[0],c=this.pd.setFont(a,b.getXPixels(),0,this.pd.isPrinting?10:12,!1),f=this.yPixel1,h=this.yPixel1+4*this.pd.scalingFactor,e=this.yPixel1+2*this.pd.scalingFactor,c=c.getHeight(),j=b.toPixelX(this.getScale().steps[0])-b.toPixelX(0),l=Math.abs(0.95*j),p=this.getScale().firstX-this.getScale().steps[0],
m=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,k=p;k<=m;k+=this.getScale().steps[0]){var j=b.toPixelX(k),r=Double.$valueOf(k),s;switch(n){case 0:s=JU.DF.formatDecimalDbl(k,d);this.mapX.put(r,s);this.drawTick(a,j,f,h,b);j=Math.abs(q-k);q=this.getScale().minorTickCounts[0];if(0!=q){j/=q;for(s=1;s<q;s++)this.drawTick(a,b.toPixelX(k-s*j),f,e,b)}q=k;continue;case 1:s=this.mapX.get(r);if(null==s||j!=b.fixX(j))continue;
var r=this.pd.getStringWidth(s),t=j+v(r/2)==b.fixX(j+v(r/2))?2:0;0<t&&this.g2d.drawString(a,s,j-v(r/t),h+c);k+=Math.floor(r/l)*this.getScale().steps[0]}}}this.mapX.clear()},"~O,JSV.common.XYScaleConverter");c(c$,"drawTick",function(a,b,d,c,f){b==f.fixX(b)&&this.g2d.drawLine(a,b,d,b,c)},"~O,~N,~N,~N,JSV.common.XYScaleConverter");c(c$,"drawYScale",function(a,b){var d=b.getScale(),c=d.precision[1],f=this.pd.setFont(a,b.getXPixels(),0,this.pd.isPrinting?10:12,!1).getHeight(),h=d.maxYOnScale+d.steps[1]/
2,e=-2147483648;this.setColorFromToken(a,JSV.common.ScriptToken.SCALECOLOR);for(var j=0;2>j;j++){1==j&&JSV.common.ScaleData.fixScale(this.mapX);for(var l=d.firstY;l<h;l+=d.steps[1]){var p=Double.$valueOf(l),m=b.getXPixel0(),n=b.toPixelY(l);if(n==b.fixY(n)){var k;0==j&&this.g2d.drawLine(a,m,n,m-3*this.pd.scalingFactor,n);if(!(Math.abs(n-e)<=f))switch(e=n,j){case 0:k=JU.DF.formatDecimalDbl(l,c);this.mapX.put(p,k);break;case 1:k=this.mapX.get(p);if(null==k)continue;k.startsWith("0")&&k.contains("E")&&
(k="0");this.g2d.drawString(a,k,m-4*this.pd.scalingFactor-this.pd.getStringWidth(k),n+v(f/3))}}}}this.mapX.clear()},"~O,JSV.common.XYScaleConverter");c(c$,"drawXUnits",function(a){var b=this.spectra.get(0).getAxisLabel(!0);null!=b&&this.drawUnits(a,b,this.xPixel1+25*this.pd.scalingFactor,this.yPixel1+5*this.pd.scalingFactor,1,1)},"~O");c(c$,"drawUnits",function(a,b,d,c,f,h){this.setColorFromToken(a,JSV.common.ScriptToken.UNITSCOLOR);this.pd.setFont(a,(null==this.imageView?this:this.imageView).getXPixels(),
3,10,!1);this.g2d.drawString(a,b,v(d-this.pd.getStringWidth(b)*f),v(c+this.pd.getFontHeight()*h))},"~O,~S,~N,~N,~N,~N");c(c$,"drawYUnits",function(a){var b=this.spectra.get(0).getAxisLabel(!1);null!=b&&this.drawUnits(a,b,(this.pd.isPrinting?30:5)*this.pd.scalingFactor,this.yPixel0+(this.pd.isPrinting?0:5)*this.pd.scalingFactor,0,-1)},"~O");c(c$,"drawHighlightsAndPeakTabs",function(a,b,d){var c=this.getMeasurements(JSV.common.Annotation.AType.PeakList,d),f=this.spectra.get(d);if(this.pd.isPrinting)null!=
c&&(this.setColorFromToken(a,JSV.common.ScriptToken.PEAKTABCOLOR),this.printPeakList(a,f,c));else{if(null==c){for(var h=0;h<this.highlights.size();h++){var e=this.highlights.get(h);e.spectrum===f&&(this.pd.setHighlightColor(e.color),this.drawBar(b,null,e.x1,e.x2,JSV.common.ScriptToken.HIGHLIGHTCOLOR,0))}this.pd.peakTabsOn&&this.drawPeakTabs(a,b,f)}if(null!=c){b=f.isInverted()?this.yPixel1-10*this.pd.scalingFactor:this.yPixel0;this.setColorFromToken(a,JSV.common.ScriptToken.PEAKTABCOLOR);for(h=c.size();0<=
--h;)f=c.get(h),f=this.toPixelX(f.getXVal()),this.g2d.drawLine(a,f,b,f,b+10*this.pd.scalingFactor);this.isVisible(this.getDialog(JSV.common.Annotation.AType.PeakList,d))&&(b=this.toPixelY(c.getThresh()),b==this.fixY(b)&&!this.pd.isPrinting&&this.g2d.drawLine(a,this.xPixel0,b,this.xPixel1,b))}}},"~O,~O,~N");c(c$,"printPeakList",function(a,b,d){var c=d.getMeasurementListArray(null);if(0!=c.length){this.pd.setFont(a,this.xPixels,0,8,!1);for(var f=this.pd.getFontHeight(),h=E(d.size(),0),e=E(d.size(),
0),j=0,l=5*this.pd.scalingFactor,p=10*this.pd.scalingFactor,m=15*this.pd.scalingFactor,n=25*this.pd.scalingFactor,k=0;k<c.length;k++)e[k]=this.toPixelX(Double.parseDouble(c[k][1])),0==k?h[k]=e[k]:(h[k]=Math.max(h[k-1]+f,e[k]+f),j+=h[k]-e[k]);j/=2*c.length;h[0]-j<this.xPixel0+n&&(j=h[0]-(this.xPixel0+n));for(k=0;k<c.length;k++)h[k]-=j;k=b.isInverted();b=this.pd.getStringWidth("99.9999");for(var j=6<=c[0].length?this.pd.getStringWidth("99.99"):0,n=k?-1:1,q=(k?this.yPixel1:this.yPixel0)+n*(j+b+m),k=
0;k<c.length;k++)this.g2d.drawLine(a,h[k],q,h[k],q+l*n),this.g2d.drawLine(a,h[k],q+l*n,e[k],q+p*n),this.g2d.drawLine(a,e[k],q+p*n,e[k],q+m*n),0<j&&0<c[k][4].length&&this.g2d.drawLine(a,v((h[k]+h[k-1])/2),q-b+l,v((h[k]+h[k-1])/2),q-b-l);q-=2*n*this.pd.scalingFactor;0<j&&(this.drawStringRotated(a,-90,h[0]-m,q,"  ppm"),this.drawStringRotated(a,-90,h[0]-m,q-b-l," Hz"));for(k=d.size();0<=--k;)this.drawStringRotated(a,-90*n,h[k]+v(n*f/3),q,c[k][1]),0<j&&0<c[k][4].length&&(d=v((h[k]+h[k-1])/2)+v(f/3),this.drawStringRotated(a,
-90,d,q-b-l,c[k][4]))}},"~O,JSV.common.Spectrum,JSV.common.PeakData");c(c$,"drawStringRotated",function(a,b,d,c,f){this.g2d.drawStringRotated(a,f,d,c,b)},"~O,~N,~N,~N,~S");c(c$,"drawAnnotations",function(a,b,d){this.pd.setFont(a,this.xPixels,1,18,!1);for(var c=b.size();0<=--c;){var f=b.get(c);this.setAnnotationColor(a,f,d);var h=(f.is2D?this.imageView:this).toPixelX(f.getXVal()),e=f.isPixels()?v(this.yPixel0+10+10*this.pd.scalingFactor-f.getYVal()):f.is2D?this.imageView.subIndexToPixelY(v(f.getYVal())):
this.toPixelY(f.getYVal());this.g2d.drawString(a,f.text,h+f.offsetX*this.pd.scalingFactor,e-f.offsetY*this.pd.scalingFactor)}},"~O,JU.Lst,JSV.common.ScriptToken");c(c$,"drawIntegralValues",function(a,b,d){var c=this.getMeasurements(JSV.common.Annotation.AType.Integration,b);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 h=c.size();0<=--h;){var e=c.get(h);if(0!=e.getValue()){var j=this.toPixelX(e.getXVal2()),l=d*this.pd.scalingFactor+this.toPixelYint(e.getYVal()),p=d*this.pd.scalingFactor+this.toPixelYint(e.getYVal2());j!=this.fixX(j)||(l!=this.fixY(l)||p!=this.fixY(p))||(this.pd.isPrinting||this.g2d.drawLine(a,j,l,j,p),this.g2d.drawString(a,"  "+e.text,j,v((l+p)/2)+v(f/3)))}}this.g2d.setStrokeBold(a,!1)}b==this.getFixedSelectedSpectrumIndex()&&(this.selectedSpectrumIntegrals=c)},"~O,~N,~N");c(c$,"drawMeasurements",
function(a,b){var d=this.getMeasurements(JSV.common.Annotation.AType.Measurements,b);if(null!=d)for(var c=d.size();0<=--c;)this.drawMeasurement(a,d.get(c));b==this.getFixedSelectedSpectrumIndex()&&(this.selectedSpectrumMeasurements=d)},"~O,~N");c(c$,"drawMeasurement",function(a,b){if(!(0==b.text.length&&b!==this.pendingMeasurement)){this.pd.setFont(a,this.xPixels,1,12,!1);this.g2d.setGraphicsColor(a,b===this.pendingMeasurement?this.pd.getColor(JSV.common.ScriptToken.PEAKTABCOLOR):this.pd.BLACK);var d=
this.toPixelX(b.getXVal()),c=this.toPixelY(b.getYVal()),f=this.toPixelX(b.getXVal2());if(!Double.isNaN(b.getXVal())&&!(d!=this.fixX(d)||f!=this.fixX(f))){var h=2<=Math.abs(d-f),e=this.getScale().isYZeroOnScale()&&b.spec.isHNMR(),j=v((d+f)/2);this.g2d.setStrokeBold(a,!0);h&&this.g2d.drawLine(a,d,c,f,c);e&&this.g2d.drawLine(a,d+1,this.yPixel1-1,f,this.yPixel1-1);this.g2d.setStrokeBold(a,!1);h&&this.g2d.drawString(a,b.text,j+b.offsetX,c-b.offsetY);e&&(this.g2d.drawLine(a,d,this.yPixel1,d,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(c$,"getPinSelected",function(a,b){if(null!=this.widgets)for(var d=0;d<this.widgets.length;d++)if(null!=this.widgets[d]&&this.widgets[d].isPinOrCursor&&this.widgets[d].selected(a,b))return this.widgets[d];return null},"~N,~N");c(c$,"set2DCrossHairs",function(a,b){var d;if(a==this.imageView.fixX(a)&&b==this.fixY(b)&&(this.pin1Dx1.setX(d=this.imageView.toX(a),this.toPixelX(d)),
this.cur2Dx1.setX(d,a),this.setCurrentSubSpectrum(this.imageView.toSubspectrumIndex(b)),this.isLinked)){var c=this.imageView.toY(b);this.pd.set2DCrossHairsLinked(this,d,c,!this.sticky2Dcursor)}},"~N,~N");c(c$,"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(c$,"setAnnotationText",function(a){var b=this.pd.getInput("New text?","Set Label",a.text);if(null==b)return!1;0==b.length?this.annotations.removeObj(a):a.text=b;return!0},"JSV.common.Annotation");c(c$,"checkIntegral",function(a,b,d){var c=this.getDialog(JSV.common.Annotation.AType.Integration,-1);if(null==c)return!1;a=c.getData().addIntegralRegion(a,b);d&&c.isDialog()&&c.update(null,0,0);if(Double.isNaN(b))return!1;this.pendingIntegral=d?null:a;this.pd.isIntegralDrag=
!d;this.selectedSpectrumIntegrals=null;return!0},"~N,~N,~B");c(c$,"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 d=this.getPinSelected(a,b),c=this.getScale().precision[0],f=this.getScale().precision[1];
if(null!=d)this.setStartupPinTip()||(d===this.pin1Dx01||d===this.pin2Dx01?c=JU.DF.formatDecimalDbl(Math.min(this.pin1Dx0.getXVal(),this.pin1Dx1.getXVal()),c)+" - "+JU.DF.formatDecimalDbl(Math.max(this.pin1Dx0.getXVal(),this.pin1Dx1.getXVal()),c):d===this.pin1Dy01?c=JU.DF.formatDecimalDbl(Math.min(this.pin1Dy0.getYVal(),this.pin1Dy1.getYVal()),f)+" - "+JU.DF.formatDecimalDbl(Math.max(this.pin1Dy0.getYVal(),this.pin1Dy1.getYVal()),f):d===this.cur2Dy?(d=this.imageView.toSubspectrumIndex(d.yPixel0),c=
this.get2DYLabel(d,c)):c=d===this.pin2Dy01?""+v(Math.min(this.pin2Dy0.getYVal(),this.pin2Dy1.getYVal()))+" - "+v(Math.max(this.pin2Dy0.getYVal(),this.pin2Dy1.getYVal())):d.isXtype?JU.DF.formatDecimalDbl(d.getXVal(),c):d.is2D?""+v(d.getYVal()):JU.DF.formatDecimalDbl(d.getYVal(),f),this.pd.setToolTipText(c));else{if(null!=this.imageView){if(this.imageView.fixX(a)==a&&this.fixY(b)==b){d=this.imageView.toSubspectrumIndex(b);c="y="+this.get2DYLabel(d,c)+" / x="+JU.DF.formatDecimalDbl(this.imageView.toX(a),
c)+" "+this.getSpectrum().getAxisLabel(!0);this.pd.setToolTipText(c);this.pd.coordStr=c;return}if(!this.pd.display1D){this.pd.setToolTipText("");this.pd.coordStr="";return}}var d=this.toX(this.fixX(a)),c=null!=this.imageView&&this.imageView.isXWithinRange(a)?this.imageView.toSubspectrumIndex(this.fixY(b)):this.toY(this.fixY(b)),f=this.setCoordStr(d,c),h=this.getFixedSelectedSpectrumIndex();this.isInPlotRegion(a,b)?1!=this.nSpectra&&this.haveIntegralDisplayed(h)&&(c=this.getIntegrationGraph(h).getPercentYValueAt(d),
f+=", "+JU.DF.formatDecimalDbl(c,1)):c=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(c)?null:f)}}},"~N,~N");c(c$,"isFrameBox",function(a,b,d,c){return 5>
Math.abs(a-(d+5))&&5>Math.abs(b-(c+5))},"~N,~N,~N,~N");c(c$,"setCoordStr",function(a,b){var d=JU.DF.formatDecimalDbl(a,this.getScale().precision[0]);this.pd.coordStr="("+d+(this.haveSingleYScale||0<=this.iSpectrumSelected?", "+JU.DF.formatDecimalDbl(b,this.getScale().precision[1]):"")+")";return d},"~N,~N");c(c$,"setStartupPinTip",function(){if(null==this.pd.startupPinTip)return!1;this.pd.setToolTipText(this.pd.startupPinTip);this.pd.startupPinTip=null;return!0});c(c$,"get2DYLabel",function(a,b){var d=
this.getSpectrumAt(0).getSubSpectra().get(a);return JU.DF.formatDecimalDbl(d.getY2DPPM(),b)+" PPM"+(d.y2DUnits.equals("HZ")?" ("+JU.DF.formatDecimalDbl(d.getY2D(),b)+" HZ) ":"")},"~N,~N");c(c$,"isOnSpectrum",function(a,b,d){var c=null,f=!0,h=0>d;if(h){c=this.getDialog(JSV.common.Annotation.AType.Integration,-1);if(null==c)return!1;c=c.getData().getXYCoords();d=this.getFixedSelectedSpectrumIndex()}else{this.setScale(d);var e=this.spectra.get(d),c=e.xyCoords,f=e.isContinuous()}var e=d*I(this.yPixels*
(this.yStackOffsetPercent/100)),j=this.viewData.getStartingPointIndex(d);d=this.viewData.getEndingPointIndex(d);if(f)for(f=j;f<d;f++){var l=c[f],p=c[f+1],j=this.toPixelX(l.getXVal()),k=this.toPixelX(p.getXVal()),l=h?this.toPixelYint(l.getYVal()):this.toPixelY(l.getYVal()),p=h?this.toPixelYint(p.getYVal()):this.toPixelY(p.getYVal());if(!(-2147483648==l||-2147483648==p))if(l=this.fixY(l)-e,p=this.fixY(p)-e,JSV.common.GraphSet.isOnLine(a,b,j,l,k,p))return!0}else for(f=j;f<=d;f++)if(h=c[f],p=this.toPixelY(h.getYVal()),
-2147483648!=p&&(j=this.toPixelX(h.getXVal()),l=this.toPixelY(Math.max(this.getScale().minYOnScale,0)),l=this.fixY(l),p=this.fixY(p),!(l==p&&(l==this.yPixel0||l==this.yPixel1))&&JSV.common.GraphSet.isOnLine(a,b,j,l,j,p)))return!0;return!1},"~N,~N,~N");c$.distance=c(c$,"distance",function(a,b){return Math.sqrt(a*a+b*b)},"~N,~N");c$.findCompatibleGraphSet=c(c$,"findCompatibleGraphSet",function(a,b){for(var d=0;d<a.size();d++)if(JSV.common.Spectrum.areXScalesCompatible(b,a.get(d).getSpectrum(),!1,!1))return a.get(d);
return null},"JU.Lst,JSV.common.Spectrum");c$.isGoodEvent=c(c$,"isGoodEvent",function(a,b,d){return null==b?5<Math.abs(a.xPixel1-a.xPixel0)&&5<Math.abs(a.yPixel1-a.yPixel0):d?5<Math.abs(a.xPixel0-b.xPixel0):5<Math.abs(a.yPixel0-b.yPixel0)},"JSV.common.PlotWidget,JSV.common.PlotWidget,~B");c$.isOnLine=c(c$,"isOnLine",function(a,b,d,c,f,e){var u=Math.abs(d-a);if(2>u&&2>Math.abs(c-b))return!0;var j=f-a;if(2>Math.abs(j)&&2>Math.abs(e-b))return!0;var l=c-e;if(2<Math.abs(l)&&c<b==e<b)return!1;var p=d-f;
return 2<Math.abs(p)&&d<a==f<a?!1:JSV.common.GraphSet.distance(u,c-b)+JSV.common.GraphSet.distance(j,b-e)<JSV.common.GraphSet.distance(p,l)+2},"~N,~N,~N,~N,~N,~N");c$.setFractionalPositions=c(c$,"setFractionalPositions",function(a,b,d){var c=b.size(),f=0,e=0;a.isLinked=d!==JSV.common.PanelData.LinkMode.NONE;if(d===JSV.common.PanelData.LinkMode.NONE){for(var u=0;u<c;u++)d=b.get(u),f+=(d.getSpectrumAt(0).is1D(),1)*d.nSplit;f=1/f;for(u=0;u<c;u++)d=b.get(u),d.isLinked=!1,a=d.getSpectrumAt(0).is1D()?f:
1*f,d.fX0=0,d.fY0=e,d.fracX=1,d.fracY=a,e+=a*d.nSplit}else{var f=null,j=-1;if(2==c||3==c)for(u=0;u<c;u++)if(d=b.get(u),!d.getSpectrum().is1D()){f=d;0<=j&&(u=-2);j=u;break}if(-2==j||-1==j&&2!=c)JSV.common.GraphSet.setFractionalPositions(a,b,JSV.common.PanelData.LinkMode.NONE);else for(u=0;u<c;u++)d=b.get(u),d.isLinked=!0,a=d.getSpectrumAt(0),a.is1D()?(null!=f&&(j=f.getSpectrumAt(0),JSV.common.Spectrum.areLinkableX(a,j)&&(d.gs2dLinkedX=f),JSV.common.Spectrum.areLinkableY(a,j)&&(d.gs2dLinkedY=f)),d.fX0=
0,d.fY0=e,d.fracX=null==f?1:0.5,d.fracY=3==c||null==f?0.5:1,e+=0.5):(d.fX0=0.5,d.fY0=0,d.fracX=0.5,d.fracY=1)}},"JSV.common.PanelData,JU.Lst,JSV.common.PanelData.LinkMode");c(c$,"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 d=this.getAnnotation(a,this.lastAnnotation);if(null==d)return null;if(null==this.annotations&&1==a.size()&&'"'==a.get(0).charAt(0))return d=d.text,this.getSpectrum().setTitle(d),d;this.lastAnnotation=d;this.addAnnotation(d,!1);return null},"JU.Lst,~S");c(c$,"addHighlight",function(a,b,d,c){null==d&&(d=this.getSpectrumAt(0));a=L(JSV.common.GraphSet.Highlight,this,null,a,b,d,null==c?this.pd.getColor(JSV.common.ScriptToken.HIGHLIGHTCOLOR):c);this.highlights.contains(a)||this.highlights.addLast(a)},
"~N,~N,JSV.common.Spectrum,javajs.api.GenericColor");c(c$,"addPeakHighlight",function(a){for(var b=this.spectra.size();0<=--b;){var d=this.spectra.get(b);this.removeAllHighlights(d);if(!(null==a||a.isClearAll()||d!==a.spectrum)){var c=a.toString();if(null!=c){var f=JU.PT.getQuotedAttribute(c,"xMin"),c=JU.PT.getQuotedAttribute(c,"xMax");if(null==f||null==c)break;f=JU.PT.parseFloat(f);c=JU.PT.parseFloat(c);if(Float.isNaN(f)||Float.isNaN(c))break;this.pd.addHighlight(this,f,c,d,200,140,140,100);d.setSelectedPeak(a);
!this.getScale().isInRangeX(f)&&!(this.getScale().isInRangeX(c)||f<this.getScale().minX&&this.getScale().maxX<c)&&this.setZoomTo(0)}}}},"JSV.common.PeakInfo");c(c$,"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(c$,"checkSpectrumClickedEvent",function(a,b,d){if(null!=this.nextClickForSetPeak||(1<d||null!=this.pendingMeasurement||
!this.isInPlotRegion(a,b))||0==d&&(d=this.isOnSpectrum(a,b,-1),this.pd.integralShiftMode=d?this.getShiftMode(a,b):0,this.pd.isIntegralDrag=0==this.pd.integralShiftMode&&(d||this.haveIntegralDisplayed(-1)&&null!=this.findMeasurement(this.getIntegrationGraph(-1),a,b,0)),0!=this.pd.integralShiftMode)||!this.showAllStacked)return!1;this.stackSelected=!1;for(d=0;d<this.nSpectra;d++)if(this.isOnSpectrum(a,b,d))return this.setSpectrumClicked(this.iPreviousSpectrumClicked=d),!1;if(this.isDialogOpen())return!1;
this.setSpectrumClicked(-1);return this.stackSelected=!1},"~N,~N,~N");c(c$,"getShiftMode",function(a,b){return this.isStartEndIntegral(a,!1)?b:this.isStartEndIntegral(a,!0)?-b:0},"~N,~N");c(c$,"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(c$,"isStartEndIntegral",function(a,b){return b?
20>this.xPixelPlot1-a:20>a-this.xPixelPlot0},"~N,~B");c(c$,"checkWidgetEvent",function(a,b,d){if(!this.widgetsAreSet)return!1;this.widgetsAreSet=!1;if(d){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;d=this.getPinSelected(a,b);null==d&&(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,d=this.zoomBox1D):null!=this.imageView&&a<this.imageView.xPixel1&&(this.zoomBox2D.setX(this.imageView.toX(a),
this.imageView.fixX(a)),this.zoomBox2D.yPixel0=b,d=this.zoomBox2D));this.pd.thisWidget=d;return!1}this.nextClickForSetPeak=null;d=this.pd.thisWidget;if(null==d)return!1;if(d===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(d===this.zoomBox2D)return this.zoomBox2D.xPixel1=this.imageView.fixX(a),this.zoomBox2D.yPixel1=this.fixY(b),!0;if(d===this.cur2Dy)return b=this.fixY(b),this.cur2Dy.yPixel0=this.cur2Dy.yPixel1=b,this.setCurrentSubSpectrum(this.imageView.toSubspectrumIndex(b)),!0;if(d===this.cur2Dx0||d===this.cur2Dx1)return!1;if(d===this.pin1Dx0||d===this.pin1Dx1||d===this.pin1Dx01){a=
this.fixX(a);d.setX(this.toX0(a),a);if(d===this.pin1Dx01){d=a-v((this.pin1Dx0.xPixel0+this.pin1Dx1.xPixel0)/2);a=this.pin1Dx0.xPixel0+d;b=this.pin1Dx1.xPixel0+d;if(0==d||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(d===this.pin1Dy0||d===this.pin1Dy1||d===this.pin1Dy01){b=this.fixY(b);d.setY(this.toY0(b),b);if(d===this.pin1Dy01){d=b-v((this.pin1Dy0.yPixel0+
this.pin1Dy1.yPixel0)/2)+1;b=this.pin1Dy0.yPixel0+d;a=this.pin1Dy1.yPixel0+d;d=this.toY0(b);var c=this.toY0(a);if(Math.min(d,c)==this.getScale().minY||Math.max(d,c)==this.getScale().maxY)return!0;this.pin1Dy0.setY(d,b);this.pin1Dy1.setY(c,a)}this.doZoom(0,this.pin1Dy0.getYVal(),0,this.pin1Dy1.getYVal(),null==this.imageView,null==this.imageView,!1,!1,!1);return!0}if(d===this.pin2Dx0||d===this.pin2Dx1||d===this.pin2Dx01){a=this.imageView.fixX(a);d.setX(this.imageView.toX0(a),a);if(d===this.pin2Dx01){d=
a-v((this.pin2Dx0.xPixel0+this.pin2Dx1.xPixel0)/2)+1;a=this.pin2Dx0.xPixel0+d;b=this.pin2Dx1.xPixel0+d;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(d===this.pin2Dy0||d===this.pin2Dy1||d===this.pin2Dy01){b=this.fixY(b);d.setY(this.imageView.toSubspectrumIndex(b),b);if(d===this.pin2Dy01){d=b-v((this.pin2Dy0.yPixel0+this.pin2Dy1.yPixel0)/2)+1;b=this.pin2Dy0.yPixel0+d;a=this.pin2Dy1.yPixel0+d;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(c$,"clearIntegrals",function(){this.checkIntegral(NaN,0,!1)});c(c$,"clearMeasurements",function(){this.removeDialog(this.getFixedSelectedSpectrumIndex(),JSV.common.Annotation.AType.Measurements)});c$.createGraphSetsAndSetLinkMode=c(c$,"createGraphSetsAndSetLinkMode",function(a,b,d,c,f,e){for(var u=new JU.Lst,j=0;j<
d.size();j++){var l=d.get(j),p=e===JSV.common.PanelData.LinkMode.NONE?JSV.common.GraphSet.findCompatibleGraphSet(u,l):null;null==p&&u.addLast(p=new JSV.common.GraphSet(b.getPanelData()));p.addSpec(l)}JSV.common.GraphSet.setFractionalPositions(a,u,e);for(j=u.size();0<=--j;)u.get(j).initGraphSet(c,f),JU.Logger.info("JSVGraphSet "+(j+1)+" nSpectra = "+u.get(j).nSpectra);return u},"JSV.common.PanelData,JSV.api.JSVPanel,JU.Lst,~N,~N,JSV.common.PanelData.LinkMode");c(c$,"drawGraphSet",function(a,b,d,c,
f,e,u,j,l,p,k,m){this.zoomEnabled=this.pd.getBoolean(JSV.common.ScriptToken.ENABLEZOOM);this.height=f*this.pd.scalingFactor;this.width=c*this.pd.scalingFactor;this.left=e*this.pd.scalingFactor;this.right=u*this.pd.scalingFactor;this.top=j*this.pd.scalingFactor;this.bottom=l*this.pd.scalingFactor;this.$haveSelectedSpectrum=!1;this.selectedSpectrumMeasurements=this.selectedSpectrumIntegrals=null;if(!this.pd.isPrinting&&null!=this.widgets)for(c=0;c<this.widgets.length;c++)null!=this.widgets[c]&&(this.widgets[c].isVisible=
!1);for(c=0;c<this.nSplit;c++)this.setPositionForFrame(c),this.drawAll(a,b,d,c,p||1<this.nSplit,k,m);this.setPositionForFrame(1<this.nSplit?this.pd.currentSplitPoint:0)},"~O,~O,~O,~N,~N,~N,~N,~N,~N,~B,~B,~B");c(c$,"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");c$.findGraphSet=c(c$,"findGraphSet",function(a,b,d){for(var c=a.size();0<=--c;)if(a.get(c).hasPoint(b,d))return a.get(c);return null},"JU.Lst,~N,~N");c(c$,"findMatchingPeakInfo",function(a){for(var b=null,d=0;d<this.spectra.size()&&null==(b=this.spectra.get(d).findMatchingPeakInfo(a));d++);return b},"JSV.common.PeakInfo");c(c$,"getCurrentSpectrumIndex",
function(){return 1==this.nSpectra?0:this.iSpectrumSelected});c(c$,"getSelectedIntegral",function(){return this.selectedIntegral});c(c$,"getShowAnnotation",function(a,b){var d=this.getDialog(a,b);return null!=d&&d.getState()},"JSV.common.Annotation.AType,~N");c(c$,"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(c$,"haveSelectedSpectrum",function(){return this.$haveSelectedSpectrum});c(c$,"mouseClickedEvent",
function(a,b,d,c){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==d&&(-1==this.iSpectrumClicked&&
0<=this.iPreviousSpectrumClicked)&&this.setSpectrumClicked(this.iPreviousSpectrumClicked),!e&&c)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==d)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&&(c=(new JSV.common.Coordinate).set(this.imageView.toX(a),this.imageView.toSubspectrumIndex(b)),c=this.findAnnotation2D(c),null!=c&&this.setAnnotationText(c)))return;1==d&&(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(c$,"is2dClick",function(a,b){return null!=this.imageView&&a==this.imageView.fixX(a)&&b==this.fixY(b)},"~N,~N");c(c$,"updateDialog",function(a,b){var d=this.getDialog(a,b);if(null!=d&&this.isVisible(d)){var c=this.toX(this.xPixel1)-
this.toX(this.xPixel0),f=this.getSpectrum().isInverted()?this.yPixel1-this.pd.mouseY:this.pd.mouseY-this.yPixel0;d.update(this.pd.coordClicked,c,f)}},"JSV.common.Annotation.AType,~N");c(c$,"isVisible",function(a){return null!=a&&a.isDialog()&&a.isVisible()},"JSV.api.AnnotationData");c(c$,"mousePressedEvent",function(a,b){this.checkWidgetEvent(a,b,!0)},"~N,~N,~N");c(c$,"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 d=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(d===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(d===this.zoomBox1D){if(JSV.common.GraphSet.isGoodEvent(this.zoomBox1D,
null,!0)){var d=this.zoomBox1D.xPixel1,c=this.pd.shiftPressed;this.doZoom(this.toX(this.zoomBox1D.xPixel0),c?this.toY(this.zoomBox1D.yPixel0):0,this.toX(d),c?this.toY(this.zoomBox1D.yPixel1):0,!0,c,!0,!0,!0);this.zoomBox1D.xPixel1=this.zoomBox1D.xPixel0}}else(d===this.pin1Dx0||d===this.pin1Dx1||d===this.cur2Dx0||d===this.cur2Dx1)&&this.addCurrentZoom()}},"~N,~N");c(c$,"mouseMovedEvent",function(a,b){if(1<this.nSpectra){var d=this.getSplitPoint(b);this.setPositionForFrame(d);this.setSpectrumMovedTo(1<
this.nSplit?d:this.iSpectrumSelected);0<=this.iSpectrumMovedTo&&this.setScale(this.iSpectrumMovedTo)}this.inPlotMove=this.isInPlotRegion(a,b);this.setXPixelMovedTo(1.7976931348623157E308,1.7976931348623157E308,this.inPlotMove?a:-1,-1);this.inPlotMove&&(this.xValueMovedTo=this.toX(this.xPixelMovedTo),this.yValueMovedTo=this.getSpectrum().getYValueAt(this.xValueMovedTo));if(0!=this.pd.integralShiftMode){var d=this.getDialog(JSV.common.Annotation.AType.Integration,-1),c=d.getData().getXYCoords(),c=c[0<
this.pd.integralShiftMode?c.length-1:0].getYVal();d.getData().shiftY(this.pd.integralShiftMode,this.toPixelYint(c)+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,d=1<this.nSplit?this.iSpectrumMovedTo:this.iSpectrumClicked,!this.isDrawNoSpectra()&&0<=d&&(d=this.spectra.get(d),null!=d.getPeakList()&&
(this.coordTemp.setXVal(this.toX(a)),this.coordTemp.setYVal(this.toY(b)),this.piMouseOver=d.findPeakByCoord(a,this.coordTemp)))):!this.pd.display1D&&this.sticky2Dcursor&&this.set2DCrossHairs(a,b)))},"~N,~N");c(c$,"nextView",function(){this.currentZoomIndex+1<this.viewList.size()&&this.setZoomTo(this.currentZoomIndex+1)});c(c$,"previousView",function(){0<this.currentZoomIndex&&this.setZoomTo(this.currentZoomIndex-1)});c(c$,"resetView",function(){this.setZoomTo(0)});c(c$,"removeAllHighlights",function(){this.removeAllHighlights(null)});
c(c$,"removeHighlight",function(a){this.highlights.removeItemAt(a)},"~N");c(c$,"removeHighlight",function(a,b){for(var d=this.highlights.size();0<=--d;){var c=this.highlights.get(d);c.x1==a&&c.x2==b&&this.highlights.removeItemAt(d)}},"~N,~N");c(c$,"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(c$,"selectSpectrum",
function(a,b,d){for(var c=!1,f=this.spectra.size();0<=--f;)if((null==a||this.getSpectrumAt(f).getFilePathForwardSlash().equals(a))&&this.getSpectrumAt(f).matchesPeakTypeModel(b,d))this.setSpectrumSelected(f),1<this.nSplit&&this.splitStack(!0),c=!0;1<this.nSpectra&&(!c&&0<=this.iSpectrumSelected&&!this.pd.isCurrentGraphSet(this))&&this.setSpectrumSelected(-2147483648);return c},"~S,~S,~S");c(c$,"selectPeakByFileIndex",function(a,b,d){for(var c,f=this.spectra.size();0<=--f;)if(null!=(c=this.getSpectrumAt(f).selectPeakByFileIndex(a,
b,d)))return c;return null},"~S,~S,~S");c(c$,"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(c$,"setSelectedIntegral",function(a){var b=this.selectedIntegral.getSpectrum();this.getIntegrationGraph(this.getSpectrumIndex(b)).setSelectedIntegral(this.selectedIntegral,a)},"~N");c(c$,"setShowAnnotation",function(a,b){var d=
this.getDialog(a,-1);if(null==d)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)d.isDialog()?d.setVisible(!d.isVisible()):this.pd.showDialog(a);else{var c=b.booleanValue();c&&d.setState(c);(c||d.isDialog())&&this.pd.showDialog(a);!c&&d.isDialog()&&d.setVisible(!1)}},"JSV.common.Annotation.AType,Boolean");c(c$,"checkIntegralParams",function(a,b){if(!this.getSpectrum().canIntegrate()||
this.reversePlot)return!1;var d=this.getFixedSelectedSpectrumIndex(),c=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(d,null);this.integrate(d,a);break;case JSV.common.IntegralData.IntMode.ON:null==c?this.integrate(d,a):c.setState(!0);break;case JSV.common.IntegralData.IntMode.OFF:null!=c&&c.setState(!1);
break;case JSV.common.IntegralData.IntMode.TOGGLE:null==c?this.integrate(d,a):c.setState(!c.getState());break;case JSV.common.IntegralData.IntMode.AUTO:null==c&&(this.checkIntegralParams(a,"ON"),c=this.getDialog(JSV.common.Annotation.AType.Integration,-1));null!=c&&c.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==c&&(this.checkIntegralParams(a,"ON"),c=this.getDialog(JSV.common.Annotation.AType.Integration,
-1));null!=c&&c.getData().addMarks(b.substring(4).trim());break;case JSV.common.IntegralData.IntMode.MIN:if(null!=c)try{var f=Double.parseDouble(JSV.common.ScriptToken.getTokens(b).get(1));c.getData().setMinimumIntegral(f)}catch(e){if(!z(e,Exception))throw e;}break;case JSV.common.IntegralData.IntMode.UPDATE:null!=c&&c.getData().update(a)}this.updateDialog(JSV.common.Annotation.AType.Integration,-1);return!0},"JSV.common.Parameters,~S");c(c$,"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(c$,"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(c$,"setZoom",function(a,b,d,c){this.setZoomTo(0);0==a&&0==d&&0==b&&0==c?(this.newPins(),this.imageView=null,
this.getScale(),this.getScale()):this.doZoom(a,b,d,c,!0,b!=c,!1,!0,!0)},"~N,~N,~N,~N");c(c$,"shiftSpectrum",function(a,b,d){var c=this.getSpectrum();if(!c.isNMR()||!c.is1D())return!1;var f=null,f=0;if(1.7976931348623157E308==d)f=-c.addSpecShift(0);else switch(a){case 3:f=d;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==d?"":" to "+
d)+".","Set Reference "+(1==a?"for Peak":"at Point"),"OK"),this.nextClickForSetPeak="OK".equals(f)?Double.$valueOf(d):null,!1;this.nextClickForSetPeak=null;case 4:null!=this.nextClickForSetPeak&&(d=this.nextClickForSetPeak.doubleValue(),this.nextClickForSetPeak=null);Double.isNaN(b)&&(b=this.lastClickX);1==this.nextClickMode&&(b=this.getNearestPeak(c,b,this.toY(this.pd.mouseY)));if(Double.isNaN(d))try{var e=this.pd.getInput("New chemical shift (set blank to reset)","Set Reference",JU.DF.formatDecimalDbl(b,
this.getScale().precision[0])).trim();d=0==e.length?b-c.addSpecShift(0):Double.parseDouble(e)}catch(u){if(z(u,Exception))return!1;throw u;}f=d-b}if(0==f)return!1;c.addSpecShift(f);if(null!=this.annotations)for(a=this.annotations.size();0<=--a;)this.annotations.get(a).spec===c&&this.annotations.get(a).addSpecShift(f);if(null!=this.dialogs){var j;for(a=this.dialogs.entrySet().iterator();a.hasNext()&&((j=a.next())||1);)j.getValue().getSpectrum()===c&&j.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(c$,"toPeak",function(a){a*=this.drawXAxisLeftToRight?1:-1;Double.isNaN(this.lastClickX)&&(this.lastClickX=this.lastPixelX=0);var b=this.getSpectrum(),d=this.setCoordClicked(this.lastPixelX,this.lastClickX,0);a=b.setNextPeak(d,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(c$,"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(c$,"toString",function(){return"gs: "+this.nSpectra+" "+this.spectra+" "+this.spectra.get(0).getFilePath()});c(c$,"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(c$,"setXPointer2",function(a,b){null!=a&&this.setSpectrumClicked(this.getSpectrumIndex(a));this.setXPixelMovedTo(1.7976931348623157E308,b,0,0)},"JSV.common.Spectrum,~N");c(c$,"hasCurrentMeasurement",function(a){return null!=(a===JSV.common.Annotation.AType.Integration?this.selectedSpectrumIntegrals:this.selectedSpectrumMeasurements)},
"JSV.common.Annotation.AType");c(c$,"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(c$,"removeDialog",function(a,b){null!=this.dialogs&&0<=a&&this.dialogs.remove(b+"_"+a)},"~N,JSV.common.Annotation.AType");c(c$,"addDialog",function(a,b,d){null==this.dialogs&&(this.dialogs=new java.util.Hashtable);a=b+"_"+a;d.setGraphSetKey(a);this.dialogs.put(a,d);return d},"~N,JSV.common.Annotation.AType,JSV.api.AnnotationData");
c(c$,"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(c$,"getPeakListing",function(a,b,d){0>a&&(a=this.getCurrentSpectrumIndex());if(0>a)return null;var c=this.getDialog(JSV.common.Annotation.AType.PeakList,-1);if(null==c){if(!d)return null;this.addDialog(a,JSV.common.Annotation.AType.PeakList,c=new JSV.common.PeakData(JSV.common.Annotation.AType.PeakList,this.getSpectrum()))}c.getData().setPeakList(b,
-2147483648,this.viewData.getScale());c.isDialog()&&c.setFields();return c.getData()},"~N,JSV.common.Parameters,~B");c(c$,"setPeakListing",function(a){var b=this.getDialog(JSV.common.Annotation.AType.PeakList,-1),d=null!=b&&b.isDialog()?b:null;(null==a?null==d||!d.isVisible():a.booleanValue())?this.pd.showDialog(JSV.common.Annotation.AType.PeakList):b.isDialog()&&b.setVisible(!1)},"Boolean");c(c$,"haveIntegralDisplayed",function(a){a=this.getDialog(JSV.common.Annotation.AType.Integration,a);return null!=
a&&a.getState()},"~N");c(c$,"getIntegrationGraph",function(a){a=this.getDialog(JSV.common.Annotation.AType.Integration,a);return null==a?null:a.getData()},"~N");c(c$,"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(c$,"getIntegrationRatios",function(a){return null==this.aIntegrationRatios?
null:this.aIntegrationRatios[a]},"~N");c(c$,"integrate",function(a,b){var d=this.getSpectrumAt(a);if(null==b||!d.canIntegrate())return this.removeDialog(a,JSV.common.Annotation.AType.Integration),!1;this.addDialog(a,JSV.common.Annotation.AType.Integration,new JSV.common.IntegralData(d,b));return!0},"~N,JSV.common.Parameters");c(c$,"getIntegration",function(a,b,d){0>a&&(a=this.getCurrentSpectrumIndex());if(0>a)return null;var c=this.getDialog(JSV.common.Annotation.AType.Integration,-1);if(null==c){if(!d)return null;
c=this.addDialog(a,JSV.common.Annotation.AType.Integration,new JSV.common.IntegralData(this.getSpectrum(),b))}return c.getData()},"~N,JSV.common.Parameters,~B");c(c$,"getMeasurementInfo",function(a,b){var d;switch(a){case JSV.common.Annotation.AType.PeakList:d=this.getPeakListing(b,null,!1);break;case JSV.common.Annotation.AType.Integration:d=this.getIntegration(b,null,!1);break;default:return null}if(null==d)return null;var c=new java.util.Hashtable;d.getInfo(c);return c},"JSV.common.Annotation.AType,~N");
c(c$,"getInfo",function(a,b){var d=new java.util.Hashtable;if("".equals(a))d.put("KEYS","viewInfo spectra");else if("viewInfo".equalsIgnoreCase(a))return this.getScale().getInfo(d);var c=new JU.Lst;d.put("spectra",c);for(var f=0;f<this.nSpectra;f++)if(!(0<=b&&f!=b)){var e=this.spectra.get(f),u=e.getInfo(a);if(0<=b&&null!=a&&(2==u.size()||a.equalsIgnoreCase("id")))return 2==u.size()&&u.remove("id"),u;JSV.common.Parameters.putInfo(a,u,"type",e.getDataType());JSV.common.Parameters.putInfo(a,u,"titleLabel",
e.getTitleLabel());JSV.common.Parameters.putInfo(a,u,"filePath",e.getFilePath().$replace("\\","/"));JSV.common.Parameters.putInfo(a,u,"PeakList",JSV.common.Parameters.isMatch(a,"PeakList")?this.getMeasurementInfo(JSV.common.Annotation.AType.PeakList,f):null);JSV.common.Parameters.putInfo(a,u,"Integration",JSV.common.Parameters.isMatch(a,"Integration")?this.getMeasurementInfo(JSV.common.Annotation.AType.Integration,f):null);if(0<=b)return u;c.addLast(u)}return d},"~S,~N");c(c$,"getTitle",function(a){return 1==
this.nSpectra||0<=this.iSpectrumSelected&&(!a||1==this.nSplit)?this.getSpectrum().getTitle():null},"~B");c(c$,"getCurrentView",function(){this.setScale(this.getFixedSelectedSpectrumIndex());return this.viewData.getScale()});c(c$,"set2DXY",function(a,b,d){var c;null!=this.gs2dLinkedX&&(c=this.toPixelX(a),c!=this.fixX(c)&&(c=-2147483648,a=1.7976931348623157E308),this.cur1D2x1.setX(a,c));null!=this.gs2dLinkedY&&(c=this.toPixelX(b),c!=this.fixX(c)&&(c=-2147483648,b=1.7976931348623157E308),this.cur1D2x2.setX(b,
c));this.cur1D2Locked=d},"~N,~N,~B");c(c$,"dialogsToFront",function(a){if(null!=this.dialogs){null==a&&(a=this.getSpectrum());for(var b,d=this.dialogs.entrySet().iterator();d.hasNext()&&((b=d.next())||1);){var c=b.getValue();this.isVisible(c)&&(null==a?c.setVisible(!0):c.setFocus(c.getSpectrum()===a))}}},"JSV.common.Spectrum");c(c$,"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 d=this.nSpectra-b.length;System.arraycopy(b,0,a,0,b.length);for(var c=0,b=b.length;c<d;c++,b++)a[b]=this.generateRandomColor();b=a}this.plotColors=b},"~O");c(c$,"disposeImage",function(){null!=this.image2D&&this.image2D.parentNode.removeChild(this.image2D);this.plotColors=this.highlights=this.pd=this.jsvp=this.image2D=null});c(c$,"generateRandomColor",function(){for(;;){var a=v(255*Math.random()),b=v(255*Math.random()),d=v(255*Math.random()),a=this.g2d.getColor3(a,b,d);if(0!=a.getRGB())return a}});
c(c$,"setPlotColor0",function(a){this.plotColors[0]=a},"~O");c(c$,"getPlotColor",function(a){return a>=this.plotColors.length?null:this.plotColors[a]},"~N");c(c$,"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(c$,"setPlotColor",function(a,b){var d;switch(b){case -3:d=JSV.common.GraphSet.veryLightGrey;break;case -2:d=this.pd.BLACK;break;case -1:d=this.pd.getColor(JSV.common.ScriptToken.INTEGRALPLOTCOLOR);
break;default:d=this.plotColors[b]}this.g2d.setGraphicsColor(a,d)},"~O,~N");c(c$,"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(c$,"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(c$,"update2dImage",function(a){this.imageView.set(this.viewData.getScale());var b=this.getSpectrumAt(0),d=this.imageView.get2dBuffer(b,!a);if(null==d)return this.imageView=this.image2D=null,!1;a&&(d=this.imageView.adjustView(b,this.viewData),this.imageView.resetView());this.image2D=this.g2d.newGrayScaleImage(this.gMain,this.image2D,this.imageView.imageWidth,this.imageView.imageHeight,
d);this.setImageWindow();return!0},"~B");c(c$,"getAnnotation",function(a,b,d,c,f,e,u){return(new JSV.common.ColoredAnnotation).setCA(a,b,this.getSpectrum(),d,this.pd.BLACK,c,f,e,u)},"~N,~N,~S,~B,~B,~N,~N");c(c$,"getAnnotation",function(a,b){return JSV.common.Annotation.getColoredAnnotation(this.g2d,this.getSpectrum(),a,b)},"JU.Lst,JSV.common.Annotation");c(c$,"fillBox",function(a,b,d,c,f,e){this.setColorFromToken(a,e);this.g2d.fillRect(a,Math.min(b,c),Math.min(d,f),Math.abs(b-c),Math.abs(d-f))},"~O,~N,~N,~N,~N,JSV.common.ScriptToken");
c(c$,"drawBox",function(a,b,d,c,f,e){this.setColorFromToken(a,e);this.g2d.drawRect(a,Math.min(b,c),Math.min(d,f),Math.abs(b-c)-1,Math.abs(d-f)-1)},"~O,~N,~N,~N,~N,JSV.common.ScriptToken");c(c$,"drawHandle",function(a,b,d,c,f){f?this.g2d.drawRect(a,b-c,d-c,2*c,2*c):this.g2d.fillRect(a,b-c,d-c,2*c+1,2*c+1)},"~O,~N,~N,~N,~B");c(c$,"setCurrentBoxColor",function(a){this.g2d.setGraphicsColor(a,this.pd.BLACK)},"~O");c(c$,"fillArrow",function(a,b,d,c,f){var e=1;switch(b){case 1:case 3:e=-1}d=E(-1,[d-5,d-
5,d+5,d+5,d+8,d,d-8]);c=E(-1,[c+5*e,c-e,c-e,c+5*e,c+5*e,c+10*e,c+5*e]);switch(b){case 1:case 2:f?this.g2d.fillPolygon(a,c,d,7):this.g2d.drawPolygon(a,c,d,7);break;case 3:case 4:f?this.g2d.fillPolygon(a,d,c,7):this.g2d.drawPolygon(a,d,c,7)}},"~O,~N,~N,~N,~B");c(c$,"fillCircle",function(a,b,d,c){c?this.g2d.fillCircle(a,b-4,d-4,8):this.g2d.drawCircle(a,b-4,d-4,8)},"~O,~N,~N,~B");c(c$,"setAnnotationColor",function(a,b,d){null!=d?this.setColorFromToken(a,d):(d=null,w(b,JSV.common.ColoredAnnotation)&&(d=
b.getColor()),null==d&&(d=this.pd.BLACK),this.g2d.setGraphicsColor(a,d))},"~O,JSV.common.Annotation,JSV.common.ScriptToken");c(c$,"setSolutionColor",function(a,b,d){for(var c=0;c<this.nSpectra;c++){var f=this.spectra.get(c),e=b||!f.canShowSolutionColor()?-1:a.getColour(f,d);f.setFillColor(-1==e?null:this.pd.vwr.parameters.getColor1(e))}},"JSV.api.VisibleInterface,~B,~B");c(c$,"setIRMode",function(a,b){for(var d=0;d<this.nSpectra;d++){var c=this.spectra.get(d);if(c.dataType.equals(b)){var f=JSV.common.Spectrum.taConvert(c,
a);f!==c&&this.pd.setSpecForIRMode(f)}}},"JSV.common.Spectrum.IRMode,~S");c(c$,"getSpectrumCount",function(){return 0});c(c$,"invertYAxis",function(){this.viewList.get(0).init(null,0,0,this.getSpectrum().invertYAxis().isContinuous());this.resetViewCompletely()});c$.$GraphSet$Highlight$=function(){B(self.c$);c$=q(function(){R(this,arguments);this.x2=this.x1=0;this.spectrum=this.color=null;n(this,arguments)},JSV.common.GraphSet,"Highlight");e(c$,"toString",function(){return"highlight "+this.x1+" "+
this.x2+" "+this.spectrum});m(c$,function(a,b,d,c){this.x1=a;this.x2=b;this.color=c;this.spectrum=d},"~N,~N,JSV.common.Spectrum,javajs.api.GenericColor");e(c$,"equals",function(a){return!w(a,JSV.common.GraphSet.Highlight)?!1:a.x1==this.x1&&a.x2==this.x2},"~O");c$=A()};D(c$,"ARROW_RESET",-1,"ARROW_HOME",0,"ARROW_LEFT",1,"ARROW_RIGHT",2,"ARROW_UP",3,"ARROW_DOWN",4);c$.RT2=c$.prototype.RT2=Math.sqrt(2);D(c$,"veryLightGrey",null,"minNumOfPointsForZoom",3,"MIN_DRAG_PIXELS",5,"ONLINE_CUTOFF",2,"SHIFT_PEAK",
1,"SHIFT_SETX",2,"SHIFT_X",3,"SHIFT_CLICKED",4)});r("JSV.common");s(["JSV.common.XYScaleConverter"],"JSV.common.ImageView",["java.lang.Double","JSV.common.Coordinate","$.ScaleData"],function(){c$=q(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;n(this,arguments)},JSV.common,"ImageView",null,JSV.common.XYScaleConverter);c(c$,"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(c$,"setZoom",function(a,b,d,c){this.xPixelZoom1=Math.min(a,d);this.yPixelZoom1=Math.min(b,c);this.xPixelZoom2=Math.max(a,d);this.yPixelZoom2=Math.max(b,c);this.setView()},
"~N,~N,~N,~N");c(c$,"setXY0",function(a,b,d){this.xPixel0=b;this.yPixel0=d;this.xPixel1=this.xPixel0+this.xPixels-1;this.yPixel1=this.yPixel0+this.yPixels-1;this.setMinMaxY(a)},"JSV.common.Spectrum,~N,~N");c(c$,"setPixelWidthHeight",function(a,b){this.xPixels=a;this.yPixels=b},"~N,~N");c(c$,"resetView",function(){this.yView1=this.xView1=0;this.xView2=this.imageWidth-1;this.yView2=this.imageHeight-1});c(c$,"setView",function(){0==this.xPixelZoom1&&this.resetZoom();var a=this.toImageX(this.xPixelZoom1),
b=this.toImageY(this.yPixelZoom1),d=this.toImageX(this.xPixelZoom2),c=this.toImageY(this.yPixelZoom2);this.xView1=Math.min(a,d);this.yView1=Math.min(b,c);this.xView2=Math.max(a,d);this.yView2=Math.max(b,c);this.setScaleData();this.resetZoom()});c(c$,"resetZoom",function(){this.xPixelZoom1=this.xPixel0;this.yPixelZoom1=this.yPixel0;this.xPixelZoom2=this.xPixel1;this.yPixelZoom2=this.yPixel1});c(c$,"toImageX",function(a){return this.xView1+v(Math.floor((a-this.xPixel0)/(this.xPixels-1)*(this.xView2-
this.xView1)))},"~N");c(c$,"toImageY",function(a){return this.yView1+v(Math.floor((a-this.yPixel0)/(this.yPixels-1)*(this.yView2-this.yView1)))},"~N");c(c$,"toImageX0",function(a){return JSV.common.Coordinate.intoRange(v((1*a-this.xPixel0)/(this.xPixels-1)*(this.imageWidth-1)),0,this.imageWidth-1)},"~N");c(c$,"toImageY0",function(a){return JSV.common.Coordinate.intoRange(v((1*a-this.yPixel0)/(this.yPixels-1)*(this.imageHeight-1)),0,this.imageHeight-1)},"~N");c(c$,"isXWithinRange",function(a){return a>=
this.xPixel0-5&&a<this.xPixel0+this.xPixels+5},"~N");c(c$,"toSubspectrumIndex",function(a){return JSV.common.Coordinate.intoRange(this.imageHeight-1-this.toImageY(a),0,this.imageHeight-1)},"~N");c(c$,"toX0",function(a){return this.maxX+(this.minX-this.maxX)*(this.fixX(a)-this.xPixel0)/(this.xPixels-1)},"~N");c(c$,"toPixelX0",function(a){return this.xPixel1-v((a-this.minX)/(this.maxX-this.minX)*(this.xPixels-1))},"~N");c(c$,"toPixelY0",function(a){return this.yPixel1-v(a/(this.imageHeight-1)*(this.yPixels-
1))},"~N");c(c$,"subIndexToPixelY",function(a){return this.yPixel0+v(1*(this.imageHeight-1-a-this.yView1)/(this.yView2-this.yView1)*(this.yPixels-1))},"~N");c(c$,"fixSubIndex",function(a){return JSV.common.Coordinate.intoRange(a,this.imageHeight-1-this.yView2,this.imageHeight-1-this.yView1)},"~N");c(c$,"setView0",function(a,b,d,c){a=this.toImageX0(a);b=this.toImageY0(b);d=this.toImageX0(d);c=this.toImageY0(c);this.xView1=Math.min(a,d);this.yView1=Math.min(b,c);this.xView2=Math.max(a,d);this.yView2=
Math.max(b,c);this.resetZoom()},"~N,~N,~N,~N");c(c$,"get2dBuffer",function(a,b){var d=a.getSubSpectra();if(null==d||!d.get(0).isContinuous())return null;var c=a.getXYCoords(),f=d.size();this.imageWidth=c.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 u=this.imageWidth*this.imageHeight,j=null==this.buf2d||this.buf2d.length!=u?E(u,0):this.buf2d,l=0,p=0;p<f;p++){var k=d.get(p).xyCoords;if(k.length!=
c.length)return null;for(var m=0;m<c.length;m++){var n=k[m].getYVal(),n=255-JSV.common.Coordinate.intoRange(v((n-this.minZ)*e),0,255);j[--u]=n;l+=n}}this.averageGray=1-l/(this.imageWidth*this.imageHeight)/255;System.out.println("Average gray = "+this.averageGray);return this.buf2d=j},"JSV.common.Spectrum,~B");c(c$,"adjustView",function(a,b){for(var d=0,c=!1;((c=0.05>this.averageGray)||0.3<this.averageGray)&&10>d++;)b.scaleSpectrum(-2,c?2:0.5),this.set(b.getScale()),this.get2dBuffer(a,!1);return this.buf2d},
"JSV.common.Spectrum,JSV.common.ViewData");c(c$,"getBuffer",function(){return this.buf2d});c(c$,"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(c$,"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(c$,"fixX",function(a){return a<this.xPixel0?this.xPixel0:a>this.xPixel1?this.xPixel1:a},"~N");e(c$,"fixY",function(a){return JSV.common.Coordinate.intoRange(a,this.yPixel0,this.yPixel1)},"~N");e(c$,"getScale",function(){return this.scaleData});e(c$,"toX",function(a){return this.maxX+(this.minX-this.maxX)*this.toImageX(this.fixX(a))/(this.imageWidth-1)},"~N");e(c$,"toY",function(a){a=this.toSubspectrumIndex(a);return this.maxY+(this.minY-this.maxY)*a/(this.imageHeight-1)},"~N");e(c$,"toPixelX",
function(a){var b=this.toX(this.xPixel0),d=this.toX(this.xPixel1);return this.xPixel0+v((a-b)/(d-b)*(this.xPixels-1))},"~N");e(c$,"toPixelY",function(a){return v(this.yPixel0+(a-this.scaleData.minYOnScale)/(this.scaleData.maxYOnScale-this.scaleData.minYOnScale)*this.yPixels)},"~N");e(c$,"getXPixels",function(){return this.xPixels});e(c$,"getYPixels",function(){return this.yPixels});e(c$,"getXPixel0",function(){return this.xPixel0});D(c$,"DEFAULT_MIN_GRAY",0.05,"DEFAULT_MAX_GRAY",0.3)});r("JSV.common");
s(["JSV.common.Measurement"],"JSV.common.Integral",null,function(){c$=t(JSV.common,"Integral",JSV.common.Measurement);c(c$,"setInt",function(a,b,d,c,f,e){this.setA(a,b,d,"",!1,!1,0,6);this.setPt2(f,e);this.setValue(c);return this},"~N,~N,JSV.common.Spectrum,~N,~N,~N")});r("JSV.common");c$=t(JSV.common,"IntegralComparator",null,java.util.Comparator);e(c$,"compare",function(a,b){return a.getXVal()<b.getXVal()?-1:a.getXVal()>b.getXVal()?1:0},"JSV.common.Measurement,JSV.common.Measurement");r("JSV.common");
s(["java.lang.Enum","JSV.common.MeasurementData","$.IntegralComparator"],"JSV.common.IntegralData","java.lang.Double java.util.Collections $.StringTokenizer JU.AU $.BS $.DF $.Lst $.PT JSV.common.Annotation $.Coordinate $.Integral $.ScriptToken".split(" "),function(){c$=q(function(){this.intRange=this.percentOffset=this.percentMinY=0;this.normalizationFactor=1;this.integralTotal=this.offset=this.percentRange=0;this.haveRegions=!1;this.xyCoords=null;n(this,arguments)},JSV.common,"IntegralData",JSV.common.MeasurementData);
c(c$,"getPercentMinimumY",function(){return this.percentMinY});c(c$,"getPercentOffset",function(){return this.percentOffset});c(c$,"getIntegralFactor",function(){return this.intRange});m(c$,function(a,b,d,c){y(this,JSV.common.IntegralData,[JSV.common.Annotation.AType.Integration,c]);this.percentMinY=a;this.percentOffset=b;this.percentRange=d;this.calculateIntegral()},"~N,~N,~N,JSV.common.Spectrum");m(c$,function(a,b){y(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(c$,"update",function(a){this.update(a.integralMinY,a.integralOffset,a.integralRange)},"JSV.common.Parameters");c(c$,"update",function(a,b,d){var c=this.percentRange;if(!(0>=d||d==this.percentRange&&b==this.percentOffset)){this.percentOffset=b;this.percentRange=d;this.checkRange();a=d/100/this.integralTotal;b/=100;for(var f=0;f<this.xyCoords.length;f++){var e=
this.xyCoords[f].getYVal(),e=(e-this.offset)/this.intRange;this.xyCoords[f].setYVal(e*a+b)}1!=this.normalizationFactor&&(this.normalizationFactor*=c/d);if(this.haveRegions)for(f=this.size();0<=--f;)d=this.get(f),c=this.getYValueAt(d.getXVal()),e=this.getYValueAt(d.getXVal2()),d.setYVal(c),d.setYVal2(e),d.setValue(100*Math.abs(e-c)*this.normalizationFactor);this.intRange=a;this.offset=b}},"~N,~N,~N");c(c$,"getYValueAt",function(a){return JSV.common.Coordinate.getYValueAt(this.xyCoords,a)},"~N");c(c$,
"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 d=this.getYValueAt(a),c=this.getYValueAt(b);this.haveRegions=!0;d=(new JSV.common.Integral).setInt(a,d,this.spec,100*Math.abs(c-d)*this.normalizationFactor,b,c);this.clear(a,b);this.addLast(d);java.util.Collections.sort(this,JSV.common.IntegralData.c);return d},"~N,~N");c(c$,"splitIntegral",function(a){var b=
this.find(a);if(0>b)return null;var d=this.removeItemAt(b),b=d.getXVal(),d=d.getXVal2();this.addIntegralRegion(b,a);return this.addIntegralRegion(a,d)},"~N");e(c$,"setSpecShift",function(a){JSV.common.Coordinate.shiftX(this.xyCoords,a);for(var b=this.size();1<=--b;)this.get(b).addSpecShift(a)},"~N");c(c$,"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 d=a.get(b),c=0,f=d.indexOf("^");if(!(0>f)){var e=d.indexOf(":");e>f&&(c=Double.$valueOf(d.substring(e+1).trim()).doubleValue(),d=d.substring(0,e).trim());var u=Double.$valueOf(d.substring(0,f).trim()).doubleValue(),j=Double.$valueOf(d.substring(f+1).trim()).doubleValue();0==j&&0==u&&this.clear();if(j!=u){var l=this.addIntegralRegion(Math.max(j,u),Math.min(j,u));null!=l&&0<c&&this.setSelectedIntegral(l,c)}}}catch(p){if(!z(p,Exception))throw p;}},"~S");c(c$,"calculateIntegral",
function(){var a=this.spec.getXYCoords();this.xyCoords=Array(a.length);this.integralTotal=0;this.checkRange();for(var b=1E100,d=0;d<a.length;d++){var c=a[d].getYVal();c<b&&0<=c&&(b=c)}for(var f=1E100,e=-1E100,d=0;d<a.length;d++)c=a[d].getYVal(),this.integralTotal+=c-b,this.integralTotal<f&&(f=this.integralTotal),this.integralTotal>e&&(e=this.integralTotal);this.integralTotal=e-f;this.intRange=this.percentRange/100/this.integralTotal;this.offset=this.percentOffset/100;f=0;for(d=a.length;0<=--d;)c=
a[d].getYVal(),f+=c-b,this.xyCoords[d]=(new JSV.common.Coordinate).set(a[d].getXVal(),f*this.intRange+this.offset);return this.xyCoords});c(c$,"checkRange",function(){this.percentOffset=Math.max(5,this.percentOffset);this.percentRange=Math.max(10,this.percentRange)});c$.getIntegrationRatiosFromString=c(c$,"getIntegrationRatiosFromString",function(a,b){for(var d=new JU.Lst,c=new java.util.StringTokenizer(b,",");c.hasMoreTokens();){var f=c.nextToken(),f=new java.util.StringTokenizer(f,":"),f=(new JSV.common.Annotation).setA(Double.parseDouble(f.nextToken()),
0,a,f.nextToken(),!0,!1,0,0);d.addLast(f)}return d},"JSV.common.Spectrum,~S");c(c$,"getXYCoords",function(){return this.xyCoords});c(c$,"getPercentYValueAt",function(a){return 100*this.getYValueAt(a)},"~N");c(c$,"dispose",function(){this.xyCoords=this.spec=null});c(c$,"setSelectedIntegral",function(a,b){var d=a.getValue();this.factorAllIntegrals(0>=b?1/this.normalizationFactor:b/d,0>=b)},"JSV.common.Measurement,~N");c(c$,"factorAllIntegrals",function(a,b){for(var d=0;d<this.size();d++){var c=this.get(d);
c.setValue(a*c.getValue())}this.normalizationFactor=b?1:this.normalizationFactor*a},"~N,~B");c(c$,"remove",function(a){return this.removeItemAt(a)},"~N");c(c$,"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 d=this.get(b),c=JSV.common.Coordinate.getNearestIndexForX(this.xyCoords,d.getXVal()),d=JSV.common.Coordinate.getNearestIndexForX(this.xyCoords,d.getXVal2());a.setBits(Math.min(c,d),Math.max(c,
d))}return a});e(c$,"getMeasurementListArray",function(){for(var a=Array(this.size()),b=0,d=this.size();0<=--d;)a[b++]=x(-1,[""+b,JU.DF.formatDecimalDbl(this.get(d).getXVal(),2),JU.DF.formatDecimalDbl(this.get(d).getXVal2(),2),this.get(d).text]);return a},"~S");e(c$,"getMeasurementListArrayReal",function(){for(var a=JU.AU.newDouble2(this.size()),b=0,d=this.size();0<=--d;b++)a[b]=N(-1,[this.get(d).getXVal(),this.get(d).getXVal2(),this.get(d).getValue()]);return a},"~S");e(c$,"getDataHeader",function(){return JSV.common.IntegralData.$HEADER});
c(c$,"shiftY",function(a,b,d,c){b=v(100*(d+c-b)/c);0>a&&(b-=this.percentOffset);0>a?this.update(0,this.percentOffset,b):this.update(0,b,this.percentRange)},"~N,~N,~N,~N");c(c$,"autoIntegrate",function(){null==this.xyCoords&&this.calculateIntegral();if(0!=this.xyCoords.length){this.clear();for(var a=-1,b=0,d=this.xyCoords[this.xyCoords.length-1].getYVal(),c=this.xyCoords.length-1;0<=--c;){var f=this.xyCoords[c].getYVal();b++;1E-4>f-d&&0>a?f<d&&(d=f,b=0):0>a?(a=c+Math.min(b,20),d=f,b=0):1E-4>f-d?(1==
b&&(d=f),20<=b&&(this.addIntegralRegion(this.xyCoords[a].getXVal(),this.xyCoords[c].getXVal()),a=-1,d=f,b=0)):(b=0,d=f)}a=this.spec.getHydrogenCount();0<a&&this.factorAllIntegrals(a/this.percentRange,!1)}});c(c$,"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(c$,"setMinimumIntegral",function(a){for(var b=this.size();0<=--b;)this.get(b).getValue()<a&&this.removeItemAt(b)},"~N");B(self.c$);c$=t(JSV.common.IntegralData,"IntMode",Enum);c$.getMode=c(c$,"getMode",function(a){for(var b,d=0,c=JSV.common.IntegralData.IntMode.values();d<c.length&&((b=c[d])||1);d++)if(a.startsWith(b.name()))return b;return JSV.common.IntegralData.IntMode.NA},"~S");k(c$,"OFF",0,[]);k(c$,"ON",1,[]);k(c$,"TOGGLE",2,[]);k(c$,"AUTO",3,[]);k(c$,"LIST",
4,[]);k(c$,"MARK",5,[]);k(c$,"MIN",6,[]);k(c$,"UPDATE",7,[]);k(c$,"CLEAR",8,[]);k(c$,"NA",9,[]);c$=A();D(c$,"DEFAULT_OFFSET",30,"DEFAULT_RANGE",50,"DEFAULT_MINY",0.1);c$.c=c$.prototype.c=new JSV.common.IntegralComparator;c$.$HEADER=c$.prototype.$HEADER=x(-1,["peak","start/ppm","end/ppm","value"])});r("JSV.common");s(["java.lang.Enum","JSV.source.JDXDataObject","JU.Lst"],"JSV.common.Spectrum","java.lang.Boolean $.Double java.util.Hashtable JU.PT JSV.common.Coordinate $.Parameters $.PeakInfo JSV.source.JDXSourceStreamTokenizer JU.Logger".split(" "),
function(){c$=q(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;n(this,arguments)},JSV.common,"Spectrum",JSV.source.JDXDataObject);H(c$,function(){this.peakList=new JU.Lst});c(c$,"dispose",function(){});c(c$,"isForcedSubset",function(){return this.$isForcedSubset});
c(c$,"setId",function(a){this.id=a},"~S");m(c$,function(){y(this,JSV.common.Spectrum,[]);this.headerTable=new JU.Lst;this.xyCoords=[];this.parent=this});c(c$,"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(c$,"getXYCoords",function(){return this.getCurrentSubSpectrum().xyCoords});c(c$,"getPeakList",function(){return this.peakList});c(c$,"setPeakList",function(a,b,d){this.peakList=a;this.peakXLabel=
b;this.peakYLabel=d;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(c$,"selectPeakByFileIndex",function(a,b,d){if(null!=this.peakList&&0<this.peakList.size()&&(null==d||this.sourceID.equals(b)))for(var c=0;c<this.peakList.size();c++)if(this.peakList.get(c).checkFileIndex(a,b,d))return System.out.println("selecting peak by FileIndex "+this+" "+this.peakList.get(c)),this.selectedPeak=
this.peakList.get(c);return null},"~S,~S,~S");c(c$,"selectPeakByFilePathTypeModel",function(a,b,d){if(null!=this.peakList&&0<this.peakList.size())for(var c=0;c<this.peakList.size();c++)if(this.peakList.get(c).checkFileTypeModel(a,b,d))return System.out.println("selecting peak byFilePathTypeModel "+this+" "+this.peakList.get(c)),this.selectedPeak=this.peakList.get(c);return null},"~S,~S,~S");c(c$,"matchesPeakTypeModel",function(a,b){if(a.equals("ID"))return this.sourceID.equalsIgnoreCase(b);if(null!=
this.peakList&&0<this.peakList.size())for(var d=0;d<this.peakList.size();d++)if(this.peakList.get(d).checkTypeModel(a,b))return!0;return!1},"~S,~S");c(c$,"setSelectedPeak",function(a){this.selectedPeak=a},"JSV.common.PeakInfo");c(c$,"setHighlightedPeak",function(a){this.highlightedPeak=a},"JSV.common.PeakInfo");c(c$,"getSelectedPeak",function(){return this.selectedPeak});c(c$,"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(c$,"getAssociatedPeakInfo",function(a,b){this.selectedPeak=this.findPeakByCoord(a,b);return null==this.selectedPeak?this.getBasePeakInfo():this.selectedPeak},"~N,JSV.common.Coordinate");c(c$,"findPeakByCoord",function(a,b){if(null!=b&&null!=this.peakList&&0<this.peakList.size()){for(var d=b.getXVal(),c=-1,f=1E100,e=0;e<this.peakList.size();e++){var u=this.peakList.get(e).checkRange(a,d);u<f&&(f=u,c=e)}if(0<=c)return this.peakList.get(c)}return null},"~N,JSV.common.Coordinate");c(c$,
"getPeakTitle",function(){return null!=this.selectedPeak?this.selectedPeak.getTitle():null!=this.highlightedPeak?this.highlightedPeak.getTitle():this.getTitleLabel()});c(c$,"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(c$,"setNextPeak",function(a,b){if(null==this.peakList||0==this.peakList.size())return-1;for(var d=a.getXVal()+1E-6*b,c=-1,f=-1,e=1.7976931348623157E308*b,u=0,j=this.peakList.size();0<=--j;){var l=this.peakList.get(j).getX();0<b?l>d&&l<e?(c=j,e=l):l<d&&l-d<u&&(f=j,u=l-d):l<d&&l>e?(c=j,e=l):l>d&&l-d>u&&(f=j,u=l-d)}if(0>c){if(0>f)return-1;c=f}return c},"JSV.common.Coordinate,~N");
c(c$,"getPercentYValueAt",function(a){return!this.isContinuous()?NaN:this.getYValueAt(a)},"~N");c(c$,"getYValueAt",function(a){return JSV.common.Coordinate.getYValueAt(this.xyCoords,a)},"~N");c(c$,"setUserYFactor",function(a){this.userYFactor=a},"~N");c(c$,"getUserYFactor",function(){return this.userYFactor});c(c$,"getConvertedSpectrum",function(){return this.convertedSpectrum});c(c$,"setConvertedSpectrum",function(a){this.convertedSpectrum=a},"JSV.common.Spectrum");c$.taConvert=c(c$,"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 d=a.getConvertedSpectrum();return null!=d?d:a.isAbsorbance()?JSV.common.Spectrum.toT(a):JSV.common.Spectrum.toA(a)},"JSV.common.Spectrum,JSV.common.Spectrum.IRMode");c$.toT=c(c$,"toT",function(a){if(!a.isAbsorbance())return null;var b=a.getXYCoords(),
d=Array(b.length);JSV.common.Coordinate.isYInRange(b,0,4)||(b=JSV.common.Coordinate.normalise(b,0,4));for(var c=0;c<b.length;c++)d[c]=(new JSV.common.Coordinate).set(b[c].getXVal(),JSV.common.Spectrum.toTransmittance(b[c].getYVal()));return JSV.common.Spectrum.newSpectrum(a,d,"TRANSMITTANCE")},"JSV.common.Spectrum");c$.toA=c(c$,"toA",function(a){if(!a.isTransmittance())return null;for(var b=a.getXYCoords(),d=Array(b.length),c=JSV.common.Coordinate.isYInRange(b,-2,2),f=0;f<b.length;f++)d[f]=(new JSV.common.Coordinate).set(b[f].getXVal(),
JSV.common.Spectrum.toAbsorbance(b[f].getYVal(),c));return JSV.common.Spectrum.newSpectrum(a,d,"ABSORBANCE")},"JSV.common.Spectrum");c$.newSpectrum=c(c$,"newSpectrum",function(a,b,d){var c=a.copy();c.setOrigin("JSpecView Converted");c.setOwner("JSpecView Generated");c.setXYCoords(b);c.setYUnits(d);a.setConvertedSpectrum(c);c.setConvertedSpectrum(a);return c},"JSV.common.Spectrum,~A,~S");c$.toAbsorbance=c(c$,"toAbsorbance",function(a,b){return Math.min(4,b?2-JSV.common.Spectrum.log10(a):-JSV.common.Spectrum.log10(a))},
"~N,~B");c$.toTransmittance=c(c$,"toTransmittance",function(a){return 0>=a?1:Math.pow(10,-a)},"~N");c$.log10=c(c$,"log10",function(a){return Math.log(a)/Math.log(10)},"~N");c$.process=c(c$,"process",function(a,b){if(b===JSV.common.Spectrum.IRMode.TO_ABS||b===JSV.common.Spectrum.IRMode.TO_TRANS)for(var d=0;d<a.size();d++)a.set(d,JSV.common.Spectrum.taConvert(a.get(d),b));return!0},"JU.Lst,JSV.common.Spectrum.IRMode");c(c$,"getSubSpectra",function(){return this.subSpectra});c(c$,"getCurrentSubSpectrum",
function(){return null==this.subSpectra?this:this.subSpectra.get(this.currentSubSpectrumIndex)});c(c$,"advanceSubSpectrum",function(a){return this.setCurrentSubSpectrum(this.currentSubSpectrumIndex+a)},"~N");c(c$,"setCurrentSubSpectrum",function(a){return this.currentSubSpectrumIndex=JSV.common.Coordinate.intoRange(a,0,this.subSpectra.size()-1)},"~N");c(c$,"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(c$,"getSubIndex",function(){return null==this.subSpectra?-1:this.currentSubSpectrumIndex});c(c$,"setExportXAxisDirection",function(a){this.exportXAxisLeftToRight=a},"~B");c(c$,"isExportXAxisLeftToRight",function(){return this.exportXAxisLeftToRight});c(c$,"getInfo",function(a){var b=new java.util.Hashtable;if("id".equalsIgnoreCase(a))return b.put(a,
this.id),b;var d=null;"".equals(a)&&(d="id specShift header");b.put("id",this.id);JSV.common.Parameters.putInfo(a,b,"specShift",Double.$valueOf(this.specShift));var c="header".equals(a);if(!c&&null!=a&&null==d)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,u=this.getHeaderRowDataAsArray(),f=0;f<u.length;f++){var j=JSV.source.JDXSourceStreamTokenizer.cleanLabel(u[f][0]);
if(null!=d)d+=" "+j;else if(!(null!=a&&!c&&!j.equals(a))){var l=JSV.common.Spectrum.fixInfoValue(u[f][1]);if(null==a){var p=new java.util.Hashtable;p.put("value",l);p.put("index",Integer.$valueOf(f+1));b.put(j,p)}else b.put(j,l)}}0<e.size()&&b.put("header",e);c||(null!=d?d+="  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!=d&&b.put("KEYS",d);return b},"~S");c$.fixInfoValue=c(c$,"fixInfoValue",function(a){try{return Integer.$valueOf(a)}catch(b){if(!z(b,Exception))throw b;}try{return Double.$valueOf(a)}catch(d){if(!z(d,Exception))throw d;}return a},"~S");c(c$,"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(c$,"getBasePeakInfo",function(){return 0==this.peakList.size()?new JSV.common.PeakInfo:new JSV.common.PeakInfo(' baseModel="" '+this.peakList.get(0))});c(c$,"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(c$,"findXForPeakNearest",function(a){return JSV.common.Coordinate.findXForPeakNearest(this.xyCoords,
a,this.isInverted())},"~N");c(c$,"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 d=this.subSpectra.get(b);d!==this&&d!==this.parent&&d.addSpecShift(a)}return this.specShift},"~N");c$.allowSubSpec=c(c$,"allowSubSpec",function(a,b){return a.is1D()==b.is1D()&&a.xUnits.equalsIgnoreCase(b.xUnits)&&a.isHNMR()==b.isHNMR()},"JSV.common.Spectrum,JSV.common.Spectrum");c$.areXScalesCompatible=
c(c$,"areXScalesCompatible",function(a,b,d,c){var f=a.isNMR();if(f!=b.isNMR()||a.isContinuous()!=b.isContinuous()||!c&&!JSV.common.Spectrum.areUnitsCompatible(a.xUnits,b.xUnits))return!1;if(d){if(a.is1D()!=b.is1D())return!1}else if(c){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");c$.areUnitsCompatible=c(c$,"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");c$.areLinkableX=c(c$,"areLinkableX",function(a,b){return a.isNMR()&&b.isNMR()&&a.nucleusX.equals(b.nucleusX)},"JSV.common.Spectrum,JSV.common.Spectrum");c$.areLinkableY=c(c$,"areLinkableY",function(a,b){return a.isNMR()&&b.isNMR()&&a.nucleusX.equals(b.nucleusY)},"JSV.common.Spectrum,JSV.common.Spectrum");c(c$,"getPeakWidth",function(){return(this.getLastX()-this.getFirstX())/100});c(c$,"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(c$,"setFillColor",function(a){this.fillColor=a;null!=this.convertedSpectrum&&(this.convertedSpectrum.fillColor=a)},"javajs.api.GenericColor");e(c$,"toString",function(){return this.getTitleLabel()+(null==this.xyCoords?"":" xyCoords.length="+this.xyCoords.length)});B(self.c$);c$=t(JSV.common.Spectrum,"IRMode",Enum);
c$.getMode=c(c$,"getMode",function(a){switch(null==a?"I":a.toUpperCase().charAt(0)){case "A":return JSV.common.Spectrum.IRMode.TO_ABS;case "T":return a.equalsIgnoreCase("TOGGLE")?JSV.common.Spectrum.IRMode.TOGGLE:JSV.common.Spectrum.IRMode.TO_TRANS;case "N":return JSV.common.Spectrum.IRMode.NO_CONVERT;default:return JSV.common.Spectrum.IRMode.TOGGLE}},"~S");k(c$,"NO_CONVERT",0,[]);k(c$,"TO_TRANS",1,[]);k(c$,"TO_ABS",2,[]);k(c$,"TOGGLE",3,[]);c$=A();D(c$,"MAXABS",4)});r("JSV.common");c$=t(JSV.common,
"JSVersion");D(c$,"VERSION_SHORT",null,"VERSION",null,"date",null,"versionInt",0,"majorVersion",null);G=P=null;P=Jmol.___JmolVersion;G=Jmol.___JmolDate;null!=G&&(G=G.substring(7,23));JSV.common.JSVersion.VERSION_SHORT=null!=P?P:"(Unknown_version)";da=null!=P?P:"(Unknown_version)";JSV.common.JSVersion.date=null!=G?G:"";JSV.common.JSVersion.VERSION=JSV.common.JSVersion.VERSION_SHORT+(null==JSV.common.JSVersion.date?"":" "+JSV.common.JSVersion.date);G=-1;if(null!=P)try{var F=JSV.common.JSVersion.VERSION_SHORT;
P="";var O=F.indexOf(".");0>O&&(G=1E5*Integer.parseInt(F),F=null);if(null!=F&&(G=1E5*Integer.parseInt(P=F.substring(0,O)),F=F.substring(O+1),O=F.indexOf("."),0>O&&(G+=1E3*Integer.parseInt(F),F=null),null!=F)){var oa=F.substring(0,O);da=P+("."+oa);G+=1E3*Integer.parseInt(oa);F=F.substring(O+1);O=F.indexOf("_");0<=O&&(F=F.substring(0,O));O=F.indexOf(" ");0<=O&&(F=F.substring(0,O));G+=Integer.parseInt(F)}}catch(pa){if(!z(pa,NumberFormatException))throw pa;}JSV.common.JSVersion.majorVersion=da;JSV.common.JSVersion.versionInt=
G;r("JSV.common");s(["java.util.Hashtable"],"JSV.common.JSVFileManager","java.io.BufferedInputStream $.BufferedReader $.InputStreamReader $.StringReader java.net.URL JU.AU $.BS $.Encoding $.JSJSONParser $.P3 $.PT $.SB JSV.common.JSVersion $.JSViewer JSV.exception.JSVException JU.Logger".split(" "),function(){c$=t(JSV.common,"JSVFileManager");c(c$,"isApplet",function(){return null!=JSV.common.JSVFileManager.appletDocumentBase});c$.getFileAsString=c(c$,"getFileAsString",function(a){if(null==a)return null;
var b,d=new JU.SB;try{b=JSV.common.JSVFileManager.getBufferedReaderFromName(a,null);for(var c;null!=(c=b.readLine());)d.append(c),d.appendC("\n");b.close()}catch(f){if(z(f,Exception))return null;throw f;}return d.toString()},"~S");c$.getBufferedReaderForInputStream=c(c$,"getBufferedReaderForInputStream",function(a){try{return new java.io.BufferedReader(new java.io.InputStreamReader(a,"UTF-8"))}catch(b){if(z(b,Exception))return null;throw b;}},"java.io.InputStream");c$.getBufferedReaderForStringOrBytes=
c(c$,"getBufferedReaderForStringOrBytes",function(a){return null==a?null:new java.io.BufferedReader(new java.io.StringReader(w(a,String)?a:String.instantialize(a)))},"~O");c$.getBufferedReaderFromName=c(c$,"getBufferedReaderFromName",function(a,b){if(null==a)throw new JSV.exception.JSVException("Cannot find "+a);JU.Logger.info("JSVFileManager getBufferedReaderFromName "+a);var d=JSV.common.JSVFileManager.getFullPathName(a);d.equals(a)||JU.Logger.info("JSVFileManager getBufferedReaderFromName "+d);
return JSV.common.JSVFileManager.getUnzippedBufferedReaderFromName(d,b)},"~S,~S");c$.getFullPathName=c(c$,"getFullPathName",function(a){try{if(null==JSV.common.JSVFileManager.appletDocumentBase){if(JSV.common.JSVFileManager.isURL(a)){var b=new java.net.URL(W("java.net.URL"),a,null);return b.toString()}return JSV.common.JSVFileManager.viewer.apiPlatform.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(d){if(z(d,Exception))throw new JSV.exception.JSVException("Cannot create path for "+a);throw d;}},"~S");c$.isURL=c(c$,"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");c$.urlTypeIndex=c(c$,"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");c$.isLocal=c(c$,"isLocal",function(a){if(null==a)return!1;a=JSV.common.JSVFileManager.urlTypeIndex(a);return 0>a||4==a},"~S");c$.getUnzippedBufferedReaderFromName=c(c$,"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 d=JSV.common.JSVFileManager.getInputStream(a,!0,null);if(w(d,JU.SB)||w(d,String))return new java.io.BufferedReader(new java.io.StringReader(d.toString()));
if(JSV.common.JSVFileManager.isAB(d))return new java.io.BufferedReader(new java.io.StringReader(String.instantialize(d)));var c=new java.io.BufferedInputStream(d),b=c;JSV.common.JSVFileManager.isGzip(c)&&(b=JSV.common.JSViewer.getInterface("JSV.common.JSVZipUtil").newGZIPInputStream(b));return new java.io.BufferedReader(new java.io.InputStreamReader(b,"UTF-8"))}catch(f){if(z(f,Exception))throw new JSV.exception.JSVException("Cannot read file "+a+" "+f);throw f;}},"~S,~S");c$.getAbbrSimulationFileName=
c(c$,"getAbbrSimulationFileName",function(a){var b=JSV.common.JSVFileManager.getSimulationType(a);return JSV.common.JSVFileManager.getAbbreviatedSimulationName(a,b,!0)},"~S");c$.getAbbreviatedSimulationName=c(c$,"getAbbreviatedSimulationName",function(a,b,d){return 0<=a.indexOf("MOL=")?(d?"http://SIMULATION/":"")+"MOL="+JSV.common.JSVFileManager.getSimulationHash(a,b):a},"~S,~S,~B");c$.getSimulationHash=c(c$,"getSimulationHash",function(a,b){var d=b+Math.abs(a.substring(a.indexOf("V2000")+1).hashCode());
JU.Logger.debugging&&System.out.println("JSVFileManager hash for "+a+" = "+d);return d},"~S,~S");c$.getSimulationFileData=c(c$,"getSimulationFileData",function(a,b){return JSV.common.JSVFileManager.cacheGet(a.startsWith("MOL=")?a.substring(4):JSV.common.JSVFileManager.getAbbreviatedSimulationName(a,b,!1))},"~S,~S");c$.cachePut=c(c$,"cachePut",function(a,b){JU.Logger.debugging&&JU.Logger.debug("JSVFileManager cachePut "+b+" for "+a);null!=b&&JSV.common.JSVFileManager.htCorrelationCache.put(a,b)},"~S,~S");
c$.cacheGet=c(c$,"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");c$.getSimulationReader=c(c$,"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");c$.isAB=c(c$,
"isAB",function(a){return JU.AU.isAB(a)},"~O");c$.isZipFile=c(c$,"isZipFile",function(a){try{var b=K(4,0);a.mark(5);var d=a.read(b,0,4);a.reset();return 4==d&&80==b[0]&&75==b[1]&&3==b[2]&&4==b[3]}catch(c){if(z(c,Exception))throw new JSV.exception.JSVException(c.toString());throw c;}},"java.io.InputStream");c$.isGzip=c(c$,"isGzip",function(a){try{var b=K(4,0);a.mark(5);var d=a.read(b,0,4);a.reset();return 4==d&&31==b[0]&&139==b[1]}catch(c){if(z(c,Exception))throw new JSV.exception.JSVException(c.toString());
throw c;}},"java.io.InputStream");c$.getStreamAsBytes=c(c$,"getStreamAsBytes",function(a,b){try{for(var d=K(1024,0),c=null==b?K(4096,0):null,f=0,e=0;0<(f=a.read(d,0,1024));)e+=f,null==b?(e>=c.length&&(c=JU.AU.ensureLengthByte(c,2*e)),System.arraycopy(d,0,c,e-f,f)):b.write(d,0,f);a.close();return null==b?JU.AU.arrayCopyByte(c,e):e+" bytes"}catch(u){if(z(u,Exception))throw new JSV.exception.JSVException(u.toString());throw u;}},"java.io.BufferedInputStream,JU.OC");c$.postByteArray=c(c$,"postByteArray",
function(a,b){var d=null;try{d=JSV.common.JSVFileManager.getInputStream(a,!1,b)}catch(c){if(z(c,Exception))d=c.toString();else throw c;}if(w(d,String))return d;try{d=JSV.common.JSVFileManager.getStreamAsBytes(d,null)}catch(f){if(z(f,JSV.exception.JSVException))try{d.close()}catch(e){if(!z(e,Exception))throw e;}else throw f;}return null==d?"":JSV.common.JSVFileManager.fixUTF(d)},"~S,~A");c$.getUTFEncoding=c(c$,"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");c$.fixUTF=c(c$,"fixUTF",function(a){var b=JSV.common.JSVFileManager.getUTFEncoding(a);if(b!==JU.Encoding.NONE)try{var d=String.instantialize(a,b.name().$replace("_","-"));switch(b){case JU.Encoding.UTF8:case JU.Encoding.UTF_16BE:case JU.Encoding.UTF_16LE:d=
d.substring(1)}return d}catch(c){if(z(c,java.io.IOException))JU.Logger.error("fixUTF error "+c);else throw c;}return String.instantialize(a)},"~A");c$.getInputStream=c(c$,"getInputStream",function(a,b,d){var c=JSV.common.JSVFileManager.isURL(a),f=null!=JSV.common.JSVFileManager.appletDocumentBase,e=null,e=null,u;if(c&&0<=(u=a.indexOf("?POST?")))e=a.substring(u+6),a=a.substring(0,u);if(f||c){var j;try{j=new java.net.URL(JSV.common.JSVFileManager.appletDocumentBase,a,null)}catch(l){if(z(l,Exception))throw new JSV.exception.JSVException("Cannot read "+
a);throw l;}JU.Logger.info("JSVFileManager opening URL "+j+(null==e?"":" with POST of "+e.length+" bytes"));e=JSV.common.JSVFileManager.viewer.apiPlatform.getURLContents(j,d,e,!1)}else b&&JU.Logger.info("JSVFileManager opening file "+a),e=JSV.common.JSVFileManager.viewer.apiPlatform.getBufferedFileInputStream(a);if(w(e,String))throw new JSV.exception.JSVException(e);return e},"~S,~B,~A");c$.getNMRSimulationJCampDX=c(c$,"getNMRSimulationJCampDX",function(a){var b=0,d=null,c=JSV.common.JSVFileManager.getSimulationType(a);
a.startsWith(c)&&(a=a.substring(c.length+1));var f=a.startsWith("MOL=");f&&(a=a.substring(4),b=a.indexOf("/n__Jmol"),0<b&&(a=a.substring(0,b)+JU.PT.rep(a.substring(b),"/n","\n")),d=a=JU.PT.rep(a,"\\n","\n"));var e=""+JSV.common.JSVFileManager.getSimulationHash(a,c);JU.Logger.debugging&&JU.Logger.info("JSVFileManager type="+c+" key="+e+" name="+a);var u=JSV.common.JSVFileManager.cacheGet(e);if(null!=u)return u;var j=f?null:JU.PT.rep(JSV.common.JSVFileManager.nciResolver,"%FILE",JU.PT.escapeUrl(a));
if(!f&&null==(d=JSV.common.JSVFileManager.getFileAsString(j))||0<=d.indexOf("<html"))return JU.Logger.error("no MOL data returned by NCI"),null;var u=c.equals("C13"),l=JSV.common.JSVFileManager.getFileAsString((u?JSV.common.JSVFileManager.nmrdbServerC13:JSV.common.JSVFileManager.nmrdbServerH1)+d),b=(new JU.JSJSONParser).parseMap(l,!0);JSV.common.JSVFileManager.cachePut("json",l);u&&(b=b.get("result"));l=b.get("molfile");null==l?(System.out.println("JSVFileManager: no MOL file returned from EPFL"),
l=d):System.out.println("JSVFileManager: MOL file hash="+l.hashCode());l=JSV.common.JSVFileManager.getAtomMap(l,d);JSV.common.JSVFileManager.cachePut("mol",d);f||Jmol.Cache.put("http://SIMULATION/"+c+"/"+a+"#molfile",d.getBytes());var p="<Signals src="+JU.PT.esc(JU.PT.rep(u?JSV.common.JSVFileManager.nmrdbServerC13:JSV.common.JSVFileManager.nmrdbServerH1,"?POST?molfile=",""))+">\n";if(u){for(var b=b.get("spectrum13C"),u=b.get("jcamp").get("value"),k=b.get("predCSNuc"),m=new JU.SB,n=k.size();0<=--n;)b=
k.get(n),m.append("<Signal "),JSV.common.JSVFileManager.setAttr(m,"type","nucleus",b),null==l?JSV.common.JSVFileManager.setAttr(m,"atoms","assignment",b):m.append('atoms="').appendI(l[JU.PT.parseInt(b.get("assignment"))]).append('" '),JSV.common.JSVFileManager.setAttr(m,"multiplicity","multiplicity",b),b=b.get("integralData"),JSV.common.JSVFileManager.setAttr(m,"xMin","from",b),JSV.common.JSVFileManager.setAttr(m,"xMax","to",b),JSV.common.JSVFileManager.setAttr(m,"integral","value",b),m.append("></Signal>\n");
m.append("</Signals>");p+=m.toString()}else{p=JU.PT.rep(b.get("xml"),"<Signals>",p);if(null!=l){m=new JU.SB;p=JU.PT.split(p,' atoms="');m.append(p[0]);for(n=1;n<p.length;n++)u=p[n],k=JU.PT.parseInt(u),m.append(' atoms="').appendI(l[k]).append(u.substring(u.indexOf('"')));p=m.toString()}p=JU.PT.rep(p,"</","\n</");p=JU.PT.rep(p,"><",">\n<");p=JU.PT.rep(p,'\\"','"');u=b.get("jcamp")}JU.Logger.debugging&&JU.Logger.info(p);JSV.common.JSVFileManager.cachePut("xml",p);u="##TITLE="+(f?"JMOL SIMULATION/"+
c:a)+"\n"+u.substring(u.indexOf("\n##")+1);b=d.indexOf("\n");b=d.indexOf("\n",b+1);0<b&&b==d.indexOf("\n \n")&&(d=d.substring(0,b+1)+"Created "+JSV.common.JSVFileManager.viewer.apiPlatform.getDateFormat("8824")+" by JSpecView "+JSV.common.JSVersion.VERSION+d.substring(b+1));b=u.indexOf("##.");a=JSV.common.JSVFileManager.getAbbreviatedSimulationName(a,c,!1);c=a.indexOf("id='");f&&0<c&&(a=a.substring(c+4,(a+"'").indexOf("'",c+4)));u=u.substring(0,b)+"##$MODELS=\n<Models>\n<ModelData id="+JU.PT.esc(a)+
' type="MOL" src='+JU.PT.esc(j)+">\n"+d+"</ModelData>\n</Models>\n##$SIGNALS=\n"+p+"\n"+u.substring(b);JSV.common.JSVFileManager.cachePut("jcamp",u);JSV.common.JSVFileManager.cachePut(e,u);return u},"~S");c$.getAtomMap=c(c$,"getAtomMap",function(a,b){var d=JSV.common.JSVFileManager.getCoord(a),c=JSV.common.JSVFileManager.getCoord(b),f=d.length;if(f!=c.length)return null;var e=E(f,0),u=new JU.BS;u.setBits(0,f);for(var j=!1,l=0;l<f;l++)for(var p=d[l],k=u.nextSetBit(0);0<=k;k=u.nextSetBit(k+1))if(0.1>
p.distanceSquared(c[k])){u.clear(k);e[l]=k;l!=k&&(j=!0);break}return j?e:null},"~S,~S");c$.getCoord=c(c$,"getCoord",function(a){a=JU.PT.split(a,"\n");for(var b=U(3,0),d=Integer.parseInt(a[3].substring(0,3).trim()),c=Array(d),f=0;f<d;f++)JU.PT.parseFloatArrayInfested(JU.PT.getTokens(a[4+f].substring(0,31)),b),c[f]=JU.P3.new3(b[0],b[1],b[2]);return c},"~S");c$.setAttr=c(c$,"setAttr",function(a,b,d,c){a.append(b+'="').appendO(c.get(d)).append('" ')},"JU.SB,~S,~S,java.util.Map");c$.getResource=c(c$,"getResource",
function(a,b,d){var c=null;try{if(null==(c=a.getClass().getResource(b)))d[0]="Couldn't find file: "+b}catch(f){if(z(f,Exception))d[0]="Exception "+f+" in getResource "+b;else throw f;}return c},"~O,~S,~A");c$.getResourceString=c(c$,"getResourceString",function(a,b,d){a=JSV.common.JSVFileManager.getResource(a,b,d);if(null==a)return d[0]="Error loading resource "+b,null;if(w(a,String))return JSV.common.JSVFileManager.getFileAsString(a);b=new JU.SB;try{for(var c=new java.io.BufferedReader(new java.io.InputStreamReader(a.getContent(),
"UTF-8")),f;null!=(f=c.readLine());)b.append(f).append("\n");c.close()}catch(e){if(z(e,Exception))d[0]=e.toString();else throw e;}return b.toString()},"~O,~S,~A");c$.getJmolFilePath=c(c$,"getJmolFilePath",function(a){try{a=JSV.common.JSVFileManager.getFullPathName(a)}catch(b){if(z(b,JSV.exception.JSVException))return null;throw b;}return null==JSV.common.JSVFileManager.appletDocumentBase?a.$replace("\\","/"):a},"~S");c$.getTagName=c(c$,"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(W("java.net.URL"),a,null)).getFile();return b.substring(b.lastIndexOf("/")+1)}catch(d){if(z(d,java.io.IOException))return null;throw d;}return JSV.common.JSVFileManager.viewer.apiPlatform.newFile(a).getName()},"~S");c$.setDocumentBase=c(c$,"setDocumentBase",function(a,b){JSV.common.JSVFileManager.viewer=a;JSV.common.JSVFileManager.appletDocumentBase=
b},"JSV.common.JSViewer,java.net.URL");c$.getSimulationType=c(c$,"getSimulationType",function(a){return 0<=a.indexOf("C13/")?"C13":"H1"},"~S");D(c$,"SIMULATION_PROTOCOL","http://SIMULATION/","appletDocumentBase",null,"viewer",null,"jsDocumentBase","");c$.urlPrefixes=c$.prototype.urlPrefixes=x(-1,["http:","https:","ftp:","http://SIMULATION/","file:"]);D(c$,"URL_LOCAL",4);c$.htCorrelationCache=c$.prototype.htCorrelationCache=new java.util.Hashtable;D(c$,"nciResolver","https://cactus.nci.nih.gov/chemical/structure/%FILE/file?format=sdf&get3d=True",
"nmrdbServerH1","https://www.nmrdb.org/tools/jmol/predict.php?POST?molfile=","nmrdbServerC13","https://www.nmrdb.org/service/jsmol13c?POST?molfile=","stringCount",0)});r("JSV.common");s(["javajs.api.BytePoster","J.api.PlatformViewer","JSV.common.Spectrum"],"JSV.common.JSViewer","java.io.File java.lang.Boolean $.Character $.Double $.Float $.Thread java.net.URL java.util.Arrays $.Hashtable JU.CU $.Lst $.OC $.PT $.SB JSV.common.Annotation $.ExportType $.JSVFileManager $.PanelData $.PanelNode $.Parameters $.PeakInfo $.PrintLayout $.RepaintManager $.ScriptToken $.ScriptTokenizer JSV.source.JDXReader $.JDXSource JSV.tree.SimpleTree JU.Logger".split(" "),
function(){c$=q(function(){this.irMode=this.overlayLegendDialog=this.viewDialog=this.dialogManager=this.jsvpPopupMenu=this.fileHelper=this.scriptQueue=this.properties=this.mainPanel=this.selectedPanel=this.repaintManager=this.parameters=this.panelNodes=this.currentSource=this.spectraTree=this.g2d=this.si=null;this.autoShowLegend=this.autoIntegrate=this.interfaceOverlaid=this.loadImaginary=!1;this.obscureTitleFromUser=null;this.allowMenu=!0;this.initialEndIndex=this.initialStartIndex=-1;this.isSigned=
this.isApplet=this.isSingleThreaded=!1;this.recentScript="";this.display=this.html5Applet=this.syncID=this.fullName=this.appletName=null;this.maximumSize=2147483647;this.scriptLevelCount=this.nViews=this.fileCount=this.screenWidth=this.screenHeight=0;this.apiPlatform=this.integrationRatios=this.returnFromJmolModel=null;this.popupZoomEnabled=this.popupAllowMenu=!0;this.defaultLoadScript=null;this.nmrMaxY=NaN;this.overlayLegendVisible=!1;this.recentStackPercent=5;this.offWindowFrame=this.lastPrintLayout=
null;this.recentOpenURL="http://";this.recentURL=null;this.recentSimulation="tylenol";n(this,arguments)},JSV.common,"JSViewer",null,[J.api.PlatformViewer,javajs.api.BytePoster]);H(c$,function(){this.irMode=JSV.common.Spectrum.IRMode.NO_CONVERT});c(c$,"setProperty",function(a,b){null!=this.properties&&this.properties.setProperty(a,b)},"~S,~S");c(c$,"setNode",function(a){a.jsvp!==this.selectedPanel&&this.si.siSetSelectedPanel(a.jsvp);this.si.siSendPanelChange();this.si.siNodeSet(a)},"JSV.common.PanelNode");
m(c$,function(a,b,d){this.si=a;this.isApplet=b;JSV.common.JSViewer.isJS=b&&d;d=null;self.Jmol&&(d=Jmol);JSV.common.JSViewer.jmolObject=d;this.isSigned=a.isSigned();this.apiPlatform=this.getPlatformInterface("Platform");this.apiPlatform.setViewer(this,this.display);this.g2d=this.getPlatformInterface("G2D");this.spectraTree=new JSV.tree.SimpleTree(this);this.parameters=this.getPlatformInterface("Parameters");this.parameters.setName("applet");this.fileHelper=this.getPlatformInterface("FileHelper").set(this);
this.isSingleThreaded=this.apiPlatform.isSingleThreaded();this.panelNodes=new JU.Lst;this.repaintManager=new JSV.common.RepaintManager(this);b||this.setPopupMenu(!0,!0)},"JSV.api.ScriptInterface,~B,~B");c(c$,"setPopupMenu",function(a,b){this.popupAllowMenu=a;this.popupZoomEnabled=b},"~B,~B");c(c$,"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(d){if(z(d,Exception)){JU.Logger.error(d+" initializing popup menu");return}throw d;}this.jsvpPopupMenu.jpiShow(a,b)}},"~N,~N");c(c$,"runScriptNow",function(a){System.out.println(this.checkScript(a));this.scriptLevelCount++;null==a&&(a="");a=a.trim();if(a.startsWith("!"))a=a.substring(1).trim();else if(a.startsWith(">"))return JU.Logger.error(a),!0;if(0<=a.indexOf("<PeakData"))return this.syncScript(a),!0;JU.Logger.info("RUNSCRIPT "+
a);var b=!0,d=10;a=new JSV.common.ScriptTokenizer(a,!0);for(var c=null;null!=a&&a.hasMoreTokens()&&0<d&&b;){var f=a.nextToken(),e=new JSV.common.ScriptTokenizer(f,!1),u=JSV.common.ScriptToken.getKey(e);if(null!=u){var j=JSV.common.ScriptToken.getScriptToken(u),e=JSV.common.ScriptToken.getValue(j,e,f);try{switch(j){case JSV.common.ScriptToken.UNKNOWN:JU.Logger.info("Unrecognized parameter: "+u);--d;break;default:if(null==this.selectedPanel)break;this.parameters.set(this.pd(),j,e);this.si.siUpdateBoolean(j,
JSV.common.Parameters.isTrue(e));break;case JSV.common.ScriptToken.PEAKCALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.SYNCCALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.COORDCALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.LOADFILECALLBACKFUNCTIONNAME:this.si.siExecSetCallback(j,e);break;case JSV.common.ScriptToken.DEFAULTLOADSCRIPT:e=JU.PT.rep(e,"''",'"');this.defaultLoadScript=0<e.length?e:null;break;case JSV.common.ScriptToken.DEFAULTNMRNORMALIZATION:this.nmrMaxY=JU.PT.parseFloat(e);break;
case JSV.common.ScriptToken.AUTOINTEGRATE:this.autoIntegrate=JSV.common.Parameters.isTrue(e);break;case JSV.common.ScriptToken.CLOSE:this.execClose(e);break;case JSV.common.ScriptToken.DEBUG:JU.Logger.setLogLevel(e.toLowerCase().equals("high")?6:JSV.common.Parameters.isTrue(e)?5:4);break;case JSV.common.ScriptToken.GETPROPERTY:var l=null==this.selectedPanel?null:this.getPropertyAsJavaObject(e);null!=l&&this.selectedPanel.showMessage(JU.PT.toJSON(null,l),e);break;case JSV.common.ScriptToken.HELP:this.execHelp(e);
break;case JSV.common.ScriptToken.HIDDEN:this.si.siExecHidden(JSV.common.Parameters.isTrue(e));break;case JSV.common.ScriptToken.INTEGRATIONRATIOS:this.integrationRatios=e;this.execIntegrate(null);break;case JSV.common.ScriptToken.INTERFACE:this.interfaceOverlaid=this.checkOvelayInterface(e);break;case JSV.common.ScriptToken.INTEGRALOFFSET:case JSV.common.ScriptToken.INTEGRALRANGE:this.execSetIntegralParameter(j,Double.parseDouble(e));break;case JSV.common.ScriptToken.INVERTY:this.execZoom("invertY");
break;case JSV.common.ScriptToken.JMOL:this.si.syncToJmol(e);break;case JSV.common.ScriptToken.JSV:this.syncScript(JU.PT.trimQuotes(e));break;case JSV.common.ScriptToken.LOAD:if(0==e.length){null!=this.defaultLoadScript&&this.runScriptNow(this.defaultLoadScript);break}this.execLoad(e,(null==this.defaultLoadScript?"":this.defaultLoadScript+";")+a.getRemainingScript());c=null==this.selectedPanel?null:this.si.siLoaded(e);a=null;break;case JSV.common.ScriptToken.LOADIMAGINARY:this.loadImaginary=JSV.common.Parameters.isTrue(e);
break;case JSV.common.ScriptToken.PEAK:this.execPeak(e);break;case JSV.common.ScriptToken.PEAKLIST:this.execPeakList(e);break;case JSV.common.ScriptToken.SCALEBY:this.scaleSelectedBy(this.panelNodes,e);break;case JSV.common.ScriptToken.SCRIPT:if(e.equals("")||e.toLowerCase().startsWith("inline"))this.execScriptInline(e);else{var p=JSV.common.JSVFileManager.getFileAsString(e);null!=p&&100>this.scriptLevelCount&&this.runScriptNow(p)}break;case JSV.common.ScriptToken.SELECT:this.execSelect(e);break;
case JSV.common.ScriptToken.SPECTRUM:case JSV.common.ScriptToken.SPECTRUMNUMBER:this.setSpectrum(e)||(b=!1);break;case JSV.common.ScriptToken.STACKOFFSETY:this.execOverlayOffsetY(JU.PT.parseInt(""+JU.PT.parseFloat(e)));break;case JSV.common.ScriptToken.TEST:this.si.siExecTest(e);break;case JSV.common.ScriptToken.OVERLAY:case JSV.common.ScriptToken.VIEW:this.execView(e,!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.SHOWKEY:case JSV.common.ScriptToken.SHOWPEAKLIST:case JSV.common.ScriptToken.SHOWINTEGRATION:case JSV.common.ScriptToken.SHOWPROPERTIES:case JSV.common.ScriptToken.SHOWSOURCE:case JSV.common.ScriptToken.YSCALE:case JSV.common.ScriptToken.WRITE:case JSV.common.ScriptToken.ZOOM:if(this.isClosed()){b=
!1;break}switch(j){case JSV.common.ScriptToken.FINDX:this.pd().findX(null,Double.parseDouble(e));break;case JSV.common.ScriptToken.GETSOLUTIONCOLOR:this.show("solutioncolor"+e.toLowerCase());break;case JSV.common.ScriptToken.INTEGRATION:case JSV.common.ScriptToken.INTEGRATE:this.execIntegrate(e);break;case JSV.common.ScriptToken.IRMODE:this.execIRMode(e);break;case JSV.common.ScriptToken.LABEL:this.pd().addAnnotation(JSV.common.ScriptToken.getTokens(e));break;case JSV.common.ScriptToken.LINK:this.pd().linkSpectra(JSV.common.PanelData.LinkMode.getMode(e));
break;case JSV.common.ScriptToken.OVERLAYSTACKED:this.pd().splitStack(!JSV.common.Parameters.isTrue(e));break;case JSV.common.ScriptToken.PRINT:c=this.execWrite(null);break;case JSV.common.ScriptToken.SETPEAK:case JSV.common.ScriptToken.SETX:case JSV.common.ScriptToken.SHIFTX:this.execShiftSpectrum(j,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(e));
break;case JSV.common.ScriptToken.SHOWKEY:this.setOverlayLegendVisibility(JSV.common.Parameters.getTFToggle(e),!0);break;case JSV.common.ScriptToken.SHOWMEASUREMENTS:this.pd().showAnnotation(JSV.common.Annotation.AType.Measurements,JSV.common.Parameters.getTFToggle(e));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(e));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(e);break;case JSV.common.ScriptToken.WINDOW:this.si.siNewWindow(JSV.common.Parameters.isTrue(e),!1);break;case JSV.common.ScriptToken.WRITE:c=this.execWrite(e);break;case JSV.common.ScriptToken.ZOOM:b=this.execZoom(e)}}}catch(k){if(z(k,Exception))c=k.toString(),JU.Logger.error(k.toString()),b=!1,--d;else throw k;}}}this.scriptLevelCount--;this.si.siExecScriptComplete(c,!0);return b},
"~S");c(c$,"execShiftSpectrum",function(a,b){var d=JSV.common.ScriptToken.getTokens(b),c=NaN,f=NaN;switch(d.size()){case 2:f=d.get(1);f.equals("")&&(f="?");f=f.equalsIgnoreCase("NONE")?1.7976931348623157E308:f.equalsIgnoreCase("?")?NaN:Double.parseDouble(f);break;case 3:c=Double.parseDouble(d.get(1));f=Double.parseDouble(d.get(2));break;default:Double.parseDouble("")}d=0;switch(a){case JSV.common.ScriptToken.SETPEAK:d=1;break;case JSV.common.ScriptToken.SETX:d=2;break;case JSV.common.ScriptToken.SHIFTX:d=
3;Double.isNaN(f)&&Double.parseDouble("");break;default:return}this.pd().shiftSpectrum(d,c,f)},"JSV.common.ScriptToken,~S");c(c$,"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(c$,"checkOvelayInterface",function(a){return a.equalsIgnoreCase("single")||a.equalsIgnoreCase("overlay")},"~S");c(c$,"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(d){if(!z(d,Exception))throw d;}},"~S");c(c$,"execPeakList",function(a){var b=this.parameters,d=JSV.common.Parameters.getTFToggle(a);if(0>a.indexOf("="))this.isClosed()||this.pd().getPeakListing(null,d);else{var d=JSV.common.ScriptToken.getTokens(a),c=b.peakListThreshold,
f=b.peakListInterpolation;try{for(var e=d.size();0<=--e;){var u=d.get(e),j=u.indexOf("=");if(!(0>=j)){var l=u.substring(0,j);a=u.substring(j+1);l.startsWith("thr")?c=Double.$valueOf(a).doubleValue():l.startsWith("int")&&(f=a.equalsIgnoreCase("none")?"NONE":"parabolic")}}b.peakListThreshold=c;b.peakListInterpolation=f;this.isClosed()||this.pd().getPeakListing(b,Boolean.TRUE)}catch(p){if(!z(p,Exception))throw p;}}},"~S");c(c$,"highlight",function(a){var b=JSV.common.ScriptToken.getTokens(a),c=b.size();
switch(c){case 3:case 5:case 6:case 7:break;case 2:case 4:if(b.get(c-1).equalsIgnoreCase("OFF"))break;default:return!1}if(!this.isClosed()){a=JU.PT.parseFloat(1<c?b.get(1):"");var g=JU.PT.parseFloat(2<c?b.get(2):""),f=this.getRGB(3<c?b.get(3):"100"),e=this.getRGB(4<c?b.get(4):"100"),u=this.getRGB(5<c?b.get(5):"100"),b=this.getRGB(6<c?b.get(6):"100");Float.isNaN(a)||Float.isNaN(g)?this.pd().removeAllHighlights():(this.pd().removeHighlight(a,g),0>b&&(b=150),0<=f&&(0<=e&&0<=u)&&this.pd().addHighlight(null,
a,g,null,f,e,u,b));this.repaint(!0)}return!0},"~S");c(c$,"getRGB",function(a){a=JU.PT.parseFloat(a);return I(Float.isNaN(a)?-1:1<a?a:255*a)},"~S");c(c$,"execZoom",function(a){var b=0,c=0,g=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 e=a.get(0);e.equalsIgnoreCase("X")?(b=Double.parseDouble(a.get(1)),
c=Double.parseDouble(a.get(2))):e.equalsIgnoreCase("Y")&&(g=Double.parseDouble(a.get(1)),f=Double.parseDouble(a.get(2)));break;case 4:b=Double.parseDouble(a.get(0)),g=Double.parseDouble(a.get(1)),c=Double.parseDouble(a.get(2)),f=Double.parseDouble(a.get(3))}this.pd().setZoom(b,g,c,f);return!0},"~S");c(c$,"scaleSelectedBy",function(a,b){try{for(var c=Double.parseDouble(b),g=a.size();0<=--g;)a.get(g).pd().scaleSelectedBy(c)}catch(f){if(!z(f,Exception))throw f;}},"JU.Lst,~S");c(c$,"pd",function(){return null==
this.selectedPanel?null:this.selectedPanel.getPanelData()});c(c$,"isClosed",function(){return null==this.pd()});c(c$,"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(!z(b,Exception))throw b;}}else{for(var c=this.panelNodes,g=c.size();0<=--g;)c.get(g).pd().selectFromEntireSet(-2147483648);c=new JU.Lst;this.fillSpecList(a,c,!1)}},"~S");c(c$,"execView",function(a,b){if(a.equals(""))this.checkOverlay();
else{var c=new JU.Lst,g=this.fillSpecList(a,c,!0);0<c.size()&&this.si.siOpenDataOrFile(null,g,c,g,-1,-1,!1,null,null);b||this.si.siValidateAndRepaint(!1)}},"~S,~B");c(c$,"execIRMode",function(a){for(var b=JSV.common.Spectrum.IRMode.getMode(a),c=this.pd().getSpectrum().dataType,g=this.panelNodes.size();0<=--g;)this.panelNodes.get(g).pd().setIRMode(b,c);this.setIRmode(a)},"~S");c(c$,"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(c$,"repaint",function(a){this.selectedPanel.doRepaint(a)},"~B");c(c$,"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(c$,"setYScale",function(a){var b=
JSV.common.ScriptToken.getTokens(a),c=0,g=!1;1<b.size()&&b.get(0).equalsIgnoreCase("ALL")&&(g=!0,c++);a=Double.parseDouble(b.get(c++));b=Double.parseDouble(b.get(c));if(g){g=this.pd().getSpectrum();for(c=this.panelNodes.size();0<=--c;){var f=this.panelNodes.get(c);f.source===this.currentSource&&JSV.common.Spectrum.areXScalesCompatible(g,f.getSpectrum(),!1,!1)&&f.pd().setZoom(0,a,0,b)}}else this.pd().setZoom(0,a,0,b)},"~S");c(c$,"setOverlayLegendVisibility",function(a,b){b&&(this.overlayLegendVisible=
null==a?!this.overlayLegendVisible:a===Boolean.TRUE);for(var c=JSV.common.PanelNode.findNode(this.selectedPanel,this.panelNodes),g=this.panelNodes.size();0<=--g;)this.showOverlayLegend(this.panelNodes.get(g),this.panelNodes.get(g)===c&&this.overlayLegendVisible)},"Boolean,~B");c(c$,"showOverlayLegend",function(a,b){var c=a.legend;null==c&&b&&(c=a.setLegend(1<a.pd().getNumberOfSpectraInCurrentSet()&&1==a.pd().getNumberOfGraphSets()?this.getDialog(JSV.common.Annotation.AType.OverlayLegend,null):null));
null!=c&&c.setVisible(b)},"JSV.common.PanelNode,~B");c(c$,"syncScript",function(a){a.equals("TEST")&&(a=JSV.common.JSViewer.testScript);JU.Logger.info("JSViewer.syncScript Jmol>JSV "+a);if(0>a.indexOf("<PeakData"))a.startsWith("JSVSTR:")?this.si.syncToJmol(a):(this.runScriptNow(a),0<=a.indexOf("#SYNC_PEAKS")&&this.syncPeaksAfterSyncScript());else{JU.Logger.info(">>toJSV>> "+a);var b=JU.PT.getQuotedAttribute(a,"sourceID"),c,g,f,e;if(null==b){g=JU.PT.getQuotedAttribute(a,"file");f=JU.PT.getQuotedAttribute(a,
"index");if(null==g||null==f)return;g=JU.PT.rep(g,"#molfile","");c=JU.PT.getQuotedAttribute(a,"model");b=JU.PT.getQuotedAttribute(a,"src");e=null!=b&&b.startsWith("Jmol")?null:this.returnFromJmolModel;if(null!=c&&null!=e&&!c.equals(e)){JU.Logger.info("JSV ignoring model "+c+"; should be "+e);return}this.returnFromJmolModel=null;if(0==this.panelNodes.size()||!this.checkFileAlreadyLoaded(g))JU.Logger.info("file "+g+" not found -- JSViewer closing all and reopening"),this.si.siSyncLoad(g);a=JU.PT.getQuotedAttribute(a,
"type");e=null}else g=null,f=c=b,e=","+JU.PT.getQuotedAttribute(a,"atom")+",",a="ID";f=this.selectPanelByPeak(g,f,e);e=this.pd();e.selectSpectrum(g,a,c,!0);this.si.siSendPanelChange();e.addPeakHighlight(f);this.repaint(!0);(null==b||null!=f&&null!=f.getAtoms())&&this.si.syncToJmol(this.jmolSelect(f))}},"~S");c(c$,"syncPeaksAfterSyncScript",function(){var a=this.currentSource;if(null!=a)try{var b="file="+JU.PT.esc(a.getFilePath()),c=a.getSpectra().get(0).getPeakList(),g=new JU.SB;g.append("[");for(var f=
c.size(),a=0;a<f;a++){var e=c.get(a).toString(),e=e+" "+b;g.append(JU.PT.esc(e));0<a&&g.append(",")}g.append("]");this.si.syncToJmol("Peaks: "+g)}catch(u){if(!z(u,Exception))throw u;}});c(c$,"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(c$,"selectPanelByPeak",function(a,
b,c){if(null==this.panelNodes)return null;for(var g=null,f=this.panelNodes.size();0<=--f;)this.panelNodes.get(f).pd().addPeakHighlight(null);g=this.pd().selectPeakByFileIndex(a,b,c);if(null!=g)this.setNode(JSV.common.PanelNode.findNode(this.selectedPanel,this.panelNodes));else for(f=this.panelNodes.size();0<=--f;){var e=this.panelNodes.get(f);if(null!=(g=e.pd().selectPeakByFileIndex(a,b,c))){this.setNode(e);break}}return g},"~S,~S,~S");c(c$,"processPeakPickEvent",function(a){if(w(a,JSV.common.PeakInfo)){var b=
this.pd().findMatchingPeakInfo(a);if(null==b){if(!"ALL".equals(a.getTitle()))return;for(var c=null,g=0;g<this.panelNodes.size();g++)if(null!=(b=this.panelNodes.get(g).pd().findMatchingPeakInfo(a))){c=this.panelNodes.get(g);break}if(null==c)return;this.setNode(c)}a=b}else this.si.siSetSelectedPanel(a.getSource()),a=a.getPeakInfo();this.pd().addPeakHighlight(a);this.syncToJmol(a);a.isClearAll()?this.repaint(!1):this.pd().selectSpectrum(a.getFilePath(),a.getType(),a.getModel(),!0);this.si.siCheckCallbacks(a.getTitle())},
"~O,~B");c(c$,"newStructToJmol",function(a){JU.Logger.info("sending new structure to Jmol:\n"+a);this.si.syncToJmol("struct:"+a)},"~S");c(c$,"syncToJmol",function(a){this.repaint(!0);this.returnFromJmolModel=a.getModel();this.si.syncToJmol(this.jmolSelect(a))},"JSV.common.PeakInfo");c(c$,"sendPanelChange",function(){var a=this.pd(),b=a.getSpectrum(),c=b.getSelectedPeak();null==c&&(c=b.getModelPeakInfoForAutoSelectOnLoad());null==c&&(c=b.getBasePeakInfo());a.addPeakHighlight(c);JU.Logger.info(Thread.currentThread()+
"JSViewer sendFrameChange "+this.selectedPanel);this.syncToJmol(c)});c(c$,"jmolSelect",function(a){var b="IR".equals(a.getType())||"RAMAN".equals(a.getType())?"vibration ON; selectionHalos OFF;":"vibration OFF; selectionhalos "+(null==a.getAtoms()?"OFF":"ON");return"Select: "+a+' script="'+b+' " sourceID="'+this.pd().getSpectrum().sourceID+'"'},"JSV.common.PeakInfo");c(c$,"getPropertyAsJavaObject",function(a){var b=new java.util.Hashtable;if("SOURCEID".equalsIgnoreCase(a))return b.put(a,null==this.pd()?
"":this.pd().getSpectrum().sourceID),b;if(null!=a&&a.startsWith("DATA_"))return b.put(a,""+JSV.common.JSVFileManager.cacheGet(a.substring(5))),b;var c=!1;if(null!=a&&a.toUpperCase().startsWith("ALL ")||"all".equalsIgnoreCase(a))a=a.substring(3).trim(),c=!0;"".equals(a)&&(a=null);if("NAMES".equalsIgnoreCase(a)||"KEYS".equalsIgnoreCase(a))a="";var g=this.pd().getInfo(!0,a);if(!c&&null!=g)return g;null!=g&&b.put("current",g);c=new JU.Lst;for(g=0;g<this.panelNodes.size();g++)null!=this.panelNodes.get(g).jsvp&&
c.addLast(this.panelNodes.get(g).getInfo(a));b.put("items",c);return b},"~S");c(c$,"getCoordinate",function(){if(!this.isClosed()){var a=this.pd().getClickedCoordinate();if(null!=a)return a.getXVal()+" "+a.getYVal()}return""});c(c$,"fillSpecList",function(a,b,c){var g,f=null,e=a.equalsIgnoreCase("NONE");if(e||a.equalsIgnoreCase("all"))a="*";if(0>a.indexOf("*")){g=a.$plit(" ");a=new JU.SB;for(var u=0;u<g.length;u++){var j=g[u].indexOf(".");j!=g[u].lastIndexOf(".")&&(g[u]=g[u].substring(0,j+1)+g[u].substring(j+
1).$replace(".","_"));a.append(g[u]).append(" ")}a=a.toString().trim()}if(a.equals("*"))g=JSV.common.ScriptToken.getTokens(JSV.common.PanelNode.getSpectrumListAsString(this.panelNodes));else if(a.startsWith('"')||a.startsWith("'"))g=JSV.common.ScriptToken.getTokens(a);else if(a=JU.PT.rep(a,"_"," _ "),a=JU.PT.rep(a,"-"," - "),g=JSV.common.ScriptToken.getTokens(a),f=JSV.common.ScriptToken.getTokens(JSV.common.PanelNode.getSpectrumListAsString(this.panelNodes)),0==f.size())return null;var l=this.isClosed()?
"1.":JSV.common.PanelNode.findNode(this.selectedPanel,this.panelNodes).id,l=l.substring(0,l.indexOf(".")+1);a=new JU.SB;for(var p=g.size(),k=null,u=0;u<p;u++){var m=g.get(u),j=NaN,n=-1;u+1<p&&g.get(u+1).equals("*")?(u+=2,j=Double.parseDouble(g.get(u))):u+1<p&&g.get(u+1).equals("_")&&(u+=2,n=Integer.parseInt(g.get(u)));if(m.equals("-")){null==k&&(k=f.get(0));m=u+1==p?f.get(f.size()-1):g.get(++u);m.contains(".")||(m=l+m);for(j=0;j<f.size()&&!f.get(j).equals(k);)j++;for(j++;j<f.size()&&!k.equals(m);){var q=
JSV.common.PanelNode.findNodeById(k=f.get(j++),this.panelNodes);b.addLast(q.pd().getSpectrumAt(0));a.append(",").append(k)}}else if(m.startsWith("'")&&m.endsWith("'")&&(m='"'+JU.PT.trim(m,"'")+'"'),m.startsWith('"'))for(var m=JU.PT.trim(m,'"'),n=this.panelNodes.size(),r=0;r<n;r++){if(q=this.panelNodes.get(r),null!=q.fileName&&q.fileName.startsWith(m)||null!=q.frameTitle&&q.frameTitle.startsWith(m))this.addSpecToList(q.pd(),j,-1,b,c),a.append(",").append(q.id)}else m.contains(".")||(m=l+m),q=JSV.common.PanelNode.findNodeById(m,
this.panelNodes),null!=q&&(k=m,this.addSpecToList(q.pd(),j,n,b,c),a.append(",").append(m),0<n&&a.append(".").appendI(n))}c&&0<b.size()&&(q=JSV.common.PanelNode.findNodeById(a.substring(1),this.panelNodes),null!=q&&(this.setNode(q),b.clear()));return e?"NONE":0<a.length()?a.toString().substring(1):null},"~S,JU.Lst,~B");c(c$,"addSpecToList",function(a,b,c,g,f){f?(a.getSpectrumAt(0).setUserYFactor(Double.isNaN(b)?1:b),a.addToList(c-1,g)):a.selectFromEntireSet(c-1)},"JSV.common.PanelData,~N,~N,JU.Lst,~B");
c(c$,"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(c$,"openDataOrFile",function(a,b,c,g,f,e,k,j){if("NONE".equals(b))return this.close("View*"),0;this.si.writeStatus("");var l=null,p=null,m=null,n=!1;null!=g&&g.startsWith("cache://")&&(a=Jmol.Cache.get(b=g));var q=null;if(null!=a)try{m=b,p=l=JSV.common.JSVFileManager.getFullPathName(b)}catch(r){if(!z(r,
JSV.exception.JSVException))throw r;}else if(null!=c)n=!0,p=m=l="View"+ ++this.nViews;else if(null!=g)try{q=this.apiPlatform.newFile(g),this.recentURL=l=(new java.net.URL(JSV.common.JSVFileManager.appletDocumentBase,g,null)).toString(),m=JSV.common.JSVFileManager.getTagName(l)}catch(s){if(z(s,java.net.MalformedURLException))m=q.getName(),p=l=q.getFullPath(),this.recentURL=null;else throw s;}b=-1;if(0<=(b=JSV.common.PanelNode.isOpen(this.panelNodes,l))||0<=(b=JSV.common.PanelNode.isOpen(this.panelNodes,
g)))return n?(--this.nViews,this.setNode(this.panelNodes.get(b))):this.si.writeStatus(l+" is already open"),-1;!k&&!n&&this.close("all");this.si.setCursor(3);try{this.si.siSetCurrentSource(n?JSV.source.JDXSource.createView(c):JSV.source.JDXReader.createJDXSource(q,a,l,this.obscureTitleFromUser===Boolean.TRUE,this.loadImaginary,f,e,this.nmrMaxY))}catch(t){if(z(t,Exception))return alert(t.toString()),this.si.setCursor(0),this.isApplet&&this.selectedPanel.showMessage(t.toString(),"Error Opening File"),
-3;throw t;}this.si.setCursor(0);System.gc();null==p?(p=this.currentSource.getFilePath(),null!=p&&(m=p.substring(p.lastIndexOf("/")+1))):this.currentSource.setFilePath(p);null==j&&!n&&(j=p);null!=j&&this.currentSource.setID(j);this.si.siSetLoaded(m,p);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();n||c&&this.currentSource.isCompoundSource?this.combineSpectra(n?
g:null):this.splitSpectra();this.pd().setTaintedAll();n||this.si.siUpdateRecentMenus(l);return 0},"~O,~S,JU.Lst,~S,~N,~N,~B,~S");c(c$,"close",function(a){var b=0,c=null==a?-2:a.indexOf(">");0<c&&(b=JU.PT.parseInt(a.substring(c+1).trim()),a=a.substring(0,c).trim());"*".equals(a)&&(a="all");var g="all"===a;if(null==a||0==b&&a.equalsIgnoreCase("all"))this.closeSource(null);else{var f=a.equalsIgnoreCase("views"),c=new JU.Lst;a=a.$replace("\\","/");var e=this.panelNodes.size(),b=e-b;if(a.endsWith("*"))for(a=
a.substring(0,a.length-1);0<=--e;)this.panelNodes.get(e).fileName.startsWith(a)&&c.addLast(this.panelNodes.get(e).source);else if(a.equalsIgnoreCase("selected"))for(a=null;0<=--e;)g=this.panelNodes.get(e).source,this.panelNodes.get(e).isSelected&&(null==a||a!==g)&&c.addLast(g),a=g;else if(g||f||a.equalsIgnoreCase("simulations"))for(a=0;0<=--e&&a<b;){if(g||(f?this.panelNodes.get(e).isView:this.panelNodes.get(e).isSimulation))c.addLast(this.panelNodes.get(e).source),a++}else g=0==a.length?this.currentSource:
JSV.common.PanelNode.findSourceByNameOrId(a,this.panelNodes),null!=g&&c.addLast(g);for(e=c.size();0<=--e;)this.closeSource(c.get(e));null==this.selectedPanel&&0<this.panelNodes.size()&&this.si.siSetSelectedPanel(JSV.common.PanelNode.getLastFileFirstNode(this.panelNodes))}},"~S");c(c$,"execLoad",function(a,b){var c=JSV.common.ScriptToken.getTokens(a),g=c.get(0),f=null,e=0;g.equalsIgnoreCase("ID")&&(f=JU.PT.trimQuotes(c.get(1)),g=c.get(2),e=2);var k=g.equalsIgnoreCase("APPEND"),j=g.equalsIgnoreCase("CHECK");
(k||j)&&e++;0<e&&(g=c.get(e));null==b&&(b=this.defaultLoadScript);if(g.equals("?"))this.openFileFromDialog(k,!1,null,b);else if(g.equals("http://?"))this.openFileFromDialog(k,!0,null,null);else if(g.equals("$?")||g.equals("$H1?"))this.openFileFromDialog(k,!0,"H1",null);else if(g.equals("$C13?"))this.openFileFromDialog(k,!0,"C13",null);else{var l=g.equalsIgnoreCase("MOL")||g.equalsIgnoreCase("H1"),p=g.equalsIgnoreCase("C13");if(l||p)g="http://SIMULATION/"+(l?"H1/":"C13/")+"MOL="+JU.PT.trimQuotes(c.get(++e));
!j&&!k&&(g.equals('""')&&null!=this.currentSource&&(g=this.currentSource.getFilePath()),this.close("all"));g=JU.PT.trimQuotes(g);if(j=g.startsWith("$"))!g.startsWith("$H1")&&!g.startsWith("$C13")&&(g="$H1/"+g.substring(1)),g="http://SIMULATION/"+g.substring(1);l=e+1<c.size()?Integer.$valueOf(c.get(++e)).intValue():-1;c=e+1<c.size()?Integer.$valueOf(c.get(++e)).intValue():l;this.si.siOpenDataOrFile(null,null,null,g,l,c,k,b,f);j&&(this.close("views"),this.execView("*",!0))}},"~S,~S");c(c$,"combineSpectra",
function(a){for(var b=this.currentSource,c=b.getSpectra(),g=!1,f=c.size();0<=--f;)if(c.get(f).isSimulation){g=!0;break}c=this.si.siGetNewJSVPanel2(c);c.setTitle(b.getTitle());c.getTitle().equals("")&&(c.getPanelData().setViewTitle(b.getFilePath()),c.setTitle(a));this.si.siSetPropertiesFromPreferences(c,!0);this.spectraTree.createTree(++this.fileCount,b,x(-1,[c])).getPanelNode().isView=!0;b=JSV.common.PanelNode.findNode(this.selectedPanel,this.panelNodes);b.setFrameTitle(a);b.isView=!0;this.autoShowLegend&&
1==this.pd().getNumberOfGraphSets()&&b.setLegend(this.getDialog(JSV.common.Annotation.AType.OverlayLegend,null));this.si.siSetMenuEnables(b,!1);g&&this.pd().splitStack(!0)},"~S");c(c$,"closeSource",function(a){for(var b=this.spectraTree.getRootNode(),c=null==a?null:a.getFilePath(),g=new JU.Lst,b=b.children();b.hasMoreElements();){var f=b.nextElement();if(null==c||f.getPanelNode().source.matchesFilePath(c)){JU.Logger.info("Closing "+f.getPanelNode().source.getFilePath());for(var e=f.children();e.hasMoreElements();){var k=
e.nextElement();g.addLast(k);this.panelNodes.removeObj(k.getPanelNode())}g.addLast(f);if(null!=c)break}}this.spectraTree.deleteNodes(g);null==a&&(null!=this.currentSource&&this.currentSource.dispose(),this.currentSource=null,null!=this.selectedPanel&&this.selectedPanel.dispose());this.currentSource===a&&(this.si.siSetSelectedPanel(null),this.si.siSetCurrentSource(null));for(g=c=0;g<this.panelNodes.size();g++)b=JU.PT.parseFloat(this.panelNodes.get(g).id),b>=c+1&&(c=v(Math.floor(b)));this.fileCount=
c;System.gc();JU.Logger.debugging&&JU.Logger.checkMemory();this.si.siSourceClosed(a)},"JSV.source.JDXSource");c(c$,"setFrameAndTreeNode",function(a){null==this.panelNodes||(0>a||a>=this.panelNodes.size())||this.setNode(this.panelNodes.get(a))},"~N");c(c$,"selectFrameNode",function(a){a=JSV.common.PanelNode.findNode(a,this.panelNodes);if(null==a)return null;this.spectraTree.setPath(this.spectraTree.newTreePath(a.treeNode.getPath()));this.setOverlayLegendVisibility(null,!1);return a},"JSV.api.JSVPanel");
c(c$,"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(c$,"splitSpectra",function(){for(var a=this.currentSource,b=a.getSpectra(),c=Array(b.size()),g=null,f=0;f<b.size();f++)g=b.get(f),g=this.si.siGetNewJSVPanel(g),this.si.siSetPropertiesFromPreferences(g,!0),c[f]=g;this.spectraTree.createTree(++this.fileCount,
a,c);this.si.siGetNewJSVPanel(null);a=JSV.common.PanelNode.findNode(this.selectedPanel,this.panelNodes);this.si.siSetMenuEnables(a,!0)});c(c$,"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(c$,"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(c$,"runScript",function(a){null==this.scriptQueue?this.si.siProcessCommand(a):this.scriptQueue.addLast(a)},"~S");c(c$,"requestRepaint",function(){null!=this.selectedPanel&&this.repaintManager.refresh()});c(c$,"repaintDone",function(){this.repaintManager.repaintDone()});
c(c$,"checkOverlay",function(){null!=this.mainPanel&&this.markSelectedPanels(this.panelNodes,this.mainPanel.getCurrentPanelIndex());this.viewDialog=this.getDialog(JSV.common.Annotation.AType.Views,null)});c(c$,"markSelectedPanels",function(a,b){for(var c=a.size();0<=--c;)a.get(c).isSelected=b==c},"JU.Lst,~N");c(c$,"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(c$,"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(c$,"setDisplay",function(a){this.apiPlatform.setViewer(this,this.display=
a);var b=E(2,0);this.apiPlatform.getFullScreenDimensions(a,b);this.setScreenDimension(b[0],b[1])},"~O");c(c$,"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(c$,"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(c$,"updateJS",function(){null!=this.selectedPanel&&this.selectedPanel.paintComponent(this.apiPlatform.getGraphics(null))});c(c$,"processMouseEvent",function(a,b,c,g,f){return null!=this.selectedPanel&&this.selectedPanel.processMouseEvent(a,b,c,g,f)},"~N,~N,~N,~N,~N");c(c$,"processTwoPointGesture",function(a){this.isClosed()||this.selectedPanel.processTwoPointGesture(a)},"~A");c(c$,"getApplet",function(){return this.html5Applet});c(c$,"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(c$,"getHeight",function(){return this.screenHeight});c(c$,"getWidth",function(){return this.screenWidth});c(c$,"getPlatformInterface",function(a){return JSV.common.JSViewer.getInterface("JSV."+(JSV.common.JSViewer.isJS?"js2d.Js":
"java.Awt")+a)},"~S");c(c$,"getDialogManager",function(){if(null!=this.dialogManager)return this.dialogManager;this.dialogManager=this.getPlatformInterface("DialogManager");return this.dialogManager.set(this)});c(c$,"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(c$,"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(c$,"getDialogPrint",function(a){if(!JSV.common.JSViewer.isJS)try{var b=this.getPlatformInterface("PrintDialog").set(this.offWindowFrame,this.lastPrintLayout,a).getPrintLayout();null!=b&&(this.lastPrintLayout=b);return b}catch(c){if(!z(c,Exception))throw c;}return new JSV.common.PrintLayout(this.pd())},"~B");c(c$,"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(c$,"getOptionFromDialog",function(a,b,c){return this.getDialogManager().getOptionFromDialog(null,a,this.selectedPanel,b,c)},"~A,~S,~S");c(c$,"print",function(a){return this.execWrite('PDF "'+a+'"')},"~S");c(c$,"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(c$,"$export",function(a,b){null==a&&(a="XY");var c=this.pd(),g=c.getNumberOfSpectraInCurrentSet();if(-1>b||b>=g)return"Maximum spectrum index (0-based) is "+(g-1)+".";c=0>b?c.getSpectrum():c.getSpectrumAt(b);try{return JSV.common.JSViewer.getInterface("JSV.export.Exporter").exportTheSpectrum(this,JSV.common.ExportType.getType(a),null,c,0,c.getXYCoords().length-1,null,a.equalsIgnoreCase("PDF"))}catch(f){if(z(f,Exception))return JU.Logger.error(f.toString()),null;throw f;}},"~S,~N");
e(c$,"postByteArray",function(a,b){return JSV.common.JSVFileManager.postByteArray(a,b)},"~S,~A");c(c$,"getOutputChannel",function(a,b){for(;a.startsWith("/");)a=a.substring(1);return(new JU.OC).setParams(this,a,!b,null)},"~S,~B");c$.getInterface=c(c$,"getInterface",function(a){try{var b=$._4Name(a);return null==b?null:b.newInstance()}catch(c){if(z(c,Exception))return JU.Logger.error("Interface.java Error creating instance for "+a+": \n"+c),null;throw c;}},"~S");c(c$,"showMessage",function(a){null!=
this.selectedPanel&&null!=a&&this.selectedPanel.showMessage(a,null)},"~S");c(c$,"openFileFromDialog",function(a,b,c,g){var f=null;if(null!=c){f=this.fileHelper.getUrlFromDialog("Enter the name or identifier of a compound",this.recentSimulation);if(null==f)return;this.recentSimulation=f;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;this.recentOpenURL=f}else b=x(-1,[Boolean.$valueOf(a),
g]),b=this.fileHelper.showFileOpenDialog(this.mainPanel,b),null!=b&&(f=b.getFullPath());null!=f&&this.runScriptNow("load "+(a?"APPEND ":"")+'"'+f+'"'+(null==g?"":";"+g))},"~B,~B,~S,~S");c(c$,"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(c$,"selectPanel",function(a,b){var c=
-1;if(null!=b){for(var g=b.size();0<=--g;){var f=b.get(g).jsvp;f===a?c=g:(f.setEnabled(!1),f.setFocusable(!1),f.getPanelData().closeAllDialogsExcept(JSV.common.Annotation.AType.NONE))}this.markSelectedPanels(b,c)}return c},"JSV.api.JSVPanel,JU.Lst");c(c$,"checkAutoIntegrate",function(){this.autoIntegrate&&this.pd().integrateAll(this.parameters)});c(c$,"parseInitScript",function(a){null==a&&(a="");a=new JSV.common.ScriptTokenizer(a,!0);for(JU.Logger.debugging&&JU.Logger.info("Running in DEBUG mode");a.hasMoreTokens();){var b=
a.nextToken(),c=new JSV.common.ScriptTokenizer(b,!1),g=c.nextToken();g.equalsIgnoreCase("SET")&&(g=c.nextToken());var g=g.toUpperCase(),f=JSV.common.ScriptToken.getScriptToken(g),b=JSV.common.ScriptToken.getValue(f,c,b);JU.Logger.info("KEY-> "+g+" 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)+"__";g=null;self.Jmol&&(g=Jmol._applets[b]);
this.html5Applet=g;break;case JSV.common.ScriptToken.AUTOINTEGRATE:this.autoIntegrate=JSV.common.Parameters.isTrue(b);break;case JSV.common.ScriptToken.COMPOUNDMENUON:break;case JSV.common.ScriptToken.APPLETREADYCALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.COORDCALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.LOADFILECALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.PEAKCALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.SYNCCALLBACKFUNCTIONNAME:this.si.siExecSetCallback(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(e){if(!z(e,Exception))throw e;}}},"~S");c(c$,"getSolutionColorStr",function(a){a=JU.CU.colorPtFromInt(this.getSolutionColor(a),null);return I(a.x)+","+I(a.y)+","+I(a.z)},"~B");c(c$,"checkCommandLineForTip",function(a,b,c){var g="\u0001"==a;if(!g&&"\x00"!=a){if("\t"!=a&&("\n"==a||32>a.charCodeAt(0)||126<a.charCodeAt(0)))return null;b+=Character.isISOControl(a)?"":""+a}var f;0<=b.indexOf(";")&&(b=b.substring(b.lastIndexOf(";")+1));for(var e=null;b.startsWith(" ");)b=
b.substring(1);if(0==b.length&&!g)f="";else{f=JSV.common.ScriptToken.getTokens(b);if(0==f.size()&&!g)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:g=f.get(0);f=g.getTip();try{f=0<=f.indexOf("TRUE")?" ("+this.parameters.getBoolean(g)+")":0<=g.name().indexOf("COLOR")?" ("+JU.CU.toRGBHexString(this.parameters.getElementColor(g))+")":""}catch(k){if(z(k,Exception))return null;throw k;}if("\t"==
a||b||!c){f=g.name()+" "+g.getTip()+f+" "+g.getDescription();"\t"==a&&(e=g.name()+" ");break}f=g.name()+" "+f;break;default:f=JSV.common.ScriptToken.getNameList(f)}}c?this.si.writeStatus(f):e=f;return e},"~S,~S,~B");c(c$,"checkScript",function(a){return this.checkCommandLineForTip("\x00",a,!1)},"~S");c(c$,"execHelp",function(a){var b=this.checkCommandLineForTip("\u0001",a,!1);if(0>b.indexOf(" ")&&0<b.indexOf(",")){var c=JU.PT.split(b,",");java.util.Arrays.sort(c);for(var b="",g=0;g<c.length;g++)var f=
JSV.common.ScriptToken.getScriptToken(c[g]),b=b+(c[g]+" "+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");D(c$,"sourceLabel","Original...","FILE_OPEN_OK",0,"FILE_OPEN_ALREADY",-1,"FILE_OPEN_ERROR",-3,"FILE_OPEN_NO_DATA",-4,"OVERLAY_DIALOG",-1,"OVERLAY_OFFSET",99,"PORTRAIT",1,"PAGE_EXISTS",0,"NO_SUCH_PAGE",1,"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"',
"NLEVEL_MAX",100,"isJS",!1,"isSwingJS",!1,"jmolObject",null)});r("JSV.common");s(["JSV.common.Annotation","$.Coordinate"],"JSV.common.Measurement",null,function(){c$=q(function(){this.pt2=null;this.value=0;n(this,arguments)},JSV.common,"Measurement",JSV.common.Annotation);H(c$,function(){this.pt2=new JSV.common.Coordinate});c(c$,"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(c$,"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(c$,"setPt2",function(a,b){this.spec=a;b&&this.setPt2(this.getXVal(),this.getYVal());return this},"JSV.common.Spectrum,~B");c(c$,"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(c$,"getSpectrum",function(){return this.spec});c(c$,"setValue",function(a){this.value=
a;this.text=this.spec.setMeasurementText(this)},"~N");c(c$,"getValue",function(){return this.value});c(c$,"getXVal2",function(){return this.pt2.getXVal()});c(c$,"getYVal2",function(){return this.pt2.getYVal()});e(c$,"addSpecShift",function(a){this.setXVal(this.getXVal()+a);this.pt2.setXVal(this.pt2.getXVal()+a)},"~N");c(c$,"setYVal2",function(a){this.pt2.setYVal(a)},"~N");c(c$,"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(c$,"toString",function(){return"["+this.getXVal()+","+this.pt2.getXVal()+"]"});D(c$,"PT_XY1",1,"PT_XY2",2,"PT_INT_LABEL",-5,"PT_ON_LINE1",-1,"PT_ON_LINE2",-2,"PT_ON_LINE",0)});r("JSV.common");s(["JU.Lst","JSV.api.AnnotationData"],"JSV.common.MeasurementData",["JU.AU","$.DF","JSV.common.Annotation","$.Parameters"],function(){c$=q(function(){this.units=this.spec=this.type=null;this.precision=0;this.myParams=null;this.isON=!0;this.key=null;n(this,arguments)},JSV.common,"MeasurementData",
JU.Lst,JSV.api.AnnotationData);m(c$,function(a,b){y(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(c$,"getMeasurements",function(){return this});e(c$,"getAType",function(){return this.type});e(c$,"getState",function(){return this.isON});e(c$,"setState",function(a){this.isON=a},"~B");c(c$,"setMeasurements",function(){},"JU.Lst");e(c$,"getParameters",function(){return this.myParams});
c(c$,"getDataHeader",function(){return JSV.common.MeasurementData.HEADER});c(c$,"getMeasurementListArray",function(a){this.units=a;var b=this.getMeasurementListArrayReal(a),c=this.spec.isNMR()?4:2;a=this.spec.isHNMR()&&a.equals("ppm")?4:2;for(var g=Array(this.size()),f=this.size();0<=--f;)g[f]=x(-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 g},"~S");c(c$,"getMeasurementListArrayReal",function(a){a=this.spec.isNMR()&&a.equalsIgnoreCase("HZ");
for(var b=JU.AU.newDouble2(this.size()),c=0,g=this.size();0<=--g;){var f=this.get(g).getValue();a&&(f*=this.spec.getObservedFreq());b[c++]=N(-1,[this.get(g).getXVal(),this.get(g).getXVal2(),f])}return b},"~S");c$.checkParameters=c(c$,"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(c$,"getSpectrum",function(){return this.spec});e(c$,"getData",function(){return this});c(c$,"clear",function(a,b){for(var c=this.size();0<=--c;){var g=this.get(c);(0==g.text.length||g.overlaps(a,b))&&this.removeItemAt(c)}},"~N,~N");c(c$,"find",function(a){for(var b=this.size();0<=--b;)if(this.get(b).overlaps(a,a))return b;return-1},"~N");e(c$,"setSpecShift",function(a){for(var b=this.size();0<=--b;){var c=this.get(b),g=c.getXVal()+a;c.setXVal(g);c.setValue(g);c.text=JU.DF.formatDecimalDbl(g,this.precision)}},
"~N");e(c$,"getGraphSetKey",function(){return this.key});e(c$,"setGraphSetKey",function(a){this.key=a},"~S");e(c$,"isVisible",function(){return!0});c(c$,"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(c$,"isDialog",function(){return!1});c$.HEADER=c$.prototype.HEADER=x(-1,["","start","end","value"])});r("JSV.common");s(["java.lang.Enum","J.api.EventManager","java.util.Hashtable",
"JU.Lst"],"JSV.common.PanelData","java.lang.Boolean $.Double JU.CU JSV.common.Annotation $.Coordinate $.GraphSet $.JSVFileManager $.JSVersion $.JSViewer $.MeasurementData $.Parameters $.PeakPickEvent $.ScriptToken $.Spectrum $.SubSpecChangeEvent $.ZoomEvent JSV.dialog.JSVDialog J.api.GenericGraphics JU.Font $.Logger".split(" "),function(){c$=q(function(){this.graphSets=this.jsvp=this.options=this.currentGraphSet=this.listeners=this.vwr=this.g2d0=this.g2d=null;this.currentSplitPoint=0;this.coordsClicked=
this.coordClicked=this.thisWidget=null;this.isIntegralDrag=this.drawXAxisLeftToRight=this.shiftPressed=this.ctrlPressed=!1;this.xAxisLeftToRight=!0;this.scalingFactor=1;this.integralShiftMode=0;this.left=60;this.right=50;this.coordStr="";this.startupPinTip="Click to set.";this.title=null;this.endIndex=this.startIndex=this.thisHeight=this.thisWidth=this.nSpectra=this.clickCount=0;this.titleFontName=this.displayFontName=this.viewTitle=this.commonFilePath=null;this.isPrinting=!1;this.doReset=!0;this.printingFontName=
null;this.printGraphPosition="default";this.isLinked=this.display1D=this.titleDrawn=!1;this.spectra=this.printJobTitle=null;this.taintedAll=!0;this.testingJavaScript=!1;this.mouseState=this.currentFont=null;this.peakTabsOn=this.titleOn=this.gridOn=!1;this.mouseY=this.mouseX=0;this.linking=!1;this.xPixelClicked=0;this.gMain=this.optionsSaved=this.bgcolor=this.BLACK=this.zoomBoxColor2=this.zoomBoxColor=this.highlightColor=this.unitsColor=this.titleColor=this.scaleColor=this.plotAreaColor=this.peakTabColor=
this.integralPlotColor=this.gridColor=this.coordinatesColor=null;n(this,arguments)},JSV.common,"PanelData",null,J.api.EventManager);H(c$,function(){this.listeners=new JU.Lst;this.options=new java.util.Hashtable});m(c$,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(c$,"addListener",function(a){this.listeners.contains(a)||this.listeners.addLast(a)},"JSV.api.PanelListener");c(c$,"getCurrentGraphSet",function(){return this.currentGraphSet});c(c$,"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(c$,"setViewTitle",function(a){this.viewTitle=a},"~S");c(c$,"getViewTitle",
function(){return null==this.viewTitle?this.getTitle():this.viewTitle});c(c$,"getInfo",function(a,b){var c=new java.util.Hashtable,g=null;if(a)return this.currentGraphSet.getInfo(b,this.getCurrentSpectrumIndex());var f=this.options.entrySet();if("".equals(b)){for(var g="type title nSets ",e,f=f.iterator();f.hasNext()&&((e=f.next())||1);)g+=e.getKey().name()+" ";c.put("KEYS",g)}else{for(f=f.iterator();f.hasNext()&&((e=f.next())||1);)JSV.common.Parameters.putInfo(b,c,e.getKey().name(),e.getValue());
JSV.common.Parameters.putInfo(b,c,"type",this.getSpectrumAt(0).getDataType());JSV.common.Parameters.putInfo(b,c,"title",this.title);JSV.common.Parameters.putInfo(b,c,"nSets",Integer.$valueOf(this.graphSets.size()))}g=new JU.Lst;for(e=this.graphSets.size();0<=--e;)g.addLast(this.graphSets.get(e).getInfo(b,-1));c.put("sets",g);return c},"~B,~S");c(c$,"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(c$,"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(c$,"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&&w(a,Boolean)&&a===Boolean.TRUE},"JSV.common.ScriptToken");c(c$,"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(c$,"getDisplay1D",function(){return this.display1D});c(c$,"setTaintedAll",function(){this.taintedAll=!0});c(c$,"initOne",function(a){this.spectra=
new JU.Lst;this.spectra.addLast(a);this.initMany(this.spectra,0,0)},"JSV.common.Spectrum");c(c$,"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(c$,"setGraphSets",function(a){this.graphSets=JSV.common.GraphSet.createGraphSetsAndSetLinkMode(this,
this.jsvp,this.spectra,this.startIndex,this.endIndex,a);this.currentGraphSet=this.graphSets.get(0);this.title=this.getSpectrum().getTitleLabel()},"JSV.common.PanelData.LinkMode");c(c$,"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(c$,"integrateAll",function(a){for(var b=this.graphSets.size();0<=--b;)this.graphSets.get(b).integrate(-1,a)},"JSV.common.ColorParameters");c(c$,
"getNumberOfGraphSets",function(){return this.graphSets.size()});c(c$,"getTitle",function(){return this.title});c(c$,"refresh",function(){this.doReset=!0});c(c$,"addAnnotation",function(a){a=this.currentGraphSet.addAnnotation(a,this.getTitle());null!=a&&(this.title=a)},"JU.Lst");c(c$,"addPeakHighlight",function(a){for(var b=0;b<this.graphSets.size();b++)this.graphSets.get(b).addPeakHighlight(a)},"JSV.common.PeakInfo");c(c$,"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(c$,"setPlotColors",function(a){for(var b=this.graphSets.size();0<=--b;)this.graphSets.get(b).setPlotColors(a)},"~A");c(c$,"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(c$,"hasFileLoaded",function(a){for(var b=this.graphSets.size();0<=--b;)if(this.graphSets.get(b).hasFileLoaded(a))return!0;return!1},"~S");c(c$,"clearAllView",function(){for(var a=this.graphSets.size();0<=--a;)this.graphSets.get(a).resetViewCompletely()});c(c$,"drawGraph",function(a,b,c,e,f,h){var k;this.gMain=a;this.display1D=!this.isLinked&&this.getBoolean(JSV.common.ScriptToken.DISPLAY1D);var j=40,l=50,p=this.isPrinting||
this.doReset||this.thisWidth!=e||this.thisHeight!=f;p&&this.setTaintedAll();this.taintedAll&&this.g2d.fillBackground(c,this.bgcolor);b!==a&&(this.g2d.fillBackground(b,null),a!==c&&this.g2d.fillBackground(a,null),this.g2d.setStrokeBold(a,!1));this.isPrinting?(j*=3,l*=3,this.scalingFactor=10,k=!1):(this.scalingFactor=1,k=this.getBoolean(JSV.common.ScriptToken.COORDINATESON),this.titleOn=this.getBoolean(JSV.common.ScriptToken.TITLEON),this.gridOn=this.getBoolean(JSV.common.ScriptToken.GRIDON),this.peakTabsOn=
this.getBoolean(JSV.common.ScriptToken.PEAKTABSON));var m=this.getBoolean(JSV.common.ScriptToken.POINTSONLY);this.titleDrawn=this.doReset=!1;this.thisWidth=e;this.thisHeight=f;for(var n=this.graphSets.size();0<=--n;)this.graphSets.get(n).drawGraphSet(a,b,c,e,f,this.left,this.right,j,l,p,this.taintedAll,m);this.titleOn&&(!this.titleDrawn&&this.taintedAll)&&this.drawTitle(a,f*this.scalingFactor,e*this.scalingFactor,this.getDrawTitle(this.isPrinting));k&&null!=this.coordStr&&this.drawCoordinates(b,j,
this.thisWidth-this.right,j-20);h&&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");c(c$,"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(c$,"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(c$,"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(c$,"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(c$,"drawTitle",function(a,b,c,e){e=e.$replace("\n",
" ");var f=this.getFont(a,c,this.isPrinting||this.getBoolean(JSV.common.ScriptToken.TITLEBOLDON)?1:0,14,!0),h=f.stringWidth(e);h>c&&(f=v(14*c/h),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));this.g2d.drawString(a,e,this.isPrinting?this.left*this.scalingFactor:5,b-v(f.getHeight()*(this.isPrinting?2:0.5)))},"~O,~N,~N,~S");c(c$,"setCurrentFont",function(a){this.currentFont=
a},"JU.Font");c(c$,"getFontHeight",function(){return this.currentFont.getAscent()});c(c$,"getStringWidth",function(a){return this.currentFont.stringWidth(a)},"~S");c(c$,"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(c$,"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(c$,"scaleSelectedBy",function(a){for(var b=this.graphSets.size();0<=--b;)this.graphSets.get(b).scaleSelectedBy(a)},"~N");c(c$,"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(c$,"jumpToSpectrum",function(a){a=this.currentGraphSet.getSpectrumIndex(a);this.jumpToSpectrumIndex(a,!0)},"JSV.common.Spectrum");c(c$,"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(c$,"splitStack",function(a){this.currentGraphSet.splitStack(a)},"~B");c(c$,"getNumberOfSpectraInCurrentSet",function(){return this.currentGraphSet.nSpectra});c(c$,"getSourceID",function(){var a=this.getSpectrum().sourceID;return null==a?this.getSpectrumAt(0).sourceID:a});c(c$,"getStartingPointIndex",function(a){return this.currentGraphSet.viewData.getStartingPointIndex(a)},"~N");c(c$,"getEndingPointIndex",function(a){return this.currentGraphSet.viewData.getEndingPointIndex(a)},
"~N");c(c$,"haveSelectedSpectrum",function(){return this.currentGraphSet.haveSelectedSpectrum()});c(c$,"getShowAnnotation",function(a){return this.currentGraphSet.getShowAnnotation(a,-1)},"JSV.common.Annotation.AType");c(c$,"showAnnotation",function(a,b){this.currentGraphSet.setShowAnnotation(a,b)},"JSV.common.Annotation.AType,Boolean");c(c$,"setYStackOffsetPercent",function(a){this.currentGraphSet.yStackOffsetPercent=a},"~N");c(c$,"setSpectrum",function(a,b){this.currentGraphSet.setSpectrum(a,b)},
"~N,~B");c(c$,"getSpectrum",function(){return this.currentGraphSet.getSpectrum()});c(c$,"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(c$,"isShowAllStacked",function(){return this.currentGraphSet.showAllStacked});c(c$,"getCurrentSpectrumIndex",function(){return this.currentGraphSet.getCurrentSpectrumIndex()});
c(c$,"getSpectrumAt",function(a){return null==this.currentGraphSet?null:this.currentGraphSet.getSpectrumAt(a)},"~N");c(c$,"addHighlight",function(a,b,c,e,f,h,k,j){(null==a?this.currentGraphSet:a).addHighlight(b,c,e,this.g2d.getColor4(f,h,k,j))},"JSV.common.GraphSet,~N,~N,JSV.common.Spectrum,~N,~N,~N,~N");c(c$,"removeHighlight",function(a,b){this.currentGraphSet.removeHighlight(a,b)},"~N,~N");c(c$,"removeAllHighlights",function(){this.currentGraphSet.removeAllHighlights()});c(c$,"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(c$,"resetView",function(){this.currentGraphSet.resetView()});c(c$,"previousView",function(){this.currentGraphSet.previousView()});c(c$,"nextView",function(){this.currentGraphSet.nextView()});c(c$,"getSelectedIntegral",function(){return this.currentGraphSet.getSelectedIntegral()});c(c$,"advanceSubSpectrum",function(a){this.currentGraphSet.advanceSubSpectrum(a)},
"~N");c(c$,"setSelectedIntegral",function(a){this.currentGraphSet.setSelectedIntegral(a)},"~N");c(c$,"scaleYBy",function(a){this.currentGraphSet.scaleYBy(a)},"~N");c(c$,"toPeak",function(a){this.currentGraphSet.toPeak(a)},"~N");c(c$,"getClickedCoordinate",function(){return this.coordClicked});c(c$,"getPickedCoordinates",function(a,b){return JSV.common.Coordinate.getPickedCoordinates(this.coordsClicked,this.coordClicked,a,b)},"JSV.common.Coordinate,JSV.common.Coordinate");c(c$,"shiftSpectrum",function(a,
b,c){return this.currentGraphSet.shiftSpectrum(a,b,c)},"~N,~N,~N");c(c$,"findX",function(a,b){this.currentGraphSet.setXPointer(a,b)},"JSV.common.Spectrum,~N");c(c$,"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(c$,"isCurrentGraphSet",function(a){return a===this.currentGraphSet},"JSV.common.GraphSet");c(c$,"repaint",function(){this.jsvp.doRepaint(!1)});c(c$,"setToolTipText",function(a){this.jsvp.setToolTipText(a)},
"~S");c(c$,"setHighlightColor",function(a){this.setColor(JSV.common.ScriptToken.HIGHLIGHTCOLOR,a)},"javajs.api.GenericColor");c(c$,"getInput",function(a,b,c){return this.jsvp.getInput(a,b,c)},"~S,~S,~S");c(c$,"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,this.jsvp.getApiPlatform(),a)},"~O,~N,~N,~N,~B");c(c$,"notifySubSpectrumChange",
function(a,b){this.notifyListeners(new JSV.common.SubSpecChangeEvent(a,null==b?null:b.getTitleLabel()))},"~N,JSV.common.Spectrum");c(c$,"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(c$,"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(c$,"escapeKeyPressed",function(a){this.currentGraphSet.escapeKeyPressed(a)},"~B");c(c$,"hasFocus",function(){return this.jsvp.hasFocus()});c(c$,"isMouseUp",function(){return this.mouseState===JSV.common.PanelData.Mouse.UP});c(c$,"doMouseMoved",function(a,b){this.mouseX=a;this.mouseY=b;this.mouseState=JSV.common.PanelData.Mouse.UP;this.clickCount=0;var c=JSV.common.GraphSet.findGraphSet(this.graphSets,a,b);null!=c&&c.mouseMovedEvent(a,b)},"~N,~N");c(c$,"doMousePressed",function(a,b){this.mouseState=
JSV.common.PanelData.Mouse.DOWN;var c=JSV.common.GraphSet.findGraphSet(this.graphSets,a,b);null!=c&&(this.setCurrentGraphSet(c,b),this.clickCount=++this.clickCount%3,this.currentGraphSet.mousePressedEvent(a,b,this.clickCount))},"~N,~N");c(c$,"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(c$,"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(c$,"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(c$,"hasCurrentMeasurements",function(a){return this.currentGraphSet.hasCurrentMeasurement(a)},"JSV.common.Annotation.AType");c(c$,"getDialog",function(a){return this.currentGraphSet.getDialog(a,-1)},"JSV.common.Annotation.AType");c(c$,"addDialog",function(a,b,c){this.currentGraphSet.addDialog(a,b,c)},"~N,JSV.common.Annotation.AType,JSV.api.AnnotationData");c(c$,"getPeakListing",function(a,b){null!=a&&
this.currentGraphSet.getPeakListing(-1,a,!0);this.currentGraphSet.setPeakListing(b)},"JSV.common.Parameters,Boolean");c(c$,"checkIntegral",function(a,b){this.currentGraphSet.checkIntegralParams(a,b)},"JSV.common.Parameters,~S");c(c$,"setIntegrationRatios",function(a){this.currentGraphSet.setIntegrationRatios(a)},"~S");c(c$,"getView",function(){return this.currentGraphSet.getCurrentView()});c(c$,"closeAllDialogsExcept",function(a){for(var b=this.graphSets.size();0<=--b;)this.graphSets.get(b).closeDialogsExcept(a)},
"JSV.common.Annotation.AType");c(c$,"removeDialog",function(a){this.currentGraphSet.removeDialog(a)},"JSV.dialog.JSVDialog");c(c$,"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(!z(c,Exception))throw c;}}});c(c$,"getDrawTitle",function(a){var b=null;a?b=this.printJobTitle:1==this.nSpectra?
b=this.getSpectrum().getPeakTitle():null!=this.viewTitle?(null!=this.currentGraphSet.getTitle(!1)&&(b=this.getSpectrum().getPeakTitle()),null==b&&(b=this.viewTitle)):b=this.jsvp.getTitle().trim();0<=b.indexOf("\n")&&(b=b.substring(0,b.indexOf("\n")).trim());return b},"~B");c(c$,"getPrintJobTitle",function(a){var b=null;1==this.nSpectra?b=this.getSpectrum().getTitle():null!=this.viewTitle?(1==this.graphSets.size()&&(b=this.currentGraphSet.getTitle(a)),null==b&&(b=this.viewTitle)):b=this.jsvp.getTitle().trim();
0<=b.indexOf("\n")?b=b.substring(0,b.indexOf("\n")).trim():b.startsWith("$")&&(b=b.substring(1));return b},"~B");c(c$,"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(c$,"doZoomLinked",function(a,b,c,e,f,h){if(!this.linking){this.linking=
!0;for(var k=a.getSpectrumAt(0),j=this.graphSets.size();0<=--j;){var l=this.graphSets.get(j);l!==a&&JSV.common.Spectrum.areXScalesCompatible(k,this.graphSets.get(j).getSpectrumAt(0),!1,!0)&&l.doZoom(b,0,c,0,h,!1,f,!1,e)}this.linking=!1}},"JSV.common.GraphSet,~N,~N,~B,~B,~B");c(c$,"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(c$,"setlinkedXMove",function(a,b,c){if(!this.linking){this.linking=!0;for(var e=a.getSpectrum(),f=this.graphSets.size();0<=--f;){var h=this.graphSets.get(f);h!==a&&JSV.common.Spectrum.areXScalesCompatible(e,this.graphSets.get(f).getSpectrum(),!1,!0)&&null==h.imageView&&(c?h.setXPixelMovedTo(1.7976931348623157E308,b,0,0):h.setXPixelMovedTo(b,1.7976931348623157E308,0,0))}this.linking=!1}},"JSV.common.GraphSet,~N,~B");c(c$,"set2DCrossHairsLinked",
function(a,b,c,e){for(var f=this.graphSets.size();0<=--f;){var h=this.graphSets.get(f);h!==a&&h.set2DXY(b,c,e)}},"JSV.common.GraphSet,~N,~N,~B");c(c$,"dialogsToFront",function(a){this.currentGraphSet.dialogsToFront(a)},"JSV.common.Spectrum");c(c$,"setColor",function(a,b){null!=b&&this.options.put(a,JU.CU.toRGBHexString(b));switch(a){case JSV.common.ScriptToken.COORDINATESCOLOR:this.coordinatesColor=b;return;case JSV.common.ScriptToken.HIGHLIGHTCOLOR:this.highlightColor=b;255==this.highlightColor.getOpacity255()&&
this.highlightColor.setOpacity255(150);return;case JSV.common.ScriptToken.ZOOMBOXCOLOR:this.zoomBoxColor=b;return;case JSV.common.ScriptToken.ZOOMBOXCOLOR2:this.zoomBoxColor2=b;return;case JSV.common.ScriptToken.BACKGROUNDCOLOR:this.jsvp.setBackgroundColor(this.bgcolor=b);break;case JSV.common.ScriptToken.GRIDCOLOR:this.gridColor=b;break;case JSV.common.ScriptToken.INTEGRALPLOTCOLOR:this.integralPlotColor=b;break;case JSV.common.ScriptToken.PEAKTABCOLOR:this.peakTabColor=b;break;case JSV.common.ScriptToken.PLOTCOLOR:for(var c=
this.graphSets.size();0<=--c;)this.graphSets.get(c).setPlotColor0(b);break;case JSV.common.ScriptToken.PLOTAREACOLOR:this.plotAreaColor=b;break;case JSV.common.ScriptToken.SCALECOLOR:this.scaleColor=b;break;case JSV.common.ScriptToken.TITLECOLOR:this.titleColor=b;break;case JSV.common.ScriptToken.UNITSCOLOR:this.unitsColor=b;break;default:JU.Logger.warn("AwtPanel --- unrecognized color: "+a);return}this.taintedAll=!0},"JSV.common.ScriptToken,javajs.api.GenericColor");c(c$,"getColor",function(a){switch(a){default:return JU.Logger.error("awtgraphset missing color "+
a),this.BLACK;case JSV.common.ScriptToken.ZOOMBOXCOLOR2:return this.zoomBoxColor2;case JSV.common.ScriptToken.ZOOMBOXCOLOR:return this.zoomBoxColor;case JSV.common.ScriptToken.HIGHLIGHTCOLOR:return this.highlightColor;case JSV.common.ScriptToken.INTEGRALPLOTCOLOR:return this.integralPlotColor;case JSV.common.ScriptToken.GRIDCOLOR:return this.gridColor;case JSV.common.ScriptToken.PEAKTABCOLOR:return this.peakTabColor;case JSV.common.ScriptToken.PLOTAREACOLOR:return this.plotAreaColor;case JSV.common.ScriptToken.SCALECOLOR:return this.scaleColor;
case JSV.common.ScriptToken.TITLECOLOR:return this.titleColor;case JSV.common.ScriptToken.UNITSCOLOR:return this.unitsColor}},"JSV.common.ScriptToken");c(c$,"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),h=this.getSpectrumAt(e);this.title=h.getTitle();c&&(this.title=JSV.common.JSVFileManager.getTagName(h.getFilePath())+" - "+
this.title);h=this.getCurrentPlotColor(e);f[0]=new Integer(e+1);f[1]=h;f[2]=" "+this.title;b[e]=f}return b});c(c$,"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(c$,"getCurrentPlotColor",function(a){return this.currentGraphSet.getPlotColor(a)},"~N");c(c$,"setPrint",function(a,b){null==a?(this.options.putAll(this.optionsSaved),this.optionsSaved=null):(this.printJobTitle=a.title,this.printingFontName=b,this.printGraphPosition=a.position,this.optionsSaved=new java.util.Hashtable,this.optionsSaved.putAll(this.options),this.gridOn=a.showGrid,this.titleOn=
a.showTitle,this.setBoolean(JSV.common.ScriptToken.XSCALEON,a.showXScale),this.setBoolean(JSV.common.ScriptToken.XUNITSON,a.showXScale),this.setBoolean(JSV.common.ScriptToken.YSCALEON,a.showYScale),this.setBoolean(JSV.common.ScriptToken.YUNITSON,a.showYScale))},"JSV.common.PrintLayout,~S");c(c$,"setDefaultPrintOptions",function(a){a.showGrid=this.gridOn;a.showXScale=this.getBoolean(JSV.common.ScriptToken.XSCALEON);a.showYScale=this.getBoolean(JSV.common.ScriptToken.YSCALEON);a.showTitle=this.titleOn},
"JSV.common.PrintLayout");c(c$,"showDialog",function(a){var b=this.getDialog(a);this.closeAllDialogsExcept(a);if(null!=b&&w(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(c$,"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(c$,"print",function(a,b,c,e,f,h,k,j,l){this.g2d=this.g2d0;if(0==l)return this.isPrinting=!0,l=!1,w(a,J.api.GenericGraphics)&&(this.g2d=a,a=this.gMain),
this.printGraphPosition.equals("default")?j?(b=450,c=280):(b=280,c=450):this.printGraphPosition.equals("fit to page")?l=!0:j?(b=450,c=280,e=v(v(k-c)/2),f=v(v(h-b)/2)):(b=280,c=450,f=v(v(k-280)/2),e=v(v(h-450)/2)),this.g2d.translateScale(a,e,f,0.1),this.setTaintedAll(),this.drawGraph(a,a,a,v(c),v(b),l),this.isPrinting=!1,0;this.isPrinting=!1;return 1},"~O,~N,~N,~N,~N,~N,~N,~B,~N");e(c$,"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(c$,"keyReleased",function(a){this.isPrinting||this.checkKeyControl(a,!1)},"~N");e(c$,"keyTyped",function(a,b){if(this.isPrinting)return!1;switch(a){case "n":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(c$,"mouseAction",function(a,b,c,e,f,h){if(!this.isPrinting)switch(a){case 4:if(!this.checkMod(h,16))break;this.doMousePressed(c,e);break;case 5:this.doMouseReleased(c,e,this.checkMod(h,16));this.setTaintedAll();this.repaint();break;case 1:this.doMouseDragged(c,e);this.repaint();break;case 0:this.jsvp.getFocusNow(!1);if(0!=(h&28)){this.doMouseDragged(c,e);this.repaint();break}this.doMouseMoved(c,e);null!=this.coordStr&&
this.repaint();break;case 2:if(this.checkMod(h,4)){this.jsvp.showMenu(c,e);break}this.ctrlPressed=!1;this.doMouseClicked(c,e,this.updateControlPressed(h))}},"~N,~N,~N,~N,~N,~N");c(c$,"checkMod",function(a,b){return(a&b)==b},"~N,~N");c(c$,"checkKeyControl",function(a,b){switch(a){case 17:case 157:this.ctrlPressed=b;break;case 16:this.shiftPressed=b}},"~N,~B");c(c$,"updateControlPressed",function(a){return this.ctrlPressed=(new Boolean(this.ctrlPressed|(this.checkMod(a,2)||this.checkMod(a,20)))).valueOf()},
"~N");e(c$,"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(z(f,Exception))System.out.println("pd "+this+" cannot focus");else throw f;}},"~N,~N,~N,~B");c(c$,"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(c$,"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(c$,"closeSpectrum",function(){this.vwr.close("views");this.vwr.close(this.getSourceID());this.vwr.execView("*",!0)});B(self.c$);c$=t(JSV.common.PanelData,"LinkMode",Enum);c$.getMode=c(c$,"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");k(c$,"ALL",0,[]);k(c$,"NONE",1,[]);k(c$,"AB",2,[]);k(c$,"ABC",3,[]);c$=A();B(self.c$);c$=t(JSV.common.PanelData,"Mouse",Enum);k(c$,"UP",0,[]);k(c$,"DOWN",1,[]);c$=A();D(c$,"defaultPrintHeight",450,"defaultPrintWidth",280,"topMargin",40,"bottomMargin",50,"leftMargin",60,"rightMargin",50)});r("JSV.common");s(null,"JSV.common.PanelNode",
["JU.SB","JSV.common.Parameters"],function(){c$=q(function(){this.legend=this.id=this.jsvp=this.fileName=this.source=this.treeNode=null;this.isSimulation=this.isView=this.isSelected=!1;this.frameTitle=null;n(this,arguments)},JSV.common,"PanelNode");m(c$,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(c$,"setTreeNode",function(a){this.treeNode=a},"JSV.api.JSVTreeNode");c(c$,"getTreeNode",function(){return this.treeNode});c(c$,"dispose",function(){this.source.dispose();null!=this.jsvp&&this.jsvp.dispose();this.legend=this.jsvp=this.source=null});c(c$,"pd",function(){return this.jsvp.getPanelData()});c(c$,"getSpectrum",function(){return this.pd().getSpectrum()});c(c$,"setLegend",function(a){null!=this.legend&&this.legend.dispose();return this.legend=a},"JSV.dialog.JSVDialog");e(c$,"toString",function(){return(null==
this.id?"":this.id+": ")+(null==this.frameTitle?this.fileName:this.frameTitle)});c$.findSourceByNameOrId=c(c$,"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");c$.findNodeById=c(c$,"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");c$.findNode=c(c$,"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");c$.getSpectrumListAsString=c(c$,"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");c$.isOpen=c(c$,"isOpen",function(a,b){if(null!=b)for(var c=a.size();0<=--c&&!a.get(c).source.matchesFilePath(b)&&
!b.equals(a.get(c).frameTitle););return-1},"JU.Lst,~S");c(c$,"setFrameTitle",function(a){this.frameTitle=a},"~S");c$.getLastFileFirstNode=c(c$,"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(c$,"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");s(null,"JSV.common.Parameters",["java.lang.Boolean","java.util.Hashtable","JSV.common.ScriptToken"],function(){c$=q(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;n(this,arguments)},JSV.common,"Parameters");m(c$,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(c$,"setName",function(a){this.name=a;return this},"~S");c(c$,"getBooleans",function(){return this.htBooleans});c(c$,"setBoolean",function(a,b){this.htBooleans.put(a,Boolean.$valueOf(b));return b},"JSV.common.ScriptToken,~B");c(c$,"getBoolean",function(a){return Boolean.TRUE===this.htBooleans.get(a)},"JSV.common.ScriptToken");c$.isTrue=c(c$,"isTrue",function(a){return 0==a.length||Boolean.parseBoolean(a)},
"~S");c$.getTFToggle=c(c$,"getTFToggle",function(a){return a.equalsIgnoreCase("TOGGLE")?null:JSV.common.Parameters.isTrue(a)?Boolean.TRUE:Boolean.FALSE},"~S");c(c$,"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");
c$.isMatch=c(c$,"isMatch",function(a,b){return null==a||b.equalsIgnoreCase(a)},"~S,~S");c$.putInfo=c(c$,"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");s(["JSV.common.MeasurementData"],"JSV.common.PeakData",["java.lang.Double","JU.DF","JSV.common.Coordinate","$.PeakPick"],function(){c$=q(function(){this.maxY=this.minY=this.thresh=0;n(this,arguments)},JSV.common,"PeakData",JSV.common.MeasurementData);c(c$,"getThresh",
function(){return this.thresh});e(c$,"getDataHeader",function(){return this.spec.isHNMR()?JSV.common.PeakData.HNMR_HEADER:x(-1,["peak",this.spec.getXUnits(),this.spec.getYUnits()])});e(c$,"getMeasurementListArray",function(){for(var a=Array(this.size()),b=N(-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?x(-1,[""+(e+1),JU.DF.formatDecimalDbl(c[0],2),JU.DF.formatDecimalDbl(c[1],4)]):x(-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(c$,"getMeasurementListArrayReal",function(){for(var a=N(this.size(),0),b=N(-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(c$,"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(c$,"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 h=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 k=0,j=N(-1,[e[0].getYVal(),k=e[1].getYVal(),0]),l=0;if(f)for(f=2;f<e.length;f++){var m=j[f%3]=e[f].getYVal();if(k<this.thresh&&(j[(f-2)%3]>k&&k<m)&&(k=a?JSV.common.Coordinate.parabolicInterpolation(e,f-1):e[f-1].getXVal(),k>=h||k<=c))if(k=(new JSV.common.PeakPick).setValue(k,m,this.spec,null,0),
this.addLast(k),100==++l)break;k=m}else for(f=2;f<e.length;f++){m=j[f%3]=e[f].getYVal();if(k>this.thresh&&(j[(f-2)%3]<k&&k>m)&&(k=a?JSV.common.Coordinate.parabolicInterpolation(e,f-1):e[f-1].getXVal(),k>=h&&k<=c&&(k=(new JSV.common.PeakPick).setValue(k,m,this.spec,JU.DF.formatDecimalDbl(k,b),k),this.addLast(k),100==++l)))break;k=m}}},"JSV.common.Parameters,~N,JSV.common.ScaleData");c$.HNMR_HEADER=c$.prototype.HNMR_HEADER=x(-1,"peak shift/ppm intens shift/hz diff/hz 2-diff 3-diff".split(" "))});r("JSV.common");
s(null,"JSV.common.PeakInfo",["JU.PT"],function(){c$=q(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;n(this,arguments)},JSV.common,"PeakInfo");m(c$,function(){});m(c$,function(a){this.stringInfo=a;this.type=JU.PT.getQuotedAttribute(a,"type");null==this.type&&(this.type="");this.type=this.type.toUpperCase();
var b=this.type.indexOf("/");this.type2=0>b?"":JSV.common.PeakInfo.fixType(this.type.substring(this.type.indexOf("/")+1));this.type=0<=b?JSV.common.PeakInfo.fixType(this.type.substring(0,b))+"/"+this.type2:JSV.common.PeakInfo.fixType(this.type);this.id=JU.PT.getQuotedAttribute(a,"id");this.index=JU.PT.getQuotedAttribute(a,"index");this.file=JU.PT.getQuotedAttribute(a,"file");System.out.println("pi file="+this.file);this.filePathForwardSlash=null==this.file?null:this.file.$replace("\\","/");this.model=
JU.PT.getQuotedAttribute(a,"model");a.contains('baseModel=""')||(this.atoms=JU.PT.getQuotedAttribute(a,"atoms"));this.atomKey=","+this.atoms+",";this.title=JU.PT.getQuotedAttribute(a,"title");this._match=JU.PT.getQuotedAttribute(a,"_match");this.xMax=JU.PT.parseFloat(JU.PT.getQuotedAttribute(a,"xMax"));this.xMin=JU.PT.parseFloat(JU.PT.getQuotedAttribute(a,"xMin"));this.yMax=JU.PT.parseFloat(JU.PT.getQuotedAttribute(a,"yMax"));this.yMin=JU.PT.parseFloat(JU.PT.getQuotedAttribute(a,"yMin"))},"~S");c(c$,
"isClearAll",function(){return null==this.spectrum});c(c$,"getType",function(){return this.type});c(c$,"getAtoms",function(){return this.atoms});c(c$,"getXMax",function(){return this.xMax});c(c$,"getXMin",function(){return this.xMin});c(c$,"getYMin",function(){return this.yMin});c(c$,"getYMax",function(){return this.yMax});c(c$,"getX",function(){return(this.xMax+this.xMin)/2});c(c$,"getMatch",function(){return this._match});c$.fixType=c(c$,"fixType",function(a){return a.equals("HNMR")?"1HNMR":a.equals("CNMR")?
"13CNMR":a},"~S");e(c$,"toString",function(){return this.stringInfo});c(c$,"getIndex",function(){return this.index});c(c$,"getTitle",function(){return this.title});c(c$,"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(c$,"checkFileTypeModel",function(a,b,c){return a.equals(this.file)&&this.checkModel(c)&&this.type.endsWith(b)},"~S,~S,~S");c(c$,"checkTypeModel",function(a,b){return this.checkType(a)&&
this.checkModel(b)},"~S,~S");c(c$,"checkModel",function(a){return null!=a&&a.equals(this.model)},"~S");c(c$,"checkType",function(a){return a.endsWith(this.type)},"~S");c(c$,"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(c$,"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(c$,"getModel",function(){return this.model});c(c$,"getFilePath",function(){return this.file});c(c$,"autoSelectOnLoad",function(){return this.type.startsWith("GC")});c(c$,"setPixelRange",function(a,b){this.px0=a;this.px1=b},"~N,~N");c(c$,"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(c$,"getXPixel",function(){return v((this.px0+
this.px1)/2)});c$.nullPeakInfo=c$.prototype.nullPeakInfo=new JSV.common.PeakInfo});r("JSV.common");s(["JSV.common.Measurement"],"JSV.common.PeakPick",null,function(){c$=t(JSV.common,"PeakPick",JSV.common.Measurement);c(c$,"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");s(["java.util.EventObject"],"JSV.common.PeakPickEvent",
null,function(){c$=q(function(){this.peakInfo=this.coord=null;n(this,arguments)},JSV.common,"PeakPickEvent",java.util.EventObject);m(c$,function(a,b,c){y(this,JSV.common.PeakPickEvent,[a]);this.coord=b;this.peakInfo=null==c?null:c},"~O,JSV.common.Coordinate,JSV.common.PeakInfo");c(c$,"getCoord",function(){return this.coord});c(c$,"getPeakInfo",function(){return this.peakInfo});e(c$,"toString",function(){return null==this.peakInfo?null:this.peakInfo.toString()})});r("JSV.common");s(["JSV.common.Coordinate",
"$.ScriptToken"],"JSV.common.PlotWidget",null,function(){c$=q(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;n(this,arguments)},JSV.common,"PlotWidget",JSV.common.Coordinate);H(c$,function(){this.color=JSV.common.ScriptToken.PLOTCOLOR});e(c$,"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)});m(c$,function(a){y(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");c(c$,"selected",function(a,b){return this.isVisible&&5>Math.abs(a-this.xPixel0)&&5>Math.abs(b-this.yPixel0)},"~N,~N");c(c$,"setX",function(a,b){this.setXVal(a);this.xPixel0=this.xPixel1=
b},"~N,~N");c(c$,"setY",function(a,b){this.setYVal(a);this.yPixel0=this.yPixel1=b},"~N,~N");c(c$,"getValue",function(){return this.isXtype?this.getXVal():this.getYVal()});c(c$,"setEnabled",function(a){this.isEnabled=a},"~B")});r("JSV.common");c$=q(function(){this.imageableWidth=this.imageableHeight=this.paperWidth=this.paperHeight=this.imageableY=this.imageableX=0;this.layout="landscape";this.position="fit to page";this.showTitle=this.showYScale=this.showXScale=this.showGrid=!0;this.font="Helvetica";
this.paper=null;this.asPDF=!0;this.date=this.title=null;n(this,arguments)},JSV.common,"PrintLayout");H(c$,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});m(c$,function(a){null!=a&&(this.asPDF=!0,a.setDefaultPrintOptions(this))},"JSV.common.PanelData");r("JSV.common");s(null,"JSV.common.RepaintManager",["JSV.common.JSViewer"],function(){c$=q(function(){this.repaintPending=!1;this.vwr=
null;n(this,arguments)},JSV.common,"RepaintManager");m(c$,function(a){this.vwr=a},"JSV.common.JSViewer");c(c$,"refresh",function(){if(this.repaintPending)return!1;this.repaintPending=!0;var a=this.vwr.html5Applet,b=JSV.common.JSViewer.isJS&&!JSV.common.JSViewer.isSwingJS?JSV.common.JSViewer.jmolObject:null;null==b?this.vwr.selectedPanel.repaint():(b.repaint(a,!1),this.repaintDone());return!0});c(c$,"repaintDone",function(){this.repaintPending=!1;this.notify()})});r("JSV.common");s(null,"JSV.common.ScaleData",
["java.lang.Double","JSV.common.Coordinate"],function(){c$=q(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;n(this,arguments)},JSV.common,"ScaleData");H(c$,function(){this.precision=E(2,0);this.exportPrecision=E(2,0);this.steps=N(2,0);this.minorTickCounts=E(2,0)});m(c$,function(){});m(c$,function(a,b){this.startDataPointIndex=a;this.endDataPointIndex=b;this.pointCount=this.endDataPointIndex-this.startDataPointIndex+1},"~N,~N");m(c$,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(c$,"setScale",function(a,b){this.setXScale();a||(this.maxXOnScale+=this.steps[0]/2);this.setYScale(this.minY,this.maxY,!0,b)},"~B,~B");c(c$,"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(c$,"isYZeroOnScale",function(){return this.minYOnScale<this.spectrumYRef&&this.maxYOnScale>this.spectrumYRef});c(c$,"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),h=e?f/2:f/4;e=e?f/4:f/2;this.isShiftZoomedY||(this.minYOnScale=0==a?0:c?h*Math.floor(a/h):a,this.maxYOnScale=c?e*Math.ceil(1.05*b/e):b);this.firstY=0==a?0:Math.floor(a/h)*h;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)/h)&&(this.firstY+=h);c&&(this.initMinYOnScale=this.minYOnScale,this.initMaxYOnScale=this.maxYOnScale,this.initMinY=a,this.initMaxY=b)},"~N,~N,~B,~B");c(c$,"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(c$,"setXRange",function(a,b){this.minX=a;this.maxX=b;this.setXScale()},"~N,~N");c$.getXRange=c(c$,"getXRange",
function(a,b,c,e,f,h,k,j){for(var l=0,m=0,l=f;l<=h;l++)if(b[l].getXVal()>=c){k[a]=l;m=1;break}for(;++l<=h&&b[l].getXVal()<=e;)m++;j[a]=k[a]+m-1;return m},"~N,~A,~N,~N,~N,~N,~A,~A");c(c$,"setScaleParams",function(a,b,c){a=b==a?1:Math.abs(b-a)/14;var e=Math.log10(Math.abs(a));b=v(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(c$,"isInRangeX",function(a){return a>=this.minX&&a<=this.maxX},"~N");c(c$,"addSpecShift",function(a){this.specShift+=a;this.minX+=a;this.maxX+=a;this.minXOnScale+=a;this.maxXOnScale+=a;this.firstX+=a},"~N");c(c$,"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(c$,"setMinMax",function(a,b,c,e){this.minX=a;this.maxX=b;this.minY=c;this.maxY=e},"~N,~N,~N,~N");c(c$,"toX",function(a,b,c){return this.toXScaled(a,b,c,this.xFactorForScale)},"~N,~N,~B");c(c$,"toX0",function(a,b,c,e){return this.toXScaled(a,c,e,(this.maxXOnScale-this.minXOnScale)/(c-b))},"~N,~N,~N,~B");c(c$,"toXScaled",function(a,b,c,e){return c?this.maxXOnScale-(b-a)*e:this.minXOnScale+(b-a)*e},"~N,~N,~B,~N");c(c$,"toPixelX",function(a,b,c,e){return this.toPixelXScaled(a,b,c,e,
this.xFactorForScale)},"~N,~N,~N,~B");c(c$,"toPixelX0",function(a,b,c,e){return this.toPixelXScaled(a,b,c,e,(this.maxXOnScale-this.minXOnScale)/(c-b))},"~N,~N,~N,~B");c(c$,"toPixelXScaled",function(a,b,c,e,f){a=v((a-this.minXOnScale)/f);return e?b+a:c-a},"~N,~N,~N,~B,~N");c(c$,"toY",function(a,b){return this.maxYOnScale+(b-a)*this.yFactorForScale},"~N,~N");c(c$,"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(c$,"toPixelY",function(a,b){return Double.isNaN(a)?-2147483648:b-v(((a-this.spectrumYRef)*this.userYFactor+this.spectrumYRef-this.minYOnScale)/this.yFactorForScale)},"~N,~N");c(c$,"toPixelY0",function(a,b,c){return v(b+(this.maxYOnScale-a)/((this.maxYOnScale-this.minYOnScale)/(c-b)))},"~N,~N,~N");c(c$,"setXYScale",function(a,b,c){var e=this.spectrumYRef,f=this.spectrumScaleFactor,h=1!=f||this.isShiftZoomedY,k=h?this.initMinYOnScale:this.minY,j=h?this.initMaxYOnScale:this.maxY;h&&e<k&&
(e=k);h&&e>j&&(e=j);this.setYScale((k-e)/f+e,(j-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");c$.copyScaleFactors=c(c$,"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");c$.copyYScales=
c(c$,"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");c$.setDataPointIndices=c(c$,"setDataPointIndices",function(a,b,c,e,f,h){for(var k=0,j=a.size(),l=0;l<j;l++){var m=a.get(l).getXYCoords();JSV.common.ScaleData.getXRange(l,m,b,c,0,m.length-1,f,h)>=
e&&k++}return k==j},"JU.Lst,~N,~N,~N,~A,~A");c$.fixScale=c(c$,"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(c$,"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");D(c$,"NTICKS",E(-1,[2,5,10,10]));c$.LOGTICKS=c$.prototype.LOGTICKS=N(-1,[Math.log10(2),Math.log10(5),0,1])});r("JSV.common");s(["java.lang.Enum"],"JSV.common.ScriptToken",["java.util.Hashtable","JU.Lst","$.PT","$.SB","JSV.common.ScriptTokenizer"],
function(){c$=q(function(){this.description=this.tip=null;n(this,arguments)},JSV.common,"ScriptToken",Enum);c(c$,"getTip",function(){return"  "+("T"===this.tip?"TRUE/FALSE/TOGGLE":"TF"===this.tip?"TRUE or FALSE":"C"===this.tip?"COLOR":this.tip)});m(c$,function(){});m(c$,function(a){this.tip=a;this.description=""},"~S");m(c$,function(a,b){this.tip=a;this.description="-- "+b},"~S,~S");c$.getParams=c(c$,"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});c$.getScriptToken=c(c$,"getScriptToken",function(a){a=JSV.common.ScriptToken.getParams().get(a.toUpperCase());return null==a?JSV.common.ScriptToken.UNKNOWN:a},"~S");c$.getScriptTokenList=c(c$,"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");c$.getValue=c(c$,"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");c$.removeCommandName=c(c$,"removeCommandName",function(a){var b=a.indexOf(" ");return 0>b?"":a.substring(b).trim()},"~S");c$.getKey=c(c$,"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");c$.getTokens=c(c$,"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");c$.getNameList=c(c$,"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(c$,"getDescription",function(){return this.description});c$.htParams=null;k(c$,"UNKNOWN",0,[]);k(c$,"APPLETID",1,[]);k(c$,"APPLETREADYCALLBACKFUNCTIONNAME",2,[]);k(c$,"AUTOINTEGRATE",3,["TF","automatically integrate an NMR spectrum"]);k(c$,"BACKGROUNDCOLOR",4,["C","set the background color"]);k(c$,"CLOSE",5,["spectrumId or fileName or ALL or VIEWS or SIMULATIONS","close one or more views or simulations"]);
k(c$,"COMPOUNDMENUON",6,[]);k(c$,"COORDCALLBACKFUNCTIONNAME",7,[]);k(c$,"COORDINATESCOLOR",8,["C","set the color of the coordinates shown in the upper right-hand corner"]);k(c$,"COORDINATESON",9,["T","turn on or off the coordinates shown in the upper right-hand corner"]);k(c$,"DEBUG",10,["TF","turn debugging on and off"]);k(c$,"DEFAULTLOADSCRIPT",11,['"script..."',"set the script to be run after each file is loaded"]);k(c$,"DEFAULTNMRNORMALIZATION",12,["maxYvalue","set the value to be given the largest peak in an HMR spectrum"]);
k(c$,"DISPLAYFONTNAME",13,[]);k(c$,"DISPLAY1D",14,["T","turn on or off display of 1D spectra when 1D and 2D spectra are loaded"]);k(c$,"DISPLAY2D",15,["T","turn on or off display of the 2D spectrum when 1D and 2D spectra are loaded"]);k(c$,"ENABLEZOOM",16,["T","allow or disallow zooming"]);k(c$,"ENDINDEX",17,[]);k(c$,"FINDX",18,["value","move the vertical-line cursor to a specific x-axis value"]);k(c$,"GETPROPERTY",19,["[propertyName] or ALL or NAMES","get a property value or all property values as key/value pairs, or a list of names"]);
k(c$,"GETSOLUTIONCOLOR",20,[" FILL or FILLNONE or FILLALL or FILLALLNONE","estimate the solution color for UV/VIS spectra"]);k(c$,"GRIDCOLOR",21,["C","color of the grid"]);k(c$,"GRIDON",22,["T","turn the grid lines on or off"]);k(c$,"HELP",23,["[command]","get this listing or help for a specific command"]);k(c$,"HIDDEN",24,[]);k(c$,"HIGHLIGHTCOLOR",25,["C","set the highlight color"]);k(c$,"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"]);
k(c$,"INTEGRALOFFSET",27,["percent","sets the integral offset from baseline"]);k(c$,"INTEGRALRANGE",28,["percent","sets the height of the total integration"]);k(c$,"INTEGRATE",29,["","see INTEGRATION"]);k(c$,"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)"]);k(c$,"INTEGRALPLOTCOLOR",31,["C","color of the integration line"]);k(c$,"INTEGRATIONRATIOS",32,["'x:value,x:value,..'","annotate the spectrum with numbers or text at specific x values"]);
k(c$,"INTERFACE",33,["SINGLE or OVERLAY","set how multiple spectra are displayed"]);k(c$,"INVERTY",34,["","invert the Y axis"]);k(c$,"IRMODE",35,["A or T or TOGGLE","set the IR mode to absorption or transmission"]);k(c$,"JMOL",36,["...Jmol command...","send a command to Jmol (if present)"]);k(c$,"JSV",37,[]);k(c$,"LABEL",38,['x y [color and/or "text"]',"add a text label"]);k(c$,"LINK",39,["AB or ABC or NONE or ALL","synchronize the crosshair of a 2D spectrum with 1D cursors"]);k(c$,"LOAD",40,['[APPEND] "fileName" [first] [last]; use "" for current file; $H1/name or $C13/name for simulation',
"load a specturm"]);k(c$,"LOADFILECALLBACKFUNCTIONNAME",41,[]);k(c$,"LOADIMAGINARY",42,["TF","set TRUE to load imaginary NMR component"]);k(c$,"MENUON",43,[]);k(c$,"OBSCURE",44,[]);k(c$,"OVERLAY",45,[]);k(c$,"OVERLAYSTACKED",46,["TF","whether viewed spectra are shown separately, in a stack"]);k(c$,"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"]);k(c$,"PEAKCALLBACKFUNCTIONNAME",
48,[]);k(c$,"PEAKLIST",49,["[THRESHOLD=n] [INTERPOLATE=PARABOLIC or NONE]","creates a peak list based on a threshold value and parabolic or no interpolation"]);k(c$,"PEAKTABCOLOR",50,["C","sets the color of peak marks for a peak listing"]);k(c$,"PEAKTABSON",51,["T","show peak tabs for simulated spectra"]);k(c$,"PLOTAREACOLOR",52,["C","sets the color of the plot background"]);k(c$,"PLOTCOLOR",53,["C","sets the color of the graph line"]);k(c$,"PLOTCOLORS",54,["color,color,color,...","sets the colors of multiple plots"]);
k(c$,"POINTSONLY",55,["TF","show points only for all data"]);k(c$,"PRINT",56,["","prints the current spectrum"]);k(c$,"REVERSEPLOT",57,["T","reverses the x-axis of a spectrum"]);k(c$,"SCALEBY",58,["factor","multiplies the y-scale of the spectrum by a factor"]);k(c$,"SCALECOLOR",59,["C","sets the color of the x-axis and y-axis scales"]);k(c$,"SCRIPT",60,["filename.jsv","runs a script from a file"]);k(c$,"SELECT",61,["spectrumID, spectrumID,...","selects one or more spectra based on IDs"]);k(c$,"SETPEAK",
62,["xNew, xOld xNew, ?, or NONE","sets nearest peak to xOld ppm to a new value; NONE resets (1D NMR only)"]);k(c$,"SETX",63,["xNew, xOld xNew, ?, or NONE","sets an old ppm position in the spectrum to a new value; NONE resets (1D NMR only)"]);k(c$,"SHIFTX",64,["dx or NONE","shifts the x-axis of a 1D NMR spectrum by the given ppm; NONE resets (1D NMR only)"]);k(c$,"SHOWERRORS",65,["shows recent errors"]);k(c$,"SHOWINTEGRATION",66,["T","shows an integration listing"]);k(c$,"SHOWKEY",67,["T","shows a color key when multiple spectra are displayed"]);
k(c$,"SHOWMEASUREMENTS",68,["T","shows a listing of measurements"]);k(c$,"SHOWMENU",69,["displays the popup menu"]);k(c$,"SHOWPEAKLIST",70,["T","shows a listing for peak picking"]);k(c$,"SHOWPROPERTIES",71,["displays the header information of a JDX file"]);k(c$,"SHOWSOURCE",72,["displays the source JDX file associated with the selected data"]);k(c$,"SPECTRUM",73,["id","displays a specific spectrum, where id is a number 1, 2, 3... or a file.spectrum number such as 2.1"]);k(c$,"SPECTRUMNUMBER",74,["n",
"displays the nth spectrum loaded"]);k(c$,"STACKOFFSETY",75,["percent","sets the y-axis offset of stacked spectra"]);k(c$,"STARTINDEX",76,[]);k(c$,"SYNCCALLBACKFUNCTIONNAME",77,[]);k(c$,"SYNCID",78,[]);k(c$,"TEST",79,[]);k(c$,"TITLEON",80,["T","turns the title in the bottom left corner on or off"]);k(c$,"TITLEBOLDON",81,["T","makes the title bold"]);k(c$,"TITLECOLOR",82,["C","sets the color of the title"]);k(c$,"TITLEFONTNAME",83,["fontName","sets the title font"]);k(c$,"UNITSCOLOR",84,["C","sets the color of the x-axis and y-axis units"]);
k(c$,"VERSION",85,[]);k(c$,"VIEW",86,['spectrumID, spectrumID, ... Example: VIEW 3.1, 3.2  or  VIEW "acetophenone"',"creates a view of one or more spectra"]);k(c$,"XSCALEON",87,["T","set FALSE to turn off the x-axis scale"]);k(c$,"XUNITSON",88,["T","set FALSE to turn off the x-axis units"]);k(c$,"YSCALE",89,["[ALL] lowValue highValue"]);k(c$,"YSCALEON",90,["T","set FALSE to turn off the y-axis scale"]);k(c$,"YUNITSON",91,["T","set FALSE to turn off the y-axis units"]);k(c$,"WINDOW",92,[]);k(c$,"WRITE",
93,['[XY,DIF,DIFDUP,PAC,FIX,SQZ,AML,CML,JPG,PDF,PNG,SVG] "filename"',"writes a file in the specified format"]);k(c$,"ZOOM",94,["OUT or PREVIOUS or NEXT or x1,x2 or x1,y1 x2,y2","sets the zoom"]);k(c$,"ZOOMBOXCOLOR",95,[]);k(c$,"ZOOMBOXCOLOR2",96,[])});r("JSV.common");s(null,"JSV.common.ScriptTokenizer",["JU.PT"],function(){c$=q(function(){this.str=null;this.pt=-1;this.len=0;this.isCmd=!1;this.doCheck=!0;n(this,arguments)},JSV.common,"ScriptTokenizer");m(c$,function(a,b){this.str=a;this.len=a.length;
this.isCmd=b},"~S,~B");c$.nextStringToken=c(c$,"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(c$,"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)){case '"':if(b){if(this.isCmd){b=!1;continue}this.pt++;break}this.isCmd&&(b=!0);continue;case " ":if(!this.isCmd&&!b)break;continue;
case ";":case "\n":if(this.isCmd&&!b)break;continue;default:continue}break}this.doCheck=!0;return this.str.substring(a,this.pt)});c(c$,"hasMoreTokens",function(){for(;++this.pt<this.len;){switch(this.str.charAt(this.pt)){case " ":case ";":case "\n":continue}break}this.doCheck=!1;return this.pt<this.len});c(c$,"getRemainingScript",function(){return this.str.substring(this.pt)})});r("JSV.common");c$=q(function(){this.isub=0;this.title=null;n(this,arguments)},JSV.common,"SubSpecChangeEvent");m(c$,function(a,
b){this.isub=a;this.title=b},"~N,~S");c(c$,"isValid",function(){return null!=this.title});c(c$,"getSubIndex",function(){return this.isub});e(c$,"toString",function(){return this.title});r("JSV.common");s(null,"JSV.common.ViewData",["JSV.common.Coordinate","$.ScaleData"],function(){c$=q(function(){this.thisScale=this.scaleData=null;this.iThisScale=this.nSpectra=0;this.spectra=null;n(this,arguments)},JSV.common,"ViewData");c(c$,"getScaleData",function(){return this.scaleData});c(c$,"getScale",function(){return this.thisScale});
m(c$,function(a,b,c,e,f,h,k){this.nSpectra=k?1:a.size();this.scaleData=Array(this.nSpectra);for(k=0;k<this.nSpectra;k++)this.scaleData[k]=new JSV.common.ScaleData(e[k],f[k]);this.init(a,b,c,h)},"JU.Lst,~N,~N,~A,~A,~B,~B");m(c$,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(c$,"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 h=JSV.common.Coordinate.getMinX(a,this),k=JSV.common.Coordinate.getMaxX(a,this),j=JSV.common.Coordinate.getMinYUser(a,this),l=JSV.common.Coordinate.getMaxYUser(a,this);b!=c&&(j=b,l=c,j>l&&(f=j,j=l,l=f));a=a.get(0).isInverted();for(f=0;f<this.scaleData.length;f++)this.scaleData[f].setMinMax(h,k,j,l),this.scaleData[f].setScale(e,
a)},"JU.Lst,~N,~N,~B");c(c$,"newSpectrum",function(a){this.init(a,0,0,!1)},"JU.Lst");c(c$,"setXRangeForSubSpectrum",function(a){this.setXRange(0,a,this.scaleData[0].minX,this.scaleData[0].maxX,0,a.length-1)},"~A");c(c$,"setXRange",function(a,b,c,e,f,h){for(var k=0,j=0,k=f;k<=h;k++)if(f=b[k].getXVal(),f>=c){this.scaleData[a%this.scaleData.length].startDataPointIndex=k;break}for(;k<=h&&!(f=b[k].getXVal(),j++,f>=e);k++);this.scaleData[a%this.scaleData.length].endDataPointIndex=k;return j},"~N,~A,~N,~N,~N,~N");
c(c$,"getStartingPointIndex",function(a){return this.scaleData[a%this.scaleData.length].startDataPointIndex},"~N");c(c$,"getEndingPointIndex",function(a){return this.scaleData[a%this.scaleData.length].endDataPointIndex},"~N");c(c$,"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(c$,"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(c$,"resetScaleFactors",function(){for(var a=0;a<this.scaleData.length;a++)this.scaleData[a].spectrumScaleFactor=1});c(c$,"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(c$,"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");C(JSV.common,"XYScaleConverter");r("JSV.common");c$=t(JSV.common,"ZoomEvent");m(c$,function(){});r("JSV.dialog");s(["JSV.api.AnnotationData","JSV.common.Annotation"],"JSV.dialog.JSVDialog","java.lang.Double JU.DF $.PT JSV.common.IntegralData $.PeakData JSV.dialog.DialogManager".split(" "),
function(){c$=q(function(){this.myParams=this.xyData=this.combo1=this.txt3=this.txt2=this.txt1=this.jsvp=this.dialog=this.manager=this.$spec=this.vwr=this.title=this.type=this.options=this.optionKey=null;this.precision=1;this.showHideButton=this.loc=null;this.defaultVisible=this.isNumeric=this.addApplyBtn=this.addCombo1=this.addClearBtn=!1;this.tableData=this.graphSetKey=this.subType=null;this.addUnits=!1;this.unitPtr=this.formatOptions=this.unitOptions=null;this.isON=!0;this.lastNorm=1;this.iSelected=
this.iRowColSelected=-1;this.skipCreate=!1;this.iColSelected=this.iRowSelected=-1;n(this,arguments)},JSV.dialog,"JSVDialog",JSV.common.Annotation,JSV.api.AnnotationData);e(c$,"isDialog",function(){return!0});c(c$,"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(c$,"initDialog",function(){this.dialog=this.manager.getDialog(this);this.restoreDialogPosition(this.jsvp,this.getPosXY());this.dialog.setTitle(this.title);this.layoutDialog()});c(c$,"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(c$,"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(c$,"addUniqueControls",function(){},"JSV.dialog.DialogManager");e(c$,"getAType",function(){return this.type});e(c$,"getGraphSetKey",function(){return this.graphSetKey});e(c$,"setGraphSetKey",function(a){this.graphSetKey=a},"~S");e(c$,"getSpectrum",function(){return this.$spec});e(c$,"getState",function(){return this.isON});e(c$,"setState",function(a){this.isON=a},"~B");c(c$,"checkEnables",function(){var a=this.checkVisible();this.dialog.setText(this.showHideButton,a?"Hide":"Show")});c(c$,"createTable",
function(a,b,c){this.tableData=a;this.dialog.createTable(a,b,c)},"~A,~A,~A");c(c$,"setTableSelectionEnabled",function(a){this.dialog.setCellSelectionEnabled(a)},"~B");c(c$,"getParameters",function(){return this.myParams});c(c$,"showMessage",function(a,b,c){this.manager.showMessageDialog(this.dialog,a,b,c)},"~S,~S,~N");c(c$,"setThreshold",function(a){this.dialog.setText(this.txt1,this.getThreasholdText(a))},"~N");c(c$,"setComboSelected",function(a){this.dialog.setSelectedIndex(this.combo1,a)},"~N");
c(c$,"applyFromFields",function(){this.apply(null)});c(c$,"reEnable",function(){this.paramsReEnable();return this});c(c$,"dispose",function(){this.dialog.dispose()});c(c$,"setVisible",function(a){this.dialog.setVisible(a)},"~B");e(c$,"isVisible",function(){return this.dialog.isVisible()});c(c$,"selectTableRow",function(a){this.dialog.selectTableRow(a)},"~N");c(c$,"repaint",function(){this.dialog.repaint()});c(c$,"setFields",function(){switch(this.type){case JSV.common.Annotation.AType.PeakList:this.myParams=
this.xyData.getParameters(),this.setThreshold(this.myParams.peakListThreshold),this.setComboSelected(this.myParams.peakListInterpolation.equals("none")?1:0),this.createData()}});c(c$,"setFocus",function(a){this.dialog.setFocus(a)},"~B");c(c$,"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 h=f.size();0<=--h;){var k=Math.abs(a-f.get(h).getXVal());k<e&&(e=k,c=h)}e<b&&(this.selectTableRow(f.size()-2-c),this.repaint())}},"JSV.common.Coordinate,~N,~N");c(c$,"getPeakData",function(){var a=new JSV.common.PeakData(JSV.common.Annotation.AType.PeakList,this.$spec);a.setPeakList(this.myParams,this.precision,this.jsvp.getPanelData().getView());this.xyData=
a;return null});e(c$,"getData",function(){null==this.xyData&&this.createData();return this.xyData});c(c$,"setData",function(a){this.myParams=a.getParameters();this.xyData=a},"JSV.api.AnnotationData");e(c$,"setSpecShift",function(a){null!=this.xyData&&this.xyData.setSpecShift(a)},"~N");c(c$,"setType",function(a){this.type=a;switch(a){case JSV.common.Annotation.AType.Measurements:this.addUnits=!0}},"JSV.common.Annotation.AType");c(c$,"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(!z(e,
Exception))throw e;}},"~A");c(c$,"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(c$,"restoreDialogPosition",function(a,b){if(null!=a){-2147483648==b[0]&&(b[0]=0,b[1]=-20);var c=this.manager.getLocationOnScreen(a),e=a.getHeight();this.loc=E(-1,[Math.max(0,c[0]+b[0]),Math.max(0,c[1]+e+b[1])]);this.dialog.setIntLocation(this.loc)}},
"JSV.api.JSVPanel,~A");c(c$,"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(!z(c,Exception))throw c;}},"~A");c(c$,"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(c$,
"checkVisible",function(){return this.vwr.pd().getShowAnnotation(this.type)});c(c$,"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(c$,"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(c$,"eventApply",function(){switch(this.type){case JSV.common.Annotation.AType.PeakList:this.createData(),this.skipCreate=!0}this.applyFromFields()});c(c$,"eventShowHide",function(a){(this.isON=a)&&this.eventApply();this.jsvp.doRepaint(!0);this.checkEnables()},"~B");c(c$,"clear",function(){this.setState(!0);null!=this.xyData&&(this.xyData.clear(),this.applyFromFields())});c(c$,"paramsReEnable",function(){switch(this.type){case JSV.common.Annotation.AType.PeakList:this.skipCreate=
!0}this.setVisible(!0);this.isON=!0;this.applyFromFields()});c(c$,"tableCellSelect",function(a,b){System.out.println(a+" jSVDial "+b);0>a&&(a=v(this.iRowColSelected/1E3),b=this.iRowColSelected%1E3,this.iRowColSelected=-1);var c=this.tableData[a][1],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),h=Double.parseDouble(this.tableData[a+3-b][1]);this.jsvp.getPanelData().setXPointers(this.$spec,f,this.$spec,h);break;default:this.jsvp.getPanelData().findX(this.$spec,Double.parseDouble(c))}}catch(k){if(z(k,Exception))this.jsvp.getPanelData().findX(this.$spec,1E100);else throw k;}this.jsvp.doRepaint(!1);break;case JSV.common.Annotation.AType.OverlayLegend:this.jsvp.getPanelData().setSpectrum(a,
!1)}}catch(j){if(!z(j,Exception))throw j;}}},"~N,~N");c(c$,"loadData",function(){var a,b,c;switch(this.type){case JSV.common.Annotation.AType.Integration:null==this.xyData&&this.createData();this.iSelected=-1;a=this.xyData.getMeasurementListArray(null);b=this.xyData.getDataHeader();c=E(-1,[40,65,65,50]);this.createTable(a,b,c);break;case JSV.common.Annotation.AType.Measurements:if(null==this.xyData)break;a=this.xyData.getMeasurementListArray(this.dialog.getSelectedItem(this.combo1).toString());b=
this.xyData.getDataHeader();c=E(-1,[40,65,65,50]);this.createTable(a,b,c);break;case JSV.common.Annotation.AType.PeakList:null==this.xyData&&this.createData();a=this.xyData.getMeasurementListArray(null);b=this.xyData.getDataHeader();c=E(-1,[40,65,50,50,50,50,50]);this.createTable(a,b,c);this.setTableSelectionEnabled(!0);break;case JSV.common.Annotation.AType.OverlayLegend:b=x(-1,["No.","Plot Color","Title"]),a=this.vwr.selectedPanel.getPanelData().getOverlayLegendData(),c=E(-1,[30,60,250]),this.createTable(a,
b,c),this.setTableSelectionEnabled(!0)}});c(c$,"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(!z(c,Exception))throw c;}}});c(c$,"setPrecision",function(a){this.precision=this.formatOptions[a]},"~N");c(c$,"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(c$,"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");s(["java.lang.Exception"],"JSV.exception.JSVException",null,function(){c$=
t(JSV.exception,"JSVException",Exception)});r("JSV.js2d");c$=t(JSV.js2d,"Display");c$.getFullScreenDimensions=c(c$,"getFullScreenDimensions",function(a,b){b[0]=a.width;b[1]=a.height},"~O,~A");c$.hasFocus=c(c$,"hasFocus",function(){return!0},"~O");c$.requestFocusInWindow=c(c$,"requestFocusInWindow",function(){},"~O");c$.repaint=c(c$,"repaint",function(){},"~O");c$.renderScreenImage=c(c$,"renderScreenImage",function(){},"J.api.PlatformViewer,~O,~O");c$.setTransparentCursor=c(c$,"setTransparentCursor",
function(){},"~O");c$.setCursor=c(c$,"setCursor",function(){},"~N,~O");c$.prompt=c(c$,"prompt",function(a,b){var c=prompt(a,b);return null!=c?c:"null"},"~S,~S,~A,~B");c$.convertPointFromScreen=c(c$,"convertPointFromScreen",function(){},"~O,JU.P3");r("JSV.js2d");c$=t(JSV.js2d,"Image");c$.getWidth=c(c$,"getWidth",function(a){return a.imageWidth?a.imageWidth:a.width},"~O");c$.getHeight=c(c$,"getHeight",function(a){return a.imageHeight?a.imageHeight:a.height},"~O");c$.grabPixels=c(c$,"grabPixels",function(a,
b,c){var e=null;if(a._buf32)return a._buf32;e=a.getImageData(0,0,b,c).data;return JSV.js2d.Image.toIntARGB(e)},"~O,~N,~N");c$.toIntARGB=c(c$,"toIntARGB",function(a){for(var b=v(a.length/4),c=E(b,0),e=0,f=0;e<b;f++)c[e++]=a[f++]<<16|a[f++]<<8|a[f++]|4278190080;return c},"~A");c$.fromIntARGB=c(c$,"fromIntARGB",function(a,b){for(var c=b.length>>2,e=0,f=0;e<c;e++)b[f++]=a[e]>>16&255,b[f++]=a[e]>>8&255,b[f++]=a[e]&255,b[f++]=255},"~A,~A");c$.getTextPixels=c(c$,"getTextPixels",function(a,b,c,e,f,h){c.fillStyle=
"#000000";c.fillRect(0,0,e,f);c.fillStyle="#FFFFFF";c.font=b.font;c.fillText(a,0,h);return JSV.js2d.Image.grabPixels(c,e,f)},"~S,JU.Font,~O,~N,~N,~N");c$.allocateRgbImage=c(c$,"allocateRgbImage",function(a,b,c,e,f,h){null==h&&(h={width:a,height:b});h.buf32=c},"~N,~N,~A,~N,~B,~O");c$.getStaticGraphics=c(c$,"getStaticGraphics",function(a){return JSV.js2d.Image.getGraphics(a)},"~O,~B");c$.getGraphics=c(c$,"getGraphics",function(a){return a.getContext("2d")},"~O");c$.drawImage=c(c$,"drawImage",function(a,
b,c,e){this.fromIntARGB(b.buf32,b.buf8);a.putImageData(b.imgdata,c,e)},"~O,~O,~N,~N,~N,~N");r("JSV.js2d");s(["J.api.GenericFileInterface"],"JSV.js2d.JsFile",["JU.PT","JSV.common.JSVFileManager"],function(){c$=q(function(){this.fullName=this.name=null;n(this,arguments)},JSV.js2d,"JsFile",null,J.api.GenericFileInterface);c$.newFile=c(c$,"newFile",function(a){return new JSV.js2d.JsFile(a)},"~S");m(c$,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");e(c$,"getParentAsFile",function(){var a=this.fullName.lastIndexOf("/");return 0>a?null:new JSV.js2d.JsFile(this.fullName.substring(0,a))});e(c$,"getFullPath",function(){return this.fullName});e(c$,"getName",function(){return this.name});e(c$,"isDirectory",function(){return this.fullName.endsWith("/")});e(c$,"length",function(){return 0});
c$.getURLContents=c(c$,"getURLContents",function(a,b,c){try{var e=a.openConnection();null!=b?e.outputBytes(b):null!=c&&e.outputString(c);return e.getContents()}catch(f){if(z(f,Exception))return f.toString();throw f;}},"java.net.URL,~A,~S")});r("JSV.js2d");s(["JSV.api.JSVFileHelper"],"JSV.js2d.JsFileHelper",["JU.PT","JSV.common.JSViewer","JSV.js2d.JsFile"],function(){c$=q(function(){this.vwr=null;n(this,arguments)},JSV.js2d,"JsFileHelper",null,JSV.api.JSVFileHelper);m(c$,function(){});e(c$,"set",function(a){this.vwr=
a;return this},"JSV.common.JSViewer");e(c$,"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(c$,"setDirLastExported",function(a){return a},"~S");e(c$,"setFileChooser",function(){},"JSV.common.ExportType");e(c$,"showFileOpenDialog",function(a,b){JSV.common.JSViewer.jmolObject.loadFileAsynchronously(this,this.vwr.html5Applet,"?",b);return null},"~O,~A");c(c$,"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(c$,"getUrlFromDialog",function(a,b){return prompt(a,b)},"~S,~S")});r("JSV.js2d");c$=t(JSV.js2d,"JsFont");c$.newFont=c(c$,"newFont",function(a,b,c,e,f){a=a.equals("Monospaced")?"Courier":a.startsWith("Sans")?"Sans-Serif":"Serif";return(b?"bold ":"")+(c?"italic ":
"")+e+f+" "+a},"~S,~B,~B,~N,~S");c$.getFontMetrics=c(c$,"getFontMetrics",function(a,b){b.font!=a.font&&(b.font=a.font,a.font=b.font,b._fontAscent=Math.ceil(a.fontSize),b._fontDescent=Math.ceil(0.25*a.fontSize));return b},"JU.Font,~O");c$.getAscent=c(c$,"getAscent",function(a){return Math.ceil(a._fontAscent)},"~O");c$.getDescent=c(c$,"getDescent",function(a){return Math.ceil(a._fontDescent)},"~O");c$.stringWidth=c(c$,"stringWidth",function(a,b){a.fontMetrics.font=a.font;return Math.ceil(a.fontMetrics.measureText(b).width)},
"JU.Font,~S");r("JSV.js2d");s(["J.api.GenericGraphics"],"JSV.js2d.JsG2D",["JU.CU","JSV.common.JSViewer","JS.Color"],function(){c$=q(function(){this.windowHeight=this.windowWidth=0;this.inPath=this.isShifted=!1;n(this,arguments)},JSV.js2d,"JsG2D",null,J.api.GenericGraphics);m(c$,function(){});e(c$,"getColor4",function(a,b,c,e){return JS.Color.get4(a,b,c,e)},"~N,~N,~N,~N");e(c$,"getColor3",function(a,b,c){return JS.Color.get3(a,b,c)},"~N,~N,~N");e(c$,"getColor1",function(a){return JS.Color.get1(a)},
"~N");e(c$,"newGrayScaleImage",function(a,b,c,e,f){return JSV.common.JSViewer.jmolObject.newGrayScaleImage(a,b,c,e,f)},"~O,~O,~N,~N,~A");e(c$,"drawGrayScaleImage",function(a,b,c,e,f,h,k,j,l,m){a=f-c+1;h=h-e+1;l=l-k+1;m=m-j+1;f=b.w*a/l;var n=b.h*h/m;b.width=f;b.height=n;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=h+"px";q.style.left=-k*a/l+"px";q.style.top=-j*h/m+"px";q.style.width=f+"px";q.style.height=n+"px"},"~O,~O,~N,~N,~N,~N,~N,~N,~N,~N");e(c$,
"drawLine",function(a,b,c,e,f){var h=this.inPath;h||a.beginPath();a.moveTo(b,c);a.lineTo(e,f);h||a.stroke()},"~O,~N,~N,~N,~N");e(c$,"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(c$,"drawPolygon",function(a,b,c,e){this.doPoly(a,b,c,e,!1)},"~O,~A,~A,~N");c(c$,"doPoly",function(a,b,c,e,f){a.beginPath();a.moveTo(b[0],c[0]);for(var h=1;h<e;h++)a.lineTo(b[h],c[h]);f?a.fill():a.stroke()},"~O,~A,~A,~N,~B");e(c$,"drawRect",function(a,b,c,e,f){a.beginPath();
a.rect(b,c,e,f);a.stroke()},"~O,~N,~N,~N,~N");e(c$,"drawString",function(a,b,c,e){a.fillText(b,c,e)},"~O,~S,~N,~N");e(c$,"drawStringRotated",function(){},"~O,~S,~N,~N,~N");e(c$,"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(c$,"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(c$,"fillPolygon",function(a,b,c,e){this.doPoly(a,b,c,e,!0)},"~O,~A,~A,~N");e(c$,"fillRect",function(a,b,c,e,f){a.fillRect(b,c,e,f)},"~O,~N,~N,~N,~N");e(c$,"setGraphicsColor",function(a,b){var c=JU.CU.toCSSString(b);a.fillStyle=a.strokeStyle=c},"~O,javajs.api.GenericColor");e(c$,"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(c$,"setStrokeBold",function(a,b){a.lineWidth=
b?2:1},"~O,~B");e(c$,"setWindowParameters",function(a,b){this.windowWidth=a;this.windowHeight=b},"~N,~N");e(c$,"translateScale",function(){},"~O,~N,~N,~N");e(c$,"canDoLineTo",function(){return!0});e(c$,"doStroke",function(a,b){(this.inPath=b)?a.beginPath():a.stroke()},"~O,~B");e(c$,"lineTo",function(a,b,c){a.lineTo(b,c)},"~O,~N,~N")});r("JSV.js2d");s(["JSV.api.JSVPanel"],"JSV.js2d.JsPanel",["JSV.common.JSViewer","$.PanelData","JU.Font","$.Logger"],function(){c$=q(function(){this.bgcolor=this.name=
this.vwr=this.mouse=this.pd=this.apiPlatform=null;n(this,arguments)},JSV.js2d,"JsPanel",null,JSV.api.JSVPanel);e(c$,"getApiPlatform",function(){return this.apiPlatform});e(c$,"getPanelData",function(){return this.pd});c$.getEmptyPanel=c(c$,"getEmptyPanel",function(a){a=new JSV.js2d.JsPanel(a,!1);a.pd=null;return a},"JSV.common.JSViewer");c$.getPanelMany=c(c$,"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");
m(c$,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(c$,"getTitle",function(){return this.pd.getTitle()});e(c$,"dispose",function(){null!=this.pd&&this.pd.dispose();this.pd=null;this.mouse.dispose();this.mouse=null});e(c$,"setTitle",function(a){this.name=this.pd.title=a},"~S");c(c$,"setColorOrFont",function(a,b){this.pd.setColorOrFont(a,b)},"JSV.common.ColorParameters,JSV.common.ScriptToken");
e(c$,"setBackgroundColor",function(a){this.bgcolor=a},"javajs.api.GenericColor");e(c$,"getInput",function(a,b,c){b=null;b=prompt(a,c);this.getFocusNow(!0);return b},"~S,~S,~S");e(c$,"showMessage",function(a,b){JU.Logger.info(a);this.vwr.html5Applet._showStatus(a,b);this.getFocusNow(!0)},"~S,~S");e(c$,"getFocusNow",function(){null!=this.pd&&this.pd.dialogsToFront(null)},"~B");e(c$,"getFontFaceID",function(){return JU.Font.getFontFaceID("SansSerif")},"~S");e(c$,"doRepaint",function(a){null!=this.pd&&
(a&&this.pd.setTaintedAll(),this.pd.isPrinting||this.vwr.requestRepaint())},"~B");e(c$,"paintComponent",function(a){var b=null,c=null,b=a.canvas.frontLayer.getContext("2d"),c=a;null!=this.vwr&&(null==this.pd?(null==this.bgcolor&&(this.bgcolor=this.vwr.g2d.getColor1(-1)),this.vwr.g2d.fillBackground(a,this.bgcolor),this.vwr.g2d.fillBackground(c,this.bgcolor),this.vwr.g2d.fillBackground(b,this.bgcolor)):null==this.pd.graphSets||this.pd.isPrinting||(this.pd.g2d=this.pd.g2d0,this.pd.drawGraph(a,b,c,this.getWidth(),
this.getHeight(),!1),this.vwr.repaintDone()))},"~O");e(c$,"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(z(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(c$,"saveImage",function(a,b,c){a=b.getName();null!=c&&c.cancel();
JSV.common.JSViewer.jmolObject.saveImage(this.vwr.html5Applet,"png",a);return"OK"},"~S,J.api.GenericFileInterface,JU.OC");e(c$,"hasFocus",function(){return!1});e(c$,"repaint",function(){});e(c$,"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(c$,"getHeight",function(){return this.vwr.getHeight()});e(c$,"getWidth",function(){return this.vwr.getWidth()});e(c$,"isEnabled",function(){return!1});e(c$,"isFocusable",
function(){return!1});e(c$,"isVisible",function(){return!1});e(c$,"setEnabled",function(){},"~B");e(c$,"setFocusable",function(){},"~B");e(c$,"toString",function(){return null==this.pd?"<closed>":""+this.pd.getSpectrumAt(0)});e(c$,"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(c$,"processTwoPointGesture",function(a){null!=this.mouse&&this.mouse.processTwoPointGesture(a)},"~A");e(c$,"showMenu",function(a,b){this.vwr.showMenu(a,
b)},"~N,~N")});r("JSV.js2d");s(["JSV.common.ColorParameters"],"JSV.js2d.JsParameters",["JS.Color"],function(){c$=t(JSV.js2d,"JsParameters",JSV.common.ColorParameters);m(c$,function(){y(this,JSV.js2d.JsParameters,[])});e(c$,"isValidFontName",function(){return!0},"~S");e(c$,"getColor1",function(a){return JS.Color.get1(a)},"~N");e(c$,"getColor3",function(a,b,c){return JS.Color.get3(a,b,c)},"~N,~N,~N");c(c$,"copy",function(a){return(new JSV.js2d.JsParameters).setName(a).setElementColors(this)},"~S")});
r("JSV.js2d");s(["J.api.GenericPlatform"],"JSV.js2d.JsPlatform","java.net.URL JU.AjaxURLStreamHandlerFactory $.Rdr $.SB JSV.app.GenericMouse JSV.js2d.Display $.Image $.JsFile $.JsFont".split(" "),function(){c$=q(function(){this.context=this.viewer=this.canvas=null;n(this,arguments)},JSV.js2d,"JsPlatform",null,J.api.GenericPlatform);e(c$,"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(c$,"isSingleThreaded",function(){return!0});e(c$,"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(c$,"isHeadless",function(){return!1});e(c$,"getMouseManager",function(a,b){return new JSV.app.GenericMouse(b)},"~N,~O");e(c$,"convertPointFromScreen",function(a,b){JSV.js2d.Display.convertPointFromScreen(a,
b)},"~O,JU.P3");e(c$,"getFullScreenDimensions",function(a,b){JSV.js2d.Display.getFullScreenDimensions(a,b)},"~O,~A");e(c$,"getMenuPopup",function(){return null},"~S,~S");e(c$,"hasFocus",function(a){return JSV.js2d.Display.hasFocus(a)},"~O");e(c$,"prompt",function(a,b,c,e){return JSV.js2d.Display.prompt(a,b,c,e)},"~S,~S,~A,~B");e(c$,"renderScreenImage",function(a,b){JSV.js2d.Display.renderScreenImage(this.viewer,a,b)},"~O,~O");e(c$,"drawImage",function(a,b,c,e,f,h){JSV.js2d.Image.drawImage(a,b,c,e,
f,h)},"~O,~O,~N,~N,~N,~N,~B");e(c$,"requestFocusInWindow",function(a){JSV.js2d.Display.requestFocusInWindow(a)},"~O");e(c$,"repaint",function(a){JSV.js2d.Display.repaint(a)},"~O");e(c$,"setTransparentCursor",function(a){JSV.js2d.Display.setTransparentCursor(a)},"~O");e(c$,"setCursor",function(a,b){JSV.js2d.Display.setCursor(a,b)},"~N,~O");e(c$,"allocateRgbImage",function(a,b,c,e,f,h){return JSV.js2d.Image.allocateRgbImage(a,b,c,e,f,h?null:this.canvas)},"~N,~N,~A,~N,~B,~B");e(c$,"notifyEndOfRendering",
function(){});e(c$,"createImage",function(){return null},"~O");e(c$,"disposeGraphics",function(){},"~O");e(c$,"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(c$,"drawImageToBuffer",function(a,b,c,e,f){return this.grabPixels(c,e,f,null)},"~O,~O,~O,~N,~N,~N");e(c$,"getTextPixels",function(a,b,c,e,f,h,k){return JSV.js2d.Image.getTextPixels(a,
b,c,f,h,k)},"~S,JU.Font,~O,~O,~N,~N,~N");e(c$,"flushImage",function(){},"~O");e(c$,"getGraphics",function(a){return null==a?this.context:this.context=JSV.js2d.Image.getGraphics(this.canvas=a)},"~O");e(c$,"getImageHeight",function(a){return null==a?-1:JSV.js2d.Image.getHeight(a)},"~O");e(c$,"getImageWidth",function(a){return null==a?-1:JSV.js2d.Image.getWidth(a)},"~O");e(c$,"getStaticGraphics",function(a,b){return JSV.js2d.Image.getStaticGraphics(a,b)},"~O,~B");e(c$,"newBufferedImage",function(a,b,
c){return self.Jmol&&Jmol._getHiddenCanvas?Jmol._getHiddenCanvas(this.vwr.html5Applet,"stereoImage",b,c):null},"~O,~N,~N");e(c$,"newOffScreenImage",function(a,b){return self.Jmol&&Jmol._getHiddenCanvas?Jmol._getHiddenCanvas(this.vwr.html5Applet,"textImage",a,b):null},"~N,~N");e(c$,"waitForDisplay",function(){return!1},"~O,~O");e(c$,"fontStringWidth",function(a,b){return JSV.js2d.JsFont.stringWidth(a,b)},"JU.Font,~S");e(c$,"getFontAscent",function(a){return JSV.js2d.JsFont.getAscent(a)},"~O");e(c$,
"getFontDescent",function(a){return JSV.js2d.JsFont.getDescent(a)},"~O");e(c$,"getFontMetrics",function(a,b){return JSV.js2d.JsFont.getFontMetrics(a,b)},"JU.Font,~O");e(c$,"newFont",function(a,b,c,e){return JSV.js2d.JsFont.newFont(a,b,c,e,"px")},"~S,~B,~B,~N");e(c$,"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(c$,"newFile",function(a){return new JSV.js2d.JsFile(a)},"~S");e(c$,"getBufferedFileInputStream",function(){return null},"~S");e(c$,"getURLContents",function(a,b,c,e){a=JSV.js2d.JsFile.getURLContents(a,
b,c);try{return!e?a:w(a,String)?a:w(a,JU.SB)?a.toString():w(a,Array)?String.instantialize(a):String.instantialize(JU.Rdr.getStreamAsBytes(a,null))}catch(f){if(z(f,Exception))return""+f;throw f;}},"java.net.URL,~A,~S,~B");e(c$,"getLocalUrl",function(){return null},"~S");e(c$,"getImageDialog",function(){return null},"~S,java.util.Map");e(c$,"forceAsyncLoad",function(){return!1},"~S");e(c$,"getInChI",function(){return null});e(c$,"confirm",function(a,b){var c=!1;null!=b&&(c=!1);return c?1:2},"~S,~S")});
r("JSV.js2d");s(["JSV.api.JSVMainPanel"],"JSV.js2d.JsMainPanel",null,function(){c$=q(function(){this.selectedPanel=null;this.currentPanelIndex=0;this.title=null;this.enabled=this.focusable=this.visible=!1;n(this,arguments)},JSV.js2d,"JsMainPanel",null,JSV.api.JSVMainPanel);e(c$,"getCurrentPanelIndex",function(){return this.currentPanelIndex});e(c$,"dispose",function(){});e(c$,"getTitle",function(){return this.title});e(c$,"setTitle",function(a){this.title=a},"~S");e(c$,"setSelectedPanel",function(a,
b,c){b!==this.selectedPanel&&(this.selectedPanel=b);a=a.selectPanel(b,c);0<=a&&(this.currentPanelIndex=a);this.visible=!0},"JSV.common.JSViewer,JSV.api.JSVPanel,JU.Lst");c(c$,"getHeight",function(){return null==this.selectedPanel?0:this.selectedPanel.getHeight()});c(c$,"getWidth",function(){return null==this.selectedPanel?0:this.selectedPanel.getWidth()});e(c$,"isEnabled",function(){return this.enabled});e(c$,"isFocusable",function(){return this.focusable});e(c$,"isVisible",function(){return this.visible});
e(c$,"setEnabled",function(a){this.enabled=a},"~B");e(c$,"setFocusable",function(a){this.focusable=a},"~B")});r("JSV.source");s(["JSV.source.JDXHeader","java.util.Hashtable"],"JSV.source.JDXDataObject","java.lang.Character $.Double JU.DF $.PT JSV.common.Annotation $.Coordinate $.Integral JSV.exception.JSVException JU.Logger".split(" "),function(){c$=q(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;n(this,arguments)},JSV.source,"JDXDataObject",JSV.source.JDXHeader);c(c$,"setInlineData",function(a){this.inlineData=a},"~S");c(c$,"getInlineData",function(){return this.inlineData});c(c$,"setFilePath",function(a){null!=a&&(this.filePathForwardSlash=(this.filePath=a.trim()).$replace("\\","/"))},"~S");c(c$,"getFilePath",function(){return this.filePath});c(c$,"getFilePathForwardSlash",function(){return this.filePathForwardSlash});c(c$,"setBlockID",
function(a){this.blockID=a},"~N");c(c$,"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(c$,"setXFactor",function(a){this.xFactor=a},"~N");c(c$,"getXFactor",function(){return this.xFactor});
c(c$,"setYFactor",function(a){this.yFactor=a},"~N");c(c$,"getYFactor",function(){return this.yFactor});c(c$,"setVarName",function(a){this.varName=a},"~S");c(c$,"isImaginary",function(){return this.varName.contains("IMAG")});c(c$,"setXUnits",function(a){this.xUnits=a},"~S");c(c$,"getXUnits",function(){return this.xUnits});c(c$,"setYUnits",function(a){a.equals("PPM")&&(a="ARBITRARY UNITS");this.yUnits=a},"~S");c(c$,"getYUnits",function(){return this.yUnits});c(c$,"setXLabel",function(a){this.xLabel=
a},"~S");c(c$,"setYLabel",function(a){this.yLabel=a},"~S");c(c$,"setObservedNucleus",function(a){this.observedNucl=a;this.is1D()&&(this.parent.nucleusX=this.nucleusX=this.fixNucleus(a))},"~S");c(c$,"getObservedNucleus",function(){return this.observedNucl});c(c$,"setObservedFreq",function(a){this.observedFreq=a},"~N");c(c$,"getObservedFreq",function(){return this.observedFreq});c(c$,"setHydrogenCount",function(a){this.nH=a},"~N");c(c$,"getHydrogenCount",function(){return this.nH});c(c$,"is1D",function(){return 1==
this.numDim});c(c$,"getNumDim",function(){return this.numDim});c(c$,"setNumDim",function(a){this.numDim=a},"~N");c(c$,"setY2D",function(a){this.y2D=a},"~N");c(c$,"getY2D",function(){return this.y2D});c(c$,"setY2DUnits",function(a){this.y2DUnits=a},"~S");c(c$,"getY2DPPM",function(){var a=this.y2D;this.y2DUnits.equals("HZ")&&(a/=this.freq2dY);return a});c(c$,"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(c$,"fixNucleus",function(a){return JU.PT.rep(JU.PT.trim(a,"[]^<>"),"NUC_","")},"~S");c$.getNominalSpecFreq=c(c$,"getNominalSpecFreq",function(a,b){var c=b*JSV.source.JDXDataObject.getGyromagneticRatio("1H")/JSV.source.JDXDataObject.getGyromagneticRatio(a),
e=100*Math.round(c/100);return Double.isNaN(c)?-1:2>Math.abs(c-e)?e:Math.round(c)},"~S,~N");c$.getGyromagneticRatio=c(c$,"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(!z(e,Exception))throw e;}return null==b?NaN:b.doubleValue()},"~S");c(c$,"isTransmittance",
function(){var a=this.yUnits.toLowerCase();return a.equals("transmittance")||a.contains("trans")||a.equals("t")});c(c$,"isAbsorbance",function(){var a=this.yUnits.toLowerCase();return a.equals("absorbance")||a.contains("abs")||a.equals("a")});c(c$,"canSaveAsJDX",function(){return this.getDataClass().equals("XYDATA")});c(c$,"canIntegrate",function(){return this.continuous&&(this.isHNMR()||this.isGC())&&this.is1D()});c(c$,"isAutoOverlayFromJmolClick",function(){return this.isGC()});c(c$,"isGC",function(){return this.dataType.startsWith("GC")||
this.dataType.startsWith("GAS")});c(c$,"isMS",function(){return this.dataType.startsWith("MASS")||this.dataType.startsWith("MS")});c(c$,"isStackable",function(){return!this.isMS()});c(c$,"isScalable",function(){return!0});c(c$,"getYRef",function(){return!this.isTransmittance()?0:2>JSV.common.Coordinate.getMaxY(this.xyCoords,0,this.xyCoords.length-1)?1:100});c(c$,"isInverted",function(){return this.isTransmittance()});c(c$,"canConvertTransAbs",function(){return this.continuous&&this.yUnits.toLowerCase().contains("abs")||
this.yUnits.toLowerCase().contains("trans")});c(c$,"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(c$,"isHZtoPPM",function(){return this.$isHZtoPPM});c(c$,"setHZtoPPM",function(a){this.$isHZtoPPM=a},"~B");c(c$,"setIncreasing",function(a){this.xIncreases=a},"~B");c(c$,"isXIncreasing",function(){return this.xIncreases});
c(c$,"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(c$,"setContinuous",function(a){this.continuous=a},"~B");c(c$,"isContinuous",function(){return this.continuous});c(c$,"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++]=x(-1,["##.OBSERVE FREQUENCY",""+this.observedFreq]));""!==this.observedNucl&&(b[a++]=x(-1,["##.OBSERVE NUCLEUS",this.observedNucl]));b[a++]=x(-1,["##XUNITS",this.$isHZtoPPM?"HZ":this.xUnits]);b[a++]=x(-1,["##YUNITS",this.yUnits]);var c=this.xIncreases?this.getFirstX():this.getLastX();b[a++]=x(-1,["##FIRSTX",
String.valueOf(this.isHZtoPPM()?c*this.observedFreq:c)]);c=this.xIncreases?this.getLastX():this.getFirstX();b[a++]=x(-1,["##FIRSTY",String.valueOf(this.xIncreases?this.getFirstY():this.getLastY())]);b[a++]=x(-1,["##LASTX",String.valueOf(this.isHZtoPPM()?c*this.observedFreq:c)]);b[a++]=x(-1,["##XFACTOR",String.valueOf(this.getXFactor())]);b[a++]=x(-1,["##YFACTOR",String.valueOf(this.getYFactor())]);b[a++]=x(-1,["##NPOINTS",String.valueOf(this.xyCoords.length)]);return b});c(c$,"getDefaultUnitPrecision",
function(){return 2});c(c$,"setMeasurementText",function(a){var b=a.getValue();if(Double.isNaN(b))return"";var c=1,e="";if(this.isNMR())if(this.is1D())a=w(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(c$,"isNMR",function(){return 0<=this.dataType.toUpperCase().indexOf("NMR")});c(c$,"isHNMR",function(){return this.isNMR()&&0<=this.observedNucl.toUpperCase().indexOf("H")});
c(c$,"setXYCoords",function(a){this.xyCoords=a},"~A");c(c$,"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(c$,"getFirstX",function(){return this.xyCoords[0].getXVal()});c(c$,"getFirstY",function(){return this.xyCoords[0].getYVal()});c(c$,"getLastX",function(){return this.xyCoords[this.xyCoords.length-1].getXVal()});c(c$,"getLastY",function(){return this.xyCoords[this.xyCoords.length-
1].getYVal()});c(c$,"getMinX",function(){return Double.isNaN(this.minX)?this.minX=JSV.common.Coordinate.getMinX(this.xyCoords,0,this.xyCoords.length-1):this.minX});c(c$,"getMinY",function(){return Double.isNaN(this.minY)?this.minY=JSV.common.Coordinate.getMinY(this.xyCoords,0,this.xyCoords.length-1):this.minY});c(c$,"getMaxX",function(){return Double.isNaN(this.maxX)?this.maxX=JSV.common.Coordinate.getMaxX(this.xyCoords,0,this.xyCoords.length-1):this.maxX});c(c$,"getMaxY",function(){return Double.isNaN(this.maxY)?
this.maxY=JSV.common.Coordinate.getMaxY(this.xyCoords,0,this.xyCoords.length-1):this.maxY});c(c$,"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(c$,"getDeltaX",function(){return Double.isNaN(this.deltaX)?this.deltaX=JSV.common.Coordinate.deltaX(this.getLastX(),this.getFirstX(),this.xyCoords.length):this.deltaX});c(c$,"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(c$,"getTypeLabel",function(){return this.isNMR()?this.nucleusX+"NMR":this.dataType});c(c$,"getDefaultAnnotationInfo",function(a){var b,c=this.isNMR();switch(a){case JSV.common.Annotation.AType.Integration:return x(-1,
[null,E(-1,[1]),null]);case JSV.common.Annotation.AType.Measurements:return a=c?x(-1,["Hz","ppm"]):x(-1,[""]),b=this.isHNMR()?E(-1,[1,4]):E(-1,[1,3]),x(-1,[a,b,Integer.$valueOf(0)]);case JSV.common.Annotation.AType.PeakList:return a=c?x(-1,["Hz","ppm"]):x(-1,[""]),b=this.isHNMR()?E(-1,[1,2]):E(-1,[1,1]),x(-1,[a,b,Integer.$valueOf(c?1:0)])}return null},"JSV.common.Annotation.AType");c(c$,"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 k=c+b[1];b[1]=c;var j=k+b[2];b[2]=k;return this.isNMR()?N(-1,[e,a,e*this.observedFreq,20<c*this.observedFreq?0:c*this.observedFreq,20<k*this.observedFreq?0:k*this.observedFreq,20<j*this.observedFreq?0:j*this.observedFreq]):N(-1,[e,a])},"JSV.common.Measurement,~A,~N");c(c$,"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(c$,"setShiftReference",function(a,b,c){this.fileShiftRef=a;this.fileShiftRefDataPt=0<b?b:1;this.fileShiftRefType=c},"~N,~N,~N");c(c$,"isShiftTypeSpecified",function(){return-1!=this.fileShiftRefType});
c(c$,"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");D(c$,"ERROR",1.7976931348623157E308,"REF_TYPE_UNSPECIFIED",-1,"REF_TYPE_STANDARD",0,"REF_TYPE_BRUKER",
1,"REF_TYPE_VARIAN",2,"gyroData",N(-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]));c$.gyroMap=c$.prototype.gyroMap=new java.util.Hashtable;for(var a=0,b=JSV.source.JDXDataObject.gyroData.length-1;a<b;a+=2)JSV.source.JDXDataObject.gyroMap.put(""+v(JSV.source.JDXDataObject.gyroData[a]),Double.$valueOf(JSV.source.JDXDataObject.gyroData[a+1]))});r("JSV.source");s(["java.util.Iterator"],"JSV.source.JDXDecompressor",["java.lang.Double","JSV.common.Coordinate","JU.Logger"],function(){c$=q(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;n(this,arguments)},JSV.source,"JDXDecompressor",null,java.util.Iterator);c(c$,"getMinY",function(){return this.minY});c(c$,"getMaxY",function(){return this.maxY});m(c$,function(a,c,e,f,h,k){this.t=a;this.firstX=c;this.lastX=e;this.xFactor=f;this.yFactor=h;this.nPoints=k;this.debugging=
JU.Logger.isActiveLevel(6)},"JSV.source.JDXSourceStreamTokenizer,~N,~N,~N,~N,~N");m(c$,function(a,c){this.line=a.trim();this.lineLen=a.length;this.lastY=c},"~S,~N");c(c$,"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 c=0,e=0,f=this.lastX,
h=this.lastX=this.firstX,k=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 q=this.isDIF,r=this.readSignedFloat()*this.xFactor,l=this.nextValue(l);!q&&0<j&&(h+=a);this.debugging&&this.logError("Line: "+n+" isCP="+q+"\t>>"+this.line+"<<\n x, xcheck "+h+" "+h/this.xFactor+" "+r/this.xFactor+" "+a/this.xFactor);var s=l*this.yFactor,t=(new JSV.common.Coordinate).set(h,s);if(0==
j||!q)this.addPoint(t,j++);else if(j<this.nPoints){var v=this.xyCoords[j-1].getYVal();s!=v&&(this.xyCoords[j-1]=t,this.logError(k+"\n"+this.line+"\nY-value Checkpoint Error! Line "+n+" for y="+s+" yLast="+v));(r==c||r<c!=0>a)&&this.logError(k+"\n"+this.line+"\nX-sequence Checkpoint Error! Line "+n+" order for xCheck="+r+" after prevXCheck="+c);var w=Math.abs(r-c),x=Math.abs((j-e)*a),y=Math.abs(w-x)/w;this.debugging&&System.err.println("JDXD fracDif = "+r+"\t"+c+"\txcheckDif="+w+"\txiptDif="+x+"\tf="+
y);0.5<y&&this.logError(k+"\n"+this.line+"\nX-value Checkpoint Error! Line "+n+" expected "+x+" but X-Sequence Check difference reads "+w)}for(var e=1==j?0:j,c=r,B=0;this.hasNext();){var A=this.ich;this.debugging&&this.logError("line "+n+" char "+A+":"+this.line.substring(0,A)+">>>>"+this.line.substring(this.ich));Double.isNaN(l=this.nextValue(l))?this.logError("There was an error reading line "+n+" char "+A+":"+this.line.substring(0,A)+">>>>"+this.line.substring(A)):(h+=a,1.7976931348623157E308==
l&&(l=0,this.logError("Point marked invalid '?' for line "+n+" char "+A+":"+this.line.substring(0,A)+">>>>"+this.line.substring(A))),this.addPoint((new JSV.common.Coordinate).set(h,l*this.yFactor),j++),this.debugging&&this.logError("nx="+ ++B+" "+h+" "+h/this.xFactor+" yval="+l))}this.lastX=h;!m&&j>this.nPoints&&(this.logError("! points overflow nPoints!"),m=!0);k=this.line}}catch(C){if(z(C,java.io.IOException))C.printStackTrace();else throw C;}this.checkZeroFill(j,f);return this.xyCoords},"JU.SB");
c(c$,"checkZeroFill",function(a,c){this.nptsFound=a;if(this.nPoints==this.nptsFound)1E-5<Math.abs(c-this.lastX)&&this.logError("Something went wrong! The last X value was "+this.lastX+" but expected "+c);else{this.logError("Decompressor did not find "+this.nPoints+" points -- instead "+this.nptsFound+" xyCoords.length set to "+this.nPoints);for(var e=this.nptsFound;e<this.nPoints;e++)this.addPoint((new JSV.common.Coordinate).set(0,NaN),e)}},"~N,~N");c(c$,"addPoint",function(a,c){if(!(c>=this.nPoints)){this.xyCoords[c]=
a;var e=a.getYVal();e>this.maxY?this.maxY=e:e<this.minY&&(this.minY=e);this.debugging&&this.logError("Coord: "+c+a)}},"JSV.common.Coordinate,~N");c(c$,"logError",function(a){this.debugging&&JU.Logger.debug(a);System.err.println(a);this.errorLog.append(a).appendC("\n")},"~S");c(c$,"nextValue",function(a){if(0<this.dupCount)return this.getDuplicate(a);var c=this.skipUnknown();switch(JSV.source.JDXDecompressor.actions[c.charCodeAt(0)]){case 1:return this.isDIF=!0,a+(this.lastDif=this.readNextInteger("%"==
c?0:"R">=c?c.charCodeAt(0)-73:105-c.charCodeAt(0)));case 2:return this.dupCount=this.readNextInteger("s"==c?9:c.charCodeAt(0)-82)-1,this.getDuplicate(a);case 3:a=this.readNextSqueezedNumber(c);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(c$,"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(c$,
"readSignedFloat",function(){for(var a=this.ich,c="\x00";this.ich<this.lineLen&&0<=" ,\t\n".indexOf(c=this.line.charAt(this.ich));)this.ich++;var e=1;switch(c){case "-":e=-1;case "+":a=++this.ich}if("E"==this.scanToNonnumeric()&&this.ich+3<this.lineLen)switch(this.line.charAt(this.ich+1)){case "-":case "+":this.ich+=4,this.ich<this.lineLen&&("0"<=(c=this.line.charAt(this.ich))&&"9">=c)&&this.ich++}return e*Double.parseDouble(this.line.substring(a,this.ich))});c(c$,"getDuplicate",function(a){this.dupCount--;
return this.isDIF?a+this.lastDif:a},"~N");c(c$,"readNextInteger",function(a){for(var c=String.fromCharCode(0);this.ich<this.lineLen&&"0"<=(c=this.line.charAt(this.ich))&&"9">=c;)a=10*a+(0>a?48-c.charCodeAt(0):c.charCodeAt(0)-48),this.ich++;return a},"~N");c(c$,"readNextSqueezedNumber",function(a){var c=this.ich;this.scanToNonnumeric();return Double.parseDouble((96<a.charCodeAt(0)?96-a.charCodeAt(0):a.charCodeAt(0)-64)+this.line.substring(c,this.ich))},"~S");c(c$,"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(c$,"getNPointsFound",function(){return this.nptsFound});e(c$,"hasNext",function(){return this.ich<this.lineLen||0<this.dupCount});e(c$,"next",function(){return this.hasNext()?Double.$valueOf(this.lastY=this.nextValue(this.lastY)):null});e(c$,"remove",function(){});D(c$,"delimiters"," ,\t\n","actions",E(255,0),"ACTION_INVALID",-1,"ACTION_UNKNOWN",
0,"ACTION_DIF",1,"ACTION_DUP",2,"ACTION_SQZ",3,"ACTION_NUMERIC",4,"INVALID_Y",1.7976931348623157E308);for(var a=37;115>=a;a++)switch(String.fromCharCode(a)){case "%":case "J":case "K":case "L":case "M":case "N":case "O":case "P":case "Q":case "R":case "j":case "k":case "l":case "m":case "n":case "o":case "p":case "q":case "r":JSV.source.JDXDecompressor.actions[a]=1;break;case "+":case "-":case ".":case "0":case "1":case "2":case "3":case "4":case "5":case "6":case "7":case "8":case "9":JSV.source.JDXDecompressor.actions[a]=
4;break;case "?":JSV.source.JDXDecompressor.actions[a]=-1;break;case "@":case "A":case "B":case "C":case "D":case "E":case "F":case "G":case "H":case "I":case "a":case "b":case "c":case "d":case "e":case "f":case "g":case "h":case "i":JSV.source.JDXDecompressor.actions[a]=3;break;case "S":case "T":case "U":case "V":case "W":case "X":case "Y":case "Z":case "s":JSV.source.JDXDecompressor.actions[a]=2}});r("JSV.source");s(["JU.Lst"],"JSV.source.JDXHeader",null,function(){c$=q(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;n(this,arguments)},JSV.source,"JDXHeader");H(c$,function(){this.headerTable=new JU.Lst});c(c$,"setTitle",function(a){this.title=a},"~S");c(c$,"setJcampdx",function(a){this.jcampdx=a},"~S");c(c$,"setDataType",function(a){this.dataType=a},"~S");c(c$,"setDataClass",function(a){this.dataClass=a},"~S");c(c$,"setOrigin",function(a){this.origin=
a},"~S");c(c$,"setOwner",function(a){this.owner=a},"~S");c(c$,"setLongDate",function(a){this.longDate=a},"~S");c(c$,"setDate",function(a){this.date=a},"~S");c(c$,"setTime",function(a){this.time=a},"~S");c(c$,"getTitle",function(){return this.title});c$.getTypeName=c(c$,"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(c$,"getQualifiedDataType",
function(){return null==this.qualifiedType?this.qualifiedType=JSV.source.JDXHeader.getTypeName(this.dataType):this.qualifiedType});c(c$,"getJcampdx",function(){return this.jcampdx});c(c$,"getDataType",function(){return this.dataType});c(c$,"getOrigin",function(){return this.origin});c(c$,"getOwner",function(){return this.owner});c(c$,"getLongDate",function(){return this.longDate});c(c$,"getDate",function(){return this.date});c(c$,"getTime",function(){return this.time});c(c$,"getDataClass",function(){return this.dataClass});
c(c$,"setHeaderTable",function(a){this.headerTable=a},"JU.Lst");c(c$,"getHeaderTable",function(){return this.headerTable});c(c$,"getHeaderRowDataAsArray",function(a,b){var c=Array((a?6:5)+this.headerTable.size()+b),e=0;c[e++]=x(-1,["##TITLE",this.title]);c[e++]=x(-1,["##JCAMP-DX",this.jcampdx]);c[e++]=x(-1,["##DATA TYPE",this.dataType]);a&&(c[e++]=x(-1,["##DATA CLASS",this.dataClass]));c[e++]=x(-1,["##ORIGIN",this.origin]);c[e++]=x(-1,["##OWNER",this.owner]);for(var f=0;f<this.headerTable.size();f++)c[e++]=
this.getRow(f);return c},"~B,~N");c(c$,"getRow",function(a){a=this.headerTable.get(a);return[a[0],JU.PT.rep(a[1],"<","&lt;")]},"~N");D(c$,"typeNames",x(-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");s(["J.api.JmolJDXMOLReader"],"JSV.source.JDXReader","java.io.BufferedReader $.InputStream $.StringReader java.lang.Double $.Float java.util.Hashtable $.LinkedHashMap $.StringTokenizer javajs.api.Interface JU.AU $.Lst $.PT $.Rdr $.SB JSV.api.JSVZipReader JSV.common.Coordinate $.JSVFileManager $.JSViewer $.PeakInfo $.Spectrum JSV.exception.JSVException JSV.source.JDXDecompressor $.JDXSource $.JDXSourceStreamTokenizer JU.Logger".split(" "),
function(){c$=q(function(){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;n(this,arguments)},JSV.source,"JDXReader",null,J.api.JmolJDXMOLReader);c$.getVarList=
c(c$,"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");m(c$,function(a,b,c,e,f,h){a=JU.PT.trimQuotes(a);if(this.isSimulation=null!=a&&a.startsWith("http://SIMULATION/"))this.nmrMaxY=Float.isNaN(h)?1E4:h;this.filePath=a;this.obscure=b;this.firstSpec=e;this.lastSpec=f;this.loadImaginary=c},"~S,~B,~B,~N,~N,~N");c$.createJDXSourceFromStream=c(c$,"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");c$.getHeaderMap=c(c$,"getHeaderMap",function(a,b){return JSV.source.JDXReader.getHeaderMapS(a,b,null)},"java.io.InputStream,java.util.Map");c$.getHeaderMapS=c(c$,"getHeaderMapS",function(a,b,c){null==b&&(b=new java.util.LinkedHashMap);a=JSV.source.JDXReader.createJDXSource(null,a,null,!1,!1,0,-1,0).getJDXSpectrum(0).headerTable;for(var e=0,f=a.size();e<f;e++){var h=a.get(e);b.put(null==c?h[2]:h[2]+c,h[1])}return b},"java.io.InputStream,java.util.Map,~S");
c$.createJDXSource=c(c$,"createJDXSource",function(a,b,c,e,f,h,k,j){var l=k<h,m=null,n=null;if(JU.AU.isAB(b)&&(n=b,JU.Rdr.isZipB(n)))return JSV.source.JDXReader.readBrukerFileZip(n,null==a?c:a.getFullPath());w(b,String)||null!=n?(w(b,String)&&(m=b),b=JSV.common.JSVFileManager.getBufferedReaderForStringOrBytes(b)):b=w(b,java.io.InputStream)?JSV.common.JSVFileManager.getBufferedReaderForInputStream(b):b;var q=n=null;try{if(null==b){if(null!=a&&a.isDirectory())return JSV.source.JDXReader.readBrukerFileDir(a.getFullPath());
b=JSV.common.JSVFileManager.getBufferedReaderFromName(c,"##TITLE")}if(!l){b.mark(400);var r=X(400,"\x00");b.read(r,0,400);b.reset();n=String.instantialize(r);if(n.startsWith("PK"))return b.close(),JSV.source.JDXReader.readBrukerFileZip(null,a.getFullPath());if(0<=n.indexOf("\x00")||0<=n.indexOf("\ufffd")||0==n.indexOf("##TITLE= Parameter file")||0==n.indexOf("##TITLE= Audit trail"))return b.close(),JSV.source.JDXReader.readBrukerFileDir(a.getParentAsFile().getFullPath());var s=n.indexOf("#"),t=n.indexOf("<");
if(0>s||0<=t&&t<s){var v=n.toLowerCase(),v=v.contains("<animl")||v.contains("<!doctype technique")?"AnIML":v.contains("xml-cml")?"CML":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(n+"..."),new JSV.exception.JSVException("File type not recognized");}}null==q&&(q=(new JSV.source.JDXReader(c,e,f,h,k,j)).getJDXSource(b,l));null!=m&&q.setInlineData(m);
return q}catch(x){if(z(x,Exception))throw JSV.common.JSViewer.isJS||x.printStackTrace(),null!=b&&b.close(),null!=n&&JU.Logger.error(n+"..."),a=x.getMessage(),new JSV.exception.JSVException("Error reading data: "+a);throw x;}},"J.api.GenericFileInterface,~O,~S,~B,~B,~N,~N,~N");c$.readBrukerFileDir=c(c$,"readBrukerFileDir",function(a){return javajs.api.Interface.getInterface("JSV.source.BrukerReader").readBrukerDir(a)},"~S");c$.readBrukerFileZip=c(c$,"readBrukerFileZip",function(a,b){return javajs.api.Interface.getInterface("JSV.source.BrukerReader").readBrukerZip(a,
b)},"~A,~S");c(c$,"getJDXSource",function(a,b){this.source=new JSV.source.JDXSource(0,this.filePath);this.isZipFile=w(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 h=new JSV.common.Spectrum,k=new JU.Lst;for(b&&h.setHeaderTable(k);!this.done&&
null!=(c=this.t.getLabel())&&null!=(e=this.getValue(c));)if(this.isTabularData){if(this.processTabularData(h,k,c,b),this.addSpectrum(h,!1),this.isSimulation&&h.getXUnits().equals("PPM")&&h.setHZtoPPM(!0),h=null,b){JSV.source.JDXReader.addHeader(k,this.t.rawLabel,"<data>");break}}else{if(!b){if(c.equals("##DATATYPE")&&e.toUpperCase().equals("LINK")){this.getBlockSpectra(k);h=null;continue}if(c.equals("##NTUPLES")||c.equals("##VARNAME")){this.getNTupleSpectra(k,h,c);h=null;continue}}c.equals("##JCAMPDX")&&
this.setVenderSpecificValues(this.t.rawLine);null==h&&(h=new JSV.common.Spectrum);this.processLabel(h,k,c,e,b)}b&&null!=h&&this.addSpectrum(h,!1)}if(!f)throw new JSV.exception.JSVException("##TITLE record not found");this.source.setErrorLog(this.errorLog.toString());return this.source},"~O,~B");c(c$,"processLabel",function(a,b,c,e,f){if(this.readDataLabel(a,c,e,this.errorLog,this.obscure,f)||f)JSV.source.JDXReader.addHeader(b,this.t.rawLabel,e),f||this.checkCustomTags(a,c,e)},"JSV.common.Spectrum,JU.Lst,~S,~S,~B");
c(c$,"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(c$,"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(c$,"getValue",function(a){var b=this.isTabularDataLabel(a)?"":this.t.getValue();
return"##END".equals(a)?null:b},"~S");c(c$,"isTabularDataLabel",function(a){return this.isTabularData=0<="##DATATABLE##PEAKTABLE##XYDATA##XYPOINTS#".indexOf(a+"#")},"~S");c(c$,"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(z(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(c$,"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&&!JSV.source.JDXReader.readHeaderLabel(this.source,b,c,this.errorLog,this.obscure)&&JSV.source.JDXReader.addHeader(a,
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);this.source.type=1;this.source.isCompoundSource=!0;e=new JSV.common.Spectrum;a=new JU.Lst;this.readDataLabel(e,b,c,this.errorLog,this.obscure,!1);try{for(var h;null!=(h=this.t.getLabel());){if(null==(c=this.getValue(h))&&"##END".equals(b)){JU.Logger.debug("##END= "+this.t.getValue());
break}b=h;if(this.isTabularData)this.processTabularData(e,a,b,!1);else{if(b.equals("##DATATYPE"))if(c.toUpperCase().equals("LINK"))this.getBlockSpectra(a),b=e=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(a,e,b),e=null,b="";if(this.done)break;if(null==e){e=new JSV.common.Spectrum;a=new JU.Lst;if(""===b)continue;if(null==b){b="##END";continue}}if(null==c){if(0<e.getXYCoords().length&&
!this.addSpectrum(e,f))return this.source;e=new JSV.common.Spectrum;a=new JU.Lst}else this.processLabel(e,a,b,c,!1)}}}catch(k){if(z(k,Exception))throw JSV.common.JSViewer.isJS||k.printStackTrace(),new JSV.exception.JSVException(k.getMessage());throw k;}this.addErrorLogSeparator();this.source.setErrorLog(this.errorLog.toString());JU.Logger.debug("--JDX block end--");return this.source},"JU.Lst");c(c$,"addErrorLogSeparator",function(){0<this.errorLog.length()&&this.errorLog.lastIndexOf("=====================\n")!=
this.errorLog.length()-22&&this.logError("=====================\n")});c(c$,"getNTupleSpectra",function(a,b,c){var e=N(-1,[1.7976931348623157E308,4.9E-324]);this.blockID=Math.random();0<this.firstSpec&&b.setNumDim(1);var f=c.equals("##VARNAME");f||(c="");var h=new java.util.Hashtable,k=Array(2);0==this.source.type&&(this.source.type=2,this.source.isCompoundSource=!0,this.source.setHeaderTable(a));for(;!(c=f?c:this.t.getLabel()).equals("##PAGE");){for(var f=!1,j=new java.util.StringTokenizer(this.t.getValue(),
","),l=new JU.Lst;j.hasMoreTokens();)l.addLast(j.nextToken().trim());h.put(c,l)}f=h.get("##SYMBOL");if(!c.equals("##PAGE"))throw new JSV.exception.JSVException("Error Reading NTuple Source");for(var j=this.t.getValue(),l=null,m=!0;!this.done;){if((c=this.t.getLabel()).equals("##ENDNTUPLES")){this.t.getValue();break}if(c.equals("##PAGE"))j=this.t.getValue();else{if(null==l&&(l=new JSV.common.Spectrum,b.copyTo(l),l.setTitle(b.getTitle()),!l.is1D())){var n=j.indexOf("=");if(0<=n)try{l.setY2D(this.parseAFFN(j.substring(0,
n),j.substring(n+1).trim()));var q=j.substring(0,n).trim(),r=f.indexOf(q);0<=r&&l.setY2DUnits(h.get("##UNITS").get(r))}catch(s){if(!z(s,Exception))throw s;}}n=new JU.Lst;for(l.setHeaderTable(n);!c.equals("##DATATABLE");)JSV.source.JDXReader.addHeader(n,this.t.rawLabel,this.t.getValue()),c=this.t.getLabel();c=!0;r=this.t.flushLine();0<r.trim().indexOf("PEAKS")&&(c=!1);var t=r.indexOf("("),v=r.lastIndexOf(")");if(-1==t||-1==v)throw new JSV.exception.JSVException("Variable List not Found");t=r.substring(t,
v+1);for(r=v=0;r<f.size();r++){var w=f.get(r).trim();-1!=t.indexOf(w)&&(k[v++]=w);if(2==v)break}this.setTabularDataType(l,"##"+(c?"XYDATA":"PEAKTABLE"));if(!this.readNTUPLECoords(l,h,k,e))throw new JSV.exception.JSVException("Unable to read Ntuple Source");l.nucleusX.equals("?")||(b.nucleusX=l.nucleusX);b.nucleusY=l.nucleusY;b.freq2dX=l.freq2dX;b.freq2dY=l.freq2dY;b.y2DUnits=l.y2DUnits;for(r=0;r<a.size();r++)c=a.get(r),t=JSV.source.JDXSourceStreamTokenizer.cleanLabel(c[0]),!t.equals("##TITLE")&&(!t.equals("##DATACLASS")&&
!t.equals("##NTUPLES"))&&n.addLast(c);this.addSpectrum(l,!m);m=!1;l=null}}this.addErrorLogSeparator();this.source.setErrorLog(this.errorLog.toString());JU.Logger.info("NTUPLE MIN/MAX Y = "+e[0]+" "+e[1]);return this.source},"JU.Lst,JSV.source.JDXDataObject,~S");c(c$,"readDataLabel",function(a,b,c,e,f){if(!JSV.source.JDXReader.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)return!0;if(b.equals("##.OBSERVEFREQUENCY "))return a.setObservedFreq(this.parseAFFN(b,c)),!1;if(b.equals("##.OBSERVENUCLEUS "))return a.setObservedNucleus(c),!1;if(b.equals("##$REFERENCEPOINT ")&&!a.isShiftTypeSpecified()){var h=c.indexOf(" ");0<h&&(c=c.substring(0,h));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 h=Integer.parseInt(c.nextToken().trim()),k=this.parseAFFN(b,c.nextToken().trim());a.setShiftReference(k,h,0)}catch(j){if(!z(j,Exception))throw j;}return!1}return!0}},"JSV.source.JDXDataObject,~S,~S,JU.SB,~B,~B");c$.readHeaderLabel=c(c$,"readHeaderLabel",function(a,b,c,e,f){switch("##TITLE#####JCAMPDX###ORIGIN####OWNER#####DATATYPE##LONGDATE##DATE######TIME####".indexOf(b+"#")){case 0:return a.setTitle(f||null==c||c.equals("")?
"Unknown":c),!1;case 10: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),!1;case 20:return a.origin=null!=c&&!c.equals("")?c:"Unknown",!1;case 30:return a.owner=null!=c&&!c.equals("")?c:"Unknown",!1;case 40:return a.dataType=c,!1;case 50:return a.longDate=c,!1;case 60:return a.date=c,!1;case 70:return a.time=c,!1}return!0},"JSV.source.JDXHeader,~S,~S,JU.SB,~B");c(c$,"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(c$,"processTabularData",function(a,b,c,e){this.setTabularDataType(a,c);a.setHeaderTable(b);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(!z(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,JU.Lst,~S,~B");c(c$,"readNTUPLECoords",function(a,b,c,e){var f;if(a.dataClass.equals("XYDATA")){f=b.get("##SYMBOL");var h=f.indexOf(c[0]),k=f.indexOf(c[1]);f=b.get("##VARNAME");a.setVarName(f.get(k).toUpperCase());f=b.get(c="##FACTOR");a.setXFactor(this.parseAFFN(c,f.get(h)));a.setYFactor(this.parseAFFN(c,f.get(k)));f=b.get(c="##LAST");a.fileLastX=this.parseAFFN(c,f.get(h));f=b.get(c="##FIRST");a.fileFirstX=this.parseAFFN(c,f.get(h));f=b.get("##VARDIM");a.fileNPoints=Integer.parseInt(f.get(h));
f=b.get("##UNITS");a.setXUnits(f.get(h));a.setYUnits(f.get(k));null==a.nucleusX&&null!=(f=b.get("##.NUCLEUS"))?(a.setNucleusAndFreq(f.get(0),!1),a.setNucleusAndFreq(f.get(h),!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"),h=f.indexOf(c[0]),k=f.indexOf(c[1]),f=b.get("##UNITS"),a.setXUnits(f.get(h)),a.setYUnits(f.get(k)),a.setXYCoords(JSV.common.Coordinate.parseDSV(this.t.getValue(),
a.xFactor,a.yFactor)),!0):!1},"JSV.source.JDXDataObject,java.util.Map,~A,~A");c(c$,"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(c$,"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(),h=e.decompressData(this.errorLog);JU.Logger.debugging&&JU.Logger.debug("decompression time = "+(System.currentTimeMillis()-f)+" ms");a.setXYCoords(h);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$.addHeader=c(c$,"addHeader",function(a,b,c){for(var e=null,f=0;f<a.size();f++)if((e=a.get(f))[0].equals(b)){e[1]=c;return}a.addLast(x(-1,[b,c,JSV.source.JDXSourceStreamTokenizer.cleanLabel(b)]))},"JU.Lst,~S,~S");c(c$,"checkCustomTags",function(a,b,c){10<b.length&&(b=b.substring(0,10));null==a?System.out.println(b):this.modelSpectrum=a;b="##$MODELS ##$PEAKS  ##$SIGNALS##$MOLFILE##PEAKASSI##$UVIRASS##$MSFRAGM".indexOf(b);if(0>b)return!1;this.getMpr().set(this,this.filePath,
null);try{switch(this.reader=new java.io.BufferedReader(new java.io.StringReader(c)),b){case 0:this.mpr.readModels();break;case 10:case 20:this.peakData=new JU.Lst;this.source.peakCount+=this.mpr.readPeaks(20==b,this.source.peakCount);break;case 30:this.acdAssignments=new JU.Lst;this.acdMolFile=JU.PT.rep(c,"$$ Empty String","");break;case 40:case 50:case 60:this.acdAssignments=this.mpr.readACDAssignments(a.fileNPoints,40==b);break}}catch(e){if(z(e,Exception))throw new JSV.exception.JSVException(e.getMessage());
throw e;}finally{this.reader=null}return!0},"JSV.common.Spectrum,~S,~S");c(c$,"getMpr",function(){return null==this.mpr?this.mpr=JSV.common.JSViewer.getInterface("J.jsv.JDXMOLParser"):this.mpr});e(c$,"rd",function(){return this.reader.readLine()});e(c$,"setSpectrumPeaks",function(a,b,c){this.modelSpectrum.setPeakList(this.peakData,b,c);this.modelSpectrum.isNMR()&&this.modelSpectrum.setHydrogenCount(a)},"~N,~S,~S");e(c$,"addPeakData",function(a){null==this.peakData&&(this.peakData=new JU.Lst);this.peakData.addLast(new JSV.common.PeakInfo(a))},
"~S");e(c$,"processModelData",function(){},"~S,~S,~S,~S,~S,~N,~N,~B");e(c$,"discardLinesUntilContains",function(a){for(var b;null!=(b=this.rd())&&0>b.indexOf(a););return b},"~S");e(c$,"discardLinesUntilContains2",function(a,b){for(var c;null!=(c=this.rd())&&0>c.indexOf(a)&&0>c.indexOf(b););return c},"~S,~S");e(c$,"discardLinesUntilNonBlank",function(){for(var a;null!=(a=this.rd())&&0==a.trim().length;);return a});D(c$,"VAR_LIST_TABLE",x(-1,["PEAKTABLE   XYDATA      XYPOINTS"," (XY..XY)    (X++(Y..Y)) (XY..XY)    "]),
"ERROR_SEPARATOR","=====================\n")});r("JSV.source");s(["JSV.source.JDXHeader"],"JSV.source.JDXSource",["JU.Lst"],function(){c$=q(function(){this.type=0;this.isCompoundSource=!1;this.jdxSpectra=null;this.errors="";this.filePath=null;this.peakCount=0;this.isView=!1;this.inlineData=null;n(this,arguments)},JSV.source,"JDXSource",JSV.source.JDXHeader);c(c$,"dispose",function(){this.jdxSpectra=this.headerTable=null});m(c$,function(a,b){y(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(c$,"getJDXSpectrum",function(a){return this.jdxSpectra.size()<=a?null:this.jdxSpectra.get(a)},"~N");c(c$,"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(c$,"getNumberOfSpectra",function(){return this.jdxSpectra.size()});
c(c$,"getSpectra",function(){return this.jdxSpectra});c(c$,"getSpectraAsArray",function(){return null==this.jdxSpectra?null:this.jdxSpectra.toArray()});c(c$,"getErrorLog",function(){return this.errors});c(c$,"setErrorLog",function(a){this.errors=a},"~S");c(c$,"setFilePath",function(a){this.filePath=a},"~S");c(c$,"getFilePath",function(){return this.filePath});c$.createView=c(c$,"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(c$,"getHeaderRowDataAsArray",function(a,b){null==b&&(b=x(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(c$,"setID",function(a){this.jdxSpectra.get(0).sourceID=a},"~S");c(c$,"matchesFilePath",function(a){return this.filePath.equals(a)||this.filePath.$replace("\\","/").equals(a)},"~S");c(c$,"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");D(c$,"TYPE_VIEW",-2,"TYPE_UNKNOWN",-1,"TYPE_SIMPLE",0,"TYPE_BLOCK",1,"TYPE_NTUPLE",2)});r("JSV.source");s(null,"JSV.source.JDXSourceStreamTokenizer",["java.lang.Character","JU.SB","JU.Logger"],function(){c$=q(function(){this.value=this.rawLabel=this.br=null;this.labelLineNo=0;this.line=null;this.lineNo=0;this.rawLine=null;n(this,arguments)},JSV.source,"JDXSourceStreamTokenizer");m(c$,function(a){this.br=a},"java.io.BufferedReader");c(c$,"peakLabel",
function(){return this.nextLabel(!1)});c(c$,"getLabel",function(){return this.nextLabel(!0)});c(c$,"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(z(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");c$.cleanLabel=c(c$,"cleanLabel",function(a){if(null==a)return null;var b,c=new JU.SB;for(b=0;b<a.length;b++)switch(a.charAt(b)){case "/":case "\\":case " ":case "-":case "_":break;default:c.appendC(a.charAt(b))}return c.toString().toUpperCase()},
"~S");c(c$,"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(z(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(c$,"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(c$,"flushLine",function(){var a=(new JU.SB).append(this.line);this.line=null;return JSV.source.JDXSourceStreamTokenizer.trimLines(a)});c(c$,"readLine",function(){this.line=this.br.readLine();this.lineNo++;return this.line});c$.trimLines=c(c$,"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=X(b-e,"\x00"),h=0;e<b;e++){var k;switch(k=a.charAt(e)){case "\r":if(e<c&&"\n"==a.charAt(e+1))continue;k="\n";break;case "\n":0<h&&"\n"!=f[h-1]&&(h-=e-JSV.source.JDXSourceStreamTokenizer.ptNonSpaceRev(a,e)-1);e=JSV.source.JDXSourceStreamTokenizer.ptNonSpace(a,++e,b)-1;break;case "$":if(e<c&&"$"==a.charAt(e+1)){for(e++;++e<b&&0>"\n\r".indexOf(a.charAt(e)););continue}}"\n"==k&&0<h&&"\n"==
f[h-1]||(f[h++]=k)}0<h&&"\n"==f[h-1]&&--h;return String.instantialize(f).substring(0,h).trim()},"JU.SB");c$.ptNonWhite=c(c$,"ptNonWhite",function(a,b,c){for(;b<c&&Character.isWhitespace(a.charAt(b));)b++;return b},"JU.SB,~N,~N");c$.ptNonSpace=c(c$,"ptNonSpace",function(a,b,c){for(;b<c&&(" "==a.charAt(b)||"\t"==a.charAt(b));)b++;return b},"JU.SB,~N,~N");c$.ptNonSpaceRev=c(c$,"ptNonSpaceRev",function(a,b){for(;0<=--b&&(" "==a.charAt(b)||"\t"==a.charAt(b)););return b},"JU.SB,~N")});r("JSV.tree");s(["JSV.api.JSVTree"],
"JSV.tree.SimpleTree",["JSV.common.JSVFileManager","$.PanelNode","JSV.tree.SimpleTreeModel","$.SimpleTreeNode","$.SimpleTreePath"],function(){c$=q(function(){this.selectedPath=this.vwr=this.spectraTreeModel=this.rootNode=this.si=null;n(this,arguments)},JSV.tree,"SimpleTree",null,JSV.api.JSVTree);e(c$,"getRootNode",function(){return this.rootNode});m(c$,function(a){this.vwr=a;this.rootNode=new JSV.tree.SimpleTreeNode("Spectra",null);this.spectraTreeModel=new JSV.tree.SimpleTreeModel(this.rootNode)},
"JSV.common.JSViewer");c(c$,"valueChanged",function(){this.vwr.selectedTreeNode(this.getLastSelectedPathComponent())});c(c$,"getLastSelectedPathComponent",function(){return null==this.selectedPath?null:this.selectedPath.getLastPathComponent()});e(c$,"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(c$,"setSelectionPath",
function(a){this.selectedPath=a;this.valueChanged()},"JSV.api.JSVTreePath");e(c$,"createTree",function(a,b,c){var e=this.vwr.spectraTree,f=e.getRootNode(),h=this.vwr.panelNodes,k=JSV.common.JSVFileManager.getTagName(b.getFilePath()),j=new JSV.common.PanelNode(null,k,b,null),l=new JSV.tree.SimpleTreeNode(k,j);j.setTreeNode(l);e.spectraTreeModel.insertNodeInto(l,f,f.getChildCount());for(f=0;f<c.length;f++){var j=new JSV.common.PanelNode(a+"."+(f+1),k,b,c[f]),m=new JSV.tree.SimpleTreeNode(j.toString(),
j);j.setTreeNode(m);h.addLast(j);e.spectraTreeModel.insertNodeInto(m,l,l.getChildCount())}this.vwr.selectFrameNode(c[0]);return l},"~N,JSV.source.JDXSource,~A");e(c$,"setPath",function(a){this.setSelectionPath(a)},"JSV.api.JSVTreePath");c(c$,"newTreePath",function(a){return new JSV.tree.SimpleTreePath(a)},"~A");e(c$,"deleteNodes",function(a){for(var b=0;b<a.size();b++)this.spectraTreeModel.removeNodeFromParent(a.get(b))},"JU.Lst")});r("JSV.tree");s(["java.util.Enumeration"],"JSV.tree.SimpleTreeEnumeration",
null,function(){c$=q(function(){this.node=null;this.pt=0;n(this,arguments)},JSV.tree,"SimpleTreeEnumeration",null,java.util.Enumeration);m(c$,function(a){this.node=a},"JSV.tree.SimpleTreeNode");e(c$,"hasMoreElements",function(){return this.pt<this.node.$children.size()});e(c$,"nextElement",function(){return this.node.$children.get(this.pt++)})});r("JSV.tree");c$=q(function(){this.rootNode=null;n(this,arguments)},JSV.tree,"SimpleTreeModel");m(c$,function(a){this.rootNode=a},"JSV.api.JSVTreeNode");
c(c$,"insertNodeInto",function(a,b,c){b.$children.add(c,a);a.prevNode=b},"JSV.api.JSVTreeNode,JSV.api.JSVTreeNode,~N");c(c$,"removeNodeFromParent",function(a){a.prevNode.$children.removeObj(a)},"JSV.api.JSVTreeNode");r("JSV.tree");s(["JSV.api.JSVTreeNode"],"JSV.tree.SimpleTreeNode",["JU.Lst","JSV.tree.SimpleTreeEnumeration"],function(){c$=q(function(){this.panelNode=null;this.index=0;this.text=this.$children=this.prevNode=null;n(this,arguments)},JSV.tree,"SimpleTreeNode",null,JSV.api.JSVTreeNode);
m(c$,function(a,b){this.text=a;this.panelNode=b;this.$children=new JU.Lst},"~S,JSV.common.PanelNode");e(c$,"getPanelNode",function(){return this.panelNode});e(c$,"getIndex",function(){return this.index});e(c$,"setIndex",function(a){this.index=a},"~N");e(c$,"children",function(){return new JSV.tree.SimpleTreeEnumeration(this)});e(c$,"getChildCount",function(){return this.$children.size()});e(c$,"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(c$,"isLeaf",function(){return null!=this.prevNode&&null!=this.prevNode.prevNode});e(c$,"toString",function(){return this.text})});r("JSV.tree");s(["JSV.api.JSVTreePath"],"JSV.tree.SimpleTreePath",null,function(){c$=q(function(){this.path=null;n(this,arguments)},JSV.tree,"SimpleTreePath",null,JSV.api.JSVTreePath);m(c$,function(a){this.path=a},"~A");e(c$,"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.defineStatics,Clazz.newFloatArray,Clazz.declareType,Clazz.prepareFields,Clazz.superConstructor,Clazz.newByteArray,Clazz.declareInterface,Clazz.p0p,Clazz.pu$h,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);
