/** * WorldWide Telescope Web Client * Copyright 2014-2015 Microsoft Research * Licensed under MIT (https://github.com/MSRConnections/OpenWWT-Web/blob/master/LICENSE) **/ /*! Script# Runtime * Designed and licensed for use and distribution with Script#-generated scripts. * Copyright (c) 2012, Nikhil Kothari, and the Script# Project. * More information at http://scriptsharp.com */ "use strict";!function(global){function _ss(){function _nop(){}function isValue(a){return null!==a&&void 0!==a}function _value(a){for(var b=2,c=a.length;c>b;b++)if(isValue(a[b]))return a[b];return null}function value(a,b){return isValue(a)?a:isValue(b)?b:_value(arguments)}function extend(a,b){for(var c in b)a[c]=b[c];return a}function parseBoolean(a){return"true"==a.toLowerCase()}function parseRegExp(a){if("/"==a[0]){var b=a.lastIndexOf("/");if(b>1){var c=a.substring(1,b),d=a.substr(b+1);return new RegExp(c,d)}}return null}function parseNumber(a){return a&&a.length?a.indexOf(".")>=0||a.indexOf("e")>=0||endsWith(a,"f")||endsWith(a,"F")?parseFloat(a):parseInt(a,10):0}function parseDate(a){var b=Date.parse(a);return isNaN(b)?void 0:new Date(b)}function truncate(a){return a>=0?Math.floor(a):Math.ceil(a)}function now(){return new Date}function today(){var a=new Date;return new Date(a.getFullYear(),a.getMonth(),a.getDate())}function compareDates(a,b){return a===b?!0:isValue(a)&&isValue(b)?a.getTime()==b.getTime():!1}function _popStackFrame(a){if(isValue(a.stack)&&isValue(a.fileName)&&isValue(a.lineNumber)){for(var b=a.stack.split("\n"),c=b[0],d=a.fileName+":"+a.lineNumber;isValue(c)&&-1===c.indexOf(d);)b.shift(),c=b[0];var e=b[1];if(isValue(e)){var f=e.match(/@(.*):(\d+)$/);isValue(f)&&(b.shift(),a.stack=b.join("\n"),a.fileName=f[1],a.lineNumber=parseInt(f[2],10))}}}function error(a,b,c){var d=new Error(a);if(b)for(var e in b)d[e]=b[e];return c&&(d.innerException=c),_popStackFrame(d),d}function fail(message){console.assert(!1,message),global.navigator&&eval("debugger;")}function toArray(a){return a?"string"==typeof a?JSON.parse("("+a+")"):Array.prototype.slice.call(a):null}function removeItem(a,b){var c=a.indexOf(b);return c>=0?(a.splice(c,1),!0):!1}function clearKeys(a){for(var b in a)delete a[b]}function keyExists(a,b){return void 0!==a[b]}function keys(a){if(Object.keys)return Object.keys(a);var b=[];for(var c in a)b.push(c);return b}function keyCount(a){return keys(a).length}function Enumerator(a,b){var c=-1,d=b?b.length:a.length,e=b?function(){return{key:b[c],value:a[b[c]]}}:function(){return a[c]};this.current=null,this.moveNext=function(){return c++,this.current=e(),d>c},this.reset=function(){c=-1,this.current=null}}function enumerate(a){return isValue(a)?a.getEnumerator?a.getEnumerator():void 0!==a.length?new Enumerator(a):new Enumerator(a,keys(a)):_nopEnumerator}function Stack(){this.count=0,this._items=[]}function Queue(){this.count=0,this._items=[],this._offset=0}function _cleanQueue(a){a._items=a._items.slice(a._offset),a._offset=0}function string(a,b){return"number"==typeof b?b>1?new Array(b+1).join(a):a:Array.prototype.join.call(arguments,"")}function emptyString(a){return!a||!a.length}function whitespace(a){return emptyString(a)||!a.replace(/^\s*/,"").length}function compareStrings(a,b,c){return a=a||"",b=b||"",c?(a=a.toUpperCase(),b=b.toUpperCase()):0,a===b?0:b>a?-1:1}function format(a){var b=neutralCulture,c=a,d=Array.prototype.slice.call(arguments,1);return a.constructor!=String&&(b=a,c=d[0],d=d.slice(1)),c.replace(_formatPlaceHolderRE,function(a,c){var e=parseInt(c.substr(1),10),f=d[e];if(!isValue(f))return"";var g=_formatters[typeName(f)];if(g){var h="",i=c.indexOf(":");if(i>0&&(h=c.substring(i+1,c.length-1)),h&&"i"!=h)return g(f,h,b)}return b==neutralCulture?f.toString():f.toLocaleString()})}function trim(a,b){if(b||!String.prototype.trim){b=b?b.join(""):null;var c=b?new RegExp("^["+b+"]+|["+b+"]+$","g"):/^\s+|\s+$/g;return a.replace(c,"")}return a.trim()}function trimStart(a,b){var c=b?new RegExp("^["+b.join("")+"]+"):/^\s+/;return a.replace(c,"")}function trimEnd(a,b){var c=b?new RegExp("["+b.join("")+"]+$"):/\s+$/;return a.replace(c,"")}function startsWith(a,b){return emptyString(b)?!0:emptyString(a)||b.length>a.length?!1:a.substr(0,b.length)==b}function endsWith(a,b){return emptyString(b)?!0:emptyString(a)||b.length>a.length?!1:a.substr(-b.length)==b}function padLeft(a,b,c){return a.lengtha.length?a.substr(0,b):a.substr(0,b)+a.substr(b+c)}function insertString(a,b,c){return c?b?a.substr(0,b)+c+a.substr(b):c+a:a}function replaceString(a,b,c){return a.split(b).join(c||"")}function _bindList(a){var b=function(){for(var b=arguments,c=null,d=0,e=a.length;e>d;d++)c=b.length?a[d].apply(null,b):a[d].call(null);return c};return b._fnList=a,b}function bind(a,b){if(!b)return a;var c=null;a="string"==typeof a?b[c=a]:a;var d=c?b.$$b||(b.$$b={}):null,e=d?d[c]:null;return e||(e=function(){return a.apply(b,arguments)},d&&(d[c]=e)),e}function bindAdd(a,b){if(!a)return b;if(!b)return a;var c=[].concat(a._fnList||a,b);return _bindList(c)}function bindSub(a,b){if(!a)return null;if(!b)return a;var c=a._fnList||[a],d=c.indexOf(b);return d>=0?1==c.length?null:(c=d?c.slice(0,d).concat(c.slice(d+1)):c.slice(1),_bindList(c)):a}function bindExport(a,b,c,d){c=c||"__"+(new Date).valueOf(),d=d||global;var e={name:c,detach:function(){d[c]=_nop},dispose:function(){try{delete d[c]}catch(a){d[c]=void 0}}};return d[c]=b?a:function(){return e.dispose(),a.apply(null,arguments)},e}function EventArgs(){}function CancelEventArgs(){this.cancel=!1}function IDisposable(){}function IEnumerable(){}function IEnumerator(){}function IObserver(){}function IApplication(){}function IContainer(){}function IObjectFactory(){}function IEventManager(){}function IInitializable(){}function StringBuilder(a){this._parts=isValue(a)&&""!==a?[a]:[],this.isEmpty=0==this._parts.length}function _captureObservers(a){var b=_observerStack,c=b.length;if(c){a=a||[];for(var d=0;c>d;d++){var e=b[d];a.indexOf(e)<0&&a.push(e)}return a}return null}function _invalidateObservers(a){for(var b=0,c=a.length;c>b;b++)a[b].invalidateObserver()}function Observable(a){this._v=a,this._observers=null}function ObservableCollection(a){this._items=a||[],this._observers=null}function Task(a){this._continuations=void 0!==a?(this.status="done",null):(this.status="pending",[]),this.result=a,this.error=null}function _updateTask(a,b,c){if("pending"==a.status){c?(a.error=c,a.status="failed"):(a.result=b,a.status="done");var d=a._continuations;a._continuations=null;for(var e=0,f=d.length;f>e;e++)d[e](a)}}function _joinTasks(a,b){function c(a){"pending"==g.status&&(h++,b?_updateTask(g,a):h==e&&_updateTask(g,!0))}function d(){"pending"==g.status&&(b?_updateTask(g,null):_updateTask(g,!1))}a=toArray(a);var e=a.length,f=0;e>1&&"number"==typeof a[0]&&(f=a[0],a=a.slice(1),e--),Array.isArray(a[0])&&(a=a[0],e=a.length);var g=new Task,h=0;0!=f&&setTimeout(d,f);for(var i=0;e>i;i++)a[i].continueWith(c);return g}function deferred(a){var b=new Task(a);return{task:b,resolve:function(a){_updateTask(b,a)},reject:function(a){_updateTask(b,null,a||new Error)}}}function _commaFormatNumber(a,b,c,d){var e=null,f=a.indexOf(c);f>0&&(e=a.substr(f),a=a.substr(0,f));var g=a.startsWith("-");g&&(a=a.substr(1));var h=0,i=b[h];if(a.lengthn&&(i+=n,m+=n,n=0,l=!0),!m)break;var o=a.substr(n,m);k=k.length?o+d+k:o,j-=m,h=2){var e=b[2];if(e){var f=function(){};f.prototype=e.prototype,d.prototype=new f,d.prototype.constructor=d}b[1]&&extend(d.prototype,b[1]),d.$base=e||Object,d.$interfaces=b.slice(3),d.$type=_classMarker}else d.$type=_interfaceMarker;return d.$name=a,c[a]=d}return b}function isClass(a){return a.$type==_classMarker}function isInterface(a){return a.$type==_interfaceMarker}function typeOf(a){var b;try{b=a.constructor}catch(c){}return b||Object}function type(a){var b=a.indexOf("."),c=b>0?_modules[a.substr(0,b)]:global,d=b>0?a.substr(b+1):a;return c?c[d]:null}function typeName(a){if(a instanceof Function||(a=a.constructor),a.$name)return a.$name;if(a.name)return a.name;for(var b=0,c=_typeNames.length;c>b;b+=2)if(a==_typeNames[b])return _typeNames[b+1];return"Object"}function canAssign(a,b){if(a==Object||a==b)return!0;if(a.$type==_classMarker)for(var c=b.$base;c;){if(a==c)return!0;c=c.$base}else if(a.$type==_interfaceMarker)for(var c=b;c;){var d=c.$interfaces;if(d&&d.indexOf(a)>=0)return!0;c=c.$base}return!1}function instanceOf(a,b){if(!isValue(b))return!1;if(a==Object||b instanceof a)return!0;var c=typeOf(b);return canAssign(a,c)}function canCast(a,b){return instanceOf(b,a)}function safeCast(a,b){return instanceOf(b,a)?a:null}function module(a,b,c){var d=_modules[a]={$name:a};if(b)for(var e in b)createType(e,b[e],d);var f={};if(c)for(var e in c)f[e]=createType(e,c[e],d);return f}var _nopEnumerator={current:null,moveNext:function(){return!1},reset:_nop},Stack$={clear:function(){this._items.length=0,this.count=0},contains:function(a){for(var b=this.count-1;b>=0;b--)if(this._items[b]===a)return!0;return!1},getEnumerator:function(){return new Enumerator(this._items.reverse())},peek:function(){return this._items[this.count-1]},push:function(a){this._items.push(a),this.count++},pop:function(){return this.count?(this.count--,this._items.pop()):void 0}},Queue$={clear:function(){this._items.length=0,this._offset=0,this.count=0},contains:function(a){for(var b=this._offset,c=this._items.length;c>=b;b++)if(this._items[b]===a)return!0;return!1},dequeue:function(){if(this.count){var a=this._items[this._offset];return 2*++this._offset>=this._items.length&&_cleanQueue(this),this.count--,a}return void 0},enqueue:function(a){this._items.push(a),this.count++},getEnumerator:function(){return 0!=this._offset&&_cleanQueue(this),new Enumerator(this._items)},peek:function(){return this._items.length?this._items[this._offset]:void 0}},_formatPlaceHolderRE=/(\{[^\}^\{]+\})/g,_formatters={};EventArgs.Empty=new EventArgs;var StringBuilder$={append:function(a){return isValue(a)&&""!==a&&(this._parts.push(a),this.isEmpty=!1),this},appendLine:function(a){return this.append(a),this.append("\r\n"),this.isEmpty=!1,this},clear:function(){this._parts=[],this.isEmpty=!0},toString:function(a){return this._parts.join(a||"")}},_observerStack=[],_observerRegistration={dispose:function(){_observerStack.pop()}},Observable$={getValue:function(){return this._observers=_captureObservers(this._observers),this._v},setValue:function(a){if(this._v!==a){this._v=a;var b=this._observers;b&&(this._observers=null,_invalidateObservers(b))}}};Observable.registerObserver=function(a){return _observerStack.push(a),_observerRegistration};var ObservableCollection$={get_item:function(a){return this._observers=_captureObservers(this._observers),this._items[a]},set_item:function(a,b){this._items[a]=b,this._updated()},get_length:function(){return this._observers=_captureObservers(this._observers),this._items.length},add:function(a){this._items.push(a),this._updated()},clear:function(){this._items.clear(),this._updated()},contains:function(a){return this._items.indexOf(a)>=0},getEnumerator:function(){return this._observers=_captureObservers(this._observers),this._items.getEnumerator()},indexOf:function(a){return this._items.indexOf(a)},insert:function(a,b){this._items.insert(a,b),this._updated()},remove:function(a){return this._items.remove(a)?(this._updated(),!0):!1},removeAt:function(a){this._items.splice(a,1),this._updated()},toArray:function(){return this._items},_updated:function(){var a=this._observers;a&&(this._observers=null,_invalidateObservers(a))}},Task$={get_completed:function(){return"pending"!=this.status},changeWith:function(a){var b=new Task;return this.continueWith(function(c){var d,e=c.error;if(!e)try{d=a(c)}catch(f){e=f}_updateTask(b,d,e)}),b},continueWith:function(a){if(this._continuations)this._continuations.push(a);else{var b=this;setTimeout(function(){a(b)},0)}return this},done:function(a){return this.continueWith(function(b){"done"==b.status&&a(b.result)})},fail:function(a){return this.continueWith(function(b){"failed"==b.status&&a(b.error)})},then:function(a,b){return this.continueWith(function(c){"done"==c.status?a(c.result):b(c.error)})}};Task.all=function(){return _joinTasks(arguments,!1)},Task.any=function(){return _joinTasks(arguments,!0)},Task.delay=function(a){var b=new Task;return setTimeout(function(){_updateTask(b,!0)},a),b};var neutralCulture={name:"",nf:{nan:"NaN",neg:"-",pos:"+",negInf:"-Infinity",posInf:"Infinity",gw:[3],dd:2,ds:".",gs:",",per:"%",perGW:[3],perDD:2,perDS:".",perGS:",",perPP:"{0} %",perNP:"-{0} %",cur:"$",curGW:[3],curDD:2,curDS:".",curGS:",",curNP:"(${0})",curPP:"${0}"},dtf:{am:"AM",pm:"PM",ds:"/",ts:":",gmt:"ddd, dd MMM yyyy HH:mm:ss 'GMT'",uni:"yyyy-MM-dd HH:mm:ssZ",sort:"yyyy-MM-ddTHH:mm:ss",dt:"dddd, MMMM dd, yyyy h:mm:ss tt",ld:"dddd, MMMM dd, yyyy",sd:"M/d/yyyy",lt:"h:mm:ss tt",st:"h:mm tt",day0:0,day:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],sday:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],mday:["Su","Mo","Tu","We","Th","Fr","Sa"],mon:["January","February","March","April","May","June","July","August","September","October","November","December",""],smon:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]}},currentCulture={name:"en-us",dtf:neutralCulture.dtf,nf:neutralCulture.nf};_formatters.Number=function(a,b,c){var d=c.nf,e="",f=-1;b.length>1&&(f=parseInt(b.substr(1)));var g=b.charAt(0);switch(g){case"d":case"D":e=parseInt(Math.abs(a)).toString(),-1!=f&&(e=padLeft(e,f,"0")),0>a&&(e="-"+e);break;case"x":case"X":e=parseInt(Math.abs(a)).toString(16),"X"==g&&(e=e.toUpperCase()),-1!=f&&(e=padLeft(e,f,"0"));break;case"e":case"E":e=-1==f?a.toExponential():a.toExponential(f),"E"==g&&(e=e.toUpperCase());break;case"f":case"F":case"n":case"N":if(-1==f&&(f=d.dd),e=a.toFixed(f).toString(),f&&"."!=d.ds){var h=e.indexOf(".");e=e.substr(0,h)+d.ds+e.substr(h+1)}("n"==g||"N"==g)&&(e=_commaFormatNumber(e,d.gw,d.ds,d.gs));break;case"c":case"C":if(-1==f&&(f=d.curDD),e=Math.abs(a).toFixed(f).toString(),f&&"."!=d.curDS){var h=e.indexOf(".");e=e.substr(0,h)+d.curDS+e.substr(h+1)}e=_commaFormatNumber(e,d.curGW,d.curDS,d.curGS),e=0>a?String.format(c,d.curNP,e):String.format(c,d.curPP,e);break;case"p":case"P":if(-1==f&&(f=d.perDD),e=(100*Math.abs(a)).toFixed(f).toString(),f&&"."!=d.perDS){var h=e.indexOf(".");e=e.substr(0,h)+d.perDS+e.substr(h+1)}e=_commaFormatNumber(e,d.perGW,d.perDS,d.perGS),e=0>a?String.format(c,d.perNP,e):String.format(c,d.perPP,e)}return e};var _dateFormatRE=/'.*?[^\\]'|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z/g;_formatters.Date=function(a,b,c){if("iso"==b)return a.toISOString();if("i"==b.charAt(0)){var d="String";switch(b){case"id":d="DateString";break;case"it":d="TimeString"}return c==neutralCulture?a["to"+d]():a["toLocale"+d]()}var e=c.dtf;if(1==b.length)switch(b){case"f":b=e.ld+" "+e.st;break;case"F":b=e.dt;break;case"d":b=e.sd;break;case"D":b=e.ld;break;case"t":b=e.st;break;case"T":b=e.lt;break;case"g":b=e.sd+" "+e.st;break;case"G":b=e.sd+" "+e.lt;break;case"R":case"r":e=neutralCulture.dtf,b=e.gmt;break;case"u":b=e.uni;break;case"U":b=e.dt,a=new Date(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate(),a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds());break;case"s":b=e.sort}"%"==b.charAt(0)&&(b=b.substr(1));var f=new StringBuilder;for(_dateFormatRE.lastIndex=0;;){var g=_dateFormatRE.lastIndex,h=_dateFormatRE.exec(b);if(f.append(b.slice(g,h?h.index:b.length)),!h)break;var i=h[0],j=i;switch(i){case"dddd":j=e.day[a.getDay()];break;case"ddd":j=e.sday[a.getDay()];break;case"dd":j=padLeft(a.getDate().toString(),2,"0");break;case"d":j=a.getDate();break;case"MMMM":j=e.mon[a.getMonth()];break;case"MMM":j=e.smon[a.getMonth()];break;case"MM":j=padLeft((a.getMonth()+1).toString(),2,"0");break;case"M":j=a.getMonth()+1;break;case"yyyy":j=a.getFullYear();break;case"yy":j=padLeft((a.getFullYear()%100).toString(),2,"0");break;case"y":j=a.getFullYear()%100;break;case"h":case"hh":j=a.getHours()%12,j?"hh"==i&&(j=padLeft(j.toString(),2,"0")):j="12";break;case"HH":j=padLeft(a.getHours().toString(),2,"0");break;case"H":j=a.getHours();break;case"mm":j=padLeft(a.getMinutes().toString(),2,"0");break;case"m":j=a.getMinutes();break;case"ss":j=padLeft(a.getSeconds().toString(),2,"0");break;case"s":j=a.getSeconds();break;case"t":case"tt":j=a.getHours()<12?e.am:e.pm,"t"==i&&(j=j.charAt(0));break;case"fff":j=padLeft(a.getMilliseconds().toString(),3,"0");break;case"ff":j=padLeft(a.getMilliseconds().toString(),3).substr(0,2);break;case"f":j=padLeft(a.getMilliseconds().toString(),3).charAt(0);break;case"z":j=a.getTimezoneOffset()/60,j=(j>=0?"-":"+")+Math.floor(Math.abs(j));break;case"zz":case"zzz":j=a.getTimezoneOffset()/60,j=(j>=0?"-":"+")+padLeft(Math.floor(Math.abs(j)).toString(),2,"0"),"zzz"==i&&(j+=e.ts+padLeft(Math.abs(a.getTimezoneOffset()%60).toString(),2,"0"));break;default:"'"==j.charAt(0)&&(j=j.substr(1,j.length-2).replace(/\\'/g,"'"))}f.append(j)}return f.toString()};var _modules={},_classMarker="class",_interfaceMarker="interface",_typeNames=[Number,"Number",String,"String",Boolean,"Boolean",Array,"Array",Date,"Date",RegExp,"RegExp",Function,"Function"];return extend(module("ss",null,{IDisposable:[IDisposable],IEnumerable:[IEnumerable],IEnumerator:[IEnumerator],IObserver:[IObserver],IApplication:[IApplication],IContainer:[IContainer],IObjectFactory:[IObjectFactory],IEventManager:[IEventManager],IInitializable:[IInitializable],EventArgs:[EventArgs,{}],CancelEventArgs:[CancelEventArgs,{},EventArgs],StringBuilder:[StringBuilder,StringBuilder$],Stack:[Stack,Stack$],Queue:[Queue,Queue$],Observable:[Observable,Observable$],ObservableCollection:[ObservableCollection,ObservableCollection$,null,IEnumerable],Task:[Task,Task$]}),{version:"0.8",isValue:isValue,value:value,extend:extend,keys:keys,keyCount:keyCount,keyExists:keyExists,clearKeys:clearKeys,enumerate:enumerate,array:toArray,remove:removeItem,"boolean":parseBoolean,regexp:parseRegExp,number:parseNumber,date:parseDate,truncate:truncate,now:now,today:today,compareDates:compareDates,error:error,string:string,emptyString:emptyString,whitespace:whitespace,format:format,compareStrings:compareStrings,startsWith:startsWith,endsWith:endsWith,padLeft:padLeft,padRight:padRight,trim:trim,trimStart:trimStart,trimEnd:trimEnd,insertString:insertString,removeString:removeString,replaceString:replaceString,bind:bind,bindAdd:bindAdd,bindSub:bindSub,bindExport:bindExport,deferred:deferred,module:module,modules:_modules,isClass:isClass,isInterface:isInterface,typeOf:typeOf,type:type,typeName:typeName,canCast:canCast,safeCast:safeCast,canAssign:canAssign,instanceOf:instanceOf,culture:{neutral:neutralCulture,current:currentCulture},fail:fail})}function _export(){var a=_ss();"object"==typeof exports?a.extend(exports,a):global.ss=a}global.define?global.define("ss",[],_ss):_export()}(this),window.wwtlib=function(){function a(){}function b(){}function c(){}function d(){}function e(){}function f(){}function g(){}function h(){}function i(){}function j(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w){this.l2=0,this.l3=0,this.l4=0,this.l5=0,this.l6=0,this.l7=0,this.l8=0,this.ldash=0,this.d=0,this.mdash=0,this.f=0,this.xsin=0,this.xsint=0,this.xcos=0,this.xcost=0,this.ysin=0,this.ysint=0,this.ycos=0,this.ycost=0,this.zsin=0,this.zsint=0,this.zcos=0,this.zcost=0,this.l2=a,this.l3=b,this.l4=c,this.l5=d,this.l6=e,this.l7=f,this.l8=g,this.ldash=h,this.d=i,this.mdash=j,this.f=k,this.xsin=l,this.xsint=m,this.xcos=n,this.xcost=o,this.ysin=p,this.ysint=q,this.ycos=r,this.ycost=s,this.zsin=t,this.zsint=u,this.zcos=v,this.zcost=w}function k(){}function l(){this.x=0,this.y=0,this.x=0,this.y=0}function m(){this.x=0,this.y=0,this.z=0,this.x=0,this.y=0,this.z=0}function n(){}function o(){this.year=0,this.month=0,this.day=0,this.year=0,this.month=0,this.day=0}function p(){this.m_dblJulian=0,this.m_bGregorianCalendar=!1,this.m_dblJulian=0,this.m_bGregorianCalendar=!1}function q(){}function r(){}function s(a,b,c){this.a=0,this.b=0,this.c=0,this.a=a,this.b=b,this.c=c}function t(){this.i=0,this.w=0,this.omega=0,this.i=0,this.w=0,this.omega=0}function u(){}function v(){}function w(){this.a=0,this.e=0,this.i=0,this.w=0,this.omega=0,this.jdEquinox=0,this.t=0,this.n=0,this.meanAnnomolyOut=0,this.a=0,this.e=0,this.i=0,this.w=0,this.omega=0,this.jdEquinox=0,this.t=0}function x(){this.apparentGeocentricLongitude=0,this.apparentGeocentricLatitude=0,this.apparentGeocentricDistance=0,this.apparentLightTime=0,this.apparentGeocentricRA=0,this.apparentGeocentricDeclination=0,this.apparentGeocentricLongitude=0,this.apparentGeocentricLatitude=0,this.apparentGeocentricDistance=0,this.apparentLightTime=0,this.apparentGeocentricRA=0,this.apparentGeocentricDeclination=0}function y(){this.heliocentricRectangularEquatorial=new m,this.heliocentricRectangularEcliptical=new m,this.heliocentricEclipticLongitude=0,this.heliocentricEclipticLatitude=0,this.trueGeocentricRA=0,this.trueGeocentricDeclination=0,this.trueGeocentricDistance=0,this.trueGeocentricLightTime=0,this.astrometricGeocenticRA=0,this.astrometricGeocentricDeclination=0,this.astrometricGeocentricDistance=0,this.astrometricGeocentricLightTime=0,this.elongation=0,this.phaseAngle=0,this.heliocentricEclipticLongitude=0,this.heliocentricEclipticLatitude=0,this.trueGeocentricRA=0,this.trueGeocentricDeclination=0,this.trueGeocentricDistance=0,this.trueGeocentricLightTime=0,this.astrometricGeocenticRA=0,this.astrometricGeocentricDeclination=0,this.astrometricGeocentricDistance=0,this.astrometricGeocentricLightTime=0,this.elongation=0,this.phaseAngle=0}function z(){}function A(){}function B(){}function C(){this.meanLongitude=0,this.trueLongitude=0,this.tropicalLongitude=0,this.equatorialLatitude=0,this.r=0,this.eclipticRectangularCoordinates=new m,this.trueRectangularCoordinates=new m,this.apparentRectangularCoordinates=new m,this.bInTransit=!1,this.bInOccultation=!1,this.bInEclipse=!1,this.bInShadowTransit=!1,this.apparentShadowRectangularCoordinates=new m,this.meanLongitude=0,this.trueLongitude=0,this.tropicalLongitude=0,this.equatorialLatitude=0,this.r=0,this.bInTransit=!1,this.bInOccultation=!1,this.bInEclipse=!1,this.bInShadowTransit=!1}function D(){this.satellite1=new C,this.satellite2=new C,this.satellite3=new C,this.satellite4=new C}function E(){}function F(){}function G(){}function H(){}function I(){}function J(){}function K(){}function L(){}function M(){}function N(a,b,c,d){this.d=0,this.m=0,this.mdash=0,this.f=0,this.d=a,this.m=b,this.mdash=c,this.f=d}function O(a,b){this.a=0,this.b=0,this.a=a,this.b=b}function P(){}function Q(){}function R(){}function S(a,b,c,d,e){this.d=0,this.m=0,this.f=0,this.c=0,this.t=0,this.d=a,this.m=b,this.f=c,this.c=d,this.t=e}function T(){}function U(){}function V(){}function W(a,b,c,d,e,f,g,h,i){this.d=0,this.m=0,this.mprime=0,this.f=0,this.omega=0,this.sincoeff1=0,this.sincoeff2=0,this.coscoeff1=0,this.coscoeff2=0,this.d=a,this.m=b,this.mprime=c,this.f=d,this.omega=e,this.sincoeff1=f,this.sincoeff2=g,this.coscoeff1=h,this.coscoeff2=i}function X(){this.lambda=0,this.beta=0,this.semidiameter=0,this.lambda=0,this.beta=0,this.semidiameter=0}function Y(){}function Z(){this.DE=0,this.DS=0,this.geometricw1=0,this.geometricw2=0,this.apparentw1=0,this.apparentw2=0,this.p=0,this.DE=0,this.DS=0,this.geometricw1=0,this.geometricw2=0,this.apparentw1=0,this.apparentw2=0,this.p=0}function $(){}function _(){this.DE=0,this.DS=0,this.w=0,this.p=0,this.x=0,this.k=0,this.q=0,this.d=0,this.DE=0,this.DS=0,this.w=0,this.p=0,this.x=0,this.k=0,this.q=0,this.d=0}function ab(){}function bb(){this.p=0,this.b0=0,this.l0=0,this.p=0,this.b0=0,this.l0=0}function cb(){}function db(){}function eb(a,b,c){this.j=0,this.s=0,this.p=0,this.j=a,this.s=b,this.p=c}function fb(a,b){this.a=0,this.b=0,this.a=a,this.b=b}function gb(){}function hb(){this.bValid=!1,this.rise=0,this.transit=0,this.set=0,this.bValid=!1,this.rise=0,this.transit=0,this.set=0}function ib(){}function jb(){}function kb(){this.b=0,this.bdash=0,this.p=0,this.a=0,this.b=0,this.deltaU=0,this.b=0,this.bdash=0,this.p=0,this.a=0,this.b=0,this.deltaU=0}function lb(){}function mb(){}function nb(){}function ob(){}function pb(){}function qb(){}function rb(a,b,c,d,e){this.RA=0,this.dec=0,this.distance=0,this.shadow=!1,this.eclipsed=!1,this.RA=a,this.dec=b,this.distance=c,this.shadow=d,this.eclipsed=e}function sb(a,b,c,d,e){this.bValid=!1,this.rise=0,this.transit=0,this.set=0,this.bNeverRises=!1,this.bValid=a,this.rise=b,this.transit=c,this.set=d,this.bNeverRises=e}function tb(){}function ub(a){this.count=0,this._verts=null,this.count=a}function vb(a){this.count=0,this._verts=null,this.count=a}function wb(a){this.count=0,this._verts=null,this.count=a}function xb(a){this.count=0,this._verts=null,this.count=a}function yb(a,b){this.startDate=0,this.endDate=0,this.startDate=a,this.endDate=b}function zb(){this._zBuffer=!0,this._linePoints=[],this._usingLocalCenter=!1,this.sky=!0,this.aaFix=!0,this.viewTransform=Uc.get_identity(),this._lineBuffers=[],this._lineBufferCounts=[],this.useLocalCenters=!1}function Ab(){this._zBuffer=!0,this.timeSeries=!1,this.showFarSide=!0,this.sky=!1,this.decay=0,this.useNonRotatingFrame=!1,this.jNow=0,this._linePoints=[],this._lineColors=[],this._lineDates=[],this._usingLocalCenter=!0,this._lineBuffers=[],this._lineBufferCounts=[]}function Bb(){this._trianglePoints=[],this._triangleColors=[],this._triangleDates=[],this.timeSeries=!1,this.showFarSide=!1,this.sky=!1,this.depthBuffered=!0,this.writeZbuffer=!1,this.decay=0,this.autoTime=!0,this.jNow=0,this._dataToDraw=!1,this._triangleBuffers=[],this._triangleBufferCounts=[]}function Cb(a){this._points=[],this._colors=[],this._dates=[],this._sizes=[],this.timeSeries=!1,this.showFarSide=!1,this.sky=!1,this.depthBuffered=!0,this.decay=0,this.autoTime=!0,this.jNow=0,this._dataToDraw=!1,this.items=[],this._imageReady=!1,this._init=!1,this._pointBuffers=[],this._pointBufferCounts=[],this._device=a}function Db(){this.position=new Sc,this.normal=new Sc,this.tu=0,this.tv=0}function Eb(){this.pointSize=0,this.tu=0,this.tv=0}function Fb(){}function Gb(){}function Hb(){}function Ib(){}function Jb(){}function Kb(){}function Lb(){this.imageElement=null,this.texture2d=null,this._downloading=!1,this._ready=!1,this._errored=!1,this.URL=""}function Mb(){}function Nb(){this.id=yc.newGuid(),this.loadedFromTour=!1,this.tourDocument=null,this.opacity=1,this.opened=!1,this._startTime=ss.date("01/01/2100"),this._endTime=ss.date("01/01/1900"),this._fadeSpan=0,this._fadeType=4,this.version=0,this.color=Kc.get_white(),this._enabled=!0,this.astronomical=!1}function Ob(a,b){this.markerIndex=4,this.customMarker=null,this.text=a,this.markerIndex=b}function Pb(){}function Qb(a,b){this.childMaps={},this.layers=[],this.open=!1,this.enabled=!0,this.loadedFromTour=!1,this.frame=new Vb,this.set_name(a),this.frame.reference=b;var c=6371e3;switch(b){case 0:break;case 1:break;case 2:break;case 3:c=696e6;break;case 4:c=2439700;break;case 5:c=6051800;break;case 6:c=6371e3;break;case 7:c=339e4;break;case 8:c=69911e3;break;case 9:c=58232e3;break;case 10:c=25362e3;break;case 11:c=24622e3;break;case 12:c=1161e3;break;case 13:c=1737100;break;case 14:c=1821500;break;case 15:c=1561e3;break;case 16:c=2631200;break;case 17:c=2410300;break;case 18:break;case 19:}this.frame.meanRadius=c}function Rb(){}function Sb(){this._tag=null,this._isChecked=!1,this._isEnabled=!0,this._subMenus=null}function Tb(){this._parent=null,this._level=0,this._open=!1,this._isChecked=!1,this._bold=!1,this._color=Kc.get_white(),this._nodes=null}function Ub(a,b,c,d,e){this._elements=null,this._orbitColor=Kc.get_white(),this._scale=0,this._segmentCount=0,this._elements=a,this._segmentCount=b,this._orbitColor=c,this._scale=e}function Vb(){this.meanAnomoly=0,this.orbitalYears=0,this.reference=18,this.parentsRoationalBase=!1,this.referenceFrameType=0,this.meanRadius=6371e3,this.oblateness=.0033528,this.heading=0,this.pitch=0,this.roll=0,this.scale=1,this.tilt=0,this.lat=0,this.lng=0,this.altitude=0,this.rotationalPeriod=0,this.zeroRotationDate=0,this.representativeColor=Kc.get_white(),this.showAsPoint=!1,this.showOrbitPath=!1,this.stationKeeping=!0,this.semiMajorAxis=0,this.semiMajorAxisUnits=1,this.eccentricity=0,this.inclination=0,this.argumentOfPeriapsis=0,this.longitudeOfAscendingNode=0,this.meanAnomolyAtEpoch=0,this.meanDailyMotion=0,this.epoch=0,this._orbit=null,this._elements=new w}function Wb(){this.lat=0,this.lng=0,this.alt=0}function Xb(){this.extrude=!1,this.astronomical=!1,this.meanRadius=6371e3,this.pointList=[]}function Yb(){this.guid=new yc,this.header=[],this.rows=[],this.delimiter=" ",this.locked=!1}function Zb(){}function $b(){this.height=0,this.width=0,this.lighting=!1,this._viewPoint=new Sc,this.space=!1,this._fovAngle=0,this._fovScale=0,this._nominalRadius=6378137,this.viewMover=null,this.viewCamera=new Ic,this.targetCamera=new Ic,this.alt=0,this.az=0,this.targetAlt=0,this.targetAz=0,this._targetHeight=1,this.targetAltitude=0,this._galactic=!0,this._galacticMatrix=Uc.create(-.4838350155,-.0548755604,-.8734370902,0,.7469822445,.4941094279,-.44482963,0,.4559837762,-.867666149,-.1980763734,0,0,0,0,1),this._firstTimeInit=!1,this._useSolarSystemTilt=!0,this.customTrackingParams=new Ic,this._cameraOffset=new Sc,this._fovLocal=Math.PI/4,this.perspectiveFov=Math.PI/4,this.nearPlane=0,this._frustumDirty=!0,this._frustum=new Array(6),this._skyColor="Blue";for(var a=0;6>a;a++)this._frustum[a]=new Xc(0,0,0,0)}function _b(){this.a=new Qc,this.b=new Qc,this.c=new Qc,this.normal=new Sc,this.opacity=1,this.expansionInPixels=.6,this.tileLevel=0,this._ta=new Sc,this._tb=new Sc,this._tc=new Sc,this._expandedS0=new Tc,this._expandedS1=new Tc,this._expandedS2=new Tc,this.lighting=1}function ac(){this._missedReady=!1,this.hideTourFeedback=!1,this._smoothAnimation=!1,this._showCaptions=!0}function bc(){this.autoRepeatTour=!1,this._localHorizonMode=!1,this._galacticMode=!1,this._constellationBoundryColor="blue",this._constellationSelectionColor="yellow",this._constellationFigureColor="red",this._showConstellationFigures=!0,this._showConstellationBoundries=!0,this._showConstellationSelection=!0,this._showCrosshairs=!0,this._crosshairsColor="white",this._showEcliptic=!1,this._locationLat=47.717,this._locationLng=-122.0858,this._locationAltitude=100,this._showFiledOfView=!1,this._actualPlanetScale=!0,this._fovCamera=0,this._fovEyepiece=0,this._fovTelescope=0,this._showClouds=!1,this._showGrid=!1,this._showHorizon=!0,this._showHorizonPanorama=!1,this._showMoonsAsPointSource=!0,this._showSolarSystem=!0,this._solarSystemStars=!0,this._solarSystemMilkyWay=!0,this._solarSystemCosmos=!0,this._solarSystemOrbits=!0,this._solarSystemOverlays=!0,this._solarSystemLighting=!0,this._solarSystemMultiRes=!0,this._solarSystemScale=1,this._smoothPan=!0,this._showEquatorialGridText=!1,this._showGalacticGrid=!1,this._showGalacticGridText=!1,this._showEclipticGrid=!1,this._showEclipticGridText=!1,this._showEclipticOverviewText=!1,this._showAltAzGrid=!1,this._showAltAzGridText=!1,this._showPrecessionChart=!1,this._showConstellationPictures=!1,this._showConstellationLabels=!1,this._solarSystemCMB=!0,this._solarSystemMinorPlanets=!1,this._solarSystemPlanets=!0,this._showEarthSky=!0,this._solarSystemMinorOrbits=!1,this._constellationsEnabled="",this._constellationFiguresFilter=new Oc,this._constellationBoundariesFilter=new Oc,this._constellationNamesFilter=new Oc,this._constellationArtFilter=new Oc,this._showSkyOverlays=!0,this._showConstellations=!0,this._showSkyNode=!0,this._showSkyGrids=!0,this._showSkyOverlaysIn3d=!0,this._earthCutawayView=!1,this._showISSModel=!1,this._milkyWayModel=!1,this._minorPlanetsFilter=255,this._planetOrbitsFilter=2147483647}function cc(a){this.height=128,this.items=[],this._glyphVersion=-1,this.viewTransform=Uc.get_identity(),this._textObject=new oc,this._vertCount=0,this.height=3*a}function dc(a){this.referenceCount=0,this.glyph=a,this.uvRect=new xc,this.size=new Tc,this.referenceCount=1}function ec(a){this._cellHeight=128,this._gridSize=8,this.ready=!1,this._glyphItems={},this.textObject=new oc,this._dirty=!0,this._textureDirty=!0,this._version=0,this._cellHeight=a,this._texture=Zb.loadPlanetTexture("/webclient/images/glyphs1.png"),this._webFile=new Cc("/webclient/images/glyphs1.xml"),this._webFile.onStateChange=ss.bind("_glyphXmlReady",this),this._webFile.send() }function fc(a,b,c,d,e){this.rotation=0,this.tilt=0,this.bank=0,this._matInit=!1,this.color=Kc.get_white(),this.sky=!0,this.scale=0,this.opacity=1,this.text="",this.width=1,this.height=1,this.alignment=0,this.text=c,this.up=b,this.center=a,this.scale=e,this.top=Sc.addVectors(a,Sc.scale(b,e)),0>d&&(this.sky=!1)}function gc(){}function hc(a){this.magnitude=0,this.RA=0,this.dec=0,this.BMV=0,this.absoluteMagnitude=0,this.par=0,this.distance=0;var b=a.split(",");if(this.id=b[0],this.RA=parseFloat(b[1])/15,this.dec=parseFloat(b[2]),b.length>3)try{this.magnitude=parseFloat(b[3])}catch(c){}if(b.length>4)try{this.col=Jc.load(b[4])}catch(d){}}function ic(){this._renderTriangleLists=new Array(4),this._indexBuffers=new Array(4),this.level=0,this.tileX=0,this.tileY=0,this.texture=null,this.texture2d=null,this.readyToRender=!1,this.inViewFrustum=!0,this.children=[null,null,null,null],this.parent=null,this.localCenter=new Sc,this.renderedAtOrBelowGeneration=0,this._demScaleFactor=6371e3,this.demIndex=0,this.demAverage=0,this.demReady=!1,this.texReady=!1,this.demTile=!1,this.demDownloading=!1,this.renderedGeneration=0,this.accomidation=0,this.accessCount=0,this.downloading=!1,this.geometryCreated=!1,this._isHdTile=!1,this.demSize=1089,this._topLeftScreen=new Sc,this._bottomRightScreen=new Sc,this._topRightScreen=new Sc,this._bottomLeftScreen=new Sc,this.sphereRadius=0,this.sphereCenter=new Sc,this.radius=1,this.triangleCount=0,this.requestHits=0,this.requestPending=!1,this.errored=!1,this._tileId=null,this._vertexCount=0,this._renderChildPart=null,this._renderChildPart=new Array(4);for(var a=0;4>a;a++)this._renderChildPart[a]=Hc.create(!1,500)}function jc(){}function kc(){}function lc(){this.userLevel=0,this.classification=0,this.averageRating=0,this.lengthInSecs=0,this._thumbnailUrlField=""}function mc(a,b,c,d){this.targetState=!1,this.edgeTrigger=!1,this.opacity=0,this.edgeTrigger=a,this.opacity=b,this.targetState=c,this.filter=d}function nc(){this.isDesignTimeOnly=!1,this.id=(nc.nextId++).toString(),this._owner=null,this._url="",this._linkID="",this._animate=!1,this._tweenFactor=0,this._endX=0,this._endY=0,this._endOpacity=0,this._endColor=new Jc,this._endWidth=0,this._endHeight=0,this._endRotationAngle=0,this._anchor=0,this._x=0,this._y=0,this._width=0,this._height=0,this._color=Kc.get_white(),this._opacity=.5,this._rotationAngle=0,this.currentRotation=0,this.texture=null,this._interpolationType=5}function oc(){this.bold=!1,this.italic=!1,this.underline=!1,this.fontSize=0,this.borderStyle=0}function pc(){this._tourDirty=0,this._workingDirectory="",this.url="",this._representativeThumbnailTourstop=0,this._runTime=0,this._lastDirtyCheck=0,this._orgName="None",this._level=0,this._type=0,this._taxonomy="",this._keywords="",this._objects="",this._editMode=!1,this.explicitTourLinks=[],this.implicitTourLinks=[],this._tourStops=[],this._currentTourstopIndex=-1,this.dontCleanUpTempFiles=!1,this._id=yc.newGuid().toString()}function qc(){this._overlayBlend=Hc.create(!1,1e3),this._playerState=Hc.create(!1,2e3),this._middleHover=!1,this._leftHover=!1,this._rightHover=!1,this._middleDown=!1,this._leftDown=!1,this._rightDown=!1,this._top=1,this._center=1,this._lastHit=ss.now(),this._imageCount=0,this._imageLoadCount=0,this._imagesLoaded=!1,this._downloading=!1,this._tour=null,this._onTarget=!1,this._currentMasterSlide=null,this._callStack=new ss.Stack}function rc(a,b){this.durration=0,this.master=a,this.durration=b}function sc(){this._tourStopType=0,this._keyFramed=!1,this._tweenPosition=0,this._owner=null,this._transition=0,this._nextSlide="Next",this._fadeInOverlays=!1,this._masterSlide=!1,this._duration=1e4,this._interpolationType=0,this._hasLocation=!0,this._hasTime=!0,this._startTime=gc.get_now(),this._endTime=gc.get_now(),this._actualPlanetScale=bc.get_current().get_actualPlanetScale(),this._locationAltitude=bc.get_current().get_locationAltitude(),this._locationLat=bc.get_current().get_locationLat(),this._locationLng=bc.get_current().get_locationLng(),this._showClouds=bc.get_current().get_showClouds(),this._showConstellationBoundries=bc.get_current().get_showConstellationBoundries(),this._showConstellationFigures=bc.get_current().get_showConstellationFigures(),this._showConstellationSelection=bc.get_current().get_showConstellationSelection(),this._showEcliptic=bc.get_current().get_showEcliptic(),this._showElevationModel=bc.get_current().get_showElevationModel(),this._showFieldOfView=bc.get_current().get_showFieldOfView(),this._showGrid=bc.get_current().get_showGrid(),this._showHorizon=bc.get_current().get_showHorizon(),this._showHorizonPanorama=bc.get_current().get_showHorizonPanorama(),this._showMoonsAsPointSource=bc.get_current().get_showMoonsAsPointSource(),this._showSolarSystem=bc.get_current().get_showSolarSystem(),this._fovTelescope=bc.get_current().get_fovTelescope(),this._fovEyepiece=bc.get_current().get_fovEyepiece(),this._fovCamera=bc.get_current().get_fovCamera(),this._localHorizonMode=bc.get_current().get_localHorizonMode(),this._galacticMode=bc.get_current().get_galacticMode(),this._solarSystemStars=bc.get_current().get_solarSystemStars(),this._solarSystemMilkyWay=bc.get_current().get_solarSystemMilkyWay(),this._solarSystemCosmos=bc.get_current().get_solarSystemCosmos(),this._solarSystemOrbits=bc.get_current().get_solarSystemOrbits(),this._solarSystemOverlays=bc.get_current().get_solarSystemOverlays(),this._solarSystemLighting=bc.get_current().get_solarSystemLighting(),this._solarSystemScale=bc.get_current().get_solarSystemScale(),this._solarSystemMultiRes=bc.get_current().get_solarSystemMultiRes(),this._showEquatorialGridText=bc.get_current().get_showEquatorialGridText(),this._showGalacticGrid=bc.get_current().get_showGalacticGrid(),this._showGalacticGridText=bc.get_current().get_showGalacticGridText(),this._showEclipticGrid=bc.get_current().get_showEclipticGrid(),this._showEclipticGridText=bc.get_current().get_showEclipticGridText(),this._showEclipticOverviewText=bc.get_current().get_showEclipticOverviewText(),this._showAltAzGrid=bc.get_current().get_showAltAzGrid(),this._showAltAzGridText=bc.get_current().get_showAltAzGridText(),this._showPrecessionChart=bc.get_current().get_showPrecessionChart(),this._showConstellationPictures=bc.get_current().get_showConstellationPictures(),this._showConstellationLabels=bc.get_current().get_showConstellationLabels(),this._solarSystemCMB=bc.get_current().get_solarSystemCMB(),this._solarSystemMinorPlanets=bc.get_current().get_solarSystemMinorPlanets(),this._solarSystemPlanets=bc.get_current().get_solarSystemPlanets(),this._showEarthSky=bc.get_current().get_showEarthSky(),this._solarSystemMinorOrbits=bc.get_current().get_solarSystemMinorOrbits(),this._constellationsEnabled="",this._constellationFiguresFilter=bc.get_current().get_constellationFiguresFilter().clone(),this._constellationBoundariesFilter=bc.get_current().get_constellationBoundariesFilter().clone(),this._constellationNamesFilter=bc.get_current().get_constellationNamesFilter().clone(),this._constellationArtFilter=bc.get_current().get_constellationArtFilter().clone(),this._showSkyOverlays=bc.get_current().get_showSkyOverlays(),this._showConstellations=bc.get_current().get_showConstellations(),this._showSkyNode=bc.get_current().get_showSkyNode(),this._showSkyGrids=bc.get_current().get_showSkyGrids(),this._showSkyOverlaysIn3d=bc.get_current().get_showSkyOverlaysIn3d(),this._earthCutawayView=bc.get_current().get_earthCutawayView(),this._showISSModel=bc.get_current().get_showISSModel(),this._milkyWayModel=bc.get_current().get_milkyWayModel(),this._minorPlanetsFilter=bc.get_current().get_minorPlanetsFilter(),this._planetOrbitsFilter=bc.get_current().get_planetOrbitsFilter(),this._thumbnailString="",this._thumbnail=null,this.layers={},this._overlays=[],this._musicTrack=null,this._voiceTrack=null,this._id=yc.newGuid().toString()}function tc(){this.id=yc.newGuid(),this.startOpacity=1,this.endOpacity=1,this.frameOpacity=1,this.startParams=new Array(0),this.endParams=new Array(0),this.frameParams=new Array(0)}function uc(){this.a=0,this.b=0,this.c=0,this.a=-1,this.b=-1,this.c=-1}function vc(){}function wc(){}function xc(){this.x=0,this.y=0,this.width=0,this.height=0}function yc(){this._guid=(yc._nextId++).toString()}function zc(){}function Ac(){this.table=[],this.items=[],this._imageReady=!1,this._dateColumn=0,this._latColumn=1,this._lngColumn=2,this._depthColumn=3,this._magColumn=4}function Bc(){this.size=0}function Cc(a){this._state=0,this._url=a}function Dc(){}function Ec(){this.uiController=null,this._annotations=[],this.layers=[],this._frameCount=0,this._zoomMax=360,this._zoomMaxSolarSystem=1e16,this._zoomMin=.001373291015625,this._zoomMinSolarSystem=1e-4,this.constellation="UMA",this.renderType=2,this._milkyWayBackground=null,this._foregroundCanvas=null,this._fgDevice=null,this._beginZoom=1,this._hoverText="",this._hoverTextPoint=new Tc,this._lastMouseMove=new Date(1900,1,0,0,0,0,0),this._isPintching=!1,this._pointerIds=new Array(2),this._dragging=!1,this._rect=new Array(2),this._mouseDown=!1,this._lastX=0,this._lastY=0,this._moved=!1,this._tracking=!1,this._trackingObject=null,this._solarSystemTrack=65536,this._moving=!1,this._targetStudyImageset=null,this._targetBackgroundImageset=null,this._tour=null}function Fc(a,b){this.offsetX=0,this.offsetY=0,this.offsetX=a,this.offsetY=b}function Gc(){this._opacity=1,this._showHoverLabel=!1}function Hc(){this._state=!1,this._targetState=!1,this._delayTime=0,this._switchedTime=new Date(1990,0,0,0,0,0,0),this._state=!1,this._targetState=this._state,this._delayTime=1e3}function Ic(){this.lat=0,this.lng=0,this.zoom=0,this.rotation=0,this.angle=0,this.raDec=!1,this.opacity=0,this.target=0,this.zoom=360,this.viewTarget=new Sc}function Jc(){this.a=255,this.b=255,this.g=255,this.r=255,this.name=""}function Kc(){}function Lc(){this._pointCount=0,this._boundry=!1,this._noInterpollation=!1,this.readOnly=!1,this.radius=1,this._drawCount=0,this._constellationVertexBuffers={}}function Mc(a){this._name=a,this.points=[]}function Nc(a,b,c,d){this.RA=0,this.dec=0,this.pointType=0,this.name=null,this.RA=a,this.dec=b,this.pointType=c,this.name=d}function Oc(){this.bits=new Array(3),this.oldBits=new Array(3),this.blendState=Hc.create(!1,1e3),this.internal=!1,this.settingsOwned=!1;for(var a=0;3>a;a++)this.bits[a]=~this.bits[a],this.oldBits[a]=this.bits[a]}function Pc(a,b){this._ascention=0,this._declination=0,this._ascention=a+80*Math.PI%(2*Math.PI),this._declination=b}function Qc(){this.tu=0,this.tv=0,this.position=new Sc}function Rc(){this.tu=0,this.tv=0,this.position=new Sc}function Sc(){this.x=0,this.y=0,this.z=0}function Tc(){this.x=0,this.y=0}function Uc(){this._m11=0,this._m12=0,this._m13=0,this._m14=0,this._m21=0,this._m22=0,this._m23=0,this._m24=0,this._m31=0,this._m32=0,this._m33=0,this._m34=0,this._offsetX=0,this._offsetY=0,this._offsetZ=0,this._m44=0,this._isNotKnownToBeIdentity=!1}function Vc(){this.m11=1,this.m12=0,this.m13=0,this.m21=0,this.m22=1,this.m23=0,this.m31=0,this.m32=0,this.m33=1}function Wc(){}function Xc(a,b,c,d){this.a=0,this.b=0,this.c=0,this.d=0,this.a=a,this.b=b,this.c=c,this.d=d}function Yc(a,b,c,d){this.x=0,this.y=0,this.z=0,this.w=0,this.x=a,this.y=b,this.z=c,this.w=d}function Zc(){this.x=0,this.y=0,this.z=0,this.nx=0,this.ny=0,this.nz=0,this.tu=0,this.tv=0,this.tu1=0,this.tv1=0}function $c(){this.radius=0}function _c(){}function ad(){this.parent=null,this.isProxy=!1,this._versionDependent=!1,this._readOnly=!0,this._dirty=!1,this._thumbnail=null,this._proxyFolder=null,this._lastUpdate=new Date,this._childList=[],this._itemsField=[],this._imagesets=[],this._tours=[],this._folders=[],this._places=[],this._groupField=0,this._refreshTypeField=0,this._refreshTypeFieldSpecified=!1,this._browseableField=!0,this._browseableFieldSpecified=!1,this._searchableField=!1,this._typeField=0,this._communityIdField=0,this._componentIdField=0,this._permissionField=0}function bd(){this._items=[],this.top=10,this.left=10,this._indexTouchDown=-1,this._mouseDown=!1,this._lastX=0,this._lastY=0,this._ignoreClick=!1,this._thumbnailSize=0,this._horzSpacing=110,this._vertSpacing=75,this._thumbHeight=65,this._thumbWidth=110,this._horzMultiple=110,this._rowCount=1,this._colCount=6,this._dragging=!1,this._startIndex=0,this._startOffset=0,this._selectedItem=-1,this._hoverItem=-1,this.showAddButton=!1,this.width=0,this.height=0,this._addButtonHover=!1,this.imageClicked=!1}function cd(){this.parent=null,this._bounds=new xc}function dd(){this._projection=0,this._imageSetID=0,this._baseTileDegrees=0,this._widthFactor=1,this.demUrl="",this._levels=0,this._mercator=!1,this._bottomsUp=!1,this._baseLevel=1,this._quadTreeTileMap="0123",this._centerX=0,this._centerY=0,this._rotation=0,this._meanRadius=0,this._dataSetType=0,this._bandPass=3,this._altUrl="",this._singleImage=!1,this._matrixComputed=!1,this._name="",this._sparse=!1,this._thumbnailUrl="",this._generic=!1,this._defaultSet=!1,this._elevationModel=!1,this._offsetX=0,this._offsetY=0}function ed(a,b,c,d,e,f){this.interpolationType=0,this.fastDirectionMove=!1,this._toTargetTime=0,this._dateTimeSpan=0,this._complete=!1,this._midpointFired=!1,this.interpolationType=f,Math.abs(a.lng-b.lng)>180&&(a.lng>b.lng?a.lng-=360:a.lng+=360),this._fromDateTime=d,this._toDateTime=e,this._dateTimeSpan=e-d,this._from=a.copy(),this._to=b.copy(),this._fromTime=ss.now(),this._toTargetTime=c}function fd(){this._upTargetTime=0,this._downTargetTime=0,this._toTargetTime=0,this._upTimeFactor=.6,this._downTimeFactor=.6,this._travelTimeFactor=7,this._midpointFired=!1,this._complete=!1}function gd(){}function hd(){this._camParams=Ic.create(0,0,-1,0,0,100),this._location3d=Sc.create(0,0,0),this.htmlDescription="",this._constellation="",this._classification=1048576,this._type=2,this._magnitude=0,this._distnace=0,this.angularSize=60,this._thumbNail=null,this._studyImageset=null,this._backgroundImageSet=null,this._searchDistance=0,this._elevation=50}function id(){}function jd(){this._triangleList$1=null,this._latStart$1=0,this._lngStart$1=0,this._latEnd$1=0,this._lngEnd$1=0,this._width$1=4,this._percentComplete$1=100,Nb.call(this)}function kd(){Nb.call(this)}function ld(){Nb.call(this)}function md(){this.isLongIndex=!1,this.shapeVertexCount=0,this.lines=!1,this.latColumn=-1,this.fixedSize=1,this.decay=16,this.timeSeries=!1,this._dynamicData$1=!1,this._autoUpdate$1=!1,this._dataSourceUrl$1="",this._beginRange$1=new Date("1/1/2100"),this._endRange$1=new Date("01/01/1800"),this.markerDomainValues={},this.colorDomainValues={},this._coordinatesType$1=0,this.lngColumn=-1,this.geometryColumn=-1,this._xAxisColumn$1=-1,this._yAxisColumn$1=-1,this._zAxisColumn$1=-1,this._xAxisReverse$1=!1,this._yAxisReverse$1=!1,this._zAxisReverse$1=!1,this._altType$1=3,this._markerMix$1=0,this._raUnits$1=0,this._colorMap$1=3,this._markerColumn$1=-1,this._colorMapColumn$1=-1,this._plotType$1=0,this._markerIndex$1=0,this._showFarSide$1=!1,this._markerScale$1=1,this._altUnit$1=1,this._cartesianScale$1=1,this._cartesianCustomScale$1=1,this.altColumn=-1,this.startDateColumn=-1,this.endDateColumn=-1,this.sizeColumn=-1,this.nameColumn=0,this._hyperlinkFormat$1="",this._hyperlinkColumn$1=-1,this.scaleFactor=1,this.pointScaleType=1,this.positions=[],this.bufferIsFlat=!1,this.baseDate=new Date(2010,0,1,12,0,0),this.dirty=!0,Nb.call(this)}function nd(){this._topDown$1=!0,this.backslash=!1,this._vertexList$1=null,this._childTriangleList$1=null,this._stars$1=[],this._subDivisionLevel$1=4,this._subDivided$1=!1,ic.call(this)}function od(){this.pixelCenterX=0,this.pixelCenterY=0,this.latCenter=0,this.lngCenter=0,this.rotation=0,this.scaleX=.01,this.scaleY=.01,this.height=0,this.width=0,this._vertexList$1=null,this._childTriangleList$1=null,ic.call(this)}function pd(){this._topDown$1=!0,ic.call(this)}function qd(){this._topDown$1=!0,this.backslash=!1,this._vertexList$1=null,this._childTriangleList$1=null,this._subDivisionLevel$1=4,this._subDivided$1=!1,ic.call(this)}function rd(){this._textureReady$1=!1,nc.call(this)}function sd(){nc.call(this)}function td(){this._shapeType$1=1,nc.call(this)}function ud(){this._audio$1=null,this._volume$1=100,this._mute$1=!1,this._position$1=0,this._audioReady$1=!1,this._trackType$1=0,nc.call(this),this.isDesignTimeOnly=!0}function vd(){this._loopType$1=1,this._startFrame$1=0,this._framesList$1=[],this._frames$1=1,this._framesX$1=8,this._framesY$1=8,this._textureReady$1=!1,this._currentFrame$1=0,this._cellHeight$1=256,this._cellWidth$1=256,this._timeStart$1=ss.now(),this._playing$1=!0,nc.call(this)}function wd(){this._fill$1=!1,this._skyRelative$1=!1,this._strokeWidth$1=1,this._radius$1=10,this._lineColor$1=Kc.get_white(),this._fillColor$1=Kc.get_white(),this._ra$1=0,this._dec$1=0,Gc.call(this)}function xd(){this._points$1=[],this._fill$1=!1,this._strokeWidth$1=1,this._lineColor$1=Kc.get_white(),this._fillColor$1=Kc.get_white(),Gc.call(this)}function yd(){this._points$1=[],this._strokeWidth$1=1,this._lineColor$1=Kc.get_white(),Gc.call(this)}function zd(){this._tileDegrees$1=0,this._topDown$1=!0,this._subDivisionLevel$1=1,ic.call(this)}function Ad(){this._tileDegrees$1=0,this._latMin$1=0,this._latMax$1=0,this._lngMin$1=0,this._lngMax$1=0,this._subDivisionLevel$1=32,ic.call(this)}function Bd(){this._dataDirty$2=!1,this._barChartBitmask$2=0,this._barScaleFactor$2=20,this._meanRadius$2=6371e3,this._table$2=new Yb,md.call(this)}function Cd(a){ss.EventArgs.call(this),this.set_caption(a)}function Dd(a,b,c){this._ra$2=0,this._dec$2=0,this._zoom$2=0,ss.EventArgs.call(this),this.set_RA(15*a),this.set_dec(b),this.set_zoom(c/6)}function Ed(a,b,c){this._ra$2=0,this._dec$2=0,ss.EventArgs.call(this),this.set_RA(15*a),this.set_dec(b),this.set_id(c)}function Fd(a){ss.EventArgs.call(this),this._url$2=a}var Gd={SUNDAY:0,MONDAY:1,TUESDAY:2,WEDNESDAY:3,THURSDAY:4,FRIDAY:5,SATURDAY:6},Hd={SUN:0,MERCURY:1,VENUS:2,MARS:3,JUPITER:4,SATURN:5,URANUS:6,NEPTUNE:7,PLUTO:8},Id={none:0,counterClockwise:2,clockwise:1},Jd={linear:0,power:1,log:2,constant:3,stellarMagnitude:4},Kd={meters:1,feet:2,inches:3,miles:4,kilometers:5,astronomicalUnits:6,lightYears:7,parsecs:8,megaParsecs:9,custom:10},Ld={fadeIn:1,fadeOut:2,both:3,none:4},Md={sky:0,ecliptic:1,galactic:2,sun:3,mercury:4,venus:5,earth:6,mars:7,jupiter:8,saturn:9,uranus:10,neptune:11,pluto:12,moon:13,io:14,europa:15,ganymede:16,callisto:17,custom:18,identity:19},Nd={fixedSherical:0,orbital:1,trajectory:2},Od={spherical:0,rectangular:1,orbital:2},Pd={depth:0,altitude:1,distance:2,seaLevel:3,terrain:4},Qd={same_For_All:0},Rd={same_For_All:0,group_by_Values:2,per_Column_Literal:3},Sd={gaussian:0,point:1,circle:2,pushPin:3},Td={screen:0,world:1},Ud={hours:0,degrees:1},Vd={center:0,left:1},Wd={empty:0,equatorialGrid:1,equatorialGridText:2,galacticGrid:3,galacticGridText:4,eclipticGrid:5,eclipticGridText:6,eclipticOverview:7,eclipticOverviewText:8,precessionChart:9,altAzGrid:10,altAzGridText:11,constellationFigures:12,constellationBoundaries:13,constellationFocusedOnly:14,constellationNames:15,constellationPictures:16,fadeToBlack:17,fadeToLogo:18,fadeToGradient:19,screenBroadcast:20,fadeRemoteOnly:21,skyGrids:22,constellations:23,solarSystemStars:24,solarSystemMilkyWay:25,solarSystemCosmos:26,solarSystemOrbits:27,solarSystemPlanets:28,solarSystemAsteroids:29,solarSystemLighting:30,solarSystemMinorOrbits:31,showEarthCloudLayer:32,showElevationModel:33,showAtmosphere:34,multiResSolarSystemBodies:35,auroraBorialis:36,earthCutAway:37,showSolarSystem:38,clouds8k:39,filedOfView:40,showISSModel:41,solarSystemCMB:42,mpcZone1:43,mpcZone2:44,mpcZone3:45,mpcZone4:46,mpcZone5:47,mpcZone6:48,mpcZone7:49,orbitFilters:50},Xd={sky:0,screen:1},Yd={music:0,voice:1},Zd={circle:0,rectagle:1,star:2,donut:3,arrow:4,line:5,openRectagle:6},$d={loop:0,upDown:1,down:2,upDownOnce:3,once:4,begin:5,end:6},_d={none:0,tight:1,small:2,medium:3,large:4},ae={beginner:0,intermediate:1,advanced:2,educator:3,professional:4},be={pending:0,received:1,error:2},ce={sun:0,mercury:1,venus:2,mars:3,jupiter:4,saturn:5,uranus:6,neptune:7,pluto:8,moon:9,io:10,europa:11,ganymede:12,callisto:13,ioShadow:14,europaShadow:15,ganymedeShadow:16,callistoShadow:17,sunEclipsed:18,earth:19,custom:20,undefined:65536},de={linear:0,easeIn:1,easeOut:2,easeInOut:3,exponential:4,defaultV:5},ee={move:0,line:1,dash:2,start:3},fe={slash:0,backslash:1,top:2},ge={explorer:0,tour:1,search:2,constellation:3,view:4,goTo:5,community:6,context:7,voTable:8,imageStack:9},he={interval:0,conditionalGet:1,viewChange:2},ie={earth:0,planet:1,sky:2,panorama:3},je={small:0,big:1},ke={mercator:0,equirectangular:1,tangent:2,tan:2,toast:3,spherical:4,skyImage:5,plotted:6},le={earth:0,planet:1,sky:2,panorama:3,solarSystem:4,sandbox:5},me={gamma:0,xRay:1,ultraviolet:2,visible:3,hydrogenAlpha:4,IR:4,microwave:5,radio:6,visibleNight:6},ne={star:1,supernova:2,blackHole:4,neutronStar:8,doubleStar:16,multipleStars:32,asterism:64,constellation:128,openCluster:256,globularCluster:512,nebulousCluster:1024,nebula:2048,emissionNebula:4096,planetaryNebula:8192,reflectionNebula:16384,darkNebula:32768,giantMolecularCloud:65536,supernovaRemnant:131072,interstellarDust:262144,quasar:524288,galaxy:1048576,spiralGalaxy:2097152,irregularGalaxy:4194304,ellipticalGalaxy:8388608,knot:16777216,plateDefect:33554432,clusterOfGalaxies:67108864,otherNGC:134217728,unidentified:268435456,solarSystem:536870912,unfiltered:1073741823,stellar:63,stellarGroupings:2032,nebulae:523264,galactic:133693440,other:436207616};i.earthVelocity=function(a){for(var b=(a-2451545)/36525,c=3.1761467+1021.3285546*b,d=1.7534703+628.3075849*b,e=6.2034809+334.0612431*b,f=.5995465+52.9690965*b,g=.8740168+21.3299095*b,i=5.4812939+7.4781599*b,j=5.3118863+3.8133036*b,k=3.8103444+8399.6847337*b,l=5.1984667+7771.3771486*b,n=2.3555559+8328.6914289*b,o=1.6279052+8433.4661601*b,p=new m,q=h.g_ACft.length,r=0;q>r;r++){var s=h.g_ACft[r].l2*c+h.g_ACft[r].l3*d+h.g_ACft[r].l4*e+h.g_ACft[r].l5*f+h.g_ACft[r].l6*g+h.g_ACft[r].l7*i+h.g_ACft[r].l8*j+h.g_ACft[r].ldash*k+h.g_ACft[r].d*l+h.g_ACft[r].mdash*n+h.g_ACft[r].f*o;p.x+=(h.g_ACft[r].xsin+h.g_ACft[r].xsint*b)*Math.sin(s),p.x+=(h.g_ACft[r].xcos+h.g_ACft[r].xcost*b)*Math.cos(s),p.y+=(h.g_ACft[r].ysin+h.g_ACft[r].ysint*b)*Math.sin(s),p.y+=(h.g_ACft[r].ycos+h.g_ACft[r].ycost*b)*Math.cos(s),p.z+=(h.g_ACft[r].zsin+h.g_ACft[r].zsint*b)*Math.sin(s),p.z+=(h.g_ACft[r].zcos+h.g_ACft[r].zcost*b)*Math.cos(s)}return p},i.eclipticAberration=function(a,b,c){var d=new l,e=(c-2451545)/36525,f=e*e,g=.016708634-42037e-9*e-1.267e-7*f,h=102.93735+1.71946*e+46e-5*f,i=20.49552,j=ob.geometricEclipticLongitude(c);return h=n.d2R(h),a=n.d2R(a),b=n.d2R(b),j=n.d2R(j),d.x=(-i*Math.cos(j-a)+g*i*Math.cos(h-a))/Math.cos(b)/3600,d.y=-i*Math.sin(b)*(Math.sin(j-a)-g*Math.sin(h-a))/3600,d},i.equatorialAberration=function(a,b,c){a=n.d2R(15*a),b=n.d2R(b);var d=Math.cos(a),e=Math.sin(a),f=Math.cos(b),g=Math.sin(b),h=i.earthVelocity(c),j=new l;return j.x=n.r2H((h.y*d-h.x*e)/(17314463350*f)),j.y=n.r2D(-(((h.x*d+h.y*e)*g-h.z*f)/17314463350)),j};var oe={},pe={};k.separation=function(a,b,c,d){b=n.d2R(b),d=n.d2R(d),a=n.h2R(a),c=n.h2R(c);var e=Math.cos(b)*Math.sin(d)-Math.sin(b)*Math.cos(d)*Math.cos(c-a),f=Math.cos(d)*Math.sin(c-a),g=Math.sin(b)*Math.sin(d)+Math.cos(b)*Math.cos(d)*Math.cos(c-a),h=Math.atan2(Math.sqrt(e*e+f*f),g);return h=n.r2D(h),0>h&&(h+=180),h},k.positionAngle=function(a,b,c,d){var e,f,g,h;f=n.d2R(b),h=n.d2R(d),e=n.h2R(a),g=n.h2R(c);var i=e-g,j=Math.cos(h)*Math.tan(f)-Math.sin(h)*Math.cos(i),k=Math.sin(i),l=Math.atan2(k,j);return l=n.r2D(l)},k.distanceFromGreatArc=function(a,b,c,d,e,f){b=n.d2R(b),d=n.d2R(d),f=n.d2R(f),a=n.h2R(a),c=n.h2R(c),e=n.h2R(e);var g=Math.cos(b)*Math.cos(a),h=Math.cos(d)*Math.cos(c),i=Math.cos(b)*Math.sin(a),j=Math.cos(d)*Math.sin(c),k=Math.sin(b),l=Math.sin(d),m=i*l-k*j,o=k*h-g*l,p=g*j-i*h,q=Math.tan(e),r=Math.tan(f)/Math.cos(e),s=Math.asin((m+o*q+p*r)/(Math.sqrt(m*m+o*o+p*p)*Math.sqrt(1+q*q+r*r)));return s=n.r2D(s),0>s&&(s=Math.abs(s)),s};var qe={};l.create=function(a,b){var c=new l;return c.x=a,c.y=b,c};var re={};m.create=function(a,b,c){var d=new m;return d.x=a,d.y=b,d.z=c,d};var se={};n.eq2Ec=function(a,b,c){a=n.h2R(a),b=n.d2R(b),c=n.d2R(c);var d=new l;return d.x=n.r2D(Math.atan2(Math.sin(a)*Math.cos(c)+Math.tan(b)*Math.sin(c),Math.cos(a))),d.x<0&&(d.x+=360),d.y=n.r2D(Math.asin(Math.sin(b)*Math.cos(c)-Math.cos(b)*Math.sin(c)*Math.sin(a))),d},n.ec2Eq=function(a,b,c){a=n.d2R(a),b=n.d2R(b),c=n.d2R(c);var d=new l;return d.x=n.r2H(Math.atan2(Math.sin(a)*Math.cos(c)-Math.tan(b)*Math.sin(c),Math.cos(a))),d.x<0&&(d.x+=24),d.y=n.r2D(Math.asin(Math.sin(b)*Math.cos(c)+Math.cos(b)*Math.sin(c)*Math.sin(a))),d},n.eq2H=function(a,b,c){a=n.h2R(a),b=n.d2R(b),c=n.d2R(c);var d=new l;return d.x=n.r2D(Math.atan2(Math.sin(a),Math.cos(a)*Math.sin(c)-Math.tan(b)*Math.cos(c))),d.x<0&&(d.x+=360),d.y=n.r2D(Math.asin(Math.sin(c)*Math.sin(b)+Math.cos(c)*Math.cos(b)*Math.cos(a))),d},n.h2Eq=function(a,b,c){a=n.d2R(a),b=n.d2R(b),c=n.d2R(c);var d=new l;return d.x=n.r2H(Math.atan2(Math.sin(a),Math.cos(a)*Math.sin(c)+Math.tan(b)*Math.cos(c))),d.x<0&&(d.x+=24),d.y=n.r2D(Math.asin(Math.sin(c)*Math.sin(b)-Math.cos(c)*Math.cos(b)*Math.cos(a))),d},n.eq2G=function(a,b){a=192.25-n.h2D(a),a=n.d2R(a),b=n.d2R(b);var c=new l;return c.x=n.r2D(Math.atan2(Math.sin(a),Math.cos(a)*Math.sin(n.d2R(27.4))-Math.tan(b)*Math.cos(n.d2R(27.4)))),c.x=303-c.x,c.x>=360&&(c.x-=360),c.y=n.r2D(Math.asin(Math.sin(b)*Math.sin(n.d2R(27.4))+Math.cos(b)*Math.cos(n.d2R(27.4))*Math.cos(a))),c},n.g2Eq=function(a,b){a-=123,a=n.d2R(a),b=n.d2R(b);var c=new l;return c.x=n.r2D(Math.atan2(Math.sin(a),Math.cos(a)*Math.sin(n.d2R(27.4))-Math.tan(b)*Math.cos(n.d2R(27.4)))),c.x+=12.25,c.x<0&&(c.x+=360),c.x=n.d2H(c.x),c.y=n.r2D(Math.asin(Math.sin(b)*Math.sin(n.d2R(27.4))+Math.cos(b)*Math.cos(n.d2R(27.4))*Math.cos(a))),c},n.d2R=function(a){return.0174532925199433*a},n.r2D=function(a){return 57.2957795130823*a},n.r2H=function(a){return 3.81971863420549*a},n.h2R=function(a){return.261799387799149*a},n.h2D=function(a){return 15*a},n.d2H=function(a){return a/15},n.PI=function(){return 3.14159265358979},n.m360=function(a){return a-360*Math.floor(a/360)},n.m24=function(a){return a-24*Math.floor(a/24)},n.dmS2D=function(a,b,c){return n.dmS2Dp(a,b,c,!0)},n.dmS2Dp=function(a,b,c,d){return d?a+b/60+c/3600:-a-b/60-c/3600};var te={};o.create=function(a,b,c){var d=new o;return d.year=a,d.month=b,d.day=c,d};var ue={};p.create=function(a,b,c,d){var e=new p;return e.set(a,b,c,0,0,0,d),e},p.createHMS=function(a,b,c,d,e,f,g){var h=new p;return h.set(a,b,c,d,e,f,g),h},p.createJD=function(a,b){var c=new p;return c.setJD(a,b),c},p.dateToJD=function(a,b,c,d){var e=a,f=b;3>f&&(e-=1,f+=12);var g=0,h=0;return d&&(g=ss.truncate(e/100),h=2-g+ss.truncate(g/4)),ss.truncate(365.25*(e+4716))+ss.truncate(30.6001*(f+1))+c+h-1524.5},p.isLeap=function(a,b){return b?a%100?a%4?!1:!0:a%400?!1:!0:a%4?!1:!0},p.afterPapalReform=function(a,b,c){return a>1582||1582===a&&b>10||1582===a&&10===b&&c>=15},p.afterPapalReformJD=function(a){return a>=2299160.5},p.dayOfYearJD=function(a,b,c){return a-p.dateToJD(b,1,1,c)+1},p.daysInMonthForMonth=function(a,b){var c=[31,28,31,30,31,30,31,31,30,31,30,31,0];return b&&c[1]++,c[a-1]},p.INT=function(a){return ss.truncate(a>=0?a:a-1)};var ve={julian:function(){return this.m_dblJulian},day:function(){var a=this.get();return ss.truncate(a[2])},month:function(){var a=this.get();return ss.truncate(a[1])},year:function(){var a=this.get();return ss.truncate(a[0])},hour:function(){var a=this.get();return ss.truncate(a[3])},minute:function(){var a=this.get();return ss.truncate(a[4])},second:function(){var a=this.get();return ss.truncate(a[5])},set:function(a,b,c,d,e,f,g){var h=c+d/24+e/1440+f/86400;this.setJD(p.dateToJD(a,b,h,g),g)},setJD:function(a,b){this.m_dblJulian=a,this.setInGregorianCalendar(b)},setInGregorianCalendar:function(a){var b=this.m_dblJulian>=2299160.5;this.m_bGregorianCalendar=a&&b},get:function(){var a,b,c,d,e,f,g,h=this.m_dblJulian+.5,i=Math.floor(h),j=h-i,k=ss.truncate(i);if(this.m_bGregorianCalendar){var l=ss.truncate((k-1867216.25)/36524.25);g=k+1+l-ss.truncate(l/4)}else g=k;var m=g+1524,n=ss.truncate((m-122.1)/365.25),o=ss.truncate(365.25*n),p=ss.truncate((m-o)/30.6001),q=m-o-ss.truncate(30.6001*p)+j;return c=ss.truncate(q),b=14>p?p-1:p-13,a=b>2?n-4716:n-4715,i=Math.floor(q),j=q-i,d=ss.truncate(24*j),e=ss.truncate(1440*(j-d/24)),f=86400*(j-d/24-e/1440),[a,b,c,d,e,f]},dayOfWeek:function(){return ss.truncate(this.m_dblJulian+1.5)%7},dayOfYear:function(){var a=ss.truncate(this.get()[0]);return p.dayOfYearJD(this.m_dblJulian,a,p.afterPapalReform(a,1,1))},daysInMonth:function(){var a=this.get(),b=ss.truncate(a[0]),c=ss.truncate(a[1]);return p.daysInMonthForMonth(c,p.isLeap(b,this.m_bGregorianCalendar))},daysInYear:function(){var a=this.get(),b=ss.truncate(a[0]);return p.isLeap(b,this.m_bGregorianCalendar)?366:365},leap:function(){return p.isLeap(this.year(),this.m_bGregorianCalendar)},inGregorianCalendar:function(){return this.m_bGregorianCalendar},fractionalYear:function(){{var a,b=this.get(),c=ss.truncate(b[0]);ss.truncate(b[1]),ss.truncate(b[2]),ss.truncate(b[3]),ss.truncate(b[4]),b[5]}return a=p.isLeap(c,this.m_bGregorianCalendar)?366:365,c+(this.m_dblJulian-p.dateToJD(c,1,1,p.afterPapalReform(c,1,1)))/a}};q.deltaT=function(a){var b,c=p.createJD(a,p.afterPapalReformJD(a)),d=c.fractionalYear(),e=(d-2e3)/100;if(948>d)b=2177+497*e+44.1*e*e;else if(1620>d)b=102+102*e+25.3*e*e;else if(1998>d){var f=ss.truncate((d-1620)/2);d=d/2-f-810,b=h.deltaTTable[f]+(h.deltaTTable[f+1]-h.deltaTTable[f])*d}else if(2e3>=d){var g=h.deltaTTable.length;b=h.deltaTTable[g-1]}else b=2100>d?102+102*e+25.3*e*e+.37*(d-2100):102+102*e+25.3*e*e;return b};var we={};r.eclipticLongitude=function(a){var b,c=(a-2451545)/365250,d=c*c,e=d*c,f=e*c,g=f*c,i=h.g_L0EarthCoefficients.length,j=0;for(b=0;i>b;b++)j+=h.g_L0EarthCoefficients[b].a*Math.cos(h.g_L0EarthCoefficients[b].b+h.g_L0EarthCoefficients[b].c*c);var k=h.g_L1EarthCoefficients.length,l=0;for(b=0;k>b;b++)l+=h.g_L1EarthCoefficients[b].a*Math.cos(h.g_L1EarthCoefficients[b].b+h.g_L1EarthCoefficients[b].c*c);var m=h.g_L2EarthCoefficients.length,o=0;for(b=0;m>b;b++)o+=h.g_L2EarthCoefficients[b].a*Math.cos(h.g_L2EarthCoefficients[b].b+h.g_L2EarthCoefficients[b].c*c);var p=h.g_L3EarthCoefficients.length,q=0;for(b=0;p>b;b++)q+=h.g_L3EarthCoefficients[b].a*Math.cos(h.g_L3EarthCoefficients[b].b+h.g_L3EarthCoefficients[b].c*c);var r=h.g_L4EarthCoefficients.length,s=0;for(b=0;r>b;b++)s+=h.g_L4EarthCoefficients[b].a*Math.cos(h.g_L4EarthCoefficients[b].b+h.g_L4EarthCoefficients[b].c*c);var t=h.g_L5EarthCoefficients.length,u=0;for(b=0;t>b;b++)u+=h.g_L5EarthCoefficients[b].a*Math.cos(h.g_L5EarthCoefficients[b].b+h.g_L5EarthCoefficients[b].c*c);var v=(j+l*c+o*d+q*e+s*f+u*g)/1e8;return v=n.m360(n.r2D(v))},r.eclipticLatitude=function(a){var b,c=(a-2451545)/365250,d=c*c,e=d*c,f=e*c,g=h.g_B0EarthCoefficients.length,i=0;for(b=0;g>b;b++)i+=h.g_B0EarthCoefficients[b].a*Math.cos(h.g_B0EarthCoefficients[b].b+h.g_B0EarthCoefficients[b].c*c);var j=h.g_B1EarthCoefficients.length,k=0;for(b=0;j>b;b++)k+=h.g_B1EarthCoefficients[b].a*Math.cos(h.g_B1EarthCoefficients[b].b+h.g_B1EarthCoefficients[b].c*c);var l=h.g_B2EarthCoefficients.length,m=0;for(b=0;l>b;b++)m+=h.g_B2EarthCoefficients[b].a*Math.cos(h.g_B2EarthCoefficients[b].b+h.g_B2EarthCoefficients[b].c*c);var o=h.g_B3EarthCoefficients.length,p=0;for(b=0;o>b;b++)p+=h.g_B3EarthCoefficients[b].a*Math.cos(h.g_B3EarthCoefficients[b].b+h.g_B3EarthCoefficients[b].c*c);var q=h.g_B4EarthCoefficients.length,r=0;for(b=0;q>b;b++)r+=h.g_B4EarthCoefficients[b].a*Math.cos(h.g_B4EarthCoefficients[b].b+h.g_B4EarthCoefficients[b].c*c);var s=(i+k*c+m*d+p*e+r*f)/1e8;return s=n.r2D(s)},r.radiusVector=function(a){var b,c=(a-2451545)/365250,d=c*c,e=d*c,f=e*c,g=h.g_R0EarthCoefficients.length,i=0;for(b=0;g>b;b++)i+=h.g_R0EarthCoefficients[b].a*Math.cos(h.g_R0EarthCoefficients[b].b+h.g_R0EarthCoefficients[b].c*c);var j=h.g_R1EarthCoefficients.length,k=0;for(b=0;j>b;b++)k+=h.g_R1EarthCoefficients[b].a*Math.cos(h.g_R1EarthCoefficients[b].b+h.g_R1EarthCoefficients[b].c*c); var l=h.g_R2EarthCoefficients.length,m=0;for(b=0;l>b;b++)m+=h.g_R2EarthCoefficients[b].a*Math.cos(h.g_R2EarthCoefficients[b].b+h.g_R2EarthCoefficients[b].c*c);var n=h.g_R3EarthCoefficients.length,o=0;for(b=0;n>b;b++)o+=h.g_R3EarthCoefficients[b].a*Math.cos(h.g_R3EarthCoefficients[b].b+h.g_R3EarthCoefficients[b].c*c);var p=h.g_R4EarthCoefficients.length,q=0;for(b=0;p>b;b++)q+=h.g_R4EarthCoefficients[b].a*Math.cos(h.g_R4EarthCoefficients[b].b+h.g_R4EarthCoefficients[b].c*c);return(i+k*c+m*d+o*e+q*f)/1e8},r.sunMeanAnomaly=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(357.5291092+35999.0502909*b-1536e-7*c+d/2449e4)},r.eccentricity=function(a){var b=(a-2451545)/36525,c=b*b;return 1-.002516*b-74e-7*c},r.eclipticLongitudeJ2000=function(a){var b,c=(a-2451545)/365250,d=c*c,e=d*c,f=e*c,g=h.g_L0EarthCoefficients.length,i=0;for(b=0;g>b;b++)i+=h.g_L0EarthCoefficients[b].a*Math.cos(h.g_L0EarthCoefficients[b].b+h.g_L0EarthCoefficients[b].c*c);var j=h.g_L1EarthCoefficientsJ2000.length,k=0;for(b=0;j>b;b++)k+=h.g_L1EarthCoefficientsJ2000[b].a*Math.cos(h.g_L1EarthCoefficientsJ2000[b].b+h.g_L1EarthCoefficientsJ2000[b].c*c);var l=h.g_L2EarthCoefficientsJ2000.length,m=0;for(b=0;l>b;b++)m+=h.g_L2EarthCoefficientsJ2000[b].a*Math.cos(h.g_L2EarthCoefficientsJ2000[b].b+h.g_L2EarthCoefficientsJ2000[b].c*c);var o=h.g_L3EarthCoefficientsJ2000.length,p=0;for(b=0;o>b;b++)p+=h.g_L3EarthCoefficientsJ2000[b].a*Math.cos(h.g_L3EarthCoefficientsJ2000[b].b+h.g_L3EarthCoefficientsJ2000[b].c*c);var q=h.g_L4EarthCoefficientsJ2000.length,r=0;for(b=0;q>b;b++)r+=h.g_L4EarthCoefficientsJ2000[b].a*Math.cos(h.g_L4EarthCoefficientsJ2000[b].b+h.g_L4EarthCoefficientsJ2000[b].c*c);var s=(i+k*c+m*d+p*e+r*f)/1e8;return s=n.m360(n.r2D(s))},r.eclipticLatitudeJ2000=function(a){var b,c=(a-2451545)/365250,d=c*c,e=d*c,f=e*c,g=h.g_B0EarthCoefficients.length,i=0;for(b=0;g>b;b++)i+=h.g_B0EarthCoefficients[b].a*Math.cos(h.g_B0EarthCoefficients[b].b+h.g_B0EarthCoefficients[b].c*c);var j=h.g_B1EarthCoefficientsJ2000.length,k=0;for(b=0;j>b;b++)k+=h.g_B1EarthCoefficientsJ2000[b].a*Math.cos(h.g_B1EarthCoefficientsJ2000[b].b+h.g_B1EarthCoefficientsJ2000[b].c*c);var l=h.g_B2EarthCoefficientsJ2000.length,m=0;for(b=0;l>b;b++)m+=h.g_B2EarthCoefficientsJ2000[b].a*Math.cos(h.g_B2EarthCoefficientsJ2000[b].b+h.g_B2EarthCoefficientsJ2000[b].c*c);var o=h.g_B3EarthCoefficientsJ2000.length,p=0;for(b=0;o>b;b++)p+=h.g_B3EarthCoefficientsJ2000[b].a*Math.cos(h.g_B3EarthCoefficientsJ2000[b].b+h.g_B3EarthCoefficientsJ2000[b].c*c);var q=h.g_B4EarthCoefficientsJ2000.length,r=0;for(b=0;q>b;b++)r+=h.g_B4EarthCoefficientsJ2000[b].a*Math.cos(h.g_B4EarthCoefficientsJ2000[b].b+h.g_B4EarthCoefficientsJ2000[b].c*c);var s=(i+k*c+m*d+p*e+r*f)/1e8;return s=n.r2D(s)};var xe={},ye={},ze={};u.calculate=function(a,b,c,d,e){var f=(d-2451545)/36525,g=f*f,h=(e-d)/36525,i=h*h,j=i*h,k=n.d2R(a),l=n.d2R(c),m=(47.0029-.06603*f+598e-6*g)*h+(-.03302+598e-6*f)*i+6e-5*j;m=n.d2R(n.dmS2D(0,0,m));var o=629554.9824+3289.4789*f+.60622*g-(869.8089+.50491*f)*h+.03536*i;o=n.d2R(n.dmS2D(0,0,o));var p=(5029.0966+2.22226*f-42e-6*g)*h+(1.11113-42e-6*f)*i-6e-6*j;p=n.d2R(n.dmS2D(0,0,p));var q=Math.sin(k),r=Math.cos(k),s=Math.sin(l-o),u=Math.cos(l-o),v=Math.sin(m),w=Math.cos(m),x=q*s,y=-v*r+w*q*u,z=Math.asin(Math.sqrt(x*x+y*y)),A=new t;A.i=n.r2D(z);var B=r*w+q*v*u;0>B&&(A.i=180-A.i);var C=o+p;A.omega=n.m360(n.r2D(Math.atan2(x,y)+C)),x=-v*s,y=q*w-r*v*u;var D=n.r2D(Math.atan2(x,y));return A.w=n.m360(b+D),A},u.fK4B1950ToFK5J2000=function(a,b,c){var d=n.d2R(5.19856209),e=n.d2R(.00651966),f=n.d2R(a),g=n.d2R(c),h=Math.sin(f),i=Math.cos(f),j=Math.cos(e),k=Math.sin(e),l=d+g,m=Math.cos(l),o=Math.sin(l),p=k*o,q=h*j+i*k*m,r=new t;r.i=n.r2D(Math.asin(Math.sqrt(p*p+q*q)));var s=i*j-h*k*m;return 0>s&&(r.i=180-r.i),r.w=n.m360(b+n.r2D(Math.atan2(p,q))),r.omega=n.m360(n.r2D(Math.atan2(h*o,i*k+h*j*m))-4.50001688),r};var Ae={};v.mercuryMeanLongitude=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(252.250906+149474.0722491*b+3035e-7*c+1.8e-8*d)},v.mercurySemimajorAxis=function(){return.38709831},v.mercuryEccentricity=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return.20563175+20407e-9*b-2.83e-8*c-1.8e-10*d},v.mercuryInclination=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(7.004986+.0018215*b-181e-7*c+5.6e-8*d)},v.mercuryLongitudeAscendingNode=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(48.330893+1.1861883*b+17542e-8*c+2.15e-7*d)},v.mercuryLongitudePerihelion=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(77.456119+1.5564776*b+29544e-8*c+9e-9*d)},v.venusMeanLongitude=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(181.979801+58519.2130302*b+31014e-8*c+1.5e-8*d)},v.venusSemimajorAxis=function(){return.72332982},v.venusEccentricity=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return.00677192-47765e-9*b+9.81e-8*c+4.6e-10*d},v.venusInclination=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(3.394662+.0010037*b-8.8e-7*c-7e-9*d)},v.venusLongitudeAscendingNode=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(76.67992+.9011206*b+40618e-8*c-9.3e-8*d)},v.venusLongitudePerihelion=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(131.563703+1.4022288*b-.00107618*c-5678e-9*d)},v.earthMeanLongitude=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(100.466457+36000.7698278*b+30322e-8*c+2e-8*d)},v.earthSemimajorAxis=function(){return 1.000001018},v.earthEccentricity=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return.01670863-42037e-9*b-1.267e-7*c+1.4e-10*d},v.earthInclination=function(){return 0},v.earthLongitudePerihelion=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(102.937348+1.17195366*b+45688e-8*c-1.8e-8*d)},v.marsMeanLongitude=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(355.433+19141.6964471*b+31052e-8*c+1.6e-8*d)},v.marsSemimajorAxis=function(){return 1.523679342},v.marsEccentricity=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return.09340065+90484e-9*b-8.06e-8*c-2.5e-10*d},v.marsInclination=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(1.849726-6011e-7*b+1276e-8*c-7e-9*d)},v.marsLongitudeAscendingNode=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(49.588093+.7720959*b+1557e-8*c+2267e-9*d)},v.marsLongitudePerihelion=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(336.060234+1.8410449*b+13477e-8*c+5.36e-7*d)},v.jupiterMeanLongitude=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(34.351519+3036.3027748*b+2233e-7*c+3.7e-8*d)},v.jupiterSemimajorAxis=function(a){var b=(a-2451545)/36525;return 5.202603209+1.913e-7*b},v.jupiterEccentricity=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return.04849793+163225e-9*b-4.714e-7*c-2.01e-9*d},v.jupiterInclination=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(1.303267-.0054965*b+466e-8*c-2e-9*d)},v.jupiterLongitudeAscendingNode=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(100.464407+1.0209774*b+40315e-8*c+4.04e-7*d)},v.jupiterLongitudePerihelion=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(14.331207+1.6126352*b+.00103042*c-4464e-9*d)},v.saturnMeanLongitude=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(50.077444+1223.5110686*b+51908e-8*c-3e-8*d)},v.saturnSemimajorAxis=function(a){var b=(a-2451545)/36525,c=b*b;return 9.554909192-2139e-9*b+4e-9*c},v.saturnEccentricity=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return.05554814-.0003446641*b-6.436e-7*c+3.4e-9*d},v.saturnInclination=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(2.488879-.0037362*b-1519e-8*c+8.7e-8*d)},v.saturnLongitudeAscendingNode=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(113.665503+.877088*b-12176e-8*c-2249e-9*d)},v.saturnLongitudePerihelion=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(93.057237+1.19637613*b+83753e-8*c+4928e-9*d)},v.uranusMeanLongitude=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(314.055005+429.8640561*b+3039e-7*c+2.6e-8*d)},v.uranusSemimajorAxis=function(a){var b=(a-2451545)/36525,c=b*b;return 19.218446062-3.72e-8*b+9.8e-10*c},v.uranusEccentricity=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return.04638122-27293e-9*b+7.89e-8*c+2.4e-10*d},v.uranusInclination=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(.773197+7744e-7*b+3749e-8*c-9.2e-8*d)},v.uranusLongitudeAscendingNode=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(74.005957+.5211278*b+.00133947*c+18484e-9*d)},v.uranusLongitudePerihelion=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(173.005291+1.486379*b+21406e-8*c+4.34e-7*d)},v.neptuneMeanLongitude=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(304.348665+219.8833092*b+30882e-8*c+1.8e-8*d)},v.neptuneSemimajorAxis=function(a){var b=(a-2451545)/36525,c=b*b;return 30.110386869-1.663e-7*b+6.9e-10*c},v.neptuneEccentricity=function(a){var b=(a-2451545)/36525,c=b*b*b;return.00945575+6033e-9*b-5e-11*c},v.neptuneInclination=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(1.769953-.0093082*b-708e-8*c+2.7e-8*d)},v.neptuneLongitudeAscendingNode=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(131.784057+1.1022039*b+25952e-8*c-6.37e-7*d)},v.neptuneLongitudePerihelion=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(48.120276+1.4262957*b+38434e-8*c+2e-8*d)},v.mercuryMeanLongitudeJ2000=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(252.250906+149472.6746358*b-536e-8*c+2e-9*d)},v.mercuryInclinationJ2000=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(7.004986-.0059516*b+8e-7*c+4.3e-8*d)},v.mercuryLongitudeAscendingNodeJ2000=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(48.330893-.1254227*b-8833e-8*c-2e-7*d)},v.mercuryLongitudePerihelionJ2000=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(77.456119+.1588643*b-1342e-8*c-7e-9*d)},v.venusMeanLongitudeJ2000=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(181.979801+58517.815676*b+165e-8*c-2e-9*d)},v.venusInclinationJ2000=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(3.394662-8568e-7*b-3244e-8*c+9e-9*d)},v.venusLongitudeAscendingNodeJ2000=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(76.67992-.2780134*b-14257e-8*c-1.64e-7*d)},v.venusLongitudePerihelionJ2000=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(131.563703+.0048746*b-.00138467*c-5695e-9*d)},v.earthMeanLongitudeJ2000=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(100.466457+35999.3728565*b-568e-8*c-1e-9*d)},v.earthInclinationJ2000=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return.0130548*b-931e-8*c-3.4e-8*d},v.earthLongitudeAscendingNodeJ2000=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(174.873176-.241098*b+4262e-8*c+1e-9*d)},v.earthLongitudePerihelionJ2000=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(102.937348+.3225654*b+14799e-8*c-3.9e-8*d)},v.marsMeanLongitudeJ2000=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(355.433+19140.2993039*b+262e-8*c-3e-9*d)},v.marsInclinationJ2000=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(1.849726-.0081477*b-2255e-8*c-2.9e-8*d)},v.marsLongitudeAscendingNodeJ2000=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(49.588093-.295025*b-64048e-8*c-1964e-9*d)},v.marsLongitudePerihelionJ2000=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(336.060234+.4439016*b-17313e-8*c+5.18e-7*d)},v.jupiterMeanLongitudeJ2000=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(34.351519+3034.9056606*b-8501e-8*c+1.6e-8*d)},v.jupiterInclinationJ2000=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(1.303267-.0019877*b+332e-7*c+9.7e-8*d)},v.jupiterLongitudeAscendingNodeJ2000=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(100.464407+.1767232*b+907e-6*c-7272e-9*d)},v.jupiterLongitudePerihelionJ2000=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(14.331207+.2155209*b+72211e-8*c-4485e-9*d)},v.saturnMeanLongitudeJ2000=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(50.077444+1222.1138488*b+21004e-8*c-4.6e-8*d)},v.saturnInclinationJ2000=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(2.488879+.0025514*b-4906e-8*c+1.7e-8*d)},v.saturnLongitudeAscendingNodeJ2000=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(113.665503-.2566722*b-18399e-8*c+4.8e-7*d)},v.saturnLongitudePerihelionJ2000=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(93.057237+.5665415*b+5285e-7*c+4912e-9*d)},v.uranusMeanLongitudeJ2000=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(314.055005+428.4669983*b-486e-8*c+6e-9*d)},v.uranusInclinationJ2000=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(.773197-.0016869*b+349e-8*c+1.6e-8*d)},v.uranusLongitudeAscendingNodeJ2000=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(74.005957+.0741431*b+40539e-8*c+1.19e-7*d)},v.uranusLongitudePerihelionJ2000=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(173.005291+.0893212*b-947e-7*c+4.14e-7*d)},v.neptuneMeanLongitudeJ2000=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(304.348665+218.4862002*b+5.9e-7*c-2e-9*d)},v.neptuneInclinationJ2000=function(a){var b=(a-2451545)/36525,c=b*b;return n.m360(1.769953+2256e-7*b+2.3e-7*c)},v.neptuneLongitudeAscendingNodeJ2000=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b;return n.m360(131.784057-.0061651*b-219e-8*c-7.8e-8*d)},v.neptuneLongitudePerihelionJ2000=function(a){var b=(a-2451545)/36525,c=b*b;return n.m360(48.120276+.0291866*b+761e-7*c)};var Be={},Ce={},De={},Ee={};z.distanceToLightTime=function(a){return.0057755183*a},z.calculate=function(a,b){var c=new x,d=a,e=0,f=0,g=0,h=0;b&&(e=r.eclipticLongitude(d),f=r.eclipticLatitude(d),g=r.radiusVector(d),e=n.d2R(e),f=n.d2R(f),h=Math.cos(f));for(var j,k,l,m,o,p,q,s=0,t=0,u=0,v=!0,w=!0,y=0,A=0,C=0;v;){switch(b){case 0:s=ob.geometricEclipticLongitude(d),t=ob.geometricEclipticLatitude(d),u=r.radiusVector(d);break;case 1:s=L.eclipticLongitude(d),t=L.eclipticLatitude(d),u=L.radiusVector(d);break;case 2:s=qb.eclipticLongitude(d),t=qb.eclipticLatitude(d),u=qb.radiusVector(d);break;case 3:s=K.eclipticLongitude(d),t=K.eclipticLatitude(d),u=K.radiusVector(d);break;case 4:s=I.eclipticLongitude(d),t=I.eclipticLatitude(d),u=I.radiusVector(d);break;case 5:s=jb.eclipticLongitude(d),t=jb.eclipticLatitude(d),u=jb.radiusVector(d);break;case 6:s=pb.eclipticLongitude(d),t=pb.eclipticLatitude(d),u=pb.radiusVector(d);break;case 7:s=U.eclipticLongitude(d),t=U.eclipticLatitude(d),u=U.radiusVector(d);break;case 8:s=db.eclipticLongitude(d),t=db.eclipticLatitude(d),u=db.radiusVector(d)}if(w?w=!1:(v=Math.abs(s-y)>1e-5||Math.abs(t-A)>1e-5||Math.abs(u-C)>1e-6,y=s,A=t,C=u),v){var D=0;b?(j=n.d2R(s),k=n.d2R(t),l=Math.cos(k),m=Math.cos(j),o=u*l*m-g*h*Math.cos(e),p=u*l*Math.sin(j)-g*h*Math.sin(e),q=u*Math.sin(k)-g*Math.sin(f),D=Math.sqrt(o*o+p*p+q*q)):D=u,d=a-z.distanceToLightTime(D)}}j=n.d2R(s),k=n.d2R(t),l=Math.cos(k),m=Math.cos(j),o=u*l*m-g*h*Math.cos(e),p=u*l*Math.sin(j)-g*h*Math.sin(e),q=u*Math.sin(k)-g*Math.sin(f);var E=o*o,F=p*p;c.apparentGeocentricLatitude=n.r2D(Math.atan2(q,Math.sqrt(E+F))),c.apparentGeocentricDistance=Math.sqrt(E+F+q*q),c.apparentGeocentricLongitude=n.m360(n.r2D(Math.atan2(p,o))),c.apparentLightTime=z.distanceToLightTime(c.apparentGeocentricDistance);var G=i.eclipticAberration(c.apparentGeocentricLongitude,c.apparentGeocentricLatitude,a);c.apparentGeocentricLongitude+=G.x,c.apparentGeocentricLatitude+=G.y;var H=B.correctionInLongitude(c.apparentGeocentricLongitude,c.apparentGeocentricLatitude,a);c.apparentGeocentricLatitude+=B.correctionInLatitude(c.apparentGeocentricLongitude,a),c.apparentGeocentricLongitude+=H;var J=V.nutationInLongitude(a),M=V.trueObliquityOfEcliptic(a);c.apparentGeocentricLongitude+=n.dmS2D(0,0,J);var N=n.ec2Eq(c.apparentGeocentricLongitude,c.apparentGeocentricLatitude,M);return c.apparentGeocentricRA=N.x,c.apparentGeocentricDeclination=N.y,c},z.semiMajorAxisFromPerihelionDistance=function(a,b){return a/(1-b)},z.meanMotionFromSemiMajorAxis=function(a){return.9856076686/(a*Math.sqrt(a))},z.calculateRectangularJD=function(a,b){var c=a,d=n.d2R(b.omega),e=n.d2R(b.w),f=n.d2R(b.i),g=0,h=1,i=Math.sin(d),j=Math.cos(d),k=Math.cos(f),l=Math.sin(f),m=j,o=i*h,p=i*g,q=-i*k,r=j*k*h-l*g,s=j*k*g+l*h,t=Math.sqrt(m*m+q*q),u=Math.sqrt(o*o+r*r),v=Math.sqrt(p*p+s*s),w=Math.atan2(m,q),x=Math.atan2(o,r),y=Math.atan2(p,s),z=b.n*(c-b.t);b.meanAnnomolyOut=z;var A=J.calculate(z,b.e);A=n.d2R(A);var B=2*Math.atan(Math.sqrt((1+b.e)/(1-b.e))*Math.tan(A/2)),C=b.a*(1-b.e*Math.cos(A)),D=C*t*Math.sin(w+e+B),E=C*u*Math.sin(x+e+B),F=C*v*Math.sin(y+e+B);return Sc.create(D,E,F)},z.calculateRectangular=function(a,b){var c=n.d2R(a.omega),d=n.d2R(a.w),e=n.d2R(a.i),f=0,g=1,h=Math.sin(c),i=Math.cos(c),j=Math.cos(e),k=Math.sin(e),l=i,m=h*g,o=h*f,p=-h*j,q=i*j*g-k*f,r=i*j*f+k*g,s=Math.sqrt(l*l+p*p),t=Math.sqrt(m*m+q*q),u=Math.sqrt(o*o+r*r),v=Math.atan2(l,p),w=Math.atan2(m,q),x=Math.atan2(o,r),y=(a.n,b),z=J.calculate(y,a.e);z=n.d2R(z);var A=2*Math.atan(Math.sqrt((1+a.e)/(1-a.e))*Math.tan(z/2)),B=a.a*(1-a.e*Math.cos(z)),C=B*s*Math.sin(v+d+A),D=B*t*Math.sin(w+d+A),E=B*u*Math.sin(x+d+A);return Sc.create(C,D,E)},z.calculateElements=function(a,b){var c=V.meanObliquityOfEcliptic(b.jdEquinox),d=a,e=new y;c=n.d2R(c);for(var f=n.d2R(b.omega),g=n.d2R(b.w),h=n.d2R(b.i),i=Math.sin(c),j=Math.cos(c),k=Math.sin(f),l=Math.cos(f),m=Math.cos(h),o=Math.sin(h),p=l,q=k*j,r=k*i,s=-k*m,t=l*m*j-o*i,u=l*m*i+o*j,v=Math.sqrt(p*p+s*s),w=Math.sqrt(q*q+t*t),x=Math.sqrt(r*r+u*u),A=Math.atan2(p,s),B=Math.atan2(q,t),C=Math.atan2(r,u),D=z.meanMotionFromSemiMajorAxis(b.a),E=ob.equatorialRectangularCoordinatesAnyEquinox(a,b.jdEquinox),F=0;2>F;F++){var G=D*(d-b.t),H=J.calculate(G,b.e);H=n.d2R(H);var I=2*Math.atan(Math.sqrt((1+b.e)/(1-b.e))*Math.tan(H/2)),K=b.a*(1-b.e*Math.cos(H)),L=K*v*Math.sin(A+g+I),M=K*w*Math.sin(B+g+I),N=K*x*Math.sin(C+g+I);if(!F){e.heliocentricRectangularEquatorial.x=L,e.heliocentricRectangularEquatorial.y=M,e.heliocentricRectangularEquatorial.z=N;var O=f+I,P=Math.cos(O),Q=Math.sin(O);e.heliocentricRectangularEcliptical.x=K*(l*P-k*Q*m),e.heliocentricRectangularEcliptical.y=K*(k*P+l*Q*m),e.heliocentricRectangularEcliptical.z=K*o*Q,e.heliocentricEclipticLongitude=Math.atan2(M,L),e.heliocentricEclipticLongitude=n.m24(n.r2D(e.heliocentricEclipticLongitude)/15),e.heliocentricEclipticLatitude=Math.asin(N/K),e.heliocentricEclipticLatitude=n.r2D(e.heliocentricEclipticLatitude)}var R=E.x+L,S=E.y+M,T=E.z+N,U=Math.atan2(S,R);U=n.r2D(U);var W=Math.atan2(T,Math.sqrt(R*R+S*S));W=n.r2D(W);var X=Math.sqrt(R*R+S*S+T*T);if(F){e.astrometricGeocenticRA=n.m24(U/15),e.astrometricGeocentricDeclination=W,e.astrometricGeocentricDistance=X,e.astrometricGeocentricLightTime=z.distanceToLightTime(X);var Y=Math.sqrt(E.x*E.x+E.y*E.y+E.z*E.z);e.elongation=Math.acos((Y*Y+X*X-K*K)/(2*Y*X)),e.elongation=n.r2D(e.elongation),e.phaseAngle=Math.acos((K*K+X*X-Y*Y)/(2*K*X)),e.phaseAngle=n.r2D(e.phaseAngle)}else e.trueGeocentricRA=n.m24(U/15),e.trueGeocentricDeclination=W,e.trueGeocentricDistance=X,e.trueGeocentricLightTime=z.distanceToLightTime(X);F||(d=a-e.trueGeocentricLightTime)}return e},z.instantaneousVelocity=function(a,b){return 42.1219*Math.sqrt(1/a-1/(2*b))},z.velocityAtPerihelion=function(a,b){return 29.7847/Math.sqrt(b)*Math.sqrt((1+a)/(1-a))},z.velocityAtAphelion=function(a,b){return 29.7847/Math.sqrt(b)*Math.sqrt((1-a)/(1+a))},z.lengthOfEllipse=function(a,b){var c=b*Math.sqrt(1-a*a);return n.PI()*(3*(b+c)-Math.sqrt((b+3*c)*(3*b+c)))},z.cometMagnitude=function(a,b,c,d){return a+5*wc.log10(b)+c*wc.log10(d)},z.minorPlanetMagnitude=function(a,b,c,d,e){e=n.d2R(e);var f=Math.exp(-3.33*Math.pow(Math.tan(e/2),.63)),g=Math.exp(-1.87*Math.pow(Math.tan(e/2),1.22));return a+5*wc.log10(d*b)-2.5*wc.log10((1-c)*f+c*g)};var Fe={};A.calculate=function(a){var b=(a-2451545)/365250,c=b*b,d=c*b,e=d*b,f=e*b,g=n.m360(280.4664567+360007.6982779*b+.03032028*c+d/49931-e/15300-f/2e6),h=ob.apparentEclipticLongitude(a),i=ob.apparentEclipticLatitude(a),j=V.trueObliquityOfEcliptic(a),k=n.ec2Eq(h,i,j);j=n.d2R(j);var l=g-.0057183-15*k.x+n.dmS2D(0,0,V.nutationInLongitude(a))*Math.cos(j);return l>180&&(l=-(360-l)),l*=4};var Ge={};B.correctionInLongitude=function(a,b,c){var d=(c-2451545)/36525,e=a-1.397*d-31e-5*d*d;e=n.d2R(e),a=n.d2R(a),b=n.d2R(b);var f=-.09033+.03916*(Math.cos(e)+Math.sin(e))*Math.tan(b);return n.dmS2D(0,0,f)},B.correctionInLatitude=function(a,b){var c=(b-2451545)/36525,d=a-1.397*c-31e-5*c*c;d=n.d2R(d),a=n.d2R(a);var e=.03916*(Math.cos(d)-Math.sin(d));return n.dmS2D(0,0,e)},B.convertVSOPToFK5J2000=function(a){var b=new m;return b.x=a.x+4.4036e-7*a.y-1.90919e-7*a.z,b.y=-4.79966e-7*a.x+.917482137087*a.y-.397776982902*a.z,b.z=.397776982902*a.y+.917482137087*a.z,b},B.convertVSOPToFK5B1950=function(a){var b=new m;return b.x=.999925702634*a.x+.012189716217*a.y+11134016e-12*a.z,b.y=-.011179418036*a.x+.917413998946*a.y-.397777041885*a.z,b.z=-.004859003787*a.x+.397747363646*a.y+.917482111428*a.z,b},B.convertVSOPToFK5AnyEquinox=function(a,b){var c=(b-2451545)/36525,d=c*c,e=d*c,f=2306.2181*c+.30188*d+.017988*e;f=n.d2R(n.dmS2D(0,0,f));var g=2306.2181*c+1.09468*d+.018203*e;g=n.d2R(n.dmS2D(0,0,g));var h=2004.3109*c-.42665*d-.041833*e;h=n.d2R(n.dmS2D(0,0,h));var i=Math.cos(f),j=Math.cos(g),k=Math.cos(h),l=Math.sin(f),o=Math.sin(g),p=Math.sin(h),q=i*j*k-l*o,r=l*j+i*o*k,s=i*p,t=-i*o-l*j*k,u=i*j-l*o*k,v=-l*p,w=-j*p,x=-o*p,y=k,z=new m;return z.x=q*a.x+t*a.y+w*a.z,z.y=r*a.x+u*a.y+x*a.z,z.z=s*a.x+v*a.y+y*a.z,z};var He={},Ie={},Je={};E.calculate=function(a){for(var b=ob.geometricEclipticLongitude(a),c=n.d2R(b),d=ob.geometricEclipticLatitude(a),e=n.d2R(d),f=r.radiusVector(a),g=5,h=0,i=z.distanceToLightTime(g),j=a-i,k=!0,l=0,m=0,o=0,p=0,q=0,s=0,t=0,u=0;k;)p=I.eclipticLongitude(j),q=n.d2R(p),s=I.eclipticLatitude(j),t=n.d2R(s),u=I.radiusVector(j),l=u*Math.cos(t)*Math.cos(q)+f*Math.cos(c),m=u*Math.cos(t)*Math.sin(q)+f*Math.sin(c),o=u*Math.sin(t)+f*Math.sin(e),g=Math.sqrt(l*l+m*m+o*o),i=z.distanceToLightTime(g),k=Math.abs(i-h)>2e-6,k&&(j=a-i,h=i);var v=E.calculateHelper(a,c,e,f);E.fillInPhenomenaDetails(v.satellite1),E.fillInPhenomenaDetails(v.satellite2),E.fillInPhenomenaDetails(v.satellite3),E.fillInPhenomenaDetails(v.satellite4),j=a-i,p=I.eclipticLongitude(j),q=n.d2R(p),s=I.eclipticLatitude(j),t=n.d2R(s),u=I.radiusVector(j),l=u*Math.cos(t)*Math.cos(q),m=u*Math.cos(t)*Math.sin(q),o=u*Math.sin(t),g=Math.sqrt(l*l+m*m+o*o);var w=z.distanceToLightTime(g),x=E.calculateHelper(a+w-i,c,e,0);return E.fillInPhenomenaDetails(x.satellite1),E.fillInPhenomenaDetails(x.satellite2),E.fillInPhenomenaDetails(x.satellite3),E.fillInPhenomenaDetails(x.satellite4),v.satellite1.bInEclipse=x.satellite1.bInOccultation,v.satellite2.bInEclipse=x.satellite2.bInOccultation,v.satellite3.bInEclipse=x.satellite3.bInOccultation,v.satellite4.bInEclipse=x.satellite4.bInOccultation,v.satellite1.bInShadowTransit=x.satellite1.bInTransit,v.satellite2.bInShadowTransit=x.satellite2.bInTransit,v.satellite3.bInShadowTransit=x.satellite3.bInTransit,v.satellite4.bInShadowTransit=x.satellite4.bInTransit,v.satellite1.apparentShadowRectangularCoordinates=x.satellite1.apparentRectangularCoordinates,v.satellite2.apparentShadowRectangularCoordinates=x.satellite2.apparentRectangularCoordinates,v.satellite3.apparentShadowRectangularCoordinates=x.satellite3.apparentRectangularCoordinates,v.satellite4.apparentShadowRectangularCoordinates=x.satellite4.apparentRectangularCoordinates,v},E.calculateHelper=function(a,b,c,d){for(var e=new D,f=5,g=0,h=z.distanceToLightTime(f),i=0,j=0,k=0,l=0,o=0,p=0,q=0,r=0,s=a-h,t=!0;t;)l=I.eclipticLongitude(s),o=n.d2R(l),p=I.eclipticLatitude(s),q=n.d2R(p),r=I.radiusVector(s),i=r*Math.cos(q)*Math.cos(o)+d*Math.cos(b),j=r*Math.cos(q)*Math.sin(o)+d*Math.sin(b),k=r*Math.sin(q)+d*Math.sin(c),f=Math.sqrt(i*i+j*j+k*k),h=z.distanceToLightTime(f),t=Math.abs(h-g)>2e-6,t&&(s=a-h,g=h);var u=Math.atan2(j,i),w=Math.atan(k/Math.sqrt(i*i+j*j)),x=a-2443000.5-h,y=106.07719+203.48895579*x,A=n.d2R(y),B=175.73161+101.374724735*x,C=n.d2R(B),F=120.55883+50.317609207*x,G=n.d2R(F),H=84.44459+21.571071177*x,J=n.d2R(H),K=n.d2R(n.m360(97.0881+.16138586*x)),L=n.d2R(n.m360(154.8663+.04726307*x)),M=n.d2R(n.m360(188.184+.00712734*x)),N=n.d2R(n.m360(335.2868+.00184*x)),O=312.3346-.13279386*x,P=n.d2R(O),Q=100.4411-.03263064*x,R=n.d2R(Q),S=119.1942-.00717703*x,T=n.d2R(S),U=322.6186-.00175934*x,V=n.d2R(U),W=.33033*Math.sin(n.d2R(163.679+.0010512*x))+.03439*Math.sin(n.d2R(34.486-.0161731*x)),X=n.d2R(199.6766+.1737919*x),Y=n.d2R(316.5182-208e-8*x),Z=n.d2R(30.23756+.0830925701*x+W),$=n.d2R(31.97853+.0334597339*x),_=n.d2R(13.469942),ab=.47259*Math.sin(2*(A-C))+-.03478*Math.sin(M-N)+.01081*Math.sin(C-2*G+M)+.00738*Math.sin(X)+.00713*Math.sin(C-2*G+L)+-.00674*Math.sin(K+M-2*_-2*Z)+.00666*Math.sin(C-2*G+N)+.00445*Math.sin(A-M)+-.00354*Math.sin(A-C)+-.00317*Math.sin(2*Y-2*_)+.00265*Math.sin(A-N)+-.00186*Math.sin(Z)+.00162*Math.sin(L-M)+.00158*Math.sin(4*(A-C))+-.00155*Math.sin(A-G)+-.00138*Math.sin(Y+T-2*_-2*Z)+-.00115*Math.sin(2*(A-2*C+R))+89e-5*Math.sin(L-N)+85e-5*Math.sin(A+M-2*_-2*Z)+83e-5*Math.sin(R-T)+53e-5*Math.sin(Y-R),bb=1.06476*Math.sin(2*(C-G))+.04256*Math.sin(A-2*C+M)+.03581*Math.sin(C-M)+.02395*Math.sin(A-2*C+N)+.01984*Math.sin(C-N)+-.01778*Math.sin(X)+.01654*Math.sin(C-L)+.01334*Math.sin(C-2*G+L)+.01294*Math.sin(M-N)+-.01142*Math.sin(C-G)+-.01057*Math.sin(Z)+-.00775*Math.sin(2*(Y-_))+.00524*Math.sin(2*(A-C))+-.0046*Math.sin(A-G)+.00316*Math.sin(Y-2*Z+T-2*_)+-.00203*Math.sin(K+M-2*_-2*Z)+.00146*Math.sin(Y-T)+-.00145*Math.sin(2*Z)+.00125*Math.sin(Y-V)+-.00115*Math.sin(A-2*G+M)+-94e-5*Math.sin(2*(C-R))+86e-5*Math.sin(2*(A-2*C+R))+-86e-5*Math.sin(5*$-2*Z+n.d2R(52.225))+-78e-5*Math.sin(C-J)+-64e-5*Math.sin(3*G-7*J+4*N)+64e-5*Math.sin(K-N)+-63e-5*Math.sin(A-2*G+N)+58e-5*Math.sin(T-V)+56e-5*Math.sin(2*(Y-_-Z))+56e-5*Math.sin(2*(C-J))+55e-5*Math.sin(2*(A-G))+52e-5*Math.sin(3*G-7*J+M+3*N)+-43e-5*Math.sin(A-M)+41e-5*Math.sin(5*(C-G))+41e-5*Math.sin(N-_)+32e-5*Math.sin(R-T)+32e-5*Math.sin(2*(G-Z-_)),cb=.1649*Math.sin(G-M)+.09081*Math.sin(G-N)+-.06907*Math.sin(C-G)+.03784*Math.sin(M-N)+.01846*Math.sin(2*(G-J))+-.0134*Math.sin(Z)+-.01014*Math.sin(2*(Y-_))+.00704*Math.sin(C-2*G+M)+-.0062*Math.sin(C-2*G+L)+-.00541*Math.sin(G-J)+.00381*Math.sin(C-2*G+N)+.00235*Math.sin(Y-T)+.00198*Math.sin(Y-V)+.00176*Math.sin(X)+.0013*Math.sin(3*(G-J))+.00125*Math.sin(A-G)+-.00119*Math.sin(5*$-2*Z+n.d2R(52.225))+.00109*Math.sin(A-C)+-.001*Math.sin(3*G-7*J+4*N)+91e-5*Math.sin(T-V)+8e-4*Math.sin(3*G-7*J+M+3*N)+-75e-5*Math.sin(2*C-3*G+M)+72e-5*Math.sin(K+M-2*_-2*Z)+69e-5*Math.sin(N-_)+-58e-5*Math.sin(2*G-3*J+N)+-57e-5*Math.sin(G-2*J+N)+56e-5*Math.sin(G+M-2*_-2*Z)+-52e-5*Math.sin(C-2*G+K)+-5e-4*Math.sin(L-M)+48e-5*Math.sin(G-2*J+M)+-45e-5*Math.sin(2*C-3*G+N)+-41e-5*Math.sin(L-N)+-38e-5*Math.sin(2*Z)+-37e-5*Math.sin(M-N+T-V)+-32e-5*Math.sin(3*G-7*J+2*M+2*N)+3e-4*Math.sin(4*(G-J))+29e-5*Math.sin(G+N-2*_-2*Z)+-28e-5*Math.sin(T+Y-2*_-2*Z)+26e-5*Math.sin(G-_-Z)+24e-5*Math.sin(C-3*G+2*J)+21e-5*Math.sin(G-_-Z)+-21e-5*Math.sin(G-L)+17e-5*Math.sin(2*(G-M)),db=.84287*Math.sin(J-N)+.03431*Math.sin(N-M)+-.03305*Math.sin(2*(Y-_))+-.03211*Math.sin(Z)+-.01862*Math.sin(J-M)+.01186*Math.sin(Y-V)+.00623*Math.sin(J+N-2*Z-2*_)+.00387*Math.sin(2*(J-N))+-.00284*Math.sin(5*$-2*Z+n.d2R(52.225))+-.00234*Math.sin(2*(Y-N))+-.00223*Math.sin(G-J)+-.00208*Math.sin(J-_)+.00178*Math.sin(Y+V-2*N)+.00134*Math.sin(N-_)+.00125*Math.sin(2*(J-Z-_))+-.00117*Math.sin(2*Z)+-.00112*Math.sin(2*(G-J))+.00107*Math.sin(3*G-7*J+4*N)+.00102*Math.sin(J-Z-_)+96e-5*Math.sin(2*J-Y-V)+87e-5*Math.sin(2*(Y-V))+-85e-5*Math.sin(3*G-7*J+M+3*N)+85e-5*Math.sin(G-2*J+N)+-81e-5*Math.sin(2*(J-Y))+71e-5*Math.sin(J+N-2*_-3*Z)+61e-5*Math.sin(A-J)+-56e-5*Math.sin(Y-T)+-54e-5*Math.sin(G-2*J+M)+51e-5*Math.sin(C-J)+42e-5*Math.sin(2*(Y-Z-_))+39e-5*Math.sin(2*(N-V))+36e-5*Math.sin(Y+_-N-V)+35e-5*Math.sin(2*$-Z+n.d2R(188.37))+-35e-5*Math.sin(J-N+2*_-2*Y)+-32e-5*Math.sin(J+N-2*_-Z)+3e-4*Math.sin(2*$-2*Z+n.d2R(149.15))+29e-5*Math.sin(3*G-7*J+2*M+2*N)+28e-5*Math.sin(J-N+2*Y-2*_)+-28e-5*Math.sin(2*(J-V))+-27e-5*Math.sin(M-N+T-V)+-26e-5*Math.sin(5*$-3*Z+n.d2R(188.37))+25e-5*Math.sin(V-T)+-25e-5*Math.sin(C-3*G+2*J)+-23e-5*Math.sin(3*(G-J))+21e-5*Math.sin(2*J-2*_-3*Z)+-21e-5*Math.sin(2*G-3*J+N)+19e-5*Math.sin(J-N-Z)+-19e-5*Math.sin(2*J-M-N)+-18e-5*Math.sin(J-N+Z)+-16e-5*Math.sin(J+M-2*_-2*Z);e.satellite1.meanLongitude=n.m360(y),e.satellite1.trueLongitude=n.m360(y+ab);var eb=n.d2R(e.satellite1.trueLongitude);e.satellite2.meanLongitude=n.m360(B),e.satellite2.trueLongitude=n.m360(B+bb);var fb=n.d2R(e.satellite2.trueLongitude);e.satellite3.meanLongitude=n.m360(F),e.satellite3.trueLongitude=n.m360(F+cb);var gb=n.d2R(e.satellite3.trueLongitude);e.satellite4.meanLongitude=n.m360(H),e.satellite4.trueLongitude=n.m360(H+db);var hb=n.d2R(e.satellite4.trueLongitude),ib=Math.atan(6393e-7*Math.sin(eb-P)+1825e-7*Math.sin(eb-R)+329e-7*Math.sin(eb-T)+-311e-7*Math.sin(eb-Y)+93e-7*Math.sin(eb-V)+75e-7*Math.sin(3*eb-4*C-1.9927*ab+R)+46e-7*Math.sin(eb+Y-2*_-2*Z));e.satellite1.equatorialLatitude=n.r2D(ib);var jb=Math.atan(.0081004*Math.sin(fb-R)+4512e-7*Math.sin(fb-T)+-3284e-7*Math.sin(fb-Y)+116e-6*Math.sin(fb-V)+272e-7*Math.sin(A-2*G+1.0146*bb+R)+-144e-7*Math.sin(fb-P)+143e-7*Math.sin(fb+Y-2*_-2*Z)+35e-7*Math.sin(fb-Y+Z)+-28e-7*Math.sin(A-2*G+1.0146*bb+T));e.satellite2.equatorialLatitude=n.r2D(jb);var kb=Math.atan(.0032402*Math.sin(gb-T)+-.0016911*Math.sin(gb-Y)+6847e-7*Math.sin(gb-V)+-2797e-7*Math.sin(gb-R)+321e-7*Math.sin(gb+Y-2*_-2*Z)+51e-7*Math.sin(gb-Y+Z)+-45e-7*Math.sin(gb-Y-Z)+-45e-7*Math.sin(gb+Y-2*_)+37e-7*Math.sin(gb+Y-2*_-3*Z)+3e-6*Math.sin(2*C-3*gb+4.03*cb+R)+-21e-7*Math.sin(2*C-3*gb+4.03*cb+T));e.satellite3.equatorialLatitude=n.r2D(kb);var lb=Math.atan(-.0076579*Math.sin(hb-Y)+.0044134*Math.sin(hb-V)+-5112e-7*Math.sin(hb-T)+773e-7*Math.sin(hb+Y-2*_-2*Z)+104e-7*Math.sin(hb-Y+Z)+-102e-7*Math.sin(hb-Y-Z)+88e-7*Math.sin(hb+Y-2*_-3*Z)+-38e-7*Math.sin(hb+Y-2*_-Z));e.satellite4.equatorialLatitude=n.r2D(lb),e.satellite1.r=5.90569*(1+(-.0041339*Math.cos(2*(A-C))+-387e-7*Math.cos(A-M)+-214e-7*Math.cos(A-N)+17e-6*Math.cos(A-C)+-131e-7*Math.cos(4*(A-C))+106e-7*Math.cos(A-G)+-66e-7*Math.cos(A+M-2*_-2*Z))),e.satellite2.r=9.39657*(1+(.0093848*Math.cos(A-C)+-3116e-7*Math.cos(C-M)+-1744e-7*Math.cos(C-N)+-1442e-7*Math.cos(C-L)+553e-7*Math.cos(C-G)+523e-7*Math.cos(A-G)+-29e-6*Math.cos(2*(A-C))+164e-7*Math.cos(2*(C-R))+107e-7*Math.cos(A-2*G+M)+-102e-7*Math.cos(C-K)+-91e-7*Math.cos(2*(A-G)))),e.satellite3.r=14.98832*(1+(-.0014388*Math.cos(G-M)+-7919e-7*Math.cos(G-N)+6342e-7*Math.cos(C-G)+-1761e-7*Math.cos(2*(G-J))+294e-7*Math.cos(G-J)+-156e-7*Math.cos(3*(G-J))+156e-7*Math.cos(A-G)+-153e-7*Math.cos(A-C)+7e-6*Math.cos(2*C-3*G+M)+-51e-7*Math.cos(G+M-2*_-2*Z))),e.satellite4.r=26.36273*(1+(-.0073546*Math.cos(J-N)+1621e-7*Math.cos(J-M)+974e-7*Math.cos(G-J)+-543e-7*Math.cos(J+N-2*_-2*Z)+-271e-7*Math.cos(2*(J-N))+182e-7*Math.cos(J-_)+177e-7*Math.cos(2*(G-J))+-167e-7*Math.cos(2*J-Y-V)+167e-7*Math.cos(Y-V)+-155e-7*Math.cos(2*(J-_-Z))+142e-7*Math.cos(2*(J-Y))+105e-7*Math.cos(A-J)+92e-7*Math.cos(C-J)+-89e-7*Math.cos(J-_-Z)+-62e-7*Math.cos(J+N-2*_-3*Z)+48e-7*Math.cos(2*(J-V))));var mb=(a-2433282.423)/36525,nb=n.d2R(1.3966626*mb+3088e-7*mb*mb);eb+=nb,e.satellite1.tropicalLongitude=n.m360(n.r2D(eb)),fb+=nb,e.satellite2.tropicalLongitude=n.m360(n.r2D(fb)),gb+=nb,e.satellite3.tropicalLongitude=n.m360(n.r2D(gb)),hb+=nb,e.satellite4.tropicalLongitude=n.m360(n.r2D(hb)),Y+=nb;var ob=(a-2415020.5)/36525,pb=3.120262+6e-4*ob,qb=n.d2R(pb),rb=e.satellite1.r*Math.cos(eb-Y)*Math.cos(ib),sb=e.satellite2.r*Math.cos(fb-Y)*Math.cos(jb),tb=e.satellite3.r*Math.cos(gb-Y)*Math.cos(kb),ub=e.satellite4.r*Math.cos(hb-Y)*Math.cos(lb),vb=0,wb=e.satellite1.r*Math.sin(eb-Y)*Math.cos(ib),xb=e.satellite2.r*Math.sin(fb-Y)*Math.cos(jb),yb=e.satellite3.r*Math.sin(gb-Y)*Math.cos(kb),zb=e.satellite4.r*Math.sin(hb-Y)*Math.cos(lb),Ab=0,Bb=e.satellite1.r*Math.sin(ib),Cb=e.satellite2.r*Math.sin(jb),Db=e.satellite3.r*Math.sin(kb),Eb=e.satellite4.r*Math.sin(lb),Fb=1,Gb=n.d2R(v.jupiterLongitudeAscendingNode(a)),Hb=n.d2R(v.jupiterInclination(a)),Ib=0,Jb=0,Kb=0,Lb=new m,Mb=E.rotations(vb,Ab,Fb,qb,Y,Hb,Gb,u,w,Lb); Ib=Mb[0],Jb=Mb[1],Kb=Mb[2];var Nb=Math.atan2(Ib,Kb);Mb=E.rotations(rb,wb,Bb,qb,Y,Hb,Gb,u,w,e.satellite1.eclipticRectangularCoordinates),Ib=Mb[0],Jb=Mb[1],Kb=Mb[2],e.satellite1.trueRectangularCoordinates.x=Ib*Math.cos(Nb)-Kb*Math.sin(Nb),e.satellite1.trueRectangularCoordinates.y=Ib*Math.sin(Nb)+Kb*Math.cos(Nb),e.satellite1.trueRectangularCoordinates.z=Jb,Mb=E.rotations(sb,xb,Cb,qb,Y,Hb,Gb,u,w,e.satellite2.eclipticRectangularCoordinates),Ib=Mb[0],Jb=Mb[1],Kb=Mb[2],e.satellite2.trueRectangularCoordinates.x=Ib*Math.cos(Nb)-Kb*Math.sin(Nb),e.satellite2.trueRectangularCoordinates.y=Ib*Math.sin(Nb)+Kb*Math.cos(Nb),e.satellite2.trueRectangularCoordinates.z=Jb,Mb=E.rotations(tb,yb,Db,qb,Y,Hb,Gb,u,w,e.satellite3.eclipticRectangularCoordinates),Ib=Mb[0],Jb=Mb[1],Kb=Mb[2],e.satellite3.trueRectangularCoordinates.x=Ib*Math.cos(Nb)-Kb*Math.sin(Nb),e.satellite3.trueRectangularCoordinates.y=Ib*Math.sin(Nb)+Kb*Math.cos(Nb),e.satellite3.trueRectangularCoordinates.z=Jb,Mb=E.rotations(ub,zb,Eb,qb,Y,Hb,Gb,u,w,e.satellite4.eclipticRectangularCoordinates),Ib=Mb[0],Jb=Mb[1],Kb=Mb[2],e.satellite4.trueRectangularCoordinates.x=Ib*Math.cos(Nb)-Kb*Math.sin(Nb),e.satellite4.trueRectangularCoordinates.y=Ib*Math.sin(Nb)+Kb*Math.cos(Nb),e.satellite4.trueRectangularCoordinates.z=Jb,e.satellite1.apparentRectangularCoordinates.x=e.satellite1.trueRectangularCoordinates.x+Math.abs(e.satellite1.trueRectangularCoordinates.z)/17295*Math.sqrt(1-e.satellite1.trueRectangularCoordinates.x/e.satellite1.r*(e.satellite1.trueRectangularCoordinates.x/e.satellite1.r)),e.satellite1.apparentRectangularCoordinates.y=e.satellite1.trueRectangularCoordinates.y,e.satellite1.apparentRectangularCoordinates.z=e.satellite1.trueRectangularCoordinates.z,e.satellite2.apparentRectangularCoordinates.x=e.satellite2.trueRectangularCoordinates.x+Math.abs(e.satellite2.trueRectangularCoordinates.z)/21819*Math.sqrt(1-e.satellite2.trueRectangularCoordinates.x/e.satellite2.r*(e.satellite2.trueRectangularCoordinates.x/e.satellite2.r)),e.satellite2.apparentRectangularCoordinates.y=e.satellite2.trueRectangularCoordinates.y,e.satellite2.apparentRectangularCoordinates.z=e.satellite2.trueRectangularCoordinates.z,e.satellite3.apparentRectangularCoordinates.x=e.satellite3.trueRectangularCoordinates.x+Math.abs(e.satellite3.trueRectangularCoordinates.z)/27558*Math.sqrt(1-e.satellite3.trueRectangularCoordinates.x/e.satellite3.r*(e.satellite3.trueRectangularCoordinates.x/e.satellite3.r)),e.satellite3.apparentRectangularCoordinates.y=e.satellite3.trueRectangularCoordinates.y,e.satellite3.apparentRectangularCoordinates.z=e.satellite3.trueRectangularCoordinates.z,e.satellite4.apparentRectangularCoordinates.x=e.satellite4.trueRectangularCoordinates.x+Math.abs(e.satellite4.trueRectangularCoordinates.z)/36548*Math.sqrt(1-e.satellite4.trueRectangularCoordinates.x/e.satellite4.r*(e.satellite4.trueRectangularCoordinates.x/e.satellite4.r)),e.satellite4.apparentRectangularCoordinates.y=e.satellite4.trueRectangularCoordinates.y,e.satellite4.apparentRectangularCoordinates.z=e.satellite4.trueRectangularCoordinates.z;var Ob=f/(f+e.satellite1.trueRectangularCoordinates.z/2095);return e.satellite1.apparentRectangularCoordinates.x*=Ob,e.satellite1.apparentRectangularCoordinates.y*=Ob,Ob=f/(f+e.satellite2.trueRectangularCoordinates.z/2095),e.satellite2.apparentRectangularCoordinates.x*=Ob,e.satellite2.apparentRectangularCoordinates.y*=Ob,Ob=f/(f+e.satellite3.trueRectangularCoordinates.z/2095),e.satellite3.apparentRectangularCoordinates.x*=Ob,e.satellite3.apparentRectangularCoordinates.y*=Ob,Ob=f/(f+e.satellite4.trueRectangularCoordinates.z/2095),e.satellite4.apparentRectangularCoordinates.x*=Ob,e.satellite4.apparentRectangularCoordinates.y*=Ob,e},E.rotations=function(a,b,c,d,e,f,g,h,i,j){var k,l,m,n=e-g,o=a,p=b*Math.cos(d)-c*Math.sin(d),q=b*Math.sin(d)+c*Math.cos(d),r=o*Math.cos(n)-p*Math.sin(n),s=o*Math.sin(n)+p*Math.cos(n),t=q,u=r,v=s*Math.cos(f)-t*Math.sin(f),w=s*Math.sin(f)+t*Math.cos(f),x=u*Math.cos(g)-v*Math.sin(g),y=u*Math.sin(g)+v*Math.cos(g),z=w,A=1/2095;j.x=x*A,j.y=y*A,j.z=z*A;var B=x*Math.sin(h)-y*Math.cos(h),C=x*Math.cos(h)+y*Math.sin(h),D=z;return k=B,l=D*Math.sin(i)+C*Math.cos(i),m=D*Math.cos(i)-C*Math.sin(i),[k,l,m]},E.fillInPhenomenaDetails=function(a){var b=1.071374*a.apparentRectangularCoordinates.y,c=b*b+a.apparentRectangularCoordinates.x*a.apparentRectangularCoordinates.x;1>c?a.apparentRectangularCoordinates.z<0?(a.bInTransit=!0,a.bInOccultation=!1):(a.bInTransit=!1,a.bInOccultation=!0):(a.bInTransit=!1,a.bInOccultation=!1)};var Ke={};F.rhoSinThetaPrime=function(a,b){a=n.d2R(a);var c=Math.atan(.99664719*Math.tan(a));return.99664719*Math.sin(c)+b/6378149*Math.sin(a)},F.rhoCosThetaPrime=function(a,b){a=n.d2R(a);var c=Math.atan(.99664719*Math.tan(a));return Math.cos(c)+b/6378149*Math.cos(a)},F.radiusOfParallelOfLatitude=function(a){a=n.d2R(a);var b=Math.sin(a);return 6378.14*Math.cos(a)/Math.sqrt(1-.0066943847614084*b*b)},F.radiusOfCurvature=function(a){a=n.d2R(a);var b=Math.sin(a);return 6335.4422767778715/Math.pow(1-.0066943847614084*b*b,1.5)},F.distanceBetweenPoints=function(a,b,c,d){a=n.d2R(a),c=n.d2R(c),b=n.d2R(b),d=n.d2R(d);var e=(a+c)/2,f=(a-c)/2,g=(b-d)/2,h=Math.sin(f),i=Math.cos(f),j=Math.cos(e),k=Math.sin(e),l=Math.sin(g),m=Math.cos(g),o=h*h*m*m+j*j*l*l,p=i*i*m*m+k*k*l*l,q=Math.atan(Math.sqrt(o/p)),r=Math.sqrt(o*p)/q,s=2*q*6378.14,t=(3*r-1)/(2*p),u=(3*r+1)/(2*o),v=.00335281317789691;return s*(1+v*t*k*k*i*i-v*u*j*j*h*h)};var Le={};G.phaseAngle=function(a,b,c){return n.m360(n.r2D(Math.acos((a*a+c*c-b*b)/(2*a*c))))},G.phaseAngle2=function(a,b,c,d,e,f){return c=n.d2R(c),d=n.d2R(d),e=n.d2R(e),n.m360(n.r2D(Math.acos((a-b*Math.cos(c)*Math.cos(d-e))/f)))},G.phaseAngleRectangular=function(a,b,c,d,e,f){d=n.d2R(d),e=n.d2R(e);var g=Math.cos(d);return n.m360(n.r2D(Math.acos((a*g*Math.cos(e)+b*g*Math.sin(e)+c*Math.sin(d))/f)))},G.illuminatedFraction=function(a){return a=n.d2R(a),(1+Math.cos(a))/2},G.illuminatedFraction2=function(a,b,c){return((a+c)*(a+c)-b*b)/(4*a*c)},G.mercuryMagnitudeMuller=function(a,b,c){var d=c-50;return 1.16+5*wc.log10(a*b)+.02838*d+1023e-7*d*d},G.venusMagnitudeMuller=function(a,b,c){return-4+5*wc.log10(a*b)+.01322*c+4.247e-7*c*c*c},G.marsMagnitudeMuller=function(a,b,c){return-1.3+5*wc.log10(a*b)+.01486*c},G.jupiterMagnitudeMuller=function(a,b){return-8.93+5*wc.log10(a*b)},G.saturnMagnitudeMuller=function(a,b,c,d){d=n.d2R(d);var e=Math.sin(d);return-8.68+5*wc.log10(a*b)+.044*Math.abs(c)-2.6*Math.sin(Math.abs(d))+1.25*e*e},G.uranusMagnitudeMuller=function(a,b){return-6.85+5*wc.log10(a*b)},G.neptuneMagnitudeMuller=function(a,b){return-7.05+5*wc.log10(a*b)},G.mercuryMagnitudeAA=function(a,b,c){var d=c*c,e=d*c;return-.42+5*wc.log10(a*b)+.038*c-273e-6*d+2e-6*e},G.venusMagnitudeAA=function(a,b,c){var d=c*c,e=d*c;return-4.4+5*wc.log10(a*b)+9e-4*c+239e-6*d-6.5e-7*e},G.marsMagnitudeAA=function(a,b,c){return-1.52+5*wc.log10(a*b)+.016*c},G.jupiterMagnitudeAA=function(a,b,c){return-9.4+5*wc.log10(a*b)+.005*c},G.saturnMagnitudeAA=function(a,b,c,d){d=n.d2R(d);var e=Math.sin(d);return-8.88+5*wc.log10(a*b)+.044*Math.abs(c)-2.6*Math.sin(Math.abs(d))+1.25*e*e},G.uranusMagnitudeAA=function(a,b){return-7.19+5*wc.log10(a*b)},G.neptuneMagnitudeAA=function(a,b){return-6.87+5*wc.log10(a*b)},G.plutoMagnitudeAA=function(a,b){return-1+5*wc.log10(a*b)};var Me={};H.interpolate=function(a,b,c,d){var e=c-b,f=d-c,g=b+d-2*c;return c+a/2*(e+f+a*g)},H.interpolate2=function(a,b,c,d,e,f){var g=c-b,h=d-c,i=e-d,j=f-e,k=h-g,l=i-h,m=j-i,n=l-k,o=m-l,p=o-n,q=a*a,r=q*a,s=r*a;return d+a*((h+i)/2-(n+o)/12)+q*(l/2-p/24)+r*((n+o)/12)+s*(p/24)},H.interpolateToHalves=function(a,b,c,d){return(9*(b+c)-a-d)/16},H.lagrangeInterpolate=function(a,b,c,d){for(var e=0,f=1;b>=f;f++){for(var g=1,h=1;b>=h;h++)h!==f&&(g=g*(a-c[h-1])/(c[f-1]-c[h-1]));e+=g*d[f-1]}return e},H.zero=function(a,b,c){for(var d=b-a,e=c-b,f=a+c-2*b,g=!0,h=0,i=h;g;)i=-2*b/(d+e+f*h),g=Math.abs(i-h)>1e-12,g&&(h=i);return i},H.zeroB=function(a,b,c,d,e){for(var f=b-a,g=c-b,h=d-c,i=e-d,j=g-f,k=h-g,l=i-h,m=k-j,n=l-k,o=n-m,p=!0,q=0,r=q;p;){var s=q*q,t=s*q,u=t*q;r=(-24*c+s*(o-12*k)-2*t*(m+n)-u*o)/(2*(6*g+6*h-m-n)),p=Math.abs(r-q)>1e-12,p&&(q=r)}return r},H.zero2=function(a,b,c){for(var d=b-a,e=c-b,f=a+c-2*b,g=!0,h=0,i=h;g;){var j=-(2*b+h*(d+e+f*h))/(d+e+2*f*h);i=h+j,g=Math.abs(j)>1e-12,g&&(h=i)}return i},H.zero2B=function(a,b,c,d,e){for(var f=b-a,g=c-b,h=d-c,i=e-d,j=g-f,k=h-g,l=i-h,m=k-j,n=l-k,o=n-m,p=o/24,q=(m+n)/12,r=k/2-p,s=(g+h)/2-q,t=!0,u=0,v=u;t;){var w=u*u,x=w*u,y=x*u,z=-(p*y+q*x+r*w+s*u+c)/(4*p*x+3*q*w+2*r*u+s);v=u+z,t=Math.abs(z)>1e-12,t&&(u=v)}return v};var Ne={};I.eclipticLongitude=function(a){var b,c=(a-2451545)/365250,d=c*c,e=d*c,f=e*c,g=f*c,i=h.g_L0JupiterCoefficients.length,j=0;for(b=0;i>b;b++)j+=h.g_L0JupiterCoefficients[b].a*Math.cos(h.g_L0JupiterCoefficients[b].b+h.g_L0JupiterCoefficients[b].c*c);var k=h.g_L1JupiterCoefficients.length,l=0;for(b=0;k>b;b++)l+=h.g_L1JupiterCoefficients[b].a*Math.cos(h.g_L1JupiterCoefficients[b].b+h.g_L1JupiterCoefficients[b].c*c);var m=h.g_L2JupiterCoefficients.length,o=0;for(b=0;m>b;b++)o+=h.g_L2JupiterCoefficients[b].a*Math.cos(h.g_L2JupiterCoefficients[b].b+h.g_L2JupiterCoefficients[b].c*c);var p=h.g_L3JupiterCoefficients.length,q=0;for(b=0;p>b;b++)q+=h.g_L3JupiterCoefficients[b].a*Math.cos(h.g_L3JupiterCoefficients[b].b+h.g_L3JupiterCoefficients[b].c*c);var r=h.g_L4JupiterCoefficients.length,s=0;for(b=0;r>b;b++)s+=h.g_L4JupiterCoefficients[b].a*Math.cos(h.g_L4JupiterCoefficients[b].b+h.g_L4JupiterCoefficients[b].c*c);var t=h.g_L5JupiterCoefficients.length,u=0;for(b=0;t>b;b++)u+=h.g_L5JupiterCoefficients[b].a*Math.cos(h.g_L5JupiterCoefficients[b].b+h.g_L5JupiterCoefficients[b].c*c);var v=(j+l*c+o*d+q*e+s*f+u*g)/1e8;return v=n.m360(n.r2D(v))},I.eclipticLatitude=function(a){var b,c=(a-2451545)/365250,d=c*c,e=d*c,f=e*c,g=f*c,i=h.g_B0JupiterCoefficients.length,j=0;for(b=0;i>b;b++)j+=h.g_B0JupiterCoefficients[b].a*Math.cos(h.g_B0JupiterCoefficients[b].b+h.g_B0JupiterCoefficients[b].c*c);var k=h.g_B1JupiterCoefficients.length,l=0;for(b=0;k>b;b++)l+=h.g_B1JupiterCoefficients[b].a*Math.cos(h.g_B1JupiterCoefficients[b].b+h.g_B1JupiterCoefficients[b].c*c);var m=h.g_B2JupiterCoefficients.length,o=0;for(b=0;m>b;b++)o+=h.g_B2JupiterCoefficients[b].a*Math.cos(h.g_B2JupiterCoefficients[b].b+h.g_B2JupiterCoefficients[b].c*c);var p=h.g_B3JupiterCoefficients.length,q=0;for(b=0;p>b;b++)q+=h.g_B3JupiterCoefficients[b].a*Math.cos(h.g_B3JupiterCoefficients[b].b+h.g_B3JupiterCoefficients[b].c*c);var r=h.g_B4JupiterCoefficients.length,s=0;for(b=0;r>b;b++)s+=h.g_B4JupiterCoefficients[b].a*Math.cos(h.g_B4JupiterCoefficients[b].b+h.g_B4JupiterCoefficients[b].c*c);var t=h.g_B5JupiterCoefficients.length,u=0;for(b=0;t>b;b++)u+=h.g_B5JupiterCoefficients[b].a*Math.cos(h.g_B5JupiterCoefficients[b].b+h.g_B5JupiterCoefficients[b].c*c);var v=(j+l*c+o*d+q*e+s*f+u*g)/1e8;return v=n.r2D(v)},I.radiusVector=function(a){var b,c=(a-2451545)/365250,d=c*c,e=d*c,f=e*c,g=f*c,i=h.g_R0JupiterCoefficients.length,j=0;for(b=0;i>b;b++)j+=h.g_R0JupiterCoefficients[b].a*Math.cos(h.g_R0JupiterCoefficients[b].b+h.g_R0JupiterCoefficients[b].c*c);var k=h.g_R1JupiterCoefficients.length,l=0;for(b=0;k>b;b++)l+=h.g_R1JupiterCoefficients[b].a*Math.cos(h.g_R1JupiterCoefficients[b].b+h.g_R1JupiterCoefficients[b].c*c);var m=h.g_R2JupiterCoefficients.length,n=0;for(b=0;m>b;b++)n+=h.g_R2JupiterCoefficients[b].a*Math.cos(h.g_R2JupiterCoefficients[b].b+h.g_R2JupiterCoefficients[b].c*c);var o=h.g_R3JupiterCoefficients.length,p=0;for(b=0;o>b;b++)p+=h.g_R3JupiterCoefficients[b].a*Math.cos(h.g_R3JupiterCoefficients[b].b+h.g_R3JupiterCoefficients[b].c*c);var q=h.g_R4JupiterCoefficients.length,r=0;for(b=0;q>b;b++)r+=h.g_R4JupiterCoefficients[b].a*Math.cos(h.g_R4JupiterCoefficients[b].b+h.g_R4JupiterCoefficients[b].c*c);var s=h.g_R5JupiterCoefficients.length,t=0;for(b=0;s>b;b++)t+=h.g_R5JupiterCoefficients[b].a*Math.cos(h.g_R5JupiterCoefficients[b].b+h.g_R5JupiterCoefficients[b].c*c);return(j+l*c+n*d+p*e+r*f+t*g)/1e8};var Oe={};J.calculate=function(a,b){return J.calculateIter(a,b,53)},J.calculateIter=function(a,b,c){a=n.d2R(a);var d=n.PI(),e=1;0>a&&(e=-1),a=Math.abs(a)/(2*d),a=2*(a-ss.truncate(a))*d*e,0>a&&(a+=2*d),e=1,a>d&&(e=-1),a>d&&(a=2*d-a);for(var f=d/2,g=d/4,h=0;c>h;h++){var i=f-b*Math.sin(f);a>i?f+=g:f-=g,g/=2}return n.r2D(f)*e};var Pe={};K.eclipticLongitude=function(a){var b,c=(a-2451545)/365250,d=c*c,e=d*c,f=e*c,g=f*c,i=h.g_L0MarsCoefficients.length,j=0;for(b=0;i>b;b++)j+=h.g_L0MarsCoefficients[b].a*Math.cos(h.g_L0MarsCoefficients[b].b+h.g_L0MarsCoefficients[b].c*c);var k=h.g_L1MarsCoefficients.length,l=0;for(b=0;k>b;b++)l+=h.g_L1MarsCoefficients[b].a*Math.cos(h.g_L1MarsCoefficients[b].b+h.g_L1MarsCoefficients[b].c*c);var m=h.g_L2MarsCoefficients.length,o=0;for(b=0;m>b;b++)o+=h.g_L2MarsCoefficients[b].a*Math.cos(h.g_L2MarsCoefficients[b].b+h.g_L2MarsCoefficients[b].c*c);var p=h.g_L3MarsCoefficients.length,q=0;for(b=0;p>b;b++)q+=h.g_L3MarsCoefficients[b].a*Math.cos(h.g_L3MarsCoefficients[b].b+h.g_L3MarsCoefficients[b].c*c);var r=h.g_L4MarsCoefficients.length,s=0;for(b=0;r>b;b++)s+=h.g_L4MarsCoefficients[b].a*Math.cos(h.g_L4MarsCoefficients[b].b+h.g_L4MarsCoefficients[b].c*c);var t=h.g_L5MarsCoefficients.length,u=0;for(b=0;t>b;b++)u+=h.g_L5MarsCoefficients[b].a*Math.cos(h.g_L5MarsCoefficients[b].b+h.g_L5MarsCoefficients[b].c*c);var v=(j+l*c+o*d+q*e+s*f+u*g)/1e8;return v=n.m360(n.r2D(v))},K.eclipticLatitude=function(a){var b,c=(a-2451545)/365250,d=c*c,e=d*c,f=e*c,g=h.g_B0MarsCoefficients.length,i=0;for(b=0;g>b;b++)i+=h.g_B0MarsCoefficients[b].a*Math.cos(h.g_B0MarsCoefficients[b].b+h.g_B0MarsCoefficients[b].c*c);var j=h.g_B1MarsCoefficients.length,k=0;for(b=0;j>b;b++)k+=h.g_B1MarsCoefficients[b].a*Math.cos(h.g_B1MarsCoefficients[b].b+h.g_B1MarsCoefficients[b].c*c);var l=h.g_B2MarsCoefficients.length,m=0;for(b=0;l>b;b++)m+=h.g_B2MarsCoefficients[b].a*Math.cos(h.g_B2MarsCoefficients[b].b+h.g_B2MarsCoefficients[b].c*c);var o=h.g_B3MarsCoefficients.length,p=0;for(b=0;o>b;b++)p+=h.g_B3MarsCoefficients[b].a*Math.cos(h.g_B3MarsCoefficients[b].b+h.g_B3MarsCoefficients[b].c*c);var q=h.g_B4MarsCoefficients.length,r=0;for(b=0;q>b;b++)r+=h.g_B4MarsCoefficients[b].a*Math.cos(h.g_B4MarsCoefficients[b].b+h.g_B4MarsCoefficients[b].c*c);var s=(i+k*c+m*d+p*e+r*f)/1e8;return s=n.r2D(s)},K.radiusVector=function(a){var b,c=(a-2451545)/365250,d=c*c,e=d*c,f=e*c,g=h.g_R0MarsCoefficients.length,i=0;for(b=0;g>b;b++)i+=h.g_R0MarsCoefficients[b].a*Math.cos(h.g_R0MarsCoefficients[b].b+h.g_R0MarsCoefficients[b].c*c);var j=h.g_R1MarsCoefficients.length,k=0;for(b=0;j>b;b++)k+=h.g_R1MarsCoefficients[b].a*Math.cos(h.g_R1MarsCoefficients[b].b+h.g_R1MarsCoefficients[b].c*c);var l=h.g_R2MarsCoefficients.length,m=0;for(b=0;l>b;b++)m+=h.g_R2MarsCoefficients[b].a*Math.cos(h.g_R2MarsCoefficients[b].b+h.g_R2MarsCoefficients[b].c*c);var n=h.g_R3MarsCoefficients.length,o=0;for(b=0;n>b;b++)o+=h.g_R3MarsCoefficients[b].a*Math.cos(h.g_R3MarsCoefficients[b].b+h.g_R3MarsCoefficients[b].c*c);var p=h.g_R4MarsCoefficients.length,q=0;for(b=0;p>b;b++)q+=h.g_R4MarsCoefficients[b].a*Math.cos(h.g_R4MarsCoefficients[b].b+h.g_R4MarsCoefficients[b].c*c);return(i+k*c+m*d+o*e+q*f)/1e8};var Qe={};L.eclipticLongitude=function(a){var b,c=(a-2451545)/365250,d=c*c,e=d*c,f=e*c,g=f*c,i=h.g_L0MercuryCoefficients.length,j=0;for(b=0;i>b;b++)j+=h.g_L0MercuryCoefficients[b].a*Math.cos(h.g_L0MercuryCoefficients[b].b+h.g_L0MercuryCoefficients[b].c*c);var k=h.g_L1MercuryCoefficients.length,l=0;for(b=0;k>b;b++)l+=h.g_L1MercuryCoefficients[b].a*Math.cos(h.g_L1MercuryCoefficients[b].b+h.g_L1MercuryCoefficients[b].c*c);var m=h.g_L2MercuryCoefficients.length,o=0;for(b=0;m>b;b++)o+=h.g_L2MercuryCoefficients[b].a*Math.cos(h.g_L2MercuryCoefficients[b].b+h.g_L2MercuryCoefficients[b].c*c);var p=h.g_L3MercuryCoefficients.length,q=0;for(b=0;p>b;b++)q+=h.g_L3MercuryCoefficients[b].a*Math.cos(h.g_L3MercuryCoefficients[b].b+h.g_L3MercuryCoefficients[b].c*c);var r=h.g_L4MercuryCoefficients.length,s=0;for(b=0;r>b;b++)s+=h.g_L4MercuryCoefficients[b].a*Math.cos(h.g_L4MercuryCoefficients[b].b+h.g_L4MercuryCoefficients[b].c*c);var t=h.g_L5MercuryCoefficients.length,u=0;for(b=0;t>b;b++)u+=h.g_L5MercuryCoefficients[b].a*Math.cos(h.g_L5MercuryCoefficients[b].b+h.g_L5MercuryCoefficients[b].c*c);var v=(j+l*c+o*d+q*e+s*f+u*g)/1e8;return v=n.m360(n.r2D(v))},L.eclipticLatitude=function(a){var b,c=(a-2451545)/365250,d=c*c,e=d*c,f=e*c,g=h.g_B0MercuryCoefficients.length,i=0;for(b=0;g>b;b++)i+=h.g_B0MercuryCoefficients[b].a*Math.cos(h.g_B0MercuryCoefficients[b].b+h.g_B0MercuryCoefficients[b].c*c);var j=h.g_B1MercuryCoefficients.length,k=0;for(b=0;j>b;b++)k+=h.g_B1MercuryCoefficients[b].a*Math.cos(h.g_B1MercuryCoefficients[b].b+h.g_B1MercuryCoefficients[b].c*c);var l=h.g_B2MercuryCoefficients.length,m=0;for(b=0;l>b;b++)m+=h.g_B2MercuryCoefficients[b].a*Math.cos(h.g_B2MercuryCoefficients[b].b+h.g_B2MercuryCoefficients[b].c*c);var o=h.g_B3MercuryCoefficients.length,p=0;for(b=0;o>b;b++)p+=h.g_B3MercuryCoefficients[b].a*Math.cos(h.g_B3MercuryCoefficients[b].b+h.g_B3MercuryCoefficients[b].c*c);var q=h.g_B4MercuryCoefficients.length,r=0;for(b=0;q>b;b++)r+=h.g_B4MercuryCoefficients[b].a*Math.cos(h.g_B4MercuryCoefficients[b].b+h.g_B4MercuryCoefficients[b].c*c);var s=(i+k*c+m*d+p*e+r*f)/1e8;return s=n.r2D(s)},L.radiusVector=function(a){var b,c=(a-2451545)/365250,d=c*c,e=d*c,f=h.g_R0MercuryCoefficients.length,g=0;for(b=0;f>b;b++)g+=h.g_R0MercuryCoefficients[b].a*Math.cos(h.g_R0MercuryCoefficients[b].b+h.g_R0MercuryCoefficients[b].c*c);var i=h.g_R1MercuryCoefficients.length,j=0;for(b=0;i>b;b++)j+=h.g_R1MercuryCoefficients[b].a*Math.cos(h.g_R1MercuryCoefficients[b].b+h.g_R1MercuryCoefficients[b].c*c);var k=h.g_R2MercuryCoefficients.length,l=0;for(b=0;k>b;b++)l+=h.g_R2MercuryCoefficients[b].a*Math.cos(h.g_R2MercuryCoefficients[b].b+h.g_R2MercuryCoefficients[b].c*c);var m=h.g_R3MercuryCoefficients.length,n=0;for(b=0;m>b;b++)n+=h.g_R3MercuryCoefficients[b].a*Math.cos(h.g_R3MercuryCoefficients[b].b+h.g_R3MercuryCoefficients[b].c*c);return(g+j*c+l*d+n*e)/1e8};var Re={};M.meanLongitude=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b,e=d*b;return n.m360(218.3164477+481267.88123421*b-.0015786*c+d/538841-e/65194e3)},M.meanElongation=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b,e=d*b;return n.m360(297.8501921+445267.1114034*b-.0018819*c+d/545868-e/113065e3)},M.meanAnomaly=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b,e=d*b;return n.m360(134.9633964+477198.8675055*b+.0087414*c+d/69699-e/14712e3)},M.argumentOfLatitude=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b,e=d*b;return n.m360(93.272095+483202.0175233*b-.0036539*c-d/3526e3+e/86331e4)},M.meanLongitudeAscendingNode=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b,e=d*b;return n.m360(125.0445479-1934.1362891*b+.0020754*c+d/467441-e/60616e3)},M.meanLongitudePerigee=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b,e=d*b;return n.m360(83.3532465+4069.0137287*b-.01032*c-d/80053+e/18999e3)},M.trueLongitudeAscendingNode=function(a){var b=M.meanLongitudeAscendingNode(a),c=M.meanElongation(a);c=n.d2R(c);var d=r.sunMeanAnomaly(a);d=n.d2R(d);var e=M.meanAnomaly(a);e=n.d2R(e);var f=M.argumentOfLatitude(a);return f=n.d2R(f),b-=1.4979*Math.sin(2*(c-f)),b-=.15*Math.sin(d),b-=.1226*Math.sin(2*c),b+=.1176*Math.sin(2*f),b-=.0801*Math.sin(2*(e-f)),n.m360(b)},M.eclipticLongitude=function(a){var b=M.meanLongitude(a),c=b;b=n.d2R(b);var d=M.meanElongation(a);d=n.d2R(d);var e=r.sunMeanAnomaly(a);e=n.d2R(e);var f=M.meanAnomaly(a);f=n.d2R(f);var g=M.argumentOfLatitude(a);g=n.d2R(g);var i=r.eccentricity(a),j=(a-2451545)/36525,k=n.m360(119.75+131.849*j);k=n.d2R(k);var l=n.m360(53.09+479264.29*j);l=n.d2R(l);var m=n.m360(313.45+481266.484*j);m=n.d2R(m);for(var o=h.g_MoonCoefficients1.length,p=0,q=0;o>q;q++){var s=h.g_MoonCoefficients2[q].a*Math.sin(h.g_MoonCoefficients1[q].d*d+h.g_MoonCoefficients1[q].m*e+h.g_MoonCoefficients1[q].mdash*f+h.g_MoonCoefficients1[q].f*g);h.g_MoonCoefficients1[q].m&&(s*=i),p+=s}p+=3958*Math.sin(k),p+=1962*Math.sin(b-g),p+=318*Math.sin(l);var t=V.nutationInLongitude(a);return n.m360(c+p/1e6+t/3600)},M.eclipticLatitude=function(a){var b=M.meanLongitude(a);b=n.d2R(b);var c=M.meanElongation(a);c=n.d2R(c);var d=r.sunMeanAnomaly(a);d=n.d2R(d);var e=M.meanAnomaly(a);e=n.d2R(e);var f=M.argumentOfLatitude(a);f=n.d2R(f);var g=r.eccentricity(a),i=(a-2451545)/36525,j=n.m360(119.75+131.849*i);j=n.d2R(j);var k=n.m360(53.09+479264.29*i);k=n.d2R(k);var l=n.m360(313.45+481266.484*i);l=n.d2R(l);for(var m=h.g_MoonCoefficients3.length,o=0,p=0;m>p;p++){var q=h.g_MoonCoefficients4[p]*Math.sin(h.g_MoonCoefficients3[p].d*c+h.g_MoonCoefficients3[p].m*d+h.g_MoonCoefficients3[p].mdash*e+h.g_MoonCoefficients3[p].f*f);h.g_MoonCoefficients3[p].m&&(q*=g),o+=q}return o-=2235*Math.sin(b),o+=382*Math.sin(l),o+=175*Math.sin(j-f),o+=175*Math.sin(j+f),o+=127*Math.sin(b-e),o-=115*Math.sin(b+e),o/1e6},M.radiusVector=function(a){var b=M.meanLongitude(a);b=n.d2R(b);var c=M.meanElongation(a);c=n.d2R(c);var d=r.sunMeanAnomaly(a);d=n.d2R(d);var e=M.meanAnomaly(a);e=n.d2R(e);var f=M.argumentOfLatitude(a);f=n.d2R(f);var g=r.eccentricity(a),i=(a-2451545)/36525,j=n.m360(119.75+131.849*i);j=n.d2R(j);var k=n.m360(53.09+479264.29*i);k=n.d2R(k);var l=n.m360(313.45+481266.484*i);l=n.d2R(l);for(var m=h.g_MoonCoefficients1.length,o=0,p=0;m>p;p++){var q=h.g_MoonCoefficients2[p].b*Math.cos(h.g_MoonCoefficients1[p].d*c+h.g_MoonCoefficients1[p].m*d+h.g_MoonCoefficients1[p].mdash*e+h.g_MoonCoefficients1[p].f*f);h.g_MoonCoefficients1[p].m&&(q*=g),o+=q}return 385000.56+o/1e3},M.radiusVectorToHorizontalParallax=function(a){return n.r2D(Math.asin(6378.14/a))},M.horizontalParallaxToRadiusVector=function(a){return 6378.14/Math.sin(n.d2R(a))};var Se={},Te={},Ue={};P.geocentricElongation=function(a,b,c,d){return a=n.d2R(15*a),c=n.d2R(15*c),b=n.d2R(b),d=n.d2R(d),n.r2D(Math.acos(Math.sin(d)*Math.sin(b)+Math.cos(d)*Math.cos(b)*Math.cos(c-a)))},P.phaseAngle=function(a,b,c){return a=n.d2R(a),n.m360(n.r2D(Math.atan2(c*Math.sin(a),b-c*Math.cos(a))))},P.illuminatedFraction=function(a){return a=n.d2R(a),(1+Math.cos(a))/2},P.positionAngle=function(a,b,c,d){return a=n.h2R(a),c=n.h2R(c),b=n.d2R(b),d=n.d2R(d),n.m360(n.r2D(Math.atan2(Math.cos(b)*Math.sin(a-c),Math.sin(b)*Math.cos(d)-Math.cos(b)*Math.sin(d)*Math.cos(a-c))))};var Ve={};Q.k=function(a){return 13.4223*(a-2000.05)},Q.passageThroNode=function(a){var b=a/1342.23,c=b*b,d=c*b,e=d*b,f=n.m360(183.638+331.73735682*a+.0014852*c+209e-8*d-1e-8*e),g=n.m360(17.4006+26.8203725*a+1186e-7*c+6e-8*d),h=n.m360(38.3776+355.52747313*a+.0123499*c+14627e-9*d-6.9e-8*e),i=n.m360(123.9767-1.44098956*a+.0020608*c+214e-8*d-1.6e-8*e),j=n.m360(299.75+132.85*b-.009173*c),k=n.m360(i+272.75-2.3*b),l=1-.002516*b-74e-7*c;f=n.d2R(f);var m=2*f,o=m*m;g=n.d2R(g),h=n.d2R(h);var p=2*h;i=n.d2R(i),j=n.d2R(j),k=n.d2R(k);var q=2451565.1619+27.212220817*a+2762e-7*c+2.1e-8*d-8.8e-11*e-.4721*Math.sin(h)-.1649*Math.sin(m)-.0868*Math.sin(m-h)+.0084*Math.sin(m+h)-.0083*l*Math.sin(m-g)-.0039*l*Math.sin(m-g-h)+.0034*Math.sin(p)-.0031*Math.sin(m-p)+.003*l*Math.sin(m+g)+.0028*l*Math.sin(g-h)+.0026*l*Math.sin(g)+.0025*Math.sin(o)+.0024*Math.sin(f)+.0022*l*Math.sin(g+h)+.0017*Math.sin(i)+.0014*Math.sin(o-h)+5e-4*l*Math.sin(m+g-h)+4e-4*l*Math.sin(m-g+h)-3e-4*l*Math.sin(m-g*g)+3e-4*l*Math.sin(o-g)+3e-4*Math.sin(j)+3e-4*Math.sin(k);return q};var We={};R.k=function(a){return 13.2555*(a-1999.97)},R.meanPerigee=function(a){var b=a/1325.55,c=b*b,d=c*b,e=d*b;return 2451534.6698+27.55454989*a-6691e-7*c-1098e-9*d+5.2e-9*e},R.meanApogee=function(a){return R.meanPerigee(a)},R.truePerigee=function(a){var b=R.meanPerigee(a),c=a/1325.55,d=c*c,e=d*c,f=e*c,g=n.m360(171.9179+335.9106046*a-.0100383*d-1156e-8*e+5.5e-8*f);g=n.d2R(g);var i=n.m360(347.3477+27.1577721*a-813e-6*d-1e-6*e);i=n.d2R(i);var j=n.m360(316.6109+364.5287911*a-.0125053*d-148e-7*e);j=n.d2R(j);for(var k=h.g_MoonPerigeeApogeeCoefficients1.length,l=0,m=0;k>m;m++)l+=h.g_MoonPerigeeApogeeCoefficients1[m].c*Math.sin(g*h.g_MoonPerigeeApogeeCoefficients1[m].d+i*h.g_MoonPerigeeApogeeCoefficients1[m].m+j*h.g_MoonPerigeeApogeeCoefficients1[m].f+c*h.g_MoonPerigeeApogeeCoefficients1[m].t);return b+l},R.trueApogee=function(a){var b=R.meanApogee(a),c=a/1325.55,d=c*c,e=d*c,f=e*c,g=n.m360(171.9179+335.9106046*a-.0100383*d-1156e-8*e+5.5e-8*f);g=n.d2R(g);var i=n.m360(347.3477+27.1577721*a-813e-6*d-1e-6*e);i=n.d2R(i);var j=n.m360(316.6109+364.5287911*a-.0125053*d-148e-7*e);j=n.d2R(j);for(var k=h.g_MoonPerigeeApogeeCoefficients2.length,l=0,m=0;k>m;m++)l+=(h.g_MoonPerigeeApogeeCoefficients2[m].c+c*h.g_MoonPerigeeApogeeCoefficients2[m].t)*Math.sin(g*h.g_MoonPerigeeApogeeCoefficients2[m].d+i*h.g_MoonPerigeeApogeeCoefficients2[m].m+j*h.g_MoonPerigeeApogeeCoefficients2[m].f);return b+l},R.perigeeParallax=function(a){var b=a/1325.55,c=b*b,d=c*b,e=d*b,f=n.m360(171.9179+335.9106046*a-.0100383*c-1156e-8*d+5.5e-8*e);f=n.d2R(f);var g=n.m360(347.3477+27.1577721*a-813e-6*c-1e-6*d);g=n.d2R(g);var i=n.m360(316.6109+364.5287911*a-.0125053*c-148e-7*d);i=n.d2R(i);for(var j=h.g_MoonPerigeeApogeeCoefficients3.length,k=3629.215,l=0;j>l;l++)k+=(h.g_MoonPerigeeApogeeCoefficients3[l].c+b*h.g_MoonPerigeeApogeeCoefficients3[l].t)*Math.cos(f*h.g_MoonPerigeeApogeeCoefficients3[l].d+g*h.g_MoonPerigeeApogeeCoefficients3[l].m+i*h.g_MoonPerigeeApogeeCoefficients3[l].f);return k/3600},R.apogeeParallax=function(a){var b=a/1325.55,c=b*b,d=c*b,e=d*b,f=n.m360(171.9179+335.9106046*a-.0100383*c-1156e-8*d+5.5e-8*e);f=n.d2R(f);var g=n.m360(347.3477+27.1577721*a-813e-6*c-1e-6*d);g=n.d2R(g);var i=n.m360(316.6109+364.5287911*a-.0125053*c-148e-7*d);i=n.d2R(i);for(var j=h.g_MoonPerigeeApogeeCoefficients4.length,k=3245.251,l=0;j>l;l++)k+=(h.g_MoonPerigeeApogeeCoefficients4[l].c+b*h.g_MoonPerigeeApogeeCoefficients4[l].t)*Math.cos(f*h.g_MoonPerigeeApogeeCoefficients4[l].d+g*h.g_MoonPerigeeApogeeCoefficients4[l].m+i*h.g_MoonPerigeeApogeeCoefficients4[l].f);return k/3600};var Xe={},Ye={};T.k=function(a){return 12.3685*(a-2e3)},T.meanPhase=function(a){var b=a/1236.85,c=b*b,d=c*b,e=d*b;return 2451550.09766+29.530588861*a+15437e-8*c-1.5e-7*d+7.3e-10*e},T.truePhase=function(a){var b=T.meanPhase(a),c=a/1236.85,d=c*c,e=d*c,f=e*c,g=1-.002516*c-74e-7*d,h=g*g,i=n.m360(2.5534+29.1053567*a-14e-7*d-1.1e-7*e);i=n.d2R(i);var j=n.m360(201.5643+385.81693528*a+.0107582*d+1238e-8*e-5.8e-8*f);j=n.d2R(j);var k=n.m360(160.7108+390.67050284*a-.0016118*d-227e-8*e+1e-8*f);k=n.d2R(k);var l=n.m360(124.7746-1.56375588*a+.0020672*d+215e-8*e);l=n.d2R(l);var m=n.m360(299.77+.107408*a-.009173*d);m=n.d2R(m);var o=n.m360(251.88+.016321*a);o=n.d2R(o);var p=n.m360(251.83+26.651886*a);p=n.d2R(p);var q=n.m360(349.42+36.412478*a);q=n.d2R(q);var r=n.m360(84.66+18.206239*a);r=n.d2R(r);var s=n.m360(141.74+53.303771*a);s=n.d2R(s);var t=n.m360(207.14+2.453732*a);t=n.d2R(t);var u=n.m360(154.84+7.30686*a);u=n.d2R(u);var v=n.m360(34.52+27.261239*a);v=n.d2R(v);var w=n.m360(207.19+.121824*a);w=n.d2R(w);var x=n.m360(291.34+1.844379*a);x=n.d2R(x);var y=n.m360(161.72+24.198154*a);y=n.d2R(y);var z=n.m360(239.56+25.513099*a);z=n.d2R(z);var A=n.m360(331.55+3.592518*a);A=n.d2R(A);var B=Math.floor(a),C=a-B;if(0>C&&(C=1+C),C){if(.25===C||.75===C){var D=-.62801*Math.sin(j)+.17172*g*Math.sin(i)+-.01183*g*Math.sin(j+i)+.00862*Math.sin(2*j)+.00804*Math.sin(2*k)+.00454*g*Math.sin(j-i)+.00204*h*Math.sin(2*i)+-.0018*Math.sin(j-2*k)+-7e-4*Math.sin(j+2*k)+-4e-4*Math.sin(3*j)+-34e-5*g*Math.sin(2*j-i)+32e-5*g*Math.sin(i+2*k)+32e-5*g*Math.sin(i-2*k)+-28e-5*h*Math.sin(j+2*i)+27e-5*g*Math.sin(2*j+i)+-17e-5*Math.sin(l)+-5e-5*Math.sin(j-i-2*k)+4e-5*Math.sin(2*j+2*k)+-4e-5*Math.sin(j+i+2*k)+4e-5*Math.sin(j-2*i)+3e-5*Math.sin(j+i-2*k)+3e-5*Math.sin(3*i)+2e-5*Math.sin(2*j-2*k)+2e-5*Math.sin(j-i+2*k)+-2e-5*Math.sin(3*j+i);b+=D;var E=.00306-38e-5*g*Math.cos(i)+26e-5*Math.cos(j)-2e-5*Math.cos(j-i)+2e-5*Math.cos(j+i)+2e-5*Math.cos(2*k);.25===C?b+=E:b-=E}else if(.5===C){var D=-.40614*Math.sin(j)+.17302*g*Math.sin(i)+.01614*Math.sin(2*j)+.01043*Math.sin(2*k)+.00734*g*Math.sin(j-i)+-.00514*g*Math.sin(j+i)+.00209*h*Math.sin(2*i)+-.00111*Math.sin(j-2*k)+-57e-5*Math.sin(j+2*k)+56e-5*g*Math.sin(2*j+i)+-42e-5*Math.sin(3*j)+42e-5*g*Math.sin(i+2*k)+38e-5*g*Math.sin(i-2*k)+-24e-5*g*Math.sin(2*j-i)+-17e-5*Math.sin(l)+-7e-5*Math.sin(j+2*i)+4e-5*Math.sin(2*j-2*k)+4e-5*Math.sin(3*i)+3e-5*Math.sin(j+i-2*k)+3e-5*Math.sin(2*j+2*k)+-3e-5*Math.sin(j+i+2*k)+3e-5*Math.sin(j-i+2*k)+-2e-5*Math.sin(j-i-2*k)+-2e-5*Math.sin(3*j+i)+2e-5*Math.sin(4*j);b+=D}}else{var D=-.4072*Math.sin(j)+.17241*g*Math.sin(i)+.01608*Math.sin(2*j)+.01039*Math.sin(2*k)+.00739*g*Math.sin(j-i)+-.00514*g*Math.sin(j+i)+.00208*h*Math.sin(2*i)+-.00111*Math.sin(j-2*k)+-57e-5*Math.sin(j+2*k)+56e-5*g*Math.sin(2*j+i)+-42e-5*Math.sin(3*j)+42e-5*g*Math.sin(i+2*k)+38e-5*g*Math.sin(i-2*k)+-24e-5*g*Math.sin(2*j-i)+-17e-5*Math.sin(l)+-7e-5*Math.sin(j+2*i)+4e-5*Math.sin(2*j-2*k)+4e-5*Math.sin(3*i)+3e-5*Math.sin(j+i-2*k)+3e-5*Math.sin(2*j+2*k)+-3e-5*Math.sin(j+i+2*k)+3e-5*Math.sin(j-i+2*k)+-2e-5*Math.sin(j-i-2*k)+-2e-5*Math.sin(3*j+i)+2e-5*Math.sin(4*j);b+=D}var F=325e-6*Math.sin(m)+165e-6*Math.sin(o)+164e-6*Math.sin(p)+126e-6*Math.sin(q)+11e-5*Math.sin(r)+62e-6*Math.sin(s)+6e-5*Math.sin(t)+56e-6*Math.sin(u)+47e-6*Math.sin(v)+42e-6*Math.sin(w)+4e-5*Math.sin(x)+37e-6*Math.sin(y)+35e-6*Math.sin(z)+23e-6*Math.sin(A);return b+=F};var Ze={};U.eclipticLongitude=function(a){var b,c=(a-2451545)/365250,d=c*c,e=d*c,f=e*c,g=h.g_L0NC.length,i=0;for(b=0;g>b;b++)i+=h.g_L0NC[b].a*Math.cos(h.g_L0NC[b].b+h.g_L0NC[b].c*c);var j=h.g_L1NC.length,k=0;for(b=0;j>b;b++)k+=h.g_L1NC[b].a*Math.cos(h.g_L1NC[b].b+h.g_L1NC[b].c*c);var l=h.g_L2NC.length,m=0;for(b=0;l>b;b++)m+=h.g_L2NC[b].a*Math.cos(h.g_L2NC[b].b+h.g_L2NC[b].c*c);var o=h.g_L3NC.length,p=0;for(b=0;o>b;b++)p+=h.g_L3NC[b].a*Math.cos(h.g_L3NC[b].b+h.g_L3NC[b].c*c);var q=h.g_L4NC.length,r=0;for(b=0;q>b;b++)r+=h.g_L4NC[b].a*Math.cos(h.g_L4NC[b].b+h.g_L4NC[b].c*c);var s=(i+k*c+m*d+p*e+r*f)/1e8;return s=n.m360(n.r2D(s))},U.eclipticLatitude=function(a){var b,c=(a-2451545)/365250,d=c*c,e=d*c,f=e*c,g=h.g_B0NC.length,i=0;for(b=0;g>b;b++)i+=h.g_B0NC[b].a*Math.cos(h.g_B0NC[b].b+h.g_B0NC[b].c*c);var j=h.g_B1NC.length,k=0;for(b=0;j>b;b++)k+=h.g_B1NC[b].a*Math.cos(h.g_B1NC[b].b+h.g_B1NC[b].c*c);var l=h.g_B2NC.length,m=0;for(b=0;l>b;b++)m+=h.g_B2NC[b].a*Math.cos(h.g_B2NC[b].b+h.g_B2NC[b].c*c);var o=h.g_B3NC.length,p=0;for(b=0;o>b;b++)p+=h.g_B3NC[b].a*Math.cos(h.g_B3NC[b].b+h.g_B3NC[b].c*c);var q=h.g_B4NC.length,r=0;for(b=0;q>b;b++)r+=h.g_B4NC[b].a*Math.cos(h.g_B4NC[b].b+h.g_B4NC[b].c*c);var s=(i+k*c+m*d+p*e+r*f)/1e8;return s=n.r2D(s)},U.radiusVector=function(a){var b,c=(a-2451545)/365250,d=c*c,e=d*c,f=h.g_R0NC.length,g=0;for(b=0;f>b;b++)g+=h.g_R0NC[b].a*Math.cos(h.g_R0NC[b].b+h.g_R0NC[b].c*c);var i=h.g_R1NC.length,j=0;for(b=0;i>b;b++)j+=h.g_R1NC[b].a*Math.cos(h.g_R1NC[b].b+h.g_R1NC[b].c*c);var k=h.g_R2NC.length,l=0;for(b=0;k>b;b++)l+=h.g_R2NC[b].a*Math.cos(h.g_R2NC[b].b+h.g_R2NC[b].c*c);var m=h.g_R3NC.length,n=0;for(b=0;m>b;b++)n+=h.g_R3NC[b].a*Math.cos(h.g_R3NC[b].b+h.g_R3NC[b].c*c);return(g+j*c+l*d+n*e)/1e8};var $e={};V.nutationInLongitude=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b,e=297.85036+445267.11148*b-.0019142*c+d/189474;e=n.m360(e);var f=357.52772+35999.05034*b-1603e-7*c-d/3e5;f=n.m360(f);var g=134.96298+477198.867398*b+.0086972*c+d/56250;g=n.m360(g);var i=93.27191+483202.017538*b-.0036825*c+d/327270;i=n.m360(i);var j=125.04452-1934.136261*b+.0020708*c+d/45e4;j=n.m360(j);for(var k=h.g_NuC.length,l=0,m=0;k>m;m++){var o=h.g_NuC[m].d*e+h.g_NuC[m].m*f+h.g_NuC[m].mprime*g+h.g_NuC[m].f*i+h.g_NuC[m].omega*j,p=n.d2R(o);l+=(h.g_NuC[m].sincoeff1+h.g_NuC[m].sincoeff2*b)*Math.sin(p)*1e-4}return l},V.nutationInObliquity=function(a){var b=(a-2451545)/36525,c=b*b,d=c*b,e=297.85036+445267.11148*b-.0019142*c+d/189474;e=n.m360(e);var f=357.52772+35999.05034*b-1603e-7*c-d/3e5;f=n.m360(f);var g=134.96298+477198.867398*b+.0086972*c+d/56250;g=n.m360(g);var i=93.27191+483202.017538*b-.0036825*c+d/327270;i=n.m360(i);var j=125.04452-1934.136261*b+.0020708*c+d/45e4;j=n.m360(j);for(var k=h.g_NuC.length,l=0,m=0;k>m;m++){var o=h.g_NuC[m].d*e+h.g_NuC[m].m*f+h.g_NuC[m].mprime*g+h.g_NuC[m].f*i+h.g_NuC[m].omega*j,p=n.d2R(o); l+=(h.g_NuC[m].coscoeff1+h.g_NuC[m].coscoeff2*b)*Math.cos(p)*1e-4}return l},V.nutationInRightAscension=function(a,b,c,d,e){return a=n.h2R(a),b=n.d2R(b),c=n.d2R(c),(Math.cos(c)+Math.sin(c)*Math.sin(a)*Math.tan(b))*d-Math.cos(a)*Math.tan(b)*e},V.nutationInDeclination=function(a,b,c,d,e){return a=n.h2R(a),b=n.d2R(b),c=n.d2R(c),Math.sin(c)*Math.cos(a)*d+Math.sin(a)*e},V.meanObliquityOfEcliptic=function(a){var b=(a-2451545)/3652500,c=b*b,d=c*b,e=d*b,f=e*b,g=f*b,h=g*b,i=h*b,j=i*b,k=j*b;return n.dmS2D(23,26,21.448)-n.dmS2D(0,0,4680.93)*b-n.dmS2D(0,0,1.55)*c+n.dmS2D(0,0,1999.25)*d-n.dmS2D(0,0,51.38)*e-n.dmS2D(0,0,249.67)*f-n.dmS2D(0,0,39.05)*g+n.dmS2D(0,0,7.12)*h+n.dmS2D(0,0,27.87)*i+n.dmS2D(0,0,5.79)*j+n.dmS2D(0,0,2.45)*k},V.trueObliquityOfEcliptic=function(a){return V.meanObliquityOfEcliptic(a)+n.dmS2D(0,0,V.nutationInObliquity(a))};var _e={},af={},bf={};Y.equatorial2TopocentricDelta=function(a,b,c,d,e,f,g){var i=F.rhoSinThetaPrime(e,f),j=F.rhoCosThetaPrime(e,f),k=mb.apparentGreenwichSiderealTime(g);b=n.d2R(b);var m=Math.cos(b),o=Math.asin(h.g_AAParallax_C1/c),p=n.h2R(k-d/15-a),q=Math.cos(p),r=Math.sin(p),s=new l;return s.x=n.r2H(-o*j*r/m),s.y=n.r2D(-o*(i*m-j*q*Math.sin(b))),s},Y.equatorial2Topocentric=function(a,b,c,d,e,f,g){var i=F.rhoSinThetaPrime(e,f),j=F.rhoCosThetaPrime(e,f),k=mb.apparentGreenwichSiderealTime(g);b=n.d2R(b);var m=Math.cos(b),o=Math.asin(h.g_AAParallax_C1/c),p=Math.sin(o),q=n.h2R(k-d/15-a),r=Math.cos(q),s=Math.sin(q),t=Math.atan2(-j*p*s,m-j*p*r),u=new l;return u.x=n.m24(a+n.r2H(t)),u.y=n.r2D(Math.atan2((Math.sin(b)-i*p)*Math.cos(t),m-j*p*r)),u},Y.ecliptic2Topocentric=function(a,b,c,d,e,f,g,i,j){var k=F.rhoSinThetaPrime(g,i),l=F.rhoCosThetaPrime(g,i);a=n.d2R(a),b=n.d2R(b),e=n.d2R(e),f=n.d2R(f),g=n.d2R(g),c=n.d2R(c);var m=Math.sin(e),o=Math.cos(e),p=Math.cos(b),q=Math.sin(b),r=mb.apparentGreenwichSiderealTime(j);r=n.h2R(r);var s=Math.sin(r),t=Math.asin(h.g_AAParallax_C1/d),u=Math.sin(t),v=Math.cos(a)*p-l*u*Math.cos(r),w=new X;w.lambda=Math.atan2(Math.sin(a)*p-u*(k*m+l*o*s),v);var x=Math.cos(w.lambda);return w.beta=Math.atan(x*(q-u*(k*o-l*m*s))/v),w.semidiameter=Math.asin(x*Math.cos(w.beta)*Math.sin(c)/v),w.semidiameter=n.r2D(w.semidiameter),w.lambda=n.m360(n.r2D(w.lambda)),w.beta=n.r2D(w.beta),w},Y.parallaxToDistance=function(a){return h.g_AAParallax_C1/Math.sin(n.d2R(a))},Y.distanceToParallax=function(a){var b=Math.asin(h.g_AAParallax_C1/a);return n.r2D(b)};var cf={},df={};$.calculate=function(a){var b=new Z,c=a-2433282.5,d=c/36525,e=268+.1061*d,f=n.d2R(e),g=64.5-.0164*d,h=n.d2R(g),i=n.m360(17.71+877.90003539*c),j=n.m360(16.838+870.27003539*c),k=r.eclipticLongitude(a),l=n.d2R(k),m=r.eclipticLatitude(a),o=n.d2R(m),p=r.radiusVector(a),q=I.eclipticLongitude(a),s=n.d2R(q),t=I.eclipticLatitude(a),u=n.d2R(t),v=I.radiusVector(a),w=v*Math.cos(u)*Math.cos(s)-p*Math.cos(l),x=v*Math.cos(u)*Math.sin(s)-p*Math.sin(l),y=v*Math.sin(u)-p*Math.sin(o),z=Math.sqrt(w*w+x*x+y*y);q-=.01299*z/(v*v),s=n.d2R(q),w=v*Math.cos(u)*Math.cos(s)-p*Math.cos(l),x=v*Math.cos(u)*Math.sin(s)-p*Math.sin(l),y=v*Math.sin(u)-p*Math.sin(o),z=Math.sqrt(w*w+x*x+y*y);var A=V.meanObliquityOfEcliptic(a),B=n.d2R(A),C=Math.atan2(Math.cos(B)*Math.sin(s)-Math.sin(B)*Math.tan(u),Math.cos(s)),D=Math.asin(Math.cos(B)*Math.sin(u)+Math.sin(B)*Math.cos(u)*Math.sin(s));b.DS=n.r2D(Math.asin(-Math.sin(h)*Math.sin(D)-Math.cos(h)*Math.cos(D)*Math.cos(f-C)));var E=x*Math.cos(B)-y*Math.sin(B),F=x*Math.sin(B)+y*Math.cos(B),G=Math.atan2(E,w),H=n.r2D(G),J=Math.atan2(F,Math.sqrt(w*w+E*E)),K=n.r2D(J),L=Math.atan2(Math.sin(h)*Math.cos(J)*Math.cos(f-G)-Math.sin(J)*Math.cos(h),Math.cos(J)*Math.sin(f-G));b.DE=n.r2D(Math.asin(-Math.sin(h)*Math.sin(J)-Math.cos(h)*Math.cos(J)*Math.cos(f-G))),b.geometricw1=n.m360(i-n.r2D(L)-5.07033*z),b.geometricw2=n.m360(j-n.r2D(L)-5.02626*z);var M=57.2958*(2*v*z+p*p-v*v-z*z)/(4*v*z);Math.sin(s-l)>0?(b.apparentw1=n.m360(b.geometricw1+M),b.apparentw2=n.m360(b.geometricw2+M)):(b.apparentw1=n.m360(b.geometricw1-M),b.apparentw2=n.m360(b.geometricw2-M));var N=V.nutationInLongitude(a),O=V.nutationInObliquity(a);A+=O/3600,B=n.d2R(A),H+=.005693*(Math.cos(G)*Math.cos(l)*Math.cos(B)+Math.sin(G)*Math.sin(l))/Math.cos(J),H=n.m360(H),G=n.d2R(H),K+=.005693*(Math.cos(l)*Math.cos(B)*(Math.tan(B)*Math.cos(J)-Math.sin(G)*Math.sin(J))+Math.cos(G)*Math.sin(J)*Math.sin(l)),J=n.d2R(K);var P=V.nutationInRightAscension(H/15,K,A,N,O),Q=H+P/3600,R=n.d2R(Q),S=V.nutationInDeclination(H/15,K,A,N,O),T=K+S/3600,U=n.d2R(T);P=V.nutationInRightAscension(e/15,g,A,N,O);var W=e+P/3600,X=n.d2R(W);S=V.nutationInDeclination(e/15,g,A,N,O);var Y=g+S/3600,$=n.d2R(Y);return b.p=n.m360(n.r2D(Math.atan2(Math.cos($)*Math.sin(X-R),Math.sin($)*Math.cos(U)-Math.cos($)*Math.sin(U)*Math.cos(X-R)))),b};var ef={},ff={};ab.calculate=function(a){for(var b=new _,c=(a-2451545)/36525,d=352.9065+1.1733*c,e=n.d2R(d),f=63.2818-.00394*c,g=n.d2R(f),h=r.eclipticLongitude(a),i=n.d2R(h),j=r.eclipticLatitude(a),k=n.d2R(j),l=r.radiusVector(a),m=0,o=0,p=0,q=0,s=0,t=!0,u=0,v=0,w=0,x=0,y=0,A=0;t;){var B=a-o;v=K.eclipticLongitude(B),w=n.d2R(v),x=K.eclipticLatitude(B),y=n.d2R(x),A=K.radiusVector(B),p=A*Math.cos(y)*Math.cos(w)-l*Math.cos(i),q=A*Math.cos(y)*Math.sin(w)-l*Math.sin(i),s=A*Math.sin(y)-l*Math.sin(k),u=Math.sqrt(p*p+q*q+s*s),o=z.distanceToLightTime(u),t=Math.abs(o-m)>2e-6,t&&(m=o)}var C=Math.atan2(q,p),D=n.r2D(C),E=Math.atan2(s,Math.sqrt(p*p+q*q)),F=n.r2D(E);b.DE=n.r2D(Math.asin(-Math.sin(g)*Math.sin(E)-Math.cos(g)*Math.cos(E)*Math.cos(e-C)));var H=49.5581+.7721*c,I=n.d2R(H),J=v-.00697/A,L=n.d2R(J),M=x-225e-6*(Math.cos(w-I)/A),N=n.d2R(M);b.DS=n.r2D(Math.asin(-Math.sin(g)*Math.sin(N)-Math.cos(g)*Math.cos(N)*Math.cos(e-L)));var O=n.m360(11.504+350.89200025*(a-o-2433282.5)),Q=V.meanObliquityOfEcliptic(a),R=n.d2R(Q),S=n.ec2Eq(d,f,Q),T=n.h2R(S.x),U=n.d2R(S.y),W=q*Math.cos(R)-s*Math.sin(R),X=q*Math.sin(R)+s*Math.cos(R),Y=Math.atan2(W,p),Z=n.r2H(Y),$=Math.atan2(X,Math.sqrt(p*p+W*W)),ab=n.r2D($),bb=Math.atan2(Math.sin(U)*Math.cos($)*Math.cos(T-Y)-Math.sin($)*Math.cos(U),Math.cos($)*Math.sin(T-Y));b.w=n.m360(O-n.r2D(bb));var cb=V.nutationInLongitude(a),db=V.nutationInObliquity(a);D+=.005693*Math.cos(i-C)/Math.cos(E),F+=.005693*Math.sin(i-C)*Math.sin(E),d+=cb/3600,e=n.d2R(d),D+=cb/3600,C=n.d2R(D),Q+=db/3600,R=n.d2R(R);var eb=n.ec2Eq(d,f,Q),fb=n.h2R(eb.x),gb=n.d2R(eb.y),hb=n.ec2Eq(D,F,Q),ib=n.h2R(hb.x),jb=n.d2R(hb.y);b.p=n.m360(n.r2D(Math.atan2(Math.cos(gb)*Math.sin(fb-ib),Math.sin(gb)*Math.cos(jb)-Math.cos(gb)*Math.sin(jb)*Math.cos(fb-ib))));var kb=ob.geometricEclipticLongitude(a),lb=ob.geometricEclipticLatitude(a),mb=n.ec2Eq(kb,lb,Q);return b.x=P.positionAngle(mb.x,mb.y,Z,ab),b.d=9.36/u,b.k=G.illuminatedFraction2(A,l,u),b.q=(1-b.k)*b.d,b};var gf={},hf={};cb.calculate=function(a){var b=n.m360(360*(a-2398220)/25.38),c=7.25,d=73.6667+1.3958333*(a-2396758)/36525,e=r.eclipticLongitude(a),f=r.radiusVector(a),g=e+180-n.dmS2D(0,0,20.4898/f),h=g+n.dmS2D(0,0,V.nutationInLongitude(a)),i=V.trueObliquityOfEcliptic(a);i=n.d2R(i),g=n.d2R(g),h=n.d2R(h),d=n.d2R(d),c=n.d2R(c),b=n.d2R(b);var j=Math.atan(-Math.cos(g)*Math.tan(i)),k=Math.atan(-Math.cos(g-d)*Math.tan(c)),l=new bb;l.p=n.r2D(j+k),l.b0=n.r2D(Math.asin(Math.sin(g-d)*Math.sin(c)));var m=Math.atan(Math.tan(g-d)*Math.cos(c));return l.l0=n.m360(n.r2D(m-b)),l},cb.timeOfStartOfRotation=function(a){var b=2398140.227+27.2752316*a,c=n.m360(281.96+26.882476*a);return c=n.d2R(c),b+=.1454*Math.sin(c)-.0085*Math.sin(2*c)-.0141*Math.cos(2*c)};var jf={};db.eclipticLongitude=function(a){for(var b=(a-2451545)/36525,c=34.35+3034.9057*b,d=50.08+1222.1138*b,e=238.96+144.96*b,f=0,g=h.g_PlutoArgumentCoefficients.length,i=0;g>i;i++){var j=h.g_PlutoArgumentCoefficients[i].j*c+h.g_PlutoArgumentCoefficients[i].s*d+h.g_PlutoArgumentCoefficients[i].p*e;j=n.d2R(j),f+=h.g_PlutoLongitudeCoefficients[i].a*Math.sin(j)+h.g_PlutoLongitudeCoefficients[i].b*Math.cos(j)}return f/=1e6,f+=238.958116+144.96*b,f=n.m360(f)},db.eclipticLatitude=function(a){for(var b=(a-2451545)/36525,c=34.35+3034.9057*b,d=50.08+1222.1138*b,e=238.96+144.96*b,f=0,g=h.g_PlutoArgumentCoefficients.length,i=0;g>i;i++){var j=h.g_PlutoArgumentCoefficients[i].j*c+h.g_PlutoArgumentCoefficients[i].s*d+h.g_PlutoArgumentCoefficients[i].p*e;j=n.d2R(j),f+=h.g_PlutoLatitudeCoefficients[i].a*Math.sin(j)+h.g_PlutoLatitudeCoefficients[i].b*Math.cos(j)}return f/=1e6,f+=-3.908239},db.radiusVector=function(a){for(var b=(a-2451545)/36525,c=34.35+3034.9057*b,d=50.08+1222.1138*b,e=238.96+144.96*b,f=0,g=h.g_PlutoArgumentCoefficients.length,i=0;g>i;i++){var j=h.g_PlutoArgumentCoefficients[i].j*c+h.g_PlutoArgumentCoefficients[i].s*d+h.g_PlutoArgumentCoefficients[i].p*e;j=n.d2R(j),f+=h.g_PlutoRadiusCoefficients[i].a*Math.sin(j)+h.g_PlutoRadiusCoefficients[i].b*Math.cos(j)}return f/=1e7,f+=40.7241346};var kf={},lf={},mf={};gb.precessEquatorial=function(a,b,c,d){var e=(c-2451545)/36525,f=e*e,g=(d-c)/36525,h=g*g,i=h*g;a=n.h2R(a),b=n.d2R(b);var j=(2306.2181+1.39656*e-139e-6*f)*g+(.30188-344e-7*e)*h+.017988*i;j=n.d2R(n.dmS2D(0,0,j));var k=(2306.2181+1.39656*e-138e-6*f)*g+(1.09468+66e-6*e)*h+.018203*i;k=n.d2R(n.dmS2D(0,0,k));var m=(2004.3109-.8533*e-217e-6*f)*g-(.42665+217e-6*e)*h-.041833*i;m=n.d2R(n.dmS2D(0,0,m));var o=Math.cos(b)*Math.sin(a+j),p=Math.cos(m)*Math.cos(b)*Math.cos(a+j)-Math.sin(m)*Math.sin(b),q=Math.sin(m)*Math.cos(b)*Math.cos(a+j)+Math.cos(m)*Math.sin(b),r=new l;return r.x=n.r2H(Math.atan2(o,p)+k),r.x<0&&(r.x+=24),r.y=n.r2D(Math.asin(q)),r},gb.precessEquatorialFK4=function(a,b,c,d){var e=(c-2415020.3135)/36524.2199,f=(d-c)/36524.2199,g=f*f,h=g*f;a=n.h2R(a),b=n.d2R(b);var i=(2304.25+1.396*e)*f+.302*g+.018*h;i=n.d2R(n.dmS2D(0,0,i));var j=.791*g+.001*h;j=n.d2R(n.dmS2D(0,0,j)),j+=i;var k=(2004.682-.853*e)*f-.426*g-.042*h;k=n.d2R(n.dmS2D(0,0,k));var m=Math.cos(b)*Math.sin(a+i),o=Math.cos(k)*Math.cos(b)*Math.cos(a+i)-Math.sin(k)*Math.sin(b),p=Math.sin(k)*Math.cos(b)*Math.cos(a+i)+Math.cos(k)*Math.sin(b),q=new l;return q.x=n.r2H(Math.atan2(m,o)+j),q.x<0&&(q.x+=24),q.y=n.r2D(Math.asin(p)),q},gb.precessEcliptic=function(a,b,c,d){var e=(c-2451545)/36525,f=e*e,g=(d-c)/36525,h=g*g,i=h*g;a=n.d2R(a),b=n.d2R(b);var j=(47.0029-.06603*e+598e-6*f)*g+(-.03302+598e-6*e)*h+6e-5*i;j=n.d2R(n.dmS2D(0,0,j));var k=629554.9824+3289.4789*e+.60622*f-(869.8089+.50491*e)*g+.03536*h;k=n.d2R(n.dmS2D(0,0,k));var m=(5029.0966+2.22226*e-42e-6*f)*g+(1.11113-42e-6*e)*h-6e-6*i;m=n.d2R(n.dmS2D(0,0,m));var o=Math.cos(j)*Math.cos(b)*Math.sin(k-a)-Math.sin(j)*Math.sin(b),p=Math.cos(b)*Math.cos(k-a),q=Math.cos(j)*Math.sin(b)+Math.sin(j)*Math.cos(b)*Math.sin(k-a),r=new l;return r.x=n.r2D(m+k-Math.atan2(o,p)),r.x<0&&(r.x+=360),r.y=n.r2D(Math.asin(q)),r},gb.equatorialPMToEcliptic=function(a,b,c,d,e,f){f=n.d2R(f),a=n.h2R(a),b=n.d2R(b),c=n.d2R(c);var g=Math.cos(c),h=Math.sin(f),i=new l;return i.x=(e*h*Math.cos(a)+d*Math.cos(b)*(Math.cos(f)*Math.cos(b)+h*Math.sin(b)*Math.sin(a)))/(g*g),i.y=(e*(Math.cos(f)*Math.cos(b)+h*Math.sin(b)*Math.sin(a))-d*h*Math.cos(a)*Math.cos(b))/g,i},gb.adjustPositionUsingUniformProperMotion=function(a,b,c,d,e){var f=new l;return f.x=b+d*a/3600,f.y=c+e*a/3600,f},gb.adjustPositionUsingMotionInSpace=function(a,b,c,d,e,f,g){b/=977792,f/=13751,g/=206265,d=n.h2R(d),e=n.d2R(e);var h=a*Math.cos(e)*Math.cos(d),i=a*Math.cos(e)*Math.sin(d),j=a*Math.sin(e),k=h/a*b-j*g*Math.cos(d)-i*f,m=i/a*b-j*g*Math.sin(d)+h*f,o=j/a*b+a*g*Math.cos(e);h+=c*k,i+=c*m,j+=c*o;var p=new l;return p.x=n.r2H(Math.atan2(i,h)),p.x<0&&(p.x+=24),p.y=n.r2D(Math.atan2(j,Math.sqrt(h*h+i*i))),p};var nf={},of={};ib.rise=function(a,b,c,d,e,f,g,h,i,j){var k=new hb;k.bValid=!1;var l=mb.apparentGreenwichSiderealTime(a);l*=15;var m=q.deltaT(a),o=n.d2R(e),p=n.d2R(i),r=n.d2R(j),s=(Math.sin(r)-Math.sin(p)*Math.sin(o))/(Math.cos(p)*Math.cos(o));if(s>1||-1>s)return k;var t=Math.acos(s);t=n.r2D(t);var u=(15*d+h-l)/360,v=u-t/360,w=u+t/360;u>1?u-=1:0>u&&(u+=1),v>1?v-=1:0>v&&(v+=1),w>1?w-=1:0>w&&(w+=1);for(var x=0;2>x;x++){var y=l+360.985647*v;y=n.m360(y);var z=v+m/86400,A=H.interpolate(z,b,d,f),B=H.interpolate(z,c,e,g),C=y-h-15*A,D=n.eq2H(C/15,B,i),E=(D.y-j)/(360*Math.cos(n.d2R(B))*Math.cos(p)*Math.sin(n.d2R(C)));v+=E,y=l+360.985647*u,y=n.m360(y),z=u+m/86400,A=H.interpolate(z,b,d,f),C=y-h-15*A,-180>C&&(C+=360),E=-C/360,u+=E,y=l+360.985647*w,y=n.m360(y),z=w+m/86400,A=H.interpolate(z,b,d,f),B=H.interpolate(z,c,e,g),C=y-h-15*A,D=n.eq2H(C/15,B,i),E=(D.y-j)/(360*Math.cos(n.d2R(B))*Math.cos(p)*Math.sin(n.d2R(C))),w+=E}return k.bValid=!0,k.rise=24*v,k.set=24*w,k.transit=24*u,k};var pf={};jb.eclipticLongitude=function(a){var b,c=(a-2451545)/365250,d=c*c,e=d*c,f=e*c,g=f*c,i=h.g_L0SaturnCoefficients.length,j=0;for(b=0;i>b;b++)j+=h.g_L0SaturnCoefficients[b].a*Math.cos(h.g_L0SaturnCoefficients[b].b+h.g_L0SaturnCoefficients[b].c*c);var k=h.g_L1SaturnCoefficients.length,l=0;for(b=0;k>b;b++)l+=h.g_L1SaturnCoefficients[b].a*Math.cos(h.g_L1SaturnCoefficients[b].b+h.g_L1SaturnCoefficients[b].c*c);var m=h.g_L2SaturnCoefficients.length,o=0;for(b=0;m>b;b++)o+=h.g_L2SaturnCoefficients[b].a*Math.cos(h.g_L2SaturnCoefficients[b].b+h.g_L2SaturnCoefficients[b].c*c);var p=h.g_L3SaturnCoefficients.length,q=0;for(b=0;p>b;b++)q+=h.g_L3SaturnCoefficients[b].a*Math.cos(h.g_L3SaturnCoefficients[b].b+h.g_L3SaturnCoefficients[b].c*c);var r=h.g_L4SaturnCoefficients.length,s=0;for(b=0;r>b;b++)s+=h.g_L4SaturnCoefficients[b].a*Math.cos(h.g_L4SaturnCoefficients[b].b+h.g_L4SaturnCoefficients[b].c*c);var t=h.g_L5SaturnCoefficients.length,u=0;for(b=0;t>b;b++)u+=h.g_L5SaturnCoefficients[b].a*Math.cos(h.g_L5SaturnCoefficients[b].b+h.g_L5SaturnCoefficients[b].c*c);var v=(j+l*c+o*d+q*e+s*f+u*g)/1e8;return v=n.m360(n.r2D(v))},jb.eclipticLatitude=function(a){var b,c=(a-2451545)/365250,d=c*c,e=d*c,f=e*c,g=f*c,i=h.g_B0SaturnCoefficients.length,j=0;for(b=0;i>b;b++)j+=h.g_B0SaturnCoefficients[b].a*Math.cos(h.g_B0SaturnCoefficients[b].b+h.g_B0SaturnCoefficients[b].c*c);var k=h.g_B1SaturnCoefficients.length,l=0;for(b=0;k>b;b++)l+=h.g_B1SaturnCoefficients[b].a*Math.cos(h.g_B1SaturnCoefficients[b].b+h.g_B1SaturnCoefficients[b].c*c);var m=h.g_B2SaturnCoefficients.length,o=0;for(b=0;m>b;b++)o+=h.g_B2SaturnCoefficients[b].a*Math.cos(h.g_B2SaturnCoefficients[b].b+h.g_B2SaturnCoefficients[b].c*c);var p=h.g_B3SaturnCoefficients.length,q=0;for(b=0;p>b;b++)q+=h.g_B3SaturnCoefficients[b].a*Math.cos(h.g_B3SaturnCoefficients[b].b+h.g_B3SaturnCoefficients[b].c*c);var r=h.g_B4SaturnCoefficients.length,s=0;for(b=0;r>b;b++)s+=h.g_B4SaturnCoefficients[b].a*Math.cos(h.g_B4SaturnCoefficients[b].b+h.g_B4SaturnCoefficients[b].c*c);var t=h.g_B5SaturnCoefficients.length,u=0;for(b=0;t>b;b++)u+=h.g_B5SaturnCoefficients[b].a*Math.cos(h.g_B5SaturnCoefficients[b].b+h.g_B5SaturnCoefficients[b].c*c);var v=(j+l*c+o*d+q*e+s*f+u*g)/1e8;return v=n.r2D(v)},jb.radiusVector=function(a){var b,c=(a-2451545)/365250,d=c*c,e=d*c,f=e*c,g=f*c,i=h.g_R0SaturnCoefficients.length,j=0;for(b=0;i>b;b++)j+=h.g_R0SaturnCoefficients[b].a*Math.cos(h.g_R0SaturnCoefficients[b].b+h.g_R0SaturnCoefficients[b].c*c);var k=h.g_R1SaturnCoefficients.length,l=0;for(b=0;k>b;b++)l+=h.g_R1SaturnCoefficients[b].a*Math.cos(h.g_R1SaturnCoefficients[b].b+h.g_R1SaturnCoefficients[b].c*c);var m=h.g_R2SaturnCoefficients.length,n=0;for(b=0;m>b;b++)n+=h.g_R2SaturnCoefficients[b].a*Math.cos(h.g_R2SaturnCoefficients[b].b+h.g_R2SaturnCoefficients[b].c*c);var o=h.g_R3SaturnCoefficients.length,p=0;for(b=0;o>b;b++)p+=h.g_R3SaturnCoefficients[b].a*Math.cos(h.g_R3SaturnCoefficients[b].b+h.g_R3SaturnCoefficients[b].c*c);var q=h.g_R4SaturnCoefficients.length,r=0;for(b=0;q>b;b++)r+=h.g_R4SaturnCoefficients[b].a*Math.cos(h.g_R4SaturnCoefficients[b].b+h.g_R4SaturnCoefficients[b].c*c);var s=h.g_R5SaturnCoefficients.length,t=0;for(b=0;s>b;b++)t+=h.g_R5SaturnCoefficients[b].a*Math.cos(h.g_R5SaturnCoefficients[b].b+h.g_R5SaturnCoefficients[b].c*c);return(j+l*c+n*d+p*e+r*f+t*g)/1e8};var qf={},rf={};lb.calculate=function(a){var b=new kb,c=(a-2451545)/36525,d=c*c,e=28.075216-.012998*c+4e-6*d,f=n.d2R(e),g=169.50847+1.394681*c+412e-6*d,h=n.d2R(g),i=r.eclipticLongitude(a),j=r.eclipticLatitude(a);i+=B.correctionInLongitude(i,j,a);var k=n.d2R(i);j+=B.correctionInLatitude(i,a);for(var l=n.d2R(j),m=r.radiusVector(a),o=9,p=0,q=z.distanceToLightTime(o),s=a-q,t=!0,u=0,v=0,w=0,x=0,y=0,A=0;t;){x=jb.eclipticLongitude(s),y=jb.eclipticLatitude(s),x+=B.correctionInLongitude(x,y,s),y+=B.correctionInLatitude(x,s);var C=n.d2R(x),D=n.d2R(y);A=jb.radiusVector(s),u=A*Math.cos(D)*Math.cos(C)-m*Math.cos(k),v=A*Math.cos(D)*Math.sin(C)-m*Math.sin(k),w=A*Math.sin(D)-m*Math.sin(l),o=Math.sqrt(u*u+v*v+w*w),q=z.distanceToLightTime(o),t=Math.abs(q-p)>2e-6,t&&(s=a-q,p=q)}var E=Math.atan2(v,u),F=Math.atan2(w,Math.sqrt(u*u+v*v));b.b=Math.asin(Math.sin(f)*Math.cos(F)*Math.sin(E-h)-Math.cos(f)*Math.sin(F)),b.a=375.35/o,b.b=b.a*Math.sin(Math.abs(b.b)),b.b=n.r2D(b.b);var G=113.6655+.8771*c,H=n.d2R(G),I=x-.01759/A,J=n.d2R(I),K=y-764e-6*Math.cos(J-H)/A,L=n.d2R(K);b.bdash=n.r2D(Math.asin(Math.sin(f)*Math.cos(L)*Math.sin(J-h)-Math.cos(f)*Math.sin(L)));var M=Math.atan2(Math.sin(f)*Math.sin(L)+Math.cos(f)*Math.cos(L)*Math.sin(J-h),Math.cos(L)*Math.cos(J-h)),N=Math.atan2(Math.sin(f)*Math.sin(F)+Math.cos(f)*Math.cos(F)*Math.sin(E-h),Math.cos(F)*Math.cos(E-h));b.deltaU=n.r2D(Math.abs(M-N));var O=V.trueObliquityOfEcliptic(a),P=V.nutationInLongitude(a),Q=g-90,R=90-e;E+=n.d2R(.005693*Math.cos(k-E)/Math.cos(F)),F+=n.d2R(.005693*Math.sin(k-E)*Math.sin(F)),E=n.r2D(E),E+=P/3600,E=n.m360(E),Q+=P/3600,Q=n.m360(Q),F=n.r2D(F);var S=n.ec2Eq(E,F,O),T=n.h2R(S.x),U=n.d2R(S.y),W=n.ec2Eq(Q,R,O),X=n.h2R(W.x),Y=n.d2R(W.y);return b.p=n.r2D(Math.atan2(Math.cos(Y)*Math.sin(X-T),Math.sin(Y)*Math.cos(U)-Math.cos(Y)*Math.sin(U)*Math.cos(X-T))),b};var sf={};mb.meanGreenwichSiderealTime=function(a){var b=new p;b.setJD(a,p.afterPapalReformJD(a));var c=b.get(),d=ss.truncate(c[0]),e=ss.truncate(c[1]),f=ss.truncate(c[2]),g=ss.truncate(c[3]),h=ss.truncate(c[4]),i=c[5];b.set(d,e,f,0,0,0,b.inGregorianCalendar());var j=b.julian(),k=(j-2451545)/36525,l=k*k,m=l*k,o=100.46061837+36000.770053608*k+387933e-9*l-m/3871e4;return o+=1.00273790935*(15*g+.25*h+.00416666666666667*i),o=n.d2H(o),n.m24(o)},mb.apparentGreenwichSiderealTime=function(a){var b=V.meanObliquityOfEcliptic(a),c=b+V.nutationInObliquity(a)/3600,d=V.nutationInLongitude(a),e=mb.meanGreenwichSiderealTime(a)+d*Math.cos(n.d2R(c))/54e3;return n.m24(e)};var tf={};nb.combinedMagnitude=function(a,b){var c=.4*(b-a);return b-2.5*wc.log10(Math.pow(10,c)+1)},nb.combinedMagnitude2=function(a,b){for(var c=0,d=0;a>d;d++)c+=Math.pow(10,-.4*b[d]);return-2.5*wc.log10(c)},nb.brightnessRatio=function(a,b){var c=.4*(b-a);return Math.pow(10,c)},nb.magnitudeDifference=function(a){return 2.5*wc.log10(a)};var uf={};ob.geometricEclipticLongitude=function(a){return n.m360(r.eclipticLongitude(a)+180)},ob.geometricEclipticLatitude=function(a){return-r.eclipticLatitude(a)},ob.geometricEclipticLongitudeJ2000=function(a){return n.m360(r.eclipticLongitudeJ2000(a)+180)},ob.geometricEclipticLatitudeJ2000=function(a){return-r.eclipticLatitudeJ2000(a)},ob.geometricFK5EclipticLongitude=function(a){var b=ob.geometricEclipticLongitude(a),c=ob.geometricEclipticLatitude(a);return b+=B.correctionInLongitude(b,c,a)},ob.geometricFK5EclipticLatitude=function(a){var b=ob.geometricEclipticLongitude(a),c=ob.geometricEclipticLatitude(a),d=B.correctionInLatitude(b,a);return c+=d},ob.apparentEclipticLongitude=function(a){var b=ob.geometricFK5EclipticLongitude(a);b+=n.dmS2D(0,0,V.nutationInLongitude(a));var c=r.radiusVector(a);return b-=n.dmS2D(0,0,20.4898/c)},ob.apparentEclipticLatitude=function(a){return ob.geometricFK5EclipticLatitude(a)},ob.eclipticRectangularCoordinatesMeanEquinox=function(a){var b=n.d2R(ob.geometricFK5EclipticLongitude(a)),c=n.d2R(ob.geometricFK5EclipticLatitude(a)),d=r.radiusVector(a),e=n.d2R(V.meanObliquityOfEcliptic(a)),f=new m;return f.x=d*Math.cos(c)*Math.cos(b),f.y=d*(Math.cos(c)*Math.sin(b)*Math.cos(e)-Math.sin(c)*Math.sin(e)),f.z=d*(Math.cos(c)*Math.sin(b)*Math.sin(e)+Math.sin(c)*Math.cos(e)),f},ob.eclipticRectangularCoordinatesJ2000=function(a){var b=ob.geometricEclipticLongitudeJ2000(a);b=n.d2R(b);var c=ob.geometricEclipticLatitudeJ2000(a);c=n.d2R(c);var d=r.radiusVector(a),e=new m,f=Math.cos(c);return e.x=d*f*Math.cos(b),e.y=d*f*Math.sin(b),e.z=d*Math.sin(c),e},ob.equatorialRectangularCoordinatesJ2000=function(a){var b=ob.eclipticRectangularCoordinatesJ2000(a);return b=B.convertVSOPToFK5J2000(b)},ob.equatorialRectangularCoordinatesB1950=function(a){var b=ob.eclipticRectangularCoordinatesJ2000(a);return b=B.convertVSOPToFK5B1950(b)},ob.equatorialRectangularCoordinatesAnyEquinox=function(a,b){var c=ob.equatorialRectangularCoordinatesJ2000(a);return c=B.convertVSOPToFK5AnyEquinox(c,b)};var vf={};pb.eclipticLongitude=function(a){var b,c=(a-2451545)/365250,d=c*c,e=d*c,f=e*c,g=h.g_L0UranusCoefficients.length,i=0;for(b=0;g>b;b++)i+=h.g_L0UranusCoefficients[b].a*Math.cos(h.g_L0UranusCoefficients[b].b+h.g_L0UranusCoefficients[b].c*c);var j=h.g_L1UranusCoefficients.length,k=0;for(b=0;j>b;b++)k+=h.g_L1UranusCoefficients[b].a*Math.cos(h.g_L1UranusCoefficients[b].b+h.g_L1UranusCoefficients[b].c*c);var l=h.g_L2UranusCoefficients.length,m=0;for(b=0;l>b;b++)m+=h.g_L2UranusCoefficients[b].a*Math.cos(h.g_L2UranusCoefficients[b].b+h.g_L2UranusCoefficients[b].c*c);var o=h.g_L3UranusCoefficients.length,p=0;for(b=0;o>b;b++)p+=h.g_L3UranusCoefficients[b].a*Math.cos(h.g_L3UranusCoefficients[b].b+h.g_L3UranusCoefficients[b].c*c);var q=h.g_L4UranusCoefficients.length,r=0;for(b=0;q>b;b++)r+=h.g_L4UranusCoefficients[b].a*Math.cos(h.g_L4UranusCoefficients[b].b+h.g_L4UranusCoefficients[b].c*c);var s=(i+k*c+m*d+p*e+r*f)/1e8;return s=n.m360(n.r2D(s))},pb.eclipticLatitude=function(a){var b,c=(a-2451545)/365250,d=c*c,e=d*c,f=e*c,g=h.g_B0UranusCoefficients.length,i=0;for(b=0;g>b;b++)i+=h.g_B0UranusCoefficients[b].a*Math.cos(h.g_B0UranusCoefficients[b].b+h.g_B0UranusCoefficients[b].c*c);var j=h.g_B1UranusCoefficients.length,k=0;for(b=0;j>b;b++)k+=h.g_B1UranusCoefficients[b].a*Math.cos(h.g_B1UranusCoefficients[b].b+h.g_B1UranusCoefficients[b].c*c);var l=h.g_B2UranusCoefficients.length,m=0;for(b=0;l>b;b++)m+=h.g_B2UranusCoefficients[b].a*Math.cos(h.g_B2UranusCoefficients[b].b+h.g_B2UranusCoefficients[b].c*c);var o=h.g_B3UranusCoefficients.length,p=0;for(b=0;o>b;b++)p+=h.g_B3UranusCoefficients[b].a*Math.cos(h.g_B3UranusCoefficients[b].b+h.g_B3UranusCoefficients[b].c*c);var q=h.g_B4UranusCoefficients.length,r=0;for(b=0;q>b;b++)r+=h.g_B4UranusCoefficients[b].a*Math.cos(h.g_B4UranusCoefficients[b].b+h.g_B4UranusCoefficients[b].c*c);var s=(i+k*c+m*d+p*e+r*f)/1e8;return s=n.r2D(s)},pb.radiusVector=function(a){var b,c=(a-2451545)/365250,d=c*c,e=d*c,f=e*c,g=h.g_R0UranusCoefficients.length,i=0;for(b=0;g>b;b++)i+=h.g_R0UranusCoefficients[b].a*Math.cos(h.g_R0UranusCoefficients[b].b+h.g_R0UranusCoefficients[b].c*c);var j=h.g_R1UranusCoefficients.length,k=0;for(b=0;j>b;b++)k+=h.g_R1UranusCoefficients[b].a*Math.cos(h.g_R1UranusCoefficients[b].b+h.g_R1UranusCoefficients[b].c*c);var l=h.g_R2UranusCoefficients.length,m=0;for(b=0;l>b;b++)m+=h.g_R2UranusCoefficients[b].a*Math.cos(h.g_R2UranusCoefficients[b].b+h.g_R2UranusCoefficients[b].c*c);var n=h.g_R3UranusCoefficients.length,o=0;for(b=0;n>b;b++)o+=h.g_R3UranusCoefficients[b].a*Math.cos(h.g_R3UranusCoefficients[b].b+h.g_R3UranusCoefficients[b].c*c);var p=h.g_R4UranusCoefficients.length,q=0;for(b=0;p>b;b++)q+=h.g_R4UranusCoefficients[b].a*Math.cos(h.g_R4UranusCoefficients[b].b+h.g_R4UranusCoefficients[b].c*c);return(i+k*c+m*d+o*e+q*f)/1e8};var wf={};qb.eclipticLongitude=function(a){var b,c=(a-2451545)/365250,d=c*c,e=d*c,f=e*c,g=f*c,i=h.g_L0VenusCoefficients.length,j=0;for(b=0;i>b;b++)j+=h.g_L0VenusCoefficients[b].a*Math.cos(h.g_L0VenusCoefficients[b].b+h.g_L0VenusCoefficients[b].c*c);var k=h.g_L1VenusCoefficients.length,l=0;for(b=0;k>b;b++)l+=h.g_L1VenusCoefficients[b].a*Math.cos(h.g_L1VenusCoefficients[b].b+h.g_L1VenusCoefficients[b].c*c);var m=h.g_L2VenusCoefficients.length,o=0;for(b=0;m>b;b++)o+=h.g_L2VenusCoefficients[b].a*Math.cos(h.g_L2VenusCoefficients[b].b+h.g_L2VenusCoefficients[b].c*c);var p=h.g_L3VenusCoefficients.length,q=0;for(b=0;p>b;b++)q+=h.g_L3VenusCoefficients[b].a*Math.cos(h.g_L3VenusCoefficients[b].b+h.g_L3VenusCoefficients[b].c*c);var r=h.g_L4VenusCoefficients.length,s=0;for(b=0;r>b;b++)s+=h.g_L4VenusCoefficients[b].a*Math.cos(h.g_L4VenusCoefficients[b].b+h.g_L4VenusCoefficients[b].c*c);var t=h.g_L5VenusCoefficients.length,u=0;for(b=0;t>b;b++)u+=h.g_L5VenusCoefficients[b].a*Math.cos(h.g_L5VenusCoefficients[b].b+h.g_L5VenusCoefficients[b].c*c);var v=(j+l*c+o*d+q*e+s*f+u*g)/1e8;return v=n.m360(n.r2D(v))},qb.eclipticLatitude=function(a){var b,c=(a-2451545)/365250,d=c*c,e=d*c,f=e*c,g=h.g_B0VenusCoefficients.length,i=0;for(b=0;g>b;b++)i+=h.g_B0VenusCoefficients[b].a*Math.cos(h.g_B0VenusCoefficients[b].b+h.g_B0VenusCoefficients[b].c*c);var j=h.g_B1VenusCoefficients.length,k=0;for(b=0;j>b;b++)k+=h.g_B1VenusCoefficients[b].a*Math.cos(h.g_B1VenusCoefficients[b].b+h.g_B1VenusCoefficients[b].c*c);var l=h.g_B2VenusCoefficients.length,m=0;for(b=0;l>b;b++)m+=h.g_B2VenusCoefficients[b].a*Math.cos(h.g_B2VenusCoefficients[b].b+h.g_B2VenusCoefficients[b].c*c);var o=h.g_B3VenusCoefficients.length,p=0;for(b=0;o>b;b++)p+=h.g_B3VenusCoefficients[b].a*Math.cos(h.g_B3VenusCoefficients[b].b+h.g_B3VenusCoefficients[b].c*c);var q=h.g_B4VenusCoefficients.length,r=0;for(b=0;q>b;b++)r+=h.g_B4VenusCoefficients[b].a*Math.cos(h.g_B4VenusCoefficients[b].b+h.g_B4VenusCoefficients[b].c*c);var s=(i+k*c+m*d+p*e+r*f)/1e8;return s=n.r2D(s)},qb.radiusVector=function(a){var b,c=(a-2451545)/365250,d=c*c,e=d*c,f=e*c,g=h.g_R0VenusCoefficients.length,i=0;for(b=0;g>b;b++)i+=h.g_R0VenusCoefficients[b].a*Math.cos(h.g_R0VenusCoefficients[b].b+h.g_R0VenusCoefficients[b].c*c);var j=h.g_R1VenusCoefficients.length,k=0;for(b=0;j>b;b++)k+=h.g_R1VenusCoefficients[b].a*Math.cos(h.g_R1VenusCoefficients[b].b+h.g_R1VenusCoefficients[b].c*c);var l=h.g_R2VenusCoefficients.length,m=0;for(b=0;l>b;b++)m+=h.g_R2VenusCoefficients[b].a*Math.cos(h.g_R2VenusCoefficients[b].b+h.g_R2VenusCoefficients[b].c*c);var n=h.g_R3VenusCoefficients.length,o=0;for(b=0;n>b;b++)o+=h.g_R3VenusCoefficients[b].a*Math.cos(h.g_R3VenusCoefficients[b].b+h.g_R3VenusCoefficients[b].c*c);var p=h.g_R4VenusCoefficients.length,q=0;for(b=0;p>b;b++)q+=h.g_R4VenusCoefficients[b].a*Math.cos(h.g_R4VenusCoefficients[b].b+h.g_R4VenusCoefficients[b].c*c);return(i+k*c+m*d+o*e+q*f)/1e8};var xf={},yf={},zf={};tb.getPlanet=function(a,b,c,d,e){var f=b;if(d=-d,9>f){var g=z.calculate(a,b),h=Y.equatorial2Topocentric(g.apparentGeocentricRA,g.apparentGeocentricDeclination,g.apparentGeocentricDistance,d,c,e,a);return new rb(h.x,h.y,g.apparentGeocentricDistance,!1,!1)}if(9===f){var i=M.eclipticLatitude(a),j=M.eclipticLongitude(a),k=M.radiusVector(a)/149598e3,l=V.trueObliquityOfEcliptic(a),m=n.ec2Eq(j,i,l),h=Y.equatorial2Topocentric(m.x,m.y,k,d,c,e,a);return new rb(h.x,h.y,k,!1,!1)}if(a!==tb._jDateLast){tb._jupDetails=z.calculate(a,4),tb._jupPhisical=$.calculate(a);var h=Y.equatorial2Topocentric(tb._jupDetails.apparentGeocentricRA,tb._jupDetails.apparentGeocentricDeclination,tb._jupDetails.apparentGeocentricDistance,d,c,e,a);tb._jupDetails.apparentGeocentricRA=h.x,tb._jupDetails.apparentGeocentricDeclination=h.y,tb._galDetails=E.calculate(a),tb._jDateLast=a}var o=954501e-9,p=Math.atan(.5*(o/tb._jupDetails.apparentGeocentricDistance))/3.1415927*180,q=p/Math.cos(tb._jupDetails.apparentGeocentricDeclination/180*3.1415927)/15,r=0,s=0,t=0,u=!1,v=!1;switch(f){case 10:r=tb._galDetails.satellite1.apparentRectangularCoordinates.x,s=tb._galDetails.satellite1.apparentRectangularCoordinates.y,t=tb._galDetails.satellite1.apparentRectangularCoordinates.z,v=tb._galDetails.satellite1.bInEclipse,u=tb._galDetails.satellite1.bInShadowTransit;break;case 11:r=tb._galDetails.satellite2.apparentRectangularCoordinates.x,s=tb._galDetails.satellite2.apparentRectangularCoordinates.y,t=tb._galDetails.satellite2.apparentRectangularCoordinates.z,v=tb._galDetails.satellite2.bInEclipse,u=tb._galDetails.satellite2.bInShadowTransit;break;case 12:r=tb._galDetails.satellite3.apparentRectangularCoordinates.x,s=tb._galDetails.satellite3.apparentRectangularCoordinates.y,t=tb._galDetails.satellite3.apparentRectangularCoordinates.z,v=tb._galDetails.satellite3.bInEclipse,u=tb._galDetails.satellite3.bInShadowTransit;break;case 13:r=tb._galDetails.satellite4.apparentRectangularCoordinates.x,s=tb._galDetails.satellite4.apparentRectangularCoordinates.y,t=tb._galDetails.satellite4.apparentRectangularCoordinates.z,v=tb._galDetails.satellite4.bInEclipse,u=tb._galDetails.satellite4.bInShadowTransit;break;case 14:r=tb._galDetails.satellite1.apparentShadowRectangularCoordinates.x,s=tb._galDetails.satellite1.apparentShadowRectangularCoordinates.y,t=.9*tb._galDetails.satellite1.apparentShadowRectangularCoordinates.z,u=tb._galDetails.satellite1.bInShadowTransit;break;case 15:r=tb._galDetails.satellite2.apparentShadowRectangularCoordinates.x,s=tb._galDetails.satellite2.apparentShadowRectangularCoordinates.y,t=.9*tb._galDetails.satellite2.apparentShadowRectangularCoordinates.z,u=tb._galDetails.satellite2.bInShadowTransit;break;case 16:r=tb._galDetails.satellite3.apparentShadowRectangularCoordinates.x,s=tb._galDetails.satellite3.apparentShadowRectangularCoordinates.y,t=.9*tb._galDetails.satellite3.apparentShadowRectangularCoordinates.z,u=tb._galDetails.satellite3.bInShadowTransit;break;case 17:r=tb._galDetails.satellite4.apparentShadowRectangularCoordinates.x,s=tb._galDetails.satellite4.apparentShadowRectangularCoordinates.y,t=.9*tb._galDetails.satellite4.apparentShadowRectangularCoordinates.z,u=tb._galDetails.satellite4.bInShadowTransit}var w,x,y=tb._jupPhisical.p/180*3.1415927;return w=r*Math.cos(y)-s*Math.sin(y),x=r*Math.sin(y)+s*Math.cos(y),r=w,s=x,new rb(tb._jupDetails.apparentGeocentricRA-r*q,tb._jupDetails.apparentGeocentricDeclination+s*p,tb._jupDetails.apparentGeocentricDistance+t*o/2,u,v)},tb.getJulianDay=function(a,b,c){return p.dateToJD(ss.truncate(a),ss.truncate(b),c,!0)},tb.eclipticToJ2000=function(a,b,c){var d=n.ec2Eq(a,b,V.trueObliquityOfEcliptic(c));return new rb(d.x,d.y,0,!1,!1)},tb.galacticToJ2000=function(a,b){var c=n.g2Eq(a,b);return new rb(c.x,c.y,0,!1,!1)},tb.j2000ToGalactic=function(a,b){var c=n.eq2G(a,b);return new rb(c.x,c.y,0,!1,!1)},tb.getRiseTrinsitSet=function(a,b,c,d,e,f,g,h,i,j){var k=-.5667;switch(j){case 0:k=-.5667;break;case 1:k=-.8333;break;case 2:k=.125}var l=ib.rise(a,d,e,f,g,h,i,c,b,k),m=!1;return l.bValid||(m=wc.sign(b)!==wc.sign(g)),new sb(l.bValid,l.rise,l.transit,l.set,m)};var Af={},Bf={lock:function(){return this._verts=new Array(this.count),this._verts},unlock:function(){this.vertexBuffer=ic.prepDevice.createBuffer(),ic.prepDevice.bindBuffer(34962,this.vertexBuffer);for(var a=new Float32Array(3*this.count),b=a,c=0,d=ss.enumerate(this._verts);d.moveNext();){var e=d.current;b[c++]=e.x,b[c++]=e.y,b[c++]=e.z}ic.prepDevice.bufferData(34962,a,35044)}},Cf={lock:function(){return this._verts=new Array(this.count),this._verts},unlock:function(){this.vertexBuffer=ic.prepDevice.createBuffer(),ic.prepDevice.bindBuffer(34962,this.vertexBuffer);for(var a=new Float32Array(5*this.count),b=a,c=0,d=ss.enumerate(this._verts);d.moveNext();){var e=d.current;b[c++]=e.position.x,b[c++]=e.position.y,b[c++]=e.position.z,b[c++]=e.tu,b[c++]=e.tv}ic.prepDevice.bufferData(34962,a,35044)}},Df={lock:function(){return this._verts=new Array(this.count),this._verts},unlock:function(){this.vertexBuffer=ic.prepDevice.createBuffer(),ic.prepDevice.bindBuffer(34962,this.vertexBuffer);for(var a=new Float32Array(9*this.count),b=a,c=0,d=ss.enumerate(this._verts);d.moveNext();){var e=d.current;b[c++]=e.position.x,b[c++]=e.position.y,b[c++]=e.position.z,b[c++]=e.get_color().r/255,b[c++]=e.get_color().g/255,b[c++]=e.get_color().b/255,b[c++]=e.get_color().a/255,b[c++]=e.tu,b[c++]=e.tv}ic.prepDevice.bufferData(34962,a,35044)}},Ef={lock:function(){return this._verts=new Array(this.count),this._verts},unlock:function(){this.vertexBuffer=ic.prepDevice.createBuffer(),ic.prepDevice.bindBuffer(34962,this.vertexBuffer);for(var a=new Float32Array(10*this.count),b=a,c=0,d=ss.enumerate(this._verts);d.moveNext();){var e=d.current; b[c++]=e.position.x,b[c++]=e.position.y,b[c++]=e.position.z,b[c++]=e.get_color().r/255,b[c++]=e.get_color().g/255,b[c++]=e.get_color().b/255,b[c++]=e.get_color().a/255,b[c++]=e.tu,b[c++]=e.tv,b[c++]=e.pointSize}ic.prepDevice.bufferData(34962,a,35044)}},Ff={copy:function(){return new yb(this.startDate,this.endDate)}},Gf={get_depthBuffered:function(){return this._zBuffer},set_depthBuffered:function(a){return this._zBuffer=a,a},addLine:function(a,b){this._linePoints.push(a),this._linePoints.push(b),this._emptyLineBuffer()},clear:function(){this._linePoints.length=0,this._emptyLineBuffer()},drawLines:function(a,b,c){if(!(this._linePoints.length<2)){this._initLineBuffer(a);var d=this._linePoints.length;if(null==a.gl){var e=Sc._transformCoordinate(a.get_viewPoint(),this.viewTransform),f=a.device;f.save(),f.strokeStyle=c.toString(),f.lineWidth=2,f.globalAlpha=.25;for(var g=new Sc,h=new Sc,i=0;d>i;i+=2)g=a.WVP.transform(this._linePoints[i]),h=a.WVP.transform(this._linePoints[i+1]),Sc.dot(this._linePoints[i],e)>.6&&(f.beginPath(),f.moveTo(g.x,g.y),f.lineTo(h.x,h.y),f.stroke());f.restore()}else for(var j=ss.enumerate(this._lineBuffers);j.moveNext();){var k=j.current;Fb.use(a,k.vertexBuffer,c),a.gl.drawArrays(1,0,k.count)}}},_initLineBuffer:function(a){if(null!=a.gl&&!this._lineBuffers.length){var b=this._linePoints.length,c=null,d=null;if(this._localCenter=new Sc,this.get_depthBuffered()){for(var e=ss.enumerate(this._linePoints);e.moveNext();){var f=e.current;this._localCenter.add(f)}this._localCenter.x/=b,this._localCenter.y/=b,this._localCenter.z/=b}for(var g,h=b,i=0,j=0,k=ss.enumerate(this._linePoints);k.moveNext();){var f=k.current;if(j>=1e5||null==d){null!=c&&c.unlock();var l=Math.min(1e5,h);h-=l,c=new ub(l),d=c.lock(),this._lineBuffers.push(c),this._lineBufferCounts.push(l),j=0}this.useLocalCenters?(g=Sc.subtractVectors(f,this._localCenter),d[j]=g):d[j]=f,i++,j++}null!=c&&c.unlock()}},_emptyLineBuffer:function(){}},Hf={get_depthBuffered:function(){return this._zBuffer},set_depthBuffered:function(a){return this._zBuffer=a,a},addLine:function(a,b,c,d){this._linePoints.push(a),this._linePoints.push(b),this._lineColors.push(c),this._lineDates.push(d),this._emptyLineBuffer()},addLineNoDate:function(a,b,c){this._linePoints.push(a),this._linePoints.push(b),this._lineColors.push(c),this._lineDates.push(new yb(0,0)),this._emptyLineBuffer()},clear:function(){this._linePoints.length=0,this._lineColors.length=0,this._lineDates.length=0},drawLines:function(a,b){if(!(this._linePoints.length<2||0>=b))if(null==a.gl);else{this._initLineBuffer();for(var c=ss.enumerate(this._lineBuffers);c.moveNext();){var d=c.current;Gb.use(a,d.vertexBuffer,Jc.fromArgb(255,255,255,255),this._zBuffer,this.jNow,this.decay),a.gl.drawArrays(1,0,d.count)}}},_initLineBuffer:function(){if(!this._lineBuffers.length){for(var a,b=this._linePoints.length,c=null,d=null,e=b,f=0,g=0,h=ss.enumerate(this._linePoints);h.moveNext();){var i=h.current;if(g>=1e5||null==d){null!=c&&c.unlock();var j=Math.min(1e5,e);e-=j,c=new wb(j),d=c.lock(),this._lineBuffers.push(c),this._lineBufferCounts.push(j),g=0}var k=ss.truncate(f/2);a=i,d[g]=new Db,d[g].position=a,d[g].normal=i,d[g].tu=this._lineDates[k].startDate,d[g].tv=this._lineDates[k].endDate,d[g].set_color(this._lineColors[k]),f++,g++}null!=c&&c.unlock()}},_emptyLineBuffer:function(){}},If={addTriangle:function(a,b,c,d,e){this._trianglePoints.push(a),this._trianglePoints.push(b),this._trianglePoints.push(c),this._triangleColors.push(d),this._triangleDates.push(e),this._emptyTriangleBuffer()},addSubdividedTriangles:function(a,b,c,d,e,f){if(f--,0>f)this.addTriangle(a,b,c,d,e);else{var g,h,i;g=Sc.midPointByLength(a,b),h=Sc.midPointByLength(b,c),i=Sc.midPointByLength(c,a),this.addSubdividedTriangles(a,g,i,d,e,f),this.addSubdividedTriangles(g,h,i,d,e,f),this.addSubdividedTriangles(g,b,h,d,e,f),this.addSubdividedTriangles(h,c,i,d,e,f)}},addQuad:function(a,b,c,d,e,f){this._trianglePoints.push(a),this._trianglePoints.push(c),this._trianglePoints.push(b),this._trianglePoints.push(b),this._trianglePoints.push(c),this._trianglePoints.push(d),this._triangleColors.push(e),this._triangleDates.push(f),this._triangleColors.push(e),this._triangleDates.push(f),this._emptyTriangleBuffer()},clear:function(){this._triangleColors.length=0,this._trianglePoints.length=0,this._triangleDates.length=0,this._emptyTriangleBuffer()},_emptyTriangleBuffer:function(){},_initTriangleBuffer:function(){if(!this._triangleBuffers.length){for(var a=this._trianglePoints.length,b=null,c=null,d=a,e=0,f=0,g=ss.enumerate(this._trianglePoints);g.moveNext();){var h=g.current;if(f>=9e4||null==b){null!=b&&b.unlock();var i=Math.min(9e4,d);d-=i,b=new wb(i),this._triangleBuffers.push(b),this._triangleBufferCounts.push(i),c=b.lock(),f=0}c[f]=new Db,c[f].position=h,c[f].normal=h;var j=ss.truncate(e/3);c[f].set_color(this._triangleColors[j]),c[f].tu=this._triangleDates[j].startDate,c[f].tv=this._triangleDates[j].endDate,e++,f++}null!=b&&b.unlock(),this._triangleColors.length=0,this._triangleDates.length=0,this._trianglePoints.length=0,this._dataToDraw=!0}},draw:function(a){if(!(this._trianglePoints.length<1)||this._dataToDraw)if(null==a.gl);else{this._initTriangleBuffer();for(var b=ss.enumerate(this._triangleBuffers);b.moveNext();){var c=b.current;Gb.use(a,c.vertexBuffer,Jc.fromArgb(255,255,255,255),this.depthBuffered,this.jNow,this.decay),a.gl.drawArrays(4,0,c.count)}}}},Jf={addPoint:function(a,b,c,d){this._points.push(a),this._colors.push(b._clone()),this._dates.push(c),this._sizes.push(d),this._emptyPointBuffer()},clear:function(){this._colors.length=0,this._points.length=0,this._dates.length=0,this._emptyPointBuffer()},_emptyPointBuffer:function(){this._init=!1},_initBuffer:function(a){var b=this;if(!this._init){if(null==a.gl){this._starProfile=document.createElement("img"),this._starProfile.addEventListener("load",function(){b._imageReady=!0},!1),this._starProfile.src="/images/starProfile.png",this._worldList=new Array(this._points.length),this._transformedList=new Array(this._points.length);for(var c=0,d=ss.enumerate(this._points);d.moveNext();){var e=d.current,f=new Bc;f.location=e,f.tranformed=new Sc,f.size=this._sizes[c],f.color=this._colors[c],this._worldList[c]=f.location,this._transformedList[c]=f.tranformed,this.items.push(f),c++}}else if(!this._pointBuffers.length){null==this._starTexture&&(this._starTexture=Zb.loadPlanetTexture("/images/starProfile.png"));for(var g=this._points.length,h=null,i=null,j=g,c=0,k=0,l=ss.enumerate(this._points);l.moveNext();){var m=l.current;if(k>=1e5||null==i){null!=h&&h.unlock();var n=Math.min(1e5,j);j-=n,h=new xb(n),i=h.lock(),this._pointBuffers.push(h),this._pointBufferCounts.push(n),k=0}i[k]=new Eb,i[k].position=m,i[k].pointSize=this._sizes[c],i[k].tu=this._dates[c].startDate,i[k].tv=this._dates[c].endDate,i[k].set_color(this._colors[c]),c++,k++}null!=h&&h.unlock()}this._init=!0}},draw:function(a){if(this._initBuffer(a),null==a.gl){if(!this._imageReady)return;a.device.save(),a.WVP.projectArrayToScreen(this._worldList,this._transformedList);var b=a.device;b.globalAlpha=.4;for(var c=a.width,d=a.height,e=(Sc.makeCopy(a.get_viewPoint()),a.get_fovScale()/100),f=ss.enumerate(this.items);f.moveNext();){var g=f.current;if(g.tranformed.z<1){var h=g.tranformed.x,i=g.tranformed.y,j=.1*g.size/e,k=j/2;h>-k&&c+k>h&&i>-k&&d+k>i&&(b.beginPath(),b.fillStyle=g.color.toFormat(),b.arc(h,i,j,0,2*Math.PI,!0),b.fill())}}a.device.restore()}else for(var l=ss.enumerate(this._pointBuffers);l.moveNext();){var m=l.current;Hb.use(a,m.vertexBuffer,this._starTexture.texture2d,Jc.fromArgb(255,255,255,255),this.depthBuffered,this.jNow,this.decay),a.gl.drawArrays(0,0,m.count)}}};Db.create=function(a,b,c,d){var e=new Db;return e.position=a,e.normal=b,e.tu=c,e.tv=0,e.color=d,e};var Kf={get_color:function(){return this.color},set_color:function(a){return this.color=a,a}};Eb.create=function(a,b,c,d){var e=new Eb;return e.position=a,e.pointSize=b,e.tu=c,e.tv=0,e.color=d,e};var Lf={get_color:function(){return this.color},set_color:function(a){return this.color=a,a}};Fb.init=function(a){var b=a.gl,c=" precision highp float; \n uniform vec4 lineColor; \n \n void main(void) { \n gl_FragColor = lineColor; \n } \n",d=" attribute vec3 aVertexPosition; \n \n uniform mat4 uMVMatrix; \n uniform mat4 uPMatrix; \n \n \n \n void main(void) { \n gl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0); \n } \n \n";Fb._frag=b.createShader(35632),b.shaderSource(Fb._frag,c),b.compileShader(Fb._frag);b.getShaderParameter(Fb._frag,35713);Fb._vert=b.createShader(35633),b.shaderSource(Fb._vert,d),b.compileShader(Fb._vert);b.getShaderParameter(Fb._vert,35713);Fb._prog=b.createProgram(),b.attachShader(Fb._prog,Fb._vert),b.attachShader(Fb._prog,Fb._frag),b.linkProgram(Fb._prog);b.getProgramParameter(Fb._prog,35714);b.useProgram(Fb._prog),Fb.vertLoc=b.getAttribLocation(Fb._prog,"aVertexPosition"),Fb.lineColorLoc=b.getUniformLocation(Fb._prog,"lineColor"),Fb.projMatLoc=b.getUniformLocation(Fb._prog,"uPMatrix"),Fb.mvMatLoc=b.getUniformLocation(Fb._prog,"uMVMatrix"),b.enable(3042),b.blendFunc(770,771),Fb.initialized=!0},Fb.use=function(a,b,c){var d=a.gl;if(null!=d){Fb.initialized||Fb.init(a),d.useProgram(Fb._prog);var e=Uc.multiplyMatrix(a.get_world(),a.get_view());d.uniformMatrix4fv(Fb.mvMatLoc,!1,e.floatArray()),d.uniformMatrix4fv(Fb.projMatLoc,!1,a.get_projection().floatArray()),d.uniform4f(Fb.lineColorLoc,c.r/255,c.g/255,c.b/255,1),a.space?d.disable(2929):d.enable(2929),d.disableVertexAttribArray(0),d.disableVertexAttribArray(1),d.disableVertexAttribArray(2),d.disableVertexAttribArray(3),d.enableVertexAttribArray(Fb.vertLoc),d.bindBuffer(34962,b),d.bindBuffer(34963,null),d.vertexAttribPointer(Fb.vertLoc,3,5126,!1,0,0),d.lineWidth(1),d.blendFunc(770,771)}};var Mf={};Gb.init=function(a){var b=a.gl,c=" precision highp float; \n uniform vec4 lineColor; \n varying lowp vec4 vColor; \n void main(void) \n { \n gl_FragColor = lineColor * vColor; \n } \n",d=" attribute vec3 aVertexPosition; \n attribute vec4 aVertexColor; \n attribute vec2 aTime; \n uniform mat4 uMVMatrix; \n uniform mat4 uPMatrix; \n uniform float jNow; \n uniform float decay; \n \n varying lowp vec4 vColor; \n \n void main(void) \n { \n gl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0); \n float dAlpha = 1.0; \n if ( decay > 0.0) \n { \n dAlpha = 1.0 - ((jNow - aTime.y) / decay); \n if (dAlpha > 1.0 ) \n { \n dAlpha = 1.0; \n } \n } \n if (jNow < aTime.x && decay > 0.0) \n { \n vColor = vec4(0.0, 0.0, 0.0, 0.0); \n } \n else \n { \n vColor = vec4(aVertexColor.r, aVertexColor.g, aVertexColor.b, dAlpha); \n } \n } \n \n";Gb._frag=b.createShader(35632),b.shaderSource(Gb._frag,c),b.compileShader(Gb._frag);b.getShaderParameter(Gb._frag,35713);Gb._vert=b.createShader(35633),b.shaderSource(Gb._vert,d),b.compileShader(Gb._vert);b.getShaderParameter(Gb._vert,35713);Gb._prog=b.createProgram(),b.attachShader(Gb._prog,Gb._vert),b.attachShader(Gb._prog,Gb._frag),b.linkProgram(Gb._prog);b.getProgramParameter(Gb._prog,35714);b.useProgram(Gb._prog),Gb.vertLoc=b.getAttribLocation(Gb._prog,"aVertexPosition"),Gb.colorLoc=b.getAttribLocation(Gb._prog,"aVertexColor"),Gb.timeLoc=b.getAttribLocation(Gb._prog,"aVertexColor"),Gb.lineColorLoc=b.getUniformLocation(Gb._prog,"lineColor"),Gb.projMatLoc=b.getUniformLocation(Gb._prog,"uPMatrix"),Gb.mvMatLoc=b.getUniformLocation(Gb._prog,"uMVMatrix"),Gb.jNowLoc=b.getUniformLocation(Gb._prog,"jNow"),Gb.decayLoc=b.getUniformLocation(Gb._prog,"decay"),b.enable(3042),b.blendFunc(770,771),Gb.initialized=!0},Gb.use=function(a,b,c,d,e,f){var g=a.gl;if(null!=g){Gb.initialized||Gb.init(a),g.useProgram(Gb._prog);var h=Uc.multiplyMatrix(a.get_world(),a.get_view());g.uniformMatrix4fv(Gb.mvMatLoc,!1,h.floatArray()),g.uniformMatrix4fv(Gb.projMatLoc,!1,a.get_projection().floatArray()),g.uniform4f(Gb.lineColorLoc,c.r/255,c.g/255,c.b/255,1),g.uniform1f(Gb.jNowLoc,e),g.uniform1f(Gb.decayLoc,f),d?g.enable(2929):g.disable(2929),g.disableVertexAttribArray(0),g.disableVertexAttribArray(1),g.disableVertexAttribArray(2),g.disableVertexAttribArray(3),g.enableVertexAttribArray(Gb.vertLoc),g.enableVertexAttribArray(Gb.colorLoc),g.bindBuffer(34962,b),g.bindBuffer(34963,null),g.vertexAttribPointer(Gb.vertLoc,3,5126,!1,36,0),g.vertexAttribPointer(Gb.colorLoc,4,5126,!1,36,12),g.vertexAttribPointer(Gb.colorLoc,2,5126,!1,36,28),g.lineWidth(1),g.blendFunc(770,771)}};var Nf={};Hb.init=function(a){var b=a.gl,c=" precision mediump float; \n uniform vec4 lineColor; \n varying lowp vec4 vColor; \n uniform sampler2D uSampler; \n void main(void) \n { \n vec4 texColor; \n texColor = texture2D(uSampler, gl_PointCoord); \n \n \n gl_FragColor = lineColor * vColor * texColor; \n } \n",d=" attribute vec3 aVertexPosition; \n attribute vec4 aVertexColor; \n attribute vec2 aTime; \n attribute float aPointSize; \n uniform mat4 uMVMatrix; \n uniform mat4 uPMatrix; \n uniform float jNow; \n uniform float decay; \n \n varying lowp vec4 vColor; \n \n void main(void) \n { \n gl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0); \n float dAlpha = 1.0; \n if ( decay > 0.0) \n { \n dAlpha = 1.0 - ((jNow - aTime.y) / decay); \n if (dAlpha > 1.0 ) \n { \n dAlpha = 1.0; \n } \n } \n if (jNow < aTime.x && decay > 0.0) \n { \n vColor = vec4(0.0, 0.0, 0.0, 0.0); \n } \n else \n { \n vColor = vec4(aVertexColor.r, aVertexColor.g, aVertexColor.b, dAlpha); \n } \n gl_PointSize = aPointSize/0.1; \n } \n \n";Hb._frag=b.createShader(35632),b.shaderSource(Hb._frag,c),b.compileShader(Hb._frag);b.getShaderParameter(Hb._frag,35713);Hb._vert=b.createShader(35633),b.shaderSource(Hb._vert,d),b.compileShader(Hb._vert);b.getShaderParameter(Hb._vert,35713),b.getShaderInfoLog(Hb._vert);Hb._prog=b.createProgram(),b.attachShader(Hb._prog,Hb._vert),b.attachShader(Hb._prog,Hb._frag),b.linkProgram(Hb._prog);b.getProgramParameter(Hb._prog,35714);b.useProgram(Hb._prog),Hb.vertLoc=b.getAttribLocation(Hb._prog,"aVertexPosition"),Hb.colorLoc=b.getAttribLocation(Hb._prog,"aVertexColor"),Hb.pointSizeLoc=b.getAttribLocation(Hb._prog,"aPointSize"),Hb.timeLoc=b.getAttribLocation(Hb._prog,"aTime"),Hb.projMatLoc=b.getUniformLocation(Hb._prog,"uPMatrix"),Hb.mvMatLoc=b.getUniformLocation(Hb._prog,"uMVMatrix"),Hb.sampLoc=b.getUniformLocation(Hb._prog,"uSampler"),Hb.jNowLoc=b.getUniformLocation(Hb._prog,"jNow"),Hb.decayLoc=b.getUniformLocation(Hb._prog,"decay"),Hb.lineColorLoc=b.getUniformLocation(Hb._prog,"lineColor"),b.enable(3042),Hb.initialized=!0},Hb.use=function(a,b,c,d,e,f,g){var h=a.gl;if(null!=h){Hb.initialized||Hb.init(a),h.useProgram(Hb._prog);var i=Uc.multiplyMatrix(a.get_world(),a.get_view());h.uniformMatrix4fv(Hb.mvMatLoc,!1,i.floatArray()),h.uniformMatrix4fv(Hb.projMatLoc,!1,a.get_projection().floatArray()),h.uniform1i(Hb.sampLoc,0),h.uniform1f(Hb.jNowLoc,f),h.uniform1f(Hb.decayLoc,g),h.uniform4f(Hb.lineColorLoc,d.r/255,d.g/255,d.b/255,1),e?h.enable(2929):h.disable(2929),h.disableVertexAttribArray(0),h.disableVertexAttribArray(1),h.disableVertexAttribArray(2),h.disableVertexAttribArray(3),h.enableVertexAttribArray(Hb.vertLoc),h.enableVertexAttribArray(Hb.colorLoc),h.enableVertexAttribArray(Hb.pointSizeLoc),h.enableVertexAttribArray(Hb.timeLoc),h.bindBuffer(34962,b),h.bindBuffer(34963,null),h.vertexAttribPointer(Hb.vertLoc,3,5126,!1,40,0),h.vertexAttribPointer(Hb.colorLoc,4,5126,!1,40,12),h.vertexAttribPointer(Hb.pointSizeLoc,1,5126,!1,40,36),h.vertexAttribPointer(Hb.timeLoc,2,5126,!1,40,28),h.activeTexture(33984),h.bindTexture(3553,c),h.lineWidth(1),h.blendFunc(770,1)}};var Of={};Ib.init=function(a){var b=a.gl,c=" precision mediump float; \n \n varying vec2 vTextureCoord; \n \n uniform sampler2D uSampler; \n \n void main(void) { \n gl_FragColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t)); \n } \n",d=" attribute vec3 aVertexPosition; \n attribute vec2 aTextureCoord; \n \n uniform mat4 uMVMatrix; \n uniform mat4 uPMatrix; \n \n varying vec2 vTextureCoord; \n \n \n void main(void) { \n gl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0); \n vTextureCoord = aTextureCoord; \n } \n \n";Ib._frag=b.createShader(35632),b.shaderSource(Ib._frag,c),b.compileShader(Ib._frag);b.getShaderParameter(Ib._frag,35713);Ib._vert=b.createShader(35633),b.shaderSource(Ib._vert,d),b.compileShader(Ib._vert);b.getShaderParameter(Ib._vert,35713);Ib._prog=b.createProgram(),b.attachShader(Ib._prog,Ib._vert),b.attachShader(Ib._prog,Ib._frag),b.linkProgram(Ib._prog);b.getProgramParameter(Ib._prog,35714);b.useProgram(Ib._prog),Ib.vertLoc=b.getAttribLocation(Ib._prog,"aVertexPosition"),Ib.textureLoc=b.getAttribLocation(Ib._prog,"aTextureCoord"),Ib.projMatLoc=b.getUniformLocation(Ib._prog,"uPMatrix"),Ib.mvMatLoc=b.getUniformLocation(Ib._prog,"uMVMatrix"),Ib.sampLoc=b.getUniformLocation(Ib._prog,"uSampler"),ic.uvMultiple=1,ic.demEnabled=!0,b.enable(3042),b.blendFunc(770,771),Ib.initialized=!0},Ib.use=function(a,b,c,d){var e=a.gl;if(null!=e){Ib.initialized||Ib.init(a),e.useProgram(Ib._prog);var f=Uc.multiplyMatrix(a.get_world(),a.get_view());e.uniformMatrix4fv(Ib.mvMatLoc,!1,f.floatArray()),e.uniformMatrix4fv(Ib.projMatLoc,!1,a.get_projection().floatArray()),e.uniform1i(Ib.sampLoc,0),a.space?e.disable(2929):e.enable(2929),e.enableVertexAttribArray(Ib.vertLoc),e.enableVertexAttribArray(Ib.textureLoc),e.bindBuffer(34962,b),e.vertexAttribPointer(Ib.vertLoc,3,5126,!1,20,0),e.vertexAttribPointer(Ib.textureLoc,2,5126,!1,20,12),e.activeTexture(33984),e.bindTexture(3553,d),e.bindBuffer(34963,c),e.blendFunc(770,771)}};var Pf={};Jb.init=function(a){var b=a.gl,c=" precision mediump float; \n \n varying vec2 vTextureCoord; \n \n uniform sampler2D uSampler; \n \n void main(void) { \n gl_FragColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t)); \n } \n",d=" attribute vec3 aVertexPosition; \n attribute vec2 aTextureCoord; \n \n uniform mat4 uMVMatrix; \n uniform mat4 uPMatrix; \n \n varying vec2 vTextureCoord; \n \n \n void main(void) { \n gl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0); \n vTextureCoord = aTextureCoord; \n } \n \n";Jb._frag=b.createShader(35632),b.shaderSource(Jb._frag,c),b.compileShader(Jb._frag);b.getShaderParameter(Jb._frag,35713);Jb._vert=b.createShader(35633),b.shaderSource(Jb._vert,d),b.compileShader(Jb._vert);b.getShaderParameter(Jb._vert,35713);Jb._prog=b.createProgram(),b.attachShader(Jb._prog,Jb._vert),b.attachShader(Jb._prog,Jb._frag),b.linkProgram(Jb._prog);b.getProgramParameter(Jb._prog,35714);b.useProgram(Jb._prog),Jb.vertLoc=b.getAttribLocation(Jb._prog,"aVertexPosition"),Jb.textureLoc=b.getAttribLocation(Jb._prog,"aTextureCoord"),Jb.projMatLoc=b.getUniformLocation(Jb._prog,"uPMatrix"),Jb.mvMatLoc=b.getUniformLocation(Jb._prog,"uMVMatrix"),Jb.sampLoc=b.getUniformLocation(Jb._prog,"uSampler"),ic.uvMultiple=1,ic.demEnabled=!0,b.enable(3042),b.blendFunc(770,771),Jb.initialized=!0},Jb.use=function(a,b,c){var d=a.gl;if(null!=d){Jb.initialized||Jb.init(a),d.useProgram(Jb._prog);var e=Uc.multiplyMatrix(a.get_world(),a.get_view());d.uniformMatrix4fv(Jb.mvMatLoc,!1,e.floatArray()),d.uniformMatrix4fv(Jb.projMatLoc,!1,a.get_projection().floatArray()),d.uniform1i(Jb.sampLoc,0),a.space?d.disable(2929):d.enable(2929),d.enableVertexAttribArray(Jb.vertLoc),d.enableVertexAttribArray(Jb.textureLoc),d.bindBuffer(34962,b),d.vertexAttribPointer(Jb.vertLoc,3,5126,!1,20,0),d.vertexAttribPointer(Jb.textureLoc,2,5126,!1,20,12),d.activeTexture(33984),d.bindTexture(3553,c),d.blendFunc(770,771)}};var Qf={};Kb.tesselateSimplePoly=function(a){var b=[],c=new Kb;return c.process(a,b),b};var Rf={_isLeftOfHalfSpace:function(a,b,c){a.normalize(),b.normalize();var d=Sc.cross(a,b),e=Sc.dot(d,c);return e>0},_insideTriangle:function(a,b,c,d){return this._isLeftOfHalfSpace(a,b,d)&&this._isLeftOfHalfSpace(b,c,d)&&this._isLeftOfHalfSpace(c,a,d)?!0:!1},_canClipEar:function(a,b,c,d,e,f){var g,h,i=a[f[b]].copy(),j=a[f[c]].copy(),k=a[f[d]].copy(),l=Sc.subtractVectors(j,i);l.normalize();var m=Sc.subtractVectors(j,k);m.normalize();var n=Sc.cross(l,m),o=j.copy();if(o.normalize(),Sc.dot(n,o)>0)return!1;for(g=0;e>g;g++)if(g!==b&&g!==c&&g!==d&&(h=a[f[g]].copy(),this._insideTriangle(i,j,k,h)))return!1;return!0},process:function(a,b){var c=a.length;if(a.length<3)return!1;for(var d=new Array(a.length),e=0;c>e;e++)d[e]=e;for(var f=c,g=2*f,h=0,i=f-1;f>2;){if(0>=g--)return!1;var j=i;j>=f&&(j=0),i=j+1,i>=f&&(i=0);var k=i+1;if(k>=f&&(k=0),this._canClipEar(a,j,i,k,f,d)){var l,m;for(b.push(d[j]),b.push(d[i]),b.push(d[k]),h++,l=i,m=i+1;f>m;l++,m++)d[l]=d[m];f--,g=2*f}}return!0}},Sf={load:function(a){var b=this;if(this.URL=a,!this._downloading){this._downloading=!0,this.imageElement=document.createElement("img");var c=this.imageElement;this.imageElement.addEventListener("load",function(){b._ready=!0,b._downloading=!1,b._errored=!1,b.makeTexture()},!1),this.imageElement.addEventListener("error",function(){b.imageElement.hasAttribute("proxyattempt")?(b._downloading=!1,b._ready=!1,b._errored=!0):(b.imageElement.src=wc.getProxiedUrl(b.URL),b.imageElement.setAttribute("proxyattempt",!0))},!1),c.crossOrigin="anonymous",this.imageElement.src=this.URL}},makeTexture:function(){if(null!=ic.prepDevice)try{this.texture2d=ic.prepDevice.createTexture(),ic.prepDevice.bindTexture(3553,this.texture2d);var a=this.imageElement;if(1===(!this._isPowerOfTwo(this.imageElement.height)|!this._isPowerOfTwo(this.imageElement.width))){var b=document.createElement("canvas");b.height=this._fitPowerOfTwo(a.height),b.width=this._fitPowerOfTwo(a.width);var c=b.getContext("2d");c.drawImage(a,0,0,a.width,a.height),a=b}ic.prepDevice.texParameteri(3553,10242,33071),ic.prepDevice.texParameteri(3553,10243,33071),ic.prepDevice.texImage2D(3553,0,6408,6408,5121,a),ic.prepDevice.texParameteri(3553,10241,9985),ic.prepDevice.generateMipmap(3553),ic.prepDevice.bindTexture(3553,null)}catch(d){this._errored=!0}},_isPowerOfTwo:function(a){return!(a&a-1)},_fitPowerOfTwo:function(a){a--;for(var b=1;32>b;b<<=1)a|=a>>b;return a+1}};Mb.drawEquitorialGrid=function(a,b,c){if(null==Mb._equLineList){Mb._equLineList=new zb,Mb._equLineList.set_depthBuffered(!1);for(var d=0;24>d;d++)for(var e=-80;80>e;e+=2)Mb._equLineList.addLine(Pc.raDecTo3dAu(d,e,1),Pc.raDecTo3dAu(d,e+2,1)); for(var e=-80;80>=e;e+=10)for(var d=0;23.8>d;d+=.2)Mb._equLineList.addLine(Pc.raDecTo3dAu(d,e,1),Pc.raDecTo3dAu(d+.2,e,1));for(var f=0,g=0;24>g;g+=.25){var e=.5;switch(f%4){case 0:f++;continue;case 3:case 1:e=.25}f++,Mb._equLineList.addLine(Pc.raDecTo3dAu(g,e,1),Pc.raDecTo3dAu(g,-e,1))}f=0;for(var g=0;24>g;g+=3){f=0;for(var e=-80;80>=e;e+=1){var h=.5/30;switch(f%10){case 0:f++;continue;case 5:h=.5/15}f++,Mb._equLineList.addLine(Pc.raDecTo3dAu(g+h,e,1),Pc.raDecTo3dAu(g-h,e,1))}}}return Mb._equLineList.drawLines(a,b,c),!0},Mb.drawEquitorialGridText=function(a,b,c){return Mb._makeEquitorialGridText(),Mb._equTextBatch.draw(a,b,c),!0},Mb._makeEquitorialGridText=function(){if(null==Mb._equTextBatch){Mb._equTextBatch=new cc(30);for(var a=0,b=0;24>b;b++){var c=b.toString()+" hr";10>b&&(c=" "+b.toString()+" hr"),Mb._equTextBatch.add(new fc(Pc.raDecTo3dAu(b+.005,.4,1),Pc.raDecTo3dAu(b+.005,.5,1),c,30,6e-5))}a=0;for(var b=0;24>b;b+=3)for(var d=-80;80>=d;d+=10)if(d){var c=d.toString();d>0?(c=" +"+d.toString(),Mb._equTextBatch.add(new fc(Pc.raDecTo3dAu(b,d-.4,1),Pc.raDecTo3dAu(b,d-.3,1),c,30,6e-5))):(c=" - "+c.substr(1),Mb._equTextBatch.add(new fc(Pc.raDecTo3dAu(b,d+.4,1),Pc.raDecTo3dAu(b,d+.5,1),c,30,6e-5))),a++}}},Mb.drawEcliptic=function(a,b,c){var d=gc.get_now().getUTCFullYear();if(null==Mb._eclipticOverviewLineList||d!==Mb._eclipticYear){null!=Mb._eclipticOverviewLineList&&(Mb._eclipticOverviewLineList.clear(),Mb._eclipticOverviewLineList=null),Mb._eclipticYear=d;var e=Pc.meanObliquityOfEcliptic(gc.get_jNow()),f=Uc._rotationX(-e/360*2*Math.PI),g=365.25;p.isLeap(d,!0)?(Mb._monthDays[1]=29,g=366):(Mb._monthDays[1]=28,g=365);{2*ss.truncate(g)}Mb._eclipticCount=ss.truncate(g);var h=gc.utcToJulian(new Date(d,0,1,12,0,0)),i=0,j=0;Mb._eclipticOverviewLineList=new zb,Mb._eclipticOverviewLineList.set_depthBuffered(!1);for(var k=0;12>k;k++){for(var l=ss.truncate(Mb._monthDays[k]),m=0;l>m;m++){var o=Zb.getPlanetLocationJD("Sun",h),q=n.eq2Ec(o.RA,o.dec,e);j=q.x;var r=.005;m||(r=.01);var s=j;Mb._eclipticOverviewLineList.addLine(Sc._transformCoordinate(Sc.create(Math.cos(s*Math.PI*2/360),r,Math.sin(s*Math.PI*2/360)),f),Sc._transformCoordinate(Sc.create(Math.cos(s*Math.PI*2/360),-r,Math.sin(s*Math.PI*2/360)),f)),i++,h+=1}j+=Mb._monthDays[k]}}return Mb._eclipticOverviewLineList.drawLines(a,b,c),!0},Mb.drawEclipticText=function(a,b,c){return Mb._makeEclipticText(),Mb._eclipOvTextBatch.draw(a,b,c),!0},Mb._makeEclipticText=function(){var a=gc.get_now().getUTCFullYear();if(null==Mb._eclipOvTextBatch){Mb._eclipOvTextBatch=new cc(80),Mb._eclipticTextYear=a;var b=Pc.meanObliquityOfEcliptic(gc.get_jNow()),c=Uc._rotationX(-b/360*2*Math.PI),d=365.25;p.isLeap(a,!0)?(Mb._monthDays[1]=29,d=366):(Mb._monthDays[1]=28,d=365);{2*ss.truncate(d)}Mb._eclipticCount=ss.truncate(d);for(var e=gc.utcToJulian(new Date(a,0,1,12,0,0)),f=0,g=0,h=0;12>h;h++){for(var i=ss.truncate(Mb._monthDays[h]),j=0;i>j;j++){var k=Zb.getPlanetLocationJD("Sun",e),l=n.eq2Ec(k.RA,k.dec,b);g=l.x;var m=g;if(j===Math.floor(i/2)){var o=Sc._transformCoordinate(Sc.create(Math.cos(m*Math.PI*2/360),.025,Math.sin(m*Math.PI*2/360)),c),q=Sc._transformCoordinate(Sc.create(Math.cos(m*Math.PI*2/360),.045,Math.sin(m*Math.PI*2/360)),c);q.subtract(o),q.normalize(),Mb._eclipOvTextBatch.add(new fc(o,q,Mb._monthNames[h],80,159375e-9))}f++,f++,e+=1}g+=Mb._monthDays[h]}}},Mb.drawPrecessionChart=function(a,b,c){return Mb._makePrecessionChart(),Mb._precTextBatch.draw(a,b,c),Mb._precLineList.drawLines(a,b,c),!0},Mb._makePrecessionChart=function(){{var a=Pc.meanObliquityOfEcliptic(gc.get_jNow()),b=Uc._rotationX(a/360*2*Math.PI);Kc.get_white()}if(null==Mb._precLineList){Mb._precLineList=new zb,Mb._precLineList.set_depthBuffered(!1);for(var c=0;360>c;c++){var d=90-a;Mb._precLineList.addLine(Sc._transformCoordinate(Pc.raDecTo3dAu(c/15,d,1),b),Sc._transformCoordinate(Pc.raDecTo3dAu((c+1)/15,d,1),b))}for(var c=-12e3;13e3>c;c+=2e3){var d=90-a,e=-((c-2e3)/25772*24)-6;Mb._precLineList.addLine(Sc._transformCoordinate(Pc.raDecTo3dAu(e,d-.5,1),b),Sc._transformCoordinate(Pc.raDecTo3dAu(e,d+.5,1),b))}}if(null==Mb._precTextBatch){Mb._precTextBatch=new cc(50);for(var c=-12e3;13e3>c;c+=2e3){var d=90-a+3,e=-((c-2e3)/25772*24)-6,f=c.toString();c?f=0>c?" "+Math.abs(c).toString()+" BCE":Math.abs(c).toString()+" CE":(d=90-a+2,f="1 CE"),9===f.length&&(f=" "+f),Mb._precTextBatch.add(new fc(Sc._transformCoordinate(Pc.raDecTo3dAu(e,d,1),b),Sc._transformCoordinate(Pc.raDecTo3dAu(e+.01,d,1),b),f,80,9e-5))}}},Mb.drawAltAzGrid=function(a,b,c){var d=new Pc(0,0),e=Pc.horizonToEquitorial(d,gc.get_location(),gc.get_now()),f=-((e.get_RA()+6)/24*2*Math.PI),g=-(e.get_dec()/360*2*Math.PI),h=(Pc.formatDMS(e.get_RA()),Uc._rotationY(-f));if(h._multiply(Uc._rotationX(g)),h.invert(),null==Mb._altAzLineList){Mb._altAzLineList=new zb,Mb._altAzLineList.set_depthBuffered(!1);for(var i=0;360>i;i+=10)for(var j=-80;80>j;j+=2)Mb._altAzLineList.addLine(Pc.raDecTo3dAu(i/15,j,1),Pc.raDecTo3dAu(i/15,j+2,1));for(var j=-80;80>=j;j+=10)for(var i=0;360>i;i+=5)Mb._altAzLineList.addLine(Pc.raDecTo3dAu(i/15,j,1),Pc.raDecTo3dAu((i+5)/15,j,1));for(var k=0,i=0;360>i;i+=1){var j=.25;switch(k%10){case 0:k++;continue;case 5:j=.5}k++,Mb._altAzLineList.addLine(Pc.raDecTo3dAu(i/15,j,1),Pc.raDecTo3dAu(i/15,-j,1))}k=0;for(var i=0;360>i;i+=90){k=0;for(var j=-80;80>=j;j+=1){var l=.25;switch(k%10){case 0:k++;continue;case 5:l=.5}k++,Mb._altAzLineList.addLine(Pc.raDecTo3dAu((i+l)/15,j,1),Pc.raDecTo3dAu((i-l)/15,j,1))}}}var m=a.get_world().clone(),n=a.get_worldBase().clone();return a.set_worldBase(Uc.multiplyMatrix(h,a.get_world())),a.set_world(a.get_worldBase().clone()),a.makeFrustum(),Mb._altAzLineList.viewTransform=Uc.invertMatrix(h),Mb._altAzLineList.drawLines(a,b,c),a.set_worldBase(n),a.set_world(m),a.makeFrustum(),!0},Mb.drawAltAzGridText=function(a,b,c){var d=new Pc(0,0),e=Pc.horizonToEquitorial(d,gc.get_location(),gc.get_now()),f=-((e.get_RA()-6)/24*2*Math.PI),g=-(e.get_dec()/360*2*Math.PI),h=(Pc.formatDMS(e.get_RA()),Uc._rotationY(-f-Math.PI));h._multiply(Uc._rotationX(g)),h.invert(),Mb._makeAltAzGridText();var i=a.get_world().clone(),j=a.get_worldBase().clone();return a.set_worldBase(Uc.multiplyMatrix(h,a.get_world())),a.set_world(a.get_worldBase().clone()),a.makeFrustum(),Mb._altAzTextBatch.viewTransform=Uc.invertMatrix(h),Mb._altAzTextBatch.draw(a,b,c),a.set_worldBase(j),a.set_world(i),a.makeFrustum(),!0},Mb._makeAltAzGridText=function(){var a=(Kc.get_white(),0);if(null==Mb._altAzTextBatch){Mb._altAzTextBatch=new cc(30);for(var b=0;360>b;b+=10){var c=" "+b.toString();10>b?c=" "+b.toString():100>b&&(c=" "+b.toString());var d=360-b;Mb._altAzTextBatch.add(new fc(Pc.raDecTo3dAu(d/15-6,.4,1),Pc.raDecTo3dAu(d/15-6,.5,1),c,80,6e-5))}a=0;for(var b=0;360>b;b+=90)for(var e=-80;80>=e;e+=10)if(e){var c=e.toString();e>0?(c=" +"+e.toString(),Mb._altAzTextBatch.add(new fc(Pc.raDecTo3dAu(b/15,e-.4,1),Pc.raDecTo3dAu(b/15,e-.3,1),c,80,6e-5))):(c=" - "+c.substr(1),Mb._altAzTextBatch.add(new fc(Pc.raDecTo3dAu(b/15,e+.4,1),Pc.raDecTo3dAu(b/15,e+.5,1),c,80,6e-5))),a++}}},Mb.drawEclipticGrid=function(a,b,c){if(null==Mb._eclipticLineList){Mb._eclipticLineList=new zb,Mb._eclipticLineList.set_depthBuffered(!1);for(var d=Pc.meanObliquityOfEcliptic(2451545),e=Uc._rotationX(-d/360*2*Math.PI),f=0;360>f;f+=10)for(var g=-80;80>g;g+=2)Mb._eclipticLineList.addLine(Sc._transformCoordinate(Pc.raDecTo3dAu(f/15,g,1),e),Sc._transformCoordinate(Pc.raDecTo3dAu(f/15,g+2,1),e));for(var g=-80;80>=g;g+=10)for(var f=0;360>f;f+=5)Mb._eclipticLineList.addLine(Sc._transformCoordinate(Pc.raDecTo3dAu(f/15,g,1),e),Sc._transformCoordinate(Pc.raDecTo3dAu((f+5)/15,g,1),e));for(var h=0,f=0;360>f;f+=1){var g=.25;switch(h%10){case 0:h++;continue;case 5:g=.5}h++,Mb._eclipticLineList.addLine(Sc._transformCoordinate(Pc.raDecTo3dAu(f/15,g,1),e),Sc._transformCoordinate(Pc.raDecTo3dAu(f/15,-g,1),e))}h=0;for(var f=0;360>f;f+=90){h=0;for(var g=-80;80>=g;g+=1){var i=.25;switch(h%10){case 0:h++;continue;case 5:i=.5}h++,Mb._eclipticLineList.addLine(Sc._transformCoordinate(Pc.raDecTo3dAu((f+i)/15,g,1),e),Sc._transformCoordinate(Pc.raDecTo3dAu((f-i)/15,g,1),e))}}}return Mb._eclipticLineList.drawLines(a,b,c),!0},Mb.drawEclipticGridText=function(a,b,c){return Mb._makeEclipticGridText(),Mb._eclipticTextBatch.draw(a,b,c),!0},Mb._makeEclipticGridText=function(){var a=(Kc.get_white(),Pc.meanObliquityOfEcliptic(gc.get_jNow())),b=Uc._rotationX(-a/360*2*Math.PI);if(null==Mb._eclipticTextBatch){Mb._eclipticTextBatch=new cc(30);for(var c=0;360>c;c+=10){var d=" "+c.toString();10>c?d=" "+c.toString():100>c&&(d=" "+c.toString()),Mb._eclipticTextBatch.add(new fc(Sc._transformCoordinate(Pc.raDecTo3dAu(c/15,.4,1),b),Sc._transformCoordinate(Pc.raDecTo3dAu(c/15,.5,1),b),d,80,6e-5))}for(var c=0;360>c;c+=90)for(var e=-80;80>=e;e+=10)if(e){var d=e.toString();e>0?(d=" +"+e.toString(),Mb._eclipticTextBatch.add(new fc(Sc._transformCoordinate(Pc.raDecTo3dAu(c/15,e-.4,1),b),Sc._transformCoordinate(Pc.raDecTo3dAu(c/15,e-.3,1),b),d,80,6e-5))):(d=" - "+d.substr(1),Mb._eclipticTextBatch.add(new fc(Sc._transformCoordinate(Pc.raDecTo3dAu(c/15,e+.4,1),b),Sc._transformCoordinate(Pc.raDecTo3dAu(c/15,e+.5,1),b),d,80,6e-5)))}}},Mb.drawGalacticGrid=function(a,b,c){if(null==Mb._galLineList){Mb._galLineList=new zb,Mb._galLineList.set_depthBuffered(!1);for(var d=0;360>d;d+=10)for(var e=-80;80>e;e+=2)Mb._galLineList.addLine(Pc.galacticTo3dDouble(d,e),Pc.galacticTo3dDouble(d,e+2));for(var e=-80;80>=e;e+=10)for(var d=0;360>d;d+=5)Mb._galLineList.addLine(Pc.galacticTo3dDouble(d,e),Pc.galacticTo3dDouble(d+5,e));for(var f=0,d=0;360>d;d+=1){var e=.25;switch(f%10){case 0:f++;continue;case 5:e=.5}f++,Mb._galLineList.addLine(Pc.galacticTo3dDouble(d,e),Pc.galacticTo3dDouble(d,-e))}f=0;for(var d=0;360>d;d+=90){f=0;for(var e=-80;80>=e;e+=1){var g=.25;switch(f%10){case 0:f++;continue;case 5:g=.5}f++,Mb._galLineList.addLine(Pc.galacticTo3dDouble(d+g,e),Pc.galacticTo3dDouble(d-g,e))}}}return Mb._galLineList.drawLines(a,b,c),!0},Mb.drawGalacticGridText=function(a,b,c){return Mb._makeGalacticGridText(),Mb._galTextBatch.draw(a,b,c),!0},Mb._makeGalacticGridText=function(){if(null==Mb._galTextBatch){Mb._galTextBatch=new cc(30);for(var a=0;360>a;a+=10){var b=" "+a.toString();10>a?b=" "+a.toString():100>a&&(b=" "+a.toString()),Mb._galTextBatch.add(new fc(Pc.galacticTo3dDouble(a,.4),Pc.galacticTo3dDouble(a,.5),b,80,6e-5))}for(var a=0;360>a;a+=90)for(var c=-80;80>=c;c+=10)if(c){var b=c.toString();c>0?(b=" +"+c.toString(),Mb._galTextBatch.add(new fc(Pc.galacticTo3dDouble(a,c-.4),Pc.galacticTo3dDouble(a,c-.3),b,80,6e-5))):(b=" - "+b.substr(1),Mb._galTextBatch.add(new fc(Pc.galacticTo3dDouble(a,c+.4),Pc.galacticTo3dDouble(a,c+.5),b,80,6e-5)))}}};var Tf={},Uf={getPrimaryUI:function(){return null},getFileStreamUrl:function(a){return null!=this.tourDocument?this.tourDocument.getFileStream(a):null},get_opacity:function(){return this.opacity},set_opacity:function(a){return this.opacity!==a&&(this.version++,this.opacity=a),a},get_opened:function(){return this.opened},set_opened:function(a){return this.opened!==a&&(this.version++,this.opened=a),a},get_startTime:function(){return this._startTime},set_startTime:function(a){return ss.compareDates(this._startTime,a)||(this.version++,this._startTime=a),a},get_endTime:function(){return this._endTime},set_endTime:function(a){return ss.compareDates(this._endTime,a)||(this.version++,this._endTime=a),a},get_fadeSpan:function(){return this._fadeSpan},set_fadeSpan:function(a){return this.version++,this._fadeSpan=a,a},get_fadeType:function(){return this._fadeType},set_fadeType:function(a){return this._fadeType!==a&&(this.set_version(this.get_version()+1)-1,this._fadeType=a),a},get_version:function(){return this.version},set_version:function(a){return this.version=a,a},findClosest:function(a,b,c){return c},hoverCheckScreenSpace:function(){return!1},clickCheckScreenSpace:function(){return!1},draw:function(){return!0},preDraw:function(){return!0},upadteData:function(){return!0},canCopyToClipboard:function(){return!1},copyToClipboard:function(){},getParams:function(){return new Array(0)},setParams:function(){},getParamNames:function(){return new Array(0)},cleanUp:function(){},get_name:function(){return this._name},set_name:function(a){return this._name!==a&&(this.version++,this._name=a),a},toString:function(){return this._name},get_referenceFrame:function(){return this.referenceFrame},set_referenceFrame:function(a){return this.referenceFrame=a,a},getProps:function(){return""},get_color:function(){return this.color},set_color:function(a){return this.color!==a&&(this.color=a,this.version++,this.cleanUp()),a},get_colorValue:function(){return this.get_color().toString()},set_colorValue:function(a){return this.set_color(Jc.fromName(a)),a},get_enabled:function(){return this._enabled},set_enabled:function(a){return this._enabled!==a&&(this.version++,this._enabled=a),a},get_astronomical:function(){return this.astronomical},set_astronomical:function(a){return this.astronomical!==a&&(this.version++,this.astronomical=a),a},saveToXml:function(){},initializeFromXml:function(){},fromXml:function(a){var b=a.attributes.getNamedItem("Type").nodeValue,c=ss.replaceString(b,"TerraViewer.","");if(null==c)return null;var d=null;switch(c){case"SpreadSheetLayer":d=new Bd;break;case"GreatCirlceRouteLayer":d=new jd;break;default:return null}for(var e in this)d[e]=this[e];return d.initFromXml(a),d},initFromXml:function(a){if(this.id=yc.fromString(a.attributes.getNamedItem("Id").nodeValue),this.set_name(a.attributes.getNamedItem("Name").nodeValue),this.referenceFrame=a.attributes.getNamedItem("ReferenceFrame").nodeValue,this.color=Jc.load(a.attributes.getNamedItem("Color").nodeValue),this.opacity=parseFloat(a.attributes.getNamedItem("Opacity").nodeValue),null!=a.attributes.getNamedItem("StartTime")&&this.set_startTime(new Date(a.attributes.getNamedItem("StartTime").nodeValue)),null!=a.attributes.getNamedItem("EndTime")&&this.set_endTime(new Date(a.attributes.getNamedItem("EndTime").nodeValue)),null!=a.attributes.getNamedItem("FadeSpan")&&this.set_fadeSpan(wc.parseTimeSpan(a.attributes.getNamedItem("FadeSpan").nodeValue)),null!=a.attributes.getNamedItem("FadeType"))switch(a.attributes.getNamedItem("FadeType").nodeValue){case"In":this.set_fadeType(1);break;case"Out":this.set_fadeType(2);break;case"Both":this.set_fadeType(3);break;case"None":this.set_fadeType(4)}this.initializeFromXml(a)},loadData:function(){}},Vf={};Pb.get_version=function(){return Pb._version},Pb.set_version=function(a){return Pb._version=a,a},Pb.get_tourLayers=function(){return Pb._tourLayers},Pb.set_tourLayers=function(a){return Pb._tourLayers===a||a?Pb._tourLayers!==a&&a&&(Pb._tourLayers=a,Pb.initLayers()):(Pb._clearLayers(),Pb._tourLayers=a,Pb.loadTree()),a},Pb.loadTree=function(){},Pb.get_layerMaps=function(){return Pb.get_tourLayers()?Pb._layerMapsTours:Pb._layerMaps},Pb.set_layerMaps=function(a){return Pb.get_tourLayers()?Pb._layerMapsTours=a:Pb._layerMaps=a,a},Pb.get_allMaps=function(){return Pb.get_tourLayers()?Pb._allMapsTours:Pb._allMaps},Pb.set_allMaps=function(a){return Pb.get_tourLayers()?Pb._allMapsTours=a:Pb._allMaps=a,a},Pb.get_currentMap=function(){return Pb._currentMap},Pb.set_currentMap=function(a){return Pb._currentMap=a,a},Pb.get_layerList=function(){return Pb.get_tourLayers()?Pb._layerListTours:Pb._layerList},Pb.set_layerList=function(a){return Pb.get_tourLayers()?Pb._layerListTours=a:Pb._layerList=a,a},Pb.initLayers=function(){Pb._clearLayers(),Pb.get_layerMaps().Sun=new Qb("Sun",3),Pb.get_layerMaps().Sun.childMaps.Mercury=new Qb("Mercury",4),Pb.get_layerMaps().Sun.childMaps.Venus=new Qb("Venus",5),Pb.get_layerMaps().Sun.childMaps.Earth=new Qb("Earth",6),Pb.get_layerMaps().Sun.childMaps.Earth.childMaps.Moon=new Qb("Moon",13),Pb.get_layerMaps().Sun.childMaps.Mars=new Qb("Mars",7),Pb.get_layerMaps().Sun.childMaps.Jupiter=new Qb("Jupiter",8),Pb.get_layerMaps().Sun.childMaps.Jupiter.childMaps.Io=new Qb("Io",14),Pb.get_layerMaps().Sun.childMaps.Jupiter.childMaps.Europa=new Qb("Europa",15),Pb.get_layerMaps().Sun.childMaps.Jupiter.childMaps.Ganymede=new Qb("Ganymede",16),Pb.get_layerMaps().Sun.childMaps.Jupiter.childMaps.Callisto=new Qb("Callisto",17),Pb.get_layerMaps().Sun.childMaps.Saturn=new Qb("Saturn",9),Pb.get_layerMaps().Sun.childMaps.Uranus=new Qb("Uranus",10),Pb.get_layerMaps().Sun.childMaps.Neptune=new Qb("Neptune",11),Pb.get_layerMaps().Sun.childMaps.Pluto=new Qb("Pluto",12),Pb.get_layerMaps().Sky=new Qb("Sky",0),Pb.get_layerMaps().Sun.open=!0,ss.clearKeys(Pb.get_allMaps()),Pb._addAllMaps(Pb.get_layerMaps(),null),Pb._version++,Pb.loadTree()},Pb._addAllMaps=function(a,b){for(var c=ss.enumerate(ss.keys(a));c.moveNext();){var d=c.current,e=a[d];e.frame.parent=b,Pb.get_allMaps()[e.get_name()]=e,Pb._addAllMaps(e.childMaps,e.get_name())}},Pb._clearLayers=function(){for(var a=ss.enumerate(ss.keys(Pb.get_layerList()));a.moveNext();){var b=a.current,c=Pb.get_layerList()[b];c.cleanUp()}ss.clearKeys(Pb.get_layerList()),ss.clearKeys(Pb.get_layerMaps())},Pb._closeAllTourLoadedLayers=function(){for(var a=[],b=ss.enumerate(ss.keys(Pb.get_layerList()));b.moveNext();){var c=b.current,d=Pb.get_layerList()[c];d.loadedFromTour&&a.push(d.id)}for(var e=ss.enumerate(a);e.moveNext();){var f=e.current;Pb.deleteLayerByID(f,!0,!1)}for(var g=[],h=ss.enumerate(ss.keys(Pb.get_allMaps()));h.moveNext();){var c=h.current,i=Pb.get_allMaps()[c];i.loadedFromTour&&!i.layers.length&&g.push(i.get_name())}for(var j=ss.enumerate(g);j.moveNext();){var k=j.current;Pb.purgeLayerMapDeep(Pb.get_allMaps()[k],!0)}Pb.set_version(Pb.get_version()+1)-1,Pb.loadTree()},Pb.purgeLayerMapDeep=function(a,b){for(var c=ss.enumerate(a.layers);c.moveNext();){var d=c.current;Pb.deleteLayerByID(d.id,!1,!1)}a.layers.length=0;for(var e=ss.enumerate(ss.keys(a.childMaps));e.moveNext();){var f=e.current,g=a.childMaps[f];Pb.purgeLayerMapDeep(g,!1)}ss.clearKeys(a.childMaps),b&&(ss.emptyString(a.frame.parent)?ss.keyExists(Pb.get_layerMaps(),a.get_name())&&delete Pb.get_layerMaps()[a.get_name()]:ss.keyExists(Pb.get_allMaps(),a.frame.parent)&&delete Pb.get_allMaps()[a.frame.parent].childMaps[a.get_name()]),delete Pb.get_allMaps()[a.get_name()],Pb._version++},Pb._cleanAllTourLoadedLayers=function(){for(var a=ss.enumerate(ss.keys(Pb.get_layerList()));a.moveNext();){var b=a.current,c=Pb.get_layerList()[b];c.loadedFromTour&&(c.loadedFromTour=!1)}},Pb.mergeToursLayers=function(){Pb._tourLayers=!1;for(var a=!1,b=!1,c=ss.enumerate(ss.keys(Pb._allMapsTours));c.moveNext();){var d=c.current,e=Pb._allMapsTours[d];if(!ss.keyExists(Pb._allMaps,e.get_name())){var f=new Qb(e.get_name(),18);f.frame=e.frame,f.loadedFromTour=!0,Pb.get_allMaps()[f.get_name()]=f}}Pb.connectAllChildren();for(var g=ss.enumerate(ss.keys(Pb._layerListTours));g.moveNext();){var d=g.current,h=Pb._layerListTours[d];ss.keyExists(Pb.get_layerList(),h.id)&&(b||(a=!0,b=!0),a&&Pb.deleteLayerByID(h.id,!0,!1)),ss.keyExists(Pb.get_layerList(),h.id)?h.cleanUp():ss.keyExists(Pb.get_allMaps(),h.get_referenceFrame())&&(Pb.get_layerList()[h.id]=h,Pb.get_allMaps()[h.get_referenceFrame()].layers.push(h))}ss.clearKeys(Pb._layerListTours),ss.clearKeys(Pb._allMapsTours),ss.clearKeys(Pb._layerMapsTours),Pb.loadTree()},Pb.connectAllChildren=function(){for(var a=ss.enumerate(ss.keys(Pb.get_allMaps()));a.moveNext();){var b=a.current,c=Pb.get_allMaps()[b];ss.emptyString(c.frame.parent)&&!ss.keyExists(Pb.get_layerMaps(),c.frame.name)?Pb.get_layerMaps()[c.get_name()]=c:!ss.emptyString(c.frame.parent)&&ss.keyExists(Pb.get_allMaps(),c.frame.parent)&&(ss.keyExists(Pb.get_allMaps()[c.frame.parent].childMaps,c.frame.name)||(Pb.get_allMaps()[c.frame.parent].childMaps[c.frame.name]=c))}},Pb.deleteLayerByID=function(a,b,c){if(ss.keyExists(Pb.get_layerList(),a)){var d=Pb.get_layerList()[a];return d.cleanUp(),b&&ss.remove(Pb.get_allMaps()[d.get_referenceFrame()].layers,d),delete Pb.get_layerList()[a],Pb._version++,c&&Pb.loadTree(),!0}return!1},Pb._prepTourLayers=function(){if(qc.get_playing()){var a=Ec.singleton.uiController;if(null!=a){var b=a.get_tour();if(null!=b.get_currentTourStop()&&(a.updateTweenPosition(-1),!b.get_currentTourStop().get_keyFramed())){b.get_currentTourStop()._updateLayerOpacity();for(var c=ss.enumerate(ss.keys(b.get_currentTourStop().layers));c.moveNext();){var d=c.current,e=b.get_currentTourStop().layers[d];ss.keyExists(Pb.get_layerList(),e.id)&&(Pb.get_layerList()[e.id].set_opacity(e.frameOpacity),Pb.get_layerList()[e.id].setParams(e.frameParams))}}}}},Pb._draw=function(a,b,c,d,e,f){if(ss.keyExists(Pb.get_allMaps(),d)){var g=Pb.get_allMaps()[d];if(g.enabled&&(ss.keyCount(g.childMaps)||g.layers.length||g.frame.showAsPoint||g.frame.showOrbitPath)){if(qc.get_playing()){var h=Ec.singleton.uiController;if(null!=h){var i=h.get_tour();if(null!=i.get_currentTourStop()){h.updateTweenPosition(-1),i.get_currentTourStop()._updateLayerOpacity();for(var j=ss.enumerate(ss.keys(i.get_currentTourStop().layers));j.moveNext();){var k=j.current,l=i.get_currentTourStop().layers[k];ss.keyExists(Pb.get_layerList(),l.id)&&(Pb.get_layerList()[l.id].set_opacity(l.frameOpacity),Pb.get_layerList()[l.id].setParams(l.frameParams))}}}}var m=a.get_world(),n=a.get_worldBaseNonRotating(),o=a.get_nominalRadius();18===g.frame.reference&&(g.computeFrame(a),a.set_world(1!==g.frame.referenceFrameType&&2!==g.frame.referenceFrameType?Uc.multiplyMatrix(g.frame.worldMatrix,a.get_world()):Uc.multiplyMatrix(g.frame.worldMatrix,a.get_worldBaseNonRotating())),a.set_nominalRadius(g.frame.meanRadius)),g.frame.showAsPoint;for(var p=0;2>p;p++)for(var q=ss.enumerate(Pb.get_allMaps()[d].layers);q.moveNext();){var r=q.current;if((!p&&ss.canCast(r,kd)||1===p&&!ss.canCast(r,kd))&&r.get_enabled()){var s=gc.utcToJulian(r.get_startTime()),t=gc.utcToJulian(r.get_endTime()),u=gc.utcToJulian(r.get_startTime())-(1===r.get_fadeType()||3===r.get_fadeType()?r.get_fadeSpan()/864e6:0),v=gc.utcToJulian(r.get_endTime())+(2===r.get_fadeType()||3===r.get_fadeType()?r.get_fadeSpan()/864e6:0);if(gc.get_jNow()>u&&gc.get_jNow()t&&(w=(v-gc.get_jNow())/(r.get_fadeSpan()/864e6)),r.set_astronomical(c),r.draw(a,b*w,f)}}}if(e)for(var x=ss.enumerate(ss.keys(Pb.get_allMaps()[d].childMaps));x.moveNext();){var k=x.current,y=Pb.get_allMaps()[d].childMaps[k];if(y.frame.showOrbitPath&&bc.get_active().get_solarSystemOrbits())if(1===y.frame.referenceFrameType){null==y.frame.get_orbit()&&y.frame.set_orbit(new Ub(y.frame.get_elements(),360,y.frame.get_representativeColor(),1,a.get_nominalRadius()));var z=a.get_world();a.set_world(Uc.multiplyMatrix(g.frame.worldMatrix,a.get_worldBaseNonRotating())),y.frame.get_orbit().draw3D(a,.25,Sc.create(0,0,0)),a.set_world(z)}else 2===y.frame.referenceFrameType;(18===y.frame.reference||19===y.frame.reference)&&Pb._draw(a,b,c,y.get_name(),e,f)}a.set_nominalRadius(o),a.set_world(m),a.set_worldBaseNonRotating(n)}}},Pb._preDraw=function(a,b,c,d,e){if(ss.keyExists(Pb.get_allMaps(),d)){var f=Pb.get_allMaps()[d];if(ss.keyCount(f.childMaps)||f.layers.length){if(qc.get_playing()){var g=ss.safeCast(Ec.singleton.uiController,qc);if(null!=g){var h=g.get_tour();if(null!=h.get_currentTourStop()){g.updateTweenPosition(-1),h.get_currentTourStop()._updateLayerOpacity();for(var i=ss.enumerate(ss.keys(h.get_currentTourStop().layers));i.moveNext();){var j=i.current,k=h.get_currentTourStop().layers[j];ss.keyExists(Pb.get_layerList(),k.id)&&(Pb.get_layerList()[k.id].set_opacity(k.frameOpacity),Pb.get_layerList()[k.id].setParams(k.frameParams))}}}}var l=a.get_world(),m=a.get_worldBaseNonRotating(),n=a.get_nominalRadius();18===f.frame.reference&&(f.computeFrame(a),a.set_world(1!==f.frame.referenceFrameType?Uc.multiplyMatrix(f.frame.worldMatrix,a.get_world()):Uc.multiplyMatrix(f.frame.worldMatrix,a.get_worldBaseNonRotating())),a.set_nominalRadius(f.frame.meanRadius));for(var o=0;2>o;o++)for(var p=ss.enumerate(Pb.get_allMaps()[d].layers);p.moveNext();){var q=p.current;if((!o&&ss.canCast(q,kd)||1===o&&!ss.canCast(q,kd))&&q.get_enabled()){var r=gc.utcToJulian(q.get_startTime()),s=gc.utcToJulian(q.get_endTime()),t=gc.utcToJulian(q.get_startTime())-(1===q.get_fadeType()||3===q.get_fadeType()?q.get_fadeSpan()/864e6:0),u=gc.utcToJulian(q.get_endTime())+(2===q.get_fadeType()||3===q.get_fadeType()?q.get_fadeSpan()/864e6:0);if(gc.get_jNow()>t&&gc.get_jNow()s&&(v=(u-gc.get_jNow())/(q.get_fadeSpan()/864e6)),f.frame.reference||q.set_astronomical(!0),q.preDraw(a,b*v)}}}if(e)for(var w=ss.enumerate(ss.keys(Pb.get_allMaps()[d].childMaps));w.moveNext();){var j=w.current,x=Pb.get_allMaps()[d].childMaps[j];(18===x.frame.reference||19===x.frame.reference)&&Pb._preDraw(a,b,c,x.get_name(),e)}a.set_nominalRadius(n),a.set_world(l),a.set_worldBaseNonRotating(m)}}},Pb.add=function(a,b){ss.keyExists(Pb.get_layerList(),a.id)||ss.keyExists(Pb.get_allMaps(),a.get_referenceFrame())&&(Pb.get_layerList()[a.id]=a,Pb.get_allMaps()[a.get_referenceFrame()].layers.push(a),Pb._version++,b&&Pb.loadTree())};var Wf={},Xf={get_name:function(){return this.frame.name},set_name:function(a){return this.frame.name=a,a},computeFrame:function(a){18===this.frame.reference&&this.frame.computeFrame(a)},toString:function(){return this.get_name()}},Yf={get_hasTreeViewNodes:function(){return!1},getTreeNodes:function(){return null},getNodeContextMenu:function(){return null},setUICallbacks:function(){}},Zf={get_name:function(){return this._name},set_name:function(a){return this._name=a,a},get_tag:function(){return this._tag},set_tag:function(a){return this._tag=a,a},get_checked:function(){return this._isChecked},set_checked:function(a){return this._isChecked=a,a},get_enabled:function(){return this._isEnabled},set_enabled:function(a){return this._isEnabled=a,a},add_menuItemSelected:function(a){this.__menuItemSelected=ss.bindAdd(this.__menuItemSelected,a)},remove_menuItemSelected:function(a){this.__menuItemSelected=ss.bindSub(this.__menuItemSelected,a)},fireMenuItemSelected:function(){null!=this.__menuItemSelected&&this.__menuItemSelected(this)},get_subMenus:function(){return null==this._subMenus&&(this._subMenus=[]),this._subMenus}},$f={add_nodeChecked:function(a){this.__nodeChecked=ss.bindAdd(this.__nodeChecked,a)},remove_nodeChecked:function(a){this.__nodeChecked=ss.bindSub(this.__nodeChecked,a)},fireNodeChecked:function(){null!=this.__nodeChecked&&this.__nodeChecked(this)},add_nodeUpdated:function(a){this.__nodeUpdated=ss.bindAdd(this.__nodeUpdated,a)},remove_nodeUpdated:function(a){this.__nodeUpdated=ss.bindSub(this.__nodeUpdated,a)},fireNodeUpdated:function(){null!=this.__nodeUpdated&&this.__nodeUpdated(this)},add_nodeSelected:function(a){this.__nodeSelected=ss.bindAdd(this.__nodeSelected,a)},remove_nodeSelected:function(a){this.__nodeSelected=ss.bindSub(this.__nodeSelected,a)},fireNodeSelected:function(){null!=this.__nodeSelected&&this.__nodeSelected(this)},add_nodeActivated:function(a){this.__nodeActivated=ss.bindAdd(this.__nodeActivated,a)},remove_nodeActivated:function(a){this.__nodeActivated=ss.bindSub(this.__nodeActivated,a)},fireNodeActivated:function(){null!=this.__nodeActivated&&this.__nodeActivated(this)},get_name:function(){return this._name},set_name:function(a){return this._name!==a&&(this._name=a,this.fireNodeUpdated()),a},get_parent:function(){return this._parent},set_parent:function(a){return this._parent=a,a},get_level:function(){return this._level},set_level:function(a){return this._level=a,a},get_tag:function(){return this._tag},set_tag:function(a){return this._tag=a,a},get_referenceTag:function(){return this._referenceTag},set_referenceTag:function(a){return this._referenceTag=a,a},get_opened:function(){return this._open},set_opened:function(a){return this._open!==a&&(this._open=a,this.fireNodeUpdated()),a},get_checked:function(){return this._isChecked},set_checked:function(a){return this._isChecked!==a&&(this._isChecked=a,this.fireNodeUpdated()),a},get_bold:function(){return this._bold},set_bold:function(a){return this._bold!==a&&(this._bold=a,this.fireNodeUpdated()),a},get_color:function(){return this._color},set_color:function(a){return this._color!==a&&(this._color=a,this.fireNodeUpdated()),a},add:function(a){var b=new Tb;return b.set_name(a),b.set_parent(this),b.set_level(this.get_level()+1),this.get_nodes().push(b),b},get_nodes:function(){return null==this._nodes&&(this._nodes=[]),this._nodes}},_f={cleanUp:function(){},initVertexBuffer:function(){},draw3D:function(){}};Vb.isTLECheckSumGood=function(a){if(69!==a.length)return!1;for(var b=0,c=0;68>c;c++)switch(a.substr(c,1)){case"1":b+=1;break;case"2":b+=2;break;case"3":b+=3;break;case"4":b+=4;break;case"5":b+=5;break;case"6":b+=6;break;case"7":b+=7;break;case"8":b+=8;break;case"9":b+=9;break;case"-":b+=1}return"0"+b%10===a.charAt(68)};var ag={get_representativeColor:function(){return this.representativeColor},set_representativeColor:function(a){return a!==this.representativeColor&&(this.representativeColor=a,this._orbit=null),a},get_orbit:function(){return this._orbit},set_orbit:function(a){return this._orbit=a,a},importTrajectory:function(){},initializeFromXml:function(a){switch(this.name=a.attributes.getNamedItem("Name").nodeValue,this.parent=a.attributes.getNamedItem("Parent").nodeValue,a.attributes.getNamedItem("ReferenceFrameType").nodeValue){case"FixedSherical":this.referenceFrameType=0;break;case"Orbital":this.referenceFrameType=1;break;case"Trajectory":this.referenceFrameType=2}switch(a.attributes.getNamedItem("Reference").nodeValue){case"Sky":this.reference=0;break;case"Ecliptic":this.reference=1;break;case"Galactic":this.reference=2;break;case"Sun":this.reference=3;break;case"Mercury":this.reference=4;break;case"Venus":this.reference=5;break;case"Earth":this.reference=6;break;case"Mars":this.reference=7;break;case"Jupiter":this.reference=8;break;case"Saturn":this.reference=9;break;case"Uranus":this.reference=10;break;case"Neptune":this.reference=11;break;case"Pluto":this.reference=12;break;case"Moon":this.reference=13;break;case"Io":this.reference=14;break;case"Europa":this.reference=15;break;case"Ganymede":this.reference=16;break;case"Callisto":this.reference=17;break;case"Custom":this.reference=18;break;case"Identity":this.reference=19}if(this.parentsRoationalBase=ss["boolean"](a.attributes.getNamedItem("ParentsRoationalBase").nodeValue),this.meanRadius=parseFloat(a.attributes.getNamedItem("MeanRadius").nodeValue),this.oblateness=parseFloat(a.attributes.getNamedItem("Oblateness").nodeValue),this.heading=parseFloat(a.attributes.getNamedItem("Heading").nodeValue),this.pitch=parseFloat(a.attributes.getNamedItem("Pitch").nodeValue),this.roll=parseFloat(a.attributes.getNamedItem("Roll").nodeValue),this.scale=parseFloat(a.attributes.getNamedItem("Scale").nodeValue),this.tilt=parseFloat(a.attributes.getNamedItem("Tilt").nodeValue),this.translation=Sc.parse(a.attributes.getNamedItem("Translation").nodeValue),this.referenceFrameType||(this.lat=parseFloat(a.attributes.getNamedItem("Lat").nodeValue),this.lng=parseFloat(a.attributes.getNamedItem("Lng").nodeValue),this.altitude=parseFloat(a.attributes.getNamedItem("Altitude").nodeValue)),this.rotationalPeriod=parseFloat(a.attributes.getNamedItem("RotationalPeriod").nodeValue),this.zeroRotationDate=parseFloat(a.attributes.getNamedItem("ZeroRotationDate").nodeValue),this.set_representativeColor(Jc.load(a.attributes.getNamedItem("RepresentativeColor").nodeValue)),this.showAsPoint=ss["boolean"](a.attributes.getNamedItem("ShowAsPoint").nodeValue),null!=a.attributes.getNamedItem("StationKeeping")&&(this.stationKeeping=ss["boolean"](a.attributes.getNamedItem("StationKeeping").nodeValue)),1===this.referenceFrameType){switch(this.showOrbitPath=ss["boolean"](a.attributes.getNamedItem("ShowOrbitPath").nodeValue),this.semiMajorAxis=parseFloat(a.attributes.getNamedItem("SemiMajorAxis").nodeValue),a.attributes.getNamedItem("SemiMajorAxisScale").nodeValue){case"Meters":this.semiMajorAxisUnits=1;break;case"Feet":this.semiMajorAxisUnits=2; break;case"Inches":this.semiMajorAxisUnits=3;break;case"Miles":this.semiMajorAxisUnits=4;break;case"Kilometers":this.semiMajorAxisUnits=5;break;case"AstronomicalUnits":this.semiMajorAxisUnits=6;break;case"LightYears":this.semiMajorAxisUnits=7;break;case"Parsecs":this.semiMajorAxisUnits=8;break;case"MegaParsecs":this.semiMajorAxisUnits=9;break;case"Custom":this.semiMajorAxisUnits=10}this.eccentricity=parseFloat(a.attributes.getNamedItem("Eccentricity").nodeValue),this.inclination=parseFloat(a.attributes.getNamedItem("Inclination").nodeValue),this.argumentOfPeriapsis=parseFloat(a.attributes.getNamedItem("ArgumentOfPeriapsis").nodeValue),this.longitudeOfAscendingNode=parseFloat(a.attributes.getNamedItem("LongitudeOfAscendingNode").nodeValue),this.meanAnomolyAtEpoch=parseFloat(a.attributes.getNamedItem("MeanAnomolyAtEpoch").nodeValue),this.meanDailyMotion=parseFloat(a.attributes.getNamedItem("MeanDailyMotion").nodeValue),this.epoch=parseFloat(a.attributes.getNamedItem("Epoch").nodeValue)}},fromTLE:function(a,b,c){this.epoch=gc._twoLineDateToJulian(a.substr(18,14)),this.eccentricity=parseFloat("0."+b.substr(26,7)),this.inclination=parseFloat(b.substr(8,8)),this.longitudeOfAscendingNode=parseFloat(b.substr(17,8)),this.argumentOfPeriapsis=parseFloat(b.substr(34,8));var d=parseFloat(b.substr(52,11));this.meanAnomolyAtEpoch=parseFloat(b.substr(43,8)),this.meanDailyMotion=360*d;var e=86400/d/(2*Math.PI);this.semiMajorAxis=Math.pow(e*e*c,1/3),this.semiMajorAxisUnits=1},get_elements:function(){return this._elements.a=this.semiMajorAxis,this._elements.e=this.eccentricity,this._elements.i=this.inclination,this._elements.w=this.argumentOfPeriapsis,this._elements.omega=this.longitudeOfAscendingNode,this._elements.jdEquinox=this.epoch,this._elements.n=this.meanDailyMotion?this.meanDailyMotion:z.meanMotionFromSemiMajorAxis(this._elements.a),this._elements.t=this.epoch-this.meanAnomolyAtEpoch/this._elements.n,this._elements},set_elements:function(a){return this._elements=a,a},computeFrame:function(a){switch(this.referenceFrameType){case 1:this._computeOrbital(a);break;case 0:this._computeFixedSherical(a);break;case 2:this._computeFrameTrajectory(a)}},_computeFixedRectangular:function(){},_computeFixedSherical:function(){},_computeFrameTrajectory:function(){},_computeOrbital:function(){}},bg={},cg={parseWkt:function(a,b,c,d){for(var e=vc.split(a,"(,)"),f=ss.enumerate(e);f.moveNext();){var g=f.current,h=ss.trim(g).split(" ");if(h.length>1){var i=new Wb;i.lng=parseFloat(h[0]),this.astronomical&&(i.lng-=180),i.lat=parseFloat(h[1]),i.alt=h.length>2&&!c?parseFloat(h[2]):c,i.date=d,this.pointList.push(i)}}},getCenterPoint:function(){var a=new Wb;a.lat=0,a.lng=0,a.alt=0;for(var b=ss.enumerate(this.pointList);b.moveNext();){var c=b.current;a.lat+=c.lat,a.lng+=c.lng,a.alt+=c.alt}return a.lat/=this.pointList.length,a.lng/=this.pointList.length,a.alt/=this.pointList.length,a}},dg={lock:function(){this.locked=!0},unlock:function(){this.locked=!1},loadFromString:function(a,b,c,d){var e=0,f=a.split("\r\n");if(!b||d)if(f.length>0){var g=f[0];e++,-1===g.indexOf(" ")&&g.indexOf(",")>-1&&(this.delimiter=","),b||(this.rows.length=0),this.header=vc.splitString(g,this.delimiter)}else this.header=[];var h=[];for(c||(h=this.rows);ea)return Zb._planet3dLocations[a].copy()}catch(b){}return Sc.create(0,0,0)},Zb.getPlanet3dSufaceAltitude=function(a){try{if(21>a)return Zb.getAdjustedPlanetRadius(a)}catch(b){}return 0},Zb.getPlanetTargetPoint=function(a,b,c,d){var e;return e=d?Zb.getPlanet3dLocationJD(a,d):Zb.getPlanet3dLocation(a),e.add(Pc.raDecTo3dAu(c/15+6,b,Zb.getPlanet3dSufaceAltitude(a))),e},Zb.getPlanet3dLocationJD=function(a,b){try{var c=new Sc,d=tb.getPlanet(b,0,0,0,-6378149),e=Pc.raDecTo3dAu(d.RA,d.dec,d.distance);if(19===a)c=Sc.create(-e.x,-e.y,-e.z);else{var f=tb.getPlanet(b,a,0,0,-6378149);c=Pc.raDecTo3dAu(f.RA,f.dec,f.distance),c.subtract(e)}if(c.rotateX(Pc.meanObliquityOfEcliptic(b)*Zb.RC),1!==bc.get_active().get_solarSystemScale())switch(a){case 9:var g=Zb.getPlanet3dLocationJD(19,b);c.subtract(g),c.multiply(bc.get_active().get_solarSystemScale()/2),c.add(g);break;case 10:case 11:case 12:case 13:var g=Zb.getPlanet3dLocationJD(4,b);c.subtract(g),c.multiply(bc.get_active().get_solarSystemScale()),c.add(g)}return c}catch(h){return Sc.create(0,0,0)}},Zb.getPlanetLocation=function(a){var b=Zb.getPlanetIDFromName(a);return null!=Zb._planetLocations?Zb._planetLocations[b]:tb.getPlanet(gc.get_jNow(),b,gc.get_location().get_lat(),gc.get_location().get_lng(),gc.get_altitude())},Zb.getPlanetLocationJD=function(a,b){var c=Zb.getPlanetIDFromName(a);return tb.getPlanet(b,c,gc.get_location().get_lat(),gc.get_location().get_lng(),gc.get_altitude())},Zb.getPlanetIDFromName=function(a){switch(a){case"Sun":return 0;case"Mercury":return 1;case"Venus":return 2;case"Mars":return 3;case"Jupiter":return 4;case"Saturn":return 5;case"Uranus":return 6;case"Neptune":return 7;case"Pluto":return 8;case"Moon":return 9;case"Io":return 10;case"Europa":return 11;case"Ganymede":return 12;case"Callisto":return 13;case"Earth":return 19;case"IoShadow":return 14;case"EuropaShadow":return 15;case"GanymedeShadow":return 16;case"CallistoShadow":return 17;case"SunEclipsed":return 18;case"Custom":return 20;case"Undefined":return 65536;default:return-1}},Zb.getNameFrom3dId=function(a){switch(a){case 0:return"Sun";case 1:return"Mercury";case 2:return"Venus";case 3:return"Visible Imagery";case 4:return"Jupiter";case 5:return"Saturn";case 6:return"Uranus";case 7:return"Neptune";case 8:return"Pluto";case 9:return"Moon";case 10:return"Io (Jupiter)";case 11:return"Europa (Jupiter)";case 12:return"Ganymede (Jupiter)";case 13:return"Callisto (Jupiter)";case 19:return"Bing Maps Aerial";default:return""}},Zb.updatePlanetLocations=function(a){if(Zb._jNow=gc.get_jNow(),a&&Zb.updateOrbits(0),null==Zb._planetDiameters&&(Zb._planetDiameters=new Array(20),Zb._planetDiameters[0]=.009291568,Zb._planetDiameters[1]=325794793734425e-19,Zb._planetDiameters[2]=808669220531394e-19,Zb._planetDiameters[3]=453785605596396e-19,Zb._planetDiameters[4]=954501e-9,Zb._planetDiameters[5]=802173e-9,Zb._planetDiameters[6]=339564e-9,Zb._planetDiameters[7]=324825e-9,Zb._planetDiameters[8]=152007379777805e-19,Zb._planetDiameters[9]=232084653538149e-19,Zb._planetDiameters[10]=243519298386342e-19,Zb._planetDiameters[11]=208692629580609e-19,Zb._planetDiameters[12]=351742670356556e-19,Zb._planetDiameters[13]=322263666626559e-19,Zb._planetDiameters[14]=243519298386342e-19,Zb._planetDiameters[15]=208692629580609e-19,Zb._planetDiameters[16]=351742670356556e-19,Zb._planetDiameters[17]=322263666626559e-19,Zb._planetDiameters[18]=.018583136,Zb._planetDiameters[19]=855626412117809e-19),null==Zb.planetColors){var b=Jc.fromArgb(255,255,255,221),c=Jc.fromArgb(255,255,68,0);Zb.planetColors=new Array(20),Zb.planetColors[0]=Kc.get_yellow(),Zb.planetColors[1]=Kc.get_white(),Zb.planetColors[2]=b,Zb.planetColors[3]=c,Zb.planetColors[4]=Jc.fromArgb(255,255,165,0),Zb.planetColors[5]=Jc.fromArgb(255,184,134,11),Zb.planetColors[6]=Jc.fromArgb(255,173,216,230),Zb.planetColors[7]=Kc.get_blue(),Zb.planetColors[8]=Kc.get_white(),Zb.planetColors[9]=Kc.get_white(),Zb.planetColors[10]=Kc.get_white(),Zb.planetColors[11]=Kc.get_white(),Zb.planetColors[12]=Kc.get_white(),Zb.planetColors[13]=Kc.get_white(),Zb.planetColors[14]=Kc.get_black(),Zb.planetColors[15]=Kc.get_black(),Zb.planetColors[16]=Kc.get_black(),Zb.planetColors[17]=Kc.get_black(),Zb.planetColors[18]=Kc.get_white(),Zb.planetColors[19]=Jc.fromArgb(255,173,216,230)}if(null==Zb._planetTilts&&(Zb._planetTilts=new Array(20),Zb._planetTilts[0]=0,Zb._planetTilts[1]=.01,Zb._planetTilts[2]=177.4,Zb._planetTilts[3]=25.19,Zb._planetTilts[4]=3.13,Zb._planetTilts[5]=26.73,Zb._planetTilts[6]=97.77,Zb._planetTilts[7]=28.32,Zb._planetTilts[8]=119.61,Zb._planetTilts[9]=23.439,Zb._planetTilts[10]=2.21,Zb._planetTilts[11]=0,Zb._planetTilts[12]=-.33,Zb._planetTilts[13]=0,Zb._planetTilts[14]=0,Zb._planetTilts[15]=0,Zb._planetTilts[16]=0,Zb._planetTilts[17]=0,Zb._planetTilts[18]=0,Zb._planetTilts[19]=23.5),Zb._planetTilts[19]=Zb._obliquity/Zb.RC,null==Zb.planetRotationPeriod&&(Zb.planetRotationPeriod=new Array(20),Zb.planetRotationPeriod[0]=25.37995,Zb.planetRotationPeriod[1]=58.6462,Zb.planetRotationPeriod[2]=-243.0187,Zb.planetRotationPeriod[3]=1.02595675,Zb.planetRotationPeriod[4]=.41007,Zb.planetRotationPeriod[5]=.426,Zb.planetRotationPeriod[6]=-.71833,Zb.planetRotationPeriod[7]=.67125,Zb.planetRotationPeriod[8]=-6.38718,Zb.planetRotationPeriod[9]=27.3,Zb.planetRotationPeriod[10]=1.769137786,Zb.planetRotationPeriod[11]=3.551,Zb.planetRotationPeriod[12]=7.155,Zb.planetRotationPeriod[13]=16.69,Zb.planetRotationPeriod[14]=0,Zb.planetRotationPeriod[15]=0,Zb.planetRotationPeriod[16]=0,Zb.planetRotationPeriod[17]=0,Zb.planetRotationPeriod[18]=0,Zb.planetRotationPeriod[19]=.99726968),null==Zb._planetScales&&(Zb._planetScales=new Array(20)),null==Zb._planet3dLocations&&(Zb._planet3dLocations=new Array(20)),bc.get_active().get_actualPlanetScale())Zb._planetScales[0]=.5,Zb._planetScales[1]=.25,Zb._planetScales[2]=.25,Zb._planetScales[3]=.25,Zb._planetScales[4]=.25,Zb._planetScales[5]=.5,Zb._planetScales[6]=.25,Zb._planetScales[7]=.25,Zb._planetScales[8]=.25,Zb._planetScales[9]=.25,Zb._planetScales[10]=.25,Zb._planetScales[11]=.25,Zb._planetScales[12]=.25,Zb._planetScales[13]=.25,Zb._planetScales[14]=.25,Zb._planetScales[15]=.25,Zb._planetScales[16]=.25,Zb._planetScales[17]=.25,Zb._planetScales[18]=.5,Zb._planetScales[19]=.25;else{for(var d=0;20>d;d++)Zb._planetScales[d]=10>d?.25:.1;Zb._planetScales[0]=.5,Zb._planetScales[5]=.5,Zb._planetScales[18]=.5}Zb._planetDrawOrder={},Zb._planetLocations=new Array(20);var e=new Sc,f=0;if(f>-1){var g=tb.getPlanet(Zb._jNow,f,a?0:gc.get_location().get_lat(),a?0:gc.get_location().get_lng(),a?-6378149:gc.get_altitude());e=Pc.raDecTo3dAu(g.RA,g.dec,g.distance)}Zb._planet3dLocations[19]=Sc.create(-e.x,-e.y,-e.z),Zb._planet3dLocations[19].rotateX(Zb._obliquity);for(var d=0;18>d;d++){if(Zb._planetLocations[d]=tb.getPlanet(Zb._jNow,d,a?0:gc.get_location().get_lat(),a?0:gc.get_location().get_lng(),a?-6378149:gc.get_altitude()),Zb._planet3dLocations[d]=Pc.raDecTo3dAu(Zb._planetLocations[d].RA,Zb._planetLocations[d].dec,Zb._planetLocations[d].distance),Zb._planet3dLocations[d].subtract(e),Zb._planet3dLocations[d].rotateX(Zb._obliquity),bc.get_active().get_actualPlanetScale()&&(Zb._planetScales[d]=2*Math.atan(.5*(Zb._planetDiameters[d]/Zb._planetLocations[d].distance))/Math.PI*180),1!==bc.get_active().get_solarSystemScale()){var h=d;switch(h){case 9:var i=Zb._planet3dLocations[19];Zb._planet3dLocations[d].subtract(i),Zb._planet3dLocations[d].multiply(bc.get_active().get_solarSystemScale()/2),Zb._planet3dLocations[d].add(i);break;case 10:case 11:case 12:case 13:var i=Zb._planet3dLocations[4];Zb._planet3dLocations[d].subtract(i),Zb._planet3dLocations[d].multiply(bc.get_active().get_solarSystemScale()),Zb._planet3dLocations[d].add(i)}}for(var j=-Zb._planetLocations[d].distance;ss.keyExists(Zb._planetDrawOrder,j);)j+=1e-10;Zb._planetDrawOrder[j]=d}Zb._planetLocations[18]=Zb._planetLocations[0],Zb._planetScales[18]=2*Zb._planetScales[0],Zb._planetScales[5]=2*Zb._planetScales[5],Zb._lastUpdate=gc.get_now()},Zb.planetsReady=function(){},Zb.updateOrbits=function(a){try{if(Zb._obliquity=Pc.meanObliquityOfEcliptic(gc.get_jNow())*Zb.RC,a!==Zb._lastPlanetCenterID&&(Zb._orbits=null),Zb._lastPlanetCenterID=a,null==Zb._orbits&&(0>a?Zb._eclipticTilt=Uc.get_identity():(Zb._eclipticTilt=Uc.get_identity(),Zb._eclipticTilt=Uc._rotationX(Zb._obliquity)),null==Zb.planetOrbitalYears&&(Zb.planetOrbitalYears=new Array(20),Zb.planetOrbitalYears[0]=1,Zb.planetOrbitalYears[1]=.241,Zb.planetOrbitalYears[2]=.615,Zb.planetOrbitalYears[3]=1.881,Zb.planetOrbitalYears[4]=11.87,Zb.planetOrbitalYears[5]=29.45,Zb.planetOrbitalYears[6]=84.07,Zb.planetOrbitalYears[7]=164.9,Zb.planetOrbitalYears[8]=248.1,Zb.planetOrbitalYears[9]=27.3/365.25,Zb.planetOrbitalYears[10]=16.6890184/365.25,Zb.planetOrbitalYears[11]=3.551181/365.25,Zb.planetOrbitalYears[12]=7.15455296/365.25,Zb.planetOrbitalYears[13]=16.6890184/365.25,Zb.planetOrbitalYears[19]=1),!Zb.readOrbits())){Zb._orbits=new Array(20);for(var b=1;20>b;b++)if(Zb._orbits[b]=new Array(Zb._orbitalSampleRate),9>b||19===b){for(var c=0;c9&&14>b&&(d=4),d>-1){var g=tb.getPlanet(e,d,0,0,-6378149);f=Pc.raDecTo3dAu(g.RA,g.dec,g.distance)}if(19!==b){var h=tb.getPlanet(e,b,0,0,-6378149);Zb._orbits[b][c]=Pc.raDecTo3dAu(h.RA,h.dec,h.distance),Zb._orbits[b][c].subtract(f)}else Zb._orbits[b][c]=Sc.create(-f.x,-f.y,-f.z);Zb._orbits[b][c].rotateX(Zb._obliquity)}Zb._orbits[b][Zb._orbitalSampleRate-1]=Zb._orbits[b][0]}Zb.dumpOrbitsFile()}}finally{}},Zb.readOrbits=function(){return!1},Zb.dumpOrbitsFile=function(){},Zb.drawPlanets=function(a){null==Zb._planetTextures&&Zb._loadPlanetTextures();var b=Zb._geocentricElongation(Zb._planetLocations[9].RA,Zb._planetLocations[9].dec,Zb._planetLocations[0].RA,Zb._planetLocations[0].dec),c=Zb._planetLocations[9].RA-Zb._planetLocations[0].RA;Zb._planetLocations[9].RAc&&(d+=180);{var e=15*Math.abs(Zb._planetLocations[9].RA-Zb._planetLocations[0].RA)*Math.cos(Pc.degreesToRadians(Zb._planetLocations[0].dec)),f=Math.abs(Zb._planetLocations[9].dec-Zb._planetLocations[0].dec),g=Math.sqrt(e*e+f*f),h=!1,i=0,j=Zb._planetScales[9]/2-g;Math.min(32,ss.truncate(32*g))}j>Zb._planetScales[0]/4&&(h=!0,i=Math.min(1,(j-Zb._planetScales[0]/2)/.001),Zb._drawPlanet(a,18,i));for(var k=ss.enumerate(ss.keys(Zb._planetDrawOrder));k.moveNext();){var l=k.current,m=Zb._planetDrawOrder[l];Zb._drawPlanet(a,m,1)}return!0},Zb._loadPlanetTextures=function(){var a="http://cdn.worldwidetelescope.org/webclient/images/";Zb._planetTextures=new Array(20),Zb._planetTextures[0]=Zb.loadPlanetTexture(a+"sun.jpg"),Zb._planetTextures[1]=Zb.loadPlanetTexture(a+"mercury.jpg"),Zb._planetTextures[2]=Zb.loadPlanetTexture(a+"venus.jpg"),Zb._planetTextures[3]=Zb.loadPlanetTexture(a+"mars.jpg"),Zb._planetTextures[4]=Zb.loadPlanetTexture(a+"jupiter.jpg"),Zb._planetTextures[5]=Zb.loadPlanetTexture(a+"saturn.png"),Zb._planetTextures[6]=Zb.loadPlanetTexture(a+"uranus.jpg"),Zb._planetTextures[7]=Zb.loadPlanetTexture(a+"neptune.jpg"),Zb._planetTextures[8]=Zb.loadPlanetTexture(a+"pluto.jpg"),Zb._planetTextures[9]=Zb.loadPlanetTexture(a+"moon.jpg"),Zb._planetTextures[10]=Zb.loadPlanetTexture(a+"io.jpg"),Zb._planetTextures[11]=Zb.loadPlanetTexture(a+"europa.jpg"),Zb._planetTextures[12]=Zb.loadPlanetTexture(a+"ganymede.jpg"),Zb._planetTextures[13]=Zb.loadPlanetTexture(a+"callisto.jpg"),Zb._planetTextures[14]=Zb.loadPlanetTexture(a+"sun.jpg"),Zb._planetTextures[15]=Zb.loadPlanetTexture(a+"sun.jpg"),Zb._planetTextures[16]=Zb.loadPlanetTexture(a+"sun.jpg"),Zb._planetTextures[17]=Zb.loadPlanetTexture(a+"sun.jpg"),Zb._planetTextures[18]=Zb.loadPlanetTexture("sunCorona.png"),Zb._planetTextures[19]=Zb.loadPlanetTexture("earth.jpg")},Zb.drawPlanets3D=function(a,b,c){Zb.initPlanetResources(a);var d=vc.solarSystemToMeters(a.get_solarSystemCameraDistance()),e=(Math.min(1,Math.max(wc.log10(d)-7.3,0)),Math.min(1,Math.max(wc.log10(d)-8.6,0)));if(bc.get_active().get_solarSystemOrbits()&&e>0)for(var f=1;10>f;f++){var g=f;9===f&&(g=19);var h=Math.atan2(Zb._planet3dLocations[g].z,Zb._planet3dLocations[g].x);Zb._drawSingleOrbit(a,Zb.planetColors[g],g,c,h,Zb._planet3dLocations[g],e)}ss.clearKeys(Zb._drawOrder);for(var i=a.cameraPosition.copy(),j=0;14>j;j++)if(!Zb._planetLocations[j].eclipsed){var k=Sc.subtractVectors(i,Sc.subtractVectors(Zb._planet3dLocations[j],c));ss.keyExists(Zb._drawOrder,k.length())||(Zb._drawOrder[k.length()]=j)}var l=Sc.subtractVectors(i,Sc.subtractVectors(Zb._planet3dLocations[19],c));ss.keyExists(Zb._drawOrder,l.length())||(Zb._drawOrder[l.length()]=19);for(var m=ss.enumerate(ss.keys(Zb._drawOrder));m.moveNext();){var n=m.current,j=Zb._drawOrder[n];Zb._drawPlanet3d(a,j,c)}return!0},Zb.initPlanetResources=function(){},Zb._drawSingleOrbit=function(a,b,c,d,e,f,g){if(!(.01>g)&&null==a.gl){var h=Zb._orbitalSampleRate,i=!1,j=(a.get_viewPoint(),a.device);j.save(),j.strokeStyle=b.toString(),j.lineWidth=2,j.globalAlpha=1;for(var k=new Sc,l=new Sc,m=new Sc,n=!0,o=Uc.translation(Sc.negate(d)),p=Uc.multiplyMatrix(o,a.WVP),q=Uc.multiplyMatrix(o,a.WV),r=0;h>r;r++){var s=Zb._orbits[c][r],t=(Math.atan2(Zb._orbits[c][r].z,Zb._orbits[c][r].x)+2*Math.PI-e)%(2*Math.PI),u=ss.truncate(t/(2*Math.PI)*255),v=u/255;2>u&&!i&&(s=f,v=1),l=q.transform(s),k=p.transform(s),l.z>0&&(n?n=!1:(j.beginPath(),j.globalAlpha=v*g,j.moveTo(m.x,m.y),j.lineTo(k.x,k.y),j.stroke())),m=k}j.restore()}},Zb.isPlanetInFrustum=function(a,b){for(var c=a.get_frustum(),d=(Sc.create(0,0,0),new Yc(0,0,0,1)),e=0;6>e;e++)if(c[e].dot(d)+b<0)return!1;return!0},Zb._drawPlanet3d=function(a,b,c){var d=Zb.getAdjustedPlanetRadius(b),e=0;e=19===b?Pc.mstFromUTC2(gc.get_now(),0)/180*Math.PI:(Zb._jNow-2451545)/Zb.planetRotationPeriod[b]*Math.PI*2%(2*Math.PI);var f=a.get_world(),g=a.get_worldBase(),h=a.get_worldBaseNonRotating(),i=a.get_world().clone(),j=a.get_world().clone(),k=Sc.subtractVectors(Zb._planet3dLocations[b],c);i.scale(Sc.create(d,d,d)),i._multiply(Uc._rotationY(-e)),i._multiply(Uc._rotationX(Zb._planetTilts[b]*Zb.RC)),i._multiply(Uc.translation(k)),j.scale(Sc.create(d,d,d)),j._multiply(Uc._rotationX(Zb._planetTilts[b]*Zb.RC)),j._multiply(Uc.translation(k)),a.set_world(i),a.set_worldBase(i.clone()),a.set_worldBaseNonRotating(j),a.makeFrustum();var l=1;if(5===b&&(l=3),Zb.isPlanetInFrustum(a,l)){var m=Zb._planet3dLocations[0].copy(),n=Zb._planet3dLocations[b].copy();m=f.transform(m),n=f.transform(n);var o=Sc.subtractVectors(m,n);o.normalize(),a.set_sunPosition(o);var p=Sc.subtractVectors(Zb._planet3dLocations[b],c);p.subtract(a.cameraPosition);var q=p.length(),r=2*Math.atan(.5*(d/q))/Math.PI*180,s=0;if(s=r>10.5?0:r>3.9?1:r>.72?2:r>.05?3:4,19===b&&2>s){1e-5*bc.get_active().get_solarSystemScale()}if(3>s){var t=a.lighting;5===b&&(a.lighting=!1,Zb.drawSaturnsRings(a,!1,q),a.lighting=t),b||(a.lighting=!1),Zb._drawSphere(a,b),5===b&&(a.lighting=!1,Zb.drawSaturnsRings(a,!0,q)),a.lighting=t}else if(b){if(9>b||19===b){var u=800*Zb._planetDiameters[b];Zb.drawPointPlanet(a,new Sc,Math.max(.05,Math.min(.1,u)),Zb.planetColors[b],!0)}else if(r>.002){var u=800*Zb._planetDiameters[b];Zb.drawPointPlanet(a,new Sc,Math.max(.05,Math.min(.1,u)),Zb.planetColors[b],!0)}}else Zb.drawPointPlanet(a,new Sc,10*Zb._planetDiameters[b],Zb.planetColors[b],!0)}a.set_world(f),a.set_worldBase(g),a.set_worldBaseNonRotating(h)},Zb.drawSaturnsRings=function(a,b,c){if(null==Zb._ringsTriangleLists[0]){Zb._ringImage=document.createElement("img");var d=Zb._ringImage;d.crossOrigin="anonymous",Zb._ringImage.src="/webclient/images/saturnringsshadow.png",Zb._ringsTriangleLists[0]=[],Zb._ringsTriangleLists[1]=[];var e,f=2.25,g=Sc.create(-f,0,-f),h=Sc.create(f,0,-f),i=Sc.create(-f,0,f),j=Sc.create(f,0,f),k=(Sc.create(0,0,0),Sc.create(-f,0,0),Sc.create(0,0,-f),Sc.create(0,0,f),Sc.create(f,0,0),6);e=[];var l=1024,m=1024;e.push(Qc.createPosSize(g,0,0,l,m)),e.push(Qc.createPosSize(h,1,0,l,m)),e.push(Qc.createPosSize(i,0,1,l,m)),e.push(Qc.createPosSize(j,1,1,l,m));var n=[];n.push(uc.create(0,2,1)),n.push(uc.create(2,3,1));for(var o=5;o-->1;){for(var p=[],q=ss.enumerate(n);q.moveNext();){var r=q.current;r.subDivideNoNormalize(p,e)}n=p}for(var s=.6/(l/256),t=ss.enumerate(n);t.moveNext();){var r=t.current,u=e[r.a],v=e[r.b],w=e[r.c];Zb._ringsTriangleLists[0].push(_b.createWithMiter(u,v,w,Zb._ringImage,k,s))}}if(null==a.gl){var x=(a.cameraPosition,new Sc),y=Uc.multiplyMatrix(Uc._rotationY(Math.atan2(a.get_sunPosition().x,a.get_sunPosition().z)),a.get_worldBaseNonRotating()),z=Uc.multiplyMatrix(y,a.get_view()),A=Uc.multiplyMatrix(z,a.get_projection()),l=a.width,m=a.height;A.scale(Sc.create(l/2,-m/2,1)),A.translate(Sc.create(l/2,m/2,0));for(var B=0,C=0;2>C;C++){for(var D=ss.enumerate(Zb._ringsTriangleLists[0]);D.moveNext();){var r=D.current;x=z.transform(r.a.position),B=x.length();var E=B>c;b&&(E=!E),E&&(r.opacity=1,r.draw(a.device,A))}_b.cullInside=!_b.cullInside}}},Zb.drawPointPlanet=function(a,b,c,d,e){c=Math.max(2,c);var f=b,g=c/2,h=a.WVP.transform(f);if(!(h.z<0||!e&&Sc.dot(a.get_viewPoint(),f)<.55))if(null!=a.gl);else{var i=a.device;i.save(),i.beginPath(),i.arc(h.x,h.y,g,0,2*Math.PI,!0),i.lineWidth=1,i.fillStyle=d.toString(),i.fill(),i.globalAlpha=1,i.strokeStyle=d.toString(),i.stroke(),i.restore()}},Zb.getAdjustedPlanetRadius=function(a){a>Zb._planetDiameters.length-1&&(a=19);var b=Zb._planetDiameters[a],c=b/2;return c*=a?1+3*(bc.get_active().get_solarSystemScale()-1):1+.3*(bc.get_active().get_solarSystemScale()-1)},Zb._drawPlanet=function(a,b,c){var d=Zb._planetLocations[b];if(14>b&&Zb._planetScales[b]b||14>b&&Zb._planetScales[b]>a.viewCamera.zoom/6/6400){var e=Pc.raDecTo3d(d.RA,d.dec);Zb.drawPointPlanet(a,e,3,Zb.planetColors[b],!1)}}else{var f=null;if(10>b||18===b)f=Zb._planetTextures[b].imageElement;else if(14>b)f=Zb._planetLocations[b].eclipsed?Zb._planetTextures[15].imageElement:bc.get_active().get_showMoonsAsPointSource()?Zb._planetTextures[14].imageElement:Zb._planetTextures[b].imageElement;else{if(!Zb._planetLocations[b].shadow)return;f=Zb._planetTextures[15].imageElement}var g=Pc.raDecTo3d(d.RA,d.dec),h=Zb._planetScales[b]/(a.get_fovScale()/3600)/2,i=a.WVP.transform(g);if(!(i.z<0||Sc.dot(a.get_viewPoint(),g)<.55))if(null!=a.gl);else{var j=a.device;j.save(),j.globalAlpha=c,j.beginPath(),j.arc(i.x,i.y,h,0,2*Math.PI,!0),j.lineWidth=0,j.closePath(),j.clip(),j.drawImage(f,i.x-h,i.y-h,2*h,2*h),j.globalAlpha=1,j.restore()}}},Zb._drawPlanetPhase=function(){},Zb._geocentricElongation=function(a,b,c,d){return a=Pc.degreesToRadians(15*a),c=Pc.degreesToRadians(15*c),b=Pc.degreesToRadians(b),d=Pc.degreesToRadians(d),Pc.radiansToDegrees(Math.acos(Math.sin(d)*Math.sin(b)+Math.cos(d)*Math.cos(b)*Math.cos(c-a)))},Zb._phaseAngle=function(a,b,c){return a=Pc.degreesToRadians(a),Pc.mapTo0To360Range(Pc.radiansToDegrees(Math.atan2(c*Math.sin(a),b-c*Math.cos(a))))},Zb._positionAngle=function(a,b,c,d){return a=Pc.hoursToRadians(a),c=Pc.hoursToRadians(c),b=Pc.degreesToRadians(b),d=Pc.degreesToRadians(d),Pc.mapTo0To360Range(Pc.radiansToDegrees(Math.atan2(Math.cos(b)*Math.sin(a-c),Math.sin(b)*Math.cos(d)-Math.cos(b)*Math.sin(d)*Math.cos(a-c))))},Zb._drawSphere=function(a,b){var c=Zb.getNameFrom3dId(b),d=Ec.singleton.getImagesetByName(c);return null==d&&(d=Ec.singleton.getImagesetByName("Bing Maps Aerial")),null!=d?void a.drawImageSet(d,100):void 0};var eg={};$b.create=function(a){var b=new $b;return b.device=a,b.viewCamera.zoom=700,b.viewCamera.target=65536,b},$b._getTilesYForLevel=function(a,b){var c=1;switch(a.get_projection()){case 0:c=Math.pow(2,b);break;case 1:c=Math.pow(2,b)*(180/a.get_baseTileDegrees());break;case 2:c=Math.pow(2,b);break;case 4:c=1;break;default:c=Math.pow(2,b)}return c===Number.POSITIVE_INFINITY&&(c=1),c},$b._getTilesXForLevel=function(a,b){var c=1;switch(a.get_projection()){case 6:case 3:c=Math.pow(2,b);break;case 0:c=Math.pow(2,b)*ss.truncate(a.get_baseTileDegrees()/360);break;case 1:c=Math.pow(2,b)*ss.truncate(360/a.get_baseTileDegrees());break;case 5:case 2:c=1===a.get_widthFactor()?2*Math.pow(2,b):Math.pow(2,b);break;case 4:c=1;break;default:c=2*Math.pow(2,b)}return c};var fg={save:function(){null!=this.gl||this.device.save()},restore:function(){null!=this.gl||this.device.restore()},clear:function(){null!=this.gl?(this.gl.viewport(0,0,ss.truncate(this.width),ss.truncate(this.height)),this.gl.clear(16640)):(this.device.save(),this.device.fillStyle="black",this.device.fillRect(0,0,this.width,this.height),this.device.restore())},get_viewPoint:function(){return this._viewPoint},get_RA:function(){return((180-(this.viewCamera.lng-180))/15%24+48)%24},rAtoViewLng:function(a){return 180-a/24*360-180},get_dec:function(){return this.viewCamera.lat},get_fovAngle:function(){return this._fovAngle},get_fovScale:function(){return this._fovScale},set_fovScale:function(a){return this._fovScale=a,a},get_view:function(){return this._view},set_view:function(a){return this._view=a,this._frustumDirty=!0,a},get_viewBase:function(){return this._viewBase},set_viewBase:function(a){return this._viewBase=a,a},get_projection:function(){return this._projection},set_projection:function(a){return this._projection=a,this._frustumDirty=!0,a},get_world:function(){return this._world},set_world:function(a){return this._world=a,this._frustumDirty=!0,a},get_worldBase:function(){return this._worldBase},set_worldBase:function(a){return this._worldBase=a,a},get_worldBaseNonRotating:function(){return this._worldBaseNonRotating},set_worldBaseNonRotating:function(a){return this._worldBaseNonRotating=a,a},get_nominalRadius:function(){return this._nominalRadius},set_nominalRadius:function(a){return this._nominalRadius=a,a},get_sunPosition:function(){return this._sunPosition},set_sunPosition:function(a){return this._sunPosition=a,a},onTarget:function(){return Math.abs(this.viewCamera.lat-this.targetCamera.lat)<1e-12&&Math.abs(this.viewCamera.lng-this.targetCamera.lng)<1e-12&&Math.abs(this.viewCamera.zoom-this.targetCamera.zoom)<1e-12&&null==this.viewMover},setTexture:function(){},get_backgroundImageset:function(){return this._backgroundImageset},set_backgroundImageset:function(a){return this._backgroundImageset=a,a},get_foregroundImageset:function(){return this._foregroundImageset},set_foregroundImageset:function(a){return this._foregroundImageset=a,a},drawImageSet:function(a,b){for(var c=$b._getTilesXForLevel(a,a.get_baseLevel()),d=$b._getTilesYForLevel(a,a.get_baseLevel()),e=0;c>e;e++)for(var f=0;d>f;f++){var g=jc.getTile(a.get_baseLevel(),e,f,a,null);null!=g&&g.draw3D(this,b)}},getScaledAltitudeForLatLong:function(a,b){var c=this.get_backgroundImageset();if(null==c)return 0;for(var d=$b._getTilesXForLevel(c,c.get_baseLevel()),e=$b._getTilesYForLevel(c,c.get_baseLevel()),f=0;d>f;f++)for(var g=0;e>g;g++){var h=jc.getTile(c.get_baseLevel(),f,g,c,null);if(null!=h&&h.isPointInTile(a,b))return h.getSurfacePointAltitude(a,b,!1)}return 0},_setupMatricesLand3d:function(){this.lighting=!1,this.space=!1,_b.cullInside=!1;var a=Uc._rotationY((this.viewCamera.lng-90)/180*Math.PI);a._multiply(Uc._rotationX(-this.viewCamera.lat/180*Math.PI)),this.set_world(a),this.set_worldBase(a.clone()),this._viewPoint=Pc.geoTo3d(this.viewCamera.lat,this.viewCamera.lng);var b=0;if(b=this._backgroundImageset.get_isMandelbrot()?4*(this.viewCamera.zoom/180)+1e-41:4*(this.viewCamera.zoom/180)+1e-6,this._fovAngle=this.viewCamera.zoom/343.774/Math.PI*180,this._fovScale=this._fovAngle/this.height*3600,null!=this.gl){this.targetAltitude=this.getScaledAltitudeForLatLong(this.viewCamera.lat,this.viewCamera.lng);var c=1+this.targetAltitude;this.targetAltitude*=this.get_nominalRadius(),this._targetHeight=this._targetHeight8e-4)h=0;else if(b>1e-5){var i=Math.min(1.903089987,wc.log10(b)+5)/1.903089987;h*=Math.max(0,1-i)}this.cameraPosition=Sc.create(Math.sin(-this.viewCamera.rotation)*Math.sin(h)*b,Math.cos(-this.viewCamera.rotation)*Math.sin(h)*b,Math.cos(h)*b),f=Sc.create(Math.sin(-this.viewCamera.rotation),Math.cos(-this.viewCamera.rotation),1e-5) }else this.cameraPosition=Sc.create(0,0,b),f=Sc.create(Math.sin(-this.viewCamera.rotation),Math.cos(-this.viewCamera.rotation),1e-4);this.cameraPosition=e.transform(this.cameraPosition),this._cameraOffset=this.cameraPosition.copy();var j=c.clone();j.invert(),this._cameraOffset=Sc._transformCoordinate(this._cameraOffset,j),f=e.transform(f),this.set_world(Uc.get_identity()),this.set_worldBase(this.get_world().clone()),this.set_view(Uc.multiplyMatrix(Uc.multiplyMatrix(c,Uc.lookAtLH(this.cameraPosition,d,f)),g)),this.set_viewBase(this.get_view().clone());var k=Sc.subtractVectors(d,this.cameraPosition);k.normalize(),k=Sc._transformCoordinate(k,c),k.normalize(),this._viewPoint=k;var l=Zb.getAdjustedPlanetRadius(this.get_solarSystemTrack());2*l>b&&!a?(this.nearPlane=.03*b,this.nearPlane=Math.max(this.nearPlane,1e-11),$b.back=1900):a?($b.back=900056,$b.back=b>900056?3*b:900056,this.nearPlane=3e-5):($b.back=b>1900?b+200:1900,this.nearPlane=bc.get_active().get_solarSystemScale()<13?Math.min(.03*b,.01):.001),this.set_projection(Uc.perspectiveFovLH(this._fovLocal,this.width/this.height,this.nearPlane,$b.back)),this.perspectiveFov=this._fovLocal,this._fovAngle=this.viewCamera.zoom/343.774/Math.PI*180,this._fovScale=this._fovAngle/this.height*3600,this._setMatrixes(),this.makeFrustum()},_setMatrixes:function(){},get_frustum:function(){return this._frustum},makeFrustum:function(){this.WV=Uc.multiplyMatrix(this.get_world(),this.get_view());var a=Uc.multiplyMatrix(this.WV,this.get_projection());this.WVP=a.clone();var b=this.get_world().clone();b.invert(),this._frustum[0].a=a.get_m14()+a.get_m11(),this._frustum[0].b=a.get_m24()+a.get_m21(),this._frustum[0].c=a.get_m34()+a.get_m31(),this._frustum[0].d=a.get_m44()+a.get_m41(),this._frustum[1].a=a.get_m14()-a.get_m11(),this._frustum[1].b=a.get_m24()-a.get_m21(),this._frustum[1].c=a.get_m34()-a.get_m31(),this._frustum[1].d=a.get_m44()-a.get_m41(),this._frustum[2].a=a.get_m14()-a.get_m12(),this._frustum[2].b=a.get_m24()-a.get_m22(),this._frustum[2].c=a.get_m34()-a.get_m32(),this._frustum[2].d=a.get_m44()-a.get_m42(),this._frustum[3].a=a.get_m14()+a.get_m12(),this._frustum[3].b=a.get_m24()+a.get_m22(),this._frustum[3].c=a.get_m34()+a.get_m32(),this._frustum[3].d=a.get_m44()+a.get_m42(),this._frustum[4].a=a.get_m13(),this._frustum[4].b=a.get_m23(),this._frustum[4].c=a.get_m33(),this._frustum[4].d=a.get_m43(),this._frustum[5].a=a.get_m14()-a.get_m13(),this._frustum[5].b=a.get_m24()-a.get_m23(),this._frustum[5].c=a.get_m34()-a.get_m33(),this._frustum[5].d=a.get_m44()-a.get_m43();for(var c=0;6>c;c++)this._frustum[c].normalize();this._frustumDirty=!1,this.WVP.scale(Sc.create(this.width/2,-this.height/2,1)),this.WVP.translate(Sc.create(this.width/2,this.height/2,0)),this._setMatrixes()},_initGL:function(){null!=this.gl&&(ic.uvMultiple=1,ic.demEnabled=!0,Ib.init(this))}};_b.create=function(a,b,c,d,e){var f=new _b;return f.a=a.copy(),f.b=b.copy(),f.c=c.copy(),f._texture=d,f.tileLevel=e,f.makeNormal(),f},_b.createWithMiter=function(a,b,c,d,e,f){var g=new _b;return g.expansionInPixels=f,g.a=a.copy(),g.b=b.copy(),g.c=c.copy(),g._texture=d,g.tileLevel=e,g.makeNormal(),g},_b._getMiterPoint=function(a,b,c,d){var e=Tc.subtractVector(b,a),f=Tc.subtractVector(c,a);e.normalize(),f.normalize();var g=Tc.create(e.x+f.x,e.y+f.y);g.normalize();var h=Tc.create(e.x-f.x,e.y-f.y),i=h.get_length()/2,j=Math.min(2,d/i);return g.extend(j),Tc.create(a.x-g.x,a.y-g.y)},_b._miterPoint=function(a,b,c,d,e,f,g){var h=c-a,i=d-b,j=e-a,k=f-b,l=Math.sqrt(h*h+i*i);l&&(h/=l,i/=l),l=Math.sqrt(j*j+k*k),l&&(j/=l,k/=l);var m=h+j,n=i+k;l=Math.sqrt(m*m+n*n),l&&(m/=l,n/=l);var o=h-j,p=i-k;l=Math.sqrt(o*o+p*p);var q=l/2,r=Math.min(2,g/q);return m*=r,n*=r,Tc.create(a-m,b-n)},_b._miterPointOut=function(a,b,c,d,e,f,g,h){var i=d-b,j=e-c,k=f-b,l=g-c,m=Math.sqrt(i*i+j*j);m&&(i/=m,j/=m),m=Math.sqrt(k*k+l*l),m&&(k/=m,l/=m);var n=i+k,o=j+l;m=Math.sqrt(n*n+o*o),m&&(n/=m,o/=m);var p=i-k,q=j-l;m=Math.sqrt(p*p+q*q);var r=m/2,s=Math.min(2,h/r);n*=s,o*=s,a.x=b-n,a.y=c-o};var gg={makeNormal:function(){var a=this.a.position.copy(),b=this.b.position.copy(),c=this.c.position.copy();a.normalize(),b.normalize(),c.normalize();var d=a.x+b.x+c.x,e=a.y+b.y+c.y,f=a.z+b.z+c.z;this.normal=Sc.create(d/3,e/3,f/3),this.normal.normalize()},_checkBackface:function(){var a=Sc.subtractVectors(this._ta,this._tb),b=Sc.subtractVectors(this._ta,this._tc),c=Sc.cross(a,b);return c.normalize(),c.z>=0},draw:function(a,b){return null!=a?(b._transformTo(this.a.position,this._ta),b._transformTo(this.b.position,this._tb),b._transformTo(this.c.position,this._tc),this._checkBackface()===_b.cullInside?void _b.trianglesCulled++:void this._drawTriangle(a,this._texture,this._ta.x,this._ta.y,this._tb.x,this._tb.y,this._tc.x,this._tc.y,this.a.tu,this.a.tv,this.b.tu,this.b.tv,this.c.tu,this.c.tv)):void 0},_drawTriangle:function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){if(!this.intersects(0,_b.width,0,_b.height,c,d,e,f,g,h))return!1;_b._miterPointOut(this._expandedS0,c,d,e,f,g,h,this.expansionInPixels),_b._miterPointOut(this._expandedS1,e,f,c,d,g,h,this.expansionInPixels),_b._miterPointOut(this._expandedS2,g,h,e,f,c,d,this.expansionInPixels),c=this._expandedS0.x,d=this._expandedS0.y,e=this._expandedS1.x,f=this._expandedS1.y,g=this._expandedS2.x,h=this._expandedS2.y,a.save(),_b.renderingOn&&(a.beginPath(),a.moveTo(c,d),a.lineTo(e,f),a.lineTo(g,h),a.closePath(),a.clip());var o=i*(n-l)-k*n+m*l+(k-m)*j,p=-(j*(g-e)-l*g+n*e+(l-n)*c)/o,q=(l*h+j*(f-h)-n*f+(n-l)*d)/o,r=(i*(g-e)-k*g+m*e+(k-m)*c)/o,s=-(k*h+i*(f-h)-m*f+(m-k)*d)/o,t=(i*(n*e-l*g)+j*(k*g-m*e)+(m*l-k*n)*c)/o,u=(i*(n*f-l*h)+j*(k*h-m*f)+(m*l-k*n)*d)/o;return a.transform(p,q,r,s,t,u),_b.renderingOn&&(a.globalAlpha=this.opacity,this.lighting<1&&(a.globalAlpha=1,a.fillStyle="Black",a.fillRect(0,0,_b.width,_b.height),a.globalAlpha=this.lighting*this.opacity),a.drawImage(b,0,0)),a.restore(),!0},intersects:function(a,b,c,d,e,f,g,h,i,j){if(e>a&&b>e&&f>c&&d>f)return!0;if(g>a&&b>g&&h>c&&d>h)return!0;if(i>a&&b>i&&j>c&&d>j)return!0;var k=4*_b.height;return this.tileLevel<4&&(Math.abs(e-g)>k||Math.abs(f-h)>k||Math.abs(i-g)>k||Math.abs(j-h)>k||Math.abs(e-i)>k||Math.abs(f-j)>k)?!1:this.lineRectangleIntersect(a,b,c,d,e,f,g,h)||this.lineRectangleIntersect(a,b,c,d,g,h,i,j)||this.lineRectangleIntersect(a,b,c,d,i,j,e,f)},lineRectangleIntersect:function(a,b,c,d,e,f,g,h){var i,j,k,l,m,n;m=(h-f)/(g-e),n=f-m*e,m>0?(i=m*a+n,j=m*b+n):(i=m*b+n,j=m*a+n),h>f?(k=f,l=h):(k=h,l=f);var o,p;return o=i>k?i:k,p=l>j?j:l,p>o&&!(c>p||o>d)}},hg={add_ready:function(a){this.__ready=ss.bindAdd(this.__ready,a)},remove_ready:function(a){this.__ready=ss.bindSub(this.__ready,a)},_fireReady:function(){null!=this.__ready?this.__ready(this,new ss.EventArgs):this._missedReady=!0},add_collectionLoaded:function(a){this.__collectionLoaded=ss.bindAdd(this.__collectionLoaded,a)},remove_collectionLoaded:function(a){this.__collectionLoaded=ss.bindSub(this.__collectionLoaded,a)},_fireCollectionLoaded:function(a){null!=this.__collectionLoaded&&this.__collectionLoaded(this,new Fd(a))},add_arrived:function(a){this.__arrived=ss.bindAdd(this.__arrived,a)},remove_arrived:function(a){this.__arrived=ss.bindSub(this.__arrived,a)},add_clicked:function(a){this.__clicked=ss.bindAdd(this.__clicked,a)},remove_clicked:function(a){this.__clicked=ss.bindSub(this.__clicked,a)},add_annotationClicked:function(a){this.__annotationClicked=ss.bindAdd(this.__annotationClicked,a)},remove_annotationClicked:function(a){this.__annotationClicked=ss.bindSub(this.__annotationClicked,a)},add_imageryLoaded:function(a){this.__imageryLoaded=ss.bindAdd(this.__imageryLoaded,a)},remove_imageryLoaded:function(a){this.__imageryLoaded=ss.bindSub(this.__imageryLoaded,a)},add_tourReady:function(a){this.__tourReady=ss.bindAdd(this.__tourReady,a)},remove_tourReady:function(a){this.__tourReady=ss.bindSub(this.__tourReady,a)},add_tourPaused:function(a){this.__tourPaused=ss.bindAdd(this.__tourPaused,a)},remove_tourPaused:function(a){this.__tourPaused=ss.bindSub(this.__tourPaused,a)},add_tourResumed:function(a){this.__tourResumed=ss.bindAdd(this.__tourResumed,a)},remove_tourResumed:function(a){this.__tourResumed=ss.bindSub(this.__tourResumed,a)},add_tourEnded:function(a){this.__tourEnded=ss.bindAdd(this.__tourEnded,a)},remove_tourEnded:function(a){this.__tourEnded=ss.bindSub(this.__tourEnded,a)},add_slideChanged:function(a){this.__slideChanged=ss.bindAdd(this.__slideChanged,a)},remove_slideChanged:function(a){this.__slideChanged=ss.bindSub(this.__slideChanged,a)},_fireTourReady:function(){null!=this.__tourReady&&this.__tourReady(this,new ss.EventArgs)},_fireTourPaused:function(){null!=this.__tourPaused&&this.__tourPaused(this,new ss.EventArgs)},_fireTourResume:function(){null!=this.__tourResumed&&this.__tourResumed(this,new ss.EventArgs)},_fireTourEnded:function(){null!=this.__tourEnded&&this.__tourEnded(this,new ss.EventArgs)},_fireImageryLoaded:function(){null!=this.__imageryLoaded&&this.__imageryLoaded(this,new ss.EventArgs)},_fireClick:function(a,b){null!=this.__clicked&&this.__clicked(this,new Dd(a,b,Ec.singleton.renderContext.viewCamera.zoom))},_fireArrived:function(a,b,c){null!=this.__arrived&&this.__arrived(this,new Dd(a,b,c))},_fireAnnotationclicked:function(a,b,c){try{null!=this.__annotationClicked&&this.__annotationClicked(this,new Ed(a,b,c))}catch(d){}},_fireSlideChanged:function(a){try{null!=this.__slideChanged&&this.__slideChanged(this,new Cd(a))}catch(b){}},endInit:function(){this._missedReady&&this._fireReady()},gotoRaDecZoom:function(a,b,c,d){null!=Ec.singleton&&Ec.singleton.gotoRADecZoom(a/15,b,6*c,d)},setBackgroundImageByName:function(a){null!=Ec.singleton&&Ec.singleton.setBackgroundImageByName(a)},setForegroundImageByName:function(a){null!=Ec.singleton&&(Ec.singleton.setForegroundImageByName(a),Ec.singleton.renderContext.viewCamera.opacity=100)},setForegroundOpacity:function(a){null!=Ec.singleton&&(Ec.singleton.renderContext.viewCamera.opacity=a)},hideUI:function(){},loadTour:function(a){null!=Ec.singleton&&Ec.singleton.playTour(a)},get_hideTourFeedback:function(){return this.hideTourFeedback},set_hideTourFeedback:function(a){return this.hideTourFeedback=a,a},playTour:function(){null!=Ec.singleton&&Ec.singleton.playCurrentTour()},stopTour:function(){null!=Ec.singleton&&Ec.singleton.stopCurrentTour()},loadImageCollection:function(a){var b=this;this._imageUrl=a,this._imageFolder=new ad,this._imageFolder.loadFromUrl(a,function(){Dc.loadImagesets(b._imageFolder),b._fireCollectionLoaded(a)})},_imageFileLoaded:function(){this._fireCollectionLoaded(this._imageUrl)},zoom:function(a){null!=Ec.singleton&&Ec.singleton.zoom(a)},getRA:function(){return null!=Ec.singleton?Ec.singleton.renderContext.get_RA():0},getDec:function(){return null!=Ec.singleton?Ec.singleton.renderContext.get_dec():0},createFolder:function(){var a=new ad;return a},createPolygon:function(a){var b=new xd;return b.set_fill(a),b},createPolyLine:function(){return new yd},createCircle:function(a){var b=new wd;return b.set_fill(a),b},addAnnotation:function(a){null!=a&&ss.canCast(a,Gc)&&null!=Ec.singleton&&Ec.singleton._addAnnotation(a)},removeAnnotation:function(a){null!=a&&null!=Ec.singleton&&Ec.singleton._removeAnnotation(a)},clearAnnotations:function(){null!=Ec.singleton&&Ec.singleton._clearAnnotations()},get_smoothAnimation:function(){return this._smoothAnimation},set_smoothAnimation:function(a){return this._smoothAnimation=a,a},get_showCaptions:function(){return this._showCaptions},set_showCaptions:function(a){return this._showCaptions=a,a},loadVOTable:function(){},get_fov:function(){return null!=Ec.singleton?Ec.singleton.renderContext.viewCamera.zoom/6:60}};bc.get_current=function(){return null==bc._active&&(bc._active=new bc),bc._active},bc.get_globalSettings=function(){return null==bc._active&&(bc._active=new bc),bc._active},bc.get_active=function(){return null==bc._active&&(bc._active=new bc),null!=bc.tourSettings?bc.tourSettings:bc._active};var ig={get_constellationFigureColor:function(){return this._constellationFigureColor},set_constellationFigureColor:function(a){return this._constellationFigureColor=a,a},get_constellationBoundryColor:function(){return this._constellationBoundryColor},set_constellationBoundryColor:function(a){return this._constellationBoundryColor=a,a},get_constellationSelectionColor:function(){return this._constellationSelectionColor},set_constellationSelectionColor:function(a){return this._constellationSelectionColor=a,a},get_showCrosshairs:function(){return this._showCrosshairs},set_showCrosshairs:function(a){return this._showCrosshairs=a,a},get_smoothPan:function(){return this._smoothPan},set_smoothPan:function(a){return this._smoothPan=a,a},get_crosshairsColor:function(){return this._crosshairsColor},set_crosshairsColor:function(a){return this._crosshairsColor=a,a},get_actualPlanetScale:function(){return this._actualPlanetScale},get_fovCamera:function(){return this._fovCamera},get_fovEyepiece:function(){return this._fovEyepiece},get_fovTelescope:function(){return this._fovTelescope},get_locationAltitude:function(){return this._locationAltitude},set_locationAltitude:function(a){return this._locationAltitude=a,a},get_locationLat:function(){return this._locationLat},set_locationLat:function(a){return this._locationLat=a,a},get_locationLng:function(){return this._locationLng},set_locationLng:function(a){return this._locationLng=a,a},get_showClouds:function(){return this._showClouds},get_showConstellationBoundries:function(){return this._showConstellationBoundries},set_showConstellationBoundries:function(a){return this._showConstellationBoundries=a,a},get_showConstellationFigures:function(){return this._showConstellationFigures},set_showConstellationFigures:function(a){return this._showConstellationFigures=a,a},get_showConstellationSelection:function(){return this._showConstellationSelection},set_showConstellationSelection:function(a){return this._showConstellationSelection=a,a},get_showEcliptic:function(){return this._showEcliptic},set_showEcliptic:function(a){return this._showEcliptic=a,a},get_showElevationModel:function(){return!1},get_showFieldOfView:function(){return this._showFiledOfView},get_showGrid:function(){return this._showGrid},set_showGrid:function(a){return this._showGrid=a,a},get_showHorizon:function(){return this._showHorizon},set_showHorizon:function(a){return this._showHorizon=a,a},get_showHorizonPanorama:function(){return this._showHorizonPanorama},get_showMoonsAsPointSource:function(){return this._showMoonsAsPointSource},get_showSolarSystem:function(){return this._showSolarSystem},get_localHorizonMode:function(){return this._localHorizonMode},set_localHorizonMode:function(a){return this._localHorizonMode=a,a},get_galacticMode:function(){return this._galacticMode},set_galacticMode:function(a){return this._galacticMode=a,a},get_solarSystemStars:function(){return this._solarSystemStars},set_solarSystemStars:function(a){return this._solarSystemStars=a,a},get_solarSystemMilkyWay:function(){return this._solarSystemMilkyWay},set_solarSystemMilkyWay:function(a){return this._solarSystemMilkyWay=a,a},get_solarSystemCosmos:function(){return this._solarSystemCosmos},set_solarSystemCosmos:function(a){return this._solarSystemCosmos=a,a},get_solarSystemOrbits:function(){return this._solarSystemOrbits},set_solarSystemOrbits:function(a){return this._solarSystemOrbits=a,a},get_solarSystemOverlays:function(){return this._solarSystemOverlays},set_solarSystemOverlays:function(a){return this._solarSystemOverlays=a,a},get_solarSystemLighting:function(){return this._solarSystemLighting},set_solarSystemLighting:function(a){return this._solarSystemLighting=a,a},get_solarSystemMultiRes:function(){return!0},set_solarSystemMultiRes:function(a){return this._solarSystemMultiRes=a,a},get_solarSystemScale:function(){return this._solarSystemScale},set_solarSystemScale:function(a){return this._solarSystemScale=a,a},get_showEquatorialGridText:function(){return this._showEquatorialGridText},set_showEquatorialGridText:function(a){return this._showEquatorialGridText=a,a},get_showGalacticGrid:function(){return this._showGalacticGrid},set_showGalacticGrid:function(a){return this._showGalacticGrid=a,a},get_showGalacticGridText:function(){return this._showGalacticGridText},set_showGalacticGridText:function(a){return this._showGalacticGridText=a,a},get_showEclipticGrid:function(){return this._showEclipticGrid},set_showEclipticGrid:function(a){return this._showEclipticGrid=a,a},get_showEclipticGridText:function(){return this._showEclipticGridText},set_showEclipticGridText:function(a){return this._showEclipticGridText=a,a},get_showEclipticOverviewText:function(){return this._showEclipticOverviewText},set_showEclipticOverviewText:function(a){return this._showEclipticOverviewText=a,a},get_showAltAzGrid:function(){return this._showAltAzGrid},set_showAltAzGrid:function(a){return this._showAltAzGrid=a,a},get_showAltAzGridText:function(){return this._showAltAzGridText},set_showAltAzGridText:function(a){return this._showAltAzGridText=a,a},get_showPrecessionChart:function(){return this._showPrecessionChart},set_showPrecessionChart:function(a){return this._showPrecessionChart=a,a},get_showConstellationPictures:function(){return this._showConstellationPictures},set_showConstellationPictures:function(a){return this._showConstellationPictures=a,a},get_showConstellationLabels:function(){return this._showConstellationLabels},set_showConstellationLabels:function(a){return this._showConstellationLabels=a,a},get_solarSystemCMB:function(){return this._solarSystemCMB},set_solarSystemCMB:function(a){return this._solarSystemCMB=a,a},get_solarSystemMinorPlanets:function(){return this._solarSystemMinorPlanets},set_solarSystemMinorPlanets:function(a){return this._solarSystemMinorPlanets=a,a},get_solarSystemPlanets:function(){return this._solarSystemPlanets},set_solarSystemPlanets:function(a){return this._solarSystemPlanets=a,a},get_showEarthSky:function(){return this._showEarthSky},set_showEarthSky:function(a){return this._showEarthSky=a,a},get_solarSystemMinorOrbits:function(){return this._solarSystemMinorOrbits},set_solarSystemMinorOrbits:function(a){return this._solarSystemMinorOrbits=a,a},get_constellationsEnabled:function(){return this._constellationsEnabled},set_constellationsEnabled:function(a){return this._constellationsEnabled=a,a},get_constellationFiguresFilter:function(){return this._constellationFiguresFilter},set_constellationFiguresFilter:function(a){return this._constellationFiguresFilter=a,a},get_constellationBoundariesFilter:function(){return this._constellationBoundariesFilter},set_constellationBoundariesFilter:function(a){return this._constellationBoundariesFilter=a,a},get_constellationNamesFilter:function(){return this._constellationNamesFilter},set_constellationNamesFilter:function(a){return this._constellationNamesFilter=a,a},get_constellationArtFilter:function(){return this._constellationArtFilter},set_constellationArtFilter:function(a){return this._constellationArtFilter=a,a},get_showSkyOverlays:function(){return this._showSkyOverlays},set_showSkyOverlays:function(a){return this._showSkyOverlays=a,a},get_showConstellations:function(){return this._showConstellations},set_showConstellations:function(a){return this._showConstellations=a,a},get_showSkyNode:function(){return this._showSkyNode},set_showSkyNode:function(a){return this._showSkyNode=a,a},get_showSkyGrids:function(){return this._showSkyGrids},set_showSkyGrids:function(a){return this._showSkyGrids=a,a},get_showSkyOverlaysIn3d:function(){return this._showSkyOverlaysIn3d},set_showSkyOverlaysIn3d:function(a){return this._showSkyOverlaysIn3d=a,a},get_earthCutawayView:function(){return this._earthCutawayView},set_earthCutawayView:function(a){return this._earthCutawayView=a,a},get_showISSModel:function(){return this._showISSModel},set_showISSModel:function(a){return this._showISSModel=a,a},get_milkyWayModel:function(){return this._milkyWayModel},set_milkyWayModel:function(a){return this._milkyWayModel=a,a},get_minorPlanetsFilter:function(){return this._minorPlanetsFilter},set_minorPlanetsFilter:function(a){return this._minorPlanetsFilter=a,a},get_planetOrbitsFilter:function(){return this._planetOrbitsFilter},set_planetOrbitsFilter:function(a){return this._planetOrbitsFilter=a,a},getSetting:function(){return new mc(!1,1,!1,null)}},jg={add:function(a){this.items.push(a)},draw:function(a,b,c){if(null==a.gl)for(var d=Sc._transformCoordinate(a.get_viewPoint(),this.viewTransform),e=this.height/a.get_fovAngle()*a.height/180,f=ss.enumerate(this.items);f.moveNext();){var g=f.current,h=a.WVP.transform(g.center);if(!(h.z<0||Sc.dot(d,g.center)<.55)){var i=a.WVP.transform(g.top),j=Math.atan2(h.x-i.x,h.y-i.y),k=a.device;k.save(),k.translate(h.x,h.y),k.rotate(-j),k.globalAlpha=b,k.fillStyle=c.toString(),k.font="normal normal "+Math.round(1.2*e).toString()+"px Arial",k.textBaseline="top";var l=k.measureText(g.text);k.fillText(g.text,-l.width/2,-e/2),k.restore()}}else{if((null==this._glyphCache||this._glyphCache.get_version()>this._glyphVersion)&&this.prepareBatch(),!this._glyphCache.ready)return;Jb.use(a,this._vertexBuffer.vertexBuffer,this._glyphCache.get_texture().texture2d),a.gl.drawArrays(4,0,this._vertexBuffer.count)}},prepareBatch:function(){if(null==this._glyphCache&&(this._glyphCache=ec.getCache(this.height)),this._glyphCache.ready){this._textObject.text="",this._textObject.fontSize=.5*this.height;for(var a=[],b=ss.enumerate(this.items);b.moveNext();){var c=b.current,d=c.text,e=Tc.create(1e3,100),f=.6666;c.width=e.x*c.scale*f,c.height=e.y*c.scale*f;for(var g=0,h=this._textObject.fontSize/128,i=d.length,j=0;i>j;j++){var k=this._glyphCache.getGlyphItem(d.substr(j,1)),l=xc.create(g*c.scale*f,0*c.scale*f,k.extents.x*h*c.scale*f,k.extents.y*h*c.scale*f);g+=k.extents.x*h,c.addGlyphPoints(a,k.size,l,k.uvRect)}}this._vertCount=a.length,this._vertexBuffer=new vb(this._vertCount);for(var m=this._vertexBuffer.lock(),j=0;jf;f++)e[f]=new Qc;var g=Sc.cross(this.center,this.up),h=Sc.cross(this.up,this.center);g.normalize(),h.normalize(),this.up.normalize();var i=Sc.cross(this.center,h);i.normalize(),this.alignment?1===this.alignment&&(g.multiply(2*-c.get_left()),h.multiply(2*c.get_right())):(g.multiply(this.width-2*c.get_left()),h.multiply(this.width-(2*this.width-2*c.get_right())));var j=i.copy(),k=Sc.subtractVectors(Sc.get_empty(),i);j.multiply(this.height-2*c.get_top()),k.multiply(this.height-(2*this.height-2*c.get_bottom()));var l=this.center.copy();l.add(j),this.sky?l.add(g):l.subtract(g);var m=this.center.copy();m.add(j),this.sky?m.add(h):m.subtract(h);var n=this.center.copy();this.sky?n.add(g):n.subtract(g),n.add(k);var o=this.center.copy();if(this.sky?o.add(h):o.subtract(h),o.add(k),e[0].position=l.copy(),e[0].tu=d.get_left(),e[0].tv=d.get_top(),e[2].tu=d.get_left(),e[2].tv=d.get_bottom(),e[2].position=n.copy(),e[1].tu=d.get_right(),e[1].tv=d.get_top(),e[1].position=m.copy(),e[3].tu=d.get_right(),e[3].tv=d.get_bottom(),e[3].position=o.copy(),e[5].tu=d.get_right(),e[5].tv=d.get_top(),e[5].position=m.copy(),e[4].tu=d.get_left(),e[4].tv=d.get_bottom(),e[4].position=n.copy(),this.rotation||this.tilt||this.bank){if(!this._matInit){var p=Uc.lookAtLH(this.center,new Sc,this.up),q=p.clone();q.invert(),this._rtbMat=Uc.multiplyMatrix(Uc.multiplyMatrix(Uc.multiplyMatrix(Uc.multiplyMatrix(p,Uc._rotationZ(-this.rotation/180*Math.PI)),Uc._rotationX(-this.tilt/180*Math.PI)),Uc._rotationY(-this.bank/180*Math.PI)),q),this._matInit=!0}for(var f=0;6>f;f++)e[f].position=Sc._transformCoordinate(e[f].position,this._rtbMat)}a.push(e)}};gc.updateClock=function(){if(gc._syncToClock){var a=ss.now();if(1!==gc._timeRate){var b=a.getTime()-gc.last.getTime(),c=b*gc._timeRate;gc._offset+=c}gc.last=a;try{gc._now=new Date(a.getTime()+gc._offset)}catch(d){gc._now=new Date(1,12,25,23,59,59),gc._offset=gc._now-ss.now()}gc._now.getFullYear()>4e3&&(gc._now=new Date(4e3,12,31,23,59,59),gc._offset=gc._now-ss.now()),gc._now.getFullYear()<1&&(gc._now=new Date(0,12,25,23,59,59),gc._offset=gc._now-ss.now())}},gc.getTimeForFutureTime=function(a){try{if(gc._syncToClock){var b=new Date(gc.get_now().getTime()+1e3*a*gc._timeRate);return b}return gc.get_now()}catch(c){return gc.get_now()}},gc.getJNowForFutureTime=function(a){try{if(gc._syncToClock){var b=new Date(gc.get_now().getTime()+ss.truncate(1e3*a*gc._timeRate));return gc.utcToJulian(b)}return gc.utcToJulian(gc.get_now())}catch(c){return gc.utcToJulian(gc.get_now())}},gc.get_now=function(){return gc._now},gc.set_now=function(a){return gc._now=a,gc._offset=gc._now-ss.now(),gc.last=ss.now(),a},gc.syncTime=function(){gc._offset=0,gc._now=ss.now(),gc._syncToClock=!0},gc.get_jNow=function(){return gc.utcToJulian(gc.get_now())},gc.get_syncToClock=function(){return gc._syncToClock},gc.set_syncToClock=function(a){return gc._syncToClock!==a&&(gc._syncToClock=a,a?(gc.last=ss.now(),gc._offset=gc._now-ss.now()):gc._now=new Date(ss.now().getTime()+gc._offset)),a},gc.get_timeRate=function(){return gc._timeRate},gc.set_timeRate=function(a){return gc._timeRate=a,a},gc.get_altitude=function(){return gc._altitude},gc.set_altitude=function(a){return gc._altitude=a,a},gc.get_location=function(){return gc._location=Pc.fromLatLng(bc.get_active().get_locationLat(),bc.get_active().get_locationLng()),gc._altitude=bc.get_active().get_locationAltitude(),gc._location},gc.set_location=function(a){return bc.get_globalSettings().get_locationLat()!==a.get_lat()&&bc.get_globalSettings().set_locationLat(a.get_lat()),bc.get_globalSettings().get_locationLng()!==a.get_lng()&&bc.get_globalSettings().set_locationLng(a.get_lng()),gc._location=a,a},gc._twoLineDateToJulian=function(a){var b=parseInt(a.substring(0,1))<6,c=parseInt((b?" 20":"19")+a.substring(0,2)),d=parseFloat(a.substring(2,3)),e=parseFloat(a.substr(5)),f=new Date(c,0,1,0,0);return gc.utcToJulian(f)+(d-1+e)},gc.utcToJulian=function(a){var b=a.getUTCFullYear(),c=a.getUTCMonth()+1,d=a.getUTCDate(),e=a.getUTCHours(),f=a.getUTCMinutes(),g=a.getUTCSeconds()+a.getUTCMilliseconds()/1e3,h=d+e/24+f/1440+g/86400;return tb.getJulianDay(b,c,h)},gc.dateToJD=function(a,b,c,d){var e=a,f=b;3>f&&(e-=1,f+=12);var g=0,h=0;return d&&(g=ss.truncate(e/100),h=2-g+ss.truncate(g/4)),ss.truncate(365.25*(e+4716))+ss.truncate(30.6001*(f+1))+c+h-1524.5};var ng={},og={get_name:function(){return"HIP"+this.id},get_coordinates:function(){return Pc.fromRaDec(this.RA,this.dec)},get_asPlace:function(){var a=hd.create(this.get_name(),this.dec,this.RA,1,Lc.containment.findConstellationForPoint(this.RA,this.dec),4,-1);return a.set_magnitude(this.magnitude),a.set_distance(this.distance),a}};ic.getFrustumList=function(){try{return ic.frustumList}catch(a){return null}},ic.get_subDivisions=function(){return 32};var pg={getIndexBuffer:function(a){return this._indexBuffers[a]},isPointInTile:function(){return!1},getSurfacePointAltitude:function(){return 0},makeTexture:function(){if(null!=ic.prepDevice)try{this.texture2d=ic.prepDevice.createTexture(),ic.prepDevice.bindTexture(3553,this.texture2d),ic.prepDevice.texParameteri(3553,10242,33071),ic.prepDevice.texParameteri(3553,10243,33071),ic.prepDevice.texImage2D(3553,0,6408,6408,5121,this.texture),ic.prepDevice.texParameteri(3553,10241,9985),ic.prepDevice.generateMipmap(3553),ic.prepDevice.bindTexture(3553,null)}catch(a){this.errored=!0}},addVertex:function(a,b,c){return a[b++]=c.position.x,a[b++]=c.position.y,a[b++]=c.position.z,a[b++]=c.tu,a[b++]=c.tv,b},geoTo3dWithAlt:function(a,b,c,d){if(a=Math.max(Math.min(90,a),-90),b=Math.max(Math.min(180,b),-180),!ic.demEnabled||null==this.demData)return this.geoTo3d(a,b,c);d&&(b-=180);var e=this.demData[this.demIndex],f=this.geoTo3dWithAltitude(a,b,e,c);return f},geoTo3dWithAltitude:function(a,b,c,d){var e=1+c/this.get__demScaleFactor(),f=Sc.create(Math.cos(b*ic.RC)*Math.cos(a*ic.RC)*e,Math.sin(a*ic.RC)*e,Math.sin(b*ic.RC)*Math.cos(a*ic.RC)*e);return d&&f.subtract(this.localCenter),f},get__demScaleFactor:function(){return this._demScaleFactor},set__demScaleFactor:function(a){return this._demScaleFactor=a,a},requestImage:function(){var a=this;if(!this.downloading&&!this.readyToRender){this.downloading=!0,this.texture=document.createElement("img");var b=this.texture;this.texture.addEventListener("load",function(){a.texReady=!0,a.downloading=!1,a.errored=!1,a.readyToRender=a.texReady&&(a.demReady||!a.demTile),a.requestPending=!1,jc.removeFromQueue(a.get_key(),!0),a.makeTexture()},!1),this.texture.addEventListener("error",function(){a.texture.hasAttribute("proxyattempt")?(a.downloading=!1,a.readyToRender=!1,a.errored=!0,a.requestPending=!1,jc.removeFromQueue(a.get_key(),!0)):(a.texture.src=wc.getProxiedUrl(a.get_URL()),a.texture.setAttribute("proxyattempt",!0))},!1),b.crossOrigin="anonymous",this.texture.src=ss.replaceString(this.get_URL(),"cdn.","www.")}},createDemFromParent:function(){return!1},_loadDemData:function(){if(null==this.demFile)return this.createDemFromParent();if(this.demData=this.demFile,1089!==this.demFile.length&&513!==this.demFile.length)return this.createDemFromParent();for(var a=0,b=ss.enumerate(this.demData);b.moveNext();){var c=b.current;a+=c}return this.demAverage/=this.demData.length,!0},requestDem:function(){var a=this;if(!this.readyToRender&&!this.demDownloading){this.demTile=!0,this.demDownloading=!0,ic.callCount++;var b=new XMLHttpRequest;b.addEventListener("load",function(){a.demReady=!0,a.demDownloading=!1,a.readyToRender=a.texReady&&(a.demReady||!a.demTile),a.requestPending=!1;try{a.demFile=new Float32Array(b.response)}catch(c){}jc.removeFromQueue(a.get_key(),!0) },!1),b.addEventListener("error",function(){a.demDownloading=!1,a.demReady=!1,a.readyToRender=!1,a.errored=!0,a.requestPending=!1,jc.removeFromQueue(a.get_key(),!0)},!1),b.open("GET",this.get_demURL(),!0),b.responseType="arraybuffer",b.send()}},draw3D:function(a,b){if(this.renderedGeneration=ic.currentRenderGeneration,ic.tilesTouched++,this.accessCount=jc.accessID++,this.errored)return!1;var c=2;if(this.inViewFrustum=!0,!this.readyToRender)return jc.addTileToQueue(this),!1;var d=!1,e=0,f=0;(this.dataset.get_mercator()||this.dataset.get_bottomsUp())&&(f=1);for(var g=0,h=!1,i=!1,j=0;2>j;j++)for(var k=0;c>k;k++)this.levell;l++)this._renderChildPart[l].get_targetState()&&this.renderPart(a,l,b/100,!1);return!0},_computeAccomidation:function(){var a=0;if(!ic.useAccomidation)return 0;var b=jc.getCachedTile(this.level,this.tileX,this.tileY+1,this.dataset,this);(null==b||b.renderedAtOrBelowGenerationh?0:Math.min(1,1*h),f.lighting=h}else f.lighting=1;f.draw(a.device,a.WVP)}else Ib.use(a,this._vertexBuffer,this.getIndexBuffer(b,this.accomidation),this.texture2d),a.gl.drawElements(4,3*this.triangleCount,5123,0)},cleanUp:function(a){if(this.readyToRender=!1,this.demData=null,this.demFile=null,this.demDownloading=!1,this.texReady=!1,this.demReady=!1,this.errored=!1,null!=this.texture&&(this.texture=null),this._renderTriangleLists=new Array(4),this.geometryCreated=!1,a&&null!=this.parent&&(this.parent.removeChild(this),this.parent=null),null!=ic.prepDevice){for(var b=ss.enumerate(this._indexBuffers);b.moveNext();){var c=b.current;ic.prepDevice.deleteBuffer(c)}this._indexBuffers=new Array(4),null!=this._vertexBuffer&&(ic.prepDevice.deleteBuffer(this._vertexBuffer),this._vertexBuffer=null),null!=this.texture2d&&(ic.prepDevice.deleteTexture(this.texture2d),this.texture2d=null)}},removeChild:function(a){for(var b=0;4>b;b++)if(this.children[b]===a)return void(this.children[b]=null)},createGeometry:function(){return ic.demEnabled&&this.demReady&&null==this.demData&&!this._loadDemData()?!1:ic.demEnabled&&null==this.demData?!1:(this.readyToRender=!0,!0)},calcSphere:function(){var a=new Array(4);a[0]=this.topLeft,a[1]=this.bottomRight,a[2]=this.topRight,a[3]=this.bottomLeft;var b=_c.findEnclosingSphere(a);this.sphereCenter=b.center,this.sphereRadius=b.radius},isTileBigEnough:function(a){var b=a.WVP;b._transformTo(this.topLeft,this._topLeftScreen),b._transformTo(this.bottomRight,this._bottomRightScreen),b._transformTo(this.topRight,this._topRightScreen),b._transformTo(this.bottomLeft,this._bottomLeftScreen);var c=this._topLeftScreen;c.subtract(this._topRightScreen);var d=c.length(),e=this._bottomLeftScreen;e.subtract(this._bottomRightScreen);var f=e.length(),g=this._bottomLeftScreen;g.subtract(this._topLeftScreen);var h=g.length(),i=this._bottomRightScreen;i.subtract(this._topRightScreen);var j=i.length(),k=Math.max(Math.max(j,h),Math.max(f,d));return 300>k?!1:(ic.deepestLevel=this.level>ic.deepestLevel?this.level:ic.deepestLevel,!0)},isTileInFrustum:function(a){this.level<2&&(!this.dataset.get_projection()||3===this.dataset.get_projection()),this.inViewFrustum=!1;for(var b=new Yc(this.sphereCenter.x,this.sphereCenter.y,this.sphereCenter.z,1),c=0;6>c;c++)if(a[c].dot(b)<-this.sphereRadius)return!1;return this.inViewFrustum=!0,!0},get_sphereRadius:function(){return this.sphereRadius},get_sphereCenter:function(){return this.sphereCenter},geoTo3d:function(a,b){if(3===this.dataset.get_dataSetType()){var c=Sc.create(-(Math.cos(b*ic.RC)*Math.cos(a*ic.RC)*this.radius),Math.sin(a*ic.RC)*this.radius,Math.sin(b*ic.RC)*Math.cos(a*ic.RC)*this.radius);return c}b-=180;var c=Sc.create(Math.cos(b*ic.RC)*Math.cos(a*ic.RC)*this.radius,Math.sin(a*ic.RC)*this.radius,Math.sin(b*ic.RC)*Math.cos(a*ic.RC)*this.radius);return c},onCreateVertexBuffer:function(){},get_dataset:function(){return this.dataset},set_dataset:function(a){return this.dataset=a,a},get_key:function(){return this.dataset.get_imageSetID().toString()+"\\"+this.level.toString()+"\\"+this.tileY.toString()+"_"+this.tileX.toString()},get_URL:function(){var a=this.dataset.get_url();if(this.dataset.get_url().indexOf("{1}")>-1)return this.dataset.get_projection()||ss.emptyString(this.dataset.get_quadTreeTileMap())?ss.format(this.dataset.get_url(),this.dataset.get_imageSetID(),this.level,this.tileX,this.tileY):(a=ss.format(this.dataset.get_url(),this.getServerID(),this.getTileID()),a.indexOf("virtualearth.net")>-1&&(a+="&n=z"),a);a=ss.replaceString(a,"{X}",this.tileX.toString()),a=ss.replaceString(a,"{Y}",this.tileY.toString()),a=ss.replaceString(a,"{L}",this.level.toString());var b=0;a.indexOf("{S:0}")>-1&&(b=0,a=ss.replaceString(a,"{S:0}","{S}")),a.indexOf("{S:1}")>-1&&(b=1,a=ss.replaceString(a,"{S:1}","{S}")),a.indexOf("{S:2}")>-1&&(b=2,a=ss.replaceString(a,"{S:2}","{S}")),a.indexOf("{S:3}")>-1&&(b=3,a=ss.replaceString(a,"{S:3}","{S}")),a.indexOf("a{S}")>-1&&(a=ss.replaceString(a,"a{S}","r{S}")),a.indexOf("h{S}")>-1&&(a=ss.replaceString(a,"h{S}","r{S}")),a.indexOf("http://r{S}.ortho.tiles.virtualearth.net")>-1&&(a=ss.replaceString(a,"http://r{S}.ortho.tiles.virtualearth.net","http://ecn.t{S}.tiles.virtualearth.net"));var c=this.getTileID(),d="";return d=c.length?c.substr(c.length-1,1):b.toString(),a=ss.replaceString(a,"{Q}",c),a=ss.replaceString(a,"{S}",d),a.indexOf("virtualearth.net")>-1&&(a+="&n=z"),a},get_demURL:function(){if(!this.dataset.get_projection()){var a="http://cdn.worldwidetelescope.org/wwtweb/demtile.aspx?q={0},{1},{2},M";ss.emptyString(this.dataset.get_demUrl())||(a=this.dataset.get_demUrl())}if(this.dataset.get_demUrl().indexOf("{1}")>-1)return ss.format(this.dataset.get_demUrl()+"&new",this.level,this.tileX,this.tileY);var b=this.dataset.get_demUrl();b=ss.replaceString(b,"{X}",this.tileX.toString()),b=ss.replaceString(b,"{Y}",this.tileY.toString()),b=ss.replaceString(b,"{L}",this.level.toString());var c=0;b.indexOf("{S:0}")>-1&&(c=0,b=ss.replaceString(b,"{S:0}","{S}")),b.indexOf("{S:1}")>-1&&(c=1,b=ss.replaceString(b,"{S:1}","{S}")),b.indexOf("{S:2}")>-1&&(c=2,b=ss.replaceString(b,"{S:2}","{S}")),b.indexOf("{S:3}")>-1&&(c=3,b=ss.replaceString(b,"{S:3}","{S}"));var d=this.getTileID(),e="";return e=d.length?d.substr(d.length-1,1):c.toString(),b=ss.replaceString(b,"{Q}",d),b=ss.replaceString(b,"{S}",e)},getServerID:function(){var a=(1&this.tileX)+((1&this.tileY)<<1);return a},getTileID:function(){if(null!=this._tileId)return this._tileId;var a=this.level,b=this.tileX,c=this.tileY;1===this.dataset.get_projection()&&a++;var d=this.dataset.get_quadTreeTileMap();if(ss.emptyString(d))return this._tileId="0",this._tileId;for(var e=new ss.StringBuilder,f=a;f>0;--f){var g=1<0&&jc.openThreads>0;){for(var b=1e5,c=!1,d=null,e=1e3,f=ss.enumerate(ss.keys(jc._queue));f.moveNext();){var g=f.current,h=jc._queue[g];if(!h.requestPending&&h.inViewFrustum){var i=Sc.makeCopy(h.get_sphereCenter());i._transformByMatrics(a.get_world()),i.subtract(a.space?Sc.create(0,0,-1):a.cameraPosition);var j=Math.max(0,i.length()-h.get_sphereRadius()),k=2===h.get_dataset().get_projection()||5===h.get_dataset().get_projection();b>j&&(!c||k)&&(b=j,d=h.get_key(),e=h.level,c=k)}}if(null==d)return;var l=jc._queue[d];l.requestPending=!0,jc.openThreads--,jc.openThreads<0&&(jc.openThreads=0),l.requestImage(),l.get_dataset().get_elevationModel()&&l.requestDem()}},jc.addTileToQueue=function(a){var b;return b=256,a.downloading||a.readyToRender||(ss.keyExists(jc._queue,a.get_key())?jc._queue[a.get_key()].requestHits+=b:(a.requestHits=b,jc._queue[a.get_key()]=a)),!0},jc.removeFromQueue=function(a,b){if(b){var c=jc._queue[a];null!=c&&(c.requestPending=!1,delete jc._queue[c.get_key()]),jc.openThreads++}delete jc._queue[a]},jc.clearCache=function(){ss.clearKeys(jc._tiles)},jc.purgeQueue=function(){ss.clearKeys(jc._queue)},jc.purgeLRU=function(){if(!(ss.keyCount(jc._tiles)jc.maxReadyToRenderSize){b.sort(function(a,b){return b.accessCountg)break;e.cleanUp(!1),g--}}if(ss.keyCount(jc._tiles)jc.maxTileCacheSize){a.sort(function(a,b){return b.accessCount20&&(g=20);for(var i=ss.enumerate(a);i.moveNext();){var e=i.current;if(1>g)break;e.cleanUp(!0),delete jc._tiles[e.get_key()],g--}}}catch(j){}finally{}}},jc.decimateQueue=function(){for(var a=[],b=ss.enumerate(ss.keys(jc._queue));b.moveNext();){var c=b.current,d=jc._queue[c];if(!d.requestPending){d.requestHits=d.requestHits/2;try{d.requestHits<2?a.push(d):d.inViewFrustum||a.push(d)}catch(e){}}}for(var f=ss.enumerate(a);f.moveNext();){var d=f.current;delete jc._queue[d.get_key()]}};var qg={};kc.lineToPoint=function(a,b,c){var d=Sc.subtractVectors(b,a),e=Sc.subtractVectors(c,a),f=Sc.cross(e,d).length()/d.length();return f},kc.getUVFromInnerPoint=function(a,b,c,d,e){a.normalize(),b.normalize(),c.normalize(),d.normalize(),e.normalize();var f=kc.lineToPoint(a,b,e),g=kc.lineToPoint(c,d,e),h=f+g,i=kc.lineToPoint(b,d,e),j=kc.lineToPoint(a,c,e),k=i+j;return Tc.create(j/k,f/h)};var rg={};lc._fromXml=function(a){var b=new lc;if(null!=a.attributes.getNamedItem("ID")&&(b.id=a.attributes.getNamedItem("ID").nodeValue),null!=a.attributes.getNamedItem("TourUrl")&&(b._tourUrl=a.attributes.getNamedItem("TourUrl").nodeValue),null!=a.attributes.getNamedItem("Title")&&(b.title=a.attributes.getNamedItem("Title").nodeValue),null!=a.attributes.getNamedItem("Description")&&(b.description=a.attributes.getNamedItem("Description").nodeValue),null!=a.attributes.getNamedItem("Classification"))switch(a.attributes.getNamedItem("Classification").nodeValue){case"Star":b.classification=1;break;case"Supernova":b.classification=2;break;case"BlackHole":b.classification=4;break;case"NeutronStar":b.classification=8;break;case"DoubleStar":b.classification=16;break;case"MultipleStars":b.classification=32;break;case"Asterism":b.classification=64;break;case"Constellation":b.classification=128;break;case"OpenCluster":b.classification=256;break;case"GlobularCluster":b.classification=512;break;case"NebulousCluster":b.classification=1024;break;case"Nebula":b.classification=2048;break;case"EmissionNebula":b.classification=4096;break;case"PlanetaryNebula":b.classification=8192;break;case"ReflectionNebula":b.classification=16384;break;case"DarkNebula":b.classification=32768;break;case"GiantMolecularCloud":b.classification=65536;break;case"SupernovaRemnant":b.classification=131072;break;case"InterstellarDust":b.classification=262144;break;case"Quasar":b.classification=524288;break;case"Galaxy":b.classification=1048576;break;case"SpiralGalaxy":b.classification=2097152;break;case"IrregularGalaxy":b.classification=4194304;break;case"EllipticalGalaxy":b.classification=8388608;break;case"Knot":b.classification=16777216;break;case"PlateDefect":b.classification=33554432;break;case"ClusterOfGalaxies":b.classification=67108864;break;case"OtherNGC":b.classification=134217728;break;case"Unidentified":b.classification=268435456;break;case"SolarSystem":b.classification=536870912;break;case"Unfiltered":b.classification=1073741823;break;case"Stellar":b.classification=63;break;case"StellarGroupings":b.classification=2032;break;case"Nebulae":b.classification=523264;break;case"Galactic":b.classification=133693440;break;case"Other":b.classification=436207616}return null!=a.attributes.getNamedItem("AuthorEmail")&&(b.authorEmail=a.attributes.getNamedItem("AuthorEmail").nodeValue),null!=a.attributes.getNamedItem("Author")&&(b.author=a.attributes.getNamedItem("Author").nodeValue),null!=a.attributes.getNamedItem("AuthorURL")&&(b.authorURL=a.attributes.getNamedItem("AuthorURL").nodeValue),null!=a.attributes.getNamedItem("AuthorImageUrl")&&(b.authorImageUrl=a.attributes.getNamedItem("AuthorImageUrl").nodeValue),null!=a.attributes.getNamedItem("AverageRating")&&(b.averageRating=parseFloat(a.attributes.getNamedItem("AverageRating").nodeValue)),null!=a.attributes.getNamedItem("LengthInSecs")&&(b.lengthInSecs=parseFloat(a.attributes.getNamedItem("LengthInSecs").nodeValue)),null!=a.attributes.getNamedItem("OrganizationUrl")&&(b.organizationUrl=a.attributes.getNamedItem("OrganizationUrl").nodeValue),null!=a.attributes.getNamedItem("OrganizationName")&&(b.organizationName=a.attributes.getNamedItem("OrganizationName").nodeValue),null!=a.attributes.getNamedItem("RelatedTours")&&(b.relatedTours=a.attributes.getNamedItem("RelatedTours").nodeValue),null!=a.attributes.getNamedItem("Keywords")&&(b.keywords=a.attributes.getNamedItem("Keywords").nodeValue),b};var sg={get_name:function(){return this.title},get_thumbnail:function(){return this._thumbnail},set_thumbnail:function(a){return this._thumbnail=a,a},get_thumbnailUrl:function(){return ss.emptyString(this._thumbnailUrlField)?ss.format("http://cdn.worldwidetelescope.org/wwtweb/GetTourThumbnail.aspx?GUID={0}",this.id):this._thumbnailUrlField},set_thumbnailUrl:function(a){return this._thumbnailUrlField=a,a},get_tourUrl:function(){return ss.emptyString(this._tourUrl)?ss.format("http://cdn.worldwidetelescope.org/wwtweb/GetTour.aspx?GUID={0}",this.id):this._tourUrl},set_tourUrl:function(a){return this._tourUrl=a,a},get_bounds:function(){return this._bounds},set_bounds:function(a){return this._bounds=a,a},get_isImage:function(){return!1},get_isTour:function(){return!0},get_isFolder:function(){return!1},get_isCloudCommunityItem:function(){return!1},get_readOnly:function(){return!1},get_children:function(){return[]}},tg={};nc._fromXml=function(a,b){if(null==b.attributes)return null;if(null==b.attributes.getNamedItem("Type"))return null;var c=b.attributes.getNamedItem("Type").nodeValue,d=ss.replaceString(c,"TerraViewer.",""),e=null;switch(d){case"AudioOverlay":e=new ud;break;case"BitmapOverlay":e=new rd;break;case"FlipBookOverlay":e=new vd;break;case"ShapeOverlay":e=new td;break;case"TextOverlay":e=new sd;break;default:return null}return e._owner=a,e._initOverlayFromXml(b),e};var ug={get_name:function(){return this._name},set_name:function(a){return this._name=a,a},get_owner:function(){return this._owner},set_owner:function(a){return this._owner=a,a},get_url:function(){return this._url},set_url:function(a){return this._url=a,a},get_linkID:function(){return this._linkID},set_linkID:function(a){return this._linkID=a,a},play:function(){},pause:function(){},stop:function(){},seek:function(){},draw3D:function(){},cleanUp:function(){null!=this.texture&&(this.texture=null)},initializeTexture:function(){},cleanUpGeometry:function(){this.currentRotation=0},initiaizeGeometry:function(){},updateRotation:function(){},get_animate:function(){return this._animate},set_animate:function(a){return this._animate!==a&&(this._animate=a,this._animate?(this._endX=this._x,this._endY=this._y,this._endRotationAngle=this._rotationAngle,this._endColor=this._color,this._endWidth=this._width,this._endHeight=this._height,this.cleanUpGeometry()):(this._endX=this._x=this.get_x(),this._endY=this._y=this.get_y(),this._endRotationAngle=this._rotationAngle=this.get_rotationAngle(),this._endColor=this._color=this.get_color(),this._endWidth=this._width=this.get_width(),this._endHeight=this._height=this.get_height(),this.cleanUpGeometry(),this._tweenFactor=0)),a},get_tweenFactor:function(){return this._tweenFactor},set_tweenFactor:function(a){return this._animate?this._tweenFactor!==a&&(this._tweenFactor=a,this.cleanUpGeometry()):this._tweenFactor=0,a},get_anchor:function(){return this._anchor},set_anchor:function(a){return this._anchor=a,a},get_position:function(){return Tc.create(this.get_x(),this.get_y())},set_position:function(a){return this.set_x(a.x),this.set_y(a.y),a},get_x:function(){return this._x*(1-this._tweenFactor)+this._endX*this._tweenFactor},set_x:function(a){return this._tweenFactor<.5?this._x!==a&&(this._x=a,this.cleanUpGeometry()):this._endX!==a&&(this._endX=a,this.cleanUpGeometry()),a},get_y:function(){return this._y*(1-this._tweenFactor)+this._endY*this._tweenFactor},set_y:function(a){return this._tweenFactor<.5?this._y!==a&&(this._y=a,this.cleanUpGeometry()):this._endY!==a&&(this._endY=a,this.cleanUpGeometry()),a},get_width:function(){return this._width*(1-this._tweenFactor)+this._endWidth*this._tweenFactor},set_width:function(a){return 5>a&&a&&(a=5),this._tweenFactor<.5?this._width!==a&&(this._width=a,this.cleanUpGeometry()):this._endWidth!==a&&(this._endWidth=a,this.cleanUpGeometry()),a},get_height:function(){return this._height*(1-this._tweenFactor)+this._endHeight*this._tweenFactor},set_height:function(a){return 5>a&&a&&(a=5),this._tweenFactor<.5?this._height!==a&&(this._height=a,this.cleanUpGeometry()):this._endHeight!==a&&(this._endHeight=a,this.cleanUpGeometry()),a},get_color:function(){var a=ss.truncate(this._color.r*(1-this._tweenFactor)+this._endColor.r*this._tweenFactor),b=ss.truncate(this._color.g*(1-this._tweenFactor)+this._endColor.g*this._tweenFactor),c=ss.truncate(this._color.b*(1-this._tweenFactor)+this._endColor.b*this._tweenFactor),d=ss.truncate(this._color.a*(1-this._tweenFactor)+this._endColor.a*this._tweenFactor);return Jc.fromArgb(Math.max(0,Math.min(255,d)),Math.max(0,Math.min(255,a)),Math.max(0,Math.min(255,b)),Math.max(0,Math.min(255,c)))},set_color:function(a){return this._tweenFactor<.5?this._color!==a&&(this._color=a,this.cleanUpGeometry()):this._endColor!==a&&(this._endColor=a,this.cleanUpGeometry()),a},get_opacity:function(){return this.get_color().a/255},set_opacity:function(a){var b=this.get_color();return this.set_color(Jc.fromArgb(Math.min(255,ss.truncate(255*a)),b.r,b.g,b.b)),this._opacity=a,a},get_rotationAngle:function(){return this._rotationAngle*(1-this._tweenFactor)+this._endRotationAngle*this._tweenFactor},set_rotationAngle:function(a){return this._tweenFactor<.5?this._rotationAngle!==a&&(this._rotationAngle=a,this.cleanUpGeometry()):this._endRotationAngle!==a&&(this._endRotationAngle=a,this.cleanUpGeometry()),a},hitTest:function(){return!1},get_bounds:function(){return this._bounds},set_bounds:function(a){return this._bounds=a,a},get_interpolationType:function(){return this._interpolationType},set_interpolationType:function(a){return this._interpolationType=a,a},_initOverlayFromXml:function(a){if(this.id=a.attributes.getNamedItem("Id").nodeValue,this.set_name(a.attributes.getNamedItem("Name").nodeValue),this._x=parseFloat(a.attributes.getNamedItem("X").nodeValue),this._y=parseFloat(a.attributes.getNamedItem("Y").nodeValue),this._width=parseFloat(a.attributes.getNamedItem("Width").nodeValue),this._height=parseFloat(a.attributes.getNamedItem("Height").nodeValue),this._rotationAngle=parseFloat(a.attributes.getNamedItem("Rotation").nodeValue),this._color=Jc.load(a.attributes.getNamedItem("Color").nodeValue),null!=a.attributes.getNamedItem("Url")&&this.set_url(a.attributes.getNamedItem("Url").nodeValue),null!=a.attributes.getNamedItem("LinkID")&&this.set_linkID(a.attributes.getNamedItem("LinkID").nodeValue),null!=a.attributes.getNamedItem("Animate")&&(this._animate=ss["boolean"](a.attributes.getNamedItem("Animate").nodeValue),this._animate&&(this._endX=parseFloat(a.attributes.getNamedItem("EndX").nodeValue),this._endY=parseFloat(a.attributes.getNamedItem("EndY").nodeValue),this._endColor=Jc.load(a.attributes.getNamedItem("EndColor").nodeValue),this._endWidth=parseFloat(a.attributes.getNamedItem("EndWidth").nodeValue),this._endHeight=parseFloat(a.attributes.getNamedItem("EndHeight").nodeValue),this._endRotationAngle=parseFloat(a.attributes.getNamedItem("EndRotation").nodeValue),null!=a.attributes.getNamedItem("InterpolationType"))))switch(a.attributes.getNamedItem("InterpolationType").nodeValue){case"Linear":this.set_interpolationType(0);break;case"EaseIn":this.set_interpolationType(1);break;case"EaseOut":this.set_interpolationType(2);break;case"EaseInOut":this.set_interpolationType(3);break;case"Exponential":this.set_interpolationType(4);break;case"Default":this.set_interpolationType(5)}this.initializeFromXml(a)},initializeFromXml:function(){},toString:function(){return this.get_name()}};oc.create=function(a,b,c,d,e,f,g,h,i){var j=new oc;return j.text=a,j.bold=b,j.italic=c,j.underline=d,j.fontSize=e,j.fontName=f,j.forgroundColor=g,j.backgroundColor=h,j.borderStyle=i,j},oc._fromXml=function(a){var b=new oc;if(b.text=wc.getInnerText(a),b.borderStyle=0,b.bold=ss["boolean"](a.attributes.getNamedItem("Bold").nodeValue),b.italic=ss["boolean"](a.attributes.getNamedItem("Italic").nodeValue),b.underline=ss["boolean"](a.attributes.getNamedItem("Underline").nodeValue),b.fontSize=parseFloat(a.attributes.getNamedItem("FontSize").nodeValue),b.fontName=a.attributes.getNamedItem("FontName").nodeValue,b.forgroundColor=Jc.load(a.attributes.getNamedItem("ForgroundColor").nodeValue),b.backgroundColor=Jc.load(a.attributes.getNamedItem("BackgroundColor").nodeValue),null!=a.attributes.getNamedItem("BorderStyle"))switch(a.attributes.getNamedItem("BorderStyle").nodeValue){case"None":b.borderStyle=0;break;case"Tight":b.borderStyle=1;break;case"Small":b.borderStyle=2;break;case"Medium":b.borderStyle=3;break;case"Large":b.borderStyle=4}return b};var vg={toString:function(){return this.text}};pc.get_baseWorkingDirectory=function(){return""},pc.fromUrl=function(a,b){var c=new pc;return c.url=a,c._callMe=b,c._webFile=new Cc(wc.getTourComponent(a,"master")),c._webFile.onStateChange=ss.bind("_loadXmlDocument",c),c._webFile.send(),c};var wg={get_tourDirty:function(){return this._tourDirty>0},set_tourDirty:function(a){return a?this._tourDirty++:this._tourDirty=0,a},get_workingDirectory:function(){return ss.emptyString(this._workingDirectory)&&(this._workingDirectory=pc.get_baseWorkingDirectory()+this._id+"\\"),this._workingDirectory},set_workingDirectory:function(a){return this._workingDirectory=a,a},_loadXmlDocument:function(){2===this._webFile.get_state()?alert(this._webFile.get_message()):1===this._webFile.get_state()&&(this.fromXml(this._webFile.getXml()),this._callMe())},fromXml:function(a){var b=wc.selectSingleNode(a,"Tour");switch(this._id=b.attributes.getNamedItem("ID").nodeValue,this.set_title(b.attributes.getNamedItem("Title").nodeValue),this.set_author(b.attributes.getNamedItem("Author").nodeValue),null!=b.attributes.getNamedItem("Descirption")&&this.set_description(b.attributes.getNamedItem("Descirption").nodeValue),null!=b.attributes.getNamedItem("AuthorEmail")&&(this._authorEmail=b.attributes.getNamedItem("AuthorEmail").nodeValue),null!=b.attributes.getNamedItem("Keywords")&&this.set_keywords(b.attributes.getNamedItem("Keywords").nodeValue),null!=b.attributes.getNamedItem("OrganizationName")&&this.set_orgName(b.attributes.getNamedItem("OrganizationName").nodeValue),this._organizationUrl=b.attributes.getNamedItem("OrganizationUrl").nodeValue,b.attributes.getNamedItem("UserLevel").nodeValue){case"Beginner":this._level=0;break;case"Intermediate":this._level=1;break;case"Advanced":this._level=2;break;case"Educator":this._level=3;break;case"Professional":this._level=4}switch(b.attributes.getNamedItem("Classification").nodeValue){case"Star":this._type=1;break;case"Supernova":this._type=2;break;case"BlackHole":this._type=4;break;case"NeutronStar":this._type=8;break;case"DoubleStar":this._type=16;break;case"MultipleStars":this._type=32;break;case"Asterism":this._type=64;break;case"Constellation":this._type=128;break;case"OpenCluster":this._type=256;break;case"GlobularCluster":this._type=512;break;case"NebulousCluster":this._type=1024;break;case"Nebula":this._type=2048;break;case"EmissionNebula":this._type=4096;break;case"PlanetaryNebula":this._type=8192;break;case"ReflectionNebula":this._type=16384;break;case"DarkNebula":this._type=32768;break;case"GiantMolecularCloud":this._type=65536;break;case"SupernovaRemnant":this._type=131072;break;case"InterstellarDust":this._type=262144;break;case"Quasar":this._type=524288;break;case"Galaxy":this._type=1048576;break;case"SpiralGalaxy":this._type=2097152;break;case"IrregularGalaxy":this._type=4194304;break;case"EllipticalGalaxy":this._type=8388608;break;case"Knot":this._type=16777216;break;case"PlateDefect":this._type=33554432;break;case"ClusterOfGalaxies":this._type=67108864;break;case"OtherNGC":this._type=134217728;break;case"Unidentified":this._type=268435456;break;case"SolarSystem":this._type=536870912;break;case"Unfiltered":this._type=1073741823;break;case"Stellar":this._type=63;break;case"StellarGroupings":this._type=2032;break;case"Nebulae":this._type=523264;break;case"Galactic":this._type=133693440;break;case"Other":this._type=436207616}this._taxonomy=b.attributes.getNamedItem("Taxonomy").nodeValue;for(var c=wc.selectSingleNode(b,"TourStops"),d=ss.enumerate(c.childNodes);d.moveNext();){var e=d.current;"TourStop"===e.nodeName&&this.addTourStop(sc._fromXml(this,e))}var f=wc.selectSingleNode(b,"ReferenceFrames");if(null!=f){for(var g=ss.enumerate(f.childNodes);g.moveNext();){var h=g.current;if("ReferenceFrame"===h.nodeName){var i=new Vb;if(i.initializeFromXml(h),!ss.keyExists(Pb.get_allMaps(),i.name)){var j=new Qb(i.name,18);j.frame=i,j.loadedFromTour=!0,Pb.get_allMaps()[i.name]=j}}}Pb.connectAllChildren(),Pb.loadTree()}var k=wc.selectSingleNode(b,"Layers");if(null!=k){for(var l=ss.enumerate(k.childNodes);l.moveNext();){var m=l.current;if("Layer"===m.nodeName){var n=(new Nb).fromXml(m,!0);if(null!=n){var o=ss.format("{0}.txt",n.id.toString());ss.keyExists(Pb.get_layerList(),n.id)&&Pb.deleteLayerByID(n.id,!0,!1);try{n.loadedFromTour=!0,n.loadData(this.getFileStream(o)),Pb.add(n,!1)}catch(p){}}}}Pb.loadTree()}this._tourDirty=0},get_tagId:function(){return this._tagId},set_tagId:function(a){return this._tagId=a,a},get_authorThumbnailFilename:function(){return"Author.Png"},get_tourThumbnailFilename:function(){return this._representativeThumbnailTourstop-1?this.get_tourStops().splice(this._currentTourstopIndex,0,a):(this.get_tourStops().push(a),this._currentTourstopIndex=this._tourStops.length-1),this.set_tourDirty(!0)},insertAfterTourStop:function(a){a.set_owner(this),this._currentTourstopIndex>-1||this._currentTourstopIndexthis._tourStops.length-1&&this._currentTourstopIndex--,this.set_tourDirty(!0)},_calculateRunTime:function(){for(var a=0,b=0;b0)switch(this._tourStops[b].get__transition()){case 0:if(null==this._tourStops[b].get_target().get_backgroundImageset()||this._tourStops[b-1].get_target().get_backgroundImageset().get_dataSetType()===this._tourStops[b].get_target().get_backgroundImageset().get_dataSetType()&&(4!==this._tourStops[b-1].get_target().get_backgroundImageset().get_dataSetType()||this._tourStops[b-1].get_target().get_target()===this._tourStops[b].get_target().get_target())){var c=null==this._tourStops[b-1].get_endTarget()?this._tourStops[b-1].get_target().get_camParams():this._tourStops[b-1].get_endTarget().get_camParams(),d=fd.create(c,this._tourStops[b].get_target().get_camParams());a+=1e3*d.get_moveTime()}break;case 1:break;case 2:break;case 3:}return ss.truncate(a)},elapsedTimeTillTourstop:function(a){if(!a&&a>=this._tourStops.length)return 0;for(var b=0,c=0;a>c;c++)if(b+=this._tourStops[c].get_duration(),c>0)switch(this._tourStops[c].get__transition()){case 0:var d=null==this._tourStops[c-1].get_endTarget()?this._tourStops[c-1].get_target().get_camParams():this._tourStops[c-1].get_endTarget().get_camParams();if(this._tourStops[c-1].get_target().get_backgroundImageset().get_dataSetType()===this._tourStops[c].get_target().get_backgroundImageset().get_dataSetType()&&(4!==this._tourStops[c-1].get_target().get_backgroundImageset().get_dataSetType()||this._tourStops[c-1].get_target().get_target()===this._tourStops[c].get_target().get_target())){var e=fd.create(d,this._tourStops[c].get_target().get_camParams());b+=1e3*e.get_moveTime()}break;case 1:break;case 2:break;case 3:}return b/1e3},elapsedTimeSinceLastMaster:function(a){var b=null;if(!a&&a>=this._tourStops.length)return null;for(var c=0,d=0;a>d;d++)if(this._tourStops[d].get_masterSlide()&&(c=0,b=this._tourStops[d]),c+=this._tourStops[d].get_duration(),d>0)switch(this._tourStops[d].get__transition()){case 0:var e=null==this._tourStops[d-1].get_endTarget()?this._tourStops[d-1].get_target().get_camParams():this._tourStops[d-1].get_endTarget().get_camParams();if(this._tourStops[d-1].get_target().get_backgroundImageset().get_dataSetType()===this._tourStops[d].get_target().get_backgroundImageset().get_dataSetType()&&(4!==this._tourStops[d-1].get_target().get_backgroundImageset().get_dataSetType()||this._tourStops[d-1].get_target().get_target()===this._tourStops[d].get_target().get_target())){var f=fd.create(e,this._tourStops[d].get_target().get_camParams());c+=1e3*f.get_moveTime()}break;case 1:break;case 2:break;case 3:}return new rc(b,c/1e3)},getMasterSlideForIndex:function(a){for(var b=-1,c=0;a>c;c++)this._tourStops[c].get_masterSlide()&&(b=c);return-1===b?null:this._tourStops[b]},getTourStopIndexByID:function(a){if(!a||"Next"===a)return this._currentTourstopIndex++;for(var b=0,c=ss.enumerate(this._tourStops);c.moveNext();){var d=c.current;if(d.get_id()===a)return b;b++}return-1},cleanUp:function(){for(var a=ss.enumerate(this.get_tourStops());a.moveNext();){var b=a.current;b.cleanUp()}null!=this._textureList&&ss.clearKeys(this._textureList)},getCachedTexture:function(a,b){if(null==this._textureList&&(this._textureList={}),ss.keyExists(this._textureList,a))return b(),this._textureList[a];var c=document.createElement("img");return c.src=this.getFileStream(a),c.addEventListener("load",function(){b()},!1),this._textureList[a]=c,c},getFileStream:function(a){return wc.getTourComponent(this.url,a)},get_currentTourStop:function(){return this._currentTourstopIndex>-1?this.get_tourStops()[this._currentTourstopIndex]:null},set_currentTourStop:function(a){for(var b=0,c=ss.enumerate(this.get_tourStops());c.moveNext();){var d=c.current;if(d===a){this._currentTourstopIndex>-1&&this.get_tourStops()[this._currentTourstopIndex].cleanUp(),this._currentTourstopIndex=b;break}b++}return a},clearTempFiles:function(){}};qc.get_playing=function(){return qc._playing},qc.set_playing=function(a){return qc._playing=a,a},qc.add_tourEnded=function(a){qc.__tourEnded=ss.bindAdd(qc.__tourEnded,a)},qc.remove_tourEnded=function(a){qc.__tourEnded=ss.bindSub(qc.__tourEnded,a)};var xg={render:function(a){if(null!=this._tour&&null!=this._tour.get_currentTourStop()&&qc._playing){if(a.save(),this.updateSlideStates(),!this._onTarget&&(this._slideStartTime=ss.now(),a.onTarget(this.get_tour().get_currentTourStop().get_target()))){this._onTarget=!0,this._overlayBlend.set_state(!this.get_tour().get_currentTourStop().get_fadeInOverlays()),this._overlayBlend.set_targetState(!0),null!=this._tour.get_currentTourStop().get_musicTrack()&&this._tour.get_currentTourStop().get_musicTrack().play(),null!=this._tour.get_currentTourStop().get_voiceTrack()&&this._tour.get_currentTourStop().get_voiceTrack().play();for(var b="",c=ss.enumerate(this._tour.get_currentTourStop().get_overlays());c.moveNext();){var d=c.current;if("caption"===d.get_name().toLowerCase()){var e=ss.safeCast(d,sd);null!=e&&(b=e.textObject.text)}d.play()}null!=this._tour.get_currentTourStop().get_endTarget()&&-1!==this._tour.get_currentTourStop().get_endTarget().get_zoomLevel()&&(4===this._tour.get_currentTourStop().get_target().get_type(),a.viewMover=new ed(this._tour.get_currentTourStop().get_target().get_camParams(),this._tour.get_currentTourStop().get_endTarget().get_camParams(),this._tour.get_currentTourStop().get_duration()/1e3,this._tour.get_currentTourStop().get_startTime(),this._tour.get_currentTourStop().get_endTime(),this._tour.get_currentTourStop().get_interpolationType())),bc.tourSettings=this._tour.get_currentTourStop(),gc.set_now(this._tour.get_currentTourStop().get_startTime()),gc.set_syncToClock(!1),Ec.scriptInterface._fireSlideChanged(b)}if(null==a.gl){a.device.scale(a.height/1116,a.height/1116);var f=a.width/a.height;if(a.device.translate(-((1920-1116*f)/2),0),null!=this._currentMasterSlide)for(var g=ss.enumerate(this._currentMasterSlide.get_overlays());g.moveNext();){var d=g.current;d.set_tweenFactor(1),d.draw3D(a,!1)}if(this._onTarget)for(var h=ss.enumerate(this._tour.get_currentTourStop().get_overlays());h.moveNext();){var d=h.current;("caption"!==d.get_name().toLowerCase()||Ec.scriptInterface.get_showCaptions())&&(d.set_tweenFactor(Ic.easeCurve(this._tour.get_currentTourStop().get_tweenPosition(),5===d.get_interpolationType()?this._tour.get_currentTourStop().get_interpolationType():d.get_interpolationType())),d.draw3D(a,!1))}else;a.restore(),this._drawPlayerControls(a)}}},_drawPlayerControls:function(a){if(this._loadImages(),this._imagesLoaded&&this._playerState.get_state()){var b=ss.now()-this._lastHit;b>7e3&&this._playerState.set_targetState(!1);var c=a.device;c.save(),c.globalAlpha=this._playerState.get_opacity(),this._top=a.height-60,this._center=a.width/2;var d=this._leftDown?this._buttonPreviousPressed:this._leftHover?this._buttonPreviousHover:this._buttonPreviousNormal,e=qc.get_playing()?this._middleDown?this._buttonPausePressed:this._middleHover?this._buttonPauseHover:this._buttonPauseNormal:this._middleDown?this._buttonPlayPressed:this._middleHover?this._buttonPlayHover:this._buttonPlayNormal,f=this._rightDown?this._buttonNextPressed:this._rightHover?this._buttonNextHover:this._buttonNextNormal;c.drawImage(d,this._center-110,this._top),c.drawImage(f,this._center,this._top),c.drawImage(e,this._center-32,this._top-4),c.restore()}},_hitTextPlayerControls:function(a,b,c){return b?(this._leftDown=!1,this._rightDown=!1,this._middleDown=!1):(this._leftHover=!1,this._rightHover=!1,this._middleHover=!1),a.ythis._center-105?(b?this._leftDown=!0:this._leftHover=!0,c&&(this._playPreviousSlide(),this._lastHit=ss.now()),!0):a.xthis._center+32?(b?this._rightDown=!0:this._rightHover=!0,c&&(this._playNextSlide(),this._lastHit=ss.now()),!0):a.xthis._center-32?(b?this._middleDown=!0:this._middleHover=!0,c&&(this.pauseTour(),this._lastHit=ss.now()),!0):!1},_loadImages:function(){this._imagesLoaded||this._downloading||(this._buttonNextDisabled=this._loadImageElement("images/button_next_disabled.png"),this._buttonNextHover=this._loadImageElement("images/button_next_hover.png"),this._buttonNextNormal=this._loadImageElement("images/button_next_normal.png"),this._buttonNextPressed=this._loadImageElement("images/button_next_pressed.png"),this._buttonPauseDisabled=this._loadImageElement("images/button_pause_disabled.png"),this._buttonPauseHover=this._loadImageElement("images/button_pause_hover.png"),this._buttonPauseNormal=this._loadImageElement("images/button_pause_normal.png"),this._buttonPausePressed=this._loadImageElement("images/button_pause_pressed.png"),this._buttonPlayDisabled=this._loadImageElement("images/button_play_disabled.png"),this._buttonPlayHover=this._loadImageElement("images/button_play_hover.png"),this._buttonPlayNormal=this._loadImageElement("images/button_play_normal.png"),this._buttonPlayPressed=this._loadImageElement("images/button_play_pressed.png"),this._buttonPreviousDisabled=this._loadImageElement("images/button_previous_disabled.png"),this._buttonPreviousHover=this._loadImageElement("images/button_previous_hover.png"),this._buttonPreviousNormal=this._loadImageElement("images/button_previous_normal.png"),this._buttonPreviousPressed=this._loadImageElement("images/button_previous_pressed.png"))},_loadImageElement:function(a){var b=this;this._imageCount++,this._imagesLoaded=!1,this._downloading=!0;var c=document.createElement("img");return c.src=a,c.addEventListener("load",function(){b._imageLoadCount++,b._imageLoadCount===b._imageCount&&(b._downloading=!1,b._imagesLoaded=!0)},!1),c},get_tour:function(){return this._tour},set_tour:function(a){return this._tour=a,a},nextSlide:function(){if(null!=this._tour.get_currentTourStop())if(this._tour.get_currentTourStop().get_masterSlide())this._currentMasterSlide=this._tour.get_currentTourStop();else{null!=this._tour.get_currentTourStop().get_musicTrack()&&this._tour.get_currentTourStop().get_musicTrack().stop(),null!=this._tour.get_currentTourStop().get_voiceTrack()&&this._tour.get_currentTourStop().get_voiceTrack().stop();for(var a=ss.enumerate(this._tour.get_currentTourStop().get_overlays());a.moveNext();){var b=a.current;b.stop()}}if(this._tour.get_currentTourstopIndex()0?this._playFromTourstop(this._tour.get_tourStops()[this._callStack.pop()]):this._tour.set_currentTourstopIndex(this._tour.get_tourStops().length-1);break;default:this._playFromTourstop(this._tour.get_tourStops()[this._tour.getTourStopIndexByID(this._tour.get_currentTourStop().get_nextSlide())])}else this._tour.set_currentTourstopIndex(this._tour.get_currentTourstopIndex()+1)-1;if(null!=this._currentMasterSlide&&this._tour.get_currentTourStop().get_masterSlide()){null!=this._currentMasterSlide.get_musicTrack()&&this._currentMasterSlide.get_musicTrack().stop(),null!=this._currentMasterSlide.get_voiceTrack()&&this._currentMasterSlide.get_voiceTrack().stop();for(var c=ss.enumerate(this._currentMasterSlide.get_overlays());c.moveNext();){var b=c.current;b.stop()}this._currentMasterSlide=null}Ec.singleton.gotoTarget(this._tour.get_currentTourStop().get_target(),!1,!1,!1),this._slideStartTime=ss.now(),bc.tourSettings=this._tour.get_currentTourStop(),gc.set_now(this._tour.get_currentTourStop().get_startTime()),gc.set_syncToClock(!1)}else this._stopMaster(),qc._playing=!1,bc.get_current().autoRepeatTour?(this._tour.set_currentTourstopIndex(-1),this.play()):(Ec.singleton._freezeView(),null!=qc.__tourEnded&&qc.__tourEnded(this,new ss.EventArgs),this.showEndTourPopup(),Ec.singleton._hideUI(!1),Ec.scriptInterface._fireTourEnded())},_stopMaster:function(){if(null!=this._currentMasterSlide){null!=this._currentMasterSlide.get_musicTrack()&&this._currentMasterSlide.get_musicTrack().stop(),null!=this._currentMasterSlide.get_voiceTrack()&&this._currentMasterSlide.get_voiceTrack().stop();for(var a=ss.enumerate(this._currentMasterSlide.get_overlays());a.moveNext();){var b=a.current;b.stop()}this._currentMasterSlide=null}},showEndTourPopup:function(){},play:function(){null!=this._tour&&(qc._playing?this.stop(!0):qc._playing=!0,Ec.singleton._hideUI(!0),qc._playing=!0,this._tour.get_tourStops().length>0&&(this._onTarget=!1,-1===this._tour.get_currentTourstopIndex()&&this._tour.set_currentTourStop(this._tour.get_tourStops()[0]),this._tour.get_currentTourstopIndex()>0&&this._playMasterForCurrent(),Ec.singleton.gotoTarget(this._tour.get_currentTourStop().get_target(),!1,!0,!1)),this._slideStartTime=ss.now(),qc._playing=!0)},_playMasterForCurrent:function(){if(!this._tour.get_currentTourStop().get_masterSlide()){var a=this._tour.elapsedTimeSinceLastMaster(this._tour.get_currentTourstopIndex());if(null!=a&&null!=this._currentMasterSlide){var b=a.durration;this._currentMasterSlide=a.master,null!=this._currentMasterSlide.get_musicTrack()&&(this._currentMasterSlide.get_musicTrack().play(),this._currentMasterSlide.get_musicTrack().seek(b)),null!=this._currentMasterSlide.get_voiceTrack()&&(this._currentMasterSlide.get_voiceTrack().play(),this._currentMasterSlide.get_voiceTrack().seek(b));for(var c=ss.enumerate(this._currentMasterSlide.get_overlays());c.moveNext();){var d=c.current;d.play(),d.seek(b)}}}},stop:function(a){if(qc._switchedToFullScreen&&!a,bc.tourSettings=null,qc._playing=!1,null!=this._tour.get_currentTourStop()){null!=this._tour.get_currentTourStop().get_musicTrack()&&this._tour.get_currentTourStop().get_musicTrack().stop(),null!=this._tour.get_currentTourStop().get_voiceTrack()&&this._tour.get_currentTourStop().get_voiceTrack().stop();for(var b=ss.enumerate(this._tour.get_currentTourStop().get_overlays());b.moveNext();){var c=b.current;c.stop()}}if(null!=this._currentMasterSlide){null!=this._currentMasterSlide.get_musicTrack()&&this._currentMasterSlide.get_musicTrack().stop(),null!=this._currentMasterSlide.get_voiceTrack()&&this._currentMasterSlide.get_voiceTrack().stop();for(var d=ss.enumerate(this._currentMasterSlide.get_overlays());d.moveNext();){var c=d.current;c.stop()}}Ec.singleton._hideUI(qc.noRestoreUIOnStop),Ec.scriptInterface._fireTourEnded()},updateSlideStates:function(){var a=ss.now()-this._slideStartTime;a>this._tour.get_currentTourStop().get_duration()&&qc._playing&&this.nextSlide(),a=ss.now()-this._slideStartTime,this._tour.get_currentTourStop().set_tweenPosition(a/this._tour.get_currentTourStop().get_duration())},updateTweenPosition:function(a){var b=ss.now()-this._slideStartTime;return this._tour.get_currentTourStop().set_tweenPosition(a>-1?Math.min(1,a):Math.min(1,b/this._tour.get_currentTourStop().get_duration()))},close:function(){null!=this._tour&&(qc.get_playing()&&this.stop(qc._switchedToFullScreen),this._tour=null)},mouseDown:function(a,b){var c;if(c=this.pointToView(Tc.create(b.offsetX,b.offsetY)),null==this._tour||null==this._tour.get_currentTourStop())return!1;for(var d=this._tour.get_currentTourStop().get_overlays().length-1;d>=0;d--)if(this._tour.get_currentTourStop().get_overlays()[d].hitTest(c)){if(!ss.emptyString(this._tour.get_currentTourStop().get_overlays()[d].get_url())){var e=this._tour.get_currentTourStop().get_overlays()[d];return wc._openUrl(e.get_url(),!0),!0}if(!ss.emptyString(this._tour.get_currentTourStop().get_overlays()[d].get_linkID()))return this._callStack.push(this._tour.get_currentTourstopIndex()),this._playFromTourstop(this._tour.get_tourStops()[this._tour.getTourStopIndexByID(this._tour.get_currentTourStop().get_overlays()[d].get_linkID())]),!0}return this._playerState.get_state()?this._hitTextPlayerControls(Tc.create(b.offsetX,b.offsetY),!0,!0):(this._playerState.set_targetState(!0),this._lastHit=ss.now(),!1)},mouseUp:function(){return this._leftDown||this._rightDown||this._middleDown?(this._leftDown=!1,this._rightDown=!1,this._middleDown=!1,!0):!1},mouseMove:function(a,b){var c;try{c=this.pointToView(Tc.create(b.offsetX,b.offsetY))}catch(d){return!1}if(null==this._tour||null==this._tour.get_currentTourStop())return!1;for(var e=this._tour.get_currentTourStop().get_overlays().length-1;e>=0;e--)if(this._tour.get_currentTourStop().get_overlays()[e].hitTest(c)&&(!ss.emptyString(this._tour.get_currentTourStop().get_overlays()[e].get_url())||!ss.emptyString(this._tour.get_currentTourStop().get_overlays()[e].get_linkID())))return!0;return this._playerState.get_state()?this._hitTextPlayerControls(Tc.create(b.offsetX,b.offsetY),!1,!1):!1},mouseClick:function(){return!1},click:function(){return!1},mouseDoubleClick:function(){return!1},keyDown:function(a,b){switch(b.keyCode){case 27:return this.stop(qc._switchedToFullScreen),Ec.singleton._closeTour(),!0;case 32:return this.pauseTour(),!0;case 39:return this._playNextSlide(),!0;case 37:return this._playPreviousSlide(),!0;case 35:return this._tour.get_tourStops().length>0&&this._playFromTourstop(this._tour.get_tourStops()[this._tour.get_tourStops().length-1]),!0;case 36:return this._tour.get_tourStops().length>0&&this._playFromTourstop(this._tour.get_tourStops()[0]),!0}return!1},_playNextSlide:function(){this._tour.get_currentTourstopIndex()0&&this._playFromTourstop(this._tour.get_tourStops()[this._tour.get_currentTourstopIndex()+1])},_playPreviousSlide:function(){this._tour.get_currentTourstopIndex()>0&&this._playFromTourstop(this._tour.get_tourStops()[this._tour.get_currentTourstopIndex()-1])},_playFromTourstop:function(a){this.stop(!0),this._tour.set_currentTourStop(a),Ec.singleton.gotoTarget(this._tour.get_currentTourStop().get_target(),!1,!0,!1),gc.set_now(this._tour.get_currentTourStop().get_startTime()),gc.set_syncToClock(!1),this.play()},pauseTour:function(){qc._playing?(this.stop(qc._switchedToFullScreen),Ec.singleton._freezeView(),Ec.scriptInterface._fireTourPaused()):(this.play(),Ec.scriptInterface._fireTourResume())},keyUp:function(){return!1},hover:function(){return qc._playing?!0:!1},pointToView:function(a){var b=Ec.singleton.canvas.height,c=Ec.singleton.canvas.width,d=c/b*1116,e=a.x/c*d-(d-1920)/2,f=a.y/b*1116;return Tc.create(e,f)}},yg={};sc._fromXml=function(a,b){var c=new sc;if(c._owner=a,c.set_id(b.attributes.getNamedItem("Id").nodeValue),c.set_name(b.attributes.getNamedItem("Name").nodeValue),c.set_description(b.attributes.getNamedItem("Description").nodeValue),c._thumbnailString=b.attributes.getNamedItem("Thumbnail").nodeValue,c._duration=wc.parseTimeSpan(b.attributes.getNamedItem("Duration").nodeValue),null!=b.attributes.getNamedItem("Master")&&(c._masterSlide=ss["boolean"](b.attributes.getNamedItem("Master").nodeValue)),null!=b.attributes.getNamedItem("NextSlide")&&(c._nextSlide=b.attributes.getNamedItem("NextSlide").nodeValue),null!=b.attributes.getNamedItem("InterpolationType"))switch(b.attributes.getNamedItem("InterpolationType").nodeValue){case"Linear":c.set_interpolationType(0);break;case"EaseIn":c.set_interpolationType(1);break;case"EaseOut":c.set_interpolationType(2);break;case"EaseInOut":c.set_interpolationType(3);break;case"Exponential":c.set_interpolationType(4);break;case"Default":c.set_interpolationType(5);break;default:c.set_interpolationType(0)}if(c._fadeInOverlays=!0,null!=b.attributes.getNamedItem("FadeInOverlays")&&(c._fadeInOverlays=ss["boolean"](b.attributes.getNamedItem("FadeInOverlays").nodeValue)),null!=b.attributes.getNamedItem("Transition"))switch(b.attributes.getNamedItem("Transition").nodeValue){case"Slew":c._transition=0;break;case"Instant":c._transition=1;break;case"CrossFade":c._transition=2;break;case"FadeToBlack":c._transition=3}null!=b.attributes.getNamedItem("HasLocation")&&(c._hasLocation=ss["boolean"](b.attributes.getNamedItem("HasLocation").nodeValue)),c._hasLocation&&(null!=b.attributes.getNamedItem("LocationAltitude")&&(c._locationAltitude=parseFloat(b.attributes.getNamedItem("LocationAltitude").nodeValue)),null!=b.attributes.getNamedItem("LocationLat")&&(c._locationLat=parseFloat(b.attributes.getNamedItem("LocationLat").nodeValue)),null!=b.attributes.getNamedItem("LocationLng")&&(c._locationLng=parseFloat(b.attributes.getNamedItem("LocationLng").nodeValue))),null!=b.attributes.getNamedItem("HasTime")&&(c._hasTime=ss["boolean"](b.attributes.getNamedItem("HasTime").nodeValue),c._hasTime&&(null!=b.attributes.getNamedItem("StartTime")&&(c._startTime=ss.date(b.attributes.getNamedItem("StartTime").nodeValue)),null!=b.attributes.getNamedItem("EndTime")&&(c._endTime=ss.date(b.attributes.getNamedItem("EndTime").nodeValue)))),null!=b.attributes.getNamedItem("ActualPlanetScale")&&(c._actualPlanetScale=ss["boolean"](b.attributes.getNamedItem("ActualPlanetScale").nodeValue)),null!=b.attributes.getNamedItem("ShowClouds")&&(c._showClouds=ss["boolean"](b.attributes.getNamedItem("ShowClouds").nodeValue)),null!=b.attributes.getNamedItem("ShowConstellationBoundries")&&(c._showConstellationBoundries=ss["boolean"](b.attributes.getNamedItem("ShowConstellationBoundries").nodeValue)),null!=b.attributes.getNamedItem("ShowConstellationFigures")&&(c._showConstellationFigures=ss["boolean"](b.attributes.getNamedItem("ShowConstellationFigures").nodeValue)),null!=b.attributes.getNamedItem("ShowConstellationSelection")&&(c._showConstellationSelection=ss["boolean"](b.attributes.getNamedItem("ShowConstellationSelection").nodeValue)),null!=b.attributes.getNamedItem("ShowEcliptic")&&(c._showEcliptic=ss["boolean"](b.attributes.getNamedItem("ShowEcliptic").nodeValue)),null!=b.attributes.getNamedItem("ShowElevationModel")&&(c._showElevationModel=ss["boolean"](b.attributes.getNamedItem("ShowElevationModel").nodeValue)),null!=b.attributes.getNamedItem("ShowFieldOfView")&&(c._showFieldOfView=ss["boolean"](b.attributes.getNamedItem("ShowFieldOfView").nodeValue)),null!=b.attributes.getNamedItem("ShowGrid")&&(c._showGrid=ss["boolean"](b.attributes.getNamedItem("ShowGrid").nodeValue)),null!=b.attributes.getNamedItem("ShowHorizon")&&(c._showHorizon=ss["boolean"](b.attributes.getNamedItem("ShowHorizon").nodeValue)),null!=b.attributes.getNamedItem("ShowHorizonPanorama")&&(c._showHorizonPanorama=ss["boolean"](b.attributes.getNamedItem("ShowHorizonPanorama").nodeValue)),null!=b.attributes.getNamedItem("ShowMoonsAsPointSource")&&(c._showMoonsAsPointSource=ss["boolean"](b.attributes.getNamedItem("ShowMoonsAsPointSource").nodeValue)),null!=b.attributes.getNamedItem("ShowSolarSystem")&&(c._showSolarSystem=ss["boolean"](b.attributes.getNamedItem("ShowSolarSystem").nodeValue)),null!=b.attributes.getNamedItem("FovTelescope")&&(c._fovTelescope=parseInt(b.attributes.getNamedItem("FovTelescope").nodeValue)),null!=b.attributes.getNamedItem("FovEyepiece")&&(c._fovEyepiece=parseInt(b.attributes.getNamedItem("FovEyepiece").nodeValue)),null!=b.attributes.getNamedItem("FovCamera")&&(c._fovCamera=parseInt(b.attributes.getNamedItem("FovCamera").nodeValue)),null!=b.attributes.getNamedItem("LocalHorizonMode")&&(c._localHorizonMode=ss["boolean"](b.attributes.getNamedItem("LocalHorizonMode").nodeValue)),null!=b.attributes.getNamedItem("GalacticMode")&&(c._galacticMode=ss["boolean"](b.attributes.getNamedItem("GalacticMode").nodeValue)),null!=b.attributes.getNamedItem("SolarSystemStars")&&(c._solarSystemStars=ss["boolean"](b.attributes.getNamedItem("SolarSystemStars").nodeValue)),null!=b.attributes.getNamedItem("SolarSystemMilkyWay")&&(c._solarSystemMilkyWay=ss["boolean"](b.attributes.getNamedItem("SolarSystemMilkyWay").nodeValue)),null!=b.attributes.getNamedItem("SolarSystemCosmos")&&(c._solarSystemCosmos=ss["boolean"](b.attributes.getNamedItem("SolarSystemCosmos").nodeValue)),null!=b.attributes.getNamedItem("SolarSystemOrbits")&&(c._solarSystemOrbits=ss["boolean"](b.attributes.getNamedItem("SolarSystemOrbits").nodeValue)),null!=b.attributes.getNamedItem("SolarSystemOverlays")&&(c._solarSystemOverlays=ss["boolean"](b.attributes.getNamedItem("SolarSystemOverlays").nodeValue)),null!=b.attributes.getNamedItem("SolarSystemLighting")&&(c._solarSystemLighting=ss["boolean"](b.attributes.getNamedItem("SolarSystemLighting").nodeValue)),null!=b.attributes.getNamedItem("SolarSystemScale")&&(c._solarSystemScale=parseInt(b.attributes.getNamedItem("SolarSystemScale").nodeValue)),null!=b.attributes.getNamedItem("SolarSystemMultiRes")&&(c._solarSystemMultiRes=ss["boolean"](b.attributes.getNamedItem("SolarSystemMultiRes").nodeValue)),null!=b.attributes.getNamedItem("ShowEquatorialGridText")&&(c._showEquatorialGridText=ss["boolean"](b.attributes.getNamedItem("ShowEquatorialGridText").nodeValue)),null!=b.attributes.getNamedItem("ShowGalacticGrid")&&(c._showGalacticGrid=ss["boolean"](b.attributes.getNamedItem("ShowGalacticGrid").nodeValue)),null!=b.attributes.getNamedItem("ShowGalacticGridText")&&(c._showGalacticGridText=ss["boolean"](b.attributes.getNamedItem("ShowGalacticGridText").nodeValue)),null!=b.attributes.getNamedItem("ShowEclipticGrid")&&(c._showEclipticGrid=ss["boolean"](b.attributes.getNamedItem("ShowEclipticGrid").nodeValue)),null!=b.attributes.getNamedItem("ShowEclipticGridText")&&(c._showEclipticGridText=ss["boolean"](b.attributes.getNamedItem("ShowEclipticGridText").nodeValue)),null!=b.attributes.getNamedItem("ShowEclipticOverviewText")&&(c._showEclipticOverviewText=ss["boolean"](b.attributes.getNamedItem("ShowEclipticOverviewText").nodeValue)),null!=b.attributes.getNamedItem("ShowAltAzGrid")&&(c._showAltAzGrid=ss["boolean"](b.attributes.getNamedItem("ShowAltAzGrid").nodeValue)),null!=b.attributes.getNamedItem("ShowAltAzGridText")&&(c._showAltAzGridText=ss["boolean"](b.attributes.getNamedItem("ShowAltAzGridText").nodeValue)),null!=b.attributes.getNamedItem("ShowPrecessionChart")&&(c._showPrecessionChart=ss["boolean"](b.attributes.getNamedItem("ShowPrecessionChart").nodeValue)),null!=b.attributes.getNamedItem("ShowConstellationPictures")&&(c._showConstellationPictures=ss["boolean"](b.attributes.getNamedItem("ShowConstellationPictures").nodeValue)),null!=b.attributes.getNamedItem("ShowConstellationLabels")&&(c._showConstellationLabels=ss["boolean"](b.attributes.getNamedItem("ShowConstellationLabels").nodeValue)),null!=b.attributes.getNamedItem("SolarSystemCMB")&&(c._solarSystemCMB=ss["boolean"](b.attributes.getNamedItem("SolarSystemCMB").nodeValue)),null!=b.attributes.getNamedItem("SolarSystemMinorPlanets")&&(c._solarSystemMinorPlanets=ss["boolean"](b.attributes.getNamedItem("SolarSystemMinorPlanets").nodeValue)),null!=b.attributes.getNamedItem("SolarSystemPlanets")&&(c._solarSystemPlanets=ss["boolean"](b.attributes.getNamedItem("SolarSystemPlanets").nodeValue)),null!=b.attributes.getNamedItem("ShowEarthSky")&&(c._showEarthSky=ss["boolean"](b.attributes.getNamedItem("ShowEarthSky").nodeValue)),null!=b.attributes.getNamedItem("SolarSystemMinorOrbits")&&(c._solarSystemMinorOrbits=ss["boolean"](b.attributes.getNamedItem("SolarSystemMinorOrbits").nodeValue)),c._showSkyOverlays=null!=b.attributes.getNamedItem("ShowSkyOverlays")?ss["boolean"](b.attributes.getNamedItem("ShowSkyOverlays").nodeValue):!0,c._showConstellations=null!=b.attributes.getNamedItem("ShowConstellations")?ss["boolean"](b.attributes.getNamedItem("ShowConstellations").nodeValue):!0,c._showSkyNode=null!=b.attributes.getNamedItem("ShowSkyNode")?ss["boolean"](b.attributes.getNamedItem("ShowSkyNode").nodeValue):!0,c._showSkyGrids=null!=b.attributes.getNamedItem("ShowSkyGrids")?ss["boolean"](b.attributes.getNamedItem("ShowSkyGrids").nodeValue):!0,null!=b.attributes.getNamedItem("ShowSkyOverlaysIn3d")&&(c._showSkyOverlaysIn3d=ss["boolean"](b.attributes.getNamedItem("ShowSkyOverlaysIn3d").nodeValue)),null!=b.attributes.getNamedItem("EarthCutawayView")&&(c._earthCutawayView=ss["boolean"](b.attributes.getNamedItem("EarthCutawayView").nodeValue)),null!=b.attributes.getNamedItem("ShowISSModel")&&(c._showISSModel=ss["boolean"](b.attributes.getNamedItem("ShowISSModel").nodeValue)),null!=b.attributes.getNamedItem("MilkyWayModel")&&(c._milkyWayModel=ss["boolean"](b.attributes.getNamedItem("MilkyWayModel").nodeValue)),c._constellationBoundariesFilter=null!=b.attributes.getNamedItem("ConstellationBoundariesFilter")?Oc.parse(b.attributes.getNamedItem("ConstellationBoundariesFilter").nodeValue):Oc.get_allConstellation(),c._constellationFiguresFilter=null!=b.attributes.getNamedItem("ConstellationBoundariesFilter")?Oc.parse(b.attributes.getNamedItem("ConstellationBoundariesFilter").nodeValue):new Oc,c._constellationNamesFilter=null!=b.attributes.getNamedItem("ConstellationNamesFilter")?Oc.parse(b.attributes.getNamedItem("ConstellationNamesFilter").nodeValue):new Oc,c._constellationArtFilter=null!=b.attributes.getNamedItem("ConstellationArtFilter")?Oc.parse(b.attributes.getNamedItem("ConstellationArtFilter").nodeValue):new Oc,null!=b.attributes.getNamedItem("MinorPlanetsFilter")&&(c._minorPlanetsFilter=parseInt(b.attributes.getNamedItem("MinorPlanetsFilter").nodeValue)),null!=b.attributes.getNamedItem("PlanetOrbitsFilter")&&(c._planetOrbitsFilter=parseInt(b.attributes.getNamedItem("PlanetOrbitsFilter").nodeValue));var d=wc.selectSingleNode(b,"Place");c._target=hd._fromXml(d);var e=wc.selectSingleNode(b,"EndTarget");null!=e&&(c._endTarget=hd._fromXml(e));for(var f=wc.selectSingleNode(b,"Overlays"),g=ss.enumerate(f.childNodes);g.moveNext();){var h=g.current;c.addOverlay(nc._fromXml(c,h))}var i=wc.selectSingleNode(b,"MusicTrack");null!=i&&(c._musicTrack=nc._fromXml(c,wc.selectSingleNode(i,"Overlay")));var j=wc.selectSingleNode(b,"VoiceTrack");return null!=j&&(c._voiceTrack=nc._fromXml(c,wc.selectSingleNode(j,"Overlay"))),c};var zg={get_keyFramed:function(){return this._keyFramed},get_tourStopType:function(){return null!=this._target.get_backgroundImageset()?this._target.get_backgroundImageset().get_dataSetType():this._tourStopType},set_tourStopType:function(a){return null!=this._target.get_backgroundImageset()&&this._target.get_backgroundImageset().get_dataSetType()!==a&&this._target.set_backgroundImageset(null),this._tourStopType=a,a},get_tweenPosition:function(){return this._tweenPosition},set_tweenPosition:function(a){return this._tweenPosition!==a&&(this._tweenPosition=Math.max(0,Math.min(1,a)),this.updateTweenPosition()),a},updateTweenPosition:function(){this.get_keyFramed()},get_owner:function(){return this._owner},set_owner:function(a){return this._owner=a,a},get__transition:function(){return this._transition},set__transition:function(a){return this._transition!==a&&(this._transition=a,null!=this._owner&&this._owner.set_tourDirty(!0)),a},get_nextSlide:function(){return this._nextSlide},set_nextSlide:function(a){return this._nextSlide=a,a},get_isLinked:function(){return null!=this._nextSlide&&"Next"!==this._nextSlide&&this._nextSlide?!0:!1},get_fadeInOverlays:function(){return this._fadeInOverlays},set_fadeInOverlays:function(a){return this._fadeInOverlays=a,a },get_masterSlide:function(){return this._masterSlide},set_masterSlide:function(a){return this._masterSlide!==a&&(this._masterSlide=a,null!=this._owner&&this._owner.set_tourDirty(!0)),a},get_id:function(){return this._id},set_id:function(a){return this._id=a,null!=this._owner&&this._owner.set_tourDirty(!0),a},toString:function(){return null!=this._target?this.get_target().get_name():this._description},get_description:function(){return this._description},set_description:function(a){return this._description!==a&&(this._description=a,null!=this._owner&&this._owner.set_tourDirty(!0)),a},get_name:function(){return null!=this._target?this._target.get_name():this._name},set_name:function(a){return this._name!==a&&(this._name=a,null!=this._owner&&this._owner.set_tourDirty(!0)),a},get_duration:function(){return this._duration},set_duration:function(a){return this._duration!==a&&(this._duration=a,null!=this._owner&&this._owner.set_tourDirty(!0)),a},get_target:function(){return this._target},set_target:function(a){return this._target!==a&&(this._target=a,null!=this._owner&&this._owner.set_tourDirty(!0)),a},get_endTarget:function(){return this._endTarget},set_endTarget:function(a){return this._endTarget!==a&&(this._endTarget=a,null!=this._owner&&this._owner.set_tourDirty(!0)),a},get_interpolationType:function(){return this._interpolationType},set_interpolationType:function(a){return this._interpolationType=a,a},get_hasLocation:function(){return this._hasTime},set_hasLocation:function(a){return this._hasLocation!==a&&(this._hasLocation=a,null!=this._owner&&this._owner.set_tourDirty(!0)),a},get_hasTime:function(){return this._hasTime},set_hasTime:function(a){return this._hasTime!==a&&(this._hasTime=this._hasLocation=a,null!=this._owner&&this._owner.set_tourDirty(!0)),a},get_startTime:function(){return this._startTime},set_startTime:function(a){return this._startTime=a,ss.compareDates(this._startTime,a)||(this._startTime=a,null!=this._owner&&this._owner.set_tourDirty(!0)),a},get_endTime:function(){return this._endTime},set_endTime:function(a){return ss.compareDates(this._endTime,a)||(this._endTime=a,null!=this._owner&&this._owner.set_tourDirty(!0)),a},captureSettings:function(){this._startTime=gc.get_now(),this._actualPlanetScale=bc.get_current().get_actualPlanetScale(),this._locationAltitude=bc.get_current().get_locationAltitude(),this._locationLat=bc.get_current().get_locationLat(),this._locationLng=bc.get_current().get_locationLng(),this._showClouds=bc.get_current().get_showClouds(),this._showConstellationBoundries=bc.get_current().get_showConstellationBoundries(),this._showConstellationFigures=bc.get_current().get_showConstellationFigures(),this._showConstellationSelection=bc.get_current().get_showConstellationSelection(),this._showEcliptic=bc.get_current().get_showEcliptic(),this._showElevationModel=bc.get_current().get_showElevationModel(),this._showFieldOfView=bc.get_current().get_showFieldOfView(),this._showGrid=bc.get_current().get_showGrid(),this._showHorizon=bc.get_current().get_showHorizon(),this._showHorizonPanorama=bc.get_current().get_showHorizonPanorama(),this._showMoonsAsPointSource=bc.get_current().get_showMoonsAsPointSource(),this._showSolarSystem=bc.get_current().get_showSolarSystem(),this._fovTelescope=bc.get_current().get_fovTelescope(),this._fovEyepiece=bc.get_current().get_fovEyepiece(),this._fovCamera=bc.get_current().get_fovCamera(),this._localHorizonMode=bc.get_current().get_localHorizonMode(),this._galacticMode=bc.get_current().get_galacticMode(),this._solarSystemStars=bc.get_current().get_solarSystemStars(),this._solarSystemMilkyWay=bc.get_current().get_solarSystemMilkyWay(),this._solarSystemCosmos=bc.get_current().get_solarSystemCosmos(),this._solarSystemOrbits=bc.get_current().get_solarSystemOrbits(),this._solarSystemOverlays=bc.get_current().get_solarSystemOverlays(),this._solarSystemLighting=bc.get_current().get_solarSystemLighting(),this._solarSystemScale=bc.get_current().get_solarSystemScale(),this._solarSystemMultiRes=bc.get_current().get_solarSystemMultiRes(),this._showEquatorialGridText=bc.get_current().get_showEquatorialGridText(),this._showGalacticGrid=bc.get_current().get_showGalacticGrid(),this._showGalacticGridText=bc.get_current().get_showGalacticGridText(),this._showEclipticGrid=bc.get_current().get_showEclipticGrid(),this._showEclipticGridText=bc.get_current().get_showEclipticGridText(),this._showEclipticOverviewText=bc.get_current().get_showEclipticOverviewText(),this._showAltAzGrid=bc.get_current().get_showAltAzGrid(),this._showAltAzGridText=bc.get_current().get_showAltAzGridText(),this._showPrecessionChart=bc.get_current().get_showPrecessionChart(),this._showConstellationPictures=bc.get_current().get_showConstellationPictures(),this._showConstellationLabels=bc.get_current().get_showConstellationLabels(),this._solarSystemCMB=bc.get_current().get_solarSystemCMB(),this._solarSystemMinorPlanets=bc.get_current().get_solarSystemMinorPlanets(),this._solarSystemPlanets=bc.get_current().get_solarSystemPlanets(),this._showEarthSky=bc.get_current().get_showEarthSky(),this._solarSystemMinorOrbits=bc.get_current().get_solarSystemMinorOrbits(),this._constellationFiguresFilter=bc.get_current().get_constellationFiguresFilter().clone(),this._constellationBoundariesFilter=bc.get_current().get_constellationBoundariesFilter().clone(),this._constellationNamesFilter=bc.get_current().get_constellationNamesFilter().clone(),this._constellationArtFilter=bc.get_current().get_constellationArtFilter().clone(),this._showSkyOverlays=bc.get_current().get_showSkyOverlays(),this._showConstellations=bc.get_current().get_showConstellations(),this._showSkyNode=bc.get_current().get_showSkyNode(),this._showSkyGrids=bc.get_current().get_showSkyGrids(),this._showSkyOverlaysIn3d=bc.get_current().get_showSkyOverlaysIn3d(),this._earthCutawayView=bc.get_current().get_earthCutawayView(),this._showISSModel=bc.get_current().get_showISSModel(),this._milkyWayModel=bc.get_current().get_milkyWayModel(),this._minorPlanetsFilter=bc.get_current().get_minorPlanetsFilter(),this._planetOrbitsFilter=bc.get_current().get_planetOrbitsFilter()},get_solarSystemStars:function(){return this._solarSystemStars},get_solarSystemMultiRes:function(){return this._solarSystemMultiRes},get_solarSystemMilkyWay:function(){return this._solarSystemMilkyWay},get_solarSystemCosmos:function(){return this._solarSystemCosmos},get_solarSystemOrbits:function(){return this._solarSystemOrbits},get_solarSystemOverlays:function(){return this._solarSystemOverlays},get_solarSystemLighting:function(){return this._solarSystemLighting},get_solarSystemScale:function(){return this._solarSystemScale},get_actualPlanetScale:function(){return this._actualPlanetScale},get_fovCamera:function(){return this._fovCamera},get_fovEyepiece:function(){return this._fovEyepiece},get_fovTelescope:function(){return this._fovTelescope},get_locationAltitude:function(){return this._hasTime?this._locationAltitude:bc.get_current().get_locationAltitude()},get_locationLat:function(){return this._hasTime?this._locationLat:bc.get_current().get_locationLat()},get_locationLng:function(){return this._hasTime?this._locationLng:bc.get_current().get_locationLng()},get_showClouds:function(){return this._showClouds},get_showConstellationBoundries:function(){return this._showConstellationBoundries},get_showConstellationFigures:function(){return this._showConstellationFigures},get_showConstellationSelection:function(){return this._showConstellationSelection},get_showEcliptic:function(){return this._showEcliptic},get_showElevationModel:function(){return this._showElevationModel},get_showFieldOfView:function(){return this._showFieldOfView},get_showGrid:function(){return this._showGrid},get_showHorizon:function(){return this._showHorizon},get_showHorizonPanorama:function(){return this._showHorizonPanorama},get_showMoonsAsPointSource:function(){return this._showMoonsAsPointSource},get_showSolarSystem:function(){return this._showSolarSystem},get_localHorizonMode:function(){return this._localHorizonMode},get_galacticMode:function(){return this._galacticMode},get_thumbnail:function(){return null!=this._target&&null==this._thumbnail?null:this._thumbnail},set_thumbnail:function(a){return this._thumbnail=a,null!=this._owner&&this._owner.set_tourDirty(!0),a},get_overlays:function(){return this._overlays},get_musicTrack:function(){return this._musicTrack},set_musicTrack:function(a){return this._musicTrack!==a&&(this._musicTrack=a,null!=this._owner&&this._owner.set_tourDirty(!0)),a},get_voiceTrack:function(){return this._voiceTrack},set_voiceTrack:function(a){return this._voiceTrack!==a&&(this._voiceTrack=a,null!=this._owner&&this._owner.set_tourDirty(!0)),a},addOverlay:function(a){null!=a&&(a.set_owner(this),this._overlays.push(a),null!=this._owner&&this._owner.set_tourDirty(!0))},removeOverlay:function(a){ss.remove(this._overlays,a),null!=this._owner&&this._owner.set_tourDirty(!0)},cleanUp:function(){for(var a=ss.enumerate(this.get_overlays());a.moveNext();){var b=a.current;b.cleanUp()}null!=this._voiceTrack&&this._voiceTrack.cleanUp(),null!=this._musicTrack&&this._musicTrack.cleanUp()},sendToBack:function(a){ss.remove(this._overlays,a),this._overlays.splice(0,0,a),null!=this._owner&&this._owner.set_tourDirty(!0)},bringToFront:function(a){ss.remove(this._overlays,a),this._overlays.push(a),null!=this._owner&&this._owner.set_tourDirty(!0)},bringForward:function(a){var b=this._overlays.indexOf(a);b0&&(ss.remove(this._overlays,a),this._overlays.splice(b-1,0,a)),null!=this._owner&&this._owner.set_tourDirty(!0)},getNextOverlay:function(a){if(null==a)return this._overlays.length>0?this._overlays[0]:null;var b=this._overlays.indexOf(a);return b0?this._overlays[0]:null;var b=this._overlays.indexOf(a);return b>0?this._overlays[b-1]:this._overlays[this._overlays.length-1]},getOverlayById:function(a){for(var b=ss.enumerate(this._overlays);b.moveNext();){var c=b.current;if(c.id===a)return c}return null},get_tourStopThumbnailFilename:function(){return ss.format("{0}.thumb.png",this._id)},getNextDefaultName:function(a){for(var b=1,c=ss.enumerate(this._overlays);c.moveNext();){var d=c.current;if(ss.startsWith(d.get_name(),a)){var e=0;try{e=parseInt(d.get_name().substr(a.length))}catch(f){}e>=b&&(b=e+1)}}return ss.format("{0} {1}",a,b)},_updateLayerOpacity:function(){this.get_keyFramed()&&this.updateTweenPosition()},get_showEquatorialGridText:function(){return this._showEquatorialGridText},set_showEquatorialGridText:function(a){return this._showEquatorialGridText=a,a},get_showGalacticGrid:function(){return this._showGalacticGrid},set_showGalacticGrid:function(a){return this._showGalacticGrid=a,a},get_showGalacticGridText:function(){return this._showGalacticGridText},set_showGalacticGridText:function(a){return this._showGalacticGridText=a,a},get_showEclipticGrid:function(){return this._showEclipticGrid},set_showEclipticGrid:function(a){return this._showEclipticGrid=a,a},get_showEclipticGridText:function(){return this._showEclipticGridText},set_showEclipticGridText:function(a){return this._showEclipticGridText=a,a},get_showEclipticOverviewText:function(){return this._showEclipticOverviewText},set_showEclipticOverviewText:function(a){return this._showEclipticOverviewText=a,a},get_showAltAzGrid:function(){return this._showAltAzGrid},set_showAltAzGrid:function(a){return this._showAltAzGrid=a,a},get_showAltAzGridText:function(){return this._showAltAzGridText},set_showAltAzGridText:function(a){return this._showAltAzGridText=a,a},get_showPrecessionChart:function(){return this._showPrecessionChart},set_showPrecessionChart:function(a){return this._showPrecessionChart=a,a},get_showConstellationPictures:function(){return this._showConstellationPictures},set_showConstellationPictures:function(a){return this._showConstellationPictures=a,a},get_showConstellationLabels:function(){return this._showConstellationLabels},set_showConstellationLabels:function(a){return this._showConstellationLabels=a,a},get_solarSystemCMB:function(){return this._solarSystemCMB},set_solarSystemCMB:function(a){return this._solarSystemCMB=a,a},get_solarSystemMinorPlanets:function(){return this._solarSystemMinorPlanets},set_solarSystemMinorPlanets:function(a){return this._solarSystemMinorPlanets=a,a},get_solarSystemPlanets:function(){return this._solarSystemPlanets},set_solarSystemPlanets:function(a){return this._solarSystemPlanets=a,a},get_showEarthSky:function(){return this._showEarthSky},set_showEarthSky:function(a){return this._showEarthSky=a,a},get_solarSystemMinorOrbits:function(){return this._solarSystemMinorOrbits},set_solarSystemMinorOrbits:function(a){return this._solarSystemMinorOrbits=a,a},get_constellationsEnabled:function(){return this._constellationsEnabled},set_constellationsEnabled:function(a){return this._constellationsEnabled=a,a},get_constellationFiguresFilter:function(){return this._constellationFiguresFilter},set_constellationFiguresFilter:function(a){return this._constellationFiguresFilter=a,a},get_constellationBoundariesFilter:function(){return this._constellationBoundariesFilter},set_constellationBoundariesFilter:function(a){return this._constellationBoundariesFilter=a,a},get_constellationNamesFilter:function(){return this._constellationNamesFilter},set_constellationNamesFilter:function(a){return this._constellationNamesFilter=a,a},get_constellationArtFilter:function(){return this._constellationArtFilter},set_constellationArtFilter:function(a){return this._constellationArtFilter=a,a},get_showSkyOverlays:function(){return this._showSkyOverlays},set_showSkyOverlays:function(a){return this._showSkyOverlays=a,a},get_showConstellations:function(){return this._showConstellations},set_showConstellations:function(a){return this._showConstellations=a,a},get_showSkyNode:function(){return this._showSkyNode},set_showSkyNode:function(a){return this._showSkyNode=a,a},get_showSkyGrids:function(){return this._showSkyGrids},set_showSkyGrids:function(a){return this._showSkyGrids=a,a},get_showSkyOverlaysIn3d:function(){return this._showSkyOverlaysIn3d},set_showSkyOverlaysIn3d:function(a){return this._showSkyOverlaysIn3d=a,a},get_earthCutawayView:function(){return this._earthCutawayView},set_earthCutawayView:function(a){return this._earthCutawayView=a,a},get_showISSModel:function(){return this._showISSModel},set_showISSModel:function(a){return this._showISSModel=a,a},get_milkyWayModel:function(){return this._milkyWayModel},set_milkyWayModel:function(a){return this._milkyWayModel=a,a},get_minorPlanetsFilter:function(){return this._minorPlanetsFilter},set_minorPlanetsFilter:function(a){return this._minorPlanetsFilter=a,a},get_planetOrbitsFilter:function(){return this._planetOrbitsFilter},set_planetOrbitsFilter:function(a){return this._planetOrbitsFilter=a,a},getSetting:function(){return new mc(!1,1,!1,null)}},Ag={};uc.create=function(a,b,c){var d=new uc;return d.a=a,d.b=b,d.c=c,d};var Bg={subDivide:function(a,b){var c=Sc.lerp(b[this.b].position,b[this.c].position,.5),d=Sc.lerp(b[this.c].position,b[this.a].position,.5),e=Sc.lerp(b[this.a].position,b[this.b].position,.5),f=Tc.lerp(Tc.create(b[this.b].tu,b[this.b].tv),Tc.create(b[this.c].tu,b[this.c].tv),.5),g=Tc.lerp(Tc.create(b[this.c].tu,b[this.c].tv),Tc.create(b[this.a].tu,b[this.a].tv),.5),h=Tc.lerp(Tc.create(b[this.a].tu,b[this.a].tv),Tc.create(b[this.b].tu,b[this.b].tv),.5);c.normalize(),d.normalize(),e.normalize();var i=b.length,j=b.length+1,k=b.length+2;b.push(Qc.createPosRaw(c,f.x,f.y)),b.push(Qc.createPosRaw(d,g.x,g.y)),b.push(Qc.createPosRaw(e,h.x,h.y)),a.push(uc.create(this.a,k,j)),a.push(uc.create(this.b,i,k)),a.push(uc.create(this.c,j,i)),a.push(uc.create(i,j,k))},subDivideNoNormalize:function(a,b){var c=Sc.lerp(b[this.b].position,b[this.c].position,.5),d=Sc.lerp(b[this.c].position,b[this.a].position,.5),e=Sc.lerp(b[this.a].position,b[this.b].position,.5),f=Tc.lerp(Tc.create(b[this.b].tu,b[this.b].tv),Tc.create(b[this.c].tu,b[this.c].tv),.5),g=Tc.lerp(Tc.create(b[this.c].tu,b[this.c].tv),Tc.create(b[this.a].tu,b[this.a].tv),.5),h=Tc.lerp(Tc.create(b[this.a].tu,b[this.a].tv),Tc.create(b[this.b].tu,b[this.b].tv),.5),i=b.length,j=b.length+1,k=b.length+2;b.push(Qc.createPosRaw(c,f.x,f.y)),b.push(Qc.createPosRaw(d,g.x,g.y)),b.push(Qc.createPosRaw(e,h.x,h.y)),a.push(uc.create(this.a,k,j)),a.push(uc.create(this.b,i,k)),a.push(uc.create(this.c,j,i)),a.push(uc.create(i,j,k))}};vc.getNamesStringFromArray=function(a){for(var b="",c="",d=ss.enumerate(a);d.moveNext();){var e=d.current;b+=c,b+=e,c=";"}return b},vc.solarSystemToMeters=function(a){return 149598e3*a*370},vc.metersToSolarSystemDistance=function(a){return a/370*149598e3},vc.metersToZoom=function(a){return(a/1e3/370-1e-6)/4*9},vc.formatDistance=function(a){if(.1>a){var b=149598e3*a;if(10>b){var c=ss.truncate(1e3*b);return ss.format("{0} m",c)}return b=ss.truncate(b),ss.format("{0} km",b)}if(10>a){var d=ss.truncate(10*a)/10;return ss.format("{0} au",d)}if(6323.96717>a){var d=ss.truncate(a);return ss.format("{0} au",d)}if(632396.717>a){var e=ss.truncate(10*a/63239.6717)/10;return ss.format("{0} ly",e)}if(63239671700>a){var e=ss.truncate(a/63239.6717);return ss.format("{0} ly",e)}if(206264806e4>a){var f=ss.truncate(10*a/206264806e3)/10;return ss.format("{0} Mpc",f)}if(206264806e6>a){var f=ss.truncate(a/206264806e3);return ss.format("{0} Mpc",f)}var f=ss.truncate(10*a/206264806e6)/10;return ss.format("{0} Gpc",f)},vc.formatDecimalHours=function(a){var b=ss.now(),c=b.getTimezoneOffset()/60;c=0;for(var d=a-c+.0083333334;d>24;)d-=24;for(;0>d;)d+=24;var e=ss.truncate(d),f=ss.truncate(60*d-60*e),g=ss.truncate(3600*d-(3600*e+60*f));return ss.format("{0}:{1}",e,f,g)},vc.splitString=function(a,b){for(var c=[],d=0,e=0,f=0,g=0;e-1?(c.push(a.substr(f,e)),f=d+1,e=0):e++,d++;return c};var Cg={};wc.getHashCode=function(a){var b=0;if(!a.length)return b;for(var c=0;ca?-1:1};var Dg={};xc.create=function(a,b,c,d){var e=new xc;return e.x=a,e.y=b,e.width=c,e.height=d,e};var Eg={get_left:function(){return this.x},get_right:function(){return this.x+this.width},get_top:function(){return this.y},get_bottom:function(){return this.y+this.height},copy:function(){var a=new xc;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a}};yc.newGuid=function(){return new yc},yc.fromString=function(a){var b=new yc;return b._guid=a,b};var Fg={toString:function(){return this._guid}};zc.offsetX=function(a,b){var c=0,d=a,e=b;if(null!=d.offsetParent)do c+=d.offsetLeft;while(null!=(d=d.offsetParent));return e.pageX-c},zc.offsetY=function(a,b){var c=0,d=a,e=b;if(null!=d.offsetParent)do c+=d.offsetTop;while(null!=(d=d.offsetParent));return e.pageY-c};var Gg={load:function(a){var b=this,c=a.split("\r\n");this._starProfile=document.createElement("img"),this._starProfile.addEventListener("load",function(){b._imageReady=!0},!1),this._starProfile.src="images/starProfile.png";for(var d=!1,e=ss.enumerate(c);e.moveNext();){var f=e.current;d?this.table.push(f.split(" ")):(this.header=f.split(" "),d=!0)}},prepare:function(){this._worldList=new Array(this.table.length),this._transformedList=new Array(this.table.length);for(var a=0,b=ss.enumerate(this.table);b.moveNext();){var c=b.current,d=new Bc;d.eventTime=ss.date(c[this._dateColumn]);var e=(6371e3-1e3*parseFloat(c[this._depthColumn]))/6371e3;d.location=Pc.geoTo3dRad(parseFloat(c[this._latColumn]),parseFloat(c[this._lngColumn])+180,e),d.tranformed=new Sc,d.size=Math.pow(2,parseFloat(c[this._magColumn]))/50,this._worldList[a]=d.location,this._transformedList[a]=d.tranformed,this.items.push(d),a++}},draw:function(a){if(this._imageReady){a.device.save(),a.WVP.projectArrayToScreen(this._worldList,this._transformedList);var b=a.device;b.globalAlpha=.4;for(var c=a.width,d=a.height,e=(Sc.makeCopy(a.get_viewPoint()),a.get_fovScale()/100),f=ss.enumerate(this.items);f.moveNext();){var g=f.current;if(g.tranformed.z<1){var h=g.tranformed.x,i=g.tranformed.y,j=4*g.size/e,k=j/2;h>-k&&c+k>h&&i>-k&&d+k>i&&b.drawImage(this._starProfile,h-j/2,i-j/2,j,j)}}a.device.restore()}}},Hg={getColor:function(){return"Red"}},Ig={send:function(){var a=navigator.appVersion;a.indexOf("MSIE 8")>-1||a.indexOf("MSIE 9")>-1?this._ieCrossDomain():this._CORS(),this.set_state(0)},get_message:function(){return this._message},get_state:function(){return this._state},set_state:function(a){return this._state=a,null!=this.onStateChange&&this.onStateChange(),a},_loadData:function(a){this._data=a,this.set_state(1)},_error:function(){this._message=ss.format("Error encountered loading {0}",this._url),this.set_state(2)},_timeOut:function(){this._message=ss.format("Timeout encountered loading {0}",this._url),this.set_state(2)},_ieCrossDomain:function(){var a=this;this._xdr=new XDomainRequest,this._xdr.onload=function(){a._loadData(a._xdr.responseText)},this._xdr.onTimeout=ss.bind("_error",this),this._xdr.onError=ss.bind("_timeOut",this),this._xdr.open("get",this._url),this._xdr.send()},_CORS:function(){var a=this;this._xhr=new XMLHttpRequest;try{this._xhr.open("GET",this._url),this._xhr.onreadystatechange=function(){4===a._xhr.readyState&&a._loadData(a._xhr.responseText)},this._xhr.send()}catch(b){throw this._message=b.message,this.set_state(2),b}},getText:function(){return this._data},getXml:function(){var a=new DOMParser;return a.parseFromString(this._data,"text/xml")}};Dc.getWtmlFile=function(a,b){var c=new ad;c.loadFromUrl(a,function(){Dc.loadImagesets(c),b()})},Dc.loadImagesets=function(a){for(var b=ss.enumerate(a.get_children());b.moveNext();){var c=b.current,d=null;if(ss.canCast(c,dd)&&(d=c,Ec.imageSets.push(d)),ss.canCast(c,hd)){var e=c;null!=e.get_studyImageset()&&Ec.imageSets.push(e.get_studyImageset()),null!=e.get_backgroundImageset()&&Ec.imageSets.push(e.get_backgroundImageset())}}if(!ss.emptyString(Ec.imageSetName))for(var f=Ec.imageSetName.toLowerCase(),g=ss.enumerate(Ec.imageSets);g.moveNext();){var d=g.current;d.get_name().toLowerCase()===f&&Ec.singleton.renderContext.set_backgroundImageset(d)}};var Jg={};Ec.get_renderNeeded=function(){return Ec._renderNeeded},Ec.set_renderNeeded=function(a){return Ec._renderNeeded=!0,a},Ec.showExplorerUI=function(){null!=Ec.singleton&&Ec.singleton.createExplorerUI()},Ec.initControl=function(a){return Ec.initControlParam(a,!1)},Ec.initControlParam=function(a,b){if(null==Ec.singleton.renderContext.device){Ec.scriptInterface=new ac,Ec.scriptInterface.settings=bc.get_current();var c=Ec._createCanvasElement(a),d="experimental-webgl",e=null;if(b=!1,b&&(e=c.getContext(d)),null==e){var f=c.getContext("2d");Ec.singleton.renderContext.device=f}else ic.prepDevice=e,Ec.singleton.renderContext.gl=e;Ec.singleton.canvas=c,Ec.singleton.renderContext.width=c.width,Ec.singleton.renderContext.height=c.height,Ec.singleton.setup(c),Ec.singleton.renderContext.set_backgroundImageset(dd.create("DSS","http://cdn.worldwidetelescope.org/wwtweb/dss.aspx?q={1},{2},{3}",2,3,3,100,0,12,256,180,".png",!1,"",0,0,0,!1,"http://www.worldwidetelescope.org/thumbnails/DSS.png",!0,!1,0,0,0,"","","","",1,"Sky")),"earth"===Ec.startMode&&Ec.singleton.renderContext.set_backgroundImageset(dd.create("Blue Marble","http://www.worldwidetelescope.org/wwtweb/tiles.aspx?q={1},{2},{3},bm200407",0,3,3,101,0,7,256,180,".png",!1,"",0,0,0,!1,"http://www.worldwidetelescope.org/wwtweb/thumbnail.aspx?name=bm200407",!0,!1,0,0,0,"","","","",6371e3,"Earth")),"bing"===Ec.startMode&&Ec.singleton.renderContext.set_backgroundImageset(dd.create("Virtual Earth Aerial","http://a{0}.ortho.tiles.virtualearth.net/tiles/a{1}.jpeg?g=15",0,3,0,102,1,20,256,360,".png",!1,"0123",0,0,0,!1,"http://www.worldwidetelescope.org/wwtweb/thumbnail.aspx?name=earth",!0,!1,0,0,0,"","","","",6371e3,"Earth"))}return Ec.singleton.renderContext.viewCamera.lng+=0,Ec.singleton.renderContext._initGL(),Ec.singleton.render(),Ec.scriptInterface},Ec.useUserLocation=function(){navigator.geolocation.getCurrentPosition(Ec._getLocation,Ec._getLocationError)},Ec._getLocation=function(a){bc.get_globalSettings().set_locationLat(a.coords.latitude),bc.get_globalSettings().set_locationLng(a.coords.longitude),bc.get_globalSettings().set_locationAltitude(a.coords.altitude)},Ec._getLocationError=function(a){if(null!=a&&null!=a.coords){a.coords.latitude,a.coords.longitude}},Ec._createCanvasElement=function(a){{var b=null,c=document.getElementById(a);c.attributes.getNamedItem("style")}return b=document.createElement("canvas"),b.height=parseInt(c.style.height),b.width=parseInt(c.style.width),c.appendChild(b),b},Ec.showFolderUI=function(){Ec.singleton.createExplorerUI()},Ec.go=function(a,b,c,d){null!=a&&a.length>0&&(Ec.startMode=a),d&&(Ec.startLat=b,Ec.startLng=c,Ec.startZoom=6*d)},Ec.setBackgroundImageName=function(a){Ec.imageSetName=a},Ec.setForegroundImageName=function(a){Ec.imageSetName=a},Ec.showLayers=function(a){Ec.showDataLayers=a};var Kg={_addAnnotation:function(a){this._annotations.push(a)},_removeAnnotation:function(a){ss.remove(this._annotations,a)},_clearAnnotations:function(){this._annotations.length=0},get__zoomMax:function(){return null!=this.renderContext.get_backgroundImageset()&&4===this.renderContext.get_backgroundImageset().get_dataSetType()?this._zoomMaxSolarSystem:this._zoomMax},get_zoomMin:function(){return null!=this.renderContext.get_backgroundImageset()&&4===this.renderContext.get_backgroundImageset().get_dataSetType()?this._zoomMinSolarSystem/1e4:this._zoomMin},set_zoomMin:function(a){return this._zoomMin=a,a},_notifyMoveComplete:function(){},render:function(){var a=this;this.renderType=null!=this.renderContext.get_backgroundImageset()?this.renderContext.get_backgroundImageset().get_dataSetType():2;var b=!1;if(this.canvas.width!==parseInt(this.canvas.parentNode.style.width)&&(this.canvas.width=parseInt(this.canvas.parentNode.style.width),b=!0),this.canvas.height!==parseInt(this.canvas.parentNode.style.height)&&(this.canvas.height=parseInt(this.canvas.parentNode.style.height),b=!0),b&&null!=this.explorer&&this.explorer.refresh(),ic.lastDeepestLevel=ic.deepestLevel,_b.width=this.renderContext.width=this.canvas.width,_b.height=this.renderContext.height=this.canvas.height,ic.tilesInView=0,ic.tilesTouched=0,ic.deepestLevel=0,null!=this.get__mover()){if(gc.set_now(this.get__mover().get_currentDateTime()),Zb.updatePlanetLocations(this.get_solarSystemMode()),null!=this.get__mover()){var c=this.get__mover().get_currentPosition();if(this.renderContext.targetCamera=c.copy(),this.renderContext.viewCamera=c.copy(),this.renderContext.space&&bc.get_active().get_galacticMode()){var d=Pc.j2000toGalactic(15*c.get_RA(),c.get_dec());this.renderContext.targetAlt=this.renderContext.alt=d[1],this.renderContext.targetAz=this.renderContext.az=d[0]}else if(this.renderContext.space&&bc.get_active().get_localHorizonMode()){var e=Pc.equitorialToHorizon(Pc.fromRaDec(c.get_RA(),c.get_dec()),gc.get_location(),gc.get_now());this.renderContext.targetAlt=this.renderContext.alt=e.get_alt(),this.renderContext.targetAz=this.renderContext.az=e.get_az()}this.get__mover().get_complete()&&(Ec.scriptInterface._fireArrived(this.get__mover().get_currentPosition().get_RA(),this.get__mover().get_currentPosition().get_dec(),Ec.singleton.renderContext.viewCamera.zoom),this.set__mover(null),this._notifyMoveComplete())}}else gc.updateClock(),Zb.updatePlanetLocations(this.get_solarSystemMode()),this._updateViewParameters();if(this.renderContext.clear(),4===this.renderType){if(this._solarSystemTrack<20){Zb.getAdjustedPlanetRadius(this._solarSystemTrack),this.renderContext.get_solarSystemCameraDistance(),this.renderContext.get_fovLocal()}null==this._trackingObject,this.renderContext.setupMatricesSolarSystem(!0);var f=this.renderContext.viewCamera.zoom,g=Math.min(1,Math.max(0,Math.log(f)-8.4)/4.2),h=(Math.min(1,Math.max(0,Math.log(f)-17.9)/2.3),this.renderContext.get_world()),i=this.renderContext.get_world().clone();i._multiply(Uc._scaling(1e5,1e5,1e5)),i._multiply(Uc._rotationX(23.5/180*Math.PI)),i._multiply(Uc.translation(this.renderContext.cameraPosition)),this.renderContext.set_world(i),this.renderContext.set_worldBase(i),this.renderContext.space=!0,this.renderContext.makeFrustum();var j=this.renderContext.lighting;if(this.renderContext.lighting=!1,bc.get_active().get_solarSystemMilkyWay()&&1>g&&(null==this._milkyWayBackground&&(this._milkyWayBackground=this.getImagesetByName("Digitized Sky Survey (Color)")),null!=this._milkyWayBackground)){_b.cullInside=!0;this.renderContext.drawImageSet(this._milkyWayBackground,100),_b.cullInside=!1}this._drawSkyOverlays(),this.renderContext.lighting=j,this.renderContext.space=!1,this.renderContext.set_world(h),this.renderContext.set_worldBase(h),this.renderContext.makeFrustum(),this.renderContext.get_solarSystemCameraDistance()<15e3&&(this.renderContext.setupMatricesSolarSystem(!1),Zb.drawPlanets3D(this.renderContext,1,this.renderContext.viewCamera.viewTarget))}else{if(this.renderType&&1!==this.renderType?this.renderContext.setupMatricesSpace3d(this.renderContext.width,this.renderContext.height):this.renderContext._setupMatricesLand3d(),this.renderContext.drawImageSet(this.renderContext.get_backgroundImageset(),100),null!=this.renderContext.get_foregroundImageset())if(100!==this.renderContext.viewCamera.opacity&&null==this.renderContext.gl){(this._foregroundCanvas.width!==this.renderContext.width||this._foregroundCanvas.height!==this.renderContext.height)&&(this._foregroundCanvas.width=ss.truncate(this.renderContext.width),this._foregroundCanvas.height=ss.truncate(this.renderContext.height));var k=this.renderContext.device;this._fgDevice.clearRect(0,0,this.renderContext.width,this.renderContext.height),this.renderContext.device=this._fgDevice,this.renderContext.drawImageSet(this.renderContext.get_foregroundImageset(),100),this.renderContext.device=k,this.renderContext.device.save(),this.renderContext.device.globalAlpha=this.renderContext.viewCamera.opacity/100,this.renderContext.device.drawImage(this._foregroundCanvas,0,0),this.renderContext.device.restore() }else this.renderContext.drawImageSet(this.renderContext.get_foregroundImageset(),this.renderContext.viewCamera.opacity);if(2===this.renderType&&(Zb.drawPlanets(this.renderContext,1),this.constellation=Lc.containment.findConstellationForPoint(this.renderContext.viewCamera.get_RA(),this.renderContext.viewCamera.get_dec()),this._drawSkyOverlays(),Pb._draw(this.renderContext,1,!0,"Sky",!0,!0)),this.renderType||Pb._draw(this.renderContext,1,!1,"Earth",!1,!1),bc.get_current().get_showCrosshairs()&&this._drawCrosshairs(this.renderContext),null!=this.uiController)this.uiController.render(this.renderContext);else{for(var l=0,m=ss.enumerate(this._annotations);m.moveNext();){var n=m.current;n.draw(this.renderContext),l++}if(ss.now()-this._lastMouseMove>400){var o=this.getCoordinatesForScreenPoint(this._hoverTextPoint.x,this._hoverTextPoint.y);this._annotationHover(o.x,o.y,this._hoverTextPoint.x,this._hoverTextPoint.y),this._lastMouseMove=new Date(2100,1,1)}ss.emptyString(this._hoverText)||this._drawHoverText(this.renderContext)}}this._frameCount++,jc.decimateQueue(),jc.processQueue(this.renderContext),ic.currentRenderGeneration++;var p=ss.now(),q=p-this._lastUpdate;q>1e3&&(this._lastUpdate=p,this._frameCount=0,_b.trianglesRendered=0,_b.trianglesCulled=0),setTimeout(function(){a.render()},20)},_drawSkyOverlays:function(){bc.get_active().get_showConstellationPictures()&&Lc.drawArtwork(this.renderContext),bc.get_active().get_showConstellationFigures()&&(null==Ec.constellationsFigures&&(Ec.constellationsFigures=Lc.create("Constellations","http://www.worldwidetelescope.org/data/figures.txt",!1,!1,!1)),Ec.constellationsFigures.draw(this.renderContext,!1,"UMA",!1)),bc.get_active().get_showEclipticGrid()&&(Mb.drawEclipticGrid(this.renderContext,1,Kc.get_green()),bc.get_active().get_showEclipticGridText()&&Mb.drawEclipticGridText(this.renderContext,1,Kc.get_green())),bc.get_active().get_showGalacticGrid()&&(Mb.drawGalacticGrid(this.renderContext,1,Kc.get_cyan()),bc.get_active().get_showGalacticGridText()&&Mb.drawGalacticGridText(this.renderContext,1,Kc.get_cyan())),bc.get_active().get_showAltAzGrid()&&(Mb.drawAltAzGrid(this.renderContext,1,Kc.get_magenta()),bc.get_active().get_showAltAzGridText()&&Mb.drawAltAzGridText(this.renderContext,1,Kc.get_magenta())),bc.get_active().get_showPrecessionChart()&&Mb.drawPrecessionChart(this.renderContext,1,Kc.get_orange()),bc.get_active().get_showEcliptic()&&(Mb.drawEcliptic(this.renderContext,1,Kc.get_blue()),bc.get_active().get_showEclipticOverviewText()&&Mb.drawEclipticText(this.renderContext,1,Kc.get_blue())),bc.get_active().get_showGrid()&&(Mb.drawEquitorialGrid(this.renderContext,1,Kc.get_white()),bc.get_active().get_showEquatorialGridText()&&Mb.drawEquitorialGridText(this.renderContext,1,Kc.get_white())),bc.get_active().get_showConstellationBoundries()&&(null==Ec.constellationsBoundries&&(Ec.constellationsBoundries=Lc.create("Constellations","http://www.worldwidetelescope.org/data/constellations.txt",!0,!1,!1)),Ec.constellationsBoundries.draw(this.renderContext,bc.get_active().get_showConstellationSelection(),this.constellation,!1)),bc.get_active().get_showConstellationLabels()&&Lc.drawConstellationNames(this.renderContext,1,Kc.get_yellow())},_drawHoverText:function(a){if(null==a.gl){var b=a.device;b.save(),b.fillStyle="White",b.font="15px Arial",b.fillText(this._hoverText,this._hoverTextPoint.x,this._hoverTextPoint.y),b.restore()}},rAtoViewLng:function(a){return(180-a/24*360-180+540)%360-180},_updateViewParameters:function(){if(this.renderContext.space&&this._tracking&&null!=this._trackingObject)if(bc.get_active().get_galacticMode()&&this.renderContext.space){var a=Pc.j2000toGalactic(15*this._trackingObject.get_RA(),this._trackingObject.get_dec());this.renderContext.targetAlt=this.renderContext.alt=a[1],this.renderContext.targetAz=this.renderContext.az=a[0]}else if(this.renderContext.space&&bc.get_active().get_localHorizonMode()){var b=Pc.equitorialToHorizon(Pc.fromRaDec(this._trackingObject.get_RA(),this._trackingObject.get_dec()),gc.get_location(),gc.get_now());this.renderContext.targetAlt=b.get_alt(),this.renderContext.targetAz=b.get_az()}else this.renderContext.viewCamera.lng=this.renderContext.targetCamera.lng=this.rAtoViewLng(this._trackingObject.get_RA()),this.renderContext.viewCamera.lat=this.renderContext.targetCamera.lat=this._trackingObject.get_dec();else this.get_solarSystemMode()||(this._tracking=!1,this._trackingObject=null);var c=1-.8,d=.8;if(!this._tracking){var e=this.renderContext.viewCamera.zoom/4e3;this.renderContext.viewCamera.zoom>360&&(e=.009),this.renderContext.space&&(bc.get_active().get_localHorizonMode()||bc.get_active().get_galacticMode())?1===(Math.abs(this.renderContext.targetAlt-this.renderContext.alt)>=e|Math.abs(this.renderContext.targetAz-this.renderContext.az)>=e)&&(this.renderContext.alt+=(this.renderContext.targetAlt-this.renderContext.alt)/10,this.renderContext.az+=Math.abs(this.renderContext.targetAz-this.renderContext.az)>170?this.renderContext.targetAz>this.renderContext.az?(this.renderContext.targetAz-(360+this.renderContext.az))/10:(360+this.renderContext.targetAz-this.renderContext.az)/10:(this.renderContext.targetAz-this.renderContext.az)/10,this.renderContext.az=(this.renderContext.az+720)%360):1===(Math.abs(this.renderContext.targetCamera.lat-this.renderContext.viewCamera.lat)>=e|Math.abs(this.renderContext.targetCamera.lng-this.renderContext.viewCamera.lng)>=e)?(this.renderContext.viewCamera.lat+=(this.renderContext.targetCamera.lat-this.renderContext.viewCamera.lat)/10,this.renderContext.viewCamera.lng+=Math.abs(this.renderContext.targetCamera.lng-this.renderContext.viewCamera.lng)>170?this.renderContext.targetCamera.lng>this.renderContext.viewCamera.lng?(this.renderContext.targetCamera.lng-(360+this.renderContext.viewCamera.lng))/10:(360+this.renderContext.targetCamera.lng-this.renderContext.viewCamera.lng)/10:(this.renderContext.targetCamera.lng-this.renderContext.viewCamera.lng)/10,this.renderContext.viewCamera.lng=(this.renderContext.viewCamera.lng+720)%360):(this.renderContext.viewCamera.lat!==this.renderContext.targetCamera.lat||this.renderContext.viewCamera.lng!==this.renderContext.targetCamera.lng)&&(this.renderContext.viewCamera.lat=this.renderContext.targetCamera.lat,this.renderContext.viewCamera.lng=this.renderContext.targetCamera.lng)}this.renderContext.viewCamera.zoom=d*this.renderContext.viewCamera.zoom+c*this.renderContext.targetCamera.zoom,this.renderContext.viewCamera.rotation=d*this.renderContext.viewCamera.rotation+c*this.renderContext.targetCamera.rotation,this.renderContext.viewCamera.angle=d*this.renderContext.viewCamera.angle+c*this.renderContext.targetCamera.angle},move:function(a,b){var c=this.renderContext.get_fovScale()/3600;4===this.renderContext.get_backgroundImageset().get_dataSetType()&&(c=.06);var d=c/Math.max(.2,Math.cos(this.renderContext.viewCamera.lat/180*Math.PI));this.renderContext.get_backgroundImageset().get_dataSetType()&&1!==this.renderContext.get_backgroundImageset().get_dataSetType()&&4!==this.renderContext.get_backgroundImageset().get_dataSetType()||(d=6.3*d,c=6.3*c),this.renderContext.space&&(bc.get_active().get_galacticMode()||bc.get_active().get_localHorizonMode())?(a=bc.get_active().get_localHorizonMode()?-a:a,this.renderContext.targetAz+=a*d,this.renderContext.targetAz=(this.renderContext.targetAz+720)%360,this.renderContext.targetAlt+=b*c,this.renderContext.targetAlt>90&&(this.renderContext.targetAlt=90),this.renderContext.targetAlt<-90&&(this.renderContext.targetAlt=-90)):(this.renderContext.targetCamera.lng-=a*d,this.renderContext.targetCamera.lng=(this.renderContext.targetCamera.lng+720)%360,this.renderContext.targetCamera.lat+=b*c,this.renderContext.targetCamera.lat>90&&(this.renderContext.targetCamera.lat=90),this.renderContext.targetCamera.lat<-90&&(this.renderContext.targetCamera.lat=-90)),bc.get_globalSettings().get_smoothPan()||(this.renderContext.viewCamera=this.renderContext.targetCamera.copy()),a&&b&&(this._tracking=!1,this._trackingObject=null)},zoom:function(a){this.renderContext.targetCamera.zoom*=a,this.renderContext.targetCamera.zoom>360&&(this.renderContext.targetCamera.zoom=360),bc.get_globalSettings().get_smoothPan()||(this.renderContext.viewCamera=this.renderContext.targetCamera.copy())},setup:function(a){a.addEventListener("dblclick",ss.bind("onDoubleClick",this),!1),a.addEventListener("mousedown",ss.bind("onMouseDown",this),!1),a.addEventListener("mousewheel",ss.bind("onMouseWheel",this),!1),a.addEventListener("DOMMouseScroll",ss.bind("onMouseWheel",this),!1),a.addEventListener("touchstart",ss.bind("onTouchStart",this),!1),a.addEventListener("touchmove",ss.bind("onTouchMove",this),!1),a.addEventListener("touchend",ss.bind("onTouchEnd",this),!1),a.addEventListener("gesturechange",ss.bind("onGestureChange",this),!1),a.addEventListener("gesturestart",ss.bind("onGestureStart",this),!1),a.addEventListener("gestureend",ss.bind("onGestureEnd",this),!1),document.body.addEventListener("keydown",ss.bind("onKeyDown",this),!1),a.addEventListener("pointerdown",ss.bind("onPointerDown",this),!1),a.addEventListener("pointermove",ss.bind("onPointerMove",this),!1),a.addEventListener("pointerup",ss.bind("onPointerUp",this),!1),this.renderContext.viewCamera.lat=Ec.startLat,this.renderContext.viewCamera.lng=Ec.startLng,this.renderContext.viewCamera.zoom=Ec.startZoom,this.renderContext.targetCamera=this.renderContext.viewCamera.copy(),null==this.renderContext.gl&&(this._foregroundCanvas=document.createElement("canvas"),this._foregroundCanvas.width=a.width,this._foregroundCanvas.height=a.height,this._fgDevice=this._foregroundCanvas.getContext("2d")),this._webFolder=new ad,this._webFolder.loadFromUrl("http://www.worldwidetelescope.org/wwtweb/catalog.aspx?X=ImageSets5",ss.bind("setupComplete",this));var b=new Cc("http://www.worldwidetelescope.org/wwtweb/weblogin.aspx?user=12345678-03D2-4935-8D0F-DCE54C9113E5&Version=HTML5&webkey=AX2011Gqqu&platform=web");b.send()},setupComplete:function(){Dc.loadImagesets(this._webFolder),Ec.scriptInterface._fireReady()},createExplorerUI:function(){var a=this;if(null==this.explorer){this.explorer=bd.create();var b=document.getElementById("UI");b.insertBefore(this.explorer.canvas),Ec.exploreRoot=new ad,Ec.exploreRoot.loadFromUrl("http://www.worldwidetelescope.org/wwtweb/catalog.aspx?W=NewExploreRoot",function(){a.explorer._addItems(Ec.exploreRoot.get_children()),a.explorer.refresh()})}},onKeyDown:function(a){null!=this.uiController&&this.uiController.keyDown(this,a)},onDoubleClick:function(){Ec.showDataLayers=!0},onGestureStart:function(){this._mouseDown=!1,this._beginZoom=this.renderContext.viewCamera.zoom},onGestureChange:function(a){var b=a;this._mouseDown=!1,this.renderContext.targetCamera.zoom=this.renderContext.viewCamera.zoom=Math.min(360,this._beginZoom*(1/b.scale))},onGestureEnd:function(a){this._mouseDown=!1},_annotationclicked:function(a,b,c,d){if(null!=this._annotations&&this._annotations.length>0)for(var e=0,f=ss.enumerate(this._annotations);f.moveNext();){var g=f.current;if(g.hitTest(this.renderContext,a,b,c,d))return Ec.scriptInterface._fireAnnotationclicked(a,b,g.get_id()),!0;e++}return!1},_annotationHover:function(a,b,c,d){if(null!=this._annotations&&this._annotations.length>0)for(var e=0,f=ss.enumerate(this._annotations);f.moveNext();){var g=f.current;if(g.hitTest(this.renderContext,a,b,c,d))return this._hoverText=g.get_label(),this._hoverTextPoint=Tc.create(c,d),!0;e++}return!1},onTouchStart:function(a){var b=a;if(b.preventDefault(),b.stopPropagation(),this._lastX=b.targetTouches[0].pageX,this._lastY=b.targetTouches[0].pageY,2===b.targetTouches.length)return void(this._isPintching=!0);if(null!=this.uiController){var c=new Fc(this._lastX,this._lastY);if(this.uiController.mouseDown(this,c))return this._mouseDown=!1,void(this._dragging=!1)}this._mouseDown=!0},onPointerDown:function(a){var b=a,c=0,d=arguments[0],e=arguments[0].target;if(e.setPointerCapture?e.setPointerCapture(d.pointerId):e.msSetPointerCapture&&e.msSetPointerCapture(d.pointerId),this._pointerIds[0]){if(this._pointerIds[1])return;this._pointerIds[1]=b.pointerId,c=1}else this._pointerIds[0]=b.pointerId,c=0;this._rect[c]=Tc.create(a.offsetX,a.offsetY)},onPointerMove:function(a){var b=a,c=0;if(this._pointerIds[0]===b.pointerId)c=0;else{if(this._pointerIds[1]!==b.pointerId)return;c=1}if(this._pointerIds[0]&&this._pointerIds[1]){if(null!=this._rect[0]){var d=this.getDistance(this._rect[0],this._rect[1]);this._rect[c]=Tc.create(a.offsetX,a.offsetY);var e=this.getDistance(this._rect[0],this._rect[1]),f=d/e;this.zoom(f)}a.stopPropagation(),a.preventDefault()}this._rect[c]=Tc.create(a.offsetX,a.offsetY)},onPointerUp:function(a){var b=a;if(this._pointerIds[0]===b.pointerId)this._pointerIds[0]=0;else{if(this._pointerIds[1]!==b.pointerId)return;this._pointerIds[1]=0}},onTouchMove:function(a){var b=a;if(this._isPintching)return void this.pinchMove(b);if(b.preventDefault(),b.stopPropagation(),this._mouseDown){this._dragging=!0;var c=b.targetTouches[0].pageX-this._lastX,d=b.targetTouches[0].pageY-this._lastY;this.move(c,d),this._lastX=b.targetTouches[0].pageX,this._lastY=b.targetTouches[0].pageY}else if(null!=this.uiController&&this.uiController.mouseMove(this,a))return a.preventDefault(),void a.stopPropagation()},onTouchEnd:function(a){var b=a;if(b.preventDefault(),b.stopPropagation(),this._rect=new Array(2),this._isPintching)return void(b.touches.length<2&&(this._isPintching=!1));if(null!=this.uiController){var c=new Fc(this._lastX,this._lastY);if(this.uiController.mouseUp(this,c))return this._mouseDown=!1,void(this._dragging=!1)}this._mouseDown=!1,this._dragging=!1},pinchStart:function(a){var b=a.touches[0],c=a.touches[1];this._rect[0]=Tc.create(b.pageX,b.pageY),this._rect[1]=Tc.create(c.pageX,c.pageY),a.stopPropagation(),a.preventDefault()},pinchMove:function(a){var b=a.touches[0],c=a.touches[1],d=new Array(2);if(d[0]=Tc.create(b.pageX,b.pageY),d[1]=Tc.create(c.pageX,c.pageY),null!=this._rect[0]){var e=this.getDistance(this._rect[0],this._rect[1]),f=this.getDistance(d[0],d[1]),g=e/f;this.zoom(g)}this._rect=d,a.stopPropagation(),a.preventDefault()},getDistance:function(a,b){var c,d;return c=a.x-b.x,d=a.y-b.y,Math.sqrt(c*c+d*d)},onMouseDown:function(a){document.addEventListener("mousemove",ss.bind("onMouseMove",this),!1),document.addEventListener("mouseup",ss.bind("onMouseUp",this),!1),null!=this.uiController&&this.uiController.mouseDown(this,a)||(this._mouseDown=!0,this._lastX=zc.offsetX(this.canvas,a),this._lastY=zc.offsetY(this.canvas,a))},onMouseMove:function(a){if(this._lastMouseMove=ss.now(),this._hoverTextPoint=Tc.create(zc.offsetX(this.canvas,a),zc.offsetY(this.canvas,a)),this._hoverText="",this._mouseDown)a.preventDefault(),a.stopPropagation(),this._moved=!0,a.ctrlKey?this._tilt(zc.offsetX(this.canvas,a)-this._lastX,zc.offsetY(this.canvas,a)-this._lastY):this.move(zc.offsetX(this.canvas,a)-this._lastX,zc.offsetY(this.canvas,a)-this._lastY),this._lastX=zc.offsetX(this.canvas,a),this._lastY=zc.offsetY(this.canvas,a);else if(null!=this.uiController&&this.uiController.mouseMove(this,a))return a.preventDefault(),void a.stopPropagation()},_tilt:function(a,b){this.renderContext.targetCamera.rotation+=.001*a,this.renderContext.targetCamera.angle+=.001*b,this.renderContext.targetCamera.angle<-1.52&&(this.renderContext.targetCamera.angle=-1.52),this.renderContext.targetCamera.angle>0&&(this.renderContext.targetCamera.angle=0)},onMouseUp:function(a){if(document.removeEventListener("mousemove",ss.bind("onMouseMove",this),!1),document.removeEventListener("mouseup",ss.bind("onMouseUp",this),!1),null!=this.uiController&&this.uiController.mouseUp(this,a))return void(this._mouseDown=!1);if(this._mouseDown&&!this._moved){var b=this.getCoordinatesForScreenPoint(zc.offsetX(this.canvas,a),zc.offsetY(this.canvas,a));this._annotationclicked(b.x,b.y,zc.offsetX(this.canvas,a),zc.offsetY(this.canvas,a))||Ec.scriptInterface._fireClick(b.x,b.y)}this._mouseDown=!1,this._moved=!1},getCoordinatesForScreenPoint:function(a,b){var c,d,e=Tc.create(a,b);return d=this.transformPickPointToWorldSpace(e,this.renderContext.width,this.renderContext.height),c=Pc.cartesianToSphericalSky(d)},transformPickPointToWorldSpace:function(a,b,c){var d,e,f=new Sc;f.x=(2*a.x/b-1)/this.renderContext.get_projection().get_m11(),f.y=(2*a.y/c-1)/this.renderContext.get_projection().get_m22(),f.z=1;var g=Uc.multiplyMatrix(this.renderContext.get_view(),this.renderContext.get_world());return g.invert(),e=new Sc,d=new Sc,e.x=f.x*g.get_m11()+f.y*g.get_m21()+f.z*g.get_m31(),e.y=f.x*g.get_m12()+f.y*g.get_m22()+f.z*g.get_m32(),e.z=f.x*g.get_m13()+f.y*g.get_m23()+f.z*g.get_m33(),e.normalize(),e},onMouseWheel:function(a){var b,c=a;b=c.detail?-1*c.detail:c.wheelDelta/40,this.zoom(b>0?.9:1.1)},gotoRADecZoom:function(a,b,c,d){a=Wc.clamp(a,0,24),b=Wc.clamp(b,-90,90),c=Wc.clamp(c,this.get_zoomMin(),this.get__zoomMax()),this._tracking=!1,this._trackingObject=null,this.gotoTargetFull(!1,d,Ic.create(b,Ec.singleton.renderContext.rAtoViewLng(a),c,Ec.singleton.renderContext.viewCamera.rotation,Ec.singleton.renderContext.viewCamera.angle,Ec.singleton.renderContext.viewCamera.opacity),Ec.singleton.renderContext.get_foregroundImageset(),Ec.singleton.renderContext.get_backgroundImageset())},get_solarSystemMode:function(){return null==this.renderContext.get_backgroundImageset()?!1:4===this.renderContext.get_backgroundImageset().get_dataSetType()},gotoTarget:function(a,b,c,d){if(null!=a){if(d&&this.get_solarSystemMode()&&(536870912===a.get_classification()&&4!==a.get_type()||1===a.get_classification()||1048576===a.get_classification()&&a.get_distance()>0)){var e=65536;if(1===a.get_classification()||1048576===a.get_classification())e=20;else try{e=65536!==a.get_target()?a.get_target():Zb.getPlanetIDFromName(a.get_name())}catch(f){}if(65536!==e){if(this._trackingObject=a,e===this._solarSystemTrack&&1!==a.get_classification()&&1048576!==a.get_classification())return void this.gotoTarget3(a.get_camParams(),b,c);var g=4;20===e?g=17:g+=13*(101-bc.get_active().get_solarSystemScale())/100,c&&(g=1);var h=this.renderContext.viewCamera.copy();h.targetReferenceFrame="",h.target=e;var i=10;if(20===e){i=1048576===a.get_classification()?1404946007758:6323967.17;var j=Pc.raDecTo3dAu(a.get_RA(),a.get_dec(),a.get_distance()),k=Pc.meanObliquityOfEcliptic(gc.get_jNow())/180*Math.PI;j.rotateX(k),h.viewTarget=Sc.negate(h.viewTarget)}else{switch(h.viewTarget=Zb.getPlanet3dLocationJD(e,gc.getJNowForFutureTime(g)),e){case 0:i=.6;break;case 1:i=4e-4;break;case 2:i=4e-4;break;case 3:i=4e-4;break;case 4:i=.007;break;case 5:i=.007;break;case 6:i=.004;break;case 7:i=.004;break;case 8:i=4e-4;break;case 9:i=4e-4;break;case 10:i=4e-4;break;case 11:i=4e-4;break;case 12:i=4e-4;break;case 13:i=4e-4;break;case 19:i=4e-4;break;case 20:i=10}i*=bc.get_active().get_solarSystemScale()}var l=this.renderContext.viewCamera.copy();20!==this._solarSystemTrack||ss.emptyString(this.renderContext.get_trackingFrame())||(l=this.renderContext.customTrackingParams,this.renderContext.set_trackingFrame("")),h.zoom=i;var m=h.viewTarget;if(m.subtract(l.viewTarget),1===a.get_classification()&&(m=Sc.negate(m)),m.length()){var n=m.toRaDec();h.lat=20===e?-n.y:n.y,h.lng=15*n.x-90}else h.lat=this.renderContext.viewCamera.lat,h.lng=this.renderContext.viewCamera.lng;20!==e&&(h.viewTarget=Zb.getPlanetTargetPoint(e,h.lat,h.lng,gc.getJNowForFutureTime(g)));var o=new ed(l,h,g,gc.get_now(),gc.getTimeForFutureTime(g),3);return o.fastDirectionMove=!0,void this.set__mover(o)}}this._tracking=!1,this._trackingObject=null;var p=a.get_camParams().copy();null!=this.renderContext.get_backgroundImageset()&&a.get_type()!==this.renderContext.get_backgroundImageset().get_dataSetType()?(this.renderContext.targetCamera=a.get_camParams().copy(),this.renderContext.viewCamera=this.renderContext.targetCamera.copy(),this.renderContext.set_backgroundImageset(this.getDefaultImageset(a.get_type(),3)),c=!0):this.get_solarSystemMode()&&a.get_target()!==this._solarSystemTrack&&(this.renderContext.targetCamera=a.get_camParams().copy(),this.renderContext.viewCamera=this.renderContext.targetCamera.copy(),this._solarSystemTrack=a.get_target(),c=!0),128===a.get_classification()?(p.zoom=this.get__zoomMax(),this.gotoTargetFull(!1,c,p,null,null)):(this._solarSystemTrack=a.get_target(),this.gotoTargetFull(b,c,p,a.get_studyImageset(),a.get_backgroundImageset()),d&&(this._tracking=!0,this._trackingObject=a))}},gotoTarget3:function(a,b,c){this._tracking=!1,this._trackingObject=null,this.gotoTargetFull(b,c,a,this.renderContext.get_foregroundImageset(),this.renderContext.get_backgroundImageset())},gotoTargetFull:function(a,b,c,d,e){Ec.set_renderNeeded(!0),this._tracking=!1,this._trackingObject=null,this._targetStudyImageset=d,this._targetBackgroundImageset=e,a?(c.zoom=this.renderContext.viewCamera.zoom,c.angle=this.renderContext.viewCamera.angle,c.rotation=this.renderContext.viewCamera.rotation):-1!==c.zoom&&c.zoom||(c.zoom=this.renderContext.space?1.40625:.09),b||Math.abs(this.renderContext.viewCamera.lat-c.lat)<1e-12&&Math.abs(this.renderContext.viewCamera.lng-c.lng)<1e-12&&Math.abs(this.renderContext.viewCamera.zoom-c.zoom)<1e-12?(this.set__mover(null),this.renderContext.targetCamera=c.copy(),this.renderContext.viewCamera=this.renderContext.targetCamera.copy(),this._mover_Midpoint(),this._moving=!0):(this.set__mover(fd.create(this.renderContext.viewCamera,c)),Ec.set_renderNeeded(!0),this.get__mover().set_midpoint(ss.bind("_mover_Midpoint",this)))},_freezeView:function(){this.renderContext.viewCamera=this.renderContext.targetCamera.copy(),this.set__mover(null)},get__mover:function(){return this.renderContext.viewMover},set__mover:function(a){return this.renderContext.viewMover=a,Ec.set_renderNeeded(!0),a},fadeInImageSet:function(a){null!=this.renderContext.get_backgroundImageset()&&a.get_dataSetType()!==this.renderContext.get_backgroundImageset().get_dataSetType()&&(jc.purgeQueue(),jc.clearCache()),this.renderContext.set_backgroundImageset(a)},_mover_Midpoint:function(){(null!=this._targetStudyImageset&&null==this.renderContext.get_foregroundImageset()||null!=this.renderContext.get_foregroundImageset()&&!this.renderContext.get_foregroundImageset().equals(this._targetStudyImageset))&&this.renderContext.set_foregroundImageset(this._targetStudyImageset),null==this.renderContext.get_backgroundImageset()||null==this._targetBackgroundImageset||this.renderContext.get_backgroundImageset().equals(this._targetBackgroundImageset)||this.fadeInImageSet(null!=this._targetBackgroundImageset&&this._targetBackgroundImageset.get_generic()?this._getRealImagesetFromGeneric(this._targetBackgroundImageset):this._targetBackgroundImageset)},getDefaultImageset:function(a,b){for(var c=ss.enumerate(Ec.imageSets);c.moveNext();){var d=c.current;if(d.get_defaultSet()&&d.get_bandPass()===b&&d.get_dataSetType()===a)return d}for(var e=ss.enumerate(Ec.imageSets);e.moveNext();){var d=e.current;if(d.get_bandPass()===b&&d.get_dataSetType()===a)return d}for(var f=ss.enumerate(Ec.imageSets);f.moveNext();){var d=f.current;if(d.get_dataSetType()===a)return d}return Ec.imageSets[0]},_getRealImagesetFromGeneric:function(a){for(var b=ss.enumerate(Ec.imageSets);b.moveNext();){var c=b.current;if(c.get_defaultSet()&&c.get_bandPass()===a.get_bandPass()&&c.get_dataSetType()===a.get_dataSetType())return c}for(var d=ss.enumerate(Ec.imageSets);d.moveNext();){var c=d.current;if(c.get_bandPass()===a.get_bandPass()&&c.get_dataSetType()===a.get_dataSetType())return c}return Ec.imageSets[0]},_hideUI:function(){},_closeTour:function(){},playTour:function(a){var b=this;if(ss.canCast(this.uiController,qc)){var c=this.uiController;c.stop(!1)}this._tour=pc.fromUrl(a,function(){var a=new qc;a.set_tour(b._tour),b._tour.set_currentTourstopIndex(-1),b.uiController=a,a.play()})},playCurrentTour:function(){if(ss.canCast(this.uiController,qc)){var a=this.uiController;a.play()}},pauseCurrentTour:function(){if(ss.canCast(this.uiController,qc)){var a=this.uiController;a.pauseTour()}},stopCurrentTour:function(){if(ss.canCast(this.uiController,qc)){var a=this.uiController;a.stop(!1)}},getImagesetByName:function(a){for(var b=ss.enumerate(Ec.imageSets);b.moveNext();){var c=b.current;if(c.get_name().toLowerCase().indexOf(a.toLowerCase())>-1)return c}return null},setBackgroundImageByName:function(a){var b=this.getImagesetByName(a);null!=b&&this.renderContext.set_backgroundImageset(b)},setForegroundImageByName:function(a){var b=this.getImagesetByName(a);null!=b&&this.renderContext.set_foregroundImageset(b)},_drawCrosshairs:function(a){if(null==a.gl){var b=a.device;b.save(),b.beginPath(),b.strokeStyle=bc.get_current().get_crosshairsColor(),b.lineWidth=2;var c=a.width/2,d=a.height/2,e=5;b.moveTo(c,d+e),b.lineTo(c,d-e),b.moveTo(c+e,d),b.lineTo(c-e,d),b.stroke(),b.restore()}}},Lg={};Gc.separation=function(a,b,c,d){b=b/180*Math.PI,d=d/180*Math.PI,a=a/12*Math.PI,c=c/12*Math.PI;var e=Math.cos(b)*Math.sin(d)-Math.sin(b)*Math.cos(d)*Math.cos(c-a),f=Math.cos(d)*Math.sin(c-a),g=Math.sin(b)*Math.sin(d)+Math.cos(b)*Math.cos(d)*Math.cos(c-a),h=Math.atan2(Math.sqrt(e*e+f*f),g);return h=h/Math.PI*180,0>h&&(h+=180),h},Gc.colorToUint=function(a){return a.a<<24|a.r<<16|a.g<<8|a.b},Gc.colorToUintAlpha=function(a,b){return b<<24|a.r<<16|a.g<<8|a.b};var Mg={draw:function(){},get_opacity:function(){return this._opacity},set_opacity:function(a){return this._opacity=a,a},get_id:function(){return this._id},set_id:function(a){return this._id=a,a},get_tag:function(){return this._tag},set_tag:function(a){return this._tag=a,a},get_label:function(){return this._label},set_label:function(a){return this._label=a,a},get_showHoverLabel:function(){return this._showHoverLabel},set_showHoverLabel:function(a){return this._showHoverLabel=a,a},hitTest:function(){return!1},get_center:function(){return this.center},set_center:function(a){return this.center=a,a}};Hc.create=function(a,b){var c=new Hc;return c._state=a,c._targetState=a,c._delayTime=b,c};var Ng={get_state:function(){if(this._targetState!==this._state){var a=ss.now()-this._switchedTime;return a>this._delayTime&&(this._state=this._targetState),!0}return this._state},set_state:function(a){return this._switchedTime=new Date(1990,0,0,0,0,0,0),this._state=a,this._targetState=this._state,a},get_targetState:function(){return this._targetState},set_targetState:function(a){return this._targetState!==a&&(this._switchedTime=ss.now(),this._targetState=a),a},get_opacity:function(){if(this._targetState!==this._state){var a=ss.now()-this._switchedTime;if(!(a>this._delayTime)){var b=a/this._delayTime;return this._targetState?b:1-b}this._state=this._targetState}return this._state?1:0},get_delayTime:function(){return this._delayTime},set_delayTime:function(a){return this._delayTime=a,a}};Ic.create=function(a,b,c,d,e,f){var g=new Ic;return g.lat=a,g.lng=b,g.zoom=c,g.rotation=d,g.angle=e,g.raDec=!1,g.opacity=f,g.viewTarget=Sc.create(0,0,0),g.target=20,g.targetReferenceFrame="",g},Ic.logN=function(a,b){return Math.log(a)/Math.log(b)},Ic.sinh=function(a){return(Math.exp(a)-Math.exp(-a))/2},Ic.interpolate=function(a,b,c,d,e){var f=new Ic,g=Ic.easeCurve(c,d),h=Math.min(1,2*c),i=Ic.easeCurve(h,d);return f.angle=b.angle*g+a.angle*(1-g),f.rotation=b.rotation*g+a.rotation*(1-g),e?(f.lat=b.lat*i+a.lat*(1-i),f.lng=b.lng*i+a.lng*(1-i)):(f.lat=b.lat*g+a.lat*(1-g),f.lng=b.lng*g+a.lng*(1-g)),f.zoom=Math.pow(2,Ic.logN(b.zoom,2)*g+Ic.logN(a.zoom,2)*(1-g)),f.opacity=b.opacity*g+a.opacity*(1-g),f.viewTarget=Sc.lerp(a.viewTarget,b.viewTarget,g),f.targetReferenceFrame=b.targetReferenceFrame,f.target=b.target===a.target?b.target:20,f},Ic.interpolateGreatCircle=function(a,b,c,d){{var e=new Ic,f=Ic.easeCurve(c,d),g=Math.min(1,2*c);Ic.easeCurve(g,d)}e.angle=b.angle*f+a.angle*(1-f),e.rotation=b.rotation*f+a.rotation*(1-f);var h=Pc.geoTo3dDouble(a.lat,a.lng),i=Pc.geoTo3dDouble(b.lat,b.lng),j=Sc.slerp(h,i,f),k=Pc.cartesianToLatLng(j);return e.lat=k.y,e.lng=k.x,e.zoom=Math.pow(2,Ic.logN(b.zoom,2)*f+Ic.logN(a.zoom,2)*(1-f)),e.opacity=b.opacity*f+a.opacity*(1-f),e.viewTarget=Sc.lerp(a.viewTarget,b.viewTarget,f),e.targetReferenceFrame=b.targetReferenceFrame,e.target=b.target===a.target?b.target:20,e},Ic.easeCurve=function(a,b){switch(b){case 0:return a;case 4:return Math.pow(a,2);case 1:return(1-a)*Ic.sinh(a/.2171424688)/100+a*a;case 2:return a*(1-Ic.sinh((1-a)/.2171424688)/100)+(1-a)*a;case 3:return.5>a?Ic.sinh(a/.1085712344)/100:1-Ic.sinh((1-a)/.1085712344)/100;default:return a}};var Og={copy:function(){var a=new Ic;return a.lat=this.lat,a.lng=this.lng,a.zoom=this.zoom,a.rotation=this.rotation,a.angle=this.angle,a.raDec=this.raDec,a.opacity=this.opacity,a.viewTarget=this.viewTarget.copy(),a.target=this.target,a.targetReferenceFrame=this.targetReferenceFrame,a},get_RA:function(){return(180-(this.lng-180))/360*24%24},set_RA:function(a){return this.lng=180-a/24*360-180,this.raDec=!0,a},get_dec:function(){return this.lat},set_dec:function(a){return this.lat=a,a},equals:function(a){if(ss.canCast(a,Ic)){var b=a;return Math.abs(b.angle-this.angle)>.01||Math.abs(b.lat-this.lat)>b.zoom/1e4||Math.abs(b.get_RA()-this.get_RA())>b.zoom/1e3||Math.abs(b.rotation-this.rotation)>.1||Math.abs(b.zoom-this.zoom)>Math.abs(b.zoom)/1e3?!1:!0}return!1}};Jc.fromArgb=function(a,b,c,d){var e=new Jc;return e.a=a,e.r=b,e.g=c,e.b=d,e},Jc.fromName=function(a){var b=new Jc;return b.a=255,b.r=255,b.g=255,b.b=255,b.name=a,b},Jc.load=function(a){var b=255,c=255,d=255,e=255,f=a.split(":");if(5===f.length)b=parseInt(f[1]),c=parseInt(f[2]),d=parseInt(f[3]),e=parseInt(f[4]);else{if(2===f.length)return Jc.fromName(f[1].toLowerCase());if(1===f.length&&ss.startsWith(f[0],"#"))return Jc.fromHex(f[0]);if(1===f.length&&8===f[0].length)return Jc.fromSimpleHex(f[0]);if(1===f.length)return Jc._fromWindowsNamedColor(f[0])}return Jc.fromArgb(b,c,d,e)},Jc._fromWindowsNamedColor=function(a){switch(a.toLowerCase()){case"activeborder":return Jc.fromArgb(255,180,180,180);case"activecaption":return Jc.fromArgb(255,153,180,209);case"activecaptiontext":return Jc.fromArgb(255,0,0,0);case"appworkspace":return Jc.fromArgb(255,171,171,171);case"control":return Jc.fromArgb(255,240,240,240);case"controldark":return Jc.fromArgb(255,160,160,160);case"controldarkdark":return Jc.fromArgb(255,105,105,105);case"controllight":return Jc.fromArgb(255,227,227,227);case"controllightlight":return Jc.fromArgb(255,255,255,255);case"controltext":return Jc.fromArgb(255,0,0,0);case"desktop":return Jc.fromArgb(255,255,255,255);case"graytext":return Jc.fromArgb(255,109,109,109);case"highlight":return Jc.fromArgb(255,51,153,255);case"highlighttext":return Jc.fromArgb(255,255,255,255);case"hottrack":return Jc.fromArgb(255,0,102,204);case"inactiveborder":return Jc.fromArgb(255,244,247,252);case"inactivecaption":return Jc.fromArgb(255,191,205,219);case"inactivecaptiontext":return Jc.fromArgb(255,0,0,0);case"info":return Jc.fromArgb(255,255,255,225);case"infotext":return Jc.fromArgb(255,0,0,0);case"menu":return Jc.fromArgb(255,240,240,240);case"menutext":return Jc.fromArgb(255,0,0,0);case"scrollbar":return Jc.fromArgb(255,200,200,200);case"window":return Jc.fromArgb(255,255,255,255);case"windowframe":return Jc.fromArgb(255,100,100,100);case"windowtext":return Jc.fromArgb(255,0,0,0);case"transparent":return Jc.fromArgb(0,255,255,255);case"aliceblue":return Jc.fromArgb(255,240,248,255);case"antiquewhite":return Jc.fromArgb(255,250,235,215);case"aqua":return Jc.fromArgb(255,0,255,255);case"aquamarine":return Jc.fromArgb(255,127,255,212);case"azure":return Jc.fromArgb(255,240,255,255);case"beige":return Jc.fromArgb(255,245,245,220);case"bisque":return Jc.fromArgb(255,255,228,196);case"black":return Jc.fromArgb(255,0,0,0);case"blanchedalmond":return Jc.fromArgb(255,255,235,205);case"blue":return Jc.fromArgb(255,0,0,255);case"blueviolet":return Jc.fromArgb(255,138,43,226);case"brown":return Jc.fromArgb(255,165,42,42);case"burlywood":return Jc.fromArgb(255,222,184,135);case"cadetblue":return Jc.fromArgb(255,95,158,160);case"chartreuse":return Jc.fromArgb(255,127,255,0); case"chocolate":return Jc.fromArgb(255,210,105,30);case"coral":return Jc.fromArgb(255,255,127,80);case"cornflowerblue":return Jc.fromArgb(255,100,149,237);case"cornsilk":return Jc.fromArgb(255,255,248,220);case"crimson":return Jc.fromArgb(255,220,20,60);case"cyan":return Jc.fromArgb(255,0,255,255);case"darkblue":return Jc.fromArgb(255,0,0,139);case"darkcyan":return Jc.fromArgb(255,0,139,139);case"darkgoldenrod":return Jc.fromArgb(255,184,134,11);case"darkgray":return Jc.fromArgb(255,169,169,169);case"darkgreen":return Jc.fromArgb(255,0,100,0);case"darkkhaki":return Jc.fromArgb(255,189,183,107);case"darkmagenta":return Jc.fromArgb(255,139,0,139);case"darkolivegreen":return Jc.fromArgb(255,85,107,47);case"darkorange":return Jc.fromArgb(255,255,140,0);case"darkorchid":return Jc.fromArgb(255,153,50,204);case"darkred":return Jc.fromArgb(255,139,0,0);case"darksalmon":return Jc.fromArgb(255,233,150,122);case"darkseagreen":return Jc.fromArgb(255,143,188,139);case"darkslateblue":return Jc.fromArgb(255,72,61,139);case"darkslategray":return Jc.fromArgb(255,47,79,79);case"darkturquoise":return Jc.fromArgb(255,0,206,209);case"darkviolet":return Jc.fromArgb(255,148,0,211);case"deeppink":return Jc.fromArgb(255,255,20,147);case"deepskyblue":return Jc.fromArgb(255,0,191,255);case"dimgray":return Jc.fromArgb(255,105,105,105);case"dodgerblue":return Jc.fromArgb(255,30,144,255);case"firebrick":return Jc.fromArgb(255,178,34,34);case"floralwhite":return Jc.fromArgb(255,255,250,240);case"forestgreen":return Jc.fromArgb(255,34,139,34);case"fuchsia":return Jc.fromArgb(255,255,0,255);case"gainsboro":return Jc.fromArgb(255,220,220,220);case"ghostwhite":return Jc.fromArgb(255,248,248,255);case"gold":return Jc.fromArgb(255,255,215,0);case"goldenrod":return Jc.fromArgb(255,218,165,32);case"gray":return Jc.fromArgb(255,128,128,128);case"green":return Jc.fromArgb(255,0,128,0);case"greenyellow":return Jc.fromArgb(255,173,255,47);case"honeydew":return Jc.fromArgb(255,240,255,240);case"hotpink":return Jc.fromArgb(255,255,105,180);case"indianred":return Jc.fromArgb(255,205,92,92);case"indigo":return Jc.fromArgb(255,75,0,130);case"ivory":return Jc.fromArgb(255,255,255,240);case"khaki":return Jc.fromArgb(255,240,230,140);case"lavender":return Jc.fromArgb(255,230,230,250);case"lavenderblush":return Jc.fromArgb(255,255,240,245);case"lawngreen":return Jc.fromArgb(255,124,252,0);case"lemonchiffon":return Jc.fromArgb(255,255,250,205);case"lightblue":return Jc.fromArgb(255,173,216,230);case"lightcoral":return Jc.fromArgb(255,240,128,128);case"lightcyan":return Jc.fromArgb(255,224,255,255);case"lightgoldenrodyellow":return Jc.fromArgb(255,250,250,210);case"lightgray":return Jc.fromArgb(255,211,211,211);case"lightgreen":return Jc.fromArgb(255,144,238,144);case"lightpink":return Jc.fromArgb(255,255,182,193);case"lightsalmon":return Jc.fromArgb(255,255,160,122);case"lightseagreen":return Jc.fromArgb(255,32,178,170);case"lightskyblue":return Jc.fromArgb(255,135,206,250);case"lightslategray":return Jc.fromArgb(255,119,136,153);case"lightsteelblue":return Jc.fromArgb(255,176,196,222);case"lightyellow":return Jc.fromArgb(255,255,255,224);case"lime":return Jc.fromArgb(255,0,255,0);case"limegreen":return Jc.fromArgb(255,50,205,50);case"linen":return Jc.fromArgb(255,250,240,230);case"magenta":return Jc.fromArgb(255,255,0,255);case"maroon":return Jc.fromArgb(255,128,0,0);case"mediumaquamarine":return Jc.fromArgb(255,102,205,170);case"mediumblue":return Jc.fromArgb(255,0,0,205);case"mediumorchid":return Jc.fromArgb(255,186,85,211);case"mediumpurple":return Jc.fromArgb(255,147,112,219);case"mediumseagreen":return Jc.fromArgb(255,60,179,113);case"mediumslateblue":return Jc.fromArgb(255,123,104,238);case"mediumspringgreen":return Jc.fromArgb(255,0,250,154);case"mediumturquoise":return Jc.fromArgb(255,72,209,204);case"mediumvioletred":return Jc.fromArgb(255,199,21,133);case"midnightblue":return Jc.fromArgb(255,25,25,112);case"mintcream":return Jc.fromArgb(255,245,255,250);case"mistyrose":return Jc.fromArgb(255,255,228,225);case"moccasin":return Jc.fromArgb(255,255,228,181);case"navajowhite":return Jc.fromArgb(255,255,222,173);case"navy":return Jc.fromArgb(255,0,0,128);case"oldlace":return Jc.fromArgb(255,253,245,230);case"olive":return Jc.fromArgb(255,128,128,0);case"olivedrab":return Jc.fromArgb(255,107,142,35);case"orange":return Jc.fromArgb(255,255,165,0);case"orangered":return Jc.fromArgb(255,255,69,0);case"orchid":return Jc.fromArgb(255,218,112,214);case"palegoldenrod":return Jc.fromArgb(255,238,232,170);case"palegreen":return Jc.fromArgb(255,152,251,152);case"paleturquoise":return Jc.fromArgb(255,175,238,238);case"palevioletred":return Jc.fromArgb(255,219,112,147);case"papayawhip":return Jc.fromArgb(255,255,239,213);case"peachpuff":return Jc.fromArgb(255,255,218,185);case"peru":return Jc.fromArgb(255,205,133,63);case"pink":return Jc.fromArgb(255,255,192,203);case"plum":return Jc.fromArgb(255,221,160,221);case"powderblue":return Jc.fromArgb(255,176,224,230);case"purple":return Jc.fromArgb(255,128,0,128);case"red":return Jc.fromArgb(255,255,0,0);case"rosybrown":return Jc.fromArgb(255,188,143,143);case"royalblue":return Jc.fromArgb(255,65,105,225);case"saddlebrown":return Jc.fromArgb(255,139,69,19);case"salmon":return Jc.fromArgb(255,250,128,114);case"sandybrown":return Jc.fromArgb(255,244,164,96);case"seagreen":return Jc.fromArgb(255,46,139,87);case"seashell":return Jc.fromArgb(255,255,245,238);case"sienna":return Jc.fromArgb(255,160,82,45);case"silver":return Jc.fromArgb(255,192,192,192);case"skyblue":return Jc.fromArgb(255,135,206,235);case"slateblue":return Jc.fromArgb(255,106,90,205);case"slategray":return Jc.fromArgb(255,112,128,144);case"snow":return Jc.fromArgb(255,255,250,250);case"springgreen":return Jc.fromArgb(255,0,255,127);case"steelblue":return Jc.fromArgb(255,70,130,180);case"tan":return Jc.fromArgb(255,210,180,140);case"teal":return Jc.fromArgb(255,0,128,128);case"thistle":return Jc.fromArgb(255,216,191,216);case"tomato":return Jc.fromArgb(255,255,99,71);case"turquoise":return Jc.fromArgb(255,64,224,208);case"violet":return Jc.fromArgb(255,238,130,238);case"wheat":return Jc.fromArgb(255,245,222,179);case"white":return Jc.fromArgb(255,255,255,255);case"whitesmoke":return Jc.fromArgb(255,245,245,245);case"yellow":return Jc.fromArgb(255,255,255,0);case"yellowgreen":return Jc.fromArgb(255,154,205,50);case"buttonface":return Jc.fromArgb(255,240,240,240);case"buttonhighlight":return Jc.fromArgb(255,255,255,255);case"buttonshadow":return Jc.fromArgb(255,160,160,160);case"gradientactivecaption":return Jc.fromArgb(255,185,209,234);case"gradientinactivecaption":return Jc.fromArgb(255,215,228,242);case"menubar":return Jc.fromArgb(255,240,240,240);case"menuhighlight":return Jc.fromArgb(255,51,153,255)}return Jc.fromArgb(255,255,255,255)},Jc.fromHex=function(a){var b=wc.fromHex(a.substr(1,2)),c=wc.fromHex(a.substr(3,2)),d=wc.fromHex(a.substr(5,2)),e=255;return Jc.fromArgb(e,b,c,d)},Jc.fromSimpleHex=function(a){var b=wc.fromHex(a.substr(0,2)),c=wc.fromHex(a.substr(2,2)),d=wc.fromHex(a.substr(4,2)),e=wc.fromHex(a.substr(6,2));return Jc.fromArgb(b,c,d,e)};var Pg={toFormat:function(){return ss.emptyString(this.name)?ss.format("rgb({0},{1},{2})",this.r.toString(),this.g.toString(),this.b.toString()):this.name},toString:function(){return ss.emptyString(this.name)?ss.format("#{0}{1}{2}",wc.toHex(this.r),wc.toHex(this.g),wc.toHex(this.b)):this.name},_clone:function(){return Jc.fromArgb(this.a,this.r,this.g,this.b)}};Kc.get_black=function(){return Jc.fromArgb(255,0,0,0)},Kc.get_blue=function(){return Jc.fromArgb(255,0,0,255)},Kc.get_brown=function(){return Jc.fromArgb(255,165,42,42)},Kc.get_cyan=function(){return Jc.fromArgb(255,0,255,255)},Kc.get_darkGray=function(){return Jc.fromArgb(255,169,169,169)},Kc.get_gray=function(){return Jc.fromArgb(255,128,128,128)},Kc.get_green=function(){return Jc.fromArgb(255,0,255,0)},Kc.get_lightGray=function(){return Jc.fromArgb(255,211,211,211)},Kc.get_magenta=function(){return Jc.fromArgb(255,255,0,255)},Kc.get_orange=function(){return Jc.fromArgb(255,255,165,0)},Kc.get_purple=function(){return Jc.fromArgb(255,128,0,128)},Kc.get_red=function(){return Jc.fromArgb(255,255,0,0)},Kc.get_transparent=function(){return Jc.fromArgb(0,255,255,255)},Kc.get_white=function(){return Jc.fromArgb(255,255,255,255)},Kc.get_yellow=function(){return Jc.fromArgb(255,255,255,0)};var Qg={};Lc.createBasic=function(a){var b=new Lc;b._name=a,b._url=null,b.lines=[];for(var c=ss.enumerate(ss.keys(Lc.fullNames));c.moveNext();){var d=c.current;b.lines.push(new Mc(d))}return b},Lc.create=function(a,b,c,d){var e=new Lc;return e._noInterpollation=d,e._boundry=c,e._name=a,e._url=b,e.getFile(),e},Lc.drawConstellationNames=function(a,b,c){(null!=Lc._namesBatch||(Lc.initializeConstellationNames(),null!=Lc._namesBatch))&&Lc._namesBatch.draw(a,b,c)},Lc.initializeConstellationNames=function(){if(null!=Lc.constellationCentroids){Lc._namesBatch=new cc(80);for(var a=ss.enumerate(ss.keys(Lc.constellationCentroids));a.moveNext();){var b=a.current,c=Lc.constellationCentroids[b],d=Pc.raDecTo3dAu(c.get_RA(),c.get_dec(),1),e=Sc.create(0,1,0),f=c.get_name();"Triangulum Australe"===c.get_name()&&(f=ss.replaceString(f," ","\n ")),Lc._namesBatch.add(new fc(d,e,f,80,125e-6))}}},Lc.drawArtwork=function(a){if(null==Lc.artwork)return void(null==Lc._artFile&&(Lc._artFile=new ad,Lc._artFile.loadFromUrl("http://www.worldwidetelescope.org/wwtweb/catalog.aspx?W=hevelius",Lc._onArtReady)));Lc._maxSeperation=Math.max(.5,Math.cos(2*a.get_fovAngle()/180*Math.PI));for(var b=ss.enumerate(Lc.artwork);b.moveNext();){var c=b.current,d=!1,e=Lc.constellationCentroids[c.get_constellation()];if(null!=e){var f=Pc.raDecTo3d(d?-e.get_RA()-6:e.get_RA(),(d,e.get_dec()));Sc.dot(a.get_viewPoint(),f)>Lc._maxSeperation&&a.drawImageSet(c.get_studyImageset(),100)}}},Lc._onArtReady=function(){Lc._artFile.childLoadCallback(Lc._loadArtList)},Lc._loadArtList=function(){Lc.artwork=Lc._artFile.get_places()},Lc._loadNames=function(){2===Lc._webFileConstNames.get_state()?alert(Lc._webFileConstNames.get_message()):1===Lc._webFileConstNames.get_state()&&Lc._centroidsReady(Lc._webFileConstNames.getText())},Lc._centroidsReady=function(a){Lc.constellationCentroids={},Lc.fullNames={},Lc.abbreviations={},Lc.bitIDs={};for(var b,c=a.split("\r\n"),d=0,e=ss.enumerate(c);e.moveNext();){var f=e.current;b=f;var g=b.split(",");Lc.fullNames[g[1]]=g[0],Lc.abbreviations[g[0]]=g[1],Lc.bitIDs[g[1]]=d++,Lc.constellationCentroids[g[1]]=hd.create(g[0],parseFloat(g[3]),parseFloat(g[2]),128,g[1],2,360)}Ec.set_renderNeeded(!0),Oc.buildConstellationFilters()},Lc.fullName=function(a){return ss.keyExists(Lc.fullNames,a)?Lc.fullNames[a]:a},Lc.abbreviation=function(a){return null!=Lc.abbreviations&&!ss.emptyString(a)&&ss.keyExists(Lc.abbreviations,a)?Lc.abbreviations[a]:a};var Rg={get_name:function(){return this._name},set_name:function(a){return this._name=a,a},getFile:function(){this._webFile=new Cc(this._url),this._webFile.onStateChange=ss.bind("fileStateChange",this),this._webFile.send()},fileStateChange:function(){2===this._webFile.get_state()?alert(this._webFile.get_message()):1===this._webFile.get_state()&&this._loadConstellationData(this._webFile.getText())},_loadConstellationData:function(a){this._boundry&&!this._noInterpollation&&(Lc.boundries={}),this.lines=[];var b=null;try{for(var c,d,e,f=a.split("\r\n"),g="",h=0,i=0,j=ss.enumerate(f);j.moveNext();){var k=j.current,l=k;if("- "===l.substr(11,2)&&(l=l.substr(0,11)+" -"+l.substr(13,l.length-13)),"+ "===l.substr(11,2)&&(l=l.substr(0,11)+" +"+l.substr(13,l.length-13)),e=parseFloat(l.substr(11,10)),d=parseFloat(this._noInterpollation?l.substr(0,10):l.substr(0,10)),c=ss.trim(l.substr(23,4)),this._boundry){if(this._noInterpollation&&"O"!==l.substr(28,1))continue}else ss.trim(l.substr(28,1))&&(i=parseInt(l.substr(28,1)));c!==g&&(i=3,b=new Mc(c),this.lines.push(b),this._boundry&&!this._noInterpollation&&(Lc.boundries[c]=b),g=c,h=0),this._noInterpollation&&(Math.abs(d-h)>12&&(d-=24*(0>d-h?-1:1)),h=d);var m=null;l.length>30&&(m=ss.trim(l.substr(30))),(null==m||"Empty"!==m)&&b.add(d,e,i,m),this._pointCount++,i=1}}catch(n){}Ec.set_renderNeeded(!0)},draw:function(a,b,c){Lc._maxSeperation=Math.max(.6,Math.cos(2*a.get_fovAngle()/180*Math.PI)),this._drawCount=0;var d=null;if(null!=this.lines&&null!=Lc.constellationCentroids){Lc._constToDraw=c;for(var e=ss.enumerate(this.lines);e.moveNext();){var f=e.current;Lc._constToDraw===f.get_name()&&this._boundry?d=f:b&&this._boundry||this._drawSingleConstellation(a,f,1)}null!=d&&this._drawSingleConstellation(a,d,1)}},_drawSingleConstellation:function(a,b,c){var d=!1,e=Lc.constellationCentroids[b.get_name()];if(null!=e){var f=Pc.raDecTo3d(d?-e.get_RA()-6:e.get_RA(),(d,e.get_dec()));if(Sc.dot(a.get_viewPoint(),f)k;k++)b.points[k].pointType&&k?(i=Pc.raDecTo3d(b.points[k].RA,b.points[k].dec),h.addLine(j,i),j=i):j=Pc.raDecTo3d(b.points[k].RA,b.points[k].dec);this._boundry&&(i=Pc.raDecTo3d(b.points[0].RA,b.points[0].dec),h.addLine(j,i))}var l="red";l=this._boundry?Lc._constToDraw!==b.get_name()?bc.get_globalSettings().get_constellationBoundryColor():bc.get_globalSettings().get_constellationSelectionColor():bc.get_globalSettings().get_constellationFigureColor(),this._constellationVertexBuffers[b.get_name()].drawLines(a,c,Jc.load(l))},_drawSingleConstellationOld:function(a,b){var c=!1,d=Lc.constellationCentroids[b.get_name()];if(null!=d){var e=Pc.raDecTo3d(c?-d.get_RA()-6:d.get_RA(),(c,d.get_dec()));if(Sc.dot(a.get_viewPoint(),e)k;k++)if(b.points[k].pointType&&k){var l=a.WVP.transform(Pc.raDecTo3d(b.points[k].RA,b.points[k].dec));g.lineTo(l.x,l.y),j=!0}else j&&g.stroke(),i=a.WVP.transform(Pc.raDecTo3d(b.points[k].RA,b.points[k].dec)),g.moveTo(i.x,i.y);this._boundry&&g.closePath(),g.stroke(),g.restore()}},findConstellationForPoint:function(a,b){if(b>88.402||null==this.lines)return"UMI";for(var c=ss.enumerate(this.lines);c.moveNext();){var d,e,f=c.current,g=f.points.length,h=!1;for(d=0,e=g-1;g>d;e=d++)(f.points[d].dec<=b&&b0?this.findConstellationForPoint(a-24,b):b>65.5?"UMI":-65.5>b?"OCT":"Error"}},Sg={get_name:function(){return this._name},set_name:function(a){return this._name=a,a},add:function(a,b,c,d){this.points.push(new Nc(a,b,c,d))}},Tg={toString:function(){return ss.emptyString(this.name)?Pc.formatDMS((this.RA/360*24+12)%24)+", "+Pc.formatDMS(this.dec)+", "+this.pointType.toString():this.name+", "+this.pointType.toString()}};Oc.buildConstellationFilters=function(){var a=Oc.get_allConstellation();a.internal=!0,Oc.families.AllConstellation=a,Oc.families.Zodiacal=Oc.get_zodiacal(),Oc.families["Ursa Major Family"]=Oc.get_ursaMajorFamily(),Oc.families["Perseus Family"]=Oc.get_perseusFamily(),Oc.families["Hercules Family"]=Oc.get_herculesFamily(),Oc.families["Orion Family"]=Oc.get_orionFamily(),Oc.families["Heavenly Waters"]=Oc.get_heavenlyWaters(),Oc.families["Bayer Family"]=Oc.get_bayerFamily(),Oc.families["La Caille Family"]=Oc.get_laCaileFamily()},Oc.saveCustomFilters=function(){var a=new ss.StringBuilder,b=Oc.families;for(var c in b){var d={key:c,value:b[c]};d.value.internal||(a.append(d.key),a.append(";"),a.appendLine(d.value.toString()))}},Oc.get_allConstellation=function(){var a=new Oc;return a.setAll(!0),a},Oc.get_zodiacal=function(){var a=new Oc;return a.set("ARI",!0),a.set("TAU",!0),a.set("GEM",!0),a.set("CNC",!0),a.set("LEO",!0),a.set("VIR",!0),a.set("LIB",!0),a.set("SCO",!0),a.set("SGR",!0),a.set("CAP",!0),a.set("AQR",!0),a.set("PSC",!0),a.internal=!0,a},Oc.get_ursaMajorFamily=function(){var a=new Oc;return a.set("UMA",!0),a.set("UMI",!0),a.set("DRA",!0),a.set("CVN",!0),a.set("BOO",!0),a.set("COM",!0),a.set("CRB",!0),a.set("CAM",!0),a.set("LYN",!0),a.set("LMI",!0),a.internal=!0,a},Oc.get_perseusFamily=function(){var a=new Oc;return a.set("CAS",!0),a.set("CEP",!0),a.set("AND",!0),a.set("PER",!0),a.set("PEG",!0),a.set("CET",!0),a.set("AUR",!0),a.set("LAC",!0),a.set("TRI",!0),a.internal=!0,a},Oc.get_herculesFamily=function(){var a=new Oc;return a.set("HER",!0),a.set("SGE",!0),a.set("AQL",!0),a.set("LYR",!0),a.set("CYG",!0),a.set("VUL",!0),a.set("HYA",!0),a.set("SEX",!0),a.set("CRT",!0),a.set("CRV",!0),a.set("OPH",!0),a.set("SER1",!0),a.set("SER2",!0),a.set("SCT",!0),a.set("CEN",!0),a.set("LUP",!0),a.set("CRA",!0),a.set("ARA",!0),a.set("TRA",!0),a.set("CRU",!0),a.internal=!0,a},Oc.get_orionFamily=function(){var a=new Oc;return a.set("ORI",!0),a.set("CMA",!0),a.set("CMI",!0),a.set("MON",!0),a.set("LEP",!0),a.internal=!0,a},Oc.get_heavenlyWaters=function(){var a=new Oc;return a.set("DEL",!0),a.set("EQU",!0),a.set("ERI",!0),a.set("PSA",!0),a.set("CAR",!0),a.set("PUP",!0),a.set("VEL",!0),a.set("PYX",!0),a.set("COL",!0),a.internal=!0,a},Oc.get_bayerFamily=function(){var a=new Oc;return a.set("HYA",!0),a.set("DOR",!0),a.set("VOL",!0),a.set("APS",!0),a.set("PAV",!0),a.set("GRU",!0),a.set("PHE",!0),a.set("TUC",!0),a.set("IND",!0),a.set("CHA",!0),a.set("MUS",!0),a.internal=!0,a},Oc.get_laCaileFamily=function(){var a=new Oc;return a.set("NOR",!0),a.set("CIR",!0),a.set("TEL",!0),a.set("MIC",!0),a.set("SCL",!0),a.set("FOR",!0),a.set("CAE",!0),a.set("HOR",!0),a.set("OCT",!0),a.set("MEN",!0),a.set("RET",!0),a.set("PIC",!0),a.set("ANT",!0),a.internal=!0,a},Oc.parse=function(a){var b=a.split(","),c=new Oc;try{for(var d=0;3>d;d++)c.bits[d]=parseInt(b[d])}catch(e){}return c};var Ug={_saveBits:function(){for(var a=0;3>a;a++)this.oldBits[a]=this.bits[a]},_isChanged:function(){for(var a=0;3>a;a++)if(this.oldBits[a]!==this.bits[a])return!0;return!1},_checkChanged:function(){this._isChanged()&&this._fireChanged()},isEnabled:function(a){var b=Lc.bitIDs[a],c=b/32;return b%=32,this.blendState.get_state()&&!!(1<b;b++){var c=b/32,d=b%32;this.bits[c]=a?this.bits[c]|1<b;b++)this.bits[b]=a[4*b]+(a[4*b+1]<<8)+(a[4*b+2]<<16)+(a[4*b+3]<<24);this._checkChanged()},getBits:function(){for(var a=new Array(12),b=0,c=0;3>c;c++)a[b++]=this.bits[c],a[b++]=this.bits[c]>>8,a[b++]=this.bits[c]>>16,a[b++]=this.bits[c]>>24;return a},cloneFilter:function(a){this._saveBits();for(var b=0;3>b;b++)this.bits[b]=a.bits[b];this._checkChanged()},clone:function(){var a=new Oc;return a.cloneFilter(this),a},combine:function(a){this._saveBits();for(var b=0;3>b;b++)this.bits[b]=this.bits[b]|a.bits[b];this._checkChanged()},remove:function(a){this._saveBits();for(var b=0;3>b;b++)this.bits[b]=this.bits[b]&~a.bits[b];this._checkChanged()},_fireChanged:function(){this.settingsOwned},toString:function(){return ss.format("{0},{1},{2}",this.bits[0],this.bits[1],this.bits[2])}};Pc.geoTo3d=function(a,b){return Sc.create(Math.cos(b*Pc.RC)*Math.cos(a*Pc.RC)*1,1*Math.sin(a*Pc.RC),Math.sin(b*Pc.RC)*Math.cos(a*Pc.RC)*1)},Pc.geoTo3dDouble=function(a,b){return Sc.create(Math.cos(b*Pc.RC)*Math.cos(a*Pc.RC)*1,1*Math.sin(a*Pc.RC),Math.sin(b*Pc.RC)*Math.cos(a*Pc.RC)*1)},Pc.geoTo3dDoubleRad=function(a,b,c){return b-=180,Sc.create(Math.cos(b*Pc.RC)*Math.cos(a*Pc.RC)*c,Math.sin(a*Pc.RC)*c,Math.sin(b*Pc.RC)*Math.cos(a*Pc.RC)*c)},Pc.geoTo3dRad=function(a,b,c){return Sc.create(Math.cos(b*Pc.RC)*Math.cos(a*Pc.RC)*c,Math.sin(a*Pc.RC)*c,Math.sin(b*Pc.RC)*Math.cos(a*Pc.RC)*c)},Pc.raDecTo3d=function(a,b){return Sc.create(Math.cos(a*Pc.RCRA)*Math.cos(b*Pc.RC)*1,1*Math.sin(b*Pc.RC),Math.sin(a*Pc.RCRA)*Math.cos(b*Pc.RC)*1)},Pc.raDecTo3dAu=function(a,b,c){return Sc.create(Math.cos(a*Pc.RCRA)*Math.cos(b*Pc.RC)*c,Math.sin(b*Pc.RC)*c,Math.sin(a*Pc.RCRA)*Math.cos(b*Pc.RC)*c)},Pc.raDecTo3dMat=function(a,b,c){return Sc._transformCoordinate(Sc.create(Math.cos(a*Pc.RCRA)*Math.cos(b*Pc.RC)*1,1*Math.sin(b*Pc.RC),Math.sin(a*Pc.RCRA)*Math.cos(b*Pc.RC)*1),c)},Pc.raDecTo3dPointRad=function(a,b){return a.set_dec(-a.get_dec()),Sc.create(Math.cos(a.get_RA()*Pc.RCRA)*Math.cos(a.get_dec()*Pc.RC)*b,Math.sin(a.get_dec()*Pc.RC)*b,Math.sin(a.get_RA()*Pc.RCRA)*Math.cos(a.get_dec()*Pc.RC)*b)},Pc.sterographicTo3d=function(a,b,c,d,e,f,g,h,i){var j=90,k=0;if(a-=f,b-=g,a||b){var l=6371e3*(1+Math.sin(Math.abs(d)/180*Math.PI))/h,m=l*l,n=180/Math.PI;k=a?Math.atan2(b,a)*n:0>90*b?-1:1;var o=a*a+b*b;j=(m-o)/(m+o),j=Math.asin(j)*n,i||(j=-j,k=-k,e=-e)}return Pc.geoTo3dDoubleRad(j,90+k+e,c)},Pc.equitorialToHorizon=function(a,b,c){var d=Pc.mstFromUTC2(c,b.get_lng())-15*a.get_RA();0>d&&(d+=360);var e=d*Pc.RC,f=a.get_dec()*Pc.RC,g=b.get_lat()*Pc.RC,h=Math.sin(f)*Math.sin(g)+Math.cos(f)*Math.cos(g)*Math.cos(e),i=Math.asin(h),j=(Math.sin(f)-Math.sin(i)*Math.sin(g))/(Math.cos(i)*Math.cos(g)),k=Math.acos(j),l=new Pc(k,i);return Math.sin(e)>0&&l.set_az(360-l.get_az()),l},Pc.horizonToEquitorial=function(a,b,c){var d,e,f=Pc.mstFromUTC2(c,b.get_lng()),g=Pc._altAzToRaDec(a.get_alt()*Pc.RC,a.get_az()*Pc.RC,b.get_lat()*Pc.RC);d=g.x,e=g.y;var h=d/Pc.RC;return f+=h,0>f&&(f+=360),f>360&&(f-=360),Pc.fromRaDec(f/15,e/Pc.RC)},Pc._altAzToRaDec=function(a,b,c){var d=0,e=0;return b=Math.PI-b,0>b&&(b+=2*Math.PI),d=Math.atan2(Math.sin(b),Math.cos(b)*Math.sin(c)+Math.tan(a)*Math.cos(c)),0>d&&(d+=2*Math.PI),e=Math.asin(Math.sin(c)*Math.sin(a)-Math.cos(c)*Math.cos(a)*Math.cos(b)),Tc.create(d,e)},Pc.mstFromUTC2=function(a,b){var c=a.getUTCFullYear(),d=a.getUTCMonth()+1,e=a.getUTCDate(),f=a.getUTCHours(),g=a.getUTCMinutes(),h=a.getUTCSeconds()+a.getUTCMilliseconds()/1e3;(1===d||2===d)&&(c-=1,d+=12);var i,j,k,l=ss.truncate(c/100),m=2-l+Math.floor(l/4),n=Math.floor(365.25*c),o=Math.floor(30.6001*(d+1));if(i=m+n+o-730550.5+e+(f+g/60+h/3600)/24,j=i/36525,k=280.46061837+360.98564736629*i+387933e-9*j*j-j*j*j/3871e4+b,k>0)for(;k>360;)k-=360;else for(;0>k;)k+=360;return k},Pc.cartesianToSpherical=function(a){var b,c,d=Math.sqrt(a.x*a.x+a.y*a.y+a.z*a.z),e=Math.sqrt(a.x*a.x+a.z*a.z);return c=Math.asin(a.y/d),b=0a.x?Math.PI-Math.asin(a.z/e):0,new Pc(b,c)},Pc.cartesianToSpherical2=function(a){var b=Math.sqrt(a.x*a.x+a.y*a.y+a.z*a.z),c=Math.atan2(a.z,a.x),d=Math.asin(a.y/b);return new Pc(c,d)},Pc.cartesianToSphericalSky=function(a){var b=Math.sqrt(a.x*a.x+a.y*a.y+a.z*a.z),c=Math.atan2(a.z,a.x),d=Math.asin(-a.y/b);return Tc.create(c/Math.PI*12,d/Math.PI*180)},Pc.cartesianToLatLng=function(a){var b=Math.sqrt(a.x*a.x+a.y*a.y+a.z*a.z),c=Math.atan2(a.z,a.x),d=Math.asin(a.y/b);return Tc.create(180*c/Math.PI,180*d/Math.PI)},Pc.cartesianToSpherical3=function(a){var b=Math.sqrt(a.x*a.x+a.y*a.y+a.z*a.z),c=Math.atan2(a.z,a.x),d=Math.asin(a.y/b);return new Pc(c,d)},Pc.sign=function(a){return 0>a?-1:1},Pc.formatDMSSign=function(a,b){try{a+=.0001388888888889*Pc.sign(a);var c=ss.truncate(a),d=60*(a-ss.truncate(a)),e=60*(d-ss.truncate(d));if(b){var f=a>0?"+":"-";return ss.format("{3}{0:00;00}:{1:00}:{2:00}",c,Math.abs(ss.truncate(d)),Math.abs(ss.truncate(e)),f)}return ss.format("{0:00}:{1:00}:{2:00}",c,Math.abs(ss.truncate(d)),Math.abs(ss.truncate(e)))}catch(g){return""}},Pc.formatDMS=function(a){try{a+=.0001388888888889*(0>a?-1:1);var b=Math.abs(ss.truncate(a)),c=60*(a-ss.truncate(a)),d=60*(c-ss.truncate(c)),e=0>a?"-":"";return ss.format("{3}{0}:{1}:{2}",Math.abs(b),Math.abs(ss.truncate(c)),Math.abs(ss.truncate(d)),e)}catch(f){return""}},Pc.formatDMSWide=function(a){try{a+=.0001388888888889*Pc.sign(a);var b=Math.abs(ss.truncate(a)),c=60*(a-ss.truncate(a)),d=60*(c-ss.truncate(c)),e=0>a?"-":"";return ss.format("{3}{0:00} : {1:00} : {2:00}",b,Math.abs(ss.truncate(c)),Math.abs(ss.truncate(d)),e)}catch(f){return""}},Pc.formatHMS=function(a){try{a+=.0001388888888889*Pc.sign(a);var b=ss.truncate(a),c=60*(a-ss.truncate(a)),d=60*(c-ss.truncate(c));return ss.format("{0:00}h{1:00}m{2:00}s",b,Math.abs(ss.truncate(c)),Math.abs(ss.truncate(d)))}catch(e){return""}},Pc.fromRaDec=function(a,b){return new Pc(15*(a-12)*Pc.RC,b*Pc.RC)},Pc.fromLatLng=function(a,b){return new Pc(b*Pc.RC,a*Pc.RC)},Pc.dmsToDegrees=function(a,b,c){return a+b/60+c/3600},Pc.degreesToRadians=function(a){return.0174532925199433*a},Pc.radiansToDegrees=function(a){return 57.2957795130823*a},Pc.radiansToHours=function(a){return 3.81971863420549*a},Pc.hoursToRadians=function(a){return.261799387799149*a},Pc.hoursToDegrees=function(a){return 15*a},Pc.degreesToHours=function(a){return a/15},Pc.PI=function(){return 3.14159265358979},Pc.mapTo0To360Range=function(a){for(var b=a;0>b;)b+=360;for(;b>360;)b-=360;return b},Pc.mapTo0To24Range=function(a){for(var b=a;0>b;)b+=24;for(;b>24;)b-=24;return b},Pc.meanObliquityOfEcliptic=function(a){var b=(a-2451545)/3652500,c=b*b,d=c*b,e=d*b,f=e*b,g=f*b,h=g*b,i=h*b,j=i*b,k=j*b;return Pc.dmsToDegrees(23,26,21.448)-Pc.dmsToDegrees(0,0,4680.93)*b-Pc.dmsToDegrees(0,0,1.55)*c+Pc.dmsToDegrees(0,0,1999.25)*d-Pc.dmsToDegrees(0,0,51.38)*e-Pc.dmsToDegrees(0,0,249.67)*f-Pc.dmsToDegrees(0,0,39.05)*g+Pc.dmsToDegrees(0,0,7.12)*h+Pc.dmsToDegrees(0,0,27.87)*i+Pc.dmsToDegrees(0,0,5.79)*j+Pc.dmsToDegrees(0,0,2.45)*k},Pc.j2000toGalactic=function(a,b){var c=[Math.cos(a/180*Math.PI)*Math.cos(b/180*Math.PI),Math.sin(a/180*Math.PI)*Math.cos(b/180*Math.PI),Math.sin(b/180*Math.PI)];null==Pc._rotationMatrix&&(Pc._rotationMatrix=new Array(3),Pc._rotationMatrix[0]=[-.0548755604,-.8734370902,-.4838350155],Pc._rotationMatrix[1]=[.4941094279,-.44482963,.7469822445],Pc._rotationMatrix[2]=[-.867666149,-.1980763734,.4559837762]);for(var d=new Array(3),e=0;3>e;e++)d[e]=c[0]*Pc._rotationMatrix[e][0]+c[1]*Pc._rotationMatrix[e][1]+c[2]*Pc._rotationMatrix[e][2];var f=Math.atan2(d[1],d[0]);0>f&&(f+=2*Math.PI),f>2*Math.PI&&(f-=2*Math.PI);var g=Math.atan2(d[2],Math.sqrt(d[0]*d[0]+d[1]*d[1]));return[f/Math.PI*180,g/Math.PI*180]},Pc.galacticTo3dDouble=function(a,b){var c=Pc.galactictoJ2000(a,b);return Pc.raDecTo3dAu(c[0]/15,c[1],1)},Pc.galactictoJ2000=function(a,b){var c=[Math.cos(a/180*Math.PI)*Math.cos(b/180*Math.PI),Math.sin(a/180*Math.PI)*Math.cos(b/180*Math.PI),Math.sin(b/180*Math.PI)];null==Pc._rotationMatrix&&(Pc._rotationMatrix=new Array(3),Pc._rotationMatrix[0]=[-.0548755604,-.8734370902,-.4838350155],Pc._rotationMatrix[1]=[.4941094279,-.44482963,.7469822445],Pc._rotationMatrix[2]=[-.867666149,-.1980763734,.4559837762]);for(var d=new Array(3),e=0;3>e;e++)d[e]=c[0]*Pc._rotationMatrix[0][e]+c[1]*Pc._rotationMatrix[1][e]+c[2]*Pc._rotationMatrix[2][e];var f=Math.atan2(d[1],d[0]);0>f&&(f+=2*Math.PI),f>2*Math.PI&&(f-=2*Math.PI);var g=Math.atan2(d[2],Math.sqrt(d[0]*d[0]+d[1]*d[1]));return[f/Math.PI*180,g/Math.PI*180]};var Vg={distance:function(a){var b=this.get_lat(),c=this.get_lng()*Math.cos(b*Pc.RC),d=a.get_lat(),e=a.get_lng()*Math.cos(d*Pc.RC);return Math.sqrt((b-d)*(b-d)+(c-e)*(c-e))},distance3d:function(a){var b=Pc.geoTo3dDouble(a.get_lat(),a.get_lng()),c=Pc.geoTo3dDouble(this.get_lat(),this.get_lng()),d=Sc.subtractVectors(b,c);return d.length()/Pc.RC},angle:function(a){var b=this.get_lat(),c=this.get_lng()*Math.cos(b*Pc.RC),d=a.get_lat(),e=a.get_lng()*Math.cos(d*Pc.RC);return Math.atan2(d-b,e-c)},get_RA:function(){return(this._ascention/Math.PI*12+12)%24},set_RA:function(a){return this._ascention=a/12*Math.PI,a},get_dec:function(){return this._declination/Pc.RC},set_dec:function(a){return this._declination=a*Pc.RC,a},get_lat:function(){return this._declination/Pc.RC},set_lat:function(a){return this._declination=a*Pc.RC,a},get_lng:function(){var a=this._ascention/Pc.RC;return 180>=a?a:-180+(180-a)},set_lng:function(a){return this._ascention=a*Pc.RC+2*Math.PI%(2*Math.PI),a},get_alt:function(){return this._declination/Pc.RC},set_alt:function(a){return this._declination=a*Pc.RC,a},get_az:function(){return this._ascention/Pc.RC},set_az:function(a){return this._ascention=a*Pc.RC,a},toString:function(){return ss.format("Lat: {0}, Lng: {1}",this.get_lat(),this.get_lng())}};Qc.createPos=function(a,b,c){var d=new Qc;return d.tu=b*ic.uvMultiple,d.tv=c*ic.uvMultiple,d.position=a,d},Qc.createPosRaw=function(a,b,c){var d=new Qc;return d.tu=b,d.tv=c,d.position=a,d},Qc.createPosSize=function(a,b,c,d,e){var f=new Qc;return f.tu=b*d,f.tv=c*e,f.position=a,f},Qc.create=function(a,b,c,d,e){var f=new Qc;return f.position=Sc.create(a,b,c),f.tu=d*ic.uvMultiple,f.tv=e*ic.uvMultiple,f};var Wg={copy:function(){var a=new Qc;return a.position=Sc.makeCopy(this.position),a.tu=this.tu,a.tv=this.tv,a},toString:function(){return ss.format("{0}, {1}, {2}, {3}, {4}",this.position.x,this.position.y,this.position.z,this.tu,this.tv)}};Rc.createPos=function(a,b,c){var d=new Rc;return d.tu=b*ic.uvMultiple,d.tv=c*ic.uvMultiple,d.position=a,d},Rc.createPosRaw=function(a,b,c){var d=new Rc;return d.tu=b,d.tv=c,d.position=a,d},Rc.createPosSize=function(a,b,c,d,e){var f=new Rc;return f.tu=b*d,f.tv=c*e,f.position=a,f},Rc.create=function(a,b,c,d,e){var f=new Qc;return f.position=Sc.create(a,b,c),f.tu=d*ic.uvMultiple,f.tv=e*ic.uvMultiple,f};var Xg={copy:function(){var a=new Qc;return a.position=Sc.makeCopy(this.position),a.tu=this.tu,a.tv=this.tv,a},toString:function(){return ss.format("{0}, {1}, {2}, {3}, {4}",this.position.x,this.position.y,this.position.z,this.tu,this.tv)}};Sc.create=function(a,b,c){var d=new Sc;return d.x=a,d.y=b,d.z=c,d},Sc.makeCopy=function(a){var b=new Sc;return b.x=a.x,b.y=a.y,b.z=a.z,b},Sc.negate=function(a){return Sc.create(-a.x,-a.y,-a.z)},Sc.midPoint=function(a,b){var c=Sc.create((a.x+b.x)/2,(a.y+b.y)/2,(a.z+b.z)/2);return c.normalize(),c},Sc.midPointByLength=function(a,b){var c=Sc.create((a.x+b.x)/2,(a.y+b.y)/2,(a.z+b.z)/2);return c.normalize(),c.multiply(a.length()),c},Sc.get_empty=function(){return Sc.create(0,0,0)},Sc.addVectors=function(a,b){return Sc.create(a.x+b.x,a.y+b.y,a.z+b.z)},Sc.cross=function(a,b){return Sc.create(a.y*b.z-a.z*b.y,a.z*b.x-a.x*b.z,a.x*b.y-a.y*b.x)},Sc.dot=function(a,b){return a.x*b.x+a.y*b.y+a.z*b.z},Sc.getLength=function(a){return Math.sqrt(a.x*a.x+a.y*a.y+a.z*a.z)},Sc.getLengthSq=function(a){return a.x*a.x+a.y*a.y+a.z*a.z},Sc.lerp=function(a,b,c){return Sc.create(a.x*(1-c)+b.x*c,a.y*(1-c)+b.y*c,a.z*(1-c)+b.z*c)},Sc.midpoint=function(a,b){var c=Sc.create(.5*a.x+.5*b.x,.5*a.y+.5*b.y,.5*a.z+.5*b.z);return c.normalize(),c},Sc.slerp=function(a,b,c){for(var d=Sc.dot(a,b);.98>d;){var e=Sc.midpoint(a,b);c>.5?(a=e,c-=.5,c*=2):(b=e,c*=2),d=Sc.dot(a,b)}var f=Sc.lerp(a,b,c);return f.normalize(),f},Sc.multiplyScalar=function(a,b){var c=a.copy();return c.multiply(b),c},Sc.scale=function(a,b){var c=a;return c.multiply(b),c},Sc.subtractVectors=function(a,b){var c=a.copy();return c.subtract(b),c},Sc.parse=function(a){var b=new Sc,c=a.split(",");return 3===c.length&&(b.x=parseFloat(c[0]),b.y=parseFloat(c[1]),b.z=parseFloat(c[2])),b},Sc._transformCoordinate=function(a,b){return b.transform(a)};var Yg={copy:function(){var a=new Sc;return a.x=this.x,a.y=this.y,a.z=this.z,a},round:function(){this.x=ss.truncate(65536*this.x)/65536,this.y=ss.truncate(65536*this.y)/65536,this.z=ss.truncate(65536*this.z)/65536},add:function(a){this.x+=a.x,this.y+=a.y,this.z+=a.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},multiply:function(a){this.x*=a,this.y*=a,this.z*=a },normalize:function(){var a=this.length();a&&(this.x/=a,this.y/=a,this.z/=a)},rotateX:function(a){var b,c;c=this.y*Math.cos(a)-this.z*Math.sin(a),b=this.y*Math.sin(a)+this.z*Math.cos(a),this.z=b,this.y=c},rotateZ:function(a){var b,c;b=this.x*Math.cos(a)-this.y*Math.sin(a),c=this.x*Math.sin(a)+this.y*Math.cos(a),this.y=c,this.x=b},rotateY:function(a){var b,c;b=this.z*Math.cos(a)-this.x*Math.sin(a),c=this.z*Math.sin(a)+this.x*Math.cos(a),this.x=c,this.z=b},subtract:function(a){this.x-=a.x,this.y-=a.y,this.z-=a.z},toString:function(){return ss.format("{0}, {1}, {2}",this.x,this.y,this.z)},toSpherical:function(){var a,b,c=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z),d=Math.sqrt(this.x*this.x+this.z*this.z);return b=Math.asin(this.y/c),a=d?0<=this.x?Math.asin(this.z/d):Math.PI-Math.asin(this.z/d):0,Tc.create((a+Math.PI)%(2*Math.PI),b+Math.PI/2)},toRaDec:function(){var a=this.toSpherical();return a.x=a.x/Math.PI*12,a.y=a.y/Math.PI*180-90,a},distanceToLine:function(a,b){var c=Sc.subtractVectors(b,a),d=Sc.subtractVectors(a,this),e=Sc.cross(c,d),f=e.length(),g=Sc.subtractVectors(b,a),h=g.length();return f/h},_transformByMatrics:function(a){var b=a.transform(this);this.x=b.x,this.y=b.y,this.z=b.z}};Tc.lerp=function(a,b,c){return Tc.create(a.x*(1-c)+b.x*c,a.y*(1-c)+b.y*c)},Tc.cartesianToSpherical2=function(a){var b=Math.sqrt(a.x*a.x+a.y*a.y+a.z*a.z),c=Math.atan2(a.z,a.x),d=Math.asin(a.y/b);return Tc.create(c/Math.PI*180,d/Math.PI*180)},Tc.average3d=function(a,b){var c=Pc.geoTo3dDouble(a.y,a.x),d=Pc.geoTo3dDouble(b.y,b.x),e=Sc.addVectors(c,d);return e.multiply(.5),e.normalize(),Tc.cartesianToSpherical2(e)},Tc.subtract=function(a){return Tc.create(-a.x,-a.y)},Tc.create=function(a,b){var c=new Tc;return c.x=a,c.y=b,c},Tc.subtractVector=function(a,b){return Tc.create(a.x-b.x,a.y-b.y)};var Zg={distance3d:function(a){var b=Pc.geoTo3dDouble(a.y,a.x),c=Pc.geoTo3dDouble(this.y,this.x),d=Sc.subtractVectors(b,c);return d.length()/Math.PI*180},get_length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},normalize:function(){var a=this.get_length();a&&(this.x/=a,this.y/=a)},extend:function(a){this.x=this.x*a,this.y=this.y*a}};Uc.create=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){var q=new Uc;return q._m11=a,q._m12=b,q._m13=c,q._m14=d,q._m21=e,q._m22=f,q._m23=g,q._m24=h,q._m31=i,q._m32=j,q._m33=k,q._m34=l,q._offsetX=m,q._offsetY=n,q._offsetZ=o,q._m44=p,q._isNotKnownToBeIdentity=!0,q},Uc.get_identity=function(){var a=new Uc;return a.set(Uc._s_identity),a},Uc.multiplyMatrix=function(a,b){return a.get__isDistinguishedIdentity()?b:b.get__isDistinguishedIdentity()?a:Uc.create(a._m11*b._m11+a._m12*b._m21+a._m13*b._m31+a._m14*b._offsetX,a._m11*b._m12+a._m12*b._m22+a._m13*b._m32+a._m14*b._offsetY,a._m11*b._m13+a._m12*b._m23+a._m13*b._m33+a._m14*b._offsetZ,a._m11*b._m14+a._m12*b._m24+a._m13*b._m34+a._m14*b._m44,a._m21*b._m11+a._m22*b._m21+a._m23*b._m31+a._m24*b._offsetX,a._m21*b._m12+a._m22*b._m22+a._m23*b._m32+a._m24*b._offsetY,a._m21*b._m13+a._m22*b._m23+a._m23*b._m33+a._m24*b._offsetZ,a._m21*b._m14+a._m22*b._m24+a._m23*b._m34+a._m24*b._m44,a._m31*b._m11+a._m32*b._m21+a._m33*b._m31+a._m34*b._offsetX,a._m31*b._m12+a._m32*b._m22+a._m33*b._m32+a._m34*b._offsetY,a._m31*b._m13+a._m32*b._m23+a._m33*b._m33+a._m34*b._offsetZ,a._m31*b._m14+a._m32*b._m24+a._m33*b._m34+a._m34*b._m44,a._offsetX*b._m11+a._offsetY*b._m21+a._offsetZ*b._m31+a._m44*b._offsetX,a._offsetX*b._m12+a._offsetY*b._m22+a._offsetZ*b._m32+a._m44*b._offsetY,a._offsetX*b._m13+a._offsetY*b._m23+a._offsetZ*b._m33+a._m44*b._offsetZ,a._offsetX*b._m14+a._offsetY*b._m24+a._offsetZ*b._m34+a._m44*b._m44)},Uc.lookAtLH=function(a,b,c){var d=Sc.subtractVectors(b,a);d.normalize();var e=Sc.cross(c,d);e.normalize();var f=Sc.cross(d,e),g=Uc.create(e.x,f.x,d.x,0,e.y,f.y,d.y,0,e.z,f.z,d.z,0,-Sc.dot(e,a),-Sc.dot(f,a),-Sc.dot(d,a),1);return g},Uc._createIdentity=function(){var a=Uc.create(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return a.set__isDistinguishedIdentity(!0),a},Uc.equals=function(a,b){return a.get__isDistinguishedIdentity()||b.get__isDistinguishedIdentity()?a.get_isIdentity()===b.get_isIdentity():a.get_m11()===b.get_m11()&&a.get_m12()===b.get_m12()&&a.get_m13()===b.get_m13()&&a.get_m14()===b.get_m14()&&a.get_m21()===b.get_m21()&&a.get_m22()===b.get_m22()&&a.get_m23()===b.get_m23()&&a.get_m24()===b.get_m24()&&a.get_m31()===b.get_m31()&&a.get_m32()===b.get_m32()&&a.get_m33()===b.get_m33()&&a.get_m34()===b.get_m34()&&a.get_offsetX()===b.get_offsetX()&&a.get_offsetY()===b.get_offsetY()&&a.get_offsetZ()===b.get_offsetZ()?a.get_m44()===b.get_m44():!1},Uc.fromMatrix2d=function(a){var b=Uc._createIdentity();return b.set_m11(a.m11),b.set_m12(a.m12),b.set_m13(a.m13),b.set_m21(a.m21),b.set_m22(a.m22),b.set_m23(a.m23),b.set_m31(a.m31),b.set_m32(a.m32),b.set_m33(a.m33),b._isNotKnownToBeIdentity=!0,b},Uc._rotationY=function(a){var b=a,c=Uc.get_identity();return c._m11=Math.cos(b),c._m22=1,c._m31=Math.sin(b),c._m13=-Math.sin(b),c._m33=Math.cos(b),c._isNotKnownToBeIdentity=!0,c},Uc._rotationX=function(a){var b=a,c=Uc.get_identity();return c._m11=1,c._m22=Math.cos(b),c._m32=-Math.sin(b),c._m23=Math.sin(b),c._m33=Math.cos(b),c._isNotKnownToBeIdentity=!0,c},Uc._rotationZ=function(a){var b=a,c=Uc.get_identity();return c._m11=Math.cos(b),c._m21=-Math.sin(b),c._m12=Math.sin(b),c._m22=Math.cos(b),c._m33=1,c._isNotKnownToBeIdentity=!0,c},Uc._scaling=function(a,b,c){var d=Uc.get_identity();return d._m11=a,d._m22=b,d._m33=c,d._isNotKnownToBeIdentity=!0,d},Uc._translationXYZ=function(a,b,c){var d=Uc.get_identity();return d.set_offsetX(a),d.set_offsetY(b),d.set_offsetZ(c),d._isNotKnownToBeIdentity=!0,d},Uc.perspectiveFovLH=function(a,b,c,d){var e=1/Math.tan(a/2),f=e/b;return Uc.create(f,0,0,0,0,e,0,0,0,0,d/(d-c),1,0,0,-c*d/(d-c),0)},Uc.perspectiveOffCenterLH=function(a,b,c,d,e,f){return Uc.create(2*e/(b-a),0,0,0,0,2*e/(d-c),0,0,(a+b)/(a-b),(d+c)/(c-d),f/(f-e),1,0,0,e*f/(e-f),0)},Uc.invertMatrix=function(a){var b=a;return b.invert(),b},Uc.translation=function(a){return Uc._translationXYZ(a.x,a.y,a.z)},Uc.getMapMatrix=function(a,b,c,d){var e=0,f=0;e=-((a.get_lng()+180-b/2)/360),f=-(1-(a.get_lat()+90+c/2)/180);var g=new Vc,h=0,i=0;return h=360/b,i=180/c,g=Vc.multiply(g,Vc.translation(e,f)),g=Vc.multiply(g,Vc.scaling(h,i)),d&&(g=Vc.multiply(g,Vc.translation(-.5,-.5)),g=Vc.multiply(g,Vc.rotation(d)),g=Vc.multiply(g,Vc.translation(.5,.5))),Uc.fromMatrix2d(g)};var $g={clone:function(){var a=new Uc;return a.set(this),a},setIdentity:function(){this.set(Uc._s_identity)},set:function(a){this._m11=a._m11,this._m12=a._m12,this._m13=a._m13,this._m14=a._m14,this._m21=a._m21,this._m22=a._m22,this._m23=a._m23,this._m24=a._m24,this._m31=a._m31,this._m32=a._m32,this._m33=a._m33,this._m34=a._m34,this._offsetX=a._offsetX,this._offsetY=a._offsetY,this._offsetZ=a._offsetZ,this._m44=a._m44,this._isNotKnownToBeIdentity=!0},floatArray:function(){var a=new Array(16);return a[0]=this._m11,a[1]=this._m12,a[2]=this._m13,a[3]=this._m14,a[4]=this._m21,a[5]=this._m22,a[6]=this._m23,a[7]=this._m24,a[8]=this._m31,a[9]=this._m32,a[10]=this._m33,a[11]=this._m34,a[12]=this._offsetX,a[13]=this._offsetY,a[14]=this._offsetZ,a[15]=this._m44,a},get_isIdentity:function(){return this.get__isDistinguishedIdentity()?!0:1!==this._m11||this._m12||this._m13||this._m14||this._m21||1!==this._m22||this._m23||this._m24||this._m31||this._m32||1!==this._m33||this._m34||this._offsetX||this._offsetY||this._offsetZ||1!==this._m44?!1:(this.set__isDistinguishedIdentity(!0),!0)},prepend:function(a){this.set(Uc.multiplyMatrix(a,this))},append:function(a){this._multiply(a)},scale:function(a){this.get__isDistinguishedIdentity()?this._setScaleMatrix(a):(this._m11*=a.x,this._m12*=a.y,this._m13*=a.z,this._m21*=a.x,this._m22*=a.y,this._m23*=a.z,this._m31*=a.x,this._m32*=a.y,this._m33*=a.z,this._offsetX*=a.x,this._offsetY*=a.y,this._offsetZ*=a.z)},scalePrepend:function(a){this.get__isDistinguishedIdentity()?this._setScaleMatrix(a):(this._m11*=a.x,this._m12*=a.x,this._m13*=a.x,this._m14*=a.x,this._m21*=a.y,this._m22*=a.y,this._m23*=a.y,this._m24*=a.y,this._m31*=a.z,this._m32*=a.z,this._m33*=a.z,this._m34*=a.z)},scaleAt:function(a,b){if(this.get__isDistinguishedIdentity())this._setScaleMatrixCenter(a,b);else{var c=this._m14*b.x;this._m11=c+a.x*(this._m11-c),c=this._m14*b.y,this._m12=c+a.y*(this._m12-c),c=this._m14*b.z,this._m13=c+a.z*(this._m13-c),c=this._m24*b.x,this._m21=c+a.x*(this._m21-c),c=this._m24*b.y,this._m22=c+a.y*(this._m22-c),c=this._m24*b.z,this._m23=c+a.z*(this._m23-c),c=this._m34*b.x,this._m31=c+a.x*(this._m31-c),c=this._m34*b.y,this._m32=c+a.y*(this._m32-c),c=this._m34*b.z,this._m33=c+a.z*(this._m33-c),c=this._m44*b.x,this._offsetX=c+a.x*(this._offsetX-c),c=this._m44*b.y,this._offsetY=c+a.y*(this._offsetY-c),c=this._m44*b.z,this._offsetZ=c+a.z*(this._offsetZ-c)}},scaleAtPrepend:function(a,b){if(this.get__isDistinguishedIdentity())this._setScaleMatrixCenter(a,b);else{var c=b.x-b.x*a.x,d=b.y-b.y*a.y,e=b.z-b.z*a.z;this._offsetX+=this._m11*c+this._m21*d+this._m31*e,this._offsetY+=this._m12*c+this._m22*d+this._m32*e,this._offsetZ+=this._m13*c+this._m23*d+this._m33*e,this._m44+=this._m14*c+this._m24*d+this._m34*e,this._m11*=a.x,this._m12*=a.x,this._m13*=a.x,this._m14*=a.x,this._m21*=a.y,this._m22*=a.y,this._m23*=a.y,this._m24*=a.y,this._m31*=a.z,this._m32*=a.z,this._m33*=a.z,this._m34*=a.z}},translate:function(a){this.get__isDistinguishedIdentity()?this._setTranslationMatrix(a):(this._m11+=this._m14*a.x,this._m12+=this._m14*a.y,this._m13+=this._m14*a.z,this._m21+=this._m24*a.x,this._m22+=this._m24*a.y,this._m23+=this._m24*a.z,this._m31+=this._m34*a.x,this._m32+=this._m34*a.y,this._m33+=this._m34*a.z,this._offsetX+=this._m44*a.x,this._offsetY+=this._m44*a.y,this._offsetZ+=this._m44*a.z)},translatePrepend:function(a){this.get__isDistinguishedIdentity()?this._setTranslationMatrix(a):(this._offsetX+=this._m11*a.x+this._m21*a.y+this._m31*a.z,this._offsetY+=this._m12*a.x+this._m22*a.y+this._m32*a.z,this._offsetZ+=this._m13*a.x+this._m23*a.y+this._m33*a.z,this._m44+=this._m14*a.x+this._m24*a.y+this._m34*a.z)},transform:function(a){var b=new Sc;if(!this.get__isDistinguishedIdentity()){var c=a.x,d=a.y,e=a.z;if(b.x=c*this._m11+d*this._m21+e*this._m31+this._offsetX,b.y=c*this._m12+d*this._m22+e*this._m32+this._offsetY,b.z=c*this._m13+d*this._m23+e*this._m33+this._offsetZ,!this.get_isAffine()){var f=c*this._m14+d*this._m24+e*this._m34+this._m44;b.x/=f,b.y/=f,b.z/=f}}return b},_transformTo:function(a,b){b.x=a.x*this._m11+a.y*this._m21+a.z*this._m31+this._offsetX,b.y=a.x*this._m12+a.y*this._m22+a.z*this._m32+this._offsetY,b.z=a.x*this._m13+a.y*this._m23+a.z*this._m33+this._offsetZ;var c=a.x*this._m14+a.y*this._m24+a.z*this._m34+this._m44;b.x/=c,b.y/=c,b.z/=c},transformArray:function(a){if(null!=a)for(var b=0;bb;b++){var y=a[b];y.xr.x&&(r=y),y.yt.y&&(t=y),y.zv.z&&(v=y)}for(c=r.x-q.x,d=r.y-q.y,e=r.z-q.z,g=c*c+d*d+e*e,c=t.x-s.x,d=t.y-s.y,e=t.z-s.z,h=c*c+d*d+e*e,c=v.x-u.x,d=v.y-u.y,e=v.z-u.z,i=c*c+d*d+e*e,w=q,x=r,j=g,h>j&&(j=h,w=s,x=t),i>j&&(w=u,x=v),n.x=(w.x+x.x)/2,n.y=(w.y+x.y)/2,n.z=(w.z+x.z)/2,c=x.x-n.x,d=x.y-n.y,e=x.z-n.z,f=c*c+d*d+e*e,o=Math.sqrt(f),b=0;p>b;b++){var y=a[b];c=y.x-n.x,d=y.y-n.y,e=y.z-n.z,l=c*c+d*d+e*e,l>f&&(k=Math.sqrt(l),o=(o+k)/2,f=o*o,m=k-o,n.x=(o*n.x+m*y.x)/k,n.y=(o*n.y+m*y.y)/k,n.z=(o*n.z+m*y.z)/k)}return $c._create(n,o)};var eh={},fh={toString:function(){return this._nameField},get_versionDependent:function(){return this._versionDependent},set_versionDependent:function(a){this._versionDependent=a;for(var b=ss.enumerate(this._folders);b.moveNext();){var c=b.current;c.set_versionDependent(this._versionDependent)}return a},get_readOnly:function(){return this._readOnly},set_readOnly:function(a){return this._readOnly=a,a},get_dirty:function(){return this._dirty},set_dirty:function(a){return this._dirty=a,a},loadFromUrl:function(a,b){this._onComplete=b,this._webFile=new Cc(wc.getProxiedUrl(a)),this._webFile.onStateChange=ss.bind("_loadData",this),this._webFile.send()},_loadData:function(){if(2===this._webFile.get_state())alert(this._webFile.get_message());else if(1===this._webFile.get_state()){var a=wc.selectSingleNode(this._webFile.getXml(),"Folder");if(null==a){var b=this._webFile.getXml();null!=b&&(a=wc.selectSingleNode(b,"Folder"))}null!=a&&(this._clearChildren(),this._parseXML(a)),null!=this._onComplete&&this._onComplete()}},_clearChildren:function(){this._folders.length=0,this._tours.length=0,this._places.length=0,this.get_imagesets().length=0},_parseXML:function(a){this._nameField=null!=a.attributes.getNamedItem("Name")?a.attributes.getNamedItem("Name").nodeValue:"",null!=a.attributes.getNamedItem("Url")&&(this._urlField=a.attributes.getNamedItem("Url").nodeValue),null!=a.attributes.getNamedItem("Thumbnail")&&(this._thumbnailUrlField=a.attributes.getNamedItem("Thumbnail").nodeValue);for(var b=ss.enumerate(a.childNodes);b.moveNext();){var c=b.current;switch(c.nodeName){case"Folder":var d=new ad;d.parent=this,d._parseXML(c),this._folders.push(d);break;case"Place":this._places.push(hd._fromXml(c));break;case"ImageSet":this.get_imagesets().push(dd.fromXMLNode(c));break;case"Tour":this.get_tours().push(lc._fromXml(c))}}},addChildFolder:function(a){this._folders.push(a),this._dirty=!0},removeChildFolder:function(a){ss.remove(this._folders,a),this._dirty=!0},addChildPlace:function(a){this._places.push(a),this._dirty=!0},removeChildPlace:function(a){ss.remove(this._places,a),this._dirty=!0},get_thumbnail:function(){return this._thumbnail},set_thumbnail:function(a){return this._thumbnail=a,a},get_bounds:function(){return this._bounds},set_bounds:function(a){return this._bounds=a,a},get_isImage:function(){return!1},get_isTour:function(){return!1},get_isFolder:function(){return!0},get_isCloudCommunityItem:function(){return!!this._communityIdField||this._permissionField>0},refresh:function(){null==this._proxyFolder&&(this._proxyFolder=new ad,this._proxyFolder.isProxy=!0,this._proxyFolder.parent=this.parent),this._proxyFolder.loadFromUrl(this._urlField,this._childReadyCallback),this._childReadyCallback=null},childLoadCallback:function(a){this._childReadyCallback=a;this.get_children();null==this._proxyFolder&&a()},get_children:function(){if(ss.emptyString(this._urlField)){if(this._childList.length=0,null!=this.parent){var a=new cd;a.parent=this.parent,this._childList.push(a)}if(null!=this.get_folders())for(var b=ss.enumerate(this.get_folders());b.moveNext();){var c=b.current;this._childList.push(c)}if(null!=this.get_imagesets())for(var d=ss.enumerate(this.get_imagesets());d.moveNext();){var e=d.current;this._childList.push(e)}if(null!=this.get_places())for(var f=ss.enumerate(this.get_places());f.moveNext();){var g=f.current;this._childList.push(g)}if(null!=this.get_tours())for(var h=ss.enumerate(this.get_tours());h.moveNext();){var i=h.current;this._childList.push(i)}return this._childList}(this._lastUpdate-ss.now())/1e3;return this.refresh(),null!=this._proxyFolder?this._proxyFolder.get_children():null},get_msrCommunityId:function(){return this._communityIdField},set_msrCommunityId:function(a){return this._communityIdField=a,a},get_msrComponentId:function(){return this._componentIdField},set_msrComponentId:function(a){return this._componentIdField=a,a},get_permission:function(){return this._permissionField},set_permission:function(a){return this._permissionField=a,a},get_folders:function(){return this._folders},set_folders:function(a){return this._folders=a,a},get_places:function(){return this._places},set_places:function(a){return this._places=a,a},get_imagesets:function(){return this._imagesets},set_imagesets:function(a){return this._imagesets=a,a},get_tours:function(){return this._tours},set_tours:function(a){return this._tours=a,a},get_name:function(){return null==this._nameField?"":this._nameField},set_name:function(a){return this._nameField=a,a},get_group:function(){return this._groupField},set_group:function(a){return this._groupField=a,a},get_url:function(){return this._urlField},set_url:function(a){return this._urlField=a,a},get_thumbnailUrl:function(){return ss.emptyString(this._thumbnailUrlField)?"http://cdn.worldwidetelescope.org/wwtweb/thumbnail.aspx?name=folder":this._thumbnailUrlField},set_thumbnailUrl:function(a){return this._thumbnailUrlField=a,a},get_refreshType:function(){return this._refreshTypeField},set_refreshType:function(a){return this._refreshTypeField=a,this.set_refreshTypeSpecified(!0),a},get_refreshTypeSpecified:function(){return this._refreshTypeFieldSpecified},set_refreshTypeSpecified:function(a){return this._refreshTypeFieldSpecified=a,a},get_refreshInterval:function(){return this._refreshIntervalField},set_refreshInterval:function(a){return this._refreshIntervalField=a,a},get_browseable:function(){return this._browseableField},set_browseable:function(a){return this._browseableField=a,this._browseableFieldSpecified=!0,a},get_browseableSpecified:function(){return this._browseableFieldSpecified},set_browseableSpecified:function(a){return this._browseableFieldSpecified=a,a},get_searchable:function(){return this._searchableField},set_searchable:function(a){return this._searchableField=a,a},get_type:function(){return this._typeField},set_type:function(a){return this._typeField=a,a},get_subType:function(){return this._subTypeField},set_subType:function(a){return this._subTypeField=a,a}};bd.create=function(){var a=new bd;return a.height=85,a.width=1920,a.canvas=document.createElement("canvas"),a.canvas.width=a.width,a.canvas.height=a.height,a.setup(),a.loadImages(),a};var gh={setup:function(){this.canvas.addEventListener("click",ss.bind("onClick",this),!1),this.canvas.addEventListener("dblclick",ss.bind("onDoubleClick",this),!1),this.canvas.addEventListener("mousemove",ss.bind("onMouseMove",this),!1),this.canvas.addEventListener("mouseup",ss.bind("onMouseUp",this),!1),this.canvas.addEventListener("mousedown",ss.bind("onMouseDown",this),!1),this.canvas.addEventListener("mousewheel",ss.bind("onMouseWheel",this),!1),this.canvas.addEventListener("touchstart",ss.bind("onTouchStart",this),!1),this.canvas.addEventListener("touchmove",ss.bind("onTouchMove",this),!1),this.canvas.addEventListener("touchend",ss.bind("onTouchEnd",this),!1),this.canvas.addEventListener("mouseout",ss.bind("onMouseUp",this),!1)},onTouchStart:function(a){var b=a;b.preventDefault(),this._mouseDown=!0,this._lastX=b.targetTouches[0].pageX,this._lastY=b.targetTouches[0].pageY,this._indexTouchDown=this._getItemIndexFromCursor(Tc.create(b.targetTouches[0].pageX,b.targetTouches[0].pageY))},onTouchMove:function(a){var b=a;if(b.preventDefault(),this._mouseDown){{b.targetTouches[0].pageX-this._lastX,b.targetTouches[0].pageY-this._lastY}if(this._mouseDown&&(this._dragging=!0),this._dragging){var c=Math.round((b.targetTouches[0].pageX-this._lastX+this._startOffset)/this._horzSpacing),d=Math.round(b.targetTouches[0].pageX-this._lastX+this._startOffset-c*this._horzSpacing);this._startOffset=d,this._startIndex-=c,this._startIndex<0&&(this._startOffset-=this._horzSpacing*this._startIndex,this._startIndex=0),this._lastX=b.targetTouches[0].pageX,this._lastY=b.targetTouches[0].pageY}else{var e=this._getItemIndexFromCursor(Tc.create(b.targetTouches[0].pageX,b.targetTouches[0].pageY));this._hoverItem!==e&&(this._hoverItem=e)}this.refresh()}},onTouchEnd:function(a){var b=a; b.preventDefault(),this._dragging?(this._dragging=!1,this._ignoreClick=!0):this._indexTouchDown>-1&&this._mouseDown&&this._handleClick(this._indexTouchDown),this._startOffset=0,this._mouseDown=!1,this.refresh()},onClick:function(a){if(this._ignoreClick)this._ignoreClick=!1;else{var b=this._getItemIndexFromCursor(Tc.create(a.offsetX,a.offsetY));this._handleClick(b)}},_handleClick:function(a){var b=this;if(a>-1){if(ss.canCast(this._items[a],hd)){var c=this._items[a];return void Ec.singleton.gotoTarget(c,!1,!1,!0)}if(ss.canCast(this._items[a],dd)){var d=this._items[a];return void Ec.singleton.renderContext.set_backgroundImageset(d)}if(ss.canCast(this._items[a],lc)){var e=this._items[a];return void Ec.singleton.playTour(e.get_tourUrl())}if(ss.canCast(this._items[a],ad)){var f=this._items[a];return this._startIndex=0,void f.childLoadCallback(function(){b._items=f.get_children(),b.refresh()})}if(ss.canCast(this._items[a],cd)){var g=this._items[a];return void(null!=g.parent&&(this._startIndex=0,g.parent.childLoadCallback(function(){b._items=g.parent.get_children(),b.refresh()})))}}},onDoubleClick:function(){_b.renderingOn=!_b.renderingOn},onGestureChange:function(a){var b=a;this._mouseDown=!1;b.scale},onMouseDown:function(a){this._mouseDown=!0,this._lastX=zc.offsetX(this.canvas,a),this._lastY=zc.offsetY(this.canvas,a)},onMouseMove:function(a){if(this._mouseDown&&(this._dragging=!0),this._dragging){var b=Math.round((zc.offsetX(this.canvas,a)-this._lastX+this._startOffset)/this._horzSpacing),c=Math.round(zc.offsetX(this.canvas,a)-this._lastX+this._startOffset-b*this._horzSpacing);this._startOffset=c,this._startIndex-=b,this._startIndex<0&&(this._startOffset-=this._horzSpacing*this._startIndex,this._startIndex=0),this._lastX=zc.offsetX(this.canvas,a),this._lastY=zc.offsetY(this.canvas,a)}else{var d=this._getItemIndexFromCursor(Tc.create(zc.offsetX(this.canvas,a),zc.offsetY(this.canvas,a)));this._hoverItem!==d&&(this._hoverItem=d)}this.refresh()},onMouseUp:function(){this._dragging&&(this._startOffset=0,this._dragging=!1,this._ignoreClick=!0),this._mouseDown=!1,this.refresh()},onMouseWheel:function(a){{var b=a;b.wheelDelta}},loadImages:function(){var a=this;bd._imagesLoaded||bd._downloading||(bd._imageLoadCount=0,bd._imagesLoaded=!1,bd._downloading=!0,bd._bmpBackground=document.createElement("img"),bd._bmpBackground.src="images/thumbBackground.png",bd._bmpBackground.addEventListener("load",function(){bd._imageLoadCount++,5===bd._imageLoadCount&&(bd._downloading=!1,bd._imagesLoaded=!0,a.refresh())},!1),bd._bmpBackgroundHover=document.createElement("img"),bd._bmpBackgroundHover.src="images/thumbBackgroundHover.png",bd._bmpBackgroundHover.addEventListener("load",function(){bd._imageLoadCount++,5===bd._imageLoadCount&&(bd._downloading=!1,bd._imagesLoaded=!0,a.refresh())},!1),bd._bmpBackgroundWide=document.createElement("img"),bd._bmpBackgroundWide.src="images/thumbBackgroundWide.png",bd._bmpBackgroundWide.addEventListener("load",function(){bd._imageLoadCount++,5===bd._imageLoadCount&&(bd._downloading=!1,bd._imagesLoaded=!0,a.refresh())},!1),bd._bmpBackgroundWideHover=document.createElement("img"),bd._bmpBackgroundWideHover.src="images/thumbBackgroundWideHover.png",bd._bmpBackgroundWideHover.addEventListener("load",function(){bd._imageLoadCount++,5===bd._imageLoadCount&&(bd._downloading=!1,bd._imagesLoaded=!0,a.refresh())},!1),bd._bmpDropInsertMarker=document.createElement("img"),bd._bmpDropInsertMarker.src="images/dragInsertMarker.png",bd._bmpDropInsertMarker.addEventListener("load",function(){bd._imageLoadCount++,5===bd._imageLoadCount&&(bd._downloading=!1,bd._imagesLoaded=!0,a.refresh())},!1))},get_thumbnailSize:function(){return this._thumbnailSize},set_thumbnailSize:function(a){switch(this._thumbnailSize=a,a){case 1:this._horzSpacing=180,this._vertSpacing=75,this._thumbHeight=65,this._thumbWidth=180;break;case 0:this._horzSpacing=110,this._vertSpacing=75,this._thumbHeight=65,this._thumbWidth=110}return this._updatePaginator(),this.refresh(),a},refresh:function(){this.width!==window.innerWidth&&(this.width=window.innerWidth,this.canvas.width=this.canvas.width),this.paint()},get_rowCount:function(){return this._rowCount},set_rowCount:function(a){return this._rowCount!==a&&(this._rowCount=a,this._updatePaginator()),a},_updatePaginator:function(){},get_colCount:function(){return this._colCount},set_colCount:function(a){return this._colCount!==a&&(this._colCount=a,this._updatePaginator()),a},get_itemsPerPage:function(){return this._rowCount*this._colCount},get_currentPage:function(){return this._startIndex/this.get_itemsPerPage()},get_pageCount:function(){return Math.max(1,(this._items.length+this.get_itemsPerPage()-1+(this.showAddButton?1:0))/this.get_itemsPerPage())},paint:function(){var a=this,b=this.canvas.getContext("2d");if(b.fillStyle="rgb(20, 22, 31)",b.fillRect(0,0,this.width,this.height),bd._imagesLoaded){var c=this.height-20,d=this.width-20;this.set_rowCount(Math.round(Math.max(c/this._thumbHeight,1))),this.set_colCount(Math.round(Math.max(d/this._horzSpacing,1))),this._horzMultiple=(d+13)/this.get_colCount(),this._startIndex=Math.round(this._startIndex/this.get_itemsPerPage()*this.get_itemsPerPage());for(var e,f=this._startIndex,g=0;g=this._items.length){(!this._items.length||this.showAddButton)&&(e=xc.create(this.left+h*this._horzMultiple+3+this._startOffset,this.top+g*this._vertSpacing,this._thumbWidth-10,60),b.drawImage(1===this._thumbnailSize?bd._bmpBackgroundWide:bd._bmpBackground,ss.truncate(h*this._horzMultiple)+this._startOffset,g*this._vertSpacing));break}e=xc.create(this.left+h*this._horzMultiple+3+this._startOffset,this.top+g*this._vertSpacing,this._thumbWidth-14,60);var i="white";f===this._hoverItem||f===this._selectedItem&&-1===this._hoverItem?(b.drawImage(1===this._thumbnailSize?bd._bmpBackgroundWideHover:bd._bmpBackgroundHover,this.left+ss.truncate(h*this._horzMultiple)+this._startOffset,this.top+g*this._vertSpacing),i="yellow"):b.drawImage(1===this._thumbnailSize?bd._bmpBackgroundWide:bd._bmpBackground,this.left+ss.truncate(h*this._horzMultiple)+this._startOffset,this.top+g*this._vertSpacing),this._items[f].set_bounds(xc.create(this.left+h*this._horzMultiple+this._startOffset,this.top+g*this._vertSpacing,ss.truncate(this._horzMultiple),this._vertSpacing));try{var j=this._items[f].get_thumbnail();null!=j?(b.drawImage(j,this.left+h*this._horzMultiple+2+this._startOffset,this.top+g*this._vertSpacing+3),b.strokeStyle="rgb(0,0,0)",b.rect(this.left+ss.truncate(h*this._horzMultiple)+2+this._startOffset,this.top+g*this._vertSpacing+3,this._items[f].get_thumbnail().width,this._items[f].get_thumbnail().height)):(this._items[f].set_thumbnail(document.createElement("img")),this._items[f].get_thumbnail().src=this._items[f].get_thumbnailUrl(),this._items[f].get_thumbnail().addEventListener("load",function(){a.refresh()},!1))}catch(k){}b.fillStyle=i,b.strokeStyle=i,b.lineWidth=1,b.font="normal 8pt Arial",b.fillText(this._items[f].get_name(),e.x,e.y+e.height,e.width),f++}if(f>=this._items.length)break}}},_getItemIndexFromCursor:function(a){var b=Tc.create(a.x+this.left,a.y+this.top);this.imageClicked=!1;var c=-1,d=ss.truncate(b.x/this._horzMultiple),e=ss.truncate(b.x%this._horzMultiple);if(d>=this._colCount)return-1;if(0>d)return-1;var f=ss.truncate(b.y/this._vertSpacing),g=ss.truncate(b.y%this._vertSpacing);return f>=this._rowCount?-1:0>f?-1:(c=this._startIndex+f*this._colCount+d,this._addButtonHover=c===this._items.length?!0:!1,c>this._items.length-1?-1:(this._items[c].get_isImage()&&16>g&&e>78&&(this.imageClicked=!0),c))},_addItems:function(a){this._items=a}},hh={get_name:function(){return"Up Level"},get_thumbnail:function(){return this._thumbnail},set_thumbnail:function(a){return this._thumbnail=a,a},get_thumbnailUrl:function(){return"http://www.worldwidetelescope.org/wwtweb/thumbnail.aspx?Name=folderup"},set_thumbnailUrl:function(a){},get_bounds:function(){return this._bounds},set_bounds:function(a){return this._bounds=a,a},get_isImage:function(){return!1},get_isTour:function(){return!1},get_isFolder:function(){return!1},get_isCloudCommunityItem:function(){return!1},get_readOnly:function(){return!1},get_children:function(){return null==this.parent?[]:this.parent.get_children()}};dd.getTileKey=function(a,b,c,d){return a.get_imageSetID().toString()+"\\"+b.toString()+"\\"+d.toString()+"_"+c.toString()},dd.getNewTile=function(a,b,c,d,e){switch(a.get_projection()){case 0:var f=Ad.create(b,c,d,a,e);return f;case 1:return zd.create(b,c,d,a,e);case 3:default:return qd.create(b,c,d,a,e);case 5:return od.create(b,c,d,a,e);case 6:return nd.create(b,c,d,a,e);case 2:var f=pd.create(b,c,d,a,e);return f}},dd.fromXMLNode=function(a){try{var b=2,c=2;if(null!=a.attributes.getNamedItem("DataSetType"))switch(a.attributes.getNamedItem("DataSetType").nodeValue.toLowerCase()){case"earth":b=0;break;case"planet":b=1;break;case"sky":b=2;break;case"panorama":b=3;break;case"solarsystem":b=4}var d=3;switch(a.attributes.getNamedItem("BandPass").nodeValue){case"Gamma":d=0;break;case"XRay":d=1;break;case"Ultraviolet":d=2;break;case"Visible":d=3;break;case"HydrogenAlpha":d=4;break;case"IR":d=4;break;case"Microwave":d=5;break;case"Radio":d=6;break;case"VisibleNight":d=6}var e=1;if(null!=a.attributes.getNamedItem("WidthFactor")&&(e=parseInt(a.attributes.getNamedItem("WidthFactor").nodeValue)),null!=a.attributes.getNamedItem("Generic")&&ss["boolean"](a.attributes.getNamedItem("Generic").nodeValue))return dd.createGeneric(b,d);switch(a.attributes.getNamedItem("Projection").nodeValue.toLowerCase()){case"tan":case"tangent":c=2;break;case"mercator":c=0;break;case"equirectangular":c=1;break;case"toast":c=3;break;case"spherical":c=4;break;case"plotted":c=6;break;case"skyimage":c=5}var f=a.attributes.getNamedItem("FileType").nodeValue;ss.startsWith(f,".")||(f="."+f);var g="",h=wc.selectSingleNode(a,"ThumbnailUrl");if(null!=h)if(ss.emptyString(h.text)){var i=h;g=i.textContent}else g=h.text;var j=!1,k=!1;null!=a.attributes.getNamedItem("StockSet")&&(j=ss["boolean"](a.attributes.getNamedItem("StockSet").nodeValue)),null!=a.attributes.getNamedItem("ElevationModel")&&(k=ss["boolean"](a.attributes.getNamedItem("ElevationModel").nodeValue));var l="";null!=a.attributes.getNamedItem("DemUrl")&&(l=a.attributes.getNamedItem("DemUrl").nodeValue);var m="";null!=a.attributes.getNamedItem("AltUrl")&&(m=a.attributes.getNamedItem("AltUrl").nodeValue);var n=0;null!=a.attributes.getNamedItem("OffsetX")&&(n=parseFloat(a.attributes.getNamedItem("OffsetX").nodeValue));var o=0;null!=a.attributes.getNamedItem("OffsetY")&&(o=parseFloat(a.attributes.getNamedItem("OffsetY").nodeValue));var p="",q=wc.selectSingleNode(a,"Credits");null!=q&&(p=wc.getInnerText(q));var r="";q=wc.selectSingleNode(a,"CreditsUrl"),null!=q&&(r=wc.getInnerText(q));var s=0;null!=a.attributes.getNamedItem("MeanRadius")&&(s=parseFloat(a.attributes.getNamedItem("MeanRadius").nodeValue));var t=null;null!=a.attributes.getNamedItem("ReferenceFrame")&&(t=a.attributes.getNamedItem("ReferenceFrame").nodeValue);var u="";null!=a.attributes.getNamedItem("Name")&&(u=a.attributes.getNamedItem("Name").nodeValue);var v="";null!=a.attributes.getNamedItem("Url")&&(v=a.attributes.getNamedItem("Url").nodeValue);var w=0;null!=a.attributes.getNamedItem("BaseTileLevel")&&(w=parseInt(a.attributes.getNamedItem("BaseTileLevel").nodeValue));var x=0;null!=a.attributes.getNamedItem("TileLevels")&&(x=parseInt(a.attributes.getNamedItem("TileLevels").nodeValue));var y=0;null!=a.attributes.getNamedItem("BaseDegreesPerTile")&&(y=parseFloat(a.attributes.getNamedItem("BaseDegreesPerTile").nodeValue));var z=!1;null!=a.attributes.getNamedItem("BottomsUp")&&(z=ss["boolean"](a.attributes.getNamedItem("BottomsUp").nodeValue));var A="";null!=a.attributes.getNamedItem("QuadTreeMap")&&(A=a.attributes.getNamedItem("QuadTreeMap").nodeValue);var B=0;null!=a.attributes.getNamedItem("CenterX")&&(B=parseFloat(a.attributes.getNamedItem("CenterX").nodeValue));var C=0;null!=a.attributes.getNamedItem("CenterY")&&(C=parseFloat(a.attributes.getNamedItem("CenterY").nodeValue));var D=0;null!=a.attributes.getNamedItem("Rotation")&&(D=parseFloat(a.attributes.getNamedItem("Rotation").nodeValue));var E=!1;return null!=a.attributes.getNamedItem("Sparse")&&(E=ss["boolean"](a.attributes.getNamedItem("Sparse").nodeValue)),dd.create(u,v,b,d,c,Math.abs(wc.getHashCode(v)),w,x,256,y,f,z,A,B,C,D,E,g,j,k,e,n,o,p,r,l,m,s,t)}catch(F){return null}},dd.createGeneric=function(a,b){var c=new dd;return c._generic=!0,c._name="Generic",c._sparse=!1,c._dataSetType=a,c._bandPass=b,c._quadTreeTileMap="",c.url="",c._levels=0,c._baseTileDegrees=0,c._imageSetID=0,c._extension="",c._projection=1,c._bottomsUp=!1,c._baseLevel=0,c._mercator=!c._projection,c._centerX=0,c._centerY=0,c._rotation=0,c._thumbnailUrl="",c._matrix=Uc.get_identity(),c._matrix._multiply(Uc._rotationX(c.get_rotation()/180*Math.PI)),c._matrix._multiply(Uc._rotationZ(c.get_centerY()/180*Math.PI)),c._matrix._multiply(Uc._rotationY((360-c.get_centerX()+180)/180*Math.PI)),c},dd.create=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){var D=new dd;return D.set_referenceFrame(C),D.set_meanRadius(B),D._altUrl=A,D.demUrl=z,D._creditsText=x,D._creditsUrl=y,D._offsetY=w,D._offsetX=v,D._widthFactor=u,D._elevationModel=t,D._defaultSet=s,D._name=a,D._sparse=q,D._dataSetType=c,D._bandPass=d,D._quadTreeTileMap=m,D.url=b,D._levels=h,D._baseTileDegrees=j,D._imageSetID=f,D._extension=k,D._projection=e,D._bottomsUp=l,D._baseLevel=g,D._mercator=!e,D._centerX=n,D._centerY=o,D._rotation=p,D._thumbnailUrl=r,D._computeMatrix(),D};var ih={get_projection:function(){return this._projection},set_projection:function(a){return this._projection=a,a},get_referenceFrame:function(){return this._referenceFrame},set_referenceFrame:function(a){return this._referenceFrame=a,a},get_imageSetID:function(){return this._imageSetID},set_imageSetID:function(a){return this._imageSetID=a,a},get_baseTileDegrees:function(){return this._baseTileDegrees},set_baseTileDegrees:function(a){return this._baseTileDegrees=a,a},get_widthFactor:function(){return this._widthFactor},set_widthFactor:function(a){return this._widthFactor=a,a},getHashCode:function(){return wc.getHashCode(this.get_url())},get_url:function(){return this.url},set_url:function(a){return this.url=a,a},get_demUrl:function(){return ss.emptyString(this.demUrl)&&!this._projection?"http://www.worldwidetelescope.org/wwtweb/BingDemTile.aspx?Q={0},{1},{2}":this.demUrl},set_demUrl:function(a){return this.demUrl=a,a},get_extension:function(){return this._extension},set_extension:function(a){return this._extension=a,a},get_levels:function(){return this._levels},set_levels:function(a){return this._levels=a,a},get_bottomsUp:function(){return this._bottomsUp},set_bottomsUp:function(a){return this._bottomsUp=a,a},get_mercator:function(){return this._mercator},set_mercator:function(a){return this._mercator=a,a},get_baseLevel:function(){return this._baseLevel},set_baseLevel:function(a){return this._baseLevel=a,a},get_quadTreeTileMap:function(){return this._quadTreeTileMap},set_quadTreeTileMap:function(a){return this._quadTreeTileMap=a,a},get_centerX:function(){return this._centerX},set_centerX:function(a){return this._centerX!==a&&(this._centerX=a,this._computeMatrix()),a},get_centerY:function(){return this._centerY},set_centerY:function(a){return this._centerY!==a&&(this._centerY=a,this._computeMatrix()),a},get_rotation:function(){return this._rotation},set_rotation:function(a){return this._rotation!==a&&(this._rotation=a,this._computeMatrix()),a},get_meanRadius:function(){return this._meanRadius},set_meanRadius:function(a){return this._meanRadius=a,a},get_bandPass:function(){return this._bandPass},set_bandPass:function(a){return this._bandPass=a,a},get_dataSetType:function(){return this._dataSetType},set_dataSetType:function(a){return this._dataSetType=a,a},get_altUrl:function(){return this._altUrl},set_altUrl:function(a){return this._altUrl=a,a},get_singleImage:function(){return this._singleImage},set_singleImage:function(a){return this._singleImage=a,a},toString:function(){return this.get_defaultSet()?this._name+" *":this._name},get_stockImageSet:function(){return this._generic||!this._defaultSet?this:dd.createGeneric(this.get_dataSetType(),this.get_bandPass())},equals:function(a){if(null==a)return!1;if(!ss.canCast(a,dd))return!1;var b=a;return wc.getHashCode(b.get_url())===wc.getHashCode(this.get_url())&&b.get_dataSetType()===this.get_dataSetType()&&b.get_bandPass()===this.get_bandPass()&&b.get_generic()===this.get_generic()},get_matrix:function(){return this._matrixComputed||this._computeMatrix(),this._matrix},set_matrix:function(a){return this._matrix=a,a},_computeMatrix:function(){this._matrixComputed=!0,this._matrix=Uc.get_identity(),this._matrix._multiply(Uc._rotationX(this.get_rotation()/180*Math.PI)),this._matrix._multiply(Uc._rotationZ(this.get_centerY()/180*Math.PI)),this._matrix._multiply(Uc._rotationY((360-this.get_centerX())/180*Math.PI))},get_name:function(){return this._name},set_name:function(a){return this._name=a,a},get_sparse:function(){return this._sparse},set_sparse:function(a){return this._sparse=a,a},get_thumbnailUrl:function(){return this._thumbnailUrl},set_thumbnailUrl:function(a){return this._thumbnailUrl=a,a},get_generic:function(){return this._generic},set_generic:function(a){return this._generic=a,a},get_elevationModel:function(){return this._elevationModel},set_elevationModel:function(a){return this._elevationModel=a,a},get_defaultSet:function(){return this._defaultSet},set_defaultSet:function(a){return this._defaultSet=a,a},get_offsetX:function(){return this._offsetX},set_offsetX:function(a){return this._offsetX=a,a},get_offsetY:function(){return this._offsetY},set_offsetY:function(a){return this._offsetY=a,a},get_creditsText:function(){return this._creditsText},set_creditsText:function(a){return this._creditsText=a,a},get_creditsUrl:function(){return this._creditsUrl},set_creditsUrl:function(a){return this._creditsUrl=a,a},get_isMandelbrot:function(){return!1},get_thumbnail:function(){return this._thumbnail},set_thumbnail:function(a){return this._thumbnail=a,a},get_bounds:function(){return this._bounds},set_bounds:function(a){return this._bounds=a,a},get_isImage:function(){return!0},get_isTour:function(){return!1},get_isFolder:function(){return!1},get_isCloudCommunityItem:function(){return!1},get_readOnly:function(){return!1},get_children:function(){return[]}},jh={get_complete:function(){return this._complete},get_currentPosition:function(){var a=ss.now()-this._fromTime,b=a/1e3,c=b/this._toTargetTime;return!this._midpointFired&&c>=.5&&(this._midpointFired=!0,null!=this._midpoint&&this._midpoint()),c>=1?(c=1,this._complete=!0,this._to.copy()):bc.get_active().get_galacticMode()&&Ec.singleton.renderContext.space?Ic.interpolateGreatCircle(this._from,this._to,c,this.interpolationType,this.fastDirectionMove):Ic.interpolate(this._from,this._to,c,this.interpolationType,this.fastDirectionMove)},get_currentDateTime:function(){var a=ss.now()-this._fromTime,b=a/1e3,c=b/this._toTargetTime,d=this._dateTimeSpan*c,e=new Date(this._fromDateTime.getTime()+ss.truncate(d));return e},get_midpoint:function(){return this._midpoint},set_midpoint:function(a){return this._midpoint=a,a},get_moveTime:function(){return this._toTargetTime}};fd.create=function(a,b){var c=new fd;return c.init(a,b),c},fd.createUpDown=function(a,b,c){var d=new fd;return d._upTimeFactor=d._downTimeFactor=c,d.init(a.copy(),b.copy()),d};var kh={init:function(a,b){Math.abs(a.lng-b.lng)>180&&(a.lng>b.lng?a.lng-=360:a.lng+=360),b.zoom<=0&&(b.zoom=360),a.zoom<=0&&(a.zoom=360),this._from=a,this._to=b,this._fromTime=ss.now();var c,d=360,e=Math.abs(a.lng-b.lng),f=Math.abs(a.lat-b.lat),g=Math.sqrt(f*f+e*e);d=g/3*20,d>360&&(d=360),d1?(c=1,this._complete=!0,this._to.copy()):Ic.interpolate(this._toTop,this._to,c,3,!1)},get_currentDateTime:function(){return gc.updateClock(),gc.get_now()},get_midpoint:function(){return this._midpoint},set_midpoint:function(a){return this._midpoint=a,a},get_moveTime:function(){return this._toTargetTime}};gd._drawTest=function(){var a=document.getElementById("canvas"),b=a.getContext("2d");b.fillStyle="rgb(80,0,0)",b.fillRect(120,120,165,160),b.fillStyle="rgba(0, 0, 160, 0.5)",b.fillRect(140,140,165,160)},hd.create=function(a,b,c,d,e,f,g){var h=new hd;return h.set_zoomLevel(g),h._constellation=e,h._name=a,2===f||4===f?h._camParams.set_RA(c):h.set_lng(c),h.set_lat(b),h.set_classification(d),h.set_type(f),h},hd.createCameraParams=function(a,b,c,d,e,f){var g=new hd;return g._constellation=d,g._name=a,g.set_classification(c),g._camParams=b,g.set_type(e),g.set_target(f),g},hd._fromXml=function(a){var b=new hd;if(b._name=a.attributes.getNamedItem("Name").nodeValue,null!=a.attributes.getNamedItem("DataSetType"))switch(a.attributes.getNamedItem("DataSetType").nodeValue.toLowerCase()){case"earth":b._type=0;break;case"planet":b._type=1;break;case"sky":b._type=2;break;case"panorama":b._type=3;break;case"solarsystem":b._type=4}if(2===b.get_type()?(b._camParams.set_RA(parseFloat(a.attributes.getNamedItem("RA").nodeValue)),b._camParams.set_dec(parseFloat(a.attributes.getNamedItem("Dec").nodeValue))):(b.set_lat(parseFloat(a.attributes.getNamedItem("Lat").nodeValue)),b.set_lng(parseFloat(a.attributes.getNamedItem("Lng").nodeValue))),null!=a.attributes.getNamedItem("Constellation")&&(b._constellation=a.attributes.getNamedItem("Constellation").nodeValue),null!=a.attributes.getNamedItem("Classification"))switch(a.attributes.getNamedItem("Classification").nodeValue){case"Star":b._classification=1;break;case"Supernova":b._classification=2;break;case"BlackHole":b._classification=4;break;case"NeutronStar":b._classification=8;break;case"DoubleStar":b._classification=16;break;case"MultipleStars":b._classification=32;break;case"Asterism":b._classification=64;break;case"Constellation":b._classification=128;break;case"OpenCluster":b._classification=256;break;case"GlobularCluster":b._classification=512;break;case"NebulousCluster":b._classification=1024;break;case"Nebula":b._classification=2048;break;case"EmissionNebula":b._classification=4096;break;case"PlanetaryNebula":b._classification=8192;break;case"ReflectionNebula":b._classification=16384;break;case"DarkNebula":b._classification=32768;break;case"GiantMolecularCloud":b._classification=65536;break;case"SupernovaRemnant":b._classification=131072;break;case"InterstellarDust":b._classification=262144;break;case"Quasar":b._classification=524288;break;case"Galaxy":b._classification=1048576;break;case"SpiralGalaxy":b._classification=2097152;break;case"IrregularGalaxy":b._classification=4194304;break;case"EllipticalGalaxy":b._classification=8388608;break;case"Knot":b._classification=16777216;break;case"PlateDefect":b._classification=33554432;break;case"ClusterOfGalaxies":b._classification=67108864;break;case"OtherNGC":b._classification=134217728;break;case"Unidentified":b._classification=268435456;break;case"SolarSystem":b._classification=536870912;break;case"Unfiltered":b._classification=1073741823;break;case"Stellar":b._classification=63;break;case"StellarGroupings":b._classification=2032;break;case"Nebulae":b._classification=523264;break;case"Galactic":b._classification=133693440;break;case"Other":b._classification=436207616}if(null!=a.attributes.getNamedItem("Magnitude")&&(b._magnitude=parseFloat(a.attributes.getNamedItem("Magnitude").nodeValue)),null!=a.attributes.getNamedItem("AngularSize")&&(b.angularSize=parseFloat(a.attributes.getNamedItem("AngularSize").nodeValue)),null!=a.attributes.getNamedItem("ZoomLevel")&&b.set_zoomLevel(parseFloat(a.attributes.getNamedItem("ZoomLevel").nodeValue)),null!=a.attributes.getNamedItem("Rotation")&&(b._camParams.rotation=parseFloat(a.attributes.getNamedItem("Rotation").nodeValue)),null!=a.attributes.getNamedItem("Angle")&&(b._camParams.angle=parseFloat(a.attributes.getNamedItem("Angle").nodeValue)),b._camParams.opacity=null!=a.attributes.getNamedItem("Opacity")?parseFloat(a.attributes.getNamedItem("Opacity").nodeValue):100,b.set_target(65536),null!=a.attributes.getNamedItem("Target"))switch(a.attributes.getNamedItem("Target").nodeValue){case"Sun":b.set_target(0);break;case"Mercury":b.set_target(1);break;case"Venus":b.set_target(2);break;case"Mars":b.set_target(3);break;case"Jupiter":b.set_target(4);break;case"Saturn":b.set_target(5);break;case"Uranus":b.set_target(6);break;case"Neptune":b.set_target(7);break;case"Pluto":b.set_target(8);break;case"Moon":b.set_target(9);break;case"Io":b.set_target(10);break;case"Europa":b.set_target(11);break;case"Ganymede":b.set_target(12);break;case"Callisto":b.set_target(13);break;case"IoShadow":b.set_target(14);break;case"EuropaShadow":b.set_target(15);break;case"GanymedeShadow":b.set_target(16);break;case"CallistoShadow":b.set_target(17);break;case"SunEclipsed":b.set_target(18);break;case"Earth":b.set_target(19);break;case"Custom":b.set_target(20);break;case"Undefined":b.set_target(65536)}null!=a.attributes.getNamedItem("ViewTarget")&&(b._camParams.viewTarget=Sc.parse(a.attributes.getNamedItem("ViewTarget").nodeValue));var c=wc.selectSingleNode(a,"Description");null!=c&&(b.htmlDescription=c.nodeValue);var d=wc.selectSingleNode(a,"BackgroundImageSet");if(null!=d){var e=wc.selectSingleNode(d,"ImageSet");b._backgroundImageSet=dd.fromXMLNode(e)}var f=wc.selectSingleNode(a,"ForegroundImageSet");if(null!=f){var e=wc.selectSingleNode(f,"ImageSet");b._studyImageset=dd.fromXMLNode(e)}return f=wc.selectSingleNode(a,"ImageSet"),null!=f&&(b._studyImageset=dd.fromXMLNode(f)),b},hd._properCaps=function(a){for(var b=a.split(" "),c="",d=ss.enumerate(b);d.moveNext();){var e=d.current;c=c+e.substr(0,1).toUpperCase()+(e.length>1?e.substr(1).toLowerCase():"")+" "}return ss.trim(c)};var lh={get_tag:function(){return this._tag},set_tag:function(a){return this._tag=a,a},get_url:function(){return this._url},set_url:function(a){return this._url=a,a},get_thumbnail:function(){return this._thumbnail},set_thumbnail:function(a){return this._thumbnail=a,a},get_name:function(){return this.get_names()[0]},get_names:function(){return ss.emptyString(this._name)?"".split(";"):this._name.split(";")},set_names:function(a){return this._name=vc.getNamesStringFromArray(a),a},get_camParams:function(){if(536870912===this.get_classification()&&20!==this._camParams.target){var a=Zb.getPlanetLocation(this.get_name());this._camParams.set_RA(a.RA),this._camParams.set_dec(a.dec),this._distnace=a.distance}return this._camParams},set_camParams:function(a){return this._camParams=a,a},updatePlanetLocation:function(a){this._camParams.viewTarget=Zb.getPlanet3dLocationJD(this.get_target(),a),65536!==this.get_target()&&20!==this.get_target()&&(this._camParams.viewTarget=Zb.getPlanetTargetPoint(this.get_target(),this.get_lat(),this.get_lng(),a))},get_location3d:function(){return 536870912!==this.get_classification()&&(this._location3d.x||this._location3d.y||this._location3d.z)||(this._location3d=Pc.raDecTo3d(this.get_RA(),this.get_dec())),this._location3d},get_lat:function(){return this.get_camParams().lat},set_lat:function(a){return this._camParams.lat=a,a},get_lng:function(){return this.get_camParams().lng},set_lng:function(a){return this._camParams.lng=a,a},get_opacity:function(){return this.get_camParams().opacity},set_opacity:function(a){return this._camParams.opacity=a,a},get_constellation:function(){return this._constellation},set_constellation:function(a){return this._constellation=a,a},get_classification:function(){return this._classification},set_classification:function(a){return this._classification=a,a},get_type:function(){return this._type},set_type:function(a){return this._type=a,a},get_magnitude:function(){return this._magnitude},set_magnitude:function(a){return this._magnitude=a,a},get_distance:function(){return this._distnace},set_distance:function(a){return this._distnace=a,a},get_zoomLevel:function(){return this.get_camParams().zoom},set_zoomLevel:function(a){return this._camParams.zoom=a,a},get_studyImageset:function(){return this._studyImageset},set_studyImageset:function(a){return this._studyImageset=a,a},get_backgroundImageset:function(){return this._backgroundImageSet},set_backgroundImageset:function(a){return null!=a&&this.set_type(a.get_dataSetType()),this._backgroundImageSet=a,a},get_searchDistance:function(){return this._searchDistance},set_searchDistance:function(a){return this._searchDistance=a,a},get_elevation:function(){return this._elevation},set_elevation:function(a){return this._elevation=a,a},get_thumbnailUrl:function(){if(ss.emptyString(this._thumbnailField)){if(null!=this._studyImageset&&!ss.emptyString(this._studyImageset.get_thumbnailUrl()))return this._studyImageset.get_thumbnailUrl();if(null!=this._backgroundImageSet&&!ss.emptyString(this._backgroundImageSet.get_thumbnailUrl()))return this._backgroundImageSet.get_thumbnailUrl();var a=this.get_name();return a.indexOf(";")>-1&&(a=a.substr(0,a.indexOf(";"))),1===this.get_classification()?"http://cdn.worldwidetelescope.org/wwtweb/thumbnail.aspx?name=star":"http://cdn.worldwidetelescope.org/wwtweb/thumbnail.aspx?name="+a.toLowerCase()}return this._thumbnailField},set_thumbnailUrl:function(a){return this._thumbnailField=a,a},get_RA:function(){return this.get_camParams().get_RA()},set_RA:function(a){return this._camParams.set_RA(a),a},get_dec:function(){return this.get_camParams().get_dec()},set_dec:function(a){return this._camParams.set_dec(a),a},toString:function(){return this._name},get_bounds:function(){return this._bounds},set_bounds:function(a){return this._bounds=a,a},get_isImage:function(){return null!=this._studyImageset||null!=this._backgroundImageSet},get_isTour:function(){return!1},get_isFolder:function(){return!1},get_children:function(){return[]},get_readOnly:function(){return!0},get_target:function(){return this._camParams.target},set_target:function(a){return this._camParams.target=a,a},get_isCloudCommunityItem:function(){return!1}},mh={},nh={cleanUp:function(){null!=this._triangleList$1&&this._triangleList$1.clear(),this._triangleList$1=null,Nb.prototype.cleanUp.call(this)},draw:function(a,b){return null==this._triangleList$1&&this._initializeRoute$1(a),this._triangleList$1.jNow=this._percentComplete$1/100,this._triangleList$1.draw(a,b*this.get_opacity(),2),!0},_initializeRoute$1:function(){this._triangleList$1=new Bb,this._triangleList$1.decay=1e3,this._triangleList$1.sky=this.get_astronomical(),this._triangleList$1.timeSeries=!0,this._triangleList$1.depthBuffered=!1,this._triangleList$1.autoTime=!1;var a=500,b=Pc.geoTo3dDouble(this._latStart$1,this._lngStart$1),c=Pc.geoTo3dDouble(this._latEnd$1,this._lngEnd$1),d=Sc.subtractVectors(c,b); d.normalize();var e=b;e.normalize();var f=Sc.cross(e,d),g=Sc.cross(d,e);f.normalize(),g.normalize(),f.multiply(.001*this._width$1),g.multiply(.001*this._width$1);for(var h=new Sc,i=new Sc,j=!0,k=0;a>=k;k++){var l=Sc.lerp(b,c,k/a);l.normalize();var m=l,n=l;m.add(f),n.add(g),j?j=!1:this._triangleList$1.addQuad(i,h,n,m,this.get_color(),new yb(k/a,2)),h=m,i=n}},getParams:function(){return[this._percentComplete$1]},getParamNames:function(){return["Percentage"]},setParams:function(a){a.length>0&&(this._percentComplete$1=a[0])},get_latStart:function(){return this._latStart$1},set_latStart:function(a){return this._latStart$1!==a&&(this._latStart$1=a,this.version++),a},get_lngStart:function(){return this._lngStart$1},set_lngStart:function(a){return this._lngStart$1!==a&&(this._lngStart$1=a,this.version++),a},get_latEnd:function(){return this._latEnd$1},set_latEnd:function(a){return this._latEnd$1!==a&&(this._latEnd$1=a,this.version++),a},get_lngEnd:function(){return this._lngEnd$1},set_lngEnd:function(a){return this._lngEnd$1!==a&&(this._lngEnd$1=a,this.version++),a},get_width:function(){return this._width$1},set_width:function(a){return this._width$1!==a&&(this._width$1=a,this.version++),a},get_percentComplete:function(){return this._percentComplete$1},set_percentComplete:function(a){return this._percentComplete$1!==a&&(this._percentComplete$1=a,this.version++),a},initializeFromXml:function(a){this._latStart$1=parseFloat(a.attributes.getNamedItem("LatStart").nodeValue),this._lngStart$1=parseFloat(a.attributes.getNamedItem("LngStart").nodeValue),this._latEnd$1=parseFloat(a.attributes.getNamedItem("LatEnd").nodeValue),this._lngEnd$1=parseFloat(a.attributes.getNamedItem("LngEnd").nodeValue),this._width$1=parseFloat(a.attributes.getNamedItem("Width").nodeValue),this._percentComplete$1=parseFloat(a.attributes.getNamedItem("PercentComplete").nodeValue)}},oh={},ph={draw:function(a,b){return Nb.prototype.draw.call(this,a,b,!1)}};md.get__circleTexture$1=function(){return md._circleTexture$1};var qh={get_dynamicData:function(){return this._dynamicData$1},set_dynamicData:function(a){return this._dynamicData$1=a,a},get_autoUpdate:function(){return this._autoUpdate$1},set_autoUpdate:function(a){return this._autoUpdate$1=a,a},get_dataSourceUrl:function(){return this._dataSourceUrl$1},set_dataSourceUrl:function(a){return this._dataSourceUrl$1=a,a},get_timeSeries:function(){return this.timeSeries},set_timeSeries:function(a){return this.timeSeries!==a&&(this.version++,this.timeSeries=a),a},get_header:function(){return null},get_beginRange:function(){return this._beginRange$1},set_beginRange:function(a){return ss.compareDates(this._beginRange$1,a)||(this.version++,this._beginRange$1=a),a},get_endRange:function(){return this._endRange$1},set_endRange:function(a){return ss.compareDates(this._endRange$1,a)||(this.version++,this._endRange$1=a),a},initializeFromXml:function(a){switch(this.set_timeSeries(ss["boolean"](a.attributes.getNamedItem("TimeSeries").nodeValue)),this.set_beginRange(new Date(a.attributes.getNamedItem("BeginRange").nodeValue)),this.set_endRange(new Date(a.attributes.getNamedItem("EndRange").nodeValue)),this.set_decay(parseFloat(a.attributes.getNamedItem("Decay").nodeValue)),a.attributes.getNamedItem("CoordinatesType").nodeValue){case"Spherical":this.set_coordinatesType(0);break;case"Rectangular":this.set_coordinatesType(1);break;case"Orbital":this.set_coordinatesType(2)}switch(this.get_coordinatesType()<0&&this.set_coordinatesType(0),this.set_latColumn(parseInt(a.attributes.getNamedItem("LatColumn").nodeValue)),this.set_lngColumn(parseInt(a.attributes.getNamedItem("LngColumn").nodeValue)),null!=a.attributes.getNamedItem("GeometryColumn")&&this.set_geometryColumn(parseInt(a.attributes.getNamedItem("GeometryColumn").nodeValue)),a.attributes.getNamedItem("AltType").nodeValue){case"Depth":this.set_altType(0);break;case"Altitude":this.set_altType(1);break;case"Distance":this.set_altType(2);break;case"SeaLevel":this.set_altType(3);break;case"Terrain":this.set_altType(4)}switch(this.set_markerMix(0),a.attributes.getNamedItem("ColorMap").nodeValue){case"Same_For_All":this.set__colorMap(0);break;case"Group_by_Values":this.set__colorMap(2);break;case"Per_Column_Literal":this.set__colorMap(3)}switch(this.set_markerColumn(parseInt(a.attributes.getNamedItem("MarkerColumn").nodeValue)),this.set_colorMapColumn(parseInt(a.attributes.getNamedItem("ColorMapColumn").nodeValue)),a.attributes.getNamedItem("PlotType").nodeValue){case"Gaussian":this.set_plotType(0);break;case"Point":this.set_plotType(1);break;case"Circle":this.set_plotType(2);break;case"PushPin":this.set_plotType(3)}switch(this.set_markerIndex(parseInt(a.attributes.getNamedItem("MarkerIndex").nodeValue)),a.attributes.getNamedItem("MarkerScale").nodeValue){case"Screen":this.set_markerScale(0);break;case"World":this.set_markerScale(1)}switch(a.attributes.getNamedItem("AltUnit").nodeValue){case"Meters":this.set_altUnit(1);break;case"Feet":this.set_altUnit(2);break;case"Inches":this.set_altUnit(3);break;case"Miles":this.set_altUnit(4);break;case"Kilometers":this.set_altUnit(5);break;case"AstronomicalUnits":this.set_altUnit(6);break;case"LightYears":this.set_altUnit(7);break;case"Parsecs":this.set_altUnit(8);break;case"MegaParsecs":this.set_altUnit(9);break;case"Custom":this.set_altUnit(10)}switch(this.set_altColumn(parseInt(a.attributes.getNamedItem("AltColumn").nodeValue)),this.set_startDateColumn(parseInt(a.attributes.getNamedItem("StartDateColumn").nodeValue)),this.set_endDateColumn(parseInt(a.attributes.getNamedItem("EndDateColumn").nodeValue)),this.set_sizeColumn(parseInt(a.attributes.getNamedItem("SizeColumn").nodeValue)),this.set_hyperlinkFormat(a.attributes.getNamedItem("HyperlinkFormat").nodeValue),this.set_hyperlinkColumn(parseInt(a.attributes.getNamedItem("HyperlinkColumn").nodeValue)),this.set_scaleFactor(parseFloat(a.attributes.getNamedItem("ScaleFactor").nodeValue)),a.attributes.getNamedItem("PointScaleType").nodeValue){case"Linear":this.set_pointScaleType(0);break;case"Power":this.set_pointScaleType(1);break;case"Log":this.set_pointScaleType(2);break;case"Constant":this.set_pointScaleType(3);break;case"StellarMagnitude":this.set_pointScaleType(4)}if(null!=a.attributes.getNamedItem("ShowFarSide")&&this.set_showFarSide(ss["boolean"](a.attributes.getNamedItem("ShowFarSide").nodeValue)),null!=a.attributes.getNamedItem("RaUnits"))switch(a.attributes.getNamedItem("RaUnits").nodeValue){case"Hours":this.set_raUnits(0);break;case"Degrees":this.set_raUnits(1)}if(null!=a.attributes.getNamedItem("HoverTextColumn")&&this.set_nameColumn(parseInt(a.attributes.getNamedItem("HoverTextColumn").nodeValue)),null!=a.attributes.getNamedItem("XAxisColumn")){switch(this.set_xAxisColumn(parseInt(a.attributes.getNamedItem("XAxisColumn").nodeValue)),this.set_xAxisReverse(ss["boolean"](a.attributes.getNamedItem("XAxisReverse").nodeValue)),this.set_yAxisColumn(parseInt(a.attributes.getNamedItem("YAxisColumn").nodeValue)),this.set_yAxisReverse(ss["boolean"](a.attributes.getNamedItem("YAxisReverse").nodeValue)),this.set_zAxisColumn(parseInt(a.attributes.getNamedItem("ZAxisColumn").nodeValue)),this.set_zAxisReverse(ss["boolean"](a.attributes.getNamedItem("ZAxisReverse").nodeValue)),a.attributes.getNamedItem("CartesianScale").nodeValue){case"Meters":this.set_cartesianScale(1);break;case"Feet":this.set_cartesianScale(2);break;case"Inches":this.set_cartesianScale(3);break;case"Miles":this.set_cartesianScale(4);break;case"Kilometers":this.set_cartesianScale(5);break;case"AstronomicalUnits":this.set_cartesianScale(6);break;case"LightYears":this.set_cartesianScale(7);break;case"Parsecs":this.set_cartesianScale(8);break;case"MegaParsecs":this.set_cartesianScale(9);break;case"Custom":this.set_cartesianScale(10)}this.set_cartesianCustomScale(parseFloat(a.attributes.getNamedItem("CartesianCustomScale").nodeValue))}null!=a.attributes.getNamedItem("DynamicData")&&(this.set_dynamicData(ss["boolean"](a.attributes.getNamedItem("DynamicData").nodeValue)),this.set_autoUpdate(ss["boolean"](a.attributes.getNamedItem("AutoUpdate").nodeValue)),this.set_dataSourceUrl(a.attributes.getNamedItem("DataSourceUrl").nodeValue))},computeDateDomainRange:function(){},getDomainValues:function(){return[]},get_decay:function(){return this.decay},set_decay:function(a){return this.decay!==a&&(this.version++,this.decay=a),a},get_coordinatesType:function(){return this._coordinatesType$1},set_coordinatesType:function(a){return this._coordinatesType$1!==a&&(this.version++,this._coordinatesType$1=a),a},get_latColumn:function(){return this.latColumn},set_latColumn:function(a){return this.latColumn!==a&&(this.version++,this.latColumn=a),a},get_lngColumn:function(){return this.lngColumn},set_lngColumn:function(a){return this.lngColumn!==a&&(this.version++,this.lngColumn=a),a},get_geometryColumn:function(){return this.geometryColumn},set_geometryColumn:function(a){return this.geometryColumn!==a&&(this.version++,this.geometryColumn=a),a},get_xAxisColumn:function(){return this._xAxisColumn$1},set_xAxisColumn:function(a){return this._xAxisColumn$1!==a&&(this.version++,this._xAxisColumn$1=a),a},get_yAxisColumn:function(){return this._yAxisColumn$1},set_yAxisColumn:function(a){return this._yAxisColumn$1!==a&&(this.version++,this._yAxisColumn$1=a),a},get_zAxisColumn:function(){return this._zAxisColumn$1},set_zAxisColumn:function(a){return this._zAxisColumn$1!==a&&(this.version++,this._zAxisColumn$1=a),a},get_xAxisReverse:function(){return this._xAxisReverse$1},set_xAxisReverse:function(a){return this._xAxisReverse$1!==a&&(this.version++,this._xAxisReverse$1=a),a},get_yAxisReverse:function(){return this._yAxisReverse$1},set_yAxisReverse:function(a){return this._yAxisReverse$1!==a&&(this.version++,this._yAxisReverse$1=a),a},get_zAxisReverse:function(){return this._zAxisReverse$1},set_zAxisReverse:function(a){return this._zAxisReverse$1!==a&&(this.version++,this._zAxisReverse$1=a),a},get_altType:function(){return this._altType$1},set_altType:function(a){return this._altType$1!==a&&(this.version++,this._altType$1=a),a},get_markerMix:function(){return this._markerMix$1},set_markerMix:function(a){return this._markerMix$1!==a&&(this.version++,this._markerMix$1=a),a},get_raUnits:function(){return this._raUnits$1},set_raUnits:function(a){return this._raUnits$1!==a&&(this.version++,this._raUnits$1=a),a},get__colorMap:function(){return this._colorMap$1},set__colorMap:function(a){return this._colorMap$1!==a&&(this.version++,this._colorMap$1=a),a},get_markerColumn:function(){return this._markerColumn$1},set_markerColumn:function(a){return this._markerColumn$1!==a&&(this.version++,this._markerColumn$1=a),a},get_colorMapColumn:function(){return this._colorMapColumn$1},set_colorMapColumn:function(a){return this._colorMapColumn$1!==a&&(this.version++,this._colorMapColumn$1=a),a},get_plotType:function(){return this._plotType$1},set_plotType:function(a){return this._plotType$1!==a&&(this.version++,this._plotType$1=a),a},get_markerIndex:function(){return this._markerIndex$1},set_markerIndex:function(a){return this._markerIndex$1!==a&&(this.version++,this._markerIndex$1=a),a},get_showFarSide:function(){return this._showFarSide$1},set_showFarSide:function(a){return this._showFarSide$1!==a&&(this.version++,this._showFarSide$1=a),a},get_markerScale:function(){return this._markerScale$1},set_markerScale:function(a){return this._markerScale$1!==a&&(this.version++,this._markerScale$1=a),a},get_altUnit:function(){return this._altUnit$1},set_altUnit:function(a){return this._altUnit$1!==a&&(this.version++,this._altUnit$1=a),a},get_cartesianScale:function(){return this._cartesianScale$1},set_cartesianScale:function(a){return this._cartesianScale$1!==a&&(this.version++,this._cartesianScale$1=a),a},get_cartesianCustomScale:function(){return this._cartesianCustomScale$1},set_cartesianCustomScale:function(a){return this._cartesianCustomScale$1!==a&&(this.version++,this._cartesianCustomScale$1=a),a},get_altColumn:function(){return this.altColumn},set_altColumn:function(a){return this.altColumn!==a&&(this.version++,this.altColumn=a),a},get_startDateColumn:function(){return this.startDateColumn},set_startDateColumn:function(a){return this.startDateColumn!==a&&(this.version++,this.startDateColumn=a),a},get_endDateColumn:function(){return this.endDateColumn},set_endDateColumn:function(a){return this.endDateColumn!==a&&(this.version++,this.endDateColumn=a),a},get_sizeColumn:function(){return this.sizeColumn},set_sizeColumn:function(a){return this.sizeColumn!==a&&(this.version++,this.sizeColumn=a),a},get_nameColumn:function(){return this.nameColumn},set_nameColumn:function(a){return this.nameColumn!==a&&(this.version++,this.nameColumn=a),a},get_hyperlinkFormat:function(){return this._hyperlinkFormat$1},set_hyperlinkFormat:function(a){return this._hyperlinkFormat$1!==a&&(this.version++,this._hyperlinkFormat$1=a),a},get_hyperlinkColumn:function(){return this._hyperlinkColumn$1},set_hyperlinkColumn:function(a){return this._hyperlinkColumn$1!==a&&(this.version++,this._hyperlinkColumn$1=a),a},get_scaleFactor:function(){return this.scaleFactor},set_scaleFactor:function(a){return this.scaleFactor!==a&&(this.version++,this.scaleFactor=a),a},get_pointScaleType:function(){return this.pointScaleType},set_pointScaleType:function(a){return this.pointScaleType!==a&&(this.version++,this.pointScaleType=a),a},prepVertexBuffer:function(){return!0},draw:function(a,b,c){var d=a;this.bufferIsFlat!==c&&(this.cleanUp(),this.bufferIsFlat=c),this.dirty&&this.prepVertexBuffer(d,b);var e=gc.get_jNow()-gc.utcToJulian(this.baseDate);return null!=this.triangleList2d&&(this.triangleList2d.decay=this.decay,this.triangleList2d.sky=this.get_astronomical(),this.triangleList2d.timeSeries=this.timeSeries,this.triangleList2d.jNow=e,this.triangleList2d.draw(a,b*this.get_opacity(),1)),null!=this.triangleList&&(this.triangleList.decay=this.decay,this.triangleList.sky=this.get_astronomical(),this.triangleList.timeSeries=this.timeSeries,this.triangleList.jNow=e,this.triangleList.draw(a,b*this.get_opacity(),1)),null!=this.pointList&&(this.pointList.depthBuffered=!1,this.pointList.decay=this.decay,this.pointList.sky=this.get_astronomical(),this.pointList.timeSeries=this.timeSeries,this.pointList.jNow=e,this.pointList.draw(a,b*this.get_opacity(),!1)),null!=this.lineList&&(this.lineList.sky=this.get_astronomical(),this.lineList.decay=this.decay,this.lineList.timeSeries=this.timeSeries,this.lineList.jNow=e,this.lineList.drawLines(a,b*this.get_opacity())),null!=this.lineList2d&&(this.lineList2d.sky=this.get_astronomical(),this.lineList2d.decay=this.decay,this.lineList2d.timeSeries=this.timeSeries,this.lineList2d.showFarSide=this.get_showFarSide(),this.lineList2d.jNow=e,this.lineList2d.drawLines(a,b*this.get_opacity())),!0},cleanUp:function(){null!=this.lineList&&this.lineList.clear(),null!=this.lineList2d&&this.lineList2d.clear(),null!=this.triangleList2d&&this.triangleList2d.clear(),null!=this.pointList&&this.pointList.clear(),null!=this.triangleList&&this.triangleList.clear()},dynamicUpdate:function(){return!1}};nd.create=function(a,b,c,d,e){var f=new nd;return f.parent=e,f.level=a,f.tileX=b,f.tileY=c,f.dataset=d,f._topDown$1=!d.get_bottomsUp(),f.tileX!==b&&alert("bad"),f.set__demScaleFactor(d.get_meanRadius()?d.get_meanRadius():d.get_dataSetType()?3396010:6371e3),f.computeBoundingSphere(),f};var rh={computeBoundingSphere:function(){this._initializeGrids$1(),this.topLeft=this.bounds[0].position.copy(),this.bottomRight=this.bounds[8].position.copy(),this.topRight=this.bounds[2].position.copy(),this.bottomLeft=this.bounds[6].position.copy(),this.calcSphere()},renderPart:function(a,b){if(null!=a.gl);else if(!b)for(var c=ss.enumerate(this._stars$1);c.moveNext();){var d=c.current,e=25/Math.pow(1.6,d.magnitude);Zb.drawPointPlanet(a,d.position,e,d.col,!1)}},requestImage:function(){this.downloading||this.readyToRender||(this.downloading=!0,this._webFile$1=new Cc(wc.getProxiedUrl(this.get_URL())),this._webFile$1.onStateChange=ss.bind("fileStateChange",this),this._webFile$1.send())},fileStateChange:function(){2===this._webFile$1.get_state()?(this.downloading=!1,this.readyToRender=!1,this.errored=!0,this.requestPending=!1,jc.removeFromQueue(this.get_key(),!0)):1===this._webFile$1.get_state()&&(this.texReady=!0,this.downloading=!1,this.errored=!1,this.readyToRender=this.texReady&&(this.demReady||!this.demTile),this.requestPending=!1,jc.removeFromQueue(this.get_key(),!0),this._loadData$1(this._webFile$1.getText()))},_loadData$1:function(a){for(var b=ss.replaceString(a,"\r\n","\n").split("\n"),c=!0,d=null,e=ss.enumerate(b);e.moveNext();){var f=e.current;c?c=!1:ss.trim(f).length>5&&(d=new hc(f),d.position=Pc.raDecTo3dAu(d.RA,d.dec,1),this._stars$1.push(d))}},isPointInTile:function(a,b){if(!this.level)return!0;if(1===this.level)return b>=0&&90>=b&&!this.tileX&&1===this.tileY?!0:b>90&&180>=b&&1===this.tileX&&1===this.tileY?!0:0>b&&b>=-90&&!this.tileX&&!this.tileY?!0:-90>b&&b>=-180&&1===this.tileX&&!this.tileY?!0:!1;if(!this.demReady||null==this.demData)return!1;var c=Pc.geoTo3dDouble(-a,b),d=this._isLeftOfHalfSpace$1(this.topLeft.copy(),this.topRight.copy(),c),e=this._isLeftOfHalfSpace$1(this.topRight.copy(),this.bottomRight.copy(),c),f=this._isLeftOfHalfSpace$1(this.bottomRight.copy(),this.bottomLeft.copy(),c),g=this._isLeftOfHalfSpace$1(this.bottomLeft.copy(),this.topLeft.copy(),c);return d&&e&&f&&g?!0:!1},_isLeftOfHalfSpace$1:function(a,b,c){a.normalize(),b.normalize();var d=Sc.cross(a,b),e=Sc.dot(d,c);return 0>e},_initializeGrids$1:function(){if(this._vertexList$1=[],this._childTriangleList$1=new Array(4),this._childTriangleList$1[0]=[],this._childTriangleList$1[1]=[],this._childTriangleList$1[2]=[],this._childTriangleList$1[3]=[],this.bounds=new Array(9),this.level>0){null==this.parent&&(this.parent=jc.getTile(this.level-1,this.tileX/2,this.tileY/2,this.dataset,null));var a=this.parent,b=this.tileX%2,c=this.tileY%2;this.backslash=this.level>1?a.backslash:1===(1===b^1===c),this.bounds[0]=a.bounds[b+3*c].copy(),this.bounds[1]=this._midpoint$1(a.bounds[b+3*c],a.bounds[b+1+3*c]),this.bounds[2]=a.bounds[b+1+3*c].copy(),this.bounds[3]=this._midpoint$1(a.bounds[b+3*c],a.bounds[b+3*(c+1)]),this.bounds[4]=this.backslash?this._midpoint$1(a.bounds[b+3*c],a.bounds[b+1+3*(c+1)]):this._midpoint$1(a.bounds[b+1+3*c],a.bounds[b+3*(c+1)]),this.bounds[5]=this._midpoint$1(a.bounds[b+1+3*c],a.bounds[b+1+3*(c+1)]),this.bounds[6]=a.bounds[b+3*(c+1)].copy(),this.bounds[7]=this._midpoint$1(a.bounds[b+3*(c+1)],a.bounds[b+1+3*(c+1)]),this.bounds[8]=a.bounds[b+1+3*(c+1)].copy(),this.bounds[0].tu=0*ic.uvMultiple,this.bounds[0].tv=0*ic.uvMultiple,this.bounds[1].tu=.5*ic.uvMultiple,this.bounds[1].tv=0*ic.uvMultiple,this.bounds[2].tu=1*ic.uvMultiple,this.bounds[2].tv=0*ic.uvMultiple,this.bounds[3].tu=0*ic.uvMultiple,this.bounds[3].tv=.5*ic.uvMultiple,this.bounds[4].tu=.5*ic.uvMultiple,this.bounds[4].tv=.5*ic.uvMultiple,this.bounds[5].tu=1*ic.uvMultiple,this.bounds[5].tv=.5*ic.uvMultiple,this.bounds[6].tu=0*ic.uvMultiple,this.bounds[6].tv=1*ic.uvMultiple,this.bounds[7].tu=.5*ic.uvMultiple,this.bounds[7].tv=1*ic.uvMultiple,this.bounds[8].tu=1*ic.uvMultiple,this.bounds[8].tv=1*ic.uvMultiple}else this.bounds[0]=Qc.create(0,-1,0,0,0),this.bounds[1]=Qc.create(0,0,1,.5,0),this.bounds[2]=Qc.create(0,-1,0,1,0),this.bounds[3]=Qc.create(-1,0,0,0,.5),this.bounds[4]=Qc.create(0,1,0,.5,.5),this.bounds[5]=Qc.create(1,0,0,1,.5),this.bounds[6]=Qc.create(0,-1,0,0,1),this.bounds[7]=Qc.create(0,0,-1,.5,1),this.bounds[8]=Qc.create(0,-1,0,1,1)},_midpoint$1:function(a,b){var c=Sc.lerp(a.position,b.position,.5),d=Tc.lerp(Tc.create(a.tu,a.tv),Tc.create(b.tu,b.tv),.5);return c.normalize(),Qc.createPos(c,d.x,d.y)},createGeometry:function(a){return this.geometryCreated?!0:(this.geometryCreated=!0,ic.prototype.createGeometry.call(this,a),!0)},cleanUp:function(a){ic.prototype.cleanUp.call(this,a),null!=this._vertexList$1&&(this._vertexList$1=null),null!=this._childTriangleList$1&&(this._childTriangleList$1=null),this._subDivided$1=!1,this.demArray=null}};od.create=function(a,b,c,d,e){var f=new od;return f.parent=e,f.level=a,f.tileX=b,f.tileY=c,f.dataset=d,f._getParameters$1(),f.computeMatrix(),f.sphereCenter=f.geoTo3dTan(0,0),f.radius=1.25,f};var sh={computeMatrix:function(){this.matrix=Uc.get_identity(),this.matrix._multiply(Uc._rotationX(this.rotation/180*Math.PI)),this.matrix._multiply(Uc._rotationZ(this.latCenter/180*Math.PI)),this.matrix._multiply(Uc._rotationY((360-this.lngCenter)/180*Math.PI))},_getParameters$1:function(){this.pixelCenterX=this.dataset.get_offsetX(),this.pixelCenterY=this.dataset.get_offsetY(),this.latCenter=this.dataset.get_centerY(),this.lngCenter=this.dataset.get_centerX(),this.rotation=this.dataset.get_rotation(),this.scaleX=-(this.scaleY=this.dataset.get_baseTileDegrees()),this.dataset.get_bottomsUp()&&(this.scaleX=-this.scaleX,this.rotation=360-this.rotation)},geoTo3dTan:function(a,b){b=-b;var c=this.dataset.get_baseTileDegrees(),d=Math.tan(c*ic.RC);return this.matrix.transform(Sc.create(1,a/c*d,b/c*d))},createGeometry:function(a){if(ic.prototype.createGeometry.call(this,a),this.geometryCreated)return!0;this.geometryCreated=!0;for(var b=0;4>b;b++)this._renderTriangleLists[b]=[];this.computeMatrix(),this.height=this.texture.naturalHeight,this.width=this.texture.naturalWidth;var c=0+this.scaleY*(this.height-this.pixelCenterY),d=0-this.scaleY*this.pixelCenterY,e=0+this.scaleX*this.pixelCenterX,f=0-this.scaleX*(this.width-this.pixelCenterX);this.topLeft=this.geoTo3dTan(c,e),this.bottomRight=this.geoTo3dTan(d,f),this.topRight=this.geoTo3dTan(c,f),this.bottomLeft=this.geoTo3dTan(d,e);var g=Sc.lerp(this.topLeft,this.topRight,.5),h=Sc.lerp(this.bottomLeft,this.bottomRight,.5),i=Sc.lerp(g,h,.5),j=Sc.lerp(this.topRight,this.bottomRight,.5),k=Sc.lerp(this.topLeft,this.bottomLeft,.5);if(null==a.gl){this._vertexList$1=[],this._vertexList$1.push(Qc.createPosSize(this.topLeft,0,0,this.width,this.height)),this._vertexList$1.push(Qc.createPosSize(this.topRight,1,0,this.width,this.height)),this._vertexList$1.push(Qc.createPosSize(this.bottomLeft,0,1,this.width,this.height)),this._vertexList$1.push(Qc.createPosSize(this.bottomRight,1,1,this.width,this.height)),this._childTriangleList$1=[],this.dataset.get_bottomsUp()?(this._childTriangleList$1.push(uc.create(0,1,2)),this._childTriangleList$1.push(uc.create(2,1,3))):(this._childTriangleList$1.push(uc.create(0,2,1)),this._childTriangleList$1.push(uc.create(2,3,1)));for(var l=3;l-->1;){for(var m=[],n=ss.enumerate(this._childTriangleList$1);n.moveNext();){var o=n.current;o.subDivide(m,this._vertexList$1)}this._childTriangleList$1=m}for(var p=.6/(this.width/256),q=ss.enumerate(this._childTriangleList$1);q.moveNext();){var o=q.current,r=this._vertexList$1[o.a],s=this._vertexList$1[o.b],t=this._vertexList$1[o.c];this._renderTriangleLists[0].push(_b.createWithMiter(r,s,t,this.texture,this.level,p))}}else{this._vertexBuffer=ic.prepDevice.createBuffer(),ic.prepDevice.bindBuffer(34962,this._vertexBuffer);var u=new Float32Array(45),v=u,w=0;w=this.addVertex(v,w,Qc.createPos(h,.5,1)),w=this.addVertex(v,w,Qc.createPos(this.bottomLeft,0,1)),w=this.addVertex(v,w,Qc.createPos(this.bottomRight,1,1)),w=this.addVertex(v,w,Qc.createPos(i,.5,.5)),w=this.addVertex(v,w,Qc.createPos(k,0,.5)),w=this.addVertex(v,w,Qc.createPos(j,1,.5)),w=this.addVertex(v,w,Qc.createPos(g,.5,0)),w=this.addVertex(v,w,Qc.createPos(this.topLeft,0,0)),w=this.addVertex(v,w,Qc.createPos(this.topRight,1,0)),ic.prepDevice.bufferData(34962,u,35044);for(var b=0;4>b;b++){w=0,this.triangleCount=2;var x=new Uint16Array(3*this.triangleCount),y=x;switch(b){case 0:y[w++]=7,y[w++]=4,y[w++]=6,y[w++]=4,y[w++]=3,y[w++]=6;break;case 1:y[w++]=6,y[w++]=5,y[w++]=8,y[w++]=6,y[w++]=3,y[w++]=5;break;case 2:y[w++]=4,y[w++]=0,y[w++]=3,y[w++]=4,y[w++]=1,y[w++]=0;break;case 3:y[w++]=3,y[w++]=2,y[w++]=5,y[w++]=3,y[w++]=0,y[w++]=2}this._indexBuffers[b]=ic.prepDevice.createBuffer(),ic.prepDevice.bindBuffer(34963,this._indexBuffers[b]),ic.prepDevice.bufferData(34963,x,35044)}}return!0}};pd.create=function(a,b,c,d,e){var f=new pd;return f.parent=e,f.level=a,f.tileX=b,f.tileY=c,f.dataset=d,f._topDown$1=!d.get_bottomsUp(),f.computeBoundingSphere(),f};var th={computeBoundingSphere:function(){if(!this._topDown$1)return void this.computeBoundingSphereBottomsUp();var a=this.dataset.get_baseTileDegrees()/Math.pow(2,this.level),b=this.dataset.get_baseTileDegrees()/2-this.tileY*a+this.dataset.get_offsetY(),c=this.dataset.get_baseTileDegrees()/2-(this.tileY+1)*a+this.dataset.get_offsetY(),d=this.tileX*a-this.dataset.get_baseTileDegrees()/this.dataset.get_widthFactor()+this.dataset.get_offsetX(),e=(this.tileX+1)*a-this.dataset.get_baseTileDegrees()/this.dataset.get_widthFactor()+this.dataset.get_offsetX(),f=(b+c)/2,g=(d+e)/2;this.sphereCenter=this.geoTo3dTan(f,g),this.topLeft=this.geoTo3dTan(b,d),this.bottomRight=this.geoTo3dTan(c,e),this.topRight=this.geoTo3dTan(b,e),this.bottomLeft=this.geoTo3dTan(c,d);var h=this.geoTo3dTan(b,d);a=e-d,h.subtract(this.sphereCenter),this.sphereRadius=h.length()},geoTo3dTan:function(a,b){b=-b;var c=this.dataset.get_baseTileDegrees()/2,d=Math.tan(c*ic.RC);return this.dataset.get_matrix().transform(Sc.create(1,a/c*d,b/c*d))},computeBoundingSphereBottomsUp:function(){var a=this.dataset.get_baseTileDegrees()/Math.pow(2,this.level),b=this.dataset.get_baseTileDegrees()/2+(this.tileY+1)*a+this.dataset.get_offsetY(),c=this.dataset.get_baseTileDegrees()/2+this.tileY*a+this.dataset.get_offsetY(),d=this.tileX*a-this.dataset.get_baseTileDegrees()/this.dataset.get_widthFactor()+this.dataset.get_offsetX(),e=(this.tileX+1)*a-this.dataset.get_baseTileDegrees()/this.dataset.get_widthFactor()+this.dataset.get_offsetX();this.topLeft=this.geoTo3dTan(b,d),this.bottomRight=this.geoTo3dTan(c,e),this.topRight=this.geoTo3dTan(b,e),this.bottomLeft=this.geoTo3dTan(c,d);this.topLeft;a=e-d},createGeometry:function(a){if(ic.prototype.createGeometry.call(this,a),this.geometryCreated)return!0;this.geometryCreated=!0;for(var b=0;4>b;b++)this._renderTriangleLists[b]=[];var c=this.dataset.get_baseTileDegrees()/Math.pow(2,this.level),d=this.dataset.get_baseTileDegrees()/2-this.tileY*c+this.dataset.get_offsetY(),e=this.dataset.get_baseTileDegrees()/2-(this.tileY+1)*c+this.dataset.get_offsetY(),f=this.tileX*c-this.dataset.get_baseTileDegrees()/this.dataset.get_widthFactor()+this.dataset.get_offsetX(),g=(this.tileX+1)*c-this.dataset.get_baseTileDegrees()/this.dataset.get_widthFactor()+this.dataset.get_offsetX();this.topLeft=this.geoTo3dTan(d,f),this.bottomRight=this.geoTo3dTan(e,g),this.topRight=this.geoTo3dTan(d,g),this.bottomLeft=this.geoTo3dTan(e,f);var h=Sc.midPoint(this.topLeft,this.bottomRight),i=Sc.midPoint(this.topLeft,this.bottomLeft),j=Sc.midPoint(this.topRight,this.bottomRight),k=Sc.midPoint(this.topLeft,this.topRight),l=Sc.midPoint(this.bottomLeft,this.bottomRight);if(null==a.gl)this._renderTriangleLists[0].push(_b.create(Qc.createPos(this.topLeft,0,0),Qc.createPos(i,0,.5),Qc.createPos(k,.5,0),this.texture,this.level)),this._renderTriangleLists[0].push(_b.create(Qc.createPos(i,0,.5),Qc.createPos(h,.5,.5),Qc.createPos(k,.5,0),this.texture,this.level)),this._renderTriangleLists[1].push(_b.create(Qc.createPos(k,.5,0),Qc.createPos(j,1,.5),Qc.createPos(this.topRight,1,0),this.texture,this.level)),this._renderTriangleLists[1].push(_b.create(Qc.createPos(k,.5,0),Qc.createPos(h,.5,.5),Qc.createPos(j,1,.5),this.texture,this.level)),this._renderTriangleLists[2].push(_b.create(Qc.createPos(i,0,.5),Qc.createPos(l,.5,1),Qc.createPos(h,.5,.5),this.texture,this.level)),this._renderTriangleLists[2].push(_b.create(Qc.createPos(i,0,.5),Qc.createPos(this.bottomLeft,0,1),Qc.createPos(l,.5,1),this.texture,this.level)),this._renderTriangleLists[3].push(_b.create(Qc.createPos(h,.5,.5),Qc.createPos(this.bottomRight,1,1),Qc.createPos(j,1,.5),this.texture,this.level)),this._renderTriangleLists[3].push(_b.create(Qc.createPos(h,.5,.5),Qc.createPos(l,.5,1),Qc.createPos(this.bottomRight,1,1),this.texture,this.level));else{this._vertexBuffer=ic.prepDevice.createBuffer(),ic.prepDevice.bindBuffer(34962,this._vertexBuffer);var m=new Float32Array(45),n=m,o=0;o=this.addVertex(n,o,Qc.createPos(l,.5,1)),o=this.addVertex(n,o,Qc.createPos(this.bottomLeft,0,1)),o=this.addVertex(n,o,Qc.createPos(this.bottomRight,1,1)),o=this.addVertex(n,o,Qc.createPos(h,.5,.5)),o=this.addVertex(n,o,Qc.createPos(i,0,.5)),o=this.addVertex(n,o,Qc.createPos(j,1,.5)),o=this.addVertex(n,o,Qc.createPos(k,.5,0)),o=this.addVertex(n,o,Qc.createPos(this.topLeft,0,0)),o=this.addVertex(n,o,Qc.createPos(this.topRight,1,0)),ic.prepDevice.bufferData(34962,m,35044);for(var b=0;4>b;b++){o=0,this.triangleCount=2;var p=new Uint16Array(3*this.triangleCount),q=p;switch(b){case 0:q[o++]=7,q[o++]=4,q[o++]=6,q[o++]=4,q[o++]=3,q[o++]=6;break;case 1:q[o++]=6,q[o++]=5,q[o++]=8,q[o++]=6,q[o++]=3,q[o++]=5;break;case 2:q[o++]=4,q[o++]=0,q[o++]=3,q[o++]=4,q[o++]=1,q[o++]=0;break;case 3:q[o++]=3,q[o++]=2,q[o++]=5,q[o++]=3,q[o++]=0,q[o++]=2}this._indexBuffers[b]=ic.prepDevice.createBuffer(),ic.prepDevice.bindBuffer(34963,this._indexBuffers[b]),ic.prepDevice.bufferData(34963,p,35044)}}return!0}};qd._cloneArray$1=function(a){for(var b=a.length,c=new Uint16Array(b),d=c,e=0;b>e;e++)d[e]=a[e];return d},qd.create=function(a,b,c,d,e){var f=new qd;return f.parent=e,f.level=a,f.tileX=b,f.tileY=c,f.dataset=d,f._topDown$1=!d.get_bottomsUp(),f.tileX!==b&&alert("bad"),f.set__demScaleFactor(d.get_meanRadius()?d.get_meanRadius():d.get_dataSetType()?3396010:6371e3),f.computeBoundingSphere(),f};var uh={computeBoundingSphere:function(){this._initializeGrids$1(),this.topLeft=this.bounds[0].position.copy(),this.bottomRight=this.bounds[8].position.copy(),this.topRight=this.bounds[2].position.copy(),this.bottomLeft=this.bounds[6].position.copy(),this.calcSphere()},getIndexBuffer:function(a,b){return this.level?this.backslash?qd.backSlashIndexBuffer[16*a+b]:qd.slashIndexBuffer[16*a+b]:qd.rootIndexBuffer[a]},_processIndexBuffer$1:function(a,b){if(!this.level)return qd.rootIndexBuffer[b]=ic.prepDevice.createBuffer(),ic.prepDevice.bindBuffer(34963,qd.rootIndexBuffer[b]),void ic.prepDevice.bufferData(34963,a,35044);for(var c=0;16>c;c++){var d=qd._cloneArray$1(a);this._processAccomindations$1(d,c),this.backslash?(qd.backSlashIndexBuffer[16*b+c]=ic.prepDevice.createBuffer(),ic.prepDevice.bindBuffer(34963,qd.backSlashIndexBuffer[16*b+c]),ic.prepDevice.bufferData(34963,d,35044)):(qd.slashIndexBuffer[16*b+c]=ic.prepDevice.createBuffer(),ic.prepDevice.bindBuffer(34963,qd.slashIndexBuffer[16*b+c]),ic.prepDevice.bufferData(34963,d,35044))}},_processAccomindations$1:function(a,b){for(var c={},d={},e=ss.enumerate(a);e.moveNext();){var f=e.current,g=this._vertexList$1[f],h=ss.truncate(16*g.tu+.5),i=ss.truncate(16*g.tv+.5),j=(i<<8)+h;ss.keyExists(d,j)||(d[j]=f)}var k=16;if(1===(1&b))for(var l=1;k>l;l+=2){var m=k,n=(m<<8)+l,o=(m<<8)+l+1;ss.keyExists(d,n)&&(c[d[n]]=d[o])}if(2===(2&b))for(var m=1;k>m;m+=2){var l=k,n=(m<<8)+l,o=(m+1<<8)+l;ss.keyExists(d,n)&&(c[d[n]]=d[o])}if(4===(4&b))for(var l=1;k>l;l+=2){var m=0,n=(m<<8)+l,o=(m<<8)+l+1;ss.keyExists(d,n)&&(c[d[n]]=d[o])}if(8===(8&b))for(var m=1;k>m;m+=2){var l=0,n=(m<<8)+l,o=(m+1<<8)+l;ss.keyExists(d,n)&&(c[d[n]]=d[o])}if(ss.keyCount(c))for(var p=0;p=0&&90>=b&&!this.tileX&&1===this.tileY?!0:b>90&&180>=b&&1===this.tileX&&1===this.tileY?!0:0>b&&b>=-90&&!this.tileX&&!this.tileY?!0:-90>b&&b>=-180&&1===this.tileX&&!this.tileY?!0:!1;if(!this.demReady||null==this.demData)return!1;var c=Pc.geoTo3dDouble(-a,b),d=this._isLeftOfHalfSpace$1(this.topLeft.copy(),this.topRight.copy(),c),e=this._isLeftOfHalfSpace$1(this.topRight.copy(),this.bottomRight.copy(),c),f=this._isLeftOfHalfSpace$1(this.bottomRight.copy(),this.bottomLeft.copy(),c),g=this._isLeftOfHalfSpace$1(this.bottomLeft.copy(),this.topLeft.copy(),c); return d&&e&&f&&g?!0:!1},_isLeftOfHalfSpace$1:function(a,b,c){a.normalize(),b.normalize();var d=Sc.cross(a,b),e=Sc.dot(d,c);return 0>e},getSurfacePointAltitude:function(a,b,c){if(this.leveld;d++){var e=this.children[d];if(null!=e&&e.isPointInTile(a,b)){var f=e.getSurfacePointAltitude(a,b,c);if(f)return f;break}}ic.tileTargetLevel=this.level,ic.tileTargetX=this.tileX,ic.tileTargetY=this.tileY;var g=Pc.geoTo3dDouble(-a,b);g=Sc.subtractVectors(new Sc,g);var h=kc.getUVFromInnerPoint(this.topLeft.copy(),this.topRight.copy(),this.bottomLeft.copy(),this.bottomRight.copy(),g.copy()),i=Math.max(0,Math.min(16,16*h.x)),j=Math.max(0,Math.min(16,16*h.y)),k=Math.max(0,Math.min(15,ss.truncate(16*h.x))),l=Math.max(0,Math.min(15,ss.truncate(16*h.y))),m=i-k,n=j-l;if(null!=this.demArray){var o=this.demArray[k+17*l],p=this.demArray[k+1+17*l],q=this.demArray[k+17*(l+1)],r=this.demArray[k+1+17*(l+1)],s=o*(1-m)+m*p,t=q*(1-m)+m*r,u=s*(1-n)+n*t;return u/this.get__demScaleFactor()}return this.demAverage/this.get__demScaleFactor()},_initializeGrids$1:function(){if(this._vertexList$1=[],this._childTriangleList$1=new Array(4),this._childTriangleList$1[0]=[],this._childTriangleList$1[1]=[],this._childTriangleList$1[2]=[],this._childTriangleList$1[3]=[],this.bounds=new Array(9),this.level>0){null==this.parent&&(this.parent=jc.getTile(this.level-1,this.tileX/2,this.tileY/2,this.dataset,null));var a=this.parent,b=this.tileX%2,c=this.tileY%2;this.backslash=this.level>1?a.backslash:1===(1===b^1===c),this.bounds[0]=a.bounds[b+3*c].copy(),this.bounds[1]=this._midpoint$1(a.bounds[b+3*c],a.bounds[b+1+3*c]),this.bounds[2]=a.bounds[b+1+3*c].copy(),this.bounds[3]=this._midpoint$1(a.bounds[b+3*c],a.bounds[b+3*(c+1)]),this.bounds[4]=this.backslash?this._midpoint$1(a.bounds[b+3*c],a.bounds[b+1+3*(c+1)]):this._midpoint$1(a.bounds[b+1+3*c],a.bounds[b+3*(c+1)]),this.bounds[5]=this._midpoint$1(a.bounds[b+1+3*c],a.bounds[b+1+3*(c+1)]),this.bounds[6]=a.bounds[b+3*(c+1)].copy(),this.bounds[7]=this._midpoint$1(a.bounds[b+3*(c+1)],a.bounds[b+1+3*(c+1)]),this.bounds[8]=a.bounds[b+1+3*(c+1)].copy(),this.bounds[0].tu=0*ic.uvMultiple,this.bounds[0].tv=0*ic.uvMultiple,this.bounds[1].tu=.5*ic.uvMultiple,this.bounds[1].tv=0*ic.uvMultiple,this.bounds[2].tu=1*ic.uvMultiple,this.bounds[2].tv=0*ic.uvMultiple,this.bounds[3].tu=0*ic.uvMultiple,this.bounds[3].tv=.5*ic.uvMultiple,this.bounds[4].tu=.5*ic.uvMultiple,this.bounds[4].tv=.5*ic.uvMultiple,this.bounds[5].tu=1*ic.uvMultiple,this.bounds[5].tv=.5*ic.uvMultiple,this.bounds[6].tu=0*ic.uvMultiple,this.bounds[6].tv=1*ic.uvMultiple,this.bounds[7].tu=.5*ic.uvMultiple,this.bounds[7].tv=1*ic.uvMultiple,this.bounds[8].tu=1*ic.uvMultiple,this.bounds[8].tv=1*ic.uvMultiple,this._vertexList$1.push(this.bounds[0]),this._vertexList$1.push(this.bounds[1]),this._vertexList$1.push(this.bounds[2]),this._vertexList$1.push(this.bounds[3]),this._vertexList$1.push(this.bounds[4]),this._vertexList$1.push(this.bounds[5]),this._vertexList$1.push(this.bounds[6]),this._vertexList$1.push(this.bounds[7]),this._vertexList$1.push(this.bounds[8]),this.backslash?(this._childTriangleList$1[0].push(uc.create(4,1,0)),this._childTriangleList$1[0].push(uc.create(3,4,0)),this._childTriangleList$1[1].push(uc.create(5,2,1)),this._childTriangleList$1[1].push(uc.create(4,5,1)),this._childTriangleList$1[2].push(uc.create(7,4,3)),this._childTriangleList$1[2].push(uc.create(6,7,3)),this._childTriangleList$1[3].push(uc.create(8,5,4)),this._childTriangleList$1[3].push(uc.create(7,8,4))):(this._childTriangleList$1[0].push(uc.create(3,1,0)),this._childTriangleList$1[0].push(uc.create(4,1,3)),this._childTriangleList$1[1].push(uc.create(4,2,1)),this._childTriangleList$1[1].push(uc.create(5,2,4)),this._childTriangleList$1[2].push(uc.create(6,4,3)),this._childTriangleList$1[2].push(uc.create(7,4,6)),this._childTriangleList$1[3].push(uc.create(7,5,4)),this._childTriangleList$1[3].push(uc.create(8,5,7)))}else this.bounds[0]=Qc.create(0,-1,0,0,0),this.bounds[1]=Qc.create(0,0,1,.5,0),this.bounds[2]=Qc.create(0,-1,0,1,0),this.bounds[3]=Qc.create(-1,0,0,0,.5),this.bounds[4]=Qc.create(0,1,0,.5,.5),this.bounds[5]=Qc.create(1,0,0,1,.5),this.bounds[6]=Qc.create(0,-1,0,0,1),this.bounds[7]=Qc.create(0,0,-1,.5,1),this.bounds[8]=Qc.create(0,-1,0,1,1),this._vertexList$1.push(this.bounds[0]),this._vertexList$1.push(this.bounds[1]),this._vertexList$1.push(this.bounds[2]),this._vertexList$1.push(this.bounds[3]),this._vertexList$1.push(this.bounds[4]),this._vertexList$1.push(this.bounds[5]),this._vertexList$1.push(this.bounds[6]),this._vertexList$1.push(this.bounds[7]),this._vertexList$1.push(this.bounds[8]),this._childTriangleList$1[0].push(uc.create(3,1,0)),this._childTriangleList$1[0].push(uc.create(4,1,3)),this._childTriangleList$1[1].push(uc.create(5,2,1)),this._childTriangleList$1[1].push(uc.create(4,5,1)),this._childTriangleList$1[2].push(uc.create(7,4,3)),this._childTriangleList$1[2].push(uc.create(6,7,3)),this._childTriangleList$1[3].push(uc.create(7,5,4)),this._childTriangleList$1[3].push(uc.create(8,5,7))},_midpoint$1:function(a,b){var c=Sc.lerp(a.position,b.position,.5),d=Tc.lerp(Tc.create(a.tu,a.tv),Tc.create(b.tu,b.tv),.5);return c.normalize(),Qc.createPos(c,d.x,d.y)},createGeometry:function(a){if(this.geometryCreated)return!0;if(this.geometryCreated=!0,ic.prototype.createGeometry.call(this,a),!this._subDivided$1){null==this._vertexList$1&&this._initializeGrids$1(),256===ic.uvMultiple?this._subDivisionLevel$1=this.dataset.get_dataSetType()&&1!==this.dataset.get_dataSetType()?Math.min(5,Math.max(0,5-this.level)):Math.min(5,Math.max(0,5-this.level)):this.demTile&&this.level>1&&(this.demArray=new Array(289),this.demSize=289,this.backslash?null==qd._backslashYIndex$1&&(this._tempBackslashYIndex$1=new Array(this.demSize),this._tempBackslashXIndex$1=new Array(this.demSize)):null==qd._slashYIndex$1&&(this._tempSlashYIndex$1=new Array(this.demSize),this._tempSlashXIndex$1=new Array(this.demSize)));for(var b=0;4>b;b++)for(var c=this._subDivisionLevel$1;c-->1;){for(var d=[],e=ss.enumerate(this._childTriangleList$1[b]);e.moveNext();){var f=e.current;f.subDivide(d,this._vertexList$1)}this._childTriangleList$1[b]=d}if(null==a.gl)for(var b=0;4>b;b++){this._renderTriangleLists[b]=[];for(var g=ss.enumerate(this._childTriangleList$1[b]);g.moveNext();){var f=g.current,h=this._vertexList$1[f.c],i=this._vertexList$1[f.b],j=this._vertexList$1[f.a];this._renderTriangleLists[b].push(_b.create(h,i,j,this.texture,this.level))}}else{this._vertexBuffer=ic.prepDevice.createBuffer(),ic.prepDevice.bindBuffer(34962,this._vertexBuffer);for(var k=new Float32Array(5*this._vertexList$1.length),l=k,m=0,n=ss.enumerate(this._vertexList$1);n.moveNext();){var o=n.current;this.demTile?(m=this.addVertex(l,m,this._getMappedVertex(o)),this.demIndex++):m=this.addVertex(l,m,o)}this.demTile&&(this.backslash?null!=this._tempBackslashXIndex$1&&(qd._backslashXIndex$1=this._tempBackslashXIndex$1,qd._backslashYIndex$1=this._tempBackslashYIndex$1,this._tempBackslashXIndex$1=null,this._tempBackslashYIndex$1=null):null!=this._tempSlashYIndex$1&&(qd._slashXIndex$1=this._tempSlashXIndex$1,qd._slashYIndex$1=this._tempSlashYIndex$1,this._tempSlashYIndex$1=null,this._tempSlashXIndex$1=null)),ic.prepDevice.bufferData(34962,k,35044);for(var b=0;4>b;b++)if(this.triangleCount=this._childTriangleList$1[b].length,null==this.getIndexBuffer(b,0)){var p=new Uint16Array(3*this.triangleCount),q=p;m=0;for(var r=ss.enumerate(this._childTriangleList$1[b]);r.moveNext();){var f=r.current;q[m++]=f.c,q[m++]=f.b,q[m++]=f.a}this._processIndexBuffer$1(q,b)}}this._subDivided$1=!0}return!0},_getMappedVertex:function(a){var b=new Qc,c=Pc.cartesianToSpherical2(a.position);if(c.get_lng()<-180&&c.set_lng(c.get_lng()+360),c.get_lng()>180&&c.set_lng(c.get_lng()-360),this.level>1){var d=ss.truncate(16*a.tu+.5),e=ss.truncate(16*a.tv+.5);this.demArray[d+17*e]=this.demData[this.demIndex],this.backslash?null!=this._tempBackslashYIndex$1&&(this._tempBackslashXIndex$1[this.demIndex]=d,this._tempBackslashYIndex$1[this.demIndex]=e):null!=this._tempSlashYIndex$1&&(this._tempSlashXIndex$1[this.demIndex]=d,this._tempSlashYIndex$1[this.demIndex]=e)}var f=this.geoTo3dWithAlt(c.get_lat(),c.get_lng(),!1,!1);return b.tu=a.tu,b.tv=a.tv,f.subtract(this.localCenter),b.position=f,b},cleanUp:function(a){ic.prototype.cleanUp.call(this,a),null!=this._vertexList$1&&(this._vertexList$1=null),null!=this._childTriangleList$1&&(this._childTriangleList$1=null),this._subDivided$1=!1,this.demArray=null},_getDemSample$1:function(a,b){return this.demArray[17*(16-b)+a]},createDemFromParent:function(){var a=ss.safeCast(this.parent,qd);if(null==a)return!1;var b=this.tileX%2===1?8:0,c=this.tileY%2?0:8;this.demArray=new Array(289);for(var d=0;17>d;d+=2)for(var e=!0,f=0;17>f;f++)this.demArray[17*(16-d)+f]=e?a._getDemSample$1(f/2+b,d/2+c):(a._getDemSample$1(f/2+b,d/2+c)+a._getDemSample$1(f/2+b+1,d/2+c))/2,e=!e;for(var g=1;17>g;g+=2)for(var h=0;17>h;h++)this.demArray[17*(16-g)+h]=(this._getDemSample$1(h,g-1)+this._getDemSample$1(h,g+1))/2;this.demData=new Array(this.demSize);for(var i=0;i-1){if(c.indexOf("{$DATE}")>-1){var d=ss.format("{0:yyyy/MM/dd}",gc.get_now());c=ss.replaceString(c,"{$DATE}",d)}if(c.indexOf("{$TIME}")>-1){var e=ss.format("{0:HH:mm:ss}",gc.get_now());c=ss.replaceString(c,"{$TIME}",e)}c=ss.replaceString(c,"{$LAT}",Pc.formatDMS(Ec.singleton.renderContext.viewCamera.lat)),c=ss.replaceString(c,"{$LNG}",Pc.formatDMS(Ec.singleton.renderContext.viewCamera.lat)),c=ss.replaceString(c,"{$RA}",Pc.formatDMS(Ec.singleton.renderContext.viewCamera.get_RA())),c=ss.replaceString(c,"{$DEC}",Pc.formatDMS(Ec.singleton.renderContext.viewCamera.get_dec())),c=ss.replaceString(c,"{$FOV}",Pc.formatDMS(Ec.singleton.renderContext.get_fovAngle()))}for(var f=c.split("\n"),g=-(this.get_height()/2),h=1.7*this.textObject.fontSize,i=ss.enumerate(f);i.moveNext();)for(var j=i.current,k=wc.getWrappedText(b,j,this.get_width()),l=ss.enumerate(k);l.moveNext();){var m=l.current;b.fillText(m,-this.get_width()/2,g),g+=h}b.restore()},initializeTexture:function(){},initializeFromXml:function(a){var b=wc.selectSingleNode(a,"Text");this.textObject=oc._fromXml(wc.selectSingleNode(b,"TextObject"))},initiaizeGeometry:function(){}},xh={get_shapeType:function(){return this._shapeType$1},set_shapeType:function(a){return this._shapeType$1=a,this.cleanUpGeometry(),a},draw3D:function(a){switch(this._shapeType$1){case 0:this._createCircleGeometry$1(a);break;case 1:this._createRectGeometry$1(a);break;case 6:this._createOpenRectGeometry$1(a);break;case 2:this._createStarGeometry$1(a);break;case 3:this._createDonutGeometry$1(a);break;case 4:this._createArrowGeometry$1(a);break;case 5:this._createLineGeometry$1(a)}},initiaizeGeometry:function(){},_createLineGeometry$1:function(a){var b=a.device;b.save();var c=this.get_width()/2;b.translate(this.get_x(),this.get_y()),b.rotate(this.get_rotationAngle()*nc.RC),b.moveTo(-c,0),b.lineTo(c,0),b.lineWidth=9,b.strokeStyle=this.get_color().toString(),b.globalAlpha=this.get_opacity(),b.stroke(),b.restore()},_createOpenRectGeometry$1:function(a){var b=a.device;b.save(),b.translate(this.get_x(),this.get_y()),b.rotate(this.get_rotationAngle()*nc.RC),b.beginPath(),b.moveTo(-this.get_width()/2,-this.get_height()/2),b.lineTo(this.get_width()/2,-this.get_height()/2),b.lineTo(this.get_width()/2,this.get_height()/2),b.lineTo(-this.get_width()/2,this.get_height()/2),b.closePath(),b.lineWidth=9,b.strokeStyle=this.get_color().toString(),b.globalAlpha=this.get_opacity(),b.stroke(),b.restore()},_createRectGeometry$1:function(a){var b=a.device;b.save(),b.translate(this.get_x(),this.get_y()),b.rotate(this.get_rotationAngle()*nc.RC),b.beginPath(),b.moveTo(-this.get_width()/2,-this.get_height()/2),b.lineTo(this.get_width()/2,-this.get_height()/2),b.lineTo(this.get_width()/2,this.get_height()/2),b.lineTo(-this.get_width()/2,this.get_height()/2),b.closePath(),b.lineWidth=0,b.fillStyle=this.get_color().toString(),b.globalAlpha=this.get_opacity(),b.fill(),b.restore()},_createStarGeometry$1:function(a){var b=a.device;b.save(),b.translate(this.get_x(),this.get_y()),b.rotate(this.get_rotationAngle()*nc.RC),b.beginPath();for(var c=0,d=0,e=(this.get_width()/2,2*Math.PI/5),f=!0,g=0;5>g;g++){var h=g*e-Math.PI/2;f?(f=!1,b.moveTo(c+Math.cos(h)*(this.get_width()/2),d+Math.sin(h)*(this.get_height()/2))):b.lineTo(c+Math.cos(h)*(this.get_width()/2),d+Math.sin(h)*(this.get_height()/2));var i=g*e+e/2-Math.PI/2;b.lineTo(c+Math.cos(i)*(this.get_width()/5.3),d+Math.sin(i)*(this.get_height()/5.3))}b.closePath(),b.lineWidth=0,b.fillStyle=this.get_color().toString(),b.globalAlpha=this.get_opacity(),b.fill(),b.restore()},_createArrowGeometry$1:function(a){var b=a.device;b.save(),b.translate(this.get_x(),this.get_y()),b.rotate(this.get_rotationAngle()*nc.RC),b.beginPath(),b.moveTo(-(this.get_width()/2),-(this.get_height()/4)),b.lineTo(this.get_width()/4,-(this.get_height()/4)),b.lineTo(this.get_width()/4,-(this.get_height()/2)),b.lineTo(this.get_width()/2,0),b.lineTo(this.get_width()/4,this.get_height()/2),b.lineTo(this.get_width()/4,this.get_height()/4),b.lineTo(-(this.get_width()/2),this.get_height()/4),b.closePath(),b.lineWidth=0,b.fillStyle=this.get_color().toString(),b.globalAlpha=this.get_opacity(),b.fill(),b.restore()},_createDonutGeometry$1:function(a){var b=a.device;b.save(),b.translate(this.get_x(),this.get_y()),b.scale(1,this.get_height()/this.get_width()),b.rotate(this.get_rotationAngle()*nc.RC),b.beginPath(),b.arc(0,0,this.get_width()/2,0,2*Math.PI,!1),b.closePath(),b.lineWidth=9,b.strokeStyle=this.get_color().toString(),b.globalAlpha=this.get_opacity(),b.stroke(),b.restore()},_createCircleGeometry$1:function(a){var b=a.device;b.save(),b.scale(1,this.get_width()/this.get_height()),b.translate(this.get_x(),this.get_y()),b.rotate(this.get_rotationAngle()*nc.RC),b.beginPath(),b.arc(0,0,this.get_width(),0,2*Math.PI,!1),b.closePath(),b.lineWidth=0,b.fillStyle=this.get_color().toString(),b.globalAlpha=this.get_opacity(),b.fill(),b.restore()},initializeTexture:function(){},cleanUpGeometry:function(){nc.prototype.cleanUpGeometry.call(this),this.cleanUp()},initializeFromXml:function(a){var b=wc.selectSingleNode(a,"Shape");switch(b.attributes.getNamedItem("ShapeType").nodeValue){case"Circle":this._shapeType$1=0;break;case"Rectagle":this._shapeType$1=1;break;case"Star":this._shapeType$1=2;break;case"Donut":this._shapeType$1=3;break;case"Arrow":this._shapeType$1=4;break;case"Line":this._shapeType$1=5;break;case"OpenRectagle":default:this._shapeType$1=6}}},yh={get_mute:function(){return this._mute$1},set_mute:function(a){return this._mute$1=a,this.set_volume(this.get_volume()),a},get_volume:function(){return this._volume$1},set_volume:function(a){return this._volume$1=a,null!=this._audio$1&&(this._audio$1.volume=this._mute$1?0:this._volume$1/100),a},play:function(){null==this._audio$1&&this.initializeTexture(),null!=this._audio$1&&this._audioReady$1&&(this._audio$1.play(),this.set_volume(this.get_volume()))},pause:function(){null==this._audio$1&&this.initializeTexture(),null!=this._audio$1&&this._audioReady$1&&this._audio$1.pause()},stop:function(){null==this._audio$1&&this.initializeTexture(),null!=this._audio$1&&this._audioReady$1&&this._audio$1.pause()},seek:function(a){this._position$1=a,null==this._audio$1&&this.initializeTexture(),this._audioReady$1&&(this._audio$1.durationa-1);break;case 2:this._currentFrame$1=Math.max(0,a-ss.truncate(b/1e3*24%a))+this._startFrame$1;break;case 3:var c=Math.min(b/1e3*24,2*a+1)+a;this._currentFrame$1=Math.abs(c%(2*a-1)-(a-1))+this._startFrame$1;break;case 4:this._currentFrame$1=Math.min(a-1,ss.truncate(b/1e3*24));break;case 5:this._currentFrame$1=this._startFrame$1;break;case 6:this._currentFrame$1=a-1+this._startFrame$1;break;default:this._currentFrame$1=this._startFrame$1}}ss.emptyString(this._frameSequence$1)||(this._currentFrame$1=this._currentFrame$1-1?this._framesList$1[this._currentFrame$1]:0),this.currentRotation=0}},Ah={get_fill:function(){return this._fill$1},set_fill:function(a){return this._fill$1=a,a},get_skyRelative:function(){return this._skyRelative$1},set_skyRelative:function(a){return this._skyRelative$1=a,a},get_lineWidth:function(){return this._strokeWidth$1},set_lineWidth:function(a){return this._strokeWidth$1=a,a},get_radius:function(){return this._radius$1},set_radius:function(a){return this._radius$1=a,a},get_lineColor:function(){return this._lineColor$1.toString()},set_lineColor:function(a){return this._lineColor$1=Jc.fromName(a),a},get_fillColor:function(){return this._fillColor$1.toString()},set_fillColor:function(a){return this._fillColor$1=Jc.fromName(a),a},setCenter:function(a,b){this._ra$1=a/15,this._dec$1=b,this.center=Pc.raDecTo3d(this._ra$1,this._dec$1)},draw:function(a){var b=this._radius$1;this._skyRelative$1&&(b/=a.get_fovScale()/3600);var c=a.WVP.transform(this.center);if(!(c.z<0||Sc.dot(a.get_viewPoint(),this.center)<.55))if(null!=a.gl);else{var d=a.device;d.save(),d.globalAlpha=this.get_opacity(),d.beginPath(),d.arc(c.x,c.y,b,0,2*Math.PI,!0),d.lineWidth=this._strokeWidth$1,d.fillStyle=this._fillColor$1.toString(),this._fill$1&&d.fill(),d.globalAlpha=1,d.strokeStyle=this._lineColor$1.toString(),d.stroke(),d.restore()}},hitTest:function(a,b,c){if(ss.emptyString(this.get_id()))return!1;var d=this._radius$1;return this._skyRelative$1||(d*=a.get_fovScale()/3600),Gc.separation(b,c,this._ra$1,this._dec$1)b;b++)this._renderTriangleLists[b]=[];if(!this._topDown$1)return this._createGeometryBottomsUp$1(a);var c,d,e=0,f=this.dataset.get_baseTileDegrees()/Math.pow(2,this.level),g=90-this.tileY*f,h=90-(this.tileY+1)*f,i=this.tileX*f-180,j=(this.tileX+1)*f-180,k=j-i,l=h-g;this.topLeft=this.geoTo3d(g,i,!1),this.bottomRight=this.geoTo3d(h,j,!1),this.topRight=this.geoTo3d(g,j,!1),this.bottomLeft=this.geoTo3d(h,i,!1);var m,n,o=new Array((this._subDivisionLevel$1+1)*(this._subDivisionLevel$1+1)),p=1/this._subDivisionLevel$1;for(n=0;n<=this._subDivisionLevel$1;n++)for(c=n!==this._subDivisionLevel$1?g+p*l*n:h,m=0;m<=this._subDivisionLevel$1;m++)d=m!==this._subDivisionLevel$1?i+p*k*m:j,e=n*(this._subDivisionLevel$1+1)+m,o[e]=Qc.createPos(this.geoTo3d(c,d,!1),m*p,n*p);this.triangleCount=this._subDivisionLevel$1*this._subDivisionLevel$1*2;var q=this._subDivisionLevel$1/2,r=0;if(null==a.gl)for(var s=0;2>s;s++)for(var t=0;2>t;t++){e=0;for(var u=q*s;q*(s+1)>u;u++)for(var v=q*t;q*(t+1)>v;v++){var w,x,y;w=o[u*(this._subDivisionLevel$1+1)+v],x=o[(u+1)*(this._subDivisionLevel$1+1)+v],y=o[u*(this._subDivisionLevel$1+1)+(v+1)],this._renderTriangleLists[r].push(_b.create(w,y,x,this.texture,this.level)),w=o[u*(this._subDivisionLevel$1+1)+(v+1)],x=o[(u+1)*(this._subDivisionLevel$1+1)+v],y=o[(u+1)*(this._subDivisionLevel$1+1)+(v+1)],this._renderTriangleLists[r].push(_b.create(w,y,x,this.texture,this.level))}r++}else{this._vertexBuffer=ic.prepDevice.createBuffer(),ic.prepDevice.bindBuffer(34962,this._vertexBuffer);var z=new Float32Array(5*o.length),A=z;e=0;for(var B=ss.enumerate(o);B.moveNext();){var C=B.current;e=this.addVertex(A,e,C)}ic.prepDevice.bufferData(34962,z,35044);for(var s=0;2>s;s++)for(var t=0;2>t;t++){var D=new Uint16Array(3*this.triangleCount),E=D;e=0;for(var u=q*s;q*(s+1)>u;u++)for(var v=q*t;q*(t+1)>v;v++)E[e++]=u*(this._subDivisionLevel$1+1)+v,E[e++]=(u+1)*(this._subDivisionLevel$1+1)+v,E[e++]=u*(this._subDivisionLevel$1+1)+(v+1),E[e++]=u*(this._subDivisionLevel$1+1)+(v+1),E[e++]=(u+1)*(this._subDivisionLevel$1+1)+v,E[e++]=(u+1)*(this._subDivisionLevel$1+1)+(v+1);this._indexBuffers[r]=ic.prepDevice.createBuffer(),ic.prepDevice.bindBuffer(34963,this._indexBuffers[r]),ic.prepDevice.bufferData(34963,D,35044),r++}}}catch(F){}return!0},_createGeometryBottomsUp$1:function(a){var b,c,d,e,f=0,g=this.dataset.get_baseTileDegrees()/Math.pow(2,this.level),h=-90+(this.tileY+1)*g,i=-90+this.tileY*g,j=this.tileX*g-180,k=(this.tileX+1)*g-180,l=k-j,m=i-h,n=new Array((this._subDivisionLevel$1+1)*(this._subDivisionLevel$1+1)),o=1/this._subDivisionLevel$1;for(e=0;e<=this._subDivisionLevel$1;e++)for(b=e!==this._subDivisionLevel$1?h+o*m*e:i,d=0;d<=this._subDivisionLevel$1;d++)c=d!==this._subDivisionLevel$1?j+o*l*d:k,f=e*(this._subDivisionLevel$1+1)+d,n[f]=Qc.createPos(this.geoTo3d(b,c,!1),d*o,e*o);this.triangleCount=this._subDivisionLevel$1*this._subDivisionLevel$1*2;var p=this._subDivisionLevel$1/2,q=0;if(null==a.gl)for(var r=0;2>r;r++)for(var s=0;2>s;s++){f=0;for(var t=p*r;p*(r+1)>t;t++)for(var u=p*s;p*(s+1)>u;u++){var v,w,x;v=n[t*(this._subDivisionLevel$1+1)+u],w=n[(t+1)*(this._subDivisionLevel$1+1)+u],x=n[t*(this._subDivisionLevel$1+1)+(u+1)],this._renderTriangleLists[q].push(_b.create(v,x,w,this.texture,this.level)),v=n[t*(this._subDivisionLevel$1+1)+(u+1)],w=n[(t+1)*(this._subDivisionLevel$1+1)+u],x=n[(t+1)*(this._subDivisionLevel$1+1)+(u+1)],this._renderTriangleLists[q].push(_b.create(v,x,w,this.texture,this.level))}q++}else{this._vertexBuffer=ic.prepDevice.createBuffer(),ic.prepDevice.bindBuffer(34962,this._vertexBuffer);var y=new Float32Array(5*n.length),z=y;f=0;for(var A=ss.enumerate(n);A.moveNext();){var B=A.current;f=this.addVertex(z,f,B)}ic.prepDevice.bufferData(34962,y,35044);for(var r=0;2>r;r++)for(var s=0;2>s;s++){var C=new Uint16Array(3*this.triangleCount),D=C;f=0;for(var t=p*r;p*(r+1)>t;t++)for(var u=p*s;p*(s+1)>u;u++)D[f++]=t*(this._subDivisionLevel$1+1)+u,D[f++]=(t+1)*(this._subDivisionLevel$1+1)+u,D[f++]=t*(this._subDivisionLevel$1+1)+(u+1),D[f++]=t*(this._subDivisionLevel$1+1)+(u+1),D[f++]=(t+1)*(this._subDivisionLevel$1+1)+u,D[f++]=(t+1)*(this._subDivisionLevel$1+1)+(u+1);this._indexBuffers[q]=ic.prepDevice.createBuffer(),ic.prepDevice.bindBuffer(34963,this._indexBuffers[q]),ic.prepDevice.bufferData(34963,C,35044),q++}}return!0}};Ad.create=function(a,b,c,d,e){var f=new Ad;return f.parent=e,f.level=a,f.tileX=b,f.tileY=c,f.dataset=d,f.computeBoundingSphere(),f },Ad.getCentrePointOffsetAsTileRatio=function(a,b,c){var d=Ad.absoluteLonToMetersAtZoom(b,c),e=d/256-Math.floor(d/256),f=Ad.absoluteLatToMetersAtZoom(a,c),g=f/256-Math.floor(f/256);return Tc.create(e,g)},Ad.relativeMetersToLatAtZoom=function(a,b){var c=Ad.metersPerPixel2(b),d=a*c;return Ad._radToDeg$1(Math.PI/2-2*Math.atan(Math.exp(0-d/6378137)))},Ad.relativeMetersToLonAtZoom=function(a,b){var c=Ad.metersPerPixel2(b),d=a*c;return Ad._radToDeg$1(d/6378137)},Ad.absoluteLatToMetersAtZoom=function(a,b){var c=Math.sin(Ad._degToRad$1(a)),d=3189068.5*Math.log((1+c)/(1-c)),e=Ad.metersPerPixel2(b);return ss.truncate(Math.round(20037508-d)/e)},Ad.absoluteMetersToLatAtZoom=function(a,b){var c=Ad.metersPerPixel2(b),d=20037508-a*c;return Ad._radToDeg$1(Math.PI/2-2*Math.atan(Math.exp(0-d/6378137)))},Ad.absoluteLonToMetersAtZoom=function(a,b){var c=6378137*Ad._degToRad$1(a),d=Ad.metersPerPixel2(b);return ss.truncate((c+20037508)/d)},Ad.absoluteMetersToLonAtZoom=function(a,b){var c=Ad.metersPerPixel2(b),d=a*c-20037508;return Ad._radToDeg$1(d/6378137)},Ad.absoluteLonToMetersAtZoomTile=function(a,b){var c=6378137*Ad._degToRad$1(a),d=Ad.metersPerPixel2(b);return ss.truncate((c+20037508)/d)},Ad.absoluteLatToMetersAtZoomTile=function(a,b){var c=Math.sin(Ad._degToRad$1(a)),d=3189068.5*Math.log((1+c)/(1-c)),e=Ad.metersPerPixel2(b);return ss.truncate(Math.round(20037508-d)/e)},Ad.absoluteMetersToLonAtZoomByTileY=function(a,b){var c=Ad.metersPerPixel2(b),d=a*c-20037508;return Ad._radToDeg$1(d/6378137)},Ad._degToRad$1=function(a){return a*Math.PI/180},Ad.metersPerPixel2=function(a){return 156543/(1<Math.max(this._latMax$1,this._latMin$1)||bMath.max(this._lngMin$1,this._lngMax$1)?!1:!0},getSurfacePointAltitude:function(a,b,c){if(this.levelb;b++)this._renderTriangleLists[b]=[];var c,d,e=0,f=360/Math.pow(2,this.level);this._latMin$1=Ad.absoluteMetersToLatAtZoom(256*this.tileY,this.level),this._latMax$1=Ad.absoluteMetersToLatAtZoom(256*(this.tileY+1),this.level),this._lngMin$1=this.tileX*f-180,this._lngMax$1=(this.tileX+1)*f-180;var g=Ad.absoluteMetersToLatAtZoom(256*(2*this.tileY+1),this.level+1);this.topLeft=this.geoTo3d(this._latMin$1,this._lngMin$1,!1),this.bottomRight=this.geoTo3d(this._latMax$1,this._lngMax$1,!1),this.topRight=this.geoTo3d(this._latMin$1,this._lngMax$1,!1),this.bottomLeft=this.geoTo3d(this._latMax$1,this._lngMin$1,!1);var h=new Array((this._subDivisionLevel$1+1)*(this._subDivisionLevel$1+1));f=this._lngMax$1-this._lngMin$1;var i,j,k=(f/this._subDivisionLevel$1,1/this._subDivisionLevel$1),l=this._latMax$1-g;for(j=0;jo;o++)for(var p=0;2>p;p++){for(e=0,j=m*o;m*(o+1)>j;j++)for(i=m*p;m*(p+1)>i;i++){var q,r,s;q=h[j*(this._subDivisionLevel$1+1)+i],r=h[(j+1)*(this._subDivisionLevel$1+1)+i],s=h[j*(this._subDivisionLevel$1+1)+(i+1)];var t=_b.create(q,r,s,this.texture,this.level);this._renderTriangleLists[n].push(t),q=h[j*(this._subDivisionLevel$1+1)+(i+1)],r=h[(j+1)*(this._subDivisionLevel$1+1)+i],s=h[(j+1)*(this._subDivisionLevel$1+1)+(i+1)],t=_b.create(q,r,s,this.texture,this.level),this._renderTriangleLists[n].push(t)}n++}else{this._vertexBuffer=ic.prepDevice.createBuffer(),ic.prepDevice.bindBuffer(34962,this._vertexBuffer);var u=new Float32Array(5*h.length),v=u;e=0;for(var w=ss.enumerate(h);w.moveNext();){var x=w.current;e=this.addVertex(v,e,x)}ic.prepDevice.bufferData(34962,u,35044);for(var o=0;2>o;o++)for(var p=0;2>p;p++){var y=new Uint16Array(3*this.triangleCount),z=y;for(e=0,j=m*o;m*(o+1)>j;j++)for(i=m*p;m*(p+1)>i;i++)z[e++]=j*(this._subDivisionLevel$1+1)+i,z[e++]=(j+1)*(this._subDivisionLevel$1+1)+i,z[e++]=j*(this._subDivisionLevel$1+1)+(i+1),z[e++]=j*(this._subDivisionLevel$1+1)+(i+1),z[e++]=(j+1)*(this._subDivisionLevel$1+1)+i,z[e++]=(j+1)*(this._subDivisionLevel$1+1)+(i+1);this._indexBuffers[n]=ic.prepDevice.createBuffer(),ic.prepDevice.bindBuffer(34963,this._indexBuffers[n]),ic.prepDevice.bufferData(34963,y,35044),n++}}return!0},_getDemSample$1:function(a,b){return this.demData[33*(32-b)+a]},createDemFromParent:function(){var a=ss.safeCast(this.parent,Ad);if(null==a||null==a.demData)return!1;var b=this.tileX%2===1?16:0,c=this.tileY%2===1?16:0;this.demData=new Array(this.demSize);for(var d=0;33>d;d+=2)for(var e=!0,f=0;33>f;f++)this.demData[33*(32-d)+f]=e?a._getDemSample$1(f/2+b,d/2+c):(a._getDemSample$1(f/2+b,d/2+c)+a._getDemSample$1(f/2+b+1,d/2+c))/2,e=!e;for(var d=1;33>d;d+=2)for(var f=0;33>f;f++)this.demData[33*(32-d)+f]=(this._getDemSample$1(f,d-1)+this._getDemSample$1(f,d+1))/2;for(var g=ss.enumerate(this.demData);g.moveNext();){var h=g.current;this.demAverage+=h}return this.demAverage/=this.demData.length,this.demReady=!0,!0}};Bd._getDatafromFeed$2=function(){return""},Bd._executeQuery$2=function(){return""},Bd.parseDate=function(a){var b=ss.now();try{b=new Date(a)}catch(c){try{return Bd.execlToDateTime(parseFloat(a))}catch(d){}}return b},Bd.execlToDateTime=function(a){a>59&&(a-=1),a>73e4&&(a=73e4);var b=new Date(1899,12,31);return new Date(b.getDate()+ss.truncate(24*a*60*60*1e3))};var Fh={get_header:function(){return this._table$2.header},canCopyToClipboard:function(){return!0},copyToClipboard:function(){},dynamicUpdate:function(){var a=Bd._getDatafromFeed$2(this.get_dataSourceUrl());return null!=a?(this.upadteData(a,!1,!0,!0),this.guessHeaderAssignments(),!0):!1},upadteData:function(a,b,c,d){return this.loadFromString(ss.safeCast(a,String),!0,b,c,d),this.computeDateDomainRange(-1,-1),this._dataDirty$2=!0,!0},loadData:function(a){var b=this;this._table$2=new Yb;var c=new XMLHttpRequest;c.open("GET",a),c.onreadystatechange=function(){4===c.readyState&&(b._table$2.loadFromString(c.responseText,!1,!0,!0),b.computeDateDomainRange(-1,-1),b.get_dynamicData()&&b.get_autoUpdate()&&b.dynamicUpdate(),b._dataDirty$2=!0,b.dirty=!0)},c.send()},guessHeaderAssignments:function(){for(var a=0,b=ss.enumerate(this._table$2.header);b.moveNext();){var c=b.current,d=c.toLowerCase();d.indexOf("lat")>-1&&-1===this.latColumn&&(this.latColumn=a),(d.indexOf("lon")>-1||d.indexOf("lng")>-1)&&-1===this.lngColumn&&(this.lngColumn=a),d.indexOf("dec")>-1&&-1===this.latColumn&&(this.latColumn=a,this.astronomical=!0),(d.indexOf("ra")>-1||d.indexOf("ascen")>-1)&&-1===this.lngColumn&&(this.lngColumn=a,this.astronomical=!0,this.pointScaleType=4),(d.indexOf("mag")>-1||d.indexOf("size")>-1)&&-1===this.sizeColumn&&(this.sizeColumn=a),(d.indexOf("date")>-1||d.indexOf("time")>-1||d.indexOf("dt")>-1||d.indexOf("tm")>-1)&&(d.indexOf("end")>-1&&-1===this.endDateColumn?this.endDateColumn=a:-1===this.startDateColumn&&(this.startDateColumn=a)),(d.indexOf("altitude")>-1||d.indexOf("alt")>-1)&&-1===this.altColumn&&(this.altColumn=a,this.set_altType(1),this.set_altUnit(1)),d.indexOf("depth")>-1&&-1===this.altColumn&&(this.altColumn=a,this.set_altType(0),this.set_altUnit(5)),ss.startsWith(d,"x")&&-1===this.get_xAxisColumn()&&this.set_xAxisColumn(a),ss.startsWith(d,"y")&&-1===this.get_yAxisColumn()&&this.set_yAxisColumn(a),ss.startsWith(d,"z")&&-1===this.get_zAxisColumn()&&this.set_zAxisColumn(a),d.indexOf("color")>-1&&-1===this.get_colorMapColumn()&&this.set_colorMapColumn(a),(d.indexOf("geometry")>-1||d.indexOf("geography")>-1)&&-1===this.geometryColumn&&(this.geometryColumn=a),a++}this._table$2.header.length>0&&(this.nameColumn=0)},computeDateDomainRange:function(a,b){-1===a&&(a=this.startDateColumn),-1===b&&(b=this.endDateColumn),-1===b&&(b=a),this.set_beginRange(new Date("12/31/2100")),this.set_endRange(new Date("12/31/1890"));for(var c=ss.enumerate(this._table$2.rows);c.moveNext();){var d=c.current;try{if(a>-1){var e=!1,f=new Date("12/31/2100");try{f=new Date(d[a]),f-1&&(h=new Date(d[b]),e&&h>this.get_endRange()&&this.set_endRange(h))}catch(i){}}}catch(j){}}},checkState:function(){},getMaxValue:function(a){var b=0;this._table$2.lock();for(var c=ss.enumerate(this._table$2.rows);c.moveNext();){var d=c.current;try{if(a>-1){var e=!1;try{var f=parseFloat(d[a]);e&&f>b&&(b=f)}catch(g){}}}catch(h){}}return this._table$2.unlock(),b},getDomainValues:function(a){var b=[];this._table$2.lock();for(var c=ss.enumerate(this._table$2.rows);c.moveNext();){var d=c.current;try{a>-1&&(b.indexOf(d[a])>=0||b.push(d[a]))}catch(e){}}return b.sort(),this._table$2.unlock(),b},get_barChartBitmask:function(){return this._barChartBitmask$2},set_barChartBitmask:function(a){return this._barChartBitmask$2=a,a},prepVertexBuffer:function(a){this._table$2.lock(),null!=this.lineList&&this.lineList.clear(),null!=this.lineList2d&&this.lineList2d.clear(),null!=this.triangleList&&this.triangleList.clear(),null!=this.pointList&&this.pointList.clear(),null!=this.triangleList2d&&this.triangleList2d.clear(),null==this.lineList&&(this.lineList=new Ab),null==this.pointList&&(this.pointList=new Cb(a)),this.lineList.timeSeries=this.timeSeries,null==this.lineList2d&&(this.lineList2d=new Ab,this.lineList2d.set_depthBuffered(!1)),this.lineList.timeSeries=this.timeSeries,null==this.triangleList&&(this.triangleList=new Bb),null==this.triangleList2d&&(this.triangleList2d=new Bb,this.triangleList2d.depthBuffered=!1),this.positions.length=0;var b=0,c=this.get_color(),d=Pc.meanObliquityOfEcliptic(gc.get_jNow())/180*Math.PI,e=0;e&&(this._meanRadius$2=e);for(var f=new Sc,g=2e-4,h=Kc.get_white(),i=0,j=0,k=ss.enumerate(this._table$2.rows);k.moveNext();){var l=k.current;try{if(this.geometryColumn>-1||!this.get_coordinatesType()&&this.lngColumn>-1&&this.latColumn>-1||1===this.get_coordinatesType()&&this.get_xAxisColumn()>-1&&this.get_yAxisColumn()>-1){var m=0,n=0,o=0,p=1,q=0,r=0,s=this.getScaleFactor(this.get_altUnit(),1);if(-1===this.altColumn||3===this.get_altType()||this.bufferIsFlat)p=1,1===(this.astronomical&!this.bufferIsFlat)&&(p=6323967.17);else{this.get_altType()||(s=-s),p=0;try{p=parseFloat(l[this.altColumn])}catch(t){}this.astronomical?(s/=149598e6,r=p*s/206264.806,q=s*p,p=s*p):2===this.get_altType()?(q=s*p,p=s*p/this._meanRadius$2):(q=s*p,p=1+s*p/this._meanRadius$2)}if(!this.get_coordinatesType()&&this.lngColumn>-1&&this.latColumn>-1){m=parseFloat(l[this.lngColumn]),n=parseFloat(l[this.latColumn]),this.astronomical&&(this.get_raUnits()||(m*=15),this.bufferIsFlat);var u=Pc.geoTo3dDoubleRad(n,m,p);this.astronomical&&!this.bufferIsFlat&&u.rotateX(d),f=u,this.positions.push(f)}else if(1===this.get_coordinatesType()){var v=this.getScaleFactor(this.get_cartesianScale(),this.get_cartesianCustomScale())/this._meanRadius$2;this.get_zAxisColumn()>-1&&(o=parseFloat(l[this.get_zAxisColumn()])),m=parseFloat(l[this.get_xAxisColumn()]),n=parseFloat(l[this.get_yAxisColumn()]),this.get_xAxisReverse()&&(m=-m),this.get_yAxisReverse()&&(n=-n),this.get_zAxisReverse()&&(o=-o),f=Sc.create(m*v,o*v,n*v),this.positions.push(f)}switch(this.get__colorMap()){case 0:h=c;break;case 3:h=this.get_colorMapColumn()>-1?this._parseColor$2(l[this.get_colorMapColumn()],c):c}if(this.sizeColumn>-1)switch(this.pointScaleType){case 0:g=parseFloat(l[this.sizeColumn]);break;case 2:g=Math.log(parseFloat(l[this.sizeColumn]));break;case 1:var w=0;try{g=parseFloat(l[this.altColumn])}catch(x){g=0}break;case 4:var w=0;try{w=parseFloat(l[this.sizeColumn]),this.bufferIsFlat?g=40/Math.pow(1.6,w):(w-=5*(wc.logN(r,10)-1),g=12e7/Math.pow(1.6,w))}catch(y){g=0}break;case 3:g=1}else g=1;if(1===this.get_plotType()&&(g=1),1===(this.astronomical&!this.bufferIsFlat),this.startDateColumn>-1){var z=new Date(l[this.startDateColumn]);i=gc.utcToJulian(z)-gc.utcToJulian(this.baseDate),this.endDateColumn>-1?(z=new Date(l[this.endDateColumn]),j=gc.utcToJulian(z)-gc.utcToJulian(this.baseDate)):j=i}this.pointList.addPoint(f,h,new yb(i,j),g),this.geometryColumn>-1&&this._parseGeometry$2(l[this.geometryColumn],h,h,q,new yb(i,j)),b++}}catch(A){}this.lines=!1}return this._table$2.unlock(),this._dataDirty$2=!1,this.dirty=!1,!1},_parseGeometry$2:function(a,b,c,d,e){a=ss.trim(a).toLowerCase();var f=a.indexOf("(");if(!(0>f)&&ss.endsWith(a,")")){var g=ss.trim(a.substring(0,f)),h=a.substr(f),i=g.split(" "),j=null,k=null;if(i.length>0)for(var l=ss.enumerate(i);l.moveNext();){var m=l.current;ss.emptyString(j)?j=m:ss.emptyString(k)&&(k=m)}switch(j){case"multipolygon":case"polygon":this._parsePolygon$2(h,k,b,c,d,e);break;case"multilinestring":this._parseLineString$2(h,k,b,d,!1,e);break;case"linestring":this._parseLineString$2(h,k,b,d,!0,e);break;case"geometrycollection":h=h.substring(1,h.length-2);for(var n=vc.splitString(h,","),o=ss.enumerate(n);o.moveNext();){var p=o.current;this._parseGeometry$2(p,b,c,d,e)}}}},_parsePolygon$2:function(a,b,c,d,e,f){if(ss.startsWith(a,"(")||!ss.endsWith(a,")")){a=a.substring(1,a.length-2);for(var g=vc.splitString(a,","),h=ss.enumerate(g);h.moveNext();){var i=h.current,j=new Xb;j.astronomical=this.astronomical,j.meanRadius=this._meanRadius$2,j.parseWkt(i,b,e,f),e?this._addPolygon$2(!1,j,1,d,c,!0,!0,f):this._addPolygonFlat$2(!1,j,1,d,c,!0,!0,f)}}},_parseLineString$2:function(a,b,c,d,e,f){if(ss.startsWith(a,"(")||!ss.endsWith(a,")")){e||(a=a.substring(1,a.length-2));for(var g=vc.splitString(a,","),h=ss.enumerate(g);h.moveNext();){var i=h.current,j=new Xb;j.astronomical=this.astronomical,j.meanRadius=this._meanRadius$2,j.parseWkt(i,b,d,f),this._addPolygon$2(!1,j,1,Kc.get_white(),c,!1,!1,f)}}},_splitShapes$2:function(a){for(var b=[],c=0,d=0;d0&&(f?this.lineList.addLine(i[k],i[k+1],e,h):this.lineList2d.addLine(i[k],i[k+1],e,h),f&&(this.lineList.addLine(j[k],j[k+1],e,h),this.lineList.addLine(i[k],j[k],e,h),this.lineList.addLine(i[k+1],j[k+1],e,h))));if(g)for(var l=Kb.tesselateSimplePoly(i),k=0;k0&&this.lineList2d.addLine(i[j],i[j+1],e,h);if(g)for(var k=Kb.tesselateSimplePoly(i),j=0;j-1){var f=this.getMaxValue(this.lngColumn);f>24&&this.set_raUnits(1)}c&&this.purgeByTime(),this._table$2.unlock()},purgeByTime:function(){if(!(this.startDateColumn<0)){var a=this.startDateColumn;this.endDateColumn>-1&&(a=this.endDateColumn);var b=gc.get_now(),c=24*ss.truncate(this.decay)*60*60*1e3;b=new Date(b.getDate()-c);for(var d=this._table$2.rows.length,e=0;d>e;e++)try{var f=this._table$2.rows[e],g=new Date(f[a]);b>g&&(this._table$2.rows.splice(e,1),d--,e--)}catch(h){}}},draw:function(a,b,c){var d=md.prototype.draw.call(this,a,b,c);return d},cleanUp:function(){this._table$2.lock(),md.prototype.cleanUp.call(this),this._table$2.unlock(),this.dirty=!0}},Gh={get_caption:function(){return this._caption$2},set_caption:function(a){return this._caption$2=a,a}},Hh={get_RA:function(){return this._ra$2},set_RA:function(a){return this._ra$2=a,a},get_dec:function(){return this._dec$2},set_dec:function(a){return this._dec$2=a,a},get_zoom:function(){return this._zoom$2},set_zoom:function(a){return this._zoom$2=a,a}},Ih={get_RA:function(){return this._ra$2},set_RA:function(a){return this._ra$2=a,a},get_dec:function(){return this._dec$2},set_dec:function(a){return this._dec$2=a,a},get_id:function(){return this._id$2},set_id:function(a){return this._id$2=a,a}},Jh={get_url:function(){return this._url$2},set_url:function(a){return this._url$2=a,a}},Kh=ss.module("wwtlib",{IFolder:[c],PositionVertexBuffer:[ub,Bf,null],PositionTextureVertexBuffer:[vb,Cf,null],TimeSeriesLineVertexBuffer:[wb,Df,null],TimeSeriesPointVertexBuffer:[xb,Ef,null],Table:[Yb,dg,null],TileCache:[jc,qg,null],DistanceCalc:[kc,rg,null],Triangle:[uc,Bg,null],Util:[wc,Dg,null],Wtml:[Dc,Jg,null],FolderUp:[cd,hh,null,d],ViewMoverSlew:[fd,kh,null,g],MainView:[gd,null,null],LayerCollection:[ld,ph,Nb],SpreadSheetLayer:[Bd,Fh,md]},{DAY_OF_WEEK:Gd,EO:Hd,CullMode:Id,PointScaleTypes:Jd,AltUnits:Kd,FadeType:Ld,ReferenceFrames:Md,ReferenceFrameTypes:Nd,CoordinatesTypes:Od,AltTypes:Pd,MarkerMixes:Qd,ColorMaps:Rd,PlotTypes:Sd,MarkerScales:Td,RAUnits:Ud,Alignment:Vd,StockSkyOverlayTypes:Wd,OverlayAnchor:Xd,AudioType:Yd,ShapeType:Zd,LoopTypes:$d,TextBorderStyle:_d,UserLevel:ae,StateType:be,SolarSystemObjects:ce,InterpolationType:de,PointType:ee,LocationHint:fe,FolderGroup:ge,FolderRefreshType:he,FolderType:ie,ThumbnailSize:je,ProjectionType:ke,ImageSetType:le,BandPass:me,Classification:ne,IUIServicesCallbacks:[a],ISettings:[b],IThumbnail:[d],IPlace:[e],IUiController:[f],IViewMover:[g],GFX:[h,null,null],ABR:[i,oe,null],ACFT:[j,pe,null],ASEP:[k,qe,null],COR:[l,re,null],C3D:[m,se,null],CT:[n,te,null],CalD:[o,ue,null],DT:[p,ve,null],DYT:[q,we,null],CAAEarth:[r,xe,null],VSC:[s,ye,null],CAAEclipticalElementDetails:[t,ze,null],CAAEclipticalElements:[u,Ae,null],EPO:[v,Be,null],EOE:[w,Ce,null],EPD:[x,De,null],EOD:[y,Ee,null],ELL:[z,Fe,null],EOT:[A,Ge,null],CAAFK5:[B,He,null],GMD:[C,Ie,null],GMDS:[D,Je,null],GM:[E,Ke,null],CAAGlobe:[F,Le,null],IFR:[G,Me,null],INTP:[H,Ne,null],CAAJupiter:[I,Oe,null],CAAKepler:[J,Pe,null],CAAMars:[K,Qe,null],CAAMercury:[L,Re,null],CAAMoon:[M,Se,null],MoonCoefficient1:[N,Te,null],MoonCoefficient2:[O,Ue,null],MIFR:[P,Ve,null],CAAMoonNodes:[Q,We,null],CAAMoonPerigeeApogee:[R,Xe,null],MPAC:[S,Ye,null],CAAMoonPhases:[T,Ze,null],CAANeptune:[U,$e,null],CAANutation:[V,_e,null],NUC:[W,af,null],CAATopocentricEclipticDetails:[X,bf,null],CAAParallax:[Y,cf,null],CAAPhysicalJupiterDetails:[Z,df,null],CAAPhysicalJupiter:[$,ef,null],CAAPhysicalMarsDetails:[_,ff,null],CAAPhysicalMars:[ab,gf,null],CAAPhysicalSunDetails:[bb,hf,null],CAAPhysicalSun:[cb,jf,null],CAAPluto:[db,kf,null],PlutoCoefficient1:[eb,lf,null],PlutoCoefficient2:[fb,mf,null],CAAPrecession:[gb,nf,null],CAARiseTransitSetDetails:[hb,of,null],CAARiseTransitSet:[ib,pf,null],CAASaturn:[jb,qf,null],CAASaturnRingDetails:[kb,rf,null],CAASaturnRings:[lb,sf,null],CAASidereal:[mb,tf,null],CAAStellarMagnitudes:[nb,uf,null],CAASun:[ob,vf,null],CAAUranus:[pb,wf,null],CAAVenus:[qb,xf,null],AstroRaDec:[rb,yf,null],RiseSetDetails:[sb,zf,null],AstroCalc:[tb,Af,null],Dates:[yb,Ff,null],SimpleLineList:[zb,Gf,null],LineList:[Ab,Hf,null],TriangleList:[Bb,If,null],PointList:[Cb,Jf,null],TimeSeriesLineVertex:[Db,Kf,null],TimeSeriesPointVertex:[Eb,Lf,null],SimpleLineShader:[Fb,Mf,null],LineShaderNormalDates:[Gb,Nf,null],TimeSeriesPointSpriteShader:[Hb,Of,null],TileShader:[Ib,Pf,null],TextShader:[Jb,Qf,null],Tessellator:[Kb,Rf,null],Texture:[Lb,Sf,null],Grids:[Mb,Tf,null],Layer:[Nb,Uf,null],DomainValue:[Ob,Vf,null],LayerManager:[Pb,Wf,null],LayerMap:[Qb,Xf,null],LayerUI:[Rb,Yf,null],LayerUIMenuItem:[Sb,Zf,null],LayerUITreeNode:[Tb,$f,null],Orbit:[Ub,_f,null],ReferenceFrame:[Vb,ag,null],KmlCoordinate:[Wb,bg,null],KmlLineList:[Xb,cg,null],Planets:[Zb,eg,null],RenderContext:[$b,fg,null],RenderTriangle:[_b,gg,null],ScriptInterface:[ac,hg,null],Settings:[bc,ig,null,b],Text3dBatch:[cc,jg,null],GlyphItem:[dc,kg,null],GlyphCache:[ec,lg,null,ss.IDisposable],Text3d:[fc,mg,null],SpaceTimeController:[gc,ng,null],Star:[hc,og,null],Tile:[ic,pg,null],Tour:[lc,sg,null,d],SettingParameter:[mc,tg,null],Overlay:[nc,ug,null],TextObject:[oc,vg,null],TourDocument:[pc,wg,null],TourPlayer:[qc,xg,null,f],MasterTime:[rc,yg,null],TourStop:[sc,zg,null,b],LayerInfo:[tc,Ag,null],UiTools:[vc,Cg,null],Rectangle:[xc,Eg,null],Guid:[yc,Fg,null],Mouse:[zc,null,null],VizLayer:[Ac,Gg,null],DataItem:[Bc,Hg,null],WebFile:[Cc,Ig,null],WWTControl:[Ec,Kg,null],WWTElementEvent:[Fc,Lg,null],Annotation:[Gc,Mg,null],BlendState:[Hc,Ng,null],CameraParameters:[Ic,Og,null],Color:[Jc,Pg,null],Colors:[Kc,Qg,null],Constellations:[Lc,Rg,null],Lineset:[Mc,Sg,null],Linepoint:[Nc,Tg,null],ConstellationFilter:[Oc,Ug,null],Coordinates:[Pc,Vg,null],PositionTexture:[Qc,Wg,null],PositionColoredTextured:[Rc,Xg,null],Vector3d:[Sc,Yg,null],Vector2d:[Tc,Zg,null],Matrix3d:[Uc,$g,null],Matrix2d:[Vc,_g,null],DoubleUtilities:[Wc,null,null],PlaneD:[Xc,ah,null],Vector4d:[Yc,bh,null],PositionNormalTexturedX2:[Zc,ch,null],SphereHull:[$c,dh,null],ConvexHull:[_c,eh,null],Folder:[ad,fh,null,d],FolderBrowser:[bd,gh,null],Imageset:[dd,ih,null,d],ViewMoverKenBurnsStyle:[ed,jh,null,g],Place:[hd,lh,null,d,e],Class1:[id,mh,null],GreatCirlceRouteLayer:[jd,nh,Nb],ImageSetLayer:[kd,oh,Nb],TimeSeriesLayer:[md,qh,Nb],PlotTile:[nd,rh,ic],SkyImageTile:[od,sh,ic],TangentTile:[pd,th,ic],ToastTile:[qd,uh,ic],BitmapOverlay:[rd,vh,nc],TextOverlay:[sd,wh,nc],ShapeOverlay:[td,xh,nc],AudioOverlay:[ud,yh,nc],FlipbookOverlay:[vd,zh,nc],Circle:[wd,Ah,Gc],Poly:[xd,Bh,Gc],PolyLine:[yd,Ch,Gc],EquirectangularTile:[zd,Dh,ic],MercatorTile:[Ad,Eh,ic],SlideChangedEventArgs:[Cd,Gh,ss.EventArgs],ArrivedEventArgs:[Dd,Hh,ss.EventArgs],AnnotationClickEventArgs:[Ed,Ih,ss.EventArgs],CollectionLoadedEventArgs:[Fd,Jh,ss.EventArgs]});return h.g_ACft=[new j(0,1,0,0,0,0,0,0,0,0,0,-1719914,-2,-25,0,25,-13,1578089,156,10,32,684185,-358),new j(0,2,0,0,0,0,0,0,0,0,0,6434,141,28007,-107,25697,-95,-5904,-130,11141,-48,-2559,-55),new j(0,0,0,1,0,0,0,0,0,0,0,715,0,0,0,6,0,-657,0,-15,0,-282,0),new j(0,0,0,0,0,0,0,1,0,0,0,715,0,0,0,0,0,-656,0,0,0,-285,0),new j(0,3,0,0,0,0,0,0,0,0,0,486,-5,-236,-4,-216,-4,-446,5,-94,0,-193,0),new j(0,0,0,0,1,0,0,0,0,0,0,159,0,0,0,2,0,-147,0,-6,0,-61,0),new j(0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,26,0,0,0,-59,0),new j(0,0,0,0,0,0,0,1,0,1,0,39,0,0,0,0,0,-36,0,0,0,-16,0),new j(0,0,0,2,0,0,0,0,0,0,0,33,0,-10,0,-9,0,-30,0,-5,0,-13,0),new j(0,2,0,-1,0,0,0,0,0,0,0,31,0,1,0,1,0,-28,0,0,0,-12,0),new j(0,3,-8,3,0,0,0,0,0,0,0,8,0,-28,0,25,0,8,0,11,0,3,0),new j(0,5,-8,3,0,0,0,0,0,0,0,8,0,-28,0,-25,0,-8,0,-11,0,-3,0),new j(2,-1,0,0,0,0,0,0,0,0,0,21,0,0,0,0,0,-19,0,0,0,-8,0),new j(1,0,0,0,0,0,0,0,0,0,0,-19,0,0,0,0,0,17,0,0,0,8,0),new j(0,0,0,0,0,1,0,0,0,0,0,17,0,0,0,0,0,-16,0,0,0,-7,0),new j(0,1,0,-2,0,0,0,0,0,0,0,16,0,0,0,0,0,15,0,1,0,7,0),new j(0,0,0,0,0,0,1,0,0,0,0,16,0,0,0,1,0,-15,0,-3,0,-6,0),new j(0,1,0,1,0,0,0,0,0,0,0,11,0,-1,0,-1,0,-10,0,-1,0,-5,0),new j(2,-2,0,0,0,0,0,0,0,0,0,0,0,-11,0,-10,0,0,0,-4,0,0,0),new j(0,1,0,-1,0,0,0,0,0,0,0,-11,0,-2,0,-2,0,9,0,-1,0,4,0),new j(0,4,0,0,0,0,0,0,0,0,0,-7,0,-8,0,-8,0,6,0,-3,0,3,0),new j(0,3,0,-2,0,0,0,0,0,0,0,-10,0,0,0,0,0,9,0,0,0,4,0),new j(1,-2,0,0,0,0,0,0,0,0,0,-9,0,0,0,0,0,-9,0,0,0,-4,0),new j(2,-3,0,0,0,0,0,0,0,0,0,-9,0,0,0,0,0,-8,0,0,0,-4,0),new j(0,0,0,0,2,0,0,0,0,0,0,0,0,-9,0,-8,0,0,0,-3,0,0,0),new j(2,-4,0,0,0,0,0,0,0,0,0,0,0,-9,0,8,0,0,0,3,0,0,0),new j(0,3,-2,0,0,0,0,0,0,0,0,8,0,0,0,0,0,-8,0,0,0,-3,0),new j(0,0,0,0,0,0,0,1,2,-1,0,8,0,0,0,0,0,-7,0,0,0,-3,0),new j(8,-12,0,0,0,0,0,0,0,0,0,-4,0,-7,0,-6,0,4,0,-3,0,2,0),new j(8,-14,0,0,0,0,0,0,0,0,0,-4,0,-7,0,6,0,-4,0,3,0,-2,0),new j(0,0,2,0,0,0,0,0,0,0,0,-6,0,-5,0,-4,0,5,0,-2,0,2,0),new j(3,-4,0,0,0,0,0,0,0,0,0,-1,0,-1,0,-2,0,-7,0,1,0,-4,0),new j(0,2,0,-2,0,0,0,0,0,0,0,4,0,-6,0,-5,0,-4,0,-2,0,-2,0),new j(3,-3,0,0,0,0,0,0,0,0,0,0,0,-7,0,-6,0,0,0,-3,0,0,0),new j(0,2,-2,0,0,0,0,0,0,0,0,5,0,-5,0,-4,0,-5,0,-2,0,-2,0),new j(0,0,0,0,0,0,0,1,-2,0,0,5,0,0,0,0,0,-5,0,0,0,-2,0)],h.deltaTTable=[121,112,103,95,88,82,77,72,68,63,60,56,53,51,48,46,44,42,40,38,35,33,31,29,26,24,22,20,18,16,14,12,11,10,9,8,7,7,7,7,7,7,8,8,9,9,9,9,9,10,10,10,10,10,10,10,10,11,11,11,11,11,12,12,12,12,13,13,13,14,14,14,14,15,15,15,15,15,16,16,16,16,16,16,16,16,15,15,14,13,13.1,12.5,12.2,12,12,12,12,12,12,11.9,11.6,11,10.2,9.2,8.2,7.1,6.2,5.6,5.4,5.3,5.4,5.6,5.9,6.2,6.5,6.8,7.1,7.3,7.5,7.6,7.7,7.3,6.2,5.2,2.7,1.4,-1.2,-2.8,-3.8,-4.8,-5.5,-5.3,-5.6,-5.7,-5.9,-6,-6.3,-6.5,-6.2,-4.7,-2.8,-.1,2.6,5.3,7.7,10.4,13.3,16,18.2,20.2,21.2,22.4,23.5,23.8,24.3,24,23.9,23.9,23.7,24,24.3,25.3,26.2,27.3,28.2,29.1,30,30.7,31.4,32.2,33.1,34,35,36.5,38.3,40.18,42.2,44.5,46.5,48.5,50.54,52.2,53.8,54.9,55.8,56.86,58.31,59.99,61.63,62.97],h.g_L0EarthCoefficients=[new s(175347046,0,0),new s(3341656,4.6692568,6283.07585),new s(34894,4.6261,12566.1517),new s(3497,2.7441,5753.3849),new s(3418,2.8289,3.5231),new s(3136,3.6277,77713.7715),new s(2676,4.4181,7860.4194),new s(2343,6.1352,3930.2097),new s(1324,.7425,11506.7698),new s(1273,2.0371,529.691),new s(1199,1.1096,1577.3435),new s(990,5.233,5884.927),new s(902,2.045,26.298),new s(857,3.508,398.149),new s(780,1.179,5223.694),new s(753,2.533,5507.553),new s(505,4.583,18849.228),new s(492,4.205,775.523),new s(357,2.92,.067),new s(317,5.849,11790.629),new s(284,1.899,796.288),new s(271,.315,10977.079),new s(243,.345,5486.778),new s(206,4.806,2544.314),new s(205,1.869,5573.143),new s(202,2.458,6069.777),new s(156,.833,213.299),new s(132,3.411,2942.463),new s(126,1.083,20.775),new s(115,.645,.98),new s(103,.636,4694.003),new s(102,.976,15720.839),new s(102,4.267,7.114),new s(99,6.21,2146.17),new s(98,.68,155.42),new s(86,5.98,161000.69),new s(85,1.3,6275.96),new s(85,3.67,71430.7),new s(80,1.81,17260.15),new s(79,3.04,12036.46),new s(75,1.76,5088.63),new s(74,3.5,3154.69),new s(74,4.68,801.82),new s(70,.83,9437.76),new s(62,3.98,8827.39),new s(61,1.82,7084.9),new s(57,2.78,6286.6),new s(56,4.39,14143.5),new s(56,3.47,6279.55),new s(52,.19,12139.55),new s(52,1.33,1748.02),new s(51,.28,5856.48),new s(49,.49,1194.45),new s(41,5.37,8429.24),new s(41,2.4,19651.05),new s(39,6.17,10447.39),new s(37,6.04,10213.29),new s(37,2.57,1059.38),new s(36,1.71,2352.87),new s(36,1.78,6812.77),new s(33,.59,17789.85),new s(30,.44,83996.85),new s(30,2.74,1349.87),new s(25,3.16,4690.48)],h.g_L1EarthCoefficients=[new s(628331966747,0,0),new s(206059,2.678235,6283.07585),new s(4303,2.6351,12566.1517),new s(425,1.59,3.523),new s(119,5.796,26.298),new s(109,2.966,1577.344),new s(93,2.59,18849.23),new s(72,1.14,529.69),new s(68,1.87,398.15),new s(67,4.41,5507.55),new s(59,2.89,5223.69),new s(56,2.17,155.42),new s(45,.4,796.3),new s(36,.47,775.52),new s(29,2.65,7.11),new s(21,5.43,.98),new s(19,1.85,5486.78),new s(19,4.97,213.3),new s(17,2.99,6275.96),new s(16,.03,2544.31),new s(16,1.43,2146.17),new s(15,1.21,10977.08),new s(12,2.83,1748.02),new s(12,3.26,5088.63),new s(12,5.27,1194.45),new s(12,2.08,4694),new s(11,.77,553.57),new s(10,1.3,6286.6),new s(10,4.24,1349.87),new s(9,2.7,242.73),new s(9,5.64,951.72),new s(8,5.3,2352.87),new s(6,2.65,9437.76),new s(6,4.67,4690.48)],h.g_L2EarthCoefficients=[new s(52919,0,0),new s(8720,1.0721,6283.0758),new s(309,.867,12566.152),new s(27,.05,3.52),new s(16,5.19,26.3),new s(16,3.68,155.42),new s(10,.76,18849.23),new s(9,2.06,77713.77),new s(7,.83,775.52),new s(5,4.66,1577.34),new s(4,1.03,7.11),new s(4,3.44,5573.14),new s(3,5.14,796.3),new s(3,6.05,5507.55),new s(3,1.19,242.73),new s(3,6.12,529.69),new s(3,.31,398.15),new s(3,2.28,553.57),new s(2,4.38,5223.69),new s(2,3.75,.98)],h.g_L3EarthCoefficients=[new s(289,5.844,6283.076),new s(35,0,0),new s(17,5.49,12566.15),new s(3,5.2,155.42),new s(1,4.72,3.52),new s(1,5.3,18849.23),new s(1,5.97,242.73)],h.g_L4EarthCoefficients=[new s(114,3.142,0),new s(8,4.13,6283.08),new s(1,3.84,12566.15)],h.g_L5EarthCoefficients=[new s(1,3.14,0)],h.g_B0EarthCoefficients=[new s(280,3.199,84334.662),new s(102,5.422,5507.553),new s(80,3.88,5223.69),new s(44,3.7,2352.87),new s(32,4,1577.34)],h.g_B1EarthCoefficients=[new s(9,3.9,5507.55),new s(6,1.73,5223.69)],h.g_B2EarthCoefficients=[new s(22378,3.38509,10213.28555),new s(282,0,0),new s(173,5.256,20426.571),new s(27,3.87,30639.86)],h.g_B3EarthCoefficients=[new s(647,4.992,10213.286),new s(20,3.14,0),new s(6,.77,20426.57),new s(3,5.44,30639.86)],h.g_B4EarthCoefficients=[new s(14,.32,10213.29)],h.g_R0EarthCoefficients=[new s(100013989,0,0),new s(1670700,3.0984635,6283.07585),new s(13956,3.05525,12566.1517),new s(3084,5.1985,77713.7715),new s(1628,1.1739,5753.3849),new s(1576,2.8469,7860.4194),new s(925,5.453,11506.77),new s(542,4.564,3930.21),new s(472,3.661,5884.927),new s(346,.964,5507.553),new s(329,5.9,5223.694),new s(307,.299,5573.143),new s(243,4.273,11790.629),new s(212,5.847,1577.344),new s(186,5.022,10977.079),new s(175,3.012,18849.228),new s(110,5.055,5486.778),new s(98,.89,6069.78),new s(86,5.69,15720.84),new s(86,1.27,161000.69),new s(65,.27,17260.15),new s(63,.92,529.69),new s(57,2.01,83996.85),new s(56,5.24,71430.7),new s(49,3.25,2544.31),new s(47,2.58,775.52),new s(45,5.54,9437.76),new s(43,6.01,6275.96),new s(39,5.36,4694),new s(38,2.39,8827.39),new s(37,.83,19651.05),new s(37,4.9,12139.55),new s(36,1.67,12036.46),new s(35,1.84,2942.46),new s(33,.24,7084.9),new s(32,.18,5088.63),new s(32,1.78,398.15),new s(28,1.21,6286.6),new s(28,1.9,6279.55),new s(26,4.59,10447.39)],h.g_R1EarthCoefficients=[new s(103019,1.10749,6283.07585),new s(1721,1.0644,12566.1517),new s(702,3.142,0),new s(32,1.02,18849.23),new s(31,2.84,5507.55),new s(25,1.32,5223.69),new s(18,1.42,1577.34),new s(10,5.91,10977.08),new s(9,1.42,6275.96),new s(9,.27,5486.78)],h.g_R2EarthCoefficients=[new s(4359,5.7846,6283.0758),new s(124,5.579,12566.152),new s(12,3.14,0),new s(9,3.63,77713.77),new s(6,1.87,5573.14),new s(3,5.47,18849.23)],h.g_R3EarthCoefficients=[new s(145,4.273,6283.076),new s(7,3.92,12566.15)],h.g_R4EarthCoefficients=[new s(4,2.56,6283.08)],h.g_L1EarthCoefficientsJ2000=[new s(628307584999,0,0),new s(206059,2.678235,6283.07585),new s(4303,2.6351,12566.1517),new s(425,1.59,3.523),new s(119,5.796,26.298),new s(109,2.966,1577.344),new s(93,2.59,18849.23),new s(72,1.14,529.69),new s(68,1.87,398.15),new s(67,4.41,5507.55),new s(59,2.89,5223.69),new s(56,2.17,155.42),new s(45,.4,796.3),new s(36,.47,775.52),new s(29,2.65,7.11),new s(21,5.43,.98),new s(19,1.85,5486.78),new s(19,4.97,213.3),new s(17,2.99,6275.96),new s(16,.03,2544.31),new s(16,1.43,2146.17),new s(15,1.21,10977.08),new s(12,2.83,1748.02),new s(12,3.26,5088.63),new s(12,5.27,1194.45),new s(12,2.08,4694),new s(11,.77,553.57),new s(10,1.3,6286.6),new s(10,4.24,1349.87),new s(9,2.7,242.73),new s(9,5.64,951.72),new s(8,5.3,2352.87),new s(6,2.65,9437.76),new s(6,4.67,4690.48)],h.g_L2EarthCoefficientsJ2000=[new s(8722,1.0725,6283.0758),new s(991,3.1416,0),new s(295,.437,12566.152),new s(27,.05,3.52),new s(16,5.19,26.3),new s(16,3.69,155.42),new s(9,.3,18849.23),new s(9,2.06,77713.77),new s(7,.83,775.52),new s(5,4.66,1577.34),new s(4,1.03,7.11),new s(4,3.44,5573.14),new s(3,5.14,796.3),new s(3,6.05,5507.55),new s(3,1.19,242.73),new s(3,6.12,529.69),new s(3,.3,398.15),new s(3,2.28,553.57),new s(2,4.38,5223.69),new s(2,3.75,.98)],h.g_L3EarthCoefficientsJ2000=[new s(289,5.842,6283.076),new s(21,6.05,12566.15),new s(3,5.2,155.42),new s(3,3.14,0),new s(1,4.72,3.52),new s(1,5.97,242.73),new s(1,5.54,18849.23)],h.g_L4EarthCoefficientsJ2000=[new s(8,4.14,6283.08),new s(1,3.28,12566.15)],h.g_B1EarthCoefficientsJ2000=[new s(227778,3.413766,6283.07585),new s(3806,3.3706,12566.1517),new s(3620,0,0),new s(72,3.33,18849.23),new s(8,3.89,5507.55),new s(8,1.79,5223.69),new s(6,5.2,2352.87)],h.g_B2EarthCoefficientsJ2000=[new s(9721,5.1519,6283.07585),new s(233,3.1416,0),new s(134,.644,12566.152),new s(7,1.07,18849.23)],h.g_B3EarthCoefficientsJ2000=[new s(276,.595,6283.076),new s(17,3.14,0),new s(4,.12,12566.15)],h.g_B4EarthCoefficientsJ2000=[new s(6,2.27,6283.08),new s(1,0,0)],h.g_L0JupiterCoefficients=[new s(59954691,0,0),new s(9695899,5.0619179,529.6909651),new s(573610,1.444062,7.113547),new s(306389,5.417347,1059.38193),new s(97178,4.14265,632.78374),new s(72903,3.64043,522.57742),new s(64264,3.41145,103.09277),new s(39806,2.29377,419.48464),new s(38858,1.27232,316.39187),new s(27965,1.78455,536.80451),new s(13590,5.77481,1589.0729),new s(8769,3.63,949.1756),new s(8246,3.5823,206.1855),new s(7368,5.081,735.8765),new s(6263,.025,213.2991),new s(6114,4.5132,1162.4747),new s(5305,4.1863,1052.2684),new s(5305,1.3067,14.2271),new s(4905,1.3208,110.2063),new s(4647,4.6996,3.9322),new s(3045,4.3168,426.5982),new s(2610,1.5667,846.0828),new s(2028,1.0638,3.1814),new s(1921,.9717,639.8973),new s(1765,2.1415,1066.4955),new s(1723,3.8804,1265.5675),new s(1633,3.582,515.4639),new s(1432,4.2968,625.6702),new s(973,4.098,95.979),new s(884,2.437,412.371),new s(733,6.085,838.969),new s(731,3.806,1581.959),new s(709,1.293,742.99),new s(692,6.134,2118.764),new s(614,4.109,1478.867),new s(582,4.54,309.278),new s(495,3.756,323.505),new s(441,2.958,454.909),new s(417,1.036,2.488),new s(390,4.897,1692.166),new s(376,4.703,1368.66),new s(341,5.715,533.623),new s(330,4.74,.048),new s(262,1.877,.963),new s(261,.82,380.128),new s(257,3.724,199.072),new s(244,5.22,728.763),new s(235,1.227,909.819),new s(220,1.651,543.918),new s(207,1.855,525.759),new s(202,1.807,1375.774),new s(197,5.293,1155.361),new s(175,3.73,942.062),new s(175,3.226,1898.351),new s(175,5.91,956.289),new s(158,4.365,1795.258),new s(151,3.906,74.782),new s(149,4.377,1685.052),new s(141,3.136,491.558),new s(138,1.318,1169.588),new s(131,4.169,1045.155),new s(117,2.5,1596.186),new s(117,3.389,.521),new s(106,4.554,526.51)],h.g_L1JupiterCoefficients=[new s(52993480757,0,0),new s(489741,4.220667,529.690965),new s(228919,6.026475,7.113547),new s(27655,4.57266,1059.38193),new s(20721,5.45939,522.57742),new s(12106,.16986,536.80451),new s(6068,4.4242,103.0928),new s(5434,3.9848,419.4846),new s(4238,5.8901,14.2271),new s(2212,5.2677,206.1855),new s(1746,4.9267,1589.0729),new s(1296,5.5513,3.1814),new s(1173,5.8565,1052.2684),new s(1163,.5145,3.9322),new s(1099,5.307,515.4639),new s(1007,.4648,735.8765),new s(1004,3.1504,426.5982),new s(848,5.758,110.206),new s(827,4.803,213.299),new s(816,.586,1066.495),new s(725,5.518,639.897),new s(568,5.989,625.67),new s(474,4.132,412.371),new s(413,5.737,95.979),new s(345,4.242,632.784),new s(336,3.732,1162.475),new s(234,4.035,949.176),new s(234,6.243,309.278),new s(199,1.505,838.969),new s(195,2.219,323.505),new s(187,6.086,742.99),new s(184,6.28,543.918),new s(171,5.417,199.072),new s(131,.626,728.763),new s(115,.68,846.083),new s(115,5.286,2118.764),new s(108,4.493,956.289),new s(80,5.82,1045.15),new s(72,5.34,942.06),new s(70,5.97,532.87),new s(67,5.73,21.34),new s(66,.13,526.51),new s(65,6.09,1581.96),new s(59,.59,1155.36),new s(58,.99,1596.19),new s(57,5.97,1169.59),new s(57,1.41,533.62),new s(55,5.43,10.29),new s(52,5.73,117.32),new s(52,.23,1368.66),new s(50,6.08,525.76),new s(47,3.63,1478.87),new s(47,.51,1265.57),new s(40,4.16,1692.17),new s(34,.1,302.16),new s(33,5.04,220.41),new s(32,5.37,508.35),new s(29,5.42,1272.68),new s(29,3.36,4.67),new s(29,.76,88.87),new s(25,1.61,831.86)],h.g_L2JupiterCoefficients=[new s(47234,4.32148,7.11355),new s(38966,0,0),new s(30629,2.93021,529.69097),new s(3189,1.055,522.5774),new s(2729,4.8455,536.8045),new s(2723,3.4141,1059.3819),new s(1721,4.1873,14.2271),new s(383,5.768,419.485),new s(378,.76,515.464),new s(367,6.055,103.093),new s(337,3.786,3.181),new s(308,.694,206.186),new s(218,3.814,1589.073),new s(199,5.34,1066.495),new s(197,2.484,3.932),new s(156,1.406,1052.268),new s(146,3.814,639.897),new s(142,1.634,426.598),new s(130,5.837,412.371),new s(117,1.414,625.67),new s(97,4.03,110.21),new s(91,1.11,95.98),new s(87,2.52,632.78),new s(79,4.64,543.92),new s(72,2.22,735.88),new s(58,.83,199.07),new s(57,3.12,213.3),new s(49,1.67,309.28),new s(40,4.02,21.34),new s(40,.62,323.51),new s(36,2.33,728.76),new s(29,3.61,10.29),new s(28,3.24,838.97),new s(26,4.5,742.99),new s(26,2.51,1162.47),new s(25,1.22,1045.15),new s(24,3.01,956.29),new s(19,4.29,532.87),new s(18,.81,508.35),new s(17,4.2,2118.76),new s(17,1.83,526.51),new s(15,5.81,1596.19),new s(15,.68,942.06),new s(15,4,117.32),new s(14,5.95,316.39),new s(14,1.8,302.16),new s(13,2.52,88.87),new s(13,4.37,1169.59),new s(11,4.44,525.76),new s(10,1.72,1581.96),new s(9,2.18,1155.36),new s(9,3.29,220.41),new s(9,3.32,831.86),new s(8,5.76,846.08),new s(8,2.71,533.62),new s(7,2.18,1265.57),new s(6,.5,949.18)],h.g_L3JupiterCoefficients=[new s(6502,2.5986,7.1135),new s(1357,1.3464,529.691),new s(471,2.475,14.227),new s(417,3.245,536.805),new s(353,2.974,522.577),new s(155,2.076,1059.382),new s(87,2.51,515.46),new s(44,0,0),new s(34,3.83,1066.5),new s(28,2.45,206.19),new s(24,1.28,412.37),new s(23,2.98,543.92),new s(20,2.1,639.9),new s(20,1.4,419.48),new s(19,1.59,103.09),new s(17,2.3,21.34),new s(17,2.6,1589.07),new s(16,3.15,625.67),new s(16,3.36,1052.27),new s(13,2.76,95.98),new s(13,2.54,199.07),new s(13,6.27,426.6),new s(9,1.76,10.29),new s(9,2.27,110.21),new s(7,3.43,309.28),new s(7,4.04,728.76),new s(6,2.52,508.35),new s(5,2.91,1045.15),new s(5,5.25,323.51),new s(4,4.3,88.87),new s(4,3.52,302.16),new s(4,4.09,735.88),new s(3,1.43,956.29),new s(3,4.36,1596.19),new s(3,1.25,213.3),new s(3,5.02,838.97),new s(3,2.24,117.32),new s(2,2.9,742.99),new s(2,2.36,942.06)],h.g_L4JupiterCoefficients=[new s(669,.853,7.114),new s(114,3.142,0),new s(100,.743,14.227),new s(50,1.65,536.8),new s(44,5.82,529.69),new s(32,4.86,522.58),new s(15,4.29,515.46),new s(9,.71,1059.38),new s(5,1.3,543.92),new s(4,2.32,1066.5),new s(4,.48,21.34),new s(3,3,412.37),new s(2,.4,639.9),new s(2,4.26,199.07),new s(2,4.91,625.67),new s(2,4.26,206.19),new s(1,5.26,1052.27),new s(1,4.72,95.98),new s(1,1.29,1589.07)],h.g_L5JupiterCoefficients=[new s(50,5.26,7.11),new s(16,5.25,14.23),new s(4,.01,536.8),new s(2,1.1,522.58),new s(1,3.14,0)],h.g_B0JupiterCoefficients=[new s(2268616,3.5585261,529.6909651),new s(110090,0,0),new s(109972,3.908093,1059.38193),new s(8101,3.6051,522.5774),new s(6438,.3063,536.8045),new s(6044,4.2588,1589.0729),new s(1107,2.9853,1162.4747),new s(944,1.675,426.598),new s(942,2.936,1052.268),new s(894,1.754,7.114),new s(836,5.179,103.093),new s(767,2.155,632.784),new s(684,3.678,213.299),new s(629,.643,1066.495),new s(559,.014,846.083),new s(532,2.703,110.206),new s(464,1.173,949.176),new s(431,2.608,419.485),new s(351,4.611,2118.764),new s(132,4.778,742.99),new s(123,3.35,1692.166),new s(116,1.387,323.505),new s(115,5.049,316.392),new s(104,3.701,515.464),new s(103,2.319,1478.867),new s(102,3.153,1581.959)],h.g_B1JupiterCoefficients=[new s(177352,5.701665,529.690965),new s(3230,5.7794,1059.3819),new s(3081,5.4746,522.5774),new s(2212,4.7348,536.8045),new s(1694,3.1416,0),new s(346,4.746,1052.268),new s(234,5.189,1066.495),new s(196,6.186,7.114),new s(150,3.927,1589.073),new s(114,3.439,632.784),new s(97,2.91,949.18),new s(82,5.08,1162.47),new s(77,2.51,103.09),new s(77,.61,419.48),new s(74,5.5,515.46),new s(61,5.45,213.3),new s(50,3.95,735.88),new s(46,.54,110.21),new s(45,1.9,846.08),new s(37,4.7,543.92),new s(36,6.11,316.39),new s(32,4.92,1581.96)],h.g_B2JupiterCoefficients=[new s(8094,1.4632,529.691),new s(813,3.1416,0),new s(742,.957,522.577),new s(399,2.899,536.805),new s(342,1.447,1059.382),new s(74,.41,1052.27),new s(46,3.48,1066.5),new s(30,1.93,1589.07),new s(29,.99,515.46),new s(23,4.27,7.11),new s(14,2.92,543.92),new s(12,5.22,632.78),new s(11,4.88,949.18),new s(6,6.21,1045.15)],h.g_B3JupiterCoefficients=[new s(252,3.381,529.691),new s(122,2.733,522.577),new s(49,1.04,536.8),new s(11,2.31,1052.27),new s(8,2.77,515.46),new s(7,4.25,1059.38),new s(6,1.78,1066.5),new s(4,1.13,543.92),new s(3,3.14,0)],h.g_B4JupiterCoefficients=[new s(15,4.53,522.58),new s(5,4.47,529.69),new s(4,5.44,536.8),new s(3,0,0),new s(2,4.52,515.46),new s(1,4.2,1052.27)],h.g_B5JupiterCoefficients=[new s(1,.09,522.58)],h.g_R0JupiterCoefficients=[new s(520887429,0,0),new s(25209327,3.4910864,529.69096509),new s(610600,3.841154,1059.38193),new s(282029,2.574199,632.783739),new s(187647,2.075904,522.577418),new s(86793,.71001,419.48464),new s(72063,.21466,536.80451),new s(65517,5.97996,316.39187),new s(30135,2.16132,949.17561),new s(29135,1.67759,103.09277),new s(23947,.27458,7.11355),new s(23453,3.54023,735.87651),new s(22284,4.19363,1589.0729),new s(13033,2.96043,1162.4747),new s(12749,2.7155,1052.26838),new s(9703,1.9067,206.1855),new s(9161,4.4135,213.2991),new s(7895,2.4791,426.5982),new s(7058,2.1818,1265.5675),new s(6138,6.2642,846.0828),new s(5477,5.6573,639.8973),new s(4170,2.0161,515.4639),new s(4137,2.7222,625.6702),new s(3503,.5653,1066.4955),new s(2617,2.0099,1581.9593),new s(2500,4.5518,838.9693),new s(2128,6.1275,742.9901),new s(1912,.8562,412.3711),new s(1611,3.0887,1368.6603),new s(1479,2.6803,1478.8666),new s(1231,1.8904,323.5054),new s(1217,1.8017,110.2063),new s(1015,1.3867,454.9094),new s(999,2.872,309.278),new s(961,4.549,2118.764),new s(886,4.148,533.623),new s(821,1.593,1898.351),new s(812,5.941,909.819),new s(777,3.677,728.763),new s(727,3.988,1155.361),new s(655,2.791,1685.052),new s(654,3.382,1692.166),new s(621,4.823,956.289),new s(615,2.276,942.062),new s(562,.081,543.918),new s(542,.284,525.759)],h.g_R1JupiterCoefficients=[new s(1271802,2.6493751,529.6909651),new s(61662,3.00076,1059.38193),new s(53444,3.89718,522.57742),new s(41390,0,0),new s(31185,4.88277,536.80451),new s(11847,2.4133,419.48464),new s(9166,4.7598,7.1135),new s(3404,3.3469,1589.0729),new s(3203,5.2108,735.8765),new s(3176,2.793,103.0928),new s(2806,3.7422,515.4639),new s(2677,4.3305,1052.2684),new s(2600,3.6344,206.1855),new s(2412,1.4695,426.5982),new s(2101,3.9276,639.8973),new s(1646,4.4163,1066.4955),new s(1641,4.4163,625.6702),new s(1050,3.1611,213.2991),new s(1025,2.5543,412.3711),new s(806,2.678,632.784),new s(741,2.171,1162.475),new s(677,6.25,838.969),new s(567,4.577,742.99),new s(485,2.469,949.176),new s(469,4.71,543.918),new s(445,.403,323.505),new s(416,5.368,728.763),new s(402,4.605,309.278),new s(347,4.681,14.227),new s(338,3.168,956.289),new s(261,5.343,846.083),new s(247,3.923,942.062),new s(220,4.842,1368.66),new s(203,5.6,1155.361),new s(200,4.439,1045.155),new s(197,3.706,2118.764),new s(196,3.759,199.072),new s(184,4.265,95.979),new s(180,4.402,532.872),new s(170,4.846,526.51),new s(146,6.13,533.623),new s(133,1.322,110.206),new s(132,4.512,525.759)],h.g_R2JupiterCoefficients=[new s(79645,1.35866,529.69097),new s(8252,5.7777,522.5774),new s(7030,3.2748,536.8045),new s(5314,1.8384,1059.3819),new s(1861,2.9768,7.1135),new s(964,5.48,515.464),new s(836,4.199,419.485),new s(498,3.142,0),new s(427,2.228,639.897),new s(406,3.783,1066.495),new s(377,2.242,1589.073),new s(363,5.368,206.186),new s(342,6.099,1052.268),new s(339,6.127,625.67),new s(333,.003,426.598),new s(280,4.262,412.371),new s(257,.963,632.784),new s(230,.705,735.877),new s(201,3.069,543.918),new s(200,4.429,103.093),new s(139,2.932,14.227),new s(114,.787,728.763),new s(95,1.7,838.97),new s(86,5.14,323.51),new s(83,.06,309.28),new s(80,2.98,742.99),new s(75,1.6,956.29),new s(70,1.51,213.3),new s(67,5.47,199.07),new s(62,6.1,1045.15),new s(56,.96,1162.47),new s(52,5.58,942.06),new s(50,2.72,532.87),new s(45,5.52,508.35),new s(44,.27,526.51),new s(40,5.95,95.98)],h.g_R3JupiterCoefficients=[new s(3519,6.058,529.691),new s(1073,1.6732,536.8045),new s(916,1.413,522.577),new s(342,.523,1059.382),new s(255,1.196,7.114),new s(222,.952,515.464),new s(90,3.14,0),new s(69,2.27,1066.5),new s(58,1.41,543.92),new s(58,.53,639.9),new s(51,5.98,412.37),new s(47,1.58,625.67),new s(43,6.12,419.48),new s(37,1.18,14.23),new s(34,1.67,1052.27),new s(34,.85,206.19),new s(31,1.04,1589.07),new s(30,4.63,426.6),new s(21,2.5,728.76),new s(15,.89,199.07),new s(14,.96,508.35),new s(13,1.5,1045.15),new s(12,2.61,735.88),new s(12,3.56,323.51),new s(11,1.79,309.28),new s(11,6.28,956.29),new s(10,6.26,103.09),new s(9,3.45,838.97)],h.g_R4JupiterCoefficients=[new s(129,.084,536.805),new s(113,4.249,529.691),new s(83,3.3,522.58),new s(38,2.73,515.46),new s(27,5.69,7.11),new s(18,5.4,1059.38),new s(13,6.02,543.92),new s(9,.77,1066.5),new s(8,5.68,14.23),new s(7,1.43,412.37),new s(6,5.12,639.9),new s(5,3.34,625.67),new s(3,3.4,1052.27),new s(3,4.16,728.76),new s(3,2.9,426.6)],h.g_R5JupiterCoefficients=[new s(11,4.75,536.8),new s(4,5.92,522.58),new s(2,5.57,515.46),new s(2,4.3,543.92),new s(2,3.69,7.11),new s(2,4.13,1059.38),new s(2,5.49,1066.5)],h.g_L0MarsCoefficients=[new s(620347712,0,0),new s(18656368,5.050371,3340.6124267),new s(1108217,5.4009984,6681.2248534),new s(91798,5.75479,10021.83728),new s(27745,5.9705,3.52312),new s(12316,.84956,2810.92146),new s(10610,2.93959,2281.2305),new s(8927,4.157,.0173),new s(8716,6.1101,13362.4497),new s(7775,3.3397,5621.8429),new s(6798,.3646,398.149),new s(4161,.2281,2942.4634),new s(3575,1.6619,2544.3144),new s(3075,.857,191.4483),new s(2938,6.0789,.0673),new s(2628,.6481,3337.0893),new s(2580,.03,3344.1355),new s(2389,5.039,796.298),new s(1799,.6563,529.691),new s(1546,2.9158,1751.5395),new s(1528,1.1498,6151.5339),new s(1286,3.068,2146.1654),new s(1264,3.6228,5092.152),new s(1025,3.6933,8962.4553),new s(892,.183,16703.062),new s(859,2.401,2914.014),new s(833,4.495,3340.63),new s(833,2.464,3340.595),new s(749,3.822,155.42),new s(724,.675,3738.761),new s(713,3.663,1059.382),new s(655,.489,3127.313),new s(636,2.922,8432.764),new s(553,4.475,1748.016),new s(550,3.81,.98),new s(472,3.625,1194.447),new s(426,.554,6283.076),new s(415,.497,213.299),new s(312,.999,6677.702),new s(307,.381,6684.748),new s(302,4.486,3532.061),new s(299,2.783,6254.627),new s(293,4.221,20.775),new s(284,5.769,3149.164),new s(281,5.882,1349.867),new s(274,.542,3340.545),new s(274,.134,3340.68),new s(239,5.372,4136.91),new s(236,5.755,3333.499),new s(231,1.282,3870.303),new s(221,3.505,382.897),new s(204,2.821,1221.849),new s(193,3.357,3.59),new s(189,1.491,9492.146),new s(179,1.006,951.718),new s(174,2.414,553.569),new s(172,.439,5486.778),new s(160,3.949,4562.461),new s(144,1.419,135.065),new s(140,3.326,2700.715),new s(138,4.301,7.114),new s(131,4.045,12303.068),new s(128,2.208,1592.596),new s(128,1.807,5088.629),new s(117,3.128,7903.073),new s(113,3.701,1589.073),new s(110,1.052,242.729),new s(105,.785,8827.39),new s(100,3.243,11773.377)],h.g_L1MarsCoefficients=[new s(334085627474,0,0),new s(1458227,3.6042605,3340.6124267),new s(164901,3.926313,6681.224853),new s(19963,4.26594,10021.83728),new s(3452,4.7321,3.5231),new s(2485,4.6128,13362.4497),new s(842,4.459,2281.23),new s(538,5.016,398.149),new s(521,4.994,3344.136),new s(433,2.561,191.448),new s(430,5.316,155.42),new s(382,3.539,796.298),new s(314,4.963,16703.062),new s(283,3.16,2544.314),new s(206,4.569,2146.165),new s(169,1.329,3337.089),new s(158,4.185,1751.54),new s(134,2.233,.98),new s(134,5.974,1748.016),new s(118,6.024,6151.534),new s(117,2.213,1059.382),new s(114,2.129,1194.447),new s(114,5.428,3738.761),new s(91,1.1,1349.87),new s(85,3.91,553.57),new s(83,5.3,6684.75),new s(81,4.43,529.69),new s(80,2.25,8962.46),new s(73,2.5,951.72),new s(73,5.84,242.73),new s(71,3.86,2914.01),new s(68,5.02,382.9),new s(65,1.02,3340.6),new s(65,3.05,3340.63),new s(62,4.15,3149.16),new s(57,3.89,4136.91),new s(48,4.87,213.3),new s(48,1.18,3333.5),new s(47,1.31,3185.19),new s(41,.71,1592.6),new s(40,2.73,7.11),new s(40,5.32,20043.67),new s(33,5.41,6283.08),new s(28,.05,9492.15),new s(27,3.89,1221.85),new s(27,5.11,2700.72)],h.g_L2MarsCoefficients=[new s(58016,2.04979,3340.61243),new s(54188,0,0),new s(13908,2.45742,6681.22485),new s(2465,2.8,10021.8373),new s(398,3.141,13362.45),new s(222,3.194,3.523),new s(121,.543,155.42),new s(62,3.49,16703.06),new s(54,3.54,3344.14),new s(34,6,2281.23),new s(32,4.14,191.45),new s(30,2,796.3),new s(23,4.33,242.73),new s(22,3.45,398.15),new s(20,5.42,553.57),new s(16,.66,.98),new s(16,6.11,2146.17),new s(16,1.22,1748.02),new s(15,6.1,3185.19),new s(14,4.02,951.72),new s(14,2.62,1349.87),new s(13,.6,1194.45),new s(12,3.86,6684.75),new s(11,4.72,2544.31),new s(10,.25,382.9),new s(9,.68,1059.38),new s(9,3.83,20043.67),new s(9,3.88,3738.76),new s(8,5.46,1751.54),new s(7,2.58,3149.16),new s(7,2.38,4136.91),new s(6,5.48,1592.6),new s(6,2.34,3097.88)],h.g_L3MarsCoefficients=[new s(1482,.4443,3340.6124),new s(662,.885,6681.225),new s(188,1.288,10021.837),new s(41,1.65,13362.45),new s(26,0,0),new s(23,2.05,155.42),new s(10,1.58,3.52),new s(8,2,16703.06),new s(5,2.82,242.73),new s(4,2.02,3344.14),new s(3,4.59,3185.19),new s(3,.65,553.57)],h.g_L4MarsCoefficients=[new s(114,3.1416,0),new s(29,5.64,6681.22),new s(24,5.14,3340.61),new s(11,6.03,10021.84),new s(3,.13,13362.45),new s(3,3.56,155.42),new s(1,.49,16703.06),new s(1,1.32,242.73)],h.g_L5MarsCoefficients=[new s(1,3.14,0),new s(1,4.04,6681.22)],h.g_B0MarsCoefficients=[new s(3197135,3.7683204,3340.6124267),new s(298033,4.10617,6681.224853),new s(289105,0,0),new s(31366,4.44651,10021.83728),new s(3484,4.7881,13362.4497),new s(443,5.026,3344.136),new s(443,5.652,3337.089),new s(399,5.131,16703.062),new s(293,3.793,2281.23),new s(182,6.136,6151.534),new s(163,4.264,529.691),new s(160,2.232,1059.382),new s(149,2.165,5621.843),new s(143,1.182,3340.595),new s(143,3.213,3340.63),new s(139,2.418,8962.455)],h.g_B1MarsCoefficients=[new s(350069,5.368478,3340.612427),new s(14116,3.14159,0),new s(9671,5.4788,6681.2249),new s(1472,3.2021,10021.8373),new s(426,3.408,13362.45),new s(102,.776,3337.089),new s(79,3.72,16703.06),new s(33,3.46,5621.84),new s(26,2.48,2281.23)],h.g_B2MarsCoefficients=[new s(16727,.60221,3340.61243),new s(4987,4.1416,0),new s(302,3.559,6681.225),new s(26,1.9,13362.45),new s(21,.92,10021.84),new s(12,2.24,3337.09),new s(8,2.25,16703.06)],h.g_B3MarsCoefficients=[new s(607,1.981,3340.612),new s(43,0,0),new s(14,1.8,6681.22),new s(3,3.45,10021.84)],h.g_B4MarsCoefficients=[new s(13,0,0),new s(11,3.46,3340.61),new s(1,.5,6681.22)],h.g_R0MarsCoefficients=[new s(153033488,0,0),new s(14184953,3.47971284,3340.6124267),new s(660776,3.817834,6681.224853),new s(46179,4.15595,10021.83728),new s(8110,5.5596,2810.9215),new s(7485,1.7724,5621.8429),new s(5523,1.3644,2281.2305),new s(3825,4.4941,13362.4497),new s(2484,4.9255,2942.4634),new s(2307,.0908,2544.3144),new s(1999,5.3606,3337.0893),new s(1960,4.7425,3344.1355),new s(1167,2.1126,5092.152),new s(1103,5.0091,398.149),new s(992,5.839,6151.534),new s(899,4.408,529.691),new s(807,2.102,1059.382),new s(798,3.448,796.298),new s(741,1.499,2146.165),new s(726,1.245,8432.764),new s(692,2.134,8962.455),new s(633,.894,3340.595),new s(633,2.924,3340.63),new s(630,1.287,1751.54),new s(574,.829,2914.014),new s(526,5.383,3738.761),new s(473,5.199,3127.313),new s(348,4.832,16703.062),new s(284,2.907,3532.061),new s(280,5.257,6283.076),new s(276,1.218,6254.627),new s(275,2.908,1748.016),new s(270,3.764,5884.927),new s(239,2.037,1194.447),new s(234,5.105,5486.778),new s(228,3.255,6872.673),new s(223,4.199,3149.164),new s(219,5.583,191.448),new s(208,5.255,3340.545),new s(208,4.846,3340.68),new s(186,5.699,6677.702),new s(183,5.081,6684.748),new s(179,4.184,3333.499),new s(176,5.953,3870.303),new s(164,3.799,4136.91)],h.g_R1MarsCoefficients=[new s(1107433,2.0325052,3340.6124267),new s(103176,2.370718,6681.224853),new s(12877,0,0),new s(10816,2.70888,10021.83728),new s(1195,3.047,13362.4497),new s(439,2.888,2281.23),new s(396,3.423,3344.136),new s(183,1.584,2544.314),new s(136,3.385,16703.062),new s(128,6.043,3337.089),new s(128,.63,1059.382),new s(127,1.954,796.298),new s(118,2.998,2146.165),new s(88,3.42,398.15),new s(83,3.86,3738.76),new s(76,4.45,6151.53),new s(72,2.76,529.69),new s(67,2.55,1751.54),new s(66,4.41,1748.02),new s(58,.54,1194.45),new s(54,.68,8962.46),new s(51,3.73,6684.75),new s(49,5.73,3340.6),new s(49,1.48,3340.63),new s(48,2.58,3149.16),new s(48,2.29,2914.01),new s(39,2.32,4136.91)],h.g_R2MarsCoefficients=[new s(44242,.47931,3340.61243),new s(8138,.87,6681.2249),new s(1275,1.2259,10021.8373),new s(187,1.573,13362.45),new s(52,3.14,0),new s(41,1.97,3344.14),new s(27,1.92,16703.06),new s(18,4.43,2281.23),new s(12,4.53,3185.19),new s(10,5.39,1059.38),new s(10,.42,796.3)],h.g_R3MarsCoefficients=[new s(1113,5.1499,3340.6124),new s(424,5.613,6681.225),new s(100,5.997,10021.837),new s(20,.08,13362.45),new s(5,3.14,0),new s(3,.43,16703.06)],h.g_R4MarsCoefficients=[new s(20,3.58,3340.61),new s(16,4.05,6681.22),new s(6,4.46,10021.84),new s(2,4.84,13362.45)],h.g_L0MercuryCoefficients=[new s(440250710,0,0),new s(40989415,1.48302034,26087.90314157),new s(5046294,4.47785449,52175.8062831),new s(855347,1.165203,78263.709425),new s(165590,4.119692,104351.612566),new s(34562,.77931,130439.51571),new s(7583,3.7135,156527.4188),new s(3560,1.512,1109.3786),new s(1803,4.1033,5661.332),new s(1726,.3583,182615.322),new s(1590,2.9951,25028.5212),new s(1365,4.5992,27197.2817),new s(1017,.8803,31749.2352),new s(714,1.541,24978.525),new s(644,5.303,21535.95),new s(451,6.05,51116.424),new s(404,3.282,208703.225),new s(352,5.242,20426.571),new s(345,2.792,15874.618),new s(343,5.765,955.6),new s(339,5.863,25558.212),new s(325,1.337,53285.185),new s(273,2.495,529.691),new s(264,3.917,57837.138),new s(260,.987,4551.953),new s(239,.113,1059.382),new s(235,.267,11322.664),new s(217,.66,13521.751),new s(209,2.092,47623.853),new s(183,2.629,27043.503),new s(182,2.434,25661.305),new s(176,4.536,51066.428),new s(173,2.452,24498.83),new s(142,3.36,37410.567),new s(138,.291,10213.286),new s(125,3.721,39609.655),new s(118,2.781,77204.327),new s(106,4.206,19804.827)],h.g_L1MercuryCoefficients=[new s(2608814706223,0,0),new s(1126008,6.2170397,26087.9031416),new s(303471,3.055655,52175.806283),new s(80538,6.10455,78263.70942),new s(21245,2.83532,104351.61257),new s(5592,5.8268,130439.5157),new s(1472,2.5185,156527.4188),new s(388,5.48,182615.322),new s(352,3.052,1109.379),new s(103,2.149,208703.225),new s(94,6.12,27197.28),new s(91,0,24978.52),new s(52,5.62,5661.33),new s(44,4.57,25028.52),new s(28,3.04,51066.43),new s(27,5.09,234791.13)],h.g_L2MercuryCoefficients=[new s(53050,0,0),new s(16904,4.69072,26087.90314),new s(7397,1.3474,52175.8063),new s(3018,4.4564,78263.7094),new s(1107,1.264,104351.6126),new s(378,4.32,130439.516),new s(123,1.069,156527.419),new s(39,4.08,182615.32),new s(15,4.63,1109.38),new s(12,.79,208703.23)],h.g_L3MercuryCoefficients=[new s(188,.035,52175.806),new s(142,3.125,26087.903),new s(97,3,78263.71),new s(44,6.02,104351.61),new s(35,0,0),new s(18,2.78,130439.52),new s(7,5.82,156527.42),new s(3,2.57,182615.32)],h.g_L4MercuryCoefficients=[new s(114,3.1416,0),new s(2,2.03,26087.9),new s(2,1.42,78263.71),new s(2,4.5,52175.81),new s(1,4.5,104351.61),new s(1,1.27,130439.52)],h.g_L5MercuryCoefficients=[new s(1,3.14,0)],h.g_B0MercuryCoefficients=[new s(11737529,1.98357499,26087.90314157),new s(2388077,5.0373896,52175.8062831),new s(1222840,3.1415927,0),new s(543252,1.796444,78263.709425),new s(129779,4.832325,104351.612566),new s(31867,1.58088,130439.51571),new s(7963,4.6097,156527.4188),new s(2014,1.3532,182615.322),new s(514,4.378,208703.325),new s(209,2.02,24978.525),new s(208,4.918,27197.282),new s(132,1.119,234791.128),new s(121,1.813,53285.185),new s(100,5.657,20426.571)],h.g_B1MercuryCoefficients=[new s(429151,3.501698,26087.903142),new s(146234,3.141593,0),new s(22675,.01515,52175.80628),new s(10895,.4854,78263.70942),new s(6353,3.4294,104351.6126),new s(2496,.1605,130439.5157),new s(860,3.185,156527.419),new s(278,6.21,182615.322),new s(86,2.95,208703.23),new s(28,.29,27197.28),new s(26,5.98,234791.13)],h.g_B2MercuryCoefficients=[new s(11831,4.79066,26087.90314),new s(1914,0,0),new s(1045,1.2122,52175.8063),new s(266,4.434,78263.709),new s(170,1.623,104351.613),new s(96,4.8,130439.52),new s(45,1.61,156527.42),new s(18,4.67,182615.32),new s(7,1.43,208703.23)],h.g_B3MercuryCoefficients=[new s(235,.354,26087.903),new s(161,0,0),new s(19,4.36,52175.81),new s(6,2.51,78263.71),new s(5,6.14,104351.61),new s(3,3.12,130439.52),new s(2,6.27,156527.42)],h.g_B4MercuryCoefficients=[new s(4,1.75,26087.9),new s(1,3.14,0)],h.g_R0MercuryCoefficients=[new s(39528272,0,0),new s(7834132,6.1923372,26087.9031416),new s(795526,2.959897,52175.806283),new s(121282,6.010642,78263.709425),new s(21922,2.7782,104351.61257),new s(4354,5.8289,130439.5157),new s(918,2.597,156527.419),new s(290,1.424,25028.521),new s(260,3.028,27197.282),new s(202,5.647,182615.322),new s(201,5.592,31749.235),new s(142,6.253,24978.525),new s(100,3.734,21535.95)],h.g_R1MercuryCoefficients=[new s(217348,4.656172,26087.903142),new s(44142,1.42386,52175.80628),new s(10094,4.47466,78263.70942),new s(2433,1.2423,104351.6126),new s(1624,0,0),new s(604,4.293,130439.516),new s(153,1.061,156527.419),new s(39,4.11,182615.32)],h.g_R2MercuryCoefficients=[new s(3118,3.0823,26087.9031),new s(1245,6.1518,52175.8063),new s(425,2.926,78263.709),new s(136,5.98,104351.613),new s(42,2.75,130439.52),new s(22,3.14,0),new s(13,5.8,156527.42)],h.g_R3MercuryCoefficients=[new s(33,1.68,26087.9),new s(24,4.63,52175.81),new s(12,1.39,78263.71),new s(5,4.44,104351.61),new s(2,1.21,130439.52)],h.g_MoonCoefficients1=[new N(0,0,1,0),new N(2,0,-1,0),new N(2,0,0,0),new N(0,0,2,0),new N(0,1,0,0),new N(0,0,0,2),new N(2,0,-2,0),new N(2,-1,-1,0),new N(2,0,1,0),new N(2,-1,0,0),new N(0,1,-1,0),new N(1,0,0,0),new N(0,1,1,0),new N(2,0,0,-2),new N(0,0,1,2),new N(0,0,1,-2),new N(4,0,-1,0),new N(0,0,3,0),new N(4,0,-2,0),new N(2,1,-1,0),new N(2,1,0,0),new N(1,0,-1,0),new N(1,1,0,0),new N(2,-1,1,0),new N(2,0,2,0),new N(4,0,0,0),new N(2,0,-3,0),new N(0,1,-2,0),new N(2,0,-1,2),new N(2,-1,-2,0),new N(1,0,1,0),new N(2,-2,0,0),new N(0,1,2,0),new N(0,2,0,0),new N(2,-2,-1,0),new N(2,0,1,-2),new N(2,0,0,2),new N(4,-1,-1,0),new N(0,0,2,2),new N(3,0,-1,0),new N(2,1,1,0),new N(4,-1,-2,0),new N(0,2,-1,0),new N(2,2,-1,0),new N(2,1,-2,0),new N(2,-1,0,-2),new N(4,0,1,0),new N(0,0,4,0),new N(4,-1,0,0),new N(1,0,-2,0),new N(2,1,0,-2),new N(0,0,2,-2),new N(1,1,1,0),new N(3,0,-2,0),new N(4,0,-3,0),new N(2,-1,2,0),new N(0,2,1,0),new N(1,1,-1,0),new N(2,0,3,0),new N(2,0,-1,-2)],h.g_MoonCoefficients2=[new O(6288774,-20905355),new O(1274027,-3699111),new O(658314,-2955968),new O(213618,-569925),new O(-185116,48888),new O(-114332,-3149),new O(58793,246158),new O(57066,-152138),new O(53322,-170733),new O(45758,-204586),new O(-40923,-129620),new O(-34720,108743),new O(-30383,104755),new O(15327,10321),new O(-12528,0),new O(10980,79661),new O(10675,-34782),new O(10034,-23210),new O(8548,-21636),new O(-7888,24208),new O(-6766,30824),new O(-5163,-8379),new O(4987,-16675),new O(4036,-12831),new O(3994,-10445),new O(3861,-11650),new O(3665,14403),new O(-2689,-7003),new O(-2602,0),new O(2390,10056),new O(-2348,6322),new O(2236,-9884),new O(-2120,5751),new O(-2069,0),new O(2048,-4950),new O(-1773,4130),new O(-1595,0),new O(1215,-3958),new O(-1110,0),new O(-892,3258),new O(-810,2616),new O(759,-1897),new O(-713,-2117),new O(-700,2354),new O(691,0),new O(596,0),new O(549,-1423),new O(537,-1117),new O(520,-1571),new O(-487,-1739),new O(-399,0),new O(-381,-4421),new O(351,0),new O(-340,0),new O(330,0),new O(327,0),new O(-323,1165),new O(299,0),new O(294,0),new O(0,8752)],h.g_MoonCoefficients3=[new N(0,0,0,1),new N(0,0,1,1),new N(0,0,1,-1),new N(2,0,0,-1),new N(2,0,-1,1),new N(2,0,-1,-1),new N(2,0,0,1),new N(0,0,2,1),new N(2,0,1,-1),new N(0,0,2,-1),new N(2,-1,0,-1),new N(2,0,-2,-1),new N(2,0,1,1),new N(2,1,0,-1),new N(2,-1,-1,1),new N(2,-1,0,1),new N(2,-1,-1,-1),new N(0,1,-1,-1),new N(4,0,-1,-1),new N(0,1,0,1),new N(0,0,0,3),new N(0,1,-1,1),new N(1,0,0,1),new N(0,1,1,1),new N(0,1,1,-1),new N(0,1,0,-1),new N(1,0,0,-1),new N(0,0,3,1),new N(4,0,0,-1),new N(4,0,-1,1),new N(0,0,1,-3),new N(4,0,-2,1),new N(2,0,0,-3),new N(2,0,2,-1),new N(2,-1,1,-1),new N(2,0,-2,1),new N(0,0,3,-1),new N(2,0,2,1),new N(2,0,-3,-1),new N(2,1,-1,1),new N(2,1,0,1),new N(4,0,0,1),new N(2,-1,1,1),new N(2,-2,0,-1),new N(0,0,1,3),new N(2,1,1,-1),new N(1,1,0,-1),new N(1,1,0,1),new N(0,1,-2,-1),new N(2,1,-1,-1),new N(1,0,1,1),new N(2,-1,-2,-1),new N(0,1,2,1),new N(4,0,-2,-1),new N(4,-1,-1,-1),new N(1,0,1,-1),new N(4,0,1,-1),new N(1,0,-1,-1),new N(4,-1,0,-1),new N(2,-2,0,1)],h.g_MoonCoefficients4=[5128122,280602,277693,173237,55413,46271,32573,17198,9266,8822,8216,4324,4200,-3359,2463,2211,2065,-1870,1828,-1794,-1749,-1565,-1491,-1475,-1410,-1344,-1335,1107,1021,833,777,671,607,596,491,-451,439,422,421,-366,-351,331,315,302,-283,-229,223,223,-220,-220,-185,181,-177,176,166,-164,132,-119,115,107],h.g_MoonPerigeeApogeeCoefficients1=[new S(2,0,0,-1.6769,0),new S(4,0,0,.4589,0),new S(6,0,0,-.1856,0),new S(8,0,0,.0883,0),new S(2,-1,0,-.0773,19e-5),new S(0,1,0,.0502,-13e-5),new S(10,0,0,-.046,0),new S(4,-1,0,.0422,-11e-5),new S(6,-1,0,-.0256,0),new S(12,0,0,.0253,0),new S(1,0,0,.0237,0),new S(8,-1,0,.0162,0),new S(14,0,0,-.0145,0),new S(0,0,2,.0129,0),new S(3,0,0,-.0112,0),new S(10,-1,0,-.0104,0),new S(16,0,0,.0086,0),new S(12,-1,0,.0069,0),new S(5,0,0,.0066,0),new S(2,0,2,-.0053,0),new S(18,0,0,-.0052,0),new S(14,-1,0,-.0046,0),new S(7,0,0,-.0041,0),new S(2,1,0,.004,0),new S(20,0,0,.0032,0),new S(1,1,0,-.0032,0),new S(16,-1,0,.0031,0),new S(4,1,0,-.0029,0),new S(9,0,0,.0027,0),new S(4,0,2,.0027,0),new S(2,-2,0,-.0027,0),new S(4,-2,0,.0024,0),new S(6,-2,0,-.0021,0),new S(22,0,0,-.0021,0),new S(18,-1,0,-.0021,0),new S(6,1,0,.0019,0),new S(11,0,0,-.0018,0),new S(8,1,0,-.0014,0),new S(4,0,-2,-.0014,0),new S(6,0,2,-.0014,0),new S(3,1,0,.0014,0),new S(5,1,0,-.0014,0),new S(13,0,0,.0013,0),new S(20,-1,0,.0013,0),new S(3,2,0,.0011,0),new S(4,-2,2,-.0011,0),new S(1,2,0,-.0011,0),new S(22,-1,0,-9e-4,0),new S(0,0,4,-8e-4,0),new S(6,0,-2,8e-4,0),new S(2,1,-2,8e-4,0),new S(0,2,0,7e-4,0),new S(0,-1,2,7e-4,0),new S(2,0,4,7e-4,0),new S(0,-2,2,-6e-4,0),new S(2,2,-2,-6e-4,0),new S(24,0,0,6e-4,0),new S(4,0,-4,5e-4,0),new S(2,2,0,5e-4,0),new S(1,-1,0,-4e-4,0)],h.g_MoonPerigeeApogeeCoefficients2=[new S(2,0,0,.4392,0),new S(4,0,0,.0684,0),new S(0,1,0,.0456,-11e-5),new S(2,-1,0,.0426,-11e-5),new S(0,0,2,.0212,0),new S(1,0,0,-.0189,0),new S(6,0,0,.0144,0),new S(4,-1,0,.0113,0),new S(2,0,2,.0047,0),new S(1,1,0,.0036,0),new S(8,0,0,.0035,0),new S(6,-1,0,.0034,0),new S(2,0,-2,-.0034,0),new S(2,-2,0,.0022,0),new S(3,0,0,-.0017,0),new S(4,0,2,.0013,0),new S(8,-1,0,.0011,0),new S(4,-2,0,.001,0),new S(10,0,0,9e-4,0),new S(3,1,0,7e-4,0),new S(0,2,0,6e-4,0),new S(2,1,0,5e-4,0),new S(2,2,0,5e-4,0),new S(6,0,2,4e-4,0),new S(6,-2,0,4e-4,0),new S(10,-1,0,4e-4,0),new S(5,0,0,-4e-4,0),new S(4,0,-2,-4e-4,0),new S(0,1,2,3e-4,0),new S(12,0,0,3e-4,0),new S(2,-1,2,3e-4,0),new S(1,-1,0,-3e-4,0)],h.g_MoonPerigeeApogeeCoefficients3=[new S(2,0,0,63.224,0),new S(4,0,0,-6.99,0),new S(2,-1,0,2.834,0),new S(2,-1,0,0,-.0071),new S(6,0,0,1.927,0),new S(1,0,0,-1.263,0),new S(8,0,0,-.702,0),new S(0,1,0,.696,0),new S(0,1,0,0,-.0017),new S(0,0,2,-.69,0),new S(4,-1,0,-.629,0),new S(4,-1,0,0,.0016),new S(2,0,-2,-.392,0),new S(10,0,0,.297,0),new S(6,-1,0,.26,0),new S(3,0,0,.201,0),new S(2,1,0,-.161,0),new S(1,1,0,.157,0),new S(12,0,0,-.138,0),new S(8,-1,0,-.127,0),new S(2,0,2,.104,0),new S(2,-2,0,.104,0),new S(5,0,0,-.079,0),new S(14,0,0,.068,0),new S(10,-1,0,.067,0),new S(4,1,0,.054,0),new S(12,-1,0,-.038,0),new S(4,-2,0,-.038,0),new S(7,0,0,.037,0),new S(4,0,2,-.037,0),new S(16,0,0,-.035,0),new S(3,1,0,-.03,0),new S(1,-1,0,.029,0),new S(6,1,0,-.025,0),new S(0,2,0,.023,0),new S(14,-1,0,.023,0),new S(2,2,0,-.023,0),new S(6,-2,0,.022,0),new S(2,-1,-2,-.021,0),new S(9,0,0,-.02,0),new S(18,0,0,.019,0),new S(6,0,2,.017,0),new S(0,-1,2,.014,0),new S(16,-1,0,-.014,0),new S(4,0,-20,.013,0),new S(8,1,0,.012,0),new S(11,0,0,.011,0),new S(5,1,0,.01,0),new S(20,0,0,-.01,0)],h.g_MoonPerigeeApogeeCoefficients4=[new S(2,0,0,-9.147,0),new S(1,0,0,-.841,0),new S(0,0,2,.697,0),new S(0,1,0,-.656,.0016),new S(4,0,0,.355,0),new S(2,-1,0,.159,0),new S(1,1,0,.127,0),new S(4,-1,0,.065,0),new S(6,0,0,.052,0),new S(2,1,0,.043,0),new S(2,0,2,.031,0),new S(2,0,-2,-.023,0),new S(2,-2,0,.022,0),new S(2,2,0,.019,0),new S(0,2,0,-.016,0),new S(6,-1,0,.014,0),new S(8,0,0,.01,0)],h.g_L0NC=[new s(531188633,0,0),new s(1798476,2.9010127,38.1330356),new s(1019728,.4858092,1.4844727),new s(124532,4.830081,36.648563),new s(42064,5.41055,2.96895),new s(37715,6.09222,35.16409),new s(33785,1.24489,76.26607),new s(16483,8e-5,491.55793),new s(9199,4.9375,39.6175),new s(8994,.2746,175.1661),new s(4216,1.9871,73.2971),new s(3365,1.0359,33.6796),new s(2285,4.2061,4.4534),new s(1434,2.7834,74.7816),new s(900,2.076,109.946),new s(745,3.19,71.813),new s(506,5.748,114.399),new s(400,.35,1021.249),new s(345,3.462,41.102),new s(340,3.304,77.751),new s(323,2.248,32.195),new s(306,.497,.521),new s(287,4.505,.048),new s(282,2.246,146.594),new s(267,4.889,.963),new s(252,5.782,388.465),new s(245,1.247,9.561),new s(233,2.505,137.033),new s(227,1.797,453.425),new s(170,3.324,108.461),new s(151,2.192,33.94),new s(150,2.997,5.938),new s(148,.859,111.43),new s(119,3.677,2.448),new s(109,2.416,183.243),new s(103,.041,.261),new s(103,4.404,70.328),new s(102,5.705,.112)],h.g_L1NC=[new s(3837687717,0,0),new s(16604,4.86319,1.48447),new s(15807,2.27923,38.13304),new s(3335,3.682,76.2661),new s(1306,3.6732,2.9689),new s(605,1.505,35.164),new s(179,3.453,39.618),new s(107,2.451,4.453),new s(106,2.755,33.68),new s(73,5.49,36.65),new s(57,1.86,114.4),new s(57,5.22,.52),new s(35,4.52,74.78),new s(32,5.9,77.75),new s(30,3.67,388.47),new s(29,5.17,9.56),new s(29,5.17,2.45),new s(26,5.25,168.05)],h.g_L2NC=[new s(53893,0,0),new s(296,1.855,1.484),new s(281,1.191,38.133),new s(270,5.721,76.266),new s(23,1.21,2.97),new s(9,4.43,35.16),new s(7,.54,2.45)],h.g_L3NC=[new s(31,0,0),new s(15,1.35,76.27),new s(12,6.04,1.48),new s(12,6.11,38.13)],h.g_L4NC=[new s(114,3.142,0)],h.g_B0NC=[new s(3088623,1.4410437,38.1330356),new s(27789,5.91272,76.26607),new s(27624,0,0),new s(15448,3.50877,39.61751),new s(15355,2.52124,36.64856),new s(2e3,1.51,74.7816),new s(1968,4.3778,1.4845),new s(1015,3.2156,35.1641),new s(606,2.802,73.297),new s(595,2.129,41.102),new s(589,3.187,2.969),new s(402,4.169,114.399),new s(280,1.682,77.751),new s(262,3.767,213.299),new s(254,3.271,453.425),new s(206,4.257,529.691),new s(140,3.53,137.033)],h.g_B1NC=[new s(227279,3.807931,38.133036),new s(1803,1.9758,76.2661),new s(1433,3.1416,0),new s(1386,4.8256,36.6486),new s(1073,6.0805,39.6175),new s(148,3.858,74.782),new s(136,.478,1.484),new s(70,6.19,35.16),new s(52,5.05,73.3),new s(43,.31,114.4),new s(37,4.89,41.1),new s(37,5.76,2.97),new s(26,5.22,213.3)],h.g_B2NC=[new s(9691,5.5712,38.133),new s(79,3.63,76.27),new s(72,.45,36.65),new s(59,3.14,0),new s(30,1.61,39.62),new s(6,5.61,74.78)],h.g_B3NC=[new s(273,1.017,38.133),new s(2,0,0),new s(2,2.37,36.65),new s(2,5.33,76.27)],h.g_B4NC=[new s(6,2.67,38.13)],h.g_R0NC=[new s(3007013206,0,0),new s(27062259,1.32999459,38.13303564),new s(1691764,3.2518614,36.6485629),new s(807831,5.185928,1.484473),new s(537761,4.521139,35.16409),new s(495726,1.571057,491.557929),new s(274572,1.845523,175.16606),new s(135134,3.372206,39.617508),new s(121802,5.797544,76.266071),new s(100895,.377027,73.297126),new s(69792,3.79617,2.96895),new s(46688,5.74938,33.67962),new s(24594,.50802,109.94569),new s(16939,1.59422,71.81265),new s(14230,1.07786,74.7816),new s(12012,1.92062,1021.24889),new s(8395,.6782,146.5943),new s(7572,1.0715,388.4652),new s(5721,2.5906,4.4534),new s(4840,1.9069,41.102),new s(4483,2.9057,529.691),new s(4421,1.7499,108.4612),new s(4354,.6799,32.1951),new s(4270,3.4134,453.4249),new s(3381,.8481,183.2428),new s(2881,1.986,137.033),new s(2879,3.6742,350.3321),new s(2636,3.0976,213.2991),new s(2530,5.7984,490.0735),new s(2523,.4863,493.0424),new s(2306,2.8096,70.3282),new s(2087,.6186,33.9402)],h.g_R1NC=[new s(236339,.70498,38.133036),new s(13220,3.32015,1.48447),new s(8622,6.2163,35.1641),new s(2702,1.8814,39.6175),new s(2155,2.0943,2.9689),new s(2153,5.1687,76.2661),new s(1603,0,0),new s(1464,1.1842,33.6796),new s(1136,3.9189,36.6486),new s(898,5.241,388.465),new s(790,.533,168.053),new s(760,.021,182.28),new s(607,1.077,1021.249),new s(572,3.401,484.444),new s(561,2.887,498.671)],h.g_R2NC=[new s(4247,5.8991,38.133),new s(218,.346,1.484),new s(163,2.239,168.053),new s(156,4.594,182.28),new s(127,2.848,35.164)],h.g_R3NC=[new s(166,4.552,38.133)],h.g_NuC=[new W(0,0,0,0,1,-171996,-174.2,92025,8.9),new W(-2,0,0,2,2,-13187,-1.6,5736,-3.1),new W(0,0,0,2,2,-2274,-.2,977,-.5),new W(0,0,0,0,2,2062,.2,-895,.5),new W(0,1,0,0,0,1426,-3.4,54,-.1),new W(0,0,1,0,0,712,.1,-7,0),new W(-2,1,0,2,2,-517,1.2,224,-.6),new W(0,0,0,2,1,-386,-.4,200,0),new W(0,0,1,2,2,-301,0,129,-.1),new W(-2,-1,0,2,2,217,-.5,-95,.3),new W(-2,0,1,0,0,-158,0,0,0),new W(-2,0,0,2,1,129,.1,-70,0),new W(0,0,-1,2,2,123,0,-53,0),new W(2,0,0,0,0,63,0,0,0),new W(0,0,1,0,1,63,.1,-33,0),new W(2,0,-1,2,2,-59,0,26,0),new W(0,0,-1,0,1,-58,-.1,32,0),new W(0,0,1,2,1,-51,0,27,0),new W(-2,0,2,0,0,48,0,0,0),new W(0,0,-2,2,1,46,0,-24,0),new W(2,0,0,2,2,-38,0,16,0),new W(0,0,2,2,2,-31,0,13,0),new W(0,0,2,0,0,29,0,0,0),new W(-2,0,1,2,2,29,0,-12,0),new W(0,0,0,2,0,26,0,0,0),new W(-2,0,0,2,0,-22,0,0,0),new W(0,0,-1,2,1,21,0,-10,0),new W(0,2,0,0,0,17,-.1,0,0),new W(2,0,-1,0,1,16,0,-8,0),new W(-2,2,0,2,2,-16,.1,7,0),new W(0,1,0,0,1,-15,0,9,0),new W(-2,0,1,0,1,-13,0,7,0),new W(0,-1,0,0,1,-12,0,6,0),new W(0,0,2,-2,0,11,0,0,0),new W(2,0,-1,2,1,-10,0,5,0),new W(2,0,1,2,2,-8,0,3,0),new W(0,1,0,2,2,7,0,-3,0),new W(-2,1,1,0,0,-7,0,0,0),new W(0,-1,0,2,2,-7,0,3,0),new W(2,0,0,2,1,-7,0,3,0),new W(2,0,1,0,0,6,0,0,0),new W(-2,0,2,2,2,6,0,-3,0),new W(-2,0,1,2,1,6,0,-3,0),new W(2,0,-2,0,1,-6,0,3,0),new W(2,0,0,0,1,-6,0,3,0),new W(0,-1,1,0,0,5,0,0,0),new W(-2,-1,0,2,1,-5,0,3,0),new W(-2,0,0,0,1,-5,0,3,0),new W(0,0,2,2,1,-5,0,3,0),new W(-2,0,2,0,1,4,0,0,0),new W(-2,1,0,2,1,4,0,0,0),new W(0,0,1,-2,0,4,0,0,0),new W(-1,0,1,0,0,-4,0,0,0),new W(-2,1,0,0,0,-4,0,0,0),new W(1,0,0,0,0,-4,0,0,0),new W(0,0,1,2,0,3,0,0,0),new W(0,0,-2,2,2,-3,0,0,0),new W(-1,-1,1,0,0,-3,0,0,0),new W(0,1,1,0,0,-3,0,0,0),new W(0,-1,1,2,2,-3,0,0,0),new W(2,-1,-1,2,2,-3,0,0,0),new W(0,0,3,2,2,-3,0,0,0),new W(2,-1,0,2,2,-3,0,0,0)],h.g_AAParallax_C1=Math.sin(n.d2R(n.dmS2D(0,0,8.794))),h.g_PlutoArgumentCoefficients=[new eb(0,0,1),new eb(0,0,2),new eb(0,0,3),new eb(0,0,4),new eb(0,0,5),new eb(0,0,6),new eb(0,1,-1),new eb(0,1,0),new eb(0,1,1),new eb(0,1,2),new eb(0,1,3),new eb(0,2,-2),new eb(0,2,-1),new eb(0,2,0),new eb(1,-1,0),new eb(1,-1,1),new eb(1,0,-3),new eb(1,0,-2),new eb(1,0,-1),new eb(1,0,0),new eb(1,0,1),new eb(1,0,2),new eb(1,0,3),new eb(1,0,4),new eb(1,1,-3),new eb(1,1,-2),new eb(1,1,-1),new eb(1,1,0),new eb(1,1,1),new eb(1,1,3),new eb(2,0,-6),new eb(2,0,-5),new eb(2,0,-4),new eb(2,0,-3),new eb(2,0,-2),new eb(2,0,-1),new eb(2,0,0),new eb(2,0,1),new eb(2,0,2),new eb(2,0,3),new eb(3,0,-2),new eb(3,0,-1),new eb(3,0,0)],h.g_PlutoLongitudeCoefficients=[new fb(-19799805,19850055),new fb(897144,-4954829),new fb(611149,1211027),new fb(-341243,-189585),new fb(129287,-34992),new fb(-38164,30893),new fb(20442,-9987),new fb(-4063,-5071),new fb(-6016,-3336),new fb(-3956,3039),new fb(-667,3572),new fb(1276,501),new fb(1152,-917),new fb(630,-1277),new fb(2571,-459),new fb(899,-1449),new fb(-1016,1043),new fb(-2343,-1012),new fb(7042,788),new fb(1199,-338),new fb(418,-67),new fb(120,-274),new fb(-60,-159),new fb(-82,-29),new fb(-36,-29),new fb(-40,7),new fb(-14,22),new fb(4,13),new fb(5,2),new fb(-1,0),new fb(2,0),new fb(-4,5),new fb(4,-7),new fb(14,24),new fb(-49,-34),new fb(163,-48),new fb(9,-24),new fb(-4,1),new fb(-3,1),new fb(1,3),new fb(-3,-1),new fb(5,-3),new fb(0,0)],h.g_PlutoLatitudeCoefficients=[new fb(-5452852,-14974862),new fb(3527812,1672790),new fb(-1050748,327647),new fb(178690,-292153),new fb(18650,100340),new fb(-30697,-25823),new fb(4878,11248),new fb(226,-64),new fb(2030,-836),new fb(69,-604),new fb(-247,-567),new fb(-57,1),new fb(-122,175),new fb(-49,-164),new fb(-197,199),new fb(-25,217),new fb(589,-248),new fb(-269,711),new fb(185,193),new fb(315,807),new fb(-130,-43),new fb(5,3),new fb(2,17),new fb(2,5),new fb(2,3),new fb(3,1),new fb(2,-1),new fb(1,-1),new fb(0,-1),new fb(0,0),new fb(0,-2),new fb(2,2),new fb(-7,0),new fb(10,-8),new fb(-3,20),new fb(6,5),new fb(14,17),new fb(-2,0),new fb(0,0),new fb(0,0),new fb(0,1),new fb(0,0),new fb(1,0)],h.g_PlutoRadiusCoefficients=[new fb(66865439,68951812),new fb(-11827535,-332538),new fb(1593179,-1438890),new fb(-18444,483220),new fb(-65977,-85431),new fb(31174,-6032),new fb(-5794,22161),new fb(4601,4032),new fb(-1729,234),new fb(-415,702),new fb(239,723),new fb(67,-67),new fb(1034,-451),new fb(-129,504),new fb(480,-231),new fb(2,-441),new fb(-3359,265),new fb(7856,-7832),new fb(36,45763),new fb(8663,8547),new fb(-809,-769),new fb(263,-144),new fb(-126,32),new fb(-35,-16),new fb(-19,-4),new fb(-15,8),new fb(-4,12),new fb(5,6),new fb(3,1),new fb(6,-2),new fb(2,2),new fb(-2,-2),new fb(14,13),new fb(-63,13),new fb(136,-236),new fb(273,1065),new fb(251,149),new fb(-25,-9),new fb(9,-2),new fb(-8,7),new fb(2,-10),new fb(19,35),new fb(10,3)],h.g_L0SaturnCoefficients=[new s(87401354,0,0),new s(11107660,3.9620509,213.29909544),new s(1414151,4.5858152,7.113547),new s(398379,.52112,206.185548),new s(350769,3.303299,426.598191),new s(206816,.246584,103.092774),new s(79271,3.84007,220.41264),new s(23990,4.66977,110.20632),new s(16574,.43719,419.48464),new s(15820,.93809,632.78374),new s(15054,2.7167,639.89729),new s(14907,5.76903,316.39187),new s(14610,1.56519,3.93215),new s(13160,4.44891,14.22709),new s(13005,5.98119,11.0457),new s(10725,3.1294,202.2534),new s(6126,1.7633,277.035),new s(5863,.2366,529.691),new s(5228,4.2078,3.1814),new s(5020,3.1779,433.7117),new s(4593,.6198,199.072),new s(4006,2.2448,63.7359),new s(3874,3.2228,138.5175),new s(3269,.7749,949.1756),new s(2954,.9828,95.9792),new s(2461,2.0316,735.8765),new s(1758,3.2658,522.5774),new s(1640,5.505,846.0828),new s(1581,4.3727,309.2783),new s(1391,4.0233,323.5054),new s(1124,2.8373,415.5525),new s(1087,4.1834,2.4477),new s(1017,3.717,227.5262),new s(957,.507,1265.567),new s(853,3.421,175.166),new s(849,3.191,209.367),new s(789,5.007,.963),new s(749,2.144,853.196),new s(744,5.253,224.345),new s(687,1.747,1052.268),new s(654,1.599,.048),new s(634,2.299,412.371),new s(625,.97,210.118),new s(580,3.093,74.782),new s(546,2.127,350.332),new s(543,1.518,9.561),new s(530,4.449,117.32),new s(478,2.965,137.033),new s(474,5.475,742.99),new s(452,1.044,490.334),new s(449,1.29,127.472),new s(372,2.278,217.231),new s(355,3.013,838.969),new s(347,1.539,340.771),new s(343,.246,.521),new s(330,.247,1581.959),new s(322,.961,203.738),new s(322,2.572,647.011),new s(309,3.495,216.48),new s(287,2.37,351.817),new s(278,.4,211.815),new s(249,1.47,1368.66),new s(227,4.91,12.53),new s(220,4.204,200.769),new s(209,1.345,625.67),new s(208,.483,1162.475),new s(208,1.283,39.357),new s(204,6.011,265.989),new s(185,3.503,149.563),new s(184,.973,4.193),new s(182,5.491,2.921),new s(174,1.863,.751),new s(165,.44,5.417),new s(149,5.736,52.69),new s(148,1.535,5.629),new s(146,6.231,195.14),new s(140,4.295,21.341),new s(131,4.068,10.295),new s(125,6.277,1898.351),new s(122,1.976,4.666),new s(118,5.341,554.07),new s(117,2.679,1155.361),new s(114,5.594,1059.382),new s(112,1.105,191.208),new s(110,.166,1.484),new s(109,3.438,536.805),new s(107,4.012,956.289),new s(104,2.192,88.866),new s(103,1.197,1685.052),new s(101,4.965,269.921)],h.g_L1SaturnCoefficients=[new s(21354295596,0,0),new s(1296855,1.8282054,213.2990954),new s(564348,2.885001,7.113547),new s(107679,2.277699,206.185548),new s(98323,1.0807,426.59819),new s(40255,2.04128,220.41264),new s(19942,1.27955,103.09277),new s(10512,2.7488,14.22709),new s(6939,.4049,639.8973),new s(4803,2.4419,419.4846),new s(4056,2.9217,110.2063),new s(3769,3.6497,3.9322),new s(3385,2.4169,3.1814),new s(3302,1.2626,433.7117),new s(3071,2.3274,199.072),new s(1953,3.5639,11.0457),new s(1249,2.628,95.9792),new s(922,1.961,227.526),new s(706,4.417,529.691),new s(650,6.174,202.253),new s(628,6.111,309.278),new s(487,6.04,853.196),new s(479,4.988,522.577),new s(468,4.617,63.736),new s(417,2.117,323.505),new s(408,1.299,209.367),new s(352,2.317,632.784),new s(344,3.959,412.371),new s(340,3.634,316.392),new s(336,3.772,735.877),new s(332,2.861,210.118),new s(289,2.733,117.32),new s(281,5.744,2.448),new s(266,.543,647.011),new s(230,1.644,216.48),new s(192,2.965,224.345),new s(173,4.077,846.083),new s(167,2.597,21.341),new s(136,2.286,10.295),new s(131,3.441,742.99),new s(128,4.095,217.231),new s(109,6.161,415.552),new s(98,4.73,838.97),new s(94,3.48,1052.27),new s(92,3.95,88.87),new s(87,1.22,440.83),new s(83,3.11,625.67),new s(78,6.24,302.16),new s(67,.29,4.67),new s(66,5.65,9.56),new s(62,4.29,127.47),new s(62,1.83,195.14),new s(58,2.48,191.96),new s(57,5.02,137.03),new s(55,.28,74.78),new s(54,5.13,490.33),new s(51,1.46,536.8),new s(47,1.18,149.56),new s(47,5.15,515.46),new s(46,2.23,956.29),new s(44,2.71,5.42),new s(40,.41,269.92),new s(40,3.89,728.76),new s(38,.65,422.67),new s(38,2.53,12.53),new s(37,3.78,2.92),new s(35,6.08,5.63),new s(34,3.21,1368.66),new s(33,4.64,277.03),new s(33,5.43,1066.5),new s(33,.3,351.82),new s(32,4.39,1155.36),new s(31,2.43,52.69),new s(30,2.84,203),new s(30,6.19,284.15),new s(30,3.39,1059.38),new s(29,2.03,330.62),new s(28,2.74,265.99),new s(26,4.51,340.77)],h.g_L2SaturnCoefficients=[new s(116441,1.179879,7.113547),new s(91921,.07425,213.2991),new s(90592,0,0),new s(15277,4.06492,206.18555),new s(10631,.25778,220.41264),new s(10605,5.40964,426.59819),new s(4265,1.046,14.2271),new s(1216,2.9186,103.0928),new s(1165,4.6094,639.8973),new s(1082,5.6913,433.7117),new s(1045,4.0421,199.072),new s(1020,.6337,3.1814),new s(634,4.388,419.485),new s(549,5.573,3.932),new s(457,1.268,110.206),new s(425,.209,227.526),new s(274,4.288,95.979),new s(162,1.381,11.046),new s(129,1.566,309.278),new s(117,3.881,853.196),new s(105,4.9,647.011),new s(101,.893,21.341),new s(96,2.91,316.39),new s(95,5.63,412.37),new s(85,5.73,209.37),new s(83,6.05,216.48),new s(82,1.02,117.32),new s(75,4.76,210.12),new s(67,.46,522.58),new s(66,.48,10.29),new s(64,.35,323.51),new s(61,4.88,632.78),new s(53,2.75,529.69),new s(46,5.69,440.83),new s(45,1.67,202.25),new s(42,5.71,88.87),new s(32,.07,63.74),new s(32,1.67,302.16),new s(31,4.16,191.96),new s(27,.83,224.34),new s(25,5.66,735.88),new s(20,5.94,217.23),new s(18,4.9,625.67),new s(17,1.63,742.99),new s(16,.58,515.46),new s(14,.21,838.97),new s(14,3.76,195.14),new s(12,4.72,203),new s(12,.13,234.64),new s(12,3.12,846.08),new s(11,5.92,536.8),new s(11,5.6,728.76),new s(11,3.2,1066.5),new s(10,4.99,422.67),new s(10,.26,330.62),new s(10,4.15,860.31),new s(9,.46,956.29),new s(8,2.14,269.92),new s(8,5.25,429.78),new s(8,4.03,9.56),new s(7,5.4,1052.27),new s(6,4.46,284.15),new s(6,5.93,405.26)],h.g_L3SaturnCoefficients=[new s(16039,5.73945,7.11355),new s(4250,4.5854,213.2991),new s(1907,4.7608,220.4126),new s(1466,5.9133,206.1855),new s(1162,5.6197,14.2271),new s(1067,3.6082,426.5982),new s(239,3.861,433.712),new s(237,5.768,199.072),new s(166,5.116,3.181),new s(151,2.736,639.897),new s(131,4.743,227.526),new s(63,.23,419.48),new s(62,4.74,103.09),new s(40,5.47,21.34),new s(40,5.96,95.98),new s(39,5.83,110.21),new s(28,3.01,647.01),new s(25,.99,3.93),new s(19,1.92,853.2),new s(18,4.97,10.29),new s(18,1.03,412.37),new s(18,4.2,216.48),new s(18,3.32,309.28),new s(16,3.9,440.83),new s(16,5.62,117.32),new s(13,1.18,88.87),new s(11,5.58,11.05),new s(11,5.93,191.96),new s(10,3.95,209.37),new s(9,3.39,302.16),new s(8,4.88,323.51),new s(7,.38,632.78),new s(6,2.25,522.58),new s(6,1.06,210.12),new s(5,4.64,234.64),new s(4,3.14,0),new s(4,2.31,515.46),new s(3,2.2,860.31),new s(3,.59,529.69),new s(3,4.93,224.34),new s(3,.42,625.67),new s(2,4.77,330.62),new s(2,3.35,429.78),new s(2,3.2,202.25),new s(2,1.19,1066.5),new s(2,1.35,405.26),new s(2,4.16,223.59),new s(2,3.07,654.12)],h.g_L4SaturnCoefficients=[new s(1662,3.9983,7.1135),new s(257,2.984,220.413),new s(236,3.902,14.227),new s(149,2.741,213.299),new s(114,3.142,0),new s(110,1.515,206.186),new s(68,1.72,426.6),new s(40,2.05,433.71),new s(38,1.24,199.07),new s(31,3.01,227.53),new s(15,.83,639.9),new s(9,3.71,21.34),new s(6,2.42,419.48),new s(6,1.16,647.01),new s(4,1.45,95.98),new s(4,2.12,440.83),new s(3,4.09,110.21),new s(3,2.77,412.37),new s(3,3.01,88.87),new s(3,0,853.2),new s(3,.39,103.09),new s(2,3.78,117.32),new s(2,2.83,234.64),new s(2,5.08,309.28),new s(2,2.24,216.48),new s(2,5.19,302.16),new s(1,1.55,191.96)],h.g_L5SaturnCoefficients=[new s(124,2.259,7.114),new s(34,2.16,14.23),new s(28,1.2,220.41),new s(6,1.22,227.53),new s(5,.24,433.71),new s(4,6.23,426.6),new s(3,2.97,199.07),new s(3,4.29,206.19),new s(2,6.25,213.3),new s(1,5.28,639.9),new s(1,.24,440.83),new s(1,3.14,0)],h.g_B0SaturnCoefficients=[new s(4330678,3.6028443,213.2990954),new s(240348,2.852385,426.598191),new s(84746,0,0),new s(34116,.57297,206.18555),new s(30863,3.48442,220.41264),new s(14734,2.11847,639.89729),new s(9917,5.79,419.4846),new s(6994,4.736,7.1135),new s(4808,5.4331,316.3919),new s(4788,4.9651,110.2063),new s(3432,2.7326,433.7117),new s(1506,6.013,103.0928),new s(1060,5.631,529.691),new s(969,5.204,632.784),new s(942,1.396,853.196),new s(708,3.803,323.505),new s(552,5.131,202.253),new s(400,3.359,227.526),new s(319,3.626,209.367),new s(316,1.997,647.011),new s(314,.465,217.231),new s(284,4.886,224.345),new s(236,2.139,11.046),new s(215,5.95,846.083),new s(209,2.12,415.552),new s(207,.73,199.072),new s(179,2.954,63.736),new s(141,.644,490.334),new s(139,4.595,14.227),new s(139,1.998,735.877),new s(135,5.245,742.99),new s(122,3.115,522.577),new s(116,3.109,216.48),new s(114,.963,210.118)],h.g_B1SaturnCoefficients=[new s(397555,5.3329,213.299095),new s(49479,3.14159,0),new s(18572,6.09919,426.59819),new s(14801,2.30586,206.18555),new s(9644,1.6967,220.4126),new s(3757,1.2543,419.4846),new s(2717,5.9117,639.8973),new s(1455,.8516,433.7117),new s(1291,2.9177,7.1135),new s(853,.436,316.392),new s(298,.919,632.784),new s(292,5.316,853.196),new s(284,1.619,227.526),new s(275,3.889,103.093),new s(172,.052,647.011),new s(166,2.444,199.072),new s(158,5.209,110.206),new s(128,1.207,529.691),new s(110,2.457,217.231),new s(82,2.76,210.12),new s(81,2.86,14.23),new s(69,1.66,202.25),new s(65,1.26,216.48),new s(61,1.25,209.37),new s(59,1.82,323.51),new s(46,.82,440.83),new s(36,1.82,224.34),new s(34,2.84,117.32),new s(33,1.31,412.37),new s(32,1.19,846.08),new s(27,4.65,1066.5),new s(27,4.44,11.05)],h.g_B2SaturnCoefficients=[new s(20630,.50482,213.2991),new s(3720,3.9983,206.1855),new s(1627,6.1819,220.4126),new s(1346,0,0),new s(706,3.039,419.485),new s(365,5.099,426.598),new s(330,5.279,433.712),new s(219,3.828,639.897),new s(139,1.043,7.114),new s(104,6.157,227.526),new s(93,1.98,316.39),new s(71,4.15,199.07),new s(52,2.88,632.78),new s(49,4.43,647.01),new s(41,3.16,853.2),new s(29,4.53,210.12),new s(24,1.12,14.23),new s(21,4.35,217.23),new s(20,5.31,440.83),new s(18,.85,110.21),new s(17,5.68,216.48),new s(16,4.26,103.09),new s(14,3,412.37),new s(12,2.53,529.69),new s(8,3.32,202.25),new s(7,5.56,209.37),new s(7,.29,323.51),new s(6,1.16,117.32),new s(6,3.61,869.31)],h.g_B3SaturnCoefficients=[new s(666,1.99,213.299),new s(632,5.698,206.186),new s(398,0,0),new s(188,4.338,220.413),new s(92,4.84,419.48),new s(52,3.42,433.71),new s(42,2.38,426.6),new s(26,4.4,227.53),new s(21,5.85,199.07),new s(18,1.99,639.9),new s(11,5.37,7.11),new s(10,2.55,647.01),new s(7,3.46,316.39),new s(6,4.8,632.78),new s(6,.02,210.12),new s(6,3.52,440.83),new s(5,5.64,14.23),new s(5,1.22,853.2),new s(4,4.71,412.37),new s(3,.63,103.09),new s(2,3.72,216.48)],h.g_B4SaturnCoefficients=[new s(80,1.12,206.19),new s(32,3.12,213.3),new s(17,2.48,220.41),new s(12,3.14,0),new s(9,.38,419.48),new s(6,1.56,433.71),new s(5,2.63,227.53),new s(5,1.28,199.07),new s(1,1.43,426.6),new s(1,.67,647.01),new s(1,1.72,440.83),new s(1,6.18,639.9)],h.g_B5SaturnCoefficients=[new s(8,2.82,206.19),new s(1,.51,220.41)],h.g_R0SaturnCoefficients=[new s(955758136,0,0),new s(52921382,2.3922622,213.29909544),new s(1873680,5.2354961,206.1855484),new s(1464664,1.6476305,426.5981909),new s(821891,5.9352,316.39187),new s(547507,5.015326,103.092774),new s(371684,2.271148,220.412642),new s(361778,3.139043,7.113547),new s(140618,5.704067,632.783739),new s(108975,3.293136,110.206321),new s(69007,5.941,419.48464),new s(61053,.94038,639.89729),new s(48913,1.55733,202.2534),new s(34144,.19519,277.03499),new s(32402,5.47085,949.17561),new s(20937,.46349,735.87651),new s(20839,1.52103,433.71174),new s(20747,5.33256,199.072),new s(15298,3.05944,529.69097),new s(14296,2.60434,323.50542),new s(12884,1.64892,138.5175),new s(11993,5.98051,846.08283),new s(11380,1.73106,522.57742),new s(9796,5.2048,1265.5675),new s(7753,5.8519,95.9792),new s(6771,3.0043,14.2271),new s(6466,.1773,1052.2684),new s(5850,1.4552,415.5525),new s(5307,.5974,63.7359),new s(4696,2.1492,227.5262),new s(4044,1.6401,209.3669),new s(3688,.7802,412.3711),new s(3461,1.8509,175.1661),new s(3420,4.9455,1581.9593),new s(3401,.5539,350.3321),new s(3376,3.6953,224.3448),new s(2976,5.6847,210.1177),new s(2885,1.3876,838.9693),new s(2881,.1796,853.1964),new s(2508,3.5385,742.9901),new s(2448,6.1841,1368.6603),new s(2406,2.9656,117.3199),new s(2174,.0151,340.7709),new s(2024,5.0541,11.0457)],h.g_R1SaturnCoefficients=[new s(6182981,.2584352,213.2990954),new s(506578,.711147,206.185548),new s(341394,5.796358,426.598191),new s(188491,.472157,220.412642),new s(186262,3.141593,0),new s(143891,1.407449,7.113547),new s(49621,6.01744,103.09277),new s(20928,5.09246,639.89729),new s(19953,1.1756,419.48464),new s(18840,1.6082,110.20632),new s(13877,.75886,199.072),new s(12893,5.9433,433.71174),new s(5397,1.2885,14.2271),new s(4869,.8679,323.5054),new s(4247,.393,227.5262),new s(3252,1.2585,95.9792),new s(3081,3.4366,522.5774),new s(2909,4.6068,202.2534),new s(2856,2.1673,735.8765),new s(1988,2.4505,412.3711),new s(1941,6.0239,209.3669),new s(1581,1.2919,210.1177),new s(1340,4.308,853.1964),new s(1316,1.253,117.3199),new s(1203,1.8665,316.3919),new s(1091,.0753,216.4805),new s(966,.48,632.784),new s(954,5.152,647.011),new s(898,.983,529.691),new s(882,1.885,1052.268),new s(874,1.402,224.345),new s(785,3.064,838.969),new s(740,1.382,625.67),new s(658,4.144,309.278),new s(650,1.725,742.99),new s(613,3.033,63.736),new s(599,2.549,217.231),new s(503,2.13,3.932)],h.g_R2SaturnCoefficients=[new s(436902,4.786717,213.299095),new s(71923,2.5007,206.18555),new s(49767,4.97168,220.41264),new s(43221,3.8694,426.59819),new s(29646,5.9631,7.11355),new s(4721,2.4753,199.072),new s(4142,4.1067,433.7117),new s(3789,3.0977,639.8973),new s(2964,1.3721,103.0928),new s(2556,2.8507,419.4846),new s(2327,0,0),new s(2208,6.2759,110.2063),new s(2188,5.8555,14.2271),new s(1957,4.9245,227.5262),new s(924,5.464,323.505),new s(706,2.971,95.979),new s(546,4.129,412.371),new s(431,5.178,522.577),new s(405,4.173,209.367),new s(391,4.481,216.48),new s(374,5.834,117.32),new s(361,3.277,647.011),new s(356,3.192,210.118),new s(326,2.269,853.196),new s(207,4.022,735.877),new s(204,.088,202.253),new s(180,3.597,632.784),new s(178,4.097,440.825),new s(154,3.135,625.67),new s(148,.136,302.165),new s(133,2.594,191.958),new s(132,5.933,309.278)],h.g_R3SaturnCoefficients=[new s(20315,3.02187,213.2991),new s(8924,3.1914,220.4126),new s(6909,4.3517,206.1855),new s(4087,4.2241,7.1135),new s(3879,2.0106,426.5982),new s(1071,4.2036,199.072),new s(907,2.283,433.712),new s(606,3.175,227.526),new s(597,4.135,14.227),new s(483,1.173,639.897),new s(393,0,0),new s(229,4.698,419.485),new s(188,4.59,110.206),new s(150,3.202,103.093),new s(121,3.768,323.505),new s(102,4.71,95.979),new s(101,5.819,412.371),new s(93,1.44,647.01),new s(84,2.63,216.48),new s(73,4.15,117.32),new s(62,2.31,440.83),new s(55,.31,853.2),new s(50,2.39,209.37),new s(45,4.37,191.96),new s(41,.69,522.58),new s(40,1.84,302.16),new s(38,5.94,88.87),new s(32,4.01,21.34)],h.g_R4SaturnCoefficients=[new s(1202,1.415,220.4126),new s(708,1.162,213.299),new s(516,6.24,206.186),new s(427,2.469,7.114),new s(268,.187,426.598),new s(170,5.959,199.072),new s(150,.48,433.712),new s(145,1.442,227.526),new s(121,2.405,14.227),new s(47,5.57,639.9),new s(19,5.86,647.01),new s(17,.53,440.83),new s(16,2.9,110.21),new s(15,.3,419.48),new s(14,1.3,412.37),new s(13,2.09,323.51),new s(11,.22,95.98),new s(11,2.46,117.32),new s(10,3.14,0),new s(9,1.56,88.87),new s(9,2.28,21.34),new s(9,.68,216.48),new s(8,1.27,234.64)],h.g_R5SaturnCoefficients=[new s(129,5.913,220.413),new s(32,.69,7.11),new s(27,5.91,227.53),new s(20,4.95,433.71),new s(20,.67,14.23),new s(14,2.67,206.19),new s(14,1.46,199.07),new s(13,4.59,426.6),new s(7,4.63,213.3),new s(5,3.61,639.9),new s(4,4.9,440.83),new s(3,4.07,647.01),new s(3,4.66,191.96),new s(3,.49,323.51),new s(3,3.18,419.48),new s(2,3.7,88.87),new s(2,3.32,95.98),new s(2,.56,117.32)],h.g_L0UranusCoefficients=[new s(548129294,0,0),new s(9260408,.8910642,74.7815986),new s(1504248,3.6271926,1.4844727),new s(365982,1.899622,73.297126),new s(272328,3.358237,149.563197),new s(70328,5.39254,63.7359),new s(68893,6.09292,76.26607),new s(61999,2.26952,2.96895),new s(61951,2.85099,11.0457),new s(26469,3.14152,71.81265),new s(25711,6.1138,454.90937),new s(21079,4.36059,148.07872),new s(17819,1.74437,36.64856),new s(14613,4.73732,3.93215),new s(11163,5.82682,224.3448),new s(10998,.48865,138.5175),new s(9527,2.9552,35.1641),new s(7546,5.2363,109.9457),new s(4220,3.2333,70.8494),new s(4052,2.2775,151.0477),new s(3490,5.4831,146.5943),new s(3355,1.0655,4.4534),new s(3144,4.752,77.7505),new s(2927,4.629,9.5612),new s(2922,5.3524,85.8273),new s(2273,4.366,70.3282),new s(2149,.6075,38.133),new s(2051,1.5177,.1119),new s(1992,4.9244,277.035),new s(1667,3.6274,380.1278),new s(1533,2.5859,52.6902),new s(1376,2.0428,65.2204),new s(1372,4.1964,111.4302),new s(1284,3.1135,202.2534),new s(1282,.5427,222.8603),new s(1244,.9161,2.4477),new s(1221,.199,108.4612),new s(1151,4.179,33.6796),new s(1150,.9334,3.1814),new s(1090,1.775,12.5302),new s(1072,.2356,62.2514),new s(946,1.192,127.472),new s(708,5.183,213.299),new s(653,.966,78.714),new s(628,.182,984.6),new s(607,5.432,529.691),new s(559,3.358,.521),new s(524,2.013,299.126),new s(483,2.106,.963),new s(471,1.407,184.727),new s(467,.415,145.11),new s(434,5.521,183.243),new s(405,5.987,8.077),new s(399,.338,415.552),new s(396,5.87,351.817),new s(379,2.35,56.622),new s(310,5.833,145.631),new s(300,5.644,22.091),new s(294,5.839,39.618),new s(252,1.637,221.376),new s(249,4.746,225.829),new s(239,2.35,137.033),new s(224,.516,84.343),new s(223,2.843,.261),new s(220,1.922,67.668),new s(217,6.142,5.938),new s(216,4.778,340.771),new s(208,5.58,68.844),new s(202,1.297,.048),new s(199,.956,152.532),new s(194,1.888,456.394),new s(193,.916,453.425),new s(187,1.319,.16),new s(182,3.536,79.235),new s(173,1.539,160.609),new s(172,5.68,219.891),new s(170,3.677,5.417),new s(169,5.879,18.159),new s(165,1.424,106.977),new s(163,3.05,112.915),new s(158,.738,54.175),new s(147,1.263,59.804),new s(143,1.3,35.425),new s(139,5.386,32.195),new s(139,4.26,909.819),new s(124,1.374,7.114),new s(110,2.027,554.07),new s(109,5.706,77.963),new s(104,5.028,.751),new s(104,1.458,24.379),new s(103,.681,14.978)],h.g_L1UranusCoefficients=[new s(7502543122,0,0),new s(154458,5.242017,74.781599),new s(24456,1.71256,1.48447),new s(9258,.4284,11.0457),new s(8266,1.5022,63.7359),new s(7842,1.3198,149.5632),new s(3899,.4648,3.9322),new s(2284,4.1737,76.2661),new s(1927,.5301,2.9689),new s(1233,1.5863,70.8494),new s(791,5.436,3.181),new s(767,1.996,73.297),new s(482,2.984,85.827),new s(450,4.138,138.517),new s(446,3.723,224.345),new s(427,4.731,71.813),new s(354,2.583,148.079),new s(348,2.454,9.561),new s(317,5.579,52.69),new s(206,2.363,2.448),new s(189,4.202,56.622),new s(184,.284,151.048),new s(180,5.684,12.53),new s(171,3.001,78.714),new s(158,2.909,.963),new s(155,5.591,4.453),new s(154,4.652,35.164),new s(152,2.942,77.751),new s(143,2.59,62.251),new s(121,4.148,127.472),new s(116,3.732,65.22),new s(102,4.188,145.631),new s(102,6.034,.112),new s(88,3.99,18.16),new s(88,6.16,202.25),new s(81,2.64,22.09),new s(72,6.05,70.33),new s(69,4.05,77.96),new s(59,3.7,67.67),new s(47,3.54,351.82),new s(44,5.91,7.11),new s(43,5.72,5.42),new s(39,4.92,222.86),new s(36,5.9,33.68),new s(36,3.29,8.08),new s(36,3.33,71.6),new s(35,5.08,38.13),new s(31,5.62,984.6),new s(31,5.5,59.8),new s(31,5.46,160.61),new s(30,1.66,447.8),new s(29,1.15,462.02),new s(29,4.52,84.34),new s(27,5.54,131.4),new s(27,6.15,299.13),new s(26,4.99,137.03),new s(25,5.74,380.13)],h.g_L2UranusCoefficients=[new s(53033,0,0),new s(2358,2.2601,74.7816),new s(769,4.526,11.046),new s(552,3.258,63.736),new s(542,2.276,3.932),new s(529,4.923,1.484),new s(258,3.691,3.181),new s(239,5.858,149.563),new s(182,6.218,70.849),new s(54,1.44,76.27),new s(49,6.03,56.62),new s(45,3.91,2.45),new s(45,.81,85.83),new s(38,1.78,52.69),new s(37,4.46,2.97),new s(33,.86,9.56),new s(29,5.1,73.3),new s(24,2.11,18.16),new s(22,5.99,138.52),new s(22,4.82,78.71),new s(21,2.4,77.96),new s(21,2.17,224.34),new s(17,2.54,145.63),new s(17,3.47,12.53),new s(12,.02,22.09),new s(11,.08,127.47),new s(10,5.16,71.6),new s(10,4.46,62.25),new s(9,4.26,7.11),new s(8,5.5,67.67),new s(7,1.25,5.42),new s(6,3.36,447.8),new s(6,5.45,65.22),new s(6,4.52,151.05),new s(6,5.73,462.02)],h.g_L3UranusCoefficients=[new s(121,.024,74.782),new s(68,4.12,3.93),new s(53,2.39,11.05),new s(46,0,0),new s(45,2.04,3.18),new s(44,2.96,1.48),new s(25,4.89,63.74),new s(21,4.55,70.85),new s(20,2.31,149.56),new s(9,1.58,56.62),new s(4,.23,18.16),new s(4,5.39,76.27),new s(4,.95,77.96),new s(3,4.98,85.83),new s(3,4.13,52.69),new s(3,.37,78.71),new s(2,.86,145.63),new s(2,5.66,9.56)],h.g_L4UranusCoefficients=[new s(114,3.142,0),new s(6,4.58,74.78),new s(3,.35,11.05),new s(1,3.42,56.62)],h.g_B0UranusCoefficients=[new s(1346278,2.6187781,74.7815986),new s(62341,5.08111,149.5632),new s(61601,3.14159,0),new s(9964,1.616,76.2661),new s(9926,.5763,73.2971),new s(3259,1.2612,224.3448),new s(2972,2.2437,1.4845),new s(2010,6.0555,148.0787),new s(1522,.2796,63.7359),new s(924,4.038,151.048),new s(761,6.14,71.813),new s(522,3.321,138.517),new s(463,.743,85.827),new s(437,3.381,529.691),new s(435,.341,77.751),new s(431,3.554,213.299),new s(420,5.213,11.046),new s(245,.788,2.969),new s(233,2.257,222.86),new s(216,1.591,38.133),new s(180,3.725,299.126),new s(175,1.236,146.594),new s(174,1.937,380.128),new s(160,5.336,111.43),new s(144,5.962,35.164),new s(116,5.739,70.849),new s(106,.941,70.328),new s(102,2.619,78.714)],h.g_B1UranusCoefficients=[new s(206366,4.123943,74.781599),new s(8563,.3382,149.5632),new s(1726,2.1219,73.2971),new s(1374,0,0),new s(1369,3.0686,76.2661),new s(451,3.777,1.484),new s(400,2.848,224.345),new s(307,1.255,148.079),new s(154,3.786,63.736),new s(112,5.573,151.048),new s(111,5.329,138.517),new s(83,3.59,71.81),new s(56,3.4,85.83),new s(54,1.7,77.75),new s(42,1.21,11.05),new s(41,4.45,78.71),new s(32,3.77,222.86),new s(30,2.56,2.97),new s(27,5.34,213.3),new s(26,.42,380.13)],h.g_B2UranusCoefficients=[new s(9212,5.8004,74.7816),new s(557,0,0),new s(286,2.177,149.563),new s(95,3.84,73.3),new s(45,4.88,76.27),new s(20,5.46,1.48),new s(15,.88,138.52),new s(14,2.85,148.08),new s(14,5.07,63.74),new s(10,5,224.34),new s(8,6.27,78.71)],h.g_B3UranusCoefficients=[new s(268,1.251,74.782),new s(11,3.14,0),new s(6,4.01,149.56),new s(3,5.78,73.3)],h.g_B4UranusCoefficients=[new s(6,2.85,74.78)],h.g_R0UranusCoefficients=[new s(1921264848,0,0),new s(88784984,5.60377527,74.78159857),new s(3440836,.328361,73.2971259),new s(2055653,1.7829517,149.5631971),new s(649322,4.522473,76.266071),new s(602248,3.860038,63.735898),new s(496404,1.401399,454.909367),new s(338526,1.580027,138.517497),new s(243508,1.570866,71.812653),new s(190522,1.998094,1.484473),new s(161858,2.791379,148.078724),new s(143706,1.383686,11.0457),new s(93192,.17437,36.64856),new s(89806,3.66105,109.94569),new s(71424,4.24509,224.3448),new s(46677,1.39977,35.16409),new s(39026,3.36235,277.03499),new s(39010,1.66971,70.84945),new s(36755,3.88649,146.59425),new s(30349,.701,151.04767),new s(29156,3.18056,77.75054),new s(25786,3.78538,85.8273),new s(25620,5.25656,380.12777),new s(22637,.72519,529.69097),new s(20473,2.7964,70.32818),new s(20472,1.55589,202.2534),new s(17901,.55455,2.96895),new s(15503,5.35405,38.13304),new s(14702,4.90434,108.46122),new s(12897,2.62154,111.43016),new s(12328,5.96039,127.4718),new s(11959,1.75044,984.60033),new s(11853,.99343,52.6902),new s(11696,3.29826,3.93215),new s(11495,.43774,65.22037),new s(10793,1.42105,213.2991),new s(9111,4.9964,62.2514),new s(8421,5.2535,222.8603),new s(8402,5.0388,415.5525),new s(7449,.7949,351.8166),new s(7329,3.9728,183.2428),new s(6046,5.6796,78.7138),new s(5524,3.115,9.5612),new s(5445,5.1058,145.1098),new s(5238,2.6296,33.6796),new s(4079,3.2206,340.7709),new s(3919,4.2502,39.6175),new s(3802,6.1099,184.7273),new s(3781,3.4584,456.3938),new s(3687,2.4872,453.4249),new s(3102,4.1403,219.8914),new s(2963,.8298,56.6224),new s(2942,.4239,299.1264),new s(2940,2.1464,137.033),new s(2938,3.6766,140.002),new s(2865,.31,12.5302),new s(2538,4.8546,131.4039),new s(2364,.4425,554.07),new s(2183,2.9404,305.3462)],h.g_R1UranusCoefficients=[new s(1479896,3.6720571,74.7815986),new s(71212,6.22601,63.7359),new s(68627,6.13411,149.5632),new s(24060,3.14159,0),new s(21468,2.60177,76.26607),new s(20857,5.24625,11.0457),new s(11405,.01848,70.84945),new s(7497,.4236,73.2971),new s(4244,1.4169,85.8273),new s(3927,3.1551,71.8127),new s(3578,2.3116,224.3448),new s(3506,2.5835,138.5175),new s(3229,5.255,3.9322),new s(3060,.1532,1.4845),new s(2564,.9808,148.0787),new s(2429,3.9944,52.6902),new s(1645,2.6535,127.4718),new s(1584,1.4305,78.7138),new s(1508,5.06,151.0477),new s(1490,2.6756,56.6224),new s(1413,4.5746,202.2534),new s(1403,1.3699,77.7505),new s(1228,1.047,62.2514),new s(1033,.2646,131.4039),new s(992,2.172,65.22),new s(862,5.055,351.817),new s(744,3.076,35.164),new s(687,2.499,77.963),new s(647,4.473,70.328),new s(624,.863,9.561),new s(604,.907,984.6),new s(575,3.231,447.796),new s(562,2.718,462.023),new s(530,5.917,213.299),new s(528,5.151,2.969)],h.g_R2UranusCoefficients=[new s(22440,.69953,74.7816),new s(4727,1.699,63.7359),new s(1682,4.6483,70.8494),new s(1650,3.0966,11.0457),new s(1434,3.5212,149.5632),new s(770,0,0),new s(500,6.172,76.266),new s(461,.767,3.932),new s(390,4.496,56.622),new s(390,5.527,85.827),new s(292,.204,52.69),new s(287,3.534,73.297),new s(273,3.847,138.517),new s(220,1.964,131.404),new s(216,.848,77.963),new s(205,3.248,78.714),new s(149,4.898,127.472),new s(129,2.081,3.181)],h.g_R3UranusCoefficients=[new s(1164,4.7345,74.7816),new s(212,3.343,63.736),new s(196,2.98,70.849),new s(105,.958,11.046),new s(73,1,149.56),new s(72,.03,56.62),new s(55,2.59,3.93),new s(36,5.65,77.96),new s(34,3.82,76.27),new s(32,3.6,131.4)],h.g_R4UranusCoefficients=[new s(53,3.01,74.78),new s(10,1.91,56.62)],h.g_L0VenusCoefficients=[new s(317614667,0,0),new s(1353968,5.5931332,10213.2855462),new s(89892,5.3065,20426.57109),new s(5477,4.4163,7860.4194),new s(3456,2.6996,11790.6291),new s(2372,2.9938,3930.2097),new s(1664,4.2502,1577.3435),new s(1438,4.1575,9683.5946),new s(1317,5.1867,26.2983),new s(1201,6.1536,30639.8566),new s(769,.816,9437.763),new s(761,1.95,529.691),new s(708,1.065,775.523),new s(585,3.998,191.448),new s(500,4.123,15720.839),new s(429,3.586,19367.189),new s(327,5.677,5507.553),new s(326,4.591,10404.734),new s(232,3.163,9153.904),new s(180,4.653,1109.379),new s(155,5.57,19651.048),new s(128,4.226,20.775),new s(128,.962,5661.332),new s(106,1.537,801.821)],h.g_L1VenusCoefficients=[new s(0xedcd611dcd,0,0),new s(95708,2.46424,10213.28555),new s(14445,.51625,20426.57109),new s(213,1.795,30639.857),new s(174,2.655,26.298),new s(152,6.106,1577.344),new s(82,5.7,191.45),new s(70,2.68,9437.76),new s(52,3.6,775.52),new s(38,1.03,529.69),new s(30,1.25,5507.55),new s(25,6.11,10404.73)],h.g_L2VenusCoefficients=[new s(54127,0,0),new s(3891,.3451,10213.2855),new s(1338,2.0201,20426.5711),new s(24,2.05,26.3),new s(19,3.54,30639.86),new s(10,3.97,775.52),new s(7,1.52,1577.34),new s(6,1,191.45)],h.g_L3VenusCoefficients=[new s(136,4.804,10213.286),new s(78,3.67,20426.57),new s(26,0,0)],h.g_L4VenusCoefficients=[new s(114,3.1416,0),new s(3,5.21,20426.57),new s(2,2.51,10213.29)],h.g_L5VenusCoefficients=[new s(1,3.14,0)],h.g_B0VenusCoefficients=[new s(5923638,.2670278,10213.2855462),new s(40108,1.14737,20426.57109),new s(32815,3.14737,0),new s(1011,1.0895,30639.8566),new s(149,6.254,18073.705),new s(138,.86,1577.344),new s(130,3.672,9437.763),new s(120,3.705,2352.866),new s(108,4.539,22003.915)],h.g_B1VenusCoefficients=[new s(513348,1.803643,10213.285546),new s(4380,3.3862,20426.5711),new s(199,0,0),new s(197,2.53,30639.857)],h.g_B2VenusCoefficients=[new s(22378,3.38509,10213.28555),new s(282,0,0),new s(173,5.256,20426.571),new s(27,3.87,30639.86)],h.g_B3VenusCoefficients=[new s(647,4.992,10213.286),new s(20,3.14,0),new s(6,.77,20426.57),new s(3,5.44,30639.86)],h.g_B4VenusCoefficients=[new s(14,.32,10213.29)],h.g_R0VenusCoefficients=[new s(72334821,0,0),new s(489824,4.021518,10213.285546),new s(1658,4.9021,20426.5711),new s(1632,2.8455,7860.4194),new s(1378,1.1285,11790.6291),new s(498,2.587,9683.595),new s(374,1.423,3930.21),new s(264,5.529,9437.763),new s(237,2.551,15720.839),new s(222,2.013,19367.189),new s(126,2.728,1577.344),new s(119,3.02,10404.734)],h.g_R1VenusCoefficients=[new s(34551,.89199,10213.28555),new s(234,1.772,20426.571),new s(234,3.142,0)],h.g_R2VenusCoefficients=[new s(1407,5.0637,10213.2855),new s(16,5.47,20426.57),new s(13,0,0)],h.g_R3VenusCoefficients=[new s(50,3.22,10213.29)],h.g_R4VenusCoefficients=[new s(1,.92,10213.29)],tb._galDetails=new D,tb._jupDetails=new x,tb._jupPhisical=new Z,tb._jDateLast=0,Fb.vertLoc=0,Fb.initialized=!1,Fb._prog=null,Gb.vertLoc=0,Gb.colorLoc=0,Gb.timeLoc=0,Gb.initialized=!1,Gb._prog=null,Hb.vertLoc=0,Hb.colorLoc=0,Hb.pointSizeLoc=0,Hb.timeLoc=0,Hb.initialized=!1,Hb._prog=null,Ib.vertLoc=0,Ib.textureLoc=0,Ib.initialized=!1,Ib._prog=null,Jb.vertLoc=0,Jb.textureLoc=0,Jb.initialized=!1,Jb._prog=null,Mb._eclipticCount=0,Mb._eclipticYear=0,Mb._monthDays=[31,28.2421,31,30,31,30,31,31,30,31,30,31],Mb._monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"],Mb._eclipticTextYear=0,Pb._version=0,Pb._tourLayers=!1,Pb._layerMaps={},Pb._layerMapsTours={},Pb._allMaps={},Pb._allMapsTours={},Pb._currentMap="Earth",Pb._layerList={},Pb._layerListTours={},Pb.initLayers(),Rb._type=null,Ub._initBegun=!1,Zb.highPercision=!0,Zb.showActualSize=bc.get_active().get_actualPlanetScale(),Zb.RC=Math.PI/180,Zb._jNow=0,Zb._lastPlanetCenterID=-2,Zb._orbitalSampleRate=256,Zb._obliquity=23.5*Zb.RC,Zb._drawOrder={},Zb._lastUpdate=new Date,Zb._ringsTriangleLists=new Array(2),Zb._ringImage=null,$b.back=0,_b.width=1024,_b.height=768,_b._contractionInPixels=-.5,_b.trianglesRendered=0,_b.trianglesCulled=0,_b.renderingOn=!0,_b._factor=1,_b.cullInside=!0,_b._hw=0,_b._qw=0,_b._hh=0,_b._qh=0,bc._active=null,bc.tourSettings=null,ec._caches={},ec._allGlyphs="",gc.last=ss.now(),gc._offset=0,gc._now=ss.now(),gc._syncToClock=!0,gc._timeRate=1,gc._altitude=0,ic.currentRenderGeneration=0,ic.tileTargetX=-1,ic.tileTargetY=-1,ic.tileTargetLevel=-1,ic.tilesInView=0,ic.trianglesRendered=0,ic.tilesTouched=0,ic.frustumList=null,ic.prepDevice=null,ic.uvMultiple=256,ic.callCount=0,ic.useAccomidation=!0,ic.demEnabled=!1,ic.maxLevel=20,ic.meshComplexity=50,ic.imageQuality=50,ic.lastDeepestLevel=0,ic.deepestLevel=0,ic.RC=3.1415927/180,jc._queue={},jc._tiles={},jc.openThreads=8,jc.readyToRenderCount=0,jc.maxTileCacheSize=800,jc.maxReadyToRenderSize=200,jc.accessID=0,jc._maxTotalToPurge=0,nc.clipboardFormat="WorldWideTelescope.Overlay",nc.nextId=11231,nc.RC=3.1415927/180,qc._playing=!1,qc._switchedToFullScreen=!1,qc.noRestoreUIOnStop=!1,sc.clipboardFormat="WorldWideTelescope.Slide",vc.kilometersPerAu=149598e3,vc.auPerParsec=206264.806,vc.auPerLightYear=63239.6717,vc.ssmUnitConversion=370,yc._nextId=11232,Ac.earthRadius=6371e3,Ec.imageSets=[],Ec.exploreRoot=new ad,Ec.startLat=0,Ec.startLng=0,Ec.startZoom=360,Ec.startMode="Sky",Ec.imageSetName="",Ec.showDataLayers=!1,Ec._renderNeeded=!1,Ec.constellationsFigures=null,Ec.constellationsBoundries=null,Ec.singleton=new Ec,Ec.singleton.renderContext=new $b,gc.last=ss.now(),gc.updateClock(),Lc.RC=.017453292519943,Lc._maxSeperation=.745,Lc.containment=Lc.create("Constellations","http://www.worldwidetelescope.org/data/constellations.txt",!0,!0,!0),Lc._constToDraw="",Lc.selectedSegment=null,Lc._artFile=null,Lc.artwork=null,Lc.boundries=null,function(){var a="http://www.worldwidetelescope.org/wwtweb/catalog.aspx?q=ConstellationNamePositions_EN"; Lc._webFileConstNames=new Cc(a),Lc._webFileConstNames.onStateChange=Lc._loadNames,Lc._webFileConstNames.send()}(),Oc.families={},Pc.RC=3.1415927/180,Pc.RCRA=3.1415927/12,Pc.radius=1,Pc._rotationMatrix=null,Uc._s_identity=Uc._createIdentity(),bd._downloading=!1,bd._imagesLoaded=!1,bd._imageLoadCount=0,function(){document.getElementById("canvas")}(),md._circleTexture$1=null,qd.slashIndexBuffer=new Array(64),qd.backSlashIndexBuffer=new Array(64),qd.rootIndexBuffer=new Array(4),Kh}();