232 lines
232 KiB
JavaScript
232 lines
232 KiB
JavaScript
|
/**
|
||
|
* Cesium - https://github.com/AnalyticalGraphicsInc/cesium
|
||
|
*
|
||
|
* Copyright 2011-2017 Cesium Contributors
|
||
|
*
|
||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
|
* you may not use this file except in compliance with the License.
|
||
|
* You may obtain a copy of the License at
|
||
|
*
|
||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||
|
*
|
||
|
* Unless required by applicable law or agreed to in writing, software
|
||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
|
* See the License for the specific language governing permissions and
|
||
|
* limitations under the License.
|
||
|
*
|
||
|
* Columbus View (Pat. Pend.)
|
||
|
*
|
||
|
* Portions licensed separately.
|
||
|
* See https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md for full licensing details.
|
||
|
*/
|
||
|
/**
|
||
|
@license
|
||
|
mersenne-twister.js - https://gist.github.com/banksean/300494
|
||
|
|
||
|
Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
|
||
|
All rights reserved.
|
||
|
|
||
|
Redistribution and use in source and binary forms, with or without
|
||
|
modification, are permitted provided that the following conditions
|
||
|
are met:
|
||
|
|
||
|
1. Redistributions of source code must retain the above copyright
|
||
|
notice, this list of conditions and the following disclaimer.
|
||
|
|
||
|
2. Redistributions in binary form must reproduce the above copyright
|
||
|
notice, this list of conditions and the following disclaimer in the
|
||
|
documentation and/or other materials provided with the distribution.
|
||
|
|
||
|
3. The names of its contributors may not be used to endorse or promote
|
||
|
products derived from this software without specific prior written
|
||
|
permission.
|
||
|
|
||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
@license
|
||
|
when.js - https://github.com/cujojs/when
|
||
|
|
||
|
MIT License (c) copyright B Cavalier & J Hann
|
||
|
|
||
|
* A lightweight CommonJS Promises/A and when() implementation
|
||
|
* when is part of the cujo.js family of libraries (http://cujojs.com/)
|
||
|
*
|
||
|
* Licensed under the MIT License at:
|
||
|
* http://www.opensource.org/licenses/mit-license.php
|
||
|
*
|
||
|
* @version 1.7.1
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
@license
|
||
|
sprintf.js from the php.js project - https://github.com/kvz/phpjs
|
||
|
Directly from https://github.com/kvz/phpjs/blob/master/functions/strings/sprintf.js
|
||
|
|
||
|
php.js is copyright 2012 Kevin van Zonneveld.
|
||
|
|
||
|
Portions copyright Brett Zamir (http://brett-zamir.me), Kevin van Zonneveld
|
||
|
(http://kevin.vanzonneveld.net), Onno Marsman, Theriault, Michael White
|
||
|
(http://getsprink.com), Waldo Malqui Silva, Paulo Freitas, Jack, Jonas
|
||
|
Raoni Soares Silva (http://www.jsfromhell.com), Philip Peterson, Legaev
|
||
|
Andrey, Ates Goral (http://magnetiq.com), Alex, Ratheous, Martijn Wieringa,
|
||
|
Rafa? Kukawski (http://blog.kukawski.pl), lmeyrick
|
||
|
(https://sourceforge.net/projects/bcmath-js/), Nate, Philippe Baumann,
|
||
|
Enrique Gonzalez, Webtoolkit.info (http://www.webtoolkit.info/), Carlos R.
|
||
|
L. Rodrigues (http://www.jsfromhell.com), Ash Searle
|
||
|
(http://hexmen.com/blog/), Jani Hartikainen, travc, Ole Vrijenhoek,
|
||
|
Erkekjetter, Michael Grier, Rafa? Kukawski (http://kukawski.pl), Johnny
|
||
|
Mast (http://www.phpvrouwen.nl), T.Wild, d3x,
|
||
|
http://stackoverflow.com/questions/57803/how-to-convert-decimal-to-hex-in-javascript,
|
||
|
Rafa? Kukawski (http://blog.kukawski.pl/), stag019, pilus, WebDevHobo
|
||
|
(http://webdevhobo.blogspot.com/), marrtins, GeekFG
|
||
|
(http://geekfg.blogspot.com), Andrea Giammarchi
|
||
|
(http://webreflection.blogspot.com), Arpad Ray (mailto:arpad@php.net),
|
||
|
gorthaur, Paul Smith, Tim de Koning (http://www.kingsquare.nl), Joris, Oleg
|
||
|
Eremeev, Steve Hilder, majak, gettimeofday, KELAN, Josh Fraser
|
||
|
(http://onlineaspect.com/2007/06/08/auto-detect-a-time-zone-with-javascript/),
|
||
|
Marc Palau, Martin
|
||
|
(http://www.erlenwiese.de/), Breaking Par Consulting Inc
|
||
|
(http://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87256CFB006C45F7),
|
||
|
Chris, Mirek Slugen, saulius, Alfonso Jimenez
|
||
|
(http://www.alfonsojimenez.com), Diplom@t (http://difane.com/), felix,
|
||
|
Mailfaker (http://www.weedem.fr/), Tyler Akins (http://rumkin.com), Caio
|
||
|
Ariede (http://caioariede.com), Robin, Kankrelune
|
||
|
(http://www.webfaktory.info/), Karol Kowalski, Imgen Tata
|
||
|
(http://www.myipdf.com/), mdsjack (http://www.mdsjack.bo.it), Dreamer,
|
||
|
Felix Geisendoerfer (http://www.debuggable.com/felix), Lars Fischer, AJ,
|
||
|
David, Aman Gupta, Michael White, Public Domain
|
||
|
(http://www.json.org/json2.js), Steven Levithan
|
||
|
(http://blog.stevenlevithan.com), Sakimori, Pellentesque Malesuada,
|
||
|
Thunder.m, Dj (http://phpjs.org/functions/htmlentities:425#comment_134018),
|
||
|
Steve Clay, David James, Francois, class_exists, nobbler, T. Wild, Itsacon
|
||
|
(http://www.itsacon.net/), date, Ole Vrijenhoek (http://www.nervous.nl/),
|
||
|
Fox, Raphael (Ao RUDLER), Marco, noname, Mateusz "loonquawl" Zalega, Frank
|
||
|
Forte, Arno, ger, mktime, john (http://www.jd-tech.net), Nick Kolosov
|
||
|
(http://sammy.ru), marc andreu, Scott Cariss, Douglas Crockford
|
||
|
(http://javascript.crockford.com), madipta, Slawomir Kaniecki,
|
||
|
ReverseSyntax, Nathan, Alex Wilson, kenneth, Bayron Guevara, Adam Wallner
|
||
|
(http://web2.bitbaro.hu/), paulo kuong, jmweb, Lincoln Ramsay, djmix,
|
||
|
Pyerre, Jon Hohle, Thiago Mata (http://thiagomata.blog.com), lmeyrick
|
||
|
(https://sourceforge.net/projects/bcmath-js/this.), Linuxworld, duncan,
|
||
|
Gilbert, Sanjoy Roy, Shingo, sankai, Oskar Larsson H?gfeldt
|
||
|
(http://oskar-lh.name/), Denny Wardhana, 0m3r, Everlasto, Subhasis Deb,
|
||
|
josh, jd, Pier Paolo Ramon (http://www.mastersoup.com/), P, merabi, Soren
|
||
|
Hansen, Eugene Bulkin (http://doubleaw.com/), Der Simon
|
||
|
(http://innerdom.sourceforge.net/), echo is bad, Ozh, XoraX
|
||
|
(http://www.xorax.info), EdorFaus, JB, J A R, Marc Jansen, Francesco, LH,
|
||
|
Stoyan Kyosev (http://www.svest.org/), nord_ua, omid
|
||
|
(http://phpjs.org/functions/380:380#comment_137122), Brad Touesnard, MeEtc
|
||
|
(http://yass.meetcweb.com), Peter-Paul Koch
|
||
|
(http://www.quirksmode.org/js/beat.html), Olivier Louvignes
|
||
|
(http://mg-crea.com/), T0bsn, Tim Wiel, Bryan Elliott, Jalal Berrami,
|
||
|
Martin, JT, David Randall, Thomas Beaucourt (http://www.webapp.fr), taith,
|
||
|
vlado houba, Pierre-Luc Paour, Kristof Coomans (SCK-CEN Belgian Nucleair
|
||
|
Research Centre), Martin Pool, Kirk Strobeck, Rick Waldron, Brant Messenger
|
||
|
(http://www.brantmessenger.com/), Devan Penner-Woelk, Saulo Vallory, Wagner
|
||
|
B. Soares, Artur Tchernychev, Valentina De Rosa, Jason Wong
|
||
|
(http://carrot.org/), Christoph, Daniel Esteban, strftime, Mick@el, rezna,
|
||
|
Simon Willison (http://simonwillison.net), Anton Ongson, Gabriel Paderni,
|
||
|
Marco van Oort, penutbutterjelly, Philipp Lenssen, Bjorn Roesbeke
|
||
|
(http://www.bjornroesbeke.be/), Bug?, Eric Nagel, Tomasz Wesolowski,
|
||
|
Evertjan Garretsen, Bobby Drake, Blues (http://tech.bluesmoon.info/), Luke
|
||
|
Godfrey, Pul, uestla, Alan C, Ulrich, Rafal Kukawski, Yves Sucaet,
|
||
|
sowberry, Norman "zEh" Fuchs, hitwork, Zahlii, johnrembo, Nick Callen,
|
||
|
Steven Levithan (stevenlevithan.com), ejsanders, Scott Baker, Brian Tafoya
|
||
|
(http://www.premasolutions.com/), Philippe Jausions
|
||
|
(http://pear.php.net/user/jausions), Aidan Lister
|
||
|
(http://aidanlister.com/), Rob, e-mike, HKM, ChaosNo1, metjay, strcasecmp,
|
||
|
strcmp, Taras Bogach, jpfle, Alexander Ermolaev
|
||
|
(http://snippets.dzone.com/user/AlexanderErmolaev), DxGx, kilops, Orlando,
|
||
|
dptr1988, Le Torbi, James (http://www.james-bell.co.uk/), Pedro Tainha
|
||
|
(http://www.pedrotainha.com), James, Arnout Kazemier
|
||
|
(http://www.3rd-Eden.com), Chris McMacken, gabriel paderni, Yannoo,
|
||
|
FGFEmperor, baris ozdil, Tod Gentille, Greg Frazier, jakes, 3D-GRAF, Allan
|
||
|
Jensen (http://www.winternet.no), Howard Yeend, Benjamin Lupton, davook,
|
||
|
daniel airton wermann (http://wermann.com.br), Atli T¨®r, Maximusya, Ryan
|
||
|
W Tenney (http://ryan.10e.us), Alexander M Beedie, fearphage
|
||
|
(http://http/my.opera.com/fearphage/), Nathan Sepulveda, Victor, Matteo,
|
||
|
Billy, stensi, Cord, Manish, T.J. Leahy, Riddler
|
||
|
(http://www.frontierwebdev.com/), Rafa? Kukawski, FremyCompany, Matt
|
||
|
Bradley, Tim de Koning, Luis Salazar (http://www.freaky-media.com/), Diogo
|
||
|
Resende, Rival, Andrej Pavlovic, Garagoth, Le Torbi
|
||
|
(http://www.letorbi.de/), Dino, Josep Sanz (http://www.ws3.es/), rem,
|
||
|
Russell Walker (http://www.nbill.co.uk/), Jamie Beck
|
||
|
(http://www.terabit.ca/), setcookie, Michael, YUI Library:
|
||
|
http://developer.yahoo.com/yui/docs/YAHOO.util.DateLocale.html, Blues at
|
||
|
http://hacks.bluesmoon.info/strftime/strftime.js, Ben
|
||
|
(http://benblume.co.uk/), DtTvB
|
||
|
(http://dt.in.th/2008-09-16.string-length-in-bytes.html), Andreas, William,
|
||
|
meo, incidence, Cagri Ekin, Amirouche, Amir Habibi
|
||
|
(http://www.residence-mixte.com/), Luke Smith (http://lucassmith.name),
|
||
|
Kheang Hok Chin (http://www.distantia.ca/), Jay Klehr, Lorenzo Pisani,
|
||
|
Tony, Yen-Wei Liu, Greenseed, mk.keck, Leslie Hoare, dude, booeyOH, Ben
|
||
|
Bryan
|
||
|
|
||
|
Licensed under the MIT (MIT-LICENSE.txt) license.
|
||
|
|
||
|
Permission is hereby granted, free of charge, to any person obtaining a
|
||
|
copy of this software and associated documentation files (the
|
||
|
"Software"), to deal in the Software without restriction, including
|
||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||
|
permit persons to whom the Software is furnished to do so, subject to
|
||
|
the following conditions:
|
||
|
|
||
|
The above copyright notice and this permission notice shall be included
|
||
|
in all copies or substantial portions of the Software.
|
||
|
|
||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||
|
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||
|
IN NO EVENT SHALL KEVIN VAN ZONNEVELD BE LIABLE FOR ANY CLAIM, DAMAGES
|
||
|
OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||
|
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||
|
OTHER DEALINGS IN THE SOFTWARE.
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
* @license
|
||
|
*
|
||
|
* Grauw URI utilities
|
||
|
*
|
||
|
* See: http://hg.grauw.nl/grauw-lib/file/tip/src/uri.js
|
||
|
*
|
||
|
* @author Laurens Holst (http://www.grauw.nl/)
|
||
|
*
|
||
|
* Copyright 2012 Laurens Holst
|
||
|
*
|
||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
|
* you may not use this file except in compliance with the License.
|
||
|
* You may obtain a copy of the License at
|
||
|
*
|
||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||
|
*
|
||
|
* Unless required by applicable law or agreed to in writing, software
|
||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
|
* See the License for the specific language governing permissions and
|
||
|
* limitations under the License.
|
||
|
*
|
||
|
*/
|
||
|
|
||
|
!function(){define("Core/defined",[],function(){"use strict";function e(e){return void 0!==e&&null!==e}return e}),define("Core/DeveloperError",["./defined"],function(e){"use strict";function t(e){this.name="DeveloperError",this.message=e;var t;try{throw new Error}catch(r){t=r.stack}this.stack=t}return e(Object.create)&&(t.prototype=Object.create(Error.prototype),t.prototype.constructor=t),t.prototype.toString=function(){var t=this.name+": "+this.message;return e(this.stack)&&(t+="\n"+this.stack.toString()),t},t.throwInstantiationError=function(){throw new t("This function defines an interface and should not be called directly.")},t}),define("Core/Check",["./defined","./DeveloperError"],function(e,t){"use strict";function r(e){return e+" is required, actual value was undefined"}function n(e,t,r){return"Expected "+r+" to be typeof "+t+", actual typeof was "+e}var o={};return o.typeOf={},o.defined=function(n,o){if(!e(o))throw new t(r(n))},o.typeOf.func=function(e,r){if("function"!=typeof r)throw new t(n(typeof r,"function",e))},o.typeOf.string=function(e,r){if("string"!=typeof r)throw new t(n(typeof r,"string",e))},o.typeOf.number=function(e,r){if("number"!=typeof r)throw new t(n(typeof r,"number",e))},o.typeOf.number.lessThan=function(e,r,n){if(o.typeOf.number(e,r),r>=n)throw new t("Expected "+e+" to be less than "+n+", actual value was "+r)},o.typeOf.number.lessThanOrEquals=function(e,r,n){if(o.typeOf.number(e,r),r>n)throw new t("Expected "+e+" to be less than or equal to "+n+", actual value was "+r)},o.typeOf.number.greaterThan=function(e,r,n){if(o.typeOf.number(e,r),n>=r)throw new t("Expected "+e+" to be greater than "+n+", actual value was "+r)},o.typeOf.number.greaterThanOrEquals=function(e,r,n){if(o.typeOf.number(e,r),n>r)throw new t("Expected "+e+" to be greater than or equal to"+n+", actual value was "+r)},o.typeOf.object=function(e,r){if("object"!=typeof r)throw new t(n(typeof r,"object",e))},o.typeOf.bool=function(e,r){if("boolean"!=typeof r)throw new t(n(typeof r,"boolean",e))},o.typeOf.number.equals=function(e,r,n,i){if(o.typeOf.number(e,n),o.typeOf.number(r,i),n!==i)throw new t(e+" must be equal to "+r+", the actual values are "+n+" and "+i)},o}),define("Core/freezeObject",["./defined"],function(e){"use strict";var t=Object.freeze;return e(t)||(t=function(e){return e}),t}),define("Core/defaultValue",["./freezeObject"],function(e){"use strict";function t(e,t){return void 0!==e&&null!==e?e:t}return t.EMPTY_OBJECT=e({}),t}),define("ThirdParty/mersenne-twister",[],function(){var e=function(e){void 0==e&&(e=(new Date).getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,this.init_genrand(e)};return e.prototype.init_genrand=function(e){for(this.mt[0]=e>>>0,this.mti=1;this.mti<this.N;this.mti++){var e=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30;this.mt[this.mti]=(1812433253*((4294901760&e)>>>16)<<16)+1812433253*(65535&e)+this.mti,this.mt[this.mti]>>>=0}},e.prototype.genrand_int32=function(){var e,t=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var r;for(this.mti==this.N+1&&this.init_genrand(5489),r=0;r<this.N-this.M;r++)e=this.mt[r]&this.UPPER_MASK|this.mt[r+1]&this.LOWER_MASK,this.mt[r]=this.mt[r+this.M]^e>>>1^t[1&e];for(;r<this.N-1;r++)e=this.mt[r]&this.UPPER_MASK|this.mt[r+1]&this.LOWER_MASK,this.mt[r]=this.mt[r+(this.M-this.N)]^e>>>1^t[1&e];e=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^e>>>1^t[1&e],this.mti=0}return e=this.mt[this.mti++],e^=e>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,e^=e>>>18,e>>>0},e.prototype.random=function(){return this.genrand_int32()*(1/4294967296)},e}),define("Core/Math",["../ThirdParty/mersenne-twister","./Check","./defaultValue","./defined","./DeveloperError"],function(e,t,r,n,o){"use strict";var i={};i.Radious=6378137,i.EPSILON1=.1,i.EPSILON2=.01,i.EPSILON3=.001,i.EPSILON4=1e-4,i.EPSILON5=1e-5,i.EPSILON6=1e-6,i.EPSILON7=1e-7,i.EPSILON8=1e-8,i.EPSILON9=1e-9,i.EPSILON10=1e-10,i.EPSILON11=1e-11,i.EPSILON12=1e-12,i.EPSILON13=1e-13
|
||
|
d=e.then,p=t,h=E,m(f,e),l=f=w,e},s}function u(e){return e&&"function"==typeof e.then}function s(t,r,n,o,i){return y(2,arguments),e(t,function(t){function u(e){m(e)}function s(e){p(e)}var c,f,l,d,h,p,m,y,O,_;if(O=t.length>>>0,c=Math.max(0,Math.min(r,O)),l=[],f=O-c+1,d=[],h=a(),c)for(y=h.progress,m=function(e){d.push(e),--f||(p=m=E,h.reject(d))},p=function(e){l.push(e),--c||(p=m=E,h.resolve(l))},_=0;O>_;++_)_ in t&&e(t[_],s,u,y);else h.resolve(l);return h.then(n,o,i)})}function c(e,t,r,n){function o(e){return t?t(e[0]):e[0]}return s(e,1,o,r,n)}function f(e,t,r,n){return y(1,arguments),d(e,O).then(t,r,n)}function l(){return d(arguments,O)}function d(t,r){return e(t,function(t){var n,o,i,u,s,c;if(i=o=t.length>>>0,n=[],c=a(),i)for(u=function(t,o){e(t,r).then(function(e){n[o]=e,--i||c.resolve(n)},c.reject)},s=0;o>s;s++)s in t?u(t[s],s):--i;else c.resolve(n);return c.promise})}function h(t,r){var n=R.call(arguments,1);return e(t,function(t){var o;return o=t.length,n[0]=function(t,n,i){return e(t,function(t){return e(n,function(e){return r(t,e,i,o)})})},_.apply(t,n)})}function p(t,r,n){var o=arguments.length>2;return e(t,function(e){return e=o?n:e,r.resolve(e),e},function(e){return r.reject(e),i(e)},r.progress)}function m(e,t){for(var r,n=0;r=e[n++];)r(t)}function y(e,t){for(var r,n=t.length;n>e;)if(r=t[--n],null!=r&&"function"!=typeof r)throw new Error("arg "+n+" must be a function")}function E(){}function O(e){return e}var _,R,w;return e.defer=a,e.resolve=t,e.reject=r,e.join=l,e.all=f,e.map=d,e.reduce=h,e.any=c,e.some=s,e.chain=p,e.isPromise=u,n.prototype={always:function(e,t){return this.then(e,e,t)},otherwise:function(e){return this.then(w,e)},"yield":function(e){return this.then(function(){return e})},spread:function(e){return this.then(function(t){return f(t,function(t){return e.apply(w,t)})})}},R=[].slice,_=[].reduce||function(e){var t,r,n,o,i;if(i=0,t=Object(this),o=t.length>>>0,r=arguments,r.length<=1)for(;;){if(i in t){n=t[i++];break}if(++i>=o)throw new TypeError}else n=r[1];for(;o>i;++i)i in t&&(n=e(n,t[i],i,t));return n},e})}("function"==typeof define&&define.amd?define:function(e){"object"==typeof exports?module.exports=e():this.when=e()}),define("Core/FeatureDetection",["./defaultValue","./defined","./Fullscreen","./RuntimeError","../ThirdParty/when"],function(e,t,r,n,o){"use strict";function i(e){for(var t=e.split("."),r=0,n=t.length;n>r;++r)t[r]=parseInt(t[r],10);return t}function a(){if(!t(S)&&(S=!1,!p())){var e=/ Chrome\/([\.0-9]+)/.exec(C.userAgent);null!==e&&(S=!0,v=i(e[1]))}return S}function u(){return a()&&v}function s(){if(!t(I)&&(I=!1,!a()&&!p()&&/ Safari\/[\.0-9]+/.test(C.userAgent))){var e=/ Version\/([\.0-9]+)/.exec(C.userAgent);null!==e&&(I=!0,N=i(e[1]))}return I}function c(){return s()&&N}function f(){if(!t(M)){M=!1;var e=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(C.userAgent);null!==e&&(M=!0,x=i(e[1]),x.isNightly=!!e[2])}return M}function l(){return f()&&x}function d(){if(!t(P)){P=!1;var e;"Microsoft Internet Explorer"===C.appName?(e=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(C.userAgent),null!==e&&(P=!0,D=i(e[1]))):"Netscape"===C.appName&&(e=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(C.userAgent),null!==e&&(P=!0,D=i(e[1])))}return P}function h(){return d()&&D}function p(){if(!t(F)){F=!1;var e=/ Edge\/([\.0-9]+)/.exec(C.userAgent);null!==e&&(F=!0,U=i(e[1]))}return F}function m(){return p()&&U}function y(){if(!t(L)){L=!1;var e=/Firefox\/([\.0-9]+)/.exec(C.userAgent);null!==e&&(L=!0,q=i(e[1]))}return L}function E(){return t(B)||(B=/Windows/i.test(C.appVersion)),B}function O(){return y()&&q}function _(){return t(j)||(j="object"==typeof process&&"[object process]"===Object.prototype.toString.call(process)),j}function R(){return t(z)||(z=!y()&&"undefined"!=typeof PointerEvent&&(!t(C.pointerEnabled)||C.pointerEnabled)),z}function w(){if(!t(V)){var e=document.createElement("canvas");e.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");var r=e.style.imageRendering;V=t(r)&&""!==r,V&&(G=r)}return V}function g(){return w()?G:void 0}function T(){if(t(X))return X.promise;X=o.defer(),p()&&(
|
||
|
DYNAMIC_READ:35049,DYNAMIC_COPY:35050,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,VERTEX_ATTRIB_ARRAY_INTEGER:35069,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,UNSIGNED_INT_10F_11F_11F_REV:35899,RGB9_E5:35901,UNSIGNED_INT_5_9_9_9_REV:35902,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,RASTERIZER_DISCARD:35977,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,UNSIGNED_INT_24_8:34042,DEPTH24_STENCIL8:35056,UNSIGNED_NORMALIZED:35863,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,MAX_SAMPLES:36183,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,VERTEX_ARRAY_BINDING:34229,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,SIGNED_NORMALIZED:36764,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_
|
||
|
r.typeOf.object("cartesian",n),r.typeOf.object("result",o),o=f.clone(e,o);var i=4*t;return o[i]=n.x,o[i+1]=n.y,o[i+2]=n.z,o[i+3]=n.w,o},f.setTranslation=function(e,t,n){return r.typeOf.object("matrix",e),r.typeOf.object("translation",t),r.typeOf.object("result",n),n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[8]=e[8],n[9]=e[9],n[10]=e[10],n[11]=e[11],n[12]=t.x,n[13]=t.y,n[14]=t.z,n[15]=e[15],n};var p=new e;f.setScale=function(t,n,o){r.typeOf.object("matrix",t),r.typeOf.object("scale",n),r.typeOf.object("result",o);var i=f.getScale(t,p),a=e.divideComponents(n,i,p);return f.multiplyByScale(t,a,o)},f.getRow=function(e,t,n){r.typeOf.object("matrix",e),r.typeOf.number.greaterThanOrEquals("index",t,0),r.typeOf.number.lessThanOrEquals("index",t,3),r.typeOf.object("result",n);var o=e[t],i=e[t+4],a=e[t+8],u=e[t+12];return n.x=o,n.y=i,n.z=a,n.w=u,n},f.setRow=function(e,t,n,o){return r.typeOf.object("matrix",e),r.typeOf.number.greaterThanOrEquals("index",t,0),r.typeOf.number.lessThanOrEquals("index",t,3),r.typeOf.object("cartesian",n),r.typeOf.object("result",o),o=f.clone(e,o),o[t]=n.x,o[t+4]=n.y,o[t+8]=n.z,o[t+12]=n.w,o};var m=new e;f.getScale=function(t,n){return r.typeOf.object("matrix",t),r.typeOf.object("result",n),n.x=e.magnitude(e.fromElements(t[0],t[1],t[2],m)),n.y=e.magnitude(e.fromElements(t[4],t[5],t[6],m)),n.z=e.magnitude(e.fromElements(t[8],t[9],t[10],m)),n};var y=new e;f.getMaximumScale=function(t){return f.getScale(t,y),e.maximumComponent(y)},f.multiply=function(e,t,n){r.typeOf.object("left",e),r.typeOf.object("right",t),r.typeOf.object("result",n);var o=e[0],i=e[1],a=e[2],u=e[3],s=e[4],c=e[5],f=e[6],l=e[7],d=e[8],h=e[9],p=e[10],m=e[11],y=e[12],E=e[13],O=e[14],_=e[15],R=t[0],w=t[1],g=t[2],T=t[3],A=t[4],b=t[5],C=t[6],S=t[7],v=t[8],I=t[9],N=t[10],M=t[11],x=t[12],P=t[13],D=t[14],F=t[15],U=o*R+s*w+d*g+y*T,L=i*R+c*w+h*g+E*T,q=a*R+f*w+p*g+O*T,B=u*R+l*w+m*g+_*T,j=o*A+s*b+d*C+y*S,z=i*A+c*b+h*C+E*S,G=a*A+f*b+p*C+O*S,V=u*A+l*b+m*C+_*S,W=o*v+s*I+d*N+y*M,X=i*v+c*I+h*N+E*M,H=a*v+f*I+p*N+O*M,Y=u*v+l*I+m*N+_*M,k=o*x+s*P+d*D+y*F,K=i*x+c*P+h*D+E*F,Z=a*x+f*P+p*D+O*F,J=u*x+l*P+m*D+_*F;return n[0]=U,n[1]=L,n[2]=q,n[3]=B,n[4]=j,n[5]=z,n[6]=G,n[7]=V,n[8]=W,n[9]=X,n[10]=H,n[11]=Y,n[12]=k,n[13]=K,n[14]=Z,n[15]=J,n},f.add=function(e,t,n){return r.typeOf.object("left",e),r.typeOf.object("right",t),r.typeOf.object("result",n),n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n[4]=e[4]+t[4],n[5]=e[5]+t[5],n[6]=e[6]+t[6],n[7]=e[7]+t[7],n[8]=e[8]+t[8],n[9]=e[9]+t[9],n[10]=e[10]+t[10],n[11]=e[11]+t[11],n[12]=e[12]+t[12],n[13]=e[13]+t[13],n[14]=e[14]+t[14],n[15]=e[15]+t[15],n},f.subtract=function(e,t,n){return r.typeOf.object("left",e),r.typeOf.object("right",t),r.typeOf.object("result",n),n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n[4]=e[4]-t[4],n[5]=e[5]-t[5],n[6]=e[6]-t[6],n[7]=e[7]-t[7],n[8]=e[8]-t[8],n[9]=e[9]-t[9],n[10]=e[10]-t[10],n[11]=e[11]-t[11],n[12]=e[12]-t[12],n[13]=e[13]-t[13],n[14]=e[14]-t[14],n[15]=e[15]-t[15],n},f.multiplyTransformation=function(e,t,n){r.typeOf.object("left",e),r.typeOf.object("right",t),r.typeOf.object("result",n);var o=e[0],i=e[1],a=e[2],u=e[4],s=e[5],c=e[6],f=e[8],l=e[9],d=e[10],h=e[12],p=e[13],m=e[14],y=t[0],E=t[1],O=t[2],_=t[4],R=t[5],w=t[6],g=t[8],T=t[9],A=t[10],b=t[12],C=t[13],S=t[14],v=o*y+u*E+f*O,I=i*y+s*E+l*O,N=a*y+c*E+d*O,M=o*_+u*R+f*w,x=i*_+s*R+l*w,P=a*_+c*R+d*w,D=o*g+u*T+f*A,F=i*g+s*T+l*A,U=a*g+c*T+d*A,L=o*b+u*C+f*S+h,q=i*b+s*C+l*S+p,B=a*b+c*C+d*S+m;return n[0]=v,n[1]=I,n[2]=N,n[3]=0,n[4]=M,n[5]=x,n[6]=P,n[7]=0,n[8]=D,n[9]=F,n[10]=U,n[11]=0,n[12]=L,n[13]=q,n[14]=B,n[15]=1,n},f.multiplyByMatrix3=function(e,t,n){r.typeOf.object("matrix",e),r.typeOf.object("rotation",t),r.typeOf.object("result",n);var o=e[0],i=e[1],a=e[2],u=e[4],s=e[5],c=e[6],f=e[8],l=e[9],d=e[10],h=t[0],p=t[1],m=t[2],y=t[3],E=t[4],O=t[5],_=t[6],R=t[7],w=t[8],g=o*h+u*p+f*m,T=i*h+s*p+l*m,A=a*h+c*p+d*m,b=o*y+u*E+f*O,C=i*y+s*E+l*O,S=a*y+c*E+d*O,v=o*_+u*R+f*w,I=i*_+s*R+l*w,N=a*_+c*R+d*w;return n[0]=g,n[1]=T,n[2]=A,n[3]=0,n[4]=b,n[5]=C,n[6]=S,n[7]=0,n[8]=v,n[9]=I,n[10]=N,n[11]=0,n
|
||
|
return c},n.computeRealRoots=function(n,o,i,a){if("number"!=typeof n)throw new e("a is a required number.");if("number"!=typeof o)throw new e("b is a required number.");if("number"!=typeof i)throw new e("c is a required number.");if("number"!=typeof a)throw new e("d is a required number.");var u,s;if(0===n)return t.computeRealRoots(o,i,a);if(0===o){if(0===i){if(0===a)return[0,0,0];s=-a/n;var c=0>s?-Math.pow(-s,1/3):Math.pow(s,1/3);return[c,c,c]}return 0===a?(u=t.computeRealRoots(n,0,i),0===u.Length?[0]:[u[0],0,u[1]]):r(n,0,i,a)}return 0===i?0===a?(s=-o/n,0>s?[s,0,0]:[0,0,s]):r(n,o,0,a):0===a?(u=t.computeRealRoots(n,o,i),0===u.length?[0]:u[1]<=0?[u[0],u[1],0]:u[0]>=0?[0,u[0],u[1]]:[u[0],0,u[1]]):r(n,o,i,a)},n}),define("Core/QuarticRealPolynomial",["./CubicRealPolynomial","./DeveloperError","./Math","./QuadraticRealPolynomial"],function(e,t,r,n){"use strict";function o(t,o,i,a){var u=t*t,s=o-3*u/8,c=i-o*t/2+u*t/8,f=a-i*t/4+o*u/16-3*u*u/256,l=e.computeRealRoots(1,2*s,s*s-4*f,-c*c);if(l.length>0){var d=-t/4,h=l[l.length-1];if(Math.abs(h)<r.EPSILON14){var p=n.computeRealRoots(1,s,f);if(2===p.length){var m,y=p[0],E=p[1];if(y>=0&&E>=0){var O=Math.sqrt(y),_=Math.sqrt(E);return[d-_,d-O,d+O,d+_]}if(y>=0&&0>E)return m=Math.sqrt(y),[d-m,d+m];if(0>y&&E>=0)return m=Math.sqrt(E),[d-m,d+m]}return[]}if(h>0){var R=Math.sqrt(h),w=(s+h-c/R)/2,g=(s+h+c/R)/2,T=n.computeRealRoots(1,R,w),A=n.computeRealRoots(1,-R,g);return 0!==T.length?(T[0]+=d,T[1]+=d,0!==A.length?(A[0]+=d,A[1]+=d,T[1]<=A[0]?[T[0],T[1],A[0],A[1]]:A[1]<=T[0]?[A[0],A[1],T[0],T[1]]:T[0]>=A[0]&&T[1]<=A[1]?[A[0],T[0],T[1],A[1]]:A[0]>=T[0]&&A[1]<=T[1]?[T[0],A[0],A[1],T[1]]:T[0]>A[0]&&T[0]<A[1]?[A[0],T[0],A[1],T[1]]:[T[0],A[0],T[1],A[1]]):T):0!==A.length?(A[0]+=d,A[1]+=d,A):[]}}return[]}function i(t,o,i,a){var u=i*i,s=o*o,c=t*t,f=-2*o,l=i*t+s-4*a,d=c*a-i*o*t+u,h=e.computeRealRoots(1,f,l,d);if(h.length>0){var p,m,y=h[0],E=o-y,O=E*E,_=t/2,R=E/2,w=O-4*a,g=O+4*Math.abs(a),T=c-4*y,A=c+4*Math.abs(y);if(0>y||T*g>w*A){var b=Math.sqrt(T);p=b/2,m=0===b?0:(t*R-i)/b}else{var C=Math.sqrt(w);p=0===C?0:(t*R-i)/C,m=C/2}var S,v;0===_&&0===p?(S=0,v=0):r.sign(_)===r.sign(p)?(S=_+p,v=y/S):(v=_-p,S=y/v);var I,N;0===R&&0===m?(I=0,N=0):r.sign(R)===r.sign(m)?(I=R+m,N=a/I):(N=R-m,I=a/N);var M=n.computeRealRoots(1,S,I),x=n.computeRealRoots(1,v,N);if(0!==M.length)return 0!==x.length?M[1]<=x[0]?[M[0],M[1],x[0],x[1]]:x[1]<=M[0]?[x[0],x[1],M[0],M[1]]:M[0]>=x[0]&&M[1]<=x[1]?[x[0],M[0],M[1],x[1]]:x[0]>=M[0]&&x[1]<=M[1]?[M[0],x[0],x[1],M[1]]:M[0]>x[0]&&M[0]<x[1]?[x[0],M[0],x[1],M[1]]:[M[0],x[0],M[1],x[1]]:M;if(0!==x.length)return x}return[]}var a={};return a.computeDiscriminant=function(e,r,n,o,i){if("number"!=typeof e)throw new t("a is a required number.");if("number"!=typeof r)throw new t("b is a required number.");if("number"!=typeof n)throw new t("c is a required number.");if("number"!=typeof o)throw new t("d is a required number.");if("number"!=typeof i)throw new t("e is a required number.");var a=e*e,u=a*e,s=r*r,c=s*r,f=n*n,l=f*n,d=o*o,h=d*o,p=i*i,m=p*i,y=s*f*d-4*c*h-4*e*l*d+18*e*r*n*h-27*a*d*d+256*u*m+i*(18*c*n*o-4*s*l+16*e*f*f-80*e*r*f*o-6*e*s*d+144*a*n*d)+p*(144*e*s*n-27*s*s-128*a*f-192*a*r*o);return y},a.computeRealRoots=function(n,a,u,s,c){if("number"!=typeof n)throw new t("a is a required number.");if("number"!=typeof a)throw new t("b is a required number.");if("number"!=typeof u)throw new t("c is a required number.");if("number"!=typeof s)throw new t("d is a required number.");if("number"!=typeof c)throw new t("e is a required number.");if(Math.abs(n)<r.EPSILON15)return e.computeRealRoots(a,u,s,c);var f=a/n,l=u/n,d=s/n,h=c/n,p=0>f?1:0;switch(p+=0>l?p+1:p,p+=0>d?p+1:p,p+=0>h?p+1:p){case 0:return o(f,l,d,h);case 1:return i(f,l,d,h);case 2:return i(f,l,d,h);case 3:return o(f,l,d,h);case 4:return o(f,l,d,h);case 5:return i(f,l,d,h);case 6:return o(f,l,d,h);case 7:return o(f,l,d,h);case 8:return i(f,l,d,h);case 9:return o(f,l,d,h);case 10:return o(f,l,d,h);case 11:return i(f,l,d,h);case 12:return o(f,l,d,h);case 13:return o(f,l,d,h);case 14:return o(f,l,d,h);case 15:return o(f,l,d,h);default:return}},a}),de
|
||
|
r.resolve()},n.onerror=function(e){r.reject(e)},o.appendChild(n),r.promise}return t}),define("Core/isArray",["./defined"],function(e){"use strict";var t=Array.isArray;return e(t)||(t=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),t}),define("Core/objectToQuery",["./defined","./DeveloperError","./isArray"],function(e,t,r){"use strict";function n(n){if(!e(n))throw new t("obj is required.");var o="";for(var i in n)if(n.hasOwnProperty(i)){var a=n[i],u=encodeURIComponent(i)+"=";if(r(a))for(var s=0,c=a.length;c>s;++s)o+=u+encodeURIComponent(a[s])+"&";else o+=u+encodeURIComponent(a)+"&"}return o=o.slice(0,-1)}return n}),define("Core/queryToObject",["./defined","./DeveloperError","./isArray"],function(e,t,r){"use strict";function n(n){if(!e(n))throw new t("queryString is required.");var o={};if(""===n)return o;for(var i=n.replace(/\+/g,"%20").split(/[&;]/),a=0,u=i.length;u>a;++a){var s=i[a].split("="),c=decodeURIComponent(s[0]),f=s[1];f=e(f)?decodeURIComponent(f):"";var l=o[c];"string"==typeof l?o[c]=[l,f]:r(l)?l.push(f):o[c]=f}return o}return n}),define("Core/RequestState",["../Core/freezeObject"],function(e){"use strict";var t={UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5};return e(t)}),define("Core/RequestType",["../Core/freezeObject"],function(e){"use strict";var t={TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3};return e(t)}),define("Core/Request",["./defaultValue","./defined","./RequestState","./RequestType"],function(e,t,r,n){"use strict";function o(t){t=e(t,e.EMPTY_OBJECT);var o=e(t.throttleByServer,!1),i=e(t.throttle,!1);this.url=t.url,this.requestFunction=t.requestFunction,this.cancelFunction=t.cancelFunction,this.priorityFunction=t.priorityFunction,this.priority=e(t.priority,0),this.throttle=i,this.throttleByServer=o,this.type=e(t.type,n.OTHER),this.serverKey=void 0,this.state=r.UNISSUED,this.deferred=void 0,this.cancelled=!1}return o.prototype.cancel=function(){this.cancelled=!0},o.prototype.clone=function(e){return t(e)?(e.url=this.url,e.requestFunction=this.requestFunction,e.cancelFunction=this.cancelFunction,e.priorityFunction=this.priorityFunction,e.priority=this.priority,e.throttle=this.throttle,e.throttleByServer=this.throttleByServer,e.type=this.type,e.serverKey=this.serverKey,e.state=this.RequestState.UNISSUED,e.deferred=void 0,e.cancelled=!1,e):new o(this)},o}),define("Core/parseResponseHeaders",[],function(){"use strict";function e(e){var t={};if(!e)return t;for(var r=e.split("\r\n"),n=0;n<r.length;++n){var o=r[n],i=o.indexOf(": ");if(i>0){var a=o.substring(0,i),u=o.substring(i+2);t[a]=u}}return t}return e}),define("Core/RequestErrorEvent",["./defined","./parseResponseHeaders"],function(e,t){"use strict";function r(e,r,n){this.statusCode=e,this.response=r,this.responseHeaders=n,"string"==typeof this.responseHeaders&&(this.responseHeaders=t(this.responseHeaders))}return r.prototype.toString=function(){var t="Request has failed.";return e(this.statusCode)&&(t+=" Status Code: "+this.statusCode),t},r}),define("Core/Event",["./Check","./defined","./defineProperties"],function(e,t,r){"use strict";function n(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}function o(e,t){return t-e}return r(n.prototype,{numberOfListeners:{get:function(){return this._listeners.length-this._toRemove.length}}}),n.prototype.addEventListener=function(t,r){e.typeOf.func("listener",t),this._listeners.push(t),this._scopes.push(r);var n=this;return function(){n.removeEventListener(t,r)}},n.prototype.removeEventListener=function(t,r){e.typeOf.func("listener",t);for(var n=this._listeners,o=this._scopes,i=-1,a=0;a<n.length;a++)if(n[a]===t&&o[a]===r){i=a;break}return-1!==i?(this._insideRaiseEvent?(this._toRemove.push(i),n[i]=void 0,o[i]=void 0):(n.splice(i,1),o.splice(i,1)),!0):!1},n.prototype.raiseEvent=function(){this._insideRaiseEvent=!0;var e,r=this._listeners,n=this._scopes,i=r.length;for(e=0;i>e;e++){var a=r[e];t(a)&&r[e].apply(n[e],arguments)}var u=this._toRemove;if(i=u.length,i>0){for(u.sort(o),e=0;i>e;e++){var s=u[e];r.splice(s,1),n.splice(s,1)}u.length=0}this._insideR
|
||
|
!e(u))throw new t("Unable to determine Cesium base URL automatically, try defining a global variable called CESIUM_BASE_URL.");return d=new n({url:a(u)}),d.appendForwardSlash(),d}function s(e){return a(o.toUrl("../"+e))}function c(e){var t=u().getDerivedResource({url:e});return t.url}function f(t){e(h)||(h=e(define.amd)&&!define.amd.toUrlUndefined&&e(o.toUrl)?s:c);var r=h(t);return r}var l,d,h,p=/((?:.*\/)|^)cesium[\w-]*\.js(?:\W|$)/i;return f._cesiumScriptRegex=p,f._buildModuleUrlFromBaseUrl=c,f._clearBaseResource=function(){d=void 0},f.setBaseUrl=function(e){d=n.DEFAULT.getDerivedResource({url:e})},f.getCesiumBaseUrl=u,f}),define("Core/Iau2006XysSample",[],function(){"use strict";function e(e,t,r){this.x=e,this.y=t,this.s=r}return e}),define("Core/Iau2006XysData",["../ThirdParty/when","./buildModuleUrl","./defaultValue","./defined","./Iau2006XysSample","./JulianDate","./Resource","./TimeStandard"],function(e,t,r,n,o,i,a,u){"use strict";function s(e){e=r(e,r.EMPTY_OBJECT),this._xysFileUrlTemplate=a.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=r(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=r(e.sampleZeroJulianEphemerisDate,2442396.5),this._sampleZeroDateTT=new i(this._sampleZeroJulianEphemerisDate,0,u.TAI),this._stepSizeDays=r(e.stepSizeDays,1),this._samplesPerXysFile=r(e.samplesPerXysFile,1e3),this._totalSamples=r(e.totalSamples,27426),this._samples=new Array(3*this._totalSamples),this._chunkDownloadsInProgress=[];for(var t=this._interpolationOrder,n=this._denominators=new Array(t+1),o=this._xTable=new Array(t+1),s=Math.pow(this._stepSizeDays,t),c=0;t>=c;++c){n[c]=s,o[c]=c*this._stepSizeDays;for(var f=0;t>=f;++f)f!==c&&(n[c]*=c-f);n[c]=1/n[c]}this._work=new Array(t+1),this._coef=new Array(t+1)}function c(e,t,r){var n=l;return n.dayNumber=t,n.secondsOfDay=r,i.daysDifference(n,e._sampleZeroDateTT)}function f(r,o){if(r._chunkDownloadsInProgress[o])return r._chunkDownloadsInProgress[o];var i=e.defer();r._chunkDownloadsInProgress[o]=i;var u,s=r._xysFileUrlTemplate;return u=n(s)?s.getDerivedResource({templateValues:{0:o}}):new a({url:t("Assets/IAU2006_XYS/IAU2006_XYS_"+o+".json")}),e(u.fetchJson(),function(e){r._chunkDownloadsInProgress[o]=!1;for(var t=r._samples,n=e.samples,a=o*r._samplesPerXysFile*3,u=0,s=n.length;s>u;++u)t[a+u]=n[u];i.resolve()}),i.promise}var l=new i(0,0,u.TAI);return s.prototype.preload=function(t,r,n,o){var i=c(this,t,r),a=c(this,n,o),u=i/this._stepSizeDays-this._interpolationOrder/2|0;0>u&&(u=0);var s=a/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;s>=this._totalSamples&&(s=this._totalSamples-1);for(var l=u/this._samplesPerXysFile|0,d=s/this._samplesPerXysFile|0,h=[],p=l;d>=p;++p)h.push(f(this,p));return e.all(h)},s.prototype.computeXysRadians=function(e,t,r){var i=c(this,e,t);if(!(0>i)){var a=i/this._stepSizeDays|0;if(!(a>=this._totalSamples)){var u=this._interpolationOrder,s=a-(u/2|0);0>s&&(s=0);var l=s+u;l>=this._totalSamples&&(l=this._totalSamples-1,s=l-u,0>s&&(s=0));var d=!1,h=this._samples;if(n(h[3*s])||(f(this,s/this._samplesPerXysFile|0),d=!0),n(h[3*l])||(f(this,l/this._samplesPerXysFile|0),d=!0),!d){n(r)?(r.x=0,r.y=0,r.s=0):r=new o(0,0,0);var p,m,y=i-s*this._stepSizeDays,E=this._work,O=this._denominators,_=this._coef,R=this._xTable;for(p=0;u>=p;++p)E[p]=y-R[p];for(p=0;u>=p;++p){for(_[p]=1,m=0;u>=m;++m)m!==p&&(_[p]*=E[m]);_[p]*=O[p];var w=3*(s+p);r.x+=_[p]*h[w++],r.y+=_[p]*h[w++],r.s+=_[p]*h[w]}return r}}}},s}),define("Core/Quaternion",["./Cartesian3","./Check","./defaultValue","./defined","./FeatureDetection","./freezeObject","./Math","./Matrix3"],function(e,t,r,n,o,i,a,u){"use strict";function s(e,t,n,o){this.x=r(e,0),this.y=r(t,0),this.z=r(n,0),this.w=r(o,0)}var c=new e;s.fromAxisAngle=function(r,o,i){t.typeOf.object("axis",r),t.typeOf.number("angle",o);var a=o/2,u=Math.sin(a);c=e.normalize(r,c);var f=c.x*u,l=c.y*u,d=c.z*u,h=Math.cos(a);return n(i)?(i.x=f,i.y=l,i.z=d,i.w=h,i):new s(f,l,d,h)};var f=[1,2,0],l=new Array(3);s.fromRotationMatrix=function(e,r){t.typeOf.object("matrix",e);var o,i,a,c,d,h=e[u.COLUMN0ROW0],p=e[u.COLUMN1ROW1]
|
||
|
batchIds:[B]};var ce,fe=0,le=0;for(z in se)if(se.hasOwnProperty(z)){ce=se[z],ce.offset=fe,ce.indexOffset=le;var de=2*ce.positionLength,he=2*ce.indexLength+6*ce.positionLength;fe+=de,le+=he,ce.indexLength=he}var pe=[];for(z in se)se.hasOwnProperty(z)&&(ce=se[z],pe.push({color:n.fromRgba(parseInt(z)),offset:ce.indexOffset,count:ce.indexLength,batchIds:ce.batchIds}));for(B=0;Q>B;++B){z=N[B],ce=se[z];var me=ce.offset,ye=3*me,Ee=me,Oe=$[B],_e=S[B],Re=I[B],we=F,ge=U;o(L)&&o(q)&&(we=L[B],ge=q[B]);var Te=Number.POSITIVE_INFINITY,Ae=Number.NEGATIVE_INFINITY,be=Number.POSITIVE_INFINITY,Ce=Number.NEGATIVE_INFINITY;for(j=0;_e>j;++j){var Se=t.unpack(X,3*Oe+3*j,R);P.scaleToGeodeticSurface(Se,Se);var ve=P.cartesianToCartographic(Se,b),Ie=ve.latitude,Ne=ve.longitude;Te=Math.min(Ie,Te),Ae=Math.max(Ie,Ae),be=Math.min(Ne,be),Ce=Math.max(Ne,Ce);var Me=P.geodeticSurfaceNormal(Se,w),xe=t.multiplyByScalar(Me,we,g),Pe=t.add(Se,xe,T);xe=t.multiplyByScalar(Me,ge,xe);var De=t.add(Se,xe,A);t.subtract(De,x,De),t.subtract(Pe,x,Pe),t.pack(De,ne,ye),t.pack(Pe,ne,ye+3),oe[Ee]=Re,oe[Ee+1]=Re,ye+=6,Ee+=2}D=C,D.west=be,D.east=Ce,D.south=Te,D.north=Ae,M[B]=s.fromRectangle(D,F,U,P);var Fe=ce.indexOffset,Ue=ee[B],Le=v[B];for(ie[B]=Fe,j=0;Le>j;j+=3){var qe=f[Ue+j]-Oe,Be=f[Ue+j+1]-Oe,je=f[Ue+j+2]-Oe;ue[Fe++]=2*qe+me,ue[Fe++]=2*Be+me,ue[Fe++]=2*je+me,ue[Fe++]=2*je+1+me,ue[Fe++]=2*Be+1+me,ue[Fe++]=2*qe+1+me}for(j=0;_e>j;++j){var ze=j,Ge=(j+1)%_e;ue[Fe++]=2*ze+1+me,ue[Fe++]=2*Ge+me,ue[Fe++]=2*ze+me,ue[Fe++]=2*ze+1+me,ue[Fe++]=2*Ge+1+me,ue[Fe++]=2*Ge+me}ce.offset+=2*_e,ce.indexOffset=Fe,ae[B]=Fe-ie[B]}ue=a.createTypedArray(ne.length/3,ue);for(var Ve=pe.length,We=0;Ve>We;++We){for(var Xe=pe[We].batchIds,He=0,Ye=Xe.length,ke=0;Ye>ke;++ke)He+=ae[Xe[ke]];pe[We].count=He}var Ke=2===ue.BYTES_PER_ELEMENT?a.UNSIGNED_SHORT:a.UNSIGNED_INT,Ze=h(Ke,M,pe);return c.push(ne.buffer,ue.buffer,ie.buffer,ae.buffer,oe.buffer,Ze.buffer),{positions:ne.buffer,indices:ue.buffer,indexOffsets:ie.buffer,indexCounts:ae.buffer,batchIds:oe.buffer,packedBuffer:Ze.buffer}}var m=new t,y=new i,E=new c,O={min:void 0,max:void 0,indexBytesPerElement:void 0},_=32767,R=new t,w=new t,g=new t,T=new t,A=new t,b=new r,C=new c;return f(p)})}();
|