/** * 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. */ !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(e){t=e.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 i={};return i.typeOf={},i.defined=function(n,i){if(!e(i))throw new t(r(n))},i.typeOf.func=function(e,r){if("function"!=typeof r)throw new t(n(typeof r,"function",e))},i.typeOf.string=function(e,r){if("string"!=typeof r)throw new t(n(typeof r,"string",e))},i.typeOf.number=function(e,r){if("number"!=typeof r)throw new t(n(typeof r,"number",e))},i.typeOf.number.lessThan=function(e,r,n){if(i.typeOf.number(e,r),r>=n)throw new t("Expected "+e+" to be less than "+n+", actual value was "+r)},i.typeOf.number.lessThanOrEquals=function(e,r,n){if(i.typeOf.number(e,r),r>n)throw new t("Expected "+e+" to be less than or equal to "+n+", actual value was "+r)},i.typeOf.number.greaterThan=function(e,r,n){if(i.typeOf.number(e,r),r<=n)throw new t("Expected "+e+" to be greater than "+n+", actual value was "+r)},i.typeOf.number.greaterThanOrEquals=function(e,r,n){if(i.typeOf.number(e,r),r=w&&(b=(b+8)%24,u=b);l=252?6:f>=248?5:f>=240?4:f>=224?3:f>=192?2:1;s[254]=s[254]=1,r.string2buf=function(e){var t,r,n,a,o,s=e.length,f=0;for(a=0;a>>6,t[o++]=128|63&r):r<65536?(t[o++]=224|r>>>12,t[o++]=128|r>>>6&63,t[o++]=128|63&r):(t[o++]=240|r>>>18,t[o++]=128|r>>>12&63,t[o++]=128|r>>>6&63,t[o++]=128|63&r);return t},r.buf2binstring=function(e){return n(e,e.length)},r.binstring2buf=function(e){for(var t=new i.Buf8(e.length),r=0,n=t.length;r4)u[i++]=65533,r+=o-1;else{for(a&=2===o?31:3===o?15:7;o>1&&r1?u[i++]=65533:a<65536?u[i++]=a:(a-=65536,u[i++]=55296|a>>10&1023,u[i++]=56320|1023&a)}return n(u,i)},r.utf8border=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0?t:0===r?t:r+s[e[r]]>t?r:t}},{"./common":1}],3:[function(e,t,r){"use strict";function n(e,t,r,n){for(var i=65535&e|0,a=e>>>16&65535|0,o=0;0!==r;){o=r>2e3?2e3:r,r-=o;do{i=i+t[n++]|0,a=a+i|0}while(--o);i%=65521,a%=65521}return i|a<<16|0}t.exports=n},{}],4:[function(e,t,r){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(e,t,r){"use strict";function n(e,t,r,n){var a=i,o=n+r;e^=-1;for(var s=n;s>>8^a[255&(e^t[s])];return-1^e}var i=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=n},{}],6:[function(e,t,r){"use strict";function n(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}t.exports=n},{}],7:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,i,a,o,s,f,u,c,l,d,h,w,b,m,g,v,p,k,_,y,E,x,S,T;r=e.state,n=e.next_in,S=e.input,i=n+(e.avail_in-5),a=e.next_out,T=e.output,o=a-(t-e.avail_out),s=a+(e.avail_out-257),f=r.dmax,u=r.wsize,c=r.whave,l=r.wnext,d=r.window,h=r.hold,w=r.bits,b=r.lencode,m=r.distcode,g=(1<>>24,h>>>=k,w-=k,0===(k=p>>>16&255))T[a++]=65535&p;else{if(!(16&k)){if(0==(64&k)){p=b[(65535&p)+(h&(1<>>=k,w-=k),w<15&&(h+=S[n++]<>>24,h>>>=k,w-=k,!(16&(k=p>>>16&255))){if(0==(64&k)){p=m[(65535&p)+(h&(1<f){e.msg="invalid distance too far back",r.mode=30;break e}if(h>>>=k,w-=k,k=a-o,y>k){if((k=y-k)>c&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(E=0,x=d,0===l){if(E+=u-k,k<_){_-=k;do{T[a++]=d[E++]}while(--k);E=a-y,x=T}}else if(l2;)T[a++]=x[E++],T[a++]=x[E++],T[a++]=x[E++],_-=3;_&&(T[a++]=x[E++],_>1&&(T[a++]=x[E++]))}else{E=a-y;do{T[a++]=T[E++],T[a++]=T[E++],T[a++]=T[E++],_-=3}while(_>2);_&&(T[a++]=T[E++],_>1&&(T[a++]=T[E++]))}break}}break}}while(n>3,n-=_,w-=_<<3,h&=(1<>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function i(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new v.Buf16(320),this.work=new v.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function a(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=z,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new v.Buf32(be),t.distcode=t.distdyn=new v.Buf32(me),t.sane=1,t.back=-1,A):U}function o(e){var t;return e&&e.state?(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,a(e)):U}function s(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?U:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,o(e))):U}function f(e,t){var r,n;return e?(n=new i,e.state=n,n.window=null,r=s(e,t),r!==A&&(e.state=null),r):U}function u(e){return f(e,ge)}function c(e){if(ve){var t;for(m=new v.Buf32(512),g=new v.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(y(x,e.lens,0,288,m,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;y(S,e.lens,0,32,g,0,e.work,{bits:5}),ve=!1}e.lencode=m,e.lenbits=9,e.distcode=g,e.distbits=5}function l(e,t,r,n){var i,a=e.state;return null===a.window&&(a.wsize=1<=a.wsize?(v.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>n&&(i=n),v.arraySet(a.window,t,r-n,i,a.wnext),n-=i,n?(v.arraySet(a.window,t,r-n,n,0),a.wnext=n,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,r.check=k(r.check,Oe,2,0),d=0,h=0,r.mode=P;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&d)<<8)+(d>>8))%31){e.msg="incorrect header check",r.mode=de;break}if((15&d)!==N){e.msg="unknown compression method",r.mode=de;break}if(d>>>=4,h-=4,ye=8+(15&d),0===r.wbits)r.wbits=ye;else if(ye>r.wbits){e.msg="invalid window size",r.mode=de;break}r.dmax=1<>8&1),512&r.flags&&(Oe[0]=255&d,Oe[1]=d>>>8&255,r.check=k(r.check,Oe,2,0)),d=0,h=0,r.mode=F;case F:for(;h<32;){if(0===f)break e;f--,d+=i[o++]<>>8&255,Oe[2]=d>>>16&255,Oe[3]=d>>>24&255,r.check=k(r.check,Oe,4,0)),d=0,h=0,r.mode=L;case L:for(;h<16;){if(0===f)break e;f--,d+=i[o++]<>8),512&r.flags&&(Oe[0]=255&d,Oe[1]=d>>>8&255,r.check=k(r.check,Oe,2,0)),d=0,h=0,r.mode=M;case M:if(1024&r.flags){for(;h<16;){if(0===f)break e;f--,d+=i[o++]<>>8&255,r.check=k(r.check,Oe,2,0)),d=0,h=0}else r.head&&(r.head.extra=null);r.mode=H;case H:if(1024&r.flags&&(m=r.length,m>f&&(m=f),m&&(r.head&&(ye=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),v.arraySet(r.head.extra,i,o,m,ye)),512&r.flags&&(r.check=k(r.check,i,m,o)),f-=m,o+=m,r.length-=m),r.length))break e;r.length=0,r.mode=j;case j:if(2048&r.flags){if(0===f)break e;m=0;do{ye=i[o+m++],r.head&&ye&&r.length<65536&&(r.head.name+=String.fromCharCode(ye))}while(ye&&m>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=G;break;case K:for(;h<32;){if(0===f)break e;f--,d+=i[o++]<>>=7&h,h-=7&h,r.mode=ue;break}for(;h<3;){if(0===f)break e;f--,d+=i[o++]<>>=1,h-=1,3&d){case 0:r.mode=J;break;case 1:if(c(r),r.mode=re,t===B){d>>>=2,h-=2;break e}break;case 2:r.mode=$;break;case 3:e.msg="invalid block type",r.mode=de}d>>>=2,h-=2;break;case J:for(d>>>=7&h,h-=7&h;h<32;){if(0===f)break e;f--,d+=i[o++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=de;break}if(r.length=65535&d,d=0,h=0,r.mode=Q,t===B)break e;case Q:r.mode=X;case X:if(m=r.length){if(m>f&&(m=f),m>u&&(m=u),0===m)break e;v.arraySet(a,i,o,m,s),f-=m,o+=m,u-=m,s+=m,r.length-=m;break}r.mode=G;break;case $:for(;h<14;){if(0===f)break e;f--,d+=i[o++]<>>=5,h-=5,r.ndist=1+(31&d),d>>>=5,h-=5,r.ncode=4+(15&d),d>>>=4,h-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=de;break}r.have=0,r.mode=ee;case ee:for(;r.have>>=3,h-=3}for(;r.have<19;)r.lens[Be[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,xe={bits:r.lenbits},Ee=y(E,r.lens,0,19,r.lencode,0,r.work,xe),r.lenbits=xe.bits,Ee){e.msg="invalid code lengths set",r.mode=de;break}r.have=0,r.mode=te;case te:for(;r.have>>24,ge=Te>>>16&255,ve=65535&Te,!(me<=h);){if(0===f)break e;f--,d+=i[o++]<>>=me,h-=me,r.lens[r.have++]=ve;else{if(16===ve){for(Se=me+2;h>>=me,h-=me,0===r.have){e.msg="invalid bit length repeat",r.mode=de;break}ye=r.lens[r.have-1],m=3+(3&d),d>>>=2,h-=2}else if(17===ve){for(Se=me+3;h>>=me,h-=me,ye=0,m=3+(7&d),d>>>=3,h-=3}else{for(Se=me+7;h>>=me,h-=me,ye=0,m=11+(127&d),d>>>=7,h-=7}if(r.have+m>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=de;break}for(;m--;)r.lens[r.have++]=ye}}if(r.mode===de)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=de;break}if(r.lenbits=9,xe={bits:r.lenbits},Ee=y(x,r.lens,0,r.nlen,r.lencode,0,r.work,xe),r.lenbits=xe.bits,Ee){e.msg="invalid literal/lengths set",r.mode=de;break}if(r.distbits=6,r.distcode=r.distdyn,xe={bits:r.distbits},Ee=y(S,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,xe),r.distbits=xe.bits,Ee){e.msg="invalid distances set",r.mode=de;break}if(r.mode=re,t===B)break e;case re:r.mode=ne;case ne:if(f>=6&&u>=258){e.next_out=s,e.avail_out=u,e.next_in=o,e.avail_in=f,r.hold=d,r.bits=h,_(e,b),s=e.next_out,a=e.output,u=e.avail_out,o=e.next_in,i=e.input,f=e.avail_in,d=r.hold,h=r.bits,r.mode===G&&(r.back=-1);break}for(r.back=0;Te=r.lencode[d&(1<>>24,ge=Te>>>16&255,ve=65535&Te,!(me<=h);){if(0===f)break e;f--,d+=i[o++]<>pe)],me=Te>>>24,ge=Te>>>16&255,ve=65535&Te,!(pe+me<=h);){if(0===f)break e;f--,d+=i[o++]<>>=pe,h-=pe,r.back+=pe}if(d>>>=me,h-=me,r.back+=me,r.length=ve,0===ge){r.mode=fe;break}if(32&ge){r.back=-1,r.mode=G;break}if(64&ge){e.msg="invalid literal/length code",r.mode=de;break}r.extra=15&ge,r.mode=ie;case ie:if(r.extra){for(Se=r.extra;h>>=r.extra,h-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=ae;case ae:for(;Te=r.distcode[d&(1<>>24,ge=Te>>>16&255,ve=65535&Te,!(me<=h);){if(0===f)break e;f--,d+=i[o++]<>pe)],me=Te>>>24,ge=Te>>>16&255,ve=65535&Te,!(pe+me<=h);){if(0===f)break e;f--,d+=i[o++]<>>=pe,h-=pe,r.back+=pe}if(d>>>=me,h-=me,r.back+=me,64&ge){e.msg="invalid distance code",r.mode=de;break}r.offset=ve,r.extra=15&ge,r.mode=oe;case oe:if(r.extra){for(Se=r.extra;h>>=r.extra,h-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=de;break}r.mode=se;case se:if(0===u)break e;if(m=b-u,r.offset>m){if((m=r.offset-m)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=de;break}m>r.wnext?(m-=r.wnext,g=r.wsize-m):g=r.wnext-m,m>r.length&&(m=r.length),be=r.window}else be=a,g=s-r.offset,m=r.length;m>u&&(m=u),u-=m,r.length-=m;do{a[s++]=be[g++]}while(--m);0===r.length&&(r.mode=ne);break;case fe:if(0===u)break e;a[s++]=r.length,u--,r.mode=ne;break;case ue:if(r.wrap){for(;h<32;){if(0===f)break e;f--,d|=i[o++]<=1&&0===D[T];T--);if(O>T&&(O=T),0===T)return u[c++]=20971520,u[c++]=20971520,d.bits=1,0;for(S=1;S0&&(0===e||1!==T))return-1;for(N[1]=0,E=1;E<15;E++)N[E+1]=N[E]+D[E];for(x=0;x852||2===e&&R>592)return 1;for(;;){p=E-A,l[x]v?(k=z[P+l[x]],_=I[Z+l[x]]):(k=96,_=0),h=1<>A)+w]=p<<24|k<<16|_|0}while(0!==w);for(h=1<>=1;if(0!==h?(U&=h-1,U+=h):U=0,x++,0==--D[E]){if(E===T)break;E=t[r+l[x]]}if(E>O&&(U&m)!==b){for(0===A&&(A=O),g+=S,B=E-A,C=1<852||2===e&&R>592)return 1;b=U&m,u[b]=O<<24|B<<16|g-c|0}}return 0!==U&&(u[g+U]=E-A<<24|64<<16|0),d.bits=O,0}},{"../utils/common":1}],10:[function(e,t,r){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(e,t,r){"use strict";function n(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}t.exports=n},{}],"/lib/inflate.js":[function(e,t,r){"use strict";function n(e){if(!(this instanceof n))return new n(e);this.options=s.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var r=o.inflateInit2(this.strm,t.windowBits);if(r!==u.Z_OK)throw new Error(c[r]);this.header=new d,o.inflateGetHeader(this.strm,this.header)}function i(e,t){var r=new n(t);if(r.push(e,!0),r.err)throw r.msg||c[r.err];return r.result}function a(e,t){return t=t||{},t.raw=!0,i(e,t)}var o=e("./zlib/inflate"),s=e("./utils/common"),f=e("./utils/strings"),u=e("./zlib/constants"),c=e("./zlib/messages"),l=e("./zlib/zstream"),d=e("./zlib/gzheader"),h=Object.prototype.toString;n.prototype.push=function(e,t){var r,n,i,a,c,l,d=this.strm,w=this.options.chunkSize,b=this.options.dictionary,m=!1;if(this.ended)return!1;n=t===~~t?t:!0===t?u.Z_FINISH:u.Z_NO_FLUSH,"string"==typeof e?d.input=f.binstring2buf(e):"[object ArrayBuffer]"===h.call(e)?d.input=new Uint8Array(e):d.input=e,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new s.Buf8(w),d.next_out=0,d.avail_out=w),r=o.inflate(d,u.Z_NO_FLUSH),r===u.Z_NEED_DICT&&b&&(l="string"==typeof b?f.string2buf(b):"[object ArrayBuffer]"===h.call(b)?new Uint8Array(b):b,r=o.inflateSetDictionary(this.strm,l)),r===u.Z_BUF_ERROR&&!0===m&&(r=u.Z_OK,m=!1),r!==u.Z_STREAM_END&&r!==u.Z_OK)return this.onEnd(r),this.ended=!0,!1;d.next_out&&(0!==d.avail_out&&r!==u.Z_STREAM_END&&(0!==d.avail_in||n!==u.Z_FINISH&&n!==u.Z_SYNC_FLUSH)||("string"===this.options.to?(i=f.utf8border(d.output,d.next_out),a=d.next_out-i,c=f.buf2string(d.output,i),d.next_out=a,d.avail_out=w-a,a&&s.arraySet(d.output,d.output,i,a,0),this.onData(c)):this.onData(s.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(m=!0)}while((d.avail_in>0||0===d.avail_out)&&r!==u.Z_STREAM_END);return r===u.Z_STREAM_END&&(n=u.Z_FINISH),n===u.Z_FINISH?(r=o.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===u.Z_OK):n!==u.Z_SYNC_FLUSH||(this.onEnd(u.Z_OK),d.avail_out=0,!0)},n.prototype.onData=function(e){this.chunks.push(e)},n.prototype.onEnd=function(e){e===u.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Inflate=n,r.inflate=i,r.inflateRaw=a,r.ungzip=i},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")}),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("Core/formatError",["./defined"],function(e){"use strict";function t(t){var r,n=t.name,i=t.message;r=e(n)&&e(i)?n+": "+i:t.toString();var a=t.stack;return e(a)&&(r+="\n"+a),r}return t}),define("Workers/createTaskProcessorWorker",["../Core/defaultValue","../Core/defined","../Core/formatError"],function(e,t,r){"use strict";function n(n){var i,a=[],o={id:void 0,result:void 0,error:void 0};return function(s){var f=s.data;a.length=0,o.id=f.id,o.error=void 0,o.result=void 0;try{o.result=n(f.parameters,a)}catch(e){e instanceof Error?o.error={name:e.name,message:e.message,stack:e.stack}:o.error=e}t(i)||(i=e(self.webkitPostMessage,self.postMessage)),f.canTransferArrayBuffer||(a.length=0);try{i(o,a)}catch(e){o.result=void 0,o.error="postMessage failed with error: "+r(e)+"\n with responseMessage: "+JSON.stringify(o),i(o)}}}return n}),define("Workers/decodeGoogleEarthEnterprisePacket",["../Core/decodeGoogleEarthEnterpriseData","../Core/GoogleEarthEnterpriseTileInformation","../Core/RuntimeError","../ThirdParty/pako_inflate","./createTaskProcessorWorker"],function(e,t,r,n,i){"use strict";function a(t,r){var n=d.fromString(t.type),i=t.buffer;e(t.key,i);var a=f(i);i=a.buffer;var u=a.length;switch(n){case d.METADATA:return o(i,u,t.quadKey);case d.TERRAIN:return s(i,u,r);case d.DBROOT:return r.push(i),{buffer:i}}}function o(e,n,i){function a(e,t,r){var n=!1;if(4===r){if(t.hasSubtree())return;n=!0}for(var i=0;i<4;++i){var o=e+i.toString();if(n)B[o]=null;else if(r<4)if(t.hasChild(i)){if(A===b)return void console.log("Incorrect number of instances");var s=k[A++];B[o]=s,a(o,s,r+1)}else B[o]=null}}var o=new DataView(e),s=0,f=o.getUint32(s,!0);if(s+=l,f!==h)throw new r("Invalid magic");var d=o.getUint32(s,!0);if(s+=l,1!==d)throw new r("Invalid data type. Must be 1 for QuadTreePacket");var w=o.getUint32(s,!0);if(s+=l,2!==w)throw new r("Invalid QuadTreePacket version. Only version 2 is supported.");var b=o.getInt32(s,!0);s+=c;var m=o.getInt32(s,!0);if(s+=c,32!==m)throw new r("Invalid instance size.");var g=o.getInt32(s,!0);s+=c;var v=o.getInt32(s,!0);s+=c;var p=o.getInt32(s,!0);if(s+=c,g!==b*m+s)throw new r("Invalid dataBufferOffset");if(g+v+p!==n)throw new r("Invalid packet offsets");for(var k=[],_=0;_