text: /**
   * Cesium - https://github.com/AnalyticalGraphicsInc/cesium
   *
   * Copyright 2011-2013 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.
   */
  define("Core/freezeObject",[],function(){var t=Object.freeze;return t===void 0&&(t=function(t){return t}),t}),define("Core/defaultValue",["./freezeObject"],function(t){var e=function(t,e){return t!==void 0?t:e};return e.EMPTY_OBJECT=t({}),e}),define("Core/DeveloperError",[],function(){var t=function(t){this.name="DeveloperError",this.message=t,this.error=Error()};return t.prototype.toString=function(){var t=this.name+": "+this.message;return this.error!==void 0&&(t+=this.error.stack!==void 0?"\n"+(""+this.error.stack):"\n"+(""+this.error)),t},t}),define("Core/Cartesian2",["./defaultValue","./DeveloperError","./freezeObject"],function(t,e,r){var i=function(e,r){this.x=t(e,0),this.y=t(r,0)};i.fromArray=function(r,n,o){if(r===void 0)throw new e("values is required.");if(n+2>r.length)throw new e("offset + 2 is greater than the length of the array.");return n=t(n,0),o===void 0&&(o=new i),o.x=r[n+0],o.y=r[n+1],o},i.clone=function(t,r){if(t===void 0)throw new e("cartesian is required");return r===void 0?new i(t.x,t.y):(r.x=t.x,r.y=t.y,r)},i.fromCartesian3=i.clone,i.fromCartesian4=i.clone,i.getMaximumComponent=function(t){if(t===void 0)throw new e("cartesian is required");return Math.max(t.x,t.y)},i.getMinimumComponent=function(t){if(t===void 0)throw new e("cartesian is required");return Math.min(t.x,t.y)},i.magnitudeSquared=function(t){if(t===void 0)throw new e("cartesian is required");return t.x*t.x+t.y*t.y},i.magnitude=function(t){return Math.sqrt(i.magnitudeSquared(t))};var n=new i;i.distance=function(t,r){if(t===void 0||r===void 0)throw new e("left and right are required.");return i.subtract(t,r,n),i.magnitude(n)},i.normalize=function(t,r){if(t===void 0)throw new e("cartesian is required");var n=i.magnitude(t);return r===void 0?new i(t.x/n,t.y/n):(r.x=t.x/n,r.y=t.y/n,r)},i.dot=function(t,r){if(t===void 0)throw new e("left is required");if(r===void 0)throw new e("right is required");return t.x*r.x+t.y*r.y},i.multiplyComponents=function(t,r,n){if(t===void 0)throw new e("left is required");if(r===void 0)throw new e("right is required");return n===void 0?new i(t.x*r.x,t.y*r.y):(n.x=t.x*r.x,n.y=t.y*r.y,n)},i.add=function(t,r,n){if(t===void 0)throw new e("left is required");if(r===void 0)throw new e("right is required");return n===void 0?new i(t.x+r.x,t.y+r.y):(n.x=t.x+r.x,n.y=t.y+r.y,n)},i.subtract=function(t,r,n){if(t===void 0)throw new e("left is required");if(r===void 0)throw new e("right is required");return n===void 0?new i(t.x-r.x,t.y-r.y):(n.x=t.x-r.x,n.y=t.y-r.y,n)},i.multiplyByScalar=function(t,r,n){if(t===void 0)throw new e("cartesian is required");if("number"!=typeof r)throw new e("scalar is required and must be a number.");return n===void 0?new i(t.x*r,t.y*r):(n.x=t.x*r,n.y=t.y*r,n)},i.divideByScalar=function(t,r,n){if(t===void 0)throw new e("cartesian is required");if("number"!=typeof r)throw new e("scalar is required and must be a number.");return n===void 0?new i(t.x/r,t.y/r):(n.x=t.x/r,n.y=t.y/r,n)},i.negate=function(t,r){if(t===void 0)throw new e("cartesian is required");return r===void 0?new i(-t.x,-t.y):(r.x=-t.x,r.y=-t.y,r)},i.abs=function(t,r){if(t===void 0)throw new e("cartesian is required");return r===void 0?new i(Math.abs(t.x),Math.abs(t.y)):(r.x=Math.abs(t.x),r.y=Math.abs(t.y),r)};var o=new i;i.lerp=function(t,r,n,a){if(t===void 0)throw new e("start is required.");if(r===void 0)throw new e("end is required.");if("number"!=typeof n)throw new e("t is required and must be a number.");return i.multiplyByScalar(r,n,o),a=i.multiplyByScalar(t,1-n,a),i.add(o,a,a)};var a=new i,u=new i;i.angleBetween=function(t,r){if(t===void 0)throw new e("left is required");if(r===void 0)throw new e("right is required");return i.normalize(t,a),i.normalize(r,u),Math.acos(i.dot(a,u))};var s=new i;return i.mostOrthogonalAxis=function(t,r){if(t===void 0)throw new e("cartesian is required.");var n=i.normalize(t,s);return i.abs(n,n),r=n.y>=n.x?i.clone(i.UNIT_X,r):i.clone(i.UNIT_Y,r)},i.equals=function(t,e){return t===e||t!==void 0&&e!==void 0&&t.x===e.x&&t.y===e.y},i.equalsEpsilon=function(t,r,i){if("number"!=typeof i)throw new e("epsilon is required and must be a number.");return t===r||t!==void 0&&r!==void 0&&i>=Math.abs(t.x-r.x)&&i>=Math.abs(t.y-r.y)},i.ZERO=r(new i(0,0)),i.UNIT_X=r(new i(1,0)),i.UNIT_Y=r(new i(0,1)),i.prototype.getMaximumComponent=function(){return i.getMaximumComponent(this)},i.prototype.getMinimumComponent=function(){return i.getMinimumComponent(this)},i.prototype.clone=function(t){return i.clone(this,t)},i.prototype.magnitudeSquared=function(){return i.magnitudeSquared(this)},i.prototype.magnitude=function(){return i.magnitude(this)},i.prototype.normalize=function(t){return i.normalize(this,t)},i.prototype.dot=function(t){return i.dot(this,t)},i.prototype.multiplyComponents=function(t,e){return i.multiplyComponents(this,t,e)},i.prototype.add=function(t,e){return i.add(this,t,e)},i.prototype.subtract=function(t,e){return i.subtract(this,t,e)},i.prototype.multiplyByScalar=function(t,e){return i.multiplyByScalar(this,t,e)},i.prototype.divideByScalar=function(t,e){return i.divideByScalar(this,t,e)},i.prototype.negate=function(t){return i.negate(this,t)},i.prototype.abs=function(t){return i.abs(this,t)},i.prototype.lerp=function(t,e,r){return i.lerp(this,t,e,r)},i.prototype.angleBetween=function(t){return i.angleBetween(this,t)},i.prototype.mostOrthogonalAxis=function(t){return i.mostOrthogonalAxis(this,t)},i.prototype.equals=function(t){return i.equals(this,t)},i.prototype.equalsEpsilon=function(t,e){return i.equalsEpsilon(this,t,e)},i.prototype.toString=function(){return"("+this.x+", "+this.y+")"},i}),define("Core/Cartesian3",["./defaultValue","./DeveloperError","./freezeObject"],function(t,e,r){var i=function(e,r,i){this.x=t(e,0),this.y=t(r,0),this.z=t(i,0)};i.fromSpherical=function(r,n){if(r===void 0)throw new e("spherical is required");n===void 0&&(n=new i);var o=r.clock,a=r.cone,u=t(r.magnitude,1),s=u*Math.sin(a);return n.x=s*Math.cos(o),n.y=s*Math.sin(o),n.z=u*Math.cos(a),n},i.fromArray=function(r,n,o){if(r===void 0)throw new e("values is required.");if(n+3>r.length)throw new e("offset + 3 is greater than the length of the array.");return n=t(n,0),o===void 0&&(o=new i),o.x=r[n+0],o.y=r[n+1],o.z=r[n+2],o},i.clone=function(t,r){if(t===void 0)throw new e("cartesian is required");return r===void 0?new i(t.x,t.y,t.z):(r.x=t.x,r.y=t.y,r.z=t.z,r)},i.fromCartesian4=i.clone,i.getMaximumComponent=function(t){if(t===void 0)throw new e("cartesian is required");return Math.max(t.x,t.y,t.z)},i.getMinimumComponent=function(t){if(t===void 0)throw new e("cartesian is required");return Math.min(t.x,t.y,t.z)},i.magnitudeSquared=function(t){if(t===void 0)throw new e("cartesian is required");return t.x*t.x+t.y*t.y+t.z*t.z},i.magnitude=function(t){return Math.sqrt(i.magnitudeSquared(t))};var n=new i;i.distance=function(t,r){if(t===void 0||r===void 0)throw new e("left and right are required.");return i.subtract(t,r,n),i.magnitude(n)},i.normalize=function(t,r){if(t===void 0)throw new e("cartesian is required");var n=i.magnitude(t);return r===void 0?new i(t.x/n,t.y/n,t.z/n):(r.x=t.x/n,r.y=t.y/n,r.z=t.z/n,r)},i.dot=function(t,r){if(t===void 0)throw new e("left is required");if(r===void 0)throw new e("right is required");return t.x*r.x+t.y*r.y+t.z*r.z},i.multiplyComponents=function(t,r,n){if(t===void 0)throw new e("left is required");if(r===void 0)throw new e("right is required");return n===void 0?new i(t.x*r.x,t.y*r.y,t.z*r.z):(n.x=t.x*r.x,n.y=t.y*r.y,n.z=t.z*r.z,n)},i.add=function(t,r,n){if(t===void 0)throw new e("left is required");if(r===void 0)throw new e("right is required");return n===void 0?new i(t.x+r.x,t.y+r.y,t.z+r.z):(n.x=t.x+r.x,n.y=t.y+r.y,n.z=t.z+r.z,n)},i.subtract=function(t,r,n){if(t===void 0)throw new e("left is required");if(r===void 0)throw new e("right is required");return n===void 0?new i(t.x-r.x,t.y-r.y,t.z-r.z):(n.x=t.x-r.x,n.y=t.y-r.y,n.z=t.z-r.z,n)},i.multiplyByScalar=function(t,r,n){if(t===void 0)throw new e("cartesian is required");if("number"!=typeof r)throw new e("scalar is required and must be a number.");return n===void 0?new i(t.x*r,t.y*r,t.z*r):(n.x=t.x*r,n.y=t.y*r,n.z=t.z*r,n)},i.divideByScalar=function(t,r,n){if(t===void 0)throw new e("cartesian is required");if("number"!=typeof r)throw new e("scalar is required and must be a number.");return n===void 0?new i(t.x/r,t.y/r,t.z/r):(n.x=t.x/r,n.y=t.y/r,n.z=t.z/r,n)},i.negate=function(t,r){if(t===void 0)throw new e("cartesian is required");return r===void 0?new i(-t.x,-t.y,-t.z):(r.x=-t.x,r.y=-t.y,r.z=-t.z,r)},i.abs=function(t,r){if(t===void 0)throw new e("cartesian is required");return r===void 0?new i(Math.abs(t.x),Math.abs(t.y),Math.abs(t.z)):(r.x=Math.abs(t.x),r.y=Math.abs(t.y),r.z=Math.abs(t.z),r)};var o=new i;i.lerp=function(t,r,n,a){if(t===void 0)throw new e("start is required.");if(r===void 0)throw new e("end is required.");if("number"!=typeof n)throw new e("t is required and must be a number.");return i.multiplyByScalar(r,n,o),a=i.multiplyByScalar(t,1-n,a),i.add(o,a,a)};var a=new i,u=new i;i.angleBetween=function(t,r){if(t===void 0)throw new e("left is required");if(r===void 0)throw new e("right is required");i.normalize(t,a),i.normalize(r,u);var n=i.dot(a,u),o=i.cross(a,u,a).magnitude();return Math.atan2(o,n)};var s=new i;return i.mostOrthogonalAxis=function(t,r){if(t===void 0)throw new e("cartesian is required.");var n=i.normalize(t,s);return i.abs(n,n),r=n.y>=n.x?n.z>=n.x?i.clone(i.UNIT_X,r):i.clone(i.UNIT_Z,r):n.z>=n.y?i.clone(i.UNIT_Y,r):i.clone(i.UNIT_Z,r)},i.equals=function(t,e){return t===e||t!==void 0&&e!==void 0&&t.x===e.x&&t.y===e.y&&t.z===e.z},i.equalsEpsilon=function(t,r,i){if("number"!=typeof i)throw new e("epsilon is required and must be a number.");return t===r||t!==void 0&&r!==void 0&&i>=Math.abs(t.x-r.x)&&i>=Math.abs(t.y-r.y)&&i>=Math.abs(t.z-r.z)},i.cross=function(t,r,n){if(t===void 0)throw new e("left is required");if(r===void 0)throw new e("right is required");var o=t.x,a=t.y,u=t.z,s=r.x,d=r.y,h=r.z,c=a*h-u*d,f=u*s-o*h,w=o*d-a*s;return n===void 0?new i(c,f,w):(n.x=c,n.y=f,n.z=w,n)},i.ZERO=r(new i(0,0,0)),i.UNIT_X=r(new i(1,0,0)),i.UNIT_Y=r(new i(0,1,0)),i.UNIT_Z=r(new i(0,0,1)),i.prototype.getMaximumComponent=function(){return i.getMaximumComponent(this)},i.prototype.getMinimumComponent=function(){return i.getMinimumComponent(this)},i.prototype.clone=function(t){return i.clone(this,t)},i.prototype.magnitudeSquared=function(){return i.magnitudeSquared(this)},i.prototype.magnitude=function(){return i.magnitude(this)},i.prototype.normalize=function(t){return i.normalize(this,t)},i.prototype.dot=function(t){return i.dot(this,t)},i.prototype.multiplyComponents=function(t,e){return i.multiplyComponents(this,t,e)},i.prototype.add=function(t,e){return i.add(this,t,e)},i.prototype.subtract=function(t,e){return i.subtract(this,t,e)},i.prototype.multiplyByScalar=function(t,e){return i.multiplyByScalar(this,t,e)},i.prototype.divideByScalar=function(t,e){return i.divideByScalar(this,t,e)},i.prototype.negate=function(t){return i.negate(this,t)},i.prototype.abs=function(t){return i.abs(this,t)},i.prototype.lerp=function(t,e,r){return i.lerp(this,t,e,r)},i.prototype.angleBetween=function(t){return i.angleBetween(this,t)},i.prototype.mostOrthogonalAxis=function(t){return i.mostOrthogonalAxis(this,t)},i.prototype.equals=function(t){return i.equals(this,t)},i.prototype.equalsEpsilon=function(t,e){return i.equalsEpsilon(this,t,e)},i.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},i.prototype.cross=function(t,e){return i.cross(this,t,e)},i}),define("Core/Cartesian4",["./defaultValue","./DeveloperError","./freezeObject"],function(t,e,r){var i=function(e,r,i,n){this.x=t(e,0),this.y=t(r,0),this.z=t(i,0),this.w=t(n,0)};i.fromArray=function(r,n,o){if(r===void 0)throw new e("values is required.");if(n+4>r.length)throw new e("offset + 4 is greater than the length of the array.");return n=t(n,0),o===void 0&&(o=new i),o.x=r[n+0],o.y=r[n+1],o.z=r[n+2],o.w=r[n+3],o},i.clone=function(t,r){if(t===void 0)throw new e("cartesian is required");return r===void 0?new i(t.x,t.y,t.z,t.w):(r.x=t.x,r.y=t.y,r.z=t.z,r.w=t.w,r)},i.getMaximumComponent=function(t){if(t===void 0)throw new e("cartesian is required");return Math.max(t.x,t.y,t.z,t.w)},i.getMinimumComponent=function(t){if(t===void 0)throw new e("cartesian is required");return Math.min(t.x,t.y,t.z,t.w)},i.magnitudeSquared=function(t){if(t===void 0)throw new e("cartesian is required");return t.x*t.x+t.y*t.y+t.z*t.z+t.w*t.w},i.magnitude=function(t){return Math.sqrt(i.magnitudeSquared(t))};var n=new i;i.distance=function(t,r){if(t===void 0||r===void 0)throw new e("left and right are required.");return i.subtract(t,r,n),i.magnitude(n)},i.normalize=function(t,r){if(t===void 0)throw new e("cartesian is required");var n=i.magnitude(t);return r===void 0?new i(t.x/n,t.y/n,t.z/n,t.w/n):(r.x=t.x/n,r.y=t.y/n,r.z=t.z/n,r.w=t.w/n,r)},i.dot=function(t,r){if(t===void 0)throw new e("left is required");if(r===void 0)throw new e("right is required");return t.x*r.x+t.y*r.y+t.z*r.z+t.w*r.w},i.multiplyComponents=function(t,r,n){if(t===void 0)throw new e("left is required");if(r===void 0)throw new e("right is required");return n===void 0?new i(t.x*r.x,t.y*r.y,t.z*r.z,t.w*r.w):(n.x=t.x*r.x,n.y=t.y*r.y,n.z=t.z*r.z,n.w=t.w*r.w,n)},i.add=function(t,r,n){if(t===void 0)throw new e("left is required");if(r===void 0)throw new e("right is required");return n===void 0?new i(t.x+r.x,t.y+r.y,t.z+r.z,t.w+r.w):(n.x=t.x+r.x,n.y=t.y+r.y,n.z=t.z+r.z,n.w=t.w+r.w,n)},i.subtract=function(t,r,n){if(t===void 0)throw new e("left is required");if(r===void 0)throw new e("right is required");return n===void 0?new i(t.x-r.x,t.y-r.y,t.z-r.z,t.w-r.w):(n.x=t.x-r.x,n.y=t.y-r.y,n.z=t.z-r.z,n.w=t.w-r.w,n)},i.multiplyByScalar=function(t,r,n){if(t===void 0)throw new e("cartesian is required");if("number"!=typeof r)throw new e("scalar is required and must be a number.");return n===void 0?new i(t.x*r,t.y*r,t.z*r,t.w*r):(n.x=t.x*r,n.y=t.y*r,n.z=t.z*r,n.w=t.w*r,n)},i.divideByScalar=function(t,r,n){if(t===void 0)throw new e("cartesian is required");if("number"!=typeof r)throw new e("scalar is required and must be a number.");return n===void 0?new i(t.x/r,t.y/r,t.z/r,t.w/r):(n.x=t.x/r,n.y=t.y/r,n.z=t.z/r,n.w=t.w/r,n)},i.negate=function(t,r){if(t===void 0)throw new e("cartesian is required");return r===void 0?new i(-t.x,-t.y,-t.z,-t.w):(r.x=-t.x,r.y=-t.y,r.z=-t.z,r.w=-t.w,r)},i.abs=function(t,r){if(t===void 0)throw new e("cartesian is required");return r===void 0?new i(Math.abs(t.x),Math.abs(t.y),Math.abs(t.z),Math.abs(t.w)):(r.x=Math.abs(t.x),r.y=Math.abs(t.y),r.z=Math.abs(t.z),r.w=Math.abs(t.w),r)};var o=new i;i.lerp=function(t,r,n,a){if(t===void 0)throw new e("start is required.");if(r===void 0)throw new e("end is required.");if("number"!=typeof n)throw new e("t is required and must be a number.");return i.multiplyByScalar(r,n,o),a=i.multiplyByScalar(t,1-n,a),i.add(o,a,a)};var a=new i;return i.mostOrthogonalAxis=function(t,r){if(t===void 0)throw new e("cartesian is required.");var n=i.normalize(t,a);return i.abs(n,n),r=n.y>=n.x?n.z>=n.x?n.w>=n.x?i.clone(i.UNIT_X,r):i.clone(i.UNIT_W,r):n.w>=n.z?i.clone(i.UNIT_Z,r):i.clone(i.UNIT_W,r):n.z>=n.y?n.w>=n.y?i.clone(i.UNIT_Y,r):i.clone(i.UNIT_W,r):n.w>=n.z?i.clone(i.UNIT_Z,r):i.clone(i.UNIT_W,r)},i.equals=function(t,e){return t===e||t!==void 0&&e!==void 0&&t.x===e.x&&t.y===e.y&&t.z===e.z&&t.w===e.w},i.equalsEpsilon=function(t,r,i){if("number"!=typeof i)throw new e("epsilon is required and must be a number.");return t===r||t!==void 0&&r!==void 0&&i>=Math.abs(t.x-r.x)&&i>=Math.abs(t.y-r.y)&&i>=Math.abs(t.z-r.z)&&i>=Math.abs(t.w-r.w)},i.ZERO=r(new i(0,0,0,0)),i.UNIT_X=r(new i(1,0,0,0)),i.UNIT_Y=r(new i(0,1,0,0)),i.UNIT_Z=r(new i(0,0,1,0)),i.UNIT_W=r(new i(0,0,0,1)),i.prototype.getMaximumComponent=function(){return i.getMaximumComponent(this)},i.prototype.getMinimumComponent=function(){return i.getMinimumComponent(this)},i.prototype.clone=function(t){return i.clone(this,t)},i.prototype.magnitudeSquared=function(){return i.magnitudeSquared(this)},i.prototype.magnitude=function(){return i.magnitude(this)},i.prototype.normalize=function(t){return i.normalize(this,t)},i.prototype.dot=function(t){return i.dot(this,t)},i.prototype.multiplyComponents=function(t,e){return i.multiplyComponents(this,t,e)},i.prototype.add=function(t,e){return i.add(this,t,e)},i.prototype.subtract=function(t,e){return i.subtract(this,t,e)},i.prototype.multiplyByScalar=function(t,e){return i.multiplyByScalar(this,t,e)},i.prototype.divideByScalar=function(t,e){return i.divideByScalar(this,t,e)},i.prototype.negate=function(t){return i.negate(this,t)},i.prototype.abs=function(t){return i.abs(this,t)},i.prototype.lerp=function(t,e,r){return i.lerp(this,t,e,r)},i.prototype.mostOrthogonalAxis=function(t){return i.mostOrthogonalAxis(this,t)},i.prototype.equals=function(t){return i.equals(this,t)},i.prototype.equalsEpsilon=function(t,e){return i.equalsEpsilon(this,t,e)},i.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"},i}),define("Core/Math",["./defaultValue","./DeveloperError"],function(t,e){var r={};r.EPSILON1=.1,r.EPSILON2=.01,r.EPSILON3=.001,r.EPSILON4=1e-4,r.EPSILON5=1e-5,r.EPSILON6=1e-6,r.EPSILON7=1e-7,r.EPSILON8=1e-8,r.EPSILON9=1e-9,r.EPSILON10=1e-10,r.EPSILON11=1e-11,r.EPSILON12=1e-12,r.EPSILON13=1e-13,r.EPSILON14=1e-14,r.EPSILON15=1e-15,r.EPSILON16=1e-16,r.EPSILON17=1e-17,r.EPSILON18=1e-18,r.EPSILON19=1e-19,r.EPSILON20=1e-20,r.GRAVITATIONALPARAMETER=3986004418e5,r.sign=function(t){return t>0?1:0>t?-1:0},r.sinh=function(t){var e=Math.pow(Math.E,t),r=Math.pow(Math.E,-1*t);return.5*(e-r)},r.cosh=function(t){var e=Math.pow(Math.E,t),r=Math.pow(Math.E,-1*t);return.5*(e+r)},r.lerp=function(t,e,r){return(1-r)*t+r*e},r.PI=Math.PI,r.ONE_OVER_PI=1/Math.PI,r.PI_OVER_TWO=.5*Math.PI,r.PI_OVER_THREE=Math.PI/3,r.PI_OVER_FOUR=Math.PI/4,r.PI_OVER_SIX=Math.PI/6,r.THREE_PI_OVER_TWO=.5*3*Math.PI,r.TWO_PI=2*Math.PI,r.ONE_OVER_TWO_PI=1/(2*Math.PI),r.RADIANS_PER_DEGREE=Math.PI/180,r.DEGREES_PER_RADIAN=180/Math.PI,r.RADIANS_PER_ARCSECOND=r.RADIANS_PER_DEGREE/3600,r.toRadians=function(t){return t*r.RADIANS_PER_DEGREE},r.toDegrees=function(t){return t*r.DEGREES_PER_RADIAN},r.convertLongitudeRange=function(t){var e=r.TWO_PI,i=t-Math.floor(t/e)*e;return-Math.PI>i?i+e:i>=Math.PI?i-e:i},r.negativePiToPi=function(t){for(var e=r.EPSILON10,i=r.PI,n=r.TWO_PI;-(i+e)>t;)t+=n;if(-i>t)return-i;for(;t>i+e;)t-=n;return t>i?i:t},r.zeroToTwoPi=function(t){var e=t%r.TWO_PI;return 0>e?(e+r.TWO_PI)%r.TWO_PI:e},r.equalsEpsilon=function(e,r,i){return i=t(i,0),i>=Math.abs(e-r)};var i=[1];return r.factorial=function(t){if("number"!=typeof t||0>t)throw new e("A number greater than or equal to 0 is required.");var r=i.length;if(t>=r)for(var n=i[r-1],o=r;t>=o;o++)i.push(n*o);return i[t]},r.incrementWrap=function(r,i,n){if(n=t(n,0),n>=i)throw new e("Maximum value must be greater than minimum value.");return++r,r>i&&(r=n),r},r.isPowerOfTwo=function(r){if("number"!=typeof r||0>r)throw new e("A number greater than or equal to 0 is required.");var i=t(r,0);return 0!==i&&0===(i&i-1)},r.clamp=function(t,e,r){return e>t?e:t>r?r:t},r}),define("Core/Cartographic",["./defaultValue","./DeveloperError","./freezeObject","./Math"],function(t,e,r,i){var n=function(e,r,i){this.longitude=t(e,0),this.latitude=t(r,0),this.height=t(i,0)};return n.fromDegrees=function(e,r,o,a){return e=i.toRadians(t(e,0)),r=i.toRadians(t(r,0)),o=t(o,0),a===void 0?new n(e,r,o):(a.longitude=e,a.latitude=r,a.height=o,a)},n.clone=function(t,r){if(t===void 0)throw new e("cartographic is required");return r===void 0?new n(t.longitude,t.latitude,t.height):(r.longitude=t.longitude,r.latitude=t.latitude,r.height=t.height,r)},n.equals=function(t,e){return t===e||t!==void 0&&e!==void 0&&t.longitude===e.longitude&&t.latitude===e.latitude&&t.height===e.height},n.equalsEpsilon=function(t,r,i){if("number"!=typeof i)throw new e("epsilon is required and must be a number.");return t===r||t!==void 0&&r!==void 0&&i>=Math.abs(t.longitude-r.longitude)&&i>=Math.abs(t.latitude-r.latitude)&&i>=Math.abs(t.height-r.height)},n.toString=function(t){if(t===void 0)throw new e("cartographic is required");return"("+t.longitude+", "+t.latitude+", "+t.height+")"},n.ZERO=r(new n(0,0,0)),n.prototype.clone=function(t){return n.clone(this,t)},n.prototype.equals=function(t){return n.equals(this,t)},n.prototype.equalsEpsilon=function(t,e){return n.equalsEpsilon(this,t,e)},n.prototype.toString=function(){return n.toString(this)},n}),define("Core/Ellipsoid",["./freezeObject","./defaultValue","./DeveloperError","./Math","./Cartesian3","./Cartographic"],function(t,e,r,i,n,o){var a=function(t,o,a){if(t=e(t,0),o=e(o,0),a=e(a,0),0>t||0>o||0>a)throw new r("All radii components must be greater than or equal to zero.");this._radii=new n(t,o,a),this._radiiSquared=new n(t*t,o*o,a*a),this._radiiToTheFourth=new n(t*t*t*t,o*o*o*o,a*a*a*a),this._oneOverRadii=new n(0===t?0:1/t,0===o?0:1/o,0===a?0:1/a),this._oneOverRadiiSquared=new n(0===t?0:1/(t*t),0===o?0:1/(o*o),0===a?0:1/(a*a)),this._minimumRadius=Math.min(t,o,a),this._maximumRadius=Math.max(t,o,a),this._centerToleranceSquared=i.EPSILON1};a.clone=function(t,e){var r=t._radii;return e===void 0?new a(r.x,r.y,r.z):(n.clone(r,e._radii),n.clone(t._radiiSquared,e._radiiSquared),n.clone(t._radiiToTheFourth,e._radiiToTheFourth),n.clone(t._oneOverRadii,e._oneOverRadii),n.clone(t._oneOverRadiiSquared,e._oneOverRadiiSquared),e._minimumRadius=t._minimumRadius,e._maximumRadius=t._maximumRadius,e._centerToleranceSquared=t._centerToleranceSquared,e)},a.fromCartesian3=function(t){return t===void 0?new a:new a(t.x,t.y,t.z)},a.WGS84=t(new a(6378137,6378137,6356752.314245179)),a.UNIT_SPHERE=t(new a(1,1,1)),a.prototype.getRadii=function(){return this._radii},a.prototype.getRadiiSquared=function(){return this._radiiSquared},a.prototype.getRadiiToTheFourth=function(){return this._radiiToTheFourth},a.prototype.getOneOverRadii=function(){return this._oneOverRadii},a.prototype.getOneOverRadiiSquared=function(){return this._oneOverRadiiSquared},a.prototype.getMinimumRadius=function(){return this._minimumRadius},a.prototype.getMaximumRadius=function(){return this._maximumRadius},a.prototype.geocentricSurfaceNormal=n.normalize,a.prototype.geodeticSurfaceNormalCartographic=function(t,e){if(t===void 0)throw new r("cartographic is required.");var i=t.longitude,o=t.latitude,a=Math.cos(o),u=a*Math.cos(i),s=a*Math.sin(i),d=Math.sin(o);return e===void 0&&(e=new n),e.x=u,e.y=s,e.z=d,n.normalize(e,e)},a.prototype.geodeticSurfaceNormal=function(t,e){return e=n.multiplyComponents(t,this._oneOverRadiiSquared,e),n.normalize(e,e)};var u=new n,s=new n;a.prototype.cartographicToCartesian=function(t,e){var r=u,i=s;this.geodeticSurfaceNormalCartographic(t,r),n.multiplyComponents(this._radiiSquared,r,i);var o=Math.sqrt(n.dot(r,i));return n.divideByScalar(i,o,i),n.multiplyByScalar(r,t.height,r),n.add(i,r,e)},a.prototype.cartographicArrayToCartesianArray=function(t,e){if(t===void 0)throw new r("cartographics is required.");var i=t.length;e===void 0?e=Array(i):e.length=i;for(var n=0;i>n;n++)e[n]=this.cartographicToCartesian(t[n],e[n]);return e};var d=new n,h=new n,c=new n;a.prototype.cartesianToCartographic=function(t,e){var r=this.scaleToGeodeticSurface(t,h);if(r===void 0)return void 0;var a=this.geodeticSurfaceNormal(r,d),u=n.subtract(t,r,c),s=Math.atan2(a.y,a.x),f=Math.asin(a.z),w=i.sign(n.dot(u,t))*n.magnitude(u);return e===void 0?new o(s,f,w):(e.longitude=s,e.latitude=f,e.height=w,e)},a.prototype.cartesianArrayToCartographicArray=function(t,e){if(t===void 0)throw new r("cartesians is required.");var i=t.length;e===void 0?e=Array(i):e.length=i;for(var n=0;i>n;++n)e[n]=this.cartesianToCartographic(t[n],e[n]);return e};var f,w=new n;return a.prototype.scaleToGeodeticSurface=function(t,e){if(t===void 0)throw new r("cartesian is required.");var o=t.x,a=t.y,u=t.z,s=this._oneOverRadii,d=s.x,h=s.y,c=s.z,l=o*o*d*d,y=a*a*h*h,p=u*u*c*c,v=l+y+p,m=Math.sqrt(1/v),g=n.multiplyByScalar(t,m,f);if(this._centerToleranceSquared>v)return isFinite(m)?n.clone(g,e):void 0;var x=this._oneOverRadiiSquared,q=x.x,z=x.y,E=x.z,b=w;b.x=2*g.x*q,b.y=2*g.y*z,b.z=2*g.z*E;var S,M,_,O,T,R,I,N,P,C,A,U=(1-m)*n.magnitude(t)/(.5*n.magnitude(b)),L=0;do{U-=L,_=1/(1+U*q),O=1/(1+U*z),T=1/(1+U*E),R=_*_,I=O*O,N=T*T,P=R*_,C=I*O,A=N*T,S=l*R+y*I+p*N-1,M=l*P*q+y*C*z+p*A*E;var B=-2*M;L=S/B}while(Math.abs(S)>i.EPSILON12);return e===void 0?new n(o*_,a*O,u*T):(e.x=o*_,e.y=a*O,e.z=u*T,e)},a.prototype.scaleToGeocentricSurface=function(t,e){if(t===void 0)throw new r("cartesian is required.");var i=t.x,o=t.y,a=t.z,u=this._oneOverRadiiSquared,s=1/Math.sqrt(i*i*u.x+o*o*u.y+a*a*u.z);return n.multiplyByScalar(t,s,e)},a.prototype.transformPositionToScaledSpace=function(t,e){return n.multiplyComponents(t,this._oneOverRadii,e)},a.prototype.equals=function(t){return this===t||t!==void 0&&n.equals(this._radii,t._radii)},a.prototype.toString=function(){return""+this._radii},a}),define("Core/GeographicProjection",["./defaultValue","./Cartesian3","./Cartographic","./Ellipsoid"],function(t,e,r,i){var n=function(e){this._ellipsoid=t(e,i.WGS84),this._semimajorAxis=this._ellipsoid.getMaximumRadius(),this._oneOverSemimajorAxis=1/this._semimajorAxis};return n.prototype.getEllipsoid=function(){return this._ellipsoid},n.prototype.project=function(t,r){var i=this._semimajorAxis,n=t.longitude*i,o=t.latitude*i,a=t.height;return r===void 0?new e(n,o,a):(r.x=n,r.y=o,r.z=a,r)},n.prototype.unproject=function(t,e){var i=this._oneOverSemimajorAxis,n=t.x*i,o=t.y*i,a=t.z;return e===void 0?new r(n,o,a):(e.longitude=n,e.latitude=o,e.height=a,e)},n}),define("Core/Extent",["./freezeObject","./defaultValue","./Ellipsoid","./Cartographic","./DeveloperError","./Math"],function(t,e,r,i,n,o){var a=function(t,r,i,n){this.west=e(t,0),this.south=e(r,0),this.east=e(i,0),this.north=e(n,0)};a.fromCartographicArray=function(t,e){if(t===void 0)throw new n("cartographics is required.");for(var r=Number.MAX_VALUE,i=-Number.MAX_VALUE,o=Number.MAX_VALUE,u=-Number.MAX_VALUE,s=0,d=t.length;d>s;s++){var h=t[s];r=Math.min(r,h.longitude),i=Math.max(i,h.longitude),o=Math.min(o,h.latitude),u=Math.max(u,h.latitude)}return e===void 0?new a(r,o,i,u):(e.west=r,e.south=o,e.east=i,e.north=u,e)},a.clone=function(t,e){return e===void 0?new a(t.west,t.south,t.east,t.north):(e.west=t.west,e.south=t.south,e.east=t.east,e.north=t.north,e)},a.prototype.clone=function(t){return a.clone(this,t)},a.prototype.equals=function(t){return t!==void 0&&this.west===t.west&&this.south===t.south&&this.east===t.east&&this.north===t.north},a.prototype.equalsEpsilon=function(t,e){if("number"!=typeof e)throw new n("epsilon is required and must be a number.");return t!==void 0&&e>=Math.abs(this.west-t.west)&&e>=Math.abs(this.south-t.south)&&e>=Math.abs(this.east-t.east)&&e>=Math.abs(this.north-t.north)},a.prototype.validate=function(){var t=this.north;if("number"!=typeof t)throw new n("north is required to be a number.");if(-o.PI_OVER_TWO>t||t>o.PI_OVER_TWO)throw new n("north must be in the interval [-Pi/2, Pi/2].");var e=this.south;if("number"!=typeof e)throw new n("south is required to be a number.");if(-o.PI_OVER_TWO>e||e>o.PI_OVER_TWO)throw new n("south must be in the interval [-Pi/2, Pi/2].");var r=this.west;if("number"!=typeof r)throw new n("west is required to be a number.");if(-Math.PI>r||r>Math.PI)throw new n("west must be in the interval [-Pi, Pi].");var i=this.east;if("number"!=typeof i)throw new n("east is required to be a number.");if(-Math.PI>i||i>Math.PI)throw new n("east must be in the interval [-Pi, Pi].")},a.prototype.getSouthwest=function(t){return t===void 0?new i(this.west,this.south):(t.longitude=this.west,t.latitude=this.south,t.height=0,t)},a.prototype.getNorthwest=function(t){return t===void 0?new i(this.west,this.north):(t.longitude=this.west,t.latitude=this.north,t.height=0,t)},a.prototype.getNortheast=function(t){return t===void 0?new i(this.east,this.north):(t.longitude=this.east,t.latitude=this.north,t.height=0,t)},a.prototype.getSoutheast=function(t){return t===void 0?new i(this.east,this.south):(t.longitude=this.east,t.latitude=this.south,t.height=0,t)},a.prototype.getCenter=function(t){return t===void 0?new i(.5*(this.west+this.east),.5*(this.south+this.north)):(t.longitude=.5*(this.west+this.east),t.latitude=.5*(this.south+this.north),t.height=0,t)},a.prototype.intersectWith=function(t,e){if(t===void 0)throw new n("otherExtent is required.");var r=Math.max(this.west,t.west),i=Math.max(this.south,t.south),o=Math.min(this.east,t.east),u=Math.min(this.north,t.north);return e===void 0?new a(r,i,o,u):(e.west=r,e.south=i,e.east=o,e.north=u,e)},a.prototype.contains=function(t){if(t===void 0)throw new n("cartographic is required.");return t.longitude>=this.west&&this.east>=t.longitude&&t.latitude>=this.south&&this.north>=t.latitude},a.prototype.isEmpty=function(){return this.west>=this.east||this.south>=this.north};var u=new i;return a.prototype.subsample=function(t,i){t=e(t,r.WGS84),i===void 0&&(i=[]);var n=0,a=this.north,s=this.south,d=this.east,h=this.west,c=u;c.longitude=h,c.latitude=a,i[n]=t.cartographicToCartesian(c,i[n]),n++,c.longitude=d,i[n]=t.cartographicToCartesian(c,i[n]),n++,c.latitude=s,i[n]=t.cartographicToCartesian(c,i[n]),n++,c.longitude=h,i[n]=t.cartographicToCartesian(c,i[n]),n++,c.latitude=0>a?a:s>0?s:0;for(var f=1;8>f;++f){var w=-Math.PI+f*o.PI_OVER_TWO;w>h&&d>w&&(c.longitude=w,i[n]=t.cartographicToCartesian(c,i[n]),n++)}return 0===c.latitude&&(c.longitude=h,i[n]=t.cartographicToCartesian(c,i[n]),n++,c.longitude=d,i[n]=t.cartographicToCartesian(c,i[n]),n++),i.length=n,i},a.MAX_VALUE=t(new a(-Math.PI,-o.PI_OVER_TWO,Math.PI,o.PI_OVER_TWO)),a}),define("Core/Enumeration",[],function(){var t=function(t,e,r){if(this.value=t,this.name=e,r!==void 0)for(var i in r)r.hasOwnProperty(i)&&(this[i]=r[i])};return t.prototype.valueOf=function(){return this.value},t.prototype.toString=function(){return this.name},t}),define("Core/Intersect",["./Enumeration"],function(t){var e={OUTSIDE:new t(-1,"OUTSIDE"),INTERSECTING:new t(0,"INTERSECTING"),INSIDE:new t(1,"INSIDE")};return e}),define("Core/Interval",["./defaultValue"],function(t){var e=function(e,r){this.start=t(e,0),this.stop=t(r,0)};return e}),define("Core/Matrix3",["./Cartesian3","./defaultValue","./DeveloperError","./freezeObject"],function(t,e,r,i){var n=function(t,r,i,n,o,a,u,s,d){this[0]=e(t,0),this[1]=e(n,0),this[2]=e(u,0),this[3]=e(r,0),this[4]=e(o,0),this[5]=e(s,0),this[6]=e(i,0),this[7]=e(a,0),this[8]=e(d,0)};return n.clone=function(t,e){if(t===void 0)throw new r("values is required");return e===void 0?new n(t[0],t[3],t[6],t[1],t[4],t[7],t[2],t[5],t[8]):(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e)},n.fromColumnMajorArray=n.clone,n.fromRowMajorArray=function(t,e){if(t===void 0)throw new r("values is required.");return e===void 0?new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]):(e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],e)},n.fromQuaternion=function(t,e){if(t===void 0)throw new r("quaternion is required");var i=t.x*t.x,o=t.x*t.y,a=t.x*t.z,u=t.x*t.w,s=t.y*t.y,d=t.y*t.z,h=t.y*t.w,c=t.z*t.z,f=t.z*t.w,w=t.w*t.w,l=i-s-c+w,y=2*(o+f),p=2*(a-h),v=2*(o-f),m=-i+s-c+w,g=2*(d+u),x=2*(a+h),q=2*(d-u),z=-i-s+c+w;return e===void 0?new n(l,y,p,v,m,g,x,q,z):(e[0]=l,e[1]=v,e[2]=x,e[3]=y,e[4]=m,e[5]=q,e[6]=p,e[7]=g,e[8]=z,e)},n.fromScale=function(t,e){if(t===void 0)throw new r("scale is required.");return e===void 0?new n(t.x,0,0,0,t.y,0,0,0,t.z):(e[0]=t.x,e[1]=0,e[2]=0,e[3]=0,e[4]=t.y,e[5]=0,e[6]=0,e[7]=0,e[8]=t.z,e)},n.fromUniformScale=function(t,e){if("number"!=typeof t)throw new r("scale is required.");return e===void 0?new n(t,0,0,0,t,0,0,0,t):(e[0]=t,e[1]=0,e[2]=0,e[3]=0,e[4]=t,e[5]=0,e[6]=0,e[7]=0,e[8]=t,e)},n.fromRotationX=function(t,e){if(t===void 0)throw new r("angle is required.");var i=Math.cos(t),o=Math.sin(t);return e===void 0?new n(1,0,0,0,i,-o,0,o,i):(e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=i,e[5]=o,e[6]=0,e[7]=-o,e[8]=i,e)
  },n.fromRotationY=function(t,e){if(t===void 0)throw new r("angle is required.");var i=Math.cos(t),o=Math.sin(t);return e===void 0?new n(i,0,o,0,1,0,-o,0,i):(e[0]=i,e[1]=0,e[2]=-o,e[3]=0,e[4]=1,e[5]=0,e[6]=o,e[7]=0,e[8]=i,e)},n.fromRotationZ=function(t,e){if(t===void 0)throw new r("angle is required.");var i=Math.cos(t),o=Math.sin(t);return e===void 0?new n(i,-o,0,o,i,0,0,0,1):(e[0]=i,e[1]=o,e[2]=0,e[3]=-o,e[4]=i,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e)},n.toArray=function(t,e){if(t===void 0)throw new r("matrix is required");return e===void 0?[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]:(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e)},n.getElementIndex=function(t,e){if("number"!=typeof e||0>e||e>2)throw new r("row is required and must be 0, 1, or 2.");if("number"!=typeof t||0>t||t>2)throw new r("column is required and must be 0, 1, or 2.");return 3*t+e},n.getColumn=function(e,i,n){if(e===void 0)throw new r("matrix is required.");if("number"!=typeof i||0>i||i>2)throw new r("index is required and must be 0, 1, or 2.");var o=3*i,a=e[o],u=e[o+1],s=e[o+2];return n===void 0?new t(a,u,s):(n.x=a,n.y=u,n.z=s,n)},n.setColumn=function(t,e,i,o){if(t===void 0)throw new r("matrix is required");if(i===void 0)throw new r("cartesian is required");if("number"!=typeof e||0>e||e>2)throw new r("index is required and must be 0, 1, or 2.");o=n.clone(t,o);var a=3*e;return o[a]=i.x,o[a+1]=i.y,o[a+2]=i.z,o},n.getRow=function(e,i,n){if(e===void 0)throw new r("matrix is required.");if("number"!=typeof i||0>i||i>2)throw new r("index is required and must be 0, 1, or 2.");var o=e[i],a=e[i+3],u=e[i+6];return n===void 0?new t(o,a,u):(n.x=o,n.y=a,n.z=u,n)},n.setRow=function(t,e,i,o){if(t===void 0)throw new r("matrix is required");if(i===void 0)throw new r("cartesian is required");if("number"!=typeof e||0>e||e>2)throw new r("index is required and must be 0, 1, or 2.");return o=n.clone(t,o),o[e]=i.x,o[e+3]=i.y,o[e+6]=i.z,o},n.multiply=function(t,e,i){if(t===void 0)throw new r("left is required");if(e===void 0)throw new r("right is required");var o=t[0]*e[0]+t[3]*e[1]+t[6]*e[2],a=t[1]*e[0]+t[4]*e[1]+t[7]*e[2],u=t[2]*e[0]+t[5]*e[1]+t[8]*e[2],s=t[0]*e[3]+t[3]*e[4]+t[6]*e[5],d=t[1]*e[3]+t[4]*e[4]+t[7]*e[5],h=t[2]*e[3]+t[5]*e[4]+t[8]*e[5],c=t[0]*e[6]+t[3]*e[7]+t[6]*e[8],f=t[1]*e[6]+t[4]*e[7]+t[7]*e[8],w=t[2]*e[6]+t[5]*e[7]+t[8]*e[8];return i===void 0?new n(o,s,c,a,d,f,u,h,w):(i[0]=o,i[1]=a,i[2]=u,i[3]=s,i[4]=d,i[5]=h,i[6]=c,i[7]=f,i[8]=w,i)},n.multiplyByVector=function(e,i,n){if(e===void 0)throw new r("matrix is required");if(i===void 0)throw new r("cartesian is required");var o=i.x,a=i.y,u=i.z,s=e[0]*o+e[3]*a+e[6]*u,d=e[1]*o+e[4]*a+e[7]*u,h=e[2]*o+e[5]*a+e[8]*u;return n===void 0?new t(s,d,h):(n.x=s,n.y=d,n.z=h,n)},n.multiplyByScalar=function(t,e,i){if(t===void 0)throw new r("matrix is required");if("number"!=typeof e)throw new r("scalar is required and must be a number");return i===void 0?new n(t[0]*e,t[3]*e,t[6]*e,t[1]*e,t[4]*e,t[7]*e,t[2]*e,t[5]*e,t[8]*e):(i[0]=t[0]*e,i[1]=t[1]*e,i[2]=t[2]*e,i[3]=t[3]*e,i[4]=t[4]*e,i[5]=t[5]*e,i[6]=t[6]*e,i[7]=t[7]*e,i[8]=t[8]*e,i)},n.negate=function(t,e){if(t===void 0)throw new r("matrix is required");return e===void 0?new n(-t[0],-t[3],-t[6],-t[1],-t[4],-t[7],-t[2],-t[5],-t[8]):(e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e[4]=-t[4],e[5]=-t[5],e[6]=-t[6],e[7]=-t[7],e[8]=-t[8],e)},n.transpose=function(t,e){if(t===void 0)throw new r("matrix is required");var i=t[0],o=t[3],a=t[6],u=t[1],s=t[4],d=t[7],h=t[2],c=t[5],f=t[8];return e===void 0?new n(i,u,h,o,s,c,a,d,f):(e[0]=i,e[1]=o,e[2]=a,e[3]=u,e[4]=s,e[5]=d,e[6]=h,e[7]=c,e[8]=f,e)},n.equals=function(t,e){return t===e||t!==void 0&&e!==void 0&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},n.equalsEpsilon=function(t,e,i){if("number"!=typeof i)throw new r("epsilon is required and must be a number");return t===e||t!==void 0&&e!==void 0&&i>=Math.abs(t[0]-e[0])&&i>=Math.abs(t[1]-e[1])&&i>=Math.abs(t[2]-e[2])&&i>=Math.abs(t[3]-e[3])&&i>=Math.abs(t[4]-e[4])&&i>=Math.abs(t[5]-e[5])&&i>=Math.abs(t[6]-e[6])&&i>=Math.abs(t[7]-e[7])&&i>=Math.abs(t[8]-e[8])},n.IDENTITY=i(new n(1,0,0,0,1,0,0,0,1)),n.COLUMN0ROW0=0,n.COLUMN0ROW1=1,n.COLUMN0ROW2=2,n.COLUMN1ROW0=3,n.COLUMN1ROW1=4,n.COLUMN1ROW2=5,n.COLUMN2ROW0=6,n.COLUMN2ROW1=7,n.COLUMN2ROW2=8,n.prototype.clone=function(t){return n.clone(this,t)},n.prototype.toArray=function(t){return n.toArray(this,t)},n.prototype.getColumn=function(t,e){return n.getColumn(this,t,e)},n.prototype.setColumn=function(t,e,r){return n.setColumn(this,t,e,r)},n.prototype.getRow=function(t,e){return n.getRow(this,t,e)},n.prototype.setRow=function(t,e,r){return n.setRow(this,t,e,r)},n.prototype.multiply=function(t,e){return n.multiply(this,t,e)},n.prototype.multiplyByVector=function(t,e){return n.multiplyByVector(this,t,e)},n.prototype.multiplyByScalar=function(t,e){return n.multiplyByScalar(this,t,e)},n.prototype.negate=function(t){return n.negate(this,t)},n.prototype.transpose=function(t){return n.transpose(this,t)},n.prototype.equals=function(t){return n.equals(this,t)},n.prototype.equalsEpsilon=function(t,e){return n.equalsEpsilon(this,t,e)},n.prototype.toString=function(){return"("+this[0]+", "+this[3]+", "+this[6]+")\n"+"("+this[1]+", "+this[4]+", "+this[7]+")\n"+"("+this[2]+", "+this[5]+", "+this[8]+")"},n}),define("Core/RuntimeError",[],function(){var t=function(t){this.name="RuntimeError",this.message=t,this.error=Error()};return t.prototype.toString=function(){var t=this.name+": "+this.message;return this.error!==void 0&&(t+=this.error.stack!==void 0?"\n"+(""+this.error.stack):"\n"+(""+this.error)),t},t}),define("Core/Matrix4",["./Cartesian3","./Cartesian4","./defaultValue","./DeveloperError","./freezeObject","./Math","./Matrix3","./RuntimeError"],function(t,e,r,i,n,o,a,u){var s=function(t,e,i,n,o,a,u,s,d,h,c,f,w,l,y,p){this[0]=r(t,0),this[1]=r(o,0),this[2]=r(d,0),this[3]=r(w,0),this[4]=r(e,0),this[5]=r(a,0),this[6]=r(h,0),this[7]=r(l,0),this[8]=r(i,0),this[9]=r(u,0),this[10]=r(c,0),this[11]=r(y,0),this[12]=r(n,0),this[13]=r(s,0),this[14]=r(f,0),this[15]=r(p,0)};s.clone=function(t,e){if(t===void 0)throw new i("values is required");return e===void 0?new s(t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15]):(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e)},s.fromColumnMajorArray=s.clone,s.fromRowMajorArray=function(t,e){if(t===void 0)throw new i("values is required.");return e===void 0?new s(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]):(e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15],e)},s.fromRotationTranslation=function(t,e,r){if(t===void 0)throw new i("rotation is required.");if(e===void 0)throw new i("translation is required.");return r===void 0?new s(t[0],t[3],t[6],e.x,t[1],t[4],t[7],e.y,t[2],t[5],t[8],e.z,0,0,0,1):(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=0,r[4]=t[3],r[5]=t[4],r[6]=t[5],r[7]=0,r[8]=t[6],r[9]=t[7],r[10]=t[8],r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,r)},s.fromTranslation=function(t,e){return s.fromRotationTranslation(a.IDENTITY,t,e)},s.fromScale=function(t,e){if(t===void 0)throw new i("scale is required.");return e===void 0?new s(t.x,0,0,0,0,t.y,0,0,0,0,t.z,0,0,0,0,1):(e[0]=t.x,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t.y,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t.z,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)},s.fromUniformScale=function(t,e){if("number"!=typeof t)throw new i("scale is required.");return e===void 0?new s(t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1):(e[0]=t,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)};var d=new t,h=new t,c=new t;s.fromCamera=function(e,r){if(e===void 0)throw new i("camera is required.");var n=e.eye,o=e.target,a=e.up;if(n===void 0)throw new i("camera.eye is required.");if(o===void 0)throw new i("camera.target is required.");if(a===void 0)throw new i("camera.up is required.");t.subtract(o,n,d).normalize(d),t.cross(d,a,h).normalize(h),t.cross(h,d,c).normalize(c);var u=h.x,f=h.y,w=h.z,l=d.x,y=d.y,p=d.z,v=c.x,m=c.y,g=c.z,x=n.x,q=n.y,z=n.z,E=u*-x+f*-q+w*-z,b=v*-x+m*-q+g*-z,S=l*x+y*q+p*z;return r===void 0?new s(u,f,w,E,v,m,g,b,-l,-y,-p,S,0,0,0,1):(r[0]=u,r[1]=v,r[2]=-l,r[3]=0,r[4]=f,r[5]=m,r[6]=-y,r[7]=0,r[8]=w,r[9]=g,r[10]=-p,r[11]=0,r[12]=E,r[13]=b,r[14]=S,r[15]=1,r)},s.computePerspectiveFieldOfView=function(t,e,r,n,o){if(0>=t||t>Math.PI)throw new i("fovY must be in [0, PI).");if(0>=e)throw new i("aspectRatio must be greater than zero.");if(0>=r)throw new i("near must be greater than zero.");if(0>=n)throw new i("far must be greater than zero.");var a=Math.tan(.5*t),u=1/a,d=u/e,h=(n+r)/(r-n),c=2*n*r/(r-n);return o===void 0?new s(d,0,0,0,0,u,0,0,0,0,h,c,0,0,-1,0):(o[0]=d,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=u,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=h,o[11]=-1,o[12]=0,o[13]=0,o[14]=c,o[15]=0,o)},s.computeOrthographicOffCenter=function(t,e,r,n,o,a,u){if(t===void 0)throw new i("left is required.");if(e===void 0)throw new i("right is required.");if(r===void 0)throw new i("bottom is required.");if(n===void 0)throw new i("top is required.");if(o===void 0)throw new i("near is required.");if(a===void 0)throw new i("far is required.");var d=1/(e-t),h=1/(n-r),c=1/(a-o),f=-(e+t)*d,w=-(n+r)*h,l=-(a+o)*c;return d*=2,h*=2,c*=-2,u===void 0?new s(d,0,0,f,0,h,0,w,0,0,c,l,0,0,0,1):(u[0]=d,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=h,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=c,u[11]=0,u[12]=f,u[13]=w,u[14]=l,u[15]=1,u)},s.computePerspectiveOffCenter=function(t,e,r,n,o,a,u){if(t===void 0)throw new i("left is required.");if(e===void 0)throw new i("right is required.");if(r===void 0)throw new i("bottom is required.");if(n===void 0)throw new i("top is required.");if(o===void 0)throw new i("near is required.");if(a===void 0)throw new i("far is required.");var d=2*o/(e-t),h=2*o/(n-r),c=(e+t)/(e-t),f=(n+r)/(n-r),w=-(a+o)/(a-o),l=-1,y=-2*a*o/(a-o);return u===void 0?new s(d,0,c,0,0,h,f,0,0,0,w,y,0,0,l,0):(u[0]=d,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=h,u[6]=0,u[7]=0,u[8]=c,u[9]=f,u[10]=w,u[11]=l,u[12]=0,u[13]=0,u[14]=y,u[15]=0,u)},s.computeInfinitePerspectiveOffCenter=function(t,e,r,n,o,a){if(t===void 0)throw new i("left is required.");if(e===void 0)throw new i("right is required.");if(r===void 0)throw new i("bottom is required.");if(n===void 0)throw new i("top is required.");if(o===void 0)throw new i("near is required.");var u=2*o/(e-t),d=2*o/(n-r),h=(e+t)/(e-t),c=(n+r)/(n-r),f=-1,w=-1,l=-2*o;return a===void 0?new s(u,0,h,0,0,d,c,0,0,0,f,l,0,0,w,0):(a[0]=u,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=d,a[6]=0,a[7]=0,a[8]=h,a[9]=c,a[10]=f,a[11]=w,a[12]=0,a[13]=0,a[14]=l,a[15]=0,a)},s.computeViewportTransformation=function(t,e,i,n){t=r(t,r.EMPTY_OBJECT);var o=r(t.x,0),a=r(t.y,0),u=r(t.width,0),d=r(t.height,0);e=r(e,0),i=r(i,1);var h=.5*u,c=.5*d,f=.5*(i-e),w=h,l=c,y=f,p=o+h,v=a+c,m=e+f,g=1;return n===void 0?new s(w,0,0,p,0,l,0,v,0,0,y,m,0,0,0,g):(n[0]=w,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=l,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=y,n[11]=0,n[12]=p,n[13]=v,n[14]=m,n[15]=g,n)},s.toArray=function(t,e){if(t===void 0)throw new i("matrix is required");return e===void 0?[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]:(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e)},s.getElementIndex=function(t,e){if("number"!=typeof e||0>e||e>3)throw new i("row is required and must be 0, 1, 2, or 3.");if("number"!=typeof t||0>t||t>3)throw new i("column is required and must be 0, 1, 2, or 3.");return 4*t+e},s.getColumn=function(t,r,n){if(t===void 0)throw new i("matrix is required.");if("number"!=typeof r||0>r||r>3)throw new i("index is required and must be 0, 1, 2, or 3.");var o=4*r,a=t[o],u=t[o+1],s=t[o+2],d=t[o+3];return n===void 0?new e(a,u,s,d):(n.x=a,n.y=u,n.z=s,n.w=d,n)},s.setColumn=function(t,e,r,n){if(t===void 0)throw new i("matrix is required");if(r===void 0)throw new i("cartesian is required");if("number"!=typeof e||0>e||e>3)throw new i("index is required and must be 0, 1, 2, or 3.");n=s.clone(t,n);var o=4*e;return n[o]=r.x,n[o+1]=r.y,n[o+2]=r.z,n[o+3]=r.w,n},s.getRow=function(t,r,n){if(t===void 0)throw new i("matrix is required.");if("number"!=typeof r||0>r||r>3)throw new i("index is required and must be 0, 1, 2, or 3.");var o=t[r],a=t[r+4],u=t[r+8],s=t[r+12];return n===void 0?new e(o,a,u,s):(n.x=o,n.y=a,n.z=u,n.w=s,n)},s.setRow=function(t,e,r,n){if(t===void 0)throw new i("matrix is required");if(r===void 0)throw new i("cartesian is required");if("number"!=typeof e||0>e||e>3)throw new i("index is required and must be 0, 1, 2, or 3.");return n=s.clone(t,n),n[e]=r.x,n[e+4]=r.y,n[e+8]=r.z,n[e+12]=r.w,n},s.multiply=function(t,e,r){if(t===void 0)throw new i("left is required");if(e===void 0)throw new i("right is required");var n=t[0],o=t[1],a=t[2],u=t[3],d=t[4],h=t[5],c=t[6],f=t[7],w=t[8],l=t[9],y=t[10],p=t[11],v=t[12],m=t[13],g=t[14],x=t[15],q=e[0],z=e[1],E=e[2],b=e[3],S=e[4],M=e[5],_=e[6],O=e[7],T=e[8],R=e[9],I=e[10],N=e[11],P=e[12],C=e[13],A=e[14],U=e[15],L=n*q+d*z+w*E+v*b,B=o*q+h*z+l*E+m*b,D=a*q+c*z+y*E+g*b,V=u*q+f*z+p*E+x*b,W=n*S+d*M+w*_+v*O,G=o*S+h*M+l*_+m*O,F=a*S+c*M+y*_+g*O,H=u*S+f*M+p*_+x*O,Y=n*T+d*R+w*I+v*N,j=o*T+h*R+l*I+m*N,Z=a*T+c*R+y*I+g*N,X=u*T+f*R+p*I+x*N,k=n*P+d*C+w*A+v*U,J=o*P+h*C+l*A+m*U,Q=a*P+c*C+y*A+g*U,K=u*P+f*C+p*A+x*U;return r===void 0?new s(L,W,Y,k,B,G,j,J,D,F,Z,Q,V,H,X,K):(r[0]=L,r[1]=B,r[2]=D,r[3]=V,r[4]=W,r[5]=G,r[6]=F,r[7]=H,r[8]=Y,r[9]=j,r[10]=Z,r[11]=X,r[12]=k,r[13]=J,r[14]=Q,r[15]=K,r)},s.multiplyByTranslation=function(t,e,r){if(t===void 0)throw new i("matrix is required");if(e===void 0)throw new i("translation is required");var n=e.x,o=e.y,a=e.z,u=n*t[0]+o*t[4]+a*t[8]+t[12],d=n*t[1]+o*t[5]+a*t[9]+t[13],h=n*t[2]+o*t[6]+a*t[10]+t[14];return r===void 0?new s(t[0],t[4],t[8],u,t[1],t[5],t[9],d,t[2],t[6],t[10],h,t[3],t[7],t[11],t[15]):(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r[6]=t[6],r[7]=t[7],r[8]=t[8],r[9]=t[9],r[10]=t[10],r[11]=t[11],r[12]=u,r[13]=d,r[14]=h,r[15]=t[15],r)},s.multiplyByUniformScale=function(t,e,r){if(t===void 0)throw new i("matrix is required");if("number"!=typeof e)throw new i("scale is required");return 1===e?s.clone(t,r):r===void 0?new s(e*t[0],e*t[4],e*t[8],t[12],e*t[1],e*t[5],e*t[9],t[13],e*t[2],e*t[6],e*t[10],t[14],0,0,0,1):(r[0]=e*t[0],r[1]=e*t[1],r[2]=e*t[2],r[3]=0,r[4]=e*t[4],r[5]=e*t[5],r[6]=e*t[6],r[7]=0,r[8]=e*t[8],r[9]=e*t[9],r[10]=e*t[10],r[11]=0,r[12]=t[12],r[13]=t[13],r[14]=t[14],r[15]=1,r)},s.multiplyByVector=function(t,r,n){if(t===void 0)throw new i("matrix is required");if(r===void 0)throw new i("cartesian is required");var o=r.x,a=r.y,u=r.z,s=r.w,d=t[0]*o+t[4]*a+t[8]*u+t[12]*s,h=t[1]*o+t[5]*a+t[9]*u+t[13]*s,c=t[2]*o+t[6]*a+t[10]*u+t[14]*s,f=t[3]*o+t[7]*a+t[11]*u+t[15]*s;return n===void 0?new e(d,h,c,f):(n.x=d,n.y=h,n.z=c,n.w=f,n)};var f=new e(0,0,0,1);return s.multiplyByPoint=function(t,e,r){if(e===void 0)throw new i("cartesian is required");return f.x=e.x,f.y=e.y,f.z=e.z,s.multiplyByVector(t,f,r)},s.multiplyByScalar=function(t,e,r){if(t===void 0)throw new i("matrix is required");if("number"!=typeof e)throw new i("scalar is required and must be a number");return r===void 0?new s(t[0]*e,t[4]*e,t[8]*e,t[12]*e,t[1]*e,t[5]*e,t[9]*e,t[13]*e,t[2]*e,t[6]*e,t[10]*e,t[14]*e,t[3]*e,t[7]*e,t[11]*e,t[15]*e):(r[0]=t[0]*e,r[1]=t[1]*e,r[2]=t[2]*e,r[3]=t[3]*e,r[4]=t[4]*e,r[5]=t[5]*e,r[6]=t[6]*e,r[7]=t[7]*e,r[8]=t[8]*e,r[9]=t[9]*e,r[10]=t[10]*e,r[11]=t[11]*e,r[12]=t[12]*e,r[13]=t[13]*e,r[14]=t[14]*e,r[15]=t[15]*e,r)},s.negate=function(t,e){if(t===void 0)throw new i("matrix is required");return e===void 0?new s(-t[0],-t[4],-t[8],-t[12],-t[1],-t[5],-t[9],-t[13],-t[2],-t[6],-t[10],-t[14],-t[3],-t[7],-t[11],-t[15]):(e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e[4]=-t[4],e[5]=-t[5],e[6]=-t[6],e[7]=-t[7],e[8]=-t[8],e[9]=-t[9],e[10]=-t[10],e[11]=-t[11],e[12]=-t[12],e[13]=-t[13],e[14]=-t[14],e[15]=-t[15],e)},s.transpose=function(t,e){if(t===void 0)throw new i("matrix is required");if(e===void 0)return new s(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]);var r=t[1],n=t[2],o=t[3],a=t[6],u=t[7],d=t[11];return e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=a,e[10]=t[10],e[11]=t[14],e[12]=o,e[13]=u,e[14]=d,e[15]=t[15],e},s.equals=function(t,e){return t===e||t!==void 0&&e!==void 0&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]},s.equalsEpsilon=function(t,e,r){if("number"!=typeof r)throw new i("epsilon is required and must be a number");return t===e||t!==void 0&&e!==void 0&&r>=Math.abs(t[0]-e[0])&&r>=Math.abs(t[1]-e[1])&&r>=Math.abs(t[2]-e[2])&&r>=Math.abs(t[3]-e[3])&&r>=Math.abs(t[4]-e[4])&&r>=Math.abs(t[5]-e[5])&&r>=Math.abs(t[6]-e[6])&&r>=Math.abs(t[7]-e[7])&&r>=Math.abs(t[8]-e[8])&&r>=Math.abs(t[9]-e[9])&&r>=Math.abs(t[10]-e[10])&&r>=Math.abs(t[11]-e[11])&&r>=Math.abs(t[12]-e[12])&&r>=Math.abs(t[13]-e[13])&&r>=Math.abs(t[14]-e[14])&&r>=Math.abs(t[15]-e[15])},s.getTranslation=function(e,r){if(e===void 0)throw new i("matrix is required");return r===void 0?new t(e[12],e[13],e[14]):(r.x=e[12],r.y=e[13],r.z=e[14],r)},s.getRotation=function(t,e){if(t===void 0)throw new i("matrix is required");return e===void 0?new a(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]):(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e)},s.inverse=function(t,e){if(t===void 0)throw new i("matrix is required");var r=t[0],n=t[4],a=t[8],d=t[12],h=t[1],c=t[5],f=t[9],w=t[13],l=t[2],y=t[6],p=t[10],v=t[14],m=t[3],g=t[7],x=t[11],q=t[15],z=p*q,E=v*x,b=y*q,S=v*g,M=y*x,_=p*g,O=l*q,T=v*m,R=l*x,I=p*m,N=l*g,P=y*m,C=z*c+S*f+M*w-(E*c+b*f+_*w),A=E*h+O*f+I*w-(z*h+T*f+R*w),U=b*h+T*c+N*w-(S*h+O*c+P*w),L=_*h+R*c+P*f-(M*h+I*c+N*f),B=E*n+b*a+_*d-(z*n+S*a+M*d),D=z*r+T*a+R*d-(E*r+O*a+I*d),V=S*r+O*n+P*d-(b*r+T*n+N*d),W=M*r+I*n+N*a-(_*r+R*n+P*a);z=a*w,E=d*f,b=n*w,S=d*c,M=n*f,_=a*c,O=r*w,T=d*h,R=r*f,I=a*h,N=r*c,P=n*h;var G=z*g+S*x+M*q-(E*g+b*x+_*q),F=E*m+O*x+I*q-(z*m+T*x+R*q),H=b*m+T*g+N*q-(S*m+O*g+P*q),Y=_*m+R*g+P*x-(M*m+I*g+N*x),j=b*p+_*v+E*y-(M*v+z*y+S*p),Z=R*v+z*l+T*p-(O*p+I*v+E*l),X=O*y+P*v+S*l-(N*v+b*l+T*y),k=N*p+M*l+I*y-(R*y+P*p+_*l),J=r*C+n*A+a*U+d*L;if(o.EPSILON20>Math.abs(J))throw new u("matrix is not invertible because its determinate is zero.");return J=1/J,e===void 0?new s(C*J,B*J,G*J,j*J,A*J,D*J,F*J,Z*J,U*J,V*J,H*J,X*J,L*J,W*J,Y*J,k*J):(e[0]=C*J,e[1]=A*J,e[2]=U*J,e[3]=L*J,e[4]=B*J,e[5]=D*J,e[6]=V*J,e[7]=W*J,e[8]=G*J,e[9]=F*J,e[10]=H*J,e[11]=Y*J,e[12]=j*J,e[13]=Z*J,e[14]=X*J,e[15]=k*J,e)},s.inverseTransformation=function(t,e){if(t===void 0)throw new i("matrix is required");var r=t[0],n=t[1],o=t[2],a=t[4],u=t[5],d=t[6],h=t[8],c=t[9],f=t[10],w=t[12],l=t[13],y=t[14],p=-r*w-n*l-o*y,v=-a*w-u*l-d*y,m=-h*w-c*l-f*y;return e===void 0?new s(r,n,o,p,a,u,d,v,h,c,f,m,0,0,0,1):(e[0]=r,e[1]=a,e[2]=h,e[3]=0,e[4]=n,e[5]=u,e[6]=c,e[7]=0,e[8]=o,e[9]=d,e[10]=f,e[11]=0,e[12]=p,e[13]=v,e[14]=m,e[15]=1,e)},s.IDENTITY=n(new s(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)),s.COLUMN0ROW0=0,s.COLUMN0ROW1=1,s.COLUMN0ROW2=2,s.COLUMN0ROW3=3,s.COLUMN1ROW0=4,s.COLUMN1ROW1=5,s.COLUMN1ROW2=6,s.COLUMN1ROW3=7,s.COLUMN2ROW0=8,s.COLUMN2ROW1=9,s.COLUMN2ROW2=10,s.COLUMN2ROW3=11,s.COLUMN3ROW0=12,s.COLUMN3ROW1=13,s.COLUMN3ROW2=14,s.COLUMN3ROW3=15,s.prototype.clone=function(t){return s.clone(this,t)},s.prototype.toArray=function(t){return s.toArray(this,t)},s.prototype.getColumn=function(t,e){return s.getColumn(this,t,e)},s.prototype.setColumn=function(t,e,r){return s.setColumn(this,t,e,r)},s.prototype.getRow=function(t,e){return s.getRow(this,t,e)},s.prototype.setRow=function(t,e,r){return s.setRow(this,t,e,r)},s.prototype.multiply=function(t,e){return s.multiply(this,t,e)},s.prototype.multiplyByTranslation=function(t,e){return s.multiplyByTranslation(this,t,e)},s.prototype.multiplyByUniformScale=function(t,e){return s.multiplyByUniformScale(this,t,e)},s.prototype.multiplyByVector=function(t,e){return s.multiplyByVector(this,t,e)},s.prototype.multiplyByPoint=function(t,e){return s.multiplyByPoint(this,t,e)},s.prototype.multiplyByScalar=function(t,e){return s.multiplyByScalar(this,t,e)},s.prototype.negate=function(t){return s.negate(this,t)},s.prototype.transpose=function(t){return s.transpose(this,t)},s.prototype.equals=function(t){return s.equals(this,t)},s.prototype.equalsEpsilon=function(t,e){return s.equalsEpsilon(this,t,e)},s.prototype.toString=function(){return"("+this[0]+", "+this[4]+", "+this[8]+", "+this[12]+")\n"+"("+this[1]+", "+this[5]+", "+this[9]+", "+this[13]+")\n"+"("+this[2]+", "+this[6]+", "+this[10]+", "+this[14]+")\n"+"("+this[3]+", "+this[7]+", "+this[11]+", "+this[15]+")"},s.prototype.getTranslation=function(t){return s.getTranslation(this,t)},s.prototype.getRotation=function(t){return s.getRotation(this,t)},s.prototype.inverse=function(t){return s.inverse(this,t)},s.prototype.inverseTransformation=function(t){return s.inverseTransformation(this,t)},s}),define("Core/BoundingSphere",["./defaultValue","./DeveloperError","./Cartesian2","./Cartesian3","./Cartesian4","./Cartographic","./Ellipsoid","./GeographicProjection","./Extent","./Intersect","./Interval","./Matrix4"],function(t,e,r,i,n,o,a,u,s,d,h,c){var f=function(e,r){this.center=i.clone(t(e,i.ZERO)),this.radius=t(r,0)},w=new i,l=new i,y=new i,p=new i,v=new i,m=new i,g=new i,x=new i,q=new i,z=new i,E=new i,b=new i;f.fromPoints=function(t,e){if(e===void 0&&(e=new f),t===void 0||0===t.length)return e.center=i.ZERO.clone(e.center),e.radius=0,e;for(var r=i.clone(t[0],g),n=i.clone(r,w),o=i.clone(r,l),a=i.clone(r,y),u=i.clone(r,p),s=i.clone(r,v),d=i.clone(r,m),h=t.length,c=1;h>c;c++){i.clone(t[c],r);var S=r.x,M=r.y,_=r.z;n.x>S&&i.clone(r,n),S>u.x&&i.clone(r,u),o.y>M&&i.clone(r,o),M>s.y&&i.clone(r,s),a.z>_&&i.clone(r,a),_>d.z&&i.clone(r,d)}var O=i.magnitudeSquared(i.subtract(u,n,x)),T=i.magnitudeSquared(i.subtract(s,o,x)),R=i.magnitudeSquared(i.subtract(d,a,x)),I=n,N=u,P=O;T>P&&(P=T,I=o,N=s),R>P&&(P=R,I=a,N=d);var C=q;C.x=.5*(I.x+N.x),C.y=.5*(I.y+N.y),C.z=.5*(I.z+N.z);var A=i.magnitudeSquared(i.subtract(N,C,x)),U=Math.sqrt(A),L=z;L.x=n.x,L.y=o.y,L.z=a.z;var B=E;B.x=u.x,B.y=s.y,B.z=d.z;var D=i.multiplyByScalar(i.add(L,B,x),.5,b),V=0;for(c=0;h>c;c++){i.clone(t[c],r);var W=i.magnitude(i.subtract(r,D,x));W>V&&(V=W);var G=i.magnitudeSquared(i.subtract(r,C,x));if(G>A){var F=Math.sqrt(G);U=.5*(U+F),A=U*U;var H=F-U;C.x=(U*C.x+H*r.x)/F,C.y=(U*C.y+H*r.y)/F,C.z=(U*C.z+H*r.z)/F}}return V>U?(i.clone(C,e.center),e.radius=U):(i.clone(D,e.center),e.radius=V),e};var S=new u,M=new i,_=new i,O=new o,T=new o;f.fromExtent2D=function(t,e,r){return f.fromExtentWithHeights2D(t,e,0,0,r)},f.fromExtentWithHeights2D=function(e,r,n,o,a){if(a===void 0&&(a=new f),e===void 0)return a.center=i.ZERO.clone(a.center),a.radius=0,a;r=t(r,S),e.getSouthwest(O),O.height=n,e.getNortheast(T),T.height=o;var u=r.project(O,M),s=r.project(T,_),d=s.x-u.x,h=s.y-u.y,c=s.z-u.z;a.radius=.5*Math.sqrt(d*d+h*h+c*c);var w=a.center;return w.x=u.x+.5*d,w.y=u.y+.5*h,w.z=u.z+.5*c,a};var R=[];f.fromExtent3D=function(e,r,i){r=t(r,a.WGS84);var n;return e!==void 0&&(n=e.subsample(r,R)),f.fromPoints(n,i)},f.fromVertices=function(t,r,n,o){if(o===void 0&&(o=new f),t===void 0||0===t.length)return o.center=i.ZERO.clone(o.center),o.radius=0,o;if(r===void 0&&(r=i.ZERO),n===void 0&&(n=3),3>n)throw new e("stride must be 3 or greater.");var a=g;a.x=t[0]+r.x,a.y=t[1]+r.y,a.z=t[2]+r.z;for(var u=i.clone(a,w),s=i.clone(a,l),d=i.clone(a,y),h=i.clone(a,p),c=i.clone(a,v),S=i.clone(a,m),M=t.length,_=0;M>_;_+=n){var O=t[_]+r.x,T=t[_+1]+r.y,R=t[_+2]+r.z;a.x=O,a.y=T,a.z=R,u.x>O&&i.clone(a,u),O>h.x&&i.clone(a,h),s.y>T&&i.clone(a,s),T>c.y&&i.clone(a,c),d.z>R&&i.clone(a,d),R>S.z&&i.clone(a,S)}var I=i.magnitudeSquared(i.subtract(h,u,x)),N=i.magnitudeSquared(i.subtract(c,s,x)),P=i.magnitudeSquared(i.subtract(S,d,x)),C=u,A=h,U=I;N>U&&(U=N,C=s,A=c),P>U&&(U=P,C=d,A=S);var L=q;L.x=.5*(C.x+A.x),L.y=.5*(C.y+A.y),L.z=.5*(C.z+A.z);var B=i.magnitudeSquared(i.subtract(A,L,x)),D=Math.sqrt(B),V=z;V.x=u.x,V.y=s.y,V.z=d.z;var W=E;W.x=h.x,W.y=c.y,W.z=S.z;var G=i.multiplyByScalar(i.add(V,W,x),.5,b),F=0;for(_=0;M>_;_+=n){a.x=t[_]+r.x,a.y=t[_+1]+r.y,a.z=t[_+2]+r.z;var H=i.magnitude(i.subtract(a,G,x));H>F&&(F=H);var Y=i.magnitudeSquared(i.subtract(a,L,x));if(Y>B){var j=Math.sqrt(Y);D=.5*(D+j),B=D*D;var Z=j-D;L.x=(D*L.x+Z*a.x)/j,L.y=(D*L.y+Z*a.y)/j,L.z=(D*L.z+Z*a.z)/j}}return F>D?(i.clone(L,o.center),o.radius=D):(i.clone(G,o.center),o.radius=F),o},f.fromCornerPoints=function(t,r,n){if(t===void 0||r===void 0)throw new e("corner and oppositeCorner are required.");n===void 0&&(n=new f);var o=n.center;return i.add(t,r,o),i.multiplyByScalar(o,.5,o),n.radius=i.distance(o,r),n},f.clone=function(t,r){if(t===void 0)throw new e("sphere is required");return r===void 0?new f(t.center,t.radius):(r.center=i.clone(t.center,r.center),r.radius=t.radius,r)};var I=new i,N=new i;f.union=function(t,r,n){if(t===void 0)throw new e("left is required.");if(r===void 0)throw new e("right is required.");n===void 0&&(n=new f);var o=t.center,a=r.center;i.add(o,a,N);var u=i.multiplyByScalar(N,.5,N),s=i.subtract(o,u,I).magnitude()+t.radius,d=i.subtract(a,u,I).magnitude()+r.radius;return n.radius=Math.max(s,d),i.clone(u,n.center),n};var P=new i;f.expand=function(t,r,n){if(t===void 0)throw new e("sphere is required.");if(r===void 0)throw new e("point is required.");n=f.clone(t,n);var o=i.subtract(r,n.center,P).magnitude();return o>n.radius&&(n.radius=o),n},f.intersect=function(t,r){if(t===void 0)throw new e("sphere is required.");if(r===void 0)throw new e("plane is required.");var n=t.center,o=t.radius,a=i.dot(r,n)+r.w;return-o>a?d.OUTSIDE:o>a?d.INTERSECTING:d.INSIDE};var C=n.UNIT_W.clone();f.transform=function(t,r,n){if(t===void 0)throw new e("sphere is required.");if(r===void 0)throw new e("transform is required.");return n===void 0&&(n=new f),c.multiplyByPoint(r,t.center,C),i.clone(C,n.center),n.radius=t.radius,n};var A=new i;return f.getPlaneDistances=function(t,r,n,o){if(t===void 0)throw new e("sphere is required.");if(r===void 0)throw new e("position is required.");if(n===void 0)throw new e("direction is required.");o===void 0&&(o=new h);var a=i.subtract(t.center,r,A),u=i.multiplyByScalar(n,n.dot(a),A),s=u.magnitude();return o.start=s-t.radius,o.stop=s+t.radius,o},f.equals=function(t,e){return t===e||t!==void 0&&e!==void 0&&i.equals(t.center,e.center)&&t.radius===e.radius},f.prototype.clone=function(t){return f.clone(this,t)},f.prototype.union=function(t,e){return f.union(this,t,e)},f.prototype.expand=function(t,e){return f.expand(this,t,e)},f.prototype.intersect=function(t){return f.intersect(this,t)},f.prototype.transform=function(t,e){return f.transform(this,t,e)},f.prototype.getPlaneDistances=function(t,e,r){return f.getPlaneDistances(this,t,e,r)},f.prototype.equals=function(t){return f.equals(this,t)},f}),define("Core/getImagePixels",[],function(){var t={},e=function(e,r,i){r===void 0&&(r=e.width),i===void 0&&(i=e.height);var n=t[r];n===void 0&&(n={},t[r]=n);var o=n[i];if(o===void 0){var a=document.createElement("canvas");a.width=r,a.height=i,o=a.getContext("2d"),o.globalCompositeOperation="copy",n[i]=o}return o.drawImage(e,0,0,r,i),o.getImageData(0,0,r,i).data};return e}),define("Core/ComponentDatatype",["./Enumeration"],function(t){if("undefined"==typeof Int8Array)return{};var e={};return e.BYTE=new t(5120,"BYTE"),e.BYTE.sizeInBytes=Int8Array.BYTES_PER_ELEMENT,e.BYTE.createTypedArray=function(t){return new Int8Array(t)},e.BYTE.createArrayBufferView=function(t,e){return new Int8Array(t,e)},e.UNSIGNED_BYTE=new t(5121,"UNSIGNED_BYTE"),e.UNSIGNED_BYTE.sizeInBytes=Uint8Array.BYTES_PER_ELEMENT,e.UNSIGNED_BYTE.createTypedArray=function(t){return new Uint8Array(t)},e.UNSIGNED_BYTE.createArrayBufferView=function(t,e){return new Uint8Array(t,e)},e.SHORT=new t(5122,"SHORT"),e.SHORT.sizeInBytes=Int16Array.BYTES_PER_ELEMENT,e.SHORT.createTypedArray=function(t){return new Int16Array(t)},e.SHORT.createArrayBufferView=function(t,e){return new Int16Array(t,e)},e.UNSIGNED_SHORT=new t(5123,"UNSIGNED_SHORT"),e.UNSIGNED_SHORT.sizeInBytes=Uint16Array.BYTES_PER_ELEMENT,e.UNSIGNED_SHORT.createTypedArray=function(t){return new Uint16Array(t)},e.UNSIGNED_SHORT.createArrayBufferView=function(t,e){return new Uint16Array(t,e)},e.FLOAT=new t(5126,"FLOAT"),e.FLOAT.sizeInBytes=Float32Array.BYTES_PER_ELEMENT,e.FLOAT.createTypedArray=function(t){return new Float32Array(t)},e.FLOAT.createArrayBufferView=function(t,e){return new Float32Array(t,e)},e.validate=function(t){return t===e.BYTE||t===e.UNSIGNED_BYTE||t===e.SHORT||t===e.UNSIGNED_SHORT||t===e.FLOAT},e}),define("Core/PrimitiveType",["./Enumeration"],function(t){var e={POINTS:new t(0,"POINTS"),LINES:new t(1,"LINES"),LINE_LOOP:new t(2,"LINE_LOOP"),LINE_STRIP:new t(3,"LINE_STRIP"),TRIANGLES:new t(4,"TRIANGLES"),TRIANGLE_STRIP:new t(5,"TRIANGLE_STRIP"),TRIANGLE_FAN:new t(6,"TRIANGLE_FAN"),validate:function(t){return t===e.POINTS||t===e.LINES||t===e.LINE_LOOP||t===e.LINE_STRIP||t===e.TRIANGLES||t===e.TRIANGLE_STRIP||t===e.TRIANGLE_FAN}};return e}),define("Core/HeightmapTessellator",["./defaultValue","./freezeObject","./getImagePixels","./DeveloperError","./Cartesian3","./ComponentDatatype","./Ellipsoid","./Extent","./Math","./PrimitiveType"],function(t,e,r,i,n,o,a,u,s){var d={};return d.DEFAULT_STRUCTURE=e({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1}),d.computeVertices=function(e){if(e===void 0||e.heightmap===void 0)throw new i("description.heightmap is required.");if(e.width===void 0||e.height===void 0)throw new i("description.width and description.height are required.");if(e.vertices===void 0)throw new i("description.vertices is required.");if(e.nativeExtent===void 0)throw new i("description.nativeExtent is required.");if(e.skirtHeight===void 0)throw new i("description.skirtHeight is required.");var r,o,u,h,c=Math.cos,f=Math.sin,w=Math.sqrt,l=Math.atan,y=Math.exp,p=s.PI_OVER_TWO,v=s.toRadians,m=e.vertices,g=e.heightmap,x=e.width,q=e.height,z=e.skirtHeight,E=t(e.isGeographic,!0),b=t(e.ellipsoid,a.WGS84),S=1/b.getMaximumRadius(),M=e.nativeExtent,_=e.extent;_===void 0?E?(r=v(M.west),o=v(M.south),u=v(M.east),h=v(M.north)):(r=M.west*S,o=p-2*l(y(-M.south*S)),u=M.east*S,h=p-2*l(y(-M.north*S))):(r=_.west,o=_.south,u=_.east,h=_.north);var O=t(e.relativeToCenter,n.ZERO),T=t(e.structure,d.DEFAULT_STRUCTURE),R=t(T.heightScale,d.DEFAULT_STRUCTURE.heightScale),I=t(T.heightOffset,d.DEFAULT_STRUCTURE.heightOffset),N=t(T.elementsPerHeight,d.DEFAULT_STRUCTURE.elementsPerHeight),P=t(T.stride,d.DEFAULT_STRUCTURE.stride),C=t(T.elementMultiplier,d.DEFAULT_STRUCTURE.elementMultiplier),A=t(T.isBigEndian,d.DEFAULT_STRUCTURE.isBigEndian),U=(M.east-M.west)/(x-1),L=(M.north-M.south)/(q-1),B=b.getRadiiSquared(),D=B.x,V=B.y,W=B.z,G=0,F=65536,H=-65536,Y=0,j=q,Z=0,X=x;z>0&&(--Y,++j,--Z,++X);for(var k=Y;j>k;++k){var J=k;0>J&&(J=0),J>=q&&(J=q-1);var Q=M.north-L*J;Q=E?v(Q):p-2*l(y(-Q*S));for(var K=c(Q),$=f(Q),te=W*$,ee=(Q-o)/(h-o),re=Z;X>re;++re){var ie=re;0>ie&&(ie=0),ie>=x&&(ie=x-1);var ne=M.west+U*ie;E?ne=v(ne):ne*=S;var oe,ae=J*x*P+ie*P;if(1===N)oe=g[ae];else{oe=0;var ue;if(A)for(ue=0;N>ue;++ue)oe=oe*C+g[ae+ue];else for(ue=N-1;ue>=0;--ue)oe=oe*C+g[ae+ue]}oe=oe*R+I,H=Math.max(H,oe),F=Math.min(F,oe),(re!==ie||k!==J)&&(oe-=z);var se=K*c(ne),de=K*f(ne),he=D*se,ce=V*de,fe=w(he*se+ce*de+te*$),we=1/fe,le=he*we,ye=ce*we,pe=te*we;m[G++]=le+se*oe-O.x,m[G++]=ye+de*oe-O.y,m[G++]=pe+$*oe-O.z,m[G++]=oe;var ve=(ne-r)/(u-r);m[G++]=ve,m[G++]=ee}}return{maximumHeight:H,minimumHeight:F}},d}),define("Core/Visibility",["./Enumeration"],function(t){var e={NONE:new t(-1,"NONE"),PARTIAL:new t(0,"PARTIAL"),FULL:new t(1,"FULL")};
  return e}),define("Core/Occluder",["./defaultValue","./DeveloperError","./Math","./Cartesian3","./Visibility","./Ellipsoid","./BoundingSphere"],function(t,e,r,i,n,o,a){var u=function(t,r){if(!t)throw new e("occluderBoundingSphere is required.");if(!r)throw new e("camera position is required.");this._occluderPosition=t.center.clone(),this._occluderRadius=t.radius,this._horizonDistance=0,this._horizonPlaneNormal=void 0,this._horizonPlanePosition=void 0,this._cameraPosition=void 0,this.setCameraPosition(r)};u.prototype.getPosition=function(){return this._occluderPosition},u.prototype.getRadius=function(){return this._occluderRadius},u.prototype.setCameraPosition=function(t){t=i.clone(t);var e,r,n,o=this._occluderPosition.subtract(t),a=o.magnitudeSquared(),u=this._occluderRadius*this._occluderRadius;if(a>u){e=Math.sqrt(a-u),a=1/Math.sqrt(a),r=o.multiplyByScalar(a);var s=e*e*a;n=t.add(r.multiplyByScalar(s))}else e=Number.MAX_VALUE;this._horizonDistance=e,this._horizonPlaneNormal=r,this._horizonPlanePosition=n,this._cameraPosition=t};var s=new i;u.prototype.isPointVisible=function(t){if(this._horizonDistance!==Number.MAX_VALUE){var e=i.subtract(t,this._occluderPosition,s),r=this._occluderRadius;if(r=e.magnitudeSquared()-r*r,r>0)return r=Math.sqrt(r)+this._horizonDistance,e=i.subtract(t,this._cameraPosition,e),r*r>e.magnitudeSquared()}return!1},u.prototype.isBoundingSphereVisible=function(t){var e=t.center.clone(),r=t.radius;if(this._horizonDistance!==Number.MAX_VALUE){var n=i.subtract(e,this._occluderPosition,s),o=this._occluderRadius-r;if(o=n.magnitudeSquared()-o*o,this._occluderRadius>r)return o>0?(o=Math.sqrt(o)+this._horizonDistance,n=i.subtract(e,this._cameraPosition,n),o*o+r*r>n.magnitudeSquared()):!1;if(o>0){n=e.subtract(this._cameraPosition);var a=n.magnitudeSquared(),u=this._occluderRadius*this._occluderRadius,d=r*r;return(this._horizonDistance*this._horizonDistance+u)*d>a*u?!0:(o=Math.sqrt(o)+this._horizonDistance,o*o+d>a)}return!0}return!1},u.prototype.getVisibility=function(t){var e=t.center.clone(),r=t.radius;if(r>this._occluderRadius)return n.FULL;if(this._horizonDistance!==Number.MAX_VALUE){var i=e.subtract(this._occluderPosition),o=this._occluderRadius-r,a=i.magnitudeSquared();if(o=a-o*o,o>0){o=Math.sqrt(o)+this._horizonDistance,i=e.subtract(this._cameraPosition);var u=i.magnitudeSquared();return u>o*o+r*r?n.NONE:(o=this._occluderRadius+r,o=a-o*o,o>0?(o=Math.sqrt(o)+this._horizonDistance,o*o+r*r>u?n.FULL:n.PARTIAL):(i=e.subtract(this._horizonPlanePosition),i.dot(this._horizonPlaneNormal)>-r?n.PARTIAL:n.FULL))}}return n.NONE},u.getOccludeePoint=function(t,r,n){if(!t)throw new e("occluderBoundingSphere is required.");if(!n)throw new e("positions is required.");if(0===n.length)throw new e("positions must contain at least one element");var o=i.clone(r),a=t.center.clone(),s=t.radius,d=n.length;if(a.equals(r))throw new e("occludeePosition must be different than occluderBoundingSphere.center");var h=o.subtract(a).normalize(),c=-h.dot(a),f=u._anyRotationVector(a,h,c),w=u._horizonToPlaneNormalDotProduct(t,h,c,f,n[0]);if(!w)return void 0;for(var l,y=1;d>y;++y){if(l=u._horizonToPlaneNormalDotProduct(t,h,c,f,n[y]),!l)return void 0;w>l&&(w=l)}if(.0017453283658983088>w)return void 0;var p=s/w;return a.add(h.multiplyByScalar(p))};var d=[];return u.computeOccludeePointFromExtent=function(r,n){if(r===void 0)throw new e("extent is required.");n=t(n,o.WGS84);var s=r.subsample(n,d),h=a.fromPoints(s),c=i.ZERO;return c.equals(h.center)?void 0:u.getOccludeePoint(new a(c,n.getMinimumRadius()),h.center,s)},u._anyRotationVector=function(t,e,r){var n=e.clone().abs(),o=n.x>n.y?0:1;(0===o&&n.z>n.x||1===o&&n.z>n.y)&&(o=2);var a=new i;0===o?(n.x=t.x,n.y=t.y+1,n.z=t.z+1,a=i.UNIT_X):1===o?(n.x=t.x+1,n.y=t.y,n.z=t.z+1,a=i.UNIT_Y):(n.x=t.x+1,n.y=t.y+1,n.z=t.z,a=i.UNIT_Z);var u=(e.dot(n)+r)/-e.dot(a);return n.add(a.multiplyByScalar(u)).subtract(t).normalize()},u._rotationVector=function(t,e,i,n,o){var a=n.subtract(t);if(a=a.normalize(),.9999999847691291>e.dot(a)){var u=e.cross(a),s=u.magnitude();if(s>r.EPSILON13)return u.normalize()}return o},u._horizonToPlaneNormalDotProduct=function(t,e,r,n,o){var a=i.clone(o),u=t.center.clone(),s=t.radius,d=u.subtract(a),h=d.magnitudeSquared(),c=s*s;if(c>h)return!1;var f=h-c,w=Math.sqrt(f),l=Math.sqrt(h),y=1/l,p=w*y,v=p*w;d=d.normalize();var m=a.add(d.multiplyByScalar(v)),g=Math.sqrt(f-v*v),x=this._rotationVector(u,e,r,a,n),q=new i(x.x*x.x*d.x+(x.x*x.y-x.z)*d.y+(x.x*x.z+x.y)*d.z,(x.x*x.y+x.z)*d.x+x.y*x.y*d.y+(x.y*x.z-x.x)*d.z,(x.x*x.z-x.y)*d.x+(x.y*x.z+x.x)*d.y+x.z*x.z*d.z);q=q.normalize();var z=q.multiplyByScalar(g);x=m.add(z).subtract(u).normalize();var E=e.dot(x);x=m.subtract(z).subtract(u).normalize();var b=e.dot(x);return b>E?E:b},u}),define("Workers/createTaskProcessorWorker",[],function(){var t=function(t){var e,r=[],i={id:void 0,result:void 0};return function(n){var o=n.data;i.id=o.id,r.length=0,i.result=t(o.parameters,r),e===void 0&&(e=self.webkitPostMessage!==void 0?self.webkitPostMessage:self.postMessage),e(i,r)}};return t}),define("Workers/createVerticesFromHeightmap",["../Core/BoundingSphere","../Core/Cartesian3","../Core/Ellipsoid","../Core/Extent","../Core/HeightmapTessellator","../Core/Occluder","./createTaskProcessorWorker"],function(t,e,r,i,n,o,a){function u(a,u){var s=6,d=a.width,h=a.height;a.skirtHeight>0&&(d+=2,h+=2);var c=new Float32Array(d*h*s);u.push(c.buffer),a.ellipsoid=r.clone(a.ellipsoid),a.extent=i.clone(a.extent),a.vertices=c;var f=n.computeVertices(a),w=t.fromVertices(c,a.relativeToCenter,s),l=a.extent,y=a.ellipsoid,p=o.computeOccludeePointFromExtent(l,y);return p!==void 0&&e.multiplyComponents(p,y.getOneOverRadii(),p),{vertices:c.buffer,numberOfAttributes:s,minimumHeight:f.minimumHeight,maximumHeight:f.maximumHeight,gridWidth:d,gridHeight:h,boundingSphere3D:w,occludeePointInScaledSpace:p}}return a(u)});